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 053219 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 [A405][DB85][3460]- cmdlist: dw aa,bb,cc,ddd,ee,ff,gg,hh,ii,error,error,ll,mm,nn,oo 195 00000050 [2613][298E][AF8F]- 195 00000056 [E62F][8990][B592]- 195 0000005C [4AA7][4AA7][6F95]- 195 00000062 [B797][4999][2392] 196 00000068 [8E3F][AA9B][9720]- dw pp,qq,rr,sss,tt,uu,error,ww,xx,yy 196 0000006E [80A0][753A][1749]- 196 00000074 [4AA7][A9A3][2BA5]- 196 0000007A [5CCC] 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 %if _BREAK_INSTALLDPMI 261 opt3_break_installdpmi: equ 20_0000h 262 %endif 263 %endif 264 opt3_no_idle_2F: equ 200_0000h 265 %if _DELAY_BEFORE_BP 266 opt3_delay_before_bp: equ 400_0000h 267 %endif 268 opt3_no_call_update: equ 800_0000h 269 opt3_disable_autorepeat:equ 1000_0000h 270 opt3_check_ctrlc_keyb: equ 2000_0000h 271 opt3_check_ctrlc_0bh: equ 4000_0000h 272 opt3_tsr_quit_leave_tf: equ 8000_0000h 273 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 276 277 00000088 02000000 options4: dd DEFAULTOPTIONS4 278 opt4_int_2F_hook: equ 2 279 opt4_int_08_hook: equ 4 280 opt4_int_2D_hook: equ 8 281 opt4_int_serial_force: equ 1_0000h 282 opt4_int_2F_force: equ 2_0000h 283 opt4_int_08_force: equ 4_0000h 284 opt4_int_2D_force: equ 8_0000h 285 opt4_int_00_force: equ 100_0000h 286 opt4_int_01_force: equ 200_0000h 287 opt4_int_03_force: equ 400_0000h 288 opt4_int_06_force: equ 800_0000h 289 opt4_int_18_force: equ 1000_0000h 290 opt4_int_19_force: equ 2000_0000h 291 DEFAULTOPTIONS4 equ opt4_int_2F_hook 292 ; options, options2, options3, options4 293 ; are each assumed to be dwords 294 ; and all consecutive in expr.asm isvariable? 295 296 0000008C 00000000 startoptions: dd DEFAULTOPTIONS ; options as determined during startup; read-only for user 297 00000090 10410000 startoptions2: dd DEFAULTOPTIONS2 298 00000094 0F000060 startoptions3: dd DEFAULTOPTIONS3 299 00000098 02000000 startoptions4: dd DEFAULTOPTIONS4 300 ; startoptions, startoptions2, startoptions3, startoptions4 301 ; are each assumed 302 ; to be dwords and all consecutive in expr.asm isvariable? 303 304 0000009C F8348000 internalflags: dd attachedterm|pagedcommand|notstdinput|inputfile|notstdoutput|outputfile|(!!_PM*dpminohlt)|debuggeeA20|debuggerA20 305 ; flags only modified by DEBUG itself 306 oldpacket equ 1 ; Int25/Int26 packet method available (L, W) 307 newpacket equ 2 ; Int21.7305 packet method available (L, W) 308 ntpacket equ 4 ; VDD registered and usable (L, W) 309 pagedcommand equ 8 ; allows paging in puts 310 notstdinput equ 10h ; DEBUG's StdIn isn't a device with StdIn bit (is file or other device) 311 inputfile equ 20h ; DEBUG's StdIn is a file, notstdinput also set 312 notstdoutput equ 40h ; DEBUG's StdOut isn't a device with StdOut bit (is file or other device) 313 outputfile equ 80h ; DEBUG's StdOut is a file, notstdoutput also set 314 hooked2F equ 100h ; Int2F hooked 315 nohook2F equ 200h ; don't hook Int2F.1687 (required for Win9x, DosEmu?) 316 dpminohlt equ 400h ; DPMI doesn't like hlt 317 protectedmode equ 800h ; in (DPMI) protected mode 318 debuggeeA20 equ 1000h ; state of debuggee's A20 319 debuggerA20 equ 2000h ; state of debugger's A20 (will be on if possible) 320 nodosloaded equ 4000h ; No DOS loaded currently (Boot loader mode) 321 has386 equ 8000h ; CPU is a 386 322 usecharcounter equ 1_0000h ; don't reset charcounter between calls to puts 323 runningnt equ 2_0000h ; running in NTVDM 324 canswitchmode equ 4_0000h ; can switch modes (auxbuff large enough, DPMI mode switch set up) 325 modeswitched equ 8_0000h ; switched mode (now in the mode that we weren't entered in) 326 promptwaiting equ 10_0000h ; puts: any more output needs to display a prompt first 327 switchbuffer equ 20_0000h ; mode switch needs a buffer (auxbuff) 328 tsrmode equ 40_0000h ; in TSR mode; DPI and DPP not valid 329 attachedterm equ 80_0000h ; the attached process terminated 330 runningdosemu equ 100_0000h ; running in dosemu 331 ; load_is_ldp equ 200_0000h ; boot load: partition specified as "ldp" 332 tt_while: equ 400_0000h ; tt: while condition specified 333 tt_p: equ 800_0000h ; tt: proceed past repeated string instructions 334 tt_silent_mode: equ 1000_0000h ; tt: run should be silent (dump at end) 335 tt_silence: equ 2000_0000h ; tt: silent writing (write to auxbuff instead) 336 tt_no_bb: equ 4000_0000h ; tt: do not use bb breakpoints 337 tt_no_bb_first: equ 8000_0000h ; tt: do not use bb breakpoints at first 338 339 000000A0 00000000 internalflags2: dd 0 340 dif2_gg_is_first: equ 1 341 dif2_gg_skip_non_cseip: equ 2 342 dif2_gg_skip_cseip: equ 4 343 dif2_gg_is_gg: equ 8 344 dif2_gg_first_detected: equ 10h 345 dif2_gg_again: equ 20h 346 dif2_tpg_proceed_bp_set:equ 40h 347 dif2_tpg_keep_proceed_bp: equ 80h 348 dif2_tpg_have_bp: equ 100h 349 dif2_tpg_adjusted_cseip:equ 200h 350 dif2_tpg_do_not_adjust: equ 400h 351 dif2_bp_failure: equ 800h 352 dif2_is_pp: equ 1000h 353 %if _INPUT_FILE_HANDLES 354 dif2_input_file: equ 10_0000h 355 dif2_closed_input_file: equ 20_0000h 356 %endif 357 dif2_did_getline_file: equ 40_0000h 358 dif2_boot_loaded_kernel:equ 100_0000h 359 %if _INPUT_FILE_BOOT 360 dif2_input_file_boot: equ 200_0000h 361 dif2_closed_input_file_boot: equ 400_0000h 362 %endif 363 dif2_in_silence_dump: equ 1000_0000h 364 dif2_int31_segment: equ 2000_0000h 365 366 000000A4 80000000 internalflags3: dd dif3_partition_changed 367 dif3_load_is_ldp: equ 1 ; boot load: partition specified as "ldp" 368 dif3_load_is_sdp: equ 2 ; boot load: partition specified as "sdp" 369 dif3_load_is_ydp: equ 4 ; boot load: partition specified as "ydp" 370 dif3_load_is_dp: equ dif3_load_is_ldp | dif3_load_is_sdp | dif3_load_is_ydp 373 dif3_load_dir_dir: equ 8 374 dif3_input_terminal_override: equ 10h 375 dif3_input_serial_override: equ 20h 376 dif3_if_not: equ 40h 377 dif3_partition_changed: equ 80h 378 ; 379 dif3_input_cmdline: equ 100h; input reading from cmdline_buffer 380 dif3_input_cmdline_closed: equ 200h 381 dif3_at_line_end: equ 400h 382 dif3_quiet_input_single:equ 800h 383 dif3_quiet_output: equ 1000h 384 dif3_unquiet_error: equ 2000h 385 dif3_unquiet_prompt: equ 4000h 386 dif3_unquiet: equ dif3_unquiet_error | dif3_unquiet_prompt 387 dif3_return_eof: equ 8000h 388 dif3_highlighting: equ 1_0000h 389 dif3_do_not_highlight: equ 2_0000h 390 dif3_int10_highlight: equ 2_0000h 391 %if _PM 392 dif3_ss_b_bit_set: equ 10_0000h 393 %endif 394 dif3_gotint19: equ 20_0000h 395 %if _DELAY_BEFORE_BP 396 dif3_delayed equ 80_0000h 397 %endif 398 dif3_input_re: equ 100_0000h ; input reading from re_buffer 399 dif3_input_re_closed: equ 200_0000h 400 dif3_accept_getrange_0: equ 400_0000h 401 %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 402 dif3_in_if: equ 800_0000h 403 %endif 404 dif3_auxbuff_guarded_1: equ 1000_0000h 405 dif3_auxbuff_guarded_2: equ 2000_0000h 406 dif3_prior_pm: equ 4000_0000h 407 dif3_sss_is_reverse: equ 8000_0000h 408 409 000000A8 00000000 internalflags4: dd 0 410 dif4_int_serial_hooked: equ 1 411 dif4_int_2F_hooked: equ 2 412 dif4_int_08_hooked: equ 4 413 dif4_int_2D_hooked: equ 8 414 ; internalflags, internalflags2, internalflags3, internalflags4 415 ; are each assumed 416 ; to be dwords and all consecutive in expr.asm isvariable? 417 418 000000AC 07000000 asm_options: dd DEFAULTASMOPTIONS 419 disasm_lowercase equ 1 420 disasm_commablank equ 2 421 disasm_nasm equ 4 422 disasm_lowercase_refmem:equ 8 423 disasm_show_short: equ 10h 424 disasm_show_near: equ 20h 425 disasm_show_far: equ 40h 426 DEFAULTASMOPTIONS equ disasm_lowercase|disasm_commablank|disasm_nasm 427 428 asm_startoptions: 429 000000B0 07000000 dd DEFAULTASMOPTIONS 430 431 000000B4 00000000 gg_first_cseip_linear: dd 0 432 000000B8 00000000 gg_next_cseip_linear: dd 0 433 000000BC 00000000 tpg_possible_breakpoint:dd 0 434 000000C0 [7072] gg_deferred_message: dw msg.empty_message 435 bb_deferred_message_in_lineout_behind: 436 000000C2 0000 dw 0 437 align 4, db 0 438 000000C4 00 tpg_proceed_bp: times BPSIZE db 0 439 %if _DEBUG1 440 align 2, db 0 441 test_records_Readmem: times 6 * 16 db 0 442 test_records_Writemem: times 6 * 16 db 0 443 test_records_getLinear: times 6 * 16 db 0 444 test_records_getSegmented: times 6 * 16 db 0 445 446 test_readmem_value: db 0 447 %endif 448 000000CD 00 pp_instruction: db 0 449 000000CE 00 align 4, db 0 450 000000D0 00000000 pp_operand: dd 0 451 align 2, db 0 452 000000D4 0000 code_seg: dw 0 453 %if _PM 454 000000D6 0000 code_sel: dw 0 455 %endif 456 457 000000D8 0D db 13 458 000000D9 0D align 16, db 13 ; insure the cmdline_buffer is prefixed by CR 459 cmdline_buffer: 460 .size: equ _RC_BUFFER_SIZE 461 000000E0 00 times .size db 0 462 .end: 463 000001E0 [E000] .position: dw cmdline_buffer 464 465 000001E2 0D db 13 466 000001E3 0D align 2, db 13 ; insure the re_buffer is prefixed by CR 467 re_buffer: 468 .size: equ _RE_BUFFER_SIZE 469 000001E4 405200 fill .size,0,db "@R" 470 .end: 471 000009E4 [E401] .position: dw re_buffer 472 473 000009E6 00 align 4, db 0 474 000009E8 00000000 re_count: dd 0 475 000009EC 00010000 re_limit: dd 256 476 000009F0 00000000 rc_count: dd 0 477 000009F4 00100000 rc_limit: dd 4096 478 479 align 2, db 0 480 %if _PM 481 000009F8 0000 auxbuff_switchbuffer_size: dw 0 482 %endif 483 000009FA 00 auxbuff_segorsel:segonlyaddress 484 auxbuff_behind_while_condition: 485 00000A00 0000 dw 0 ; -> behind while condition stored in auxbuff 486 ; (this is also the first silent buffer entry) 487 auxbuff_behind_last_silent: 488 00000A02 0000 dw 0 ; -> behind last silent buffer entry 489 tt_silent_mode_number: 490 00000A04 0000 dw 0 ; if non-zero: maximum amount of dumps 491 ; displayed after T/TP/P while silent 492 %if _INPUT_FILE_HANDLES 493 00000A06 90 align INPUTFILEHANDLE_size 494 input_file_handles: 495 00000A08 FF times _INPUT_FILE_HANDLES * INPUTFILEHANDLE_size db -1 496 00000A88 0000 .active: dw 0 497 00000A8A 0000 .to_close: dw 0 498 %endif 499 align 2, db 0 500 00000A8C 0142 indos_remember_seek_function: dw 4201h 501 00000A8E FFFF indos_remember_seek_handle: dw -1 502 align 4, db 0 503 00000A90 00000000 indos_remember_seek_offset: dd 0 504 %if _INPUT_FILE_BOOT 505 align 4, db 0 506 00000A94 00000000 boot_remember_seek_offset: dd 0 507 align 2, db 0 508 00000A98 FFFF boot_remember_seek_handle: dw -1 509 %endif 510 511 00000A9A 00 charcounter: db 0 ; used by raw output to handle tab 512 00000A9B 00 linecounter: db 0 ; used by paging in puts 513 align 4, db 0 514 00000A9C 0000 savesp: dw 0 ; saved stack pointer 515 00000A9E 0000 dw 0 ; 0 to set high word of esp 516 00000AA0 0000 re_sp: dw 0 517 00000AA2 [0000] errret: dw cmd3 ; return here if error 518 00000AA4 [69A7] throwret: dw errhandler ; return here if error - priority, no display 519 00000AA6 [3E0C] throwsp: dw stack_end - 2; stack pointer set before jumping to throwret 520 00000AA8 0000 run_sp: dw 0 ; stack pointer when running 521 00000AAA 0000 dw 0 ; (zero for esph) 522 00000AAC 4000 spadjust: dw 40h ; adjust sp by this amount for save 523 00000AAE 0000 pspdbe: dw 0 ; debuggee's PSP (unless DIF&attachedterm) 524 00000AB0 0000 pspdbg: dw 0 ; debugger's PSP (RM segment) 525 00000AB2 00 align 4, db 0 526 00000AB4 0000000000000000 run2324: dd 0,0 ; debuggee's interrupt vectors 23h and 24h (both modes) 527 %if _PM 528 00000ABC 00000000 dd 0 529 00000AC0 [B88C][D38C] dbg2324: dw i23pm, i24pm 530 %endif 531 %if _VDD 532 00000AC4 FFFF hVdd: dw -1 ; NTVDM VDD handle 533 %endif 534 00000AC6 00 align 4, db 0 535 00000AC8 0000000000000000 sav2324: dd 0,0 ; debugger's interrupt vectors 23h and 24h (real-mode only) 536 00000AD0 00 hakstat: db 0 ; whether we have hacked the vectors or not 537 00000AD1 00 align 4, db 0 538 00000AD4 00000000 psp22: dd 0 ; original terminate address from our PSP 539 00000AD8 0000 parent: dw 0 ; original parent process from our PSP (must follow psp22) 540 %if _MCB || _INT 541 00000ADA FFFF firstmcb: dw -1 ; start of MCB chain (always segment) 542 00000ADC FFFF firstumcb: dw -1 543 %endif 544 00000ADE 00 pInDOS: segofs16address ; far16 address of InDOS flag (bimodal) 545 %if _USESDA 546 00000AE6 FFFFFFFFFFFFFFFF pSDA: segofs16address minusone 547 ; far16 address of SDA (bimodal) 548 %endif 549 00000AEE 00 machine: db 0 ; type of processor for assembler and disassembler (1..6) 550 00000AEF 00 has_87: db 0 ; if there is a math coprocessor present 551 00000AF0 00 mach_87: db 0 ; type of coprocessor present 552 00000AF1 00 encodedmach87: db 0 ; C0 = no coproceasor, C = coprocessor present, 553 ; C2 = 287 present on a 386 554 %if _MMXSUPP 555 00000AF2 00 has_mmx: db 0 556 %endif 557 00000AF3 01 bInDbg: db 1 ; 1=debugger is running 558 00000AF4 0A notatty: db 10 ; if standard input is from a file 559 ; this is also used for a linebreak processing hack 560 00000AF5 00 switchar: db 0 ; switch character 561 00000AF6 20 swch1: db ' ' ; switch character if it's a slash 562 00000AF7 00 align 2, db 0 563 00000AF8 0000 promptlen: dw 0 ; length of prompt 564 00000AFA [0200] bufnext: dw line_in+2 ; address of next available character 565 00000AFC [0200] bufend: dw line_in+2 ; address + 1 of last valid character 566 00000AFE 0000 rc: dw 0 567 00000B00 0000 priorrc: dw 0 568 00000B02 0000 erc: dw 0 569 %if _HISTORY 570 history: 571 %if _HISTORY_SEPARATE_FIXED 572 00000B04 00 .segorsel: segonlyaddress 573 00000B0A FE1F .first: dw _HISTORY_SIZE - 2 574 00000B0C FE1F .last: dw _HISTORY_SIZE - 2 575 %else 576 .first: dw historybuffer.end - 2 577 .last: dw historybuffer.end - 2 578 %endif 579 %endif 580 581 var_addr_entries: 582 00000B0E 00 a_addr: segmentedaddress; address for next A command 583 00000B18 00 d_addr: segmentedaddress; address for next D command; must follow a_addr 584 00000B22 00 behind_r_u_addr:segmentedaddress; address behind R's disassembly 585 00000B2C 00 u_addr: segmentedaddress; address for next U command; must follow d_addr 586 00000B36 00 e_addr: segmentedaddress; address for current/next E command 587 %if _DSTRINGS 588 00000B40 00 dz_addr: segmentedaddress; address for next ASCIZ string 589 00000B4A 00 dcpm_addr: segmentedaddress; address for next $-terminated string 590 00000B54 00 dcount_addr: segmentedaddress; address for next byte-counted string 591 00000B5E 00 dwcount_addr: segmentedaddress; address for next word-counted string 592 %endif 593 var_addr_entries.amount equ ($ - var_addr_entries) / SEGADR_size 594 %if _PM 595 00000B68 00000000 x_addr: dd 0 ; (phys) address for next DX command 596 %endif 597 %if _DSTRINGS 598 00000B6C 00 dstringtype: db 0 ; FFh byte-counted, FEh word-counted, else terminator byte 599 00000B6D 00 align 2, db 0 600 00000B6E [400B] dstringaddr: dw dz_addr ; -> address of last string 601 %endif 602 %if _INT 603 align 4, db 0 604 00000B70 00000000 intaddress: dd 0 605 lastint_is_86m_and_mcb: 606 00000B74 0000 dw 0 607 00000B76 00 lastint: db 0 608 %endif 609 00000B77 00 align 4, db 0 610 search_results: 611 %if _PM 612 00000B78 00 times 6 * 16 db 0 613 %else 614 times 4 * 16 db 0 615 %endif 616 align 4, db 0 617 00000BD8 00000000 sscounter: dd 0 618 00000BDC 00 eqflag: db 0 ; flag indicating presence of `=' operand 619 00000BDD 00 align 2, db 0 620 00000BDE 000000000000 eqladdr: dw 0,0,0 ; address of `=' operand in G, P and T command 621 align 2, db 0 622 00000BE4 0000 run_int: dw 0 ; interrupt type that stopped the running 623 00000BE6 [5C04] lastcmd: dw dmycmd 624 00000BE8 00 fileext: db 0 ; file extension (0 if no file name) 625 EXT_OTHER equ 1 626 EXT_COM equ 2 627 EXT_EXE equ 4 628 EXT_HEX equ 8 629 630 00000BE9 00 align 4, db 0 631 00000BEC 00000000 mmxbuff: dd 0 ; buffer with a (read-only) part of MMX register 632 ; for access from within expressions 633 %if _CATCHINT08 634 00000BF0 0000 intr8_counter: dw 0 635 %endif 636 00000BF2 00 maxmachinetype: db 0 637 serial_rows: 638 00000BF3 18 db 24 639 serial_columns: 640 00000BF4 50 db 80 641 serial_keep_timeout: 642 00000BF5 0F db 15 643 %if _USE_TX_FIFO 644 serial_fifo_size: 645 00000BF6 10 db _BI_TX_FIFO_SIZE 646 ; size of built-in TX fifo (1 is as if no FIFO) 647 %endif 648 serial_flags: 649 00000BF7 00 db 0 650 sf_init_done: equ 1 651 sf_ctrl_c: equ 2 652 sf_double_ctrl_c: equ 4 653 sf_built_in_fifo: equ 8 654 655 00000BF8 0B serial_var_intnum: db _INTNUM 656 00000BF9 03 serial_var_params: db _UART_PARAMS 657 00000BFA 00 serial_var_fifo: db _UART_FIFO 658 00000BFB 00 align 2, db 0 659 00000BFC F802 serial_var_baseport: dw _UART_BASE 660 00000BFE 0C00 serial_var_dl: dw _UART_RATE 661 00000C00 0800 serial_var_irqmask: dw _OFFMASK 662 663 00000C02 01 io_rows: db 1 664 00000C03 01 io_columns: db 1 665 align 2, db 0 666 00000C04 0000 io_start_buffer: dw 0 667 00000C06 0000 io_end_buffer: dw 0 668 00000C08 FF00 io_levels: dw 255 669 00000C0A 0100 io_flags: dw DEFAULTIOFLAGS 670 iof_extra_iol_for_tpg_re: equ 1 671 DEFAULTIOFLAGS equ iof_extra_iol_for_tpg_re 672 673 align 2, db 0 674 00000C0C 0000 getline_timer_count: dw 0 675 00000C0E 0000 getline_timer_last: dw 0 676 00000C10 [5C04] getline_timer_func: dw dmycmd 677 678 %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 679 align 2, db 0 680 00000C12 0000 if_exists_then_address: dw 0 681 00000C14 0000 if_exists_si: dw 0 682 00000C16 0000 if_exists_sp: dw 0 683 00000C18 0000 if_exists_length: dw 0 684 %endif 685 686 align 2, db 0 687 terminator_in_line_in: 688 00000C1A 0000 .offset: dw 0 689 00000C1C 00 .value: db 0 690 691 00000C1D 00 qqtermcode: db 0 692 693 align 2, db 0 694 inttab_optional: 695 .: 696 serial_installed_intnum: equ $ 697 00000C1E 0000 dw 0 698 00000C20 [D498] dw serial_interrupt_handler 699 00000C22 0100 dw dif4_int_serial_hooked 700 %if _PM 701 00000C24 2F00 dw 2Fh 702 00000C26 [708B] dw debug2F 703 00000C28 0200 dw dif4_int_2F_hooked 704 %endif 705 %if _CATCHINT08 706 00000C2A 0800 dw 8 707 00000C2C [8087] dw intr8 708 00000C2E 0400 dw dif4_int_08_hooked 709 %endif 710 .amount: equ ($ - .) / 6 711 00000C30 FFFF dw -1 712 713 714 amisintr_offset: 715 00000C32 [3D0C] dw inttab 716 717 inttab_pre: 718 00000C34 00 times 3 * inttab_optional.amount db 0 719 720 inttab: 721 %if _CATCHINT00 722 00000C3D 00 db 0 723 00000C3E [6088] dw intr0 ; table of interrupt initialization stuff 724 %endif 725 %if _CATCHINT01 726 00000C40 01 db 1 727 00000C41 [1C88] dw intr1 728 %endif 729 %if _CATCHINT03 730 00000C43 03 db 3 731 00000C44 [7C88] dw intr3 732 %endif 733 %if _CATCHINT06 734 00000C46 06 db 6 735 00000C47 [9888] dw intr6 736 %endif 737 %if _CATCHINT18 738 00000C49 18 db 18h 739 00000C4A [B488] dw intr18 740 %endif 741 %if _CATCHINT19 742 00000C4C 19 db 19h 743 00000C4D [D088] dw intr19 744 %endif 745 endarea inttab 746 inttab_number equ inttab_size / 3 747 %if _CATCHINT2D 748 00000C4F 2D .i2D: db 2Dh 749 00000C50 [7483] dw int2D 750 %endif 751 752 753 intforcetab: 754 %if _CATCHINT00 755 00000C52 01 db opt4_int_00_force >> 24 756 %endif 757 %if _CATCHINT01 758 00000C53 02 db opt4_int_01_force >> 24 759 %endif 760 %if _CATCHINT03 761 00000C54 04 db opt4_int_03_force >> 24 762 %endif 763 %if _CATCHINT06 764 00000C55 08 db opt4_int_06_force >> 24 765 %endif 766 %if _CATCHINT18 767 00000C56 10 db opt4_int_18_force >> 24 768 %endif 769 %if _CATCHINT19 770 00000C57 20 db opt4_int_19_force >> 24 771 %endif 772 773 774 align 2, db 0 775 ; Parameter block for EXEC call 776 00000C58 0000 execblk:dw 0 ;(00) zero: copy the parent's environment 777 00000C5A 00000000 dw 0,0 ;(02) address of command tail to copy 778 00000C5E 5C000000 dw 5Ch,0 ;(06) address of first FCB to copy 779 00000C62 6C000000 dw 6Ch,0 ;(10) address of second FCB to copy 780 00000C66 00000000 dw 0,0 ;(14) initial SS:SP 781 00000C6A 00000000 dw 0,0 ;(18) initial CS:IP 782 783 784 ; Register save area (32 words). 785 ; must be DWORD aligned, used as stack 786 00000C6E 00 align 4, db 0 787 regs: 788 00000C70 00000000 reg_eax: dd 0 ;+00 eax 789 00000C74 00000000 reg_ebx: dd 0 ;+04 ebx 790 00000C78 00000000 reg_ecx: dd 0 ;+08 ecx 791 00000C7C 00000000 reg_edx: dd 0 ;+12 edx 792 00000C80 00000000 reg_esp: dd 0 ;+16 esp 793 00000C84 00000000 reg_ebp: dd 0 ;+20 ebp 794 00000C88 00000000 reg_esi: dd 0 ;+24 esi 795 00000C8C 00000000 reg_edi: dd 0 ;+28 edi 796 00000C90 00000000 reg_ds: dd 0 ;+32 ds (high word unused) 797 00000C94 00000000 reg_es: dd 0 ;+36 es (high word unused) 798 00000C98 00000000 reg_ss: dd 0 ;+40 ss (high word unused) 799 00000C9C 00000000 reg_cs: dd 0 ;+44 cs (high word unused) 800 00000CA0 00000000 reg_fs: dd 0 ;+48 fs (high word unused) 801 00000CA4 00000000 reg_gs: dd 0 ;+52 gs (high word unused) 802 00000CA8 00000000 reg_eip: dd 0 ;+56 eip 803 00000CAC 00000000 reg_efl: dd 0 ;+60 efl(ags) 804 regs.end: 805 regs.size: equ regs.end - regs 806 807 regs_prior: 808 .: 809 00000CB0 00000000 times 16 dd 0 810 .end: 811 .size: equ .end - . 812 813 %if .size != regs.size 814 %error regs prior save area size mismatch 815 %endif 816 817 %if _VARIABLES 818 00000CF0 00000000 vregs: times 256 dd 0 ; internal v0..vff 819 %endif 820 821 ; possible byte encoding of lDebug variables for dynamic computations: 822 ; xxxxyyyy 823 ; 10: register 824 ; xx: size (0 = 1, 1 = 2, 2 = 4) 825 ; yyyy: 0..15: register as stored in the register save area 826 ; as SIL, DIL, BPL, SPL aren't supported these map to xH 827 ; xSL, IPL and FLL are invalid, ExS are invalid 828 ; 1011: variable 829 ; yyyy: which variable. variables are always dword-sized 830 ; 11000000: 32-bit compound, next byte stores: xxxxyyyy first, second 16-bit reg 831 ; 11000001..11111111: available for encoding other compound regs, vars, indirection, 832 ; symbols, types etc 833 ; 0xxxxxxx: operators 834 835 836 ; Instruction set information needed for the 'p' command. 837 ; ppbytes and ppinfo needs to be consecutive. 838 000010F0 6667262E363E6465F2- ppbytes:db 66h,67h,26h,2Eh,36h,3Eh,64h,65h,0F2h,0F3h,0F0h ; prefixes 838 000010F9 F3F0 839 PPLEN_ONLY_PREFIXES equ $-ppbytes 840 .string: 841 000010FB ACADAAABA4A5 db 0ACh,0ADh,0AAh,0ABh,0A4h,0A5h ; lods,stos,movs 842 00001101 6C6D6E6F db 6Ch,6Dh,6Eh,6Fh ; ins,outs 843 00001105 A6A7AEAF db 0A6h,0A7h,0AEh,0AFh ; cmps,scas 844 PPLEN_ONLY_STRING equ $-ppbytes 845 .string_amount: equ $ - .string 846 00001109 CCCD db 0CCh,0CDh ; int instructions 847 0000110B E0E1E2 db 0E0h,0E1h,0E2h ; loop instructions 848 0000110E E8 db 0E8h ; call rel16/32 849 0000110F 9A db 09Ah ; call far seg16:16/32 850 ; (This last one is done explicitly by the code.) 851 ; db 0FFh ; FF/2 or FF/3: indirect call 852 853 PPLEN equ $-ppbytes ; size of the above table 854 855 ; Info for the above, respectively. This MUST follow 856 ; immediately after ppbytes, as we add + PPLEN - 1 to 857 ; di after repne scasb to index into this (ppinfo). 858 ; 80h = prefix; 82h = operand size prefix; 81h = address size prefix. 859 ; If the high bit is not set, the next highest bit (40h) indicates 860 ; that the instruction size depends on whether there is an operand 861 ; size prefix; if set, under o32 two bytes are added to the size. 862 ; (This is only used for direct near and far call.) 863 ; If both the two highest bits are clear, then PP_STRDEST, 864 ; PP_STRSRC, or PP_STRSRC2 may be set. This only happens for 865 ; string instructions, which always are neither prefixes nor 866 ; use additional bytes. 867 ; The remaining bits tell the number of additional bytes in the 868 ; instruction. This is at most 4. It must be below-or-equal to 869 ; 7, or if PP_VARSIZ is used, 5 (so the sum stays below 8). 870 871 PP_ADRSIZ equ 01h 872 PP_OPSIZ equ 02h 873 PP_PREFIX equ 80h 874 PP_VARSIZ equ 40h 875 PP_STRDEST equ 20h 876 PP_STRSRC equ 10h 877 PP_STRSRC2 equ 08h 878 PP_SIZ_MASK equ 07h 879 880 00001110 8281 ppinfo: db PP_PREFIX | PP_OPSIZ, PP_PREFIX | PP_ADRSIZ 881 00001112 80 times 9 db PP_PREFIX ; prefixes 882 0000111B 1010 db PP_STRSRC, PP_STRSRC ; lods 883 0000111D 2020 db PP_STRDEST, PP_STRDEST ; stos 884 0000111F 3030 db PP_STRDEST | PP_STRSRC, PP_STRDEST | PP_STRSRC 885 ; movs 886 00001121 2020 db PP_STRDEST, PP_STRDEST ; ins 887 00001123 1010 db PP_STRSRC, PP_STRSRC ; outs 888 00001125 1818 db PP_STRSRC2 | PP_STRSRC, PP_STRSRC2 | PP_STRSRC 889 ; cmps 890 00001127 0808 db PP_STRSRC2, PP_STRSRC2 ; scas 891 00001129 0001 db 0,1 ; int 892 0000112B 010101 db 1,1,1 ; loop 893 0000112E 42 db PP_VARSIZ | 2 ; call rel16/32 with displacement 894 0000112F 44 db PP_VARSIZ | 4 ; call far 16:16 or 16:32 immediate 895 896 %if PPLEN != $-ppinfo 897 %error "ppinfo table has wrong size" 898 %endif 899 900 901 ; Equates for instruction operands. 902 ; First the sizes. 903 904 OP_ALL equ 40h ; byte/word/dword operand (could be 30h but ...) 905 OP_1632 equ 50h ; word or dword operand 906 OP_8 equ 60h ; byte operand 907 OP_16 equ 70h ; word operand 908 OP_32 equ 80h ; dword operand 909 OP_64 equ 90h ; qword operand 910 OP_1632_DEFAULT equ 0A0h ; word or dword or default opsize 911 912 OP_SIZE equ OP_ALL ; the lowest of these 913 914 ; These operand types need to be combined with a size. 915 ; Bits 0 to 3 give one of these types (maximum 15), 916 ; and bits 4 to 7 specify the size. Table entries 917 ; for these are identified by detecting that they 918 ; are above-or-equal OP_SIZE. 919 ; The first parameter to the opsizeditem macro is the 920 ; name of the item. It has to match the names used in 921 ; the instr.key and debugtbl.inc files. 922 ; The second parameter is the entry for bittab that 923 ; is used by aa.asm (the assembler). 924 ; The third parameter is the suffix used to create the 925 ; entry for asmjmp (prefix aop_) and disjmp2 (dop_). 926 927 %macro opsizeditem 3.nolist 928 %1 equ nextindex 929 %xdefine BITTAB_OPSIZEDITEMS BITTAB_OPSIZEDITEMS,%2 930 %xdefine ASMJMP_OPSIZEDITEMS ASMJMP_OPSIZEDITEMS,aop_%3 931 %xdefine DISJMP2_OPSIZEDITEMS DISJMP2_OPSIZEDITEMS,dop_%3 932 %assign nextindex nextindex + 1 933 %endmacro 934 %assign nextindex 0 935 %define BITTAB_OPSIZEDITEMS "" 936 %define ASMJMP_OPSIZEDITEMS "" 937 %define DISJMP2_OPSIZEDITEMS "" 938 opsizeditem OP_IMM, ARG_IMMED, imm ; immediate 939 opsizeditem OP_RM,ARG_DEREF+ARG_JUSTREG,rm ; reg/mem 940 opsizeditem OP_M, ARG_DEREF, m ; mem (but not reg) 941 opsizeditem OP_R_MOD, ARG_JUSTREG, r_mod ; register, determined from MOD R/M part 942 opsizeditem OP_MOFFS, ARG_DEREF, moffs ; memory offset; e.g., [1234] 943 opsizeditem OP_R, ARG_JUSTREG, r ; reg part of reg/mem byte 944 opsizeditem OP_R_ADD, ARG_JUSTREG, r_add ; register, determined from instruction byte 945 opsizeditem OP_AX, ARG_JUSTREG, ax ; al or ax or eax 946 %if nextindex > 16 947 %error Too many op sized items 948 %endif 949 950 ; These don't need a size. 951 ; Because the size needs to be clear to indicate 952 ; that one of these is to be used, the maximum 953 ; value for these is 63 (as 64 is OP_SIZE). 954 ; The minimum value for these is 1 because a 0 955 ; without size means the end of an op list (OP_END). 956 ; The first parameter to the opitem macro is the name 957 ; of the item. It has to match the names used in the 958 ; instr.key and debugtbl.inc files. 959 ; The second parameter is the entry for bittab that 960 ; is used by aa.asm (the assembler). The third 961 ; parameter is the entry for asmjmp. 962 ; The fourth parameter is the entry for optab as used 963 ; by uu.asm (the disassembler). 964 ; 965 ; asm_siznum contains entries for OP_M64 to OP_MXX. 966 ; (The order has to match their opitem order.) 967 ; asm_regnum contains entries for OP_DX to OP_GS. 968 ; (The order has to match their opitem order.) 969 970 %macro opitem 4.nolist 971 %1 equ nextindex 972 %xdefine BITTAB_OPITEMS BITTAB_OPITEMS,%2 973 %xdefine ASMJMP_OPITEMS ASMJMP_OPITEMS,%3 974 %xdefine OPTAB_OPITEMS OPTAB_OPITEMS,%4 975 %assign nextindex nextindex + 1 976 %endmacro 977 OP_END equ 0 978 %assign nextindex 1 979 %define BITTAB_OPITEMS "" 980 %define ASMJMP_OPITEMS "" 981 %define OPTAB_OPITEMS "" 982 ; order of the following (ao17 entries) must match asm_siznum in aa.asm 983 OP_FIRST_ASM_SIZNUM equ nextindex ; corresponding to asm_siznum start 984 opitem OP_M64, ARG_DEREF, ao17,dop_m64 ; qword memory (obsolete?) 985 opitem OP_MFLOAT, ARG_DEREF, ao17,dop_mfloat ; float memory 986 opitem OP_MDOUBLE, ARG_DEREF, ao17,dop_mdouble; double-precision floating memory 987 opitem OP_M80, ARG_DEREF, ao17,dop_m80 ; tbyte memory 988 opitem OP_MXX, ARG_DEREF, ao17,dop_mxx ; memory (size unknown) 989 opitem OP_FARIMM, ARG_FARADDR, ao21,dop_farimm ; far16/far32 immediate 990 opitem OP_REL8, ARG_IMMED, ao23,dop_rel8 ; byte address relative to IP 991 opitem OP_REL1632, ARG_IMMED, ao25,dop_rel1632; word or dword address relative to IP 992 opitem OP_1CHK, ARG_WEIRDREG, ao29,dop49 ; check for ST(1) 993 opitem OP_STI, ARG_WEIRDREG, aop_sti,dop_sti ; ST(I) 994 opitem OP_CR, ARG_WEIRDREG, aop_cr,dop_cr ; CRx 995 opitem OP_DR, ARG_WEIRDREG, ao34,dop_dr ; DRx 996 opitem OP_TR, ARG_WEIRDREG, ao35,dop_tr ; TRx 997 opitem OP_SEGREG, ARG_WEIRDREG, ao39,dop_segreg ; segment register 998 opitem OP_IMMS8, ARG_IMMED, ao41,dop_imms8 ; sign extended immediate byte 999 opitem OP_IMMS8_EXTEND, ARG_IMMED, ao41_extend,dop_imms8 ; add etc word/dword r/m, imms8 1000 opitem OP_IMM8, ARG_IMMED, ao42,dop_imm8 ; immediate byte (other args may be (d)word) 1001 opitem OP_IMM8_INT, ARG_IMMED, ao42,dop_imm8_int ; immediate byte for int 1002 opitem OP_MMX, ARG_WEIRDREG, aop_mmx,dop_mmx ; MMx 1003 opitem OP_MMX_MOD, ARG_WEIRDREG, aop_mmx_mod,dop_mmx_mod ; MMx, but in ModR/M part 1004 opitem OP_SHOSIZ, 0FFh, ao44, dop_shosiz ; set flag to always show the size 1005 opitem OP_SHORT, 0FFh, ao_short,dop_short ; allow short keyword 1006 opitem OP_NEAR, 0FFh, ao_near,dop_near ; allow near keyword 1007 opitem OP_FAR, 0FFh, ao_far, dop_far ; allow far keyword 1008 opitem OP_FAR_REQUIRED, 0FFh, ao_far_required,dop_far_required ; require far keyword 1009 opitem OP_FAR_M, 0FFh, ao_modifier_continue,dop_far_m ; les, lds, lss, lfs, lgs, or jmp/call far mem 1010 opitem OP_DOUBLE_M, 0FFh, ao_modifier_continue,dop_double_m ; bound 1011 opitem OP_M_SRC, 0FFh, ao_modifier_continue,dop_m_src 1012 opitem OP_M_DST, 0FFh, ao_modifier_continue,dop_m_dst 1013 opitem OP_M_SRC_DST, 0FFh, ao_modifier_continue,dop_m_src_dst 1014 opitem OP_STACK_PUSH, 0FFh, ac09_internal_error,dop_stack_push 1015 opitem OP_STACK_POP, 0FFh, ac09_internal_error,dop_stack_pop 1016 opitem OP_STACK_SPECIAL,0FFh, ac09_internal_error,dop_stack_special 1017 opitem OP_E_CX, ARG_JUSTREG, aop_e_cx, da_internal_error ; (E)CX 1018 OP_FIRST_STRING equ nextindex 1019 opitem OP_1, ARG_IMMED, ao46, "1" ; 1 (simple "string" ops from here on) 1020 opitem OP_3, ARG_IMMED, ao47, "3" ; 3 1021 ; order of the following (ao48 entries) must match asm_regnum in aa.asm 1022 OP_FIRST_ASM_REGNUM equ nextindex ; corresponding to asm_regnum start 1023 opitem OP_DX, ARG_JUSTREG, ao48, "DX" ; DX 1024 opitem OP_CL, ARG_JUSTREG, ao48, "CL" ; CL 1025 opitem OP_ST, ARG_WEIRDREG, ao48, "ST" ; ST (top of coprocessor stack) 1026 opitem OP_CS, ARG_WEIRDREG, ao48, "CS" ; CS 1027 opitem OP_DS, ARG_WEIRDREG, ao48, "DS" ; DS 1028 opitem OP_ES, ARG_WEIRDREG, ao48, "ES" ; ES 1029 opitem OP_FS, ARG_WEIRDREG, ao48, "FS" ; FS 1030 opitem OP_GS, ARG_WEIRDREG, ao48, "GS" ; GS 1031 opitem OP_SS, ARG_WEIRDREG, ao48, "SS" ; SS 1032 OP_AFTER_LAST equ nextindex 1033 %if nextindex > OP_SIZE 1034 %error Too many op items 1035 %endif 1036 OP_AMOUNT_TABLE equ nextindex + 16 - 1 1037 ; nextindex: amount sizeless types 1038 ; 16: OP_SIZE combined types 1039 ; -1: OP_END does not occur in tables 1040 1041 ; Instructions that have an implicit operand subject to a segment prefix. 1042 ; This means a prefixed segment is allowed by the strict assembler, and 1043 ; the disassembler treats a segment prefix as part of the instruction and 1044 ; displays it in front of the instruction's mnemonic. 1045 ; (outs, movs, cmps, lods, xlat). 1046 segprfxtab: 1047 00001130 6E6FA4A5A6A7ACAD db 06Eh,06Fh,0A4h,0A5h,0A6h,0A7h,0ACh,0ADh 1048 a32prfxtab: 1049 00001138 D7 db 0D7h ; xlat, last in segprfxtab, first in a32prfxtab 1050 SEGP_LEN equ $-segprfxtab 1051 1052 ; Instructions that can be used with REPE/REPNE. 1053 ; (ins, outs, movs, stos, lods; cmps, scas) 1054 00001139 6C6EA4AAAC replist:db 06Ch,06Eh,0A4h,0AAh,0ACh ; REP (no difference) 1055 REP_SAME_LEN equ $-replist ; number of indifferent replist entries 1056 0000113E A6AE db 0A6h,0AEh ; REPE/REPNE 1057 REP_LEN equ $-replist 1058 REP_DIFF_LEN equ REP_LEN-REP_SAME_LEN ; number of replist entries with difference 1059 1060 A32P_LEN equ $-a32prfxtab 1061 1062 ; prfxtab P_LEN REP_LEN REPE_REPNE_LEN 1063 1064 ; All the instructions in replist also have an implicit operand 1065 ; subject to ASIZE (similar to segprfxtab). Additionally, the 1066 ; xlat instruction (0D7h) has such an implicit operand too. 1067 ; maskmovq too. 1068 1069 1070 %include "asmtabs.asm" 1071 <1> [list -] 1426 <1> usesection ASMTABLE2 1427 <1> asmtab: 1428 <1> usesection ASMTABLE1 1429 <1> %include "debugtbl.inc" 1430 <2> 1431 <2> ;--- This file was generated by mktables.exe. 1432 <2> 1433 <2> OPTYPES_BASE EQU 0Ch 1434 <2> 1435 <2> ;--- Operand type lists. 1436 <2> ;--- They were read from file INSTR.KEY. 1437 <2> 1438 <2> oplists label byte 1439 00000000 00 <2> opl OP_END ; idx=0, ofs=Ch, used=99 1440 00000001 474000 <2> opl OP_ALL+OP_AX, OP_ALL+OP_IMM, OP_END ; idx=1, ofs=Dh, used=18 1441 00000004 1E414000 <2> opl OP_M_SRC_DST, OP_ALL+OP_RM, OP_ALL+OP_IMM, OP_END ; idx=2, ofs=10h, used=7 1442 00000008 1C414000 <2> opl OP_M_SRC, OP_ALL+OP_RM, OP_ALL+OP_IMM, OP_END ; idx=3, ofs=14h, used=3 1443 0000000C 1D414000 <2> opl OP_M_DST, OP_ALL+OP_RM, OP_ALL+OP_IMM, OP_END ; idx=4, ofs=18h, used=1 1444 00000010 1E511000 <2> opl OP_M_SRC_DST, OP_1632+OP_RM, OP_IMMS8_EXTEND, OP_END ; idx=5, ofs=1Ch, used=7 1445 00000014 1C511000 <2> opl OP_M_SRC, OP_1632+OP_RM, OP_IMMS8_EXTEND, OP_END ; idx=6, ofs=20h, used=1 1446 00000018 1E414500 <2> opl OP_M_SRC_DST, OP_ALL+OP_RM, OP_ALL+OP_R, OP_END ; idx=7, ofs=24h, used=19 1447 0000001C 1C414500 <2> opl OP_M_SRC, OP_ALL+OP_RM, OP_ALL+OP_R, OP_END ; idx=8, ofs=28h, used=4 1448 00000020 1D414500 <2> opl OP_M_DST, OP_ALL+OP_RM, OP_ALL+OP_R, OP_END ; idx=9, ofs=2Ch, used=2 1449 00000024 45 <2> opl OP_ALL+OP_R ; idx=10, ofs=30h, used=19 1450 00000025 1C4100 <2> opl OP_M_SRC, OP_ALL+OP_RM, OP_END ; idx=11, ofs=31h, used=4 + 19 1451 00000028 45 <2> opl OP_ALL+OP_R ; idx=12, ofs=34h, used=2 1452 00000029 1E4100 <2> opl OP_M_SRC_DST, OP_ALL+OP_RM, OP_END ; idx=13, ofs=35h, used=6 + 2 1453 0000002C 1E717500 <2> opl OP_M_SRC_DST, OP_16+OP_RM, OP_16+OP_R, OP_END ; idx=14, ofs=38h, used=1 1454 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 1455 00000035 551C5100 <2> opl OP_1632+OP_R, OP_M_SRC, OP_1632+OP_RM, OP_END ; idx=16, ofs=41h, used=35 1456 00000039 8600 <2> opl OP_32+OP_R_ADD, OP_END ; idx=17, ofs=45h, used=8 1457 0000003B 1E515500 <2> opl OP_M_SRC_DST, OP_1632+OP_RM, OP_1632+OP_R, OP_END ; idx=18, ofs=47h, used=3 1458 0000003F 1C515500 <2> opl OP_M_SRC, OP_1632+OP_RM, OP_1632+OP_R, OP_END ; idx=19, ofs=4Bh, used=1 1459 00000043 1E51 <2> opl OP_M_SRC_DST, OP_1632+OP_RM ; idx=20, ofs=4Fh, used=3 1460 00000045 1100 <2> opl OP_IMM8, OP_END ; idx=21, ofs=51h, used=2 + 3 1461 00000047 1C511100 <2> opl OP_M_SRC, OP_1632+OP_RM, OP_IMM8, OP_END ; idx=22, ofs=53h, used=1 1462 0000004B 1F <2> opl OP_STACK_PUSH ; idx=23, ofs=57h, used=1 1463 0000004C 170800 <2> opl OP_NEAR, OP_REL1632, OP_END ; idx=24, ofs=58h, used=31 + 1 1464 0000004F 21 <2> opl OP_STACK_SPECIAL ; idx=25, ofs=5Bh, used=1 1465 00000050 180600 <2> opl OP_FAR, OP_FARIMM, OP_END ; idx=26, ofs=5Ch, used=1 + 1 1466 00000053 21 <2> opl OP_STACK_SPECIAL ; idx=27, ofs=5Fh, used=1 1467 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 1468 00000059 1E0100 <2> opl OP_M_SRC_DST, OP_M64, OP_END ; idx=29, ofs=65h, used=1 1469 0000005C 1C0100 <2> opl OP_M_SRC, OP_M64, OP_END ; idx=30, ofs=68h, used=1 1470 0000005F 1D0100 <2> opl OP_M_DST, OP_M64, OP_END ; idx=31, ofs=6Bh, used=1 1471 00000062 1F <2> opl OP_STACK_PUSH ; idx=32, ofs=6Eh, used=8 1472 00000063 5600 <2> opl OP_1632+OP_R_ADD, OP_END ; idx=33, ofs=6Fh, used=16 + 8 1473 00000065 205600 <2> opl OP_STACK_POP, OP_1632+OP_R_ADD, OP_END ; idx=34, ofs=71h, used=8 1474 00000068 1F701100 <2> opl OP_STACK_PUSH, OP_16+OP_IMM, OP_IMM8, OP_END ; idx=35, ofs=74h, used=1 1475 0000006C 1C0200 <2> opl OP_M_SRC, OP_MFLOAT, OP_END ; idx=36, ofs=78h, used=9 1476 0000006F 1D0200 <2> opl OP_M_DST, OP_MFLOAT, OP_END ; idx=37, ofs=7Bh, used=2 1477 00000072 1C0300 <2> opl OP_M_SRC, OP_MDOUBLE, OP_END ; idx=38, ofs=7Eh, used=9 1478 00000075 1D0300 <2> opl OP_M_DST, OP_MDOUBLE, OP_END ; idx=39, ofs=81h, used=2 1479 00000078 27 <2> opl OP_ST ; idx=40, ofs=84h, used=20 1480 00000079 0A00 <2> opl OP_STI, OP_END ; idx=41, ofs=85h, used=4 + 20 1481 0000007B 09 <2> opl OP_1CHK ; idx=42, ofs=87h, used=6 1482 0000007C 0A2700 <2> opl OP_STI, OP_ST, OP_END ; idx=43, ofs=88h, used=6 + 6 1483 0000007F 1C8200 <2> opl OP_M_SRC, OP_32+OP_M, OP_END ; idx=44, ofs=8Bh, used=9 1484 00000082 1D8200 <2> opl OP_M_DST, OP_32+OP_M, OP_END ; idx=45, ofs=8Eh, used=2 1485 00000085 1C7200 <2> opl OP_M_SRC, OP_16+OP_M, OP_END ; idx=46, ofs=91h, used=10 1486 00000088 1D7200 <2> opl OP_M_DST, OP_16+OP_M, OP_END ; idx=47, ofs=94h, used=4 1487 0000008B 1C0400 <2> opl OP_M_SRC, OP_M80, OP_END ; idx=48, ofs=97h, used=2 1488 0000008E 1D0400 <2> opl OP_M_DST, OP_M80, OP_END ; idx=49, ofs=9Ah, used=2 1489 00000091 090A00 <2> opl OP_1CHK, OP_STI, OP_END ; idx=50, ofs=9Dh, used=9 1490 00000094 1C <2> opl OP_M_SRC ; idx=51, ofs=A0h, used=4 1491 00000095 0500 <2> opl OP_MXX, OP_END ; idx=52, ofs=A1h, used=1 + 4 1492 00000097 1D0500 <2> opl OP_M_DST, OP_MXX, OP_END ; idx=53, ofs=A3h, used=4 1493 0000009A 7700 <2> opl OP_16+OP_AX, OP_END ; idx=54, ofs=A6h, used=1 1494 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 1495 000000A1 53550F00 <2> opl OP_1632+OP_R_MOD, OP_1632+OP_R, OP_IMMS8, OP_END ; idx=56, ofs=ADh, used=1 1496 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 1497 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 1498 000000AE 471100 <2> opl OP_ALL+OP_AX, OP_IMM8, OP_END ; idx=59, ofs=BAh, used=2 1499 000000B1 472500 <2> opl OP_ALL+OP_AX, OP_DX, OP_END ; idx=60, ofs=BDh, used=2 1500 000000B4 212400 <2> opl OP_STACK_SPECIAL, OP_3, OP_END ; idx=61, ofs=C0h, used=1 1501 000000B7 160700 <2> opl OP_SHORT, OP_REL8, OP_END ; idx=62, ofs=C3h, used=42 1502 000000BA 1F1C5100 <2> opl OP_STACK_PUSH, OP_M_SRC, OP_1632+OP_RM, OP_END ; idx=63, ofs=C6h, used=1 1503 000000BE 1D7100 <2> opl OP_M_DST, OP_16+OP_RM, OP_END ; idx=64, ofs=CAh, used=1 1504 000000C1 1D510E00 <2> opl OP_M_DST, OP_1632+OP_RM, OP_SEGREG, OP_END ; idx=65, ofs=CDh, used=1 1505 000000C5 0E1C5100 <2> opl OP_SEGREG, OP_M_SRC, OP_1632+OP_RM, OP_END ; idx=66, ofs=D1h, used=1 1506 000000C9 471C4400 <2> opl OP_ALL+OP_AX, OP_M_SRC, OP_ALL+OP_MOFFS, OP_END ; idx=67, ofs=D5h, used=2 1507 000000CD 1D444700 <2> opl OP_M_DST, OP_ALL+OP_MOFFS, OP_ALL+OP_AX, OP_END ; idx=68, ofs=D9h, used=2 1508 000000D1 666000 <2> opl OP_8+OP_R_ADD, OP_8+OP_IMM, OP_END ; idx=69, ofs=DDh, used=8 1509 000000D4 565000 <2> opl OP_1632+OP_R_ADD, OP_1632+OP_IMM, OP_END ; idx=70, ofs=E0h, used=8 1510 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 1511 000000DC 5515 <2> opl OP_1632+OP_R, OP_SHOSIZ ; idx=72, ofs=E8h, used=2 1512 000000DE 1C7100 <2> opl OP_M_SRC, OP_16+OP_RM, OP_END ; idx=73, ofs=EAh, used=5 + 2 1513 000000E1 114700 <2> opl OP_IMM8, OP_ALL+OP_AX, OP_END ; idx=74, ofs=EDh, used=2 1514 000000E4 254700 <2> opl OP_DX, OP_ALL+OP_AX, OP_END ; idx=75, ofs=F0h, used=2 1515 000000E7 20 <2> opl OP_STACK_POP ; idx=76, ofs=F3h, used=1 1516 000000E8 1D5100 <2> opl OP_M_DST, OP_1632+OP_RM, OP_END ; idx=77, ofs=F4h, used=2 + 1 1517 000000EB 1F15A000 <2> opl OP_STACK_PUSH, OP_SHOSIZ, OP_1632_DEFAULT+OP_IMM, OP_END ; idx=78, ofs=F7h, used=2 1518 000000EF 1F150F00 <2> opl OP_STACK_PUSH, OP_SHOSIZ, OP_IMMS8, OP_END ; idx=79, ofs=FBh, used=2 1519 000000F3 1E412300 <2> opl OP_M_SRC_DST, OP_ALL+OP_RM, OP_1, OP_END ; idx=80, ofs=FFh, used=9 1520 000000F7 1E412600 <2> opl OP_M_SRC_DST, OP_ALL+OP_RM, OP_CL, OP_END ; idx=81, ofs=103h, used=9 1521 000000FB 1E411100 <2> opl OP_M_SRC_DST, OP_ALL+OP_RM, OP_IMM8, OP_END ; idx=82, ofs=107h, used=9 1522 000000FF 20 <2> opl OP_STACK_POP ; idx=83, ofs=10Bh, used=2 1523 00000100 7000 <2> opl OP_16+OP_IMM, OP_END ; idx=84, ofs=10Ch, used=1 + 2 1524 00000102 217000 <2> opl OP_STACK_SPECIAL, OP_16+OP_IMM, OP_END ; idx=85, ofs=10Eh, used=1 1525 00000105 1D6100 <2> opl OP_M_DST, OP_8+OP_RM, OP_END ; idx=86, ofs=111h, used=30 1526 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 1527 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 1528 00000112 575600 <2> opl OP_1632+OP_AX, OP_1632+OP_R_ADD, OP_END ; idx=89, ofs=11Eh, used=7 1529 00000115 565700 <2> opl OP_1632+OP_R_ADD, OP_1632+OP_AX, OP_END ; idx=90, ofs=121h, used=1 1530 00000118 1F <2> opl OP_STACK_PUSH ; idx=91, ofs=124h, used=1 1531 00000119 2A00 <2> opl OP_ES, OP_END ; idx=92, ofs=125h, used=1 + 1 1532 0000011B 1F <2> opl OP_STACK_PUSH ; idx=93, ofs=127h, used=1 1533 0000011C 2800 <2> opl OP_CS, OP_END ; idx=94, ofs=128h, used=1 + 1 1534 0000011E 1F <2> opl OP_STACK_PUSH ; idx=95, ofs=12Ah, used=1 1535 0000011F 2D00 <2> opl OP_SS, OP_END ; idx=96, ofs=12Bh, used=1 + 1 1536 00000121 1F <2> opl OP_STACK_PUSH ; idx=97, ofs=12Dh, used=1 1537 00000122 2900 <2> opl OP_DS, OP_END ; idx=98, ofs=12Eh, used=1 + 1 1538 00000124 1F <2> opl OP_STACK_PUSH ; idx=99, ofs=130h, used=1 1539 00000125 2B00 <2> opl OP_FS, OP_END ; idx=100, ofs=131h, used=1 + 1 1540 00000127 1F <2> opl OP_STACK_PUSH ; idx=101, ofs=133h, used=1 1541 00000128 2C00 <2> opl OP_GS, OP_END ; idx=102, ofs=134h, used=1 + 1 1542 0000012A 202A00 <2> opl OP_STACK_POP, OP_ES, OP_END ; idx=103, ofs=136h, used=1 1543 0000012D 202D00 <2> opl OP_STACK_POP, OP_SS, OP_END ; idx=104, ofs=139h, used=1 1544 00000130 202900 <2> opl OP_STACK_POP, OP_DS, OP_END ; idx=105, ofs=13Ch, used=1 1545 00000133 202B00 <2> opl OP_STACK_POP, OP_FS, OP_END ; idx=106, ofs=13Fh, used=1 1546 00000136 202C00 <2> opl OP_STACK_POP, OP_GS, OP_END ; idx=107, ofs=142h, used=1 1547 00000139 830B00 <2> opl OP_32+OP_R_MOD, OP_CR, OP_END ; idx=108, ofs=145h, used=1 1548 0000013C 0B8300 <2> opl OP_CR, OP_32+OP_R_MOD, OP_END ; idx=109, ofs=148h, used=1 1549 0000013F 830C00 <2> opl OP_32+OP_R_MOD, OP_DR, OP_END ; idx=110, ofs=14Bh, used=1 1550 00000142 0C8300 <2> opl OP_DR, OP_32+OP_R_MOD, OP_END ; idx=111, ofs=14Eh, used=1 1551 00000145 830D00 <2> opl OP_32+OP_R_MOD, OP_TR, OP_END ; idx=112, ofs=151h, used=1 1552 00000148 0D8300 <2> opl OP_TR, OP_32+OP_R_MOD, OP_END ; idx=113, ofs=154h, used=1 1553 0000014B 131C8100 <2> opl OP_MMX, OP_M_SRC, OP_32+OP_RM, OP_END ; idx=114, ofs=157h, used=1 1554 0000014F 1D811300 <2> opl OP_M_DST, OP_32+OP_RM, OP_MMX, OP_END ; idx=115, ofs=15Bh, used=1 1555 00000153 131C9100 <2> opl OP_MMX, OP_M_SRC, OP_64+OP_RM, OP_END ; idx=116, ofs=15Fh, used=45 1556 00000157 1D911300 <2> opl OP_M_DST, OP_64+OP_RM, OP_MMX, OP_END ; idx=117, ofs=163h, used=1 1557 0000015B 141100 <2> opl OP_MMX_MOD, OP_IMM8, OP_END ; idx=118, ofs=167h, used=8 1558 0000015E 550500 <2> opl OP_1632+OP_R, OP_MXX, OP_END ; idx=119, ofs=16Ah, used=1 1559 00000161 1F <2> opl OP_STACK_PUSH ; idx=120, ofs=16Dh, used=1 1560 00000162 171CA100 <2> opl OP_NEAR, OP_M_SRC, OP_1632_DEFAULT+OP_RM, OP_END ; idx=121, ofs=16Eh, used=1 + 1 1561 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 1562 0000016B 211200 <2> opl OP_STACK_SPECIAL, OP_IMM8_INT, OP_END ; idx=123, ofs=177h, used=1 1563 0000016E 16072200 <2> opl OP_SHORT, OP_REL8, OP_E_CX, OP_END ; idx=124, ofs=17Ah, used=5 1564 00000172 2000 <2> opl OP_STACK_POP, OP_END ; idx=125, ofs=17Eh, used=3 1565 00000174 1F00 <2> opl OP_STACK_PUSH, OP_END ; idx=126, ofs=180h, used=1 1566 00000176 2100 <2> opl OP_STACK_SPECIAL, OP_END ; idx=127, ofs=182h, used=11 1567 <2> 1568 <2> ASMMOD EQU opidx 1569 <2> 1570 <2> ;--- Assembler: data on groups. 1571 <2> ;--- If > 100h, it's a "0F-prefix" group. 1572 <2> 1573 <2> align 2, db 0 1574 <2> agroups label word 1575 00000178 FE00 <2> dw 0FEh ; 0 1576 0000017A 8300 <2> dw 083h ; 1 1577 0000017C 8000 <2> dw 080h ; 2 1578 0000017E BA01 <2> dw 1BAh ; 3 1579 00000180 FF00 <2> dw 0FFh ; 4 1580 00000182 C701 <2> dw 1C7h ; 5 1581 00000184 F600 <2> dw 0F6h ; 6 1582 00000186 0101 <2> dw 101h ; 7 1583 00000188 0001 <2> dw 100h ; 8 1584 0000018A C600 <2> dw 0C6h ; 9 1585 0000018C 7101 <2> dw 171h ; 10 1586 0000018E 7201 <2> dw 172h ; 11 1587 00000190 7301 <2> dw 173h ; 12 1588 00000192 8F00 <2> dw 08Fh ; 13 1589 00000194 D000 <2> dw 0D0h ; 14 1590 00000196 D200 <2> dw 0D2h ; 15 1591 00000198 C000 <2> dw 0C0h ; 16 1592 <2> 1593 <2> ;--- List of assembler mnemonics and data. 1594 <2> ;--- variant's 1. argument (=a): 1595 <2> ;--- if a < 0x100: one byte opcode. 1596 <2> ;--- if a >= 0x100 && a < 0x200: two byte "0F"-opcode. 1597 <2> ;--- if a >= 0x200 && a < 0x240: fp instruction. 1598 <2> ;--- if a >= 0x240: refers to agroups [macro AGRP() is used]. 1599 <2> ;--- variant's 2. argument is index into array opindex. 1600 <2> 1601 <2> mnlist label near 1602 <2> mnsuffix 1603 <2> 1604 <2> mne A32, ASM_SPECIAL ; ofs=0h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 00000000 FF <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 0000019A 0300 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 0000019C 413332 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1605 <2> mne A16, ASM_SPECIAL ; ofs=2h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 00000001 FF <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 0000019F 1300 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000001A1 413136 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1606 <2> mne O32, ASM_SPECIAL ; ofs=4h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 00000002 FF <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000001A4 2300 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000001A6 4F3332 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1607 <2> mne O16, ASM_SPECIAL ; ofs=6h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 00000003 FF <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000001A9 3300 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000001AB 4F3136 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1608 <2> mne BOXCB ; ofs=8h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000001AE 4500 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000001B0 424F584342 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1609 00000004 F42FD4 <2> variant AGRP(0,7), 84 1610 00000007 FF <2> endvariant 1611 <2> mne AAA ; ofs=Ch 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000001B5 8300 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000001B7 414141 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1612 00000008 1B80 <2> variant 037h, 0 1613 0000000A FF <2> endvariant 1614 <2> mne AAD, ASM_SPECIAL ; ofs=Fh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 0000000B FF <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000001BA B300 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000001BC 414144 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1615 0000000C 6A95 <2> variant 0D5h, 21 1616 0000000E FF <2> endvariant 1617 <2> mne AAM, ASM_SPECIAL ; ofs=13h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 0000000F FF <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000001BF F300 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000001C1 41414D <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1618 00000010 6A15 <2> variant 0D4h, 21 1619 00000012 FF <2> endvariant 1620 <2> mne AAS ; ofs=17h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000001C4 3301 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000001C6 414153 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1621 00000013 1F80 <2> variant 03Fh, 0 1622 00000015 FF <2> endvariant 1623 <2> mne ADC ; ofs=1Ah 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000001C9 6301 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000001CB 414443 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1624 00000016 FBF43105 <2> variant AGRP(1,2), 5, ASM_LOCKABLE 1625 0000001A 0A01 <2> variant 014h, 1 1626 0000001C FBF43502 <2> variant AGRP(2,2), 2, ASM_LOCKABLE 1627 00000020 FB0807 <2> variant 010h, 7, ASM_LOCKABLE 1628 00000023 090A <2> variant 012h, 10 1629 00000025 FF <2> endvariant 1630 <2> mne ADD ; ofs=2Ah 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000001CE 6302 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000001D0 414444 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1631 00000026 FBF43005 <2> variant AGRP(1,0), 5, ASM_LOCKABLE 1632 0000002A 0201 <2> variant 004h, 1 1633 0000002C FBF43402 <2> variant AGRP(2,0), 2, ASM_LOCKABLE 1634 00000030 FB0007 <2> variant 000h, 7, ASM_LOCKABLE 1635 00000033 010A <2> variant 002h, 10 1636 00000035 FF <2> endvariant 1637 <2> mne AND ; ofs=3Ah 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000001D3 6303 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000001D5 414E44 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1638 00000036 FBF43205 <2> variant AGRP(1,4), 5, ASM_LOCKABLE 1639 0000003A 1201 <2> variant 024h, 1 1640 0000003C FBF43602 <2> variant AGRP(2,4), 2, ASM_LOCKABLE 1641 00000040 FB1007 <2> variant 020h, 7, ASM_LOCKABLE 1642 00000043 110A <2> variant 022h, 10 1643 00000045 FF <2> endvariant 1644 <2> mne ARPL ; ofs=4Ah 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000001D8 6404 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000001DA 4152504C <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1645 00000046 F6318E <2> variant 063h, 14, ASM_MACH2 1646 00000049 FF <2> endvariant 1647 <2> mne BOUND ; ofs=4Eh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000001DE A504 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000001E0 424F554E44 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1648 0000004A F5317A <2> variant 062h, 122, ASM_MACH1 1649 0000004D FF <2> endvariant 1650 <2> mne BSF ; ofs=52h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000001E5 E304 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000001E7 425346 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1651 0000004E F7DE10 <2> variant 1BCh, 16, ASM_MACH3 1652 00000051 FF <2> endvariant 1653 <2> mne BSR ; ofs=56h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000001EA 2305 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000001EC 425352 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1654 00000052 F7DE90 <2> variant 1BDh, 16, ASM_MACH3 1655 00000055 FF <2> endvariant 1656 <2> mne BSWAP, ASM_D32 ; ofs=5Ah 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 00000056 FD <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000001EF 6505 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000001F1 4253574150 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1657 00000057 F8E411 <2> variant 1C8h, 17, ASM_MACH4 1658 0000005A FF <2> endvariant 1659 <2> mne BT ; ofs=5Fh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000001F6 B205 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000001F8 4254 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1660 0000005B F7D193 <2> variant 1A3h, 19, ASM_MACH3 1661 0000005E F7F43A16 <2> variant AGRP(3,4), 22, ASM_MACH3 1662 00000062 FF <2> endvariant 1663 <2> mne BTC ; ofs=67h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000001FA 3306 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000001FC 425443 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1664 00000063 FBF7DD92 <2> variant 1BBh, 18, ASM_LOCKABLE, ASM_MACH3 1665 00000067 FBF7F43B94 <2> variant AGRP(3,7), 20, ASM_LOCKABLE, ASM_MACH3 1666 0000006C FF <2> endvariant 1667 <2> mne BTR ; ofs=71h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000001FF D306 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000201 425452 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1668 0000006D FBF7D992 <2> variant 1B3h, 18, ASM_LOCKABLE, ASM_MACH3 1669 00000071 FBF7F43B14 <2> variant AGRP(3,6), 20, ASM_LOCKABLE, ASM_MACH3 1670 00000076 FF <2> endvariant 1671 <2> mne BTS ; ofs=7Bh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000204 7307 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000206 425453 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1672 00000077 FBF7D592 <2> variant 1ABh, 18, ASM_LOCKABLE, ASM_MACH3 1673 0000007B FBF7F43A94 <2> variant AGRP(3,5), 20, ASM_LOCKABLE, ASM_MACH3 1674 00000080 FF <2> endvariant 1675 <2> mne CALL ; ofs=85h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000209 1408 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 0000020B 43414C4C <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1676 00000081 7417 <2> variant 0E8h, 23 1677 00000083 F43D78 <2> variant AGRP(4,2), 120 1678 00000086 F43D9B <2> variant AGRP(4,3), 27 1679 00000089 4D19 <2> variant 09Ah, 25 1680 0000008B FF <2> endvariant 1681 <2> mne CBW, ASM_D16 ; ofs=90h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 0000008C FC <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 0000020F C308 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000211 434257 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1682 <2> mne CWDE, ASM_D32 ; ofs=91h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 0000008D FD <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000214 D408 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000216 43574445 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1683 0000008E 4C00 <2> variant 098h, 0 1684 00000090 FF <2> endvariant 1685 <2> mne CLC ; ofs=95h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 0000021A 1309 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 0000021C 434C43 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1686 00000091 7C00 <2> variant 0F8h, 0 1687 00000093 FF <2> endvariant 1688 <2> mne CLD ; ofs=98h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 0000021F 4309 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000221 434C44 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1689 00000094 7E00 <2> variant 0FCh, 0 1690 00000096 FF <2> endvariant 1691 <2> mne CLI ; ofs=9Bh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000224 7309 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000226 434C49 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1692 00000097 7D00 <2> variant 0FAh, 0 1693 00000099 FF <2> endvariant 1694 <2> mne CLTS ; ofs=9Eh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000229 A409 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 0000022B 434C5453 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1695 0000009A F68300 <2> variant 106h, 0, ASM_MACH2 1696 0000009D FF <2> endvariant 1697 <2> mne CMC ; ofs=A2h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 0000022F E309 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000231 434D43 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1698 0000009E 7A80 <2> variant 0F5h, 0 1699 000000A0 FF <2> endvariant 1700 <2> mne CMOVA ; ofs=A5h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000234 150A <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000236 434D4F5641 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1701 000000A1 FAA390 <2> variant 147h, 16, ASM_MACH6 1702 000000A4 FF <2> endvariant 1703 <2> mne CMOVAE ; ofs=A9h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 0000023B 560A <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 0000023D 434D4F564145 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1704 000000A5 FAA190 <2> variant 143h, 16, ASM_MACH6 1705 000000A8 FF <2> endvariant 1706 <2> mne CMOVB ; ofs=ADh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000243 950A <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000245 434D4F5642 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1707 000000A9 FAA110 <2> variant 142h, 16, ASM_MACH6 1708 000000AC FF <2> endvariant 1709 <2> mne CMOVBE ; ofs=B1h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 0000024A D60A <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 0000024C 434D4F564245 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1710 000000AD FAA310 <2> variant 146h, 16, ASM_MACH6 1711 000000B0 FF <2> endvariant 1712 <2> mne CMOVC ; ofs=B5h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000252 150B <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000254 434D4F5643 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1713 000000B1 FAA110 <2> variant 142h, 16, ASM_MACH6 1714 000000B4 FF <2> endvariant 1715 <2> mne CMOVE ; ofs=B9h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000259 550B <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 0000025B 434D4F5645 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1716 000000B5 FAA210 <2> variant 144h, 16, ASM_MACH6 1717 000000B8 FF <2> endvariant 1718 <2> mne CMOVG ; ofs=BDh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000260 950B <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000262 434D4F5647 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1719 000000B9 FAA790 <2> variant 14Fh, 16, ASM_MACH6 1720 000000BC FF <2> endvariant 1721 <2> mne CMOVGE ; ofs=C1h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000267 D60B <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000269 434D4F564745 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1722 000000BD FAA690 <2> variant 14Dh, 16, ASM_MACH6 1723 000000C0 FF <2> endvariant 1724 <2> mne CMOVL ; ofs=C5h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 0000026F 150C <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000271 434D4F564C <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1725 000000C1 FAA610 <2> variant 14Ch, 16, ASM_MACH6 1726 000000C4 FF <2> endvariant 1727 <2> mne CMOVLE ; ofs=C9h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000276 560C <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000278 434D4F564C45 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1728 000000C5 FAA710 <2> variant 14Eh, 16, ASM_MACH6 1729 000000C8 FF <2> endvariant 1730 <2> mne CMOVNA ; ofs=CDh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 0000027E 960C <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000280 434D4F564E41 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1731 000000C9 FAA310 <2> variant 146h, 16, ASM_MACH6 1732 000000CC FF <2> endvariant 1733 <2> mne CMOVNAE ; ofs=D1h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000286 D70C <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000288 434D4F564E4145 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1734 000000CD FAA110 <2> variant 142h, 16, ASM_MACH6 1735 000000D0 FF <2> endvariant 1736 <2> mne CMOVNB ; ofs=D5h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 0000028F 160D <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000291 434D4F564E42 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1737 000000D1 FAA190 <2> variant 143h, 16, ASM_MACH6 1738 000000D4 FF <2> endvariant 1739 <2> mne CMOVNBE ; ofs=D9h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000297 570D <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000299 434D4F564E4245 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1740 000000D5 FAA390 <2> variant 147h, 16, ASM_MACH6 1741 000000D8 FF <2> endvariant 1742 <2> mne CMOVNC ; ofs=DDh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000002A0 960D <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000002A2 434D4F564E43 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1743 000000D9 FAA190 <2> variant 143h, 16, ASM_MACH6 1744 000000DC FF <2> endvariant 1745 <2> mne CMOVNE ; ofs=E1h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000002A8 D60D <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000002AA 434D4F564E45 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1746 000000DD FAA290 <2> variant 145h, 16, ASM_MACH6 1747 000000E0 FF <2> endvariant 1748 <2> mne CMOVNG ; ofs=E5h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000002B0 160E <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000002B2 434D4F564E47 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1749 000000E1 FAA710 <2> variant 14Eh, 16, ASM_MACH6 1750 000000E4 FF <2> endvariant 1751 <2> mne CMOVNGE ; ofs=E9h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000002B8 570E <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000002BA 434D4F564E4745 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1752 000000E5 FAA610 <2> variant 14Ch, 16, ASM_MACH6 1753 000000E8 FF <2> endvariant 1754 <2> mne CMOVNL ; ofs=EDh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000002C1 960E <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000002C3 434D4F564E4C <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1755 000000E9 FAA690 <2> variant 14Dh, 16, ASM_MACH6 1756 000000EC FF <2> endvariant 1757 <2> mne CMOVNLE ; ofs=F1h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000002C9 D70E <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000002CB 434D4F564E4C45 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1758 000000ED FAA790 <2> variant 14Fh, 16, ASM_MACH6 1759 000000F0 FF <2> endvariant 1760 <2> mne CMOVNO ; ofs=F5h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000002D2 160F <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000002D4 434D4F564E4F <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1761 000000F1 FAA090 <2> variant 141h, 16, ASM_MACH6 1762 000000F4 FF <2> endvariant 1763 <2> mne CMOVNP ; ofs=F9h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000002DA 560F <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000002DC 434D4F564E50 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1764 000000F5 FAA590 <2> variant 14Bh, 16, ASM_MACH6 1765 000000F8 FF <2> endvariant 1766 <2> mne CMOVNS ; ofs=FDh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000002E2 960F <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000002E4 434D4F564E53 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1767 000000F9 FAA490 <2> variant 149h, 16, ASM_MACH6 1768 000000FC FF <2> endvariant 1769 <2> mne CMOVNZ ; ofs=101h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000002EA D60F <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000002EC 434D4F564E5A <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1770 000000FD FAA290 <2> variant 145h, 16, ASM_MACH6 1771 00000100 FF <2> endvariant 1772 <2> mne CMOVO ; ofs=105h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000002F2 1510 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000002F4 434D4F564F <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1773 00000101 FAA010 <2> variant 140h, 16, ASM_MACH6 1774 00000104 FF <2> endvariant 1775 <2> mne CMOVP ; ofs=109h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000002F9 5510 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000002FB 434D4F5650 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1776 00000105 FAA510 <2> variant 14Ah, 16, ASM_MACH6 1777 00000108 FF <2> endvariant 1778 <2> mne CMOVPE ; ofs=10Dh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000300 9610 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000302 434D4F565045 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1779 00000109 FAA510 <2> variant 14Ah, 16, ASM_MACH6 1780 0000010C FF <2> endvariant 1781 <2> mne CMOVPO ; ofs=111h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000308 D610 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 0000030A 434D4F56504F <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1782 0000010D FAA590 <2> variant 14Bh, 16, ASM_MACH6 1783 00000110 FF <2> endvariant 1784 <2> mne CMOVS ; ofs=115h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000310 1511 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000312 434D4F5653 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1785 00000111 FAA410 <2> variant 148h, 16, ASM_MACH6 1786 00000114 FF <2> endvariant 1787 <2> mne CMOVZ ; ofs=119h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000317 5511 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000319 434D4F565A <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1788 00000115 FAA210 <2> variant 144h, 16, ASM_MACH6 1789 00000118 FF <2> endvariant 1790 <2> mne CMP ; ofs=11Dh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 0000031E 9311 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000320 434D50 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1791 00000119 F43386 <2> variant AGRP(1,7), 6 1792 0000011C 1E01 <2> variant 03Ch, 1 1793 0000011E F43783 <2> variant AGRP(2,7), 3 1794 00000121 1C08 <2> variant 038h, 8 1795 00000123 1D0A <2> variant 03Ah, 10 1796 00000125 FF <2> endvariant 1797 <2> mne CMPSB ; ofs=12Ah 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000323 6512 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000325 434D505342 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1798 00000126 5300 <2> variant 0A6h, 0 1799 00000128 FF <2> endvariant 1800 <2> mne CMPXCHG ; ofs=130h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 0000032A 9712 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 0000032C 434D5058434847 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1801 00000129 FBF8D807 <2> variant 1B0h, 7, ASM_LOCKABLE, ASM_MACH4 1802 0000012D FF <2> endvariant 1803 <2> mne CMPXCHG8B ; ofs=135h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000333 E912 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000335 434D50584348473842 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1804 0000012E F9F4409D <2> variant AGRP(5,1), 29, ASM_MACH5 1805 00000132 FF <2> endvariant 1806 <2> mne CPUID ; ofs=13Ah 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 0000033E 3513 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000340 4350554944 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1807 00000133 F9D100 <2> variant 1A2h, 0, ASM_MACH5 1808 00000136 FF <2> endvariant 1809 <2> mne CWD, ASM_D16 ; ofs=13Eh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 00000137 FC <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000345 7313 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000347 435744 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1810 <2> mne CDQ, ASM_D32 ; ofs=13Fh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 00000138 FD <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 0000034A 8313 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 0000034C 434451 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1811 00000139 4C80 <2> variant 099h, 0 1812 0000013B FF <2> endvariant 1813 <2> mne DAA ; ofs=143h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 0000034F C313 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000351 444141 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1814 0000013C 1380 <2> variant 027h, 0 1815 0000013E FF <2> endvariant 1816 <2> mne DAS ; ofs=146h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000354 F313 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000356 444153 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1817 0000013F 1780 <2> variant 02Fh, 0 1818 00000141 FF <2> endvariant 1819 <2> mne DB, ASM_SPECIAL ; ofs=149h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 00000142 FF <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000359 2214 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 0000035B 4442 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1820 <2> mne DD, ASM_SPECIAL ; ofs=14Bh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 00000143 FF <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 0000035D 3214 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 0000035F 4444 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1821 <2> mne DEC ; ofs=14Dh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000361 4314 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000363 444543 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1822 00000144 2421 <2> variant 048h, 33 1823 00000146 FBF42C8D <2> variant AGRP(0,1), 13, ASM_LOCKABLE 1824 0000014A FF <2> endvariant 1825 <2> mne DIV ; ofs=154h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000366 B314 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000368 444956 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1826 0000014B F4470B <2> variant AGRP(6,6), 11 1827 0000014E FF <2> endvariant 1828 <2> mne DW, ASM_SPECIAL ; ofs=158h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 0000014F FF <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 0000036B F214 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 0000036D 4457 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1829 <2> mne EMMS ; ofs=15Ah 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 0000036F 0415 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000371 454D4D53 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1830 00000150 F9BB80 <2> variant 177h, 0, ASM_MACH5 1831 00000153 FF <2> endvariant 1832 <2> mne F2XM1 ; ofs=162h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000375 4515 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000377 4632584D31 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1833 00000154 6C80F0 <2> fpvariant 0D9h, 0, 0F0h 1834 00000157 FF <2> endvariant 1835 <2> mne FABS ; ofs=166h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 0000037C 8415 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 0000037E 46414253 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1836 00000158 6C80E1 <2> fpvariant 0D9h, 0, 0E1h 1837 0000015B FF <2> endvariant 1838 <2> mne FADD ; ofs=16Ah 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000382 C415 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000384 46414444 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1839 0000015C F40C24 <2> variant 200h, 36 1840 0000015F F40E26 <2> variant 204h, 38 1841 00000162 6C28C0 <2> fpvariant 0D8h, 40, 0C0h 1842 00000165 6E2BC0 <2> fpvariant 0DCh, 43, 0C0h 1843 00000168 FF <2> endvariant 1844 <2> mne FADDP ; ofs=177h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000388 9516 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 0000038A 4641444450 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1845 00000169 6F2AC0 <2> fpvariant 0DEh, 42, 0C0h 1846 0000016C 6F00C1 <2> fpvariant 0DEh, 0, 0C1h 1847 0000016F FF <2> endvariant 1848 <2> mne FIADD ; ofs=17Eh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 0000038F 0517 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000391 4649414444 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1849 00000170 F40D2C <2> variant 202h, 44 1850 00000173 F40F2E <2> variant 206h, 46 1851 00000176 FF <2> endvariant 1852 <2> mne FBLD ; ofs=185h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000396 7417 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000398 46424C44 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1853 00000177 F41FB0 <2> variant 227h, 48 1854 0000017A FF <2> endvariant 1855 <2> mne FBSTP ; ofs=189h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 0000039C B517 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 0000039E 4642535450 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1856 0000017B F427B1 <2> variant 237h, 49 1857 0000017E FF <2> endvariant 1858 <2> mne FCHS ; ofs=18Dh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000003A3 F417 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000003A5 46434853 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1859 0000017F 6C80E0 <2> fpvariant 0D9h, 0, 0E0h 1860 00000182 FF <2> endvariant 1861 <2> mne FCLEX, ASM_WAIT ; ofs=191h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 00000183 FE <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000003A9 3518 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000003AB 46434C4558 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1862 <2> mne FNCLEX ; ofs=192h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000003B0 4618 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000003B2 464E434C4558 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1863 00000184 6D80E2 <2> fpvariant 0DBh, 0, 0E2h 1864 00000187 FF <2> endvariant 1865 <2> mne FCMOVA ; ofs=196h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000003B8 8618 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000003BA 46434D4F5641 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1866 00000188 FA6DA8D0 <2> fpvariant 0DBh, 40, 0D0h, ASM_MACH6 1867 0000018C FF <2> endvariant 1868 <2> mne FCMOVAE ; ofs=19Bh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000003C0 D718 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000003C2 46434D4F564145 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1869 0000018D FA6DA8C0 <2> fpvariant 0DBh, 40, 0C0h, ASM_MACH6 1870 00000191 FF <2> endvariant 1871 <2> mne FCMOVB ; ofs=1A0h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000003C9 2619 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000003CB 46434D4F5642 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1872 00000192 FA6D28C0 <2> fpvariant 0DAh, 40, 0C0h, ASM_MACH6 1873 00000196 FF <2> endvariant 1874 <2> mne FCMOVBE ; ofs=1A5h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000003D1 7719 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000003D3 46434D4F564245 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1875 00000197 FA6D28D0 <2> fpvariant 0DAh, 40, 0D0h, ASM_MACH6 1876 0000019B FF <2> endvariant 1877 <2> mne FCMOVE ; ofs=1AAh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000003DA C619 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000003DC 46434D4F5645 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1878 0000019C FA6D28C8 <2> fpvariant 0DAh, 40, 0C8h, ASM_MACH6 1879 000001A0 FF <2> endvariant 1880 <2> mne FCMOVNA ; ofs=1AFh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000003E2 171A <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000003E4 46434D4F564E41 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1881 000001A1 FA6D28D0 <2> fpvariant 0DAh, 40, 0D0h, ASM_MACH6 1882 000001A5 FF <2> endvariant 1883 <2> mne FCMOVNAE ; ofs=1B4h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000003EB 681A <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000003ED 46434D4F564E4145 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1884 000001A6 FA6D28C0 <2> fpvariant 0DAh, 40, 0C0h, ASM_MACH6 1885 000001AA FF <2> endvariant 1886 <2> mne FCMOVNB ; ofs=1B9h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000003F5 B71A <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000003F7 46434D4F564E42 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1887 000001AB FA6DA8C0 <2> fpvariant 0DBh, 40, 0C0h, ASM_MACH6 1888 000001AF FF <2> endvariant 1889 <2> mne FCMOVNBE ; ofs=1BEh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000003FE 081B <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000400 46434D4F564E4245 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1890 000001B0 FA6DA8D0 <2> fpvariant 0DBh, 40, 0D0h, ASM_MACH6 1891 000001B4 FF <2> endvariant 1892 <2> mne FCMOVNE ; ofs=1C3h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000408 571B <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 0000040A 46434D4F564E45 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1893 000001B5 FA6DA8C8 <2> fpvariant 0DBh, 40, 0C8h, ASM_MACH6 1894 000001B9 FF <2> endvariant 1895 <2> mne FCMOVNU ; ofs=1C8h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000411 A71B <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000413 46434D4F564E55 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1896 000001BA FA6DA8D8 <2> fpvariant 0DBh, 40, 0D8h, ASM_MACH6 1897 000001BE FF <2> endvariant 1898 <2> mne FCMOVNZ ; ofs=1CDh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 0000041A F71B <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 0000041C 46434D4F564E5A <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1899 000001BF FA6DA8C8 <2> fpvariant 0DBh, 40, 0C8h, ASM_MACH6 1900 000001C3 FF <2> endvariant 1901 <2> mne FCMOVU ; ofs=1D2h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000423 461C <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000425 46434D4F5655 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1902 000001C4 FA6D28D8 <2> fpvariant 0DAh, 40, 0D8h, ASM_MACH6 1903 000001C8 FF <2> endvariant 1904 <2> mne FCMOVZ ; ofs=1D7h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 0000042B 961C <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 0000042D 46434D4F565A <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1905 000001C9 FA6D28C8 <2> fpvariant 0DAh, 40, 0C8h, ASM_MACH6 1906 000001CD FF <2> endvariant 1907 <2> mne FCOM ; ofs=1DCh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000433 E41C <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000435 46434F4D <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1908 000001CE F41424 <2> variant 210h, 36 1909 000001D1 F41626 <2> variant 214h, 38 1910 000001D4 6C32D0 <2> fpvariant 0D8h, 50, 0D0h 1911 000001D7 6C00D1 <2> fpvariant 0D8h, 0, 0D1h 1912 000001DA FF <2> endvariant 1913 <2> mne FCOMI ; ofs=1E9h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000439 B51D <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 0000043B 46434F4D49 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1914 000001DB FA6DB2F0 <2> fpvariant 0DBh, 50, 0F0h, ASM_MACH6 1915 000001DF FA6D80F1 <2> fpvariant 0DBh, 0, 0F1h, ASM_MACH6 1916 000001E3 FF <2> endvariant 1917 <2> mne FCOMIP ; ofs=1F2h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000440 461E <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000442 46434F4D4950 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1918 000001E4 FA6FB2F0 <2> fpvariant 0DFh, 50, 0F0h, ASM_MACH6 1919 000001E8 FA6F80F1 <2> fpvariant 0DFh, 0, 0F1h, ASM_MACH6 1920 000001EC FF <2> endvariant 1921 <2> mne FCOMP ; ofs=1FBh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000448 D51E <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 0000044A 46434F4D50 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1922 000001ED F41824 <2> variant 218h, 36 1923 000001F0 F41A26 <2> variant 21Ch, 38 1924 000001F3 6C32D8 <2> fpvariant 0D8h, 50, 0D8h 1925 000001F6 6C00D9 <2> fpvariant 0D8h, 0, 0D9h 1926 000001F9 FF <2> endvariant 1927 <2> mne FCOMPP ; ofs=208h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 0000044F A61F <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000451 46434F4D5050 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1928 000001FA 6F00D9 <2> fpvariant 0DEh, 0, 0D9h 1929 000001FD FF <2> endvariant 1930 <2> mne FCOS ; ofs=20Ch 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000457 E41F <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000459 46434F53 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1931 000001FE F76C80FF <2> fpvariant 0D9h, 0, 0FFh, ASM_MACH3 1932 00000202 FF <2> endvariant 1933 <2> mne FDECSTP ; ofs=211h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 0000045D 3720 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 0000045F 46444543535450 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1934 00000203 6C80F6 <2> fpvariant 0D9h, 0, 0F6h 1935 00000206 FF <2> endvariant 1936 <2> mne FDISI, ASM_WAIT ; ofs=215h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 00000207 FE <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000466 7520 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000468 4644495349 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1937 <2> mne FNDISI ; ofs=216h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 0000046D 8620 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 0000046F 464E44495349 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1938 00000208 6D80E1 <2> fpvariant 0DBh, 0, 0E1h 1939 0000020B FF <2> endvariant 1940 <2> mne FDIV ; ofs=21Ah 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000475 C420 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000477 46444956 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1941 0000020C F42424 <2> variant 230h, 36 1942 0000020F F42626 <2> variant 234h, 38 1943 00000212 6C28F0 <2> fpvariant 0D8h, 40, 0F0h 1944 00000215 6E2BF8 <2> fpvariant 0DCh, 43, 0F8h 1945 00000218 FF <2> endvariant 1946 <2> mne FDIVP ; ofs=227h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 0000047B 9521 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 0000047D 4644495650 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1947 00000219 6F2AF8 <2> fpvariant 0DEh, 42, 0F8h 1948 0000021C 6F00F9 <2> fpvariant 0DEh, 0, 0F9h 1949 0000021F FF <2> endvariant 1950 <2> mne FIDIV ; ofs=22Eh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000482 0522 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000484 4649444956 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1951 00000220 F4252C <2> variant 232h, 44 1952 00000223 F4272E <2> variant 236h, 46 1953 00000226 FF <2> endvariant 1954 <2> mne FDIVR ; ofs=235h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000489 7522 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 0000048B 4644495652 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1955 00000227 F42824 <2> variant 238h, 36 1956 0000022A F42A26 <2> variant 23Ch, 38 1957 0000022D 6C28F8 <2> fpvariant 0D8h, 40, 0F8h 1958 00000230 6E2BF0 <2> fpvariant 0DCh, 43, 0F0h 1959 00000233 FF <2> endvariant 1960 <2> mne FDIVRP ; ofs=242h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000490 4623 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000492 464449565250 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1961 00000234 6F2AF0 <2> fpvariant 0DEh, 42, 0F0h 1962 00000237 6F00F1 <2> fpvariant 0DEh, 0, 0F1h 1963 0000023A FF <2> endvariant 1964 <2> mne FIDIVR ; ofs=249h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000498 B623 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 0000049A 464944495652 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1965 0000023B F4292C <2> variant 23Ah, 44 1966 0000023E F42B2E <2> variant 23Eh, 46 1967 00000241 FF <2> endvariant 1968 <2> mne FENI, ASM_WAIT ; ofs=250h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 00000242 FE <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000004A0 2424 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000004A2 46454E49 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1969 <2> mne FNENI ; ofs=251h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000004A6 3524 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000004A8 464E454E49 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1970 00000243 6D80E0 <2> fpvariant 0DBh, 0, 0E0h 1971 00000246 FF <2> endvariant 1972 <2> mne FFREE ; ofs=255h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000004AD 7524 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000004AF 4646524545 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1973 00000247 6EA9C0 <2> fpvariant 0DDh, 41, 0C0h 1974 0000024A FF <2> endvariant 1975 <2> mne FICOM ; ofs=259h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000004B4 B524 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000004B6 4649434F4D <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1976 0000024B F4152C <2> variant 212h, 44 1977 0000024E F4172E <2> variant 216h, 46 1978 00000251 FF <2> endvariant 1979 <2> mne FICOMP ; ofs=260h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000004BB 2625 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000004BD 4649434F4D50 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1980 00000252 F4192C <2> variant 21Ah, 44 1981 00000255 F41B2E <2> variant 21Eh, 46 1982 00000258 FF <2> endvariant 1983 <2> mne FILD ; ofs=267h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000004C3 9425 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000004C5 46494C44 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1984 00000259 F40DAC <2> variant 203h, 44 1985 0000025C F40FAE <2> variant 207h, 46 1986 0000025F F4239E <2> variant 22Fh, 30 1987 00000262 FF <2> endvariant 1988 <2> mne FINCSTP ; ofs=271h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000004C9 3726 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000004CB 46494E43535450 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1989 00000263 6C80F7 <2> fpvariant 0D9h, 0, 0F7h 1990 00000266 FF <2> endvariant 1991 <2> mne FINIT, ASM_WAIT ; ofs=275h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 00000267 FE <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000004D2 7526 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000004D4 46494E4954 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1992 <2> mne FNINIT ; ofs=276h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000004D9 8626 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000004DB 464E494E4954 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1993 00000268 6D80E3 <2> fpvariant 0DBh, 0, 0E3h 1994 0000026B FF <2> endvariant 1995 <2> mne FIST ; ofs=27Ah 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000004E1 C426 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000004E3 46495354 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 1996 0000026C F415AD <2> variant 213h, 45 1997 0000026F F417AF <2> variant 217h, 47 1998 00000272 FF <2> endvariant 1999 <2> mne FISTP ; ofs=281h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000004E7 3527 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000004E9 4649535450 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2000 00000273 F419AD <2> variant 21Bh, 45 2001 00000276 F41BAF <2> variant 21Fh, 47 2002 00000279 F42B9F <2> variant 23Fh, 31 2003 0000027C FF <2> endvariant 2004 <2> mne FLD ; ofs=28Bh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000004EE D327 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000004F0 464C44 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2005 0000027D F40CA4 <2> variant 201h, 36 2006 00000280 F40EA6 <2> variant 205h, 38 2007 00000283 F421B0 <2> variant 22Bh, 48 2008 00000286 6CA9C0 <2> fpvariant 0D9h, 41, 0C0h 2009 00000289 FF <2> endvariant 2010 <2> mne FLD1 ; ofs=298h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000004F3 A428 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000004F5 464C4431 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2011 0000028A 6C80E8 <2> fpvariant 0D9h, 0, 0E8h 2012 0000028D FF <2> endvariant 2013 <2> mne FLDL2T ; ofs=29Ch 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000004F9 E628 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000004FB 464C444C3254 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2014 0000028E 6C80E9 <2> fpvariant 0D9h, 0, 0E9h 2015 00000291 FF <2> endvariant 2016 <2> mne FLDL2E ; ofs=2A0h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000501 2629 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000503 464C444C3245 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2017 00000292 6C80EA <2> fpvariant 0D9h, 0, 0EAh 2018 00000295 FF <2> endvariant 2019 <2> mne FLDPI ; ofs=2A4h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000509 6529 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 0000050B 464C445049 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2020 00000296 6C80EB <2> fpvariant 0D9h, 0, 0EBh 2021 00000299 FF <2> endvariant 2022 <2> mne FLDLG2 ; ofs=2A8h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000510 A629 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000512 464C444C4732 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2023 0000029A 6C80EC <2> fpvariant 0D9h, 0, 0ECh 2024 0000029D FF <2> endvariant 2025 <2> mne FLDLN2 ; ofs=2ACh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000518 E629 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 0000051A 464C444C4E32 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2026 0000029E 6C80ED <2> fpvariant 0D9h, 0, 0EDh 2027 000002A1 FF <2> endvariant 2028 <2> mne FLDZ ; ofs=2B0h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000520 242A <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000522 464C445A <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2029 000002A2 6C80EE <2> fpvariant 0D9h, 0, 0EEh 2030 000002A5 FF <2> endvariant 2031 <2> mne FLDCW, ASM_WAIT ; ofs=2B4h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 000002A6 FE <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000526 652A <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000528 464C444357 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2032 <2> mne FNLDCW ; ofs=2B5h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 0000052D 762A <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 0000052F 464E4C444357 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2033 000002A7 F420AE <2> variant 229h, 46 2034 000002AA FF <2> endvariant 2035 <2> mne FMUL ; ofs=2BDh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000535 B42A <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000537 464D554C <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2036 000002AB F41024 <2> variant 208h, 36 2037 000002AE F41226 <2> variant 20Ch, 38 2038 000002B1 6C28C8 <2> fpvariant 0D8h, 40, 0C8h 2039 000002B4 6E2BC8 <2> fpvariant 0DCh, 43, 0C8h 2040 000002B7 FF <2> endvariant 2041 <2> mne FMULP ; ofs=2CAh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 0000053B 852B <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 0000053D 464D554C50 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2042 000002B8 6F2AC8 <2> fpvariant 0DEh, 42, 0C8h 2043 000002BB 6F00C9 <2> fpvariant 0DEh, 0, 0C9h 2044 000002BE FF <2> endvariant 2045 <2> mne FIMUL ; ofs=2D1h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000542 F52B <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000544 46494D554C <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2046 000002BF F4112C <2> variant 20Ah, 44 2047 000002C2 F4132E <2> variant 20Eh, 46 2048 000002C5 FF <2> endvariant 2049 <2> mne FNOP ; ofs=2D8h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000549 642C <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 0000054B 464E4F50 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2050 000002C6 6C80D0 <2> fpvariant 0D9h, 0, 0D0h 2051 000002C9 FF <2> endvariant 2052 <2> mne FPATAN ; ofs=2DCh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 0000054F A62C <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000551 46504154414E <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2053 000002CA 6C80F3 <2> fpvariant 0D9h, 0, 0F3h 2054 000002CD FF <2> endvariant 2055 <2> mne FPREM ; ofs=2E0h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000557 E52C <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000559 465052454D <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2056 000002CE 6C80F8 <2> fpvariant 0D9h, 0, 0F8h 2057 000002D1 FF <2> endvariant 2058 <2> mne FPREM1 ; ofs=2E4h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 0000055E 262D <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000560 465052454D31 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2059 000002D2 F76C80F5 <2> fpvariant 0D9h, 0, 0F5h, ASM_MACH3 2060 000002D6 FF <2> endvariant 2061 <2> mne FPTAN ; ofs=2E9h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000566 752D <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000568 465054414E <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2062 000002D7 6C80F2 <2> fpvariant 0D9h, 0, 0F2h 2063 000002DA FF <2> endvariant 2064 <2> mne FRNDINT ; ofs=2EDh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 0000056D B72D <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 0000056F 46524E44494E54 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2065 000002DB 6C80FC <2> fpvariant 0D9h, 0, 0FCh 2066 000002DE FF <2> endvariant 2067 <2> mne FSCALE ; ofs=2FAh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000576 F62D <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000578 465343414C45 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2068 000002DF 6C80FD <2> fpvariant 0D9h, 0, 0FDh 2069 000002E2 FF <2> endvariant 2070 <2> mne FSETPM, ASM_WAIT ; ofs=2FEh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 000002E3 FE <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 0000057E 362E <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000580 46534554504D <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2071 <2> mne FNSETPM ; ofs=2FFh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000586 472E <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000588 464E534554504D <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2072 000002E4 F66D80E4 <2> fpvariant 0DBh, 0, 0E4h, ASM_MACH2 2073 000002E8 FF <2> endvariant 2074 <2> mne FSIN ; ofs=304h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 0000058F 942E <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000591 4653494E <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2075 000002E9 F76C80FE <2> fpvariant 0D9h, 0, 0FEh, ASM_MACH3 2076 000002ED FF <2> endvariant 2077 <2> mne FSINCOS ; ofs=309h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000595 E72E <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000597 4653494E434F53 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2078 000002EE F76C80FB <2> fpvariant 0D9h, 0, 0FBh, ASM_MACH3 2079 000002F2 FF <2> endvariant 2080 <2> mne FSQRT ; ofs=30Eh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 0000059E 352F <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000005A0 4653515254 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2081 000002F3 6C80FA <2> fpvariant 0D9h, 0, 0FAh 2082 000002F6 FF <2> endvariant 2083 <2> mne FST ; ofs=312h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000005A5 732F <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000005A7 465354 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2084 000002F7 F414A5 <2> variant 211h, 37 2085 000002FA F416A7 <2> variant 215h, 39 2086 000002FD 6EA9D0 <2> fpvariant 0DDh, 41, 0D0h 2087 00000300 FF <2> endvariant 2088 <2> mne FSTP ; ofs=31Ch 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000005AA 1430 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000005AC 46535450 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2089 00000301 F418A5 <2> variant 219h, 37 2090 00000304 F41AA7 <2> variant 21Dh, 39 2091 00000307 F429B1 <2> variant 23Bh, 49 2092 0000030A 6EA9D8 <2> fpvariant 0DDh, 41, 0D8h 2093 0000030D FF <2> endvariant 2094 <2> mne FSTCW, ASM_WAIT ; ofs=329h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 0000030E FE <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000005B0 E530 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000005B2 4653544357 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2095 <2> mne FNSTCW ; ofs=32Ah 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000005B7 F630 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000005B9 464E53544357 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2096 0000030F F428AF <2> variant 239h, 47 2097 00000312 FF <2> endvariant 2098 <2> mne FSTSW, ASM_WAIT ; ofs=333h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 00000313 FE <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000005BF 3531 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000005C1 4653545357 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2099 <2> mne FNSTSW ; ofs=334h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000005C6 4631 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000005C8 464E53545357 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2100 00000314 6FB6E0 <2> fpvariant 0DFh, 54, 0E0h 2101 00000317 F42AAF <2> variant 23Dh, 47 2102 0000031A FF <2> endvariant 2103 <2> mne FSUB ; ofs=33Bh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000005CE B431 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000005D0 46535542 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2104 0000031B F41C24 <2> variant 220h, 36 2105 0000031E F41E26 <2> variant 224h, 38 2106 00000321 6C28E0 <2> fpvariant 0D8h, 40, 0E0h 2107 00000324 6E2BE8 <2> fpvariant 0DCh, 43, 0E8h 2108 00000327 FF <2> endvariant 2109 <2> mne FSUBP ; ofs=348h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000005D4 8532 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000005D6 4653554250 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2110 00000328 6F2AE8 <2> fpvariant 0DEh, 42, 0E8h 2111 0000032B 6F00E9 <2> fpvariant 0DEh, 0, 0E9h 2112 0000032E FF <2> endvariant 2113 <2> mne FISUB ; ofs=34Fh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000005DB F532 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000005DD 4649535542 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2114 0000032F F41D2C <2> variant 222h, 44 2115 00000332 F41F2E <2> variant 226h, 46 2116 00000335 FF <2> endvariant 2117 <2> mne FSUBR ; ofs=356h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000005E2 6533 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000005E4 4653554252 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2118 00000336 F42024 <2> variant 228h, 36 2119 00000339 F42226 <2> variant 22Ch, 38 2120 0000033C 6C28E8 <2> fpvariant 0D8h, 40, 0E8h 2121 0000033F 6E2BE0 <2> fpvariant 0DCh, 43, 0E0h 2122 00000342 FF <2> endvariant 2123 <2> mne FSUBRP ; ofs=363h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000005E9 3634 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000005EB 465355425250 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2124 00000343 6F2AE0 <2> fpvariant 0DEh, 42, 0E0h 2125 00000346 6F00E1 <2> fpvariant 0DEh, 0, 0E1h 2126 00000349 FF <2> endvariant 2127 <2> mne FISUBR ; ofs=36Ah 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000005F1 A634 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000005F3 464953554252 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2128 0000034A F4212C <2> variant 22Ah, 44 2129 0000034D F4232E <2> variant 22Eh, 46 2130 00000350 FF <2> endvariant 2131 <2> mne FTST ; ofs=371h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000005F9 1435 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000005FB 46545354 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2132 00000351 6C80E4 <2> fpvariant 0D9h, 0, 0E4h 2133 00000354 FF <2> endvariant 2134 <2> mne FUCOM ; ofs=375h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000005FF 5535 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000601 4655434F4D <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2135 00000355 F76EB2E0 <2> fpvariant 0DDh, 50, 0E0h, ASM_MACH3 2136 00000359 F76E80E1 <2> fpvariant 0DDh, 0, 0E1h, ASM_MACH3 2137 0000035D FF <2> endvariant 2138 <2> mne FUCOMI ; ofs=37Eh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000606 E635 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000608 4655434F4D49 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2139 0000035E FA6DB2E8 <2> fpvariant 0DBh, 50, 0E8h, ASM_MACH6 2140 00000362 FA6D80E9 <2> fpvariant 0DBh, 0, 0E9h, ASM_MACH6 2141 00000366 FF <2> endvariant 2142 <2> mne FUCOMIP ; ofs=387h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 0000060E 7736 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000610 4655434F4D4950 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2143 00000367 FA6FB2E8 <2> fpvariant 0DFh, 50, 0E8h, ASM_MACH6 2144 0000036B FA6F80E9 <2> fpvariant 0DFh, 0, 0E9h, ASM_MACH6 2145 0000036F FF <2> endvariant 2146 <2> mne FUCOMP ; ofs=390h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000617 0637 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000619 4655434F4D50 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2147 00000370 F76EB2E8 <2> fpvariant 0DDh, 50, 0E8h, ASM_MACH3 2148 00000374 F76E80E9 <2> fpvariant 0DDh, 0, 0E9h, ASM_MACH3 2149 00000378 FF <2> endvariant 2150 <2> mne FUCOMPP ; ofs=399h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 0000061F 9737 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000621 4655434F4D5050 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2151 00000379 F76D00E9 <2> fpvariant 0DAh, 0, 0E9h, ASM_MACH3 2152 0000037D FF <2> endvariant 2153 <2> mne FWAIT ; ofs=39Eh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000628 E537 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 0000062A 4657414954 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2154 0000037E 4D80 <2> variant 09Bh, 0 2155 00000380 FF <2> endvariant 2156 <2> mne FXAM ; ofs=3A1h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 0000062F 1438 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000631 4658414D <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2157 00000381 6C80E5 <2> fpvariant 0D9h, 0, 0E5h 2158 00000384 FF <2> endvariant 2159 <2> mne FXCH ; ofs=3A5h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000635 5438 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000637 46584348 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2160 00000385 6CB2C8 <2> fpvariant 0D9h, 50, 0C8h 2161 00000388 6C80C9 <2> fpvariant 0D9h, 0, 0C9h 2162 0000038B FF <2> endvariant 2163 <2> mne FXTRACT ; ofs=3ACh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 0000063B C738 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 0000063D 46585452414354 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2164 0000038C 6C80F4 <2> fpvariant 0D9h, 0, 0F4h 2165 0000038F FF <2> endvariant 2166 <2> mne FYL2X ; ofs=3B0h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000644 0539 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000646 46594C3258 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2167 00000390 6C80F1 <2> fpvariant 0D9h, 0, 0F1h 2168 00000393 FF <2> endvariant 2169 <2> mne FYL2XP1 ; ofs=3B4h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 0000064B 4739 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 0000064D 46594C32585031 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2170 00000394 6C80F9 <2> fpvariant 0D9h, 0, 0F9h 2171 00000397 FF <2> endvariant 2172 <2> mne HLT ; ofs=3B8h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000654 8339 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000656 484C54 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2173 00000398 7A00 <2> variant 0F4h, 0 2174 0000039A FF <2> endvariant 2175 <2> mne IDIV ; ofs=3BBh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000659 B439 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 0000065B 49444956 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2176 0000039B F4478B <2> variant AGRP(6,7), 11 2177 0000039E FF <2> endvariant 2178 <2> mne IMUL ; ofs=3BFh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 0000065F F439 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000661 494D554C <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2179 0000039F F4468B <2> variant AGRP(6,5), 11 2180 000003A2 F7D790 <2> variant 1AFh, 16, ASM_MACH3 2181 000003A5 F535B7 <2> variant 06Bh, 55, ASM_MACH1 2182 000003A8 F535B8 <2> variant 06Bh, 56, ASM_MACH1 2183 000003AB F534B9 <2> variant 069h, 57, ASM_MACH1 2184 000003AE F534BA <2> variant 069h, 58, ASM_MACH1 2185 000003B1 FF <2> endvariant 2186 <2> mne IN ; ofs=3D2h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000665 223B <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000667 494E <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2187 000003B2 723B <2> variant 0E4h, 59 2188 000003B4 763C <2> variant 0ECh, 60 2189 000003B6 FF <2> endvariant 2190 <2> mne INC ; ofs=3D7h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000669 733B <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 0000066B 494E43 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2191 000003B7 2021 <2> variant 040h, 33 2192 000003B9 FBF42C0D <2> variant AGRP(0,0), 13, ASM_LOCKABLE 2193 000003BD FF <2> endvariant 2194 <2> mne INSB ; ofs=3DEh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 0000066E E43B <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000670 494E5342 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2195 000003BE F53600 <2> variant 06Ch, 0, ASM_MACH1 2196 000003C1 FF <2> endvariant 2197 <2> mne INT ; ofs=3E6h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000674 233C <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000676 494E54 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2198 000003C2 663D <2> variant 0CCh, 61 2199 000003C4 66FB <2> variant 0CDh, 123 2200 000003C6 FF <2> endvariant 2201 <2> mne INT1 ; ofs=3EBh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000679 743C <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 0000067B 494E5431 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2202 000003C7 FA78FF <2> variant 0F1h, 127, ASM_MACH6 2203 000003CA FF <2> endvariant 2204 <2> mne INT01 ; ofs=3EFh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 0000067F B53C <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000681 494E543031 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2205 000003CB FA78FF <2> variant 0F1h, 127, ASM_MACH6 2206 000003CE FF <2> endvariant 2207 <2> mne ICEBP ; ofs=3F3h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000686 F53C <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000688 4943454250 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2208 000003CF FA78FF <2> variant 0F1h, 127, ASM_MACH6 2209 000003D2 FF <2> endvariant 2210 <2> mne INT3 ; ofs=3F7h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 0000068D 343D <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 0000068F 494E5433 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2211 000003D3 667F <2> variant 0CCh, 127 2212 000003D5 FF <2> endvariant 2213 <2> mne INT03 ; ofs=3FAh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000693 653D <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000695 494E543033 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2214 000003D6 667F <2> variant 0CCh, 127 2215 000003D8 FF <2> endvariant 2216 <2> mne INTO ; ofs=3FDh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 0000069A 943D <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 0000069C 494E544F <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2217 000003D9 677F <2> variant 0CEh, 127 2218 000003DB FF <2> endvariant 2219 <2> mne INVD ; ofs=400h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000006A0 C43D <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000006A2 494E5644 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2220 000003DC F88400 <2> variant 108h, 0, ASM_MACH4 2221 000003DF FF <2> endvariant 2222 <2> mne INVLPG ; ofs=404h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000006A6 063E <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000006A8 494E564C5047 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2223 000003E0 F8F44BB4 <2> variant AGRP(7,7), 52, ASM_MACH4 2224 000003E4 FF <2> endvariant 2225 <2> mne JA ; ofs=40Ch 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000006AE 523E <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000006B0 4A41 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2226 000003E5 3BBE <2> variant 077h, 62 2227 000003E7 F7C398 <2> variant 187h, 24, ASM_MACH3 2228 000003EA FF <2> endvariant 2229 <2> mne JAE ; ofs=412h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000006B2 B33E <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000006B4 4A4145 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2230 000003EB 39BE <2> variant 073h, 62 2231 000003ED F7C198 <2> variant 183h, 24, ASM_MACH3 2232 000003F0 FF <2> endvariant 2233 <2> mne JB ; ofs=418h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000006B7 123F <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000006B9 4A42 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2234 000003F1 393E <2> variant 072h, 62 2235 000003F3 F7C118 <2> variant 182h, 24, ASM_MACH3 2236 000003F6 FF <2> endvariant 2237 <2> mne JBE ; ofs=41Eh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000006BB 733F <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000006BD 4A4245 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2238 000003F7 3B3E <2> variant 076h, 62 2239 000003F9 F7C318 <2> variant 186h, 24, ASM_MACH3 2240 000003FC FF <2> endvariant 2241 <2> mne JC ; ofs=424h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000006C0 D23F <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000006C2 4A43 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2242 000003FD 393E <2> variant 072h, 62 2243 000003FF F7C118 <2> variant 182h, 24, ASM_MACH3 2244 00000402 FF <2> endvariant 2245 <2> mne JCXZ, ASM_D16 ; ofs=42Ah 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 00000403 FC <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000006C4 3440 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000006C6 4A43585A <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2246 <2> mne JECXZ, ASM_D32 ; ofs=42Bh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 00000404 FD <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000006CA 4540 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000006CC 4A4543585A <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2247 00000405 71BE <2> variant 0E3h, 62 2248 00000407 FF <2> endvariant 2249 <2> mne JE ; ofs=42Fh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000006D1 8240 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000006D3 4A45 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2250 00000408 3A3E <2> variant 074h, 62 2251 0000040A F7C218 <2> variant 184h, 24, ASM_MACH3 2252 0000040D FF <2> endvariant 2253 <2> mne JG ; ofs=435h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000006D5 E240 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000006D7 4A47 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2254 0000040E 3FBE <2> variant 07Fh, 62 2255 00000410 F7C798 <2> variant 18Fh, 24, ASM_MACH3 2256 00000413 FF <2> endvariant 2257 <2> mne JGE ; ofs=43Bh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000006D9 4341 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000006DB 4A4745 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2258 00000414 3EBE <2> variant 07Dh, 62 2259 00000416 F7C698 <2> variant 18Dh, 24, ASM_MACH3 2260 00000419 FF <2> endvariant 2261 <2> mne JL ; ofs=441h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000006DE A241 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000006E0 4A4C <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2262 0000041A 3E3E <2> variant 07Ch, 62 2263 0000041C F7C618 <2> variant 18Ch, 24, ASM_MACH3 2264 0000041F FF <2> endvariant 2265 <2> mne JLE ; ofs=447h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000006E2 0342 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000006E4 4A4C45 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2266 00000420 3F3E <2> variant 07Eh, 62 2267 00000422 F7C718 <2> variant 18Eh, 24, ASM_MACH3 2268 00000425 FF <2> endvariant 2269 <2> mne JNA ; ofs=44Dh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000006E7 6342 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000006E9 4A4E41 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2270 00000426 3B3E <2> variant 076h, 62 2271 00000428 F7C318 <2> variant 186h, 24, ASM_MACH3 2272 0000042B FF <2> endvariant 2273 <2> mne JNAE ; ofs=453h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000006EC C442 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000006EE 4A4E4145 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2274 0000042C 393E <2> variant 072h, 62 2275 0000042E F7C118 <2> variant 182h, 24, ASM_MACH3 2276 00000431 FF <2> endvariant 2277 <2> mne JNB ; ofs=459h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000006F2 2343 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000006F4 4A4E42 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2278 00000432 39BE <2> variant 073h, 62 2279 00000434 F7C198 <2> variant 183h, 24, ASM_MACH3 2280 00000437 FF <2> endvariant 2281 <2> mne JNBE ; ofs=45Fh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000006F7 8443 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000006F9 4A4E4245 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2282 00000438 3BBE <2> variant 077h, 62 2283 0000043A F7C398 <2> variant 187h, 24, ASM_MACH3 2284 0000043D FF <2> endvariant 2285 <2> mne JNC ; ofs=465h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000006FD E343 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000006FF 4A4E43 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2286 0000043E 39BE <2> variant 073h, 62 2287 00000440 F7C198 <2> variant 183h, 24, ASM_MACH3 2288 00000443 FF <2> endvariant 2289 <2> mne JNE ; ofs=46Bh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000702 4344 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000704 4A4E45 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2290 00000444 3ABE <2> variant 075h, 62 2291 00000446 F7C298 <2> variant 185h, 24, ASM_MACH3 2292 00000449 FF <2> endvariant 2293 <2> mne JNG ; ofs=471h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000707 A344 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000709 4A4E47 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2294 0000044A 3F3E <2> variant 07Eh, 62 2295 0000044C F7C718 <2> variant 18Eh, 24, ASM_MACH3 2296 0000044F FF <2> endvariant 2297 <2> mne JNGE ; ofs=477h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 0000070C 0445 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 0000070E 4A4E4745 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2298 00000450 3E3E <2> variant 07Ch, 62 2299 00000452 F7C618 <2> variant 18Ch, 24, ASM_MACH3 2300 00000455 FF <2> endvariant 2301 <2> mne JNL ; ofs=47Dh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000712 6345 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000714 4A4E4C <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2302 00000456 3EBE <2> variant 07Dh, 62 2303 00000458 F7C698 <2> variant 18Dh, 24, ASM_MACH3 2304 0000045B FF <2> endvariant 2305 <2> mne JNLE ; ofs=483h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000717 C445 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000719 4A4E4C45 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2306 0000045C 3FBE <2> variant 07Fh, 62 2307 0000045E F7C798 <2> variant 18Fh, 24, ASM_MACH3 2308 00000461 FF <2> endvariant 2309 <2> mne JNO ; ofs=489h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 0000071D 2346 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 0000071F 4A4E4F <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2310 00000462 38BE <2> variant 071h, 62 2311 00000464 F7C098 <2> variant 181h, 24, ASM_MACH3 2312 00000467 FF <2> endvariant 2313 <2> mne JNP ; ofs=48Fh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000722 8346 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000724 4A4E50 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2314 00000468 3DBE <2> variant 07Bh, 62 2315 0000046A F7C598 <2> variant 18Bh, 24, ASM_MACH3 2316 0000046D FF <2> endvariant 2317 <2> mne JNS ; ofs=495h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000727 E346 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000729 4A4E53 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2318 0000046E 3CBE <2> variant 079h, 62 2319 00000470 F7C498 <2> variant 189h, 24, ASM_MACH3 2320 00000473 FF <2> endvariant 2321 <2> mne JNZ ; ofs=49Bh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 0000072C 4347 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 0000072E 4A4E5A <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2322 00000474 3ABE <2> variant 075h, 62 2323 00000476 F7C298 <2> variant 185h, 24, ASM_MACH3 2324 00000479 FF <2> endvariant 2325 <2> mne JO ; ofs=4A1h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000731 A247 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000733 4A4F <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2326 0000047A 383E <2> variant 070h, 62 2327 0000047C F7C018 <2> variant 180h, 24, ASM_MACH3 2328 0000047F FF <2> endvariant 2329 <2> mne JP ; ofs=4A7h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000735 0248 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000737 4A50 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2330 00000480 3D3E <2> variant 07Ah, 62 2331 00000482 F7C518 <2> variant 18Ah, 24, ASM_MACH3 2332 00000485 FF <2> endvariant 2333 <2> mne JPE ; ofs=4ADh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000739 6348 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 0000073B 4A5045 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2334 00000486 3D3E <2> variant 07Ah, 62 2335 00000488 F7C518 <2> variant 18Ah, 24, ASM_MACH3 2336 0000048B FF <2> endvariant 2337 <2> mne JPO ; ofs=4B3h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 0000073E C348 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000740 4A504F <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2338 0000048C 3DBE <2> variant 07Bh, 62 2339 0000048E F7C598 <2> variant 18Bh, 24, ASM_MACH3 2340 00000491 FF <2> endvariant 2341 <2> mne JS ; ofs=4B9h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000743 2249 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000745 4A53 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2342 00000492 3C3E <2> variant 078h, 62 2343 00000494 F7C418 <2> variant 188h, 24, ASM_MACH3 2344 00000497 FF <2> endvariant 2345 <2> mne JZ ; ofs=4BFh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000747 8249 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000749 4A5A <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2346 00000498 3A3E <2> variant 074h, 62 2347 0000049A F7C218 <2> variant 184h, 24, ASM_MACH3 2348 0000049D FF <2> endvariant 2349 <2> mne JMP ; ofs=4C5h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 0000074B E349 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 0000074D 4A4D50 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2350 0000049E 75BE <2> variant 0EBh, 62 2351 000004A0 7498 <2> variant 0E9h, 24 2352 000004A2 F43E79 <2> variant AGRP(4,4), 121 2353 000004A5 F43E9C <2> variant AGRP(4,5), 28 2354 000004A8 751A <2> variant 0EAh, 26 2355 000004AA FF <2> endvariant 2356 <2> mne LAHF ; ofs=4D2h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000750 B44A <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000752 4C414846 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2357 000004AB 4F80 <2> variant 09Fh, 0 2358 000004AD FF <2> endvariant 2359 <2> mne LAR ; ofs=4D5h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000756 E34A <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000758 4C4152 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2360 000004AE F68110 <2> variant 102h, 16, ASM_MACH2 2361 000004B1 FF <2> endvariant 2362 <2> mne LDS ; ofs=4D9h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 0000075B 234B <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 0000075D 4C4453 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2363 000004B2 628F <2> variant 0C5h, 15 2364 000004B4 FF <2> endvariant 2365 <2> mne LSS ; ofs=4DCh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000760 534B <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000762 4C5353 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2366 000004B5 F7D90F <2> variant 1B2h, 15, ASM_MACH3 2367 000004B8 FF <2> endvariant 2368 <2> mne LES ; ofs=4E0h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000765 934B <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000767 4C4553 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2369 000004B9 620F <2> variant 0C4h, 15 2370 000004BB FF <2> endvariant 2371 <2> mne LFS ; ofs=4E3h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 0000076A C34B <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 0000076C 4C4653 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2372 000004BC F7DA0F <2> variant 1B4h, 15, ASM_MACH3 2373 000004BF FF <2> endvariant 2374 <2> mne LGS ; ofs=4E7h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 0000076F 034C <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000771 4C4753 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2375 000004C0 F7DA8F <2> variant 1B5h, 15, ASM_MACH3 2376 000004C3 FF <2> endvariant 2377 <2> mne LEA ; ofs=4EBh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000774 434C <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000776 4C4541 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2378 000004C4 46F7 <2> variant 08Dh, 119 2379 000004C6 FF <2> endvariant 2380 <2> mne LGDT ; ofs=4F2h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000779 744C <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 0000077B 4C474454 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2381 000004C7 F6F44933 <2> variant AGRP(7,2), 51, ASM_MACH2 2382 000004CB FF <2> endvariant 2383 <2> mne LIDT ; ofs=4F7h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 0000077F C44C <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000781 4C494454 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2384 000004CC F6F449B3 <2> variant AGRP(7,3), 51, ASM_MACH2 2385 000004D0 FF <2> endvariant 2386 <2> mne LLDT ; ofs=4FCh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000785 144D <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000787 4C4C4454 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2387 000004D1 F6F44D49 <2> variant AGRP(8,2), 73, ASM_MACH2 2388 000004D5 FF <2> endvariant 2389 <2> mne LMSW ; ofs=501h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 0000078B 644D <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 0000078D 4C4D5357 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2390 000004D6 F6F44B49 <2> variant AGRP(7,6), 73, ASM_MACH2 2391 000004DA FF <2> endvariant 2392 <2> mne LOCK, ASM_SPECIAL, 0F0h ; ofs=506h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 000004DB FFF0 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000791 B44D <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000793 4C4F434B <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2393 <2> mne LODSB ; ofs=508h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000797 D54D <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000799 4C4F445342 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2394 000004DD 5600 <2> variant 0ACh, 0 2395 000004DF FF <2> endvariant 2396 <2> mne LOOP ; ofs=51Dh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 0000079E 044E <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000007A0 4C4F4F50 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2397 000004E0 717C <2> variant 0E2h, 124 2398 000004E2 713E <2> variant 0E2h, 62 2399 000004E4 FF <2> endvariant 2400 <2> mne LOOPZ ; ofs=522h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000007A4 554E <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000007A6 4C4F4F505A <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2401 000004E5 70FC <2> variant 0E1h, 124 2402 000004E7 70BE <2> variant 0E1h, 62 2403 000004E9 FF <2> endvariant 2404 <2> mne LOOPE ; ofs=527h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000007AB A54E <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000007AD 4C4F4F5045 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2405 000004EA 70FC <2> variant 0E1h, 124 2406 000004EC 70BE <2> variant 0E1h, 62 2407 000004EE FF <2> endvariant 2408 <2> mne LOOPNZ ; ofs=52Ch 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000007B2 F64E <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000007B4 4C4F4F504E5A <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2409 000004EF 707C <2> variant 0E0h, 124 2410 000004F1 703E <2> variant 0E0h, 62 2411 000004F3 FF <2> endvariant 2412 <2> mne LOOPNE ; ofs=531h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000007BA 464F <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000007BC 4C4F4F504E45 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2413 000004F4 707C <2> variant 0E0h, 124 2414 000004F6 703E <2> variant 0E0h, 62 2415 000004F8 FF <2> endvariant 2416 <2> mne LSL ; ofs=536h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000007C2 934F <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000007C4 4C534C <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2417 000004F9 F68190 <2> variant 103h, 16, ASM_MACH2 2418 000004FC FF <2> endvariant 2419 <2> mne LTR ; ofs=53Ah 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000007C7 D34F <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000007C9 4C5452 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2420 000004FD F6F44DC9 <2> variant AGRP(8,3), 73, ASM_MACH2 2421 00000501 FF <2> endvariant 2422 <2> mne MOV ; ofs=53Fh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000007CC 2350 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000007CE 4D4F56 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2423 00000502 5043 <2> variant 0A0h, 67 2424 00000504 5144 <2> variant 0A2h, 68 2425 00000506 4409 <2> variant 088h, 9 2426 00000508 450A <2> variant 08Ah, 10 2427 0000050A 4641 <2> variant 08Ch, 65 2428 0000050C 4742 <2> variant 08Eh, 66 2429 0000050E 5845 <2> variant 0B0h, 69 2430 00000510 5C46 <2> variant 0B8h, 70 2431 00000512 F45004 <2> variant AGRP(9,0), 4 2432 00000515 F7906C <2> variant 120h, 108, ASM_MACH3 2433 00000518 F7916D <2> variant 122h, 109, ASM_MACH3 2434 0000051B F790EE <2> variant 121h, 110, ASM_MACH3 2435 0000051E F791EF <2> variant 123h, 111, ASM_MACH3 2436 00000521 F79270 <2> variant 124h, 112, ASM_MACH3 2437 00000524 F79371 <2> variant 126h, 113, ASM_MACH3 2438 00000527 FF <2> endvariant 2439 <2> mne MOVD ; ofs=565h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000007D1 8452 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000007D3 4D4F5644 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2440 00000528 F9B772 <2> variant 16Eh, 114, ASM_MACH5 2441 0000052B F9BF73 <2> variant 17Eh, 115, ASM_MACH5 2442 0000052E FF <2> endvariant 2443 <2> mne MOVQ ; ofs=56Ch 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000007D7 F452 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000007D9 4D4F5651 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2444 0000052F F9B7F4 <2> variant 16Fh, 116, ASM_MACH5 2445 00000532 F9BFF5 <2> variant 17Fh, 117, ASM_MACH5 2446 00000535 FF <2> endvariant 2447 <2> mne PACKSSDW ; ofs=573h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000007DD 6853 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000007DF 5041434B53534457 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2448 00000536 F9B5F4 <2> variant 16Bh, 116, ASM_MACH5 2449 00000539 FF <2> endvariant 2450 <2> mne PACKSSWB ; ofs=577h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000007E7 A853 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000007E9 5041434B53535742 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2451 0000053A F9B1F4 <2> variant 163h, 116, ASM_MACH5 2452 0000053D FF <2> endvariant 2453 <2> mne PACKUSWB ; ofs=57Bh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000007F1 E853 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000007F3 5041434B55535742 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2454 0000053E F9B3F4 <2> variant 167h, 116, ASM_MACH5 2455 00000541 FF <2> endvariant 2456 <2> mne PADDB ; ofs=57Fh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000007FB 2554 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000007FD 5041444442 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2457 00000542 F9F40A74 <2> variant 1FCh, 116, ASM_MACH5 2458 00000546 FF <2> endvariant 2459 <2> mne PADDW ; ofs=584h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000802 7554 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000804 5041444457 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2460 00000547 F9F40AF4 <2> variant 1FDh, 116, ASM_MACH5 2461 0000054B FF <2> endvariant 2462 <2> mne PADDD ; ofs=589h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000809 C554 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 0000080B 5041444444 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2463 0000054C F9F40B74 <2> variant 1FEh, 116, ASM_MACH5 2464 00000550 FF <2> endvariant 2465 <2> mne PADDSB ; ofs=58Eh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000810 1655 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000812 504144445342 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2466 00000551 F9F40274 <2> variant 1ECh, 116, ASM_MACH5 2467 00000555 FF <2> endvariant 2468 <2> mne PADDSW ; ofs=593h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000818 6655 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 0000081A 504144445357 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2469 00000556 F9F402F4 <2> variant 1EDh, 116, ASM_MACH5 2470 0000055A FF <2> endvariant 2471 <2> mne PADDUSB ; ofs=598h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000820 B755 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000822 50414444555342 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2472 0000055B F9EE74 <2> variant 1DCh, 116, ASM_MACH5 2473 0000055E FF <2> endvariant 2474 <2> mne PADDUSW ; ofs=59Ch 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000829 F755 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 0000082B 50414444555357 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2475 0000055F F9EEF4 <2> variant 1DDh, 116, ASM_MACH5 2476 00000562 FF <2> endvariant 2477 <2> mne PAND ; ofs=5A0h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000832 3456 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000834 50414E44 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2478 00000563 F9EDF4 <2> variant 1DBh, 116, ASM_MACH5 2479 00000566 FF <2> endvariant 2480 <2> mne PANDN ; ofs=5A4h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000838 7556 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 0000083A 50414E444E <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2481 00000567 F9EFF4 <2> variant 1DFh, 116, ASM_MACH5 2482 0000056A FF <2> endvariant 2483 <2> mne PCMPEQB ; ofs=5A8h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 0000083F B756 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000841 50434D50455142 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2484 0000056B F9BA74 <2> variant 174h, 116, ASM_MACH5 2485 0000056E FF <2> endvariant 2486 <2> mne PCMPEQW ; ofs=5ACh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000848 F756 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 0000084A 50434D50455157 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2487 0000056F F9BAF4 <2> variant 175h, 116, ASM_MACH5 2488 00000572 FF <2> endvariant 2489 <2> mne PCMPEQD ; ofs=5B0h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000851 3757 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000853 50434D50455144 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2490 00000573 F9BB74 <2> variant 176h, 116, ASM_MACH5 2491 00000576 FF <2> endvariant 2492 <2> mne PCMPGTB ; ofs=5B4h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 0000085A 7757 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 0000085C 50434D50475442 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2493 00000577 F9B274 <2> variant 164h, 116, ASM_MACH5 2494 0000057A FF <2> endvariant 2495 <2> mne PCMPGTW ; ofs=5B8h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000863 B757 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000865 50434D50475457 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2496 0000057B F9B2F4 <2> variant 165h, 116, ASM_MACH5 2497 0000057E FF <2> endvariant 2498 <2> mne PCMPGTD ; ofs=5BCh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 0000086C F757 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 0000086E 50434D50475444 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2499 0000057F F9B374 <2> variant 166h, 116, ASM_MACH5 2500 00000582 FF <2> endvariant 2501 <2> mne PMADDWD ; ofs=5C0h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000875 3758 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000877 504D4144445744 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2502 00000583 F9F406F4 <2> variant 1F5h, 116, ASM_MACH5 2503 00000587 FF <2> endvariant 2504 <2> mne PMULHW ; ofs=5C5h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 0000087E 8658 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000880 504D554C4857 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2505 00000588 F9F2F4 <2> variant 1E5h, 116, ASM_MACH5 2506 0000058B FF <2> endvariant 2507 <2> mne PMULLW ; ofs=5C9h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000886 C658 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000888 504D554C4C57 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2508 0000058C F9EAF4 <2> variant 1D5h, 116, ASM_MACH5 2509 0000058F FF <2> endvariant 2510 <2> mne POR ; ofs=5CDh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 0000088E 0359 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000890 504F52 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2511 00000590 F9F401F4 <2> variant 1EBh, 116, ASM_MACH5 2512 00000594 FF <2> endvariant 2513 <2> mne PSLLW ; ofs=5D2h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000893 5559 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000895 50534C4C57 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2514 00000595 F9F404F4 <2> variant 1F1h, 116, ASM_MACH5 2515 00000599 F9F45776 <2> variant AGRP(10,6), 118, ASM_MACH5 2516 0000059D FF <2> endvariant 2517 <2> mne PSLLD ; ofs=5DBh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 0000089A E559 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 0000089C 50534C4C44 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2518 0000059E F9F40574 <2> variant 1F2h, 116, ASM_MACH5 2519 000005A2 F9F45B76 <2> variant AGRP(11,6), 118, ASM_MACH5 2520 000005A6 FF <2> endvariant 2521 <2> mne PSLLQ ; ofs=5E4h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000008A1 755A <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000008A3 50534C4C51 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2522 000005A7 F9F405F4 <2> variant 1F3h, 116, ASM_MACH5 2523 000005AB F9F45F76 <2> variant AGRP(12,6), 118, ASM_MACH5 2524 000005AF FF <2> endvariant 2525 <2> mne PSRAW ; ofs=5EDh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000008A8 055B <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000008AA 5053524157 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2526 000005B0 F9F0F4 <2> variant 1E1h, 116, ASM_MACH5 2527 000005B3 F9F45676 <2> variant AGRP(10,4), 118, ASM_MACH5 2528 000005B7 FF <2> endvariant 2529 <2> mne PSRAD ; ofs=5F5h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000008AF 855B <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000008B1 5053524144 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2530 000005B8 F9F174 <2> variant 1E2h, 116, ASM_MACH5 2531 000005BB F9F45A76 <2> variant AGRP(11,4), 118, ASM_MACH5 2532 000005BF FF <2> endvariant 2533 <2> mne PSRLW ; ofs=5FDh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000008B6 055C <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000008B8 5053524C57 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2534 000005C0 F9E8F4 <2> variant 1D1h, 116, ASM_MACH5 2535 000005C3 F9F45576 <2> variant AGRP(10,2), 118, ASM_MACH5 2536 000005C7 FF <2> endvariant 2537 <2> mne PSRLD ; ofs=605h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000008BD 855C <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000008BF 5053524C44 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2538 000005C8 F9E974 <2> variant 1D2h, 116, ASM_MACH5 2539 000005CB F9F45976 <2> variant AGRP(11,2), 118, ASM_MACH5 2540 000005CF FF <2> endvariant 2541 <2> mne PSRLQ ; ofs=60Dh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000008C4 055D <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000008C6 5053524C51 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2542 000005D0 F9E9F4 <2> variant 1D3h, 116, ASM_MACH5 2543 000005D3 F9F45D76 <2> variant AGRP(12,2), 118, ASM_MACH5 2544 000005D7 FF <2> endvariant 2545 <2> mne PSUBB ; ofs=615h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000008CB 855D <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000008CD 5053554242 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2546 000005D8 F9F40874 <2> variant 1F8h, 116, ASM_MACH5 2547 000005DC FF <2> endvariant 2548 <2> mne PSUBW ; ofs=61Ah 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000008D2 D55D <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000008D4 5053554257 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2549 000005DD F9F408F4 <2> variant 1F9h, 116, ASM_MACH5 2550 000005E1 FF <2> endvariant 2551 <2> mne PSUBD ; ofs=61Fh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000008D9 255E <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000008DB 5053554244 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2552 000005E2 F9F40974 <2> variant 1FAh, 116, ASM_MACH5 2553 000005E6 FF <2> endvariant 2554 <2> mne PSUBSB ; ofs=624h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000008E0 765E <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000008E2 505355425342 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2555 000005E7 F9F40074 <2> variant 1E8h, 116, ASM_MACH5 2556 000005EB FF <2> endvariant 2557 <2> mne PSUBSW ; ofs=629h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000008E8 C65E <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000008EA 505355425357 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2558 000005EC F9F400F4 <2> variant 1E9h, 116, ASM_MACH5 2559 000005F0 FF <2> endvariant 2560 <2> mne PSUBUSB ; ofs=62Eh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000008F0 175F <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000008F2 50535542555342 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2561 000005F1 F9EC74 <2> variant 1D8h, 116, ASM_MACH5 2562 000005F4 FF <2> endvariant 2563 <2> mne PSUBUSW ; ofs=632h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000008F9 575F <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000008FB 50535542555357 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2564 000005F5 F9ECF4 <2> variant 1D9h, 116, ASM_MACH5 2565 000005F8 FF <2> endvariant 2566 <2> mne PUNPCKHBW ; ofs=636h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000902 995F <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000904 50554E50434B484257 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2567 000005F9 F9B474 <2> variant 168h, 116, ASM_MACH5 2568 000005FC FF <2> endvariant 2569 <2> mne PUNPCKHWD ; ofs=63Ah 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 0000090D D95F <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 0000090F 50554E50434B485744 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2570 000005FD F9B4F4 <2> variant 169h, 116, ASM_MACH5 2571 00000600 FF <2> endvariant 2572 <2> mne PUNPCKHDQ ; ofs=63Eh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000918 1960 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 0000091A 50554E50434B484451 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2573 00000601 F9B574 <2> variant 16Ah, 116, ASM_MACH5 2574 00000604 FF <2> endvariant 2575 <2> mne PUNPCKLBW ; ofs=642h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000923 5960 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000925 50554E50434B4C4257 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2576 00000605 F9B074 <2> variant 160h, 116, ASM_MACH5 2577 00000608 FF <2> endvariant 2578 <2> mne PUNPCKLWD ; ofs=646h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 0000092E 9960 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000930 50554E50434B4C5744 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2579 00000609 F9B0F4 <2> variant 161h, 116, ASM_MACH5 2580 0000060C FF <2> endvariant 2581 <2> mne PUNPCKLDQ ; ofs=64Ah 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000939 D960 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 0000093B 50554E50434B4C4451 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2582 0000060D F9B174 <2> variant 162h, 116, ASM_MACH5 2583 00000610 FF <2> endvariant 2584 <2> mne PXOR ; ofs=64Eh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000944 1461 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000946 50584F52 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2585 00000611 F9F403F4 <2> variant 1EFh, 116, ASM_MACH5 2586 00000615 FF <2> endvariant 2587 <2> mne MOVSB ; ofs=653h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 0000094A 6561 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 0000094C 4D4F565342 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2588 00000616 5200 <2> variant 0A4h, 0 2589 00000618 FF <2> endvariant 2590 <2> mne MOVSX ; ofs=659h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000951 9561 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000953 4D4F565358 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2591 00000619 F7DF47 <2> variant 1BEh, 71, ASM_MACH3 2592 0000061C F7DFC8 <2> variant 1BFh, 72, ASM_MACH3 2593 0000061F FF <2> endvariant 2594 <2> mne MOVZX ; ofs=660h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000958 0562 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 0000095A 4D4F565A58 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2595 00000620 F7DB47 <2> variant 1B6h, 71, ASM_MACH3 2596 00000623 F7DBC8 <2> variant 1B7h, 72, ASM_MACH3 2597 00000626 FF <2> endvariant 2598 <2> mne MUL ; ofs=667h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 0000095F 7362 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000961 4D554C <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2599 00000627 F4460B <2> variant AGRP(6,4), 11 2600 0000062A FF <2> endvariant 2601 <2> mne NEG ; ofs=66Bh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000964 B362 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000966 4E4547 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2602 0000062B FBF4458D <2> variant AGRP(6,3), 13, ASM_LOCKABLE 2603 0000062F FF <2> endvariant 2604 <2> mne NOP ; ofs=670h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000969 0363 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 0000096B 4E4F50 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2605 00000630 4800 <2> variant 090h, 0 2606 00000632 FF <2> endvariant 2607 <2> mne NOT ; ofs=673h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 0000096E 3363 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000970 4E4F54 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2608 00000633 FBF4450D <2> variant AGRP(6,2), 13, ASM_LOCKABLE 2609 00000637 FF <2> endvariant 2610 <2> mne OR ; ofs=678h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000973 8263 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000975 4F52 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2611 00000638 FBF43085 <2> variant AGRP(1,1), 5, ASM_LOCKABLE 2612 0000063C 0601 <2> variant 00Ch, 1 2613 0000063E FBF43482 <2> variant AGRP(2,1), 2, ASM_LOCKABLE 2614 00000642 FB0407 <2> variant 008h, 7, ASM_LOCKABLE 2615 00000645 050A <2> variant 00Ah, 10 2616 00000647 FF <2> endvariant 2617 <2> mne ORG, ASM_SPECIAL ; ofs=688h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 00000648 FF <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000977 8364 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000979 4F5247 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2618 <2> mne OUT ; ofs=68Ah 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 0000097C 9364 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 0000097E 4F5554 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2619 00000649 734A <2> variant 0E6h, 74 2620 0000064B 774B <2> variant 0EEh, 75 2621 0000064D FF <2> endvariant 2622 <2> mne OUTSB ; ofs=68Fh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000981 E564 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000983 4F55545342 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2623 0000064E F53700 <2> variant 06Eh, 0, ASM_MACH1 2624 00000651 FF <2> endvariant 2625 <2> mne POP ; ofs=697h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000988 2365 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 0000098A 504F50 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2626 00000652 2C22 <2> variant 058h, 34 2627 00000654 F4604C <2> variant AGRP(13,0), 76 2628 00000657 0FE9 <2> variant 01Fh, 105 2629 00000659 03E7 <2> variant 007h, 103 2630 0000065B 0BE8 <2> variant 017h, 104 2631 0000065D F7D0EA <2> variant 1A1h, 106, ASM_MACH3 2632 00000660 F7D4EB <2> variant 1A9h, 107, ASM_MACH3 2633 00000663 FF <2> endvariant 2634 <2> mne PUSH ; ofs=6B0h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 0000098D 4466 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 0000098F 50555348 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2635 00000664 2820 <2> variant 050h, 32 2636 00000666 F43F3F <2> variant AGRP(4,6), 63 2637 00000669 F5354F <2> variant 06Ah, 79, ASM_MACH1 2638 0000066C F5344E <2> variant 068h, 78, ASM_MACH1 2639 0000066F 075D <2> variant 00Eh, 93 2640 00000671 0B5F <2> variant 016h, 95 2641 00000673 0F61 <2> variant 01Eh, 97 2642 00000675 035B <2> variant 006h, 91 2643 00000677 F7D063 <2> variant 1A0h, 99, ASM_MACH3 2644 0000067A F7D465 <2> variant 1A8h, 101, ASM_MACH3 2645 0000067D FF <2> endvariant 2646 <2> mne RCL ; ofs=6D8h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000993 E367 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000995 52434C <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2647 0000067E F46550 <2> variant AGRP(14,2), 80 2648 00000681 F46951 <2> variant AGRP(15,2), 81 2649 00000684 F5F46D52 <2> variant AGRP(16,2), 82, ASM_MACH1 2650 00000688 FF <2> endvariant 2651 <2> mne RCR ; ofs=6E3h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000998 9368 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 0000099A 524352 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2652 00000689 F465D0 <2> variant AGRP(14,3), 80 2653 0000068C F469D1 <2> variant AGRP(15,3), 81 2654 0000068F F5F46DD2 <2> variant AGRP(16,3), 82, ASM_MACH1 2655 00000693 FF <2> endvariant 2656 <2> mne ROL ; ofs=6EEh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 0000099D 4369 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 0000099F 524F4C <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2657 00000694 F46450 <2> variant AGRP(14,0), 80 2658 00000697 F46851 <2> variant AGRP(15,0), 81 2659 0000069A F5F46C52 <2> variant AGRP(16,0), 82, ASM_MACH1 2660 0000069E FF <2> endvariant 2661 <2> mne ROR ; ofs=6F9h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000009A2 F369 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000009A4 524F52 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2662 0000069F F464D0 <2> variant AGRP(14,1), 80 2663 000006A2 F468D1 <2> variant AGRP(15,1), 81 2664 000006A5 F5F46CD2 <2> variant AGRP(16,1), 82, ASM_MACH1 2665 000006A9 FF <2> endvariant 2666 <2> mne RDMSR ; ofs=704h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000009A7 A56A <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000009A9 52444D5352 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2667 000006AA F99900 <2> variant 132h, 0, ASM_MACH5 2668 000006AD FF <2> endvariant 2669 <2> mne RDTSC ; ofs=708h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000009AE E56A <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000009B0 5244545343 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2670 000006AE F99880 <2> variant 131h, 0, ASM_MACH5 2671 000006B1 FF <2> endvariant 2672 <2> mne REP, ASM_SPECIAL, 0F3h ; ofs=70Ch 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 000006B2 FFF3 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000009B5 236B <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000009B7 524550 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2673 <2> mne REPZ, ASM_SPECIAL, 0F3h ; ofs=70Eh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 000006B4 FFF3 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000009BA 446B <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000009BC 5245505A <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2674 <2> mne REPNZ, ASM_SPECIAL, 0F2h ; ofs=710h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 000006B6 FFF2 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000009C0 656B <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000009C2 5245504E5A <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2675 <2> mne REPE, ASM_SPECIAL, 0F3h ; ofs=712h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 000006B8 FFF3 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000009C7 846B <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000009C9 52455045 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2676 <2> mne REPNE, ASM_SPECIAL, 0F2h ; ofs=714h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 000006BA FFF2 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000009CD A56B <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000009CF 5245504E45 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2677 <2> mne RSM ; ofs=725h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000009D4 C36B <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000009D6 52534D <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2678 000006BC F9D500 <2> variant 1AAh, 0, ASM_MACH5 2679 000006BF FF <2> endvariant 2680 <2> mne SAHF ; ofs=729h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000009D9 046C <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000009DB 53414846 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2681 000006C0 4F00 <2> variant 09Eh, 0 2682 000006C2 FF <2> endvariant 2683 <2> mne SAL ; ofs=72Ch 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000009DF 336C <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000009E1 53414C <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2684 000006C3 F46650 <2> variant AGRP(14,4), 80 2685 000006C6 F46A51 <2> variant AGRP(15,4), 81 2686 000006C9 F5F46E52 <2> variant AGRP(16,4), 82, ASM_MACH1 2687 000006CD FF <2> endvariant 2688 <2> mne SAR ; ofs=737h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000009E4 E36C <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000009E6 534152 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2689 000006CE F467D0 <2> variant AGRP(14,7), 80 2690 000006D1 F46BD1 <2> variant AGRP(15,7), 81 2691 000006D4 F5F46FD2 <2> variant AGRP(16,7), 82, ASM_MACH1 2692 000006D8 FF <2> endvariant 2693 <2> mne SEG ; ofs=742h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000009E9 936D <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000009EB 534547 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2694 000006D9 135C <2> variant 026h, 92 2695 000006DB 175E <2> variant 02Eh, 94 2696 000006DD 1B60 <2> variant 036h, 96 2697 000006DF 1F62 <2> variant 03Eh, 98 2698 000006E1 3264 <2> variant 064h, 100 2699 000006E3 32E6 <2> variant 065h, 102 2700 000006E5 FF <2> endvariant 2701 <2> mne ES, ASM_SPECIAL, 026h ; ofs=74Fh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 000006E6 FF26 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000009EE 626E <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000009F0 4553 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2702 <2> mne CS, ASM_SPECIAL, 02Eh ; ofs=751h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 000006E8 FF2E <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000009F2 826E <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000009F4 4353 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2703 <2> mne SS, ASM_SPECIAL, 036h ; ofs=753h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 000006EA FF36 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000009F6 A26E <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000009F8 5353 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2704 <2> mne DS, ASM_SPECIAL, 03Eh ; ofs=755h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 000006EC FF3E <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000009FA C26E <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 000009FC 4453 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2705 <2> mne FS, ASM_SPECIAL, 064h ; ofs=757h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 000006EE FF64 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 000009FE E26E <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000A00 4653 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2706 <2> mne GS, ASM_SPECIAL, 065h ; ofs=759h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 000006F0 FF65 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000A02 026F <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000A04 4753 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2707 <2> mne SHL ; ofs=75Bh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000A06 236F <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000A08 53484C <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2708 000006F2 F46650 <2> variant AGRP(14,4), 80 2709 000006F5 F46A51 <2> variant AGRP(15,4), 81 2710 000006F8 F5F46E52 <2> variant AGRP(16,4), 82, ASM_MACH1 2711 000006FC FF <2> endvariant 2712 <2> mne SHR ; ofs=766h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000A0B D36F <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000A0D 534852 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2713 000006FD F466D0 <2> variant AGRP(14,5), 80 2714 00000700 F46AD1 <2> variant AGRP(15,5), 81 2715 00000703 F5F46ED2 <2> variant AGRP(16,5), 82, ASM_MACH1 2716 00000707 FF <2> endvariant 2717 <2> mne SBB ; ofs=771h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000A10 8370 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000A12 534242 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2718 00000708 FBF43185 <2> variant AGRP(1,3), 5, ASM_LOCKABLE 2719 0000070C 0E01 <2> variant 01Ch, 1 2720 0000070E FBF43582 <2> variant AGRP(2,3), 2, ASM_LOCKABLE 2721 00000712 FB0C07 <2> variant 018h, 7, ASM_LOCKABLE 2722 00000715 0D0A <2> variant 01Ah, 10 2723 00000717 FF <2> endvariant 2724 <2> mne SCASB ; ofs=781h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000A15 8571 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000A17 5343415342 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2725 00000718 5700 <2> variant 0AEh, 0 2726 0000071A FF <2> endvariant 2727 <2> mne SETA ; ofs=787h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000A1C B471 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000A1E 53455441 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2728 0000071B F7CBD6 <2> variant 197h, 86, ASM_MACH3 2729 0000071E FF <2> endvariant 2730 <2> mne SETAE ; ofs=78Bh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000A22 F571 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000A24 5345544145 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2731 0000071F F7C9D6 <2> variant 193h, 86, ASM_MACH3 2732 00000722 FF <2> endvariant 2733 <2> mne SETB ; ofs=78Fh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000A29 3472 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000A2B 53455442 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2734 00000723 F7C956 <2> variant 192h, 86, ASM_MACH3 2735 00000726 FF <2> endvariant 2736 <2> mne SETBE ; ofs=793h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000A2F 7572 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000A31 5345544245 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2737 00000727 F7CB56 <2> variant 196h, 86, ASM_MACH3 2738 0000072A FF <2> endvariant 2739 <2> mne SETC ; ofs=797h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000A36 B472 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000A38 53455443 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2740 0000072B F7C956 <2> variant 192h, 86, ASM_MACH3 2741 0000072E FF <2> endvariant 2742 <2> mne SETE ; ofs=79Bh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000A3C F472 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000A3E 53455445 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2743 0000072F F7CA56 <2> variant 194h, 86, ASM_MACH3 2744 00000732 FF <2> endvariant 2745 <2> mne SETG ; ofs=79Fh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000A42 3473 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000A44 53455447 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2746 00000733 F7CFD6 <2> variant 19Fh, 86, ASM_MACH3 2747 00000736 FF <2> endvariant 2748 <2> mne SETGE ; ofs=7A3h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000A48 7573 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000A4A 5345544745 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2749 00000737 F7CED6 <2> variant 19Dh, 86, ASM_MACH3 2750 0000073A FF <2> endvariant 2751 <2> mne SETL ; ofs=7A7h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000A4F B473 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000A51 5345544C <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2752 0000073B F7CE56 <2> variant 19Ch, 86, ASM_MACH3 2753 0000073E FF <2> endvariant 2754 <2> mne SETLE ; ofs=7ABh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000A55 F573 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000A57 5345544C45 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2755 0000073F F7CF56 <2> variant 19Eh, 86, ASM_MACH3 2756 00000742 FF <2> endvariant 2757 <2> mne SETNA ; ofs=7AFh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000A5C 3574 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000A5E 5345544E41 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2758 00000743 F7CB56 <2> variant 196h, 86, ASM_MACH3 2759 00000746 FF <2> endvariant 2760 <2> mne SETNAE ; ofs=7B3h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000A63 7674 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000A65 5345544E4145 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2761 00000747 F7C956 <2> variant 192h, 86, ASM_MACH3 2762 0000074A FF <2> endvariant 2763 <2> mne SETNB ; ofs=7B7h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000A6B B574 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000A6D 5345544E42 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2764 0000074B F7C9D6 <2> variant 193h, 86, ASM_MACH3 2765 0000074E FF <2> endvariant 2766 <2> mne SETNBE ; ofs=7BBh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000A72 F674 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000A74 5345544E4245 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2767 0000074F F7CBD6 <2> variant 197h, 86, ASM_MACH3 2768 00000752 FF <2> endvariant 2769 <2> mne SETNC ; ofs=7BFh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000A7A 3575 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000A7C 5345544E43 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2770 00000753 F7C9D6 <2> variant 193h, 86, ASM_MACH3 2771 00000756 FF <2> endvariant 2772 <2> mne SETNE ; ofs=7C3h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000A81 7575 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000A83 5345544E45 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2773 00000757 F7CAD6 <2> variant 195h, 86, ASM_MACH3 2774 0000075A FF <2> endvariant 2775 <2> mne SETNG ; ofs=7C7h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000A88 B575 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000A8A 5345544E47 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2776 0000075B F7CF56 <2> variant 19Eh, 86, ASM_MACH3 2777 0000075E FF <2> endvariant 2778 <2> mne SETNGE ; ofs=7CBh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000A8F F675 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000A91 5345544E4745 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2779 0000075F F7CE56 <2> variant 19Ch, 86, ASM_MACH3 2780 00000762 FF <2> endvariant 2781 <2> mne SETNL ; ofs=7CFh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000A97 3576 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000A99 5345544E4C <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2782 00000763 F7CED6 <2> variant 19Dh, 86, ASM_MACH3 2783 00000766 FF <2> endvariant 2784 <2> mne SETNLE ; ofs=7D3h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000A9E 7676 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000AA0 5345544E4C45 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2785 00000767 F7CFD6 <2> variant 19Fh, 86, ASM_MACH3 2786 0000076A FF <2> endvariant 2787 <2> mne SETNO ; ofs=7D7h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000AA6 B576 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000AA8 5345544E4F <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2788 0000076B F7C8D6 <2> variant 191h, 86, ASM_MACH3 2789 0000076E FF <2> endvariant 2790 <2> mne SETNP ; ofs=7DBh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000AAD F576 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000AAF 5345544E50 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2791 0000076F F7CDD6 <2> variant 19Bh, 86, ASM_MACH3 2792 00000772 FF <2> endvariant 2793 <2> mne SETNS ; ofs=7DFh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000AB4 3577 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000AB6 5345544E53 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2794 00000773 F7CCD6 <2> variant 199h, 86, ASM_MACH3 2795 00000776 FF <2> endvariant 2796 <2> mne SETNZ ; ofs=7E3h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000ABB 7577 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000ABD 5345544E5A <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2797 00000777 F7CAD6 <2> variant 195h, 86, ASM_MACH3 2798 0000077A FF <2> endvariant 2799 <2> mne SETO ; ofs=7E7h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000AC2 B477 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000AC4 5345544F <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2800 0000077B F7C856 <2> variant 190h, 86, ASM_MACH3 2801 0000077E FF <2> endvariant 2802 <2> mne SETP ; ofs=7EBh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000AC8 F477 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000ACA 53455450 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2803 0000077F F7CD56 <2> variant 19Ah, 86, ASM_MACH3 2804 00000782 FF <2> endvariant 2805 <2> mne SETPE ; ofs=7EFh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000ACE 3578 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000AD0 5345545045 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2806 00000783 F7CD56 <2> variant 19Ah, 86, ASM_MACH3 2807 00000786 FF <2> endvariant 2808 <2> mne SETPO ; ofs=7F3h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000AD5 7578 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000AD7 534554504F <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2809 00000787 F7CDD6 <2> variant 19Bh, 86, ASM_MACH3 2810 0000078A FF <2> endvariant 2811 <2> mne SETS ; ofs=7F7h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000ADC B478 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000ADE 53455453 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2812 0000078B F7CC56 <2> variant 198h, 86, ASM_MACH3 2813 0000078E FF <2> endvariant 2814 <2> mne SETZ ; ofs=7FBh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000AE2 F478 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000AE4 5345545A <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2815 0000078F F7CA56 <2> variant 194h, 86, ASM_MACH3 2816 00000792 FF <2> endvariant 2817 <2> mne SGDT ; ofs=7FFh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000AE8 3479 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000AEA 53474454 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2818 00000793 F6F44835 <2> variant AGRP(7,0), 53, ASM_MACH2 2819 00000797 FF <2> endvariant 2820 <2> mne SIDT ; ofs=804h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000AEE 8479 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000AF0 53494454 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2821 00000798 F6F448B5 <2> variant AGRP(7,1), 53, ASM_MACH2 2822 0000079C FF <2> endvariant 2823 <2> mne SHLD ; ofs=809h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000AF4 D479 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000AF6 53484C44 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2824 0000079D F7D257 <2> variant 1A4h, 87, ASM_MACH3 2825 000007A0 F7D2D8 <2> variant 1A5h, 88, ASM_MACH3 2826 000007A3 FF <2> endvariant 2827 <2> mne SHRD ; ofs=810h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000AFA 447A <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000AFC 53485244 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2828 000007A4 F7D657 <2> variant 1ACh, 87, ASM_MACH3 2829 000007A7 F7D6D8 <2> variant 1ADh, 88, ASM_MACH3 2830 000007AA FF <2> endvariant 2831 <2> mne SLDT ; ofs=817h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000B00 B47A <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000B02 534C4454 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2832 000007AB F6F44C4D <2> variant AGRP(8,0), 77, ASM_MACH2 2833 000007AF FF <2> endvariant 2834 <2> mne SMSW ; ofs=81Ch 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000B06 047B <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000B08 534D5357 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2835 000007B0 F6F44A4D <2> variant AGRP(7,4), 77, ASM_MACH2 2836 000007B4 FF <2> endvariant 2837 <2> mne STC ; ofs=821h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000B0C 537B <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000B0E 535443 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2838 000007B5 7C80 <2> variant 0F9h, 0 2839 000007B7 FF <2> endvariant 2840 <2> mne STD ; ofs=824h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000B11 837B <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000B13 535444 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2841 000007B8 7E80 <2> variant 0FDh, 0 2842 000007BA FF <2> endvariant 2843 <2> mne STI ; ofs=827h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000B16 B37B <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000B18 535449 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2844 000007BB 7D80 <2> variant 0FBh, 0 2845 000007BD FF <2> endvariant 2846 <2> mne STOSB ; ofs=82Ah 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000B1B E57B <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000B1D 53544F5342 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2847 000007BE 5500 <2> variant 0AAh, 0 2848 000007C0 FF <2> endvariant 2849 <2> mne STR ; ofs=830h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000B22 137C <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000B24 535452 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2850 000007C1 F6F44CC0 <2> variant AGRP(8,1), 64, ASM_MACH2 2851 000007C5 FF <2> endvariant 2852 <2> mne SUB ; ofs=835h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000B27 637C <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000B29 535542 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2853 000007C6 FBF43285 <2> variant AGRP(1,5), 5, ASM_LOCKABLE 2854 000007CA 1601 <2> variant 02Ch, 1 2855 000007CC FBF43682 <2> variant AGRP(2,5), 2, ASM_LOCKABLE 2856 000007D0 FB1407 <2> variant 028h, 7, ASM_LOCKABLE 2857 000007D3 150A <2> variant 02Ah, 10 2858 000007D5 FF <2> endvariant 2859 <2> mne SALC ; ofs=845h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000B2C 647D <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000B2E 53414C43 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2860 000007D6 F66B00 <2> variant 0D6h, 0, ASM_MACH2 2861 000007D9 FF <2> endvariant 2862 <2> mne SETALC ; ofs=849h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000B32 A67D <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000B34 534554414C43 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2863 000007DA F66B00 <2> variant 0D6h, 0, ASM_MACH2 2864 000007DD FF <2> endvariant 2865 <2> mne TEST ; ofs=84Dh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000B3A E47D <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000B3C 54455354 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2866 000007DE 5401 <2> variant 0A8h, 1 2867 000007E0 F44403 <2> variant AGRP(6,0), 3 2868 000007E3 4208 <2> variant 084h, 8 2869 000007E5 420A <2> variant 084h, 10 2870 000007E7 FF <2> endvariant 2871 <2> mne UD0 ; ofs=857h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000B40 837E <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000B42 554430 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2872 000007E8 F5F40B80 <2> variant 1FFh, 0, ASM_MACH1 2873 000007EC FF <2> endvariant 2874 <2> mne UD1 ; ofs=85Ch 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000B45 D37E <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000B47 554431 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2875 000007ED F5DC80 <2> variant 1B9h, 0, ASM_MACH1 2876 000007F0 FF <2> endvariant 2877 <2> mne UD2 ; ofs=860h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000B4A 137F <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000B4C 554432 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2878 000007F1 F58580 <2> variant 10Bh, 0, ASM_MACH1 2879 000007F4 FF <2> endvariant 2880 <2> mne VERR ; ofs=864h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000B4F 547F <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000B51 56455252 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2881 000007F5 F6F44E49 <2> variant AGRP(8,4), 73, ASM_MACH2 2882 000007F9 FF <2> endvariant 2883 <2> mne VERW ; ofs=869h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000B55 A47F <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000B57 56455257 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2884 000007FA F6F44EC9 <2> variant AGRP(8,5), 73, ASM_MACH2 2885 000007FE FF <2> endvariant 2886 <2> mne WAIT ; ofs=86Eh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000B5B F47F <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000B5D 57414954 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2887 000007FF 4D80 <2> variant 09Bh, 0 2888 00000801 FF <2> endvariant 2889 <2> mne WBINVD ; ofs=871h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000B61 2680 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000B63 5742494E5644 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2890 00000802 F88480 <2> variant 109h, 0, ASM_MACH4 2891 00000805 FF <2> endvariant 2892 <2> mne WRMSR ; ofs=875h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000B69 6580 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000B6B 57524D5352 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2893 00000806 F99800 <2> variant 130h, 0, ASM_MACH5 2894 00000809 FF <2> endvariant 2895 <2> mne XADD ; ofs=879h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000B70 A480 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000B72 58414444 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2896 0000080A FBF8E007 <2> variant 1C0h, 7, ASM_LOCKABLE, ASM_MACH4 2897 0000080E FF <2> endvariant 2898 <2> mne XCHG ; ofs=87Eh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000B76 F480 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000B78 58434847 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2899 0000080F 4859 <2> variant 090h, 89 2900 00000811 485A <2> variant 090h, 90 2901 00000813 FB4307 <2> variant 086h, 7, ASM_LOCKABLE 2902 00000816 FB430C <2> variant 086h, 12, ASM_LOCKABLE 2903 00000819 FF <2> endvariant 2904 <2> mne XLAT ; ofs=889h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000B7C A481 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000B7E 584C4154 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2905 0000081A 6B80 <2> variant 0D7h, 0 2906 0000081C FF <2> endvariant 2907 <2> mne XLATB ; ofs=88Ch 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000B82 D581 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000B84 584C415442 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2908 0000081D 6B80 <2> variant 0D7h, 0 2909 0000081F FF <2> endvariant 2910 <2> mne XOR ; ofs=88Fh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000B89 0382 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000B8B 584F52 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2911 00000820 FBF43305 <2> variant AGRP(1,6), 5, ASM_LOCKABLE 2912 00000824 1A01 <2> variant 034h, 1 2913 00000826 FBF43702 <2> variant AGRP(2,6), 2, ASM_LOCKABLE 2914 0000082A FB1807 <2> variant 030h, 7, ASM_LOCKABLE 2915 0000082D 190A <2> variant 032h, 10 2916 0000082F FF <2> endvariant 2917 <2> 2918 <2> ; The following mnemonics allow an address size suffix 2919 <2> ; but do not require it. 2920 <2> 2921 <2> mnlist_a_suffix_allowed label near 2922 <2> mnsuffix _ASA 2923 <2> 2924 <2> mne LOOP ; ofs=50Eh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000B8E 0483 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000B90 4C4F4F50 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2925 00000830 713E <2> variant 0E2h, 62 2926 00000832 FF <2> endvariant 2927 <2> mne LOOPZ ; ofs=511h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000B94 3583 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000B96 4C4F4F505A <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2928 00000833 70BE <2> variant 0E1h, 62 2929 00000835 FF <2> endvariant 2930 <2> mne LOOPE ; ofs=514h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000B9B 6583 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000B9D 4C4F4F5045 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2931 00000836 70BE <2> variant 0E1h, 62 2932 00000838 FF <2> endvariant 2933 <2> mne LOOPNZ ; ofs=517h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000BA2 9683 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000BA4 4C4F4F504E5A <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2934 00000839 703E <2> variant 0E0h, 62 2935 0000083B FF <2> endvariant 2936 <2> mne LOOPNE ; ofs=51Ah 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000BAA C683 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000BAC 4C4F4F504E45 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2937 0000083C 703E <2> variant 0E0h, 62 2938 0000083E FF <2> endvariant 2939 <2> 2940 <2> ; The following mnemonics allow an operand size suffix 2941 <2> ; but do not require it. 2942 <2> 2943 <2> mnlist_o_suffix_allowed label near 2944 <2> mnsuffix _OSA 2945 <2> 2946 <2> mne ENTER ; ofs=15Eh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000BB2 F583 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000BB4 454E544552 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2947 0000083F F56423 <2> variant 0C8h, 35, ASM_MACH1 2948 00000842 FF <2> endvariant 2949 <2> mne FLDENV ; ofs=2B9h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000BB9 3684 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000BBB 464C44454E56 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2950 00000843 F41CB3 <2> variant 221h, 51 2951 00000846 FF <2> endvariant 2952 <2> mne FRSTOR ; ofs=2F1h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000BC1 7684 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000BC3 465253544F52 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2953 00000847 F41EB3 <2> variant 225h, 51 2954 0000084A FF <2> endvariant 2955 <2> mne FSAVE, ASM_WAIT ; ofs=2F5h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 0000084B FE <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000BC9 B584 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000BCB 4653415645 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2956 <2> mne FNSAVE ; ofs=2F6h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000BD0 C684 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000BD2 464E53415645 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2957 0000084C F426B5 <2> variant 235h, 53 2958 0000084F FF <2> endvariant 2959 <2> mne FSTENV, ASM_WAIT ; ofs=32Eh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 00000850 FE <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000BD8 0685 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000BDA 465354454E56 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2960 <2> mne FNSTENV ; ofs=32Fh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000BE0 1785 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000BE2 464E5354454E56 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2961 00000851 F424B5 <2> variant 231h, 53 2962 00000854 FF <2> endvariant 2963 <2> mne IRET ; ofs=409h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000BE9 5485 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000BEB 49524554 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2964 00000855 67FF <2> variant 0CFh, 127 2965 00000857 FF <2> endvariant 2966 <2> mne LEAVE ; ofs=4EEh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000BEF 8585 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000BF1 4C45415645 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2967 00000858 F564FF <2> variant 0C9h, 127, ASM_MACH1 2968 0000085B FF <2> endvariant 2969 <2> mne POPA ; ofs=6A9h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000BF6 C485 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000BF8 504F5041 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2970 0000085C F530FF <2> variant 061h, 127, ASM_MACH1 2971 0000085F FF <2> endvariant 2972 <2> mne POPF ; ofs=6ADh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000BFC 0486 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000BFE 504F5046 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2973 00000860 4EFD <2> variant 09Dh, 125 2974 00000862 FF <2> endvariant 2975 <2> mne PUSH ; ofs=6CAh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000C02 3486 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000C04 50555348 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2976 00000863 F5354F <2> variant 06Ah, 79, ASM_MACH1 2977 00000866 F5344E <2> variant 068h, 78, ASM_MACH1 2978 00000869 FF <2> endvariant 2979 <2> mne PUSHA ; ofs=6D1h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000C08 A586 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000C0A 5055534841 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2980 0000086A F5307F <2> variant 060h, 127, ASM_MACH1 2981 0000086D FF <2> endvariant 2982 <2> mne PUSHF ; ofs=6D5h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000C0F E586 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000C11 5055534846 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2983 0000086E 4E7E <2> variant 09Ch, 126 2984 00000870 FF <2> endvariant 2985 <2> mne RETN ; ofs=716h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000C16 1487 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000C18 5245544E <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2986 00000871 61FD <2> variant 0C3h, 125 2987 00000873 6153 <2> variant 0C2h, 83 2988 00000875 FF <2> endvariant 2989 <2> mne RET ; ofs=71Bh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000C1C 6387 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000C1E 524554 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2990 00000876 61FD <2> variant 0C3h, 125 2991 00000878 6153 <2> variant 0C2h, 83 2992 0000087A FF <2> endvariant 2993 <2> mne RETF ; ofs=720h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000C21 B487 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000C23 52455446 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 2994 0000087B 65FF <2> variant 0CBh, 127 2995 0000087D 6555 <2> variant 0CAh, 85 2996 0000087F FF <2> endvariant 2997 <2> 2998 <2> ; The following mnemonics require an operand size suffix. 2999 <2> 3000 <2> mnlist_o_suffix_required label near 3001 <2> mnsuffix _OSR 3002 <2> 3003 <2> mne CMPS ; ofs=12Dh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000C27 0488 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000C29 434D5053 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 3004 00000880 5380 <2> variant 0A7h, 0 3005 00000882 FF <2> endvariant 3006 <2> mne INS ; ofs=3E2h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000C2D 3388 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000C2F 494E53 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 3007 00000883 F53680 <2> variant 06Dh, 0, ASM_MACH1 3008 00000886 FF <2> endvariant 3009 <2> mne LODS ; ofs=50Bh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000C32 7488 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000C34 4C4F4453 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 3010 00000887 5680 <2> variant 0ADh, 0 3011 00000889 FF <2> endvariant 3012 <2> mne MOVS ; ofs=656h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000C38 A488 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000C3A 4D4F5653 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 3013 0000088A 5280 <2> variant 0A5h, 0 3014 0000088C FF <2> endvariant 3015 <2> mne OUTS ; ofs=693h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000C3E D488 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000C40 4F555453 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 3016 0000088D F53780 <2> variant 06Fh, 0, ASM_MACH1 3017 00000890 FF <2> endvariant 3018 <2> mne SCAS ; ofs=784h 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000C44 1489 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000C46 53434153 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 3019 00000891 5780 <2> variant 0AFh, 0 3020 00000893 FF <2> endvariant 3021 <2> mne STOS ; ofs=82Dh 1156 <3> %push 1157 <3> usesection ASMTABLE2, 1 1158 <3> %assign %$currofs $ - asmtab 1159 <3> %ifnempty %2 1160 <3> db %2 1161 <3> %endif 1162 <3> __SECT__ 1163 <3> %defstr %$string %1 1164 <3> %strlen %$string_size %$string 1165 <3> %if %$string_size > 15 1166 <3> %error Mnemonic %1 is too long! 1167 <3> %endif 1168 00000C4A 4489 <3> dw (%$currofs)<<4|%$string_size 1169 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1170 00000C4C 53544F53 <3> db %$string 1171 <3> %pop 1172 <3> %define MNCURRENT %1%[MNSUFFIX] 3022 00000894 5580 <2> variant 0ABh, 0 3023 00000896 FF <2> endvariant 3024 <2> 3025 <2> end_mnlist label near 3026 <2> 3027 <2> ;--- Disassembler: compressed table of the opcode types. 3028 <2> ;--- If the item has the format OT(xx), it refers to table 'oplists'. 3029 <2> ;--- Otherwise it's an offset for internal table 'disjmp'. 3030 <2> 3031 <2> align 8, db 0 3032 <2> optypes label byte 3033 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) 3034 00000C58 131316160D0D6902 <2> db OT(07),OT(07),OT(0A),OT(0A),OT(01),OT(01),OT(5D), 002h ; 08 - 0F 3035 00000C60 131316160D0D6B74 <2> db OT(07),OT(07),OT(0A),OT(0A),OT(01),OT(01),OT(5F),OT(68) ; 10 - 17 3036 00000C68 131316160D0D6D75 <2> db OT(07),OT(07),OT(0A),OT(0A),OT(01),OT(01),OT(61),OT(69) ; 18 - 1F 3037 00000C70 131316160D0D0A0C <2> db OT(07),OT(07),OT(0A),OT(0A),OT(01),OT(01), 00Ah,OT(00) ; 20 - 27 3038 00000C78 131316160D0D0A0C <2> db OT(07),OT(07),OT(0A),OT(0A),OT(01),OT(01), 00Ah,OT(00) ; 28 - 2F 3039 00000C80 131316160D0D0A0C <2> db OT(07),OT(07),OT(0A),OT(0A),OT(01),OT(01), 00Ah,OT(00) ; 30 - 37 3040 00000C88 141416160D0D0A0C <2> db OT(08),OT(08),OT(0A),OT(0A),OT(01),OT(01), 00Ah,OT(00) ; 38 - 3F 3041 00000C90 2D2D2D2D2D2D2D2D <2> db OT(21),OT(21),OT(21),OT(21),OT(21),OT(21),OT(21),OT(21) ; 40 - 47 3042 00000C98 2D2D2D2D2D2D2D2D <2> db OT(21),OT(21),OT(21),OT(21),OT(21),OT(21),OT(21),OT(21) ; 48 - 4F 3043 00000CA0 2C2C2C2C2C2C2C2C <2> db OT(20),OT(20),OT(20),OT(20),OT(20),OT(20),OT(20),OT(20) ; 50 - 57 3044 00000CA8 2E2E2E2E2E2E2E2E <2> db OT(22),OT(22),OT(22),OT(22),OT(22),OT(22),OT(22),OT(22) ; 58 - 5F 3045 00000CB0 8B8B861A0A0A0A0A <2> db OT(7F),OT(7F),OT(7A),OT(0E), 00Ah, 00Ah, 00Ah, 00Ah ; 60 - 67 3046 00000CB8 5A455B430C0C0C0C <2> db OT(4E),OT(39),OT(4F),OT(37),OT(00),OT(00),OT(00),OT(00) ; 68 - 6F 3047 00000CC0 4A4A4A4A4A4A4A4A <2> db OT(3E),OT(3E),OT(3E),OT(3E),OT(3E),OT(3E),OT(3E),OT(3E) ; 70 - 77 3048 00000CC8 4A4A4A4A4A4A4A4A <2> db OT(3E),OT(3E),OT(3E),OT(3E),OT(3E),OT(3E),OT(3E),OT(3E) ; 78 - 7F 3049 00000CD0 0404040414141818 <2> db 004h, 004h, 004h, 004h,OT(08),OT(08),OT(0C),OT(0C) ; 80 - 87 3050 00000CD8 151516164D834E04 <2> db OT(09),OT(09),OT(0A),OT(0A),OT(41),OT(77),OT(42), 004h ; 88 - 8F 3051 00000CE0 0C65656565656565 <2> db OT(00),OT(59),OT(59),OT(59),OT(59),OT(59),OT(59),OT(59) ; 90 - 97 3052 00000CE8 0C0C250C8A890C0C <2> db OT(00),OT(00),OT(19),OT(00),OT(7E),OT(7D),OT(00),OT(00) ; 98 - 9F 3053 00000CF0 4F4F50500C0C0C0C <2> db OT(43),OT(43),OT(44),OT(44),OT(00),OT(00),OT(00),OT(00) ; A0 - A7 3054 00000CF8 0D0D0C0C0C0C0C0C <2> db OT(01),OT(01),OT(00),OT(00),OT(00),OT(00),OT(00),OT(00) ; A8 - AF 3055 00000D00 5151515151515151 <2> db OT(45),OT(45),OT(45),OT(45),OT(45),OT(45),OT(45),OT(45) ; B0 - B7 3056 00000D08 5252525252525252 <2> db OT(46),OT(46),OT(46),OT(46),OT(46),OT(46),OT(46),OT(46) ; B8 - BF 3057 00000D10 04045F891B1B0404 <2> db 004h, 004h,OT(53),OT(7D),OT(0F),OT(0F), 004h, 004h ; C0 - C7 3058 00000D18 2F8B618B8B878B8B <2> db OT(23),OT(7F),OT(55),OT(7F),OT(7F),OT(7B),OT(7F),OT(7F) ; C8 - CF 3059 00000D20 0404040421210C0C <2> db 004h, 004h, 004h, 004h,OT(15),OT(15),OT(00),OT(00) ; D0 - D7 3060 00000D28 0606060606060606 <2> db 006h, 006h, 006h, 006h, 006h, 006h, 006h, 006h ; D8 - DF 3061 00000D30 4A4A4A4A47475656 <2> db OT(3E),OT(3E),OT(3E),OT(3E),OT(3B),OT(3B),OT(4A),OT(4A) ; E0 - E7 3062 00000D38 2324264A48485757 <2> db OT(17),OT(18),OT(1A),OT(3E),OT(3C),OT(3C),OT(4B),OT(4B) ; E8 - EF 3063 00000D40 0A8B0A0A0C0C0404 <2> db 00Ah,OT(7F), 00Ah, 00Ah,OT(00),OT(00), 004h, 004h ; F0 - F7 3064 00000D48 0C0C0C0C0C0C0404 <2> db OT(00),OT(00),OT(00),OT(00),OT(00),OT(00), 004h, 004h ; F8 - FF 3065 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) 3066 00000D58 1111111111111112 <2> db OT(05),OT(05),OT(05),OT(05),OT(05),OT(05),OT(05),OT(06) ; 108 - 10F 3067 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) 3068 00000D68 5D5D5D5D5D5D5D5D <2> db OT(51),OT(51),OT(51),OT(51),OT(51),OT(51),OT(51),OT(51) ; 118 - 11F 3069 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) 3070 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) 3071 00000D80 1919842785284B00 <2> db OT(0D),OT(0D),OT(78),OT(1B),OT(79),OT(1C),OT(3F), 000h ; 130 - 137 (Intel group 5) 3072 00000D88 594C555555550000 <2> db OT(4D),OT(40),OT(49),OT(49),OT(49),OT(49), 000h, 000h ; 138 - 13F (Intel group 6) 3073 00000D90 41413F3F59005540 <2> db OT(35),OT(35),OT(33),OT(33),OT(4D), 000h,OT(49),OT(34) ; 140 - 147 (Intel group 7) 3074 00000D98 3030303030303030 <2> db OT(24),OT(24),OT(24),OT(24),OT(24),OT(24),OT(24),OT(24) ; 148 - 14F (Coprocessor d8) 3075 00000DA0 34343E3E34343434 <2> db OT(28),OT(28),OT(32),OT(32),OT(28),OT(28),OT(28),OT(28) ; 150 - 157 3076 00000DA8 300031313F3A413B <2> db OT(24), 000h,OT(25),OT(25),OT(33),OT(2E),OT(35),OT(2F) ; 158 - 15F (Coprocessor d9) 3077 00000DB0 353E080008080808 <2> db OT(29),OT(32), 008h, 000h, 008h, 008h, 008h, 008h ; 160 - 167 3078 00000DB8 3838383838383838 <2> db OT(2C),OT(2C),OT(2C),OT(2C),OT(2C),OT(2C),OT(2C),OT(2C) ; 168 - 16F (Coprocessor da) 3079 00000DC0 3434343400080000 <2> db OT(28),OT(28),OT(28),OT(28), 000h, 008h, 000h, 000h ; 170 - 177 3080 00000DC8 38003939003C003D <2> db OT(2C), 000h,OT(2D),OT(2D), 000h,OT(30), 000h,OT(31) ; 178 - 17F (Coprocessor db) 3081 00000DD0 34343434083E3E00 <2> db OT(28),OT(28),OT(28),OT(28), 008h,OT(32),OT(32), 000h ; 180 - 187 3082 00000DD8 3232323232323232 <2> db OT(26),OT(26),OT(26),OT(26),OT(26),OT(26),OT(26),OT(26) ; 188 - 18F (Coprocessor dc) 3083 00000DE0 3737000037373737 <2> db OT(2B),OT(2B), 000h, 000h,OT(2B),OT(2B),OT(2B),OT(2B) ; 190 - 197 3084 00000DE8 320033333F00413B <2> db OT(26), 000h,OT(27),OT(27),OT(33), 000h,OT(35),OT(2F) ; 198 - 19F (Coprocessor dd) 3085 00000DF0 350035353E3E0000 <2> db OT(29), 000h,OT(29),OT(29),OT(32),OT(32), 000h, 000h ; 1A0 - 1A7 3086 00000DF8 3A3A3A3A3A3A3A3A <2> db OT(2E),OT(2E),OT(2E),OT(2E),OT(2E),OT(2E),OT(2E),OT(2E) ; 1A8 - 1AF (Coprocessor de) 3087 00000E00 3636000836363636 <2> db OT(2A),OT(2A), 000h, 008h,OT(2A),OT(2A),OT(2A),OT(2A) ; 1B0 - 1B7 3088 00000E08 3A003B3B3C2A3D2B <2> db OT(2E), 000h,OT(2F),OT(2F),OT(30),OT(1E),OT(31),OT(1F) ; 1B8 - 1BF (Coprocessor df) 3089 00000E10 00000000083E3E00 <2> db 000h, 000h, 000h, 000h, 008h,OT(32),OT(32), 000h ; 1C0 - 1C7 3090 00000E18 0C0C0C0C0C0C0C00 <2> db OT(00),OT(00),OT(00),OT(00),OT(00),OT(00),OT(00), 000h ; 1C8 - 1CF (Coprocessor groups) 3091 00000E20 0C0C0C0C0C0C0C0C <2> db OT(00),OT(00),OT(00),OT(00),OT(00),OT(00),OT(00),OT(00) ; 1D0 - 1D7 3092 00000E28 0C0C0C0C0C0C0C0C <2> db OT(00),OT(00),OT(00),OT(00),OT(00),OT(00),OT(00),OT(00) ; 1D8 - 1DF 3093 <2> ;--- The rest of these are squeezed. 3094 00000E30 0004041C1C0C0C0C <2> db 0, 004h, 004h,OT(10),OT(10),OT(00),OT(00),OT(00) ; 00 3095 00000E38 0C787A797B7C7D0C <2> db OT(00),OT(6C),OT(6E),OT(6D),OT(6F),OT(70),OT(71),OT(00) ; 08 3096 00000E40 0C0C1C1C1C1C1C1C <2> db OT(00),OT(00),OT(10),OT(10),OT(10),OT(10),OT(10),OT(10) ; 10 3097 00000E48 1C1C1C1C1C1C1C1C <2> db OT(10),OT(10),OT(10),OT(10),OT(10),OT(10),OT(10),OT(10) ; 18 3098 00000E50 1C1C808080808080 <2> db OT(10),OT(10),OT(74),OT(74),OT(74),OT(74),OT(74),OT(74) ; 20 3099 00000E58 8080808080807E80 <2> db OT(74),OT(74),OT(74),OT(74),OT(74),OT(74),OT(72),OT(74) ; 28 3100 00000E60 0404048080800C7F <2> db 004h, 004h, 004h,OT(74),OT(74),OT(74),OT(00),OT(73) ; 30 3101 00000E68 8124242424242424 <2> db OT(75),OT(18),OT(18),OT(18),OT(18),OT(18),OT(18),OT(18) ; 38 3102 00000E70 2424242424242424 <2> db OT(18),OT(18),OT(18),OT(18),OT(18),OT(18),OT(18),OT(18) ; 40 3103 00000E78 2462626262626262 <2> db OT(18),OT(56),OT(56),OT(56),OT(56),OT(56),OT(56),OT(56) ; 48 3104 00000E80 6262626262626262 <2> db OT(56),OT(56),OT(56),OT(56),OT(56),OT(56),OT(56),OT(56) ; 50 3105 00000E88 626F760C1F636471 <2> db OT(56),OT(63),OT(6A),OT(00),OT(13),OT(57),OT(58),OT(65) ; 58 3106 00000E90 770C1E63641C1313 <2> db OT(6B),OT(00),OT(12),OT(57),OT(58),OT(10),OT(07),OT(07) ; 60 3107 00000E98 1B1E1B1B53540C04 <2> db OT(0F),OT(12),OT(0F),OT(0F),OT(47),OT(48),OT(00), 004h ; 68 3108 00000EA0 1E1C1C5354131304 <2> db OT(12),OT(10),OT(10),OT(47),OT(48),OT(07),OT(07), 004h ; 70 3109 00000EA8 1D1D1D1D1D1D1D1D <2> db OT(11),OT(11),OT(11),OT(11),OT(11),OT(11),OT(11),OT(11) ; 78 3110 00000EB0 8080808080808080 <2> db OT(74),OT(74),OT(74),OT(74),OT(74),OT(74),OT(74),OT(74) ; 80 3111 00000EB8 8080808080808080 <2> db OT(74),OT(74),OT(74),OT(74),OT(74),OT(74),OT(74),OT(74) ; 88 3112 00000EC0 8080808080808080 <2> db OT(74),OT(74),OT(74),OT(74),OT(74),OT(74),OT(74),OT(74) ; 90 3113 00000EC8 80808080800C1919 <2> db OT(74),OT(74),OT(74),OT(74),OT(74),OT(00),OT(0D),OT(0D) ; 98 3114 00000ED0 6022202020295810 <2> db OT(54),OT(16),OT(14),OT(14),OT(14),OT(1D),OT(4C),OT(04) ; A0 3115 00000ED8 8282828282828282 <2> db OT(76),OT(76),OT(76),OT(76),OT(76),OT(76),OT(76),OT(76) ; A8 3116 00000EE0 0C0C0C0C0C0C0C0C <2> db OT(00),OT(00),OT(00),OT(00),OT(00),OT(00),OT(00),OT(00) ; B0 3117 00000EE8 0C0C0C0C42 <2> db OT(00),OT(00),OT(00),OT(00),OT(36) 3118 <2> 3119 <2> P186 equ 1000h 3120 <2> P286 equ 2000h 3121 <2> P386 equ 3000h 3122 <2> P486 equ 4000h 3123 <2> P586 equ 5000h 3124 <2> P686 equ 6000h 3125 <2> 3126 <2> ;--- Disassembler: compressed table of additional information. 3127 <2> ;--- Bits 0-11 usually are the offset of the mnemonics table. 3128 <2> ;--- Bits 12-15 are the CPU which introduced this opcode. 3129 <2> 3130 00000EED 00 <2> align 2, db 0 3131 <2> opinfo label word 3132 00000EEE 3600360036003600 <2> dw MN_ADD, MN_ADD, MN_ADD, MN_ADD ; 00 3133 00000EF6 36003600F507F007 <2> dw MN_ADD, MN_ADD, MN_PUSH, MN_POP ; 04 3134 00000EFE DB07DB07DB07DB07 <2> dw MN_OR, MN_OR, MN_OR, MN_OR ; 08 3135 00000F06 DB07DB07F507E001 <2> dw MN_OR, MN_OR, MN_PUSH, 01E0h ; 0C 3136 00000F0E 3100310031003100 <2> dw MN_ADC, MN_ADC, MN_ADC, MN_ADC ; 10 3137 00000F16 31003100F507F007 <2> dw MN_ADC, MN_ADC, MN_PUSH, MN_POP ; 14 3138 00000F1E 7808780878087808 <2> dw MN_SBB, MN_SBB, MN_SBB, MN_SBB ; 18 3139 00000F26 78087808F507F007 <2> dw MN_SBB, MN_SBB, MN_PUSH, MN_POP ; 1C 3140 00000F2E 3B003B003B003B00 <2> dw MN_AND, MN_AND, MN_AND, MN_AND ; 20 3141 00000F36 3B003B000100B701 <2> dw MN_AND, MN_AND, 0001h, MN_DAA ; 24 3142 00000F3E 8F098F098F098F09 <2> dw MN_SUB, MN_SUB, MN_SUB, MN_SUB ; 28 3143 00000F46 8F098F090101BC01 <2> dw MN_SUB, MN_SUB, 0101h, MN_DAS ; 2C 3144 00000F4E F109F109F109F109 <2> dw MN_XOR, MN_XOR, MN_XOR, MN_XOR ; 30 3145 00000F56 F109F10901021D00 <2> dw MN_XOR, MN_XOR, 0201h, MN_AAA ; 34 3146 00000F5E 8601860186018601 <2> dw MN_CMP, MN_CMP, MN_CMP, MN_CMP ; 38 3147 00000F66 8601860101032C00 <2> dw MN_CMP, MN_CMP, 0301h, MN_AAS ; 3C 3148 00000F6E D104D104D104D104 <2> dw MN_INC, MN_INC, MN_INC, MN_INC ; 40 3149 00000F76 D104D104D104D104 <2> dw MN_INC, MN_INC, MN_INC, MN_INC ; 44 3150 00000F7E C901C901C901C901 <2> dw MN_DEC, MN_DEC, MN_DEC, MN_DEC ; 48 3151 00000F86 C901C901C901C901 <2> dw MN_DEC, MN_DEC, MN_DEC, MN_DEC ; 4C 3152 00000F8E F507F507F507F507 <2> dw MN_PUSH, MN_PUSH, MN_PUSH, MN_PUSH ; 50 3153 00000F96 F507F507F507F507 <2> dw MN_PUSH, MN_PUSH, MN_PUSH, MN_PUSH ; 54 3154 00000F9E F007F007F007F007 <2> dw MN_POP, MN_POP, MN_POP, MN_POP ; 58 3155 00000FA6 F007F007F007F007 <2> dw MN_POP, MN_POP, MN_POP, MN_POP ; 5C 3156 00000FAE 701A5E1A46104020 <2> dw P186 + MN_PUSHA_OSA, P186 + MN_POPA_OSA, P186 + MN_BOUND, P286 + MN_ARPL ; 60 3157 00000FB6 0134013510302030 <2> dw P386 + 0401h, P386 + 0501h, P386 + 0010h, P386 + 0020h ; 64 3158 00000FBE 6A1AC7146A1AC714 <2> dw P186 + MN_PUSH_OSA, P186 + MN_IMUL, P186 + MN_PUSH_OSA, P186 + MN_IMUL ; 68 3159 00000FC6 D614951AE917A61A <2> dw P186 + MN_INSB, P186 + MN_INS_OSR, P186 + MN_OUTSB, P186 + MN_OUTS_OSR ; 6C 3160 00000FCE 990585051F051A05 <2> dw MN_JO, MN_JNO, MN_JB, MN_JAE ; 70 3161 00000FD6 AF05940523051605 <2> dw MN_JZ, MN_JNZ, MN_JBE, MN_JA ; 74 3162 00000FDE AB058F05A105A605 <2> dw MN_JS, MN_JNS, MN_JPE, MN_JPO ; 78 3163 00000FE6 460541054A053D05 <2> dw MN_JL, MN_JGE, MN_JLE, MN_JG ; 7C 3164 00000FEE 0001000100010801 <2> dw 0100h, 0100h, 0100h, 0108h ; 80 3165 00000FF6 A209A209DE09DE09 <2> dw MN_TEST, MN_TEST, MN_XCHG, MN_XCHG ; 84 3166 00000FFE 3406340634063406 <2> dw MN_MOV, MN_MOV, MN_MOV, MN_MOV ; 88 3167 00001006 3406DC053406F802 <2> dw MN_MOV, MN_LEA, MN_MOV, 02F8h ; 8C 3168 0000100E D107DE09DE09DE09 <2> dw MN_NOP, MN_XCHG, MN_XCHG, MN_XCHG ; 90 3169 00001016 DE09DE09DE09DE09 <2> dw MN_XCHG, MN_XCHG, MN_XCHG, MN_XCHG ; 94 3170 0000101E 7700AD017100C309 <2> dw MN_CBW, MN_CWD, MN_CALL, MN_WAIT ; 98 3171 00001026 770A640A4108B805 <2> dw MN_PUSHF_OSA, MN_POPF_OSA, MN_SAHF, MN_LAHF ; 9C 3172 0000102E 3406340634063406 <2> dw MN_MOV, MN_MOV, MN_MOV, MN_MOV ; A0 3173 00001036 B207A00A8B018F0A <2> dw MN_MOVSB, MN_MOVS_OSR, MN_CMPSB, MN_CMPS_OSR ; A4 3174 0000103E A209A2098309B20A <2> dw MN_TEST, MN_TEST, MN_STOSB, MN_STOS_OSR ; A8 3175 00001046 FF059A0A7D08AC0A <2> dw MN_LODSB, MN_LODS_OSR, MN_SCASB, MN_SCAS_OSR ; AC 3176 0000104E 3406340634063406 <2> dw MN_MOV, MN_MOV, MN_MOV, MN_MOV ; B0 3177 00001056 3406340634063406 <2> dw MN_MOV, MN_MOV, MN_MOV, MN_MOV ; B4 3178 0000105E 3406340634063406 <2> dw MN_MOV, MN_MOV, MN_MOV, MN_MOV ; B8 3179 00001066 3406340634063406 <2> dw MN_MOV, MN_MOV, MN_MOV, MN_MOV ; BC 3180 0000106E 200120017E0A7E0A <2> dw 0120h, 0120h, MN_RETN_OSA, MN_RETN_OSA ; C0 3181 00001076 CD05C30500030003 <2> dw MN_LES, MN_LDS, 0300h, 0300h ; C4 3182 0000107E 1A1A571A890A890A <2> dw P186 + MN_ENTER_OSA, P186 + MN_LEAVE_OSA, MN_RETF_OSA, MN_RETF_OSA ; C8 3183 00001086 F504DC040205510A <2> dw MN_INT3, MN_INT, MN_INTO, MN_IRET_OSA ; CC 3184 0000108E 1001100118011801 <2> dw 0110h, 0110h, 0118h, 0118h ; D0 3185 00001096 270022009A29EA09 <2> dw MN_AAM, MN_AAD, P286 + MN_SETALC, MN_XLATB ; D4 3186 0000109E 4801580168017801 <2> dw 0148h, 0158h, 0168h, 0178h ; D8 3187 000010A6 88019801A801B801 <2> dw 0188h, 0198h, 01A8h, 01B8h ; DC 3188 000010AE 0A0AFC09F6092C05 <2> dw MN_LOOPNZ_ASA, MN_LOOPZ_ASA, MN_LOOP_ASA, MN_JCXZ ; E0 3189 000010B6 CD04CD04E407E407 <2> dw MN_IN, MN_IN, MN_OUT, MN_OUT ; E4 3190 000010BE 7100B305B305B305 <2> dw MN_CALL, MN_JMP, MN_JMP, MN_JMP ; E8 3191 000010C6 CD04CD04E407E407 <2> dw MN_IN, MN_IN, MN_OUT, MN_OUT ; EC 3192 000010CE 0800E16402000600 <2> dw 0008h, P686 + MN_INT1, 0002h, 0006h ; F0 3193 000010D6 BC04970028012801 <2> dw MN_HLT, MN_CMC, 0128h, 0128h ; F4 3194 000010DE 820074098C007E09 <2> dw MN_CLC, MN_STC, MN_CLI, MN_STI ; F8 3195 000010E6 87007909E0023001 <2> dw MN_CLD, MN_STD, 02E0h, 0130h ; FC 3196 000010EE 3600DB0731007808 <2> dw MN_ADD, MN_OR, MN_ADC, MN_SBB ; 100 3197 000010F6 3B008F09F1098601 <2> dw MN_AND, MN_SUB, MN_XOR, MN_CMP ; 104 3198 000010FE 3600DB0731007808 <2> dw MN_ADD, MN_OR, MN_ADC, MN_SBB ; 108 3199 00001106 3B008F09F1098601 <2> dw MN_AND, MN_SUB, MN_XOR, MN_CMP ; 10C 3200 0000110E 05080A08FB070008 <2> dw MN_ROL, MN_ROR, MN_RCL, MN_RCR ; 110 3201 00001116 6E0873086E084C08 <2> dw MN_SHL, MN_SHR, MN_SHL, MN_SAR ; 114 3202 0000111E 05080A08FB070008 <2> dw MN_ROL, MN_ROR, MN_RCL, MN_RCR ; 118 3203 00001126 6E0873086E084C08 <2> dw MN_SHL, MN_SHR, MN_SHL, MN_SAR ; 11C 3204 0000112E 05180A18FB170018 <2> dw P186 + MN_ROL, P186 + MN_ROR, P186 + MN_RCL, P186 + MN_RCR ; 120 3205 00001136 6E1873186E184C18 <2> dw P186 + MN_SHL, P186 + MN_SHR, P186 + MN_SHL, P186 + MN_SAR ; 124 3206 0000113E A209A209D607CC07 <2> dw MN_TEST, MN_TEST, MN_NOT, MN_NEG ; 128 3207 00001146 C707C704CE01C104 <2> dw MN_MUL, MN_IMUL, MN_DIV, MN_IDIV ; 12C 3208 0000114E D104C90171007100 <2> dw MN_INC, MN_DEC, MN_CALL, MN_CALL ; 130 3209 00001156 B305B305F5070000 <2> dw MN_JMP, MN_JMP, MN_PUSH, 0000h ; 134 3210 0000115E 68298A29ED252F26 <2> dw P286 + MN_SLDT, P286 + MN_STR, P286 + MN_LLDT, P286 + MN_LTR ; 138 3211 00001166 B729BD2900000000 <2> dw P286 + MN_VERR, P286 + MN_VERW, 0000h, 0000h ; 13C 3212 0000116E 50295629E125E725 <2> dw P286 + MN_SGDT, P286 + MN_SIDT, P286 + MN_LGDT, P286 + MN_LIDT ; 140 3213 00001176 6E290000F3250E45 <2> dw P286 + MN_SMSW, 0000h, P286 + MN_LMSW, P486 + MN_INVLPG ; 144 3214 0000117E EA019D039B02B002 <2> dw MN_FADD, MN_FMUL, MN_FCOM, MN_FCOMP ; 148 3215 00001186 36044A04DD02F102 <2> dw MN_FSUB, MN_FSUBR, MN_FDIV, MN_FDIVR ; 14C 3216 0000118E EA019D039B02B002 <2> dw MN_FADD, MN_FMUL, MN_FCOM, MN_FCOMP ; 150 3217 00001196 36044A04DD02F102 <2> dw MN_FSUB, MN_FSUBR, MN_FDIV, MN_FDIVR ; 154 3218 0000119E 560300000D041204 <2> dw MN_FLD, 0000h, MN_FST, MN_FSTP ; 158 3219 000011A6 210A9503480A1F04 <2> dw MN_FLDENV_OSA, MN_FNLDCW, MN_FNSTENV_OSA, MN_FNSTCW ; 15C 3220 000011AE 56039D0420030000 <2> dw MN_FLD, MN_FXCH, 0320h, 0000h ; 160 3221 000011B6 2803C801D001D801 <2> dw 0328h, 01C8h, 01D0h, 01D8h ; 164 3222 000011BE F701AA031C032303 <2> dw MN_FIADD, MN_FIMUL, MN_FICOM, MN_FICOMP ; 168 3223 000011C6 43045904EA020003 <2> dw MN_FISUB, MN_FISUBR, MN_FIDIV, MN_FIDIVR ; 16C 3224 000011CE 3162426239628B62 <2> dw P686 + MN_FCMOVB, P686 + MN_FCMOVE, P686 + MN_FCMOVBE, P686 + MN_FCMOVU ; 170 3225 000011D6 0000300300000000 <2> dw 0000h, 0330h, 0000h, 0000h ; 174 3226 000011DE 2B03000049034F03 <2> dw MN_FILD, 0000h, MN_FIST, MN_FISTP ; 178 3227 000011E6 0000560300001204 <2> dw 0000h, MN_FLD, 0000h, MN_FSTP ; 17C 3228 000011EE 5D62706266627962 <2> dw P686 + MN_FCMOVNB, P686 + MN_FCMOVNE, P686 + MN_FCMOVNBE, P686 + MN_FCMOVNU ; 180 3229 000011F6 38036E64A1620000 <2> dw 0338h, P686 + MN_FUCOMI, P686 + MN_FCOMI, 0000h ; 184 3230 000011FE EA019D039B02B002 <2> dw MN_FADD, MN_FMUL, MN_FCOM, MN_FCOMP ; 188 3231 00001206 36044A04DD02F102 <2> dw MN_FSUB, MN_FSUBR, MN_FDIV, MN_FDIVR ; 18C 3232 0000120E EA019D0300000000 <2> dw MN_FADD, MN_FMUL, 0000h, 0000h ; 190 3233 00001216 4A043604F102DD02 <2> dw MN_FSUBR, MN_FSUB, MN_FDIVR, MN_FDIV ; 194 3234 0000121E 560300000D041204 <2> dw MN_FLD, 0000h, MN_FST, MN_FSTP ; 198 3235 00001226 290A0000380A2E04 <2> dw MN_FRSTOR_OSA, 0000h, MN_FNSAVE_OSA, MN_FNSTSW ; 19C 3236 0000122E 150300000D041204 <2> dw MN_FFREE, 0000h, MN_FST, MN_FSTP ; 1A0 3237 00001236 67347F3400000000 <2> dw P386 + MN_FUCOM, P386 + MN_FUCOMP, 0000h, 0000h ; 1A4 3238 0000123E F701AA031C032303 <2> dw MN_FIADD, MN_FIMUL, MN_FICOM, MN_FICOMP ; 1A8 3239 00001246 43045904EA020003 <2> dw MN_FISUB, MN_FISUBR, MN_FIDIV, MN_FIDIVR ; 1AC 3240 0000124E F001A30300004003 <2> dw MN_FADDP, MN_FMULP, 0000h, 0340h ; 1B0 3241 00001256 51043C04F802E302 <2> dw MN_FSUBRP, MN_FSUBP, MN_FDIVRP, MN_FDIVP ; 1B4 3242 0000125E 2B03000049034F03 <2> dw MN_FILD, 0000h, MN_FIST, MN_FISTP ; 1B8 3243 00001266 FE012B0304024F03 <2> dw MN_FBLD, MN_FILD, MN_FBSTP, MN_FISTP ; 1BC 3244 0000126E 0000000000000000 <2> dw 0000h, 0000h, 0000h, 0000h ; 1C0 3245 00001276 48037664A8620000 <2> dw 0348h, P686 + MN_FUCOMIP, P686 + MN_FCOMIP, 0000h ; 1C4 3246 0000127E 5B03610369037103 <2> dw MN_FLD1, MN_FLDL2T, MN_FLDL2E, MN_FLDPI ; 1C8 3247 00001286 7803800388030000 <2> dw MN_FLDLG2, MN_FLDLN2, MN_FLDZ, 0000h ; 1CC 3248 0000128E DD01AC04CE03B703 <2> dw MN_F2XM1, MN_FYL2X, MN_FPTAN, MN_FPATAN ; 1D0 3249 00001296 A304C633C5023103 <2> dw MN_FXTRACT, P386 + MN_FPREM1, MN_FDECSTP, MN_FINCSTP ; 1D4 3250 0000129E BF03B3040604FD33 <2> dw MN_FPREM, MN_FYL2XP1, MN_FSQRT, P386 + MN_FSINCOS ; 1D8 3251 000012A6 D503DE03F733BF32 <2> dw MN_FRNDINT, MN_FSCALE, P386 + MN_FSIN, P386 + MN_FCOS ; 1DC 3252 <2> ;--- The rest of these are squeezed. 3253 000012AE 000038014001BE25 <2> dw 0, 0138h, 0140h, P286 + MN_LAR ; 00 3254 000012B6 2A2691200845C949 <2> dw P286 + MN_LSL, P286 + MN_CLTS, P486 + MN_INVD, P486 + MN_WBINVD ; 04 3255 000012BE B219343634363436 <2> dw P186 + MN_UD2, P386 + MN_MOV, P386 + MN_MOV, P386 + MN_MOV ; 08 3256 000012C6 343634363436D159 <2> dw P386 + MN_MOV, P386 + MN_MOV, P386 + MN_MOV, P586 + MN_WRMSR ; 0C 3257 000012CE 16580F585A613A61 <2> dw P586 + MN_RDTSC, P586 + MN_RDMSR, P686 + MN_CMOVO, P686 + MN_CMOVNO ; 10 3258 000012D6 AB60A3607F615261 <2> dw P686 + MN_CMOVB, P686 + MN_CMOVAE, P686 + MN_CMOVZ, P686 + MN_CMOVNZ ; 14 3259 000012DE B2609C6078614A61 <2> dw P686 + MN_CMOVBE, P686 + MN_CMOVA, P686 + MN_CMOVS, P686 + MN_CMOVNS ; 18 3260 000012E6 68617061D760CF60 <2> dw P686 + MN_CMOVPE, P686 + MN_CMOVPO, P686 + MN_CMOVL, P686 + MN_CMOVGE ; 1C 3261 000012EE DE60C8608B579657 <2> dw P686 + MN_CMOVLE, P686 + MN_CMOVG, P586 + MN_PUNPCKLBW, P586 + MN_PUNPCKLWD ; 20 3262 000012F6 A1574F56C256CB56 <2> dw P586 + MN_PUNPCKLDQ, P586 + MN_PACKSSWB, P586 + MN_PCMPGTB, P586 + MN_PCMPGTW ; 24 3263 000012FE D45659566A577557 <2> dw P586 + MN_PCMPGTD, P586 + MN_PACKUSWB, P586 + MN_PUNPCKHBW, P586 + MN_PUNPCKHWD ; 28 3264 00001306 8057455639563F56 <2> dw P586 + MN_PUNPCKHDQ, P586 + MN_PACKSSDW, P586 + MN_MOVD, P586 + MN_MOVQ ; 2C 3265 0000130E 080310031803A756 <2> dw 0308h, 0310h, 0318h, P586 + MN_PCMPEQB ; 30 3266 00001316 B056B956D7513956 <2> dw P586 + MN_PCMPEQW, P586 + MN_PCMPEQD, P586 + MN_EMMS, P586 + MN_MOVD ; 34 3267 0000131E 3F56993585351F35 <2> dw P586 + MN_MOVQ, P386 + MN_JO, P386 + MN_JNO, P386 + MN_JB ; 38 3268 00001326 1A35AF3594352335 <2> dw P386 + MN_JAE, P386 + MN_JZ, P386 + MN_JNZ, P386 + MN_JBE ; 3C 3269 0000132E 1635AB358F35A135 <2> dw P386 + MN_JA, P386 + MN_JS, P386 + MN_JNS, P386 + MN_JPE ; 40 3270 00001336 A635463541354A35 <2> dw P386 + MN_JPO, P386 + MN_JL, P386 + MN_JGE, P386 + MN_JLE ; 44 3271 0000133E 3D352A390E399138 <2> dw P386 + MN_JG, P386 + MN_SETO, P386 + MN_SETNO, P386 + MN_SETB ; 48 3272 00001346 8A384A3923399738 <2> dw P386 + MN_SETAE, P386 + MN_SETZ, P386 + MN_SETNZ, P386 + MN_SETBE ; 4C 3273 0000134E 843844391C393639 <2> dw P386 + MN_SETA, P386 + MN_SETS, P386 + MN_SETNS, P386 + MN_SETPE ; 50 3274 00001356 3D39B738B038BD38 <2> dw P386 + MN_SETPO, P386 + MN_SETL, P386 + MN_SETGE, P386 + MN_SETLE ; 54 3275 0000135E AA38F537F037A651 <2> dw P386 + MN_SETG, P386 + MN_PUSH, P386 + MN_POP, P586 + MN_CPUID ; 58 3276 00001366 5E305C395C39F537 <2> dw P386 + MN_BT, P386 + MN_SHLD, P386 + MN_SHLD, P386 + MN_PUSH ; 5C 3277 0000136E F0373C586C306239 <2> dw P386 + MN_POP, P586 + MN_RSM, P386 + MN_BTS, P386 + MN_SHRD ; 60 3278 00001376 6239C73492419241 <2> dw P386 + MN_SHRD, P386 + MN_IMUL, P486 + MN_CMPXCHG, P486 + MN_CMPXCHG ; 64 3279 0000137E C8356730D235D735 <2> dw P386 + MN_LSS, P386 + MN_BTR, P386 + MN_LFS, P386 + MN_LGS ; 68 3280 00001386 C037C037AD19E802 <2> dw P386 + MN_MOVZX, P386 + MN_MOVZX, P186 + MN_UD1, 02E8h ; 6C 3281 0000138E 62304D305230B937 <2> dw P386 + MN_BTC, P386 + MN_BSF, P386 + MN_BSR, P386 + MN_MOVSX ; 70 3282 00001396 B937D849D849F002 <2> dw P386 + MN_MOVSX, P486 + MN_XADD, P486 + MN_XADD, 02F0h ; 74 3283 0000139E 5740574057405740 <2> dw P486 + MN_BSWAP, P486 + MN_BSWAP, P486 + MN_BSWAP, P486 + MN_BSWAP ; 78 3284 000013A6 5740574057405740 <2> dw P486 + MN_BSWAP, P486 + MN_BSWAP, P486 + MN_BSWAP, P486 + MN_BSWAP ; 7C 3285 000013AE 1E5725572C57EE56 <2> dw P586 + MN_PSRLW, P586 + MN_PSRLD, P586 + MN_PSRLQ, P586 + MN_PMULLW ; 80 3286 000013B6 585761579A568856 <2> dw P586 + MN_PSUBUSB, P586 + MN_PSUBUSW, P586 + MN_PAND, P586 + MN_PADDUSB ; 84 3287 000013BE 9156A05610571757 <2> dw P586 + MN_PADDUSW, P586 + MN_PANDN, P586 + MN_PSRAW, P586 + MN_PSRAD ; 88 3288 000013C6 E65648575057F656 <2> dw P586 + MN_PMULHW, P586 + MN_PSUBSB, P586 + MN_PSUBSW, P586 + MN_POR ; 8C 3289 000013CE 78568056AC57FB56 <2> dw P586 + MN_PADDSB, P586 + MN_PADDSW, P586 + MN_PXOR, P586 + MN_PSLLW ; 90 3290 000013D6 02570957DD563357 <2> dw P586 + MN_PSLLD, P586 + MN_PSLLQ, P586 + MN_PMADDWD, P586 + MN_PSUBB ; 94 3291 000013DE 3A57415763566A56 <2> dw P586 + MN_PSUBW, P586 + MN_PSUBD, P586 + MN_PADDB, P586 + MN_PADDW ; 98 3292 000013E6 7156A819D104C901 <2> dw P586 + MN_PADDD, P186 + MN_UD0, MN_INC, MN_DEC ; 9C 3293 000013EE 16005E306C306730 <2> dw MN_BOXCB, P386 + MN_BT, P386 + MN_BTS, P386 + MN_BTR ; A0 3294 000013F6 62309B51F0073406 <2> dw P386 + MN_BTC, P586 + MN_CMPXCHG8B, MN_POP, MN_MOV ; A4 3295 000013FE 1E571057FB562557 <2> dw P586 + MN_PSRLW, P586 + MN_PSRAW, P586 + MN_PSLLW, P586 + MN_PSRLD ; A8 3296 00001406 175702572C570957 <2> dw P586 + MN_PSRAD, P586 + MN_PSLLD, P586 + MN_PSRLQ, P586 + MN_PSLLQ ; AC 3297 0000140E B1030B02E4016104 <2> dw MN_FNOP, MN_FCHS, MN_FABS, MN_FTST ; B0 3298 00001416 970487340E03D502 <2> dw MN_FXAM, P386 + MN_FUCOMPP, MN_FNENI, MN_FNDISI ; B4 3299 0000141E 18024103EE23B702 <2> dw MN_FNCLEX, MN_FNINIT, P286 + MN_FNSETPM, MN_FCOMPP ; B8 3300 00001426 2E04 <2> dw MN_FNSTSW 3301 <2> 3302 <2> ;--- Disassembler: table converts unsqueezed numbers to squeezed. 3303 <2> 3304 <2> align 8, db 0 3305 <2> sqztab label byte 3306 00001428 0102030400000500 <2> db 1, 2, 3, 4, 0, 0, 5, 0 ; 1E0 3307 00001430 0607000800000000 <2> db 6, 7, 0, 8, 0, 0, 0, 0 ; 1E8 3308 00001438 0000000000000000 <2> db 0, 0, 0, 0, 0, 0, 0, 0 ; 1F0 3309 00001440 0000000000000000 <2> db 0, 0, 0, 0, 0, 0, 0, 0 ; 1F8 3310 00001448 090A0B0C0D000E00 <2> db 9, 10, 11, 12, 13, 0, 14, 0 ; 200 3311 00001450 0000000000000000 <2> db 0, 0, 0, 0, 0, 0, 0, 0 ; 208 3312 00001458 0F10110000000000 <2> db 15, 16, 17, 0, 0, 0, 0, 0 ; 210 3313 00001460 0000000000000000 <2> db 0, 0, 0, 0, 0, 0, 0, 0 ; 218 3314 00001468 1213141516171819 <2> db 18, 19, 20, 21, 22, 23, 24, 25 ; 220 3315 00001470 1A1B1C1D1E1F2021 <2> db 26, 27, 28, 29, 30, 31, 32, 33 ; 228 3316 00001478 0000000000000000 <2> db 0, 0, 0, 0, 0, 0, 0, 0 ; 230 3317 00001480 0000000000000000 <2> db 0, 0, 0, 0, 0, 0, 0, 0 ; 238 3318 00001488 2223242526272829 <2> db 34, 35, 36, 37, 38, 39, 40, 41 ; 240 3319 00001490 2A2B2C2D00002E2F <2> db 42, 43, 44, 45, 0, 0, 46, 47 ; 248 3320 00001498 0030313233343536 <2> db 0, 48, 49, 50, 51, 52, 53, 54 ; 250 3321 000014A0 0000000000003738 <2> db 0, 0, 0, 0, 0, 0, 55, 56 ; 258 3322 000014A8 393A3B3C3D3E3F40 <2> db 57, 58, 59, 60, 61, 62, 63, 64 ; 260 3323 000014B0 4142434445464748 <2> db 65, 66, 67, 68, 69, 70, 71, 72 ; 268 3324 000014B8 494A4B4C4D4E4F50 <2> db 73, 74, 75, 76, 77, 78, 79, 80 ; 270 3325 000014C0 5152535455565758 <2> db 81, 82, 83, 84, 85, 86, 87, 88 ; 278 3326 000014C8 595A5B5C5D5E0000 <2> db 89, 90, 91, 92, 93, 94, 0, 0 ; 280 3327 000014D0 5F60616263640065 <2> db 95, 96, 97, 98, 99,100, 0,101 ; 288 3328 000014D8 666768696A6B6C6D <2> db 102,103,104,105,106,107,108,109 ; 290 3329 000014E0 006E6F7071727374 <2> db 0,110,111,112,113,114,115,116 ; 298 3330 000014E8 7576000000000077 <2> db 117,118, 0, 0, 0, 0, 0,119 ; 2A0 3331 000014F0 78797A7B7C7D7E7F <2> db 120,121,122,123,124,125,126,127 ; 2A8 3332 000014F8 0080818200830000 <2> db 0,128,129,130, 0,131, 0, 0 ; 2B0 3333 00001500 8485008687880089 <2> db 132,133, 0,134,135,136, 0,137 ; 2B8 3334 00001508 008A8B00008C0000 <2> db 0,138,139, 0, 0,140, 0, 0 ; 2C0 3335 00001510 8D8E008F90910092 <2> db 141,142, 0,143,144,145, 0,146 ; 2C8 3336 00001518 0093949500960000 <2> db 0,147,148,149, 0,150, 0, 0 ; 2D0 3337 00001520 979899009A9B9C9D <2> db 151,152,153, 0,154,155,156,157 ; 2D8 3338 00001528 9E9F0000000000A0 <2> db 158,159, 0, 0, 0, 0, 0,160 ; 2E0 3339 00001530 00000000A1A2A3A4 <2> db 0, 0, 0, 0,161,162,163,164 ; 2E8 3340 00001538 00A5000000000000 <2> db 0,165, 0, 0, 0, 0, 0, 0 ; 2F0 3341 00001540 A600000000000000 <2> db 166, 0, 0, 0, 0, 0, 0, 0 ; 2F8 3342 00001548 A700000000000000 <2> db 167, 0, 0, 0, 0, 0, 0, 0 ; 300 3343 00001550 0000A800A900AA00 <2> db 0, 0,168, 0,169, 0,170, 0 ; 308 3344 00001558 0000AB00AC00AD00 <2> db 0, 0,171, 0,172, 0,173, 0 ; 310 3345 00001560 0000AE000000AF00 <2> db 0, 0,174, 0, 0, 0,175, 0 ; 318 3346 00001568 B000000000000000 <2> db 176, 0, 0, 0, 0, 0, 0, 0 ; 320 3347 00001570 B1B20000B3B40000 <2> db 177,178, 0, 0,179,180, 0, 0 ; 328 3348 00001578 00B5000000000000 <2> db 0,181, 0, 0, 0, 0, 0, 0 ; 330 3349 00001580 B6B7B8B9BA000000 <2> db 182,183,184,185,186, 0, 0, 0 ; 338 3350 00001588 00BB000000000000 <2> db 0,187, 0, 0, 0, 0, 0, 0 ; 340 3351 00001590 BC00000000000000 <2> db 188, 0, 0, 0, 0, 0, 0, 0 ; 348 3352 <2> 3353 <2> ;--- Disassembler: table of mnemonics that change in the presence of a WAIT 3354 <2> ;--- instruction. 3355 <2> 3356 <2> align 2, db 0 3357 <2> wtab1 label word 3358 00001598 3A03390338033B035D- <2> dw 033Ah,0339h,0338h,033Bh,015Dh,019Eh,033Ch,015Fh 3358 000015A1 019E013C035F01 <2> 3359 000015A8 5E0148039F01 <2> dw 015Eh,0348h,019Fh 3360 <2> wtab2 label word 3361 000015AE 1102 <2> dw MN_FCLEX 3362 000015B0 CE02 <2> dw MN_FDISI 3363 000015B2 0803 <2> dw MN_FENI 3364 000015B4 3A03 <2> dw MN_FINIT 3365 000015B6 8E03 <2> dw MN_FLDCW 3366 000015B8 310A <2> dw MN_FSAVE_OSA 3367 000015BA E603 <2> dw MN_FSETPM 3368 000015BC 1804 <2> dw MN_FSTCW 3369 000015BE 400A <2> dw MN_FSTENV_OSA 3370 000015C0 2704 <2> dw MN_FSTSW 3371 000015C2 2704 <2> dw MN_FSTSW 3372 <2> N_WTAB equ ($ - wtab2) / 2 3373 <2> 3374 <2> ;--- Disassembler: table for operands which have a different mnemonic for 3375 <2> ;--- their 32 bit versions (66h prefix). 3376 <2> 3377 <2> align 2, db 0 3378 <2> ltabo1 label word 3379 000015C4 98009900 <2> dw 098h,099h 3380 <2> ltabo2 label word 3381 000015C8 7C00 <2> dw MN_CWDE 3382 000015CA B201 <2> dw MN_CDQ 3383 <2> N_LTABO equ ($ - ltabo2) / 2 3384 <2> 3385 <2> ;--- Disassembler: table for operands which have a different mnemonic for 3386 <2> ;--- their 32 bit versions (67h prefix). 3387 <2> 3388 <2> align 2, db 0 3389 <2> ltaba1 label word 3390 000015CC E300 <2> dw 0E3h 3391 <2> ltaba2 label word 3392 000015CE 3205 <2> dw MN_JECXZ 3393 <2> N_LTABA equ ($ - ltaba2) / 2 3394 <2> 3395 <2> ;--- Disassembler: table of lockable instructions 3396 <2> 3397 <2> align 2, db 0 3398 <2> locktab label word 3399 000015D0 0A0102011000110008- <2> dw 010Ah,0102h,010h,011h,0108h,0100h,00h,01h 3399 000015D9 01000100000100 <2> 3400 000015E0 0C010401200021009B- <2> dw 010Ch,0104h,020h,021h,029Bh,02EFh,0293h,02EEh 3400 000015E9 02EF029302EE02 <2> 3401 000015F0 8B02ED0290029102E1- <2> dw 028Bh,02EDh,0290h,0291h,02E1h,0131h,02E0h,0130h 3401 000015F9 023101E0023001 <2> 3402 00001600 2B012A010901010108- <2> dw 012Bh,012Ah,0109h,0101h,08h,09h,010Bh,0103h 3402 00001609 0009000B010301 <2> 3403 00001610 180019000D01050128- <2> dw 018h,019h,010Dh,0105h,028h,029h,02A0h,02A1h 3403 00001619 002900A002A102 <2> 3404 00001620 860087000E01060130- <2> dw 086h,087h,010Eh,0106h,030h,031h 3404 00001629 003100 <2> 3405 <2> N_LOCK equ ($ - locktab) / 2 3406 <2> 3407 <2> ;--- Equates used in the assembly-language code. 3408 <2> 3409 <2> SPARSE_BASE equ 01E0h 3410 <2> SFPGROUP3 equ 0338h 3411 <2> GROUP7 equ 0130h 1430 <1> [list +] 1431 <1> opindex: 1432 <1> [list -] 1449 0000162C 01 <2> db %$index 1450 <2> [list -] 1449 0000162D 00 <2> db %$index 1450 <2> [list -] 1449 0000162E 01 <2> db %$index 1450 <2> [list -] 1449 0000162F 03 <2> db %$index 1450 <2> [list -] 1449 00001630 05 <2> db %$index 1450 <2> [list -] 1449 00001631 07 <2> db %$index 1450 <2> [list -] 1449 00001632 09 <2> db %$index 1450 <2> [list -] 1449 00001633 0B <2> db %$index 1450 <2> [list -] 1449 00001634 0D <2> db %$index 1450 <2> [list -] 1449 00001635 0F <2> db %$index 1450 <2> [list -] 1449 00001636 11 <2> db %$index 1450 <2> [list -] 1449 00001637 10 <2> db %$index 1450 <2> [list -] 1449 00001638 11 <2> db %$index 1450 <2> [list -] 1449 00001639 10 <2> db %$index 1450 <2> [list -] 1449 0000163A 11 <2> db %$index 1450 <2> [list -] 1449 0000163B 13 <2> db %$index 1450 <2> [list -] 1449 0000163C 16 <2> db %$index 1450 <2> [list -] 1449 0000163D 18 <2> db %$index 1450 <2> [list -] 1449 0000163E 18 <2> db %$index 1450 <2> [list -] 1449 0000163F 1A <2> db %$index 1450 <2> [list -] 1449 00001640 1C <2> db %$index 1450 <2> [list -] 1449 00001641 1C <2> db %$index 1450 <2> [list -] 1449 00001642 1C <2> db %$index 1450 <2> [list -] 1449 00001643 1E <2> db %$index 1450 <2> [list -] 1449 00001644 1D <2> db %$index 1450 <2> [list -] 1449 00001645 1E <2> db %$index 1450 <2> [list -] 1449 00001646 1D <2> db %$index 1450 <2> [list -] 1449 00001647 1E <2> db %$index 1450 <2> [list -] 1449 00001648 1D <2> db %$index 1450 <2> [list -] 1449 00001649 20 <2> db %$index 1450 <2> [list -] 1449 0000164A 21 <2> db %$index 1450 <2> [list -] 1449 0000164B 22 <2> db %$index 1450 <2> [list -] 1449 0000164C 23 <2> db %$index 1450 <2> [list -] 1449 0000164D 22 <2> db %$index 1450 <2> [list -] 1449 0000164E 22 <2> db %$index 1450 <2> [list -] 1449 0000164F 23 <2> db %$index 1450 <2> [list -] 1449 00001650 25 <2> db %$index 1450 <2> [list -] 1449 00001651 26 <2> db %$index 1450 <2> [list -] 1449 00001652 27 <2> db %$index 1450 <2> [list -] 1449 00001653 28 <2> db %$index 1450 <2> [list -] 1449 00001654 29 <2> db %$index 1450 <2> [list -] 1449 00001655 28 <2> db %$index 1450 <2> [list -] 1449 00001656 28 <2> db %$index 1450 <2> [list -] 1449 00001657 27 <2> db %$index 1450 <2> [list -] 1449 00001658 28 <2> db %$index 1450 <2> [list -] 1449 00001659 29 <2> db %$index 1450 <2> [list -] 1449 0000165A 2A <2> db %$index 1450 <2> [list -] 1449 0000165B 2B <2> db %$index 1450 <2> [list -] 1449 0000165C 2C <2> db %$index 1450 <2> [list -] 1449 0000165D 2D <2> db %$index 1450 <2> [list -] 1449 0000165E 2E <2> db %$index 1450 <2> [list -] 1449 0000165F 2F <2> db %$index 1450 <2> [list -] 1449 00001660 2E <2> db %$index 1450 <2> [list -] 1449 00001661 2E <2> db %$index 1450 <2> [list -] 1449 00001662 2F <2> db %$index 1450 <2> [list -] 1449 00001663 2F <2> db %$index 1450 <2> [list -] 1449 00001664 32 <2> db %$index 1450 <2> [list -] 1449 00001665 34 <2> db %$index 1450 <2> [list -] 1449 00001666 37 <2> db %$index 1450 <2> [list -] 1449 00001667 39 <2> db %$index 1450 <2> [list -] 1449 00001668 3A <2> db %$index 1450 <2> [list -] 1449 00001669 3B <2> db %$index 1450 <2> [list -] 1449 0000166A 3C <2> db %$index 1450 <2> [list -] 1449 0000166B 3D <2> db %$index 1450 <2> [list -] 1449 0000166C 3F <2> db %$index 1450 <2> [list -] 1449 0000166D 40 <2> db %$index 1450 <2> [list -] 1449 0000166E 42 <2> db %$index 1450 <2> [list -] 1449 0000166F 44 <2> db %$index 1450 <2> [list -] 1449 00001670 46 <2> db %$index 1450 <2> [list -] 1449 00001671 48 <2> db %$index 1450 <2> [list -] 1449 00001672 49 <2> db %$index 1450 <2> [list -] 1449 00001673 4A <2> db %$index 1450 <2> [list -] 1449 00001674 4D <2> db %$index 1450 <2> [list -] 1449 00001675 4D <2> db %$index 1450 <2> [list -] 1449 00001676 4E <2> db %$index 1450 <2> [list -] 1449 00001677 4F <2> db %$index 1450 <2> [list -] 1449 00001678 50 <2> db %$index 1450 <2> [list -] 1449 00001679 4F <2> db %$index 1450 <2> [list -] 1449 0000167A 50 <2> db %$index 1450 <2> [list -] 1449 0000167B 52 <2> db %$index 1450 <2> [list -] 1449 0000167C 54 <2> db %$index 1450 <2> [list -] 1449 0000167D 56 <2> db %$index 1450 <2> [list -] 1449 0000167E 58 <2> db %$index 1450 <2> [list -] 1449 0000167F 5A <2> db %$index 1450 <2> [list -] 1449 00001680 59 <2> db %$index 1450 <2> [list -] 1449 00001681 59 <2> db %$index 1450 <2> [list -] 1449 00001682 5A <2> db %$index 1450 <2> [list -] 1449 00001683 5B <2> db %$index 1450 <2> [list -] 1449 00001684 5E <2> db %$index 1450 <2> [list -] 1449 00001685 61 <2> db %$index 1450 <2> [list -] 1449 00001686 62 <2> db %$index 1450 <2> [list -] 1449 00001687 63 <2> db %$index 1450 <2> [list -] 1449 00001688 62 <2> db %$index 1450 <2> [list -] 1449 00001689 62 <2> db %$index 1450 <2> [list -] 1449 0000168A 61 <2> db %$index 1450 <2> [list -] 1449 0000168B 61 <2> db %$index 1450 <2> [list -] 1449 0000168C 60 <2> db %$index 1450 <2> [list -] 1449 0000168D 60 <2> db %$index 1450 <2> [list -] 1449 0000168E 5F <2> db %$index 1450 <2> [list -] 1449 0000168F 5F <2> db %$index 1450 <2> [list -] 1449 00001690 5E <2> db %$index 1450 <2> [list -] 1449 00001691 5E <2> db %$index 1450 <2> [list -] 1449 00001692 5D <2> db %$index 1450 <2> [list -] 1449 00001693 5D <2> db %$index 1450 <2> [list -] 1449 00001694 5E <2> db %$index 1450 <2> [list -] 1449 00001695 5F <2> db %$index 1450 <2> [list -] 1449 00001696 60 <2> db %$index 1450 <2> [list -] 1449 00001697 61 <2> db %$index 1450 <2> [list -] 1449 00001698 62 <2> db %$index 1450 <2> [list -] 1449 00001699 63 <2> db %$index 1450 <2> [list -] 1449 0000169A 64 <2> db %$index 1450 <2> [list -] 1449 0000169B 65 <2> db %$index 1450 <2> [list -] 1449 0000169C 66 <2> db %$index 1450 <2> [list -] 1449 0000169D 67 <2> db %$index 1450 <2> [list -] 1449 0000169E 68 <2> db %$index 1450 <2> [list -] 1449 0000169F 6A <2> db %$index 1450 <2> [list -] 1449 000016A0 6C <2> db %$index 1450 <2> [list -] 1449 000016A1 6E <2> db %$index 1450 <2> [list -] 1449 000016A2 70 <2> db %$index 1450 <2> [list -] 1449 000016A3 71 <2> db %$index 1450 <2> [list -] 1449 000016A4 72 <2> db %$index 1450 <2> [list -] 1449 000016A5 71 <2> db %$index 1450 <2> [list -] 1449 000016A6 73 <2> db %$index 1450 <2> [list -] 1449 000016A7 76 <2> db %$index 1450 <2> [list -] 1449 000016A8 77 <2> db %$index 1450 <2> [list -] 1449 000016A9 79 <2> db %$index 1450 <2> [list -] 1449 000016AA 79 <2> db %$index 1450 <2> [list -] 1449 000016AB 79 <2> db %$index 1450 <2> [list -] 1450 ****************** <2> warning: Most assembler table prefix bytes: 1 (ofs 4h) mne BOXCB variant (240h + 0*8 + 7),84,, [-w+user] 1514 <1> 1515 <1> usesection lDEBUG_DATA_ENTRY 1071 1072 1073 usesection lDEBUG_DATA_ENTRY 1074 1075 msg_start: 1076 %include "msg.asm" 1077 <1> 1078 <1> %if 0 1079 <1> 1080 <1> lDebug messages 1081 <1> 1082 <1> Copyright (C) 1995-2003 Paul Vojta 1083 <1> Copyright (C) 2008-2012 C. Masloch 1084 <1> 1085 <1> Usage of the works is permitted provided that this 1086 <1> instrument is retained with the works, so that any entity 1087 <1> that uses the works is notified of this instrument. 1088 <1> 1089 <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 1090 <1> 1091 <1> %endif 1092 <1> 1093 <1> 1094 <1> usesection lDEBUG_DATA_ENTRY 1095 <1> 1096 <1> msg: 1097 <1> .help: 1098 00001140 6C4465627567582028- <1> db _PROGNAME,_VERSION," help screen",13,10 1098 00001149 323032322D30352D30- <1> 1098 00001152 33292068656C702073- <1> 1098 0000115B 637265656E0D0A <1> 1099 00001162 617373656D626C6509- <1> db "assemble",9, "A [address]",13,10 1099 0000116B 41205B616464726573- <1> 1099 00001174 735D0D0A <1> 1100 <1> %if 0 1101 <1> db "set option bits",9, "BS value",13,10 1102 <1> db "unset opt bits",9, "BU value",13,10 1103 <1> db "reset opt bits",9, "BR value",13,10 1104 <1> %endif 1105 <1> %if _BREAKPOINTS 1106 00001178 73657420627265616B- <1> db "set breakpoint",9, "BP index|AT|NEW address [[NUMBER=]number] [WHEN=cond] [ID=id]",13,10 1106 00001181 706F696E7409425020- <1> 1106 0000118A 696E6465787C41547C- <1> 1106 00001193 4E4557206164647265- <1> 1106 0000119C 7373205B5B4E554D42- <1> 1106 000011A5 45523D5D6E756D6265- <1> 1106 000011AE 725D205B5748454E3D- <1> 1106 000011B7 636F6E645D205B4944- <1> 1106 000011C0 3D69645D0D0A <1> 1107 000011C6 207365742049440909- <1> db " set ID",9,9, "BI index|AT address [ID=]id",13,10 1107 000011CF 424920696E6465787C- <1> 1107 000011D8 415420616464726573- <1> 1107 000011E1 73205B49443D5D6964- <1> 1107 000011EA 0D0A <1> 1108 000011EC 2073657420636F6E64- <1> db " set condition",9, "BW index|AT address [WHEN=]cond",13,10 1108 000011F5 6974696F6E09425720- <1> 1108 000011FE 696E6465787C415420- <1> 1108 00001207 61646472657373205B- <1> 1108 00001210 5748454E3D5D636F6E- <1> 1108 00001219 640D0A <1> 1109 0000121C 20736574206F666673- <1> db " set offset",9, "BO index|AT address [OFFSET=]number",13,10 1109 00001225 657409424F20696E64- <1> 1109 0000122E 65787C415420616464- <1> 1109 00001237 72657373205B4F4646- <1> 1109 00001240 5345543D5D6E756D62- <1> 1109 00001249 65720D0A <1> 1110 0000124D 20736574206E756D62- <1> db " set number",9, "BN index|AT address|ALL number",13,10 1110 00001256 657209424E20696E64- <1> 1110 0000125F 65787C415420616464- <1> 1110 00001268 726573737C414C4C20- <1> 1110 00001271 6E756D6265720D0A <1> 1111 00001279 20636C656172090942- <1> db " clear",9,9, "BC index|AT address|ALL",13,10 1111 00001282 4320696E6465787C41- <1> 1111 0000128B 542061646472657373- <1> 1111 00001294 7C414C4C0D0A <1> 1112 0000129A 2064697361626C6509- <1> db " disable",9, "BD index|AT address|ALL",13,10 1112 000012A3 424420696E6465787C- <1> 1112 000012AC 415420616464726573- <1> 1112 000012B5 737C414C4C0D0A <1> 1113 000012BC 20656E61626C650909- <1> db " enable",9,9, "BE index|AT address|ALL",13,10 1113 000012C5 424520696E6465787C- <1> 1113 000012CE 415420616464726573- <1> 1113 000012D7 737C414C4C0D0A <1> 1114 000012DE 20746F67676C650909- <1> db " toggle",9,9, "BT index|AT address|ALL",13,10 1114 000012E7 425420696E6465787C- <1> 1114 000012F0 415420616464726573- <1> 1114 000012F9 737C414C4C0D0A <1> 1115 00001300 206C6973740909424C- <1> db " list",9,9, "BL [index|AT address|ALL]",13,10 1115 00001309 205B696E6465787C41- <1> 1115 00001312 542061646472657373- <1> 1115 0000131B 7C414C4C5D0D0A <1> 1116 <1> %endif 1117 <1> %if _DEBUG 1118 <1> db "break upwards",9, "BU",13,10 1119 <1> %endif 1120 00001322 636F6D706172650909- <1> db "compare",9,9, "C range address",13,10 1120 0000132B 432072616E67652061- <1> 1120 00001334 6464726573730D0A <1> 1121 0000133C 64756D70090944205B- <1> db "dump",9,9, "D [range]",13,10 1121 00001345 72616E67655D0D0A <1> 1122 0000134D 64756D702062797465- <1> db "dump bytes",9, "DB [range]",13,10 1122 00001356 73094442205B72616E- <1> 1122 0000135F 67655D0D0A <1> 1123 00001364 64756D7020776F7264- <1> db "dump words",9, "DW [range]",13,10 1123 0000136D 73094457205B72616E- <1> 1123 00001376 67655D0D0A <1> 1124 0000137B 64756D702064776F72- <1> db "dump dwords",9, "DD [range]",13,10 1124 00001384 6473094444205B7261- <1> 1124 0000138D 6E67655D0D0A <1> 1125 <1> %if _INT 1126 00001393 64756D7020696E7465- <1> db "dump interrupts",9, "DI[R][M][L] interrupt [count]",13,10 1126 0000139C 727275707473094449- <1> 1126 000013A5 5B525D5B4D5D5B4C5D- <1> 1126 000013AE 20696E746572727570- <1> 1126 000013B7 74205B636F756E745D- <1> 1126 000013C0 0D0A <1> 1127 <1> %endif 1128 <1> %if _PM 1129 000013C2 64756D70204C445409- <1> db "dump LDT",9, "DL selector [count]",13,10 1129 000013CB 444C2073656C656374- <1> 1129 000013D4 6F72205B636F756E74- <1> 1129 000013DD 5D0D0A <1> 1130 <1> %endif 1131 <1> %if _MCB 1132 000013E0 64756D70204D434220- <1> db "dump MCB chain",9, "DM [segment]",13,10 1132 000013E9 636861696E09444D20- <1> 1132 000013F2 5B7365676D656E745D- <1> 1132 000013FB 0D0A <1> 1133 <1> ;db "dump S/SD MCBs",9, "DS",13,10 1134 <1> %endif 1135 <1> %if _DSTRINGS 1136 000013FD 646973706C61792073- <1> db "display strings",9, "DZ/D$/D[W]# [address]",13,10 1136 00001406 7472696E677309445A- <1> 1136 0000140F 2F44242F445B575D23- <1> 1136 00001418 205B61646472657373- <1> 1136 00001421 5D0D0A <1> 1137 <1> %endif 1138 <1> %if _PM 1139 00001424 64756D702065787420- <1> db "dump ext memory",9, "DX physical_address",13,10 1139 0000142D 6D656D6F7279094458- <1> 1139 00001436 20706879736963616C- <1> 1139 0000143F 5F616464726573730D- <1> 1139 00001448 0A <1> 1140 <1> %endif 1141 00001449 656E74657209094520- <1> db "enter",9,9, "E address [list]",13,10 1141 00001452 61646472657373205B- <1> 1141 0000145B 6C6973745D0D0A <1> 1142 00001462 66696C6C0909462072- <1> db "fill",9,9, "F range [RANGE range|list]",13,10 1142 0000146B 616E6765205B52414E- <1> 1142 00001474 47452072616E67657C- <1> 1142 0000147D 6C6973745D0D0A <1> 1143 00001484 676F090947205B3D61- <1> db "go",9,9, "G [=address] [breakpts]",13,10 1143 0000148D 6464726573735D205B- <1> 1143 00001496 627265616B7074735D- <1> 1143 0000149F 0D0A <1> 1144 000014A1 676F746F0909474F54- <1> db "goto",9,9, "GOTO :label",13,10 1144 000014AA 4F203A6C6162656C0D- <1> 1144 000014B3 0A <1> 1145 000014B4 686578206164642F73- <1> db "hex add/sub",9, "H value1 [value2 [...]]",13,10 1145 000014BD 756209482076616C75- <1> 1145 000014C6 6531205B76616C7565- <1> 1145 000014CF 32205B2E2E2E5D5D0D- <1> 1145 000014D8 0A <1> 1146 000014D9 626173652064697370- <1> db "base display",9, "H BASE=number [GROUP=number] [WIDTH=number] value",13,10 1146 000014E2 6C6179094820424153- <1> 1146 000014EB 453D6E756D62657220- <1> 1146 000014F4 5B47524F55503D6E75- <1> 1146 000014FD 6D6265725D205B5749- <1> 1146 00001506 4454483D6E756D6265- <1> 1146 0000150F 725D2076616C75650D- <1> 1146 00001518 0A <1> 1147 00001519 696E7075740909495B- <1> db "input",9,9, "I[W|D] port",13,10 1147 00001522 577C445D20706F7274- <1> 1147 0000152B 0D0A <1> 1148 0000152D 6966206E756D657269- <1> db "if numeric",9, "IF [NOT] (cond) THEN cmd",13,10 1148 00001536 63094946205B4E4F54- <1> 1148 0000153F 5D2028636F6E642920- <1> 1148 00001548 5448454E20636D640D- <1> 1148 00001551 0A <1> 1149 00001552 696620736372697074- <1> db "if script file",9, "IF [NOT] EXISTS Y file [:label] THEN cmd",13,10 1149 0000155B 2066696C6509494620- <1> 1149 00001564 5B4E4F545D20455849- <1> 1149 0000156D 53545320592066696C- <1> 1149 00001576 65205B3A6C6162656C- <1> 1149 0000157F 5D205448454E20636D- <1> 1149 00001588 640D0A <1> 1150 0000158B 6C6F61642070726F67- <1> db "load program",9, "L [address]",13,10 1150 00001594 72616D094C205B6164- <1> 1150 0000159D 64726573735D0D0A <1> 1151 000015A5 6C6F61642073656374- <1> db "load sectors",9, "L address drive sector count",13,10 1151 000015AE 6F7273094C20616464- <1> 1151 000015B7 726573732064726976- <1> 1151 000015C0 6520736563746F7220- <1> 1151 000015C9 636F756E740D0A <1> 1152 000015D0 6D6F766509094D2072- <1> db "move",9,9, "M range address",13,10 1152 000015D9 616E67652061646472- <1> 1152 000015E2 6573730D0A <1> 1153 000015E7 38307838362F783837- <1> db "80x86/x87 mode",9, "M [0..6|C|NC|C2|?]",13,10 1153 000015F0 206D6F6465094D205B- <1> 1153 000015F9 302E2E367C437C4E43- <1> 1153 00001602 7C43327C3F5D0D0A <1> 1154 0000160A 736574206E616D6509- <1> db "set name",9, "N [[drive:][path]progname.ext [parameters]]",13,10 1154 00001613 4E205B5B6472697665- <1> 1154 0000161C 3A5D5B706174685D70- <1> 1154 00001625 726F676E616D652E65- <1> 1154 0000162E 7874205B706172616D- <1> 1154 00001637 65746572735D5D0D0A <1> 1155 00001640 6F757470757409094F- <1> db "output",9,9, "O[W|D] port value",13,10 1155 00001649 5B577C445D20706F72- <1> 1155 00001652 742076616C75650D0A <1> 1156 0000165B 70726F636565640909- <1> db "proceed",9,9, "P [=address] [count [WHILE cond] [SILENT [count]]]",13,10 1156 00001664 50205B3D6164647265- <1> 1156 0000166D 73735D205B636F756E- <1> 1156 00001676 74205B5748494C4520- <1> 1156 0000167F 636F6E645D205B5349- <1> 1156 00001688 4C454E54205B636F75- <1> 1156 00001691 6E745D5D5D0D0A <1> 1157 00001698 717569740909510D0A <1> db "quit",9,9, "Q",13,10 1158 000016A1 717569742070726F63- <1> db "quit process",9, "QA",13,10 1158 000016AA 6573730951410D0A <1> 1159 000016B2 726567697374657209- <1> db "register",9, "R [register [value]]",13,10 1159 000016BB 52205B726567697374- <1> 1159 000016C4 6572205B76616C7565- <1> 1159 000016CD 5D5D0D0A <1> 1160 000016D1 52756E205220657874- <1> db "Run R extended",9, "RE",13,10 1160 000016DA 656E6465640952450D- <1> 1160 000016E3 0A <1> 1161 000016E4 524520636F6D6D616E- <1> db "RE commands",9, "RE.LIST|APPEND|REPLACE [commands]",13,10 1161 000016ED 64730952452E4C4953- <1> 1161 000016F6 547C415050454E447C- <1> 1161 000016FF 5245504C414345205B- <1> 1161 00001708 636F6D6D616E64735D- <1> 1161 00001711 0D0A <1> 1162 00001713 52756E20436F6D6D61- <1> db "Run Commandline",9, "RC",13,10 1162 0000171C 6E646C696E65095243- <1> 1162 00001725 0D0A <1> 1163 00001727 524320636F6D6D616E- <1> db "RC commands",9, "RC.LIST|APPEND|REPLACE [commands]",13,10 1163 00001730 64730952432E4C4953- <1> 1163 00001739 547C415050454E447C- <1> 1163 00001742 5245504C414345205B- <1> 1163 0000174B 636F6D6D616E64735D- <1> 1163 00001754 0D0A <1> 1164 <1> %if _MMXSUPP 1165 00001756 4D4D58207265676973- <1> db "MMX register",9, "RM",13,10 1165 0000175F 74657209524D0D0A <1> 1166 <1> %endif 1167 <1> %if _RN 1168 00001767 465055207265676973- <1> db "FPU register",9, "RN",13,10 1168 00001770 74657209524E0D0A <1> 1169 <1> %endif 1170 00001778 746F67676C65203338- <1> db "toggle 386 regs",9, "RX",13,10 1170 00001781 362072656773095258- <1> 1170 0000178A 0D0A <1> 1171 0000178C 736561726368090953- <1> db "search",9,9, "S range [REVERSE] [RANGE range|list]",13,10 1171 00001795 2072616E6765205B52- <1> 1171 0000179E 4556455253455D205B- <1> 1171 000017A7 52414E47452072616E- <1> 1171 000017B0 67657C6C6973745D0D- <1> 1171 000017B9 0A <1> 1172 000017BA 736C6565700909534C- <1> db "sleep",9,9, "SLEEP count [SECONDS|TICKS]",13,10 1172 000017C3 45455020636F756E74- <1> 1172 000017CC 205B5345434F4E4453- <1> 1172 000017D5 7C5449434B535D0D0A <1> 1173 000017DE 747261636509095420- <1> db "trace",9,9, "T [=address] [count [WHILE cond] [SILENT [count]]]",13,10 1173 000017E7 5B3D61646472657373- <1> 1173 000017F0 5D205B636F756E7420- <1> 1173 000017F9 5B5748494C4520636F- <1> 1173 00001802 6E645D205B53494C45- <1> 1173 0000180B 4E54205B636F756E74- <1> 1173 00001814 5D5D5D0D0A <1> 1174 00001819 747261636520286578- <1> db "trace (exc str)",9 1174 00001822 63207374722909 <1> 1175 00001829 5450205B3D61646472- <1> db "TP [=address] [count [WHILE cond] [SILENT [count]]]",13,10 1175 00001832 6573735D205B636F75- <1> 1175 0000183B 6E74205B5748494C45- <1> 1175 00001844 20636F6E645D205B53- <1> 1175 0000184D 494C454E54205B636F- <1> 1175 00001856 756E745D5D5D0D0A <1> 1176 0000185E 7472616365206D6F64- <1> db "trace mode",9, "TM [0|1]",13,10 1176 00001867 6509544D205B307C31- <1> 1176 00001870 5D0D0A <1> 1177 <1> %if _TSR 1178 00001873 656E74657220545352- <1> db "enter TSR mode",9, "TSR",13,10 1178 0000187C 206D6F646509545352- <1> 1178 00001885 0D0A <1> 1179 <1> %endif 1180 00001887 756E617373656D626C- <1> db "unassemble",9, "U [range]",13,10 1180 00001890 650955205B72616E67- <1> 1180 00001899 655D0D0A <1> 1181 0000189D 77726974652070726F- <1> db "write program",9, "W [address]",13,10 1181 000018A6 6772616D0957205B61- <1> 1181 000018AF 6464726573735D0D0A <1> 1182 000018B8 777269746520736563- <1> db "write sectors",9, "W address drive sector count",13,10 1182 000018C1 746F72730957206164- <1> 1182 000018CA 647265737320647269- <1> 1182 000018D3 766520736563746F72- <1> 1182 000018DC 20636F756E740D0A <1> 1183 <1> %if _EMS 1184 000018E4 657870616E64656420- <1> db "expanded mem",9, "XA/XD/XM/XR/XS, X? for help",13,10 1184 000018ED 6D656D0958412F5844- <1> 1184 000018F6 2F584D2F58522F5853- <1> 1184 000018FF 2C20583F20666F7220- <1> 1184 00001908 68656C700D0A <1> 1185 <1> %endif 1186 0000190E 72756E207363726970- <1> db "run script",9, "Y [partition/][scriptfile] [:label]",13,10 1186 00001917 740959205B70617274- <1> 1186 00001920 6974696F6E2F5D5B73- <1> 1186 00001929 637269707466696C65- <1> 1186 00001932 5D205B3A6C6162656C- <1> 1186 0000193B 5D0D0A <1> 1187 0000193E 0D0A <1> db 13,10 1188 00001940 4164646974696F6E61- <1> db "Additional help topics:",13,10 1188 00001949 6C2068656C7020746F- <1> 1188 00001952 706963733A0D0A <1> 1189 <1> %if _EXTHELP 1190 00001959 205265676973746572- <1> db " Registers",9, "?R",13,10 1190 00001962 73093F520D0A <1> 1191 00001968 20466C61677309093F- <1> db " Flags",9,9, "?F",13,10 1191 00001971 460D0A <1> 1192 <1> %if _COND 1193 00001974 20436F6E646974696F- <1> db " Conditionals",9, "?C",13,10 1193 0000197D 6E616C73093F430D0A <1> 1194 <1> %endif 1195 <1> %if _EXPRESSIONS 1196 00001986 204578707265737369- <1> db " Expressions",9, "?E",13,10 1196 0000198F 6F6E73093F450D0A <1> 1197 <1> %endif 1198 <1> %if _VARIABLES || _OPTIONS || _PSPVARIABLES 1199 00001997 205661726961626C65- <1> db " Variables",9, "?V",13,10 1199 000019A0 73093F560D0A <1> 1200 <1> %endif 1201 000019A6 205220457874656E64- <1> db " R Extended",9, "?RE",13,10 1201 000019AF 6564093F52450D0A <1> 1202 000019B7 2052756E206B657977- <1> db " Run keywords",9, "?RUN",13,10 1202 000019C0 6F726473093F52554E- <1> 1202 000019C9 0D0A <1> 1203 <1> %if _OPTIONS 1204 000019CB 204F7074696F6E7309- <1> db " Options",9, "?O",13,10 1204 000019D4 3F4F0D0A <1> 1205 <1> %endif 1206 <1> %if _BOOTLDR 1207 000019D8 20426F6F74206C6F61- <1> db " Boot loading",9, "?BOOT",13,10 1207 000019E1 64696E67093F424F4F- <1> 1207 000019EA 540D0A <1> 1208 <1> %endif 1209 <1> %endif 1210 000019ED 206C44656275672062- <1> db " lDebug build",9, "?BUILD",13,10 1210 000019F6 75696C64093F425549- <1> 1210 000019FF 4C440D0A <1> 1211 00001A03 206C44656275672062- <1> db " lDebug build",9, "?B",13,10 1211 00001A0C 75696C64093F420D0A <1> 1212 <1> %if _EXTHELP 1213 00001A15 206C44656275672073- <1> db " lDebug sources",9, "?SOURCE",13,10 1213 00001A1E 6F7572636573093F53- <1> 1213 00001A27 4F555243450D0A <1> 1214 00001A2E 206C4465627567206C- <1> db " lDebug license",9, "?L",13,10 1214 00001A37 6963656E7365093F4C- <1> 1214 00001A40 0D0A <1> 1215 <1> %endif 1216 <1> %if _PM 1217 00001A42 0D0A <1> db 13,10 1218 00001A44 50726F6D7074733A20- <1> db "Prompts: '-' = real or V86 mode; '#' = protected mode",13,10 1218 00001A4D 272D27203D20726561- <1> 1218 00001A56 6C206F722056383620- <1> 1218 00001A5F 6D6F64653B20272327- <1> 1218 00001A68 203D2070726F746563- <1> 1218 00001A71 746564206D6F64650D- <1> 1218 00001A7A 0A <1> 1219 <1> %endif 1220 00001A7B 00 <1> asciz 1221 <1> 1222 <1> %if _EXTHELP 1223 00001A7C 534F5552434500 <1> .source:asciz "SOURCE" 1224 <1> .help_source: 1225 00001A83 546865206F72696769- <1> db "The original lDebug sources can be obtained from the repo located at",13,10 1225 00001A8C 6E616C206C44656275- <1> 1225 00001A95 6720736F7572636573- <1> 1225 00001A9E 2063616E206265206F- <1> 1225 00001AA7 627461696E65642066- <1> 1225 00001AB0 726F6D207468652072- <1> 1225 00001AB9 65706F206C6F636174- <1> 1225 00001AC2 65642061740D0A <1> 1226 00001AC9 68747470733A2F2F68- <1> db "https://hg.pushbx.org/ecm/ldebug (E. C. Masloch's repo)",13,10 1226 00001AD2 672E7075736862782E- <1> 1226 00001ADB 6F72672F65636D2F6C- <1> 1226 00001AE4 64656275672028452E- <1> 1226 00001AED 20432E204D61736C6F- <1> 1226 00001AF6 63682773207265706F- <1> 1226 00001AFF 290D0A <1> 1227 00001B02 0D0A <1> db 13,10 1228 00001B04 52656C656173657320- <1> db "Releases of lDebug are available via the website at",13,10 1228 00001B0D 6F66206C4465627567- <1> 1228 00001B16 206172652061766169- <1> 1228 00001B1F 6C61626C6520766961- <1> 1228 00001B28 207468652077656273- <1> 1228 00001B31 6974652061740D0A <1> 1229 00001B39 68747470733A2F2F70- <1> db "https://pushbx.org/ecm/web/#projects-ldebug",13,10 1229 00001B42 75736862782E6F7267- <1> 1229 00001B4B 2F65636D2F7765622F- <1> 1229 00001B54 2370726F6A65637473- <1> 1229 00001B5D 2D6C64656275670D0A <1> 1230 00001B66 0D0A <1> db 13,10 1231 00001B68 546865206D6F737420- <1> db "The most recent manual is hosted at https://pushbx.org/ecm/doc/ in the",13,10 1231 00001B71 726563656E74206D61- <1> 1231 00001B7A 6E75616C2069732068- <1> 1231 00001B83 6F7374656420617420- <1> 1231 00001B8C 68747470733A2F2F70- <1> 1231 00001B95 75736862782E6F7267- <1> 1231 00001B9E 2F65636D2F646F632F- <1> 1231 00001BA7 20696E207468650D0A <1> 1232 00001BB0 66696C6573206C6465- <1> db "files ldebug.htm, ldebug.txt, and ldebug.pdf",13,10 1232 00001BB9 6275672E68746D2C20- <1> 1232 00001BC2 6C64656275672E7478- <1> 1232 00001BCB 742C20616E64206C64- <1> 1232 00001BD4 656275672E7064660D- <1> 1232 00001BDD 0A <1> 1233 00001BDE 00 <1> asciz 1234 <1> %endif 1235 <1> 1236 <1> .re: 1237 00001BDF 524500 <1> asciz "RE" 1238 <1> .help_re: 1239 00001BE2 5468652052554E2063- <1> db "The RUN commands (T, TP, P, G) and the RE command use the RE command",13,10 1239 00001BEB 6F6D6D616E64732028- <1> 1239 00001BF4 542C2054502C20502C- <1> 1239 00001BFD 20472920616E642074- <1> 1239 00001C06 686520524520636F6D- <1> 1239 00001C0F 6D616E642075736520- <1> 1239 00001C18 74686520524520636F- <1> 1239 00001C21 6D6D616E640D0A <1> 1240 00001C28 62756666657220746F- <1> db "buffer to run commands. Most commands are allowed to be run from the",13,10 1240 00001C31 2072756E20636F6D6D- <1> 1240 00001C3A 616E64732E204D6F73- <1> 1240 00001C43 7420636F6D6D616E64- <1> 1240 00001C4C 732061726520616C6C- <1> 1240 00001C55 6F77656420746F2062- <1> 1240 00001C5E 652072756E2066726F- <1> 1240 00001C67 6D207468650D0A <1> 1241 00001C6E 524520627566666572- <1> db "RE buffer. Disallowed commands include program-loading L, A, E that",13,10 1241 00001C77 2E20446973616C6C6F- <1> 1241 00001C80 77656420636F6D6D61- <1> 1241 00001C89 6E647320696E636C75- <1> 1241 00001C92 64652070726F677261- <1> 1241 00001C9B 6D2D6C6F6164696E67- <1> 1241 00001CA4 204C2C20412C204520- <1> 1241 00001CAD 746861740D0A <1> 1242 00001CB3 737769746368657320- <1> db "switches the line input mode, TSR, Q, Y, RE, and further RUN commands.",13,10 1242 00001CBC 746865206C696E6520- <1> 1242 00001CC5 696E707574206D6F64- <1> 1242 00001CCE 652C205453522C2051- <1> 1242 00001CD7 2C20592C2052452C20- <1> 1242 00001CE0 616E64206675727468- <1> 1242 00001CE9 65722052554E20636F- <1> 1242 00001CF2 6D6D616E64732E0D0A <1> 1243 00001CFB 5768656E2074686520- <1> db "When the RE buffer is used as input during T, TP, or P with either",13,10 1243 00001D04 524520627566666572- <1> 1243 00001D0D 206973207573656420- <1> 1243 00001D16 617320696E70757420- <1> 1243 00001D1F 647572696E6720542C- <1> 1243 00001D28 2054502C206F722050- <1> 1243 00001D31 207769746820656974- <1> 1243 00001D3A 6865720D0A <1> 1244 00001D3F 6F6620746865205748- <1> db "of the WHILE or SILENT keywords, commands that use the auxbuff are",13,10 1244 00001D48 494C45206F72205349- <1> 1244 00001D51 4C454E54206B657977- <1> 1244 00001D5A 6F7264732C20636F6D- <1> 1244 00001D63 6D616E647320746861- <1> 1244 00001D6C 742075736520746865- <1> 1244 00001D75 206175786275666620- <1> 1244 00001D7E 6172650D0A <1> 1245 00001D83 616C736F2064697361- <1> db "also disallowed and will emit an error noting the conflict.",13,10 1245 00001D8C 6C6C6F77656420616E- <1> 1245 00001D95 642077696C6C20656D- <1> 1245 00001D9E 697420616E20657272- <1> 1245 00001DA7 6F72206E6F74696E67- <1> 1245 00001DB0 2074686520636F6E66- <1> 1245 00001DB9 6C6963742E0D0A <1> 1246 00001DC0 0D0A <1> db 13,10 1247 00001DC2 52452E4C4953542073- <1> db "RE.LIST shows the current RE buffer contents in a format usable by",13,10 1247 00001DCB 686F77732074686520- <1> 1247 00001DD4 63757272656E742052- <1> 1247 00001DDD 452062756666657220- <1> 1247 00001DE6 636F6E74656E747320- <1> 1247 00001DEF 696E206120666F726D- <1> 1247 00001DF8 617420757361626C65- <1> 1247 00001E01 2062790D0A <1> 1248 00001E06 746865206F74686572- <1> db "the other RE commands. RE.APPEND appends the following commands to",13,10 1248 00001E0F 20524520636F6D6D61- <1> 1248 00001E18 6E64732E2052452E41- <1> 1248 00001E21 5050454E4420617070- <1> 1248 00001E2A 656E64732074686520- <1> 1248 00001E33 666F6C6C6F77696E67- <1> 1248 00001E3C 20636F6D6D616E6473- <1> 1248 00001E45 20746F0D0A <1> 1249 00001E4A 746865206275666665- <1> db "the buffer, if they fit. RE.REPLACE appends to the start of the",13,10 1249 00001E53 722C20696620746865- <1> 1249 00001E5C 79206669742E205245- <1> 1249 00001E65 2E5245504C41434520- <1> 1249 00001E6E 617070656E64732074- <1> 1249 00001E77 6F2074686520737461- <1> 1249 00001E80 7274206F6620746865- <1> 1249 00001E89 0D0A <1> 1250 00001E8B 6275666665722E2057- <1> db "buffer. When specifying commands, an unescaped semicolon is parsed",13,10 1250 00001E94 68656E207370656369- <1> 1250 00001E9D 6679696E6720636F6D- <1> 1250 00001EA6 6D616E64732C20616E- <1> 1250 00001EAF 20756E657363617065- <1> 1250 00001EB8 642073656D69636F6C- <1> 1250 00001EC1 6F6E20697320706172- <1> 1250 00001ECA 7365640D0A <1> 1251 00001ECF 61732061206C696E65- <1> db "as a linebreak to break apart individual commands. Backslashes can",13,10 1251 00001ED8 627265616B20746F20- <1> 1251 00001EE1 627265616B20617061- <1> 1251 00001EEA 727420696E64697669- <1> 1251 00001EF3 6475616C20636F6D6D- <1> 1251 00001EFC 616E64732E20426163- <1> 1251 00001F05 6B736C617368657320- <1> 1251 00001F0E 63616E0D0A <1> 1252 00001F13 626520757365642074- <1> db "be used to escape semicolons and backslashes themselves.",13,10 1252 00001F1C 6F2065736361706520- <1> 1252 00001F25 73656D69636F6C6F6E- <1> 1252 00001F2E 7320616E6420626163- <1> 1252 00001F37 6B736C617368657320- <1> 1252 00001F40 7468656D73656C7665- <1> 1252 00001F49 732E0D0A <1> 1253 00001F4D 0D0A <1> db 13,10 1254 00001F4F 507265666978696E67- <1> db "Prefixing a line with an @ (AT sign) causes the command not to be",13,10 1254 00001F58 2061206C696E652077- <1> 1254 00001F61 69746820616E204020- <1> 1254 00001F6A 284154207369676E29- <1> 1254 00001F73 206361757365732074- <1> 1254 00001F7C 686520636F6D6D616E- <1> 1254 00001F85 64206E6F7420746F20- <1> 1254 00001F8E 62650D0A <1> 1255 00001F92 73686F776E20746F20- <1> db "shown to the standard output of the debugger when run. Otherwise,",13,10 1255 00001F9B 746865207374616E64- <1> 1255 00001FA4 617264206F75747075- <1> 1255 00001FAD 74206F662074686520- <1> 1255 00001FB6 646562756767657220- <1> 1255 00001FBF 7768656E2072756E2E- <1> 1255 00001FC8 204F74686572776973- <1> 1255 00001FD1 652C0D0A <1> 1256 00001FD5 74686520636F6D6D61- <1> db "the command will be shown with a percent sign % or ~% prompt.",13,10 1256 00001FDE 6E642077696C6C2062- <1> 1256 00001FE7 652073686F776E2077- <1> 1256 00001FF0 697468206120706572- <1> 1256 00001FF9 63656E74207369676E- <1> 1256 00002002 2025206F72207E2520- <1> 1256 0000200B 70726F6D70742E0D0A <1> 1257 00002014 0D0A <1> db 13,10 1258 00002016 546865206465666175- <1> db "The default RE buffer content is @R. This content is also",13,10 1258 0000201F 6C7420524520627566- <1> 1258 00002028 66657220636F6E7465- <1> 1258 00002031 6E742069732040522E- <1> 1258 0000203A 205468697320636F6E- <1> 1258 00002043 74656E742069732061- <1> 1258 0000204C 6C736F0D0A <1> 1259 00002051 646574656374656420- <1> db "detected and handled specifically; if found as the only command",13,10 1259 0000205A 616E642068616E646C- <1> 1259 00002063 656420737065636966- <1> 1259 0000206C 6963616C6C793B2069- <1> 1259 00002075 6620666F756E642061- <1> 1259 0000207E 7320746865206F6E6C- <1> 1259 00002087 7920636F6D6D616E64- <1> 1259 00002090 0D0A <1> 1260 00002092 7468652068616E646C- <1> db "the handler directly calls the register dump implementation",13,10 1260 0000209B 657220646972656374- <1> 1260 000020A4 6C792063616C6C7320- <1> 1260 000020AD 746865207265676973- <1> 1260 000020B6 7465722064756D7020- <1> 1260 000020BF 696D706C656D656E74- <1> 1260 000020C8 6174696F6E0D0A <1> 1261 000020CF 776974686F75742073- <1> db "without setting up and tearing down the special execution",13,10 1261 000020D8 657474696E67207570- <1> 1261 000020E1 20616E642074656172- <1> 1261 000020EA 696E6720646F776E20- <1> 1261 000020F3 746865207370656369- <1> 1261 000020FC 616C20657865637574- <1> 1261 00002105 696F6E0D0A <1> 1262 0000210A 656E7669726F6E6D65- <1> db "environment used to run arbitrary commands from the RE buffer.",13,10 1262 00002113 6E7420757365642074- <1> 1262 0000211C 6F2072756E20617262- <1> 1262 00002125 69747261727920636F- <1> 1262 0000212E 6D6D616E6473206672- <1> 1262 00002137 6F6D20746865205245- <1> 1262 00002140 206275666665722E0D- <1> 1262 00002149 0A <1> 1263 0000214A 00 <1> asciz 1264 <1> 1265 <1> .run: 1266 0000214B 52554E00 <1> asciz "RUN" 1267 <1> .help_run: 1268 0000214F 542028747261636529- <1> db "T (trace), TP (trace except proceed past string operations), and P (proceed)",13,10 1268 00002158 2C2054502028747261- <1> 1268 00002161 636520657863657074- <1> 1268 0000216A 2070726F6365656420- <1> 1268 00002173 706173742073747269- <1> 1268 0000217C 6E67206F7065726174- <1> 1268 00002185 696F6E73292C20616E- <1> 1268 0000218E 642050202870726F63- <1> 1268 00002197 656564290D0A <1> 1269 0000219D 63616E20626520666F- <1> db "can be followed by a number of repetitions and then the keyword WHILE,",13,10 1269 000021A6 6C6C6F776564206279- <1> 1269 000021AF 2061206E756D626572- <1> 1269 000021B8 206F66207265706574- <1> 1269 000021C1 6974696F6E7320616E- <1> 1269 000021CA 64207468656E207468- <1> 1269 000021D3 65206B6579776F7264- <1> 1269 000021DC 205748494C452C0D0A <1> 1270 000021E5 7768696368206D7573- <1> db "which must be followed by a conditional expression.",13,10 1270 000021EE 7420626520666F6C6C- <1> 1270 000021F7 6F7765642062792061- <1> 1270 00002200 20636F6E646974696F- <1> 1270 00002209 6E616C206578707265- <1> 1270 00002212 7373696F6E2E0D0A <1> 1271 0000221A 0D0A <1> db 13,10 1272 0000221C 5468652073656C6563- <1> db "The selected run command is repeated as many times as specified by the",13,10 1272 00002225 7465642072756E2063- <1> 1272 0000222E 6F6D6D616E64206973- <1> 1272 00002237 207265706561746564- <1> 1272 00002240 206173206D616E7920- <1> 1272 00002249 74696D657320617320- <1> 1272 00002252 737065636966696564- <1> 1272 0000225B 206279207468650D0A <1> 1273 00002264 6E756D6265722C206F- <1> db "number, or until the WHILE condition evaluates no longer to true.",13,10 1273 0000226D 7220756E74696C2074- <1> 1273 00002276 6865205748494C4520- <1> 1273 0000227F 636F6E646974696F6E- <1> 1273 00002288 206576616C75617465- <1> 1273 00002291 73206E6F206C6F6E67- <1> 1273 0000229A 657220746F20747275- <1> 1273 000022A3 652E0D0A <1> 1274 000022A7 0D0A <1> db 13,10 1275 000022A9 416674657220746865- <1> db "After the number of repetitions or (if present) after the WHILE condition",13,10 1275 000022B2 206E756D626572206F- <1> 1275 000022BB 662072657065746974- <1> 1275 000022C4 696F6E73206F722028- <1> 1275 000022CD 69662070726573656E- <1> 1275 000022D6 742920616674657220- <1> 1275 000022DF 746865205748494C45- <1> 1275 000022E8 20636F6E646974696F- <1> 1275 000022F1 6E0D0A <1> 1276 000022F4 746865206B6579776F- <1> db "the keyword SILENT may follow. If that is the case, all register dumps",13,10 1276 000022FD 72642053494C454E54- <1> 1276 00002306 206D617920666F6C6C- <1> 1276 0000230F 6F772E204966207468- <1> 1276 00002318 617420697320746865- <1> 1276 00002321 20636173652C20616C- <1> 1276 0000232A 6C2072656769737465- <1> 1276 00002333 722064756D70730D0A <1> 1277 0000233C 646F6E652064757269- <1> db "done during the run are buffered by the debugger and the run remains",13,10 1277 00002345 6E6720746865207275- <1> 1277 0000234E 6E2061726520627566- <1> 1277 00002357 666572656420627920- <1> 1277 00002360 746865206465627567- <1> 1277 00002369 67657220616E642074- <1> 1277 00002372 68652072756E207265- <1> 1277 0000237B 6D61696E730D0A <1> 1278 00002382 73696C656E742E2041- <1> db "silent. After the run, the last dumps are replayed from the buffer",13,10 1278 0000238B 667465722074686520- <1> 1278 00002394 72756E2C2074686520- <1> 1278 0000239D 6C6173742064756D70- <1> 1278 000023A6 732061726520726570- <1> 1278 000023AF 6C617965642066726F- <1> 1278 000023B8 6D2074686520627566- <1> 1278 000023C1 6665720D0A <1> 1279 000023C6 616E6420646973706C- <1> db "and displayed. At most as many dumps as fit into the buffer are",13,10 1279 000023CF 617965642E20417420- <1> 1279 000023D8 6D6F7374206173206D- <1> 1279 000023E1 616E792064756D7073- <1> 1279 000023EA 206173206669742069- <1> 1279 000023F3 6E746F207468652062- <1> 1279 000023FC 756666657220617265- <1> 1279 00002405 0D0A <1> 1280 00002407 646973706C61796564- <1> db "displayed. (The buffer is currently up to 8 KiB sized.)",13,10 1280 00002410 2E2028546865206275- <1> 1280 00002419 666665722069732063- <1> 1280 00002422 757272656E746C7920- <1> 1280 0000242B 757020746F2038204B- <1> 1280 00002434 69422073697A65642E- <1> 1280 0000243D 290D0A <1> 1281 00002440 0D0A <1> db 13,10 1282 00002442 49662061206E756D62- <1> db "If a number follows behind the SILENT keyword, only at most that many",13,10 1282 0000244B 657220666F6C6C6F77- <1> 1282 00002454 7320626568696E6420- <1> 1282 0000245D 7468652053494C454E- <1> 1282 00002466 54206B6579776F7264- <1> 1282 0000246F 2C206F6E6C79206174- <1> 1282 00002478 206D6F737420746861- <1> 1282 00002481 74206D616E790D0A <1> 1283 00002489 64756D707320617265- <1> db "dumps are displayed from the buffer. The dumps that are displayed",13,10 1283 00002492 20646973706C617965- <1> 1283 0000249B 642066726F6D207468- <1> 1283 000024A4 65206275666665722E- <1> 1283 000024AD 205468652064756D70- <1> 1283 000024B6 732074686174206172- <1> 1283 000024BF 6520646973706C6179- <1> 1283 000024C8 65640D0A <1> 1284 000024CC 61726520616C776179- <1> db "are always those last written into the buffer, thus last occurred.",13,10 1284 000024D5 732074686F7365206C- <1> 1284 000024DE 617374207772697474- <1> 1284 000024E7 656E20696E746F2074- <1> 1284 000024F0 686520627566666572- <1> 1284 000024F9 2C2074687573206C61- <1> 1284 00002502 7374206F6363757272- <1> 1284 0000250B 65642E0D0A <1> 1285 00002510 00 <1> asciz 1286 <1> 1287 00002511 00 <1> align 2, db 0 1288 <1> .build_array: 1289 00002512 [2425] <1> dw .build_nameversion 1290 00002514 [A425] <1> dw .build_lmacros 1291 00002516 [E425] <1> dw .build_scanptab 1292 00002518 [2426] <1> dw .build_inicomp 1293 <1> %if _CHECKSUM 1294 <1> dw .build_inicheck 1295 <1> %endif 1296 0000251A [6426] <1> dw .build_ldosboot 1297 <1> .build_short_amount: equ ($ - .build_array) / 2 1298 0000251C [A426] <1> dw .build_long 1299 <1> .build_long_amount: equ ($ - .build_array) / 2 1300 <1> 1301 <1> .string_build: 1302 0000251E 4255494C4400 <1> asciz "BUILD" 1303 <1> 1304 <1> .build_nameversion: 1305 00002524 6C4465627567582028- <1> db _PROGNAME,_VERSION,13,10 1305 0000252D 323032322D30352D30- <1> 1305 00002536 33290D0A <1> 1306 <1> %ifnidn _REVISIONID,"" 1307 0000253A 536F7572636520436F- <1> db "Source Control Revision ID: ",_REVISIONID,13,10 1307 00002543 6E74726F6C20526576- <1> 1307 0000254C 6973696F6E2049443A- <1> 1307 00002555 206867203830393439- <1> 1307 0000255E 323464393730612028- <1> 1307 00002567 3237363420616E6365- <1> 1307 00002570 73746F7273290D0A <1> 1308 <1> %endif 1309 00002578 00 <1> asciz 1310 00002579 00 <1> _fill 128, 0, .build_nameversion 1311 <1> .build_lmacros: 1312 000025A4 55736573206C6D6163- <1> fill 64, 0, asciz _REVISIONID_LMACROS 1312 000025AD 726F733A2020526576- <1> 1312 000025B6 6973696F6E20494420- <1> 1312 000025BF 686720396661306536- <1> 1312 000025C8 343033346364202831- <1> 1312 000025D1 353020616E63657374- <1> 1312 000025DA 6F7273290D0A0000- <1> 1312 000025DA <1> 1313 <1> .build_scanptab: 1314 000025E4 55736573207363616E- <1> fill 64, 0, asciz _REVISIONID_SCANPTAB 1314 000025ED 707461623A20526576- <1> 1314 000025F6 6973696F6E20494420- <1> 1314 000025FF 686720306535333038- <1> 1314 00002608 316331353331202831- <1> 1314 00002611 3020616E636573746F- <1> 1314 0000261A 7273290D0A0000- <1> 1314 0000261A <1> 1315 <1> .build_inicomp: 1316 00002624 5573657320696E6963- <1> fill 64, 0, asciz _REVISIONID_INICOMP 1316 0000262D 6F6D703A2020526576- <1> 1316 00002636 6973696F6E20494420- <1> 1316 0000263F 686720363433313030- <1> 1316 00002648 646533363934202835- <1> 1316 00002651 333220616E63657374- <1> 1316 0000265A 6F7273290D0A0000- <1> 1316 0000265A <1> 1317 <1> %if _CHECKSUM 1318 <1> .build_inicheck: 1319 <1> fill 64, 0, asciz _REVISIONID_INICHECK 1320 <1> %endif 1321 <1> .build_ldosboot: 1322 00002664 55736573206C646F73- <1> fill 64, 0, asciz _REVISIONID_LDOSBOOT 1322 0000266D 626F6F743A20526576- <1> 1322 00002676 6973696F6E20494420- <1> 1322 0000267F 686720306435346665- <1> 1322 00002688 346161613036202835- <1> 1322 00002691 373120616E63657374- <1> 1322 0000269A 6F7273290D0A0000- <1> 1322 0000269A <1> 1323 <1> 1324 <1> .build_long: 1325 <1> %if _EXTHELP 1326 000026A4 0D0A <1> db 13,10 1327 <1> %if _PM 1328 000026A6 44504D492D63617061- <1> db "DPMI-capable",13,10 1328 000026AF 626C650D0A <1> 1329 <1> %if _NOEXTENDER 1330 000026B4 2044504D4920686F73- <1> db " DPMI host without extender",13,10 1330 000026BD 7420776974686F7574- <1> 1330 000026C6 20657874656E646572- <1> 1330 000026CF 0D0A <1> 1331 <1> %endif 1332 <1> %if 0 1333 <1> %if _WIN9XSUPP 1334 <1> db " No Windows 4 DPMI hook",13,10 1335 <1> %endif 1336 <1> %if _PM && _DOSEMU 1337 <1> db " No DOSEMU DPMI hook",13,10 1338 <1> %endif 1339 <1> %else 1340 000026D1 204175746F6D617469- <1> db " Automatic DPMI entrypoint hook detection",13,10 1340 000026DA 632044504D4920656E- <1> 1340 000026E3 747279706F696E7420- <1> 1340 000026EC 686F6F6B2064657465- <1> 1340 000026F5 6374696F6E0D0A <1> 1341 <1> %endif 1342 <1> %if _EXCCSIP 1343 000026FC 20446973706C617920- <1> db " Display exception address",13,10 1343 00002705 657863657074696F6E- <1> 1343 0000270E 20616464726573730D- <1> 1343 00002717 0A <1> 1344 <1> %endif 1345 <1> %if _DISPHOOK 1346 00002718 20446973706C617920- <1> db " Display hooking DPMI entry",13,10 1346 00002721 686F6F6B696E672044- <1> 1346 0000272A 504D4920656E747279- <1> 1346 00002733 0D0A <1> 1347 <1> %endif 1348 <1> %endif 1349 <1> %if _DEBUG 1350 <1> db "Debuggable",13,10 1351 <1> %endif 1352 <1> %if _INT 1353 00002735 444920636F6D6D616E- <1> db "DI command",13,10 1353 0000273E 640D0A <1> 1354 <1> %endif 1355 <1> %if _MCB 1356 00002741 444D20636F6D6D616E- <1> db "DM command",13,10 1356 0000274A 640D0A <1> 1357 <1> %endif 1358 <1> %if _DSTRINGS 1359 0000274D 4420737472696E6720- <1> db "D string commands",13,10 1359 00002756 636F6D6D616E64730D- <1> 1359 0000275F 0A <1> 1360 <1> %endif 1361 <1> %if _SDUMP 1362 00002760 53206D617463682064- <1> db "S match dumps line of following data",13,10 1362 00002769 756D7073206C696E65- <1> 1362 00002772 206F6620666F6C6C6F- <1> 1362 0000277B 77696E672064617461- <1> 1362 00002784 0D0A <1> 1363 <1> %endif 1364 <1> %if _RN 1365 00002786 524E20636F6D6D616E- <1> db "RN command",13,10 1365 0000278F 640D0A <1> 1366 <1> %endif 1367 <1> %if _USESDA 1368 00002792 416363657373205344- <1> db "Access SDA current PSP field",13,10 1368 0000279B 412063757272656E74- <1> 1368 000027A4 20505350206669656C- <1> 1368 000027AD 640D0A <1> 1369 <1> %endif 1370 <1> %if _VDD 1371 000027B0 4C6F6164204E545644- <1> db "Load NTVDM VDD for sector access",13,10 1371 000027B9 4D2056444420666F72- <1> 1371 000027C2 20736563746F722061- <1> 1371 000027CB 63636573730D0A <1> 1372 <1> %endif 1373 <1> %if _EMS 1374 000027D2 5820636F6D6D616E64- <1> db "X commands for EMS access",13,10 1374 000027DB 7320666F7220454D53- <1> 1374 000027E4 206163636573730D0A <1> 1375 <1> %endif 1376 <1> %if _MMXSUPP 1377 000027ED 524D20636F6D6D616E- <1> db "RM command and reading MMX registers as variables",13,10 1377 000027F6 6420616E6420726561- <1> 1377 000027FF 64696E67204D4D5820- <1> 1377 00002808 726567697374657273- <1> 1377 00002811 206173207661726961- <1> 1377 0000281A 626C65730D0A <1> 1378 <1> %endif 1379 <1> %if _EXPRESSIONS 1380 00002820 45787072657373696F- <1> db "Expression evaluator",13,10 1380 00002829 6E206576616C756174- <1> 1380 00002832 6F720D0A <1> 1381 <1> %endif 1382 <1> %if _INDIRECTION 1383 00002836 20496E646972656374- <1> db " Indirection in expressions",13,10 1383 0000283F 696F6E20696E206578- <1> 1383 00002848 7072657373696F6E73- <1> 1383 00002851 0D0A <1> 1384 <1> %endif 1385 <1> %if _VARIABLES 1386 00002853 5661726961626C6573- <1> db "Variables with user-defined purpose",13,10 1386 0000285C 207769746820757365- <1> 1386 00002865 722D646566696E6564- <1> 1386 0000286E 20707572706F73650D- <1> 1386 00002877 0A <1> 1387 <1> %endif 1388 <1> %if _OPTIONS 1389 00002878 446562756767657220- <1> db "Debugger option and status variables",13,10 1389 00002881 6F7074696F6E20616E- <1> 1389 0000288A 642073746174757320- <1> 1389 00002893 7661726961626C6573- <1> 1389 0000289C 0D0A <1> 1390 <1> %endif 1391 <1> %if _PSPVARIABLES 1392 0000289E 505350207661726961- <1> db "PSP variables",13,10 1392 000028A7 626C65730D0A <1> 1393 <1> %endif 1394 <1> %if _COND 1395 000028AD 436F6E646974696F6E- <1> db "Conditional jump notice in register dump",13,10 1395 000028B6 616C206A756D70206E- <1> 1395 000028BF 6F7469636520696E20- <1> 1395 000028C8 726567697374657220- <1> 1395 000028D1 64756D700D0A <1> 1396 <1> %endif 1397 <1> %if _TSR 1398 000028D7 545352206D6F646520- <1> db "TSR mode (Process detachment)",13,10 1398 000028E0 2850726F6365737320- <1> 1398 000028E9 6465746163686D656E- <1> 1398 000028F2 74290D0A <1> 1399 <1> %endif 1400 <1> %if _DEVICE 1401 <1> db "Loadable device driver",13,10 1402 <1> %endif 1403 <1> %if _BOOTLDR 1404 000028F6 426F6F74206C6F6164- <1> db "Boot loader",13,10 1404 000028FF 65720D0A <1> 1405 <1> %endif 1406 <1> %if _BREAKPOINTS 1407 00002903 5065726D616E656E74- <1> db "Permanent breakpoints",13,10 1407 0000290C 20627265616B706F69- <1> 1407 00002915 6E74730D0A <1> 1408 <1> %endif 1409 <1> %push 1410 0000291A 496E74657263657074- <1> db "Intercepted" 1410 00002923 6564 <1> 1411 <1> %if _PM 1412 00002925 2038364D <1> db " 86M" 1413 <1> %endif 1414 00002929 20696E746572727570- <1> db " interrupts:" 1414 00002932 74733A <1> 1415 <1> %define %$pref " " 1416 <1> %macro dispint 2.nolist 1417 <1> %if %1 1418 <1> db %$pref, %2 1419 <1> %define %$pref ", " 1420 <1> %endif 1421 <1> %endmacro 1422 00002935 203030 <1> dispint _CATCHINT00, "00" 1423 00002938 2C203031 <1> dispint _CATCHINT01, "01" 1424 0000293C 2C203033 <1> dispint _CATCHINT03, "03" 1425 00002940 2C203036 <1> dispint _CATCHINT06, "06" 1426 00002944 2C203138 <1> dispint _CATCHINT18, "18" 1427 00002948 2C203139 <1> dispint _CATCHINT19, "19" 1428 <1> %ifidn %$pref," " 1429 <1> db " none" 1430 <1> %endif 1431 0000294C 0D0A <1> db 13,10 1432 <1> %if _PM || _CATCHINT08 1433 0000294E 50726F636573736564 <1> db "Processed" 1434 <1> %if _PM 1435 00002957 2038364D <1> db " 86M" 1436 <1> %endif 1437 0000295B 20696E746572727570- <1> db " interrupts:" 1437 00002964 74733A <1> 1438 <1> %define %$pref " " 1439 00002967 203038 <1> dispint _CATCHINT08, "08" 1440 0000296A 2C2032462E31363837 <1> dispint _PM, "2F.1687" 1441 <1> %ifidn %$pref," " 1442 <1> db " none" 1443 <1> %endif 1444 00002973 0D0A <1> db 13,10 1445 <1> %endif 1446 <1> %if _PM 1447 00002975 496E74657263657074- <1> db "Intercepted DPMI exceptions:" 1447 0000297E 65642044504D492065- <1> 1447 00002987 7863657074696F6E73- <1> 1447 00002990 3A <1> 1448 <1> %define %$pref " " 1449 00002991 203030 <1> dispint _CATCHEXC00, "00" 1450 00002994 2C203031 <1> dispint _CATCHEXC01, "01" 1451 00002998 2C203033 <1> dispint _CATCHEXC03, "03" 1452 0000299C 2C203036 <1> dispint _CATCHEXC06, "06" 1453 000029A0 2C203043 <1> dispint _CATCHEXC0C, "0C" 1454 000029A4 2C203044 <1> dispint _CATCHEXC0D, "0D" 1455 000029A8 2C203045 <1> dispint _CATCHEXC0E, "0E" 1456 <1> %ifidn %$pref," " 1457 <1> db " none" 1458 <1> %endif 1459 000029AC 0D0A <1> db 13,10 1460 <1> %endif 1461 <1> %unmacro dispint 2.nolist 1462 <1> %pop 1463 <1> %if _PM && _CATCHPMINT214C 1464 000029AE 50726F636573736564- <1> db "Processed DPMI interrupts: 21.4C",13,10 1464 000029B7 2044504D4920696E74- <1> 1464 000029C0 657272757074733A20- <1> 1464 000029C9 32312E34430D0A <1> 1465 <1> %endif 1466 <1> %if _EXTHELP 1467 000029D0 457874656E64656420- <1> db "Extended built-in help pages",13,10 1467 000029D9 6275696C742D696E20- <1> 1467 000029E2 68656C702070616765- <1> 1467 000029EB 730D0A <1> 1468 <1> %endif 1469 <1> %if _ONLYNON386 1470 <1> db "Only supports non-386 operation",13,10 1471 <1> %endif 1472 <1> %if _ONLY386 1473 <1> db "Only supports 386+ operation",13,10 1474 <1> %endif 1475 <1> %else 1476 <1> %if _BOOTLDR 1477 <1> asciz 1478 <1> ; This message is used by mak.sh to detect that we 1479 <1> ; are building with boot load support. 1480 <1> db 13,10,"Boot loader",13,10 1481 <1> %endif 1482 <1> %endif 1483 000029EE 00 <1> asciz 1484 <1> 1485 <1> %if _EXTHELP 1486 <1> .license: 1487 000029EF 6C4465627567202D20- <1> db "lDebug - libre 86-DOS debugger",13,10 1487 000029F8 6C696272652038362D- <1> 1487 00002A01 444F53206465627567- <1> 1487 00002A0A 6765720D0A <1> 1488 00002A0F 0D0A <1> db 13,10 1489 00002A11 436F70797269676874- <1> db "Copyright (C) 1995-2003 Paul Vojta",13,10 1489 00002A1A 202843292031393935- <1> 1489 00002A23 2D3230303320506175- <1> 1489 00002A2C 6C20566F6A74610D0A <1> 1490 00002A35 436F70797269676874- <1> db "Copyright (C) 2008-2021 C. Masloch",13,10 1490 00002A3E 202843292032303038- <1> 1490 00002A47 2D3230323120432E20- <1> 1490 00002A50 4D61736C6F63680D0A <1> 1491 00002A59 0D0A <1> db 13,10 1492 00002A5B 5573616765206F6620- <1> db "Usage of the works is permitted provided that this",13,10 1492 00002A64 74686520776F726B73- <1> 1492 00002A6D 206973207065726D69- <1> 1492 00002A76 747465642070726F76- <1> 1492 00002A7F 696465642074686174- <1> 1492 00002A88 20746869730D0A <1> 1493 00002A8F 696E737472756D656E- <1> db "instrument is retained with the works, so that any entity",13,10 1493 00002A98 742069732072657461- <1> 1493 00002AA1 696E65642077697468- <1> 1493 00002AAA 2074686520776F726B- <1> 1493 00002AB3 732C20736F20746861- <1> 1493 00002ABC 7420616E7920656E74- <1> 1493 00002AC5 6974790D0A <1> 1494 00002ACA 746861742075736573- <1> db "that uses the works is notified of this instrument.",13,10 1494 00002AD3 2074686520776F726B- <1> 1494 00002ADC 73206973206E6F7469- <1> 1494 00002AE5 66696564206F662074- <1> 1494 00002AEE 68697320696E737472- <1> 1494 00002AF7 756D656E742E0D0A <1> 1495 00002AFF 0D0A <1> db 13,10 1496 00002B01 444953434C41494D45- <1> db "DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY.",13,10 1496 00002B0A 523A2054484520574F- <1> 1496 00002B13 524B53204152452057- <1> 1496 00002B1C 4954484F5554205741- <1> 1496 00002B25 5252414E54592E0D0A <1> 1497 00002B2E 0D0A <1> db 13,10 1498 00002B30 0D0A <1> db 13,10 1499 00002B32 416C6C20636F6E7472- <1> db "All contributions by Paul Vojta or C. Masloch to the debugger are available",13,10 1499 00002B3B 69627574696F6E7320- <1> 1499 00002B44 6279205061756C2056- <1> 1499 00002B4D 6F6A7461206F722043- <1> 1499 00002B56 2E204D61736C6F6368- <1> 1499 00002B5F 20746F207468652064- <1> 1499 00002B68 656275676765722061- <1> 1499 00002B71 726520617661696C61- <1> 1499 00002B7A 626C650D0A <1> 1500 00002B7F 756E64657220612063- <1> db "under a choice of three different licenses. These are the Fair License, the",13,10 1500 00002B88 686F696365206F6620- <1> 1500 00002B91 746872656520646966- <1> 1500 00002B9A 666572656E74206C69- <1> 1500 00002BA3 63656E7365732E2054- <1> 1500 00002BAC 686573652061726520- <1> 1500 00002BB5 746865204661697220- <1> 1500 00002BBE 4C6963656E73652C20- <1> 1500 00002BC7 7468650D0A <1> 1501 00002BCC 53696D706C69666965- <1> db "Simplified 2-Clause BSD License, or the MIT License.",13,10 1501 00002BD5 6420322D436C617573- <1> 1501 00002BDE 6520425344204C6963- <1> 1501 00002BE7 656E73652C206F7220- <1> 1501 00002BF0 746865204D4954204C- <1> 1501 00002BF9 6963656E73652E0D0A <1> 1502 00002C02 0D0A <1> db 13,10 1503 00002C04 546869732069732074- <1> db "This is the license and copyright information that applies to lDebug; but note",13,10 1503 00002C0D 6865206C6963656E73- <1> 1503 00002C16 6520616E6420636F70- <1> 1503 00002C1F 79726967687420696E- <1> 1503 00002C28 666F726D6174696F6E- <1> 1503 00002C31 207468617420617070- <1> 1503 00002C3A 6C69657320746F206C- <1> 1503 00002C43 44656275673B206275- <1> 1503 00002C4C 74206E6F74650D0A <1> 1504 00002C54 746861742074686572- <1> db "that there have been substantial contributions to the code base that are not",13,10 1504 00002C5D 652068617665206265- <1> 1504 00002C66 656E20737562737461- <1> 1504 00002C6F 6E7469616C20636F6E- <1> 1504 00002C78 747269627574696F6E- <1> 1504 00002C81 7320746F2074686520- <1> 1504 00002C8A 636F64652062617365- <1> 1504 00002C93 207468617420617265- <1> 1504 00002C9C 206E6F740D0A <1> 1505 00002CA2 636F70797269676874- <1> db "copyrighted (public domain).",13,10 1505 00002CAB 656420287075626C69- <1> 1505 00002CB4 6320646F6D61696E29- <1> 1505 00002CBD 2E0D0A <1> 1506 00002CC0 00 <1> asciz 1507 <1> 1508 <1> .reghelp: 1509 00002CC1 417661696C61626C65- <1> db "Available 16-bit registers:",9,9,"Available 32-bit registers: (386+)",13,10 1509 00002CCA 2031362D6269742072- <1> 1509 00002CD3 65676973746572733A- <1> 1509 00002CDC 0909417661696C6162- <1> 1509 00002CE5 6C652033322D626974- <1> 1509 00002CEE 207265676973746572- <1> 1509 00002CF7 733A20283338362B29- <1> 1509 00002D00 0D0A <1> 1510 00002D02 415809416363756D75- <1> db "AX",9,"Accumulator",9,9,9,"EAX",13,10 1510 00002D0B 6C61746F7209090945- <1> 1510 00002D14 41580D0A <1> 1511 00002D18 425809426173652072- <1> db "BX",9,"Base register",9,9,9,"EBX",13,10 1511 00002D21 656769737465720909- <1> 1511 00002D2A 094542580D0A <1> 1512 00002D30 435809436F756E7465- <1> db "CX",9,"Counter",9,9,9,9,"ECX",13,10 1512 00002D39 72090909094543580D- <1> 1512 00002D42 0A <1> 1513 00002D43 445809446174612072- <1> db "DX",9,"Data register",9,9,9,"EDX",13,10 1513 00002D4C 656769737465720909- <1> 1513 00002D55 094544580D0A <1> 1514 00002D5B 535009537461636B20- <1> db "SP",9,"Stack pointer",9,9,9,"ESP",13,10 1514 00002D64 706F696E7465720909- <1> 1514 00002D6D 094553500D0A <1> 1515 00002D73 425009426173652070- <1> db "BP",9,"Base pointer",9,9,9,"EBP",13,10 1515 00002D7C 6F696E746572090909- <1> 1515 00002D85 4542500D0A <1> 1516 00002D8A 534909536F75726365- <1> db "SI",9,"Source index",9,9,9,"ESI",13,10 1516 00002D93 20696E646578090909- <1> 1516 00002D9C 4553490D0A <1> 1517 00002DA1 44490944657374696E- <1> db "DI",9,"Destination index",9,9,"EDI",13,10 1517 00002DAA 6174696F6E20696E64- <1> 1517 00002DB3 657809094544490D0A <1> 1518 00002DBC 445309446174612073- <1> db "DS",9,"Data segment",13,10 1518 00002DC5 65676D656E740D0A <1> 1519 00002DCD 455309457874726120- <1> db "ES",9,"Extra segment",13,10 1519 00002DD6 7365676D656E740D0A <1> 1520 00002DDF 535309537461636B20- <1> db "SS",9,"Stack segment",13,10 1520 00002DE8 7365676D656E740D0A <1> 1521 00002DF1 435309436F64652073- <1> db "CS",9,"Code segment",13,10 1521 00002DFA 65676D656E740D0A <1> 1522 00002E02 465309457874726120- <1> db "FS",9,"Extra segment 2 (386+)",13,10 1522 00002E0B 7365676D656E742032- <1> 1522 00002E14 20283338362B290D0A <1> 1523 00002E1D 475309457874726120- <1> db "GS",9,"Extra segment 3 (386+)",13,10 1523 00002E26 7365676D656E742033- <1> 1523 00002E2F 20283338362B290D0A <1> 1524 00002E38 495009496E73747275- <1> db "IP",9,"Instruction pointer",9,9,"EIP",13,10 1524 00002E41 6374696F6E20706F69- <1> 1524 00002E4A 6E7465720909454950- <1> 1524 00002E53 0D0A <1> 1525 00002E55 464C09466C61677309- <1> db "FL",9,"Flags",9,9,9,9,"EFL",13,10 1525 00002E5E 09090945464C0D0A <1> 1526 00002E66 0D0A <1> db 13,10 1527 <1> %if _MMXSUPP && 0 1528 <1> db "Available 64-bit Matrix Math Extension (MMX) registers: (if supported)",13,10 1529 <1> db "MMx",9,"MM(x)",9,"MMX register x, where x is 0 to 7",13,10 1530 <1> db 13,10 1531 <1> %endif 1532 00002E68 456E746572203F4620- <1> db "Enter ?F to display the recognized flags.",13,10 1532 00002E71 746F20646973706C61- <1> 1532 00002E7A 792074686520726563- <1> 1532 00002E83 6F676E697A65642066- <1> 1532 00002E8C 6C6167732E0D0A <1> 1533 00002E93 00 <1> asciz 1534 <1> 1535 <1> .flaghelp: 1536 00002E94 5265636F676E697A65- <1> db "Recognized flags:",13,10 1536 00002E9D 6420666C6167733A0D- <1> 1536 00002EA6 0A <1> 1537 00002EA7 56616C7565094E616D- <1> db "Value",9,"Name",9,9,9, " Set",9,9,9, " Clear",13,10 1537 00002EB0 650909092020536574- <1> 1537 00002EB9 0909092020436C6561- <1> 1537 00002EC2 720D0A <1> 1538 00002EC5 3038303020204F4620- <1> db "0800 OF Overflow Flag",9,9,"OV Overflow",9,9, "NV No overflow",13,10 1538 00002ECE 204F766572666C6F77- <1> 1538 00002ED7 20466C616709094F56- <1> 1538 00002EE0 20204F766572666C6F- <1> 1538 00002EE9 7709094E5620204E6F- <1> 1538 00002EF2 206F766572666C6F77- <1> 1538 00002EFB 0D0A <1> 1539 00002EFD 303430302020444620- <1> db "0400 DF Direction Flag",9,"DN Down",9,9, "UP Up",13,10 1539 00002F06 20446972656374696F- <1> 1539 00002F0F 6E20466C616709444E- <1> 1539 00002F18 2020446F776E090955- <1> 1539 00002F21 50202055700D0A <1> 1540 00002F28 303230302020494620- <1> db "0200 IF Interrupt Flag",9,"EI Enable interrupts",9,"DI Disable interrupts",13,10 1540 00002F31 20496E746572727570- <1> 1540 00002F3A 7420466C6167094549- <1> 1540 00002F43 2020456E61626C6520- <1> 1540 00002F4C 696E74657272757074- <1> 1540 00002F55 730944492020446973- <1> 1540 00002F5E 61626C6520696E7465- <1> 1540 00002F67 7272757074730D0A <1> 1541 00002F6F 303038302020534620- <1> db "0080 SF Sign Flag",9,9, "NG Negative",9,9, "PL Plus",13,10 1541 00002F78 205369676E20466C61- <1> 1541 00002F81 6709094E4720204E65- <1> 1541 00002F8A 676174697665090950- <1> 1541 00002F93 4C2020506C75730D0A <1> 1542 00002F9C 3030343020205A4620- <1> db "0040 ZF Zero Flag",9,9, "ZR Zero",9,9, "NZ Not zero",13,10 1542 00002FA5 205A65726F20466C61- <1> 1542 00002FAE 6709095A5220205A65- <1> 1542 00002FB7 726F09094E5A20204E- <1> 1542 00002FC0 6F74207A65726F0D0A <1> 1543 00002FC9 303031302020414620- <1> db "0010 AF Auxiliary Flag",9,"AC Auxiliary carry",9,"NA No auxiliary carry",13,10 1543 00002FD2 20417578696C696172- <1> 1543 00002FDB 7920466C6167094143- <1> 1543 00002FE4 2020417578696C6961- <1> 1543 00002FED 727920636172727909- <1> 1543 00002FF6 4E4120204E6F206175- <1> 1543 00002FFF 78696C696172792063- <1> 1543 00003008 617272790D0A <1> 1544 0000300E 303030342020504620- <1> db "0004 PF Parity Flag",9,9, "PE Parity even",9,9, "PO Parity odd",13,10 1544 00003017 205061726974792046- <1> 1544 00003020 6C6167090950452020- <1> 1544 00003029 506172697479206576- <1> 1544 00003032 656E0909504F202050- <1> 1544 0000303B 6172697479206F6464- <1> 1544 00003044 0D0A <1> 1545 00003046 303030312020434620- <1> db "0001 CF Carry Flag",9,9, "CY Carry",9,9, "NC No carry",13,10 1545 0000304F 20436172727920466C- <1> 1545 00003058 616709094359202043- <1> 1545 00003061 6172727909094E4320- <1> 1545 0000306A 204E6F206361727279- <1> 1545 00003073 0D0A <1> 1546 00003075 0D0A <1> db 13,10 1547 00003077 5468652073686F7274- <1> db "The short names of the flag states are displayed when dumping registers",13,10 1547 00003080 206E616D6573206F66- <1> 1547 00003089 2074686520666C6167- <1> 1547 00003092 207374617465732061- <1> 1547 0000309B 726520646973706C61- <1> 1547 000030A4 796564207768656E20- <1> 1547 000030AD 64756D70696E672072- <1> 1547 000030B6 65676973746572730D- <1> 1547 000030BF 0A <1> 1548 000030C0 616E642063616E2062- <1> db "and can be entered to modify the symbolic F register with R. The short",13,10 1548 000030C9 6520656E7465726564- <1> 1548 000030D2 20746F206D6F646966- <1> 1548 000030DB 79207468652073796D- <1> 1548 000030E4 626F6C696320462072- <1> 1548 000030ED 656769737465722077- <1> 1548 000030F6 69746820522E205468- <1> 1548 000030FF 652073686F72740D0A <1> 1549 00003108 6E616D6573206F6620- <1> db "names of the flags can be modified by R.",13,10 1549 00003111 74686520666C616773- <1> 1549 0000311A 2063616E206265206D- <1> 1549 00003123 6F6469666965642062- <1> 1549 0000312C 7920522E0D0A <1> 1550 00003132 00 <1> asciz 1551 <1> 1552 <1> %if _COND 1553 <1> .condhelp: 1554 00003133 496E20746865207265- <1> db "In the register dump displayed by the R, T, P and G commands, conditional",13,10 1554 0000313C 676973746572206475- <1> 1554 00003145 6D7020646973706C61- <1> 1554 0000314E 796564206279207468- <1> 1554 00003157 6520522C20542C2050- <1> 1554 00003160 20616E64204720636F- <1> 1554 00003169 6D6D616E64732C2063- <1> 1554 00003172 6F6E646974696F6E61- <1> 1554 0000317B 6C0D0A <1> 1555 0000317E 6A756D707320617265- <1> db "jumps are displayed with a notice that shows whether the instruction will",13,10 1555 00003187 20646973706C617965- <1> 1555 00003190 642077697468206120- <1> 1555 00003199 6E6F74696365207468- <1> 1555 000031A2 61742073686F777320- <1> 1555 000031AB 776865746865722074- <1> 1555 000031B4 686520696E73747275- <1> 1555 000031BD 6374696F6E2077696C- <1> 1555 000031C6 6C0D0A <1> 1556 000031C9 63617573652061206A- <1> db "cause a jump depending on its condition and the current register and flag",13,10 1556 000031D2 756D7020646570656E- <1> 1556 000031DB 64696E67206F6E2069- <1> 1556 000031E4 747320636F6E646974- <1> 1556 000031ED 696F6E20616E642074- <1> 1556 000031F6 68652063757272656E- <1> 1556 000031FF 742072656769737465- <1> 1556 00003208 7220616E6420666C61- <1> 1556 00003211 670D0A <1> 1557 00003214 636F6E74656E74732E- <1> db 'contents. This notice shows either "jumping" or "not jumping" as appropriate.',13,10 1557 0000321D 2054686973206E6F74- <1> 1557 00003226 6963652073686F7773- <1> 1557 0000322F 206569746865722022- <1> 1557 00003238 6A756D70696E672220- <1> 1557 00003241 6F7220226E6F74206A- <1> 1557 0000324A 756D70696E67222061- <1> 1557 00003253 7320617070726F7072- <1> 1557 0000325C 696174652E0D0A <1> 1558 00003263 0D0A <1> db 13,10 1559 00003265 54686520636F6E6469- <1> db "The conditional jumps use these conditions: (second column negates)",13,10 1559 0000326E 74696F6E616C206A75- <1> 1559 00003277 6D7073207573652074- <1> 1559 00003280 6865736520636F6E64- <1> 1559 00003289 6974696F6E733A2028- <1> 1559 00003292 7365636F6E6420636F- <1> 1559 0000329B 6C756D6E206E656761- <1> 1559 000032A4 746573290D0A <1> 1560 000032AA 206A6F09096A6E6F09- <1> db " jo",9,9,"jno",9,9,"OF",13,10 1560 000032B3 094F460D0A <1> 1561 000032B8 206A63206A62206A6E- <1> db " jc jb jnae",9,"jnc jnb jae",9,"CF",13,10 1561 000032C1 6165096A6E63206A6E- <1> 1561 000032CA 62206A61650943460D- <1> 1561 000032D3 0A <1> 1562 000032D4 206A7A206A6509096A- <1> db " jz je",9,9,"jnz jne",9,9,"ZF",13,10 1562 000032DD 6E7A206A6E6509095A- <1> 1562 000032E6 460D0A <1> 1563 000032E9 206A6265206A6E6109- <1> db " jbe jna",9,"jnbe ja",9,9,"ZF||CF",13,10 1563 000032F2 6A6E6265206A610909- <1> 1563 000032FB 5A467C7C43460D0A <1> 1564 00003303 206A7309096A6E7309- <1> db " js",9,9,"jns",9,9,"SF",13,10 1564 0000330C 0953460D0A <1> 1565 00003311 206A70206A70650909- <1> db " jp jpe",9,9,"jnp jpo",9,9,"PF",13,10 1565 0000331A 6A6E70206A706F0909- <1> 1565 00003323 50460D0A <1> 1566 00003327 206A6C206A6E676509- <1> db " jl jnge",9,"jnl jge",9,9,"OF^^SF",13,10 1566 00003330 6A6E6C206A67650909- <1> 1566 00003339 4F465E5E53460D0A <1> 1567 00003341 206A6C65206A6E6709- <1> db " jle jng",9,"jnle jg",9,9,"OF^^SF || ZF",13,10 1567 0000334A 6A6E6C65206A670909- <1> 1567 00003353 4F465E5E5346207C7C- <1> 1567 0000335C 205A460D0A <1> 1568 00003361 206A28652963787A09- <1> db " j(e)cxz",9,9,9,"(e)cx==0",13,10 1568 0000336A 090928652963783D3D- <1> 1568 00003373 300D0A <1> 1569 00003376 206C6F6F7009090909- <1> db " loop",9,9,9,9,"(e)cx!=1",13,10 1569 0000337F 2865296378213D310D- <1> 1569 00003388 0A <1> 1570 00003389 206C6F6F707A206C6F- <1> db " loopz loope",9,9,9,"(e)cx!=1 && ZF",13,10 1570 00003392 6F7065090909286529- <1> 1570 0000339B 6378213D3120262620- <1> 1570 000033A4 5A460D0A <1> 1571 000033A8 206C6F6F706E7A206C- <1> db " loopnz loopne",9,9,9,"(e)cx!=1 && !ZF",13,10 1571 000033B1 6F6F706E6509090928- <1> 1571 000033BA 65296378213D312026- <1> 1571 000033C3 2620215A460D0A <1> 1572 000033CA 0D0A <1> db 13,10 1573 000033CC 456E746572203F4620- <1> db "Enter ?F to display a description of the flag names.",13,10 1573 000033D5 746F20646973706C61- <1> 1573 000033DE 792061206465736372- <1> 1573 000033E7 697074696F6E206F66- <1> 1573 000033F0 2074686520666C6167- <1> 1573 000033F9 206E616D65732E0D0A <1> 1574 00003402 00 <1> asciz 1575 <1> %endif 1576 <1> 1577 <1> %if _EXPRESSIONS 1578 <1> .expressionhelp: 1579 00003403 5265636F676E697A65- <1> db "Recognized operators in expressions:",13,10 1579 0000340C 64206F70657261746F- <1> 1579 00003415 727320696E20657870- <1> 1579 0000341E 72657373696F6E733A- <1> 1579 00003427 0D0A <1> 1580 00003429 7C0962697477697365- <1> db "|",9, "bitwise OR",9,9, "||",9, "boolean OR",13,10 1580 00003432 204F5209097C7C0962- <1> 1580 0000343B 6F6F6C65616E204F52- <1> 1580 00003444 0D0A <1> 1581 00003446 5E0962697477697365- <1> db "^",9, "bitwise XOR",9,9, "^^",9, "boolean XOR",13,10 1581 0000344F 20584F5209095E5E09- <1> 1581 00003458 626F6F6C65616E2058- <1> 1581 00003461 4F520D0A <1> 1582 00003465 260962697477697365- <1> db "&",9, "bitwise AND",9,9, "&&",9, "boolean AND",13,10 1582 0000346E 20414E440909262609- <1> 1582 00003477 626F6F6C65616E2041- <1> 1582 00003480 4E440D0A <1> 1583 00003484 3E3E096269742D7368- <1> db ">>",9, "bit-shift right",9,9, ">",9,"test if above",13,10 1583 0000348D 696674207269676874- <1> 1583 00003496 09093E097465737420- <1> 1583 0000349F 69662061626F76650D- <1> 1583 000034A8 0A <1> 1584 000034A9 3E3E3E097369676E65- <1> db ">>>",9, "signed bit-shift right",9, "<",9,"test if below",13,10 1584 000034B2 64206269742D736869- <1> 1584 000034BB 667420726967687409- <1> 1584 000034C4 3C0974657374206966- <1> 1584 000034CD 2062656C6F770D0A <1> 1585 000034D5 3C3C096269742D7368- <1> db "<<",9, "bit-shift left",9,9, ">=",9,"test if above-or-equal",13,10 1585 000034DE 696674206C65667409- <1> 1585 000034E7 093E3D097465737420- <1> 1585 000034F0 69662061626F76652D- <1> 1585 000034F9 6F722D657175616C0D- <1> 1585 00003502 0A <1> 1586 00003503 3E3C096269742D6D69- <1> db "><",9, "bit-mirror",9,9, "<=",9,"test if below-or-equal",13,10 1586 0000350C 72726F7209093C3D09- <1> 1586 00003515 746573742069662062- <1> 1586 0000351E 656C6F772D6F722D65- <1> 1586 00003527 7175616C0D0A <1> 1587 0000352D 2B096164646974696F- <1> db "+",9, "addition",9,9, "==",9,"test if equal",13,10 1587 00003536 6E09093D3D09746573- <1> 1587 0000353F 742069662065717561- <1> 1587 00003548 6C0D0A <1> 1588 0000354B 2D0973756274726163- <1> db "-",9, "subtraction",9,9, "!=",9,"test if not equal",13,10 1588 00003554 74696F6E0909213D09- <1> 1588 0000355D 74657374206966206E- <1> 1588 00003566 6F7420657175616C0D- <1> 1588 0000356F 0A <1> 1589 00003570 2A096D756C7469706C- <1> db "*",9, "multiplication",9,9, "=>",9,"same as >=",13,10 1589 00003579 69636174696F6E0909- <1> 1589 00003582 3D3E0973616D652061- <1> 1589 0000358B 73203E3D0D0A <1> 1590 00003591 2F096469766973696F- <1> db "/",9, "division",9,9, "=<",9,"same as <=",13,10 1590 0000359A 6E09093D3C0973616D- <1> 1590 000035A3 65206173203C3D0D0A <1> 1591 000035AC 25096D6F64756C6F20- <1> db "%",9, "modulo (A-(A/B*B))",9, "<>",9,"same as !=",13,10 1591 000035B5 28412D28412F422A42- <1> 1591 000035BE 2929093C3E0973616D- <1> 1591 000035C7 6520617320213D0D0A <1> 1592 000035D0 2A2A09706F7765720D- <1> db "**",9, "power",13,10 1592 000035D9 0A <1> 1593 000035DA 0D0A <1> db 13,10 1594 000035DC 496D706C6963697420- <1> db "Implicit operater precedence is handled in the listed order, with increasing",13,10 1594 000035E5 6F7065726174657220- <1> 1594 000035EE 707265636564656E63- <1> 1594 000035F7 652069732068616E64- <1> 1594 00003600 6C656420696E207468- <1> 1594 00003609 65206C697374656420- <1> 1594 00003612 6F726465722C207769- <1> 1594 0000361B 746820696E63726561- <1> 1594 00003624 73696E670D0A <1> 1595 0000362A 707265636564656E63- <1> db "precedence: (Brackets specify explicit precedence of an expression.)",13,10 1595 00003633 653A2028427261636B- <1> 1595 0000363C 657473207370656369- <1> 1595 00003645 6679206578706C6963- <1> 1595 0000364E 697420707265636564- <1> 1595 00003657 656E6365206F662061- <1> 1595 00003660 6E2065787072657373- <1> 1595 00003669 696F6E2E290D0A <1> 1596 00003670 20626F6F6C65616E20- <1> db " boolean operators OR, XOR, AND (each has a different precedence)",13,10 1596 00003679 6F70657261746F7273- <1> 1596 00003682 204F522C20584F522C- <1> 1596 0000368B 20414E442028656163- <1> 1596 00003694 682068617320612064- <1> 1596 0000369D 6966666572656E7420- <1> 1596 000036A6 707265636564656E63- <1> 1596 000036AF 65290D0A <1> 1597 000036B3 20636F6D7061726973- <1> db " comparison operators",13,10 1597 000036BC 6F6E206F7065726174- <1> 1597 000036C5 6F72730D0A <1> 1598 000036CA 206269747769736520- <1> db " bitwise operators OR, XOR, AND (each has a different precedence)",13,10 1598 000036D3 6F70657261746F7273- <1> 1598 000036DC 204F522C20584F522C- <1> 1598 000036E5 20414E442028656163- <1> 1598 000036EE 682068617320612064- <1> 1598 000036F7 6966666572656E7420- <1> 1598 00003700 707265636564656E63- <1> 1598 00003709 65290D0A <1> 1599 0000370D 20736869667420616E- <1> db " shift and bit-mirror operators",13,10 1599 00003716 64206269742D6D6972- <1> 1599 0000371F 726F72206F70657261- <1> 1599 00003728 746F72730D0A <1> 1600 0000372E 206164646974696F6E- <1> db " addition and subtraction operators",13,10 1600 00003737 20616E642073756274- <1> 1600 00003740 72616374696F6E206F- <1> 1600 00003749 70657261746F72730D- <1> 1600 00003752 0A <1> 1601 00003753 206D756C7469706C69- <1> db " multiplication, division and modulo operators",13,10 1601 0000375C 636174696F6E2C2064- <1> 1601 00003765 69766973696F6E2061- <1> 1601 0000376E 6E64206D6F64756C6F- <1> 1601 00003777 206F70657261746F72- <1> 1601 00003780 730D0A <1> 1602 00003783 20706F776572206F70- <1> db " power operator",13,10 1602 0000378C 657261746F720D0A <1> 1603 00003794 0D0A <1> db 13,10 1604 00003796 5265636F676E697A65- <1> db "Recognized unary operators: (modifying the next number)",13,10 1604 0000379F 6420756E617279206F- <1> 1604 000037A8 70657261746F72733A- <1> 1604 000037B1 20286D6F6469667969- <1> 1604 000037BA 6E6720746865206E65- <1> 1604 000037C3 7874206E756D626572- <1> 1604 000037CC 290D0A <1> 1605 000037CF 2B09706F7369746976- <1> db "+",9, "positive (does nothing)",13,10 1605 000037D8 652028646F6573206E- <1> 1605 000037E1 6F7468696E67290D0A <1> 1606 000037EA 2D096E656761746976- <1> db "-",9, "negative",13,10 1606 000037F3 650D0A <1> 1607 000037F6 7E0962697477697365- <1> db "~",9, "bitwise NOT",13,10 1607 000037FF 204E4F540D0A <1> 1608 00003805 2109626F6F6C65616E- <1> db "!",9, "boolean NOT",13,10 1608 0000380E 204E4F540D0A <1> 1609 00003814 3F096162736F6C7574- <1> db "?",9, "absolute value",13,10 1609 0000381D 652076616C75650D0A <1> 1610 00003826 212109636F6E766572- <1> db "!!",9, "convert to boolean",13,10 1610 0000382F 7420746F20626F6F6C- <1> 1610 00003838 65616E0D0A <1> 1611 0000383D 0D0A <1> db 13,10 1612 0000383F 4E6F74652074686174- <1> db "Note that the power operator does not affect unary operator handling.",13,10 1612 00003848 2074686520706F7765- <1> 1612 00003851 72206F70657261746F- <1> 1612 0000385A 7220646F6573206E6F- <1> 1612 00003863 742061666665637420- <1> 1612 0000386C 756E617279206F7065- <1> 1612 00003875 7261746F722068616E- <1> 1612 0000387E 646C696E672E0D0A <1> 1613 00003886 466F7220696E737461- <1> db 'For instance, "- 2 ** 2" is parsed as "(-2) ** 2" and evaluates to 4.',13,10 1613 0000388F 6E63652C20222D2032- <1> 1613 00003898 202A2A203222206973- <1> 1613 000038A1 207061727365642061- <1> 1613 000038AA 732022282D3229202A- <1> 1613 000038B3 2A20322220616E6420- <1> 1613 000038BC 6576616C7561746573- <1> 1613 000038C5 20746F20342E0D0A <1> 1614 000038CD 0D0A <1> db 13,10 1615 000038CF 416C74686F75676820- <1> db "Although a negative unary and signed bit-shift right operator are provided",13,10 1615 000038D8 61206E656761746976- <1> 1615 000038E1 6520756E6172792061- <1> 1615 000038EA 6E64207369676E6564- <1> 1615 000038F3 206269742D73686966- <1> 1615 000038FC 74207269676874206F- <1> 1615 00003905 70657261746F722061- <1> 1615 0000390E 72652070726F766964- <1> 1615 00003917 65640D0A <1> 1616 0000391B 746865206578707265- <1> db "the expression evaluator is intrinsically unsigned. Particularly the division,",13,10 1616 00003924 7373696F6E20657661- <1> 1616 0000392D 6C7561746F72206973- <1> 1616 00003936 20696E7472696E7369- <1> 1616 0000393F 63616C6C7920756E73- <1> 1616 00003948 69676E65642E205061- <1> 1616 00003951 72746963756C61726C- <1> 1616 0000395A 792074686520646976- <1> 1616 00003963 6973696F6E2C0D0A <1> 1617 0000396B 6D756C7469706C6963- <1> db "multiplication, modulo and all comparison operators operate unsigned. Due to",13,10 1617 00003974 6174696F6E2C206D6F- <1> 1617 0000397D 64756C6F20616E6420- <1> 1617 00003986 616C6C20636F6D7061- <1> 1617 0000398F 7269736F6E206F7065- <1> 1617 00003998 7261746F7273206F70- <1> 1617 000039A1 657261746520756E73- <1> 1617 000039AA 69676E65642E204475- <1> 1617 000039B3 6520746F0D0A <1> 1618 000039B9 746869732C20746865- <1> db 'this, the expression "-1 < 0" evaluates to zero.',13,10 1618 000039C2 206578707265737369- <1> 1618 000039CB 6F6E20222D31203C20- <1> 1618 000039D4 3022206576616C7561- <1> 1618 000039DD 74657320746F207A65- <1> 1618 000039E6 726F2E0D0A <1> 1619 000039EB 0D0A <1> db 13,10 1620 000039ED 5265636F676E697A65- <1> db "Recognized terms in an expression:",13,10 1620 000039F6 64207465726D732069- <1> 1620 000039FF 6E20616E2065787072- <1> 1620 00003A08 657373696F6E3A0D0A <1> 1621 00003A11 2033322D6269742069- <1> db " 32-bit immediates",13,10 1621 00003A1A 6D6D65646961746573- <1> 1621 00003A23 0D0A <1> 1622 00003A25 20382D626974207265- <1> db " 8-bit registers",13,10 1622 00003A2E 676973746572730D0A <1> 1623 00003A37 2031362D6269742072- <1> db " 16-bit registers including segment registers (except FS, GS)",13,10 1623 00003A40 656769737465727320- <1> 1623 00003A49 696E636C7564696E67- <1> 1623 00003A52 207365676D656E7420- <1> 1623 00003A5B 726567697374657273- <1> 1623 00003A64 202865786365707420- <1> 1623 00003A6D 46532C204753290D0A <1> 1624 00003A76 2033322D6269742063- <1> db " 32-bit compound registers made of two 16-bit registers (eg DXAX)",13,10 1624 00003A7F 6F6D706F756E642072- <1> 1624 00003A88 656769737465727320- <1> 1624 00003A91 6D616465206F662074- <1> 1624 00003A9A 776F2031362D626974- <1> 1624 00003AA3 207265676973746572- <1> 1624 00003AAC 732028656720445841- <1> 1624 00003AB5 58290D0A <1> 1625 00003AB9 2033322D6269742072- <1> db " 32-bit registers and FS, GS only if running on a 386+",13,10 1625 00003AC2 656769737465727320- <1> 1625 00003ACB 616E642046532C2047- <1> 1625 00003AD4 53206F6E6C79206966- <1> 1625 00003ADD 2072756E6E696E6720- <1> 1625 00003AE6 6F6E2061203338362B- <1> 1625 00003AEF 0D0A <1> 1626 <1> %if 0 && _MMXSUPP 1627 <1> db " 64-bit MMX registers only if running on a CPU with MMX (r/o for now)",13,10 1628 <1> db " MM0L, MM(0)L accesses the low 32 bits of the register",13,10 1629 <1> db " MM0H, MM(0)H accesses the high 32 bits of the register",13,10 1630 <1> db " MM0Z, MM(0)Z reads the low 32 bits; writes the full register (zero-extend)",13,10 1631 <1> db " MM0S, MM(0)S reads the low 32 bits; writes the full register (sign-extend)",13,10 1632 <1> db " MM0, MM(0) is an alias for the MM0Z syntax",13,10 1633 <1> %endif 1634 <1> %if _VARIABLES 1635 00003AF1 2033322D6269742076- <1> db " 32-bit variables V00..VFF",13,10 1635 00003AFA 61726961626C657320- <1> 1635 00003B03 5630302E2E5646460D- <1> 1635 00003B0C 0A <1> 1636 <1> %endif 1637 <1> %if _OPTIONS || _PSPVARIABLES 1638 00003B0D 2033322D6269742073- <1> db " 32-bit special variable" 1638 00003B16 70656369616C207661- <1> 1638 00003B1F 726961626C65 <1> 1639 <1> %if _OPTIONS 1640 00003B25 732044434F2C204443- <1> db "s DCO, DCS, DAO, DAS, DIF, DPI" 1640 00003B2E 532C2044414F2C2044- <1> 1640 00003B37 41532C204449462C20- <1> 1640 00003B40 445049 <1> 1641 <1> %if _PSPVARIABLES 1642 00003B43 2C <1> db "," 1643 <1> %endif 1644 <1> %endif 1645 <1> %if _PSPVARIABLES 1646 00003B44 20505049 <1> db " PPI" 1647 <1> %endif 1648 00003B48 0D0A <1> db 13,10 1649 00003B4A 2031362D6269742073- <1> db " 16-bit special variables" 1649 00003B53 70656369616C207661- <1> 1649 00003B5C 726961626C6573 <1> 1650 <1> %if _OPTIONS 1651 00003B63 204450522C20445050 <1> db " DPR, DPP" 1652 <1> %if _PM 1653 00003B6C 2C20445053 <1> db ", DPS" 1654 <1> %endif 1655 <1> %if _PSPVARIABLES 1656 00003B71 2C <1> db "," 1657 <1> %endif 1658 <1> %endif 1659 <1> %if _PSPVARIABLES 1660 00003B72 205053502C20505052 <1> db " PSP, PPR" 1661 <1> %endif 1662 00003B7B 0D0A <1> db 13,10 1663 00003B7D 20202866756C6C6572- <1> db " (fuller variable reference in the manual)",13,10 1663 00003B86 207661726961626C65- <1> 1663 00003B8F 207265666572656E63- <1> 1663 00003B98 6520696E2074686520- <1> 1663 00003BA1 6D616E75616C290D0A <1> 1664 <1> %endif 1665 <1> %if _INDIRECTION 1666 00003BAA 20627974652F776F72- <1> db " byte/word/3byte/dword memory content (eg byte [seg:ofs], where both the",13,10 1666 00003BB3 642F33627974652F64- <1> 1666 00003BBC 776F7264206D656D6F- <1> 1666 00003BC5 727920636F6E74656E- <1> 1666 00003BCE 742028656720627974- <1> 1666 00003BD7 65205B7365673A6F66- <1> 1666 00003BE0 735D2C207768657265- <1> 1666 00003BE9 20626F746820746865- <1> 1666 00003BF2 0D0A <1> 1667 00003BF4 20206F7074696F6E61- <1> db " optional segment as well as the offset are expressions too)",13,10 1667 00003BFD 6C207365676D656E74- <1> 1667 00003C06 2061732077656C6C20- <1> 1667 00003C0F 617320746865206F66- <1> 1667 00003C18 667365742061726520- <1> 1667 00003C21 65787072657373696F- <1> 1667 00003C2A 6E7320746F6F290D0A <1> 1668 <1> %endif 1669 00003C33 546865206578707265- <1> db "The expression evaluator case-insensitively checks for names of variables",13,10 1669 00003C3C 7373696F6E20657661- <1> 1669 00003C45 6C7561746F72206361- <1> 1669 00003C4E 73652D696E73656E73- <1> 1669 00003C57 69746976656C792063- <1> 1669 00003C60 6865636B7320666F72- <1> 1669 00003C69 206E616D6573206F66- <1> 1669 00003C72 207661726961626C65- <1> 1669 00003C7B 730D0A <1> 1670 00003C7E 616E64207265676973- <1> db "and registers" 1670 00003C87 74657273 <1> 1671 <1> %if _INDIRECTION 1672 00003C8B 2061732077656C6C20- <1> db " as well as size specifiers" 1672 00003C94 61732073697A652073- <1> 1672 00003C9D 706563696669657273 <1> 1673 <1> %endif 1674 00003CA6 2E0D0A <1> db '.',13,10 1675 00003CA9 0D0A <1> db 13,10 1676 00003CAB 456E746572203F5220- <1> db "Enter ?R to display the recognized register names.",13,10 1676 00003CB4 746F20646973706C61- <1> 1676 00003CBD 792074686520726563- <1> 1676 00003CC6 6F676E697A65642072- <1> 1676 00003CCF 65676973746572206E- <1> 1676 00003CD8 616D65732E0D0A <1> 1677 <1> %if _VARIABLES || _OPTIONS || _PSPVARIABLES 1678 00003CDF 456E746572203F5620- <1> db "Enter ?V to display the recognized variables.",13,10 1678 00003CE8 746F20646973706C61- <1> 1678 00003CF1 792074686520726563- <1> 1678 00003CFA 6F676E697A65642076- <1> 1678 00003D03 61726961626C65732E- <1> 1678 00003D0C 0D0A <1> 1679 <1> %endif 1680 00003D0E 00 <1> asciz 1681 <1> %endif 1682 <1> 1683 <1> %if _OPTIONS 1684 <1> .ophelp: 1685 00003D0F 417661696C61626C65- <1> db "Available options: (read/write DCO, read DCS)",13,10 1685 00003D18 206F7074696F6E733A- <1> 1685 00003D21 2028726561642F7772- <1> 1685 00003D2A 6974652044434F2C20- <1> 1685 00003D33 726561642044435329- <1> 1685 00003D3C 0D0A <1> 1686 00003D3E 303030312052583A20- <1> db _4digitshex(dispregs32), " RX: 32-bit register display",13,10 1686 00003D47 33322D626974207265- <1> 1686 00003D50 676973746572206469- <1> 1686 00003D59 73706C61790D0A <1> 1687 00003D60 3030303220544D3A20- <1> db _4digitshex(traceints), " TM: trace into interrupts",13,10 1687 00003D69 747261636520696E74- <1> 1687 00003D72 6F20696E7465727275- <1> 1687 00003D7B 7074730D0A <1> 1688 00003D80 3030303420616C6C6F- <1> db _4digitshex(cpdepchars), " allow dumping of CP-dependant characters",13,10 1688 00003D89 772064756D70696E67- <1> 1688 00003D92 206F662043502D6465- <1> 1688 00003D9B 70656E64616E742063- <1> 1688 00003DA4 686172616374657273- <1> 1688 00003DAD 0D0A <1> 1689 00003DAF 3030303820616C7761- <1> db _4digitshex(fakeindos), " always assume InDOS flag non-zero, to debug DOS or TSRs",13,10 1689 00003DB8 797320617373756D65- <1> 1689 00003DC1 20496E444F5320666C- <1> 1689 00003DCA 6167206E6F6E2D7A65- <1> 1689 00003DD3 726F2C20746F206465- <1> 1689 00003DDC 62756720444F53206F- <1> 1689 00003DE5 7220545352730D0A <1> 1690 00003DED 303031302064697361- <1> db _4digitshex(nonpagingdevice)," disallow paged output to StdOut",13,10 1690 00003DF6 6C6C6F772070616765- <1> 1690 00003DFF 64206F757470757420- <1> 1690 00003E08 746F205374644F7574- <1> 1690 00003E11 0D0A <1> 1691 00003E13 3030323020616C6C6F- <1> db _4digitshex(pagingdevice), " allow paged output to non-StdOut",13,10 1691 00003E1C 77207061676564206F- <1> 1691 00003E25 757470757420746F20- <1> 1691 00003E2E 6E6F6E2D5374644F75- <1> 1691 00003E37 740D0A <1> 1692 00003E3A 303034302064697370- <1> db _4digitshex(hexrn), " display raw hexadecimal content of FPU registers",13,10 1692 00003E43 6C6179207261772068- <1> 1692 00003E4C 657861646563696D61- <1> 1692 00003E55 6C20636F6E74656E74- <1> 1692 00003E5E 206F66204650552072- <1> 1692 00003E67 65676973746572730D- <1> 1692 00003E70 0A <1> 1693 00003E71 30313030207768656E- <1> db _4digitshex(nondospaging), " when prompting during paging, do not use DOS for input",13,10 1693 00003E7A 2070726F6D7074696E- <1> 1693 00003E83 6720647572696E6720- <1> 1693 00003E8C 706167696E672C2064- <1> 1693 00003E95 6F206E6F7420757365- <1> 1693 00003E9E 20444F5320666F7220- <1> 1693 00003EA7 696E7075740D0A <1> 1694 00003EAE 3032303020646F206E- <1> db _4digitshex(nohlt), " do not execute HLT instruction to idle",13,10 1694 00003EB7 6F7420657865637574- <1> 1694 00003EC0 6520484C5420696E73- <1> 1694 00003EC9 7472756374696F6E20- <1> 1694 00003ED2 746F2069646C650D0A <1> 1695 00003EDB 3034303020646F206E- <1> db _4digitshex(biosidles), " do not idle, the keyboard BIOS idles itself",13,10 1695 00003EE4 6F742069646C652C20- <1> 1695 00003EED 746865206B6579626F- <1> 1695 00003EF6 6172642042494F5320- <1> 1695 00003EFF 69646C657320697473- <1> 1695 00003F08 656C660D0A <1> 1696 00003F0D 303830302075736520- <1> db _4digitshex(opt_userawinput)," use rawinput for int 21h interactive input",13,10 1696 00003F16 726177696E70757420- <1> 1696 00003F1F 666F7220696E742032- <1> 1696 00003F28 316820696E74657261- <1> 1696 00003F31 637469766520696E70- <1> 1696 00003F3A 75740D0A <1> 1697 00003F3E 3130303020696E2064- <1> db _4digitshex(use_si_units), " in disp_*_size use SI units (kB = 1000, etc)." 1697 00003F47 6973705F2A5F73697A- <1> 1697 00003F50 652075736520534920- <1> 1697 00003F59 756E69747320286B42- <1> 1697 00003F62 203D20313030302C20- <1> 1697 00003F6B 657463292E <1> 1698 00003F70 206F76657272696465- <1> db " overrides ",_4digitshex(use_jedec_units),"!",13,10 1698 00003F79 732032303030210D0A <1> 1699 00003F82 3230303020696E2064- <1> db _4digitshex(use_jedec_units)," in disp_*_size use JEDEC units (KB = 1024)",13,10 1699 00003F8B 6973705F2A5F73697A- <1> 1699 00003F94 6520757365204A4544- <1> 1699 00003F9D 454320756E69747320- <1> 1699 00003FA6 284B42203D20313032- <1> 1699 00003FAF 34290D0A <1> 1700 00003FB3 3430303020656E6162- <1> db _4digitshex(enable_serial), " enable serial I/O (port ",_4digitshex(_UART_BASE),"h interrupt ",_2digitshex(_INTNUM),"h)",13,10 1700 00003FBC 6C652073657269616C- <1> 1700 00003FC5 20492F4F2028706F72- <1> 1700 00003FCE 742030324638682069- <1> 1700 00003FD7 6E7465727275707420- <1> 1700 00003FE0 304268290D0A <1> 1701 00003FE6 383030302064697361- <1> db _4digitshex(int8_disable_serial), " disable serial I/O when breaking after 5 seconds Ctrl pressed",13,10 1701 00003FEF 626C65207365726961- <1> 1701 00003FF8 6C20492F4F20776865- <1> 1701 00004001 6E20627265616B696E- <1> 1701 0000400A 672061667465722035- <1> 1701 00004013 207365636F6E647320- <1> 1701 0000401C 4374726C2070726573- <1> 1701 00004025 7365640D0A <1> 1702 0000402A 303030313030303020- <1> db _8digitshex(gg_do_not_skip_bp), " gg: do not skip a breakpoint (bb or gg)",13,10 1702 00004033 67673A20646F206E6F- <1> 1702 0000403C 7420736B6970206120- <1> 1702 00004045 627265616B706F696E- <1> 1702 0000404E 7420286262206F7220- <1> 1702 00004057 6767290D0A <1> 1703 0000405C 303030323030303020- <1> db _8digitshex(gg_no_autorepeat), " gg: do not auto-repeat",13,10 1703 00004065 67673A20646F206E6F- <1> 1703 0000406E 74206175746F2D7265- <1> 1703 00004077 706561740D0A <1> 1704 0000407D 303030343030303020- <1> db _8digitshex(tp_do_not_skip_bp), " T/TP/P: do not skip a (bb) breakpoint",13,10 1704 00004086 542F54502F503A2064- <1> 1704 0000408F 6F206E6F7420736B69- <1> 1704 00004098 702061202862622920- <1> 1704 000040A1 627265616B706F696E- <1> 1704 000040AA 740D0A <1> 1705 000040AD 303030383030303020- <1> db _8digitshex(gg_bb_hit_no_repeat), " gg: do not auto-repeat after bb hit",13,10 1705 000040B6 67673A20646F206E6F- <1> 1705 000040BF 74206175746F2D7265- <1> 1705 000040C8 706561742061667465- <1> 1705 000040D1 72206262206869740D- <1> 1705 000040DA 0A <1> 1706 000040DB 303031303030303020- <1> db _8digitshex(tp_bb_hit_no_repeat), " T/TP/P: do not auto-repeat after bb hit",13,10 1706 000040E4 542F54502F503A2064- <1> 1706 000040ED 6F206E6F7420617574- <1> 1706 000040F6 6F2D72657065617420- <1> 1706 000040FF 616674657220626220- <1> 1706 00004108 6869740D0A <1> 1707 0000410D 303032303030303020- <1> db _8digitshex(gg_unexpected_no_repeat)," gg: do not auto-repeat after unexpectedinterrupt",13,10 1707 00004116 67673A20646F206E6F- <1> 1707 0000411F 74206175746F2D7265- <1> 1707 00004128 706561742061667465- <1> 1707 00004131 7220756E6578706563- <1> 1707 0000413A 746564696E74657272- <1> 1707 00004143 7570740D0A <1> 1708 00004148 303034303030303020- <1> db _8digitshex(tp_unexpected_no_repeat)," T/TP/P: do not auto-repeat after unexpectedinterrupt",13,10 1708 00004151 542F54502F503A2064- <1> 1708 0000415A 6F206E6F7420617574- <1> 1708 00004163 6F2D72657065617420- <1> 1708 0000416C 616674657220756E65- <1> 1708 00004175 78706563746564696E- <1> 1708 0000417E 746572727570740D0A <1> 1709 00004187 303038303030303020- <1> db _8digitshex(ss_no_dump), " S: do not dump data after matches",13,10 1709 00004190 533A20646F206E6F74- <1> 1709 00004199 2064756D7020646174- <1> 1709 000041A2 61206166746572206D- <1> 1709 000041AB 6174636865730D0A <1> 1710 000041B3 313030303030303020- <1> db _8digitshex(rr_disasm_no_rept), " R: do not repeat disassembly",13,10 1710 000041BC 523A20646F206E6F74- <1> 1710 000041C5 207265706561742064- <1> 1710 000041CE 6973617373656D626C- <1> 1710 000041D7 790D0A <1> 1711 000041DA 323030303030303020- <1> db _8digitshex(rr_disasm_no_show), " R: do not show memory reference in disassembly",13,10 1711 000041E3 523A20646F206E6F74- <1> 1711 000041EC 2073686F77206D656D- <1> 1711 000041F5 6F7279207265666572- <1> 1711 000041FE 656E636520696E2064- <1> 1711 00004207 6973617373656D626C- <1> 1711 00004210 790D0A <1> 1712 00004213 343030303030303020- <1> db _8digitshex(opt_cmdline_quiet_input)," quiet command line buffer input",13,10 1712 0000421C 717569657420636F6D- <1> 1712 00004225 6D616E64206C696E65- <1> 1712 0000422E 206275666665722069- <1> 1712 00004237 6E7075740D0A <1> 1713 0000423D 383030303030303020- <1> db _8digitshex(opt_cmdline_quiet_output)," quiet command line buffer output",13,10 1713 00004246 717569657420636F6D- <1> 1713 0000424F 6D616E64206C696E65- <1> 1713 00004258 20627566666572206F- <1> 1713 00004261 75747075740D0A <1> 1714 00004268 0D0A <1> db 13,10 1715 0000426A 4D6F7265206F707469- <1> db "More options: (read/write DCO2, read DCS2)",13,10 1715 00004273 6F6E733A2028726561- <1> 1715 0000427C 642F77726974652044- <1> 1715 00004285 434F322C2072656164- <1> 1715 0000428E 2044435332290D0A <1> 1716 00004296 303030312044423A20- <1> db _4digitshex(opt2_db_header), " DB: show header",13,10 1716 0000429F 73686F772068656164- <1> 1716 000042A8 65720D0A <1> 1717 000042AC 303030322044423A20- <1> db _4digitshex(opt2_db_trailer)," DB: show trailer",13,10 1717 000042B5 73686F772074726169- <1> 1717 000042BE 6C65720D0A <1> 1718 000042C3 303031302044573A20- <1> db _4digitshex(opt2_dw_header), " DW: show header",13,10 1718 000042CC 73686F772068656164- <1> 1718 000042D5 65720D0A <1> 1719 000042D9 303032302044573A20- <1> db _4digitshex(opt2_dw_trailer)," DW: show trailer",13,10 1719 000042E2 73686F772074726169- <1> 1719 000042EB 6C65720D0A <1> 1720 000042F0 303130302044443A20- <1> db _4digitshex(opt2_dd_header), " DD: show header",13,10 1720 000042F9 73686F772068656164- <1> 1720 00004302 65720D0A <1> 1721 00004306 303230302044443A20- <1> db _4digitshex(opt2_dd_trailer)," DD: show trailer",13,10 1721 0000430F 73686F772074726169- <1> 1721 00004318 6C65720D0A <1> 1722 0000431D 303830302075736520- <1> db _4digitshex(opt2_rawinput_dpmi)," use rawinput for int 21h interactive input in DPMI",13,10 1722 00004326 726177696E70757420- <1> 1722 0000432F 666F7220696E742032- <1> 1722 00004338 316820696E74657261- <1> 1722 00004341 637469766520696E70- <1> 1722 0000434A 757420696E2044504D- <1> 1722 00004353 490D0A <1> 1723 00004356 3130303020483A2073- <1> db _4digitshex(opt2_hh_compat), " H: stay compatible to MS-DOS Debug",13,10 1723 0000435F 74617920636F6D7061- <1> 1723 00004368 7469626C6520746F20- <1> 1723 00004371 4D532D444F53204465- <1> 1723 0000437A 6275670D0A <1> 1724 0000437F 323030302069646C65- <1> db _4digitshex(opt2_getc_idle), " idle and check for Ctrl-C in getc",13,10 1724 00004388 20616E642063686563- <1> 1724 00004391 6B20666F7220437472- <1> 1724 0000439A 6C2D4320696E206765- <1> 1724 000043A3 74630D0A <1> 1725 000043A7 343030302069646C65- <1> db _4digitshex(opt2_getc_idle_dpmi)," idle and check for Ctrl-C in getc in DPMI",13,10 1725 000043B0 20616E642063686563- <1> 1725 000043B9 6B20666F7220437472- <1> 1725 000043C2 6C2D4320696E206765- <1> 1725 000043CB 746320696E2044504D- <1> 1725 000043D4 490D0A <1> 1726 000043D7 3830303020542F5450- <1> db _4digitshex(opt2_re_cancel_tpg)," T/TP/P/G: cancel run after RE command buffer execution",13,10 1726 000043E0 2F502F473A2063616E- <1> 1726 000043E9 63656C2072756E2061- <1> 1726 000043F2 667465722052452063- <1> 1726 000043FB 6F6D6D616E64206275- <1> 1726 00004404 666665722065786563- <1> 1726 0000440D 7574696F6E0D0A <1> 1727 00004414 0D0A <1> db 13,10 1728 00004416 4D6F7265206F707469- <1> db "More options: (read/write DCO3, read DCS3)",13,10 1728 0000441F 6F6E733A2028726561- <1> 1728 00004428 642F77726974652044- <1> 1728 00004431 434F332C2072656164- <1> 1728 0000443A 2044435333290D0A <1> 1729 00004442 3030303120543A2064- <1> db _4digitshex(opt3_tt_no_paging)," T: do not page output",13,10 1729 0000444B 6F206E6F7420706167- <1> 1729 00004454 65206F75747075740D- <1> 1729 0000445D 0A <1> 1730 0000445E 303030322054503A20- <1> db _4digitshex(opt3_tp_no_paging)," TP: do not page output",13,10 1730 00004467 646F206E6F74207061- <1> 1730 00004470 6765206F7574707574- <1> 1730 00004479 0D0A <1> 1731 0000447B 3030303420503A2064- <1> db _4digitshex(opt3_pp_no_paging)," P: do not page output",13,10 1731 00004484 6F206E6F7420706167- <1> 1731 0000448D 65206F75747075740D- <1> 1731 00004496 0A <1> 1732 00004497 3030303820473A2064- <1> db _4digitshex(opt3_gg_no_paging)," G: do not page output",13,10 1732 000044A0 6F206E6F7420706167- <1> 1732 000044A9 65206F75747075740D- <1> 1732 000044B2 0A <1> 1733 000044B3 3031303020542F5450- <1> db _4digitshex(opt3_silence_paging_set), " T/TP/P: modify paging for silent dump",13,10 1733 000044BC 2F503A206D6F646966- <1> 1733 000044C5 7920706167696E6720- <1> 1733 000044CE 666F722073696C656E- <1> 1733 000044D7 742064756D700D0A <1> 1734 000044DF 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 1734 000044E8 2F503A206966203031- <1> 1734 000044F1 3030207365743A2074- <1> 1734 000044FA 75726E20706167696E- <1> 1734 00004503 67206F6E2C20656C73- <1> 1734 0000450C 65206F66660D0A <1> 1735 00004513 30313030303020523A- <1> db _6digitshex(opt3_r_highlight_diff), " R: highlight changed digits (needs ANSI for DOS output)",13,10 1735 0000451C 20686967686C696768- <1> 1735 00004525 74206368616E676564- <1> 1735 0000452E 206469676974732028- <1> 1735 00004537 6E6565647320414E53- <1> 1735 00004540 4920666F7220444F53- <1> 1735 00004549 206F7574707574290D- <1> 1735 00004552 0A <1> 1736 00004553 30323030303020523A- <1> db _6digitshex(opt3_r_highlight_dumb), " R: highlight escape sequences to int 10h, else video attributes",13,10 1736 0000455C 20686967686C696768- <1> 1736 00004565 742065736361706520- <1> 1736 0000456E 73657175656E636573- <1> 1736 00004577 20746F20696E742031- <1> 1736 00004580 30682C20656C736520- <1> 1736 00004589 766964656F20617474- <1> 1736 00004592 726962757465730D0A <1> 1737 0000459B 30343030303020523A- <1> db _6digitshex(opt3_r_highlight_full), " R: highlight changed registers (overrides ",_6digitshex(opt3_r_highlight_diff),")",13,10 1737 000045A4 20686967686C696768- <1> 1737 000045AD 74206368616E676564- <1> 1737 000045B6 207265676973746572- <1> 1737 000045BF 7320286F7665727269- <1> 1737 000045C8 646573203031303030- <1> 1737 000045D1 30290D0A <1> 1738 000045D5 30383030303020523A- <1> db _6digitshex(opt3_r_highlight_eip), " R: include highlighting of EIP",13,10 1738 000045DE 20696E636C75646520- <1> 1738 000045E7 686967686C69676874- <1> 1738 000045F0 696E67206F66204549- <1> 1738 000045F9 500D0A <1> 1739 <1> %if _PM 1740 000045FC 313030303030207365- <1> db _6digitshex(opt3_ss_b_bit_set), " set PM ss B bit",13,10 1740 00004605 7420504D2073732042- <1> 1740 0000460E 206269740D0A <1> 1741 <1> %if _BREAK_INSTALLDPMI 1742 00004614 323030303030206272- <1> db _6digitshex(opt3_break_installdpmi), " break on entering Protected Mode",13,10 1742 0000461D 65616B206F6E20656E- <1> 1742 00004626 746572696E67205072- <1> 1742 0000462F 6F746563746564204D- <1> 1742 00004638 6F64650D0A <1> 1743 <1> %endif 1744 <1> %endif 1745 0000463D 303230303030303020- <1> db _8digitshex(opt3_no_idle_2F), " do not call int 2F.1680 for idling",13,10 1745 00004646 646F206E6F74206361- <1> 1745 0000464F 6C6C20696E74203246- <1> 1745 00004658 2E3136383020666F72- <1> 1745 00004661 2069646C696E670D0A <1> 1746 <1> %if _DELAY_BEFORE_BP 1747 0000466A 303430303030303020- <1> db _8digitshex(opt3_delay_before_bp), " delay for a tick before writing breakpoints",13,10 1747 00004673 64656C617920666F72- <1> 1747 0000467C 2061207469636B2062- <1> 1747 00004685 65666F726520777269- <1> 1747 0000468E 74696E672062726561- <1> 1747 00004697 6B706F696E74730D0A <1> 1748 <1> %endif 1749 000046A0 303830303030303020- <1> db _8digitshex(opt3_no_call_update), " do not call other lDebug instance's Update IISP Header call",13,10 1749 000046A9 646F206E6F74206361- <1> 1749 000046B2 6C6C206F7468657220- <1> 1749 000046BB 6C446562756720696E- <1> 1749 000046C4 7374616E6365277320- <1> 1749 000046CD 557064617465204949- <1> 1749 000046D6 535020486561646572- <1> 1749 000046DF 2063616C6C0D0A <1> 1750 000046E6 313030303030303020- <1> db _8digitshex(opt3_disable_autorepeat), " disable auto-repeat",13,10 1750 000046EF 64697361626C652061- <1> 1750 000046F8 75746F2D7265706561- <1> 1750 00004701 740D0A <1> 1751 00004704 323030303030303020- <1> db _8digitshex(opt3_check_ctrlc_keyb), " check int 16h buffer for Control-C if inputting from int 16h",13,10 1751 0000470D 636865636B20696E74- <1> 1751 00004716 203136682062756666- <1> 1751 0000471F 657220666F7220436F- <1> 1751 00004728 6E74726F6C2D432069- <1> 1751 00004731 6620696E7075747469- <1> 1751 0000473A 6E672066726F6D2069- <1> 1751 00004743 6E74203136680D0A <1> 1752 0000474B 343030303030303020- <1> db _8digitshex(opt3_check_ctrlc_0bh), " call DOS service 0Bh to check for Control-C",13,10 1752 00004754 63616C6C20444F5320- <1> 1752 0000475D 736572766963652030- <1> 1752 00004766 426820746F20636865- <1> 1752 0000476F 636B20666F7220436F- <1> 1752 00004778 6E74726F6C2D430D0A <1> 1753 00004781 383030303030303020- <1> db _8digitshex(opt3_tsr_quit_leave_tf), " when Q command is used while TSR, leave TF as is",13,10 1753 0000478A 7768656E205120636F- <1> 1753 00004793 6D6D616E6420697320- <1> 1753 0000479C 75736564207768696C- <1> 1753 000047A5 65205453522C206C65- <1> 1753 000047AE 617665205446206173- <1> 1753 000047B7 2069730D0A <1> 1754 000047BC 0D0A <1> db 13,10 1755 000047BE 4D6F7265206F707469- <1> db "More options: (read/write DCO4, read DCS4)",13,10 1755 000047C7 6F6E733A2028726561- <1> 1755 000047D0 642F77726974652044- <1> 1755 000047D9 434F342C2072656164- <1> 1755 000047E2 2044435334290D0A <1> 1756 <1> %if _PM 1757 000047EA 3030303220656E6162- <1> db _4digitshex(opt4_int_2F_hook)," enable interrupt 2Fh hook while in 86 Mode",13,10 1757 000047F3 6C6520696E74657272- <1> 1757 000047FC 757074203246682068- <1> 1757 00004805 6F6F6B207768696C65- <1> 1757 0000480E 20696E203836204D6F- <1> 1757 00004817 64650D0A <1> 1758 <1> %endif 1759 0000481B 3030303420656E6162- <1> db _4digitshex(opt4_int_08_hook)," enable interrupt 8 hook",13,10 1759 00004824 6C6520696E74657272- <1> 1759 0000482D 757074203820686F6F- <1> 1759 00004836 6B0D0A <1> 1760 00004839 3030303820656E6162- <1> db _4digitshex(opt4_int_2D_hook)," enable interrupt 2Dh hook",13,10 1760 00004842 6C6520696E74657272- <1> 1760 0000484B 757074203244682068- <1> 1760 00004854 6F6F6B0D0A <1> 1761 00004859 303030313030303020- <1> db _8digitshex(opt4_int_serial_force)," force serial interrupt unhooking",13,10 1761 00004862 666F72636520736572- <1> 1761 0000486B 69616C20696E746572- <1> 1761 00004874 7275707420756E686F- <1> 1761 0000487D 6F6B696E670D0A <1> 1762 <1> %if _PM 1763 00004884 303030323030303020- <1> db _8digitshex(opt4_int_2F_force)," force interrupt 2Fh unhooking",13,10 1763 0000488D 666F72636520696E74- <1> 1763 00004896 657272757074203246- <1> 1763 0000489F 6820756E686F6F6B69- <1> 1763 000048A8 6E670D0A <1> 1764 <1> %endif 1765 000048AC 303030343030303020- <1> db _8digitshex(opt4_int_08_force)," force interrupt 8 unhooking",13,10 1765 000048B5 666F72636520696E74- <1> 1765 000048BE 657272757074203820- <1> 1765 000048C7 756E686F6F6B696E67- <1> 1765 000048D0 0D0A <1> 1766 000048D2 303030383030303020- <1> db _8digitshex(opt4_int_2D_force)," force interrupt 2Dh unhooking",13,10 1766 000048DB 666F72636520696E74- <1> 1766 000048E4 657272757074203244- <1> 1766 000048ED 6820756E686F6F6B69- <1> 1766 000048F6 6E670D0A <1> 1767 000048FA 303130303030303020- <1> db _8digitshex(opt4_int_00_force)," force interrupt 0 unhooking",13,10 1767 00004903 666F72636520696E74- <1> 1767 0000490C 657272757074203020- <1> 1767 00004915 756E686F6F6B696E67- <1> 1767 0000491E 0D0A <1> 1768 00004920 303230303030303020- <1> db _8digitshex(opt4_int_01_force)," force interrupt 1 unhooking",13,10 1768 00004929 666F72636520696E74- <1> 1768 00004932 657272757074203120- <1> 1768 0000493B 756E686F6F6B696E67- <1> 1768 00004944 0D0A <1> 1769 00004946 303430303030303020- <1> db _8digitshex(opt4_int_03_force)," force interrupt 3 unhooking",13,10 1769 0000494F 666F72636520696E74- <1> 1769 00004958 657272757074203320- <1> 1769 00004961 756E686F6F6B696E67- <1> 1769 0000496A 0D0A <1> 1770 0000496C 303830303030303020- <1> db _8digitshex(opt4_int_06_force)," force interrupt 6 unhooking",13,10 1770 00004975 666F72636520696E74- <1> 1770 0000497E 657272757074203620- <1> 1770 00004987 756E686F6F6B696E67- <1> 1770 00004990 0D0A <1> 1771 00004992 313030303030303020- <1> db _8digitshex(opt4_int_18_force)," force interrupt 18h unhooking",13,10 1771 0000499B 666F72636520696E74- <1> 1771 000049A4 657272757074203138- <1> 1771 000049AD 6820756E686F6F6B69- <1> 1771 000049B6 6E670D0A <1> 1772 000049BA 323030303030303020- <1> db _8digitshex(opt4_int_19_force)," force interrupt 19h unhooking",13,10 1772 000049C3 666F72636520696E74- <1> 1772 000049CC 657272757074203139- <1> 1772 000049D5 6820756E686F6F6B69- <1> 1772 000049DE 6E670D0A <1> 1773 000049E2 0D0A <1> db 13,10 1774 000049E4 496E7465726E616C20- <1> db "Internal flags: (read DIF)",13,10 1774 000049ED 666C6167733A202872- <1> 1774 000049F6 65616420444946290D- <1> 1774 000049FF 0A <1> 1775 00004A00 30303030303120496E- <1> db _6digitshex(oldpacket), " Int25/Int26 packet method available",13,10 1775 00004A09 7432352F496E743236- <1> 1775 00004A12 207061636B6574206D- <1> 1775 00004A1B 6574686F6420617661- <1> 1775 00004A24 696C61626C650D0A <1> 1776 00004A2C 30303030303220496E- <1> db _6digitshex(newpacket), " Int21.7305 packet method available",13,10 1776 00004A35 7432312E3733303520- <1> 1776 00004A3E 7061636B6574206D65- <1> 1776 00004A47 74686F642061766169- <1> 1776 00004A50 6C61626C650D0A <1> 1777 <1> %if _VDD 1778 00004A57 303030303034205644- <1> db _6digitshex(ntpacket), " VDD registered and usable",13,10 1778 00004A60 442072656769737465- <1> 1778 00004A69 72656420616E642075- <1> 1778 00004A72 7361626C650D0A <1> 1779 <1> %endif 1780 00004A79 30303030303820696E- <1> db _6digitshex(pagedcommand), " internal flag for paged output",13,10 1780 00004A82 7465726E616C20666C- <1> 1780 00004A8B 616720666F72207061- <1> 1780 00004A94 676564206F75747075- <1> 1780 00004A9D 740D0A <1> 1781 00004AA0 303030303130204445- <1> db _6digitshex(notstdinput), " DEBUG's input isn't StdIn",13,10 1781 00004AA9 425547277320696E70- <1> 1781 00004AB2 75742069736E277420- <1> 1781 00004ABB 537464496E0D0A <1> 1782 00004AC2 303030303230204445- <1> db _6digitshex(inputfile), " DEBUG's input is a file",13,10 1782 00004ACB 425547277320696E70- <1> 1782 00004AD4 757420697320612066- <1> 1782 00004ADD 696C650D0A <1> 1783 00004AE2 303030303430204445- <1> db _6digitshex(notstdoutput), " DEBUG's output isn't StdOut",13,10 1783 00004AEB 4255472773206F7574- <1> 1783 00004AF4 7075742069736E2774- <1> 1783 00004AFD 205374644F75740D0A <1> 1784 00004B06 303030303830204445- <1> db _6digitshex(outputfile), " DEBUG's output is a file",13,10 1784 00004B0F 4255472773206F7574- <1> 1784 00004B18 707574206973206120- <1> 1784 00004B21 66696C650D0A <1> 1785 <1> %if _PM 1786 00004B27 30303031303020496E- <1> db _6digitshex(hooked2F), " Int2F.1687 hooked",13,10 1786 00004B30 7432462E3136383720- <1> 1786 00004B39 686F6F6B65640D0A <1> 1787 00004B41 30303032303020496E- <1> db _6digitshex(nohook2F), " Int2F.1687 won't be hooked",13,10 1787 00004B4A 7432462E3136383720- <1> 1787 00004B53 776F6E277420626520- <1> 1787 00004B5C 686F6F6B65640D0A <1> 1788 00004B64 30303034303020646F- <1> db _6digitshex(dpminohlt), " do not execute HLT to idle in PM",13,10 1788 00004B6D 206E6F742065786563- <1> 1788 00004B76 75746520484C542074- <1> 1788 00004B7F 6F2069646C6520696E- <1> 1788 00004B88 20504D0D0A <1> 1789 00004B8D 30303038303020696E- <1> db _6digitshex(protectedmode), " in protected mode",13,10 1789 00004B96 2070726F7465637465- <1> 1789 00004B9F 64206D6F64650D0A <1> 1790 <1> %endif 1791 00004BA7 303031303030207374- <1> db _6digitshex(debuggeeA20), " state of debuggee's A20",13,10 1791 00004BB0 617465206F66206465- <1> 1791 00004BB9 627567676565277320- <1> 1791 00004BC2 4132300D0A <1> 1792 00004BC7 303032303030207374- <1> db _6digitshex(debuggerA20), " state of debugger's A20 (not implemented: same as previous)",13,10 1792 00004BD0 617465206F66206465- <1> 1792 00004BD9 627567676572277320- <1> 1792 00004BE2 41323020286E6F7420- <1> 1792 00004BEB 696D706C656D656E74- <1> 1792 00004BF4 65643A2073616D6520- <1> 1792 00004BFD 61732070726576696F- <1> 1792 00004C06 7573290D0A <1> 1793 <1> %if _BOOTLDR 1794 00004C0B 303034303030206465- <1> db _6digitshex(nodosloaded), " debugger booted independent of a DOS",13,10 1794 00004C14 62756767657220626F- <1> 1794 00004C1D 6F74656420696E6465- <1> 1794 00004C26 70656E64656E74206F- <1> 1794 00004C2F 66206120444F530D0A <1> 1795 <1> %endif 1796 00004C38 303038303030204350- <1> db _6digitshex(has386), " CPU is at least a 386 (32-bit CPU)",13,10 1796 00004C41 55206973206174206C- <1> 1796 00004C4A 656173742061203338- <1> 1796 00004C53 36202833322D626974- <1> 1796 00004C5C 20435055290D0A <1> 1797 00004C63 30313030303020696E- <1> db _6digitshex(usecharcounter), " internal flag for tab output processing",13,10 1797 00004C6C 7465726E616C20666C- <1> 1797 00004C75 616720666F72207461- <1> 1797 00004C7E 62206F757470757420- <1> 1797 00004C87 70726F63657373696E- <1> 1797 00004C90 670D0A <1> 1798 <1> %if _VDD 1799 00004C93 303230303030207275- <1> db _6digitshex(runningnt), " running inside NTVDM",13,10 1799 00004C9C 6E6E696E6720696E73- <1> 1799 00004CA5 696465204E5456444D- <1> 1799 00004CAE 0D0A <1> 1800 <1> %endif 1801 <1> %if _PM 1802 00004CB0 303430303030204450- <1> db _6digitshex(canswitchmode), " DPMI raw mode switch usable to set breakpoints",13,10 1802 00004CB9 4D4920726177206D6F- <1> 1802 00004CC2 646520737769746368- <1> 1802 00004CCB 20757361626C652074- <1> 1802 00004CD4 6F2073657420627265- <1> 1802 00004CDD 616B706F696E74730D- <1> 1802 00004CE6 0A <1> 1803 00004CE7 30383030303020696E- <1> db _6digitshex(modeswitched), " internal flag for mode switching",13,10 1803 00004CF0 7465726E616C20666C- <1> 1803 00004CF9 616720666F72206D6F- <1> 1803 00004D02 646520737769746368- <1> 1803 00004D0B 696E670D0A <1> 1804 <1> %endif 1805 00004D10 31303030303020696E- <1> db _6digitshex(promptwaiting), " internal flag for paged output",13,10 1805 00004D19 7465726E616C20666C- <1> 1805 00004D22 616720666F72207061- <1> 1805 00004D2B 676564206F75747075- <1> 1805 00004D34 740D0A <1> 1806 <1> %if _PM 1807 00004D37 32303030303020696E- <1> db _6digitshex(switchbuffer), " internal flag for mode switching",13,10 1807 00004D40 7465726E616C20666C- <1> 1807 00004D49 616720666F72206D6F- <1> 1807 00004D52 646520737769746368- <1> 1807 00004D5B 696E670D0A <1> 1808 <1> %endif 1809 <1> %if _TSR 1810 00004D60 34303030303020696E- <1> db _6digitshex(tsrmode), " in TSR mode (detached debugger process)",13,10 1810 00004D69 20545352206D6F6465- <1> 1810 00004D72 202864657461636865- <1> 1810 00004D7B 642064656275676765- <1> 1810 00004D84 722070726F63657373- <1> 1810 00004D8D 290D0A <1> 1811 <1> %endif 1812 <1> %if _DOSEMU 1813 00004D90 303130303030303020- <1> db _8digitshex(runningdosemu), " running inside dosemu",13,10 1813 00004D99 72756E6E696E672069- <1> 1813 00004DA2 6E7369646520646F73- <1> 1813 00004DAB 656D750D0A <1> 1814 <1> %endif 1815 00004DB0 3034303030303030 <1> db _8digitshex(tt_while) 1816 00004DB8 20542F54502F503A20- <1> db " T/TP/P: while condition specified",13,10 1816 00004DC1 7768696C6520636F6E- <1> 1816 00004DCA 646974696F6E207370- <1> 1816 00004DD3 656369666965640D0A <1> 1817 00004DDC 3038303030303030 <1> db _8digitshex(tt_p) 1818 00004DE4 2054503A2050207370- <1> db " TP: P specified (proceed past string ops)",13,10 1818 00004DED 656369666965642028- <1> 1818 00004DF6 70726F636565642070- <1> 1818 00004DFF 61737420737472696E- <1> 1818 00004E08 67206F7073290D0A <1> 1819 00004E10 3130303030303030 <1> db _8digitshex(tt_silent_mode) 1820 00004E18 20542F54502F503A20- <1> db " T/TP/P: silent mode (SILENT specified)",13,10 1820 00004E21 73696C656E74206D6F- <1> 1820 00004E2A 6465202853494C454E- <1> 1820 00004E33 542073706563696669- <1> 1820 00004E3C 6564290D0A <1> 1821 00004E41 3230303030303030 <1> db _8digitshex(tt_silence) 1822 00004E49 20542F54502F503A20- <1> db " T/TP/P: silent mode is active, writing to silent buffer",13,10 1822 00004E52 73696C656E74206D6F- <1> 1822 00004E5B 646520697320616374- <1> 1822 00004E64 6976652C2077726974- <1> 1822 00004E6D 696E6720746F207369- <1> 1822 00004E76 6C656E742062756666- <1> 1822 00004E7F 65720D0A <1> 1823 00004E83 0D0A <1> db 13,10 1824 00004E85 417661696C61626C65- <1> db "Available assembler/disassembler options: (read/write DAO, read DAS)",13,10 1824 00004E8E 20617373656D626C65- <1> 1824 00004E97 722F64697361737365- <1> 1824 00004EA0 6D626C6572206F7074- <1> 1824 00004EA9 696F6E733A20287265- <1> 1824 00004EB2 61642F777269746520- <1> 1824 00004EBB 44414F2C2072656164- <1> 1824 00004EC4 20444153290D0A <1> 1825 00004ECB 303120446973617373- <1> db _2digitshex(disasm_lowercase), " Disassembler: lowercase output",13,10 1825 00004ED4 656D626C65723A206C- <1> 1825 00004EDD 6F7765726361736520- <1> 1825 00004EE6 6F75747075740D0A <1> 1826 00004EEE 303220446973617373- <1> db _2digitshex(disasm_commablank)," Disassembler: output blank behind comma",13,10 1826 00004EF7 656D626C65723A206F- <1> 1826 00004F00 757470757420626C61- <1> 1826 00004F09 6E6B20626568696E64- <1> 1826 00004F12 20636F6D6D610D0A <1> 1827 00004F1A 303420446973617373- <1> db _2digitshex(disasm_nasm), " Disassembler: output addresses in NASM syntax",13,10 1827 00004F23 656D626C65723A206F- <1> 1827 00004F2C 757470757420616464- <1> 1827 00004F35 72657373657320696E- <1> 1827 00004F3E 204E41534D2073796E- <1> 1827 00004F47 7461780D0A <1> 1828 00004F4C 3038 <1> db _2digitshex(disasm_lowercase_refmem) 1829 00004F4E 20446973617373656D- <1> db " Disassembler: lowercase referenced memory location segreg",13,10 1829 00004F57 626C65723A206C6F77- <1> 1829 00004F60 657263617365207265- <1> 1829 00004F69 666572656E63656420- <1> 1829 00004F72 6D656D6F7279206C6F- <1> 1829 00004F7B 636174696F6E207365- <1> 1829 00004F84 677265670D0A <1> 1830 00004F8A 313020446973617373- <1> db _2digitshex(disasm_show_short)," Disassembler: always show SHORT keyword",13,10 1830 00004F93 656D626C65723A2061- <1> 1830 00004F9C 6C776179732073686F- <1> 1830 00004FA5 772053484F5254206B- <1> 1830 00004FAE 6579776F72640D0A <1> 1831 00004FB6 323020446973617373- <1> db _2digitshex(disasm_show_near), " Disassembler: always show NEAR keyword",13,10 1831 00004FBF 656D626C65723A2061- <1> 1831 00004FC8 6C776179732073686F- <1> 1831 00004FD1 77204E454152206B65- <1> 1831 00004FDA 79776F72640D0A <1> 1832 00004FE1 343020446973617373- <1> db _2digitshex(disasm_show_far), " Disassembler: always show FAR keyword",13,10 1832 00004FEA 656D626C65723A2061- <1> 1832 00004FF3 6C776179732073686F- <1> 1832 00004FFC 7720464152206B6579- <1> 1832 00005005 776F72640D0A <1> 1833 0000500B 00 <1> asciz 1834 <1> %endif 1835 <1> 1836 <1> %if _VARIABLES || _OPTIONS || _PSPVARIABLES 1837 <1> .varhelp: 1838 0000500C 417661696C61626C65- <1> db "Available " 1838 00005015 20 <1> 1839 <1> %if _PSPVARIABLES && !(_VARIABLES || _OPTIONS) 1840 <1> db "read-only " 1841 <1> %endif 1842 00005016 6C4465627567207661- <1> db "lDebug variables:",13,10 1842 0000501F 726961626C65733A0D- <1> 1842 00005028 0A <1> 1843 <1> %if _VARIABLES 1844 00005029 56302E2E5646095573- <1> db "V0..VF",9,"User-specified usage",13,10 1844 00005032 65722D737065636966- <1> 1844 0000503B 696564207573616765- <1> 1844 00005044 0D0A <1> 1845 <1> %endif 1846 <1> %if _OPTIONS 1847 00005046 44434F094465627567- <1> db "DCO",9,"Debugger Common Options",13,10 1847 0000504F 67657220436F6D6D6F- <1> 1847 00005058 6E204F7074696F6E73- <1> 1847 00005061 0D0A <1> 1848 00005063 44414F094465627567- <1> db "DAO",9,"Debugger Assembler/disassembler Options",13,10 1848 0000506C 67657220417373656D- <1> 1848 00005075 626C65722F64697361- <1> 1848 0000507E 7373656D626C657220- <1> 1848 00005087 4F7074696F6E730D0A <1> 1849 <1> %endif 1850 <1> %if _OPTIONS || _PSPVARIABLES && (_OPTIONS || _VARIABLES) 1851 00005090 2054686520666F6C6C- <1> db " The following variables cannot be written:",13,10 1851 00005099 6F77696E6720766172- <1> 1851 000050A2 6961626C6573206361- <1> 1851 000050AB 6E6E6F742062652077- <1> 1851 000050B4 72697474656E3A0D0A <1> 1852 <1> %endif 1853 <1> %if _PSPVARIABLES 1854 000050BD 505350094465627567- <1> db "PSP",9,"Debuggee Process" 1854 000050C6 6765652050726F6365- <1> 1854 000050CF 7373 <1> 1855 <1> %if _PM 1856 000050D1 20286173207265616C- <1> db " (as real mode segment)" 1856 000050DA 206D6F646520736567- <1> 1856 000050E3 6D656E7429 <1> 1857 <1> %endif 1858 000050E8 0D0A <1> db 13,10 1859 000050EA 505052094465627567- <1> db "PPR",9,"Debuggee's Parent Process",13,10 1859 000050F3 676565277320506172- <1> 1859 000050FC 656E742050726F6365- <1> 1859 00005105 73730D0A <1> 1860 00005109 505049094465627567- <1> db "PPI",9,"Debuggee's Parent Process Interrupt 22h",13,10 1860 00005112 676565277320506172- <1> 1860 0000511B 656E742050726F6365- <1> 1860 00005124 737320496E74657272- <1> 1860 0000512D 757074203232680D0A <1> 1861 <1> %endif 1862 <1> %if _OPTIONS 1863 00005136 444946094465627567- <1> db "DIF",9,"Debugger Internal Flags",13,10 1863 0000513F 67657220496E746572- <1> 1863 00005148 6E616C20466C616773- <1> 1863 00005151 0D0A <1> 1864 00005153 444353094465627567- <1> db "DCS",9,"Debugger Common Startup options",13,10 1864 0000515C 67657220436F6D6D6F- <1> 1864 00005165 6E2053746172747570- <1> 1864 0000516E 206F7074696F6E730D- <1> 1864 00005177 0A <1> 1865 00005178 444153094465627567- <1> db "DAS",9,"Debugger Assembler/disassembler Startup options",13,10 1865 00005181 67657220417373656D- <1> 1865 0000518A 626C65722F64697361- <1> 1865 00005193 7373656D626C657220- <1> 1865 0000519C 53746172747570206F- <1> 1865 000051A5 7074696F6E730D0A <1> 1866 000051AD 445052094465627567- <1> db "DPR",9,"Debugger Process" 1866 000051B6 6765722050726F6365- <1> 1866 000051BF 7373 <1> 1867 <1> %if _PM 1868 000051C1 20286173205265616C- <1> db " (as Real mode segment)",13,10 1868 000051CA 206D6F646520736567- <1> 1868 000051D3 6D656E74290D0A <1> 1869 000051DA 445053094465627567- <1> db "DPS",9,"Debugger Process Selector (zero in real mode)" 1869 000051E3 6765722050726F6365- <1> 1869 000051EC 73732053656C656374- <1> 1869 000051F5 6F7220287A65726F20- <1> 1869 000051FE 696E207265616C206D- <1> 1869 00005207 6F646529 <1> 1870 <1> %endif 1871 0000520B 0D0A <1> db 13,10 1872 0000520D 445050094465627567- <1> db "DPP",9,"Debugger's Parent Process" 1872 00005216 676572277320506172- <1> 1872 0000521F 656E742050726F6365- <1> 1872 00005228 7373 <1> 1873 <1> %if _TSR 1874 0000522A 20287A65726F20696E- <1> db " (zero in TSR mode)" 1874 00005233 20545352206D6F6465- <1> 1874 0000523C 29 <1> 1875 <1> %endif 1876 0000523D 0D0A <1> db 13,10 1877 0000523F 445049094465627567- <1> db "DPI",9,"Debugger's Parent process Interrupt 22h" 1877 00005248 676572277320506172- <1> 1877 00005251 656E742070726F6365- <1> 1877 0000525A 737320496E74657272- <1> 1877 00005263 75707420323268 <1> 1878 <1> %if _TSR 1879 0000526A 20287A65726F20696E- <1> db " (zero in TSR mode)" 1879 00005273 20545352206D6F6465- <1> 1879 0000527C 29 <1> 1880 <1> %endif 1881 0000527D 0D0A <1> db 13,10 1882 0000527F 0D0A <1> db 13,10 1883 00005281 456E746572203F4F20- <1> db "Enter ?O to display the options and internal flags.",13,10 1883 0000528A 746F20646973706C61- <1> 1883 00005293 7920746865206F7074- <1> 1883 0000529C 696F6E7320616E6420- <1> 1883 000052A5 696E7465726E616C20- <1> 1883 000052AE 666C6167732E0D0A <1> 1884 <1> %endif 1885 000052B6 00 <1> asciz 1886 <1> %endif 1887 <1> %if _BOOTLDR 1888 <1> .boothelp: 1889 000052B7 426F6F74206C6F6164- <1> db "Boot loading commands:",13,10 1889 000052C0 696E6720636F6D6D61- <1> 1889 000052C9 6E64733A0D0A <1> 1890 000052CF 424F4F54204C495354- <1> db "BOOT LIST HDA",13,10 1890 000052D8 204844410D0A <1> 1891 000052DE 424F4F542044495220- <1> db "BOOT DIR [partition] [dirname]",13,10 1891 000052E7 5B706172746974696F- <1> 1891 000052F0 6E5D205B6469726E61- <1> 1891 000052F9 6D655D0D0A <1> 1892 000052FE 424F4F542052454144- <1> db "BOOT READ|WRITE [partition] segment [[HIDDEN=sector] sector] [count]",13,10 1892 00005307 7C5752495445205B70- <1> 1892 00005310 6172746974696F6E5D- <1> 1892 00005319 207365676D656E7420- <1> 1892 00005322 5B5B48494444454E3D- <1> 1892 0000532B 736563746F725D2073- <1> 1892 00005334 6563746F725D205B63- <1> 1892 0000533D 6F756E745D0D0A <1> 1893 <1> %if _DOSEMU 1894 00005344 424F4F542051554954- <1> db "BOOT QUIT",9,"[exits dosemu or shuts down using APM]",13,10 1894 0000534D 095B65786974732064- <1> 1894 00005356 6F73656D75206F7220- <1> 1894 0000535F 736875747320646F77- <1> 1894 00005368 6E207573696E672041- <1> 1894 00005371 504D5D0D0A <1> 1895 <1> %else 1896 <1> db "BOOT QUIT",9,"[shuts down using APM]",13,10 1897 <1> %endif 1898 00005376 424F4F54205B50524F- <1> db "BOOT [PROTOCOL=SECTOR] partition",13,10 1898 0000537F 544F434F4C3D534543- <1> 1898 00005388 544F525D2070617274- <1> 1898 00005391 6974696F6E0D0A <1> 1899 00005398 424F4F542050524F54- <1> db "BOOT PROTOCOL=proto [opt] [partition] [filename1] [filename2] [cmdline]",13,10 1899 000053A1 4F434F4C3D70726F74- <1> 1899 000053AA 6F205B6F70745D205B- <1> 1899 000053B3 706172746974696F6E- <1> 1899 000053BC 5D205B66696C656E61- <1> 1899 000053C5 6D65315D205B66696C- <1> 1899 000053CE 656E616D65325D205B- <1> 1899 000053D7 636D646C696E655D0D- <1> 1899 000053E0 0A <1> 1900 000053E1 0974686520666F6C6C- <1> db 9,"the following partitions may be specified:",13,10 1900 000053EA 6F77696E6720706172- <1> 1900 000053F3 746974696F6E73206D- <1> 1900 000053FC 617920626520737065- <1> 1900 00005405 6369666965643A0D0A <1> 1901 0000540E 09204844416E756D09- <1> db 9," HDAnum",9,"first hard disk, num = partition (1-4 primary, 5+ logical)",13,10 1901 00005417 666972737420686172- <1> 1901 00005420 64206469736B2C206E- <1> 1901 00005429 756D203D2070617274- <1> 1901 00005432 6974696F6E2028312D- <1> 1901 0000543B 34207072696D617279- <1> 1901 00005444 2C20352B206C6F6769- <1> 1901 0000544D 63616C290D0A <1> 1902 00005453 09204844426E756D09- <1> db 9," HDBnum",9,"second hard disk (etc), num = partition",13,10 1902 0000545C 7365636F6E64206861- <1> 1902 00005465 7264206469736B2028- <1> 1902 0000546E 657463292C206E756D- <1> 1902 00005477 203D20706172746974- <1> 1902 00005480 696F6E0D0A <1> 1903 00005485 092048444109666972- <1> db 9," HDA",9,"first hard disk (only valid for READ|WRITE|PROTOCOL=SECTOR)",13,10 1903 0000548E 737420686172642064- <1> 1903 00005497 69736B20286F6E6C79- <1> 1903 000054A0 2076616C696420666F- <1> 1903 000054A9 7220524541447C5752- <1> 1903 000054B2 4954457C50524F544F- <1> 1903 000054BB 434F4C3D534543544F- <1> 1903 000054C4 52290D0A <1> 1904 000054C8 092046444109666972- <1> db 9," FDA",9,"first floppy disk",13,10 1904 000054D1 737420666C6F707079- <1> 1904 000054DA 206469736B0D0A <1> 1905 000054E1 092046444209736563- <1> db 9," FDB",9,"second floppy disk (etc)",13,10 1905 000054EA 6F6E6420666C6F7070- <1> 1905 000054F3 79206469736B202865- <1> 1905 000054FC 7463290D0A <1> 1906 00005501 09204C445009706172- <1> db 9," LDP",9,"partition the debugger loaded from",13,10 1906 0000550A 746974696F6E207468- <1> 1906 00005513 652064656275676765- <1> 1906 0000551C 72206C6F6164656420- <1> 1906 00005525 66726F6D0D0A <1> 1907 0000552B 092059445009706172- <1> db 9," YDP",9,"partition the most recent Y command loaded from",13,10 1907 00005534 746974696F6E207468- <1> 1907 0000553D 65206D6F7374207265- <1> 1907 00005546 63656E74205920636F- <1> 1907 0000554F 6D6D616E64206C6F61- <1> 1907 00005558 6465642066726F6D0D- <1> 1907 00005561 0A <1> 1908 00005562 0920534450096C6173- <1> db 9," SDP",9,"last used partition (default if no partition specified)",13,10 1908 0000556B 742075736564207061- <1> 1908 00005574 72746974696F6E2028- <1> 1908 0000557D 64656661756C742069- <1> 1908 00005586 66206E6F2070617274- <1> 1908 0000558F 6974696F6E20737065- <1> 1908 00005598 636966696564290D0A <1> 1909 000055A1 0966696C656E616D65- <1> db 9,"filename2 may be double-slash // for none",13,10 1909 000055AA 32206D617920626520- <1> 1909 000055B3 646F75626C652D736C- <1> 1909 000055BC 617368202F2F20666F- <1> 1909 000055C5 72206E6F6E650D0A <1> 1910 000055CD 09636D646C696E6520- <1> db 9,"cmdline is only valid for lDOS, RxDOS.2, RxDOS.3 protocols",13,10 1910 000055D6 6973206F6E6C792076- <1> 1910 000055DF 616C696420666F7220- <1> 1910 000055E8 6C444F532C20527844- <1> 1910 000055F1 4F532E322C20527844- <1> 1910 000055FA 4F532E332070726F74- <1> 1910 00005603 6F636F6C730D0A <1> 1911 0000560A 0966696C6573272064- <1> db 9,"files' directory entries are loaded to 500h and 520h",13,10 1911 00005613 69726563746F727920- <1> 1911 0000561C 656E74726965732061- <1> 1911 00005625 7265206C6F61646564- <1> 1911 0000562E 20746F203530306820- <1> 1911 00005637 616E6420353230680D- <1> 1911 00005640 0A <1> 1912 00005641 0D0A <1> db 13,10 1913 00005643 417661696C61626C65- <1> db "Available protocols: (default filenames, load segment, then entrypoint)",13,10 1913 0000564C 2070726F746F636F6C- <1> 1913 00005655 733A20286465666175- <1> 1913 0000565E 6C742066696C656E61- <1> 1913 00005667 6D65732C206C6F6164- <1> 1913 00005670 207365676D656E742C- <1> 1913 00005679 207468656E20656E74- <1> 1913 00005682 7279706F696E74290D- <1> 1913 0000568B 0A <1> 1914 0000568C 204C444F5309094C44- <1> db " LDOS",9,9, "LDOS.COM or L[D]DEBUG.COM at 200h, 0:400h",13,10 1914 00005695 4F532E434F4D206F72- <1> 1914 0000569E 204C5B445D44454255- <1> 1914 000056A7 472E434F4D20617420- <1> 1914 000056B0 323030682C20303A34- <1> 1914 000056B9 3030680D0A <1> 1915 000056BE 2046524545444F5309- <1> db " FREEDOS",9,"KERNEL.SYS or METAKERN.SYS at 60h, 0:0",13,10 1915 000056C7 4B45524E454C2E5359- <1> 1915 000056D0 53206F72204D455441- <1> 1915 000056D9 4B45524E2E53595320- <1> 1915 000056E2 6174203630682C2030- <1> 1915 000056EB 3A300D0A <1> 1916 000056EF 20444F534309094950- <1> db " DOSC",9,9, "IPL.SYS at 2000h, 0:0",13,10 1916 000056F8 4C2E53595320617420- <1> 1916 00005701 32303030682C20303A- <1> 1916 0000570A 300D0A <1> 1917 0000570D 20454452444F530909- <1> db " EDRDOS",9,9,"DRBIO.SYS at 70h, 0:0",13,10 1917 00005716 445242494F2E535953- <1> 1917 0000571F 206174203730682C20- <1> 1917 00005728 303A300D0A <1> 1918 0000572D 204D53444F53360909- <1> db " MSDOS6",9,9, "IO.SYS + MSDOS.SYS at 70h, 0:0",13,10 1918 00005736 494F2E535953202B20- <1> 1918 0000573F 4D53444F532E535953- <1> 1918 00005748 206174203730682C20- <1> 1918 00005751 303A300D0A <1> 1919 00005756 204D53444F53370909- <1> db " MSDOS7",9,9, "IO.SYS at 70h, 0:200h",13,10 1919 0000575F 494F2E535953206174- <1> 1919 00005768 203730682C20303A32- <1> 1919 00005771 3030680D0A <1> 1920 00005776 2049424D444F530909- <1> db " IBMDOS",9,9, "IBMBIO.COM + IBMDOS.COM at 70h, 0:0",13,10 1920 0000577F 49424D42494F2E434F- <1> 1920 00005788 4D202B2049424D444F- <1> 1920 00005791 532E434F4D20617420- <1> 1920 0000579A 3730682C20303A300D- <1> 1920 000057A3 0A <1> 1921 000057A4 204E544C445209094E- <1> db " NTLDR",9,9, "NTLDR at 2000h, 0:0",13,10 1921 000057AD 544C44522061742032- <1> 1921 000057B6 303030682C20303A30- <1> 1921 000057BF 0D0A <1> 1922 000057C1 20424F4F544D475209- <1> db " BOOTMGR",9, "BOOTMGR at 2000h, 0:0",13,10 1922 000057CA 424F4F544D47522061- <1> 1922 000057D3 742032303030682C20- <1> 1922 000057DC 303A300D0A <1> 1923 000057E1 205258444F532E3009- <1> db " RXDOS.0",9,"RXDOSBIO.SYS + RXDOS.SYS at 70h, 0:0",13,10 1923 000057EA 5258444F5342494F2E- <1> 1923 000057F3 535953202B20525844- <1> 1923 000057FC 4F532E535953206174- <1> 1923 00005805 203730682C20303A30- <1> 1923 0000580E 0D0A <1> 1924 00005810 205258444F532E3109- <1> db " RXDOS.1",9,"RXBIO.SYS + RXDOS.SYS at 70h, 0:0",13,10 1924 00005819 525842494F2E535953- <1> 1924 00005822 202B205258444F532E- <1> 1924 0000582B 535953206174203730- <1> 1924 00005834 682C20303A300D0A <1> 1925 0000583C 205258444F532E3209- <1> db " RXDOS.2",9,"RXDOS.COM at 70h, 0:400h",13,10 1925 00005845 5258444F532E434F4D- <1> 1925 0000584E 206174203730682C20- <1> 1925 00005857 303A343030680D0A <1> 1926 0000585F 205258444F532E3309- <1> db " RXDOS.3",9,"RXDOS.COM at 200h, 0:400h",13,10 1926 00005868 5258444F532E434F4D- <1> 1926 00005871 20617420323030682C- <1> 1926 0000587A 20303A343030680D0A <1> 1927 00005883 20434841494E090942- <1> db " CHAIN",9,9,"BOOTSECT.DOS at 7C0h, -7C0h:7C00h",13,10 1927 0000588C 4F4F54534543542E44- <1> 1927 00005895 4F5320617420374330- <1> 1927 0000589E 682C202D374330683A- <1> 1927 000058A7 37433030680D0A <1> 1928 000058AE 20534543544F520909- <1> db " SECTOR",9,9,"(default) load partition boot sector or MBR",13,10 1928 000058B7 2864656661756C7429- <1> 1928 000058C0 206C6F616420706172- <1> 1928 000058C9 746974696F6E20626F- <1> 1928 000058D2 6F7420736563746F72- <1> 1928 000058DB 206F72204D42520D0A <1> 1929 000058E4 20534543544F52414C- <1> db " SECTORALT",9,"as SECTOR, but entry at 07C0h:0",13,10 1929 000058ED 540961732053454354- <1> 1929 000058F6 4F522C206275742065- <1> 1929 000058FF 6E7472792061742030- <1> 1929 00005908 374330683A300D0A <1> 1930 00005910 0D0A <1> db 13,10 1931 00005912 417661696C61626C65- <1> db "Available options:",13,10 1931 0000591B 206F7074696F6E733A- <1> 1931 00005924 0D0A <1> 1932 00005926 204D494E504152413D- <1> db " MINPARA=num",9,9, "load at least that many paragraphs",13,10 1932 0000592F 6E756D09096C6F6164- <1> 1932 00005938 206174206C65617374- <1> 1932 00005941 2074686174206D616E- <1> 1932 0000594A 792070617261677261- <1> 1932 00005953 7068730D0A <1> 1933 00005958 204D4158504152413D- <1> db " MAXPARA=num",9,9, "load at most that many paragraphs (0 = as many as fit)",13,10 1933 00005961 6E756D09096C6F6164- <1> 1933 0000596A 206174206D6F737420- <1> 1933 00005973 74686174206D616E79- <1> 1933 0000597C 207061726167726170- <1> 1933 00005985 6873202830203D2061- <1> 1933 0000598E 73206D616E79206173- <1> 1933 00005997 20666974290D0A <1> 1934 0000599E 205345474D454E543D- <1> db " SEGMENT=num",9,9, "change segment at that the kernel loads",13,10 1934 000059A7 6E756D09096368616E- <1> 1934 000059B0 6765207365676D656E- <1> 1934 000059B9 742061742074686174- <1> 1934 000059C2 20746865206B65726E- <1> 1934 000059CB 656C206C6F6164730D- <1> 1934 000059D4 0A <1> 1935 000059D5 20454E5452593D5B6E- <1> db " ENTRY=[num:]num",9,"change entrypoint (CS (relative) : IP)",13,10 1935 000059DE 756D3A5D6E756D0963- <1> 1935 000059E7 68616E676520656E74- <1> 1935 000059F0 7279706F696E742028- <1> 1935 000059F9 4353202872656C6174- <1> 1935 00005A02 69766529203A204950- <1> 1935 00005A0B 290D0A <1> 1936 00005A0E 204250423D5B6E756D- <1> db " BPB=[num:]num",9,9, "change BPB load address (segment -1 = auto-BPB)",13,10 1936 00005A17 3A5D6E756D09096368- <1> 1936 00005A20 616E67652042504220- <1> 1936 00005A29 6C6F61642061646472- <1> 1936 00005A32 65737320287365676D- <1> 1936 00005A3B 656E74202D31203D20- <1> 1936 00005A44 6175746F2D42504229- <1> 1936 00005A4D 0D0A <1> 1938 00005A4F 20434845434B4F4646- <1> db " CHECKOFFSET=num",9,"set address of word to check, must be even",13,10 1938 00005A58 5345543D6E756D0973- <1> 1938 00005A61 657420616464726573- <1> 1938 00005A6A 73206F6620776F7264- <1> 1938 00005A73 20746F20636865636B- <1> 1938 00005A7C 2C206D757374206265- <1> 1938 00005A85 206576656E0D0A <1> 1939 00005A8C 20434845434B56414C- <1> db " CHECKVALUE=num",9,9,"set value of word to check (0 = no check)",13,10 1939 00005A95 55453D6E756D090973- <1> 1939 00005A9E 65742076616C756520- <1> 1939 00005AA7 6F6620776F72642074- <1> 1939 00005AB0 6F20636865636B2028- <1> 1939 00005AB9 30203D206E6F206368- <1> 1939 00005AC2 65636B290D0A <1> 1940 00005AC8 426F6F6C65616E206F- <1> db "Boolean options: [opt=bool]",13,10 1940 00005AD1 7074696F6E733A205B- <1> 1940 00005ADA 6F70743D626F6F6C5D- <1> 1940 00005AE3 0D0A <1> 1941 00005AE5 205345545F444C5F55- <1> db " SET_DL_UNIT",9,9,"set dl to load unit",13,10 1941 00005AEE 4E4954090973657420- <1> 1941 00005AF7 646C20746F206C6F61- <1> 1941 00005B00 6420756E69740D0A <1> 1942 00005B08 205345545F424C5F55- <1> db " SET_BL_UNIT",9,9,"set bl to load unit",13,10 1942 00005B11 4E4954090973657420- <1> 1942 00005B1A 626C20746F206C6F61- <1> 1942 00005B23 6420756E69740D0A <1> 1943 00005B2B 205345545F53494449- <1> db " SET_SIDI_CLUSTER",9,"set si:di to first cluster",13,10 1943 00005B34 5F434C555354455209- <1> 1943 00005B3D 7365742073693A6469- <1> 1943 00005B46 20746F206669727374- <1> 1943 00005B4F 20636C75737465720D- <1> 1943 00005B58 0A <1> 1944 00005B59 205345545F44535349- <1> db " SET_DSSI_DPT",9,9,"set ds:si to DPT address",13,10 1944 00005B62 5F4450540909736574- <1> 1944 00005B6B 2064733A736920746F- <1> 1944 00005B74 204450542061646472- <1> 1944 00005B7D 6573730D0A <1> 1945 00005B82 20505553485F445054- <1> db " PUSH_DPT",9,9,"push DPT address and DPT entry address",13,10 1945 00005B8B 090970757368204450- <1> 1945 00005B94 542061646472657373- <1> 1945 00005B9D 20616E642044505420- <1> 1945 00005BA6 656E74727920616464- <1> 1945 00005BAF 726573730D0A <1> 1946 00005BB5 204441544153544152- <1> db " DATASTART_HIDDEN",9,"add hidden sectors to datastart var",13,10 1946 00005BBE 545F48494444454E09- <1> 1946 00005BC7 616464206869646465- <1> 1946 00005BD0 6E20736563746F7273- <1> 1946 00005BD9 20746F206461746173- <1> 1946 00005BE2 74617274207661720D- <1> 1946 00005BEB 0A <1> 1947 00005BEC 205345545F41584258- <1> db " SET_AXBX_DATASTART",9,"set ax:bx to datastart var",13,10 1947 00005BF5 5F4441544153544152- <1> 1947 00005BFE 54097365742061783A- <1> 1947 00005C07 627820746F20646174- <1> 1947 00005C10 617374617274207661- <1> 1947 00005C19 720D0A <1> 1948 00005C1C 205345545F44534250- <1> db " SET_DSBP_BPB",9,9,"set ds:bp to BPB address",13,10 1948 00005C25 5F4250420909736574- <1> 1948 00005C2E 2064733A627020746F- <1> 1948 00005C37 204250422061646472- <1> 1948 00005C40 6573730D0A <1> 1949 00005C45 204C42415F5345545F- <1> db " LBA_SET_TYPE",9,9,"set LBA partition type in BPB",13,10 1949 00005C4E 545950450909736574- <1> 1949 00005C57 204C42412070617274- <1> 1949 00005C60 6974696F6E20747970- <1> 1949 00005C69 6520696E204250420D- <1> 1949 00005C72 0A <1> 1950 00005C73 204D4553534147455F- <1> db " MESSAGE_TABLE",9,9, "provide message table pointed to at 1EEh",13,10 1950 00005C7C 5441424C4509097072- <1> 1950 00005C85 6F76696465206D6573- <1> 1950 00005C8E 73616765207461626C- <1> 1950 00005C97 6520706F696E746564- <1> 1950 00005CA0 20746F206174203145- <1> 1950 00005CA9 45680D0A <1> 1952 00005CAD 205345545F41584258- <1> db " SET_AXBX_ROOT_HIDDEN",9, "set ax:bx to root start with hidden sectors",13,10 1952 00005CB6 5F524F4F545F484944- <1> 1952 00005CBF 44454E097365742061- <1> 1952 00005CC8 783A627820746F2072- <1> 1952 00005CD1 6F6F74207374617274- <1> 1952 00005CDA 207769746820686964- <1> 1952 00005CE3 64656E20736563746F- <1> 1952 00005CEC 72730D0A <1> 1954 00005CF0 204E4F5F4250420909- <1> db " NO_BPB",9,9,9, "do not load BPB",13,10 1954 00005CF9 09646F206E6F74206C- <1> 1954 00005D02 6F6164204250420D0A <1> 1955 00005D0B 205345545F44535349- <1> db " SET_DSSI_PARTINFO",9, "load part table to 600h, point ds:si + ds:bp to it",13,10 1955 00005D14 5F50415254494E464F- <1> 1955 00005D1D 096C6F616420706172- <1> 1955 00005D26 74207461626C652074- <1> 1955 00005D2F 6F20363030682C2070- <1> 1955 00005D38 6F696E742064733A73- <1> 1955 00005D41 69202B2064733A6270- <1> 1955 00005D4A 20746F2069740D0A <1> 1956 00005D52 00 <1> asciz 1957 <1> %endif 1958 <1> %endif 1959 <1> 1960 00005D53 54686973206C446562- <1> .readonly: asciz "This lDebug variable cannot be written to. See ?V.",13,10 1960 00005D5C 756720766172696162- <1> 1960 00005D65 6C652063616E6E6F74- <1> 1960 00005D6E 206265207772697474- <1> 1960 00005D77 656E20746F2E205365- <1> 1960 00005D80 65203F562E0D0A00 <1> 1961 00005D88 54686973206D656D6F- <1> .readonly_mem: asciz "This memory variable cannot be written to.",13,10 1961 00005D91 727920766172696162- <1> 1961 00005D9A 6C652063616E6E6F74- <1> 1961 00005DA3 206265207772697474- <1> 1961 00005DAC 656E20746F2E0D0A00 <1> 1962 00005DB5 5B6D6F72655D <1> .more: db "[more]" 1963 <1> .more_size equ $-.more 1964 00005DBB 0D2020202020200D <1> .more_over: db 13," ",13 ; to overwrite previous prompt 1965 <1> .more_over_size equ $-.more_over 1966 00005DC3 5E430D0A <1> .ctrlc: db "^C",13,10 1967 <1> .ctrlc_size equ $-.ctrlc 1968 00005DC7 00 <1> asciz 1969 <1> .freedos_ctrlc_workaround: 1970 00005DC8 20284F6C6420467265- <1> asciz " (Old FreeDOS kernel Ctrl-C work around happened)",13,10 1970 00005DD1 65444F53206B65726E- <1> 1970 00005DDA 656C204374726C2D43- <1> 1970 00005DE3 20776F726B2061726F- <1> 1970 00005DEC 756E64206861707065- <1> 1970 00005DF5 6E6564290D0A00 <1> 1971 <1> .not_while_indos: 1972 00005DFC 436F6D6D616E64206E- <1> asciz "Command not supported while in InDOS mode.",13,10 1972 00005E05 6F7420737570706F72- <1> 1972 00005E0E 746564207768696C65- <1> 1972 00005E17 20696E20496E444F53- <1> 1972 00005E20 206D6F64652E0D0A00 <1> 1973 00005E29 43757272656E74206D- <1> .rv_mode.before: asciz "Current mode: " 1973 00005E32 6F64653A2000 <1> 1974 <1> %if _PM 1975 00005E38 44504D492031362D62- <1> .rv_mode_dpmi_16: asciz "DPMI 16-bit CS",13,10 1975 00005E41 69742043530D0A00 <1> 1976 00005E49 44504D492033322D62- <1> .rv_mode_dpmi_32: asciz "DPMI 32-bit CS",13,10 1976 00005E52 69742043530D0A00 <1> 1977 <1> %endif 1978 00005E5A 5265616C203836204D- <1> .rv_mode_r86m: asciz "Real 86 Mode",13,10 1978 00005E63 6F64650D0A00 <1> 1979 00005E69 5669727475616C2038- <1> .rv_mode_v86m: asciz "Virtual 86 Mode",13,10 1979 00005E72 36204D6F64650D0A00 <1> 1980 <1> 1981 00005E7B 333836207265676973- <1> .regs386: asciz "386 registers are " 1981 00005E84 746572732061726520- <1> 1981 00005E8D 00 <1> 1982 00005E8E 6E6F7420 <1> .regs386_off:db "not " 1983 00005E92 646973706C61796564- <1> .regs386_on: asciz "displayed",13,10 1983 00005E9B 0D0A00 <1> 1984 <1> 1985 <1> %if _EMS 1986 <1> .xhelp: 1987 00005E9E 457870616E64656420- <1> db "Expanded memory (EMS) commands:",13,10 1987 00005EA7 6D656D6F7279202845- <1> 1987 00005EB0 4D532920636F6D6D61- <1> 1987 00005EB9 6E64733A0D0A <1> 1988 00005EBF 2020416C6C6F636174- <1> db " Allocate",9, "XA count",13,10 1988 00005EC8 6509584120636F756E- <1> 1988 00005ED1 740D0A <1> 1989 00005ED4 20204465616C6C6F63- <1> db " Deallocate",9, "XD handle",13,10 1989 00005EDD 617465095844206861- <1> 1989 00005EE6 6E646C650D0A <1> 1990 00005EEC 20204D6170206D656D- <1> db " Map memory",9, "XM logical-page physical-page handle",13,10 1990 00005EF5 6F727909584D206C6F- <1> 1990 00005EFE 676963616C2D706167- <1> 1990 00005F07 652070687973696361- <1> 1990 00005F10 6C2D70616765206861- <1> 1990 00005F19 6E646C650D0A <1> 1991 00005F1F 20205265616C6C6F63- <1> db " Reallocate",9, "XR handle count",13,10 1991 00005F28 617465095852206861- <1> 1991 00005F31 6E646C6520636F756E- <1> 1991 00005F3A 740D0A <1> 1992 00005F3D 202053686F77207374- <1> db " Show status",9, "XS",13,10 1992 00005F46 617475730958530D0A <1> 1993 00005F4F 00 <1> asciz 1994 <1> %endif 1995 <1> 1996 <1> %if _MCB 1997 00005F50 456E64206F66206368- <1> .invmcbadr: asciz "End of chain: invalid MCB address.",13,10 1997 00005F59 61696E3A20696E7661- <1> 1997 00005F62 6C6964204D43422061- <1> 1997 00005F6B 6464726573732E0D0A- <1> 1997 00005F74 00 <1> 1998 <1> %endif 1999 <1> 2000 <1> %if _TSR 2001 00005F75 43616E6E6F7420676F- <1> .pspnotfound: asciz "Cannot go resident, child PSP not found.",13,10 2001 00005F7E 207265736964656E74- <1> 2001 00005F87 2C206368696C642050- <1> 2001 00005F90 5350206E6F7420666F- <1> 2001 00005F99 756E642E0D0A00 <1> 2002 00005FA0 43616E6E6F7420676F- <1> .psphooked: asciz "Cannot go resident, child PSP parent return address hooked.",13,10 2002 00005FA9 207265736964656E74- <1> 2002 00005FB2 2C206368696C642050- <1> 2002 00005FBB 535020706172656E74- <1> 2002 00005FC4 2072657475726E2061- <1> 2002 00005FCD 64647265737320686F- <1> 2002 00005FD6 6F6B65642E0D0A00 <1> 2003 00005FDE 506174636865642050- <1> .nowtsr1: asciz "Patched PSP at " 2003 00005FE7 53502061742000 <1> 2004 00005FEE 2C206E6F7720726573- <1> .nowtsr2: asciz ", now resident.",13,10 2004 00005FF7 6964656E742E0D0A00 <1> 2005 00006000 416C72656164792072- <1> .alreadytsr: asciz "Already resident.",13,10 2005 00006009 65736964656E742E0D- <1> 2005 00006012 0A00 <1> 2006 <1> %endif 2007 <1> %if _PM && (_TSR || _BOOTLDR) 2008 00006014 43616E6E6F74207175- <1> .cannotpmquit: asciz "Cannot quit, still in protected mode.",13,10 2008 0000601D 69742C207374696C6C- <1> 2008 00006026 20696E2070726F7465- <1> 2008 0000602F 63746564206D6F6465- <1> 2008 00006038 2E0D0A00 <1> 2009 <1> %endif 2010 <1> %if _BOOTLDR 2011 0000603C 436F6D6D616E64206E- <1> .nobootsupp: asciz "Command not supported in boot loaded mode.",13,10 2011 00006045 6F7420737570706F72- <1> 2011 0000604E 74656420696E20626F- <1> 2011 00006057 6F74206C6F61646564- <1> 2011 00006060 206D6F64652E0D0A00 <1> 2012 00006069 53687574646F776E20- <1> .boot_quit_fail:asciz "Shutdown not supported.",13,10 2012 00006072 6E6F7420737570706F- <1> 2012 0000607B 727465642E0D0A00 <1> 2013 00006083 426F6F74206661696C- <1> .bootfail: asciz "Boot failure: " 2013 0000608C 7572653A2000 <1> 2014 00006092 52656164696E672073- <1> .bootfail_read: db "Reading sector failed (error " 2014 0000609B 6563746F7220666169- <1> 2014 000060A4 6C656420286572726F- <1> 2014 000060AD 7220 <1> 2015 000060AF 5F5F68292E0D0A00 <1> .bootfail_read_errorcode: asciz "__h).",13,10 2016 000060B7 426F6F742073656374- <1> .bootfail_sig: asciz "Boot sector signature missing (is not AA55h).",13,10 2016 000060C0 6F72207369676E6174- <1> 2016 000060C9 757265206D69737369- <1> 2016 000060D2 6E6720286973206E6F- <1> 2016 000060DB 74204141353568292E- <1> 2016 000060E4 0D0A00 <1> 2017 000060E7 506172746974696F6E- <1> .bootfail_sig_parttable: ascii "Partition table signature missing" 2017 000060F0 207461626C65207369- <1> 2017 000060F9 676E6174757265206D- <1> 2017 00006102 697373696E67 <1> 2018 00006108 20286973206E6F7420- <1> asciz " (is not AA55h).",13,10 2018 00006111 4141353568292E0D0A- <1> 2018 0000611A 00 <1> 2019 0000611B 426F6F742073656374- <1> .bootfail_code: asciz "Boot sector code invalid (is 0000h).",13,10 2019 00006124 6F7220636F64652069- <1> 2019 0000612D 6E76616C6964202869- <1> 2019 00006136 73203030303068292E- <1> 2019 0000613F 0D0A00 <1> 2020 <1> .bootfail_secsizediffer: 2021 00006142 425042204270532064- <1> asciz "BPB BpS differs from actual sector size.",13,10 2021 0000614B 696666657273206672- <1> 2021 00006154 6F6D2061637475616C- <1> 2021 0000615D 20736563746F722073- <1> 2021 00006166 697A652E0D0A00 <1> 2022 <1> .bootfail_stack_underflow: 2023 0000616D 426F6F742073746163- <1> asciz "Boot stack underflowed.",13,10 2023 00006176 6B20756E646572666C- <1> 2023 0000617F 6F7765642E0D0A00 <1> 2024 <1> .bootfail_check_mismatch: 2025 00006187 436865636B206D6973- <1> db "Check mismatch, expected " 2025 00006190 6D617463682C206578- <1> 2025 00006199 70656374656420 <1> 2026 <1> .bootfail_check_mismatch.check_value: 2027 000061A0 5F5F5F5F6820617420- <1> db "____h at offset " 2027 000061A9 6F666673657420 <1> 2028 <1> .bootfail_check_mismatch.check_offset: 2029 000061B0 5F5F5F5F6820627574- <1> db "____h but has " 2029 000061B9 2068617320 <1> 2030 <1> .bootfail_check_mismatch.check_got: 2031 000061BE 5F5F5F5F682E0D0A00 <1> asciz "____h.",13,10 2032 000061C7 4F7574206F66206D65- <1> .boot_out_of_memory_error: asciz "Out of memory.", 13,10 2032 000061D0 6D6F72792E0D0A00 <1> 2033 000061D8 546F6F206D616E7920- <1> .boot_too_many_partitions_error:asciz "Too many partitions (or a loop).",13,10 2033 000061E1 706172746974696F6E- <1> 2033 000061EA 7320286F722061206C- <1> 2033 000061F3 6F6F70292E0D0A00 <1> 2034 000061FB 506172746974696F6E- <1> .boot_partition_cycle_error: asciz "Partition table cycle detected.",13,10 2034 00006204 207461626C65206379- <1> 2034 0000620D 636C65206465746563- <1> 2034 00006216 7465642E0D0A00 <1> 2035 0000621D 506172746974696F6E- <1> .boot_partition_not_found: asciz "Partition not found.",13,10 2035 00006226 206E6F7420666F756E- <1> 2035 0000622F 642E0D0A00 <1> 2036 00006234 52656164206572726F- <1> .boot_access_error: asciz "Read error.", 13,10 2036 0000623D 722E0D0A00 <1> 2037 00006242 536563746F72207369- <1> .boot_sector_too_large: asciz "Sector size too small (< 32 bytes).", 13,10 2037 0000624B 7A6520746F6F20736D- <1> 2037 00006254 616C6C20283C203332- <1> 2037 0000625D 206279746573292E0D- <1> 2037 00006266 0A00 <1> 2038 00006268 536563746F72207369- <1> .boot_sector_too_small: asciz "Sector size too large (> 8192 bytes).", 13,10 2038 00006271 7A6520746F6F206C61- <1> 2038 0000627A 72676520283E203831- <1> 2038 00006283 393220627974657329- <1> 2038 0000628C 2E0D0A00 <1> 2039 00006290 536563746F72207369- <1> .boot_sector_not_power: asciz "Sector size not a power of two.", 13,10 2039 00006299 7A65206E6F74206120- <1> 2039 000062A2 706F776572206F6620- <1> 2039 000062AB 74776F2E0D0A00 <1> 2040 000062B2 496E76616C69642067- <1> .boot_invalid_sectors: asciz "Invalid geometry sectors.", 13,10 2040 000062BB 656F6D657472792073- <1> 2040 000062C4 6563746F72732E0D0A- <1> 2040 000062CD 00 <1> 2041 000062CE 496E76616C69642067- <1> .boot_invalid_heads: asciz "Invalid geometry heads.", 13,10 2041 000062D7 656F6D657472792068- <1> 2041 000062E0 656164732E0D0A00 <1> 2042 000062E8 46696C65206E6F7420- <1> .boot_file_not_found: asciz "File not found.",13,10 2042 000062F1 666F756E642E0D0A00 <1> 2043 000062FA 46696C6520746F6F20- <1> .boot_file_too_big_error: asciz "File too big.",13,10 2043 00006303 6269672E0D0A00 <1> 2044 0000630A 46696C6520746F6F20- <1> .boot_file_too_small_error: asciz "File too small.",13,10 2044 00006313 736D616C6C2E0D0A00 <1> 2045 0000631C 42616420616D6F756E- <1> .boot_badclusters: asciz "Bad amount of clusters.",13,10 2045 00006325 74206F6620636C7573- <1> 2045 0000632E 746572732E0D0A00 <1> 2046 00006336 42616420636C757374- <1> .boot_badchain: asciz "Bad cluster chain.",13,10 2046 0000633F 657220636861696E2E- <1> 2046 00006348 0D0A00 <1> 2047 0000634B 4261642046696C6520- <1> .boot_badfat: asciz "Bad File Allocation Table.",13,10 2047 00006354 416C6C6F636174696F- <1> 2047 0000635D 6E205461626C652E0D- <1> 2047 00006366 0A00 <1> 2048 00006368 496E76616C69642066- <1> .boot_invalid_filename: asciz "Invalid filename.",13,10 2048 00006371 696C656E616D652E0D- <1> 2048 0000637A 0A00 <1> 2049 0000637C 43616E6E6F74207365- <1> .boot_cannot_set_both: asciz "Cannot set both " 2049 00006385 7420626F74682000 <1> 2050 0000638D 20616E642000 <1> .boot_and: asciz " and " 2051 00006393 2E0D0A00 <1> .boot_dot_crlf: asciz ".",13,10 2052 00006397 2120496E7465726E61- <1> .boot_internal_error: asciz "! Internal error !",13,10 2052 000063A0 6C206572726F722021- <1> 2052 000063A9 0D0A00 <1> 2053 000063AC 42504220616E64206C- <1> .boot_bpb_load_overlap: asciz "BPB and load area overlap.",13,10 2053 000063B5 6F6164206172656120- <1> 2053 000063BE 6F7665726C61702E0D- <1> 2053 000063C7 0A00 <1> 2054 000063C9 5365676D656E742074- <1> .boot_segment_too_low: asciz "Segment too low.",13,10 2054 000063D2 6F6F206C6F772E0D0A- <1> 2054 000063DB 00 <1> 2055 000063DC 42504220746F6F206C- <1> .boot_bpb_too_low: asciz "BPB too low.",13,10 2055 000063E5 6F772E0D0A00 <1> 2056 000063EB 2120496E7465726E61- <1> .boot_auxbuff_crossing: db "! Internal error !, " 2056 000063F4 6C206572726F722021- <1> 2056 000063FD 2C20 <1> 2057 000063FF 617578627566662063- <1> asciz "auxbuff crosses 64 KiB boundary.",13,10 2057 00006408 726F73736573203634- <1> 2057 00006411 204B694220626F756E- <1> 2057 0000641A 646172792E0D0A00 <1> 2058 00006422 5245414400 <1> .read: asciz "READ" 2059 00006427 575249544500 <1> .write: asciz "WRITE" 2060 0000642D 48494444454E00 <1> .hidden: asciz "HIDDEN" 2061 00006434 44495200 <1> .dir: asciz "DIR" 2062 00006438 082020205B4449525D <1> .dirinsteadsize:countedb " [DIR]" 2063 00006441 2F00 <1> .emptydirname: asciz "/" 2064 00006443 424F4F5400 <1> .boot: asciz "BOOT" 2065 00006448 5155495400 <1> .quit: asciz "QUIT" 2066 0000644D 50524F544F434F4C00 <1> .protocol: asciz "PROTOCOL" 2067 00006456 5345474D454E5400 <1> .segment: asciz "SEGMENT" 2068 0000645E 454E54525900 <1> .entry: asciz "ENTRY" 2069 00006464 42504200 <1> .bpb: asciz "BPB" 2070 00006468 4D494E5041524100 <1> .minpara: asciz "MINPARA" 2071 00006470 4D41585041524100 <1> .maxpara: asciz "MAXPARA" 2072 00006478 434845434B4F464653- <1> .checkoffset: asciz "CHECKOFFSET" 2072 00006481 455400 <1> 2073 00006484 434845434B56414C55- <1> .checkvalue: asciz "CHECKVALUE" 2073 0000648D 4500 <1> 2074 0000648F 534543544F5200 <1> .sector: asciz "SECTOR" 2075 00006496 534543544F52414C54- <1> .sector_alt: asciz "SECTORALT" 2075 0000649F 00 <1> 2076 000064A0 4B45524E454C2E5359- <1> .freedos_kernel_name: asciz "KERNEL.SYS" 2076 000064A9 5300 <1> 2077 000064AB 49504C2E53595300 <1> .dosc_kernel_name: asciz "IPL.SYS" 2078 000064B3 445242494F2E535953- <1> .edrdos_kernel_name: asciz "DRBIO.SYS" 2078 000064BC 00 <1> 2079 000064BD 4C444F532E434F4D00 <1> .ldos_kernel_name: asciz "LDOS.COM" 2080 <1> .msdos7_kernel_name: 2081 000064C6 494F2E53595300 <1> .msdos6_kernel_name: asciz "IO.SYS" 2082 000064CD 4D53444F532E535953- <1> .msdos6_add_name: asciz "MSDOS.SYS" 2082 000064D6 00 <1> 2083 000064D7 49424D42494F2E434F- <1> .ibmdos_kernel_name: asciz "IBMBIO.COM" 2083 000064E0 4D00 <1> 2084 000064E2 49424D444F532E434F- <1> .ibmdos_add_name: asciz "IBMDOS.COM" 2084 000064EB 4D00 <1> 2085 000064ED 4E544C445200 <1> .ntldr_kernel_name: asciz "NTLDR" 2086 000064F3 424F4F544D475200 <1> .bootmgr_kernel_name: asciz "BOOTMGR" 2087 000064FB 424F4F54534543542E- <1> .chain_kernel_name: asciz "BOOTSECT.DOS" 2087 00006504 444F5300 <1> 2088 00006508 5258444F5342494F2E- <1> .rxdos.0_kernel_name: asciz "RXDOSBIO.SYS" 2088 00006511 53595300 <1> 2089 00006515 525842494F2E535953- <1> .rxdos.1_kernel_name: asciz "RXBIO.SYS" 2089 0000651E 00 <1> 2090 <1> .rxdos.0_add_name: 2091 0000651F 5258444F532E535953- <1> .rxdos.1_add_name: asciz "RXDOS.SYS" 2091 00006528 00 <1> 2092 00006529 5258444F532E434F4D- <1> .rxdos.2_kernel_name: asciz "RXDOS.COM" 2092 00006532 00 <1> 2093 00006533 00 <1> .addname_empty: asciz 2094 00006534 43616E6E6F74207175- <1> .cannotbootquit_memsizes: asciz "Cannot quit, memory size changed.",13,10 2094 0000653D 69742C206D656D6F72- <1> 2094 00006546 792073697A65206368- <1> 2094 0000654F 616E6765642E0D0A00 <1> 2095 <1> %endif 2096 00006558 5448454E00 <1> .then: asciz "THEN" 2097 0000655D 4E4F5400 <1> .not: asciz "NOT" 2098 00006561 565600 <1> .vv: asciz "VV" 2099 00006564 564D00 <1> .vm: asciz "VM" 2100 00006567 565000 <1> .vp: asciz "VP" 2101 0000656A 0D436F646520736567- <1> .vm_codeseg: counted "Code segment=" 2101 00006573 6D656E743D <1> 2102 00006578 0D4461746120736567- <1> .vm_dataseg: counted "Data segment=" 2102 00006581 6D656E743D <1> 2103 00006586 0E456E747279207365- <1> .vm_entryseg: counted "Entry segment=" 2103 0000658F 676D656E743D <1> 2104 00006595 104175786275666620- <1> .vm_auxseg: counted "Auxbuff segment=" 2104 0000659E 7365676D656E743D <1> 2105 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 2106 000065A6 10486973746F727920- <1> .vm_hisseg: counted "History segment=" 2106 000065AF 7365676D656E743D <1> 2107 <1> %endif 2108 <1> %if _PM 2109 000065B7 0A2073656C6563746F- <1> .vm_selector: counted " selector=" 2109 000065C0 723D <1> 2110 <1> %endif 2111 000065C2 0D436C69656E742020- <1> .vp_pspsegment: counted "Client PSP=" 2111 000065CB 205053503D <1> 2112 000065D0 0D4465627567676572- <1> .vp_dpspsegment: counted "Debugger PSP=" 2112 000065D9 205053503D <1> 2113 <1> .vp_dparent: 2114 000065DE 0820506172656E743D <1> .vp_parent: counted " Parent=" 2115 <1> .vp_dpra: 2116 000065E7 1720506172656E7420- <1> .vp_pra: counted " Parent Return Address=" 2116 000065F0 52657475726E204164- <1> 2116 000065F9 64726573733D <1> 2117 <1> %if _PM 2118 <1> .vp_dpspsel: 2119 000065FF 0E205053502053656C- <1> .vp_pspsel: counted " PSP Selector=" 2119 00006608 6563746F723D <1> 2120 <1> %endif 2121 0000660E 546F6F206C6F6E6720- <1> .n_toolongtail: asciz "Too long N command tail!",13,10 2121 00006617 4E20636F6D6D616E64- <1> 2121 00006620 207461696C210D0A00 <1> 2122 00006629 546F6F206C6F6E6720- <1> .n_toolongname: asciz "Too long N command name!",13,10 2122 00006632 4E20636F6D6D616E64- <1> 2122 0000663B 206E616D65210D0A00 <1> 2123 00006644 4E554D42455200 <1> .number: asciz "NUMBER" 2124 0000664B 434F554E54455200 <1> .counter: asciz "COUNTER" 2125 00006653 494400 <1> .id: asciz "ID" 2126 00006656 5748454E00 <1> .when: asciz "WHEN" 2127 0000665B 4F464653455400 <1> .offset: asciz "OFFSET" 2128 00006662 3F00 <1> .questionmark: asciz "?" 2129 00006664 4F <1> .or: db "O" 2130 00006665 5200 <1> .r: asciz "R" 2131 00006667 4E4400 <1> .nd: asciz "ND" 2132 0000666A 52454D454D42455200 <1> .remember: asciz "REMEMBER" 2133 00006673 474F544F00 <1> .goto: asciz "GOTO" 2134 00006678 534F4600 <1> .sof: asciz "SOF" 2135 0000667C 454F4600 <1> .eof: asciz "EOF" 2136 00006680 4572726F723A20474F- <1> .goto_not_file: asciz "Error: GOTO command not supported when not reading a script.",13,10 2136 00006689 544F20636F6D6D616E- <1> 2136 00006692 64206E6F7420737570- <1> 2136 0000669B 706F72746564207768- <1> 2136 000066A4 656E206E6F74207265- <1> 2136 000066AD 6164696E6720612073- <1> 2136 000066B6 63726970742E0D0A00 <1> 2137 000066BF 4572726F723A20474F- <1> .goto_empty: asciz "Error: GOTO needs a destination label.",13,10 2137 000066C8 544F206E6565647320- <1> 2137 000066D1 612064657374696E61- <1> 2137 000066DA 74696F6E206C616265- <1> 2137 000066E3 6C2E0D0A00 <1> 2138 000066E8 4572726F723A20474F- <1> .goto_not_found.1: asciz "Error: GOTO destination label ",'"' 2138 000066F1 544F2064657374696E- <1> 2138 000066FA 6174696F6E206C6162- <1> 2138 00006703 656C202200 <1> 2139 00006708 22206E6F7420666F75- <1> .goto_not_found.2: asciz '"'," not found.",13,10 2139 00006711 6E642E0D0A00 <1> 2140 00006717 4572726F723A206175- <1> .guard_auxbuff_error: asciz "Error: auxbuff already guarded!",13,10 2140 00006720 786275666620616C72- <1> 2140 00006729 656164792067756172- <1> 2140 00006732 646564210D0A00 <1> 2141 00006739 4572726F723A20436F- <1> .guard_re_error: asciz "Error: Command not supported while reading from RE buffer.",13,10 2141 00006742 6D6D616E64206E6F74- <1> 2141 0000674B 20737570706F727465- <1> 2141 00006754 64207768696C652072- <1> 2141 0000675D 656164696E67206672- <1> 2141 00006766 6F6D20524520627566- <1> 2141 0000676F 6665722E0D0A00 <1> 2142 00006776 4572726F723A20436F- <1> .guard_rc_error: asciz "Error: Command not supported while reading from RC buffer.",13,10 2142 0000677F 6D6D616E64206E6F74- <1> 2142 00006788 20737570706F727465- <1> 2142 00006791 64207768696C652072- <1> 2142 0000679A 656164696E67206672- <1> 2142 000067A3 6F6D20524320627566- <1> 2142 000067AC 6665722E0D0A00 <1> 2143 000067B3 4572726F723A20556E- <1> .unexpected_auxbuff_guard: asciz "Error: Unexpected auxbuff guard!",13,10 2143 000067BC 657870656374656420- <1> 2143 000067C5 617578627566662067- <1> 2143 000067CE 75617264210D0A00 <1> 2144 000067D6 4572726F723A20556E- <1> .unexpected_noneol_re: asciz "Error: Unexpected non-EOL in RE processing!",13,10 2144 000067DF 657870656374656420- <1> 2144 000067E8 6E6F6E2D454F4C2069- <1> 2144 000067F1 6E2052452070726F63- <1> 2144 000067FA 657373696E67210D0A- <1> 2144 00006803 00 <1> 2145 00006804 4572726F723A20556E- <1> .unexpected_noneol_rc: asciz "Error: Unexpected non-EOL in RC processing!",13,10 2145 0000680D 657870656374656420- <1> 2145 00006816 6E6F6E2D454F4C2069- <1> 2145 0000681F 6E2052432070726F63- <1> 2145 00006828 657373696E67210D0A- <1> 2145 00006831 00 <1> 2146 00006832 5245504C41434500 <1> .replace: asciz "REPLACE" 2147 0000683A 415050454E4400 <1> .append: asciz "APPEND" 2148 00006841 44 <1> .dword: db "D" 2149 00006842 574F524400 <1> .word: asciz "WORD" 2150 00006847 33 <1> .3byte: db "3" 2151 00006848 4259544500 <1> .byte: asciz "BYTE" 2152 0000684D 44 <1> .dwords: db "D" 2153 0000684E 574F52445300 <1> .words: asciz "WORDS" 2154 00006854 425954455300 <1> .bytes: asciz "BYTES" 2155 0000685A 4C454E47544800 <1> .length: asciz "LENGTH" 2156 00006861 52414E474500 <1> .range: asciz "RANGE" 2157 00006867 5245564552534500 <1> .reverse: asciz "REVERSE" 2158 0000686F 56414C554500 <1> .value: asciz "VALUE" 2159 00006875 494E00 <1> .in: asciz "IN" 2160 00006878 46524F4D00 <1> .from: asciz "FROM" 2161 0000687D 544F00 <1> .to: asciz "TO" 2162 00006880 455845435554494E47- <1> .executing: asciz "EXECUTING" 2162 00006889 00 <1> 2163 0000688A 46524F4D204C494E45- <1> .executing_value_range: asciz "FROM LINEAR cs:eip LENGTH abo - eip" 2163 00006893 41522063733A656970- <1> 2163 0000689C 204C454E4754482061- <1> 2163 000068A5 626F202D2065697000 <1> 2164 000068AE 4C494E45415200 <1> .linear: asciz "LINEAR" 2165 000068B5 4241534500 <1> .base: asciz "BASE" 2166 000068BA 47524F555000 <1> .group: asciz "GROUP" 2167 000068C0 574944544800 <1> .width: asciz "WIDTH" 2168 <1> %if _HISTORY 2169 <1> .history_internal_error: 2170 000068C6 0D0A496E7465726E61- <1> asciz 13,10,"Internal error in history handling!",13,10 2170 000068CF 6C206572726F722069- <1> 2170 000068D8 6E20686973746F7279- <1> 2170 000068E1 2068616E646C696E67- <1> 2170 000068EA 210D0A00 <1> 2171 <1> %endif 2172 000068EE 07204572726F7221 <1> .di_error: counted " Error!" 2173 000068F6 0768696464656E20 <1> .di_hidden: counted "hidden " 2174 000068FE 0720284949535029 <1> .di_iisp: counted " (IISP)" 2175 00006906 1320286E6F6E737461- <1> .di_nonstd_iisp:counted " (nonstandard IISP)" 2175 0000690F 6E6461726420494953- <1> 2175 00006918 5029 <1> 2176 0000691A 132028756E696E7374- <1> .di_uninst_iisp:counted " (uninstalled IISP)" 2176 00006923 616C6C656420494953- <1> 2176 0000692C 5029 <1> 2177 <1> .di_freedos_reloc: 2178 0000692E 1220284644206B6572- <1> counted " (FD kernel reloc)" 2178 00006937 6E656C2072656C6F63- <1> 2178 00006940 29 <1> 2179 00006941 0E2028666172206A6D- <1> .di_jmpfar: counted " (far jmp imm)" 2179 0000694A 7020696D6D29 <1> 2180 <1> .di_jmpfarindirect: 2181 00006950 132028666172206A6D- <1> counted " (far jmp indirect)" 2181 00006959 7020696E6469726563- <1> 2181 00006962 7429 <1> 2182 00006964 0C2028746573742068- <1> .di_testhook: counted " (test hook)" 2182 0000696D 6F6F6B29 <1> 2183 00006971 1C2028746F6F206D61- <1> .di_toomany: counted " (too many chained handlers)" 2183 0000697A 6E7920636861696E65- <1> 2183 00006983 642068616E646C6572- <1> 2183 0000698C 7329 <1> 2184 0000698E 0F20656D707479204D- <1> .di_empty: counted " empty MCB name" 2184 00006997 4342206E616D65 <1> 2185 0000699E 0B2073797374656D20- <1> .di_system_mcb: counted " system MCB" 2185 000069A7 4D4342 <1> 2186 <1> .di_system_upper: 2187 000069AA 0E2073797374656D20- <1> counted " system in UMA" 2187 000069B3 696E20554D41 <1> 2188 000069B9 0E2073797374656D20- <1> .di_system_low: counted " system in LMA" 2188 000069C2 696E204C4D41 <1> 2189 000069C8 112068696768206D65- <1> .di_hma: counted " high memory area" 2189 000069D1 6D6F72792061726561 <1> 2190 000069DA 06205B6D70783A <1> .di_multiplex.1:counted " [mpx:" 2191 000069E1 0768206C6973743A <1> .di_multiplex.2:counted "h list:" 2192 000069E9 02685D <1> .di_multiplex.3:counted "h]" 2193 000069EC 68656164657200 <1> .header: asciz "header" 2194 <1> .header.length: equ $ - 1 - .header 2195 000069F3 747261696C657200 <1> .trailer: asciz "trailer" 2196 <1> .trailer.length:equ $ - 1 - .trailer 2197 000069FB 415400 <1> .at: asciz "AT" 2198 000069FE 5748494C4500 <1> .while: asciz "WHILE" 2199 00006A04 53494C454E5400 <1> .silent: asciz "SILENT" 2200 00006A0B 534C45455000 <1> .sleep: asciz "SLEEP" 2201 00006A11 5345434F4E445300 <1> .seconds: asciz "SECONDS" 2202 00006A19 5449434B5300 <1> .ticks: asciz "TICKS" 2203 00006A1F 52452070726F636573- <1> .re_limit_reached: asciz "RE processing reached RELIMIT, aborting.",13,10 2203 00006A28 73696E672072656163- <1> 2203 00006A31 6865642052454C494D- <1> 2203 00006A3A 49542C2061626F7274- <1> 2203 00006A43 696E672E0D0A00 <1> 2204 00006A4A 52432070726F636573- <1> .rc_limit_reached: asciz "RC processing reached RCLIMIT, aborting.",13,10 2204 00006A53 73696E672072656163- <1> 2204 00006A5C 6865642052434C494D- <1> 2204 00006A65 49542C2061626F7274- <1> 2204 00006A6E 696E672E0D0A00 <1> 2205 00006A75 2120496E7465726E61- <1> .silent_error: asciz "! Internal error during silent buffer handling !",13,10 2205 00006A7E 6C206572726F722064- <1> 2205 00006A87 7572696E672073696C- <1> 2205 00006A90 656E74206275666665- <1> 2205 00006A99 722068616E646C696E- <1> 2205 00006AA2 6720210D0A00 <1> 2206 00006AA8 5768696C6520636F6E- <1> .while_not_true:asciz "While condition not true, returning.",13,10 2206 00006AB1 646974696F6E206E6F- <1> 2206 00006ABA 7420747275652C2072- <1> 2206 00006AC3 657475726E696E672E- <1> 2206 00006ACC 0D0A00 <1> 2207 00006ACF 5768696C6520636F6E- <1> .while_terminated_before: asciz "While condition ",'"' 2207 00006AD8 646974696F6E202200 <1> 2208 00006AE1 22206E6F206C6F6E67- <1> .while_terminated_after: asciz '"'," no longer true.",13,10 2208 00006AEA 657220747275652E0D- <1> 2208 00006AF3 0A00 <1> 2209 00006AF5 4E6F2073657269616C- <1> .no_progress: asciz "No serial comm progress after 5 seconds, giving up. (Keyboard enabled.)",13,10 2209 00006AFE 20636F6D6D2070726F- <1> 2209 00006B07 677265737320616674- <1> 2209 00006B10 65722035207365636F- <1> 2209 00006B19 6E64732C2067697669- <1> 2209 00006B22 6E672075702E20284B- <1> 2209 00006B2B 6579626F6172642065- <1> 2209 00006B34 6E61626C65642E290D- <1> 2209 00006B3D 0A00 <1> 2210 00006B3F 0D0A6C446562756758- <1> .serial_request_keep: asciz 13,10,_PROGNAME," connected to serial port. Enter KEEP to confirm.",13,10 2210 00006B48 20636F6E6E65637465- <1> 2210 00006B51 6420746F2073657269- <1> 2210 00006B5A 616C20706F72742E20- <1> 2210 00006B63 456E746572204B4545- <1> 2210 00006B6C 5020746F20636F6E66- <1> 2210 00006B75 69726D2E0D0A00 <1> 2211 00006B7C 4E6F204B454550206B- <1> .serial_no_keep_timer: asciz "No KEEP keyword confirmation after timeout, giving up. (Keyboard enabled.)",13,10 2211 00006B85 6579776F726420636F- <1> 2211 00006B8E 6E6669726D6174696F- <1> 2211 00006B97 6E2061667465722074- <1> 2211 00006BA0 696D656F75742C2067- <1> 2211 00006BA9 6976696E672075702E- <1> 2211 00006BB2 20284B6579626F6172- <1> 2211 00006BBB 6420656E61626C6564- <1> 2211 00006BC4 2E290D0A00 <1> 2212 00006BC9 4E6F204B454550206B- <1> .serial_no_keep_enter: asciz "No KEEP keyword confirmation, enabling keyboard.",13,10 2212 00006BD2 6579776F726420636F- <1> 2212 00006BDB 6E6669726D6174696F- <1> 2212 00006BE4 6E2C20656E61626C69- <1> 2212 00006BED 6E67206B6579626F61- <1> 2212 00006BF6 72642E0D0A00 <1> 2213 00006BFC 4B45455000 <1> .keep: asciz "KEEP" 2214 00006C01 4572726F723A20556E- <1> .cannot_hook_2D.invalid: asciz "Error: Unable to hook interrupt 2Dh due to invalid handler.",13,10 2214 00006C0A 61626C6520746F2068- <1> 2214 00006C13 6F6F6B20696E746572- <1> 2214 00006C1C 727570742032446820- <1> 2214 00006C25 64756520746F20696E- <1> 2214 00006C2E 76616C69642068616E- <1> 2214 00006C37 646C65722E0D0A00 <1> 2215 00006C3F 4572726F723A20556E- <1> .cannot_hook_2D.nofree: asciz "Error: Unable to hook interrupt 2Dh, no free multiplex number.",13,10 2215 00006C48 61626C6520746F2068- <1> 2215 00006C51 6F6F6B20696E746572- <1> 2215 00006C5A 72757074203244682C- <1> 2215 00006C63 206E6F206672656520- <1> 2215 00006C6C 6D756C7469706C6578- <1> 2215 00006C75 206E756D6265722E0D- <1> 2215 00006C7E 0A00 <1> 2216 00006C80 5761726E696E673A20 <1> .serial_cannot_unhook: db "Warning: " 2217 00006C89 556E61626C6520746F- <1> .serial_cannot_unhook.nowarn: db "Unable to unhook interrupt " 2217 00006C92 20756E686F6F6B2069- <1> 2217 00006C9B 6E7465727275707420 <1> 2218 00006CA4 2D2D682E0D0A00 <1> .serial_cannot_unhook.int: asciz "--h.",13,10 2219 00006CAB 4572726F723A20556E- <1> .serial_cannot_hook: db "Error: Unable to hook interrupt " 2219 00006CB4 61626C6520746F2068- <1> 2219 00006CBD 6F6F6B20696E746572- <1> 2219 00006CC6 7275707420 <1> 2220 00006CCB 2D2D68206265636175- <1> .serial_cannot_hook.new_int: db "--h because interrupt " 2220 00006CD4 736520696E74657272- <1> 2220 00006CDD 75707420 <1> 2221 00006CE1 2D2D68207374696C6C- <1> .serial_cannot_hook.old_int: asciz "--h still hooked.",13,10 2221 00006CEA 20686F6F6B65642E0D- <1> 2221 00006CF3 0A00 <1> 2222 00006CF5 537563636565646564- <1> .serial_late_unhook: db "Succeeded in unhooking interrupt " 2222 00006CFE 20696E20756E686F6F- <1> 2222 00006D07 6B696E6720696E7465- <1> 2222 00006D10 727275707420 <1> 2223 00006D16 2D2D682E0D0A00 <1> .serial_late_unhook.int: asciz "--h.",13,10 2224 00006D1D 496E7465726E616C20- <1> .line_out_overflow: asciz "Internal error, line_out buffer overflowed!",13,10 2224 00006D26 6572726F722C206C69- <1> 2224 00006D2F 6E655F6F7574206275- <1> 2224 00006D38 66666572206F766572- <1> 2224 00006D41 666C6F776564210D0A- <1> 2224 00006D4A 00 <1> 2225 00006D4B 041B5B376D <1> .highlight: counted 27,"[7m" 2226 00006D50 031B5B6D <1> .unhighlight: counted 27,"[m" 2227 00006D54 206B4D475400 <1> .prefixes: asciz " kMGT" 2228 00006D5A 50726F63657373206C- <1> .ll_unterm: ascizline "Process loading aborted: Attached process didn't terminate!" 2228 00006D63 6F6164696E67206162- <1> 2228 00006D6C 6F727465643A204174- <1> 2228 00006D75 746163686564207072- <1> 2228 00006D7E 6F6365737320646964- <1> 2228 00006D87 6E2774207465726D69- <1> 2228 00006D90 6E617465210D0A00 <1> 2229 00006D98 43616E6E6F74207175- <1> .qq_unterm: ascizline "Cannot quit, attached process didn't terminate!" 2229 00006DA1 69742C206174746163- <1> 2229 00006DAA 6865642070726F6365- <1> 2229 00006DB3 7373206469646E2774- <1> 2229 00006DBC 207465726D696E6174- <1> 2229 00006DC5 65210D0A00 <1> 2230 00006DCA 43616E6E6F74207175- <1> .qq_still_pm: ascizline "Cannot quit, still in PM after attached process terminated!" 2230 00006DD3 69742C207374696C6C- <1> 2230 00006DDC 20696E20504D206166- <1> 2230 00006DE5 746572206174746163- <1> 2230 00006DEE 6865642070726F6365- <1> 2230 00006DF7 7373207465726D696E- <1> 2230 00006E00 61746564210D0A00 <1> 2231 00006E08 417474616368656420- <1> .qq_a_unterminated: ascizline "Attached process didn't terminate." 2231 00006E11 70726F636573732064- <1> 2231 00006E1A 69646E277420746572- <1> 2231 00006E23 6D696E6174652E0D0A- <1> 2231 00006E2C 00 <1> 2232 00006E2D 417474616368656420- <1> .qq_a_terminated: ascizline "Attached process did terminate." 2232 00006E36 70726F636573732064- <1> 2232 00006E3F 6964207465726D696E- <1> 2232 00006E48 6174652E0D0A00 <1> 2233 00006E4F 43616E6E6F74206372- <1> .ensure_no_memory: ascizline "Cannot create empty attached process, out of memory!" 2233 00006E58 6561746520656D7074- <1> 2233 00006E61 792061747461636865- <1> 2233 00006E6A 642070726F63657373- <1> 2233 00006E73 2C206F7574206F6620- <1> 2233 00006E7C 6D656D6F7279210D0A- <1> 2233 00006E85 00 <1> 2234 00006E86 4330 <1> .c0: db "C0" 2235 00006E88 0D <1> .cr: db 13 2236 <1> 2237 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 2238 00006E89 45584953545300 <1> .exists: asciz "EXISTS" 2239 00006E90 5900 <1> .y: asciz "Y" 2240 00006E92 5920636F6D6D616E64- <1> .yy_requires_filename: asciz "Y command requires a filename.",13,10 2240 00006E9B 207265717569726573- <1> 2240 00006EA4 20612066696C656E61- <1> 2240 00006EAD 6D652E0D0A00 <1> 2241 00006EB3 5920636F6D6D616E64- <1> .yy_filename_empty: asciz "Y command filename is empty.",13,10 2241 00006EBC 2066696C656E616D65- <1> 2241 00006EC5 20697320656D707479- <1> 2241 00006ECE 2E0D0A00 <1> 2242 00006ED2 5920636F6D6D616E64- <1> .yy_too_many_handles: asciz "Y command has too many open files.",13,10 2242 00006EDB 2068617320746F6F20- <1> 2242 00006EE4 6D616E79206F70656E- <1> 2242 00006EED 2066696C65732E0D0A- <1> 2242 00006EF6 00 <1> 2243 00006EF7 5920636F6D6D616E64- <1> .yy_error_file_open: asciz "Y command failed to open file.",13,10 2243 00006F00 206661696C65642074- <1> 2243 00006F09 6F206F70656E206669- <1> 2243 00006F12 6C652E0D0A00 <1> 2244 00006F18 5920636F6D6D616E64- <1> .yy_no_file: asciz "Y command limited to label only valid in script file.",13,10 2244 00006F21 206C696D6974656420- <1> 2244 00006F2A 746F206C6162656C20- <1> 2244 00006F33 6F6E6C792076616C69- <1> 2244 00006F3C 6420696E2073637269- <1> 2244 00006F45 70742066696C652E0D- <1> 2244 00006F4E 0A00 <1> 2245 <1> %endif 2246 <1> %if _INPUT_FILE_HANDLES 2247 00006F50 5920636F6D6D616E64- <1> .yy_no_dos: asciz "Y command requires DOS to be available.",13,10 2247 00006F59 207265717569726573- <1> 2247 00006F62 20444F5320746F2062- <1> 2247 00006F6B 6520617661696C6162- <1> 2247 00006F74 6C652E0D0A00 <1> 2248 <1> .yy_filename_missing_unquote: 2249 00006F7A 5920636F6D6D616E64- <1> asciz "Y command filename missing ending quote.",13,10 2249 00006F83 2066696C656E616D65- <1> 2249 00006F8C 206D697373696E6720- <1> 2249 00006F95 656E64696E67207175- <1> 2249 00006F9E 6F74652E0D0A00 <1> 2250 <1> %endif 2251 <1> %if _INPUT_FILE_BOOT 2252 00006FA5 5920636F6D6D616E64- <1> .yy_too_large: asciz "Y command file too large.",13,10 2252 00006FAE 2066696C6520746F6F- <1> 2252 00006FB7 206C617267652E0D0A- <1> 2252 00006FC0 00 <1> 2253 00006FC1 5920636F6D6D616E64- <1> .yy_empty: asciz "Y command file empty.",13,10 2253 00006FCA 2066696C6520656D70- <1> 2253 00006FD3 74792E0D0A00 <1> 2254 <1> %endif 2255 <1> 2256 <1> %if _BREAKPOINTS 2257 00006FD9 414C4C00 <1> .all: asciz "ALL" 2258 00006FDD 4E455700 <1> .new: asciz "NEW" 2259 00006FE1 4E6F20756E75736564- <1> .bb_no_new: asciz "No unused breakpoint left!",13,10 2259 00006FEA 20627265616B706F69- <1> 2259 00006FF3 6E74206C656674210D- <1> 2259 00006FFC 0A00 <1> 2260 00006FFE 19486974207065726D- <1> .bb_hit.1: counted "Hit permanent breakpoint " 2260 00007007 616E656E7420627265- <1> 2260 00007010 616B706F696E7420 <1> 2261 <1> .bb_hit.2.nocounter: 2262 00007018 020D0A <1> counted 13,10 2263 0000701B 1C5061737365642070- <1> .bb_pass.1: counted "Passed permanent breakpoint " 2263 00007024 65726D616E656E7420- <1> 2263 0000702D 627265616B706F696E- <1> 2263 00007036 7420 <1> 2264 <1> .bb_hit.2.counter: 2265 00007038 0A2C20636F756E7465- <1> .bb_pass.2: counted ", counter=" 2265 00007041 723D <1> 2266 <1> .bb_hit.3.counter.no_id: 2267 <1> .bb_pass.3.no_id: 2268 <1> .bb_hitpass_id.after: 2269 00007043 020D0A <1> counted 13,10 2270 <1> .bb_hitpass_id.long: 2271 00007046 070D0A2049443A20 <1> counted 13,10," ID: " 2272 <1> .bb_hitpass_id.short: 2273 0000704E 062C2049443A20 <1> counted ", ID: " 2274 00007055 205748454E2000 <1> .bb_when: asciz " WHEN " 2275 <1> 2276 0000705C 42502000 <1> .bp: asciz "BP " 2277 00007060 202B00 <1> .bpenabled: asciz " +" 2278 00007063 202D00 <1> .bpdisabled: asciz " -" 2279 00007066 20556E7573656400 <1> .bpunused: asciz " Unused" 2280 0000706E 204C696E3D00 <1> .bpaddress: asciz " Lin=" 2281 00007074 202800 <1> .bpcontent: asciz " (" 2282 00007077 2920436F756E746572- <1> .bpcounter: asciz ") Counter=" 2282 00007080 3D00 <1> 2283 <1> %if 0 2284 <1> BP 00 Unused 2285 <1> BP 00 + Lin=12345678 (CC) Counter=8000 2286 <1> 1234567890123456789012345678901234567890 2287 <1> %endif 2288 00007082 4E6F20627265616B70- <1> .bpnone: asciz "No breakpoints set currently.",13,10 2288 0000708B 6F696E747320736574- <1> 2288 00007094 2063757272656E746C- <1> 2288 0000709D 792E0D0A00 <1> 2289 000070A2 4E6F20627265616B70- <1> .bpnone_at: asciz "No breakpoint set at given address currently.",13,10 2289 000070AB 6F696E742073657420- <1> 2289 000070B4 617420676976656E20- <1> 2289 000070BD 616464726573732063- <1> 2289 000070C6 757272656E746C792E- <1> 2289 000070CF 0D0A00 <1> 2290 <1> %endif 2291 000070D2 5468652000 <1> .cant_bp_the: asciz "The " 2292 000070D7 70726F636565642062- <1> .cant_bp_type_proceed: asciz "proceed breakpoint" 2292 000070E0 7265616B706F696E74- <1> 2292 000070E9 00 <1> 2293 000070EA 7065726D616E656E74- <1> .cant_bp_type_permanent: db "permanent breakpoint " 2293 000070F3 20627265616B706F69- <1> 2293 000070FC 6E7420 <1> 2294 000070FF 5F5F00 <1> .cant_bp_type_permanent.index: asciz "__" 2295 00007102 204720627265616B70- <1> .cant_bp_type_gg: asciz " G breakpoint" 2295 0000710B 6F696E7400 <1> 2296 00007110 20286C696E65617220 <1> .cant_bp_linear: db " (linear " 2297 00007119 2D2D2D2D5F <1> .cant_bp_linear.address1: db "----_" 2298 0000711E 2D2D2D2D292000 <1> .cant_bp_linear.address2: asciz "----) " 2299 00007125 63616E6E6F74206265- <1> .cant_bp_write: asciz "cannot be written." 2299 0000712E 207772697474656E2E- <1> 2299 00007137 00 <1> 2300 00007138 63616E6E6F74206265- <1> .cant_bp_restore: db "cannot be restored to " 2300 00007141 20726573746F726564- <1> 2300 0000714A 20746F20 <1> 2301 0000714E 5F5F2E00 <1> .cant_bp_restore.value: asciz "__." 2302 <1> %if 0 2303 <1> The 15th G breakpoint (linear 0010_FFFF) cannot be written. 2304 <1> The proceed breakpoint (linear 0010_FFFF) cannot be written. 2305 <1> The permanent breakpoint 0F (linear 0010_FFFF) cannot be written. 2306 <1> The permanent breakpoint 0F (linear 0010_FFFF) cannot be restored to __. 2307 <1> 12345678901234567890123456789012345678901234567890123456789012345678901234567890 2308 <1> %endif 2309 00007152 0D0A20526561736F6E- <1> .cant_bp_reason: asciz 13,10," Reason: " 2309 0000715B 3A2000 <1> 2310 0000715E 4E6F206572726F722E- <1> .cant_bp_reason0: asciz "No error. (Internal error, report!)",13,10 2310 00007167 2028496E7465726E61- <1> 2310 00007170 6C206572726F722C20- <1> 2310 00007179 7265706F727421290D- <1> 2310 00007182 0A00 <1> 2311 00007184 497420697320726561- <1> .cant_bp_reason1: asciz "It is read-only.",13,10 2311 0000718D 642D6F6E6C792E0D0A- <1> 2311 00007196 00 <1> 2312 00007197 497420697320756E72- <1> .cant_bp_reason2: asciz "It is unreachable.",13,10 2312 000071A0 6561636861626C652E- <1> 2312 000071A9 0D0A00 <1> 2313 000071AC 497420686173206265- <1> .cant_bp_reason3: db "It has been overwritten with " 2313 000071B5 656E206F7665727772- <1> 2313 000071BE 697474656E20776974- <1> 2313 000071C7 6820 <1> 2314 000071C9 5F5F2E0D0A00 <1> .cant_bp_reason3.value: asciz "__.",13,10 2315 000071CF 556E6B6E6F776E2065- <1> .cant_bp_reasonu: asciz "Unknown error. (Internal error, report!)",13,10 2315 000071D8 72726F722E2028496E- <1> 2315 000071E1 7465726E616C206572- <1> 2315 000071EA 726F722C207265706F- <1> 2315 000071F3 727421290D0A00 <1> 2316 <1> 2317 000071FA 20202000 <1> .list_bp.first: asciz " " 2318 000071FE 204720627265616B70- <1> .list_bp.second:db " G breakpoint, linear " 2318 00007207 6F696E742C206C696E- <1> 2318 00007210 65617220 <1> 2319 <1> .list_bp.address1: 2320 00007214 2D2D2D2D5F <1> db "----_" 2321 <1> .list_bp.address2: 2322 00007219 2D2D2D2D00 <1> asciz "----" 2323 0000721E 2C20636F6E74656E74- <1> .list_bp.third: db ", content " 2323 00007227 20 <1> 2324 <1> .list_bp.value: 2325 00007228 5F5F00 <1> asciz "__" 2326 <1> .list_bp_not_cseip: equ crlf 2327 <1> %if _PM 2328 <1> .list_bp_cseip_32: 2329 0000722B 202869732061742043- <1> asciz " (is at CS:EIP)",13,10 2329 00007234 533A454950290D0A00 <1> 2330 <1> %endif 2331 <1> .list_bp_csip_16: 2332 0000723D 202869732061742043- <1> asciz " (is at CS:IP)",13,10 2332 00007246 533A4950290D0A00 <1> 2333 <1> .list_bp_none: 2334 0000724E 546865204720627265- <1> asciz "The G breakpoint list is empty.",13,10 2334 00007257 616B706F696E74206C- <1> 2334 00007260 69737420697320656D- <1> 2334 00007269 7074792E0D0A00 <1> 2335 <1> %if 0 2336 <1> 2nd G breakpoint, linear 0003_28D3 $3600:12345678, content CC (is at CS:EIP) 2337 <1> 12345678901234567890123456789012345678901234567890123456789012345678901234567890 2338 <1> %endif 2339 00007270 00 <1> .empty_message: asciz 2340 00007271 4C49535400 <1> .list: asciz "LIST" 2341 00007276 414741494E00 <1> .again: asciz "AGAIN" 2342 0000727C 52656163686564206C- <1> .uu_too_many_repeat: asciz "Reached limit of repeating disassembly.",13,10 2342 00007285 696D6974206F662072- <1> 2342 0000728E 6570656174696E6720- <1> 2342 00007297 646973617373656D62- <1> 2342 000072A0 6C792E0D0A00 <1> 2343 000072A6 496E7465726E616C20- <1> .uu_internal_error: asciz "Internal error in disassembler!",13,10 2343 000072AF 6572726F7220696E20- <1> 2343 000072B8 646973617373656D62- <1> 2343 000072C1 6C6572210D0A00 <1> 2344 000072C8 496E7465726E616C20- <1> .aa_internal_error: asciz "Internal error in assembler!",13,10 2344 000072D1 6572726F7220696E20- <1> 2344 000072DA 617373656D626C6572- <1> 2344 000072E3 210D0A00 <1> 2345 000072E7 537461636B206F7665- <1> .stack_overflow: db "Stack overflow occurred, IP=" 2345 000072F0 72666C6F77206F6363- <1> 2345 000072F9 75727265642C204950- <1> 2345 00007302 3D <1> 2346 00007303 5F5F5F5F682C206475- <1> .stack_overflow.caller: asciz "____h, due to " 2346 0000730C 6520746F2000 <1> 2347 00007312 65787072657373696F- <1> .stack_overflow.indirection: asciz "expression indirection.",13,10 2347 0000731B 6E20696E6469726563- <1> 2347 00007324 74696F6E2E0D0A00 <1> 2348 0000732C 65787072657373696F- <1> .stack_overflow.parens: asciz "expression parentheses.",13,10 2348 00007335 6E20706172656E7468- <1> 2348 0000733E 657365732E0D0A00 <1> 2349 00007346 65787072657373696F- <1> .stack_overflow.precedence: asciz "expression precedence.",13,10 2349 0000734F 6E2070726563656465- <1> 2349 00007358 6E63652E0D0A00 <1> 2350 0000735F 65787072657373696F- <1> .stack_overflow.value_in: asciz "expression VALUE x IN y.",13,10 2350 00007368 6E2056414C55452078- <1> 2350 00007371 20494E20792E0D0A00 <1> 2351 0000737A 65787072657373696F- <1> .stack_overflow.linear: asciz "expression LINEAR.",13,10 2351 00007383 6E204C494E4541522E- <1> 2351 0000738C 0D0A00 <1> 2352 0000738F 65787072657373696F- <1> .stack_overflow.cond: asciz "expression conditional ?? x :: y.",13,10 2352 00007398 6E20636F6E64697469- <1> 2352 000073A1 6F6E616C203F3F2078- <1> 2352 000073AA 203A3A20792E0D0A00 <1> 2353 <1> %if _MEMREF_AMOUNT 2354 <1> %if _DEBUG2 2355 <1> .memrefs_branchdirect: asciz 9, "direct branch target = " 2356 <1> .memrefs_stringsource: asciz 9, "string source = " 2357 <1> .memrefs_stringdest: asciz 9, "string destination = " 2358 <1> .memrefs_memsource: asciz 9, "memory source = " 2359 <1> .memrefs_memdest: asciz 9, "memory destination = " 2360 <1> .memrefs_memsourcedest: asciz 9, "memory source/dest = " 2361 <1> .memrefs_mem_unknown: asciz 9, "memory (unknown) = " 2362 <1> .memrefs_unknown: asciz 9, "unknown mem ref type = " 2363 <1> .memrefs_length: counted " length=" 2364 <1> %endif 2365 <1> .memrefs_invalid_internal: 2366 000073B3 496E7465726E616C20- <1> asciz "Internal error, invalid use of too many memrefs!",13,10 2366 000073BC 6572726F722C20696E- <1> 2366 000073C5 76616C696420757365- <1> 2366 000073CE 206F6620746F6F206D- <1> 2366 000073D7 616E79206D656D7265- <1> 2366 000073E0 6673210D0A00 <1> 2367 <1> %endif 2368 <1> 2369 <1> %if 0 2370 <1> align 2, db 0 2371 <1> .optiontable: dw dispregs32, .r32off, .r32on 2372 <1> dw traceints, .traceoff, .traceon 2373 <1> dw cpdepchars, .cpoff, .cpon 2374 <1> dw fakeindos, .dosoff, .doson 2375 <1> dw nonpagingdevice, .nonpageoff, .nonpageon 2376 <1> dw pagingdevice, .pageoff, .pageon 2377 <1> dw hexrn, .readrnoff, .readrnon 2378 <1> dw 0 2379 <1> 2380 <1> .r32off: asciz "Dump 16-bit register set" 2381 <1> .r32on: asciz "Dump 32-bit register set" 2382 <1> .traceoff: asciz "Interrupts are traced" 2383 <1> .traceon: asciz "Interrupts are processed" 2384 <1> .cpoff: asciz "Extended ASCII characters replaced" 2385 <1> .cpon: asciz "Extended ASCII characters displayed" 2386 <1> .dosoff: asciz "InDOS is checked" 2387 <1> .doson: asciz "InDOS assumed on" 2388 <1> ;asciz "InDOS assumed off" 2389 <1> .nonpageoff: asciz 2390 <1> .nonpageon: asciz "Paging disabled" 2391 <1> .pageoff: asciz 2392 <1> .pageon: asciz "Paging enabled" 2393 <1> .readrnoff: asciz "Readable RN enabled" 2394 <1> .readrnon: asciz "Readable RN disabled" 2395 <1> %endif 2396 <1> 2397 000073E6 5761726E696E673A20- <1> .warnprefix: asciz "Warning: Prefixes in excess of 14, using trace flag.",13,10 2397 000073EF 507265666978657320- <1> 2397 000073F8 696E20657863657373- <1> 2397 00007401 206F662031342C2075- <1> 2397 0000740A 73696E672074726163- <1> 2397 00007413 6520666C61672E0D0A- <1> 2397 0000741C 00 <1> 2398 <1> 2399 <1> %if _DEBUG 2400 <1> .bu: asciz "Breaking to next instance.",13,10 2401 <1> %else 2402 0000741D 416C72656164792069- <1> .notbu: asciz "Already in topmost instance. (This is no debugging build of lDebug.)",13,10 2402 00007426 6E20746F706D6F7374- <1> 2402 0000742F 20696E7374616E6365- <1> 2402 00007438 2E2028546869732069- <1> 2402 00007441 73206E6F2064656275- <1> 2402 0000744A 6767696E6720627569- <1> 2402 00007453 6C64206F66206C4465- <1> 2402 0000745C 6275672E290D0A00 <1> 2403 <1> %endif 2404 <1> 2405 <1> %if _PM 2406 00007464 43616E6E6F74206163- <1> .ofs32: asciz "Cannot access 16-bit segment with 32-bit offset.",13,10 2406 0000746D 636573732031362D62- <1> 2406 00007476 6974207365676D656E- <1> 2406 0000747F 742077697468203332- <1> 2406 00007488 2D626974206F666673- <1> 2406 00007491 65742E0D0A00 <1> 2407 <1> %endif 2408 <1> 2409 <1> 2410 <1> %define smcb_messages ..@notype,"" 2411 <1> 2412 <1> %imacro smcbtype 2.nolist 2413 <1> dw %2, %%label 2414 <1> %defstr %%str %1 2415 <1> %xdefine smcb_messages smcb_messages,%%label,%%str 2416 <1> %endmacro 2417 <1> 2418 <1> %imacro smcbmsg 2-*.nolist 2419 <1> %if %0 & 1 2420 <1> %error Expected even number of parameters 2421 <1> %endif 2422 <1> %rotate 2 2423 <1> %rep (%0 - 2) / 2 2424 <1> %1: asciz %2 2425 <1> %rotate 2 2426 <1> %endrep 2427 <1> %endmacro 2428 <1> 2429 00007497 00 <1> align 4, db 0 2430 <1> smcbtypes: 2431 00007498 0000[1475] <1> smcbtype S_OTHER, 00h 2432 0000749C 0100[1C75] <1> smcbtype S_DOSENTRY, 01h 2433 000074A0 0200[2775] <1> smcbtype S_DOSCODE, 02h 2434 000074A4 0300[3175] <1> smcbtype S_DOSDATA, 03h 2435 000074A8 0400[3B75] <1> smcbtype S_IRQSCODE, 04h 2436 000074AC 0500[4675] <1> smcbtype S_IRQSDATA, 05h 2437 000074B0 0600[5175] <1> smcbtype S_CDS, 06h 2438 000074B4 0700[5775] <1> smcbtype S_LFNCDS, 07h 2439 000074B8 0800[6075] <1> smcbtype S_DPB, 08h 2440 000074BC 0900[6675] <1> smcbtype S_UPB, 09h 2441 000074C0 0A00[6C75] <1> smcbtype S_SFT, 0Ah 2442 000074C4 0B00[7275] <1> smcbtype S_FCBSFT, 0Bh 2443 000074C8 0C00[7B75] <1> smcbtype S_CCB, 0Ch 2444 000074CC 0D00[8175] <1> smcbtype S_IRT, 0Dh 2445 000074D0 0E00[8775] <1> smcbtype S_SECTOR, 0Eh 2446 000074D4 0F00[9075] <1> smcbtype S_NLS, 0Fh 2447 000074D8 1000[9675] <1> smcbtype S_EBDA, 10h 2448 000074DC 1900[9D75] <1> smcbtype S_INITCONFIG, 19h 2449 000074E0 1A00[AA75] <1> smcbtype S_INITFATSEG, 1Ah 2450 000074E4 1B00[B775] <1> smcbtype S_INITSECTORSEG, 1Bh 2451 000074E8 1C00[C775] <1> smcbtype S_INITSTACKBPB,1Ch 2452 000074EC 1D00[D675] <1> smcbtype S_INITPSP, 1Dh 2453 000074F0 1E00[E075] <1> smcbtype S_ENVIRONMENT, 1Eh 2454 000074F4 1F00[EE75] <1> smcbtype S_INITIALIZE, 1Fh 2455 000074F8 2000[FB75] <1> smcbtype S_DEVICE, 20h ; Device 2456 000074FC 2100[0476] <1> smcbtype S_DEVICEMEMORY,21h ; Allocated by device 2457 00007500 3000[1376] <1> smcbtype S_EXCLDUMA, 30h ; Excluded UMA 2458 00007504 3100[1E76] <1> smcbtype S_EXCLDUMASUB, 31h ; Excluded UMA with sub-chain of used MCBs 2459 00007508 3200[2C76] <1> smcbtype S_EXCLDLH, 32h ; Excluded by LH 2460 0000750C 3300[3676] <1> smcbtype S_EXCLDDOS, 33h 2461 00007510 FFFFFFFF <1> dw -1, -1 2462 <1> 2463 00007514 535F4F544845520053- <1> smcbmsg smcb_messages 2463 0000751D 5F444F53454E545259- <1> 2463 00007526 00535F444F53434F44- <1> 2463 0000752F 4500535F444F534441- <1> 2463 00007538 544100535F49525153- <1> 2463 00007541 434F444500535F4952- <1> 2463 0000754A 51534441544100535F- <1> 2463 00007553 43445300535F4C464E- <1> 2463 0000755C 43445300535F445042- <1> 2463 00007565 00535F55504200535F- <1> 2463 0000756E 53465400535F464342- <1> 2463 00007577 53465400535F434342- <1> 2463 00007580 00535F49525400535F- <1> 2463 00007589 534543544F5200535F- <1> 2463 00007592 4E4C5300535F454244- <1> 2463 0000759B 4100535F494E495443- <1> 2463 000075A4 4F4E46494700535F49- <1> 2463 000075AD 4E4954464154534547- <1> 2463 000075B6 00535F494E49545345- <1> 2463 000075BF 43544F525345470053- <1> 2463 000075C8 5F494E495453544143- <1> 2463 000075D1 4B42504200535F494E- <1> 2463 000075DA 495450535000535F45- <1> 2463 000075E3 4E5649524F4E4D454E- <1> 2463 000075EC 5400535F494E495449- <1> 2463 000075F5 414C495A4500535F44- <1> 2463 000075FE 455649434500535F44- <1> 2463 00007607 45564943454D454D4F- <1> 2463 00007610 525900535F4558434C- <1> 2463 00007619 44554D4100535F4558- <1> 2463 00007622 434C44554D41535542- <1> 2463 0000762B 00535F4558434C444C- <1> 2463 00007634 4800535F4558434C44- <1> 2463 0000763D 444F5300 <1> 2464 <1> 2465 00007641 756E6B6E6F776E00 <1> smcbmsg_unknown: asciz "unknown" 2466 <1> 2467 <1> %undef smcb_messages 2468 <1> %unimacro smcbtype 2.nolist 2469 <1> %unimacro smcbmsg 2-*.nolist 2470 <1> 2471 00007649 5E204572726F7207 <1> errcarat: db "^ Error",7 2472 00007651 0D0A00 <1> crlf: asciz 13,10 2473 <1> 2474 <1> 2475 <1> align 4, db 0 2476 <1> msgtable_value_range: 2477 00007654 [8068][8A68] <1> dw msg.executing, msg.executing_value_range 2478 <1> %if _ACCESS_VARIABLES_AMOUNT 2479 00007658 [6A76][7276] <1> dw .reading, .reading_range 2480 0000765C [ED76][F576] <1> dw .writing, .writing_range 2481 00007660 [7077][7B77] <1> dw .memoperand, .memoperand_range 2482 00007664 [8C77][9677] <1> dw .accessing, .accessing_range 2483 <1> %endif 2484 00007668 0000 <1> dw 0 2485 <1> 2486 <1> %if _ACCESS_VARIABLES_AMOUNT 2487 0000766A 52454144494E4700 <1> .reading: asciz "READING" 2488 <1> .reading_range: 2489 <1> %assign iicounter 0 2490 <1> %define iiprefix "" 2491 <1> %rep _ACCESS_VARIABLES_AMOUNT 2492 <1> _autohexitsstrdef IIDEF, iicounter 2493 <1> db iiprefix,"FROM readadr",_IIDEF," LENGTH readlen",_IIDEF 2494 <1> %assign iicounter iicounter + 1 2495 <1> %define iiprefix ", " 2496 <1> %endrep 2492 <2> _autohexitsstrdef IIDEF, iicounter 2493 00007672 46524F4D2072656164- <2> db iiprefix,"FROM readadr",_IIDEF," LENGTH readlen",_IIDEF 2493 0000767B 61647230204C454E47- <2> 2493 00007684 544820726561646C65- <2> 2493 0000768D 6E30 <2> 2494 <2> %assign iicounter iicounter + 1 2495 <2> %define iiprefix ", " 2492 <2> _autohexitsstrdef IIDEF, iicounter 2493 0000768F 2C2046524F4D207265- <2> db iiprefix,"FROM readadr",_IIDEF," LENGTH readlen",_IIDEF 2493 00007698 616461647231204C45- <2> 2493 000076A1 4E4754482072656164- <2> 2493 000076AA 6C656E31 <2> 2494 <2> %assign iicounter iicounter + 1 2495 <2> %define iiprefix ", " 2492 <2> _autohexitsstrdef IIDEF, iicounter 2493 000076AE 2C2046524F4D207265- <2> db iiprefix,"FROM readadr",_IIDEF," LENGTH readlen",_IIDEF 2493 000076B7 616461647232204C45- <2> 2493 000076C0 4E4754482072656164- <2> 2493 000076C9 6C656E32 <2> 2494 <2> %assign iicounter iicounter + 1 2495 <2> %define iiprefix ", " 2492 <2> _autohexitsstrdef IIDEF, iicounter 2493 000076CD 2C2046524F4D207265- <2> db iiprefix,"FROM readadr",_IIDEF," LENGTH readlen",_IIDEF 2493 000076D6 616461647233204C45- <2> 2493 000076DF 4E4754482072656164- <2> 2493 000076E8 6C656E33 <2> 2494 <2> %assign iicounter iicounter + 1 2495 <2> %define iiprefix ", " 2497 000076EC 00 <1> asciz 2498 000076ED 57524954494E4700 <1> .writing: asciz "WRITING" 2499 <1> .writing_range: 2500 <1> %assign iicounter 0 2501 <1> %define iiprefix "" 2502 <1> %rep _ACCESS_VARIABLES_AMOUNT 2503 <1> _autohexitsstrdef IIDEF, iicounter 2504 <1> db iiprefix,"FROM writadr",_IIDEF," LENGTH writlen",_IIDEF 2505 <1> %assign iicounter iicounter + 1 2506 <1> %define iiprefix ", " 2507 <1> %endrep 2503 <2> _autohexitsstrdef IIDEF, iicounter 2504 000076F5 46524F4D2077726974- <2> db iiprefix,"FROM writadr",_IIDEF," LENGTH writlen",_IIDEF 2504 000076FE 61647230204C454E47- <2> 2504 00007707 544820777269746C65- <2> 2504 00007710 6E30 <2> 2505 <2> %assign iicounter iicounter + 1 2506 <2> %define iiprefix ", " 2503 <2> _autohexitsstrdef IIDEF, iicounter 2504 00007712 2C2046524F4D207772- <2> db iiprefix,"FROM writadr",_IIDEF," LENGTH writlen",_IIDEF 2504 0000771B 697461647231204C45- <2> 2504 00007724 4E4754482077726974- <2> 2504 0000772D 6C656E31 <2> 2505 <2> %assign iicounter iicounter + 1 2506 <2> %define iiprefix ", " 2503 <2> _autohexitsstrdef IIDEF, iicounter 2504 00007731 2C2046524F4D207772- <2> db iiprefix,"FROM writadr",_IIDEF," LENGTH writlen",_IIDEF 2504 0000773A 697461647232204C45- <2> 2504 00007743 4E4754482077726974- <2> 2504 0000774C 6C656E32 <2> 2505 <2> %assign iicounter iicounter + 1 2506 <2> %define iiprefix ", " 2503 <2> _autohexitsstrdef IIDEF, iicounter 2504 00007750 2C2046524F4D207772- <2> db iiprefix,"FROM writadr",_IIDEF," LENGTH writlen",_IIDEF 2504 00007759 697461647233204C45- <2> 2504 00007762 4E4754482077726974- <2> 2504 0000776B 6C656E33 <2> 2505 <2> %assign iicounter iicounter + 1 2506 <2> %define iiprefix ", " 2508 0000776F 00 <1> asciz 2509 <1> 2510 00007770 4D454D4F504552414E- <1> .memoperand: asciz "MEMOPERAND" 2510 00007779 4400 <1> 2511 0000777B 52454144494E472C20- <1> .memoperand_range: asciz "READING, WRITING" 2511 00007784 57524954494E4700 <1> 2512 0000778C 414343455353494E47- <1> .accessing: asciz "ACCESSING" 2512 00007795 00 <1> 2513 00007796 52454144494E472C20- <1> .accessing_range: asciz "READING, WRITING, EXECUTING" 2513 0000779F 57524954494E472C20- <1> 2513 000077A8 455845435554494E47- <1> 2513 000077B1 00 <1> 2514 <1> %endif 2515 <1> 2516 <1> 2517 <1> %if _BOOTLDR 2518 <1> %define lot_list 2519 <1> %define lot_comma 2520 <1> %macro lot_entry 2.nolist 2521 <1> LOAD_%2 equ %1 2522 <1> dw LOAD_%2, .%2 2523 <1> %defstr %%string %2 2524 <1> %xdefine lot_list lot_list lot_comma .%2:, db %%string, db 0 2525 <1> %define lot_comma , 2526 <1> %endmacro 2527 <1> 2528 <1> %macro lot_messages 0-*.nolist 2529 <1> %rep (%0 / 3) 2530 <1> %1 2531 <1> %2 2532 <1> %3 2533 <1> %rotate 3 2534 <1> %endrep 2535 <1> %endmacro 2536 <1> 2537 000077B2 00 <1> align 4, db 0 2538 <1> loadoptiontable: 2539 000077B4 0100[2078] <1> lot_entry 1, SET_DL_UNIT 2540 000077B8 0200[2C78] <1> lot_entry 2, SET_BL_UNIT 2541 000077BC 0400[3878] <1> lot_entry 4, SET_SIDI_CLUSTER 2542 000077C0 1000[4978] <1> lot_entry 10h, SET_DSSI_DPT 2543 000077C4 2000[5678] <1> lot_entry 20h, PUSH_DPT 2544 000077C8 4000[5F78] <1> lot_entry 40h, DATASTART_HIDDEN 2545 000077CC 8000[7078] <1> lot_entry 80h, SET_AXBX_DATASTART 2546 000077D0 0001[8378] <1> lot_entry 100h, SET_DSBP_BPB 2547 000077D4 0002[9078] <1> lot_entry 200h, LBA_SET_TYPE 2548 000077D8 0004[9D78] <1> lot_entry 400h, MESSAGE_TABLE 2549 000077DC 0008[AB78] <1> lot_entry 800h, SET_AXBX_ROOT_HIDDEN 2550 000077E0 0010[C078] <1> lot_entry 1000h, CMDLINE 2551 000077E4 0020[C878] <1> lot_entry 2000h, NO_BPB 2552 000077E8 0040[CF78] <1> lot_entry 4000h, SET_DSSI_PARTINFO 2553 000077EC 00000000 <1> dw 0, 0 2554 <1> 2555 <1> .incompatible: 2556 000077F0 02008000 <1> dw LOAD_SET_BL_UNIT, LOAD_SET_AXBX_DATASTART 2557 000077F4 02000008 <1> dw LOAD_SET_BL_UNIT, LOAD_SET_AXBX_ROOT_HIDDEN 2558 000077F8 80000008 <1> dw LOAD_SET_AXBX_DATASTART, LOAD_SET_AXBX_ROOT_HIDDEN 2559 000077FC 04001000 <1> dw LOAD_SET_SIDI_CLUSTER, LOAD_SET_DSSI_DPT 2560 00007800 00011000 <1> dw LOAD_SET_DSBP_BPB, LOAD_SET_DSSI_DPT 2561 00007804 00200001 <1> dw LOAD_NO_BPB, LOAD_SET_DSBP_BPB 2562 00007808 00200002 <1> dw LOAD_NO_BPB, LOAD_LBA_SET_TYPE 2563 0000780C 00200004 <1> dw LOAD_NO_BPB, LOAD_MESSAGE_TABLE 2564 00007810 00400400 <1> dw LOAD_SET_DSSI_PARTINFO, LOAD_SET_SIDI_CLUSTER 2565 00007814 00401000 <1> dw LOAD_SET_DSSI_PARTINFO, LOAD_SET_DSSI_DPT 2566 00007818 00400001 <1> dw LOAD_SET_DSSI_PARTINFO, LOAD_SET_DSBP_BPB 2567 0000781C 00000000 <1> dw 0, 0 2568 <1> 2569 00007820 5345545F444C5F554E- <1> lot_messages lot_list 2569 00007829 4954005345545F424C- <1> 2569 00007832 5F554E495400534554- <1> 2569 0000783B 5F534944495F434C55- <1> 2569 00007844 53544552005345545F- <1> 2569 0000784D 445353495F44505400- <1> 2569 00007856 505553485F44505400- <1> 2569 0000785F 444154415354415254- <1> 2569 00007868 5F48494444454E0053- <1> 2569 00007871 45545F415842585F44- <1> 2569 0000787A 415441535441525400- <1> 2569 00007883 5345545F445342505F- <1> 2569 0000788C 425042004C42415F53- <1> 2569 00007895 45545F54595045004D- <1> 2569 0000789E 4553534147455F5441- <1> 2569 000078A7 424C45005345545F41- <1> 2569 000078B0 5842585F524F4F545F- <1> 2569 000078B9 48494444454E00434D- <1> 2569 000078C2 444C494E45004E4F5F- <1> 2569 000078CB 425042005345545F44- <1> 2569 000078D4 5353495F5041525449- <1> 2569 000078DD 4E464F00 <1> 2570 <1> 2571 <1> %unmacro lot_entry 2.nolist 2572 <1> %unmacro lot_messages 0-*.nolist 2573 <1> 2574 <1> 2575 <1> msdos7_message_table: 2576 <1> ; the first four bytes give displacements to the various 2577 <1> ; messages. an ASCIZ message indicates that this was the 2578 <1> ; last message. a message terminated by 0FFh indicates 2579 <1> ; that the last message (displacement at table + 3) is 2580 <1> ; to follow after this message. 2581 <1> ; the maximum allowed displacement is 7Fh. the minimum 2582 <1> ; allowed displacement is 1, to avoid a zero displacement. 2583 <1> ; only the last message is terminated by a zero byte, 2584 <1> ; as that zero byte indicates the end of the message table. 2585 <1> ; (the entire table is treated as one ASCIZ string.) 2586 <1> ; MS-DOS 7.10 from MSW 98 SE seems to have at least 167h (359) 2587 <1> ; bytes allocated to its buffer for these. 2588 <1> ; 2589 <1> ; this message table was discussed in a dosemu2 repo at 2590 <1> ; https://github.com/stsp/dosemu2/issues/681 2591 000078E1 03 <1> .: db .msg_invalid_system - ($ + 1) 2592 000078E2 13 <1> db .msg_io_error - ($ + 1) 2593 000078E3 01 <1> db .msg_invalid_system - ($ + 1) 2594 000078E4 1D <1> db .msg_press_any_key - ($ + 1) 2595 <1> 2596 <1> .msg_invalid_system: 2597 000078E5 0D0A496E76616C6964- <1> db 13,10,"Invalid system", -1 2597 000078EE 2073797374656DFF <1> 2598 <1> 2599 <1> .msg_io_error: 2600 000078F6 0D0A492F4F20657272- <1> db 13,10,"I/O error", -1 2600 000078FF 6F72FF <1> 2601 <1> 2602 <1> .msg_press_any_key: 2603 00007902 0D0A4368616E676520- <1> db 13,10,"Change disk and press any key",13,10,0 2603 0000790B 6469736B20616E6420- <1> 2603 00007914 707265737320616E79- <1> 2603 0000791D 206B65790D0A00 <1> 2604 <1> .end: 2605 <1> .size: equ .end - . 2606 <1> 2607 <1> %if .size > 150h 2608 <1> %error Message table too large! 2609 <1> %endif 2610 <1> 2611 <1> 2612 <1> 2613 <1> align 4, db 0 2614 <1> loadsettings: 2615 <1> istruc LOADSETTINGS 2616 00007924 [BD64] <1> at lsKernelName, dw msg.ldos_kernel_name 2617 00007926 [3365] <1> at lsAddName, dw msg.addname_empty 2618 00007928 6000 <1> at lsMinPara, dw 60h 2619 0000792A 0000 <1> at lsMaxPara, dw 0 2620 0000792C 0010 <1> at lsOptions, dw LOAD_CMDLINE 2621 0000792E 0002 <1> at lsSegment, dw 200h 2622 00007930 00040000 <1> at lsEntry, dd 400h 2623 00007934 007CFFFF <1> at lsBPB, dw 7C00h, -1 2624 00007938 FC03 <1> at lsCheckOffset, dw 1020 2625 0000793A 6C44 <1> at lsCheckValue, db "lD" 2626 0000793C 4C444F5300 <1> at lsName, asciz "LDOS" 2627 00007941 00 <1> iend 2628 <1> istruc LOADSETTINGS 2629 00007944 [A064] <1> at lsKernelName, dw msg.freedos_kernel_name 2630 00007946 [3365] <1> at lsAddName, dw msg.addname_empty 2631 00007948 2000 <1> at lsMinPara, dw 20h 2632 0000794A FFFF <1> at lsMaxPara, dw -1 2633 0000794C 0300 <1> at lsOptions, dw LOAD_SET_DL_UNIT | LOAD_SET_BL_UNIT 2634 0000794E 6000 <1> at lsSegment, dw 60h 2635 00007950 00000000 <1> at lsEntry, dd 0 2636 00007954 007CFFFF <1> at lsBPB, dw 7C00h, -1 2637 00007958 0046524545- <1> at lsName, asciz "FREEDOS" 2637 00007960 444F5300 <1> 2638 <1> iend 2639 <1> istruc LOADSETTINGS 2640 00007964 [AB64] <1> at lsKernelName, dw msg.dosc_kernel_name 2641 00007966 [3365] <1> at lsAddName, dw msg.addname_empty 2642 00007968 2000 <1> at lsMinPara, dw 20h 2643 0000796A FFFF <1> at lsMaxPara, dw -1 2644 0000796C 0300 <1> at lsOptions, dw LOAD_SET_DL_UNIT | LOAD_SET_BL_UNIT 2645 0000796E 0020 <1> at lsSegment, dw 2000h 2646 00007970 00000000 <1> at lsEntry, dd 0 2647 00007974 007C0000 <1> at lsBPB, dw 7C00h, 0 2648 00007978 00444F5343- <1> at lsName, asciz "DOSC" 2648 00007980 00 <1> 2649 00007981 00 <1> iend 2650 <1> istruc LOADSETTINGS 2651 00007984 [B364] <1> at lsKernelName, dw msg.edrdos_kernel_name 2652 00007986 [3365] <1> at lsAddName, dw msg.addname_empty 2653 00007988 2000 <1> at lsMinPara, dw 20h 2654 0000798A FFFF <1> at lsMaxPara, dw -1 2655 0000798C 0301 <1> at lsOptions, dw LOAD_SET_DL_UNIT | LOAD_SET_BL_UNIT | LOAD_SET_DSBP_BPB 2657 0000798E 7000 <1> at lsSegment, dw 70h 2658 00007990 00000000 <1> at lsEntry, dd 0 2659 00007994 007CFFFF <1> at lsBPB, dw 7C00h, -1 2660 00007998 0045445244- <1> at lsName, asciz "EDRDOS" 2660 000079A0 4F5300 <1> 2661 000079A3 00 <1> iend 2662 <1> istruc LOADSETTINGS 2663 000079A4 [C664] <1> at lsKernelName, dw msg.msdos6_kernel_name 2664 000079A6 [CD64] <1> at lsAddName, dw msg.msdos6_add_name 2665 000079A8 2000 <1> at lsMinPara, dw 20h 2666 000079AA 6000 <1> at lsMaxPara, dw 60h 2667 000079AC F100 <1> at lsOptions, dw LOAD_SET_DL_UNIT | LOAD_SET_AXBX_DATASTART | LOAD_DATASTART_HIDDEN | LOAD_SET_DSSI_DPT | LOAD_PUSH_DPT 2670 000079AE 7000 <1> at lsSegment, dw 70h 2671 000079B0 00000000 <1> at lsEntry, dd 0 2672 000079B4 007C0000 <1> at lsBPB, dw 7C00h, 0 2673 000079B8 004D53444F- <1> at lsName, asciz "MSDOS6" 2673 000079C0 533600 <1> 2674 000079C3 00 <1> iend 2675 <1> istruc LOADSETTINGS 2676 000079C4 [0865] <1> at lsKernelName, dw msg.rxdos.0_kernel_name 2677 000079C6 [1F65] <1> at lsAddName, dw msg.rxdos.0_add_name 2678 000079C8 2000 <1> at lsMinPara, dw 20h 2679 000079CA 6000 <1> at lsMaxPara, dw 60h 2680 000079CC 3108 <1> at lsOptions, dw LOAD_SET_DL_UNIT | LOAD_SET_AXBX_ROOT_HIDDEN | LOAD_SET_DSSI_DPT | LOAD_PUSH_DPT 2682 000079CE 7000 <1> at lsSegment, dw 70h 2683 000079D0 00000000 <1> at lsEntry, dd 0 2684 000079D4 007C0000 <1> at lsBPB, dw 7C00h, 0 2685 000079D8 005258444F- <1> at lsName, asciz "RXDOS.0" 2685 000079E0 532E3000 <1> 2686 <1> iend 2687 <1> istruc LOADSETTINGS 2688 000079E4 [1565] <1> at lsKernelName, dw msg.rxdos.1_kernel_name 2689 000079E6 [1F65] <1> at lsAddName, dw msg.rxdos.1_add_name 2690 000079E8 2000 <1> at lsMinPara, dw 20h 2691 000079EA 6000 <1> at lsMaxPara, dw 60h 2692 000079EC 3108 <1> at lsOptions, dw LOAD_SET_DL_UNIT | LOAD_SET_AXBX_ROOT_HIDDEN | LOAD_SET_DSSI_DPT | LOAD_PUSH_DPT 2694 000079EE 7000 <1> at lsSegment, dw 70h 2695 000079F0 00000000 <1> at lsEntry, dd 0 2696 000079F4 007C0000 <1> at lsBPB, dw 7C00h, 0 2697 000079F8 005258444F- <1> at lsName, asciz "RXDOS.1" 2697 00007A00 532E3100 <1> 2698 <1> iend 2699 <1> istruc LOADSETTINGS 2700 00007A04 [2965] <1> at lsKernelName, dw msg.rxdos.2_kernel_name 2701 00007A06 [3365] <1> at lsAddName, dw msg.addname_empty 2702 00007A08 6000 <1> at lsMinPara, dw 60h 2703 00007A0A 0000 <1> at lsMaxPara, dw 0 2704 00007A0C 0010 <1> at lsOptions, dw LOAD_CMDLINE 2705 00007A0E 7000 <1> at lsSegment, dw 70h 2706 00007A10 00040000 <1> at lsEntry, dd 400h 2707 00007A14 007CFFFF <1> at lsBPB, dw 7C00h, -1 2708 00007A18 005258444F- <1> at lsName, asciz "RXDOS.2" 2708 00007A20 532E3200 <1> 2709 <1> iend 2710 <1> istruc LOADSETTINGS 2711 00007A24 [2965] <1> at lsKernelName, dw msg.rxdos.2_kernel_name 2712 00007A26 [3365] <1> at lsAddName, dw msg.addname_empty 2713 00007A28 6000 <1> at lsMinPara, dw 60h 2714 00007A2A 0000 <1> at lsMaxPara, dw 0 2715 00007A2C 0010 <1> at lsOptions, dw LOAD_CMDLINE 2716 00007A2E 0002 <1> at lsSegment, dw 200h 2717 00007A30 00040000 <1> at lsEntry, dd 400h 2718 00007A34 007CFFFF <1> at lsBPB, dw 7C00h, -1 2719 00007A38 FC03 <1> at lsCheckOffset, dw 1020 2720 00007A3A 6C44 <1> at lsCheckValue, db "lD" 2721 00007A3C 5258444F532E3300 <1> at lsName, asciz "RXDOS.3" 2722 <1> iend 2723 <1> istruc LOADSETTINGS 2724 00007A44 [D764] <1> at lsKernelName, dw msg.ibmdos_kernel_name 2725 00007A46 [E264] <1> at lsAddName, dw msg.ibmdos_add_name 2726 00007A48 2000 <1> at lsMinPara, dw 20h 2727 00007A4A 8000 <1> at lsMaxPara, dw 80h 2728 00007A4C F100 <1> at lsOptions, dw LOAD_SET_DL_UNIT | LOAD_SET_AXBX_DATASTART | LOAD_DATASTART_HIDDEN | LOAD_SET_DSSI_DPT | LOAD_PUSH_DPT 2731 00007A4E 7000 <1> at lsSegment, dw 70h 2732 00007A50 00000000 <1> at lsEntry, dd 0 2733 00007A54 007C0000 <1> at lsBPB, dw 7C00h, 0 2734 00007A58 0049424D44- <1> at lsName, asciz "IBMDOS" 2734 00007A60 4F5300 <1> 2735 00007A63 00 <1> iend 2736 <1> istruc LOADSETTINGS 2737 00007A64 [C664] <1> at lsKernelName, dw msg.msdos7_kernel_name 2738 00007A66 [3365] <1> at lsAddName, dw msg.addname_empty 2739 00007A68 4000 <1> at lsMinPara, dw 40h 2740 00007A6A 8000 <1> at lsMaxPara, dw 80h 2741 00007A6C 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 2744 00007A6E 7000 <1> at lsSegment, dw 70h 2745 00007A70 00020000 <1> at lsEntry, dd 200h 2746 00007A74 007CFFFF <1> at lsBPB, dw 7C00h, -1 2747 00007A78 0002 <1> at lsCheckOffset, dw 200h 2748 00007A7A 424A <1> at lsCheckValue, db "BJ" 2749 00007A7C 4D53444F533700 <1> at lsName, asciz "MSDOS7" 2750 00007A83 00 <1> iend 2751 <1> istruc LOADSETTINGS 2752 00007A84 [ED64] <1> at lsKernelName, dw msg.ntldr_kernel_name 2753 00007A86 [3365] <1> at lsAddName, dw msg.addname_empty 2754 00007A88 2000 <1> at lsMinPara, dw 20h 2755 00007A8A FFFF <1> at lsMaxPara, dw -1 2756 00007A8C 4100 <1> at lsOptions, dw LOAD_SET_DL_UNIT | LOAD_DATASTART_HIDDEN 2758 00007A8E 0020 <1> at lsSegment, dw 2000h 2759 00007A90 00000000 <1> at lsEntry, dd 0 2760 00007A94 007C0000 <1> at lsBPB, dw 7C00h, 0 2761 00007A98 004E544C44- <1> at lsName, asciz "NTLDR" 2761 00007AA0 5200 <1> 2762 00007AA2 00 <1> iend 2763 <1> istruc LOADSETTINGS 2764 00007AA4 [F364] <1> at lsKernelName, dw msg.bootmgr_kernel_name 2765 00007AA6 [3365] <1> at lsAddName, dw msg.addname_empty 2766 00007AA8 2000 <1> at lsMinPara, dw 20h 2767 00007AAA FFFF <1> at lsMaxPara, dw -1 2768 00007AAC 4100 <1> at lsOptions, dw LOAD_SET_DL_UNIT | LOAD_DATASTART_HIDDEN 2770 00007AAE 0020 <1> at lsSegment, dw 2000h 2771 00007AB0 00000000 <1> at lsEntry, dd 0 2772 00007AB4 007C0000 <1> at lsBPB, dw 7C00h, 0 2773 00007AB8 00424F4F54- <1> at lsName, asciz "BOOTMGR" 2773 00007AC0 4D475200 <1> 2774 <1> iend 2775 <1> istruc LOADSETTINGS 2776 00007AC4 [FB64] <1> at lsKernelName, dw msg.chain_kernel_name 2777 00007AC6 [3365] <1> at lsAddName, dw msg.addname_empty 2778 00007AC8 2000 <1> at lsMinPara, dw paras(512) 2779 00007ACA 0002 <1> at lsMaxPara, dw paras(8192) 2780 00007ACC 0160 <1> at lsOptions, dw LOAD_SET_DL_UNIT | LOAD_SET_DSSI_PARTINFO | LOAD_NO_BPB 2782 00007ACE C007 <1> at lsSegment, dw 7C0h 2783 00007AD0 007C40F8 <1> at lsEntry, dw 7C00h, -7C0h 2784 00007AD4 007C0000 <1> at lsBPB, dw 7C00h, 0 2785 00007AD8 FE01 <1> at lsCheckOffset, dw 510 2786 00007ADA 55AA <1> at lsCheckValue, dw 0AA55h 2787 00007ADC 434841494E00 <1> at lsName, asciz "CHAIN" 2788 00007AE2 00 <1> iend 2789 00007AE4 0000 <1> dw 0 2790 <1> %endif 2791 <1> 2792 <1> 2793 00007AE6 0D21 <1> dskerrs: db dskerr0-dskerrs,dskerr1-dskerrs 2794 00007AE8 3444 <1> db dskerr2-dskerrs,dskerr3-dskerrs 2795 00007AEA 5494 <1> db dskerr4-dskerrs,dskerr9-dskerrs 2796 00007AEC 6570 <1> db dskerr6-dskerrs,dskerr7-dskerrs 2797 00007AEE 8394 <1> db dskerr8-dskerrs,dskerr9-dskerrs 2798 00007AF0 A2AE <1> db dskerra-dskerrs,dskerrb-dskerrs 2799 00007AF2 B9 <1> db dskerrc-dskerrs 2800 00007AF3 57726974652070726F- <1> dskerr0: asciz "Write protect error" 2800 00007AFC 74656374206572726F- <1> 2800 00007B05 7200 <1> 2801 00007B07 556E6B6E6F776E2075- <1> dskerr1: asciz "Unknown unit error" 2801 00007B10 6E6974206572726F72- <1> 2801 00007B19 00 <1> 2802 00007B1A 4472697665206E6F74- <1> dskerr2: asciz "Drive not ready" 2802 00007B23 20726561647900 <1> 2803 00007B2A 556E6B6E6F776E2063- <1> dskerr3: asciz "Unknown command" 2803 00007B33 6F6D6D616E6400 <1> 2804 00007B3A 44617461206572726F- <1> dskerr4: asciz "Data error (CRC)" 2804 00007B43 7220284352432900 <1> 2805 00007B4B 5365656B206572726F- <1> dskerr6: asciz "Seek error" 2805 00007B54 7200 <1> 2806 00007B56 556E6B6E6F776E206D- <1> dskerr7: asciz "Unknown media type" 2806 00007B5F 656469612074797065- <1> 2806 00007B68 00 <1> 2807 00007B69 536563746F72206E6F- <1> dskerr8: asciz "Sector not found" 2807 00007B72 7420666F756E6400 <1> 2808 00007B7A 556E6B6E6F776E2065- <1> dskerr9: asciz "Unknown error" 2808 00007B83 72726F7200 <1> 2809 00007B88 577269746520666175- <1> dskerra: asciz "Write fault" 2809 00007B91 6C7400 <1> 2810 00007B94 52656164206661756C- <1> dskerrb: asciz "Read fault" 2810 00007B9D 7400 <1> 2811 00007B9F 47656E6572616C2066- <1> dskerrc: asciz "General failure" 2811 00007BA8 61696C75726500 <1> 2812 00007BAF 207265616400 <1> reading: asciz " read" 2813 00007BB5 207772697400 <1> writing: asciz " writ" 2814 00007BBB 696E67206472697665- <1> drive: db "ing drive " 2814 00007BC4 20 <1> 2815 00007BC5 5F00 <1> driveno: asciz "_" 2816 00007BC7 383038362F383800 <1> msg8088: asciz "8086/88" 2817 00007BCF 78383600 <1> msgx86: asciz "x86" 2818 00007BD3 20776974686F757420- <1> no_copr: asciz " without coprocessor" 2818 00007BDC 636F70726F63657373- <1> 2818 00007BE5 6F7200 <1> 2819 00007BE8 207769746820636F70- <1> has_copr: asciz " with coprocessor" 2819 00007BF1 726F636573736F7200 <1> 2820 00007BFA 207769746820323837- <1> has_287: asciz " with 287" 2820 00007C03 00 <1> 2821 00007C04 7472616365206D6F64- <1> tmodes: db "trace mode is " 2821 00007C0D 6520697320 <1> 2822 00007C12 5F202D20696E746572- <1> tmodev: asciz "_ - interrupts are " 2822 00007C1B 727570747320617265- <1> 2822 00007C24 2000 <1> 2823 00007C26 74726163656400 <1> tmode1: asciz "traced" 2824 00007C2D 70726F636573736564- <1> tmode0: asciz "processed" 2824 00007C36 00 <1> 2825 00007C37 2028756E7573656429- <1> unused: asciz " (unused)" 2825 00007C40 00 <1> 2826 <1> needsmsg: 2827 00007C41 5B6E6565647320 <1> .: db "[needs " 2828 <1> .digit_x_ofs: equ $ - . 2829 00007C48 7838 <1> db "x8" 2830 <1> .digit_6_ofs: equ $ - . 2831 00007C4A 365D <1> db "6]" 2832 <1> needsmsg_L: equ $-needsmsg 2833 00007C4C 5B6E65656473206D61- <1> needsmath: db "[needs math coprocessor]" 2833 00007C55 746820636F70726F63- <1> 2833 00007C5E 6573736F725D <1> 2834 <1> needsmath_L: equ $-needsmath 2835 00007C64 5B6F62736F6C657465- <1> obsolete: db "[obsolete]" 2835 00007C6D 5D <1> 2836 <1> obsolete_L: equ $-obsolete 2837 00007C6E 446976696465206572- <1> int0msg: asciz "Divide error",13,10 2837 00007C77 726F720D0A00 <1> 2838 00007C7D 556E65787065637465- <1> int1msg: asciz "Unexpected single-step interrupt",13,10 2838 00007C86 642073696E676C652D- <1> 2838 00007C8F 7374657020696E7465- <1> 2838 00007C98 72727570740D0A00 <1> 2839 00007CA0 556E65787065637465- <1> int3msg: asciz "Unexpected breakpoint interrupt",13,10 2839 00007CA9 6420627265616B706F- <1> 2839 00007CB2 696E7420696E746572- <1> 2839 00007CBB 727570740D0A00 <1> 2840 <1> %if _CATCHINT06 2841 00007CC2 496E76616C6964206F- <1> int6msg: asciz "Invalid opcode",13,10 2841 00007CCB 70636F64650D0A00 <1> 2842 <1> %endif 2843 <1> %if _CATCHINT08 2844 00007CD3 446574656374656420- <1> int8msg: asciz "Detected Control pressed 5 seconds",13,10 2844 00007CDC 436F6E74726F6C2070- <1> 2844 00007CE5 726573736564203520- <1> 2844 00007CEE 7365636F6E64730D0A- <1> 2844 00007CF7 00 <1> 2845 00007CF8 446574656374656420- <1> int8_kbd_msg: asciz "Detected Control pressed 5 seconds (Keyboard enabled)",13,10 2845 00007D01 436F6E74726F6C2070- <1> 2845 00007D0A 726573736564203520- <1> 2845 00007D13 7365636F6E64732028- <1> 2845 00007D1C 4B6579626F61726420- <1> 2845 00007D25 656E61626C6564290D- <1> 2845 00007D2E 0A00 <1> 2846 <1> runint_ctrlc_msg: 2847 00007D30 446574656374656420- <1> asciz "Detected double Control-C via serial",13,10 2847 00007D39 646F75626C6520436F- <1> 2847 00007D42 6E74726F6C2D432076- <1> 2847 00007D4B 69612073657269616C- <1> 2847 00007D54 0D0A00 <1> 2848 <1> %endif 2849 <1> %if _CATCHINT18 2850 00007D57 4469736B6C65737320- <1> int18msg: asciz "Diskless boot hook called",13,10 2850 00007D60 626F6F7420686F6F6B- <1> 2850 00007D69 2063616C6C65640D0A- <1> 2850 00007D72 00 <1> 2851 <1> %endif 2852 <1> %if _CATCHINT19 2853 00007D73 426F6F74206C6F6164- <1> int19msg: asciz "Boot load called",13,10 2853 00007D7C 2063616C6C65640D0A- <1> 2853 00007D85 00 <1> 2854 <1> %endif 2855 <1> %if _PM 2856 <1> %if _CATCHEXC06 2857 00007D86 496E76616C6964206F- <1> exc6msg: asciz "Invalid opcode fault",13,10 2857 00007D8F 70636F646520666175- <1> 2857 00007D98 6C740D0A00 <1> 2858 <1> %endif 2859 <1> %if _CATCHEXC0C 2860 00007D9D 537461636B20666175- <1> excCmsg: asciz "Stack fault",13,10 2860 00007DA6 6C740D0A00 <1> 2861 <1> %endif 2862 00007DAB 47656E6572616C2070- <1> excDmsg: asciz "General protection fault",13,10 2862 00007DB4 726F74656374696F6E- <1> 2862 00007DBD 206661756C740D0A00 <1> 2863 <1> %if _EXCCSIP 2864 00007DC6 43533A49503D <1> excloc: db "CS:IP=" 2865 00007DCC 202020203A20202020- <1> exccsip: asciz " : ",13,10 2865 00007DD5 0D0A00 <1> 2866 <1> %endif 2867 00007DD8 50616765206661756C- <1> excEmsg: asciz "Page fault",13,10 2867 00007DE1 740D0A00 <1> 2868 <1> %if _BREAK_INSTALLDPMI 2869 00007DE5 456E74657265642050- <1> installdpmimsg: asciz "Entered Protected Mode",13,10 2869 00007DEE 726F74656374656420- <1> 2869 00007DF7 4D6F64650D0A00 <1> 2870 <1> %endif 2871 00007DFE 436F6D6D616E64206E- <1> nodosext: asciz "Command not supported in protected mode without a DOS extender",13,10 2871 00007E07 6F7420737570706F72- <1> 2871 00007E10 74656420696E207072- <1> 2871 00007E19 6F746563746564206D- <1> 2871 00007E22 6F646520776974686F- <1> 2871 00007E2B 7574206120444F5320- <1> 2871 00007E34 657874656E6465720D- <1> 2871 00007E3D 0A00 <1> 2872 00007E3F 436F6D6D616E64206E- <1> nopmsupp: asciz "Command not supported in protected mode",13,10 2872 00007E48 6F7420737570706F72- <1> 2872 00007E51 74656420696E207072- <1> 2872 00007E5A 6F746563746564206D- <1> 2872 00007E63 6F64650D0A00 <1> 2873 <1> %if _DISPHOOK 2874 00007E69 44504D4920656E7472- <1> dpmihook: db "DPMI entry hooked, new entry=" 2874 00007E72 7920686F6F6B65642C- <1> 2874 00007E7B 206E657720656E7472- <1> 2874 00007E84 793D <1> 2875 00007E86 5F5F5F5F3A38434136- <1> dpmihookcs: asciz "____:",_4digitshex(mydpmientry+DATASECTIONFIXUP),13,10 2875 00007E8F 0D0A00 <1> 2876 <1> %endif 2877 00007E92 44504D4920656E7472- <1> msg.dpmi_no_hook: asciz "DPMI entry cannot be hooked!",13,10 2877 00007E9B 792063616E6E6F7420- <1> 2877 00007EA4 626520686F6F6B6564- <1> 2877 00007EAD 210D0A00 <1> 2878 00007EB1 7265736F7572636520- <1> nodesc: asciz "resource not accessible in real mode",13,10 2878 00007EBA 6E6F74206163636573- <1> 2878 00007EC3 7369626C6520696E20- <1> 2878 00007ECC 7265616C206D6F6465- <1> 2878 00007ED5 0D0A00 <1> 2879 <1> ;descwrong: asciz "descriptor not accessible",13,10 2880 00007ED8 67617465206E6F7420- <1> gatewrong: asciz "gate not accessible",13,10 2880 00007EE1 61636365737369626C- <1> 2880 00007EEA 650D0A00 <1> 2881 00007EEE 4D532D444F5300 <1> msg.msdos: asciz "MS-DOS" 2882 00007EF5 5F5F5F5F2062617365- <1> descr: db "____ base=" 2882 00007EFE 3D <1> 2883 00007EFF 5F5F5F5F5F5F5F5F20- <1> descbase: db "________ limit=" 2883 00007F08 6C696D69743D <1> 2884 00007F0E 5F5F5F5F5F5F5F5F20- <1> desclim: db "________ attr=" 2884 00007F17 617474723D <1> 2885 00007F1C 5F5F5F5F0D0A <1> descattr: db "____",13,10 2886 00007F22 00 <1> asciz 2887 <1> %endif ; _PM 2888 00007F23 4572726F7220696E20- <1> ph_msg: asciz "Error in sequence of calls to hack.",13,10 2888 00007F2C 73657175656E636520- <1> 2888 00007F35 6F662063616C6C7320- <1> 2888 00007F3E 746F206861636B2E0D- <1> 2888 00007F47 0A00 <1> 2889 <1> 2890 00007F49 0D0A50726F6772616D- <1> progtrm: db 13,10,"Program terminated normally (" 2890 00007F52 207465726D696E6174- <1> 2890 00007F5B 6564206E6F726D616C- <1> 2890 00007F64 6C792028 <1> 2891 00007F68 5F5F5F5F290D0A00 <1> progexit: asciz "____)",13,10 2892 00007F70 45584520616E642048- <1> nowhexe: asciz "EXE and HEX files cannot be written",13,10 2892 00007F79 45582066696C657320- <1> 2892 00007F82 63616E6E6F74206265- <1> 2892 00007F8B 207772697474656E0D- <1> 2892 00007F94 0A00 <1> 2893 00007F96 43616E6E6F74207772- <1> nownull: asciz "Cannot write: no file name given",13,10 2893 00007F9F 6974653A206E6F2066- <1> 2893 00007FA8 696C65206E616D6520- <1> 2893 00007FB1 676976656E0D0A00 <1> 2894 00007FB9 57726974696E672000 <1> wwmsg1: asciz "Writing " 2895 00007FC2 2062797465730D0A00 <1> wwmsg2: asciz " bytes",13,10 2896 00007FCB 4469736B2066756C6C- <1> diskful: asciz "Disk full",13,10 2896 00007FD4 0D0A00 <1> 2897 00007FD7 4572726F7220 <1> openerr: db "Error " 2898 00007FDD 5F5F5F5F206F70656E- <1> openerr1: asciz "____ opening file",13,10 2898 00007FE6 696E672066696C650D- <1> 2898 00007FEF 0A00 <1> 2899 00007FF1 46696C65206E6F7420- <1> doserr2: asciz "File not found",13,10 2899 00007FFA 666F756E640D0A00 <1> 2900 00008002 50617468206E6F7420- <1> doserr3: asciz "Path not found",13,10 2900 0000800B 666F756E640D0A00 <1> 2901 00008013 416363657373206465- <1> doserr5: asciz "Access denied",13,10 2901 0000801C 6E6965640D0A00 <1> 2902 00008023 496E73756666696369- <1> doserr8: asciz "Insufficient memory",13,10 2902 0000802C 656E74206D656D6F72- <1> 2902 00008035 790D0A00 <1> 2903 <1> 2904 <1> %if _EMS 2905 <1> ;emmname: db "EMMXXXX0" 2906 00008039 454D53206E6F742069- <1> emsnot: asciz "EMS not installed",13,10 2906 00008042 6E7374616C6C65640D- <1> 2906 0000804B 0A00 <1> 2907 0000804D 454D5320696E746572- <1> emserr1: asciz "EMS internal error",13,10 2907 00008056 6E616C206572726F72- <1> 2907 0000805F 0D0A00 <1> 2908 00008062 48616E646C65206E6F- <1> emserr3: asciz "Handle not found",13,10 2908 0000806B 7420666F756E640D0A- <1> 2908 00008074 00 <1> 2909 00008075 4E6F20667265652068- <1> emserr5: asciz "No free handles",13,10 2909 0000807E 616E646C65730D0A00 <1> 2910 00008087 546F74616C20706167- <1> emserr7: asciz "Total pages exceeded",13,10 2910 00008090 657320657863656564- <1> 2910 00008099 65640D0A00 <1> 2911 0000809E 467265652070616765- <1> emserr8: asciz "Free pages exceeded",13,10 2911 000080A7 732065786365656465- <1> 2911 000080B0 640D0A00 <1> 2912 000080B4 506172616D65746572- <1> emserr9: asciz "Parameter error",13,10 2912 000080BD 206572726F720D0A00 <1> 2913 000080C6 4C6F676963616C2070- <1> emserra: asciz "Logical page out of range",13,10 2913 000080CF 616765206F7574206F- <1> 2913 000080D8 662072616E67650D0A- <1> 2913 000080E1 00 <1> 2914 000080E2 506879736963616C20- <1> emserrb: asciz "Physical page out of range",13,10 2914 000080EB 70616765206F757420- <1> 2914 000080F4 6F662072616E67650D- <1> 2914 000080FD 0A00 <1> 2915 000080FF 00 <1> align 2, db 0 2916 00008100 [4D80][4D80]0000- <1> emserrs: dw emserr1,emserr1,0,emserr3,0,emserr5,0,emserr7 2916 00008106 [6280]0000[7580]00- <1> 2916 0000810D 00[8780] <1> 2917 00008110 [9E80][B480][C680]- <1> dw emserr8,emserr9,emserra,emserrb 2917 00008116 [E280] <1> 2918 00008118 454D53206572726F72- <1> emserrx: asciz "EMS error " 2918 00008121 2000 <1> 2919 00008123 48616E646C65206372- <1> xaans: db "Handle created = " 2919 0000812C 6561746564203D20 <1> 2920 00008134 5F5F5F5F0D0A00 <1> xaans1: asciz "____",13,10 2921 0000813B 48616E646C6520 <1> xdans: db "Handle " 2922 00008142 5F5F5F5F206465616C- <1> xdans1: asciz "____ deallocated",13,10 2922 0000814B 6C6F63617465640D0A- <1> 2922 00008154 00 <1> 2923 00008155 48616E646C65207265- <1> xrans: asciz "Handle reallocated",13,10 2923 0000815E 616C6C6F6361746564- <1> 2923 00008167 0D0A00 <1> 2924 0000816A 4C6F676963616C2070- <1> xmans: db "Logical page " 2924 00008173 61676520 <1> 2925 00008177 5F5F5F5F206D617070- <1> xmans1: db "____ mapped to physical page " 2925 00008180 656420746F20706879- <1> 2925 00008189 736963616C20706167- <1> 2925 00008192 6520 <1> 2926 00008194 5F5F0D0A00 <1> xmans2: asciz "__",13,10 2927 00008199 48616E646C6520 <1> xsstr1: db "Handle " 2928 000081A0 5F5F5F5F2068617320 <1> xsstr1a: db "____ has " 2929 000081A9 5F5F5F5F2070616765- <1> xsstr1b: asciz "____ pages allocated",13,10 2929 000081B2 7320616C6C6F636174- <1> 2929 000081BB 65640D0A00 <1> 2930 000081C0 706879732E20706167- <1> xsstr2: db "phys. page " 2930 000081C9 6520 <1> 2931 000081CB 5F5F203D207365676D- <1> xsstr2a: db "__ = segment " 2931 000081D4 656E7420 <1> 2932 000081D8 5F5F5F5F202000 <1> xsstr2b: asciz "____ " 2933 000081DF 5F5F5F5F206F662061- <1> xsstr3: db "____ of a total " 2933 000081E8 20746F74616C20 <1> 2934 000081EF 5F5F5F5F20454D5320- <1> xsstr3a: asciz "____ EMS " 2934 000081F8 00 <1> 2935 000081F9 657320686176652062- <1> xsstr4: asciz "es have been allocated",13,10 2935 00008202 65656E20616C6C6F63- <1> 2935 0000820B 617465640D0A00 <1> 2936 00008212 70616700 <1> xsstrpg: asciz "pag" 2937 00008216 68616E646C00 <1> xsstrhd: asciz "handl" 2938 0000821C 6E6F206D6170706162- <1> xsnopgs: asciz "no mappable pages",13,10,13,10 2938 00008225 6C652070616765730D- <1> 2938 0000822E 0A0D0A00 <1> 2939 <1> %endif 2940 <1> 2941 00008232 00 <1> align 4, db 0 2942 00008234 000800040002800040- <1> flagbits: dw 800h,400h,200h, 80h,040h,010h,004h,001h 2942 0000823D 00100004000100 <1> 2943 00008244 4F56444E45494E475A- <1> flagson: dw "OV","DN","EI","NG","ZR","AC","PE","CY" 2943 0000824D 52414350454359 <1> 2944 00008254 4E5655504449504C4E- <1> flagsoff: dw "NV","UP","DI","PL","NZ","NA","PO","NC" 2944 0000825D 5A4E41504F4E43 <1> 2945 00008264 4F464446494653465A- <1> flagnames: dw "OF","DF","IF","SF","ZF","AF","PF","CF" 2945 0000826D 46414650464346 <1> 2946 <1> 2947 <1> %if _COND 2948 00008274 6E6F7420 <1> msg.condnotjump:db "not " 2949 00008278 6A756D70696E6700 <1> msg.condjump: asciz "jumping" 2950 <1> %endif 2951 <1> 2952 00008280 206D6174636865730D- <1> msg.matches: asciz " matches",13,10 2952 00008289 0A00 <1> 2953 <1> 2954 0000828B 00 <1> align 4, db 0 2955 0000828C 414C4148424C424843- <1> reg8names: dw "AL","AH","BL","BH","CL","CH","DL","DH" 2955 00008295 4C4348444C4448 <1> 2956 <1> ; Even entries are xL registers, odd ones the xH ones. 2957 <1> ; Order matches that of the first four regs entries. 2958 <1> 2959 0000829C 415842584358445853- <1> reg16names: dw "AX","BX","CX","DX","SP","BP","SI","DI" 2959 000082A5 50425053494449 <1> 2960 000082AC 445345535353435346- <1> dw "DS","ES","SS","CS","FS","GS","IP","FL" 2960 000082B5 5347534950464C <1> 2961 <1> ; 32-bit registers are the first eight and last two entries of 2962 <1> ; reg16names with 'E', which are all non-segment registers. 2963 <1> ; Segment registers can be detected by the 'S' as second letter. 2964 <1> ; FS and GS are the fourth- and third-to-last entries. 2965 <1> ; Order matches that of the sixteen regs entries. 2966 <1> 2967 <1> 2968 <1> ; Table of recognised default (unsigned) types. 2969 <1> ; 2970 <1> ; If any number of characters match, use the type. 2971 <1> ; If an additional "S" is found in front of a valid 2972 <1> ; type, the type is set to signed. (Word and byte 2973 <1> ; types are sign-extended to a dword value.) 2974 <1> ; 2975 <1> ; Each odd entry is an alternative name for the even 2976 <1> ; entry preceding it. 2977 <1> types: 2978 000082BC 0442595445 <1> countedb "BYTE" ; ("B" is hexadecimal) 2979 000082C1 0443484152 <1> countedb "CHAR" ; ("C" is hexadecimal) 2980 000082C6 04574F5244 <1> countedb "WORD" 2981 000082CB 0553484F5254 <1> countedb "SHORT" 2982 000082D1 053342595445 <1> countedb "3BYTE" ; ("3" and "3B" are numeric) 2983 000082D7 053342595445 <1> countedb "3BYTE" 2984 000082DD 0544574F5244 <1> countedb "DWORD" ; ("D" is hexadecimal) 2985 000082E3 044C4F4E47 <1> countedb "LONG" 2986 <1> .addresses: 2987 000082E8 07504F494E544552 <1> countedb "POINTER" 2988 000082F0 03505452 <1> countedb "PTR" 2989 000082F4 064F4646534554 <1> countedb "OFFSET" 2990 000082FB 034F4653 <1> countedb "OFS" 2991 000082FF 075345474D454E54 <1> countedb "SEGMENT" 2992 <1> .end: 2993 <1> 2994 <1> maxtypesize equ 7 ; size of "SEGMENT" and "POINTER" 1077 1078 msg_end: 1079 1080 numdef SHOWMSGSIZE, 0 1081 %if _SHOWMSGSIZE 1082 %assign MSGSIZE msg_end - msg_start 1083 %warning msg holds MSGSIZE bytes 1084 %endif 1085 1086 1087 usesection lDEBUG_DATA_ENTRY 1088 ; INP: word [cs:ip] = near address to jump to in other segment 1089 ..@symhint_trace_caller_entry_to_code_seg: 1090 entry_to_code_seg: 1091 00008307 50 push ax ; word space for ?jumpaddress_ip, is ax 1092 00008308 2EA1[D400] mov ax, word [cs:code_seg] 1093 %if _PM 1094 0000830C EB05 jmp entry_to_code_common 1095 1096 ..@symhint_trace_caller_entry_to_code_sel: 1097 entry_to_code_sel: 1098 0000830E 50 push ax 1099 0000830F 2EA1[D600] mov ax, word [cs:code_sel] 1100 %endif 1101 1102 entry_to_code_common: 1103 lframe 0 1104 lpar word, jumpaddress_cs_and_orig_ip 1105 lpar word, jumpaddress_ip 1106 00008313 5589E5 lenter 1107 1108 00008316 56 push si 1109 00008317 9C pushf 1110 00008318 FC cld 1111 1112 00008319 874604 xchg word [bp + ?jumpaddress_cs_and_orig_ip], ax ; fill function segment 1113 0000831C 89C6 mov si, ax 1114 0000831E 2EAD cs lodsw 1115 %if _DEBUG 1116 cmp al, 0CCh ; debugger breakpoint ? 1117 jne @F ; no --> 1118 int3 ; break to make it remove the breakpoint 1119 dec si 1120 dec si 1121 cs lodsw ; reload the word 1122 cmp al, 0CCh 1123 jne @F 1124 1125 .l: 1126 int3 1127 jmp .l 1128 1129 @@: 1130 %endif 1131 00008320 874602 xchg word [bp + ?jumpaddress_ip], ax ; fill function offset 1132 ; (and restore ax) 1133 1134 00008323 9D popf 1135 00008324 5E pop si 1136 1137 00008325 5D lleave 1138 00008326 CB retf ; jump to dword [bp + ?jumpaddress] 1139 1140 1141 1142 ; debug22 - Interrupt 22h handler 1143 ; 1144 ; This is for DEBUG itself: it's a catch-all for the various Int23 1145 ; and Int24 calls that may occur unpredictably at any time. What we 1146 ; do is pretend to be a command interpreter (which we are, in a sense, 1147 ; just with different sort of commands) by setting our parent PSP 1148 ; value equal to our own PSP so that DOS does not free our memory when 1149 ; we quit. Therefore control ends up here when DOS detects Control-C 1150 ; or an Abort in the critical error prompt is selected. 1151 debug22: 1152 00008327 FA cli 1153 .cleartraceflag: 1154 00008328 FC cld ; reestablish things 1155 00008329 8CC8 mov ax, cs 1156 0000832B 8ED8 mov ds, ax 1157 0000832D 8ED0 mov ss, ax 1158 0000832F 8B26[9C0A] mov sp, word [ savesp ] ; restore stack 1159 %if _PM 1160 00008333 8026[9D00]F7 clropt [internalflags], protectedmode ; reset PM flag 1161 %endif 1162 00008338 90 times 1 - (($ - $$) & 1) nop ; align in-code parameter 1163 00008339 E8CBFF call entry_to_code_seg 1164 0000833C [F103] dw cmd2_reset_re_maybe_pm 1165 1166 1167 usesection lDEBUG_CODE 1168 1169 %if $ - $$ 1170 %error cmd3 is not at offset 0 in lDEBUG_CODE 1171 %endif 1172 1173 code_insure_low_byte_not_0CCh 1174 ; Begin main command loop. 1175 cmd3: 1176 00000000 16 push ss 1177 00000001 1F pop ds 1178 00000002 66 _386_o32 ; mov esp 1179 00000003 8B26[9C0A] mov sp, word [ savesp ] ; restore stack 1180 00000007 83E4FC _386 and sp, ~3 ; align stack 1181 0000000A 66 _386_o32 1182 0000000B 31C0 xor ax, ax 1183 0000000D 66 _386_o32 1184 0000000E 50 push ax 1185 0000000F 66 _386_o32 1186 00000010 9D popf 1187 00000011 8B26[9C0A] _386 mov sp, word [ savesp ] ; restore stack 1188 00000015 FC cld 1189 00000016 FB sti 1190 00000017 C706[A20A][0000] mov word [ errret ], cmd3 1191 0000001D C706[A40A][69A7] mov word [ throwret ], errhandler 1192 00000023 8926[A60A] mov word [ throwsp ], sp 1193 00000027 1E push ds 1194 00000028 07 pop es 1195 1196 00000029 31FF xor di, di 1197 0000002B 873E[1A0C] xchg di, word [terminator_in_line_in.offset] 1198 0000002F 85FF test di, di 1199 00000031 7409 jz @F 1200 00000033 803D00 cmp byte [di], 0 1201 00000036 7504 jne @F 1202 00000038 A0[1C0C] mov al, byte [terminator_in_line_in.value] 1203 0000003B AA stosb 1204 @@: 1205 1206 0000003C 8026[A500]DF clropt [internalflags3], dif3_unquiet_error 1207 00000041 8026[A600]FD clropt [internalflags3], dif3_do_not_highlight 1208 %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 1209 00000046 8026[A700]E7 clropt [internalflags3], dif3_auxbuff_guarded_1 | dif3_in_if 1210 %else 1211 clropt [internalflags3], dif3_auxbuff_guarded_1 1212 %endif 1213 0000004B 8026[A400]CF clropt [internalflags3], dif3_input_serial_override | dif3_input_terminal_override 1215 00000050 8026[A300]EF clropt [internalflags2], dif2_in_silence_dump 1216 %if _PM 1217 00000055 E87C39 call resetmode 1218 %endif 1219 1220 1221 %if _PM 1222 cmd3_int2F_init: 1223 00000058 B02F mov al, 2Fh ; interrupt number 1224 0000005A BE[708B] mov si, debug2F ; -> IISP entry header 1225 1226 0000005D F606[8800]02 testopt [options4], opt4_int_2F_hook 1227 00000062 751C jnz .done 1228 .check_disable: 1229 00000064 F606[A800]02 testopt [internalflags4], dif4_int_2F_hooked 1230 00000069 7415 jz .done 1231 1232 0000006B BA0200 mov dx, opt4_int_2F_force >> 16 1233 0000006E E8ABD4 call UnhookInterruptForce 1234 00000071 720D jc .done 1235 1236 00000073 8026[9D00]FE clropt [internalflags], hooked2F 1237 00000078 8026[A800]FD clropt [internalflags4], dif4_int_2F_hooked 1238 0000007D E8A9D5 call update_inttab_optional 1239 1240 .done: 1241 %endif 1242 1243 1244 %if _CATCHINT08 1245 cmd3_int08_init: 1246 00000080 B008 mov al, 08h ; interrupt number 1247 00000082 BE[8087] mov si, intr8 ; -> IISP entry header 1248 1249 00000085 F606[8800]04 testopt [options4], opt4_int_08_hook 1250 0000008A 7414 jz .check_disable 1251 .check_enable: 1252 0000008C F606[A800]04 testopt [internalflags4], dif4_int_08_hooked 1253 00000091 7524 jnz .done 1254 1255 00000093 E80CD3 call install_86m_interrupt_handler 1256 00000096 800E[A800]04 setopt [internalflags4], dif4_int_08_hooked 1257 0000009B E88BD5 call update_inttab_optional 1258 0000009E EB17 jmp .done 1259 1260 .check_disable: 1261 000000A0 F606[A800]04 testopt [internalflags4], dif4_int_08_hooked 1262 000000A5 7410 jz .done 1263 1264 000000A7 BA0400 mov dx, opt4_int_08_force >> 16 1265 000000AA E86FD4 call UnhookInterruptForce 1266 000000AD 7208 jc .done 1267 1268 000000AF 8026[A800]FB clropt [internalflags4], dif4_int_08_hooked 1269 000000B4 E872D5 call update_inttab_optional 1270 1271 .done: 1272 %endif 1273 1274 1275 %if _CATCHINT2D 1276 cmd3_int2D_init: 1277 000000B7 B02D mov al, 2Dh ; interrupt number 1278 000000B9 BE[7483] mov si, int2D ; -> IISP entry header 1279 1280 000000BC F606[8800]08 testopt [options4], opt4_int_2D_hook 1281 000000C1 744A jz .check_disable 1282 .check_enable: 1283 000000C3 F606[A800]08 testopt [internalflags4], dif4_int_2D_hooked 1284 000000C8 7557 jnz .done 1285 1286 000000CA E861D3 call intchk ; ZR if offset = -1 or segment = 0 1287 ; CHG: ax, dx, bx 1288 000000CD 7431 jz .fail 1289 1290 000000CF 8A26[7083] mov ah, byte [try_amis_multiplex_number] 1291 000000D3 B000 mov al, 00h 1292 ; function 0 changes dx, di, cx, al 1293 %if _PM 1294 000000D5 E86494 call call_int2D 1295 %else 1296 int 2Dh ; enquire whether there's anyone 1297 %endif 1298 000000D8 84C0 test al, al 1299 000000DA 7414 jz .got 1300 1301 000000DC 31C0 xor ax, ax ; start with multiplex number 0 1302 .loopplex: 1303 000000DE B000 mov al, 00h ; AMIS installation check 1304 ; function 0 changes dx, di, cx, al 1305 %if _PM 1306 000000E0 E85994 call call_int2D 1307 %else 1308 int 2Dh ; enquire whether there's anyone 1309 %endif 1310 000000E3 84C0 test al, al ; free ? 1311 000000E5 7409 jz .got ; yes, put it to use --> 1312 000000E7 FEC4 inc ah 1313 000000E9 75F3 jnz .loopplex ; try next multiplexer --> 1314 1315 000000EB BA[3F6C] mov dx, msg.cannot_hook_2D.nofree 1316 000000EE EB13 jmp .fail_putsz 1317 1318 .got: 1319 000000F0 8826[8883] mov byte [amis_multiplex_number], ah 1320 1321 000000F4 B02D mov al, 2Dh ; interrupt number 1322 000000F6 E8A9D2 call install_86m_interrupt_handler 1323 000000F9 800E[A800]08 setopt [internalflags4], dif4_int_2D_hooked 1324 000000FE EB21 jmp .done 1325 1326 .fail: 1327 00000100 BA[016C] mov dx, msg.cannot_hook_2D.invalid 1328 .fail_putsz: 1329 00000103 E82DBF call putsz 1330 00000106 8026[8800]F7 clropt [options4], opt4_int_2D_hook 1331 0000010B EB14 jmp .done 1332 1333 .check_disable: 1334 0000010D F606[A800]08 testopt [internalflags4], dif4_int_2D_hooked 1335 00000112 740D jz .done 1336 1337 00000114 BA0800 mov dx, opt4_int_2D_force >> 16 1338 00000117 E802D4 call UnhookInterruptForce 1339 0000011A 7205 jc .done 1340 1341 0000011C 8026[A800]F7 clropt [internalflags4], dif4_int_2D_hooked 1342 1343 .done: 1344 %endif 1345 1346 1347 00000121 F606[A700]01 testopt [internalflags3], dif3_input_re 1348 00000126 7403E96B01 jnz cmd3_continue_1_re 1349 0000012B 8026[8100]7F clropt [options2], opt2_re_cancel_tpg 1350 00000130 E840BE call silence_dump 1351 1352 1353 cmd3_serial_init: 1354 00000133 F606[7D00]40 testopt [options], enable_serial 1355 00000138 7503E9E000 jz .check_disable_serial 1356 .check_enable_serial: 1357 0000013D F606[F70B]01 testopt [serial_flags], sf_init_done 1358 00000142 7403E91801 jnz .done_serial 1359 .enable_serial: 1360 1361 00000147 A0[F80B] mov al, byte [serial_var_intnum] 1362 0000014A A2[2209] mov byte [serial_use_intnum], al 1363 0000014D A0[F90B] mov al, byte [serial_var_params] 1364 00000150 A2[2309] mov byte [serial_use_params], al 1365 00000153 A0[FA0B] mov al, byte [serial_var_fifo] 1366 00000156 A2[2409] mov byte [serial_use_fifo], al 1367 00000159 A1[FC0B] mov ax, word [serial_var_baseport] 1368 0000015C A3[2609] mov word [serial_use_baseport], ax 1369 0000015F A1[FE0B] mov ax, word [serial_var_dl] 1370 00000162 A3[2809] mov word [serial_use_dl], ax 1371 00000165 A1[000C] mov ax, word [serial_var_irqmask] 1372 00000168 A3[2A09] mov word [serial_use_irqmask], ax 1373 0000016B E823D0 call serial_clear_fifos 1374 0000016E E8E9CF call serial_install_interrupt_handler 1375 00000171 7317 jnc @F 1376 00000173 BF[E16C] mov di, msg.serial_cannot_hook.old_int 1377 00000176 A0[1E0C] mov al, byte [serial_installed_intnum] 1378 00000179 E807BB call hexbyte 1379 0000017C BF[CB6C] mov di, msg.serial_cannot_hook.new_int 1380 0000017F A0[2209] mov al, byte [serial_use_intnum] 1381 00000182 E8FEBA call hexbyte 1382 00000185 BA[AB6C] mov dx, msg.serial_cannot_hook 1383 00000188 EB49 jmp .no_keep 1384 1385 @@: 1386 0000018A C606[DC98]80 mov byte [serial_interrupt_handler + ieEOI], 80h 1387 0000018F E812D0 call serial_init_UART 1388 1389 00000192 800E[F70B]01 setopt [serial_flags], sf_init_done 1390 1391 00000197 BA[3F6B] mov dx, msg.serial_request_keep 1392 0000019A E896BE call putsz 1393 1394 0000019D BF[0E08] mov di, line_out 1395 %if _DEBUG 1396 mov al, '~' ; indicate instance is to be debugged 1397 stosb 1398 %endif 1399 000001A0 B03D mov al, '=' 1400 000001A2 AA stosb 1401 000001A3 B020 mov al, 32 1402 000001A5 AA stosb 1403 1404 000001A6 31C0 xor ax, ax 1405 000001A8 A3[0C0C] mov word [getline_timer_count], ax 1406 000001AB A3[0E0C] mov word [getline_timer_last], ax 1407 000001AE C706[100C][DE01] mov word [getline_timer_func], .timer 1408 1409 ; if we're executing from the command line 1410 ; buffer or a Y file then we want to 1411 ; override input to be from serial for the 1412 ; KEEP confirmation prompt. 1413 ; output is always to serial if we're here. 1414 000001B4 800E[A400]20 setopt [internalflags3], dif3_input_serial_override 1415 000001B9 E82CC2 call getline00 1416 000001BC 8026[A400]DF clropt [internalflags3], dif3_input_serial_override 1417 1418 000001C1 E8DFB9 call skipcomm0 1419 000001C4 4E dec si 1420 000001C5 BA[FC6B] mov dx, msg.keep 1421 000001C8 E852B9 call isstring? 1422 000001CB 7503E98F00 je .done_serial 1423 1424 000001D0 BA[C96B] mov dx, msg.serial_no_keep_enter 1425 .no_keep: 1426 000001D3 8026[7D00]BF clropt [options], enable_serial 1427 000001D8 E858BE call putsz 1428 000001DB E922FE jmp cmd3 1429 1430 1431 .timer: 1432 000001DE 50 push ax 1433 000001DF 52 push dx 1434 000001E0 51 push cx 1435 000001E1 06 push es 1436 1437 000001E2 BA4000 mov dx, 40h 1438 000001E5 8EC2 mov es, dx 1439 1440 000001E7 8B0E[0C0C] mov cx, word [getline_timer_count] 1441 000001EB 8B16[0E0C] mov dx, word [getline_timer_last] 1442 1443 000001EF 263B166C00 cmp dx, word [es:6Ch] 1444 000001F4 741A je .timer_next 1445 000001F6 268B166C00 mov dx, word [es:6Ch] 1446 000001FB 41 inc cx 1447 000001FC B012 mov al, 18 1448 000001FE F626[F50B] mul byte [serial_keep_timeout] 1449 00000202 85C0 test ax, ax 1450 00000204 740A jz .timer_next 1451 00000206 39C1 cmp cx, ax 1452 00000208 7206 jb .timer_next 1453 1454 0000020A 07 pop es 1455 0000020B BA[7C6B] mov dx, msg.serial_no_keep_timer 1456 0000020E EBC3 jmp .no_keep 1457 1458 .timer_next: 1459 00000210 890E[0C0C] mov word [getline_timer_count], cx 1460 00000214 8916[0E0C] mov word [getline_timer_last], dx 1461 00000218 07 pop es 1462 00000219 59 pop cx 1463 0000021A 5A pop dx 1464 0000021B 58 pop ax 1465 0000021C C3 retn 1466 1467 1468 .check_disable_serial: 1469 ; If serial is initialised, uninstall it. 1470 0000021D F606[F70B]01 testopt [serial_flags], sf_init_done 1471 00000222 751D jnz .disable_serial 1472 ; Not initialised. Is the interrupt still hooked? 1473 00000224 F606[A800]01 testopt [internalflags4], dif4_int_serial_hooked 1474 00000229 7434 jz .done_serial 1475 ; Try unhooking the interrupt handler. 1476 0000022B E88AD0 call serial_uninstall_interrupt_handler 1477 0000022E 722F jc .done_serial ; if it failed again --> 1478 00000230 BF[166D] mov di, msg.serial_late_unhook.int 1479 00000233 A0[1E0C] mov al, byte [serial_installed_intnum] 1480 00000236 E84ABA call hexbyte 1481 00000239 BA[F56C] mov dx, msg.serial_late_unhook 1482 0000023C E8F4BD call putsz 1483 0000023F EB1E jmp .done_serial 1484 1485 .disable_serial: 1486 1487 00000241 E829D0 call serial_clean_up 1488 00000244 7314 jnc @F 1489 00000246 BF[A46C] mov di, msg.serial_cannot_unhook.int 1490 00000249 A0[1E0C] mov al, byte [serial_installed_intnum] 1491 0000024C E834BA call hexbyte 1492 0000024F BA[806C] mov dx, msg.serial_cannot_unhook 1493 00000252 E8DEBD call putsz 1494 00000255 C606[DC98]00 mov byte [serial_interrupt_handler + ieEOI], 0 1495 ; we do not issue EOI any longer 1496 @@: 1497 0000025A 8026[F70B]FE clropt [serial_flags], sf_init_done 1498 .done_serial: 1499 1500 1501 %if _PM 1502 cmd3_ss_init: 1503 0000025F E87391 call ispm 1504 00000262 752F jnz .done 1505 1506 subcpu 286 1507 00000264 8CD3 mov bx, ss 1508 00000266 0F02CB lar cx, bx 1509 00000269 7528 jnz .done 1510 0000026B C1E908 shr cx, 8 1511 1512 0000026E F606[8600]10 testopt [options3], opt3_ss_b_bit_set 1513 00000273 740B jz .check_clear 1514 .check_set: 1515 00000275 F606[A600]10 testopt [internalflags3], dif3_ss_b_bit_set 1516 0000027A 7517 jnz .done 1517 1518 0000027C B540 mov ch, 40h 1519 0000027E EB07 jmp @F 1520 1521 .check_clear: 1522 00000280 F606[A600]10 testopt [internalflags3], dif3_ss_b_bit_set 1523 00000285 740C jz .done 1524 1525 @@: 1526 00000287 B80900 mov ax, 0009h 1527 0000028A CD31 int 31h 1528 0000028C 7205 jc .done 1529 1530 0000028E 8036[A600]10 xoropt [internalflags3], dif3_ss_b_bit_set 1531 subcpureset 1532 1533 .done: 1534 %endif 1535 1536 1537 00000293 E8F9D3 call ensuredebuggeeloaded ; if no task is active, create a dummy one 1538 1539 cmd3_continue_1_re: 1540 00000296 BF[0E08] mov di, line_out ; build prompt 1541 %if _DEBUG 1542 mov al, '~' ; indicate instance is to be debugged 1543 stosb 1544 %endif 1545 %if _INDOS_PROMPT 1546 00000299 E87DA6 call InDos 1547 0000029C 740F jz @F 1548 %if _BOOTLDR 1549 0000029E F606[9D00]40 testopt [internalflags], nodosloaded 1550 ; boot mode ? 1551 %if _INDOS_PROMPT_NOBOOT 1552 000002A3 7508 jnz @F ; yes, do not show special prompt --> 1553 %elif _INDOS_PROMPT_NOFLAG 1554 jnz .indos_prompt ; yes, show special prompt --> 1555 ; (do not call .real_indos check) 1556 %endif 1557 %endif 1558 %if _INDOS_PROMPT_NOFLAG 1559 000002A5 E87FA6 call InDos.real_indos ; real InDOS set ? 1560 000002A8 7403 jz @F ; no, do not show special prompt --> 1561 %endif 1562 .indos_prompt: 1563 000002AA B021 mov al, '!' 1564 000002AC AA stosb 1565 @@: 1566 %endif 1567 000002AD B02D mov al, '-' ; main prompt 1568 %if _PM 1569 000002AF E82391 call ispm 1570 000002B2 7502 jnz .realmode 1571 000002B4 B023 mov al, '#' ; PM main prompt 1572 .realmode: 1573 %endif 1574 000002B6 F606[A500]01 testopt [internalflags3], dif3_input_cmdline 1575 000002BB 7402 jz @F 1576 000002BD B026 mov al, '&' 1577 @@: 1578 000002BF F606[A700]01 testopt [internalflags3], dif3_input_re 1579 000002C4 7402 jz @F 1580 000002C6 B025 mov al, '%' 1581 @@: 1582 000002C8 AA stosb 1583 1584 000002C9 C606[A898]00 mov byte [hhflag], 0 1585 000002CE 8326[A498]00 and word [hh_depth], 0 1586 000002D3 8326[A698]00 and word [hh_depth_of_single_term], 0 1587 000002D8 C706[100C][5C04] mov word [getline_timer_func], dmycmd 1588 000002DE 8026[9E00]FE clropt [internalflags], usecharcounter ; reset this automatically 1589 1590 000002E3 F606[A700]01 testopt [internalflags3], dif3_input_re 1591 000002E8 7515 jnz cmd3_continue_2_re 1592 1593 000002EA 800E[9C00]08 setopt [internalflags], pagedcommand ; 2009-02-21: default to page all commands 1594 000002EF 8026[9F00]CF clropt [internalflags], tt_silence | tt_silent_mode 1595 ; reset, in case it's still set 1596 000002F4 8126[A000]3FF7 clropt [internalflags2], dif2_tpg_proceed_bp_set | dif2_bp_failure | dif2_tpg_keep_proceed_bp, 1 1598 %if _INPUT_FILE_HANDLES 1599 000002FA 8026[A200]DF clropt [internalflags2], dif2_closed_input_file 1600 %endif 1601 1602 cmd3_continue_2_re: 1603 000002FF E8FF01 call determine_quiet_output 1604 1605 00000302 31C9 xor cx, cx 1606 00000304 870E[FE0A] xchg cx, word [rc] ; reset rc 1607 00000308 890E[000B] mov word [priorrc], cx ; make prior value available 1608 0000030C E304 jcxz @F 1609 0000030E 890E[020B] mov word [erc], cx ; update to last non-zero value 1610 @@: 1611 1612 cmd3_check_relimit: 1613 00000312 F606[A700]01 testopt [internalflags3], dif3_input_re 1614 00000317 7422 jz cmd3_continue_not_re 1615 1616 00000319 8306[E809]01 add word [re_count], 1 1617 0000031E 8316[EA09]00 adc word [re_count + 2], 0 1618 00000323 8B16[EE09] mov dx, word [re_limit + 2] 1619 00000327 A1[EC09] mov ax, word [re_limit] 1620 0000032A 3916[EA09] cmp word [re_count + 2], dx 1621 0000032E 7504 jne @F 1622 00000330 3906[E809] cmp word [re_count], ax 1623 @@: 1624 ; This branch bypasses cmd3_check_rclimit 1625 ; because RE buffer commands should not 1626 ; count towards the RC limit. 1627 00000334 7653 jbe cmd3_continue_relimit_not_reached 1628 1629 00000336 BA[1F6A] mov dx, msg.re_limit_reached 1630 00000339 EB3A jmp cmd3_check_common 1631 1632 cmd3_continue_not_re: 1633 1634 cmd3_check_rclimit: 1635 1636 %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 1637 ; If executing from a script file then 1638 ; command doesn't count for RC limit. 1639 %if _INPUT_FILE_BOOT 1640 0000033B F606[A300]02 testopt [internalflags2], dif2_input_file_boot 1641 00000340 7547 jnz .file 1642 %endif 1643 %if _INPUT_FILE_HANDLES 1644 00000342 E8D4A5 call InDos 1645 00000345 7507 jnz .file_not 1646 00000347 F606[A200]10 testopt [internalflags2], dif2_input_file 1647 0000034C 753B jnz .file 1648 %endif 1649 .file_not: 1650 1651 .file: equ cmd3_continue_rclimit_not_reached 1652 %endif 1653 1654 0000034E F606[A500]01 testopt [internalflags3], dif3_input_cmdline 1655 00000353 7434 jz cmd3_continue_not_rc 1656 1657 00000355 8306[F009]01 add word [rc_count], 1 1658 0000035A 8316[F209]00 adc word [rc_count + 2], 0 1659 0000035F 8B16[F609] mov dx, word [rc_limit + 2] 1660 00000363 A1[F409] mov ax, word [rc_limit] 1661 00000366 3916[F209] cmp word [rc_count + 2], dx 1662 0000036A 7504 jne @F 1663 0000036C 3906[F009] cmp word [rc_count], ax 1664 @@: 1665 00000370 7617 jbe cmd3_continue_rclimit_not_reached 1666 1667 00000372 BA[4A6A] mov dx, msg.rc_limit_reached 1668 cmd3_check_common: 1669 00000375 E8B5BC call putsz_error 1670 00000378 B80401 mov ax, 0104h 1671 0000037B E813A4 call setrc 1672 0000037E 800E[A500]04 setopt [internalflags3], dif3_at_line_end 1673 00000383 E82EC3 call getline_close_file 1674 00000386 E977FC jmp cmd3 1675 1676 cmd3_continue_not_rc: 1677 cmd3_continue_rclimit_not_reached: 1678 cmd3_continue_relimit_not_reached: 1679 1680 cmd3_check_line_out_overflow: 1681 00000389 813E[1609]4226 cmp word [line_out_overflow], 2642h 1682 0000038F 740C je @F 1683 00000391 C706[1609]4226 mov word [line_out_overflow], 2642h 1684 00000397 BA[1D6D] mov dx, msg.line_out_overflow 1685 0000039A E890BC call putsz_error 1686 @@: 1687 1688 cmd3_getline: 1689 0000039D E848C0 call getline00 ; prompted input, also resets linecounter 1690 1691 000003A0 E8DDB7 call iseol?.notsemicolon 1692 000003A3 7518 jne cmd3_notblank 1693 000003A5 F606[8700]10 testopt [options3], opt3_disable_autorepeat 1694 000003AA 7508 jnz @F 1695 000003AC 8B16[E60B] mov dx, word [lastcmd] 1696 000003B0 8804 mov byte [si], al 1697 000003B2 EB35 jmp short cmd4 1698 1699 @@: 1700 000003B4 C706[E60B][5C04] mov word [lastcmd], dmycmd 1701 000003BA E943FC jmp cmd3 1702 1703 cmd3_notblank: 1704 000003BD C706[E60B][5C04] mov word [lastcmd], dmycmd 1705 000003C3 3C3B cmp al, ';' 1706 000003C5 7427 je cmd3_j1 ; if comment --> 1707 000003C7 3C3A cmp al, ':' 1708 000003C9 7423 je cmd3_j1 ; if jump label --> 1709 000003CB 3C3F cmp al, '?' 1710 000003CD 7503E98B00 je help ; if request for help --> 1711 000003D2 E8468A call uppercase 1712 000003D5 2C41 sub al, 'A' 1713 000003D7 3C18 cmp al, 'Y'-'A' 1714 000003D9 7603E96CA3 ja error ; if not recognized 1715 000003DE 98 cbw 1716 000003DF 93 xchg bx, ax 1717 000003E0 E8BFB7 call skipcomma 1718 000003E3 D1E3 shl bx, 1 1719 000003E5 8B97[4A00] mov dx, word [ cmdlist+bx ] 1720 cmd4: 1721 000003E9 BF[0E08] mov di, line_out 1722 000003EC FFD2 call dx 1723 cmd3_j1: 1724 000003EE E90FFC jmp cmd3 ; back to the top 1725 1726 1727 code_insure_low_byte_not_0CCh 1728 cmd2_reset_re_maybe_pm: 1729 1730 000003F1 66 _386_o32 ; mov esp 1731 000003F2 8B26[9C0A] mov sp, word [ savesp ] ; restore stack 1732 000003F6 83E4FC _386 and sp, ~3 ; align stack 1733 000003F9 66 _386_o32 1734 000003FA 31C0 xor ax, ax 1735 000003FC 66 _386_o32 1736 000003FD 50 push ax 1737 000003FE 66 _386_o32 1738 000003FF 9D popf 1739 00000400 8B26[9C0A] _386 mov sp, word [ savesp ] ; restore stack 1740 00000404 FC cld 1741 00000405 FB sti 1742 1743 %if _PM 1744 00000406 E8F741 call handle_mode_changed 1745 %endif 1746 1747 code_insure_low_byte_not_0CCh 1748 cmd2_reset_re: 1749 00000409 8B1E[080C] mov bx, word [io_levels] 1750 .entry_bx_levels: 1751 0000040D 31C9 xor cx, cx 1752 .entry_bx_levels_cx_cmdline: 1753 0000040F 31D2 xor dx, dx 1754 %if _INPUT_FILE_HANDLES 1755 00000411 F606[A200]10 testopt [internalflags2], dif2_input_file 1756 00000416 7405 jz @F 1757 00000418 030E[880A] add cx, word [input_file_handles.active] 1758 0000041C 41 inc cx 1759 @@: 1760 %endif 1761 %if _INPUT_FILE_BOOT 1762 0000041D F606[A300]02 testopt [internalflags2], dif2_input_file_boot 1763 00000422 7405 jz @F 1764 00000424 030E[0092] add cx, word [load_input_file.active] 1765 00000428 41 inc cx 1766 @@: 1767 %endif 1768 00000429 F606[A700]01 testopt [internalflags3], dif3_input_re 1769 0000042E 740D jz @F 1770 00000430 41 inc cx 1771 00000431 42 inc dx 1772 00000432 F606[0A0C]01 testopt [io_flags], iof_extra_iol_for_tpg_re 1773 00000437 7404 jz @F 1774 00000439 43 inc bx 1775 0000043A 7501 jnz @F 1776 0000043C 4B dec bx 1777 @@: 1778 0000043D 39D9 cmp cx, bx 1779 0000043F 7602 jbe @F 1780 00000441 89D9 mov cx, bx 1781 @@: 1782 00000443 E3A9 jcxz cmd3_j1 1783 00000445 1E push ds 1784 00000446 07 pop es 1785 @@: 1786 00000447 51 push cx 1787 00000448 52 push dx 1788 00000449 E8CEC2 call getline_close_file.resetstuff 1789 0000044C 5A pop dx 1790 0000044D 59 pop cx 1791 0000044E E2F7 loop @B 1792 00000450 85D2 test dx, dx 1793 00000452 749A jz cmd3_j1 1794 00000454 800E[8100]80 setopt [options2], opt2_re_cancel_tpg 1795 00000459 E9AC23 jmp dumpregs_extended.exit 1796 1797 1798 dmycmd: 1799 0000045C C3 retn 1800 1801 help: 1802 0000045D E842B7 call skipcomma 1803 00000460 E8B889 call uppercase 1804 %if _EXTHELP 1805 %if _COND 1806 00000463 BA[3331] mov dx, msg.condhelp 1807 00000466 3C43 cmp al, 'C' 1808 00000468 747B je .spec 1809 %endif 1810 %if _OPTIONS 1811 0000046A BA[0F3D] mov dx, msg.ophelp 1812 0000046D 3C4F cmp al, 'O' 1813 0000046F 7474 je .spec ; option help --> 1814 %endif 1815 %if _EXPRESSIONS 1816 00000471 BA[0334] mov dx, msg.expressionhelp 1817 00000474 3C45 cmp al, 'E' 1818 00000476 746D je .spec 1819 %endif 1820 %endif 1821 %if _EMS 1822 00000478 BA[9E5E] mov dx, msg.xhelp 1823 0000047B 3C58 cmp al, 'X' 1824 0000047D 7466 je .spec 1825 %endif 1826 0000047F 4E dec si 1827 %if _BOOTLDR && _EXTHELP 1828 00000480 BA[4364] mov dx, msg.boot 1829 00000483 E897B6 call isstring? 1830 00000486 BA[B752] mov dx, msg.boothelp 1831 00000489 745A je .spec 1832 %endif 1833 %if _EXTHELP 1834 0000048B BA[7C1A] mov dx, msg.source 1835 0000048E E88CB6 call isstring? 1836 00000491 BA[831A] mov dx, msg.help_source 1837 00000494 744F je .spec 1838 %endif 1839 00000496 BA[DF1B] mov dx, msg.re 1840 00000499 E881B6 call isstring? 1841 0000049C BA[E21B] mov dx, msg.help_re 1842 0000049F 7444 je .spec 1843 000004A1 BA[4B21] mov dx, msg.run 1844 000004A4 E876B6 call isstring? 1845 000004A7 BA[4F21] mov dx, msg.help_run 1846 000004AA 7439 je .spec 1847 000004AC BA[1E25] mov dx, msg.string_build 1848 000004AF E86BB6 call isstring? 1849 000004B2 BB[1225] mov bx, msg.build_array 1850 000004B5 B90500 mov cx, msg.build_short_amount 1851 000004B8 7438 je .spec_multi 1852 000004BA AC lodsb 1853 000004BB E85D89 call uppercase 1854 000004BE B90600 mov cx, msg.build_long_amount 1855 000004C1 3C42 cmp al, 'B' 1856 000004C3 742D je .spec_multi ; build info --> 1857 %if _EXTHELP 1858 000004C5 BA[EF29] mov dx, msg.license 1859 000004C8 3C4C cmp al, 'L' 1860 000004CA 7419 je .spec ; licence --> 1861 000004CC BA[942E] mov dx, msg.flaghelp 1862 000004CF 3C46 cmp al, 'F' 1863 000004D1 7412 je .spec ; flag help --> 1864 000004D3 BA[C12C] mov dx, msg.reghelp 1865 000004D6 3C52 cmp al, 'R' 1866 000004D8 740B je .spec ; register help --> 1867 %if _VARIABLES || _OPTIONS || _PSPVARIABLES 1868 000004DA BA[0C50] mov dx, msg.varhelp 1869 000004DD 3C56 cmp al, 'V' 1870 000004DF 7404 je .spec ; variable help --> 1871 %endif 1872 %endif 1873 000004E1 BA[4011] mov dx, msg.help ; default help 1874 000004E4 A8 db __TEST_IMM8 ; (skip lodsb) 1875 .spec: 1876 000004E5 AC lodsb 1877 000004E6 E8A8B6 call chkeol 1878 prnquit: 1879 000004E9 E847BB call putsz ; print string 1880 cmd3_j1a: 1881 000004EC E9FFFE jmp cmd3_j1 ; done 1882 1883 000004EF E958A2 errorj1:jmp error 1884 1885 help.spec_multi: 1886 000004F2 AC lodsb 1887 000004F3 E89BB6 call chkeol 1888 .loop: 1889 000004F6 8B17 mov dx, word [bx] 1890 000004F8 E838BB call putsz 1891 000004FB 43 inc bx 1892 000004FC 43 inc bx 1893 000004FD E2F7 loop .loop 1894 000004FF EBEB jmp short cmd3_j1a 1895 1896 1897 determine_quiet_output: 1898 00000501 8026[A500]EF clropt [internalflags3], dif3_quiet_output 1899 1900 00000506 57 push di 1901 00000507 50 push ax 1902 00000508 F606[A700]01 testopt [internalflags3], dif3_input_re 1903 0000050D 7549 jnz .notquiet 1904 1905 %if _INPUT_FILE_BOOT 1906 0000050F F606[A300]02 testopt [internalflags2], dif2_input_file_boot 1907 00000514 7412 jz @F 1908 00000516 B8A000 mov ax, LOAD_INPUT_FILE_SIZE 1909 00000519 52 push dx 1910 0000051A F726[0092] mul word [load_input_file.active] 1911 0000051E 5A pop dx 1912 0000051F 89C7 mov di, ax 1913 00000521 F685[A78F]80 testopt [load_input_file + di - LOADDATA3 + ldFATType], ifhfQuietOutput 1914 00000526 EB29 jmp .quiet_if_nz 1915 1916 @@: 1917 %endif 1918 %if _INPUT_FILE_HANDLES 1919 00000528 E8EEA3 call InDos 1920 0000052B 7518 jnz @F 1921 1922 0000052D F606[A200]10 testopt [internalflags2], dif2_input_file 1923 00000532 7411 jz @F 1924 00000534 8B3E[880A] mov di, word [input_file_handles.active] 1925 00000538 D1E7 shl di, 1 1926 0000053A D1E7 shl di, 1 1927 0000053C D1E7 shl di, 1 ; to qword array index 1928 %if INPUTFILEHANDLE_size != 8 1929 %error Unexpected structure size 1930 %endif 1931 0000053E F685[0B0A]80 testopt [input_file_handles + di + ifhFlags], ifhfQuietOutput 1932 00000543 EB0C jmp .quiet_if_nz 1933 1934 @@: 1935 %endif 1936 00000545 F606[A500]01 testopt [internalflags3], dif3_input_cmdline 1937 0000054A 740C jz @F 1938 0000054C F606[7F00]80 testopt [options], opt_cmdline_quiet_output 1939 ; jmp .quiet_if_nz 1940 1941 .quiet_if_nz: 1942 00000551 7405 jz @F 1943 .quiet: 1944 00000553 800E[A500]10 setopt [internalflags3], dif3_quiet_output 1945 .notquiet: 1946 @@: 1947 00000558 58 pop ax 1948 00000559 5F pop di 1949 0000055A C3 retn 1950 1951 1952 guard_auxbuff: 1953 0000055B F606[A700]30 testopt [internalflags3], dif3_auxbuff_guarded_1 | dif3_auxbuff_guarded_2 1954 00000560 7506 jnz @F 1955 00000562 800E[A700]10 setopt [internalflags3], dif3_auxbuff_guarded_1 1956 00000567 C3 retn 1957 1958 @@: 1959 00000568 B80101 mov ax, 0101h 1960 0000056B E823A2 call setrc 1961 0000056E BA[1767] mov dx, msg.guard_auxbuff_error 1962 .putsz_error: 1963 00000571 E8BFBA call putsz 1964 00000574 E989FA jmp cmd3 1965 1966 1967 ; This is used to disallow commands 1968 ; while reading from the RE buffer. 1969 guard_re: 1970 00000577 F606[A700]01 testopt [internalflags3], dif3_input_re 1971 0000057C 7501 jnz @F 1972 0000057E C3 retn 1973 1974 @@: 1975 0000057F B80201 mov ax, 0102h 1976 00000582 E80CA2 call setrc 1977 00000585 BA[3967] mov dx, msg.guard_re_error 1978 00000588 EBE7 jmp guard_auxbuff.putsz_error 1979 1980 1981 ; This is used to disallow commands 1982 ; while reading from the RC buffer. 1983 guard_rc: 1984 0000058A F606[A500]01 testopt [internalflags3], dif3_input_cmdline 1985 0000058F 7501 jnz @F 1986 00000591 C3 retn 1987 1988 @@: 1989 00000592 B80201 mov ax, 0102h 1990 00000595 E8F9A1 call setrc 1991 00000598 BA[7667] mov dx, msg.guard_rc_error 1992 0000059B EBD4 jmp guard_auxbuff.putsz_error 1993 1994 1995 usesection lDEBUG_DATA_ENTRY 1996 1997 align 2, db 0 1998 0000833E 0000 debuggerfunction: dw 0 1999 2000 %if ! _CATCHINT2D 2001 align 2, db 0 2002 debuggeramissig: 2003 .ven: fill 8,32,db "ecm" ; vendor 2004 .prod: fill 8,32,db "lDebug" ; product 2005 db 0, 0 2006 2007 try_debugger_amis_multiplex_number: 2008 db -1 2009 %else 2010 %if 0 2011 2012 Supported Int2D functions: 2013 2014 AMIS - Installation check 2015 INP: al = 00h 2016 OUT: al = 0FFh 2017 cx = Private version number (currently 0100h) 2018 dx:di-> signature: "ecm ", "lDebug " 2019 2020 AMIS - Get private entry point - NOP: no private entry point 2021 INP: al = 01h 2022 OUT: al = 00h 2023 2024 AMIS - Uninstall - NOP: can't uninstall 2025 INP: al = 02h 2026 OUT: al = 00h (not implemented) 2027 2028 AMIS - Request pop-up - NOP: no pop-up 2029 INP: al = 03h 2030 OUT: al = 00h 2031 2032 AMIS - Determine chained interrupts 2033 INP: al = 04h 2034 OUT: al = 04h 2035 dx:bx -> interrupt hook list (Int2D always.) 2036 2037 AMIS - Get hotkeys - NOP: no hotkeys 2038 INP: al = 05h 2039 OUT: al = 00h 2040 2041 AMIS - Get device driver information - NOP: no device 2042 INP: al = 06h 2043 OUT: al = 00h 2044 2045 AMIS - Reserved for AMIS 2046 INP: al = 07h..0Fh 2047 OUT: al = 00h 2048 2049 TSR - Reserved for TSR 2050 INP: al = 10h..2Fh 2051 OUT: al = 00h 2052 2053 lDebug - Update IISP Header 2054 INP: al = 30h 2055 ds:si -> source IISP header (or pseudo header) 2056 es:di -> destination IISP header 2057 OUT: al = FFh to indicate suppported, 2058 si and di both incremented by 6 2059 destination's ieNext field updated from source 2060 al != FFh if not supported, 2061 si and di unchanged 2062 CHG: - 2063 REM: This function is intended to aid in debugging 2064 handler re-ordering, removal, or insertion. 2065 The 32-bit far pointer needs to be updated 2066 as atomically as possible to avoid using 2067 an incorrect pointer. 2068 Test case: Run a program such as our TSRs' 2069 uninstaller or SHUFHOOK and step through it 2070 with "tp fffff" when operating on something 2071 crucial such as interrupt 21h. Without this 2072 function the machine will crash! 2073 To enable this function to be called, enter 2074 the command "r dco4 or= 8" first (install our 2075 AMIS multiplexer handler). 2076 Other workaround: Use SILENT for TP and disable 2077 DCO3 flag 4000_0000 (do not call int 21.0B to 2078 check for Ctrl-C status). 2079 Yet another workaround: Set flag DCO 8 (enable 2080 fake InDOS mode, avoid calling int 21h). 2081 REM: The source may be a pseudo IISP header. In this 2082 case the ieEntry field should hold 0FEEBh 2083 (jmp short $) and the ieSignature field 2084 should indicate the source, eg "VT" for the IVT 2085 or "NH" for inserting a New Handler. 2086 2087 TSR - Reserved for TSR 2088 INP: al = 31h..FFh 2089 OUT: al = 00h 2090 2091 %endif 2092 2093 align 2, db 0 2094 debuggeramissig: 2095 amissig: 2096 00008340 65636D20 .ven: fill 8,32,db "ecm" ; vendor 2097 00008348 6C446562756720- .prod: fill 8,32,db "lDebug" ; product 2097 00008348 2098 00008350 6C4465627567582028- .desc: asciz _PROGNAME,_VERSION,", debugger." 2098 00008359 323032322D30352D30- 2098 00008362 33292C206465627567- 2098 0000836B 6765722E00 2099 ; description 2100 %if $ - .desc > 64 2101 %error AMIS description too long 2102 %endif 2103 2104 try_amis_multiplex_number: 2105 00008370 00 db 0 2106 try_debugger_amis_multiplex_number: 2107 00008371 FF db -1 2108 2109 2110 00008372 CB90EB10000000004B- iispentry int2D 2110 0000837B 4200EBF300 2111 00008386 80FC00 cmp ah, 0 2112 amis_multiplex_number equ $-1 ; AMIS multiplex number (data for cmp opcode) 2113 00008389 7405 je .handle ; our multiplex number --> 2114 0000838B 2EFF2E[7683] jmp far [cs:.next] ; else go to next handler --> 2115 2116 .handle: 2117 00008390 84C0 test al, al 2118 00008392 740B jz .installationcheck ; installation check --> 2119 ; cmp al, 02h 2120 ; je .uninstall ; uninstallation --> 2121 00008394 3C04 cmp al, 04h 2122 00008396 7412 je .determineinterrupts ; determine hooked interrupts --> 2123 00008398 3C30 cmp al, 30h 2124 0000839A 7415 je .updateiispheader 2125 ; all other functions are reserved or not supported by TSR 2126 .uninstall: 2127 .nop: 2128 0000839C B000 mov al, 0 ; show not implemented 2129 0000839E CF iret 2130 2131 .installationcheck: 2132 0000839F FEC8 dec al ; (= FFh) show we're here 2133 000083A1 B90001 mov cx, 0100h ; = version 2134 000083A4 BF[4083] mov di, amissig ; dx:di -> AMIS signature strings of this program 2135 .iret_dx_cs: 2136 000083A7 8CCA mov dx, cs 2137 .iret: 2138 000083A9 CF iret 2139 2140 .determineinterrupts: ; al = 04h, always returns list 2141 000083AA 2E8B1E[320C] mov bx, word [cs:amisintr_offset] 2142 ; dx:bx -> hooked interrupts list 2143 000083AF EBF6 jmp short .iret_dx_cs 2144 2145 .updateiispheader: 2146 000083B1 B0FF mov al, 0FFh ; show supported 2147 000083B3 FC cld 2148 000083B4 FA cli ; try to rest while updating chain 2149 000083B5 A7 cmpsw ; skip over first word (entrypoint) 2150 ; (generally xxEBh or 0EA90h) 2151 000083B6 A5 movsw 2152 000083B7 A5 movsw ; transfer source ieNext to dest ieNext 2153 000083B8 CF iret 2154 %endif 2155 2156 2157 ; doscall is used by symbols.asm and run.asm, so define it prior 2158 %if _PM && _NOEXTENDER 2159 %macro doscall 0 2160 call _doscall 2161 %endmacro 2162 %else 2163 ; When we don't support non-extended DPMI all Int21 calls 2164 ; are either in Real Mode or extended (all are real Int21 2165 ; instructions). 2166 %macro doscall 0 2167 int 21h 2168 %endmacro 2169 %endif 2170 2171 2172 usesection lDEBUG_CODE 2173 2174 %if _DEBUG4 || _DEBUG5 2175 %define _DEB_ASM_PREFIX 2176 %include "deb.asm" 2177 %endif 2178 2179 2180 %include "aa.asm" 2181 <1> 2182 <1> %if 0 2183 <1> 2184 <1> lDebug A command - Assembler 2185 <1> 2186 <1> Copyright (C) 1995-2003 Paul Vojta 2187 <1> Copyright (C) 2008-2012 C. Masloch 2188 <1> 2189 <1> Usage of the works is permitted provided that this 2190 <1> instrument is retained with the works, so that any entity 2191 <1> that uses the works is notified of this instrument. 2192 <1> 2193 <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 2194 <1> 2195 <1> %endif 2196 <1> 2197 <1> 2198 <1> usesection lDEBUG_DATA_ENTRY 2199 <1> 2200 000083B9 00 <1> align 2, db 0 2201 000083BA 0000 <1> aa13a_mnemposition: dw 0 ; -> mnemonic, to display error 2202 000083BC 00 <1> aa_mnemsuffix: db 0 ; 0 = normal, 1 = 'W' suffix, 2 = 'D' suffix 2203 <1> 2204 000083BD 00 <1> asm_mn_flags: db 0 ; flags for the mnemonic 2205 <1> AMF_D32 equ 1 ; 32-bit opcode/data operand 2206 <1> AMF_WAIT equ 2 2207 <1> AMF_A32 equ 4 ; address operand is 32-bit 2208 <1> AMF_SIB equ 8 ; there's a SIB in the arguments 2209 <1> AMF_MSEG equ 10h ; if a seg prefix was given before mnemonic 2210 <1> AMF_FSGS equ 20h ; if FS or GS was encountered 2211 <1> AMF_D16 equ 40h ; 16-bit opcode/data operand 2212 <1> AMF_ADDR equ 80h ; address operand is given (write address size prefix) 2213 <1> 2214 000083BE 00 <1> aa_saved_prefix:db 0 ; WAIT or REP... prefix 2215 <1> ; aa_saved_prefix and aa_seg_pre must be consecutive. 2216 000083BF 00 <1> aa_seg_pre: db 0 ; segment prefix 2217 <1> 2218 <1> align 2, db 0 2219 000083C0 0000 <1> mneminfo: dw 0 ; address associated with the mnemonic 2220 <1> 2221 <1> ; The following 7 words (including alloweddist) must all be consecutive. 2222 000083C2 0000 <1> rmaddr: dw 0 ; address of operand giving the R/M byte 2223 <1> ; regmem and sibbyte must be consecutive 2224 000083C4 00 <1> regmem: db 0 ; mod reg r/m part of instruction 2225 000083C5 00 <1> sibbyte: db 0 ; SIB byte 2226 000083C6 0000 <1> immaddr: dw 0 ; address of operand giving the immed stf 2227 000083C8 0000 <1> xxaddr: dw 0 ; address of additional stuff 2228 <1> ; dismach and dmflags must be consecutive 2229 000083CA 00 <1> dismach: db 0 ; type of processor needed 2230 000083CB 00 <1> dmflags: db 0 ; flags for extra processor features 2231 <1> 2232 <1> DM_COPR equ 1 ; math coprocessor 2233 <1> DM_MMX equ 2 ; MMX extensions 2234 <1> 2235 000083CC 00 <1> opcode_or: db 0 ; extra bits in the op code 2236 000083CD 00 <1> opsize: db 0 ; size of this operation (2 or 4) 2237 000083CE 00 <1> varflags: db 0 ; flags for this variant 2238 <1> 2239 <1> VAR_LOCKABLE equ 1 ; variant is lockable 2240 <1> VAR_MODRM equ 2 ; if there's a MOD R/M here 2241 <1> VAR_SIZ_GIVN equ 4 ; if a size was given 2242 <1> VAR_SIZ_FORCD equ 8 ; if only one size is permitted 2243 <1> VAR_SIZ_NEED equ 10h ; if we need the size 2244 <1> VAR_D16 equ 20h ; if operand size is WORD 2245 <1> VAR_D32 equ 40h ; if operand size is DWORD 2246 000083CF 00 <1> alloweddist: db 0 2247 <1> 2248 000083D0 00 <1> a_reqsize: db 0 ; size that this arg should be 2249 000083D1 00 <1> align 2, db 0 2250 000083D2 0000 <1> a_opcode: dw 0 ; op code info for this variant 2251 <1> 2252 <1> align 2, db 0 2253 000083D4 0000 <1> a_opcode2: dw 0 ; copy of a_opcode for obs-instruction 2254 000083D6 E0DBE1DBE4DB240126- <1> a_obstab: dw 0DBE0h,0DBE1h,0DBE4h,124h,126h ; obs. instruction codes 2254 000083DF 01 <1> 2255 000083E0 0101020404 <1> obsmach: db 1,1,2,4,4 ; max permissible machine for the above 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 000083E5 00040201 <1> aadbsiz: db 0,4,2,1 ; table for max size of db operand 2264 000083E9 00 <1> align 2, db 0 2265 000083EA 0000[7A08][7C08]- <1> aadbsto: dw 0,aa28,aa29,aa30 ; table for routine to store a number 2265 000083F0 [7E08] <1> 2266 <1> 2267 <1> align 2, db 0 ; (modrmtab really is an array of words) 2268 000083F2 0B000D00 <1> modrmtab: db REG_BX,0,REG_BP,0 ; [bx], [bp] 2269 000083F6 0F000E00 <1> db REG_DI,0,REG_SI,0 ; [di], [si] 2270 000083FA 0F0D0E0D <1> db REG_DI,REG_BP,REG_SI,REG_BP ; [bp+di],[bp+si] 2271 000083FE 0F0B0E0B <1> db REG_DI,REG_BX,REG_SI,REG_BX ; [bx+di],[bx+si] 2272 <1> 2273 00008402 610D <1> aam_args: db 'a',13 2274 <1> 2275 <1> ; Equates for parsed arguments, stored in OPRND.flags 2276 <1> ARG_DEREF equ 1 ; non-immediate memory reference 2277 <1> ARG_MODRM equ 2 ; if we've computed the MOD R/M byte 2278 <1> ARG_JUSTREG equ 4 ; a solo register 2279 <1> ARG_WEIRDREG equ 8 ; if it's a segment register or CR, etc. 2280 <1> ARG_IMMED equ 10h ; if it's just a number 2281 <1> ARG_FARADDR equ 20h ; if it's of the form xxxx:yyyyyyyy 2282 <1> ARG_ECX_SPECIAL equ 80h ; have to overflow loop displacement 2283 <1> 2284 <1> ; For each operand type in the following table, the value 2285 <1> ; is the bits at least one of which must be present. 2286 <1> ; For each entry in bittab, there's an entry in asmjmp. 2287 <1> ; Entries are defined in the debug.asm opsizeditem list. 2288 <1> bittab: 2289 00008404 1005010401040404 <1> db BITTAB_OPSIZEDITEMS 2290 0000840C 00 <1> times 16 - ($ - bittab) db 0 ; unused OP_SIZE combined types 2291 <1> 2292 <1> ; OP_END does not have a table entry. Subsequent 2293 <1> ; entries are defined in the debug.asm opitem list. 2294 00008414 010101010120101008- <1> db BITTAB_OPITEMS 2294 0000841D 080808080810101010- <1> 2294 00008426 0808FFFFFFFFFFFFFF- <1> 2294 0000842F FFFFFFFFFFFF041010- <1> 2294 00008438 040408080808080808 <1> 2295 <1> %if ($ - bittab) != OP_AMOUNT_TABLE 2296 <1> %error bittab has wrong size 2297 <1> %endif 2298 <1> 2299 <1> ; Jump table for operand types. 2300 <1> ; Entries are defined in the debug.asm opsizeditem list. 2301 00008441 00 <1> align 2, db 0 2302 <1> asmjmp: 2303 00008442 [8D0E][6F0E][6F0E]- <1> dw ASMJMP_OPSIZEDITEMS 2303 00008448 [6F0E][930E][740E]- <1> 2303 0000844E [830E][9E0E] <1> 2304 00008452 [C811] <1> times 16 - (($ - asmjmp) / 2) dw ao50 ; unused size-combined types (reject) 2305 <1> 2306 <1> ; OP_END does not have a table entry. Subsequent 2307 <1> ; entries are defined in the debug.asm opitem list. 2308 00008462 [380F][380F][380F]- <1> dw ASMJMP_OPITEMS 2308 00008468 [380F][380F][420F]- <1> 2308 0000846E [860F][FE0F][6C10]- <1> 2308 00008474 [7010][8510][A110]- <1> 2308 0000847A [A510][CF10][E610]- <1> 2308 00008480 [EB10][F410][F410]- <1> 2308 00008486 [7710][7B10][5C11]- <1> 2308 0000848C [9411][9C11][A611]- <1> 2308 00008492 [A011][9011][9011]- <1> 2308 00008498 [9011][9011][9011]- <1> 2308 0000849E [B50C][B50C][B50C]- <1> 2308 000084A4 [1811][AA11][B111]- <1> 2308 000084AA [BE11][BE11][BE11]- <1> 2308 000084B0 [BE11][BE11][BE11]- <1> 2308 000084B6 [BE11][BE11][BE11] <1> 2309 <1> %if ($ - asmjmp) / 2 != OP_AMOUNT_TABLE 2310 <1> %error asmjmp has wrong size 2311 <1> %endif 2312 <1> 2313 <1> ; special ops DX, CL, ST, CS, DS, ES, FS, GS, SS 2314 <1> ; entry required if ao48 is used in the opitem list 2315 <1> ; order has to match opitem order 2316 <1> ; refer to aagetreg comment for the number assignments 2317 000084BC 0A011E <1> asm_regnum: db REG_DX, REG_CL, REG_ST 2318 000084BF 191B181C1D1A <1> db REG_CS, REG_DS, REG_ES, REG_FS, REG_GS, REG_SS 2319 <1> 2320 <1> ; sizes for OP_M64, OP_MFLOAT, OP_MDOUBLE, OP_M80, OP_MXX 2321 <1> ; entry required if ao17 is used in the opitem list 2322 <1> ; order has to match opitem order 2323 000084C5 05060708 <1> asm_siznum: db SIZ_QWORD, SIZ_FLOAT, SIZ_DOUBLE, SIZ_TBYTE 2324 000084C9 FF <1> db -1 ; none 2325 <1> 2326 <1> ; size qualifier 2327 <1> ; 1 BY = BYTE 2328 <1> ; 2 WO = WORD 2329 <1> ; 3 unused 2330 <1> ; 4 DW = DWORD 2331 <1> ; 5 QW = QWORD 2332 <1> ; 6 FL = FLOAT (REAL4) 2333 <1> ; 7 DO = DOUBLE (REAL8) 2334 <1> ; 8 TB = TBYTE (REAL10) 2335 <1> 2336 <1> SIZ_NONE equ 0 2337 <1> SIZ_BYTE equ 1 2338 <1> SIZ_WORD equ 2 2339 <1> SIZ_DWORD equ 4 2340 <1> SIZ_QWORD equ 5 2341 <1> SIZ_FLOAT equ 6 2342 <1> SIZ_DOUBLE equ 7 2343 <1> SIZ_TBYTE equ 8 2344 <1> 2345 <1> align 2, db 0 2346 000084CA 4259574F574F445751- <1> sizetcnam: db "BY","WO","WO","DW","QW","FL","DO","TB" 2346 000084D3 57464C444F5442 <1> 2347 <1> endarea sizetcnam 2348 <1> 2349 <1> align 2, db 0 2350 000084DA 53484E454641 <1> distnam: db "SH","NE","FA" 2351 <1> endarea distnam 2352 <1> 2353 <1> 2354 <1> usesection lDEBUG_CODE 2355 <1> 2356 <1> %if 0 2357 <1> ; write byte in al to bx:(e)dx, then increment (e)dx 2358 <1> writeasm: 2359 <1> call writemem 2360 <1> _386_PM_o32 ; inc edx 2361 <1> inc dx 2362 <1> retn 2363 <1> 2364 <1> ; write cx bytes from ds:si to bx:(e)dx 2365 <1> writeasmn: 2366 <1> jcxz .nowrite 2367 <1> .loop: 2368 <1> lodsb 2369 <1> call writeasm 2370 <1> loop .loop 2371 <1> .nowrite: 2372 <1> retn 2373 <1> %endif 2374 <1> 2375 <1> 2376 <1> aa_cmd3_check: 2377 0000059D AC <1> lodsb 2378 0000059E E8F0B5 <1> call chkeol 2379 <1> aa_cmd3: 2380 000005A1 E95CFA <1> jmp cmd3 ; exit assembler mode --> 2381 <1> 2382 <1> 2383 <1> aa: 2384 000005A4 E8D0FF <1> call guard_re 2385 000005A7 8B1E[9C0C] <1> mov bx, word [ reg_cs ] ; default segment to use 2386 <1> aa00a: 2387 000005AB E8CEB5 <1> call iseol? 2388 000005AE 741E <1> je aa01 ; if end of line --> 2389 000005B0 E8CEA5 <1> call getaddr ; get address into bx:(e)dx 2390 000005B3 E8DBB5 <1> call chkeol ; expect end of line here 2391 000005B6 66 <1> _386_PM_o32 ; mov dword [ a_addr ], edx 2392 000005B7 8916[0E0B] <1> mov word [ a_addr ], dx ; save the address 2393 000005BB 891E[120B] <1> mov word [a_addr + saSegSel], bx 2394 <1> %if _PM 2395 000005BF E8138E <1> call ispm 2396 000005C2 7506 <1> jnz .86m 2397 <1> .pm: 2398 000005C4 891E[160B] <1> mov word [a_addr + saSelector], bx 2399 000005C8 EB04 <1> jmp @F 2400 <1> .86m: 2401 000005CA 891E[140B] <1> mov word [a_addr + saSegment], bx 2402 <1> @@: 2403 <1> %endif 2404 <1> 2405 <1> ; Begin loop over input lines. 2406 <1> aa01: 2407 000005CE C706[A20A][CE05] <1> mov word [ errret ], aa01 2408 000005D4 8B26[9C0A] <1> mov sp, word [ savesp ] ; restore the stack (this implies no "retn") 2409 000005D8 BF[0E08] <1> mov di, line_out 2410 000005DB A1[120B] <1> mov ax, word [a_addr + saSegSel] 2411 <1> %if _PM 2412 000005DE 89C3 <1> mov bx, ax 2413 <1> %endif 2414 000005E0 E899B6 <1> call hexword 2415 000005E3 B03A <1> mov al, ':' 2416 000005E5 AA <1> stosb 2417 000005E6 C606[BD83]00 <1> mov byte [ asm_mn_flags ], 0 2418 <1> %if _PM 2419 000005EB C606[0B8B]00 <1> mov byte [ bCSAttr ], 0 2420 000005F0 E84C59 <1> call test_d_b_bit 2421 000005F3 740B <1> jz .16 2422 000005F5 C606[0B8B]40 <1> mov byte [ bCSAttr ], 40h ; set 32-bit attrib for later checks here 2423 000005FA A1[100B] <1> mov ax, word [ a_addr+2 ] 2424 000005FD E87CB6 <1> call hexword 2425 <1> .16: 2426 <1> %endif 2427 00000600 A1[0E0B] <1> mov ax, word [ a_addr+0 ] 2428 00000603 E876B6 <1> call hexword 2429 00000606 B020 <1> mov al, 32 2430 00000608 AA <1> stosb 2431 00000609 E8DCBD <1> call getline00 2432 0000060C 3C2E <1> cmp al, '.' 2433 0000060E 748D <1> je aa_cmd3_check 2434 00000610 3C3B <1> cmp al, ';' 2435 00000612 74BA <1> je aa01 ; if comment 2436 00000614 E869B5 <1> call iseol?.notsemicolon 2437 00000617 7488 <1> je aa_cmd3 ; if done, return to command line --> 2438 00000619 C706[BE83]0000 <1> mov word [ aa_saved_prefix ], 0 ; clear aa_saved_prefix and aa_seg_pre 2439 <1> 2440 <1> ; Get mnemonic and look it up. 2441 <1> ; (At this point, it has been determined that it is not empty.) 2442 <1> ; 2443 <1> ; INP: al = first character 2444 <1> ; si-> remaining string (al isn't EOL) 2445 <1> aa02: 2446 0000061F BF[0E08] <1> mov di, line_out ; -> buffer 2447 00000622 31C9 <1> xor cx, cx ; = 0 2448 00000624 8936[BA83] <1> mov [ aa13a_mnemposition ], si 2449 <1> 2450 00000628 A9 <1> db __TEST_IMM16 ; skip stosb,lodsb initially 2451 <1> @@: 2452 00000629 AA <1> stosb 2453 0000062A AC <1> lodsb 2454 0000062B 41 <1> inc cx ; count length 2455 0000062C E8EC87 <1> call uppercase 2456 0000062F E84AB5 <1> call iseol? ; end of mnemonic ? 2457 00000632 740C <1> je @F 2458 00000634 3C3A <1> cmp al, ':' 2459 00000636 7408 <1> je @F ; (for prefixes, else will be an error later) 2460 00000638 3C20 <1> cmp al, 32 2461 0000063A 7404 <1> je @F 2462 0000063C 3C09 <1> cmp al, 9 2463 0000063E 75E9 <1> jne @B ; not yet --> 2464 <1> @@: 2465 <1> 2466 00000640 49 <1> dec cx ; = length of input 2467 00000641 E88EB5 <1> call skipwh0 ; skip to next field 2468 00000644 4E <1> dec si 2469 <1> 2470 00000645 8A45FF <1> mov al, [di-1] ; get last stored character 2471 00000648 3C57 <1> cmp al, 'W' ; possible suffix? 2472 0000064A 7406 <1> je @F 2473 0000064C 3C44 <1> cmp al, 'D' 2474 0000064E 7402 <1> je @F ; yes --> 2475 00000650 30C0 <1> xor al, al 2476 <1> @@: 2477 00000652 A2[BC83] <1> mov [aa_mnemsuffix], al ; store 'D', 'W', or 0 2478 <1> 2479 00000655 56 <1> push si ; save position in input line 2480 <1> 2481 00000656 BE[9A01] <1> mov si, mnlist ; -> first area: no or optional suffix 2482 00000659 BA[270C] <1> mov dx, mnlist_o_suffix_required; -> end of first area 2483 <1> 2484 <1> ; [line_out] = name to search 2485 <1> ; cx = length of name to search 2486 <1> ; si-> next mnlist entry 2487 <1> ; dx-> behind last mnlist entry of this area 2488 <1> ; w[ss:sp]-> next field in input line (operand or EOL) 2489 <1> aa_mnemlistloop: 2490 0000065C AD <1> lodsw ; load combined word, si-> name 2491 0000065D 83E00F <1> and ax, 0Fh ; separate mnemonic length 2492 00000660 39C8 <1> cmp ax, cx ; length matches ? 2493 00000662 741D <1> je .length_match ; yes, check name --> 2494 <1> .cmps_mismatch: 2495 00000664 01C6 <1> add si, ax ; -> behind entry 2496 00000666 39D6 <1> cmp si, dx ; at end of this list area ? 2497 00000668 72F2 <1> jb aa_mnemlistloop ; not yet, check next entry --> 2498 <1> 2499 0000066A 81FA[270C] <1> cmp dx, mnlist_o_suffix_required; was first or second area ? 2500 0000066E 750D <1> jne .mnem_invalid ; second, not found --> 2501 <1> 2502 00000670 BE[8E0B] <1> mov si, mnlist_a_suffix_allowed ; -> second area: optional or required suffix 2503 00000673 BA[500C] <1> mov dx, end_mnlist ; -> end of second area 2504 <1> 2505 00000676 49 <1> dec cx ; prepare for second look-up 2506 00000677 3826[BC83] <1> cmp [aa_mnemsuffix], ah ; is there a valid suffix ? (ah still 0) 2507 0000067B 75DF <1> jne aa_mnemlistloop ; yes, check for suffixed instruction --> 2508 <1> 2509 <1> .mnem_invalid: 2510 0000067D 58 <1> pop ax ; (discard) 2511 0000067E E96901 <1> jmp aa13a ; complain --> 2512 <1> 2513 <1> .length_match: ; found a name of correct length 2514 00000681 BF[0E08] <1> mov di, line_out ; -> all-capitals input 2515 00000684 89F3 <1> mov bx, si ; -> name 2516 00000686 F3A6 <1> repe cmpsb ; compare names 2517 00000688 89DE <1> mov si, bx 2518 0000068A 89C1 <1> mov cx, ax ; restore length 2519 0000068C 75D6 <1> jne .cmps_mismatch ; not this, continue --> 2520 <1> 2521 <1> ; We found the mnemonic. 2522 <1> ; (bx=si)-> entry's mnemonic 2523 <1> ; dx-> behind last mnlist entry of this area 2524 <1> ; w[ss:sp]-> next field in input line (operand or EOL) 2525 0000068E 89F0 <1> mov ax, si ; -> mnemonic's name 2526 <1> 2527 00000690 81FA[500C] <1> cmp dx, end_mnlist ; was first or second area ? 2528 00000694 740B <1> je .handlesuffix ; second, there's a suffix to handle --> 2529 <1> 2530 00000696 3D[8E0B] <1> cmp ax, mnlist_a_suffix_allowed ; optional suffix that was not specified? 2531 00000699 7234 <1> jb aa_mnemonic_found ; no, done with the suffixes already --> 2532 <1> 2533 <1> %if _PM 2534 0000069B 8A16[0B8B] <1> mov dl, byte [ bCSAttr ] ; dl = whether a 32-bit CS 2535 <1> %else 2536 <1> xor dl, dl ; 86 Mode is always 16-bit 2537 <1> %endif 2538 0000069F EB09 <1> jmp sho .suffix_decide 2539 <1> 2540 <1> .handlesuffix: 2541 <1> 2542 000006A1 8A16[BC83] <1> mov dl, byte [ aa_mnemsuffix ] ; dl = 'W' or 'D'. 'W' is odd, 'D' is even 2543 000006A5 F6D2 <1> not dl ; make 'W' an even value, 'D' an odd one 2544 000006A7 80E201 <1> and dl, 1 ; 'W' results in 0, 'D' in 1 2545 <1> 2546 <1> .suffix_decide: 2547 000006AA 3D[B20B] <1> cmp ax, mnlist_o_suffix_allowed ; address size suffix ? 2548 000006AD 7212 <1> jb .a_suffix ; yes --> 2549 <1> 2550 <1> ; Operand size suffix. 2551 000006AF 84D2 <1> test dl, dl ; which ? 2552 000006B1 7407 <1> jz .o_suffix_w 2553 000006B3 800E[BD83]01 <1> or byte [asm_mn_flags], AMF_D32 ; o32 2554 000006B8 EB15 <1> jmp sho aa_mnemonic_found 2555 <1> 2556 <1> .o_suffix_w: 2557 000006BA 800E[BD83]40 <1> or byte [asm_mn_flags], AMF_D16 ; o16 2558 000006BF EB0E <1> jmp sho aa_mnemonic_found 2559 <1> 2560 <1> ; Address size suffix. 2561 <1> .a_suffix: 2562 000006C1 84D2 <1> test dl, dl ; which ? 2563 000006C3 7405 <1> jz .a_suffix_w 2564 000006C5 800E[BD83]84 <1> or byte [asm_mn_flags], AMF_ADDR|AMF_A32; a32 2565 <1> .a_suffix_w: 2566 000006CA 800E[BD83]80 <1> or byte [asm_mn_flags], AMF_ADDR ; a16 (AMF_A32 still clear) 2567 <1> 2568 <1> aa_mnemonic_found: 2569 000006CF B104 <1> mov cl, 4 2570 000006D1 8B74FE <1> mov si, [si-2] ; get the combined word 2571 000006D4 D3EE <1> shr si, cl ; extract offset into asmtab 2572 000006D6 81C6[0000] <1> add si, asmtab ; -> asmtab sequence 2573 <1> 2574 <1> ; bx-> name of matching mnlist entry 2575 <1> ; If this mnemonic is suffixable/suffixed, 2576 <1> ; AMF_D32,AMF_D16,AMF_ADDR,AMF_A32 show suffix status 2577 <1> ; si-> associated asmtab sequence 2578 <1> ; w[ss:sp]-> next field in input line (operand or EOL) 2579 <1> 2580 <1> %if 0 2581 <1> 2582 <1> Now si points to the spot in asmtab corresponding to this mnemonic. 2583 <1> The format of the assembler table is as follows. 2584 <1> First, there is optionally one of the following bytes: 2585 <1> 2586 <1> ASM_SPECIAL This is a special mnemonic (directive or AAx). 2587 <1> ASM_WAIT The instruction is prefixed by a WAIT. 2588 <1> ASM_D32 This is a 32-bit instruction variant. 2589 <1> ASM_D16 This is a 16-bit instruction variant. 2590 <1> 2591 <1> Then, except for non-AAx ASM_SPECIAL, this is followed by one or 2592 <1> more of the following sequences, indicating an instruction variant. 2593 <1> 2594 <1> ASM_LOCKABLE Indicates that this instruction can follow a LOCK prefix. 2595 <1> ASM_MACHx Indicates the CPU this instruction requires, 1..6 (186..686). 2596 <1> ASM_ESCAPE Escapes a large following word. The assembler table contains 2597 <1> as many escapes as necessary; each escape means to add the 2598 <1> value of ASM_ESCAPE to the following high byte of the info 2599 <1> word. This will easily overflow the word, so a dword is 2600 <1> required to process the info word. ASM_ESCAPE currently 2601 <1> needs to be equal to ASM_FIRST (ie. the lowest assembler 2602 <1> table prefix byte) because otherwise some values would have 2603 <1> no valid encoding. _ASM_ESCAPE_USED is a preprocessor 2604 <1> variable which will be 0 in case there are no ASM_ESCAPE 2605 <1> bytes to be found in the table. 2606 <1> [word] This is a 16-bit integer, most significant byte first, giving 2607 <1> ASMMOD * a + b, where b is an index into the array opindex 2608 <1> (indicating the operand list), and a is as follows (hex): 2609 <1> 0..FF The (one-byte) instruction. 2610 <1> 100..1FF The lower 8 bits give the second byte of 2611 <1> a two-byte instruction beginning with 0Fh. 2612 <1> 200..23F Bits 2-0 say which floating point instruction 2613 <1> this is (D8h-DFh), and 5-3 give the /r field. 2614 <1> 240..1247 (a-240h)/8 is the index in the array agroups 2615 <1> (which gives the real value of a), and the 2616 <1> low-order 3 bits gives the /r field. 2617 <1> [byte] This gives the second byte of a floating point 2618 <1> instruction if 0D8h <= a <= 0DFh. 2619 <1> 2620 <1> Following these is an ASM_END byte. (ASM_SPECIAL has the same value as 2621 <1> ASM_END, but the context allows to decide which one is meant.) 2622 <1> 2623 <1> Exceptions: 2624 <1> ASM_SPECIAL are not followed by this opcode information (except AAx). 2625 <1> ASM_SPECIAL segment, LOCK and REP prefixes are followed by the literal 2626 <1> prefix byte. 2627 <1> ASM_SPECIAL for all mnemonics except AAx and the prefixes are not 2628 <1> followed by anything at all. 2629 <1> 2630 <1> The ASM_ symbols are defined where debugtbl.inc is included in debug.asm. 2631 <1> 2632 <1> %endif 2633 <1> 2634 <1> ; To do: BITS, USE16, USE32, USEAUTO, CPU 2635 000006DA AC <1> lodsb ; get a possible prefix 2636 <1> .checkprefix: 2637 <1> %if 1 2638 000006DB 3CFF <1> cmp al, ASM_SPECIAL ; a special mnemonic ? 2639 000006DD 7403E99900 <1> jne .notspecial ; no --> 2640 <1> 2641 <1> ; Dispatch based on mnemonic. 2642 000006E2 31C0 <1> xor ax, ax 2643 000006E4 81FB[AB01] <1> cmp bx, mnlist+MN_O16 2644 000006E8 7503E9A500 <1> je aa_sizeprefix ; o16 (ax = 0) --> 2645 000006ED 40 <1> inc ax 2646 000006EE 81FB[A101] <1> cmp bx, mnlist+MN_A16 2647 000006F2 7503E99B00 <1> je aa_sizeprefix ; a16 (ax = 1) --> 2648 000006F7 B402 <1> mov ah, 2 2649 000006F9 81FB[9C01] <1> cmp bx, mnlist+MN_A32 2650 000006FD 7503E99000 <1> je aa_sizeprefix ; a32 (ax = 201h) --> 2651 00000702 48 <1> dec ax 2652 00000703 81FB[A601] <1> cmp bx, mnlist+MN_O32 2653 00000707 7503E98600 <1> je aa_sizeprefix ; o32 (ax = 200h) --> 2654 0000070C 81FB[9307] <1> cmp bx, mnlist+MN_LOCK 2655 00000710 7503E9CC00 <1> je aa18 ; lock --> 2656 00000715 81FB[B709] <1> cmp bx, mnlist+MN_REP 2657 00000719 7209 <1> jb .notreplock 2658 0000071B 81FB[CF09] <1> cmp bx, mnlist+MN_REPNE 2659 0000071F 7703E9BD00 <1> jbe aa18 ; rep, repe, repne --> 2660 <1> .notreplock: 2661 00000724 81FB[F009] <1> cmp bx, mnlist+MN_ES 2662 00000728 7209 <1> jb .notseg 2663 0000072A 81FB[040A] <1> cmp bx, mnlist+MN_GS 2664 0000072E 7703E9A300 <1> jbe aa17 ; single segment prefix --> 2665 <1> .notseg: 2666 00000733 81FB[BC01] <1> cmp bx, mnlist+MN_AAD 2667 00000737 7503E94401 <1> je aa_aax ; aad --> 2668 0000073C 81FB[C101] <1> cmp bx, mnlist+MN_AAM 2669 00000740 7503E93B01 <1> je aa_aax ; aam --> 2670 00000745 833E[BE83]00 <1> cmp word [ aa_saved_prefix ], byte 0 2671 0000074A 7403E99B00 <1> jne aa13a ; if there was a prefix or a segment, error --> 2672 0000074F 5E <1> pop si ; get position in input line 2673 <1> ;cmp bx, mnlist+MN_SEG 2674 <1> ;je aa_seg ; SEG mnemonic, process --> 2675 00000750 81FB[7909] <1> cmp bx, mnlist+MN_ORG 2676 00000754 7503E99800 <1> je aa_org 2677 00000759 B80100 <1> mov ax, 1 2678 0000075C 81FB[5F03] <1> cmp bx, mnlist+MN_DD 2679 00000760 7503E99400 <1> je aa20m ; dd (ax = 1) --> 2680 00000765 40 <1> inc ax 2681 00000766 81FB[6D03] <1> cmp bx, mnlist+MN_DW 2682 0000076A 7503E98A00 <1> je aa20m ; dw (ax = 2) --> 2683 0000076F 40 <1> inc ax 2684 00000770 81FB[5B03] <1> cmp bx, mnlist+MN_DB 2685 00000774 7503E98000 <1> je aa20m ; db (ax = 3) --> 2686 00000779 EB6F <1> jmp short aa13a ; unhandled special mnemonic --> 2687 <1> 2688 <1> .notspecial: 2689 0000077B 2CFC <1> sub al, ASM_D16 ; mnemonic has a prefix ? 2690 0000077D 7207 <1> jb .normal ; no --> 2691 0000077F 7409 <1> je .d16 ; it is a 16-bit mnemonic form --> 2692 <1> %else 2693 <1> cmp al, ASM_O16PREF 2694 <1> jb .normal ; no special mnemonic --> 2695 <1> cmp al, ASM_A32PREF 2696 <1> jbe aa_sizeprefix ; 386 address/operand size prefix --> 2697 <1> 2698 <1> sub al, ASM_LOCKREP ; check for mnemonic flag byte, 2699 <1> ; and convert it to 0..9 if one 2700 <1> jb .normal ; if none --> 2701 <1> je aa18 ; if LOCK/REP --> 2702 <1> cbw 2703 <1> dec ax 2704 <1> jz aa17 ; if segment prefix (ASM_SEG) --> 2705 <1> dec ax 2706 <1> jz aa_aax ; if aad or aam (ASM_AAX) --> 2707 <1> dec ax 2708 <1> jz .d16 ; if ASM_D16 --> 2709 <1> cmp al, 3 2710 <1> jae aa20 ; if ASM_ORG or ASM_DD or ASM_DW or ASM_DB --> 2711 <1> %endif 2712 00000781 0806[BD83] <1> or [ asm_mn_flags ], al ; save AMF_D32 or AMF_WAIT (1 or 2) 2713 00000785 A8 <1> db __TEST_IMM8 ; (skip dec) 2714 <1> .normal: 2715 00000786 4E <1> dec si ; -> first byte of mnemonic info 2716 <1> .ab01: 2717 00000787 E90601 <1> jmp ab01 ; now process the arguments 2718 <1> .d16: 2719 0000078A 800E[BD83]40 <1> or byte [ asm_mn_flags ], AMF_D16 2720 0000078F 46 <1> inc si ; skip the ASM_D32 byte 2721 00000790 EBF5 <1> jmp short .ab01 ; now process the arguments 2722 <1> 2723 <1> aa_sizeprefix: 2724 <1> %if 0 2725 <1> sub al, ASM_O16PREF ; 0 = o16, 1 = a16, 2 = o32, 3 = a32 2726 <1> mov ah, al 2727 <1> and ax, (2<<8)|1 ; ah = 2 if 32-bit prefix, al = 1 if ASIZE 2728 <1> %endif 2729 <1> %if _PM 2730 00000792 0A26[0B8B] <1> or ah, byte [ bCSAttr ] 2731 00000796 740E <1> jz .nobyte ; 16-bit CS and 16-bit prefix, no output --> 2732 00000798 80FC42 <1> cmp ah, 40h| 2 2733 0000079B 7409 <1> je .nobyte ; 32-bit CS and 32-bit prefix, no output --> 2734 <1> %else 2735 <1> test ah, ah 2736 <1> jz .nobyte ; 16-bit CS and 16-bit prefix --> 2737 <1> %endif 2738 <1> 2739 <1> ; CS differs from the prefix's type. 2740 <1> ; Output a prefix byte. 2741 0000079D 0466 <1> add al, 66h ; 66h if OSIZE, 67h if ASIZE 2742 0000079F BF[0E08] <1> mov di, line_out 2743 000007A2 AA <1> stosb 2744 000007A3 E8B100 <1> call aa_copymem 2745 <1> .nobyte: 2746 <1> aa_handleprefixes: 2747 000007A6 5E <1> pop si 2748 000007A7 AC <1> lodsb ; get character 2749 000007A8 3C3A <1> cmp al, ':' 2750 000007AA 7503 <1> jne .nocolon 2751 000007AC E822B4 <1> call skipwhite ; skip a colon 2752 <1> .nocolon: 2753 000007AF E8CAB3 <1> call iseol? ; end of line? 2754 000007B2 7403E968FE <1> jne aa02 ; no, process instruction --> 2755 <1> 2756 <1> ; No instruction follows. 2757 <1> ; Write out saved LOCK/REP and/or segment prefix. 2758 000007B7 A0[BF83] <1> mov al, byte [ aa_seg_pre ] 2759 000007BA 84C0 <1> test al, al 2760 000007BC 7407 <1> jz .noseg 2761 000007BE BF[0E08] <1> mov di, line_out 2762 000007C1 AA <1> stosb 2763 000007C2 E89200 <1> call aa_copymem 2764 <1> .noseg: 2765 000007C5 A0[BE83] <1> mov al, byte [ aa_saved_prefix ] 2766 000007C8 84C0 <1> test al, al 2767 000007CA 7407 <1> jz .noreplock 2768 000007CC BF[0E08] <1> mov di, line_out 2769 000007CF AA <1> stosb 2770 000007D0 E88400 <1> call aa_copymem 2771 <1> .noreplock: 2772 <1> aa01_j1: 2773 000007D3 E9F8FD <1> jmp aa01 ; return to prompt 2774 <1> 2775 <1> %if 0 2776 <1> ; SEG directive (segment prefix follows) 2777 <1> aa_seg: 2778 <1> call skipwhite 2779 <1> mov ah, byte [si] 2780 <1> and ax, ~2020h 2781 <1> mov di, segrgnam 2782 <1> mov cx, 6 2783 <1> repne scasw 2784 <1> jne aa24 ; if not found 2785 <1> push si ; save si in case there's no colon 2786 <1> inc si ; skip "?s" 2787 <1> call skipwhite 2788 <1> pop si 2789 <1> call chkeol 2790 <1> mov bx, prefixlist + 5 2791 <1> sub bx, cx 2792 <1> mov al, byte [ bx ] ; look up the prefix byte 2793 <1> mov di, line_out 2794 <1> stosb 2795 <1> call aa_copymem 2796 <1> jmp short aa01_j1 2797 <1> %endif 2798 <1> 2799 <1> ; segment prefix 2800 <1> aa17: 2801 000007D6 AC <1> lodsb ; get prefix value 2802 000007D7 A2[BF83] <1> mov byte [ aa_seg_pre ], al 2803 000007DA 800E[BD83]10 <1> or byte [ asm_mn_flags ], AMF_MSEG 2804 000007DF EBC5 <1> jmp short aa_handleprefixes 2805 <1> 2806 <1> ; LOCK or REP prefix 2807 <1> aa18: 2808 000007E1 AC <1> lodsb ; get prefix value 2809 000007E2 8606[BE83] <1> xchg al, byte [ aa_saved_prefix ] 2810 000007E6 84C0 <1> test al, al 2811 000007E8 74BC <1> jz aa_handleprefixes 2812 <1> ; if there already was a saved prefix: 2813 <1> aa13a: 2814 000007EA 8B36[BA83] <1> mov si, [ aa13a_mnemposition ] 2815 000007EE E9599F <1> jmp error 2816 <1> 2817 <1> %if 0 2818 <1> ; Pseudo ops (org or db/dw/dd). 2819 <1> aa20: 2820 <1> cmp word [ aa_saved_prefix ], byte 0 2821 <1> jne aa13a ; if there was a prefix or a segment, error --> 2822 <1> pop si ; get position in input line 2823 <1> sub al, 3 ; AX=0 if org, 1 if dd, 2 if dw, 3 if db. 2824 <1> jne aa20m ; if not ORG 2825 <1> %endif 2826 <1> 2827 <1> aa_org: 2828 <1> ; Process ORG pseudo op. 2829 000007F1 AC <1> lodsb 2830 000007F2 8B1E[120B] <1> mov bx, word [a_addr + saSegSel]; default segment 2831 000007F6 E9B2FD <1> jmp aa00a ; go to top, set address if any given 2832 <1> 2833 <1> ; Data instructions (DB/DW/DD). 2834 <1> aa20m: 2835 000007F9 BF[0E08] <1> mov di, line_out ; put the bytes here when we get them 2836 000007FC 93 <1> xchg ax, bx ; mov bx,ax 2837 000007FD 8A87[E583] <1> mov al, byte [ aadbsiz+bx ] ; move maximum size 2838 00000801 A2[E583] <1> mov byte [ aadbsiz ], al 2839 00000804 D1E3 <1> shl bx, 1 2840 00000806 8B87[EA83] <1> mov ax, word [ aadbsto+bx ] ; move address of storage routine 2841 0000080A A3[EA83] <1> mov word [ aadbsto ],ax 2842 0000080D E8C1B3 <1> call skipwhite 2843 00000810 E869B3 <1> call iseol? 2844 00000813 743E <1> je aa27 ; if end of line 2845 <1> 2846 <1> aa21: 2847 00000815 3C22 <1> cmp al, '"' 2848 00000817 741B <1> je aa22 ; if string 2849 00000819 3C27 <1> cmp al, "'" 2850 0000081B 7417 <1> je aa22 ; if string 2851 0000081D E8160A <1> call aageti ; get a numerical value into dx:bx, size into cl 2852 00000820 3A0E[E583] <1> cmp cl, byte [ aadbsiz ] 2853 00000824 7721 <1> ja aa24 ; if overflow 2854 00000826 93 <1> xchg ax, bx 2855 00000827 FF16[EA83] <1> call near [ aadbsto ] ; store the value 2856 0000082B 81FF[1609] <1> cmp di, line_out_end 2857 0000082F 7716 <1> ja aa24 ; if output line overflow 2858 00000831 93 <1> xchg ax, bx 2859 00000832 EB17 <1> jmp short aa26 ; done with this one 2860 <1> 2861 <1> aa22: 2862 00000834 88C4 <1> mov ah, al 2863 <1> aa23: 2864 00000836 AC <1> lodsb 2865 00000837 E846B3 <1> call iseol?.notsemicolon 2866 0000083A 740B <1> je aa24 ; if end of line (closing quote missing) --> 2867 0000083C 38E0 <1> cmp al, ah 2868 0000083E 740A <1> je aa25 ; if end of string 2869 00000840 AA <1> stosb 2870 00000841 81FF[1609] <1> cmp di, line_out_end 2871 00000845 76EF <1> jbe aa23 ; if output line not overflowing 2872 <1> aa24: 2873 00000847 E9009F <1> jmp error ; error 2874 <1> aa25: 2875 0000084A AC <1> lodsb 2876 <1> aa26: 2877 0000084B E855B3 <1> call skipcomm0 2878 0000084E E82BB3 <1> call iseol? 2879 00000851 75C2 <1> jne aa21 ; if not end of line 2880 <1> 2881 <1> ; End of line. Copy it to debuggee's memory. 2882 <1> aa27: 2883 00000853 B8[CE05] <1> mov ax, aa01 2884 00000856 50 <1> push ax 2885 <1> 2886 <1> ; INP: di-> behind memory to copy (starts at line_out) 2887 <1> ; [a_addr]-> destination 2888 <1> ; OUT: memory copied 2889 <1> ; a_addr offset updated 2890 <1> ; es set to ss 2891 <1> ; CHG: (e)si, (e)cx, (e)di 2892 <1> aa_copymem: 2893 00000857 BE[0E08] <1> mov si, line_out ; ds:si-> data 2894 0000085A 89F9 <1> mov cx, di ; -> behind data 2895 0000085C 29F1 <1> sub cx, si ; = size of data 2896 0000085E 8E06[120B] <1> mov es, word [a_addr + saSegSel] 2897 00000862 66 <1> _386_PM_o32 ; mov edi, dword [ a_addr+0 ] 2898 00000863 8B3E[0E0B] <1> mov di, word [ a_addr+0 ] ; es:(e)di-> destination 2899 00000867 660FB7C9 <1> _386_PM movzx ecx, cx 2900 0000086B 660FB7F6 <1> _386_PM movzx esi, si ; fix high words 2901 0000086F 67 <1> _386_PM_a32 2902 00000870 F3A4 <1> rep movsb ; copy it 2903 00000872 66 <1> _386_PM_o32 ; mov dword [ a_addr+0 ], edi 2904 00000873 893E[0E0B] <1> mov word [ a_addr+0 ], di ; save new address 2905 00000877 16 <1> push ss 2906 00000878 07 <1> pop es 2907 00000879 C3 <1> retn 2908 <1> 2909 <1> ; Routines to store a byte/word/dword, 2910 <1> ; into a buffer in our memory. 2911 <1> aa28: 2912 0000087A AB <1> stosw ; store a dword value 2913 0000087B 92 <1> xchg ax, dx 2914 <1> aa29: 2915 0000087C AB <1> stosw ; store a word value 2916 0000087D C3 <1> retn 2917 <1> 2918 <1> aa30: 2919 0000087E AA <1> stosb ; store a byte value 2920 0000087F C3 <1> retn 2921 <1> 2922 <1> %if _PM && 0 2923 <1> aa_use16: 2924 <1> cmp word [ aa_saved_prefix ], byte 0 2925 <1> jne aa13a 2926 <1> pop si 2927 <1> lodsb 2928 <1> call chkeol 2929 <1> mov dl, 16 2930 <1> jmp short aa_bits.parse 2931 <1> 2932 <1> aa_use32: 2933 <1> cmp word [ aa_saved_prefix ], byte 0 2934 <1> jne aa13a 2935 <1> pop si 2936 <1> lodsb 2937 <1> call chkeol 2938 <1> mov dl, 32 2939 <1> jmp short aa_bits.parse 2940 <1> 2941 <1> aa_useauto: 2942 <1> cmp word [ aa_saved_prefix ], byte 0 2943 <1> jne aa13a 2944 <1> pop si 2945 <1> lodsb 2946 <1> call chkeol 2947 <1> jmp short aa_bits.auto 2948 <1> 2949 <1> aa_bits: 2950 <1> cmp word [ aa_saved_prefix ], byte 0 2951 <1> jne aa13a ; if there was a prefix or a segment, error --> 2952 <1> pop si ; get position in input line 2953 <1> 2954 <1> ; Check whether "AUTO" requested. 2955 <1> push si 2956 <1> lodsw 2957 <1> and ax, ~2020h 2958 <1> cmp ax, "AU" 2959 <1> jne .notauto 2960 <1> lodsw 2961 <1> and ax, ~2020h 2962 <1> cmp ax, "TO" 2963 <1> jne .notauto 2964 <1> lodsb 2965 <1> call iseol? 2966 <1> jne .notauto 2967 <1> pop ax 2968 <1> .auto: 2969 <1> xor ax, ax 2970 <1> mov al, byte [ bCSAttr+1 ] 2971 <1> test al, al ; any saved ? 2972 <1> jz aa01_j1 ; no --> 2973 <1> mov word [ bCSAttr ], ax ; restore 2974 <1> jmp short aa01_j1 2975 <1> 2976 <1> .notauto: 2977 <1> pop si 2978 <1> lodsb 2979 <1> push si 2980 <1> call getbyte 2981 <1> call chkeol 2982 <1> pop si 2983 <1> .parse: 2984 <1> mov ax, word [ bCSAttr ] 2985 <1> or al, 1 2986 <1> cmp dl, 16 2987 <1> je .16 2988 <1> cmp dl, 16h 2989 <1> je .16 2990 <1> cmp dl, 32 2991 <1> je .32 2992 <1> cmp dl, 32h 2993 <1> jne aa24 2994 <1> .32: 2995 <1> _no386 jmp aa24 2996 <1> test ah, ah 2997 <1> mov ah, al 2998 <1> mov al, 40h 2999 <1> jmp short .save 3000 <1> 3001 <1> .16: 3002 <1> test ah, ah 3003 <1> mov ah, al 3004 <1> mov al, 0 3005 <1> .save: 3006 <1> jnz .saved 3007 <1> mov byte [ bCSAttr+1 ], ah 3008 <1> .saved: 3009 <1> mov byte [ bCSAttr ], al 3010 <1> jmp short aa01_j1 3011 <1> %endif 3012 <1> 3013 <1> ; Here we process the AAD and AAM instructions. They are special 3014 <1> ; in that they may take a one-byte argument, or none (in which case 3015 <1> ; the argument defaults to 0Ah = ten). 3016 <1> aa_aax: 3017 00000880 8936[C083] <1> mov word [ mneminfo ], si ; save this address 3018 00000884 5E <1> pop si 3019 00000885 AC <1> lodsb 3020 00000886 E8F3B2 <1> call iseol? 3021 00000889 750B <1> jne ab01b ; if not end of line --> 3022 0000088B BE[0284] <1> mov si, aam_args ; fake a 0Ah argument if none given 3023 0000088E EB05 <1> jmp short ab01a 3024 <1> 3025 <1> 3026 <1> ; Process normal instructions. 3027 <1> 3028 <1> ; First we parse each argument into the following structure, 3029 <1> ; stored consecutively at line_out, line_out+OPRND_size, etc. 3030 <1> ; 3031 <1> ; For arguments of the form xxxx:yyyyyyyy, xxxx is stored in 3032 <1> ; OPRND.num2, and yyyyyyyy in OPRND.num. The number of bytes 3033 <1> ; in yyyyyyyy is stored in opaddr, 2 is stored in OPRND.numadd, 3034 <1> ; and di is stored in xxaddr. 3035 <1> struc OPRND 3036 00000000 ?? <1> .flags: resb 1 ; 0 flags (ARG_DEREF, etc) 3037 00000001 ?? <1> .distflags: resb 1 ; 1 distance flags 3038 <1> ; (short = 1, near = 2, far = 4) 3039 00000002 ?? <1> .sizearg: resb 1 ; 2 size argument, if any 3040 <1> ; (1=byte, 2=word, 4=dword, 5=qword, 6=float, 7=double, 8=tbyte) 3041 <1> ; (refer to SIZ_ equs, sizetcnam, and asm_siznum) 3042 00000003 ?? <1> .sizedis: resb 1 ; 3 size of ModR/M displacement 3043 <1> .reg1: ; 4 ModR/M byte or first register (byte) 3044 00000004 ?? <1> .numadd: resb 1 ; 4 number of additional bytes at num2 (up to 4) 3045 <1> .num2: ; 5 second number (word) 3046 00000005 ?? <1> .reg2: resb 1 ; 5 index register, second register or SIB byte 3047 <1> ; reg2 needs to follow reg1 immediately 3048 00000006 ?? <1> .index: resb 1 ; 6 index factor 3049 00000007 ?? <1> .orednum: resb 1 ; 7 sizes of numbers are ORed here 3050 00000008 ???????? <1> .num: resd 1 ; 8 number 3051 <1> endstruc 1 3052 <1> 3053 <1> odfShort: equ 1 3054 <1> odfNear: equ 2 3055 <1> odfFar: equ 4 3056 <1> 3057 <1> 3058 <1> ab01: 3059 00000890 8936[C083] <1> mov word [ mneminfo ], si ; save this address 3060 00000894 5E <1> pop si ; get position in line 3061 <1> ab01a: 3062 00000895 AC <1> lodsb 3063 <1> ab01b: 3064 00000896 BF[0E08] <1> mov di, line_out 3065 <1> 3066 <1> ; Loop over operands. 3067 <1> ab02: 3068 00000899 E8E0B2 <1> call iseol? 3069 0000089C 7503 <1> jne ab04 ; if not end of line 3070 <1> ab99_j1: 3071 0000089E E93503 <1> jmp ab99 ; to next phase 3072 <1> 3073 <1> ab04: 3074 000008A1 57 <1> push di ; clear out the next storage area 3075 000008A2 B90600 <1> mov cx, OPRND_size_w 3076 000008A5 31C0 <1> xor ax, ax 3077 000008A7 F3AB <1> rep stosw 3078 000008A9 5F <1> pop di 3079 <1> 3080 <1> ; Small loop over "BYTE PTR" and segment prefixes. 3081 <1> ab05: 3082 000008AA 4E <1> dec si 3083 000008AB 8B04 <1> mov ax, word [ si ] 3084 000008AD 25DFDF <1> and ax, TOUPPER_W 3085 <1> .checksize: 3086 000008B0 807D0200 <1> cmp byte [ di+OPRND.sizearg ], SIZ_NONE 3087 000008B4 750C <1> jne .notsize ; if already have a size qualifier ("BYTE PTR",...) 3088 000008B6 57 <1> push di 3089 000008B7 BF[CA84] <1> mov di, sizetcnam 3090 000008BA B90800 <1> mov cx, sizetcnam_size_w 3091 000008BD F2AF <1> repne scasw 3092 000008BF 5F <1> pop di 3093 000008C0 742D <1> je .size ; if found --> 3094 <1> .notsize: 3095 <1> .checkdist: 3096 000008C2 F64501FF <1> test byte [ di + OPRND.distflags ], -1 3097 000008C6 7541 <1> jnz .notdist 3098 000008C8 57 <1> push di 3099 000008C9 BF[DA84] <1> mov di, distnam 3100 000008CC B90300 <1> mov cx, distnam_size_w 3101 000008CF F2AF <1> repne scasw 3102 000008D1 5F <1> pop di 3103 000008D2 7535 <1> jne .notdist 3104 000008D4 85C9 <1> test cx, cx 3105 000008D6 7509 <1> jnz .dist ; if not "FA" 3106 000008D8 8A4402 <1> mov al, byte [ si+2 ] 3107 000008DB 24DF <1> and al, TOUPPER 3108 000008DD 3C52 <1> cmp al, 'R' 3109 000008DF 7528 <1> jne .notdist ; if not "FAR" (could be hexadecimal) --> 3110 <1> .dist: 3111 <1> ; 0 = far, 1 = near, 2 = short 3112 000008E1 80E902 <1> sub cl, distnam_size_w - 1 3113 <1> ; -2 = far, -1 = near, -0 = short 3114 000008E4 F6D9 <1> neg cl 3115 <1> ; 2 = far, 1 = near, 0 = short 3116 000008E6 B501 <1> mov ch, 1 3117 000008E8 D2E5 <1> shl ch, cl 3118 <1> ; 4 = far, 2 = near, 1 = short 3119 <1> ; 3120 <1> ; This matches odfFar = 4, odfNear = 2, odfShort = 1 3121 000008EA 886D01 <1> mov byte [ di + OPRND.distflags ], ch 3122 000008ED EB08 <1> jmp .skipptr 3123 <1> 3124 <1> .size: 3125 000008EF 80E908 <1> sub cl, sizetcnam_size_w 3126 000008F2 F6D9 <1> neg cl ; convert to 1..8 3127 000008F4 884D02 <1> mov byte [ di+OPRND.sizearg ], cl 3128 <1> .skipptr: 3129 000008F7 E8CDB2 <1> call skipalpha ; go to next token 3130 000008FA 8A24 <1> mov ah, byte [si] 3131 000008FC 25DFDF <1> and ax, TOUPPER_W 3132 000008FF 3D5054 <1> cmp ax, "PT" 3133 00000902 7503 <1> jne ab05_j1 ; if not "PTR" 3134 00000904 E8C0B2 <1> call skipalpha ; go to next token (ignore "PTR") 3135 <1> ab05_j1: equ $ 3136 00000907 EBA1 <1> jmp ab05 3137 <1> 3138 <1> .notdist: 3139 <1> ab07: 3140 00000909 E80400 <1> call ab08 3141 0000090C 7531 <1> jne ab09 ; not a segment prefix --> 3142 0000090E EBF7 <1> jmp short ab05_j1 ; if it was a segment prefix --> 3143 <1> 3144 <1> ; Test for and process segment prefix 3145 <1> ; 3146 <1> ; INP: b[aa_seg_pre] 3147 <1> ; si-> string 3148 <1> ; ax = w[si] (uppercased) 3149 <1> ; OUT: NZ if no segment prefix, 3150 <1> ; si unchanged 3151 <1> ; ZR if segment prefix, 3152 <1> ; si-> behind prefix + 1 3153 <1> ; al = character behind prefix 3154 <1> ; CHG: ax, bx, cx 3155 <1> ab08: 3156 00000910 803E[BF83]00 <1> cmp byte [ aa_seg_pre ], 0 3157 00000915 7525 <1> jne .ret ; if we already have a segment prefix 3158 00000917 57 <1> push di 3159 00000918 BF[428A] <1> mov di, segrgnam 3160 0000091B B90600 <1> mov cx, N_SEGREGS 3161 0000091E F2AF <1> repne scasw 3162 00000920 5F <1> pop di 3163 00000921 7519 <1> jne .ret ; if not found 3164 00000923 56 <1> push si ; save si in case there's no colon 3165 00000924 AD <1> lodsw ; skip "?s" 3166 00000925 E8A9B2 <1> call skipwhite 3167 00000928 3C3A <1> cmp al, ':' 3168 0000092A 7511 <1> jne .retpopsi ; if not followed by ':' 3169 0000092C 58 <1> pop ax ; discard saved si 3170 0000092D E8A1B2 <1> call skipwhite ; skip it 3171 00000930 BB[798A] <1> mov bx, prefixlist + 5 3172 00000933 29CB <1> sub bx, cx 3173 00000935 8A07 <1> mov al, byte [ bx ] ; look up the prefix byte 3174 00000937 A2[BF83] <1> mov byte [ aa_seg_pre ], al ; save it away 3175 0000093A 38C0 <1> cmp al, al ; ZR, valid segment prefix 3176 <1> .ret: 3177 0000093C C3 <1> retn 3178 <1> 3179 <1> .retpopsi: 3180 0000093D 5E <1> pop si 3181 0000093E C3 <1> retn 3182 <1> 3183 <1> ; Begin parsing main part of argument. 3184 <1> 3185 <1> ; First check registers. 3186 <1> ab09: 3187 0000093F 57 <1> push di ; check for solo registers 3188 00000940 BF[228A] <1> mov di, rgnam816 3189 00000943 B91B00 <1> mov cx, N_ALLREGS ; 27 3190 00000946 E89B09 <1> call aagetreg 3191 00000949 5F <1> pop di 3192 0000094A 727F <1> jc ab14 ; if not a register 3193 0000094C 800D04 <1> or byte [di+OPRND.flags], ARG_JUSTREG 3194 0000094F 885D04 <1> mov byte [di+OPRND.reg1], bl ; save register number 3195 00000952 80FB18 <1> cmp bl, 24 ; 0..23 = AL..DH, AX..DI, EAX..EDI 3196 00000955 730B <1> jae ab09a ; if it's not a normal register 3197 00000957 93 <1> xchg ax, bx ; mov al, bl 3198 00000958 B103 <1> mov cl, 3 3199 0000095A D2E8 <1> shr al, cl ; al = size: 0 -> byte, 1 -> word, 2 -> dword 3200 0000095C 04FE <1> add al, -2 3201 0000095E 1403 <1> adc al, 3 ; convert to 1, 2, 4 (respectively) 3202 <1> ; matching SIZ_BYTE, SIZ_WORD, SIZ_DWORD 3203 00000960 EB5A <1> jmp short ab13 3204 <1> 3205 <1> ab09a: 3206 00000962 80350C <1> xor byte [di+OPRND.flags], ARG_JUSTREG|ARG_WEIRDREG 3207 00000965 B002 <1> mov al, SIZ_WORD ; register size 3208 00000967 80FB1E <1> cmp bl, REG_ST ; 24..29 = segment registers 3209 0000096A 7737 <1> ja ab11 ; if it's MM, CR, DR, or TR --> 3210 0000096C 740C <1> je ab09b ; if it's ST --> 3211 0000096E 80FB1C <1> cmp bl, 28 3212 00000971 7249 <1> jb ab13 ; if it's a non-386 segment register --> 3213 00000973 800E[BD83]20 <1> or byte [asm_mn_flags], AMF_FSGS ; else flag it 3214 00000978 EB42 <1> jmp short ab13 3215 <1> 3216 <1> ; ST registers 3217 <1> ab09b: 3218 0000097A AC <1> lodsb 3219 <1> ; Check for NASM FPU register notation: ST0..ST7 3220 0000097B 3C30 <1> cmp al, '0' ; digit following ? 3221 0000097D 720B <1> jb .par 3222 0000097F 3C37 <1> cmp al, '7' 3223 00000981 7707 <1> ja .par ; no --> 3224 00000983 2C30 <1> sub al, '0' 3225 00000985 884505 <1> mov byte [di+OPRND.reg2], al ; save number 3226 00000988 EB30 <1> jmp short ab12 ; --> 3227 <1> 3228 <1> .par: 3229 <1> ; Check for MASM FPU register notation: ST(0)..ST(7) 3230 0000098A 3C28 <1> cmp al, '(' ; parenthesis following ? 3231 0000098C 7403 <1> je .ispar ; yes --> 3232 <1> ; Plain ST (= ST0) 3233 0000098E 4E <1> dec si 3234 0000098F EB29 <1> jmp short ab12 3235 <1> 3236 <1> .ispar: 3237 00000991 AC <1> lodsb ; get digit 3238 00000992 2C30 <1> sub al, '0' 3239 00000994 3C07 <1> cmp al, 7 3240 00000996 7708 <1> ja ab10 ; if not 0..7 3241 00000998 884505 <1> mov byte [di+OPRND.reg2], al ; save the number 3242 0000099B AC <1> lodsb 3243 0000099C 3C29 <1> cmp al, ')' ; validate that there's a closing parenthesis 3244 0000099E 741A <1> je ab12 ; okay --> 3245 <1> ab10: 3246 <1> aa24_j2: 3247 000009A0 E9A4FE <1> jmp aa24 ; error 3248 <1> 3249 <1> ; other registers: 31..34 (MM, CR, DR, TR) 3250 <1> ab11: 3251 000009A3 AC <1> lodsb 3252 000009A4 2C30 <1> sub al, '0' ; get digit 3253 000009A6 3C07 <1> cmp al, 7 3254 000009A8 77F6 <1> ja ab10 ; if error --> 3255 000009AA 884505 <1> mov byte [di+OPRND.reg2], al ; save the number 3256 000009AD B004 <1> mov al, SIZ_DWORD ; register size 3257 000009AF 80FB1F <1> cmp bl, REG_MM 3258 000009B2 7508 <1> jne ab13 ; if not MM register 3259 000009B4 800D04 <1> or byte [di+OPRND.flags], ARG_JUSTREG 3260 000009B7 B005 <1> mov al, SIZ_QWORD 3261 000009B9 A9 <1> db __TEST_IMM16 ; (skip mov) 3262 <1> ab12: 3263 000009BA B000 <1> mov al, 0 ; size for ST registers 3264 <1> ab13: 3265 000009BC 3A4502 <1> cmp al, byte [di+OPRND.sizearg] ; compare with stated size 3266 000009BF 7407 <1> je ab13a ; if same 3267 000009C1 864502 <1> xchg al, byte [di+OPRND.sizearg] 3268 000009C4 84C0 <1> test al, al ; SIZ_NONE ? 3269 000009C6 75D8 <1> jnz ab10 ; if wrong size given, error --> 3270 <1> ab13a: 3271 000009C8 E9ED01 <1> jmp ab44 ; done with this operand 3272 <1> 3273 <1> ; It's not a register reference. Try for a number. 3274 <1> ab14: 3275 000009CB AC <1> lodsb 3276 000009CC E84308 <1> call aaifnum 3277 000009CF 7236 <1> jc ab17 ; it's not a number 3278 <1> ab14a: 3279 000009D1 E86208 <1> call aageti ; get the number 3280 000009D4 884D07 <1> mov byte [di+OPRND.orednum], cl 3281 000009D7 895D08 <1> mov word [di+OPRND.num+0], bx 3282 000009DA 89550A <1> mov word [di+OPRND.num+2], dx 3283 000009DD E8F2B1 <1> call skipwh0 3284 000009E0 80F902 <1> cmp cl, 2 3285 000009E3 7F22 <1> jg ab17 ; if we can't have a colon here 3286 000009E5 3C3A <1> cmp al, ':' 3287 000009E7 751E <1> jne ab17 ; if not xxxx:yyyy 3288 000009E9 E8E5B1 <1> call skipwhite 3289 000009EC E84708 <1> call aageti 3290 000009EF 8B4D08 <1> mov cx, word [di+OPRND.num+0] 3291 000009F2 894D05 <1> mov word [di+OPRND.num2], cx 3292 000009F5 895D08 <1> mov word [di+OPRND.num+0], bx 3293 000009F8 89550A <1> mov word [di+OPRND.num+2], dx 3294 000009FB 800D20 <1> or byte [di+OPRND.flags], ARG_FARADDR 3295 000009FE E9B601 <1> jmp ab43 ; done with this operand 3296 <1> 3297 <1> ab15: 3298 00000A01 E9B300 <1> jmp ab30 ; do post-processing 3299 <1> 3300 <1> ; Check for [...]. 3301 <1> ab16: 3302 00000A04 E8CAB1 <1> call skipwhite 3303 <1> ab17: 3304 00000A07 3C5B <1> cmp al, '[' ; begin loop over sets of [] 3305 00000A09 75F6 <1> jne ab15 ; if not [ 3306 00000A0B 800D01 <1> or byte [di+OPRND.flags], ARG_DEREF ; set the flag 3307 <1> 3308 <1> ; Process NASM segment prefix inside brackets if any 3309 00000A0E E8C0B1 <1> call skipwhite 3310 00000A11 8A24 <1> mov ah, byte [si] 3311 00000A13 25DFDF <1> and ax, TOUPPER_W 3312 00000A16 4E <1> dec si ; set up for ab08 3313 00000A17 E8F6FE <1> call ab08 3314 00000A1A 7403 <1> jz ab19 ; if segment prefix (called skipwhite) 3315 <1> ab18: 3316 00000A1C E8B2B1 <1> call skipwhite 3317 <1> ab19: 3318 00000A1F 3C5D <1> cmp al, ']' ; begin loop within [] 3319 00000A21 74E1 <1> je ab16 ; if done 3320 <1> 3321 <1> ; Check for a register (within []). 3322 00000A23 4E <1> dec si 3323 00000A24 57 <1> push di 3324 00000A25 BF[328A] <1> mov di, rgnam16 3325 00000A28 B90800 <1> mov cx, N_REGS16 3326 00000A2B E8B608 <1> call aagetreg 3327 00000A2E 5F <1> pop di 3328 00000A2F 7243 <1> jc ab25 ; if not a register 3329 00000A31 80FB10 <1> cmp bl, 16 3330 00000A34 7305 <1> jae ab20 ; if 32-bit register 3331 00000A36 80C308 <1> add bl, 8 ; adjust 0..7 to 8..15 3332 00000A39 EB1D <1> jmp short ab21 3333 <1> ab20: 3334 00000A3B 807D0500 <1> cmp byte [di+OPRND.reg2], 0 3335 00000A3F 7517 <1> jnz ab21 ; if we already have an index 3336 00000A41 E88DB1 <1> call skipwhite 3337 00000A44 4E <1> dec si 3338 00000A45 3C2A <1> cmp al, '*' 3339 00000A47 750F <1> jne ab21 ; if not followed by '*' 3340 00000A49 46 <1> inc si 3341 00000A4A 885D05 <1> mov byte [di+OPRND.reg2], bl ; save index register 3342 00000A4D E881B1 <1> call skipwhite 3343 00000A50 E8E307 <1> call aageti 3344 00000A53 E86C08 <1> call aaconvindex 3345 00000A56 EB51 <1> jmp short ab28 ; ready for next part 3346 <1> 3347 <1> ab21: 3348 00000A58 807D0400 <1> cmp byte [di+OPRND.reg1], 0 3349 00000A5C 7505 <1> jne ab22 ; if there's already a register 3350 00000A5E 885D04 <1> mov byte [di+OPRND.reg1], bl 3351 00000A61 EB09 <1> jmp ab23 3352 <1> ab22: 3353 00000A63 807D0500 <1> cmp byte [di+OPRND.reg2], 0 3354 00000A67 7508 <1> jne ab24 ; if too many registers 3355 00000A69 885D05 <1> mov byte [di+OPRND.reg2], bl 3356 <1> ab23: 3357 00000A6C E862B1 <1> call skipwhite 3358 00000A6F EB38 <1> jmp short ab28 ; ready for next part 3359 <1> 3360 <1> ab24: 3361 <1> aa24_j3: 3362 00000A71 E9D3FD <1> jmp aa24 ; error 3363 <1> 3364 <1> ; Try for a number (within []). 3365 <1> ab25: 3366 00000A74 AC <1> lodsb 3367 <1> ab26: 3368 00000A75 E8BE07 <1> call aageti ; get a number (or flag an error) 3369 00000A78 E857B1 <1> call skipwh0 3370 00000A7B 3C2A <1> cmp al, '*' 3371 00000A7D 740B <1> je ab27 ; if it's an index factor 3372 00000A7F 084D07 <1> or byte [di+OPRND.orednum], cl 3373 00000A82 015D08 <1> add word [di+OPRND.num+0], bx 3374 00000A85 11550A <1> adc word [di+OPRND.num+2], dx 3375 00000A88 EB1F <1> jmp short ab28 ; next part ... 3376 <1> 3377 <1> ab27: 3378 00000A8A E83508 <1> call aaconvindex 3379 00000A8D E841B1 <1> call skipwhite 3380 00000A90 4E <1> dec si 3381 00000A91 57 <1> push di 3382 00000A92 BF[328A] <1> mov di, rgnam16 3383 00000A95 31C9 <1> xor cx, cx 3384 00000A97 E84A08 <1> call aagetreg 3385 00000A9A 5F <1> pop di 3386 00000A9B 72D4 <1> jc ab24 ; if error 3387 00000A9D 807D0500 <1> cmp byte [di+OPRND.reg2], 0 3388 00000AA1 75CE <1> jne ab24 ; if there is already a register 3389 00000AA3 885D05 <1> mov byte [di+OPRND.reg2], bl 3390 00000AA6 E828B1 <1> call skipwhite 3391 <1> 3392 <1> ; Ready for the next term within []. 3393 <1> ab28: 3394 00000AA9 3C2D <1> cmp al, '-' 3395 00000AAB 74C8 <1> je ab26 ; if a (negative) number is next 3396 00000AAD 3C2B <1> cmp al, '+' 3397 00000AAF 7503 <1> jne ab29 ; if no next term (presumably) 3398 00000AB1 E968FF <1> jmp ab18 3399 <1> ab29: 3400 00000AB4 E968FF <1> jmp ab19 ; back for more 3401 <1> 3402 <1> ; Post-processing for complicated arguments. 3403 <1> ab30: 3404 00000AB7 837D0400 <1> cmp word [di+OPRND.reg1], 0 3405 00000ABB 752C <1> jne ab32 ; if registers were given ( ==> create MOD R/M) 3406 00000ABD 807D0700 <1> cmp byte [di+OPRND.orednum], 0 3407 00000AC1 7424 <1> je ab31 ; if nothing was given ( ==> error) 3408 00000AC3 803D00 <1> cmp byte [di+OPRND.flags], 0 3409 00000AC6 7506 <1> jne ab30b ; if it was not immediate 3410 00000AC8 800D10 <1> or byte [di+OPRND.flags], ARG_IMMED 3411 <1> ab30a: 3412 00000ACB E9E900 <1> jmp ab43 ; done with this argument 3413 <1> ab30b: 3414 00000ACE 800E[BD83]80 <1> or byte [asm_mn_flags], AMF_ADDR 3415 00000AD3 B002 <1> mov al, 2 ; size of the displacement 3416 00000AD5 F6450704 <1> test byte [di+OPRND.orednum], 4 3417 00000AD9 7407 <1> jz ab30c ; if no 32-bit displacement --> 3418 00000ADB 40 <1> inc ax 3419 00000ADC 40 <1> inc ax ; al = 4 3420 00000ADD 800E[BD83]04 <1> or byte [asm_mn_flags], AMF_A32 ; 32-bit addressing 3421 <1> ab30c: 3422 00000AE2 884503 <1> mov byte [di+OPRND.sizedis], al ; save displacement size 3423 00000AE5 EBE4 <1> jmp short ab30a ; done with this argument 3424 <1> ab31: 3425 00000AE7 EB88 <1> jmp short aa24_j3 ; flag an error 3426 <1> 3427 <1> ; Create the MOD R/M byte. 3428 <1> ; (For disp-only or register, this will be done later as needed.) 3429 <1> ab32: 3430 00000AE9 800D02 <1> or byte [di+OPRND.flags], ARG_MODRM 3431 00000AEC 8A4504 <1> mov al, byte [di+OPRND.reg1] 3432 00000AEF 0A4505 <1> or al, byte [di+OPRND.reg2] 3433 00000AF2 A810 <1> test al, 10h 3434 00000AF4 7525 <1> jnz ab34 ; if 32-bit addressing 3435 00000AF6 F6450704 <1> test byte [di+OPRND.orednum], 4 3436 00000AFA 751F <1> jnz ab34 ; if 32-bit addressing 3437 00000AFC 800E[BD83]80 <1> or byte [asm_mn_flags], AMF_ADDR 3438 00000B01 8B4504 <1> mov ax, word [di+OPRND.reg1] ; get reg1 and reg2 3439 00000B04 38E0 <1> cmp al, ah 3440 00000B06 7702 <1> ja ab33 ; make sure al >= ah 3441 00000B08 86C4 <1> xchg al, ah 3442 <1> ab33: 3443 00000B0A 57 <1> push di 3444 00000B0B BF[F283] <1> mov di, modrmtab 3445 00000B0E B90800 <1> mov cx, 8 3446 00000B11 F2AF <1> repne scasw 3447 00000B13 5F <1> pop di 3448 00000B14 75D1 <1> jne ab31 ; if not among the possibilities (error) 3449 00000B16 BB0602 <1> mov bx, 206h ; max disp = 2 bytes; 6 ==> (non-existent) [bp] 3450 00000B19 EB6A <1> jmp short ab39 ; done (just about) 3451 <1> 3452 <1> ; 32-bit addressing 3453 <1> ab34: 3454 00000B1B 800E[BD83]84 <1> or byte [asm_mn_flags], AMF_A32 | AMF_ADDR ; 32-bit addressing 3455 00000B20 8A4504 <1> mov al, byte [di+OPRND.reg1] 3456 00000B23 0A4506 <1> or al, byte [di+OPRND.index] 3457 00000B26 7508 <1> jnz ab35 ; if we can't optimize [Exx*1] to [Exx] 3458 00000B28 8B4504 <1> mov ax, word [di+OPRND.reg1] 3459 00000B2B 86C4 <1> xchg al, ah 3460 00000B2D 894504 <1> mov word [di+OPRND.reg1], ax 3461 <1> ab35: 3462 00000B30 BB0504 <1> mov bx, 405h ; max disp = 4 bytes; 5 ==> (non-existent) [bp] 3463 00000B33 807D0500 <1> cmp byte [di+OPRND.reg2], 0 3464 00000B37 7510 <1> jne ab36 ; if there's a SIB 3465 00000B39 8A4D04 <1> mov cl, byte [di+OPRND.reg1] 3466 00000B3C 80F910 <1> cmp cl, 16 3467 00000B3F 7CA6 <1> jl ab31 ; if wrong register type 3468 00000B41 80E107 <1> and cl, 7 3469 00000B44 80F904 <1> cmp cl, 4 ; check for ESP 3470 00000B47 753C <1> jne ab39 ; if not, then we're done (otherwise do SIB) 3471 <1> 3472 <1> ab36: 3473 00000B49 800E[BD83]08 <1> or byte [asm_mn_flags], AMF_SIB ; form SIB 3474 00000B4E 8A6D06 <1> mov ch, byte [di+OPRND.index] ; get SS bits 3475 00000B51 B103 <1> mov cl, 3 3476 00000B53 D2E5 <1> shl ch, cl ; shift them halfway into place 3477 00000B55 8A4505 <1> mov al, byte [di+OPRND.reg2] ; index register 3478 00000B58 3C14 <1> cmp al, 20 3479 00000B5A 748B <1> je ab31 ; if ESP ( ==> error) 3480 00000B5C 3C00 <1> cmp al, 0 3481 00000B5E 7502 <1> jne ab37 ; if not zero 3482 00000B60 B014 <1> mov al, 20 ; set it for index byte 4 3483 <1> ab37: 3484 00000B62 3C10 <1> cmp al, 16 3485 00000B64 7C81 <1> jl ab31 ; if wrong register type 3486 00000B66 2407 <1> and al, 7 3487 00000B68 08C5 <1> or ch, al ; put it into the SIB 3488 00000B6A D2E5 <1> shl ch, cl ; shift it into place 3489 00000B6C 41 <1> inc cx ; R/M for SIB = 4 3490 00000B6D 8A4504 <1> mov al, byte [di+OPRND.reg1] ; now get the low 3 bits 3491 00000B70 84C0 <1> test al, al 3492 00000B72 7505 <1> jnz ab38 ; if there was a first register 3493 00000B74 80CD05 <1> or ch, 5 3494 00000B77 EB38 <1> jmp short ab42 ; MOD = 0, disp is 4 bytes 3495 <1> 3496 <1> ab38: 3497 00000B79 3C10 <1> cmp al, 16 3498 00000B7B 7C56 <1> jl ab45 ; if wrong register type 3499 00000B7D 2407 <1> and al, 7 ; first register 3500 00000B7F 08C5 <1> or ch, al ; put it into the SIB 3501 00000B81 3C05 <1> cmp al, 5 3502 00000B83 7406 <1> je ab40 ; if it's EBP, then we don't recognize disp=0 3503 <1> ; otherwise bl will be set to 0 3504 <1> 3505 <1> ; Find the size of the displacement. 3506 <1> ab39: 3507 00000B85 38D9 <1> cmp cl, bl 3508 00000B87 7402 <1> je ab40 ; if it's [(E)BP], then disp=0 is still 1 byte 3509 00000B89 B300 <1> mov bl, 0 ; allow 0-byte disp 3510 <1> 3511 <1> ab40: 3512 00000B8B 51 <1> push cx 3513 00000B8C 8A4508 <1> mov al, byte [di+OPRND.num+0] 3514 00000B8F B107 <1> mov cl, 7 3515 00000B91 D2F8 <1> sar al, cl 3516 00000B93 59 <1> pop cx 3517 00000B94 8A6509 <1> mov ah, byte [di+OPRND.num+1] 3518 00000B97 38E0 <1> cmp al, ah 3519 00000B99 7513 <1> jne ab41 ; if it's bigger than 1 byte 3520 00000B9B 3B450A <1> cmp ax, word [di+OPRND.num+2] 3521 00000B9E 750E <1> jne ab41 ; ditto 3522 00000BA0 B700 <1> mov bh, 0 ; no displacement 3523 00000BA2 0A5D08 <1> or bl, byte [di+OPRND.num+0] 3524 00000BA5 740A <1> jz ab42 ; if disp = 0 and it's not (E)BP 3525 00000BA7 FEC7 <1> inc bh ; disp = 1 byte 3526 00000BA9 80C940 <1> or cl, 40h ; set MOD = 1 3527 00000BAC EB03 <1> jmp short ab42 ; done 3528 <1> 3529 <1> ab41: 3530 00000BAE 80C980 <1> or cl, 80h ; set MOD = 2 3531 <1> 3532 <1> ab42: 3533 00000BB1 887D03 <1> mov byte [di+OPRND.sizedis], bh ; store displacement size 3534 00000BB4 894D04 <1> mov word [di+OPRND.reg1], cx ; store MOD R/M and maybe SIB 3535 <1> 3536 <1> ; Finish up with the operand. 3537 <1> ab43: 3538 00000BB7 4E <1> dec si 3539 <1> ab44: 3540 00000BB8 E816B0 <1> call skipwhite 3541 00000BBB 83C70C <1> add di, byte OPRND_size 3542 00000BBE E8BBAF <1> call iseol? 3543 00000BC1 7413 <1> je ab99 ; if end of line --> 3544 00000BC3 3C2C <1> cmp al, ',' 3545 00000BC5 750C <1> jne ab45 ; if not comma ( ==> error) 3546 00000BC7 81FF[3208] <1> cmp di, line_out+3*OPRND_size 3547 00000BCB 7306 <1> jae ab45 ; if too many operands 3548 00000BCD E801B0 <1> call skipwhite 3549 00000BD0 E9C6FC <1> jmp ab02 3550 <1> 3551 <1> ab45: 3552 00000BD3 E971FC <1> jmp aa24 ; error jump 3553 <1> 3554 <1> ab99: 3555 00000BD6 C605FF <1> mov byte [di+OPRND.flags], -1 ; end of parsing phase 3556 <1> 3557 <1> %if 0 3558 <1> For the next phase, we match the parsed arguments with the set of 3559 <1> permissible argument lists for the opcode. The first match wins. 3560 <1> Therefore the argument lists should be ordered such that the 3561 <1> cheaper ones come first. 3562 <1> 3563 <1> There is a tricky issue regarding sizes of memory references. 3564 <1> Here are the rules: 3565 <1> 1. If a memory reference is given with a size, then it's OK. 3566 <1> 2. If a memory reference is given without a size, but some 3567 <1> other argument is a register (which implies a size), 3568 <1> then the memory reference inherits that size. 3569 <1> Exceptions: OP_CL does not imply a size (it's the shift counter) 3570 <1> OP_SHOSIZ 3571 <1> 3. If 1 and 2 do not apply, but this is the last possible argument 3572 <1> list, and if the argument list requires a particular size, then 3573 <1> that size is used. 3574 <1> 4. In all other cases, flag an error. 3575 <1> %endif 3576 <1> 3577 <1> ac01: 3578 00000BD9 31C0 <1> xor ax, ax 3579 00000BDB BF[C283] <1> mov di, rmaddr 3580 00000BDE B90700 <1> mov cx, 7 3581 00000BE1 F3AB <1> rep stosw ; clear variant-specific variables 3582 <1> ; cx = 0 3583 00000BE3 8B36[C083] <1> mov si, word [mneminfo] 3584 <1> ; -> the next argument variant 3585 <1> %if _ASM_ESCAPE_USED 3586 00000BE7 31DB <1> xor bx, bx ; cx:bx = counter of ASM_ESCAPEs 3587 <1> %endif 3588 <1> ; Parse the variant's assembler table entry 3589 <1> ; si-> next argument variant 3590 <1> ; variant-specific variables cleared 3591 <1> ; cx:bx = 0 3592 <1> 3593 <1> ac02: 3594 00000BE9 AC <1> lodsb 3595 <1> %if _ASM_ESCAPE_USED 3596 00000BEA 3CF4 <1> cmp al, ASM_ESCAPE 3597 00000BEC 750B <1> jne .notescape 3598 00000BEE 81C300F4 <1> add bx, ASM_ESCAPE << 8 3599 00000BF2 83D100 <1> adc cx, byte 0 3600 00000BF5 7219 <1> jc ac04 ; if this branches, too many escapes --> 3601 00000BF7 EBF0 <1> jmp short ac02 3602 <1> .notescape: 3603 <1> %endif 3604 00000BF9 2CF5 <1> sub al, ASM_MACH1 3605 00000BFB 7216 <1> jb ac05 ; if no more special bytes 3606 00000BFD 3C06 <1> cmp al, ASM_LOCKABLE-ASM_MACH1 3607 00000BFF 7408 <1> je ac03 ; if ASM_LOCKABLE 3608 00000C01 770D <1> ja ac04 ; if ASM_END or another (--> error) 3609 00000C03 40 <1> inc ax 3610 00000C04 A2[CA83] <1> mov byte [dismach], al ; save machine type 3611 00000C07 EBE0 <1> jmp short ac02 ; back for next byte 3612 <1> ac03: 3613 00000C09 800E[CE83]01 <1> or byte [varflags], VAR_LOCKABLE 3614 00000C0E EBD9 <1> jmp short ac02 ; back for next byte 3615 <1> 3616 <1> ac04: 3617 00000C10 E9D7FB <1> jmp aa13a ; error 3618 <1> 3619 <1> ; Get and unpack the word. 3620 <1> ac05: 3621 00000C13 4E <1> dec si 3622 00000C14 AD <1> lodsw 3623 00000C15 86C4 <1> xchg al, ah ; put into little-endian order 3624 00000C17 31D2 <1> xor dx, dx 3625 <1> %if _ASM_ESCAPE_USED 3626 00000C19 01D8 <1> add ax, bx ; add in the ASM_ESCAPE adjustment 3627 00000C1B 11CA <1> adc dx, cx ; account for overflow (cx = 0) 3628 <1> %endif 3629 00000C1D BB8000 <1> mov bx, ASMMOD 3630 00000C20 F7F3 <1> div bx ; ax = a_opcode; dx = index into opindex 3631 00000C22 A3[D283] <1> mov word [a_opcode], ax ; save ax 3632 00000C25 A3[D483] <1> mov word [a_opcode2], ax ; save the second copy 3633 00000C28 3DDF00 <1> cmp ax, 0DFh ; a coprocessor instruction ? 3634 00000C2B 7717 <1> ja ac05a 3635 00000C2D 3CD8 <1> cmp al, 0D8h 3636 00000C2F 7213 <1> jb ac05a ; if no coprocessor instruction --> 3637 00000C31 800E[CB83]01 <1> or byte [dmflags], DM_COPR ; flag it as an x87 instruction 3638 00000C36 88C4 <1> mov ah, al ; ah = low order byte of opcode 3639 00000C38 AC <1> lodsb ; get extra byte 3640 00000C39 A2[C483] <1> mov byte [regmem], al ; save it in regmem 3641 00000C3C A3[D483] <1> mov word [a_opcode2], ax ; save this for obsolete-instruction detection 3642 00000C3F 800E[CE83]02 <1> or byte [varflags], VAR_MODRM ; flag its presence 3643 <1> ac05a: 3644 00000C44 8936[C083] <1> mov [mneminfo], si ; save si back again 3645 00000C48 89D6 <1> mov si, dx 3646 <1> %if ASMMOD > 0FFh 3647 <1> xor bx, bx 3648 <1> %endif 3649 00000C4A 8A9C[2C16] <1> mov bl, byte [opindex+si] 3650 00000C4E 01D2 <1> add dx, dx 3651 00000C50 4A <1> dec dx 3652 00000C51 01D3 <1> add bx, dx ; adjust to get correct index into oplists 3653 00000C53 8DB7[0000] <1> lea si, [oplists+bx] ; si = the address of our operand list 3654 00000C57 BF[0E08] <1> mov di, line_out 3655 <1> 3656 <1> ; Begin loop over operands. 3657 <1> ; [a_opcode] etc set for opcode 3658 <1> ; si-> operand list 3659 <1> ; di-> next parsed operand 3660 <1> ; [mneminfo]-> mnemonic's next variant in assembler table 3661 <1> ac06: 3662 00000C5A AC <1> lodsb ; get next operand byte 3663 00000C5B 3C00 <1> cmp al, OP_END 3664 00000C5D 745F <1> je ac10 ; if end of list 3665 <1> 3666 <1> ; The OP_STACK_* operand types don't really need another 3667 <1> ; operand structure. So handle them before checking for 3668 <1> ; a valid operand structure. This is required for the 3669 <1> ; cases with no regular operands following the stack hint. 3670 <1> ; Because they aren't needed by the assembler anyway we 3671 <1> ; just loop back to ac06 to load the next operand type. 3672 00000C5F 3C1F <1> cmp al, OP_STACK_PUSH 3673 00000C61 74F7 <1> je ac06 3674 00000C63 3C20 <1> cmp al, OP_STACK_POP 3675 00000C65 74F3 <1> je ac06 3676 00000C67 3C21 <1> cmp al, OP_STACK_SPECIAL 3677 00000C69 74EF <1> je ac06 3678 <1> 3679 <1> ; Actual operand, or one of these always followed by one 3680 <1> ; or more actual operands (OP_M_*, OP_SHORT|NEAR|FAR), 3681 <1> ; so check for another valid operand structure. 3682 00000C6B 803DFF <1> cmp byte [di+OPRND.flags], -1 3683 00000C6E 744B <1> je ac01_j1 ; if too few operands were given 3684 00000C70 3C40 <1> cmp al, OP_SIZE 3685 00000C72 720E <1> jb ac07 ; if no size needed 3686 <1> %if 1 3687 00000C74 B400 <1> mov ah, 0 3688 00000C76 B104 <1> mov cl, 4 3689 00000C78 D3E0 <1> shl ax, cl ; move bits 4..7 (size) to ah (OP_1632=5, OP_8=6, OP_16=7, ...) 3690 00000C7A D2E8 <1> shr al, cl ; move bits 0..3 back 3691 <1> %else 3692 <1> aam 16 ; ax=00XY -> ax=0X0Y 3693 <1> %endif 3694 00000C7C 8826[D083] <1> mov byte [a_reqsize], ah ; save it away 3695 00000C80 EB02 <1> jmp short ac08 3696 <1> 3697 <1> ac07: ; al = OP_M64.. 3698 <1> ; have al = 1..x 3699 <1> ; want al = 16..y 3700 00000C82 040F <1> add al, 16-1 ; adjust for the 16 start entries in asmjmp 3701 <1> 3702 <1> ac08: 3703 00000C84 98 <1> cbw ; al = 0..7 or 16..y, 3704 <1> ; al < 128, thus ax = al 3705 00000C85 93 <1> xchg ax, bx ; now bx contains the index 3706 00000C86 8A87[0484] <1> mov al, byte [bittab+bx] 3707 00000C8A D1E3 <1> shl bx, 1 ; = offset into word array 3708 00000C8C 8B8F[4284] <1> mov cx, word [asmjmp + bx] 3709 <1> ; subroutine address 3710 00000C90 D1EB <1> shr bx, 1 ; return to index 3711 00000C92 83FB3D <1> cmp bx, OP_AMOUNT_TABLE 3712 00000C95 731E <1> jae ac09_internal_error ; internal error 3713 00000C97 8405 <1> test al, byte [di+OPRND.flags] 3714 00000C99 7420 <1> jz ac09 ; if no required bits are present 3715 00000C9B B400 <1> mov ah, 0 ; (insure ah = 0 for ao90) 3716 00000C9D FFD1 <1> call cx ; call its specific routine 3717 00000C9F A0[CF83] <1> mov al, [alloweddist] 3718 00000CA2 F6D0 <1> not al 3719 00000CA4 844501 <1> test byte [di + OPRND.distflags], al 3720 00000CA7 7512 <1> jnz ac09 ; if invalid distance specified --> 3721 00000CA9 817CFF5355 <1> cmp word [si-1], (OP_1632|OP_R)<<8|(OP_1632|OP_R_MOD) 3722 00000CAE 7403 <1> je ac06_j1 ; (hack) for IMUL instruction 3723 00000CB0 83C70C <1> add di, byte OPRND_size 3724 <1> ; -> next operand 3725 <1> ac06_j1: 3726 00000CB3 EBA5 <1> jmp ac06 ; back for more 3727 <1> 3728 <1> ac09_internal_error: 3729 00000CB5 BA[C872] <1> mov dx, msg.aa_internal_error 3730 00000CB8 E878B3 <1> call putsz 3731 <1> ac09: 3732 <1> ac01_j1: 3733 00000CBB E91BFF <1> jmp ac01 ; back to next possibility 3734 <1> 3735 <1> ; End of operand list. 3736 <1> ac10: 3737 00000CBE 803DFF <1> cmp byte [di+OPRND.flags], -1 3738 00000CC1 75F8 <1> jne ac09 ; if too many operands were given 3739 <1> 3740 <1> ; Final check on sizes 3741 00000CC3 A0[CE83] <1> mov al, byte [varflags] 3742 00000CC6 A810 <1> test al, VAR_SIZ_NEED 3743 00000CC8 7414 <1> jz ac12 ; if no size needed 3744 00000CCA A804 <1> test al, VAR_SIZ_GIVN 3745 00000CCC 7510 <1> jnz ac12 ; if a size was given 3746 00000CCE A808 <1> test al, VAR_SIZ_FORCD 3747 00000CD0 74E9 <1> jz ac09 ; if the size was not forced ( ==> reject) 3748 00000CD2 8B36[C083] <1> mov si, word [mneminfo] 3749 00000CD6 803CFF <1> cmp byte [si], ASM_END 3750 00000CD9 7403 <1> je ac12 ; if this is the last one 3751 <1> ac11: 3752 00000CDB E90CFB <1> jmp aa13a ; it was not, error --> (not a retry) 3753 <1> 3754 <1> ; Check other prefixes. 3755 <1> ac12: 3756 00000CDE A0[BE83] <1> mov al, byte [aa_saved_prefix] 3757 00000CE1 3C00 <1> cmp al, 0 3758 00000CE3 7421 <1> je ac14 ; if no saved prefixes to check 3759 00000CE5 3CF0 <1> cmp al, 0F0h 3760 00000CE7 7509 <1> jne ac13 ; if it's a rep prefix 3761 00000CE9 F606[CE83]01 <1> test byte [varflags], VAR_LOCKABLE 3762 00000CEE 74EB <1> jz ac11 ; if this variant is not lockable, error --> 3763 00000CF0 EB14 <1> jmp short ac14 ; done 3764 <1> 3765 <1> ac13: 3766 00000CF2 A1[D283] <1> mov ax, word [a_opcode] ; check if opcode is OK for rep{,z,nz} 3767 00000CF5 24FE <1> and al, ~1 ; clear low order bit (MOVSW -> MOVSB) 3768 <1> 3769 00000CF7 3DFF00 <1> cmp ax, 0FFh 3770 00000CFA 77DF <1> ja ac11 ; if it's not a 1-byte instruction, error --> 3771 00000CFC BF[3911] <1> mov di, replist ; list of instructions that go with rep 3772 00000CFF B90700 <1> mov cx, REP_LEN ; scan all (REP + REPxx) 3773 00000D02 F2AE <1> repne scasb 3774 00000D04 75D5 <1> jne ac11 ; if it's not among them, error --> 3775 <1> 3776 <1> ac14: 3777 00000D06 F606[BD83]10 <1> test byte [asm_mn_flags], AMF_MSEG 3778 00000D0B 7412 <1> jz ac15 ; if no segment prefix before mnemonic --> 3779 00000D0D A1[D283] <1> mov ax, word [a_opcode] ; check if opcode allows this 3780 00000D10 3DFF00 <1> cmp ax, 0FFh 3781 00000D13 77C6 <1> ja ac11 ; if it's not a 1-byte instruction, error --> 3782 00000D15 BF[3011] <1> mov di, segprfxtab 3783 00000D18 B90900 <1> mov cx, SEGP_LEN 3784 00000D1B F2AE <1> repne scasb 3785 00000D1D 75BC <1> jne ac11 ; if it's not in the list, error --> 3786 <1> 3787 <1> ac15: 3788 00000D1F 8B1E[C683] <1> mov bx, word [immaddr] 3789 00000D23 09DB <1> or bx, bx 3790 00000D25 740C <1> jz ac16 ; if no immediate data 3791 00000D27 A0[CD83] <1> mov al, byte [opsize] 3792 00000D2A F6D8 <1> neg al 3793 00000D2C D0E0 <1> shl al, 1 3794 00000D2E 844707 <1> test al, byte [bx+7] 3795 00000D31 75A8 <1> jnz ac11 ; if the immediate data was too big, error --> 3796 <1> 3797 <1> ; Put the instruction together 3798 <1> ; (maybe is this why they call it an assembler) 3799 <1> 3800 <1> ; First, the prefixes (including preceding WAIT instruction) 3801 <1> ac16: 3802 00000D33 66 <1> _386_PM_o32 ; mov edi, dword [a_addr] 3803 00000D34 8B3E[0E0B] <1> mov di, word [a_addr] 3804 00000D38 8E06[120B] <1> mov es, word [a_addr + saSegSel] 3805 00000D3C F606[BD83]02 <1> test byte [asm_mn_flags], AMF_WAIT 3806 00000D41 7404 <1> jz .nowaitprefix ; if no wait instruction beforehand 3807 00000D43 B09B <1> mov al, 9Bh 3808 00000D45 67 <1> _386_PM_a32 3809 00000D46 AA <1> stosb 3810 <1> .nowaitprefix: 3811 <1> 3812 00000D47 A0[BE83] <1> mov al,[aa_saved_prefix] 3813 00000D4A 84C0 <1> test al, al 3814 00000D4C 7402 <1> jz .noprefix ; if no LOCK or REP prefix 3815 00000D4E 67 <1> _386_PM_a32 3816 00000D4F AA <1> stosb 3817 <1> .noprefix: 3818 <1> 3819 <1> ;--- a 67h address size prefix is needed 3820 <1> ;--- 1. for CS16: if AMF_ADDR=1 and AMF_A32=1 3821 <1> ;--- 2. for CS32: if AMF_ADDR=1 and AMF_A32=0 3822 <1> 3823 00000D50 A0[BD83] <1> mov al, byte [asm_mn_flags] 3824 00000D53 A880 <1> test al, AMF_ADDR 3825 00000D55 7410 <1> jz .noaddressprefix 3826 00000D57 2404 <1> and al, AMF_A32 3827 <1> %if _PM 3828 00000D59 0A06[0B8B] <1> or al, byte [bCSAttr] 3829 00000D5D 7408 <1> jz .noaddressprefix ; if 16-bit CS and 16-bit addressing --> 3830 00000D5F 3C44 <1> cmp al, AMF_A32| 40h 3831 00000D61 7404 <1> jz .noaddressprefix ; if 32-bit CS and 32-bit addressing --> 3832 <1> %else 3833 <1> jz .noaddressprefix ; 16-bit addressing in RM --> 3834 <1> %endif 3835 <1> ; Otherwise, the CS and addressing bitness mismatch. Write a prefix. 3836 00000D63 B067 <1> mov al, 67h 3837 00000D65 67 <1> _386_PM_a32 3838 00000D66 AA <1> stosb ; store address size prefix 3839 <1> .noaddressprefix: 3840 <1> 3841 <1> ;--- a 66h data size prefix is needed 3842 <1> ;--- for CS16: if VAR_D32 == 1 or AMF_D32 == 1 3843 <1> ;--- for CS32: if VAR_D16 == 1 or AMF_D16 == 1 3844 <1> 3845 00000D67 8A26[BD83] <1> mov ah, byte [asm_mn_flags] 3846 00000D6B A0[CE83] <1> mov al, byte [varflags] 3847 <1> %if _PM 3848 00000D6E F606[0B8B]40 <1> test byte [bCSAttr], 40h 3849 00000D73 7407 <1> jz .dataprefix_rm 3850 00000D75 A92040 <1> test ax, VAR_D16|(AMF_D16<<8) 3851 00000D78 7507 <1> jnz .dataprefix 3852 00000D7A EB09 <1> jmp short .nodataprefix 3853 <1> .dataprefix_rm: 3854 <1> %endif 3855 00000D7C A94001 <1> test ax, VAR_D32|(AMF_D32<<8) 3856 00000D7F 7404 <1> jz .nodataprefix 3857 <1> .dataprefix: 3858 00000D81 B066 <1> mov al, 66h 3859 00000D83 67 <1> _386_PM_a32 3860 00000D84 AA <1> stosb ; store operand size prefix 3861 <1> .nodataprefix: 3862 <1> 3863 00000D85 A0[BF83] <1> mov al, [aa_seg_pre] 3864 00000D88 3C00 <1> cmp al, 0 3865 00000D8A 740B <1> je ac22 ; if no segment prefix 3866 00000D8C 67 <1> _386_PM_a32 3867 00000D8D AA <1> stosb 3868 00000D8E 3C64 <1> cmp al, 64h 3869 00000D90 7205 <1> jb ac22 ; if not 64 or 65 (FS or GS) --> 3870 00000D92 800E[BD83]20 <1> or byte [asm_mn_flags], AMF_FSGS ; flag it 3871 <1> ac22: 3872 <1> 3873 <1> ; Now emit the instruction itself. 3874 00000D97 A1[D283] <1> mov ax, word [a_opcode] 3875 00000D9A 89C3 <1> mov bx, ax 3876 00000D9C 81EB4002 <1> sub bx, 240h 3877 00000DA0 7317 <1> jae ac23 ; if 576.. (AGRP) --> 3878 00000DA2 3D0002 <1> cmp ax, 200h 3879 00000DA5 7229 <1> jb ac24 ; if regular instruction --> 3880 00000DA7 800E[CB83]01 <1> or byte [dmflags], DM_COPR ; flag it as an x87 instruction 3881 00000DAC 2438 <1> and al, 38h ; get register part 3882 00000DAE 0806[C483] <1> or byte [regmem], al 3883 00000DB2 93 <1> xchg ax, bx ; mov ax, bx (the low bits of bx are good) 3884 00000DB3 2407 <1> and al, 7 3885 00000DB5 0CD8 <1> or al, 0D8h 3886 00000DB7 EB21 <1> jmp short ac25 ; on to decoding the instruction 3887 <1> 3888 <1> ac23: 3889 00000DB9 800E[CE83]02 <1> or byte [varflags], VAR_MODRM ; flag presence of ModR/M byte 3890 00000DBE B103 <1> mov cl, 3 ; one instruction of a group 3891 00000DC0 D3EB <1> shr bx, cl ; separate AGRP()'s num part 3892 00000DC2 2407 <1> and al, 7 ; separate ModR/M register value 3893 00000DC4 D2E0 <1> shl al, cl 3894 00000DC6 0806[C483] <1> or byte [regmem], al ; fix ModR/M byte 3895 00000DCA D1E3 <1> shl bx, 1 3896 00000DCC 8B87[7801] <1> mov ax, word [agroups+bx] ; get actual opcode 3897 <1> 3898 <1> ac24: 3899 00000DD0 84E4 <1> test ah, ah 3900 00000DD2 7406 <1> jz ac25 ; if no 0Fh first --> 3901 00000DD4 50 <1> push ax ; store a 0Fh 3902 00000DD5 B00F <1> mov al, 0Fh 3903 00000DD7 67 <1> _386_PM_a32 3904 00000DD8 AA <1> stosb 3905 00000DD9 58 <1> pop ax 3906 <1> ac25: 3907 00000DDA 0A06[CC83] <1> or al, byte [opcode_or] ; put additional bits into the opcode 3908 00000DDE 67 <1> _386_PM_a32 3909 00000DDF AA <1> stosb ; store the op code itself 3910 <1> 3911 <1> ; Now store the extra stuff that comes with the instruction. 3912 00000DE0 A1[C483] <1> mov ax, word [regmem] 3913 00000DE3 F606[CE83]02 <1> test byte [varflags], VAR_MODRM 3914 00000DE8 740D <1> jz ac26 ; if no ModR/M --> 3915 00000DEA 67 <1> _386_PM_a32 3916 00000DEB AA <1> stosb ; store the ModR/M byte 3917 00000DEC F606[BD83]08 <1> test byte [asm_mn_flags], AMF_SIB 3918 00000DF1 7404 <1> jz ac26 ; if no SIB --> 3919 00000DF3 88E0 <1> mov al, ah 3920 00000DF5 67 <1> _386_PM_a32 3921 00000DF6 AA <1> stosb ; store the SIB byte, too 3922 <1> ac26: 3923 <1> 3924 00000DF7 8B1E[C283] <1> mov bx, word [rmaddr] 3925 00000DFB 85DB <1> test bx, bx 3926 00000DFD 740D <1> jz ac27 ; if no offset associated with the R/M --> 3927 00000DFF 66 <1> _386_PM_o32 ; xor ecx, ecx 3928 00000E00 31C9 <1> xor cx, cx 3929 00000E02 8A4F03 <1> mov cl, byte [bx+OPRND.sizedis] 3930 00000E05 66 <1> _386_PM_o32 ; lea esi, [bx+OPRND.num] 3931 00000E06 8D7708 <1> lea si, [bx+OPRND.num] 3932 00000E09 67 <1> _386_PM_a32 3933 00000E0A F3A4 <1> rep movsb ; store the R/M offset (or memory offset) 3934 <1> ac27: 3935 <1> 3936 <1> ; Now store immediate data 3937 00000E0C 8B1E[C683] <1> mov bx, word [immaddr] 3938 00000E10 85DB <1> test bx, bx 3939 00000E12 740E <1> jz ac28 ; if no immediate data --> 3940 00000E14 66 <1> _386_PM_o32 ; xor ecx, ecx 3941 00000E15 31C9 <1> xor cx, cx 3942 00000E17 8A0E[CD83] <1> mov cl, byte [opsize] 3943 00000E1B 66 <1> _386_PM_o32 ; lea esi, [bx+OPRND.num] 3944 00000E1C 8D7708 <1> lea si, [bx+OPRND.num] 3945 00000E1F 67 <1> _386_PM_a32 3946 00000E20 F3A4 <1> rep movsb 3947 <1> ac28: 3948 <1> 3949 <1> ; Now store additional bytes (needed for, e.g., enter instruction 3950 <1> ; and far memory address) 3951 00000E22 8B1E[C883] <1> mov bx, word [xxaddr] 3952 00000E26 85DB <1> test bx, bx 3953 00000E28 740D <1> jz ac29 ; if no additional data --> 3954 00000E2A 66 <1> _386_PM_o32 ; lea esi, [bx+OPRND.numadd] 3955 00000E2B 8D7704 <1> lea si, [bx+OPRND.numadd] 3956 00000E2E 66 <1> _386_PM_o32 ; xor eax, eax 3957 00000E2F 31C0 <1> xor ax, ax 3958 00000E31 AC <1> lodsb 3959 00000E32 66 <1> _386_PM_o32 ; xchg eax, ecx 3960 00000E33 91 <1> xchg ax, cx ; (mov cx, ax) 3961 00000E34 67 <1> _386_PM_a32 3962 00000E35 F3A4 <1> rep movsb 3963 <1> ac29: 3964 <1> 3965 <1> ; Done emitting. Update assembler address offset. 3966 00000E37 16 <1> push ss 3967 00000E38 07 <1> pop es ; restore es 3968 00000E39 66 <1> _386_PM_o32 ; mov dword [a_addr], edi 3969 00000E3A 893E[0E0B] <1> mov word [a_addr], di 3970 <1> 3971 <1> ; Compute machine type. 3972 00000E3E 803E[CA83]03 <1> cmp byte [dismach], 3 3973 00000E43 7313 <1> jae ac31 ; if we already know a 386 is needed 3974 00000E45 F606[BD83]25 <1> test byte [asm_mn_flags], AMF_D32 | AMF_A32 | AMF_FSGS 3975 00000E4A 7507 <1> jnz ac30 ; if 386 --> 3976 00000E4C F606[CE83]40 <1> test byte [varflags], VAR_D32 3977 00000E51 7405 <1> jz ac31 ; if not 386 --> 3978 <1> ac30: 3979 00000E53 C606[CA83]03 <1> mov byte [dismach], 3 3980 <1> ac31: 3981 00000E58 BF[D683] <1> mov di, a_obstab ; info on this instruction 3982 00000E5B 8B0E[D483] <1> mov cx, word [a_opcode2] 3983 00000E5F E86B4C <1> call showmach ; get machine message into si, length into cx 3984 00000E62 E308 <1> jcxz ac33 ; if no message 3985 <1> 3986 <1> ac32: 3987 00000E64 BF[0E08] <1> mov di, line_out 3988 00000E67 F3A4 <1> rep movsb ; copy the line to line_out 3989 00000E69 E848AE <1> call putsline_crlf 3990 <1> 3991 <1> ac33: 3992 00000E6C E95FF7 <1> jmp aa01 ; back for the next input line 3993 <1> 3994 <1> %if 0 3995 <1> ; This is debugging code. It assumes that the original value 3996 <1> ; of a_addr is on the top of the stack. 3997 <1> pop si ; get orig. a_addr 3998 <1> mov ax, word [a_addr + saSegSel] 3999 <1> mov word [u_addr], si 4000 <1> mov word [u_addr + saSegSel], ax ; (doesn't work with 32-bit CS) 4001 <1> %if _PM 4002 <1> mov ax, word [a_addr + saSegment] 4003 <1> mov word [u_addr + saSegment], ax 4004 <1> mov ax, word [a_addr + saSelector] 4005 <1> mov word [u_addr + saSelector], ax 4006 <1> %endif 4007 <1> mov bx, word [a_addr] 4008 <1> sub bx, si 4009 <1> mov di, line_out 4010 <1> mov cx, 10 4011 <1> mov al, ' ' 4012 <1> rep stosb 4013 <1> mov ds, word [a_addr + saSegSel] 4014 <1> 4015 <1> ax1: lodsb 4016 <1> call hexbyte ; display the generated bytes 4017 <1> dec bx 4018 <1> jnz ax1 4019 <1> push ss 4020 <1> pop ds 4021 <1> call putsline_crlf 4022 <1> and word [disflags], 0 4023 <1> call disasm ; disassemble the new instruction 4024 <1> jmp aa01 ; back to next input line 4025 <1> %endif 4026 <1> 4027 <1> ; Routines to check for specific operand types. 4028 <1> ; Upon success, the routine returns. 4029 <1> ; Upon failure, it pops the return address and jumps to ac01. 4030 <1> ; The routines must preserve si and di. 4031 <1> 4032 <1> ; OP_RM, OP_M, OP_R_MOD: form MOD R/M byte. 4033 <1> aop_rm: 4034 <1> aop_m: 4035 <1> aop_r_mod: 4036 00000E6F E86903 <1> call ao90 ; form reg/mem byte 4037 00000E72 EB30 <1> jmp short ao07 ; go to the size check 4038 <1> 4039 <1> ; OP_R: register. 4040 <1> aop_r: 4041 00000E74 8A4504 <1> mov al, byte [di+OPRND.reg1] ; register number 4042 00000E77 2407 <1> and al, 7 4043 00000E79 B103 <1> mov cl, 3 4044 00000E7B D2E0 <1> shl al, cl ; shift it into place 4045 00000E7D 0806[C483] <1> or byte [regmem], al ; put it into the reg/mem byte 4046 00000E81 EB21 <1> jmp short ao07 ; go to the size check 4047 <1> 4048 <1> ; OP_R_ADD: register, added to the instruction. 4049 <1> aop_r_add: 4050 00000E83 8A4504 <1> mov al, byte [di+OPRND.reg1] 4051 00000E86 2407 <1> and al, 7 4052 00000E88 A2[CC83] <1> mov byte [opcode_or], al ; put it there 4053 00000E8B EB17 <1> jmp short ao07 ; go to the size check 4054 <1> 4055 <1> ; OP_IMM: immediate data. 4056 <1> aop_imm: 4057 00000E8D 893E[C683] <1> mov word [immaddr], di ; save the location of this 4058 00000E91 EB11 <1> jmp short ao07 ; go to the size check 4059 <1> 4060 <1> ; OP_MOFFS: just the memory offset 4061 <1> aop_moffs: 4062 00000E93 F60502 <1> test byte [di+OPRND.flags], ARG_MODRM 4063 00000E96 754F <1> jnz ao11 ; if MOD R/M byte ( ==> reject) 4064 00000E98 893E[C283] <1> mov word [rmaddr], di ; save the operand pointer 4065 00000E9C EB06 <1> jmp short ao07 ; go to the size check 4066 <1> 4067 <1> ; OP_AX: check for AL/AX/EAX 4068 <1> aop_ax: 4069 00000E9E F6450407 <1> test byte [di+OPRND.reg1], 7 4070 00000EA2 7543 <1> jnz ao11 ; if wrong register, reject --> 4071 <1> ; jmp short ao07 ; go to the size check 4072 <1> 4073 <1> ; Size check 4074 <1> ao07: 4075 00000EA4 800E[CE83]10 <1> or byte [varflags], VAR_SIZ_NEED 4076 00000EA9 A0[D083] <1> mov al, byte [a_reqsize] 4077 00000EAC 2C05 <1> sub al, 5 ; OP_1632 >> 4 4078 00000EAE 7C3A <1> jl ao12 ; if OP_ALL 4079 00000EB0 7463 <1> je ao13 ; if OP_1632 4080 00000EB2 3C05 <1> cmp al, 5 ; OP_1632_DEFAULT ? 4081 00000EB4 7444 <1> je ao_1632_default 4082 <1> ; OP_8 = 1, OP_16 = 2, OP_32 = 3, OP_64 = 4 4083 00000EB6 04FD <1> add al, -3 4084 00000EB8 1403 <1> adc al, 3 ; convert 3 --> 4 and 4 --> 5 4085 <1> ao08: 4086 00000EBA 800E[CE83]18 <1> or byte [varflags], VAR_SIZ_FORCD| VAR_SIZ_NEED 4087 <1> ao08_1: 4088 00000EBF 8A5D02 <1> mov bl, byte [di+OPRND.sizearg] 4089 00000EC2 84DB <1> test bl, bl ; SIZ_NONE ? 4090 00000EC4 7409 <1> jz ao09 ; yes, if no size given --> 4091 00000EC6 800E[CE83]04 <1> or byte [varflags], VAR_SIZ_GIVN 4092 00000ECB 38D8 <1> cmp al, bl 4093 00000ECD 7518 <1> jne ao11 ; if sizes conflict, reject --> 4094 <1> ao09: 4095 00000ECF 3A06[CD83] <1> cmp al, byte [opsize] 4096 00000ED3 7411 <1> je ao10 ; if sizes agree --> 4097 00000ED5 3CFF <1> cmp al, -1 ; is it OP_MXX (for lea) ? 4098 00000ED7 740D <1> je ao10 4099 00000ED9 8606[CD83] <1> xchg al, byte [opsize] 4100 00000EDD 3C00 <1> cmp al, SIZ_NONE 4101 00000EDF 7506 <1> jne ao11 ; if sizes disagree, reject --> 4102 00000EE1 800E[CE83]04 <1> or byte [varflags], VAR_SIZ_GIVN ; added in DEBUG/X 1.18 4103 <1> ao10: 4104 00000EE6 C3 <1> retn 4105 <1> 4106 <1> ao11: 4107 <1> ao50_j1: 4108 00000EE7 E9DE02 <1> jmp ao50 ; reject 4109 <1> 4110 <1> ; OP_ALL - Allow all sizes. 4111 <1> ao12: 4112 00000EEA 8A4502 <1> mov al, byte [di+OPRND.sizearg] 4113 00000EED 3C01 <1> cmp al, SIZ_BYTE 4114 00000EEF 743F <1> je ao15 ; if byte 4115 00000EF1 7225 <1> jb ao14 ; if unknown (SIZ_NONE) --> 4116 00000EF3 800E[CC83]01 <1> or byte [opcode_or], 1 ; set bit in instruction 4117 00000EF8 EB1E <1> jmp short ao14 ; if size is 16 or 32 4118 <1> 4119 <1> ; OP_1632_DEFAULT 4120 <1> ao_1632_default: 4121 00000EFA 8A4502 <1> mov al, byte [di+OPRND.sizearg] 4122 00000EFD 84C0 <1> test al, al ; SIZ_NONE ? 4123 00000EFF 751B <1> jnz @F ; no --> 4124 00000F01 A0[CD83] <1> mov al, byte [opsize] ; (for push imm16/32) 4125 00000F04 84C0 <1> test al, al ; SIZ_NONE ? 4126 00000F06 7514 <1> jnz @F ; no --> 4127 00000F08 B002 <1> mov al, SIZ_WORD 4128 <1> %if _PM 4129 00000F0A F606[0B8B]40 <1> test byte [bCSAttr], 40h 4130 00000F0F 740B <1> jz @F 4131 00000F11 B004 <1> mov al, SIZ_DWORD 4132 <1> %endif 4133 00000F13 EB07 <1> jmp @F 4134 <1> 4135 <1> ; OP_1632 - word or dword. 4136 <1> ao13: 4137 00000F15 8A4502 <1> mov al, byte [di+OPRND.sizearg] 4138 <1> ao14: 4139 00000F18 84C0 <1> test al, al ; SIZ_NONE ? 4140 00000F1A 741B <1> jz ao16 ; yes, if still unknown --> 4141 <1> @@: 4142 00000F1C 3C02 <1> cmp al, SIZ_WORD 4143 00000F1E 7507 <1> jne ao15_1 ; if word 4144 00000F20 800E[CE83]20 <1> or byte [varflags], VAR_D16 4145 00000F25 EB09 <1> jmp short ao15 4146 <1> ao15_1: 4147 00000F27 3C04 <1> cmp al, SIZ_DWORD 4148 00000F29 75BC <1> jne ao11 ; if not dword 4149 00000F2B 800E[CE83]40 <1> or byte [varflags], VAR_D32 ; set flag 4150 <1> ao15: 4151 00000F30 800E[CE83]04 <1> or byte [varflags], VAR_SIZ_GIVN 4152 <1> ; hack for pushd/pushw imm: check for match 4153 00000F35 EB98 <1> jmp ao09 4154 <1> ao16: 4155 00000F37 C3 <1> retn 4156 <1> 4157 <1> ; OP_M64 - 64-bit memory reference. 4158 <1> ; OP_MFLOAT - single-precision floating point memory reference. 4159 <1> ; OP_MDOUBLE - double-precision floating point memory reference. 4160 <1> ; OP_M80 - 80-bit memory reference. 4161 <1> ; OP_MXX - memory reference, size unknown. 4162 <1> ; INP: (from ac08 calling this:) 4163 <1> ; bx = index into bittab 4164 <1> ao17: 4165 00000F38 E8A002 <1> call ao90 ; form reg/mem byte 4166 00000F3B 8A87[B584] <1> mov al, byte [asm_siznum + bx - (OP_FIRST_ASM_SIZNUM + 16 - 1)] 4167 00000F3F E978FF <1> jmp ao08 ; check size 4168 <1> 4169 <1> ; OP_FARIMM - far address contained in instruction 4170 <1> ao21: 4171 00000F42 8A4502 <1> mov al, byte [di+OPRND.sizearg] 4172 00000F45 84C0 <1> test al, al ; have a size ? (check for not SIZ_NONE) 4173 00000F47 750B <1> jnz @F ; yes --> 4174 00000F49 B002 <1> mov al, SIZ_WORD ; default to word, assuming 16-bit CS 4175 <1> %if _PM 4176 00000F4B F606[0B8B]40 <1> test byte [bCSAttr], 40h; is it a 32-bit CS ? 4177 00000F50 7402 <1> jz @F ; no --> 4178 00000F52 B004 <1> mov al, SIZ_DWORD ; yes, default to dword 4179 <1> %endif 4180 <1> 4181 <1> @@: 4182 00000F54 3C02 <1> cmp al, SIZ_WORD ; is it word ? 4183 00000F56 750D <1> jne .o32_check ; no, check for dword size --> 4184 <1> .o16: 4185 00000F58 800E[CE83]20 <1> or byte [varflags], VAR_D16 4186 <1> ; mark flag for o16 prefix if needed 4187 <1> 4188 00000F5D 837D0A00 <1> cmp word [di+OPRND.num+2], byte 0 4189 00000F61 7504 <1> jne ..@ao50_j_NZ ; if not a 16-bit offset --> 4190 <1> 4191 00000F63 EB0C <1> jmp short .common 4192 <1> 4193 <1> .o32_check: 4194 00000F65 3C04 <1> cmp al, SIZ_DWORD ; is it dword ? 4195 <1> ..@ao50_j_NZ: 4196 00000F67 7403E95C02 <1> jne ao50 ; no, invalid --> 4197 <1> .o32: 4198 00000F6C 800E[CE83]40 <1> or byte [varflags], VAR_D32 4199 <1> ; mark flag for o32 prefix if needed 4200 <1> 4201 <1> .common: 4202 00000F71 800E[CE83]04 <1> or byte [varflags], VAR_SIZ_GIVN 4203 <1> 4204 00000F76 C6450402 <1> mov byte [di+OPRND.numadd], 2 ; 2 additional bytes (segment part) 4205 00000F7A 893E[C683] <1> mov word [immaddr], di 4206 00000F7E A2[CD83] <1> mov byte [opsize], al ; size of offset, 2 or 4 4207 <1> ao22a: 4208 00000F81 893E[C883] <1> mov word [xxaddr], di 4209 00000F85 C3 <1> retn 4210 <1> 4211 <1> ; OP_REL8 - relative address 4212 <1> ao23: 4213 00000F86 807D0200 <1> cmp byte [di+OPRND.sizearg], SIZ_NONE 4214 00000F8A 75DB <1> jne ..@ao50_j_NZ 4215 <1> 4216 00000F8C 66 <1> _386_PM_o32 4217 00000F8D A1[0E0B] <1> mov ax, word [a_addr] ; offset 4218 00000F90 66 <1> _386_PM_o32 4219 00000F91 40 <1> inc ax 4220 00000F92 66 <1> _386_PM_o32 4221 00000F93 40 <1> inc ax ; $ 4222 00000F94 8A0E[BD83] <1> mov cl, byte [asm_mn_flags] 4223 <1> 4224 00000F98 F6C180 <1> test cl, AMF_ADDR 4225 00000F9B 7517 <1> jnz ao23aa 4226 <1> ; JxCXZ, LOOPx, LOOPZx and LOOPNZx need a 67h, not a 66h prefix 4227 00000F9D F6C141 <1> test cl, AMF_D32 | AMF_D16 4228 00000FA0 7422 <1> jz ao23b ; if not JxCXZ, LOOPx 4229 00000FA2 F6C101 <1> test cl, AMF_D32 4230 00000FA5 7403 <1> jz ao23a 4231 00000FA7 80C904 <1> or cl, AMF_A32 4232 <1> ao23a: 4233 00000FAA 80E1BE <1> and cl, ~(AMF_D32 | AMF_D16) 4234 00000FAD 80C980 <1> or cl, AMF_ADDR 4235 00000FB0 880E[BD83] <1> mov byte [asm_mn_flags], cl 4236 <1> ao23aa: 4237 00000FB4 80E104 <1> and cl, AMF_A32 4238 <1> %if _PM 4239 00000FB7 0A0E[0B8B] <1> or cl, byte [bCSAttr] 4240 00000FBB 7407 <1> jz ao23b ; 16-bit CS and addressing --> 4241 00000FBD 80F944 <1> cmp cl, AMF_A32| 40h 4242 00000FC0 7402 <1> je ao23b ; 32-bit CS and addressing --> 4243 <1> %else 4244 <1> jz ao23b ; RM CS and 16-bit addressing --> 4245 <1> %endif 4246 00000FC2 66 <1> _386_PM_o32 4247 00000FC3 40 <1> inc ax ; adjust $ for the prefix that will be used 4248 <1> ao23b: 4249 00000FC4 89C3 <1> mov bx, ax 4250 00000FC6 31C9 <1> xor cx, cx 4251 00000FC8 6650 <1> _386_PM push eax 4252 00000FCA 58 <1> _386_PM pop ax 4253 00000FCB 59 <1> _386_PM pop cx 4254 00000FCC 8B4508 <1> mov ax, word [di+OPRND.num+0] 4255 00000FCF 8B550A <1> mov dx, word [di+OPRND.num+2] 4256 00000FD2 29D8 <1> sub ax, bx 4257 00000FD4 19CA <1> sbb dx, cx 4258 <1> 4259 00000FD6 884505 <1> mov byte [di+OPRND.num2], al 4260 00000FD9 3D8000 <1> cmp ax, 80h ; just one byte beyond range ? 4261 00000FDC 750E <1> jne @F 4262 00000FDE 85D2 <1> test dx, dx 4263 00000FE0 750A <1> jnz @F ; no --> 4264 00000FE2 803C22 <1> cmp byte [si], OP_E_CX ; we're trying for loop with (e)cx explicit ? 4265 00000FE5 7505 <1> jne @F ; no --> 4266 00000FE7 800D80 <1> setopt [di + OPRND.flags], ARG_ECX_SPECIAL 4267 <1> ; remember that we have to overflow 4268 00000FEA EB0C <1> jmp @FF 4269 <1> @@: 4270 00000FEC B107 <1> mov cl, 7 4271 00000FEE D2F8 <1> sar al, cl 4272 00000FF0 38E0 <1> cmp al, ah 4273 00000FF2 7575 <1> jne ao24 ; if too big, reject --> 4274 00000FF4 39D0 <1> cmp ax, dx 4275 00000FF6 7571 <1> jne ao24 ; if too big, reject --> 4276 <1> @@: 4277 00000FF8 C6450401 <1> mov byte [di+OPRND.numadd], 1 ; save the length 4278 00000FFC EB83 <1> jmp short ao22a ; save it away 4279 <1> 4280 <1> 4281 <1> ; OP_REL1632: relative jump/call to a longer address. 4282 <1> ; 4283 <1> ; size of instruction is 4284 <1> ; a) CS 16-bit: 4285 <1> ; 3 (xx xxxx, near jmp/call E9/E8) or 4286 <1> ; 4 (0F xx xxxx, near jcc 0F 80+cc) 4287 <1> ; 6 (66 xx xxxxxxxx, near 32-bit jmp/call E9/E8) 4288 <1> ; 7 (66 0F xx xxxxxxxx, near 32-bit jcc 0F 80+cc) 4289 <1> ; 4290 <1> ; b) CS 32-bit: 4291 <1> ; 5 (xx xxxxxxxx, near jmp/call E9/E8) or 4292 <1> ; 6 (0F xx xxxxxxxx, near jcc 0F 80+cc) 4293 <1> ; 4 (66 xx xxxx, near 16-bit jmp/call E9/E8) 4294 <1> ; 5 (66 0F xx xxxx, near 16-bit jcc 0F 80+cc) 4295 <1> ao25: 4296 00000FFE 8B1E[0E0B] <1> mov bx, word [a_addr+0] 4297 <1> %if _PM 4298 00001002 8B0E[100B] <1> mov cx, word [a_addr+2] 4299 <1> %else 4300 <1> xor cx, cx 4301 <1> %endif 4302 <1> 4303 00001006 31C0 <1> xor ax, ax 4304 00001008 8A4502 <1> mov al, byte [di+OPRND.sizearg] 4305 0000100B 84C0 <1> test al, al ; SIZ_NONE ? 4306 0000100D 750B <1> jnz @F ; no --> 4307 0000100F B002 <1> mov al, SIZ_WORD ; in 16-bit CS default to word (2) 4308 <1> %if _PM 4309 00001011 F606[0B8B]40 <1> test byte [bCSAttr], 40h 4310 00001016 7402 <1> jz @F 4311 00001018 B004 <1> mov al, SIZ_DWORD ; in 32-bit CS default to dword (4) 4312 <1> %endif 4313 <1> @@: 4314 0000101A 50 <1> push ax ; preserve size 4315 <1> 4316 <1> %if _PM 4317 0000101B F606[0B8B]40 <1> test byte [bCSAttr], 40h 4318 00001020 7404 <1> jz .adjust_16bitcs 4319 <1> .adjust_32bitcs: 4320 00001022 3C04 <1> cmp al, SIZ_DWORD ; default size ? 4321 00001024 EB02 <1> jmp .adjust_common 4322 <1> %endif 4323 <1> 4324 <1> .adjust_16bitcs: 4325 00001026 3C02 <1> cmp al, SIZ_WORD ; default size ? 4326 <1> .adjust_common: 4327 00001028 7401 <1> je .adjust_done 4328 0000102A 40 <1> inc ax ; no, increment for 66h prefix (osize) 4329 <1> .adjust_done: 4330 <1> 4331 0000102B 40 <1> inc ax ; add size of opcode (E8h/E9h/80h+cc) 4332 <1> 4333 0000102C 813E[D283]0001 <1> cmp word [a_opcode], 100h 4334 <1> ; is it a 0Fh-prefixed opcode ? 4335 <1> ; (that is, a 0Fh 80h+cc conditional jump) 4336 00001032 7201 <1> jb @F 4337 00001034 40 <1> inc ax ; add size of 0Fh prefix opcode 4338 <1> @@: 4339 00001035 01C3 <1> add bx, ax 4340 00001037 83D100 <1> adc cx, byte 0 4341 0000103A 58 <1> pop ax ; restore size (2 or 4) 4342 0000103B 8B550A <1> mov dx, word [di+OPRND.num+2] 4343 <1> 4344 0000103E 3C04 <1> cmp al, SIZ_DWORD 4345 00001040 740B <1> je ao27_1 ; if the size given was "dword" --> 4346 <1> 4347 <1> ao27: 4348 00001042 85D2 <1> test dx, dx 4349 00001044 7523 <1> jnz ao24 ; if operand is too big, reject --> 4350 00001046 800E[CE83]20 <1> or byte [varflags], VAR_D16 4351 0000104B EB05 <1> jmp short ao28 4352 <1> 4353 <1> ao27_1: 4354 0000104D 800E[CE83]40 <1> or byte [varflags], VAR_D32 4355 <1> 4356 <1> ao28: 4357 00001052 884504 <1> mov byte [di+OPRND.numadd], al ; store the size 4358 00001055 8B4508 <1> mov ax, word [di+OPRND.num+0] 4359 00001058 31C9 <1> xor cx, cx 4360 0000105A 29D8 <1> sub ax, bx 4361 0000105C 19CA <1> sbb dx, cx ; compute DX:AX - CX:BX 4362 0000105E 894505 <1> mov word [di+OPRND.num2+0], ax 4363 00001061 895507 <1> mov word [di+OPRND.num2+2], dx 4364 00001064 893E[C883] <1> mov word [xxaddr], di 4365 00001068 C3 <1> retn 4366 <1> 4367 <1> ao24: 4368 <1> ao50_j2: 4369 00001069 E95C01 <1> jmp ao50 ; reject 4370 <1> 4371 <1> ; OP_1CHK - The assembler can ignore this one. 4372 <1> ao29: 4373 0000106C 58 <1> pop ax ; discard return address 4374 <1> ac06_j2: 4375 0000106D E943FC <1> jmp ac06_j1 ; next operand 4376 <1> 4377 <1> ; OP_STI - ST(I). 4378 <1> aop_sti: 4379 00001070 B01E <1> mov al, REG_ST ; code for ST 4380 00001072 8A5D05 <1> mov bl, byte [di+OPRND.reg2] 4381 00001075 EB47 <1> jmp short ao38 ; to common code --> 4382 <1> 4383 <1> ; OP_MMX (previously was OP_ECX (used for LOOPx)) 4384 <1> aop_mmx: 4385 00001077 B01F <1> mov al, REG_MM 4386 00001079 EB3C <1> jmp short ao37 ; to common code --> 4387 <1> 4388 <1> ; OP_MMX_MOD 4389 <1> aop_mmx_mod: 4390 0000107B B01F <1> mov al, REG_MM 4391 0000107D 8A5D05 <1> mov bl, byte [di+OPRND.reg2] 4392 00001080 80CBC0 <1> or bl, 0C0h 4393 00001083 EB39 <1> jmp short ao38 4394 <1> 4395 <1> ; OP_CR 4396 <1> aop_cr: 4397 00001085 8A4505 <1> mov al, byte [di+OPRND.reg2] ; get the index 4398 00001088 3C04 <1> cmp al, 4 4399 0000108A 77DD <1> ja ao24 ; if too big, reject --> 4400 0000108C 7505 <1> jne ao32 ; if not CR4 4401 0000108E C606[CA83]05 <1> mov byte [dismach], 5 ; CR4 is new to the 586 4402 <1> ao32: 4403 00001093 3C01 <1> cmp al, 1 4404 00001095 7506 <1> jne ao33 4405 00001097 807D0CFF <1> cmp byte [di+OPRND_size+OPRND.flags], -1 4406 0000109B 75CC <1> jne ao24 ; reject if no other arg (can't mov CR1,xx) 4407 <1> ao33: 4408 0000109D B020 <1> mov al, REG_CR ; code for CR 4409 0000109F EB16 <1> jmp short ao37 ; to common code 4410 <1> 4411 <1> ; OP_DR 4412 <1> ao34: 4413 000010A1 B021 <1> mov al, REG_DR ; code for DR 4414 000010A3 EB12 <1> jmp short ao37 ; to common code 4415 <1> 4416 <1> ; OP_TR 4417 <1> ao35: 4418 000010A5 8A4505 <1> mov al, byte [di+OPRND.reg2] ; get the index 4419 000010A8 3C03 <1> cmp al, 3 4420 000010AA 72BD <1> jb ao24 ; if too small, reject --> 4421 000010AC 3C06 <1> cmp al, 6 4422 000010AE 7305 <1> jae ao36 4423 000010B0 C606[CA83]04 <1> mov byte [dismach], 4 ; TR3-5 are new to the 486 4424 <1> ao36: 4425 000010B5 B022 <1> mov al, REG_TR ; code for TR 4426 <1> 4427 <1> ; Common code for these weird registers. 4428 <1> ao37: 4429 000010B7 8A5D05 <1> mov bl, byte [di+OPRND.reg2] 4430 000010BA B103 <1> mov cl, 3 4431 000010BC D2E3 <1> shl bl, cl 4432 <1> ao38: 4433 000010BE 081E[C483] <1> or byte [regmem], bl 4434 000010C2 800E[CE83]02 <1> or byte [varflags], VAR_MODRM 4435 000010C7 3A4504 <1> cmp al, byte [di+OPRND.reg1] ; check for the right numbered register 4436 000010CA 7419 <1> je ao40 ; if yes, then return 4437 <1> ao38a: 4438 000010CC E9F900 <1> jmp ao50 ; reject --> 4439 <1> 4440 <1> ; OP_SEGREG 4441 <1> ao39: 4442 000010CF 8A4504 <1> mov al, byte [di+OPRND.reg1] 4443 000010D2 2C18 <1> sub al, 24 4444 000010D4 3C06 <1> cmp al, 6 4445 000010D6 73F4 <1> jae ao38a ; if not a segment register, reject --> 4446 000010D8 B103 <1> mov cl, 3 4447 000010DA D2E0 <1> shl al, cl 4448 000010DC 0806[C483] <1> or byte [regmem], al 4449 <1> ;--- v1.26: don't force size for MOV sreg, mxx / MOV mxx, sreg 4450 000010E0 800E[CE83]04 <1> or byte [varflags], VAR_SIZ_GIVN 4451 <1> ao40: 4452 000010E5 C3 <1> retn 4453 <1> 4454 <1> ; OP_IMMS8 - Sign-extended immediate byte (PUSH xx) 4455 <1> ao41: 4456 000010E6 8026[CE83]EF <1> and byte [varflags], ~VAR_SIZ_NEED ; added for v1.09. Ok? 4457 <1> ao41_extend: 4458 000010EB 8B4508 <1> mov ax, word [di+OPRND.num+0] 4459 000010EE B107 <1> mov cl, 7 4460 000010F0 D2F8 <1> sar al, cl 4461 000010F2 EB05 <1> jmp short ao43 ; common code 4462 <1> 4463 <1> ; OP_IMM8 - Immediate byte 4464 <1> ao42: 4465 000010F4 8B4508 <1> mov ax, word [di+OPRND.num+0] 4466 000010F7 B000 <1> mov al, 0 4467 <1> ao43: 4468 000010F9 38E0 <1> cmp al, ah 4469 000010FB 7403E9C800 <1> jne ao50 ; if too big, reject --> 4470 00001100 3B450A <1> cmp ax, word [di+OPRND.num+2] 4471 00001103 7403E9C000 <1> jne ao50 ; if too big, reject --> 4472 00001108 B001 <1> mov al, SIZ_BYTE 4473 0000110A E8C000 <1> call aasizchk ; check that size == 0 or 1 4474 0000110D 8A6508 <1> mov ah, byte [di+OPRND.num+0] ; store the byte, length 1 4475 00001110 894504 <1> mov word [di+OPRND.numadd], ax ; store length (0/1) + the byte 4476 00001113 893E[C883] <1> mov word [xxaddr], di 4477 <1> ao43r: 4478 00001117 C3 <1> retn 4479 <1> 4480 <1> 4481 <1> aop_e_cx: 4482 00001118 B980FB <1> mov cx, AMF_ADDR | 0 | (~AMF_A32 << 8) 4483 0000111B 837D0409 <1> cmp word [di + OPRND.reg1], REG_CX 4484 0000111F 740B <1> je .a16 4485 <1> .a32: 4486 00001121 B984FF <1> mov cx, AMF_ADDR | AMF_A32 | (~0 << 8) 4487 00001124 E80500 <1> call .common 4488 00001127 B011 <1> mov al, REG_CX + 8 4489 00001129 E99600 <1> jmp ao48a 4490 <1> 4491 <1> .a16: 4492 <1> .common: 4493 0000112C 202E[BD83] <1> and byte [asm_mn_flags], ch 4494 00001130 080E[BD83] <1> or byte [asm_mn_flags], cl 4495 <1> 4496 00001134 8B1E[C883] <1> mov bx, word [xxaddr] 4497 00001138 8A0E[BD83] <1> mov cl, byte [asm_mn_flags] 4498 0000113C 80E104 <1> and cl, AMF_A32 4499 <1> %if _PM 4500 0000113F 0A0E[0B8B] <1> or cl, byte [bCSAttr] 4501 00001143 7410 <1> jz .noprefix ; 16-bit CS and addressing --> 4502 00001145 80F944 <1> cmp cl, AMF_A32| 40h 4503 00001148 740B <1> je .noprefix ; 32-bit CS and addressing --> 4504 <1> %else 4505 <1> jz .noprefix ; 86 Mode CS and 16-bit addressing --> 4506 <1> %endif 4507 0000114A FE4F05 <1> dec byte [bx + OPRND.num2] 4508 0000114D 7105 <1> jno .ret ; (no need to check special flag) 4509 <1> .prefix_overflow: 4510 0000114F F60780 <1> testopt [bx + OPRND.flags], ARG_ECX_SPECIAL 4511 00001152 7406 <1> jz .ao50 ; not special, overflow -128 to +127 4512 <1> ; special, accept +128 to +127 4513 <1> .ret: 4514 00001154 C3 <1> retn 4515 <1> 4516 <1> .noprefix: 4517 00001155 F60780 <1> testopt [bx + OPRND.flags], ARG_ECX_SPECIAL 4518 00001158 74FA <1> jz .ret ; not special, no prefix 4519 <1> ; special and no prefix: reject 4520 <1> .ao50: 4521 0000115A EB6C <1> jmp ao50 4522 <1> 4523 <1> 4524 <1> ; OP_SHOSIZ - force the user to declare the size of the next operand 4525 <1> ao44: 4526 0000115C F606[CE83]10 <1> test byte [varflags], VAR_SIZ_NEED 4527 00001161 7407 <1> jz ao45 ; if no testing needs to be done 4528 00001163 F606[CE83]04 <1> test byte [varflags], VAR_SIZ_GIVN 4529 00001168 745E <1> jz ao50 ; if size was given ( ==> reject) 4530 <1> ao45: 4531 0000116A 8026[CE83]FB <1> and byte [varflags], ~VAR_SIZ_GIVN ; clear the flag 4532 0000116F 803C11 <1> cmp byte [si], OP_IMM8 4533 00001172 7405 <1> je ao45a ; if OP_IMM8 is next, then don't set VAR_SIZ_NEED 4534 00001174 800E[CE83]10 <1> or byte [varflags], VAR_SIZ_NEED 4535 <1> ao45a: 4536 <1> 4537 <1> ; hack for pushd/pushw imm (the only OP_SHOSIZ with suffix), 4538 <1> ; set operand size to 2 for pushw, 4 for pushd. 4539 <1> ; this is checked by ao15 later so as to match. 4540 00001179 B002 <1> mov al, 2 4541 0000117B 8A26[BC83] <1> mov ah, byte [aa_mnemsuffix] 4542 <1> ; 0 = normal, 'W' suffix, or 'D' suffix 4543 0000117F 80FC44 <1> cmp ah, 'D' 4544 00001182 7407 <1> je @F ; if D, al = 2 --> 4545 00001184 48 <1> dec ax ; al = 1 4546 00001185 80FC57 <1> cmp ah, 'W' 4547 00001188 7401 <1> je @F ; if W, al = 1 --> 4548 0000118A 48 <1> dec ax ; al = 0 4549 <1> @@: 4550 0000118B 00C0 <1> add al, al ; 0 = no suffix, 2 = 'W' suffix, 4 = 'D' suffix 4551 <1> ; as 0 = SIZ_NONE, 2 = SIZ_WORD, 4 = SIZ_DWORD 4552 0000118D A2[CD83] <1> mov byte [opsize], al 4553 <1> ao_modifier_continue: 4554 00001190 58 <1> pop ax ; discard return address 4555 00001191 E9D9FE <1> jmp ac06_j2 ; next operand 4556 <1> 4557 <1> 4558 <1> ao_short: 4559 00001194 B001 <1> mov al, odfShort 4560 <1> ao_distance: 4561 00001196 0806[CF83] <1> or byte [alloweddist], al 4562 0000119A EBF4 <1> jmp ao_modifier_continue 4563 <1> 4564 <1> ao_near: 4565 0000119C B002 <1> mov al, odfNear 4566 0000119E EBF6 <1> jmp ao_distance 4567 <1> 4568 <1> ao_far_required: 4569 000011A0 F6450104 <1> test byte [di + OPRND.distflags], odfFar 4570 000011A4 7422 <1> jz ao50 ; if not far, reject --> 4571 <1> ao_far: 4572 000011A6 B004 <1> mov al, odfFar 4573 000011A8 EBEC <1> jmp ao_distance 4574 <1> 4575 <1> 4576 <1> ; OP_1 4577 <1> ao46: 4578 000011AA 817D070101 <1> cmp word [di+OPRND.orednum], 101h 4579 <1> ; check both size and value (OPRND.num) 4580 000011AF EB15 <1> jmp short ao49 ; test it later 4581 <1> 4582 <1> ; OP_3 4583 <1> ao47: 4584 000011B1 807D0200 <1> cmp byte [di + OPRND.sizearg], SIZ_NONE 4585 000011B5 7511 <1> jne ao50 ; if BYTE is specified, reject this --> 4586 000011B7 817D070103 <1> cmp word [di+OPRND.orednum], 301h 4587 <1> ; check both size and value (OPRND.num) 4588 000011BC EB08 <1> jmp short ao49 ; test it later 4589 <1> 4590 <1> ; OP_DX, OP_CL, OP_ST, OP_ES, ..., OP_GS 4591 <1> ; INP: (from ac08 calling this:) 4592 <1> ; bx = index into bittab 4593 <1> ao48: 4594 000011BE 8A87[8884] <1> mov al, [asm_regnum + bx - (OP_FIRST_ASM_REGNUM + 16 - 1)] 4595 <1> ao48a: 4596 000011C2 98 <1> cbw 4597 000011C3 3B4504 <1> cmp ax, word [di+OPRND.reg1] 4598 <1> 4599 <1> ao49: 4600 000011C6 7404 <1> je ao51 4601 <1> 4602 <1> ; Reject this operand list. 4603 <1> ao50: 4604 000011C8 58 <1> pop ax ; discard return address 4605 000011C9 E90DFA <1> jmp ac01 ; go back to try the next alternative 4606 <1> 4607 <1> ao51: 4608 000011CC C3 <1> retn 4609 <1> 4610 <1> ; AASIZCHK - Check that the size given is 0 or AL. 4611 <1> aasizchk: 4612 000011CD 807D0200 <1> cmp byte [di+OPRND.sizearg], SIZ_NONE 4613 000011D1 74F9 <1> je ao51 4614 000011D3 384502 <1> cmp byte [di+OPRND.sizearg], al 4615 000011D6 74F4 <1> je ao51 4616 000011D8 58 <1> pop ax ; discard return address 4617 000011D9 EBED <1> jmp short ao50 ; reject this list --> 4618 <1> 4619 <1> ; Do reg/mem processing. 4620 <1> ; 4621 <1> ; INP: di-> OPRND structure 4622 <1> ; CHG: ax 4623 <1> ao90: 4624 000011DB F60504 <1> test byte [di+OPRND.flags], ARG_JUSTREG 4625 000011DE 7516 <1> jnz ao92 ; if just register 4626 000011E0 F60502 <1> test byte [di+OPRND.flags], ARG_MODRM 4627 000011E3 7405 <1> jz ao91 ; if no precomputed MOD R/M byte 4628 000011E5 8B4504 <1> mov ax, word [di+OPRND.reg1] ; get the precomputed bytes 4629 000011E8 EB1A <1> jmp short ao93 ; done 4630 <1> 4631 <1> ao91: 4632 000011EA B006 <1> mov al, 6 ; convert plain displacement to MOD R/M 4633 000011EC F606[BD83]04 <1> test byte [asm_mn_flags], AMF_A32 4634 000011F1 7411 <1> jz ao93 ; if 16-bit addressing 4635 000011F3 48 <1> dec ax 4636 000011F4 EB0E <1> jmp short ao93 ; done 4637 <1> 4638 <1> ao92: 4639 000011F6 8A4504 <1> mov al, byte [di+OPRND.reg1] ; convert register to MOD R/M 4640 <1> %if 1 4641 000011F9 3C1F <1> cmp al, REG_MM 4642 000011FB 7503 <1> jne .notmm 4643 000011FD 8A4505 <1> mov al, byte [di+OPRND.reg2] 4644 <1> .notmm: 4645 <1> %endif 4646 00001200 2407 <1> and al, 7 ; get low 3 bits 4647 00001202 0CC0 <1> or al, 0C0h 4648 <1> 4649 <1> ao93: 4650 00001204 0906[C483] <1> or word [regmem], ax ; store the MOD R/M and SIB 4651 00001208 800E[CE83]02 <1> or byte [varflags], VAR_MODRM ; flag its presence 4652 0000120D 893E[C283] <1> mov word [rmaddr], di ; save a pointer 4653 00001211 C3 <1> retn ; done 4654 <1> 4655 <1> ; AAIFNUM - Determine if a number starts here 4656 <1> ; 4657 <1> ; INP: al = first character 4658 <1> ; si-> next character 4659 <1> ; OUT: CY if no number starts there 4660 <1> ; NC if a number starts there 4661 <1> ; CHG: - 4662 <1> ; 4663 <1> ; Note: Actually checks for a plus or minus sign that 4664 <1> ; is followed by a valid (hexadecimal) digit, 4665 <1> ; or just a digit without specified sign. 4666 <1> aaifnum: 4667 00001212 56 <1> push si 4668 00001213 50 <1> push ax 4669 00001214 3C2D <1> cmp al, '-' ; minus or plus sign ? 4670 00001216 7404 <1> je @F 4671 00001218 3C2B <1> cmp al, '+' 4672 0000121A 7503 <1> jne @FF ; no --> 4673 <1> @@: 4674 0000121C E8B2A9 <1> call skipwhite ; skip sign, and (if any) blanks 4675 <1> @@: 4676 0000121F 3C28 <1> cmp al, '(' 4677 00001221 F9 <1> stc 4678 00001222 7404 <1> je @F 4679 00001224 2C30 <1> sub al, '0' 4680 00001226 3C0A <1> cmp al, 10 4681 <1> @@: 4682 00001228 58 <1> pop ax 4683 00001229 7208 <1> jb @F ; if a decimal digit --> 4684 <1> 4685 0000122B 50 <1> push ax 4686 0000122C 24DF <1> and al, TOUPPER 4687 0000122E 2C41 <1> sub al, 'A' 4688 00001230 3C06 <1> cmp al, 6 4689 00001232 58 <1> pop ax 4690 <1> @@: 4691 00001233 F5 <1> cmc ; carry clear <==> it's a number 4692 00001234 5E <1> pop si 4693 00001235 C3 <1> retn 4694 <1> 4695 <1> 4696 <1> ; AAGETI - Get a number from the input line. 4697 <1> ; 4698 <1> ; Entry AL First character of number 4699 <1> ; SI Address of next character of number 4700 <1> ; Exit DX:BX Resulting number 4701 <1> ; CL 1 if it's a byte, 2 if a word, 4 if a dword 4702 <1> ; AL Next character not in number 4703 <1> ; SI Address of next character after that 4704 <1> ; Uses AH, CH 4705 <1> aageti: 4706 <1> ; Incorporate expression evaluator here. 4707 00001236 3C2D <1> cmp al, '-' 4708 00001238 7416 <1> je aag1 ; if negative number --> 4709 0000123A 3C2B <1> cmp al, '+' ; (unnecessary) plus sign ? 4710 0000123C 7503 <1> jne @F ; no --> 4711 0000123E E890A9 <1> call skipwhite ; skip it, plus blanks 4712 <1> @@: 4713 00001241 E84100 <1> call aag4 ; get the bare number 4714 00001244 B90100 <1> mov cx, 1 ; set up cx 4715 00001247 09D2 <1> or dx, dx 4716 00001249 7536 <1> jnz aag2 ; if dword 4717 0000124B 08FF <1> or bh, bh 4718 0000124D 7534 <1> jnz aag3 ; if word 4719 0000124F C3 <1> retn ; it's a byte 4720 <1> 4721 <1> aag1: 4722 00001250 E87EA9 <1> call skipwhite 4723 00001253 E82F00 <1> call aag4 ; get the bare number 4724 00001256 89D9 <1> mov cx, bx 4725 00001258 09D1 <1> or cx, dx 4726 0000125A B90100 <1> mov cx, 1 4727 0000125D 7421 <1> jz aag1a ; if -0 4728 0000125F F7D2 <1> not dx ; negate the answer 4729 00001261 F7DB <1> neg bx 4730 00001263 F5 <1> cmc 4731 00001264 83D200 <1> adc dx, byte 0 4732 00001267 F6C680 <1> test dh, 80h 4733 0000126A 7453 <1> jz aag7 ; if error 4734 0000126C 83FAFF <1> cmp dx, byte -1 4735 0000126F 7510 <1> jne aag2 ; if dword 4736 00001271 F6C780 <1> test bh, 80h 4737 00001274 740B <1> jz aag2 ; if dword 4738 00001276 80FFFF <1> cmp bh, -1 4739 00001279 7508 <1> jne aag3 ; if word 4740 0000127B F6C380 <1> test bl, 80h 4741 0000127E 7403 <1> jz aag3 ; if word 4742 <1> aag1a: 4743 <1> aag4.got_expr: 4744 00001280 C3 <1> retn ; it's a byte 4745 <1> 4746 <1> aag2: 4747 00001281 41 <1> inc cx ;return: it's a dword 4748 00001282 41 <1> inc cx 4749 <1> aag3: 4750 00001283 41 <1> inc cx ;return: it's a word 4751 00001284 C3 <1> retn 4752 <1> 4753 <1> aag4: 4754 00001285 3C28 <1> cmp al, '(' 4755 00001287 7511 <1> jne .not_expr 4756 00001289 AC <1> lodsb ; skip opening paren 4757 0000128A E8E8A2 <1> call getexpression ; returns bx:dx = numerical value 4758 0000128D 87DA <1> xchg bx, dx ; dx:bx = number 4759 0000128F E840A9 <1> call skipwh0 4760 00001292 3C29 <1> cmp al, ')' 4761 00001294 AC <1> lodsb 4762 00001295 74E9 <1> je .got_expr 4763 00001297 4E <1> dec si 4764 00001298 EB25 <1> jmp aag7 4765 <1> 4766 <1> .not_expr: 4767 0000129A 31DB <1> xor bx, bx ; get the basic integer 4768 0000129C 31D2 <1> xor dx, dx 4769 0000129E E8DFA7 <1> call getnyb 4770 000012A1 721C <1> jc aag7 ; if not a hex digit 4771 <1> aag5: 4772 000012A3 08C3 <1> or bl, al ; add it to the number 4773 <1> @@: 4774 000012A5 AC <1> lodsb 4775 000012A6 3C5F <1> cmp al, '_' 4776 000012A8 74FB <1> je @B 4777 000012AA E8D3A7 <1> call getnyb 4778 000012AD 72D1 <1> jc aag1a ; if done 4779 000012AF F6C6F0 <1> test dh, 0F0h 4780 000012B2 750B <1> jnz aag7 ; if overflow 4781 000012B4 B90400 <1> mov cx, 4 4782 <1> aag6: 4783 000012B7 D1E3 <1> shl bx, 1 ; shift it by 4 4784 000012B9 D1D2 <1> rcl dx, 1 4785 000012BB E2FA <1> loop aag6 4786 000012BD EBE4 <1> jmp short aag5 4787 <1> 4788 <1> aag7: 4789 000012BF E98894 <1> jmp error 4790 <1> 4791 <1> ; AACONVINDEX - Convert results from AAGETI and store index value 4792 <1> ; 4793 <1> ; Entry DX:BX,CL As in exit from AAGETI 4794 <1> ; DI Points to information record for this arg 4795 <1> ; Exit SS bits stored in [di+OPRND.index] 4796 <1> ; Uses DL 4797 <1> aaconvindex: 4798 000012C2 80F901 <1> cmp cl, 1 4799 000012C5 7517 <1> jne aacv1 ; if the number is too large 4800 000012C7 80FB01 <1> cmp bl, 1 4801 000012CA 7414 <1> je aacv2 ; if 1 4802 000012CC 42 <1> inc dx 4803 000012CD 80FB02 <1> cmp bl, 2 4804 000012D0 740E <1> je aacv2 ; if 2 4805 000012D2 42 <1> inc dx 4806 000012D3 80FB04 <1> cmp bl, 4 4807 000012D6 7408 <1> je aacv2 ; if 4 4808 000012D8 42 <1> inc dx 4809 000012D9 80FB08 <1> cmp bl, 8 4810 000012DC 7402 <1> je aacv2 ; if 8 4811 <1> aacv1: 4812 000012DE EBDF <1> jmp short aag7 ; error 4813 <1> 4814 <1> aacv2: 4815 000012E0 885506 <1> mov byte [di+OPRND.index], dl ; save the value 4816 000012E3 C3 <1> retn 4817 <1> 4818 <1> ; AAGETREG - Get register for the assembler. 4819 <1> ; 4820 <1> ; Entry DI Start of register table 4821 <1> ; CX Length of register table (or 0) 4822 <1> ; SI Address of first character in register name 4823 <1> ; Exit NC if a register was found, 4824 <1> ; SI Updated if a register was found 4825 <1> ; BX Register number, defined as in the table below 4826 <1> ; Uses AX, CX, DI 4827 <1> ; 4828 <1> ; Exit value of BX: 4829 <1> ; DI = rgnam816, CX = 27 DI = rgnam16, CX = 8 4830 <1> ; ---------------------- -------------------- 4831 <1> ; 0 .. 7: AL .. BH 0 .. 7: AX .. DI 4832 <1> ; 8 .. 15: AX .. DI 4833 <1> ; 16 .. 23: EAX..EDI 16 .. 23: EAX..EDI 4834 <1> ; 24 .. 29: ES .. GS 4835 <1> ; 30 .. 34: ST .. TR 4836 <1> ; (This has to match the REG_ equs defined in uu.asm 4837 <1> ; around rgnam816 and following.) 4838 <1> aagetreg: 4839 000012E4 8B04 <1> mov ax, word [si] 4840 000012E6 25DFDF <1> and ax, TOUPPER_W ; convert to upper case 4841 000012E9 3C45 <1> cmp al, 'E' ; check for EAX, etc. 4842 000012EB 7522 <1> jne aagr1 ; if not 'E' --> (NZ) 4843 000012ED 50 <1> push ax 4844 000012EE 88E0 <1> mov al, ah 4845 000012F0 8A6402 <1> mov ah, byte [si+2] 4846 000012F3 80E4DF <1> and ah, TOUPPER 4847 000012F6 57 <1> push di 4848 000012F7 BF[328A] <1> mov di, rgnam16 4849 000012FA 51 <1> push cx 4850 000012FB B90800 <1> mov cx, N_REGS16 4851 000012FE F2AF <1> repne scasw 4852 00001300 89CB <1> mov bx, cx 4853 00001302 59 <1> pop cx 4854 00001303 5F <1> pop di 4855 00001304 58 <1> pop ax 4856 00001305 7508 <1> jne aagr1 ; if no match --> (NZ) 4857 00001307 46 <1> inc si 4858 00001308 F7D3 <1> not bx 4859 0000130A 80C318 <1> add bl, 8+16 ; adjust BX 4860 0000130D EB11 <1> jmp short aagr2 ; finish up 4861 <1> 4862 <1> aagr1: ; (entered with NZ) 4863 0000130F 89CB <1> mov bx, cx ; (if cx = 0, this is always reached with 4864 00001311 F2AF <1> repne scasw ; ZF clear, that is, NZ) 4865 00001313 750F <1> jne aagr3 ; if no match 4866 00001315 29CB <1> sub bx, cx 4867 00001317 4B <1> dec bx 4868 00001318 80FB10 <1> cmp bl, 16 4869 0000131B 7203 <1> jb aagr2 ; if AL .. BH or AX .. DI 4870 0000131D 80C308 <1> add bl, 8 4871 <1> aagr2: 4872 00001320 46 <1> inc si ; skip the register name 4873 00001321 46 <1> inc si 4874 00001322 F8 <1> clc 4875 00001323 C3 <1> retn 4876 <1> aagr3: 4877 00001324 F9 <1> stc ; not found 4878 00001325 C3 <1> retn 2181 %include "dd.asm" 2182 <1> 2183 <1> %if 0 2184 <1> 2185 <1> lDebug D commands - Dump data 2186 <1> 2187 <1> Copyright (C) 1995-2003 Paul Vojta 2188 <1> Copyright (C) 2008-2012 C. Masloch 2189 <1> 2190 <1> Usage of the works is permitted provided that this 2191 <1> instrument is retained with the works, so that any entity 2192 <1> that uses the works is notified of this instrument. 2193 <1> 2194 <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 2195 <1> 2196 <1> %endif 2197 <1> 2198 <1> 2199 <1> usesection lDEBUG_DATA_ENTRY 2200 <1> align 4, db 0 2201 000084E0 0000 <1> ddoffset: dw 0 ; offset word for dd 2202 <1> ; (number of skipped bytes at start of line) 2203 <1> %if _PM 2204 000084E2 0000 <1> dw 0 ; high word initialised to and fixed at zero 2205 <1> %endif 2206 000084E4 0000 <1> ddskipped: dw 0 2207 <1> %if _PM 2208 000084E6 0000 <1> dw 0 ; high word initialised to and fixed at zero 2209 <1> %endif 2210 000084E8 0100 <1> ddsize: dw 1 ; size of dd item 2211 000084EA 00 <1> ddoffset2: db 0 2212 <1> 2213 <1> 2214 <1> usesection lDEBUG_CODE 2215 <1> 2216 <1> ; D command - hex/ASCII dump. 2217 <1> ddd: 2218 <1> %if _INT || _PM || _MCB || _DSTRINGS 2219 00001326 E8F27A <1> call uppercase 2220 <1> %endif 2221 00001329 86C4 <1> xchg al, ah 2222 0000132B 8A44FE <1> mov al, byte [si - 2] 2223 0000132E E8EA7A <1> call uppercase 2224 00001331 3C44 <1> cmp al, 'D' 2225 00001333 86C4 <1> xchg al, ah 2226 00001335 7569 <1> jne .not_d_suffix 2227 <1> %if _DSTRINGS 2228 00001337 3C5A <1> cmp al, 'Z' ; DZ command ? 2229 00001339 7503E9D803 <1> je dz ; yes --> 2230 0000133E 3C24 <1> cmp al, '$' ; D$ command ? 2231 00001340 7503E9AA03 <1> je dcpm ; yes --> 2232 00001345 3C23 <1> cmp al, '#' ; D# command ? 2233 00001347 7503E9BD03 <1> je dcounted ; yes --> 2234 0000134C 3C57 <1> cmp al, 'W' 2235 0000134E 750B <1> jne .notstring 2236 00001350 50 <1> push ax 2237 00001351 AC <1> lodsb 2238 00001352 3C23 <1> cmp al, '#' ; DW# command ? 2239 00001354 58 <1> pop ax 2240 00001355 7503E9A203 <1> je dwcounted ; yes --> 2241 0000135A 4E <1> dec si 2242 <1> .notstring: 2243 <1> %endif 2244 <1> %if _INT 2245 0000135B 3C49 <1> cmp al, 'I' ; DI command ? 2246 0000135D 750D <1> jne .notdi 2247 <1> %if 1 2248 0000135F 50 <1> push ax 2249 00001360 AC <1> lodsb 2250 00001361 4E <1> dec si 2251 00001362 24DF <1> and al, TOUPPER 2252 00001364 3C50 <1> cmp al, 'P' ; distinguish 'di ...' and 'd ip' 2253 00001366 58 <1> pop ax 2254 00001367 7403 <1> je .notdi 2255 <1> %endif 2256 00001369 E96004 <1> jmp gateout ; yes --> 2257 <1> .notdi: 2258 <1> %endif 2259 <1> %if _PM 2260 0000136C 3C4C <1> cmp al, 'L' ; DL command ? 2261 0000136E 7503 <1> jne .notdl 2262 00001370 E9D102 <1> jmp descout ; yes --> 2263 <1> .notdl: 2264 00001373 3C58 <1> cmp al, 'X' ; DX command ? 2265 00001375 0F846F0B <1> _386 je extmem ; yes --> 2266 <1> .notdx: 2267 <1> %endif 2268 <1> %if _MCB 2269 00001379 3C4D <1> cmp al, 'M' ; DM command ? 2270 0000137B 7503 <1> jne .notdm 2271 0000137D E93F0A <1> jmp mcbout ; yes --> 2272 <1> .notdm: 2273 <1> %endif 2274 00001380 B90100 <1> mov cx, 1 2275 00001383 3C42 <1> cmp al, 'B' 2276 00001385 740B <1> je .d_suffix_size 2277 00001387 41 <1> inc cx ; = 2 2278 00001388 3C57 <1> cmp al, 'W' 2279 0000138A 7406 <1> je .d_suffix_size 2280 0000138C 41 <1> inc cx 2281 0000138D 41 <1> inc cx ; = 4 2282 0000138E 3C44 <1> cmp al, 'D' 2283 00001390 750E <1> jne .not_d_suffix 2284 <1> .d_suffix_size: 2285 00001392 880E[E884] <1> mov byte [ddsize], cl 2286 00001396 E838A8 <1> call skipwhite 2287 00001399 E8E0A7 <1> call iseol? 2288 0000139C 7536 <1> jne dd1 ; jump to getting range --> (with new size) 2289 0000139E EB08 <1> jmp lastddd ; default range (ADS:ADO length 128), 2290 <1> ; but with new size --> 2291 <1> 2292 <1> .not_d_suffix: 2293 000013A0 E82FA8 <1> call skipwh0 2294 000013A3 E8D6A7 <1> call iseol? 2295 000013A6 7527 <1> jne dd1_bytes ; if an address was given --> (set byte size) 2296 <1> 2297 <1> lastddd: 2298 <1> ; byte [ddsize] = size already set 2299 000013A8 66 <1> _386_PM_o32 ; mov edx, dword [d_addr] 2300 000013A9 8B16[180B] <1> mov dx, word [d_addr] ; compute range of 80h or until end of segment 2301 000013AD 66 <1> _386_PM_o32 ; mov esi, edx 2302 000013AE 89D6 <1> mov si, dx 2303 000013B0 8B1E[1C0B] <1> mov bx, [d_addr + saSegSel] 2304 000013B4 E8884B <1> _386_PM call test_d_b_bit 2305 000013B7 750A <1> _386_PM jnz .32 2306 000013B9 83C27F <1> add dx, byte 7Fh 2307 000013BC 733C <1> jnc dd2_0 2308 000013BE 83CAFF <1> or dx, byte -1 2309 000013C1 EB37 <1> jmp short dd2_0 2310 <1> 2311 <1> %if _PM 2312 <1> [cpu 386] 2313 <1> .32: 2314 000013C3 6683C27F <1> add edx, byte 7Fh 2315 000013C7 7331 <1> jnc dd2_0 ; if no overflow 2316 000013C9 6683CAFF <1> or edx, byte -1 2317 000013CD EB2B <1> jmp short dd2_0 2318 <1> __CPU__ 2319 <1> %endif 2320 <1> 2321 <1> dd1_bytes: 2322 000013CF C606[E884]01 <1> mov byte [ddsize], 1 2323 <1> dd1: 2324 000013D4 B98000 <1> mov cx, 80h ; default length (128 bytes) 2325 000013D7 8B1E[900C] <1> mov bx, word [reg_ds] 2326 000013DB E8BB96 <1> call getrangeX ; get address range into bx:(e)dx 2327 000013DE E8B0A7 <1> call chkeol ; expect end of line here 2328 <1> 2329 000013E1 891E[1C0B] <1> mov word [d_addr + saSegSel], bx 2330 <1> ; save segment (offset is saved later) 2331 <1> %if _PM 2332 000013E5 E8ED7F <1> call ispm 2333 000013E8 7506 <1> jnz .86m 2334 <1> .pm: 2335 000013EA 891E[200B] <1> mov word [d_addr + saSelector], bx 2336 000013EE EB04 <1> jmp @F 2337 <1> .86m: 2338 000013F0 891E[1E0B] <1> mov word [d_addr + saSegment], bx 2339 <1> @@: 2340 <1> %endif 2341 000013F4 66 <1> _386_PM_o32 ; mov esi, edx 2342 000013F5 89D6 <1> mov si, dx ; bx:(e)si = start 2343 000013F7 66 <1> _386_PM_o32 ; mov edx, ecx 2344 000013F8 89CA <1> mov dx, cx ; bx:(e)dx = last 2345 <1> %if _PM && 0 2346 <1> jmp short dd2_1 2347 <1> %endif 2348 <1> 2349 <1> ; Parsing is done. Print first line. 2350 <1> dd2_0: 2351 <1> %if _PM 2352 000013FA E8D87F <1> call ispm 2353 000013FD 750B <1> jnz dd2_1 2354 <1> [cpu 286] 2355 000013FF 0F00E3 <1> verr bx ; readable ? 2356 <1> __CPU__ 2357 00001402 7406 <1> jz dd2_1 2358 <1> %if 1 2359 00001404 BA[EB84] <1> mov dx, .errmsg 2360 00001407 E923AC <1> jmp putsz_error 2361 <1> usesection lDEBUG_DATA_ENTRY 2362 000084EB 5365676D656E742069- <1> .errmsg:asciz "Segment is not readable.",13,10 2362 000084F4 73206E6F7420726561- <1> 2362 000084FD 6461626C652E0D0A00 <1> 2363 <1> usesection lDEBUG_CODE 2364 <1> %else 2365 <1> mov bx, word [reg_ds] 2366 <1> mov word [d_addr + saSegSel], bx 2367 <1> %if _PM 2368 <1> call ispm 2369 <1> jnz .86m 2370 <1> .pm: 2371 <1> mov word [d_addr + saSelector], bx 2372 <1> jmp @F 2373 <1> .86m: 2374 <1> mov word [d_addr + saSegment], bx 2375 <1> @@: 2376 <1> %endif 2377 <1> %endif 2378 <1> dd2_1: 2379 <1> %endif 2380 <1> 2381 0000140A A1[E884] <1> mov ax, word [ddsize] 2382 0000140D 48 <1> dec ax ; 0 = byte, 1 = word, 3 = dword 2383 0000140E 21F0 <1> and ax, si ; how many bytes to skip at the beginning 2384 00001410 A2[EA84] <1> mov byte [ddoffset2], al 2385 <1> 2386 00001413 B80100 <1> mov ax, opt2_db_header 2387 00001416 803E[E884]02 <1> cmp byte [ddsize], 2 2388 0000141B 7207 <1> jb @F 2389 0000141D B010 <1> mov al, opt2_dw_header 2390 0000141F 7403 <1> je @F 2391 00001421 B80001 <1> mov ax, opt2_dd_header 2392 <1> @@: 2393 00001424 E81400 <1> call dd_header_or_trailer 2394 <1> 2395 00001427 E88700 <1> call dd_display 2396 <1> 2397 0000142A B80200 <1> mov ax, opt2_db_trailer 2398 0000142D 803E[E884]02 <1> cmp byte [ddsize], 2 2399 00001432 7207 <1> jb @F 2400 00001434 B020 <1> mov al, opt2_dw_trailer 2401 00001436 7403 <1> je @F 2402 00001438 B80002 <1> mov ax, opt2_dd_trailer 2403 <1> @@: 2404 <1> ; fall through 2405 <1> 2406 <1> 2407 <1> ; INP: ax = flag value to check 2408 <1> ; (determines whether "header" or "trailer" is written, 2409 <1> ; and which flag must be set in word [options2]) 2410 <1> ; byte [ddoffset2] = how many bytes to skip at the start 2411 <1> ; CHG: ax, cx, di 2412 <1> ; STT: ds = es = ss 2413 <1> dd_header_or_trailer: 2414 0000143B 8506[8000] <1> test word [options2], ax 2415 0000143F 746F <1> jz .ret 2416 00001441 53 <1> push bx 2417 00001442 56 <1> push si 2418 00001443 52 <1> push dx 2419 <1> 2420 00001444 B90600 <1> mov cx, msg.header.length 2421 00001447 BA[EC69] <1> mov dx, msg.header 2422 0000144A A91101 <1> test ax, opt2_db_header | opt2_dw_header | opt2_dd_header 2423 0000144D 7506 <1> jnz @F 2424 0000144F B90700 <1> mov cx, msg.trailer.length 2425 00001452 BA[F369] <1> mov dx, msg.trailer 2426 <1> @@: 2427 00001455 E8DBAB <1> call putsz ; put initial word 2428 00001458 F7D9 <1> neg cx ; minus length of initial word 2429 0000145A B80B00 <1> mov ax, 4 + 1 + 4 + 2 ; length of address with 16-bit offset 2430 <1> %if _PM 2431 0000145D 8B1E[1C0B] <1> mov bx, word [d_addr + saSegSel] 2432 00001461 E8DB4A <1> call test_d_b_bit ; 32-bit segment ? 2433 00001464 7403 <1> jz .16 ; no --> 2434 00001466 B80F00 <1> mov ax, 4 + 1 + 8 + 2 ; length of address with 32-bit offset 2435 <1> .16: 2436 <1> %endif 2437 00001469 01C1 <1> add cx, ax ; length of address minus length of word 2438 <1> ; = length to pad 2439 0000146B B020 <1> mov al, 32 2440 0000146D BF[0E08] <1> mov di, line_out 2441 00001470 F3AA <1> rep stosb ; pad 2442 <1> ; ch = 0 2443 <1> 2444 00001472 B83020 <1> mov ax, '0 ' ; al = '0', ah = blank 2445 00001475 8A0E[EA84] <1> mov cl, byte [ddoffset2]; cx = ddoffset2 2446 00001479 E304 <1> jcxz @FF ; if none to skip --> 2447 <1> @@: 2448 0000147B AB <1> stosw 2449 0000147C 40 <1> inc ax ; increment the number (up to '3') 2450 0000147D E2FC <1> loop @B ; loop for skipping --> 2451 <1> @@: 2452 0000147F 2C30 <1> sub al, '0' ; = back to numerical (0 .. 3) 2453 00001481 89C2 <1> mov dx, ax ; dl = numerical offset 2454 <1> 2455 00001483 52 <1> push dx 2456 00001484 BE1000 <1> mov si, 16 ; loop counter 2457 00001487 8B1E[E884] <1> mov bx, [ddsize] ; ddsize 2458 <1> @@: 2459 0000148B 88D0 <1> mov al, dl ; next numerical offset 2460 0000148D E8FEA7 <1> call hexnyb ; display it 2461 00001490 89D9 <1> mov cx, bx 2462 00001492 01C9 <1> add cx, cx ; cx = 2 * ddsize 2463 00001494 B020 <1> mov al, 32 2464 00001496 F3AA <1> rep stosb ; pad to next position 2465 00001498 01DA <1> add dx, bx ; increment dl by how many positions we use 2466 0000149A 29DE <1> sub si, bx ; decrement loop counter 2467 0000149C 77ED <1> ja @B ; don't jump if si was below-or-equal-to bx 2468 0000149E 5A <1> pop dx 2469 <1> 2470 0000149F B91000 <1> mov cx, 16 ; loop counter 2471 <1> @@: 2472 000014A2 88D0 <1> mov al, dl 2473 000014A4 E8E7A7 <1> call hexnyb ; display an offset 2474 <1> ; Note that this will wrap around for the last 1, 2, or 3 2475 <1> ; characters if byte [ddoffset2] is non-zero. 2476 000014A7 42 <1> inc dx ; increment offset 2477 000014A8 E2F8 <1> loop @B ; loop 2478 <1> 2479 000014AA E807A8 <1> call putsline_crlf 2480 <1> 2481 000014AD 5A <1> pop dx 2482 000014AE 5E <1> pop si 2483 000014AF 5B <1> pop bx 2484 <1> .ret: 2485 000014B0 C3 <1> retn 2486 <1> 2487 <1> 2488 <1> ; INP: word [d_addr + saSegSel] = segment/selector to dump 2489 <1> ; (e)si = start offset 2490 <1> ; (e)dx = end offset 2491 <1> ; byte [ddsize] = 1, 2, or 4 (for byte, word, or dword) 2492 <1> ; OUT: (d)word [d_addr] updated 2493 <1> ; (e)dx = (d)word [d_addr] 2494 <1> ; displayed 2495 <1> dd_display: 2496 000014B1 16 <1> push ss 2497 000014B2 07 <1> pop es 2498 <1> dd2_loop: 2499 000014B3 E8BC2C <1> call handle_serial_flags_ctrl_c 2500 <1> 2501 000014B6 C706[E60B][A813] <1> mov word [lastcmd], lastddd 2502 <1> 2503 000014BC BF[0E08] <1> mov di, line_out ; reset di for next line 2504 000014BF E85501 <1> call dd_display_offset.masklownybble 2505 <1> ; ax = offset & ~ 0Fh 2506 <1> 2507 000014C2 8B0E[E884] <1> mov cx, word [ddsize] 2508 000014C6 51 <1> push cx 2509 000014C7 49 <1> dec cx ; 0 = byte, 1 = word, 3 = dword 2510 000014C8 21F1 <1> and cx, si ; how many bytes to skip at the beginning 2511 <1> ; eg: si = 101h, cx = 1, skip 1 byte, ax = 101h 2512 <1> ; si = 102h, cx = 3, skip 2 bytes, ax = 102h 2513 <1> ; si = 103h, cx = 3, skip 3 bytes, ax = 103h 2514 <1> ; si = 103h, cx = 1, skip 1 byte, ax = 101h 2515 <1> ; si = 10Fh, cx = 1, skip 1 byte, ax = 101h 2516 <1> ; si = 10Fh, cx = 3, skip 3 bytes, ax = 103h 2517 000014CA 01C8 <1> add ax, cx ; = where to start 2518 000014CC 890E[E084] <1> mov word [ddoffset], cx 2519 000014D0 50 <1> push ax 2520 000014D1 B82020 <1> mov ax, 32 << 8 | 32 2521 000014D4 F3AB <1> rep stosw 2522 000014D6 58 <1> pop ax 2523 000014D7 59 <1> pop cx 2524 <1> 2525 000014D8 BB3000 <1> mov bx, (2+1)*16 ; 16 bytes (2 digits each) 2526 000014DB 80F902 <1> cmp cl, 2 2527 000014DE 7206 <1> jb @F ; if it is 1 --> 2528 000014E0 B328 <1> mov bl, (4+1)*8 ; 8 words (4 digits each) 2529 000014E2 7402 <1> je @F ; if it is 2 --> 2530 <1> ; it is 4 2531 000014E4 B324 <1> mov bl, (8+1)*4 ; 4 dwords (8 digits each) 2532 <1> @@: 2533 000014E6 01FB <1> add bx, di 2534 000014E8 E8A193 <1> call prephack ; set up for faking int vectors 23 and 24 2535 <1> 2536 000014EB 50 <1> push ax 2537 <1> ; blank the start of the line if offset isn't paragraph aligned 2538 <1> dd3: 2539 000014EC 39F0 <1> cmp ax, si ; skip to position in line 2540 000014EE 7429 <1> je dd4 ; if we're there yet 2541 000014F0 7718 <1> ja .error 2542 000014F2 50 <1> push ax 2543 000014F3 B82020 <1> mov ax, 32 << 8| 32 2544 000014F6 51 <1> push cx 2545 000014F7 F3AB <1> rep stosw ; store two blanks (2 * 1) if byte, 2546 <1> ; four blanks (2 * 2) if word, 2547 <1> ; eight blanks (2 * 4) if dword 2548 000014F9 59 <1> pop cx 2549 000014FA AA <1> stosb ; store additional blank as separator 2550 000014FB 51 <1> push cx 2551 <1> @@: 2552 000014FC 268807 <1> mov byte [es:bx], al 2553 000014FF 43 <1> inc bx 2554 00001500 E2FA <1> loop @B ; store as many blanks in text dump as bytes 2555 00001502 59 <1> pop cx 2556 00001503 58 <1> pop ax 2557 00001504 0306[E884] <1> add ax, word [ddsize] ; -> behind the byte/word/dword just written 2558 00001508 EBE2 <1> jmp short dd3 2559 <1> 2560 <1> 2561 <1> .error: 2562 0000150A BA[0685] <1> mov dx, .msg_internal_error 2563 0000150D E81DAB <1> call putsz_error 2564 00001510 B80106 <1> mov ax, 0601h 2565 00001513 E87B92 <1> call setrc 2566 00001516 E9E7EA <1> jmp cmd3 2567 <1> 2568 <1> usesection lDEBUG_DATA_ENTRY 2569 <1> .msg_internal_error: 2570 00008506 496E7465726E616C20- <1> asciz "Internal error in dd3.",13,10 2570 0000850F 6572726F7220696E20- <1> 2570 00008518 6464332E0D0A00 <1> 2571 <1> usesection lDEBUG_CODE 2572 <1> 2573 <1> 2574 <1> ; Begin main loop over lines of output. 2575 <1> dd4: 2576 00001519 58 <1> pop ax 2577 0000151A 66 <1> _386_PM_o32 ; mov ecx, eax 2578 0000151B 89C1 <1> mov cx, ax 2579 0000151D 66 <1> _386_PM_o32 2580 0000151E 83C10F <1> add cx, strict byte 0Fh 2581 00001521 7205 <1> jc @F 2582 00001523 66 <1> _386_PM_o32 ; cmp ecx, edx 2583 00001524 39D1 <1> cmp cx, dx ; compare with end address 2584 00001526 7202 <1> jb dd5 ; if we write to the end of the line --> 2585 <1> @@: 2586 <1> ;_386_PM_o32 ; mov ecx, edx 2587 00001528 89D1 <1> mov cx, dx ; only write until (e)dx, inclusive 2588 <1> dd5: 2589 <1> ;_386_PM_o32 ; sub ecx, esi 2590 0000152A 29F1 <1> sub cx, si 2591 <1> ;_386_PM_o32 ; inc ecx 2592 0000152C 41 <1> inc cx ; cx = number of bytes to print this line 2593 <1> ; up to 16. no 32-bit register required 2594 0000152D 8326[E484]00 <1> and word [ddskipped], 0 2595 <1> 2596 00001532 E88593 <1> call dohack ; substitute interrupt vectors 2597 00001535 8E1E[1C0B] <1> mov ds, word [d_addr + saSegSel] 2598 <1> 2599 <1> dd6: 2600 00001539 36A1[E884] <1> mov ax, word [ss:ddsize] 2601 0000153D 39C8 <1> cmp ax, cx ; ddsize <= left bytes ? 2602 0000153F 7617 <1> jbe dd6_simple ; yes, display ddsize bytes --> 2603 <1> 2604 00001541 50 <1> push ax 2605 00001542 51 <1> push cx 2606 00001543 57 <1> push di 2607 00001544 F7D9 <1> neg cx ; - left bytes 2608 00001546 01C1 <1> add cx, ax ; ddsize - left bytes = how many skipped 2609 00001548 36890E[E484] <1> mov word [ss:ddskipped], cx 2610 <1> 2611 0000154D 89C1 <1> mov cx, ax ; 1 = bytes, 2 = words, 4 = dwords 2612 0000154F 49 <1> dec cx ; 0 = bytes, 1 = words, 3 = dwords 2613 00001550 B85858 <1> mov ax, 'XX' 2614 00001553 F3AB <1> rep stosw ; fill filler digits not to be written 2615 00001555 5F <1> pop di 2616 00001556 59 <1> pop cx 2617 00001557 58 <1> pop ax 2618 <1> 2619 <1> dd6_simple: 2620 00001558 01C0 <1> add ax, ax ; 2 = bytes, 4 = words, 8 = dwords 2621 0000155A 50 <1> push ax 2622 <1> @@: 2623 0000155B 48 <1> dec ax 2624 0000155C 48 <1> dec ax 2625 <1> ; first iteration: 0 = bytes, 2 = words, 6 = dwords 2626 <1> ; second iteration: 0 = words, 4 = dwords 2627 <1> ; third iteration: (0 = 3byte,) 2 = dwords 2628 <1> ; fourth iteration: 0 = dwords 2629 0000155D 57 <1> push di 2630 0000155E 01C7 <1> add di, ax ; -> where to write next 2 hex digits 2631 00001560 50 <1> push ax 2632 00001561 67 <1> _386_PM_a32 2633 00001562 AC <1> lodsb ; al = data 2634 00001563 E8BE00 <1> call dd_store ; stores number at es:di->, char at es:bx-> 2635 00001566 58 <1> pop ax 2636 00001567 5F <1> pop di ; -> start of hex digits space 2637 00001568 85C0 <1> test ax, ax ; did we write the left-most digits? 2638 0000156A E0EF <1> loopnz @B ; not yet --> (or no more bytes to display) 2639 0000156C 58 <1> pop ax ; = how many digits we wrote 2640 0000156D 01C7 <1> add di, ax ; -> after right-most digit 2641 0000156F B020 <1> mov al, 32 2642 00001571 AA <1> stosb ; store a blank 2643 00001572 85C9 <1> test cx, cx 2644 00001574 75C3 <1> jnz dd6 ; (16-bit. cx <= 16) 2645 <1> 2646 00001576 16 <1> push ss ; restore ds 2647 00001577 1F <1> pop ds 2648 00001578 66 <1> _386_PM_o32 2649 00001579 2B36[E084] <1> sub si, word [ddoffset] 2650 0000157D 66 <1> _386_PM_o32 2651 0000157E 0336[E484] <1> add si, word [ddskipped] 2652 <1> 2653 <1> dd9: 2654 00001582 F7C60F00 <1> test si, 0Fh ; space out till end of line 2655 00001586 7417 <1> jz dd10 2656 00001588 B82020 <1> mov ax, 32 << 8 | 32 2657 0000158B 8B0E[E884] <1> mov cx, word [ddsize] 2658 0000158F 51 <1> push cx 2659 00001590 F3AB <1> rep stosw ; store blanks for the number 2660 00001592 AA <1> stosb ; store additional blank as separator 2661 00001593 59 <1> pop cx 2662 <1> @@: 2663 00001594 46 <1> inc si ; skip as many bytes 2664 00001595 F7C60F00 <1> test si, 0Fh 2665 00001599 7404 <1> jz dd10 2666 0000159B E2F7 <1> loop @B 2667 0000159D EBE3 <1> jmp short dd9 2668 <1> 2669 <1> dd10: 2670 0000159F 66 <1> _386_PM_o32 2671 000015A0 0336[E084] <1> add si, word [ddoffset] 2672 000015A4 66 <1> _386_PM_o32 2673 000015A5 2B36[E484] <1> sub si, word [ddskipped] 2674 <1> 2675 000015A9 B91900 <1> mov cx, (1 + 8 * (2 + 1)) ; go back 8 bytes (2 digits each) 2676 000015AC 803E[E884]02 <1> cmp byte [ddsize], 2 2677 000015B1 7206 <1> jb @F ; if it is 1 --> 2678 000015B3 B115 <1> mov cl, (1 + 4 * (4 + 1)) ; go back 4 words (4 digits each) 2679 000015B5 7402 <1> je @F ; if it is 2 --> 2680 <1> ; it is 4 2681 000015B7 B113 <1> mov cl, (1 + 2 * (8 + 1)) ; go back 2 dwords (8 digits each) 2682 <1> @@: 2683 000015B9 29CF <1> sub di, cx 2684 000015BB C6052D <1> mov byte [di], '-' 2685 000015BE E82D93 <1> call unhack 2686 000015C1 89DF <1> mov di, bx 2687 000015C3 52 <1> push dx 2688 000015C4 E8EDA6 <1> call putsline_crlf 2689 000015C7 5A <1> pop dx 2690 000015C8 66 <1> _386_PM_o32 ; dec esi 2691 000015C9 4E <1> dec si 2692 000015CA 66 <1> _386_PM_o32 ; cmp esi, edx 2693 000015CB 39D6 <1> cmp si, dx 2694 000015CD 66 <1> _386_PM_o32 ; inc esi 2695 000015CE 46 <1> inc si 2696 000015CF 7303E9DFFE <1> jb dd2_loop ; display next line --> 2697 <1> dd11: 2698 <1> ; This check is necessary to wrap around at FFFFh (64 KiB) 2699 <1> ; for 16-bit segments instead of at FFFFFFFFh (4 GiB). 2700 000015D4 8B1E[1C0B] <1> _386_PM mov bx, word [d_addr + saSegSel] 2701 <1> ; reset bx 2702 000015D8 E86449 <1> _386_PM call test_d_b_bit ; 32-bit segment ? 2703 000015DB 7401 <1> _386_PM jz .16 ; no --> 2704 000015DD 66 <1> _386_PM_o32 ; inc edx 2705 <1> .16: 2706 000015DE 42 <1> inc dx ; set up the address for the next 'D' command. 2707 000015DF 66 <1> _386_PM_o32 ; mov dword [d_addr], edx 2708 000015E0 8916[180B] <1> mov word [d_addr], dx 2709 000015E4 C3 <1> retn 2710 <1> 2711 <1> 2712 <1> ; INP: (e)si = offset (to display) 2713 <1> ; (e)dx = end offset (for range check of 16-bit segment) 2714 <1> ; word [d_addr + saSegSel] = segment/selector 2715 <1> ; es:di -> where to write to 2716 <1> ; OUT: bx = segment/selector 2717 <1> dd_display_offset: 2718 <1> .: 2719 000015E5 A1[1C0B] <1> mov ax, word [d_addr + saSegSel] 2720 000015E8 89C3 <1> mov bx, ax 2721 000015EA E88FA6 <1> call hexword 2722 000015ED B03A <1> mov al, ':' 2723 000015EF AA <1> stosb 2724 000015F0 66 <1> _386_PM_o32 ; mov eax, esi 2725 000015F1 89F0 <1> mov ax, si 2726 <1> %if _PM 2727 000015F3 E84949 <1> call test_d_b_bit ; 32-bit segment ? 2728 000015F6 7405 <1> jz .16 ; no --> (don't display zero high word) 2729 000015F8 E875A6 <1> call hexword_high ; yes, display high word of address 2730 000015FB EB12 <1> jmp short .common 2731 <1> 2732 <1> ; Insure that the high word is zero. 2733 <1> .16: 2734 <1> ;_386 test esi, ~0FFFFh 2735 <1> ;_386 jnz .error 2736 000015FD 66F7C20000FFFF <1> _386 test edx, ~0FFFFh 2737 00001604 7409 <1> _386 jz .common 2738 <1> ;.error: 2739 00001606 BA[6474] <1> _386 mov dx, msg.ofs32 2740 00001609 E821AA <1> _386 call putsz_error 2741 0000160C E9F1E9 <1> _386 jmp cmd3 2742 <1> .common: 2743 <1> %endif 2744 0000160F E86AA6 <1> call hexword 2745 00001612 B82020 <1> mov ax, 32<<8|32 2746 00001615 AB <1> stosw 2747 00001616 C3 <1> retn 2748 <1> 2749 <1> ; INP: (e)si = offset (to display) 2750 <1> ; (e)dx = end offset (for range check of 16-bit segment) 2751 <1> ; word [d_addr + saSegSel] = segment/selector 2752 <1> ; es:di -> where to write to 2753 <1> ; OUT: bx = segment/selector 2754 <1> ; (e)ax = offset & ~0Fh 2755 <1> .masklownybble: 2756 00001617 56 <1> push si 2757 00001618 83E6F0 <1> and si, ~0Fh 2758 0000161B 66 <1> _386_PM_o32 2759 0000161C 56 <1> push si 2760 0000161D E8C5FF <1> call . 2761 00001620 66 <1> _386_PM_o32 2762 00001621 58 <1> pop ax 2763 00001622 5E <1> pop si 2764 00001623 C3 <1> retn 2765 <1> 2766 <1> 2767 <1> ; Store a character into the buffer. Characters that can't 2768 <1> ; be displayed are replaced by a dot. 2769 <1> ; 2770 <1> ; INP: al = character 2771 <1> ; es:bx-> buffer for displayed characters 2772 <1> ; es:di-> buffer for hexadecimal number 2773 <1> ; OUT: es:bx-> behind displayed character 2774 <1> ; es:di-> behind hexadecimal number and space 2775 <1> ; CHG: ax 2776 <1> ; STT: ds unknown 2777 <1> dd_store: 2778 00001624 88C4 <1> mov ah, al 2779 00001626 3C20 <1> cmp al, 32 ; below blank ? 2780 00001628 720E <1> jb .ctrl ; control char --> 2781 0000162A 3C7F <1> cmp al, 127 ; DEL ? 2782 0000162C 740A <1> je .ctrl ; yes, control char --> 2783 0000162E 720A <1> jb .noctrl ; below, not a control char --> 2784 00001630 36F606[7C00]04 <1> testopt [ss:options], cpdepchars ; allow CP-dependant characters ? 2785 00001636 7502 <1> jnz .noctrl ; yes --> 2786 <1> .ctrl: 2787 00001638 B42E <1> mov ah, '.' 2788 <1> .noctrl: 2789 0000163A 268827 <1> mov byte [es:bx], ah 2790 0000163D 43 <1> inc bx 2791 0000163E 51 <1> push cx 2792 0000163F E841A6 <1> call hexbyte 2793 00001642 59 <1> pop cx 2794 00001643 C3 <1> retn 2795 <1> 2796 <1> 2797 <1> %if _PM 2798 <1> ; DL command 2799 <1> descout: 2800 00001644 E88AA5 <1> call skipwhite 2801 00001647 E811A4 <1> call getword ; get word into DX 2802 0000164A 89D3 <1> mov bx, dx 2803 0000164C E854A5 <1> call skipcomm0 2804 0000164F BA0100 <1> mov dx, 1 2805 00001652 E827A5 <1> call iseol? 2806 00001655 7410 <1> je .onlyone 2807 00001657 E8C177 <1> call uppercase 2808 0000165A 3C4C <1> cmp al, 'L' 2809 0000165C 7503 <1> jne .notlength 2810 0000165E E841A5 <1> call skipcomma 2811 <1> .notlength: 2812 00001661 E8F7A3 <1> call getword 2813 00001664 E82AA5 <1> call chkeol 2814 <1> .onlyone: 2815 00001667 42 <1> inc dx ; (note js at nextdesc changed to jz) 2816 00001668 89D6 <1> mov si, dx ; save count 2817 0000166A E8687D <1> call ispm 2818 0000166D 7407 <1> je nextdesc 2819 0000166F BA[B17E] <1> mov dx, nodesc 2820 00001672 E9BEA9 <1> jmp putsz 2821 <1> desc_done: 2822 00001675 C3 <1> retn 2823 <1> subcpu 286 2824 <1> nextdesc: 2825 00001676 4E <1> dec si 2826 00001677 74FC <1> jz desc_done 2827 00001679 BF[F57E] <1> mov di, descr 2828 0000167C 89D8 <1> mov ax, bx 2829 0000167E E8FBA5 <1> call hexword 2830 00001681 BF[FF7E] <1> mov di, descbase 2831 00001684 57 <1> push di 2832 00001685 B83F3F <1> mov ax, "??" 2833 00001688 AB <1> stosw 2834 00001689 AB <1> stosw 2835 0000168A AB <1> stosw 2836 0000168B AB <1> stosw 2837 0000168C 83C707 <1> add di, byte (desclim-(descbase+8)) 2838 0000168F AB <1> stosw 2839 00001690 AB <1> stosw 2840 00001691 AB <1> stosw 2841 00001692 AB <1> stosw 2842 00001693 83C706 <1> add di, byte (descattr-(desclim+8)) 2843 00001696 AB <1> stosw 2844 00001697 AB <1> stosw 2845 00001698 5F <1> pop di 2846 <1> ; lar ax, bx 2847 <1> ; jnz skipdesc ; tell that this descriptor is invalid 2848 00001699 B80600 <1> mov ax, 6 2849 0000169C CD31 <1> int 31h 2850 0000169E 720A <1> jc desc_o1 2851 000016A0 89C8 <1> mov ax, cx 2852 000016A2 E8D7A5 <1> call hexword 2853 000016A5 89D0 <1> mov ax, dx 2854 000016A7 E8D2A5 <1> call hexword 2855 <1> desc_o1: 2856 000016AA BF[0E7F] <1> mov di, desclim 2857 000016AD EB2B <1> _no386_jmps use16desc 2858 <1> subcpu 386 2859 000016AF 660F03C3 <1> lsl eax, ebx 2860 000016B3 751A <1> jnz desc_out 2861 000016B5 50 <1> push ax 2862 000016B6 66C1E810 <1> shr eax, 16 2863 000016BA E8BFA5 <1> call hexword 2864 000016BD 58 <1> pop ax 2865 000016BE E8BBA5 <1> call hexword 2866 000016C1 660F02C3 <1> lar eax, ebx 2867 000016C5 66C1E808 <1> shr eax, 8 2868 <1> desc_o2: 2869 000016C9 BF[1C7F] <1> mov di, descattr 2870 000016CC E8ADA5 <1> call hexword 2871 <1> desc_out: 2872 000016CF BA[F57E] <1> mov dx, descr 2873 000016D2 E85EA9 <1> call putsz 2874 000016D5 83C308 <1> add bx, byte 8 2875 000016D8 EB9C <1> jmp short nextdesc 2876 <1> subcpureset ; subcpu 386 2877 <1> use16desc: 2878 000016DA 0F03C3 <1> lsl ax, bx 2879 000016DD 75F0 <1> jnz desc_out 2880 000016DF E89AA5 <1> call hexword 2881 000016E2 B82020 <1> mov ax, 32<<8|32 2882 000016E5 AB <1> stosw 2883 000016E6 AB <1> stosw 2884 000016E7 0F02C3 <1> lar ax, bx 2885 000016EA C1E808 <1> shr ax, 8 2886 000016ED EBDA <1> jmp short desc_o2 2887 <1> subcpureset ; subcpu 286 2888 <1> %endif 2889 <1> 2890 <1> %if _DSTRINGS 2891 <1> ; D$ command 2892 <1> dcpm: 2893 000016EF C606[6C0B]24 <1> mov byte [dstringtype], 36 2894 000016F4 C706[6E0B][4A0B] <1> mov word [dstringaddr], dcpm_addr 2895 000016FA EB25 <1> jmp short dstring 2896 <1> 2897 <1> ; DW# command 2898 <1> dwcounted: 2899 000016FC C606[6C0B]FE <1> mov byte [dstringtype], 0FEh 2900 00001701 C706[6E0B][5E0B] <1> mov word [dstringaddr], dwcount_addr 2901 00001707 EB18 <1> jmp short dstring 2902 <1> 2903 <1> ; D# command 2904 <1> dcounted: 2905 00001709 C606[6C0B]FF <1> mov byte [dstringtype], 0FFh 2906 0000170E C706[6E0B][540B] <1> mov word [dstringaddr], dcount_addr 2907 00001714 EB0B <1> jmp short dstring 2908 <1> 2909 <1> ; DZ command 2910 <1> dz: 2911 00001716 C606[6C0B]00 <1> mov byte [dstringtype], 0 2912 0000171B C706[6E0B][400B] <1> mov word [dstringaddr], dz_addr 2913 <1> 2914 <1> ; common code for all string commands 2915 <1> dstring: 2916 00001721 E8ADA4 <1> call skipwhite 2917 00001724 E855A4 <1> call iseol? 2918 00001727 7509 <1> jne .getaddr ; if an address was given 2919 <1> .last: 2920 00001729 8B1E[6E0B] <1> mov bx, word [dstringaddr] 2921 0000172D 66 <1> _386_PM_o32 ; mov edx, dword [bx] 2922 0000172E 8B17 <1> mov dx, word [bx] 2923 00001730 EB20 <1> jmp short .haveaddr ; edx = offset, [bx + saSegSel] = segment 2924 <1> .getaddr: 2925 00001732 8B1E[900C] <1> mov bx, word [reg_ds] 2926 00001736 E84E94 <1> call getaddrX ; get address into bx:(e)dx 2927 00001739 E855A4 <1> call chkeol ; expect end of line here 2928 <1> %if _PM 2929 0000173C 53 <1> push bx 2930 <1> %endif 2931 0000173D 53 <1> push bx 2932 0000173E 8B1E[6E0B] <1> mov bx, word [dstringaddr] 2933 00001742 8F4704 <1> pop word [bx + saSegSel]; save segment (offset behind string is saved later) 2934 <1> %if _PM 2935 00001745 E88D7C <1> call ispm 2936 00001748 7505 <1> jnz .86m 2937 <1> .pm: 2938 0000174A 8F4708 <1> pop word [bx + saSelector] 2939 0000174D EB03 <1> jmp @F 2940 <1> .86m: 2941 0000174F 8F4706 <1> pop word [bx + saSegment] 2942 <1> @@: 2943 <1> %endif 2944 <1> .haveaddr: 2945 00001752 C706[E60B][2917] <1> mov word [lastcmd], dstring.last 2946 00001758 E83191 <1> call prephack 2947 0000175B 66 <1> _386_PM_o32 ; mov esi, edx 2948 0000175C 89D6 <1> mov si, dx 2949 0000175E 800E[9E00]01 <1> setopt [internalflags], usecharcounter 2950 00001763 C606[9A0A]01 <1> mov byte [ charcounter ], 1 2951 <1> ; initialize 2952 00001768 E84F91 <1> call dohack 2953 0000176B 8E5F04 <1> mov ds, word [bx + saSegSel] 2954 <1> ; ds:(e)si-> string 2955 0000176E 36803E[6C0B]FE <1> cmp byte [ss:dstringtype], 0FEh 2956 00001774 7235 <1> jb .terminated ; terminated string --> 2957 00001776 9F <1> lahf 2958 00001777 67 <1> _386_PM_a32 2959 00001778 AC <1> lodsb ; load first byte 2960 00001779 31C9 <1> xor cx, cx 2961 0000177B 88C1 <1> mov cl, al ; low byte of count 2962 0000177D 9E <1> sahf 2963 0000177E 7504 <1> jne .counted ; only byte count --> 2964 00001780 67 <1> _386_PM_a32 2965 00001781 AC <1> lodsb ; load second byte 2966 00001782 88C5 <1> mov ch, al ; high byte of count 2967 <1> .counted: 2968 00001784 E333 <1> jcxz .done ; length zero --> 2969 <1> .loop: 2970 00001786 67 <1> _386_PM_a32 2971 00001787 AC <1> lodsb ; get character 2972 00001788 E80400 <1> call .char ; display 2973 0000178B E2F9 <1> loop .loop ; until done --> 2974 0000178D EB2A <1> jmp short .done 2975 <1> 2976 <1> .char: 2977 0000178F 16 <1> push ss 2978 00001790 1F <1> pop ds 2979 00001791 50 <1> push ax 2980 00001792 E85991 <1> call unhack ; restore state 2981 00001795 58 <1> pop ax 2982 00001796 56 <1> push si 2983 00001797 51 <1> push cx 2984 00001798 E8BBA8 <1> call putc ; display 2985 0000179B 59 <1> pop cx 2986 0000179C 5E <1> pop si 2987 0000179D E8D229 <1> call handle_serial_flags_ctrl_c 2988 000017A0 E81791 <1> call dohack 2989 000017A3 8B1E[6E0B] <1> mov bx, word [dstringaddr] 2990 000017A7 8E5F04 <1> mov ds, word [bx + saSegSel] 2991 <1> ; go back to special state 2992 000017AA C3 <1> retn 2993 <1> 2994 <1> .terminated: 2995 000017AB 67 <1> _386_PM_a32 2996 000017AC AC <1> lodsb ; load character 2997 000017AD 363A06[6C0B] <1> cmp al, byte [ss:dstringtype] 2998 000017B2 7405 <1> je .done ; it's the terminator --> 2999 000017B4 E8D8FF <1> call .char ; display 3000 000017B7 EBF2 <1> jmp short .terminated ; and get next --> 3001 <1> 3002 <1> .done: 3003 000017B9 16 <1> push ss 3004 000017BA 1F <1> pop ds ; restore ds 3005 000017BB 66 <1> _386_PM_o32 ; mov dword [bx], esi 3006 000017BC 8937 <1> mov word [bx], si 3007 000017BE E82D91 <1> call unhack 3008 000017C1 B00D <1> mov al, 13 3009 000017C3 E890A8 <1> call putc 3010 000017C6 B00A <1> mov al, 10 3011 000017C8 E88BA8 <1> call putc 3012 000017CB C3 <1> retn 3013 <1> %endif 3014 <1> 3015 <1> %if _INT 3016 <1> ; DI command 3017 <1> gateout: 3018 000017CC 31C9 <1> xor cx, cx 3019 000017CE AC <1> lodsb 3020 000017CF E84976 <1> call uppercase 3021 000017D2 3C52 <1> cmp al, 'R' 3022 000017D4 7502 <1> jne @F 3023 000017D6 41 <1> inc cx ; always 86 Mode 3024 000017D7 AC <1> lodsb 3025 <1> @@: 3026 000017D8 E84076 <1> call uppercase 3027 000017DB 3C4D <1> cmp al, 'M' 3028 000017DD 7503 <1> jne @F 3029 000017DF FEC5 <1> inc ch ; show MCB names 3030 000017E1 AC <1> lodsb 3031 <1> @@: 3032 000017E2 E83676 <1> call uppercase 3033 000017E5 3C4C <1> cmp al, 'L' 3034 000017E7 7504 <1> jne @F 3035 000017E9 80CD02 <1> or ch, 2 ; follow AMIS interrupt lists 3036 000017EC AC <1> lodsb 3037 <1> @@: 3038 000017ED E8E2A3 <1> call skipwh0 3039 <1> 3040 000017F0 4E <1> dec si 3041 000017F1 BA[7568] <1> mov dx, msg.in 3042 000017F4 E826A3 <1> call isstring? 3043 000017F7 755C <1> jne .not_in 3044 <1> 3045 000017F9 56 <1> push si 3046 000017FA 51 <1> push cx 3047 <1> .in.loop: 3048 000017FB E8D3A3 <1> call skipwhite 3049 000017FE 4E <1> dec si 3050 <1> 3051 000017FF E899A2 <1> call get_value_range ; OUT: cx:di = from, bx:dx = to 3052 00001802 730D <1> jnc @F 3053 00001804 7508 <1> jnz .error 3054 00001806 81FFFF00 <1> cmp di, 255 3055 0000180A 7702 <1> ja .error 3056 0000180C E317 <1> jcxz .in.next 3057 <1> .error: 3058 0000180E E9398F <1> jmp error 3059 <1> 3060 <1> @@: 3061 00001811 81FFFF00 <1> cmp di, 255 3062 00001815 77F7 <1> ja .error 3063 00001817 E302 <1> jcxz @F 3064 00001819 EBF3 <1> jmp .error 3065 <1> 3066 <1> @@: 3067 0000181B 85DB <1> test bx, bx 3068 0000181D 75EF <1> jnz .error 3069 0000181F 81FAFF00 <1> cmp dx, 255 3070 00001823 77E9 <1> ja .error 3071 <1> 3072 <1> .in.next: 3073 <1> @@: 3074 00001825 E8AAA3 <1> call skipwh0 3075 00001828 3C2C <1> cmp al, ',' 3076 0000182A 74CF <1> je .in.loop 3077 0000182C E862A3 <1> call chkeol 3078 0000182F 59 <1> pop cx 3079 00001830 E89300 <1> call .prepare 3080 00001833 5E <1> pop si 3081 <1> 3082 <1> .indo.loop: 3083 00001834 E89AA3 <1> call skipwhite 3084 00001837 4E <1> dec si 3085 <1> 3086 00001838 51 <1> push cx 3087 00001839 E85FA2 <1> call get_value_range ; OUT: cx:di = from, bx:dx = to 3088 0000183C 59 <1> pop cx 3089 0000183D 720D <1> jc .indo.next 3090 <1> 3091 0000183F 89FB <1> mov bx, di 3092 00001841 A8 <1> db __TEST_IMM8 ; (skip inc) 3093 <1> @@: 3094 00001842 43 <1> inc bx 3095 00001843 52 <1> push dx 3096 00001844 E89400 <1> call .do 3097 00001847 5A <1> pop dx 3098 00001848 39D3 <1> cmp bx, dx 3099 0000184A 72F6 <1> jb @B 3100 <1> 3101 <1> .indo.next: 3102 0000184C 4E <1> dec si 3103 0000184D E881A3 <1> call skipwhite 3104 00001850 3C2C <1> cmp al, ',' 3105 00001852 74E0 <1> je .indo.loop 3106 00001854 C3 <1> retn 3107 <1> 3108 <1> 3109 <1> 3110 <1> .not_in: 3111 00001855 AC <1> lodsb 3112 00001856 E810A2 <1> call getbyte ; get byte into DL 3113 00001859 30F6 <1> xor dh, dh 3114 0000185B 89D3 <1> mov bx, dx 3115 0000185D E843A3 <1> call skipcomm0 3116 00001860 BA0100 <1> mov dx, 1 3117 00001863 E816A3 <1> call iseol? 3118 00001866 7451 <1> je .onlyone 3119 00001868 E8B075 <1> call uppercase 3120 0000186B 3C4C <1> cmp al, 'L' 3121 0000186D 753F <1> jne .notlength 3122 0000186F E830A3 <1> call skipcomma 3123 00001872 E8E6A1 <1> call getword ; get byte into DL 3124 00001875 85D2 <1> test dx, dx 3125 00001877 741A <1> jz .err 3126 00001879 81FA0001 <1> cmp dx, 100h 3127 0000187D 740A <1> je .checkrange 3128 0000187F 50 <1> push ax 3129 00001880 80E41F <1> and ah, 1Fh 3130 00001883 80FC08 <1> cmp ah, 8 3131 00001886 58 <1> pop ax 3132 00001887 770A <1> ja .err 3133 <1> .checkrange: 3134 00001889 52 <1> push dx 3135 0000188A 01DA <1> add dx, bx 3136 0000188C 81FA0001 <1> cmp dx, 100h 3137 00001890 5A <1> pop dx 3138 00001891 7623 <1> jna .rangeok 3139 <1> .err: 3140 00001893 E9B48E <1> jmp error 3141 <1> 3142 <1> .last: 3143 00001896 31DB <1> xor bx, bx 3144 00001898 8A1E[760B] <1> mov bl, byte [lastint] 3145 0000189C 8B0E[740B] <1> mov cx, word [lastint_is_86m_and_mcb] 3146 000018A0 BA0100 <1> mov dx, 1 3147 000018A3 FEC3 <1> inc bl 3148 000018A5 7512 <1> jnz .onlyone 3149 000018A7 C706[E60B][5C04] <1> mov word [lastcmd], dmycmd 3150 000018AD C3 <1> retn 3151 <1> 3152 <1> .notlength: 3153 000018AE E8B8A1 <1> call getbyte 3154 000018B1 30F6 <1> xor dh, dh 3155 000018B3 28DA <1> sub dl, bl 3156 000018B5 42 <1> inc dx 3157 <1> .rangeok: 3158 000018B6 E8D8A2 <1> call chkeol 3159 <1> .onlyone: 3160 000018B9 E80A00 <1> call .prepare 3161 000018BC 89D6 <1> mov si, dx ; save count 3162 <1> .next: 3163 000018BE E81A00 <1> call .do 3164 000018C1 43 <1> inc bx 3165 000018C2 4E <1> dec si 3166 000018C3 75F9 <1> jnz .next 3167 000018C5 C3 <1> retn 3168 <1> 3169 <1> 3170 <1> .prepare: 3171 000018C6 F6C502 <1> test ch, 2 3172 000018C9 7403 <1> jz @F 3173 000018CB E88DEC <1> call guard_auxbuff 3174 <1> @@: 3175 000018CE C706[E60B][9618] <1> mov word [lastcmd], .last 3176 000018D4 890E[740B] <1> mov word [lastint_is_86m_and_mcb], cx 3177 000018D8 E9B18F <1> jmp prephack 3178 <1> 3179 <1> 3180 <1> ; INP: bx = interrupt number 3181 <1> ; cx = options 3182 <1> ; CHG: di, eax. edx, bp 3183 <1> ; STT: ds = es = ss 3184 <1> ; prephack called 3185 <1> .do: 3186 000018DB 881E[760B] <1> mov byte [lastint], bl 3187 000018DF E89028 <1> call handle_serial_flags_ctrl_c 3188 000018E2 E8D58F <1> call dohack 3189 000018E5 BF[0E08] <1> mov di, line_out 3190 000018E8 B8696E <1> mov ax, "in" 3191 000018EB AB <1> stosw 3192 000018EC B87420 <1> mov ax, "t " 3193 000018EF AB <1> stosw 3194 000018F0 88D8 <1> mov al, bl 3195 000018F2 E88EA3 <1> call hexbyte 3196 000018F5 B020 <1> mov al, 32 3197 000018F7 AA <1> stosb 3198 <1> %if _PM 3199 000018F8 84C9 <1> test cl, cl 3200 000018FA 7545 <1> jnz .rm 3201 000018FC E8D67A <1> call ispm 3202 000018FF 7540 <1> jnz .rm 3203 <1> 3204 00001901 B80402 <1> mov ax, 0204h 3205 00001904 80FB20 <1> cmp bl, 20h 3206 00001907 80D701 <1> adc bh, 1 ; if below, bh = 2 3207 <1> .loopexception: 3208 0000190A 51 <1> push cx 3209 0000190B CD31 <1> int 31h 3210 0000190D 89C8 <1> mov ax, cx 3211 0000190F 59 <1> pop cx 3212 00001910 7303E9B000 <1> jc .failed 3213 00001915 E864A3 <1> call hexword 3214 00001918 B03A <1> mov al, ':' 3215 0000191A AA <1> stosb 3216 0000191B 66 <1> _386_PM_o32 ; mov eax, edx 3217 0000191C 89D0 <1> mov ax, dx 3218 0000191E 803E[0A8B]00 <1> cmp byte [dpmi32], 0 3219 00001923 7403 <1> jz .gate16 3220 00001925 E848A3 <1> call hexword_high 3221 <1> .gate16: 3222 00001928 E851A3 <1> call hexword 3223 0000192B B020 <1> mov al, 32 3224 0000192D AA <1> stosb 3225 0000192E B80202 <1> mov ax, 0202h 3226 00001931 FECF <1> dec bh 3227 00001933 75D5 <1> jnz .loopexception 3228 00001935 4F <1> dec di 3229 00001936 E8B58F <1> call unhack 3230 00001939 53 <1> push bx 3231 0000193A 51 <1> push cx 3232 0000193B E876A3 <1> call putsline_crlf 3233 0000193E 59 <1> pop cx 3234 0000193F 5B <1> pop bx 3235 00001940 C3 <1> retn 3236 <1> 3237 <1> .rm: 3238 <1> %endif 3239 00001941 53 <1> push bx 3240 00001942 51 <1> push cx 3241 00001943 56 <1> push si 3242 <1> 3243 00001944 53 <1> push bx 3244 00001945 31ED <1> xor bp, bp 3245 00001947 D1E3 <1> shl bx, 1 3246 00001949 D1E3 <1> shl bx, 1 3247 0000194B 31D2 <1> xor dx, dx 3248 <1> %if _PM 3249 0000194D E820BB <1> call setes2dx 3250 <1> %else 3251 <1> mov es, dx ; es => IVT 3252 <1> %endif 3253 00001950 268B4702 <1> mov ax, word [es:bx + 2] ; ax = segment 3254 00001954 268B17 <1> mov dx, word [es:bx] 3255 00001957 5B <1> pop bx 3256 <1> 3257 00001958 F6C502 <1> test ch, 2 3258 0000195B 7572 <1> jnz int_list 3259 <1> 3260 <1> .loop_chain: 3261 0000195D 50 <1> push ax ; segment 3262 0000195E 52 <1> push dx 3263 <1> 3264 0000195F 16 <1> push ss 3265 00001960 07 <1> pop es 3266 00001961 E818A3 <1> call hexword 3267 00001964 B03A <1> mov al, ':' 3268 00001966 AA <1> stosb 3269 00001967 89D0 <1> mov ax, dx 3270 00001969 E810A3 <1> call hexword 3271 <1> 3272 0000196C 5B <1> pop bx 3273 0000196D 5A <1> pop dx ; segment 3274 <1> 3275 0000196E 8916[720B] <1> mov word [intaddress + 2], dx 3276 00001972 891E[700B] <1> mov word [intaddress], bx 3277 <1> 3278 00001976 45 <1> inc bp 3279 00001977 81FD0001 <1> cmp bp, 256 3280 0000197B 7740 <1> ja .toomany 3281 <1> 3282 0000197D E80003 <1> call check_int_chain 3283 00001980 722C <1> jc .end_chain 3284 <1> 3285 00001982 52 <1> push dx ; segment 3286 00001983 50 <1> push ax 3287 00001984 16 <1> push ss 3288 00001985 07 <1> pop es 3289 00001986 E8658F <1> call unhack 3290 00001989 51 <1> push cx 3291 0000198A E8D21B <1> call copy_single_counted_string 3292 0000198D 59 <1> pop cx 3293 0000198E E88B03 <1> call .mcbname 3294 00001991 51 <1> push cx 3295 00001992 E81FA3 <1> call putsline_crlf 3296 00001995 59 <1> pop cx 3297 00001996 E8D927 <1> call handle_serial_flags_ctrl_c 3298 00001999 E81E8F <1> call dohack 3299 0000199C BF[0E08] <1> mov di, line_out 3300 0000199F B8202D <1> mov ax, " -" 3301 000019A2 AB <1> stosw 3302 000019A3 B82D3E <1> mov ax, "->" 3303 000019A6 AB <1> stosw 3304 000019A7 B020 <1> mov al, 32 3305 000019A9 AA <1> stosb 3306 <1> 3307 000019AA 5A <1> pop dx 3308 000019AB 58 <1> pop ax ; (ax = segment) 3309 000019AC EBAF <1> jmp .loop_chain 3310 <1> 3311 <1> .end_chain: 3312 000019AE 16 <1> push ss 3313 000019AF 07 <1> pop es 3314 000019B0 E83B8F <1> call unhack 3315 000019B3 E86603 <1> call .mcbname 3316 000019B6 E8FBA2 <1> call putsline_crlf 3317 <1> .86next: 3318 000019B9 5E <1> pop si 3319 000019BA 59 <1> pop cx 3320 000019BB 5B <1> pop bx 3321 000019BC C3 <1> retn 3322 <1> 3323 <1> .toomany: 3324 000019BD BE[7169] <1> mov si, msg.di_toomany 3325 000019C0 E89C1B <1> call copy_single_counted_string 3326 000019C3 EBE9 <1> jmp .end_chain 3327 <1> 3328 <1> %if _PM 3329 <1> .failed: 3330 000019C5 E8268F <1> call unhack 3331 000019C8 5A <1> pop dx ; discard a near return address 3332 000019C9 BA[D87E] <1> mov dx, gatewrong 3333 000019CC E964A6 <1> jmp putsz 3334 <1> %endif 3335 <1> 3336 <1> 3337 <1> int_list: 3338 000019CF 57 <1> push di 3339 000019D0 51 <1> push cx 3340 000019D1 53 <1> push bx 3341 000019D2 92 <1> xchg ax, dx ; dx = segment 3342 <1> 3343 000019D3 368E06[FA09] <1> mov es, word [ss:auxbuff_segorsel] 3344 000019D8 31FF <1> xor di, di ; -> auxbuff 3345 000019DA AB <1> stosw ; store offset 3346 000019DB 92 <1> xchg ax, dx ; dx = offset 3347 000019DC AB <1> stosw ; store segment 3348 000019DD 92 <1> xchg ax, dx ; dx = segment 3349 000019DE 93 <1> xchg bx, ax ; bx = offset 3350 000019DF B80003 <1> mov ax, 300h ; flag for IVT | unused 3351 000019E2 AB <1> stosw ; which multiplex number 3352 000019E3 31C0 <1> xor ax, ax 3353 000019E5 AB <1> stosw ; which int list entry = none = 0 3354 <1> 3355 <1> .loop_ivt_chain: 3356 000019E6 E89702 <1> call check_int_chain 3357 000019E9 7219 <1> jc .end_ivt_chain 3358 <1> 3359 000019EB 81FFF81F <1> cmp di, _AUXBUFFSIZE - 3 * 8 3360 000019EF 7735 <1> ja .error 3361 000019F1 368E06[FA09] <1> mov es, word [ss:auxbuff_segorsel] 3362 000019F6 AB <1> stosw ; store offset 3363 000019F7 92 <1> xchg ax, dx 3364 000019F8 AB <1> stosw ; store segment 3365 000019F9 92 <1> xchg ax, dx 3366 000019FA 93 <1> xchg bx, ax 3367 000019FB B80002 <1> mov ax, 200h ; flag for unused 3368 000019FE AB <1> stosw ; found in chain = 200h 3369 000019FF 31C0 <1> xor ax, ax 3370 00001A01 AB <1> stosw 3371 00001A02 EBE2 <1> jmp .loop_ivt_chain 3372 <1> 3373 <1> .end_ivt_chain: 3374 00001A04 83C8FF <1> or ax, -1 3375 00001A07 368E06[FA09] <1> mov es, word [ss:auxbuff_segorsel] 3376 00001A0C B90800 <1> mov cx, 8 3377 00001A0F F3AB <1> rep stosw ; terminator is all-ones 3378 <1> ; (two terminators actually) 3379 <1> 3380 00001A11 31C0 <1> xor ax, ax 3381 <1> .loopplex: 3382 00001A13 B000 <1> mov al, 00h ; AMIS installation check 3383 00001A15 51 <1> push cx 3384 <1> ; function 0 changes dx, di, cx, al 3385 <1> %if _PM 3386 00001A16 E8237B <1> call call_int2D 3387 <1> %else 3388 <1> int 2Dh ; enquire whether there's anyone 3389 <1> %endif 3390 00001A19 59 <1> pop cx ; but we don't care who it might be 3391 00001A1A FEC0 <1> inc al ; = FFh ? 3392 00001A1C 7503E90201 <1> jz .search ; yes, it is in use --> 3393 <1> .nextplex: 3394 00001A21 FEC4 <1> inc ah 3395 00001A23 75EE <1> jnz .loopplex ; try next multiplexer --> 3396 <1> 3397 <1> .done: 3398 00001A25 A8 <1> db __TEST_IMM8 ; (NC) 3399 <1> .error: 3400 00001A26 F9 <1> stc 3401 <1> 3402 00001A27 5B <1> pop bx 3403 00001A28 59 <1> pop cx 3404 00001A29 5F <1> pop di 3405 00001A2A 16 <1> push ss 3406 00001A2B 1F <1> pop ds 3407 00001A2C 16 <1> push ss 3408 00001A2D 07 <1> pop es 3409 <1> 3410 00001A2E BE[EE68] <1> mov si, msg.di_error 3411 00001A31 7303E9B000 <1> jc .error_string 3412 <1> 3413 00001A36 31F6 <1> xor si, si 3414 <1> 3415 <1> .loop_chain: 3416 00001A38 8E1E[FA09] <1> mov ds, word [auxbuff_segorsel] 3417 00001A3C AD <1> lodsw 3418 00001A3D 92 <1> xchg ax, dx 3419 00001A3E AD <1> lodsw 3420 00001A3F 83C604 <1> add si, 4 3421 <1> 3422 00001A42 89C3 <1> mov bx, ax 3423 00001A44 21D3 <1> and bx, dx 3424 00001A46 43 <1> inc bx 3425 00001A47 746D <1> jz .next_seq 3426 <1> 3427 <1> .next_chain: 3428 00001A49 16 <1> push ss 3429 00001A4A 1F <1> pop ds 3430 <1> 3431 00001A4B 50 <1> push ax ; segment 3432 00001A4C 52 <1> push dx 3433 <1> 3434 00001A4D 16 <1> push ss 3435 00001A4E 07 <1> pop es 3436 00001A4F E82AA2 <1> call hexword 3437 00001A52 B03A <1> mov al, ':' 3438 00001A54 AA <1> stosb 3439 00001A55 89D0 <1> mov ax, dx 3440 00001A57 E822A2 <1> call hexword 3441 <1> 3442 00001A5A 5B <1> pop bx 3443 00001A5B 5A <1> pop dx ; segment 3444 <1> 3445 00001A5C 8916[720B] <1> mov word [intaddress + 2], dx 3446 00001A60 891E[700B] <1> mov word [intaddress], bx 3447 <1> 3448 00001A64 56 <1> push si 3449 00001A65 E81802 <1> call check_int_chain 3450 00001A68 722E <1> jc .end_chain 3451 <1> 3452 00001A6A 16 <1> push ss 3453 00001A6B 07 <1> pop es 3454 00001A6C E87F8E <1> call unhack 3455 00001A6F 51 <1> push cx 3456 00001A70 E8EC1A <1> call copy_single_counted_string 3457 00001A73 59 <1> pop cx 3458 00001A74 5E <1> pop si 3459 00001A75 E87A00 <1> call .mpx 3460 00001A78 56 <1> push si 3461 00001A79 E8A002 <1> call gateout.mcbname 3462 00001A7C 51 <1> push cx 3463 00001A7D E834A2 <1> call putsline_crlf 3464 00001A80 59 <1> pop cx 3465 00001A81 E8EE26 <1> call handle_serial_flags_ctrl_c 3466 00001A84 E8338E <1> call dohack 3467 00001A87 BF[0E08] <1> mov di, line_out 3468 00001A8A B8202D <1> mov ax, " -" 3469 00001A8D AB <1> stosw 3470 00001A8E B82D3E <1> mov ax, "->" 3471 00001A91 AB <1> stosw 3472 00001A92 B020 <1> mov al, 32 3473 00001A94 AA <1> stosb 3474 <1> 3475 00001A95 5E <1> pop si 3476 00001A96 EBA0 <1> jmp .loop_chain 3477 <1> 3478 <1> .end_chain: 3479 00001A98 16 <1> push ss 3480 00001A99 07 <1> pop es 3481 00001A9A E8518E <1> call unhack 3482 00001A9D 5E <1> pop si 3483 00001A9E E85100 <1> call .mpx 3484 00001AA1 56 <1> push si 3485 00001AA2 E87702 <1> call gateout.mcbname 3486 00001AA5 51 <1> push cx 3487 00001AA6 E80BA2 <1> call putsline_crlf 3488 00001AA9 59 <1> pop cx 3489 00001AAA BF[0E08] <1> mov di, line_out 3490 00001AAD E8C226 <1> call handle_serial_flags_ctrl_c 3491 00001AB0 E8078E <1> call dohack 3492 00001AB3 5E <1> pop si 3493 00001AB4 EB82 <1> jmp .loop_chain 3494 <1> 3495 <1> .next_seq: 3496 00001AB6 AD <1> lodsw 3497 00001AB7 92 <1> xchg ax, dx 3498 00001AB8 AD <1> lodsw 3499 00001AB9 83C604 <1> add si, 4 3500 <1> 3501 00001ABC 89C3 <1> mov bx, ax 3502 00001ABE 21D3 <1> and bx, dx 3503 00001AC0 43 <1> inc bx 3504 00001AC1 741A <1> jz @F 3505 <1> 3506 00001AC3 16 <1> push ss 3507 00001AC4 1F <1> pop ds 3508 00001AC5 16 <1> push ss 3509 00001AC6 07 <1> pop es 3510 00001AC7 E8248E <1> call unhack 3511 00001ACA 51 <1> push cx 3512 00001ACB 56 <1> push si 3513 00001ACC BE[F668] <1> mov si, msg.di_hidden 3514 00001ACF E88D1A <1> call copy_single_counted_string 3515 00001AD2 5E <1> pop si 3516 00001AD3 59 <1> pop cx 3517 00001AD4 E89B26 <1> call handle_serial_flags_ctrl_c 3518 00001AD7 E8E08D <1> call dohack 3519 <1> 3520 00001ADA E96CFF <1> jmp .next_chain 3521 <1> 3522 <1> @@: 3523 00001ADD 16 <1> push ss 3524 00001ADE 1F <1> pop ds 3525 00001ADF 16 <1> push ss 3526 00001AE0 07 <1> pop es 3527 00001AE1 E80A8E <1> call unhack 3528 00001AE4 EB09 <1> jmp @F 3529 <1> 3530 <1> 3531 <1> .error_string: 3532 00001AE6 E8761A <1> call copy_single_counted_string 3533 <1> 3534 00001AE9 E8028E <1> call unhack 3535 00001AEC E8C5A1 <1> call putsline_crlf 3536 <1> @@: 3537 <1> %if 0 ; _DEBUG 3538 <1> mov es, word [auxbuff_segorsel] 3539 <1> int3 3540 <1> push ss 3541 <1> pop es 3542 <1> %endif 3543 00001AEF E9C7FE <1> jmp gateout.86next 3544 <1> 3545 <1> 3546 <1> .mpx: 3547 00001AF2 8E06[FA09] <1> mov es, word [auxbuff_segorsel] 3548 00001AF6 268B44FC <1> mov ax, word [es:si - 4] 3549 00001AFA 268B54FE <1> mov dx, word [es:si - 2] 3550 00001AFE 16 <1> push ss 3551 00001AFF 07 <1> pop es 3552 00001B00 F6C402 <1> test ah, 2 3553 00001B03 751D <1> jnz @F 3554 00001B05 56 <1> push si 3555 00001B06 51 <1> push cx 3556 00001B07 BE[DA69] <1> mov si, msg.di_multiplex.1 3557 00001B0A E8521A <1> call copy_single_counted_string 3558 00001B0D E873A1 <1> call hexbyte 3559 00001B10 BE[E169] <1> mov si, msg.di_multiplex.2 3560 00001B13 E8491A <1> call copy_single_counted_string 3561 00001B16 92 <1> xchg ax, dx 3562 00001B17 E862A1 <1> call hexword 3563 00001B1A BE[E969] <1> mov si, msg.di_multiplex.3 3564 00001B1D E83F1A <1> call copy_single_counted_string 3565 00001B20 59 <1> pop cx 3566 00001B21 5E <1> pop si 3567 <1> @@: 3568 00001B22 C3 <1> retn 3569 <1> 3570 <1> 3571 <1> ; INP: ah = multiplex number of AMIS TSR to search through 3572 <1> ; ss:sp-> interrupt number (byte), must be preserved 3573 <1> ; CHG: es, di, dx, bx 3574 <1> .search: 3575 00001B23 B004 <1> mov al, 04h 3576 00001B25 5B <1> pop bx 3577 00001B26 53 <1> push bx ; low byte is the interrupt number 3578 <1> ; function 4 changes dx, bx, al 3579 <1> %if _PM 3580 00001B27 E8127A <1> call call_int2D 3581 <1> %else 3582 <1> int 2Dh 3583 <1> %endif 3584 00001B2A 3C03 <1> cmp al, 03h ; returned its interrupt entry ? 3585 <1> ; RBIL doesn't explicitly state that this interrupt entry has to 3586 <1> ; be IISP compatible. But I'm too lazy to look up the older AMIS, 3587 <1> ; and SearchIISPChain checks the interrupt entry anyway. 3588 00001B2C 743D <1> je .search_dxbx 3589 00001B2E 3C04 <1> cmp al, 04h ; returned list of hooked interrupts ? 3590 00001B30 7403E9ECFE <1> jne .nextplex ; no, try next multiplexer --> 3591 00001B35 89DF <1> mov di, bx 3592 00001B37 5B <1> pop bx 3593 00001B38 53 <1> push bx ; bl = interrupt number 3594 00001B39 31C9 <1> xor cx, cx ; = index into list 3595 00001B3B 88D8 <1> mov al, bl 3596 <1> .search_intlist_seg: 3597 <1> %if _PM 3598 00001B3D E830B9 <1> call setes2dx 3599 <1> %else 3600 <1> mov es, dx ; es:di-> list 3601 <1> %endif 3602 <1> .search_intlist: ; Search the returned list for the required interrupt number. 3603 00001B40 AE <1> scasb ; our interrupt number ? 3604 00001B41 740E <1> je .search_found_intlist 3605 00001B43 26807DFF2D <1> cmp byte [es:di-1], 2Dh ; was last in list ? 3606 00001B48 7503E9D4FE <1> je .nextplex 3607 00001B4D AF <1> scasw ; skip pointer 3608 00001B4E 41 <1> inc cx 3609 00001B4F EBEF <1> jmp short .search_intlist ; try next entry --> 3610 <1> 3611 <1> .search_found_intlist: 3612 00001B51 268B1D <1> mov bx, word [es:di] ; dx:bx = es:bx -> IISP entry 3613 00001B54 AF <1> scasw ; skip pointer 3614 00001B55 52 <1> push dx ; preserve dx for .search_intlist_seg 3615 00001B56 57 <1> push di 3616 00001B57 E82200 <1> call .add 3617 00001B5A 5F <1> pop di 3618 00001B5B 5A <1> pop dx 3619 00001B5C 7303E9C5FE <1> jc .error 3620 <1> ; je .search_found ; found entry --> 3621 <1> ; This specific jump supports TSRs that hook the same 3622 <1> ; interrupt more than once; jumping to .nextplex instead 3623 <1> ; (as previously) aborts the search after the first match 3624 <1> ; in the interrupt list. This support might become useful. 3625 00001B61 3C2D <1> cmp al, 2Dh ; was last in list ? 3626 00001B63 7503E9B9FE <1> je .nextplex 3627 00001B68 41 <1> inc cx 3628 00001B69 EBD2 <1> jmp short .search_intlist_seg 3629 <1> 3630 <1> .search_dxbx: 3631 <1> %if _PM 3632 00001B6B E802B9 <1> call setes2dx 3633 <1> %else 3634 <1> mov es, dx ; es:bx-> (IISP) interrupt entry 3635 <1> %endif 3636 <1> ; The entry we found now is possibly behind the non-IISP entry that 3637 <1> ; terminated our first SearchIISPChain call (at .hard). We then 3638 <1> ; possibly might find our entry in this hidden part of the chain. 3639 00001B6E 83C9FF <1> or cx, -1 3640 00001B71 E80800 <1> call .add 3641 00001B74 7303E9ADFE <1> jc .error 3642 <1> ; jne .nextplex ; didn't find our entry in the chain --> 3643 00001B79 E9A5FE <1> jmp .nextplex 3644 <1> 3645 <1> 3646 <1> int_list.add: 3647 00001B7C 31FF <1> xor di, di 3648 00001B7E 368E1E[FA09] <1> mov ds, word [ss:auxbuff_segorsel] 3649 00001B83 83CEFF <1> or si, -1 3650 00001B86 E8D400 <1> call .check 3651 00001B89 7516 <1> jne @F 3652 00001B8B F6450502 <1> testopt [di + 4], 200h 3653 00001B8F 7503E9C700 <1> jz .error 3654 00001B94 886504 <1> mov byte [di + 4], ah 3655 00001B97 806505FD <1> clropt [di + 4], 200h 3656 00001B9B 894D06 <1> mov word [di + 6], cx 3657 00001B9E E9B900 <1> jmp .done 3658 <1> 3659 <1> @@: 3660 <1> ; ds:di -> second terminator 3661 00001BA1 81FFF81F <1> cmp di, _AUXBUFFSIZE - 8 * 3 3662 00001BA5 7603E9B100 <1> ja .error 3663 00001BAA 8D75F8 <1> lea si, [di - 8] 3664 <1> 3665 00001BAD 93 <1> xchg ax, bx 3666 00001BAE 368E06[FA09] <1> mov es, word [ss:auxbuff_segorsel] 3667 <1> ; => auxbuff 3668 00001BB3 AB <1> stosw ; store offset 3669 00001BB4 92 <1> xchg ax, dx ; dx = offset 3670 00001BB5 AB <1> stosw ; store segment 3671 00001BB6 92 <1> xchg ax, dx ; dx = segment 3672 00001BB7 93 <1> xchg ax, bx 3673 00001BB8 50 <1> push ax 3674 00001BB9 B000 <1> mov al, 0 3675 00001BBB 86C4 <1> xchg al, ah 3676 00001BBD AB <1> stosw ; which multiplex number 3677 00001BBE 89C8 <1> mov ax, cx 3678 00001BC0 AB <1> stosw ; which int list entry = none = 0 3679 00001BC1 58 <1> pop ax 3680 <1> 3681 <1> .loop_chain: 3682 00001BC2 50 <1> push ax 3683 00001BC3 56 <1> push si 3684 00001BC4 E8B900 <1> call check_int_chain 3685 00001BC7 5E <1> pop si 3686 00001BC8 5B <1> pop bx 3687 00001BC9 727E <1> jc .end_chain 3688 <1> 3689 00001BCB 81FFF81F <1> cmp di, _AUXBUFFSIZE - 3 * 8 3690 00001BCF 7603E98700 <1> ja .error 3691 00001BD4 368E06[FA09] <1> mov es, word [ss:auxbuff_segorsel] 3692 00001BD9 AB <1> stosw ; store offset 3693 00001BDA 92 <1> xchg ax, dx 3694 00001BDB AB <1> stosw ; store segment 3695 00001BDC 92 <1> xchg ax, dx 3696 00001BDD 93 <1> xchg bx, ax ; ah = multiplex number, bx = offset 3697 00001BDE 50 <1> push ax 3698 00001BDF B80002 <1> mov ax, 200h 3699 00001BE2 AB <1> stosw ; found in chain = 200h 3700 00001BE3 31C0 <1> xor ax, ax 3701 00001BE5 AB <1> stosw 3702 00001BE6 58 <1> pop ax 3703 00001BE7 57 <1> push di 3704 00001BE8 31FF <1> xor di, di 3705 00001BEA E87000 <1> call .check 3706 00001BED 7403 <1> je @F 3707 00001BEF 5F <1> pop di 3708 00001BF0 EBD0 <1> jmp .loop_chain 3709 <1> 3710 <1> @@: 3711 00001BF2 5B <1> pop bx 3712 00001BF3 F6450501 <1> testopt [di + 4], 100h 3713 00001BF7 7562 <1> jnz .error 3714 00001BF9 837DFCFF <1> cmp word [di - 8 + 4], -1 3715 00001BFD 755C <1> jne .error 3716 <1> ; di -> match (insert to move here) 3717 <1> ; bx -> after repeat 3718 <1> ; bx - 8 -> repeat 3719 <1> ; bx - 16 -> last entry to move 3720 <1> ; si -> single terminator 3721 <1> ; si + 8 -> first entry to move 3722 <1> 3723 00001BFF 83EB10 <1> sub bx, 16 ; -> last entry to move 3724 <1> 3725 <1> .insert: 3726 <1> ; di -> match (insert to move here) 3727 <1> ; bx + 8 -> repeat 3728 <1> ; bx -> last entry to move 3729 <1> ; si -> single terminator 3730 <1> ; si + 8 -> first entry to move 3731 <1> 3732 00001C02 FF7706 <1> push word [bx + 6] 3733 00001C05 FF7704 <1> push word [bx + 4] 3734 00001C08 FF7702 <1> push word [bx + 2] 3735 00001C0B FF37 <1> push word [bx] ; get the last entry 3736 00001C0D 57 <1> push di 3737 00001C0E 56 <1> push si 3738 00001C0F 51 <1> push cx 3739 00001C10 368E06[FA09] <1> mov es, word [ss:auxbuff_segorsel] 3740 00001C15 89F9 <1> mov cx, di ; = where to insert 3741 <1> ; -> first to displace 3742 00001C17 F7D9 <1> neg cx 3743 00001C19 89DE <1> mov si, bx ; -> after end of source 3744 00001C1B 8D7F08 <1> lea di, [bx + 8] ; -> after end of dest 3745 00001C1E 01F1 <1> add cx, si ; after end of source - first to displace 3746 <1> ; = how many bytes to displace 3747 00001C20 D1E9 <1> shr cx, 1 3748 00001C22 FD <1> std ; _AMD_ERRATUM_109_WORKAROUND as below 3749 00001C23 A7 <1> cmpsw ; si -= 2, di -= 2 3750 <1> 3751 <1> numdef AMD_ERRATUM_109_WORKAROUND, 1 3752 <1> ; Refer to comment in init.asm init_movp. 3753 <1> 3754 <1> %if _AMD_ERRATUM_109_WORKAROUND 3755 00001C24 E308 <1> jcxz @FF 3756 00001C26 83F914 <1> cmp cx, 20 3757 00001C29 7703 <1> ja @FF 3758 <1> @@: 3759 00001C2B A5 <1> movsw 3760 00001C2C E2FD <1> loop @B 3761 <1> @@: 3762 <1> %endif 3763 00001C2E F3A5 <1> rep movsw 3764 00001C30 FC <1> cld 3765 00001C31 59 <1> pop cx 3766 00001C32 5E <1> pop si 3767 00001C33 5F <1> pop di 3768 00001C34 8F05 <1> pop word [di] 3769 00001C36 8F4502 <1> pop word [di + 2] 3770 00001C39 8F4504 <1> pop word [di + 4] 3771 00001C3C 8F4506 <1> pop word [di + 6] ; insert moved entry 3772 00001C3F 83C608 <1> add si, 8 3773 <1> 3774 <1> ; di -> match (inserted here, insert next here) 3775 <1> ; bx + 8 -> repeat 3776 <1> ; bx -> last entry to move 3777 <1> ; si -> single terminator 3778 <1> ; si + 8 -> first entry to move 3779 00001C42 39DE <1> cmp si, bx ; if last to move != terminator 3780 00001C44 75BC <1> jne .insert ; then move another -> 3781 00001C46 89F7 <1> mov di, si ; where to put double terminator 3782 <1> 3783 00001C48 93 <1> xchg ax, bx 3784 <1> .end_chain: 3785 00001C49 53 <1> push bx 3786 00001C4A 51 <1> push cx 3787 00001C4B 83C8FF <1> or ax, -1 3788 00001C4E 368E06[FA09] <1> mov es, word [ss:auxbuff_segorsel] 3789 00001C53 B90800 <1> mov cx, 8 3790 00001C56 F3AB <1> rep stosw ; terminator is all-ones 3791 <1> ; (two terminators actually) 3792 00001C58 59 <1> pop cx 3793 00001C59 58 <1> pop ax 3794 <1> 3795 <1> .done: 3796 00001C5A A8 <1> db __TEST_IMM8 ; (NC) 3797 <1> .error: 3798 00001C5B F9 <1> stc 3799 <1> 3800 00001C5C C3 <1> retn 3801 <1> 3802 <1> 3803 <1> ; INP: dx:bx = 86 Mode far pointer to handler 3804 <1> ; di -> to check 3805 <1> ; si = end of area to check 3806 <1> 3807 <1> .check: 3808 00001C5D 391D <1> cmp word [di + 0], bx 3809 00001C5F 7506 <1> jne .mismatch 3810 00001C61 395502 <1> cmp word [di + 2], dx 3811 00001C64 7501 <1> jne .mismatch 3812 <1> .match: 3813 00001C66 C3 <1> retn 3814 <1> 3815 <1> .mismatch: 3816 00001C67 83C708 <1> add di, 8 3817 <1> 3818 00001C6A 39F7 <1> cmp di, si 3819 00001C6C 730F <1> jae .checkret 3820 <1> 3821 00001C6E 837D04FF <1> cmp word [di + 4], -1 3822 00001C72 75E9 <1> jne .check 3823 <1> 3824 00001C74 83C708 <1> add di, 8 3825 00001C77 837D04FF <1> cmp word [di + 4], -1 3826 00001C7B 75E0 <1> jne .check 3827 <1> .checkret: 3828 00001C7D 85FF <1> test di, di 3829 00001C7F C3 <1> retn 3830 <1> 3831 <1> 3832 <1> ; INP: dx:bx = 86 Mode far pointer to int handler 3833 <1> ; OUT: NC if chain found, 3834 <1> ; dx:ax = 86 Mode far pointer to next 3835 <1> ; ss:si -> type message (counted) 3836 <1> ; STT: es != ss, ds != ss 3837 <1> check_int_chain: 3838 <1> %if _PM 3839 00001C80 E8EDB7 <1> call setes2dx 3840 <1> %else 3841 <1> mov es, dx ; es:bx -> entrypoint 3842 <1> %endif 3843 00001C83 E875B9 <1> call IsIISPEntry? 3844 00001C86 752A <1> jnz .not_iisp 3845 <1> 3846 00001C88 26FF7704 <1> push word [es:bx + ieNext + 2] 3847 00001C8C 26FF7702 <1> push word [es:bx + ieNext] 3848 <1> 3849 00001C90 BE[1A69] <1> mov si, msg.di_uninst_iisp 3850 00001C93 26813F90EA <1> cmp word [ es:bx + ieEntry ], 0EA90h ; nop\jmp far imm16:imm16 ? 3851 00001C98 7414 <1> je @F 3852 00001C9A BE[FE68] <1> mov si, msg.di_iisp 3853 00001C9D 26807F09EB <1> cmp byte [ es:bx + ieJmphwreset ], 0EBh ; jmp short ? 3854 00001CA2 7507 <1> jne .nonstd 3855 00001CA4 26813FEB10 <1> cmp word [ es:bx + ieEntry ], 010EBh ; jmp short $+18 ? 3856 00001CA9 7403 <1> je @F 3857 <1> .nonstd: 3858 00001CAB BE[0669] <1> mov si, msg.di_nonstd_iisp 3859 <1> @@: 3860 00001CAE 58 <1> pop ax 3861 00001CAF 5A <1> pop dx ; segment 3862 00001CB0 F8 <1> clc 3863 00001CB1 C3 <1> retn 3864 <1> 3865 <1> 3866 <1> .not_iisp: 3867 00001CB2 26803FE8 <1> cmp byte [es:bx], 0E8h 3868 00001CB6 7514 <1> jne .not_fd 3869 00001CB8 26807F03EA <1> cmp byte [es:bx + 3], 0EAh 3870 00001CBD 750D <1> jne .not_fd 3871 00001CBF 26FF7706 <1> push word [es:bx + 4 + 2] 3872 00001CC3 26FF7704 <1> push word [es:bx + 4] 3873 00001CC7 BE[2E69] <1> mov si, msg.di_freedos_reloc 3874 00001CCA EBE2 <1> jmp @B 3875 <1> 3876 <1> .not_fd: 3877 00001CCC BE[4169] <1> mov si, msg.di_jmpfar 3878 00001CCF 26803FEA <1> cmp byte [es:bx], 0EAh 3879 00001CD3 750A <1> jne .not_jmpfar 3880 00001CD5 26FF7703 <1> push word [es:bx + 1 + 2] 3881 00001CD9 26FF7701 <1> push word [es:bx + 1] 3882 00001CDD EBCF <1> jmp @B 3883 <1> 3884 <1> .not_jmpfar: 3885 00001CDF BE[5069] <1> mov si, msg.di_jmpfarindirect 3886 00001CE2 26803FEB <1> cmp byte [es:bx], 0EBh 3887 00001CE6 750D <1> jne .not_testhook_try_jmpfarindirect 3888 00001CE8 BE[6469] <1> mov si, msg.di_testhook 3889 00001CEB 268A4701 <1> mov al, byte [es:bx + 1] 3890 00001CEF 98 <1> cbw 3891 00001CF0 83C002 <1> add ax, 2 3892 00001CF3 01C3 <1> add bx, ax 3893 <1> .not_testhook_try_jmpfarindirect: 3894 00001CF5 83FBFA <1> cmp bx, -6 3895 00001CF8 7720 <1> ja .not_testhook_or_jmpfarindirect 3896 00001CFA 26813F2EFF <1> cmp word [es:bx], 0FF2Eh 3897 00001CFF 7519 <1> jne .not_testhook_or_jmpfarindirect 3898 00001D01 26807F022E <1> cmp byte [es:bx + 2], 2Eh 3899 00001D06 7512 <1> jne .not_testhook_or_jmpfarindirect 3900 00001D08 268B5F03 <1> mov bx, word [es:bx + 3] 3901 00001D0C 83FBFC <1> cmp bx, -4 3902 00001D0F 7709 <1> ja .not_testhook_or_jmpfarindirect 3903 00001D11 26FF7702 <1> push word [es:bx + 2] 3904 00001D15 26FF37 <1> push word [es:bx] 3905 00001D18 EB94 <1> jmp @B 3906 <1> 3907 <1> .not_testhook_or_jmpfarindirect: 3908 00001D1A F9 <1> stc 3909 00001D1B C3 <1> retn 3910 <1> 3911 <1> 3912 <1> gateout.mcbname: 3913 00001D1C F6C501 <1> test ch, 1 3914 00001D1F 7503E99A00 <1> jz .ret 3915 00001D24 8B16[DA0A] <1> mov dx, word [firstmcb] 3916 00001D28 83FAFF <1> cmp dx, -1 3917 00001D2B 7503E98E00 <1> je .ret 3918 00001D30 51 <1> push cx 3919 00001D31 A1[700B] <1> mov ax, word [intaddress] 3920 00001D34 B104 <1> mov cl, 4 3921 00001D36 D3E8 <1> shr ax, cl 3922 00001D38 0306[720B] <1> add ax, word [intaddress + 2] ; => segment of handler 3923 00001D3C 7251 <1> jc .hma 3924 <1> .loop: 3925 <1> %if _PM 3926 00001D3E E82FB7 <1> call setes2dx 3927 <1> %else 3928 <1> mov es, dx 3929 <1> %endif 3930 00001D41 89D1 <1> mov cx, dx 3931 00001D43 26030E0300 <1> add cx, word [es:3] 3932 00001D48 41 <1> inc cx 3933 00001D49 39D0 <1> cmp ax, dx 3934 00001D4B 7247 <1> jb .next 3935 00001D4D 39C8 <1> cmp ax, cx 3936 00001D4F 7343 <1> jae .next 3937 00001D51 268B160100 <1> mov dx, word [es:1] 3938 00001D56 BE[9E69] <1> mov si, msg.di_system_mcb 3939 00001D59 83FA50 <1> cmp dx, 50h 3940 00001D5C 725A <1> jb .copy 3941 00001D5E 4A <1> dec dx 3942 <1> %if _PM 3943 00001D5F E80EB7 <1> call setes2dx 3944 <1> %else 3945 <1> mov es, dx 3946 <1> %endif 3947 00001D62 06 <1> push es 3948 00001D63 1F <1> pop ds 3949 00001D64 16 <1> push ss 3950 00001D65 07 <1> pop es 3951 00001D66 B020 <1> mov al, 32 3952 00001D68 AA <1> stosb 3953 00001D69 89F8 <1> mov ax, di 3954 00001D6B BE0800 <1> mov si, 8 3955 00001D6E 89F1 <1> mov cx, si 3956 00001D70 57 <1> push di 3957 00001D71 F3A4 <1> rep movsb 3958 00001D73 B000 <1> mov al, 0 3959 00001D75 AA <1> stosb ; append zero-value byte 3960 00001D76 5F <1> pop di ; -> name in buffer 3961 00001D77 16 <1> push ss 3962 00001D78 1F <1> pop ds 3963 <1> @@: 3964 00001D79 AE <1> scasb ; is it zero ? 3965 00001D7A 75FD <1> jne @B ; no, continue --> 3966 <1> ; first dec makes it -> at the zero 3967 <1> @@: 3968 00001D7C 4F <1> dec di 3969 00001D7D 39F8 <1> cmp ax, di 3970 00001D7F 7408 <1> je .empty 3971 00001D81 807DFF20 <1> cmp byte [di - 1], 32 3972 00001D85 74F5 <1> je @B 3973 00001D87 EB34 <1> jmp .ret_cx 3974 <1> 3975 <1> .empty: 3976 00001D89 4F <1> dec di 3977 00001D8A BE[8E69] <1> mov si, msg.di_empty 3978 00001D8D EB29 <1> jmp .copy 3979 <1> 3980 <1> .hma: 3981 00001D8F BE[C869] <1> mov si, msg.di_hma 3982 00001D92 EB24 <1> jmp .copy 3983 <1> 3984 <1> .next: 3985 00001D94 89CA <1> mov dx, cx 3986 00001D96 3B16[DC0A] <1> cmp dx, word [firstumcb]; is next one the first UMCB ? 3987 00001D9A 74A2 <1> je .loop ; yes, ignore the "Z" (if any) --> 3988 00001D9C 26803E00004D <1> cmp byte [es:0], "M" ; check current signature 3989 00001DA2 749A <1> je .loop ; if "M" then loop to next --> 3990 <1> 3991 00001DA4 8B36[DC0A] <1> mov si, word [firstumcb] 3992 00001DA8 46 <1> inc si 3993 00001DA9 7503 <1> jnz @F 3994 00001DAB BE00A0 <1> mov si, 0A000h 3995 <1> @@: 3996 00001DAE 39F0 <1> cmp ax, si 3997 00001DB0 BE[AA69] <1> mov si, msg.di_system_upper 3998 00001DB3 7303 <1> jae @F 3999 00001DB5 BE[B969] <1> mov si, msg.di_system_low 4000 <1> @@: 4001 <1> .copy: 4002 00001DB8 16 <1> push ss 4003 00001DB9 07 <1> pop es 4004 00001DBA E8A217 <1> call copy_single_counted_string 4005 <1> .ret_cx: 4006 00001DBD 59 <1> pop cx 4007 <1> .ret: 4008 00001DBE C3 <1> retn 4009 <1> 4010 <1> %endif 4011 <1> 4012 <1> %if _MCB 4013 <1> ; DM command 4014 <1> mcbout: 4015 00001DBF E80F9E <1> call skipwhite 4016 00001DC2 8B16[DA0A] <1> mov dx, word [firstmcb] 4017 00001DC6 E8B39D <1> call iseol? 4018 00001DC9 7406 <1> je .lolmcb 4019 00001DCB E88D9C <1> call getword 4020 00001DCE E8C09D <1> call chkeol 4021 <1> .lolmcb: 4022 00001DD1 89D6 <1> mov si, dx 4023 00001DD3 BF[0E08] <1> mov di, line_out 4024 00001DD6 B85053 <1> mov ax, "PS" 4025 00001DD9 AB <1> stosw 4026 00001DDA B8503A <1> mov ax, "P:" 4027 00001DDD AB <1> stosw 4028 00001DDE B020 <1> mov al, 32 4029 00001DE0 AA <1> stosb 4030 00001DE1 A1[AE0A] <1> mov ax, word [pspdbe] 4031 00001DE4 E8959E <1> call hexword 4032 00001DE7 E8CA9E <1> call putsline_crlf ; destroys cx,dx,bx 4033 00001DEA B14D <1> mov cl, 'M' 4034 <1> .next: 4035 00001DEC 83FEFF <1> cmp si, byte -1 4036 00001DEF 7405 <1> je .invmcb 4037 00001DF1 83FE50 <1> cmp si, byte 50h 4038 00001DF4 7306 <1> jae .valmcb 4039 <1> .invmcb: 4040 00001DF6 BA[505F] <1> mov dx, msg.invmcbadr 4041 00001DF9 E937A2 <1> jmp putsz 4042 <1> .valmcb: 4043 00001DFC BF[0E08] <1> mov di, line_out 4044 00001DFF 1E <1> push ds 4045 <1> %if _PM 4046 00001E00 E8D600 <1> call setds2si 4047 <1> %else 4048 <1> mov ds, si 4049 <1> %endif 4050 00001E03 8A2E0000 <1> mov ch, byte [0000] 4051 00001E07 8B1E0100 <1> mov bx, word [0001] 4052 00001E0B 8B160300 <1> mov dx, word [0003] 4053 <1> 4054 00001E0F 89F0 <1> mov ax, si 4055 00001E11 E8689E <1> call hexword ; segment address of MCB 4056 00001E14 B020 <1> mov al, 32 4057 00001E16 AA <1> stosb 4058 00001E17 88E8 <1> mov al, ch 4059 00001E19 E8679E <1> call hexbyte ; 'M' or 'Z' 4060 00001E1C B020 <1> mov al, 32 4061 00001E1E AA <1> stosb 4062 00001E1F 89D8 <1> mov ax, bx 4063 00001E21 E8589E <1> call hexword ; MCB owner 4064 00001E24 B020 <1> mov al, 32 4065 00001E26 AA <1> stosb 4066 00001E27 89D0 <1> mov ax, dx 4067 00001E29 E8509E <1> call hexword ; MCB size in paragraphs 4068 <1> 4069 00001E2C B020 <1> mov al, 32 4070 00001E2E AA <1> stosb 4071 00001E2F 89D0 <1> mov ax, dx ; ax = size in paragraphs 4072 00001E31 53 <1> push bx 4073 00001E32 50 <1> push ax 4074 00001E33 52 <1> push dx 4075 00001E34 51 <1> push cx 4076 00001E35 31D2 <1> xor dx, dx ; dx:ax = size in paragraphs 4077 00001E37 B91000 <1> mov cx, 16 ; cx = 16, multiplier (get size in bytes) 4078 00001E3A BB0800 <1> mov bx, 4+4 ; bx = 4+4, width 4079 <1> 4080 00001E3D E87801 <1> call disp_dxax_times_cx_width_bx_size.store 4081 00001E40 59 <1> pop cx 4082 00001E41 5A <1> pop dx 4083 00001E42 58 <1> pop ax 4084 00001E43 5B <1> pop bx 4085 <1> 4086 00001E44 85DB <1> test bx, bx 4087 00001E46 7472 <1> jz .freemcb ; free MCBs have no name --> 4088 00001E48 B020 <1> mov al, 32 4089 00001E4A AA <1> stosb 4090 00001E4B 56 <1> push si 4091 00001E4C 51 <1> push cx 4092 00001E4D 52 <1> push dx 4093 <1> 4094 00001E4E 1E <1> push ds 4095 00001E4F BE0800 <1> mov si, 8 4096 00001E52 B90200 <1> mov cx, 2 4097 00001E55 39F3 <1> cmp bx, si ; is it a "system" MCB? (owner 0008h or 0007h) 4098 00001E57 7707 <1> ja @F 4099 00001E59 803C53 <1> cmp byte [si], "S" ; "S", "SD", "SC" ? 4100 00001E5C 7408 <1> je .nextmcbchar ; yes, limit name to two characters --> 4101 00001E5E EB04 <1> jmp .nextmcbchar_cx_si ; no, assume full name given 4102 <1> @@: 4103 00001E60 4B <1> dec bx ; => owner block's MCB 4104 <1> %if _PM 4105 00001E61 E87700 <1> call setds2bx 4106 <1> %else 4107 <1> mov ds, bx 4108 <1> %endif 4109 <1> .nextmcbchar_cx_si: 4110 00001E64 89F1 <1> mov cx, si ; = 8 4111 <1> .nextmcbchar: ; copy name of owner MCB 4112 00001E66 AC <1> lodsb 4113 00001E67 AA <1> stosb 4114 00001E68 08C0 <1> or al, al 4115 00001E6A E0FA <1> loopnz .nextmcbchar ; was not NUL and more bytes left ? 4116 00001E6C 84C0 <1> test al, al 4117 00001E6E 7501 <1> jnz @F 4118 00001E70 4F <1> dec di 4119 <1> @@: 4120 00001E71 1F <1> pop ds 4121 <1> 4122 00001E72 833E010008 <1> cmp word [1], 8 4123 00001E77 753E <1> jne .not_s_mcb 4124 00001E79 833E080053 <1> cmp word [8], "S" ; S MCB ? 4125 00001E7E 7537 <1> jne .not_s_mcb 4126 <1> 4127 00001E80 B82074 <1> mov ax, " t" 4128 00001E83 AB <1> stosw 4129 00001E84 B87970 <1> mov ax, "yp" 4130 00001E87 AB <1> stosw 4131 00001E88 B86520 <1> mov ax, "e " 4132 00001E8B AB <1> stosw 4133 <1> 4134 00001E8C 31C0 <1> xor ax, ax 4135 00001E8E A00A00 <1> mov al, [10] 4136 00001E91 E8EF9D <1> call hexbyte 4137 <1> 4138 00001E94 16 <1> push ss 4139 00001E95 1F <1> pop ds 4140 00001E96 BE[9874] <1> mov si, smcbtypes 4141 <1> .s_mcb_loop: 4142 00001E99 833CFF <1> cmp word [si], -1 4143 00001E9C 740E <1> je .s_mcb_unknown 4144 00001E9E 3904 <1> cmp word [si], ax 4145 00001EA0 7405 <1> je .s_mcb_known 4146 00001EA2 83C604 <1> add si, 4 4147 00001EA5 EBF2 <1> jmp .s_mcb_loop 4148 <1> 4149 <1> .s_mcb_known: 4150 00001EA7 8B7402 <1> mov si, word [si + 2] 4151 00001EAA EB03 <1> jmp .s_mcb_common 4152 <1> 4153 <1> .s_mcb_unknown: 4154 00001EAC BE[4176] <1> mov si, smcbmsg_unknown 4155 <1> .s_mcb_common: 4156 00001EAF B020 <1> mov al, 32 4157 <1> @@: 4158 00001EB1 AA <1> stosb 4159 00001EB2 AC <1> lodsb 4160 00001EB3 84C0 <1> test al, al 4161 00001EB5 75FA <1> jnz @B 4162 <1> 4163 <1> .not_s_mcb: 4164 00001EB7 5A <1> pop dx 4165 00001EB8 59 <1> pop cx 4166 00001EB9 5E <1> pop si 4167 <1> .freemcb: 4168 <1> 4169 00001EBA 1F <1> pop ds 4170 00001EBB 80FD4D <1> cmp ch, 'M' 4171 00001EBE 7406 <1> je .disp 4172 00001EC0 80FD5A <1> cmp ch, 'Z' 4173 00001EC3 7401 <1> je .disp 4174 <1> .ret: 4175 00001EC5 C3 <1> retn 4176 <1> 4177 <1> .disp: 4178 00001EC6 88E9 <1> mov cl, ch 4179 00001EC8 52 <1> push dx 4180 00001EC9 51 <1> push cx 4181 00001ECA E8E79D <1> call putsline_crlf ; destroys cx,dx,bx 4182 00001ECD 59 <1> pop cx 4183 00001ECE 5A <1> pop dx 4184 00001ECF 01D6 <1> add si, dx 4185 00001ED1 72F2 <1> jc .ret ; over FFFFh, must be end of chain --> (hmm) 4186 00001ED3 46 <1> inc si 4187 00001ED4 74EF <1> jz .ret 4188 00001ED6 E913FF <1> jmp .next 4189 <1> 4190 <1> %if _PM 4191 <1> setds2si: 4192 00001ED9 89F3 <1> mov bx, si 4193 <1> setds2bx: 4194 00001EDB E8F774 <1> call ispm 4195 00001EDE 7505 <1> jnz sd2s_ex 4196 00001EE0 89DA <1> mov dx, bx 4197 00001EE2 E80A7C <1> call setrmsegm 4198 <1> sd2s_ex: 4199 00001EE5 8EDB <1> mov ds, bx 4200 00001EE7 C3 <1> retn 4201 <1> %endif ; _PM 4202 <1> %endif ; _MCB 4203 <1> 4204 <1> ;--- DX command. Display extended memory 4205 <1> 4206 <1> %if _PM 4207 <1> [cpu 386] 4208 <1> extmem: 4209 00001EE8 8B16[680B] <1> mov dx, word [x_addr+0] 4210 00001EEC 8B1E[6A0B] <1> mov bx, word [x_addr+2] 4211 00001EF0 E8DE9C <1> call skipwhite 4212 00001EF3 E8869C <1> call iseol? 4213 00001EF6 7406 <1> je extmem_1 4214 00001EF8 E87A96 <1> call getdword ; get linear address into bx:dx 4215 00001EFB E8939C <1> call chkeol ; expect end of line here 4216 <1> extmem_1: 4217 00001EFE C706[E60B][E81E] <1> mov word [lastcmd], extmem 4218 00001F04 53 <1> push bx 4219 00001F05 52 <1> push dx 4220 00001F06 665D <1> pop ebp 4221 <1> 4222 00001F08 BF[400A] <1> mov di, stack ; create a GDT for Int15.87 4223 00001F0B 31C0 <1> xor ax, ax 4224 00001F0D B90800 <1> mov cx, 8 4225 00001F10 F3AB <1> rep stosw 4226 00001F12 B87F00 <1> mov ax, 007Fh 4227 00001F15 AB <1> stosw 4228 00001F16 89D0 <1> mov ax, dx 4229 00001F18 AB <1> stosw 4230 00001F19 88D8 <1> mov al, bl 4231 00001F1B AA <1> stosb 4232 00001F1C B89300 <1> mov ax, 0093h 4233 00001F1F AB <1> stosw 4234 00001F20 88F8 <1> mov al, bh 4235 00001F22 AA <1> stosb 4236 00001F23 B87F00 <1> mov ax, 007Fh 4237 00001F26 AB <1> stosw 4238 00001F27 B8[8000] <1> mov ax, line_in+128 4239 00001F2A 8B1E[B00A] <1> mov bx, word [pspdbg] 4240 00001F2E 660FB7DB <1> movzx ebx, bx 4241 00001F32 66C1E304 <1> shl ebx, 4 4242 00001F36 660FB7C0 <1> movzx eax, ax 4243 00001F3A 6601D8 <1> add eax, ebx ; eax = flat address of line_in+128 4244 00001F3D AB <1> stosw 4245 00001F3E 66C1E810 <1> shr eax, 16 4246 00001F42 AA <1> stosb 4247 00001F43 88E3 <1> mov bl, ah 4248 00001F45 B89300 <1> mov ax, 0093h 4249 00001F48 AB <1> stosw 4250 00001F49 88D8 <1> mov al, bl 4251 00001F4B AA <1> stosb 4252 00001F4C B90800 <1> mov cx, 8 4253 00001F4F 31C0 <1> xor ax, ax 4254 00001F51 F3AB <1> rep stosw 4255 <1> 4256 00001F53 E87F74 <1> call ispm 4257 00001F56 BE[400A] <1> mov si, stack 4258 00001F59 B94000 <1> mov cx, 0040h 4259 00001F5C B487 <1> mov ah, 87h 4260 00001F5E 750B <1> jnz extmem_rm 4261 00001F60 FF36[B00A] <1> push word [pspdbg] 4262 00001F64 6A15 <1> push 15h 4263 00001F66 E8BB75 <1> call intcall 4264 00001F69 EB02 <1> jmp short i15ok 4265 <1> extmem_rm: 4266 00001F6B CD15 <1> int 15h 4267 <1> i15ok: 4268 00001F6D 7247 <1> jc extmem_exit 4269 00001F6F BE[8000] <1> mov si, line_in+128 4270 00001F72 B508 <1> mov ch, 8h 4271 <1> nexti15l: 4272 00001F74 E8FB21 <1> call handle_serial_flags_ctrl_c 4273 00001F77 BF[0E08] <1> mov di, line_out 4274 00001F7A 6689E8 <1> mov eax, ebp 4275 00001F7D 66C1E810 <1> shr eax, 16 4276 00001F81 E8F89C <1> call hexword 4277 00001F84 89E8 <1> mov ax, bp 4278 00001F86 E8F39C <1> call hexword 4279 00001F89 B82020 <1> mov ax, 32<<8|32 4280 00001F8C AB <1> stosw 4281 00001F8D BB[4808] <1> mov bx, line_out+10+3*16 4282 00001F90 B110 <1> mov cl, 10h 4283 <1> nexti15b: 4284 00001F92 AC <1> lodsb 4285 00001F93 E88EF6 <1> call dd_store 4286 00001F96 B020 <1> mov al, 32 4287 00001F98 AA <1> stosb 4288 00001F99 FEC9 <1> dec cl 4289 00001F9B 75F5 <1> jnz nexti15b 4290 00001F9D C645E72D <1> mov byte [di-(8*3+1)], '-' ; display a '-' after 8 bytes 4291 00001FA1 83C710 <1> add di, 16 4292 00001FA4 51 <1> push cx 4293 00001FA5 E80C9D <1> call putsline_crlf 4294 00001FA8 59 <1> pop cx 4295 00001FA9 6683C510 <1> add ebp, byte 10h 4296 00001FAD FECD <1> dec ch 4297 00001FAF 75C3 <1> jnz nexti15l 4298 00001FB1 66892E[680B] <1> mov dword [x_addr], ebp 4299 <1> extmem_exit: 4300 00001FB6 C3 <1> retn 4301 <1> __CPU__ 4302 <1> %endif 4303 <1> 4304 <1> ; INP: dx:ax = numerator 4305 <1> ; cx = multiplier (0 to take si:dx:ax as numerator) 4306 <1> ; bx = field width 4307 <1> ; es:di -> buffer where to store 4308 <1> ; STT: UP, ds = ss 4309 <1> ; OUT: written to buffer, es:di -> behind written string 4310 <1> disp_dxax_times_cx_width_bx_size: 4311 00001FB7 A8 <1> db __TEST_IMM8 ; (skip stc, NC) 4312 <1> .store: 4313 00001FB8 F9 <1> stc 4314 <1> 4315 <1> lframe near 4316 <1> lequ 4 + 4 + 2, buffer_size 4317 <1> ; 4: "2048" (maximum number) 4318 <1> ; 4: " ?iB" (IEC prefixed unit) 4319 <1> ; 2: ??? 4320 <1> lvar ?buffer_size, buffer 4321 <1> lvar 6, dividend 4322 00001FB9 5589E58D66F0 <1> lenter 4323 <1> lvar word, bit_0_is_store 4324 00001FBF 9C <1> pushf 4325 <1> lvar word, width 4326 00001FC0 53 <1> push bx 4327 00001FC1 56 <1> push si 4328 00001FC2 1E <1> push ds 4329 00001FC3 51 <1> push cx 4330 00001FC4 50 <1> push ax 4331 00001FC5 52 <1> push dx 4332 00001FC6 06 <1> push es 4333 00001FC7 57 <1> push di 4334 <1> 4335 00001FC8 16 <1> push ss ; push cs 4336 00001FC9 1F <1> pop ds 4337 00001FCA 16 <1> push ss 4338 00001FCB 07 <1> pop es 4339 <1> 4340 00001FCC E310 <1> jcxz .use_si 4341 <1> 4342 00001FCE 52 <1> push dx 4343 00001FCF F7E1 <1> mul cx 4344 00001FD1 97 <1> xchg ax, di 4345 00001FD2 87D6 <1> xchg dx, si ; si:di = first mul 4346 <1> 4347 00001FD4 58 <1> pop ax 4348 00001FD5 F7E1 <1> mul cx 4349 00001FD7 01F0 <1> add ax, si 4350 00001FD9 83D200 <1> adc dx, 0 ; dx:ax = second mul + adj, dx:ax:di = mul 4351 <1> 4352 00001FDC EB05 <1> jmp @F 4353 <1> 4354 <1> .use_si: 4355 00001FDE 89C7 <1> mov di, ax 4356 00001FE0 92 <1> xchg ax, dx 4357 00001FE1 89F2 <1> mov dx, si 4358 <1> 4359 <1> @@: 4360 00001FE3 897EF0 <1> mov word [bp + ?dividend], di 4361 00001FE6 8946F2 <1> mov word [bp + ?dividend + 2], ax 4362 00001FE9 8956F4 <1> mov word [bp + ?dividend + 4], dx 4363 <1> 4364 <1> ; set up divisor for the unit prefixes 4365 00001FEC B90004 <1> mov cx, 1024 ; 1000 here if SI units 4366 00001FEF F606[7D00]10 <1> testopt [options], use_si_units ; SI units ? 4367 00001FF4 7403 <1> jz @F ; no --> 4368 00001FF6 B9E803 <1> mov cx, 1000 ; yes, use 1000 4369 <1> @@: 4370 <1> 4371 00001FF9 BE[546D] <1> mov si, msg.prefixes ; -> first prefix (blank) 4372 <1> .loop: 4373 00001FFC 837EF400 <1> cmp word [bp + ?dividend + 4], 0 4374 00002000 750D <1> jnz .divide 4375 00002002 837EF200 <1> cmp word [bp + ?dividend + 2], 0 4376 00002006 7507 <1> jnz .divide 4377 00002008 817EF00008 <1> cmp word [bp + ?dividend], 2048 4378 0000200D 7614 <1> jbe .end 4379 <1> .divide: 4380 0000200F 46 <1> inc si ; -> next prefix 4381 <1> 4382 00002010 31D2 <1> xor dx, dx 4383 00002012 BF0600 <1> mov di, 6 4384 <1> .loop_divide: 4385 00002015 8B43EE <1> mov ax, [bp + ?dividend - 2 + di] 4386 00002018 F7F1 <1> div cx 4387 0000201A 8943EE <1> mov word [bp + ?dividend - 2 + di], ax 4388 0000201D 4F <1> dec di 4389 0000201E 4F <1> dec di 4390 0000201F 75F4 <1> jnz .loop_divide 4391 <1> ; dx = last remainder 4392 00002021 EBD9 <1> jmp .loop 4393 <1> 4394 <1> .end: 4395 00002023 8D7EFF <1> lea di, [bp + ?buffer + ?buffer_size - 1] 4396 00002026 FD <1> std ; _AMD_ERRATUM_109_WORKAROUND does not apply 4397 00002027 B042 <1> mov al, "B" 4398 00002029 AA <1> stosb 4399 0000202A 8A04 <1> mov al, [si] 4400 0000202C 3C20 <1> cmp al, 32 4401 0000202E 7416 <1> je @FF 4402 <1> 4403 00002030 F606[7D00]10 <1> testopt [options], use_si_units 4404 <1> ; SI units ? 4405 00002035 750E <1> jnz @F ; yes --> 4406 00002037 24DF <1> and al, ~20h ; uppercase, don't do this if SI units 4407 00002039 F606[7D00]20 <1> testopt [options], use_jedec_units 4408 <1> ; JEDEC units ? 4409 0000203E 7505 <1> jnz @F ; yes --> 4410 00002040 50 <1> push ax 4411 00002041 B069 <1> mov al, "i" 4412 00002043 AA <1> stosb ; don't store this if SI or JEDEC units 4413 00002044 58 <1> pop ax 4414 <1> @@: 4415 00002045 AA <1> stosb 4416 <1> @@: 4417 00002046 B020 <1> mov al, 32 4418 00002048 AA <1> stosb 4419 <1> 4420 00002049 8B46F0 <1> mov ax, word [bp + ?dividend] 4421 0000204C B90A00 <1> mov cx, 10 4422 <1> .loop_write: 4423 0000204F 31D2 <1> xor dx, dx 4424 00002051 F7F1 <1> div cx 4425 00002053 92 <1> xchg ax, dx 4426 <1> ; ax = remainder (next digit) 4427 <1> ; dx = result of div 4428 00002054 0430 <1> add al, '0' 4429 00002056 AA <1> stosb 4430 00002057 92 <1> xchg ax, dx ; ax = result of div 4431 00002058 85C0 <1> test ax, ax ; any more ? 4432 0000205A 75F3 <1> jnz .loop_write ; loop --> 4433 <1> 4434 0000205C FC <1> cld 4435 <1> 4436 0000205D 47 <1> inc di ; -> first digit 4437 0000205E 8D5E00 <1> lea bx, [bp + ?buffer + ?buffer_size] 4438 <1> ; -> behind 'B' 4439 00002061 29FB <1> sub bx, di ; = length of string 4440 00002063 89FE <1> mov si, di 4441 <1> 4442 00002065 5F <1> pop di 4443 00002066 07 <1> pop es ; restore es:di 4444 <1> ; -> where to store (if storing) 4445 <1> 4446 00002067 8B4EEC <1> mov cx, [bp + ?width] 4447 0000206A 29D9 <1> sub cx, bx 4448 0000206C 760F <1> jbe .none_blank 4449 0000206E B020 <1> mov al, 32 4450 00002070 F646EE01 <1> test byte [bp + ?bit_0_is_store], 1 4451 00002074 7505 <1> jnz @F 4452 <1> .loop_blank_disp: 4453 00002076 E8DD9F <1> call disp_al 4454 00002079 E2FB <1> loop .loop_blank_disp 4455 <1> ; now cx = 0 so the rep stosb is a nop 4456 <1> @@: 4457 0000207B F3AA <1> rep stosb 4458 <1> .none_blank: 4459 <1> 4460 <1> 4461 0000207D 89D9 <1> mov cx, bx 4462 0000207F F646EE01 <1> test byte [bp + ?bit_0_is_store], 1 4463 00002083 7506 <1> jnz @F 4464 <1> 4465 <1> ; ! note ss = ds 4466 00002085 89F2 <1> mov dx, si ; ds:dx -> string 4467 00002087 E8233F <1> call disp_message_length_cx 4468 0000208A A9 <1> db __TEST_IMM16 ; (skip rep movsb) 4469 <1> @@: 4470 <1> ; ! note ss = ds 4471 <1> ; ds:si -> string, cx = length 4472 0000208B F3A4 <1> rep movsb 4473 <1> 4474 0000208D 5A <1> pop dx 4475 0000208E 58 <1> pop ax 4476 0000208F 59 <1> pop cx 4477 00002090 1F <1> pop ds 4478 00002091 5E <1> pop si 4479 00002092 5B <1> pop bx 4480 00002093 89EC5D <1> lleave 4481 00002096 C3 <1> lret 4482 <1> 2182 %include "rr.asm" 2183 <1> 2184 <1> %if 0 2185 <1> 2186 <1> lDebug R commands - Register access 2187 <1> 2188 <1> Copyright (C) 1995-2003 Paul Vojta 2189 <1> Copyright (C) 2008-2012 C. Masloch 2190 <1> 2191 <1> Usage of the works is permitted provided that this 2192 <1> instrument is retained with the works, so that any entity 2193 <1> that uses the works is notified of this instrument. 2194 <1> 2195 <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 2196 <1> 2197 <1> %endif 2198 <1> 2199 <1> 2200 <1> usesection lDEBUG_CODE 2201 <1> 2202 <1> ; R command - dump and manipulate registers. 2203 <1> rr: 2204 00002097 E8E29A <1> call iseol? 2205 0000209A 7503E9A007 <1> je dumpregs ; if no parameters --> 2206 <1> 2207 0000209F E8796D <1> call uppercase 2208 000020A2 3C45 <1> cmp al, 'E' 2209 000020A4 7514 <1> jne @F 2210 <1> 2211 000020A6 50 <1> push ax 2212 000020A7 56 <1> push si 2213 000020A8 AC <1> lodsb 2214 000020A9 3C2E <1> cmp al, '.' 2215 000020AB 7503E9C905 <1> je re_cmd 2216 000020B0 E8C99A <1> call iseol? 2217 000020B3 5E <1> pop si 2218 000020B4 58 <1> pop ax 2219 000020B5 7503E9DA06 <1> je dumpregs_extended 2220 <1> @@: 2221 <1> 2222 000020BA 3C43 <1> cmp al, 'C' 2223 000020BC 7514 <1> jne @F 2224 <1> 2225 000020BE 50 <1> push ax 2226 000020BF 56 <1> push si 2227 000020C0 AC <1> lodsb 2228 000020C1 3C2E <1> cmp al, '.' 2229 000020C3 7503E9A905 <1> je rc_cmd 2230 000020C8 E8B19A <1> call iseol? 2231 000020CB 5E <1> pop si 2232 000020CC 58 <1> pop ax 2233 000020CD 7503E9A306 <1> je rc_run 2234 <1> @@: 2235 <1> 2236 <1> %if !_ONLYNON386 || (_OPTIONS || _VARIABLES) || _MMXSUPP || _RN 2237 000020D2 4E <1> dec si 2238 000020D3 BA[6165] <1> mov dx, msg.vv 2239 000020D6 E8449A <1> call isstring? 2240 000020D9 7503E9F70B <1> je dumpallvars 2241 000020DE BA[6465] <1> mov dx, msg.vm 2242 000020E1 E8399A <1> call isstring? 2243 000020E4 7503E9310C <1> je dumpmemory 2244 000020E9 BA[6765] <1> mov dx, msg.vp 2245 000020EC E82E9A <1> call isstring? 2246 000020EF 7503E9810C <1> je dumpprocess 2247 000020F4 AC <1> lodsb 2248 000020F5 E8236D <1> call uppercase 2249 <1> 2250 000020F8 50 <1> push ax 2251 000020F9 56 <1> push si 2252 000020FA E8D49A <1> call skipwhite 2253 000020FD E87C9A <1> call iseol? ; line ends after single character ? 2254 00002100 5E <1> pop si 2255 00002101 58 <1> pop ax 2256 00002102 7550 <1> jne short rr1 ; no, not other kinds of dumps --> 2257 <1> 2258 00002104 3C46 <1> cmp al, 'F' ; only valid input to a later check 2259 00002106 7503E9D703 <1> je rr2.writeprompt ; so go there --> 2260 <1> ; (note that byte [si-1] must != '.') 2261 <1> %if _OPTIONS || _VARIABLES 2262 0000210B 3C56 <1> cmp al, 'V' 2263 0000210D 7503E9DF0A <1> je dumpvars 2264 <1> %endif 2265 <1> %if _MMXSUPP 2266 00002112 3C4D <1> cmp al, 'M' 2267 00002114 750A <1> jne .notrm 2268 00002116 803E[F20A]00 <1> cmp byte [has_mmx], 0 2269 0000211B 7403 <1> je .notrm 2270 0000211D E9CD0C <1> jmp dumpregsMMX 2271 <1> .notrm: 2272 <1> %endif 2273 00002120 3C58 <1> _386 cmp al, 'X' 2274 00002122 7411 <1> _386 je short rrx 2275 <1> %if _RN 2276 00002124 3C4E <1> cmp al, 'N' 2277 00002126 750A <1> jne .notrn 2278 00002128 803E[EF0A]00 <1> cmp byte [has_87], 0 2279 0000212D 7403 <1> je .notrn 2280 0000212F E92209 <1> jmp dumpregsFPU 2281 <1> .notrn: 2282 <1> %endif 2283 00002132 E91586 <1> jmp error ; all other single characters are invalid 2284 <1> %endif 2285 <1> 2286 <1> %ifn _ONLYNON386 2287 <1> rrx: 2288 00002135 AC <1> lodsb 2289 00002136 E8589A <1> call chkeol 2290 00002139 8036[7C00]01 <1> xoropt [options], dispregs32 2291 0000213E BA[7B5E] <1> mov dx, msg.regs386 2292 00002141 E8EF9E <1> call putsz 2293 00002144 BA[925E] <1> mov dx, msg.regs386_on 2294 00002147 F606[7C00]01 <1> testopt [options], dispregs32 2295 0000214C 7503 <1> jnz .on 2296 0000214E BA[8E5E] <1> mov dx, msg.regs386_off 2297 <1> .on: 2298 00002151 E9DF9E <1> jmp putsz 2299 <1> %endif 2300 <1> 2301 <1> rr1: 2302 <1> lframe 2303 <1> lvar dword, offset 2304 <1> lvar word, segsel 2305 <1> lvar word, memsizestring 2306 <1> lvar word, ismem_high_size_low 2307 <1> lequ ?ismem_high_size_low, size 2308 <1> lequ ?ismem_high_size_low + 1, ismem 2309 <1> lvar word, hhtype_high_rrtype_low 2310 <1> lequ ?hhtype_high_rrtype_low, replace_rrtype 2311 <1> %define rrtype bp + ?replace_rrtype 2312 <1> lequ ?hhtype_high_rrtype_low + 1, hhtype 2313 <1> lvar word, replace_rrmask 2314 <1> %define rrmask bp + ?replace_rrmask 2315 <1> lvar word, hhoffset 2316 <1> lequ 16, namebufferlength 2317 <1> lvar ?namebufferlength, namebuffer 2318 00002154 5589E58D66E0 <1> lenter 2319 0000215A 89E7 <1> mov di, sp ; -> ?namebuffer 2320 0000215C E81B90 <1> call isvariable?.return_name 2321 0000215F 7203E93501 <1> jnc rr1_variable 2322 <1> 2323 00002164 4E <1> dec si 2324 00002165 BA[4868] <1> mov dx, msg.byte 2325 00002168 BB0101 <1> mov bx, 101h 2326 0000216B 52 <1> push dx 2327 0000216C E8AE99 <1> call isstring? 2328 0000216F 7428 <1> je rr1_memory 2329 00002171 5A <1> pop dx 2330 00002172 BA[4268] <1> mov dx, msg.word 2331 00002175 43 <1> inc bx ; = 102h 2332 00002176 52 <1> push dx 2333 00002177 E8A399 <1> call isstring? 2334 0000217A 741D <1> je rr1_memory 2335 0000217C 5A <1> pop dx 2336 0000217D BA[4768] <1> mov dx, msg.3byte 2337 00002180 43 <1> inc bx ; = 103h 2338 00002181 52 <1> push dx 2339 00002182 E89899 <1> call isstring? 2340 00002185 7412 <1> je rr1_memory 2341 00002187 5A <1> pop dx 2342 00002188 BA[4168] <1> mov dx, msg.dword 2343 0000218B 43 <1> inc bx ; = 104h 2344 0000218C 52 <1> push dx 2345 0000218D E88D99 <1> call isstring? 2346 00002190 7407 <1> je rr1_memory 2347 <1> ; pop dx 2348 00002192 89EC5D <1> lleave code 2349 00002195 AC <1> lodsb 2350 00002196 E92703 <1> jmp rr2 2351 <1> 2352 <1> rr1_memory: 2353 00002199 8F46F8 <1> pop word [bp + ?memsizestring] 2354 0000219C 895EF6 <1> mov word [bp + ?ismem_high_size_low], bx 2355 <1> 2356 0000219F 31C0 <1> xor ax, ax 2357 000021A1 88D8 <1> mov al, bl 2358 000021A3 F7D8 <1> neg ax 2359 000021A5 05[8498] <1> add ax, masks + 4 ; 4 - size = offset into masks 2360 000021A8 8946F2 <1> mov word [rrmask], ax ; -> mask 2361 000021AB E8F499 <1> call skipcomma 2362 000021AE 3C5B <1> cmp al, '[' 2363 000021B0 7403E99585 <1> jne error 2364 000021B5 AC <1> lodsb 2365 000021B6 8B1E[900C] <1> mov bx, word [reg_ds] 2366 000021BA E8CA89 <1> call getaddrX 2367 000021BD 895EFA <1> mov word [bp + ?segsel], bx 2368 000021C0 66 <1> _386_PM_o32 2369 000021C1 8956FC <1> mov word [bp + ?offset], dx 2370 000021C4 E8DC99 <1> call skipcomm0 2371 000021C7 3C5D <1> cmp al, ']' 2372 000021C9 7403E97C85 <1> jne error 2373 <1> 2374 000021CE E8D199 <1> call skipcomma 2375 000021D1 3C2E <1> cmp al, '.' ; special ? 2376 000021D3 7405 <1> je short .writeprompt ; yes --> 2377 000021D5 E8A499 <1> call iseol? 2378 000021D8 7566 <1> jne short .noprompt 2379 <1> .writeprompt: 2380 <1> ; si -> behind dot if any 2381 000021DA BF[0E08] <1> mov di, line_out 2382 000021DD 56 <1> push si 2383 000021DE 8B76F8 <1> mov si, word [bp + ?memsizestring] 2384 <1> ; si -> size string (ASCIZ) 2385 000021E1 A8 <1> db __TEST_IMM8 ; (skip stosb) 2386 <1> @@: 2387 000021E2 AA <1> stosb ; store next byte 2388 000021E3 AC <1> lodsb ; load next byte 2389 000021E4 84C0 <1> test al, al ; is zero ? 2390 000021E6 75FA <1> jnz @B ; not yet, loop --> 2391 000021E8 5E <1> pop si ; (preserve si) 2392 000021E9 B8205B <1> mov ax, " [" 2393 000021EC AB <1> stosw 2394 000021ED 8B46FA <1> mov ax, word [bp + ?segsel] 2395 000021F0 89C3 <1> mov bx, ax 2396 000021F2 E8879A <1> call hexword 2397 000021F5 B03A <1> mov al, ':' 2398 000021F7 AA <1> stosb 2399 000021F8 66 <1> _386_PM_o32 2400 000021F9 8B46FC <1> mov ax, word [bp + ?offset] 2401 <1> %if _PM 2402 000021FC E8403D <1> call test_d_b_bit 2403 000021FF 7403 <1> jz .16 2404 00002201 E86C9A <1> call hexword_high 2405 <1> .16: 2406 <1> %endif 2407 00002204 E8759A <1> call hexword 2408 00002207 B85D20 <1> mov ax, "] " 2409 0000220A AB <1> stosw 2410 <1> 2411 0000220B E87E86 <1> call prephack 2412 0000220E E83700 <1> call rr1_read_mem_dxax 2413 <1> 2414 00002211 80F904 <1> cmp cl, 4 2415 00002214 7207 <1> jb .pnohigh 2416 00002216 92 <1> xchg ax, dx 2417 00002217 E8629A <1> call hexword ; display high word 2418 0000221A 92 <1> xchg ax, dx 2419 0000221B EB0C <1> jmp @F 2420 <1> .pnohigh: 2421 0000221D 80F903 <1> cmp cl, 3 2422 00002220 7207 <1> jb @F 2423 00002222 86C2 <1> xchg al, dl 2424 00002224 E85C9A <1> call hexbyte 2425 00002227 86C2 <1> xchg al, dl 2426 <1> @@: 2427 00002229 80F902 <1> cmp cl, 2 2428 0000222C 7207 <1> jb .pnobyte 2429 0000222E 86C4 <1> xchg al, ah 2430 00002230 E8509A <1> call hexbyte ; display high byte 2431 00002233 86C4 <1> xchg al, ah 2432 <1> .pnobyte: 2433 00002235 E84B9A <1> call hexbyte ; display low byte 2434 <1> 2435 00002238 E8FC03 <1> call dot_prompt 2436 0000223B 7503E9CC01 <1> je .return 2437 <1> .noprompt: 2438 00002240 31C9 <1> xor cx, cx 2439 00002242 8A4EF6 <1> mov cl, byte [bp + ?size] 2440 00002245 E9B900 <1> jmp rr1_common 2441 <1> 2442 <1> 2443 <1> ; OUT: cl = ?size 2444 <1> ; dx:ax = value read from memory 2445 <1> ; CHG: bx 2446 <1> rr1_read_mem_dxax: 2447 00002248 E86F86 <1> call dohack 2448 0000224B 31C0 <1> xor ax, ax 2449 0000224D 31D2 <1> xor dx, dx 2450 0000224F 8A4EF6 <1> mov cl, byte [bp + ?size] 2451 <1> %if _PM 2452 00002252 8B5EFA <1> mov bx, word [bp + ?segsel] 2453 00002255 E8E73C <1> call test_d_b_bit 2454 00002258 8EDB <1> mov ds, bx 2455 <1> %else 2456 <1> mov ds, word [bp + ?segsel] 2457 <1> %endif 2458 0000225A 66 <1> _386_PM_o32 2459 0000225B 8B5EFC <1> mov bx, word [bp + ?offset] 2460 <1> %if _PM 2461 0000225E 741D <1> jz .16 2462 <1> 2463 <1> [cpu 386] 2464 <1> .32: 2465 00002260 80F902 <1> cmp cl, 2 2466 00002263 7213 <1> jb .32_1 2467 00002265 740D <1> je .32_2 2468 00002267 80F904 <1> cmp cl, 4 2469 0000226A 7204 <1> jb .32_3 2470 <1> .32_4: 2471 0000226C 678A7303 <1> mov dh, byte [ebx + 3] 2472 <1> .32_3: 2473 00002270 678A5302 <1> mov dl, byte [ebx + 2] 2474 <1> .32_2: 2475 00002274 678A6301 <1> mov ah, byte [ebx + 1] 2476 <1> .32_1: 2477 00002278 678A03 <1> mov al, byte [ebx] 2478 0000227B EB17 <1> jmp .ret 2479 <1> __CPU__ 2480 <1> %endif 2481 <1> 2482 <1> .16: 2483 0000227D 80F902 <1> cmp cl, 2 2484 00002280 7210 <1> jb .16_1 2485 00002282 740B <1> je .16_2 2486 00002284 80F904 <1> cmp cl, 4 2487 00002287 7203 <1> jb .16_3 2488 <1> .16_4: 2489 00002289 8A7703 <1> mov dh, byte [bx + 3] 2490 <1> .16_3: 2491 0000228C 8A5702 <1> mov dl, byte [bx + 2] 2492 <1> .16_2: 2493 0000228F 8A6701 <1> mov ah, byte [bx + 1] 2494 <1> .16_1: 2495 00002292 8A07 <1> mov al, byte [bx] 2496 <1> .ret: 2497 00002294 16 <1> push ss 2498 00002295 1F <1> pop ds 2499 00002296 E95586 <1> jmp unhack 2500 <1> 2501 <1> 2502 <1> rr1_variable: 2503 00002299 897EF2 <1> mov word [rrmask], di ; -> mask of read-only bits 2504 0000229C 88C8 <1> mov al, cl 2505 0000229E B100 <1> mov cl, 0 2506 000022A0 4E <1> dec si ; (to reload al) 2507 000022A1 50 <1> push ax ; h = variable's field type, l = its size 2508 000022A2 B400 <1> mov ah, 0 2509 000022A4 8946F6 <1> mov word [bp + ?ismem_high_size_low], ax 2510 000022A7 86CD <1> xchg cl, ch ; cx = variable's name's length 2511 <1> 2512 000022A9 E8F698 <1> call skipcomma 2513 000022AC 3C2E <1> cmp al, '.' ; special ? 2514 000022AE 7405 <1> je short .writeprompt ; yes --> 2515 000022B0 E8C998 <1> call iseol? 2516 000022B3 7542 <1> jne short .noprompt 2517 <1> .writeprompt: 2518 000022B5 56 <1> push si ; -> behind dot if any 2519 000022B6 8D76E0 <1> lea si, [bp + ?namebuffer] 2520 <1> ; -> name 2521 000022B9 BF[0E08] <1> mov di, line_out 2522 000022BC F3A4 <1> rep movsb 2523 000022BE 5E <1> pop si ; -> behind dot if any 2524 000022BF B020 <1> mov al, 32 2525 000022C1 AA <1> stosb 2526 000022C2 59 <1> pop cx ; h = variable's field type, l = its size 2527 000022C3 87DA <1> xchg bx, dx 2528 000022C5 8B07 <1> mov ax, word [bx] 2529 000022C7 87DA <1> xchg bx, dx 2530 000022C9 51 <1> push cx 2531 000022CA 80F904 <1> cmp cl, 4 2532 000022CD 7205 <1> jb .pnohigh 2533 000022CF E8AA99 <1> call hexword ; display high word 2534 000022D2 EB08 <1> jmp @F 2535 <1> .pnohigh: 2536 000022D4 80F903 <1> cmp cl, 3 2537 000022D7 7203 <1> jb @F 2538 000022D9 E8A799 <1> call hexbyte 2539 <1> @@: 2540 000022DC 8B07 <1> mov ax, word [bx] 2541 000022DE 80F902 <1> cmp cl, 2 2542 000022E1 7207 <1> jb .pnobyte 2543 000022E3 86C4 <1> xchg al, ah 2544 000022E5 E89B99 <1> call hexbyte ; display high byte 2545 000022E8 86C4 <1> xchg al, ah 2546 <1> .pnobyte: 2547 000022EA E89699 <1> call hexbyte ; display low byte 2548 000022ED E84703 <1> call dot_prompt 2549 000022F0 59 <1> pop cx ; h = variable's field type, l = its size 2550 000022F1 7503E91601 <1> je .return 2551 000022F6 A8 <1> db __TEST_IMM8 ; (skip pop) 2552 <1> .noprompt: 2553 000022F7 59 <1> pop cx ; h = variable's field type, l = its size 2554 000022F8 84ED <1> test ch, ch 2555 000022FA 7403E91101 <1> jnz rr1_readonly 2556 000022FF 53 <1> push bx 2557 00002300 52 <1> push dx 2558 <1> rr1_common: 2559 00002301 884EF4 <1> mov byte [rrtype], cl 2560 00002304 51 <1> push cx 2561 00002305 50 <1> push ax 2562 00002306 56 <1> push si 2563 00002307 E83089 <1> call isoperator? 2564 0000230A 750E <1> jne .nooperator 2565 0000230C 89CB <1> mov bx, cx 2566 0000230E 01DB <1> add bx, bx ; bh = 0 ! 2567 00002310 50 <1> push ax 2568 00002311 FF97[0493] <1> call near [operatordispatchers+bx] 2569 00002315 58 <1> pop ax 2570 00002316 85DB <1> test bx, bx 2571 00002318 7504 <1> jnz .gotoperator 2572 <1> .nooperator: 2573 0000231A BB1800 <1> mov bx, OPERATOR_RIGHTOP; set default computation function 2574 0000231D A8 <1> db __TEST_IMM8 2575 <1> .gotoperator: 2576 0000231E AC <1> lodsb 2577 <1> 2578 0000231F E83803 <1> call isassignmentoperator? 2579 00002322 7317 <1> jnc .assign_op_done ; found an assignment operator --> 2580 00002324 83FB18 <1> cmp bx, OPERATOR_RIGHTOP; dummy (no operator specified) ? 2581 00002327 7412 <1> je .assign_op_done ; yes, assignment operator not required --> 2582 00002329 59 <1> pop cx 2583 0000232A 58 <1> pop ax ; restore al, si in front of operator 2584 0000232B 50 <1> push ax 2585 0000232C 51 <1> push cx 2586 0000232D 87F1 <1> xchg si, cx 2587 0000232F 51 <1> push cx 2588 00002330 E80189 <1> call isunaryoperator? ; is this a valid unary operator too ? 2589 00002333 59 <1> pop cx 2590 00002334 74E4 <1> je .nooperator ; yes --> 2591 00002336 87F1 <1> xchg si, cx 2592 <1> errorj9: equ $ 2593 00002338 E90F84 <1> jmp error ; error where the assignment operator needs to be 2594 <1> .assign_op_done: 2595 0000233B 59 <1> pop cx 2596 0000233C 59 <1> pop cx 2597 0000233D 59 <1> pop cx 2598 0000233E 53 <1> push bx 2599 0000233F 80FB17 <1> cmp bl, OPERATOR_COND 2600 00002342 7503E90384 <1> je error 2601 00002347 E85998 <1> call skipcomm0 2602 <1> 2603 0000234A E82892 <1> call getexpression ; bx:dx = expression result 2604 0000234D 8866F5 <1> mov byte [bp + ?hhtype], ah 2605 00002350 8976F0 <1> mov word [bp + ?hhoffset], si 2606 00002353 E83B98 <1> call chkeol 2607 00002356 59 <1> pop cx ; operator computation function 2608 <1> 2609 00002357 807EF700 <1> cmp byte [bp + ?ismem], 0 2610 0000235B 7419 <1> je .var_hhvar 2611 <1> 2612 <1> .mem_hhvar: 2613 0000235D 89C7 <1> mov di, ax 2614 0000235F 89D6 <1> mov si, dx 2615 00002361 53 <1> push bx 2616 00002362 51 <1> push cx 2617 00002363 E8E2FE <1> call rr1_read_mem_dxax 2618 00002366 59 <1> pop cx 2619 00002367 5B <1> pop bx 2620 00002368 52 <1> push dx 2621 00002369 50 <1> push ax 2622 0000236A 89F8 <1> mov ax, di 2623 0000236C 89F2 <1> mov dx, si 2624 0000236E BF[8098] <1> mov di, mask_4byte ; di -> zero 2625 00002371 BE[8298] <1> mov si, mask_4byte + 2 ; si -> zero 2626 <1> 2627 00002374 EB06 <1> jmp .common_hhvar 2628 <1> 2629 <1> .var_hhvar: 2630 00002376 5E <1> pop si ; si-> high word 2631 00002377 5F <1> pop di ; di-> low word 2632 00002378 FF34 <1> push word [si] 2633 0000237A FF35 <1> push word [di] 2634 <1> 2635 <1> .common_hhvar: 2636 0000237C 8F06[A098] <1> pop word [hhvar] 2637 00002380 8F06[A298] <1> pop word [hhvar+2] ; save variable's current value (as left operand) 2638 <1> 2639 00002384 C606[A998]00 <1> mov byte [hhtype], 0 ; type info signed=0 pointer=0 2640 00002389 807EF404 <1> cmp byte [rrtype], 4 2641 0000238D 7317 <1> jae .cleardword 2642 0000238F 807EF402 <1> cmp byte [rrtype], 2 2643 00002393 770C <1> ja .clearthreebyte 2644 00002395 7405 <1> je .clearword 2645 <1> .clearbyte: 2646 00002397 C606[A198]00 <1> mov byte [hhvar + 1], 0 ; clear second byte 2647 <1> .clearword: 2648 0000239C C606[A298]00 <1> mov byte [hhvar + 2], 0 ; clear third byte 2649 <1> .clearthreebyte: 2650 000023A1 C606[A398]00 <1> mov byte [hhvar + 3], 0 ; clear fourth byte 2651 <1> .cleardword: 2652 000023A6 87CB <1> xchg cx, bx 2653 000023A8 01DB <1> add bx, bx 2654 000023AA 8B9F[4493] <1> mov bx, word [bx + operatorfunctions] 2655 000023AE 87CB <1> xchg cx, bx ; cx = operator function 2656 000023B0 8A66F5 <1> mov ah, byte [bp + ?hhtype] 2657 000023B3 FFD1 <1> call cx ; compute 2658 <1> 2659 000023B5 E8C395 <1> call getexpression.countsignificantbits 2660 000023B8 53 <1> push bx 2661 000023B9 56 <1> push si 2662 000023BA 31DB <1> xor bx, bx 2663 000023BC 8A5EF4 <1> mov bl, byte [rrtype] 2664 000023BF 01DB <1> add bx, bx 2665 000023C1 8B76F0 <1> mov si, word [bp + ?hhoffset] 2666 000023C4 FF97[2085] <1> call near word [checksignificantbits_table + bx] 2667 000023C8 5E <1> pop si 2668 000023C9 5B <1> pop bx 2669 <1> 2670 000023CA 97 <1> xchg ax, di ; ax -> low word of variable 2671 000023CB 8B7EF2 <1> mov di, word [rrmask] ; di -> mask dword 2672 000023CE 53 <1> push bx ; use bx as a scratch space 2673 000023CF 8B0D <1> mov cx, word [di] ; = low word of mask 2674 000023D1 51 <1> push cx ; preserve low word of mask 2675 000023D2 97 <1> xchg ax, di ; di -> low word of variable 2676 000023D3 230D <1> and cx, word [di] ; cx = low word value to preserve 2677 000023D5 5B <1> pop bx ; = low word of mask 2678 000023D6 F7D3 <1> not bx ; = bitmask of bits to use from result 2679 000023D8 21DA <1> and dx, bx ; dx = bits to use from result low word 2680 000023DA 09CA <1> or dx, cx ; dx = low word compound 2681 000023DC 5B <1> pop bx ; restore high word after scratch use 2682 000023DD 97 <1> xchg ax, di ; di -> mask dword 2683 000023DE 52 <1> push dx ; use dx as a scratch space 2684 000023DF 8B4D02 <1> mov cx, word [di + 2] ; = high word of mask 2685 000023E2 51 <1> push cx ; preserve high word of mask 2686 000023E3 230C <1> and cx, word [si] ; cx = high word value to preserve 2687 000023E5 5A <1> pop dx ; = high word of mask 2688 000023E6 F7D2 <1> not dx ; = bitmask of bits to use from result 2689 000023E8 21D3 <1> and bx, dx ; bx = bits to use from result high word 2690 000023EA 09CB <1> or bx, cx 2691 000023EC 5A <1> pop dx ; restore low word after scratch use 2692 000023ED 97 <1> xchg ax, di ; di -> low word of variable 2693 <1> 2694 000023EE 807EF700 <1> cmp byte [bp + ?ismem], 0 2695 000023F2 7524 <1> jne rr1_mem_set 2696 <1> 2697 <1> .var_set: 2698 000023F4 807EF402 <1> cmp byte [rrtype], 2 2699 000023F8 7210 <1> jb .setbyte 2700 000023FA 740B <1> je .setword 2701 000023FC 807EF404 <1> cmp byte [rrtype], 4 2702 00002400 7203 <1> jb .setthreebyte 2703 <1> .setdword: 2704 00002402 887C01 <1> mov byte [si + 1], bh ; set fourth byte 2705 <1> .setthreebyte: 2706 00002405 881C <1> mov byte [si], bl ; set third byte 2707 <1> .setword: 2708 00002407 887501 <1> mov byte [di + 1], dh ; set second byte 2709 <1> .setbyte: 2710 0000240A 8815 <1> mov byte [di], dl ; set first byte 2711 <1> .return: 2712 <1> rr1_memory.return: 2713 <1> rr1_variable.return: 2714 0000240C 89EC5D <1> lleave code 2715 <1> rr1b: 2716 0000240F C3 <1> retn 2717 <1> 2718 <1> 2719 <1> rr1_readonly: 2720 00002410 BA[535D] <1> mov dx, msg.readonly 2721 00002413 E8179C <1> call putsz_error 2722 00002416 EBF4 <1> jmp rr1_variable.return 2723 <1> 2724 <1> 2725 <1> rr1_mem_set: 2726 00002418 89D0 <1> mov ax, dx 2727 0000241A 89DA <1> mov dx, bx 2728 <1> 2729 0000241C E89B84 <1> call dohack 2730 0000241F 8A4EF6 <1> mov cl, byte [bp + ?size] 2731 <1> %if _PM 2732 00002422 8B5EFA <1> mov bx, word [bp + ?segsel] 2733 00002425 E88E76 <1> call verifysegm 2734 00002428 7303E98700 <1> jc .ro 2735 0000242D E80F3B <1> call test_d_b_bit 2736 00002430 8EDB <1> mov ds, bx 2737 <1> %else 2738 <1> mov ds, word [bp + ?segsel] 2739 <1> %endif 2740 00002432 66 <1> _386_PM_o32 2741 00002433 8B5EFC <1> mov bx, word [bp + ?offset] 2742 <1> %if _PM 2743 00002436 7440 <1> jz .16 2744 <1> 2745 <1> [cpu 386] 2746 <1> .32: 2747 00002438 80F902 <1> cmp cl, 2 2748 0000243B 7213 <1> jb .32_1 2749 0000243D 740D <1> je .32_2 2750 0000243F 80F904 <1> cmp cl, 4 2751 00002442 7204 <1> jb .32_3 2752 <1> .32_4: 2753 00002444 67887303 <1> mov byte [ebx + 3], dh 2754 <1> .32_3: 2755 00002448 67885302 <1> mov byte [ebx + 2], dl 2756 <1> .32_2: 2757 0000244C 67886301 <1> mov byte [ebx + 1], ah 2758 <1> .32_1: 2759 00002450 678803 <1> mov byte [ebx], al 2760 <1> 2761 <1> .32_check: 2762 00002453 80F902 <1> cmp cl, 2 2763 00002456 7219 <1> jb .32_check_1 2764 00002458 7411 <1> je .32_check_2 2765 0000245A 80F904 <1> cmp cl, 4 2766 0000245D 7206 <1> jb .32_check_3 2767 <1> .32_check_4: 2768 0000245F 673A7303 <1> cmp dh, byte [ebx + 3] 2769 00002463 754F <1> jne .ro 2770 <1> .32_check_3: 2771 00002465 673A5302 <1> cmp dl, byte [ebx + 2] 2772 00002469 7549 <1> jne .ro 2773 <1> .32_check_2: 2774 0000246B 673A6301 <1> cmp ah, byte [ebx + 1] 2775 0000246F 7543 <1> jne .ro 2776 <1> .32_check_1: 2777 00002471 673A03 <1> cmp al, byte [ebx] 2778 00002474 753E <1> jne .ro 2779 00002476 EB36 <1> jmp .ret 2780 <1> __CPU__ 2781 <1> %endif 2782 <1> 2783 <1> .16: 2784 00002478 80F902 <1> cmp cl, 2 2785 0000247B 7210 <1> jb .16_1 2786 0000247D 740B <1> je .16_2 2787 0000247F 80F904 <1> cmp cl, 4 2788 00002482 7203 <1> jb .16_3 2789 <1> .16_4: 2790 00002484 887703 <1> mov byte [bx + 3], dh 2791 <1> .16_3: 2792 00002487 885702 <1> mov byte [bx + 2], dl 2793 <1> .16_2: 2794 0000248A 886701 <1> mov byte [bx + 1], ah 2795 <1> .16_1: 2796 0000248D 8807 <1> mov byte [bx], al 2797 <1> 2798 <1> .16_check: 2799 0000248F 80F902 <1> cmp cl, 2 2800 00002492 7216 <1> jb .16_check_1 2801 00002494 740F <1> je .16_check_2 2802 00002496 80F904 <1> cmp cl, 4 2803 00002499 7205 <1> jb .16_check_3 2804 <1> .16_check_4: 2805 0000249B 3A7703 <1> cmp dh, byte [bx + 3] 2806 0000249E 7514 <1> jne .ro 2807 <1> .16_check_3: 2808 000024A0 3A5702 <1> cmp dl, byte [bx + 2] 2809 000024A3 750F <1> jne .ro 2810 <1> .16_check_2: 2811 000024A5 3A6701 <1> cmp ah, byte [bx + 1] 2812 000024A8 750A <1> jne .ro 2813 <1> .16_check_1: 2814 000024AA 3A07 <1> cmp al, byte [bx] 2815 000024AC 7506 <1> jne .ro 2816 <1> .ret: 2817 000024AE E8BB69 <1> call ee0a 2818 000024B1 E958FF <1> jmp rr1_memory.return 2819 <1> 2820 <1> .ro: 2821 000024B4 E8B569 <1> call ee0a 2822 000024B7 BA[885D] <1> mov dx, msg.readonly_mem 2823 000024BA E8709B <1> call putsz_error 2824 000024BD E94CFF <1> jmp rr1_memory.return 2825 <1> 2826 <1> lleave ctx 2827 <1> 2828 <1> 2829 <1> usesection lDEBUG_DATA_ENTRY 2830 0000851F 00 <1> align 2, db 0 2831 <1> checksignificantbits_table: 2832 00008520 [4AA7] <1> dw error 2833 00008522 [72BA] <1> dw getbyte.checksignificantbits 2834 00008524 [60BA] <1> dw getword.checksignificantbits 2835 00008526 [52BA] <1> dw get3byte.checksignificantbits 2836 00008528 [5C04] <1> dw dmycmd 2837 <1> 2838 <1> usesection lDEBUG_CODE 2839 <1> 2840 <1> 2841 <1> ; Change flag register with mnemonics - F 2842 <1> rr2: 2843 000024C0 E85869 <1> call uppercase 2844 000024C3 3C46 <1> cmp al, 'F' 2845 000024C5 7403E99B00 <1> jne rr3 ; if not 'F' --> 2846 000024CA 50 <1> push ax 2847 000024CB 8A04 <1> mov al, byte [si] 2848 000024CD E88087 <1> call isseparator? ; valid separator ? 2849 000024D0 58 <1> pop ax 2850 000024D1 7403E98F00 <1> jne rr3 ; no --> 2851 <1> .ef: 2852 000024D6 E8C996 <1> call skipcomma 2853 000024D9 3C2E <1> cmp al, '.' ; special ? 2854 000024DB 7405 <1> je .writeprompt ; yes --> 2855 000024DD E89C96 <1> call iseol? ; end of line ? 2856 000024E0 7512 <1> jne .noprompt ; no --> 2857 <1> .writeprompt: 2858 000024E2 800E[A600]02 <1> setopt [internalflags3], dif3_do_not_highlight 2859 000024E7 56 <1> push si 2860 000024E8 E8C506 <1> call dmpflags 2861 000024EB 5E <1> pop si ; -> behind dot if any 2862 000024EC E84801 <1> call dot_prompt 2863 000024EF 7503E91BFF <1> je rr1b ; if no change 2864 <1> .noprompt: 2865 <1> 2866 000024F4 E86301 <1> call isassignmentoperator? 2867 000024F7 56 <1> push si 2868 000024F8 7308 <1> jnc .noteol ; at least one value is required --> 2869 <1> .check_loop: 2870 000024FA E8A696 <1> call skipcomm0 2871 000024FD E87C96 <1> call iseol? 2872 00002500 7420 <1> je .really ; return if done 2873 <1> .noteol: 2874 00002502 E81669 <1> call uppercase 2875 00002505 86C4 <1> xchg al, ah 2876 00002507 AC <1> lodsb 2877 00002508 E81069 <1> call uppercase 2878 0000250B 86C4 <1> xchg al, ah ; ax = mnemonic 2879 0000250D BF[4482] <1> mov di, flagson 2880 00002510 B91000 <1> mov cx, 16 2881 00002513 F2AF <1> repne scasw 2882 00002515 7507 <1> jne short .errordec ; if no match 2883 00002517 AC <1> lodsb 2884 00002518 E83587 <1> call isseparator? 2885 0000251B 74DD <1> je .check_loop 2886 <1> .errordec2: 2887 0000251D 4E <1> dec si 2888 <1> .errordec: 2889 <1> errordec: equ $ 2890 0000251E 4E <1> dec si ; back up one before flagging an error 2891 0000251F E92882 <1> jmp error 2892 <1> 2893 <1> .really: 2894 00002522 5E <1> pop si 2895 00002523 4E <1> dec si 2896 00002524 AC <1> lodsb 2897 <1> .loop: 2898 00002525 E85496 <1> call iseol? 2899 00002528 7503E9E2FE <1> je rr1b ; return if done 2900 <1> 2901 0000252D E8EB68 <1> call uppercase 2902 00002530 86C4 <1> xchg al, ah 2903 00002532 AC <1> lodsb 2904 00002533 E8E568 <1> call uppercase 2905 00002536 86C4 <1> xchg al, ah ; ax = mnemonic 2906 <1> 2907 00002538 BF[4482] <1> mov di, flagson 2908 0000253B B91000 <1> mov cx, 16 2909 0000253E F2AF <1> repne scasw 2910 00002540 75DC <1> jne short .errordec ; if no match 2911 00002542 81FF[5482] <1> cmp di, flagsoff 2912 00002546 7709 <1> ja .clear ; if we're clearing 2913 00002548 8B45EE <1> mov ax, word [di-(flagson-flagbits)-2] 2914 0000254B 0906[AC0C] <1> or word [reg_efl], ax ; set the bit 2915 0000254F EB09 <1> jmp short .common 2916 <1> .clear: 2917 00002551 8B45DE <1> mov ax, word [di-(flagsoff-flagbits)-2] 2918 00002554 F7D0 <1> not ax 2919 00002556 2106[AC0C] <1> and word [reg_efl], ax ; clear the bit 2920 <1> .common: 2921 0000255A AC <1> lodsb 2922 0000255B E8F286 <1> call isseparator? 2923 0000255E 75BD <1> jne short .errordec2 2924 00002560 E84096 <1> call skipcomm0 2925 00002563 EBC0 <1> jmp short .loop 2926 <1> 2927 <1> ; Change flag register with mnemonics - EF 2928 <1> rr3: 2929 00002565 86C4 <1> xchg al, ah 2930 00002567 AC <1> lodsb 2931 00002568 E8B068 <1> call uppercase 2932 0000256B 86C4 <1> xchg al, ah ; ax = next two characters 2933 0000256D 3D4546 <1> _386 cmp ax, "EF" 2934 00002570 750B <1> _386 jne rr4 ; if not "EF" --> 2935 00002572 50 <1> _386 push ax 2936 00002573 8A04 <1> _386 mov al, byte [si] 2937 00002575 E8D886 <1> _386 call isseparator? ; valid separator ? 2938 00002578 58 <1> _386 pop ax 2939 00002579 0F8459FF <1> _386 je rr2.ef 2940 <1> 2941 <1> ; Change a single flag with mnemonic 2942 <1> rr4: 2943 0000257D BF[6482] <1> mov di, flagnames 2944 00002580 B90800 <1> mov cx, 8 2945 00002583 F2AF <1> repne scasw 2946 00002585 7597 <1> jne short rr2.errordec 2947 00002587 89C2 <1> mov dx, ax 2948 00002589 AC <1> lodsb 2949 0000258A E8C386 <1> call isseparator? 2950 0000258D 758E <1> jne short rr2.errordec2 2951 0000258F FF75CE <1> push word [di-(flagnames-flagbits)-2] 2952 00002592 E80E96 <1> call skipcomm0 2953 00002595 3C2E <1> cmp al, '.' ; special ? 2954 00002597 7405 <1> je .writeprompt ; yes --> 2955 00002599 E8E095 <1> call iseol? 2956 0000259C 7519 <1> jne .noprompt 2957 <1> .writeprompt: 2958 0000259E BF[0E08] <1> mov di, line_out 2959 000025A1 89D0 <1> mov ax, dx 2960 000025A3 AB <1> stosw 2961 000025A4 58 <1> pop ax 2962 000025A5 50 <1> push ax 2963 000025A6 8506[AC0C] <1> test word [reg_efl], ax ; is it off ? 2964 000025AA B82030 <1> mov ax, " 0" ; assume so 2965 000025AD 7402 <1> jz .off ; it is off --> 2966 000025AF FEC4 <1> inc ah ; is on, set to '1' 2967 <1> .off: 2968 000025B1 AB <1> stosw 2969 000025B2 E88200 <1> call dot_prompt 2970 000025B5 747E <1> je .ret_pop ; if no change --> 2971 <1> .noprompt: 2972 000025B7 E8C295 <1> call iseol? ; end of line ? 2973 000025BA 7479 <1> je .ret_pop ; yes, no change requested --> 2974 000025BC 51 <1> push cx 2975 000025BD 50 <1> push ax 2976 000025BE 56 <1> push si 2977 000025BF E87886 <1> call isoperator? 2978 000025C2 7520 <1> jne .nooperator 2979 000025C4 89CB <1> mov bx, cx 2980 000025C6 01DB <1> add bx, bx ; bh = 0 ! 2981 000025C8 50 <1> push ax 2982 000025C9 FF97[0493] <1> call near [operatordispatchers+bx] 2983 000025CD 58 <1> pop ax 2984 000025CE 85DB <1> test bx, bx 2985 000025D0 7412 <1> jz .nooperator 2986 000025D2 80FB16 <1> cmp bl, OPERATOR_BOOL_AND 2987 000025D5 770D <1> ja .nooperator 2988 000025D7 80FB14 <1> cmp bl, OPERATOR_BOOL_OR 2989 000025DA 730C <1> jae .gotoperator 2990 000025DC 80C303 <1> add bl, OPERATOR_BOOL_OR - OPERATOR_BIT_OR 2991 000025DF 80FB14 <1> cmp bl, OPERATOR_BOOL_OR 2992 000025E2 7304 <1> jae .gotoperator 2993 <1> .nooperator: 2994 000025E4 BB1800 <1> mov bx, OPERATOR_RIGHTOP; set default computation function 2995 000025E7 A8 <1> db __TEST_IMM8 2996 <1> .gotoperator: 2997 000025E8 AC <1> lodsb 2998 <1> 2999 000025E9 E86E00 <1> call isassignmentoperator? 3000 000025EC 7308 <1> jnc .assign_op_done ; found an assignment operator --> 3001 000025EE 83FB18 <1> cmp bx, OPERATOR_RIGHTOP; dummy (no operator specified) ? 3002 <1> %if 1 ; since | ^ & are never unary operators 3003 000025F1 7403E95481 <1> jne error 3004 <1> %else 3005 <1> je .assign_op_done ; yes, assignment operator not required --> 3006 <1> pop cx 3007 <1> pop ax ; restore al, si in front of operator 3008 <1> push ax 3009 <1> push cx 3010 <1> xchg si, cx 3011 <1> push cx 3012 <1> call isunaryoperator? ; is this a valid unary operator too ? 3013 <1> pop cx 3014 <1> je .nooperator ; yes --> 3015 <1> xchg si, cx 3016 <1> jmp error ; error where the assignment operator needs to be 3017 <1> %endif 3018 <1> .assign_op_done: 3019 000025F6 59 <1> pop cx 3020 000025F7 59 <1> pop cx 3021 000025F8 59 <1> pop cx 3022 000025F9 53 <1> push bx 3023 000025FA E8788F <1> call getexpression 3024 000025FD E89195 <1> call chkeol 3025 00002600 E87D89 <1> call toboolean 3026 00002603 59 <1> pop cx ; operator index 3027 00002604 31C0 <1> xor ax, ax 3028 00002606 A2[A998] <1> mov byte [hhtype], al 3029 00002609 A3[A298] <1> mov word [hhvar+2], ax 3030 0000260C 5E <1> pop si 3031 0000260D 56 <1> push si ; flag 3032 0000260E 8536[AC0C] <1> test word [reg_efl], si 3033 00002612 7401 <1> jz .notset 3034 00002614 40 <1> inc ax 3035 <1> .notset: 3036 00002615 A3[A098] <1> mov word [hhvar], ax 3037 00002618 87CB <1> xchg cx, bx 3038 0000261A 01DB <1> add bx, bx 3039 0000261C 8B9F[4493] <1> mov bx, word [bx+operatorfunctions] 3040 00002620 87CB <1> xchg cx, bx ; cx = operator function 3041 00002622 FFD1 <1> call cx ; compute 3042 00002624 58 <1> pop ax 3043 00002625 85D2 <1> test dx, dx 3044 00002627 7405 <1> jz .clear 3045 00002629 0906[AC0C] <1> or word [reg_efl], ax ; set the bit 3046 0000262D C3 <1> retn 3047 <1> .clear: 3048 0000262E F7D0 <1> not ax 3049 00002630 2106[AC0C] <1> and word [reg_efl], ax ; clear the bit 3050 00002634 C3 <1> retn 3051 <1> 3052 <1> .ret_pop: 3053 00002635 58 <1> pop ax 3054 00002636 C3 <1> retn 3055 <1> 3056 <1> 3057 <1> ; INP: di-> behind prompt to display (in line_out) 3058 <1> ; Iff byte[si-1] == '.', 3059 <1> ; only display without actual prompting 3060 <1> ; si-> line to check for EOL 3061 <1> ; OUT: NZ iff actually prompted and got non-empty line, 3062 <1> ; al = first character 3063 <1> ; si-> next character 3064 <1> ; dx, bx preserved 3065 <1> ; CHG: ax, cx, si, di, dx, bx 3066 <1> dot_prompt: 3067 00002637 807CFF2E <1> cmp byte [si-1], '.' ; syntax for display without prompt ? 3068 0000263B 7414 <1> je .onlydisplay ; yes --> 3069 0000263D 53 <1> push bx 3070 0000263E 52 <1> push dx 3071 0000263F E89F9D <1> call getline0 3072 00002642 5A <1> pop dx 3073 00002643 5B <1> pop bx 3074 00002644 E83595 <1> call iseol? ; no change requested ? 3075 00002647 7410 <1> je .ret ; yes --> (ZR) 3076 00002649 3C2E <1> cmp al, '.' ; other syntax for no change ? 3077 0000264B 750C <1> jne .ret ; no --> (NZ) 3078 <1> .chkeol1: 3079 0000264D AC <1> lodsb 3080 0000264E E94095 <1> jmp chkeol ; (ZR) 3081 <1> 3082 <1> .onlydisplay: 3083 00002651 E8F9FF <1> call .chkeol1 3084 00002654 E85D96 <1> call putsline_crlf 3085 00002657 38C0 <1> cmp al, al ; ZR 3086 <1> .ret: 3087 00002659 C3 <1> retn 3088 <1> 3089 <1> 3090 <1> ; INP: al = first character 3091 <1> ; si-> remaining string 3092 <1> ; OUT: CY if no assignment operator was found 3093 <1> ; NC if an assignment operator was found, 3094 <1> ; al = first character behind it (skipcomma called) 3095 <1> ; si-> remaining string behind character al 3096 <1> isassignmentoperator?: 3097 0000265A 3C3A <1> cmp al, ':' 3098 0000265C 750A <1> jne .checksingleequality 3099 0000265E AC <1> lodsb 3100 0000265F 3C3D <1> cmp al, '=' 3101 00002661 7409 <1> je .skip ; long form assignment operator --> 3102 <1> ; A single colon. Report "no assignment operator" here. 3103 00002663 4E <1> dec si 3104 00002664 B03A <1> mov al, ':' ; restore si, al 3105 <1> .return_cy: 3106 00002666 F9 <1> stc 3107 00002667 C3 <1> retn 3108 <1> 3109 <1> .checksingleequality: 3110 00002668 3C3D <1> cmp al, '=' 3111 0000266A 75FA <1> jne .return_cy ; no assignment operator --> 3112 <1> .skip: 3113 0000266C E83395 <1> call skipcomma 3114 0000266F F8 <1> clc 3115 00002670 C3 <1> retn 3116 <1> 3117 <1> 3118 <1> rc_cmd: 3119 00002671 BF[E000] <1> mov di, cmdline_buffer 3120 00002674 BD[E001] <1> mov bp, cmdline_buffer.end 3121 00002677 EB06 <1> jmp @F 3122 <1> 3123 <1> ; INP: al = '.' 3124 <1> ; si -> next character 3125 <1> re_cmd: 3126 00002679 BF[E401] <1> mov di, re_buffer 3127 0000267C BD[E409] <1> mov bp, re_buffer.end 3128 <1> @@: 3129 0000267F 5A <1> pop dx 3130 00002680 5A <1> pop dx ; discard si and ax on stack 3131 00002681 BA[7172] <1> mov dx, msg.list 3132 00002684 E89694 <1> call isstring? 3133 00002687 7503E99000 <1> je .list 3134 <1> 3135 0000268C 81FF[E401] <1> cmp di, re_buffer 3136 00002690 7405 <1> je @F 3137 00002692 E8F5DE <1> call guard_rc 3138 00002695 EB03 <1> jmp @FF 3139 <1> 3140 <1> @@: 3141 00002697 E8DDDE <1> call guard_re 3142 <1> @@: 3143 <1> 3144 0000269A BA[3A68] <1> mov dx, msg.append 3145 0000269D E87D94 <1> call isstring? 3146 000026A0 740D <1> je .append 3147 000026A2 BA[3268] <1> mov dx, msg.replace 3148 000026A5 E87594 <1> call isstring? 3149 000026A8 740D <1> je .common ; di -> at first byte (where to append) 3150 000026AA B80401 <1> mov ax, 0104h 3151 000026AD EB67 <1> jmp .error_common 3152 <1> 3153 <1> .append: 3154 000026AF 30C0 <1> xor al, al 3155 000026B1 B9FFFF <1> mov cx, -1 3156 000026B4 F2AE <1> repne scasb ; di -> after zero byte 3157 000026B6 4F <1> dec di ; -> at zero byte 3158 <1> 3159 <1> .common: 3160 000026B7 E81795 <1> call skipwhite 3161 000026BA E89EDE <1> call guard_auxbuff 3162 <1> 3163 000026BD 31DB <1> xor bx, bx 3164 <1> 3165 000026BF 50 <1> push ax 3166 000026C0 B00D <1> mov al, 13 3167 000026C2 3845FF <1> cmp byte [di - 1], al ; is there an EOL in front of us? 3168 000026C5 8E06[FA09] <1> mov es, word [auxbuff_segorsel] 3169 000026C9 87DF <1> xchg bx, di ; es:di -> auxbuff, bx -> at zero byte 3170 000026CB 7401 <1> je @F ; yes --> 3171 <1> 3172 000026CD AA <1> stosb ; first store a CR 3173 <1> @@: 3174 000026CE 58 <1> pop ax 3175 <1> .loop: 3176 000026CF 3C5C <1> cmp al, '\' 3177 000026D1 750A <1> jne .literal 3178 <1> 3179 000026D3 AC <1> lodsb ; load escaped character 3180 000026D4 E8A994 <1> call iseol?.notsemicolon; EOL ? 3181 000026D7 7435 <1> je .error_escaped_cr ; yes, error --> 3182 000026D9 AA <1> stosb ; store escaped literal 3183 000026DA AC <1> lodsb ; load next 3184 000026DB EBF2 <1> jmp .loop 3185 <1> 3186 <1> .literal: 3187 000026DD E8A094 <1> call iseol?.notsemicolon; EOL ? 3188 000026E0 7410 <1> je .end ; got all --> 3189 000026E2 3C3B <1> cmp al, ';' ; semicolon ? 3190 000026E4 7508 <1> jne @F 3191 000026E6 B00D <1> mov al, 13 3192 000026E8 AA <1> stosb ; store linebreak 3193 000026E9 E8E594 <1> call skipwhite ; skip leading blanks 3194 000026EC EBE1 <1> jmp .loop 3195 <1> 3196 <1> @@: 3197 000026EE AA <1> stosb ; store character 3198 000026EF AC <1> lodsb 3199 000026F0 EBDD <1> jmp .loop 3200 <1> 3201 <1> .end: 3202 <1> ; di -> behind last character 3203 000026F2 31C0 <1> xor ax, ax 3204 000026F4 AA <1> stosb 3205 000026F5 89D8 <1> mov ax, bx 3206 000026F7 01F8 <1> add ax, di 3207 000026F9 7218 <1> jc .error_too_much 3208 000026FB 39E8 <1> cmp ax, bp 3209 000026FD 7714 <1> ja .error_too_much 3210 000026FF 31F6 <1> xor si, si 3211 00002701 06 <1> push es 3212 00002702 1F <1> pop ds 3213 00002703 16 <1> push ss 3214 00002704 07 <1> pop es 3215 00002705 89F9 <1> mov cx, di 3216 00002707 89DF <1> mov di, bx 3217 00002709 F3A4 <1> rep movsb 3218 0000270B 16 <1> push ss 3219 0000270C 1F <1> pop ds 3220 0000270D C3 <1> retn 3221 <1> 3222 <1> .error_escaped_cr: 3223 0000270E B80501 <1> mov ax, 0105h 3224 00002711 EB03 <1> jmp .error_common 3225 <1> 3226 <1> .error_too_much: 3227 00002713 B80601 <1> mov ax, 0106h 3228 <1> 3229 <1> .error_common: 3230 00002716 E87880 <1> call setrc 3231 00002719 E92E80 <1> jmp error 3232 <1> 3233 <1> re_cmd.list: 3234 0000271C AC <1> lodsb 3235 0000271D E87194 <1> call chkeol 3236 <1> 3237 00002720 89FE <1> mov si, di 3238 00002722 B400 <1> mov ah, 0 ; ah = 0 (flag to escape blanks) 3239 <1> .loop: 3240 00002724 AC <1> lodsb 3241 00002725 84C0 <1> test al, al 3242 00002727 7442 <1> jz .end 3243 00002729 3C0D <1> cmp al, 13 ; (intentionally not iseol?) 3244 0000272B 742E <1> je .cr 3245 0000272D 3C20 <1> cmp al, 32 3246 0000272F 741B <1> je .escapeif 3247 00002731 3C09 <1> cmp al, 9 3248 00002733 7417 <1> je .escapeif 3249 00002735 B401 <1> mov ah, 1 ; ah = 1 3250 00002737 3C3B <1> cmp al, ';' 3251 00002739 7417 <1> je .escape 3252 0000273B 3C22 <1> cmp al, '"' 3253 0000273D 7413 <1> je .escape 3254 0000273F 3C27 <1> cmp al, "'" 3255 00002741 740F <1> je .escape 3256 00002743 3C5C <1> cmp al, '\' 3257 00002745 740B <1> je .escape 3258 <1> .put: 3259 00002747 E80C99 <1> call putc 3260 0000274A EBD8 <1> jmp .loop 3261 <1> 3262 <1> .escapeif: 3263 0000274C 84E4 <1> test ah, ah 3264 0000274E 75F7 <1> jnz .put 3265 00002750 B401 <1> mov ah, 1 ; ah = 1 3266 <1> .escape: 3267 00002752 50 <1> push ax 3268 00002753 B05C <1> mov al, '\' 3269 00002755 E8FE98 <1> call putc 3270 00002758 58 <1> pop ax 3271 00002759 EBEC <1> jmp .put 3272 <1> 3273 <1> .cr: 3274 0000275B AC <1> lodsb 3275 0000275C 84C0 <1> test al, al 3276 0000275E 740B <1> jz .end 3277 00002760 4E <1> dec si 3278 00002761 B03B <1> mov al, ';' 3279 00002763 E8F098 <1> call putc 3280 00002766 B82000 <1> mov ax, 32 ; ah = 0 3281 00002769 EBDC <1> jmp .put 3282 <1> 3283 <1> .end: 3284 0000276B B00D <1> mov al, 13 3285 0000276D E8E698 <1> call putc 3286 00002770 B00A <1> mov al, 10 3287 00002772 E9E198 <1> jmp putc 3288 <1> 3289 <1> 3290 <1> rc_run: 3291 00002775 E812DE <1> call guard_rc 3292 00002778 E8FCDD <1> call guard_re ; do not allow RE command to run RC 3293 <1> ; (the RE buffer would drain first) 3294 <1> 3295 0000277B E824A7 <1> call yy_reset_buf 3296 <1> 3297 0000277E C706[E001][E000] <1> mov word [cmdline_buffer.position], cmdline_buffer 3298 00002784 8326[F009]00 <1> and word [rc_count], 0 3299 00002789 8326[F209]00 <1> and word [rc_count + 2], 0 3300 <1> 3301 0000278E 800E[A500]01 <1> setopt [internalflags3], dif3_input_cmdline 3302 <1> 3303 00002793 C3 <1> retn 3304 <1> 3305 <1> 3306 <1> dumpregs_extended: 3307 00002794 E8E0DD <1> call guard_re 3308 00002797 813E[E401]4052 <1> cmp word [re_buffer], "@R" 3309 0000279D 7408 <1> je @F 3310 0000279F 813E[E401]4072 <1> cmp word [re_buffer], "@r" 3311 000027A5 750A <1> jne .complex 3312 <1> @@: 3313 000027A7 803E[E601]00 <1> cmp byte [re_buffer + 2], 0 3314 000027AC 7503E98E00 <1> je .just_dumpregs 3315 <1> 3316 <1> .complex: 3317 000027B1 F606[A700]20 <1> testopt [internalflags3], dif3_auxbuff_guarded_2 3318 000027B6 740C <1> jz @F 3319 <1> 3320 000027B8 B80301 <1> mov ax, 0103h 3321 000027BB E8D37F <1> call setrc 3322 000027BE BA[B367] <1> mov dx, msg.unexpected_auxbuff_guard 3323 000027C1 E96F98 <1> jmp putsz 3324 <1> 3325 <1> @@: 3326 000027C4 E8DBA6 <1> call yy_reset_buf 3327 <1> 3328 000027C7 C706[E409][E401] <1> mov word [re_buffer.position], re_buffer 3329 000027CD 8326[E809]00 <1> and word [re_count], 0 3330 000027D2 8326[EA09]00 <1> and word [re_count + 2], 0 3331 <1> 3332 000027D7 FF36[FE0A] <1> push word [rc] 3333 000027DB FF36[9C0A] <1> push word [savesp] 3334 000027DF FF36[A60A] <1> push word [throwsp] 3335 000027E3 FF36[E60B] <1> push word [lastcmd] 3336 000027E7 55 <1> push bp 3337 000027E8 8926[9C0A] <1> mov word [savesp], sp 3338 000027EC 8926[A60A] <1> mov word [throwsp], sp 3339 000027F0 8926[A00A] <1> mov word [re_sp], sp 3340 <1> 3341 000027F4 800E[A700]01 <1> setopt [internalflags3], dif3_input_re 3342 <1> 3343 000027F9 F606[A700]10 <1> testopt [internalflags3], dif3_auxbuff_guarded_1 3344 000027FE 7405 <1> jz @F 3345 00002800 8036[A700]30 <1> xoropt [internalflags3], dif3_auxbuff_guarded_1 | dif3_auxbuff_guarded_2 3346 <1> @@: 3347 <1> .cmd3: 3348 00002805 E9F8D7 <1> jmp cmd3 3349 <1> 3350 <1> .exit: 3351 00002808 8B26[A00A] <1> mov sp, word [re_sp] 3352 0000280C 5D <1> pop bp 3353 0000280D 8F06[E60B] <1> pop word [lastcmd] 3354 00002811 8F06[A60A] <1> pop word [throwsp] 3355 00002815 8F06[9C0A] <1> pop word [savesp] 3356 00002819 58 <1> pop ax 3357 0000281A 85C0 <1> test ax, ax 3358 0000281C 7403 <1> jz @F 3359 0000281E A3[FE0A] <1> mov word [rc], ax 3360 <1> @@: 3361 00002821 8026[A700]FE <1> clropt [internalflags3], dif3_input_re 3362 <1> 3363 00002826 F606[A700]20 <1> testopt [internalflags3], dif3_auxbuff_guarded_2 3364 0000282B 7405 <1> jz @F 3365 0000282D 8036[A700]30 <1> xoropt [internalflags3], dif3_auxbuff_guarded_1 | dif3_auxbuff_guarded_2 3366 <1> @@: 3367 <1> 3368 00002832 F606[8100]80 <1> testopt [options2], opt2_re_cancel_tpg 3369 00002837 7501 <1> jnz @F 3370 <1> 3371 00002839 C3 <1> retn 3372 <1> 3373 <1> @@: 3374 0000283A E8D718 <1> call terminate_silent_dump.if_nonnull 3375 0000283D EBC6 <1> jmp .cmd3 3376 <1> 3377 <1> 3378 <1> .just_dumpregs: 3379 <1> ; DUMPREGS - Dump registers. 3380 <1> ; 3381 <1> ; 16 bit: 8 regs, line break, first 4 segment regs, IP, flags 3382 <1> ; 32 bit: 6 regs, line break, 2 regs, flags, line break, 6 segment regs, EIP 3383 <1> ; 3384 <1> ; CHG: ax, bx, cx, dx, di, si 3385 <1> dumpregs: 3386 0000283F F606[8600]08 <1> testopt [options3], opt3_r_highlight_eip 3387 00002844 750C <1> jnz @F 3388 00002846 A1[A80C] <1> mov ax, word [reg_eip] 3389 00002849 A3[E80C] <1> mov word [reg_eip - regs + regs_prior], ax 3390 <1> %if _PM 3391 0000284C A1[AA0C] <1> mov ax, word [reg_eip + 2] 3392 0000284F A3[EA0C] <1> mov word [reg_eip + 2 - regs + regs_prior], ax 3393 <1> %endif 3394 <1> @@: 3395 <1> 3396 00002852 BE[9C82] <1> mov si, reg16names 3397 00002855 BF[0E08] <1> mov di, line_out 3398 00002858 B90800 <1> mov cx, 8 ; display all 8 standard regs (16-bit) 3399 0000285B F606[7C00]01 <1> testopt [options], dispregs32 3400 00002860 7402 <1> jz .firstrow16 3401 00002862 B106 <1> mov cl, 6 ; room for 6 standard regs (32-bit) only 3402 <1> .firstrow16: 3403 00002864 9C <1> pushf 3404 00002865 57 <1> push di 3405 00002866 E81101 <1> call dmpr1 ; display first row 3406 00002869 E84094 <1> call trimputs 3407 0000286C 5F <1> pop di ; (reset di) 3408 0000286D 9D <1> popf ; (reset ZF) 3409 0000286E 7511 <1> jnz .secondrow32 3410 00002870 B104 <1> mov cl, 4 ; display 4 segment regs 3411 00002872 E80501 <1> call dmpr1 3412 00002875 83C604 <1> add si, byte 2*2 ; skip FS+GS 3413 00002878 41 <1> inc cx ; (= 1) 3414 00002879 E8FE00 <1> call dmpr1 ; display IP 3415 0000287C E83103 <1> call dmpflags ; display flags in 16-bit display 3416 0000287F EB18 <1> jmp short .lastrowdone 3417 <1> .secondrow32: 3418 00002881 57 <1> push di 3419 00002882 B102 <1> mov cl, 2 ; display rest of 32-bit standard regs 3420 00002884 E8F300 <1> call dmpr1 3421 00002887 56 <1> push si 3422 00002888 E82503 <1> call dmpflags ; display flags in 32-bit display 3423 0000288B E82694 <1> call putsline_crlf 3424 0000288E 5E <1> pop si 3425 0000288F 5F <1> pop di ; (reset di) 3426 00002890 B106 <1> mov cl, 6 ; display all segment registers 3427 00002892 E8E500 <1> call dmpr1 3428 00002895 41 <1> inc cx ; (= 1) 3429 00002896 E8E100 <1> call dmpr1 ; display EIP 3430 <1> .lastrowdone: 3431 00002899 E81094 <1> call trimputs 3432 <1> 3433 0000289C BE[700C] <1> mov si, regs 3434 0000289F BF[B00C] <1> mov di, regs_prior 3435 000028A2 B92000 <1> mov cx, words(regs_prior.size) 3436 000028A5 F3A5 <1> rep movsw ; update prior regs save area 3437 <1> 3438 <1> ; Set U address to CS:(E)IP. 3439 000028A7 BE[A80C] <1> mov si, reg_eip 3440 000028AA BF[2C0B] <1> mov di, u_addr 3441 000028AD A5 <1> movsw ; first word of saOffset 3442 <1> %if saSegSel == 4 3443 000028AE A5 <1> movsw ; second word of saOffset 3444 <1> %endif 3445 000028AF A1[9C0C] <1> mov ax, word [reg_cs] 3446 000028B2 AB <1> stosw ; saSegSel 3447 <1> %if _PM 3448 000028B3 E81F6B <1> call ispm 3449 000028B6 7501 <1> jnz .86m 3450 <1> .pm: 3451 000028B8 AF <1> scasw ; skip saSegment, sto to saSelector 3452 <1> .86m: 3453 000028B9 AB <1> stosw ; (if jumped to .86m) saSegment 3454 <1> @@: 3455 <1> %endif 3456 <1> 3457 000028BA B80300 <1> mov ax, DIS_F_REPT | DIS_F_SHOW 3458 000028BD F606[7F00]10 <1> testopt [options], rr_disasm_no_rept 3459 000028C2 7402 <1> jz @F 3460 000028C4 24FE <1> and al, ~ DIS_F_REPT 3461 <1> @@: 3462 000028C6 F606[7F00]20 <1> testopt [options], rr_disasm_no_show 3463 000028CB 7402 <1> jz @F 3464 000028CD 24FD <1> and al, ~ DIS_F_SHOW 3465 <1> @@: 3466 000028CF A3[068A] <1> mov word [disflags], ax 3467 000028D2 E8AE20 <1> call disasm 3468 <1> 3469 <1> ; Set ABO to address after the dumpregs disassembly. 3470 000028D5 BF[220B] <1> mov di, behind_r_u_addr 3471 000028D8 BE[2C0B] <1> mov si, u_addr 3472 000028DB A5 <1> movsw ; first word of saOffset 3473 <1> %if saSegSel == 4 3474 000028DC A5 <1> movsw ; second word of saOffset 3475 <1> %endif 3476 000028DD A5 <1> movsw ; saSegSel 3477 <1> %if _PM 3478 000028DE A5 <1> movsw ; saSegment 3479 000028DF A5 <1> movsw ; saSelector 3480 <1> %endif 3481 <1> %if (behind_r_u_addr + SEGADR_size) != u_addr 3482 <1> %error Expected u_addr behind behind_r_u_addr 3483 <1> ; mov di, u_addr 3484 <1> %endif 3485 <1> ; Reset U offset to (E)IP. 3486 000028E0 BE[A80C] <1> mov si, reg_eip 3487 000028E3 A5 <1> movsw ; first word of saOffset 3488 000028E4 A5 <1> _386_PM movsw ; second word of saOffset 3489 <1> 3490 <1> 3491 <1> %if _ACCESS_VARIABLES_AMOUNT 3492 <1> dumpregs_set_access_variables: 3493 000028E5 31C0 <1> xor ax, ax 3494 000028E7 BF[2C85] <1> mov di, reading_access_variables 3495 000028EA B92000 <1> mov cx, words(_ACCESS_VARIABLES_AMOUNT * 8 * 2) 3496 000028ED F3AB <1> rep stosw 3497 <1> 3498 000028EF 8B0E[E089] <1> mov cx, [memrefs.free] 3499 000028F3 85C9 <1> test cx, cx 3500 000028F5 744A <1> jz .none 3501 000028F7 31F6 <1> xor si, si 3502 <1> .loop: 3503 000028F9 89F3 <1> mov bx, si 3504 000028FB E8612D <1> call get_memref_index_bx 3505 000028FE 8B87[AA89] <1> mov ax, word [memrefs + bx + mrFlags] 3506 00002902 A801 <1> test al, mrfBranchDirect 3507 00002904 7537 <1> jnz .next 3508 00002906 31D2 <1> xor dx, dx ; 0 = reading 3509 00002908 A840 <1> test al, mrfStringSource 3510 0000290A 751C <1> jnz .gotmsg 3511 0000290C 42 <1> inc dx ; 1 = writing 3512 0000290D A880 <1> test al, mrfStringDest 3513 0000290F 7517 <1> jnz .gotmsg 3514 00002911 88C2 <1> mov dl, al 3515 00002913 80E20C <1> and dl, mrfMemSource | mrfMemDest 3516 00002916 80FA0C <1> cmp dl, mrfMemSource | mrfMemDest 3517 00002919 B202 <1> mov dl, 2 ; 2 = r/w 3518 0000291B 740B <1> je .gotmsg 3519 0000291D 31D2 <1> xor dx, dx ; 0 = reading 3520 0000291F A804 <1> test al, mrfMemSource 3521 00002921 7505 <1> jnz .gotmsg 3522 00002923 42 <1> inc dx ; 1 = writing 3523 00002924 A808 <1> test al, mrfMemDest 3524 <1> ; jnz .gotmsg 3525 00002926 7415 <1> jz .next 3526 <1> .gotmsg: 3527 <1> 3528 00002928 84D2 <1> test dl, dl 3529 0000292A 740B <1> jz .read 3530 <1> 3531 <1> .write: 3532 0000292C BF[4C85] <1> mov di, writing_access_variables 3533 0000292F E81000 <1> call add_access_variable 3534 00002932 80FA01 <1> cmp dl, 1 3535 00002935 7406 <1> je .next 3536 <1> 3537 <1> .read: 3538 00002937 BF[2C85] <1> mov di, reading_access_variables 3539 0000293A E80500 <1> call add_access_variable 3540 <1> 3541 <1> .next: 3542 0000293D 46 <1> inc si 3543 0000293E 49 <1> dec cx 3544 0000293F 75B8 <1> jnz .loop 3545 <1> .none: 3546 <1> %endif 3547 00002941 C3 <1> retn 3548 <1> 3549 <1> 3550 <1> %if _ACCESS_VARIABLES_AMOUNT 3551 <1> add_access_variable: 3552 00002942 93 <1> xchg ax, bx 3553 00002943 31DB <1> xor bx, bx 3554 <1> .loop: 3555 00002945 83790400 <1> cmp word [di + bx + 4], 0 3556 00002949 7525 <1> jne .next 3557 0000294B 83790600 <1> cmp word [di + bx + 4 + 2], 0 3558 0000294F 751F <1> jne .next 3559 00002951 93 <1> xchg ax, bx 3560 00002952 FFB7[A289] <1> push word [memrefs + bx + mrLinear + 2] 3561 00002956 FFB7[A089] <1> push word [memrefs + bx + mrLinear] 3562 0000295A FFB7[AE89] <1> push word [memrefs + bx + mrLength + 2] 3563 0000295E FFB7[AC89] <1> push word [memrefs + bx + mrLength] 3564 00002962 93 <1> xchg ax, bx 3565 00002963 8F4104 <1> pop word [di + bx + 4] 3566 00002966 8F4106 <1> pop word [di + bx + 4 + 2] 3567 00002969 8F01 <1> pop word [di + bx] 3568 0000296B 8F4102 <1> pop word [di + bx + 2] 3569 0000296E 93 <1> xchg ax, bx 3570 0000296F C3 <1> retn 3571 <1> 3572 <1> .next: 3573 00002970 83C308 <1> add bx, 8 3574 00002973 83FB20 <1> cmp bx, _ACCESS_VARIABLES_AMOUNT * 8 3575 00002976 72CD <1> jb .loop 3576 00002978 93 <1> xchg ax, bx 3577 00002979 C3 <1> retn 3578 <1> 3579 <1> 3580 <1> usesection lDEBUG_DATA_ENTRY 3581 0000852A 00 <1> align 4, db 0 3582 <1> reading_access_variables: 3583 0000852C 00 <1> times _ACCESS_VARIABLES_AMOUNT * 8 db 0 3584 <1> 3585 <1> writing_access_variables: 3586 0000854C 00 <1> times _ACCESS_VARIABLES_AMOUNT * 8 db 0 3587 <1> 3588 <1> usesection lDEBUG_CODE 3589 <1> %endif 3590 <1> 3591 <1> 3592 <1> ; Function to display multiple register entries. 3593 <1> ; 3594 <1> ; INP: [options]&dispregs32 = whether to display 32-bit registers, 3595 <1> ; except segment registers which are always 16-bit 3596 <1> ; si-> 2-byte register name in table 3597 <1> ; cx = number of registers to display 3598 <1> ; OUT: si-> register name in table after the last one displayed 3599 <1> ; cx = 0 3600 <1> ; CHG: bx, ax, dx 3601 <1> dmpr1: 3602 <1> .: 3603 0000297A 8D9C647C <1> lea bx, [si-(reg16names+DATASECTIONFIXUP)] 3604 0000297E 01DB <1> add bx, bx ; index * 4 3605 00002980 807C0153 <1> cmp byte [si+1], 'S' ; segment register ? 3606 00002984 740A <1> je .no_e ; always 16-bit --> (ZR) 3607 00002986 F606[7C00]01 <1> testopt [options], dispregs32 ; display 32-bit register ? 3608 0000298B 7403 <1> jz .no_e ; no --> (ZR) 3609 0000298D B045 <1> mov al, 'E' 3610 0000298F AA <1> stosb ; store E for Exx register name 3611 <1> .no_e: 3612 00002990 A5 <1> movsw ; store register name, increase pointer 3613 00002991 B03D <1> mov al, '=' 3614 00002993 AA <1> stosb ; store equality sign 3615 00002994 742E <1> jz .no_high ; (ZF left from before) 3616 <1> 3617 00002996 8026[A600]FE <1> clropt [internalflags3], dif3_highlighting 3618 0000299B 8B87[720C] <1> mov ax, word [regs + bx + 2] 3619 0000299F 8B97[B20C] <1> mov dx, word [regs_prior + bx + 2] 3620 000029A3 F606[8600]04 <1> testopt [options3], opt3_r_highlight_full 3621 000029A8 7417 <1> jz @F 3622 000029AA 39C2 <1> cmp dx, ax 3623 000029AC 7510 <1> jne .highlighthigh 3624 000029AE 52 <1> push dx 3625 000029AF 50 <1> push ax 3626 000029B0 8B87[700C] <1> mov ax, word [regs + bx] 3627 000029B4 8B97[B00C] <1> mov dx, word [regs_prior + bx] 3628 000029B8 39C2 <1> cmp dx, ax 3629 000029BA 58 <1> pop ax 3630 000029BB 5A <1> pop dx 3631 000029BC 7403 <1> je @F 3632 <1> .highlighthigh: 3633 000029BE E82500 <1> call highlight 3634 <1> @@: 3635 000029C1 E85000 <1> call hexword_diff ; store high word (only if 32-bit register) 3636 <1> .no_high: 3637 000029C4 8B87[700C] <1> mov ax, word [regs + bx] 3638 000029C8 8B97[B00C] <1> mov dx, word [regs_prior + bx] 3639 000029CC F606[8600]04 <1> testopt [options3], opt3_r_highlight_full 3640 000029D1 7407 <1> jz @F 3641 000029D3 39C2 <1> cmp dx, ax 3642 000029D5 7403 <1> je @F 3643 000029D7 E80C00 <1> call highlight 3644 <1> @@: 3645 000029DA E83700 <1> call hexword_diff ; store low word 3646 <1> 3647 000029DD E81D00 <1> call unhighlight 3648 <1> 3649 000029E0 B020 <1> mov al, 32 3650 000029E2 AA <1> stosb ; store space 3651 000029E3 E295 <1> loop . 3652 000029E5 C3 <1> retn 3653 <1> ; Note: This code doesn't use 386+ registers to display our internal 3654 <1> ; variables for these. Currently, setting the RX bit of options 3655 <1> ; will display the 32-bit variables even on non-386 machines. 3656 <1> ; Changing this code to require EAX would require changes to our 3657 <1> ; check too. 3658 <1> ; 32-bit code probably wouldn't be much shorter than the current 3659 <1> ; implementation as well. 3660 <1> 3661 <1> highlight: 3662 000029E6 F606[A600]01 <1> testopt [internalflags3], dif3_highlighting 3663 000029EB 750F <1> jnz @F 3664 000029ED 800E[A600]01 <1> setopt [internalflags3], dif3_highlighting 3665 000029F2 56 <1> push si 3666 000029F3 51 <1> push cx 3667 000029F4 BE[4B6D] <1> mov si, msg.highlight 3668 000029F7 E8650B <1> call copy_single_counted_string 3669 000029FA 59 <1> pop cx 3670 000029FB 5E <1> pop si 3671 <1> @@: 3672 000029FC C3 <1> retn 3673 <1> 3674 <1> unhighlight: 3675 000029FD F606[A600]01 <1> testopt [internalflags3], dif3_highlighting 3676 00002A02 740F <1> jz @F 3677 00002A04 8026[A600]FE <1> clropt [internalflags3], dif3_highlighting 3678 00002A09 56 <1> push si 3679 00002A0A 51 <1> push cx 3680 00002A0B BE[506D] <1> mov si, msg.unhighlight 3681 00002A0E E84E0B <1> call copy_single_counted_string 3682 00002A11 59 <1> pop cx 3683 00002A12 5E <1> pop si 3684 <1> @@: 3685 00002A13 C3 <1> retn 3686 <1> 3687 <1> hexword_diff: 3688 00002A14 F606[8600]01 <1> testopt [options3], opt3_r_highlight_diff 3689 00002A19 7407 <1> jz @F 3690 00002A1B F606[8600]04 <1> testopt [options3], opt3_r_highlight_full 3691 00002A20 7403 <1> jz @FF 3692 <1> @@: 3693 00002A22 E95792 <1> jmp hexword 3694 <1> 3695 <1> @@: 3696 <1> .hexword: 3697 00002A25 86C4 <1> xchg al, ah 3698 00002A27 86D6 <1> xchg dl, dh 3699 00002A29 E80400 <1> call .hexbyte 3700 00002A2C 86C4 <1> xchg al, ah 3701 00002A2E 86D6 <1> xchg dl, dh 3702 <1> 3703 <1> .hexbyte: 3704 00002A30 51 <1> push cx 3705 00002A31 B104 <1> mov cl, 4 3706 00002A33 D2C0 <1> rol al, cl 3707 00002A35 D2C2 <1> rol dl, cl 3708 00002A37 E80500 <1> call .hexnyb 3709 00002A3A D2C0 <1> rol al, cl 3710 00002A3C D2C2 <1> rol dl, cl 3711 00002A3E 59 <1> pop cx 3712 <1> 3713 <1> .hexnyb: 3714 00002A3F 50 <1> push ax 3715 00002A40 88D4 <1> mov ah, dl 3716 00002A42 250F0F <1> and ax, 0F0Fh 3717 00002A45 38E0 <1> cmp al, ah 3718 00002A47 7405 <1> je .unhighlight 3719 <1> .highlight: 3720 00002A49 E89AFF <1> call highlight 3721 00002A4C EB03 <1> jmp .common 3722 <1> 3723 <1> .unhighlight: 3724 00002A4E E8ACFF <1> call unhighlight 3725 <1> .common: 3726 <1> ; INP: original ax on stack, then return near address 3727 <1> ; al = nybble value to display, 0..15 3728 <1> ; es:di -> where to store 3729 <1> ; OUT: es:di incremented 3730 <1> ; ax restored 3731 <1> ; return to near address that was on stack 3732 00002A51 E93D92 <1> jmp hexnyb.common 3733 <1> 3734 <1> 3735 <1> %if _RN 3736 <1> ; The layout for FSAVE/FRSTOR depends on mode and 16-/32-bit. 3737 <1> 3738 <1> %if 0 3739 <1> struc FPENV16 3740 <1> .cw: resw 1 ; 00h 3741 <1> .sw: resw 1 ; 02h 3742 <1> .tw: resw 1 ; 04h 3743 <1> .fip: resw 1 ; 06h IP offset 3744 <1> .opc: ; 08h RM: opcode (0-10), IP 16-19 in high bits 3745 <1> .fcs: resw 1 ; 08h PM: IP selector 3746 <1> .fop: resw 1 ; 0Ah operand pointer offset 3747 <1> .foph: ; 0Ch RM: operand pointer 16-19 in high bits 3748 <1> .fos: resw 1 ; 0Ch PM: operand pointer selector 3749 <1> endstruc; 0Eh 3750 <1> 3751 <1> struc FPENV32 3752 <1> .cw: resd 1 ; 00h 3753 <1> .sw: resd 1 ; 04h 3754 <1> .tw: resd 1 ; 08h 3755 <1> .fip: resd 1 ; 0Ch ip offset (RM: bits 0-15 only) 3756 <1> .fopcr: ; 10h (dword) RM: opcode (0-10), ip (12-27) 3757 <1> .fcs: resw 1 ; 10h PM: ip selector 3758 <1> .fopcp: resw 1 ; 12h PM: opcode (bits 0-10) 3759 <1> .foo: resd 1 ; 14h operand pointer offset (RM: bits 0-15 only) 3760 <1> .fooh: ; 18h (dword) RM: operand pointer (12-27) 3761 <1> .fos: resw 1 ; 18h PM: operand pointer selector 3762 <1> resw 1 ; 1Ah PM: not used 3763 <1> endstruc; 1Ch 3764 <1> %endif 3765 <1> 3766 <1> 3767 <1> usesection lDEBUG_DATA_ENTRY 3768 <1> 3769 <1> ; dumpregsFPU - Dump Floating Point Registers 3770 <1> fregnames: 3771 0000856C 435753575457 <1> db "CW", "SW", "TW" 3772 00008572 4F50433D49503D4450- <1> db "OPC=", "IP=", "DP=" 3772 0000857B 3D <1> 3773 0000857C 656D707479 <1> msg.empty: db "empty" 3774 <1> endarea msg.empty 3775 00008581 4E614E <1> msg.nan: db "NaN" 3776 <1> endarea msg.nan 3777 <1> 3778 <1> 3779 <1> usesection lDEBUG_CODE 3780 <1> 3781 <1> dumpregsFPU: 3782 00002A54 E804DB <1> call guard_auxbuff 3783 00002A57 8E06[FA09] <1> mov es, word [auxbuff_segorsel] 3784 <1> ; => auxbuff 3785 00002A5B 31FF <1> xor di, di ; -> auxbuff 3786 00002A5D B98000 <1> mov cx, 128 3787 00002A60 31C0 <1> xor ax, ax 3788 00002A62 F3AB <1> rep stosw ; initialise auxbuff 3789 <1> %if _AUXBUFFSIZE < (128 * 2) 3790 <1> %error auxbuff not large enough for dumpregsFPU 3791 <1> %endif 3792 00002A64 BF[0E08] <1> mov di, line_out 3793 00002A67 BE[6C85] <1> mov si, fregnames 3794 00002A6A 31DB <1> xor bx, bx ; es:bx -> auxbuff 3795 00002A6C 66 <1> _386_o32 3796 00002A6D 26DD37 <1> fnsave [es:bx] 3797 <1> 3798 <1> ; display CW, SW and TW 3799 00002A70 16 <1> push ss 3800 00002A71 07 <1> pop es ; es:di -> line_out 3801 00002A72 B90300 <1> mov cx, 3 3802 <1> .nextfpr: 3803 00002A75 A5 <1> movsw 3804 00002A76 B03D <1> mov al, '=' 3805 00002A78 AA <1> stosb 3806 00002A79 87F3 <1> xchg si, bx 3807 00002A7B 8E1E[FA09] <1> mov ds, word [auxbuff_segorsel] 3808 <1> ; ds:si -> auxbuff entry 3809 00002A7F 66 <1> _386_o32 ; lodsd 3810 00002A80 AD <1> lodsw 3811 00002A81 16 <1> push ss 3812 00002A82 1F <1> pop ds ; ds:si -> fregnames entry 3813 00002A83 87F3 <1> xchg si, bx 3814 00002A85 50 <1> push ax 3815 00002A86 E8F391 <1> call hexword 3816 00002A89 B020 <1> mov al, 32 3817 00002A8B AA <1> stosb 3818 00002A8C E2E7 <1> loop .nextfpr 3819 <1> 3820 <1> ; display OPC 3821 <1> ; in 16-bit PM, there's no OPC 3822 <1> ; in 32-bit PM, there's one, but the location differs from RM 3823 00002A8E 53 <1> push bx 3824 <1> %if _PM 3825 00002A8F E84369 <1> call ispm 3826 00002A92 7408 <1> jz .notpm_opc 3827 00002A94 83C302 <1> add bx, byte 2 ; location of OPC in PM differs from RM 3828 00002A97 83C604 <1> _no386 add si, byte 4 ; no OPC in 16-bit PM 3829 00002A9A EB18 <1> _no386 jmp short .no_opc 3830 <1> .notpm_opc: 3831 <1> %endif 3832 00002A9C A5 <1> movsw 3833 00002A9D A5 <1> movsw 3834 00002A9E 87F3 <1> xchg si, bx 3835 00002AA0 8E1E[FA09] <1> mov ds, word [auxbuff_segorsel] 3836 <1> ; ds:si -> auxbuff entry 3837 00002AA4 66 <1> _386_o32 ; lodsd 3838 00002AA5 AD <1> lodsw ; skip word/dword 3839 00002AA6 AD <1> lodsw 3840 00002AA7 16 <1> push ss 3841 00002AA8 1F <1> pop ds ; ds:si -> fregnames entry 3842 00002AA9 87F3 <1> xchg si, bx 3843 00002AAB 25FF07 <1> and ax, 07FFh ; bits 0-10 only 3844 00002AAE E8CB91 <1> call hexword 3845 00002AB1 B020 <1> mov al, 32 3846 00002AB3 AA <1> stosb 3847 <1> .no_opc: 3848 00002AB4 5B <1> pop bx 3849 <1> 3850 <1> ; display IP and DP 3851 00002AB5 B102 <1> mov cl, 2 3852 <1> .nextfp: 3853 00002AB7 51 <1> push cx 3854 00002AB8 16 <1> push ss 3855 00002AB9 1F <1> pop ds ; ds:si -> fregnames entry 3856 00002ABA A5 <1> movsw 3857 00002ABB A4 <1> movsb 3858 00002ABC 87F3 <1> xchg si, bx 3859 00002ABE 8E1E[FA09] <1> mov ds, word [auxbuff_segorsel] 3860 <1> ; ds:si -> auxbuff entry 3861 00002AC2 66 <1> _386_o32 ; lodsd 3862 00002AC3 AD <1> lodsw 3863 00002AC4 66 <1> _386_o32 ; mov edx, eax 3864 00002AC5 89C2 <1> mov dx, ax 3865 00002AC7 66 <1> _386_o32 ; lodsd 3866 00002AC8 AD <1> lodsw 3867 00002AC9 87F3 <1> xchg si, bx 3868 00002ACB 16 <1> push ss 3869 00002ACC 1F <1> pop ds ; ds:si -> fregnames entry 3870 <1> %if _PM 3871 00002ACD E80569 <1> call ispm 3872 00002AD0 7408 <1> jz .notpm_ipdp 3873 00002AD2 E8A791 <1> call hexword 3874 00002AD5 B03A <1> mov al, ':' 3875 00002AD7 AA <1> stosb 3876 00002AD8 EB0D <1> jmp short .fppm 3877 <1> .notpm_ipdp: 3878 <1> %endif 3879 00002ADA B10C <1> mov cl, 12 3880 00002ADC 66 <1> _386_o32 ; shr eax, cl 3881 00002ADD D3E8 <1> shr ax, cl 3882 00002ADF E89A91 <1> _386 call hexword 3883 00002AE2 EB03 <1> _386 jmp short .fppm 3884 00002AE4 E8A791 <1> call hexnyb 3885 <1> .fppm: 3886 00002AE7 66 <1> _386_PM_o32 ; mov eax, edx 3887 00002AE8 89D0 <1> mov ax, dx 3888 00002AEA E8E868 <1> _386_PM call ispm 3889 00002AED 7403 <1> _386_PM jz .notpm_fppm 3890 00002AEF E87E91 <1> _386_PM call hexword_high 3891 <1> .notpm_fppm: 3892 00002AF2 E88791 <1> call hexword 3893 00002AF5 B020 <1> mov al, 32 3894 00002AF7 AA <1> stosb 3895 00002AF8 59 <1> pop cx 3896 00002AF9 E2BC <1> loop .nextfp 3897 <1> 3898 00002AFB 87F3 <1> xchg si, bx 3899 00002AFD 16 <1> push ss 3900 00002AFE 1F <1> pop ds ; ds = es = ss 3901 00002AFF E8AA91 <1> call trimputs 3902 <1> 3903 <1> ; display ST0..7 3904 00002B02 5D <1> pop bp ; TW 3905 00002B03 58 <1> pop ax ; SW 3906 00002B04 5A <1> pop dx ; CW (discarded here) 3907 <1> 3908 00002B05 B10A <1> mov cl, 10 3909 00002B07 D3E8 <1> shr ax, cl ; move TOP to bits 1..3 3910 00002B09 240E <1> and al, 1110b ; separate TOP 3911 00002B0B 88C1 <1> mov cl, al 3912 00002B0D D3CD <1> ror bp, cl ; adjust TW 3913 <1> 3914 00002B0F B130 <1> mov cl, '0' 3915 <1> .nextst: 3916 00002B11 BF[0E08] <1> mov di, line_out 3917 00002B14 51 <1> push cx 3918 00002B15 B85354 <1> mov ax, "ST" 3919 00002B18 AB <1> stosw 3920 00002B19 88C8 <1> mov al, cl 3921 00002B1B B43D <1> mov ah, '=' 3922 00002B1D AB <1> stosw 3923 00002B1E 57 <1> push di 3924 00002B1F A801 <1> test al, 1 3925 00002B21 B020 <1> mov al, 32 3926 00002B23 B91600 <1> mov cx, 22 3927 00002B26 F3AA <1> rep stosb 3928 00002B28 7404 <1> jz .oddst 3929 00002B2A B80D0A <1> mov ax, 10<<8|13 3930 00002B2D AB <1> stosw 3931 <1> .oddst: 3932 00002B2E B000 <1> mov al, 0 3933 00002B30 AA <1> stosb ; make it an ASCIZ string 3934 00002B31 5F <1> pop di 3935 <1> 3936 00002B32 89E8 <1> mov ax, bp 3937 00002B34 D1CD <1> ror bp, 1 3938 00002B36 D1CD <1> ror bp, 1 3939 00002B38 2403 <1> and al, 3 ; 00b = valid, 01b = zero, 10b = NaN, 11b = empty 3940 00002B3A 741F <1> jz .isvalid 3941 00002B3C 56 <1> push si 3942 00002B3D 16 <1> push ss 3943 00002B3E 1F <1> pop ds ; ds = es = ss 3944 00002B3F BE[7C85] <1> mov si, msg.empty 3945 00002B42 B105 <1> mov cl, msg.empty_size 3946 00002B44 3C03 <1> cmp al, 3 3947 00002B46 740E <1> je .gotst 3948 00002B48 BE[8185] <1> mov si, msg.nan 3949 00002B4B B103 <1> mov cl, msg.nan_size 3950 00002B4D 3C02 <1> cmp al, 2 3951 00002B4F 7405 <1> je .gotst 3952 00002B51 B030 <1> mov al, '0' 3953 00002B53 AA <1> stosb 3954 00002B54 31C9 <1> xor cx, cx 3955 <1> .gotst: 3956 00002B56 F3A4 <1> rep movsb 3957 00002B58 5E <1> pop si 3958 00002B59 EB34 <1> jmp short .regoutdone 3959 <1> 3960 <1> .isvalid: 3961 00002B5B 8E1E[FA09] <1> mov ds, word [auxbuff_segorsel] 3962 <1> ; ds:si -> auxbuff entry 3963 00002B5F 36F606[7C00]40 <1> testopt [ss:options], hexrn 3964 00002B65 7508 <1> jnz .hex 3965 00002B67 57 <1> push di ; -> buffer (first parameter; in es = ss) 3966 00002B68 1E <1> push ds 3967 00002B69 56 <1> push si ; -> auxbuff entry (second parameter) 3968 00002B6A E85C03 <1> call FloatToStr 3969 00002B6D EB20 <1> jmp short .regoutdone 3970 <1> 3971 <1> .hex: 3972 00002B6F 8B4408 <1> mov ax, word [si+8] 3973 00002B72 E80791 <1> call hexword 3974 00002B75 B02E <1> mov al, '.' 3975 00002B77 AA <1> stosb 3976 00002B78 8B4406 <1> mov ax, word [si+6] 3977 00002B7B E8FE90 <1> call hexword 3978 00002B7E 8B4404 <1> mov ax, word [si+4] 3979 00002B81 E8F890 <1> call hexword 3980 00002B84 8B4402 <1> mov ax, word [si+2] 3981 00002B87 E8F290 <1> call hexword 3982 00002B8A 8B04 <1> mov ax, word [si+0] 3983 00002B8C E8ED90 <1> call hexword 3984 <1> 3985 <1> .regoutdone: 3986 00002B8F BA[0E08] <1> mov dx, line_out 3987 00002B92 16 <1> push ss 3988 00002B93 1F <1> pop ds ; ds = es = ss 3989 00002B94 E89C94 <1> call putsz 3990 00002B97 59 <1> pop cx 3991 <1> 3992 00002B98 83C60A <1> add si, byte 10 ; -> next ST 3993 00002B9B FEC1 <1> inc cl 3994 00002B9D 80F938 <1> cmp cl, '8' 3995 00002BA0 7403E96CFF <1> jne .nextst 3996 00002BA5 8E06[FA09] <1> mov es, word [auxbuff_segorsel] 3997 <1> ; es => auxbuff 3998 00002BA9 66 <1> _386_o32 3999 00002BAA 26DD260000 <1> frstor [es:0] 4000 00002BAF C3 <1> retn 4001 <1> %endif 4002 <1> 4003 <1> 4004 <1> ; DMPFLAGS - Dump flags output. 4005 <1> dmpflags: 4006 00002BB0 52 <1> push dx 4007 00002BB1 53 <1> push bx 4008 00002BB2 BE[3482] <1> mov si, flagbits 4009 00002BB5 B90800 <1> mov cx, 8 4010 00002BB8 AD <1> .loop: lodsw 4011 00002BB9 8B16[EC0C] <1> mov dx, word [reg_efl - regs + regs_prior] 4012 00002BBD 21C2 <1> and dx, ax 4013 00002BBF 8B1E[AC0C] <1> mov bx, word [reg_efl] 4014 00002BC3 21C3 <1> and bx, ax 4015 00002BC5 39DA <1> cmp dx, bx 4016 00002BC7 7411 <1> je @F 4017 00002BC9 F606[8600]05 <1> testopt [options3], opt3_r_highlight_diff | opt3_r_highlight_full 4018 00002BCE 740A <1> jz @F 4019 00002BD0 F606[A600]02 <1> testopt [internalflags3], dif3_do_not_highlight 4020 00002BD5 7503 <1> jnz @F 4021 00002BD7 E80CFE <1> call highlight 4022 <1> @@: 4023 00002BDA 85DB <1> test bx, bx 4024 00002BDC 8B441E <1> mov ax, word [si+(flagsoff-flagbits)-2] 4025 00002BDF 7403 <1> jz .off ; if not set 4026 00002BE1 8B440E <1> mov ax, word [si+(flagson-flagbits)-2] 4027 00002BE4 AB <1> .off: stosw 4028 00002BE5 E815FE <1> call unhighlight 4029 00002BE8 B020 <1> mov al, 32 4030 00002BEA AA <1> stosb 4031 00002BEB E2CB <1> loop .loop 4032 00002BED 4F <1> dec di ; -> last (unnecessary) blank 4033 00002BEE 5B <1> pop bx 4034 00002BEF 5A <1> pop dx 4035 00002BF0 C3 <1> retn 4036 <1> 4037 <1> 4038 <1> %if _OPTIONS || _VARIABLES 4039 <1> dumpvars: 4040 <1> %if _VARIABLES 4041 00002BF1 BE[F00C] <1> mov si, vregs 4042 <1> %endif 4043 00002BF4 31DB <1> xor bx, bx 4044 <1> .loop: 4045 00002BF6 BF[0E08] <1> mov di, line_out 4046 00002BF9 31D2 <1> xor dx, dx 4047 <1> %if _VARIABLES 4048 00002BFB B90400 <1> mov cx, 4 4049 00002BFE E8B000 <1> call .dump ; display four variables 4050 00002C01 43 <1> inc bx ; (would be one off here) 4051 00002C02 56 <1> push si 4052 <1> %else 4053 <1> add bx, byte 4 ; (no motivation to optimize that) 4054 <1> %endif 4055 <1> %if _OPTIONS 4056 <1> %if _VARIABLES 4057 00002C03 B82020 <1> mov ax, 32<<8|32 4058 00002C06 AB <1> stosw ; more blanks inbetween 4059 <1> %endif 4060 00002C07 80FB10 <1> cmp bl, 16 4061 00002C0A 7439 <1> je .3 4062 00002C0C 80FB08 <1> cmp bl, 8 4063 00002C0F 7721 <1> ja .2 4064 00002C11 7411 <1> je .1 4065 <1> 4066 <1> ; First line, display DCO and DCS 4067 <1> .0: 4068 00002C13 B8434F <1> mov ax, "CO" 4069 00002C16 BE[7C00] <1> mov si, options 4070 00002C19 E88600 <1> call .dump_option 4071 00002C1C B84353 <1> mov ax, "CS" 4072 00002C1F BE[8C00] <1> mov si, startoptions 4073 00002C22 EB44 <1> jmp short .next 4074 <1> 4075 <1> ; Second line, DAO and DAS 4076 <1> .1: 4077 00002C24 B8414F <1> mov ax, "AO" 4078 00002C27 BE[AC00] <1> mov si, asm_options 4079 00002C2A E87500 <1> call .dump_option 4080 00002C2D B84153 <1> mov ax, "AS" 4081 <1> ; asm_startoptions follows directly behind asm_options 4082 00002C30 EB36 <1> jmp short .next 4083 <1> 4084 <1> ; Third line, DIF and DPI 4085 <1> .2: 4086 00002C32 B84946 <1> mov ax, "IF" 4087 00002C35 BE[9C00] <1> mov si, internalflags 4088 00002C38 E86700 <1> call .dump_option 4089 00002C3B B85049 <1> mov ax, "PI" 4090 00002C3E BE[D40A] <1> mov si, psp22 4091 00002C41 42 <1> inc dx 4092 00002C42 42 <1> inc dx 4093 00002C43 EB23 <1> jmp short .next 4094 <1> 4095 <1> ; Fourth line, DPR, DPS (if _PM) and DPP 4096 <1> .3: 4097 00002C45 42 <1> inc dx 4098 00002C46 B85052 <1> mov ax, "PR" 4099 00002C49 BE[B00A] <1> mov si, pspdbg 4100 00002C4C E85300 <1> call .dump_option 4101 <1> %if _PM 4102 00002C4F 31C0 <1> xor ax, ax 4103 00002C51 E88167 <1> call ispm 4104 00002C54 7502 <1> jnz .3_rm 4105 00002C56 1E <1> push ds 4106 00002C57 A8 <1> db __TEST_IMM8 ; (skip push) 4107 <1> .3_rm: 4108 00002C58 50 <1> push ax 4109 00002C59 B85053 <1> mov ax, "PS" 4110 00002C5C 89E6 <1> mov si, sp 4111 00002C5E E84100 <1> call .dump_options 4112 00002C61 58 <1> pop ax 4113 <1> %else 4114 <1> mov ax, 32<<8|32 4115 <1> stosw 4116 <1> stosw 4117 <1> %endif 4118 00002C62 B85050 <1> mov ax, "PP" 4119 00002C65 BE[D80A] <1> mov si, parent 4120 <1> 4121 <1> .next: 4122 00002C68 E83700 <1> call .dump_options 4123 <1> %endif 4124 00002C6B 53 <1> push bx 4125 00002C6C E84590 <1> call putsline_crlf ; display line 4126 00002C6F 5B <1> pop bx ; (retain counter) 4127 <1> %if _VARIABLES 4128 00002C70 5E <1> pop si ; (retain pointer to next variable) 4129 <1> %endif 4130 00002C71 80FB10 <1> cmp bl, 16 ; was end ? 4131 00002C74 7580 <1> jne .loop ; no, loop --> 4132 <1> 4133 <1> ; done 4134 <1> .mode: 4135 00002C76 BA[295E] <1> mov dx, msg.rv_mode.before 4136 00002C79 E8B793 <1> call putsz 4137 <1> %if _PM 4138 00002C7C E85667 <1> call ispm 4139 00002C7F 7511 <1> jnz .mode_86m 4140 00002C81 BA[385E] <1> mov dx, msg.rv_mode_dpmi_16 4141 00002C84 8B1E[9C0C] <1> mov bx, word [reg_cs] 4142 00002C88 E8B432 <1> call test_d_b_bit 4143 00002C8B 7412 <1> jz @F 4144 00002C8D BA[495E] <1> mov dx, msg.rv_mode_dpmi_32 4145 00002C90 EB0D <1> jmp @F 4146 <1> 4147 <1> .mode_86m: 4148 <1> %endif 4149 00002C92 BA[5A5E] <1> mov dx, msg.rv_mode_r86m 4150 <1> ; (only 386+ has the V86M so even though smsw ax is a 4151 <1> ; 286 level instruction, so could be used without a 386, 4152 <1> ; we only really need it on a 386+.) 4153 00002C95 0F01E0 <1> _386 smsw ax 4154 00002C98 A801 <1> _386 test al, 1 4155 00002C9A 7403 <1> _386 jz @F 4156 00002C9C BA[695E] <1> _386 mov dx, msg.rv_mode_v86m 4157 <1> @@: 4158 00002C9F E99193 <1> jmp putsz 4159 <1> 4160 <1> 4161 <1> ; INP: ax = 2-byte option name ('N' will precede this) 4162 <1> ; d[si] = value 4163 <1> ; OUT: si-> behind value 4164 <1> ; cx = 0 4165 <1> ; CHG: ax 4166 <1> .dump_options: 4167 <1> %if _VARIABLES 4168 <1> .dump_option: 4169 00002CA2 C7052044 <1> mov word [di], " D" 4170 00002CA6 AF <1> scasw 4171 <1> %else 4172 <1> mov byte [di], ' ' 4173 <1> inc di 4174 <1> .dump_option: 4175 <1> mov byte [di], 'D' 4176 <1> inc di 4177 <1> %endif 4178 00002CA7 AB <1> stosw 4179 <1> %if _VARIABLES ; falls through otherwise, always count 1 4180 00002CA8 B90100 <1> mov cx, 1 4181 00002CAB EB0C <1> jmp short .dump_one 4182 <1> %endif 4183 <1> 4184 <1> %if 0 4185 <1> PM && OPTIONS && VARIABLES 4186 <1> V0=00000000 V1=00000000 V2=00000000 V3=00000000 DCO=00000000 DCS=00000000 4187 <1> V4=00000000 V5=00000000 V6=00000000 V7=00000000 DAO=00000000 DAS=00000000 4188 <1> V8=00000000 V9=00000000 VA=00000000 VB=00000000 DIF=0000840D DPI=0616:01DE 4189 <1> VC=00000000 VD=00000000 VE=00000000 VF=00000000 DPR=0984 DPS=0000 DPP=0616 4190 <1> 4191 <1> !PM && OPTIONS && VARIABLES 4192 <1> V0=00000000 V1=00000000 V2=00000000 V3=00000000 DCO=00000000 DCS=00000000 4193 <1> V4=00000000 V5=00000000 V6=00000000 V7=00000000 DAO=00000000 DAS=00000000 4194 <1> V8=00000000 V9=00000000 VA=00000000 VB=00000000 DIF=0000840D DPI=0616:01DE 4195 <1> VC=00000000 VD=00000000 VE=00000000 VF=00000000 DPR=0984 DPP=0616 4196 <1> 4197 <1> !OPTIONS && VARIABLES 4198 <1> V0=00000000 V1=00000000 V2=00000000 V3=00000000 4199 <1> V4=00000000 V5=00000000 V6=00000000 V7=00000000 4200 <1> V8=00000000 V9=00000000 VA=00000000 VB=00000000 4201 <1> VC=00000000 VD=00000000 VE=00000000 VF=00000000 4202 <1> 4203 <1> !PM && OPTIONS && !VARIABLES 4204 <1> DCO=00000000 DCS=00000000 4205 <1> DAO=00000000 DAS=00000000 4206 <1> DIF=0000840D DPI=0616:01DE 4207 <1> DPR=0984 DPP=0616 4208 <1> 4209 <1> PM && OPTIONS && !VARIABLES 4210 <1> DCO=00000000 DCS=00000000 4211 <1> DAO=00000000 DAS=00000000 4212 <1> DIF=0000840D DPI=0616:01DE 4213 <1> DPR=0984 DPS=0000 DPP=0616 4214 <1> 4215 <1> !OPTIONS && !VARIABLES 4216 <1> %endif 4217 <1> %if 0 4218 <1> DCO Debugger Common Options 4219 <1> DCS Debugger Common Startup options 4220 <1> DIF Debugger Internal Flags 4221 <1> DPR Debugger Process (Real-mode segment) 4222 <1> DPS Debugger Process Selector, or zero 4223 <1> DPP Debugger Parent Process 4224 <1> DPI Debugger Parent Interrupt 22h 4225 <1> DAO Debugger Assembler/disassembler Options 4226 <1> DAS Debugger Assembler/disassembler Startup options 4227 <1> %endif 4228 <1> 4229 <1> %if _VARIABLES 4230 <1> .dump_loop: 4231 00002CAD 43 <1> inc bx 4232 00002CAE B020 <1> mov al, 32 4233 00002CB0 AA <1> stosb 4234 <1> .dump: 4235 00002CB1 B056 <1> mov al, 'V' 4236 00002CB3 AA <1> stosb 4237 00002CB4 88D8 <1> mov al, bl 4238 00002CB6 E8D58F <1> call hexnyb 4239 <1> %endif 4240 <1> .dump_one: 4241 00002CB9 B03D <1> mov al, '=' 4242 00002CBB AA <1> stosb 4243 00002CBC AD <1> lodsw 4244 00002CBD 80FA01 <1> cmp dl, 1 4245 00002CC0 740D <1> je .dumpw 4246 00002CC2 50 <1> push ax 4247 00002CC3 AD <1> lodsw 4248 00002CC4 9C <1> pushf 4249 00002CC5 E8B48F <1> call hexword 4250 00002CC8 9D <1> popf ; CF 4251 00002CC9 7203 <1> jb .nocolon 4252 00002CCB B03A <1> mov al, ':' 4253 00002CCD AA <1> stosb 4254 <1> .nocolon: 4255 00002CCE 58 <1> pop ax 4256 <1> .dumpw: 4257 00002CCF E8AA8F <1> call hexword 4258 <1> %if _VARIABLES 4259 00002CD2 E2D9 <1> loop .dump_loop 4260 <1> %endif 4261 00002CD4 C3 <1> retn 4262 <1> %endif 4263 <1> 4264 <1> 4265 <1> dumpallvars: 4266 00002CD5 AC <1> lodsb 4267 00002CD6 E8B88E <1> call chkeol 4268 00002CD9 BE[F00C] <1> mov si, vregs 4269 00002CDC 31DB <1> xor bx, bx 4270 <1> .loop: 4271 00002CDE BF[0E08] <1> mov di, line_out 4272 00002CE1 B90400 <1> mov cx, 4 4273 00002CE4 31D2 <1> xor dx, dx 4274 00002CE6 E81500 <1> call .dump ; display four variables 4275 00002CE9 43 <1> inc bx ; (would be one off here) 4276 00002CEA 85D2 <1> test dx, dx 4277 00002CEC 7407 <1> jz @F 4278 00002CEE 56 <1> push si 4279 00002CEF 53 <1> push bx 4280 00002CF0 E8C18F <1> call putsline_crlf ; display line 4281 00002CF3 5B <1> pop bx ; (retain counter) 4282 00002CF4 5E <1> pop si ; (retain pointer to next variable) 4283 <1> @@: 4284 00002CF5 84DB <1> test bl, bl ; was end ? 4285 00002CF7 75E5 <1> jnz .loop ; no, loop --> 4286 00002CF9 C3 <1> retn 4287 <1> 4288 <1> .dump_loop: 4289 00002CFA 43 <1> inc bx 4290 00002CFB B020 <1> mov al, 32 4291 00002CFD AA <1> stosb 4292 <1> .dump: 4293 00002CFE B056 <1> mov al, 'V' 4294 00002D00 AA <1> stosb 4295 00002D01 88D8 <1> mov al, bl 4296 00002D03 E87D8F <1> call hexbyte 4297 <1> .dump_one: 4298 00002D06 B03D <1> mov al, '=' 4299 00002D08 AA <1> stosb 4300 00002D09 AD <1> lodsw 4301 00002D0A 09C2 <1> or dx, ax 4302 00002D0C 50 <1> push ax 4303 00002D0D AD <1> lodsw 4304 00002D0E 09C2 <1> or dx, ax 4305 00002D10 E8698F <1> call hexword 4306 00002D13 58 <1> pop ax 4307 00002D14 E8658F <1> call hexword 4308 00002D17 E2E1 <1> loop .dump_loop 4309 00002D19 C3 <1> retn 4310 <1> 4311 <1> 4312 <1> dumpmemory: 4313 00002D1A AC <1> lodsb 4314 00002D1B E8738E <1> call chkeol 4315 <1> 4316 00002D1E A1[D400] <1> mov ax, word [code_seg] 4317 <1> %if _PM 4318 00002D21 8B16[D600] <1> mov dx, word [code_sel] 4319 <1> %endif 4320 00002D25 BE[6A65] <1> mov si, msg.vm_codeseg 4321 00002D28 E82F00 <1> call .line 4322 <1> 4323 <1> %if _PM 4324 00002D2B A1[B00A] <1> mov ax, word [pspdbg] 4325 00002D2E 8CD2 <1> mov dx, ss 4326 <1> %else 4327 <1> mov ax, ss 4328 <1> %endif 4329 00002D30 BE[7865] <1> mov si, msg.vm_dataseg 4330 00002D33 E82400 <1> call .line 4331 <1> 4332 <1> %if _PM 4333 00002D36 A1[B00A] <1> mov ax, word [pspdbg] 4334 00002D39 8B16[068B] <1> mov dx, word [cssel] 4335 <1> %else 4336 <1> mov ax, ss 4337 <1> %endif 4338 00002D3D BE[8665] <1> mov si, msg.vm_entryseg 4339 00002D40 E81700 <1> call .line 4340 <1> 4341 <1> %if _PM 4342 00002D43 A1[FC09] <1> mov ax, word [auxbuff_segorsel + soaSegment] 4343 00002D46 8B16[FE09] <1> mov dx, word [auxbuff_segorsel + soaSelector] 4344 <1> %else 4345 <1> mov ax, word [auxbuff_segorsel] 4346 <1> %endif 4347 00002D4A BE[9565] <1> mov si, msg.vm_auxseg 4348 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 4349 00002D4D E80A00 <1> call .line 4350 <1> 4351 <1> %if _PM 4352 00002D50 A1[060B] <1> mov ax, word [history.segorsel + soaSegment] 4353 00002D53 8B16[080B] <1> mov dx, word [history.segorsel + soaSelector] 4354 <1> %else 4355 <1> mov ax, word [history.segorsel] 4356 <1> %endif 4357 00002D57 BE[A665] <1> mov si, msg.vm_hisseg 4358 <1> %endif 4359 <1> 4360 <1> .line: 4361 00002D5A BF[0E08] <1> mov di, line_out 4362 00002D5D E8FF07 <1> call copy_single_counted_string 4363 00002D60 E8198F <1> call hexword 4364 <1> %if _PM 4365 00002D63 E86F66 <1> call ispm 4366 00002D66 750A <1> jnz @F 4367 00002D68 BE[B765] <1> mov si, msg.vm_selector 4368 00002D6B E8F107 <1> call copy_single_counted_string 4369 00002D6E 92 <1> xchg ax, dx 4370 00002D6F E80A8F <1> call hexword 4371 <1> @@: 4372 <1> %endif 4373 00002D72 E93F8F <1> jmp putsline_crlf 4374 <1> 4375 <1> 4376 <1> dumpprocess: 4377 00002D75 AC <1> lodsb 4378 00002D76 E8188E <1> call chkeol 4379 <1> 4380 00002D79 E81383 <1> call var_psp_setup 4381 00002D7C E81A83 <1> call var_ppr_setup 4382 00002D7F E83083 <1> call var_ppi_setup 4383 <1> 4384 00002D82 BF[0E08] <1> mov di, line_out 4385 <1> 4386 00002D85 A1[A296] <1> mov ax, word [psp_segment] 4387 00002D88 BE[C265] <1> mov si, msg.vp_pspsegment 4388 00002D8B E85900 <1> call .line 4389 <1> 4390 00002D8E A1[A496] <1> mov ax, word [psp_parent] 4391 00002D91 BE[DE65] <1> mov si, msg.vp_parent 4392 00002D94 E85000 <1> call .line 4393 <1> 4394 00002D97 A1[A896] <1> mov ax, word [psp_pra + 2] 4395 00002D9A BE[E765] <1> mov si, msg.vp_pra 4396 00002D9D E84700 <1> call .line 4397 00002DA0 B03A <1> mov al, ':' 4398 00002DA2 AA <1> stosb 4399 00002DA3 A1[A696] <1> mov ax, word [psp_pra] 4400 00002DA6 E8D38E <1> call hexword 4401 <1> 4402 <1> %if _PM 4403 00002DA9 A1[AE0A] <1> mov ax, word [pspdbe] 4404 00002DAC BE[FF65] <1> mov si, msg.vp_pspsel 4405 00002DAF E83500 <1> call .line 4406 <1> %endif 4407 00002DB2 E8FF8E <1> call putsline_crlf 4408 <1> 4409 00002DB5 BF[0E08] <1> mov di, line_out 4410 <1> 4411 00002DB8 A1[B00A] <1> mov ax, word [pspdbg] 4412 00002DBB BE[D065] <1> mov si, msg.vp_dpspsegment 4413 00002DBE E82600 <1> call .line 4414 <1> 4415 00002DC1 A1[D80A] <1> mov ax, word [parent] 4416 00002DC4 BE[DE65] <1> mov si, msg.vp_dparent 4417 00002DC7 E81D00 <1> call .line 4418 <1> 4419 00002DCA A1[D60A] <1> mov ax, word [psp22 + 2] 4420 00002DCD BE[E765] <1> mov si, msg.vp_dpra 4421 00002DD0 E81400 <1> call .line 4422 00002DD3 B03A <1> mov al, ':' 4423 00002DD5 AA <1> stosb 4424 00002DD6 A1[D40A] <1> mov ax, word [psp22] 4425 00002DD9 E8A08E <1> call hexword 4426 <1> 4427 <1> %if _PM 4428 00002DDC 8CD0 <1> mov ax, ss 4429 00002DDE BE[FF65] <1> mov si, msg.vp_dpspsel 4430 00002DE1 E80300 <1> call .line 4431 <1> %endif 4432 00002DE4 E9CD8E <1> jmp putsline_crlf 4433 <1> 4434 <1> .line: 4435 00002DE7 E87507 <1> call copy_single_counted_string 4436 00002DEA E98F8E <1> jmp hexword 4437 <1> 4438 <1> 4439 <1> %if _MMXSUPP 4440 <1> subcpu 586 4441 <1> dumpregsMMX: 4442 00002DED E86BD7 <1> call guard_auxbuff 4443 00002DF0 8E1E[FA09] <1> mov ds, word [auxbuff_segorsel] ; => auxbuff 4444 00002DF4 66 <1> o32 4445 00002DF5 DD360000 <1> fnsave [0] 4446 00002DF9 BE1C00 <1> mov si, 7*4 4447 00002DFC B130 <1> mov cl, '0' 4448 00002DFE BF[0E08] <1> mov di, line_out 4449 <1> .nextreg: 4450 00002E01 8E1E[FA09] <1> mov ds, word [auxbuff_segorsel] ; => auxbuff 4451 00002E05 B84D4D <1> mov ax, "MM" 4452 00002E08 AB <1> stosw 4453 00002E09 88C8 <1> mov al, cl 4454 00002E0B B43D <1> mov ah, '=' 4455 00002E0D AB <1> stosw 4456 00002E0E 51 <1> push cx 4457 00002E0F B208 <1> mov dl, 8 4458 <1> .nextbyte: 4459 00002E11 AC <1> lodsb 4460 00002E12 E86E8E <1> call hexbyte 4461 00002E15 B020 <1> mov al, 32 4462 00002E17 F6C201 <1> test dl, 1 4463 00002E1A 7402 <1> jz .oddbyte 4464 00002E1C B02D <1> mov al, '-' 4465 <1> .oddbyte: 4466 00002E1E AA <1> stosb 4467 00002E1F FECA <1> dec dl 4468 00002E21 75EE <1> jnz .nextbyte 4469 00002E23 4F <1> dec di 4470 00002E24 B82020 <1> mov ax, 32<<8|32 4471 00002E27 AB <1> stosw 4472 00002E28 83C602 <1> add si, byte 2 4473 00002E2B 59 <1> pop cx 4474 00002E2C F6C101 <1> test cl, 1 4475 00002E2F 740A <1> jz .oddreg 4476 00002E31 51 <1> push cx 4477 00002E32 16 <1> push ss 4478 00002E33 1F <1> pop ds ; ds = es = ss 4479 00002E34 E8758E <1> call trimputs 4480 00002E37 59 <1> pop cx 4481 00002E38 BF[0E08] <1> mov di, line_out 4482 <1> .oddreg: 4483 00002E3B FEC1 <1> inc cl 4484 00002E3D 80F938 <1> cmp cl, '8' 4485 00002E40 75BF <1> jne .nextreg 4486 00002E42 8E1E[FA09] <1> mov ds, word [auxbuff_segorsel] ; => auxbuff 4487 00002E46 66 <1> o32 4488 00002E47 D9260000 <1> fldenv [0] 4489 00002E4B C3 <1> retn 4490 <1> subcpureset 4491 <1> %endif 2183 %if _RN 2184 %include "fptostr.asm" 2185 <1> 2186 <1> %if 0 2187 <1> 2188 <1> Copyright (C) 2008-2012 C. Masloch 2189 <1> 2190 <1> Usage of the works is permitted provided that this 2191 <1> instrument is retained with the works, so that any entity 2192 <1> that uses the works is notified of this instrument. 2193 <1> 2194 <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 2195 <1> 2196 <1> %endif 2197 <1> 2198 <1> 2199 <1> usesection lDEBUG_DATA_ENTRY 2200 <1> 2201 <1> ;--- defines procedures 2202 <1> ;--- PowerOf10 2203 <1> ;--- FloatToBCD 2204 <1> ;--- FloatToStr 2205 <1> 2206 <1> ; These are bits in the FP status word. 2207 <1> 2208 <1> FP_LESSTHAN equ 01h 2209 <1> FP_EQUALTO equ 40h 2210 <1> 2211 00008584 00 <1> align 8, db 0 2212 00008588 0000000000002440 <1> ten: dq 10.0 2213 00008590 0080E03779C34143 <1> ten16: dq 1.0e16 2214 <1> ;rounder:dq 5.0e10 2215 <1> 2216 00008598 00000000000000A002- <1> ten_1: dt 1.0e1 ; 10.0 2216 000085A1 40 <1> 2217 000085A2 00000000000000C805- <1> dt 1.0e2 ; 100.0 2217 000085AB 40 <1> 2218 000085AC 00000000000000FA08- <1> dt 1.0e3 ; 1,000.0 2218 000085B5 40 <1> 2219 000085B6 000000000000409C0C- <1> dt 1.0e4 ; 10,000.0 2219 000085BF 40 <1> 2220 000085C0 00000000000050C30F- <1> dt 1.0e5 ; 100,000.0 2220 000085C9 40 <1> 2221 000085CA 00000000000024F412- <1> dt 1.0e6 ; 1,000,000.0 2221 000085D3 40 <1> 2222 000085D4 000000000080969816- <1> dt 1.0e7 ; 10,000,000.0 2222 000085DD 40 <1> 2223 000085DE 000000000020BCBE19- <1> dt 1.0e8 ; 100,000,000.0 2223 000085E7 40 <1> 2224 000085E8 0000000000286BEE1C- <1> dt 1.0e9 ; 1,000,000,000.0 2224 000085F1 40 <1> 2225 000085F2 0000000000F9029520- <1> dt 1.0e10 ; 10,000,000,000.0 2225 000085FB 40 <1> 2226 000085FC 0000000040B743BA23- <1> dt 1.0e11 ; 100,000,000,000.0 2226 00008605 40 <1> 2227 00008606 0000000010A5D4E826- <1> dt 1.0e12 ; 1,000,000,000,000.0 2227 0000860F 40 <1> 2228 00008610 000000002AE784912A- <1> dt 1.0e13 ; 10,000,000,000,000.0 2228 00008619 40 <1> 2229 0000861A 00000080F420E6B52D- <1> dt 1.0e14 ; 100,000,000,000,000.0 2229 00008623 40 <1> 2230 00008624 000000A031A95FE330- <1> dt 1.0e15 ; 1,000,000,000,000,000.0 2230 0000862D 40 <1> 2231 <1> 2232 0000862E 00000004BFC91B8E34- <1> ten_16: dt 1.0e16 2232 00008637 40 <1> 2233 00008638 9EB5702BA8ADC59D69- <1> dt 1.0e32 2233 00008641 40 <1> 2234 00008642 D795430E058D29AF9E- <1> dt 1.0e48 2234 0000864B 40 <1> 2235 0000864C D5A6CFFF491F78C2D3- <1> dt 1.0e64 2235 00008655 40 <1> 2236 00008656 FCF7DA878F7AE7D708- <1> dt 1.0e80 2236 0000865F 41 <1> 2237 00008660 A3149BC516ABB3EF3D- <1> dt 1.0e96 2237 00008669 41 <1> 2238 0000866A 9E322399C0AD0F8573- <1> dt 1.0e112 2238 00008673 41 <1> 2239 00008674 E08CE980C947BA93A8- <1> dt 1.0e128 2239 0000867D 41 <1> 2240 0000867E E7A6D3A8C5B902A4DD- <1> dt 1.0e144 2240 00008687 41 <1> 2241 00008688 AA17E67F2BA116B612- <1> dt 1.0e160 2241 00008691 42 <1> 2242 00008692 93BF9B8591A228CA47- <1> dt 1.0e176 2242 0000869B 42 <1> 2243 0000869C 6B5527398DF770E07C- <1> dt 1.0e192 2243 000086A5 42 <1> 2244 000086A6 46618237350C2EF9B1- <1> dt 1.0e208 2244 000086AF 42 <1> 2245 000086B0 30C93CE3FF96528AE7- <1> dt 1.0e224 2245 000086B9 42 <1> 2246 000086BA 6617BFD6F3A691991C- <1> dt 1.0e240 2246 000086C3 43 <1> 2247 <1> 2248 000086C4 8EDEF99DFBEB7EAA51- <1> ten_256:dt 1.0e256 2248 000086CD 43 <1> 2249 <1> 2250 <1> ; The remaining exponents are only necessary for 10-byte doubles. 2251 <1> 2252 000086CE C7910EA6AEA019E3A3- <1> dt 1.0e512 2252 000086D7 46 <1> 2253 000086D8 8CA600CDA89C3F97F6- <1> dt 1.0e768 2253 000086E1 49 <1> 2254 000086E2 170C7581867576C948- <1> dt 1.0e1024 2254 000086EB 4D <1> 2255 000086EC CB6E85EB0E8C2C869B- <1> dt 1.0e1280 2255 000086F5 50 <1> 2256 000086F6 E4A793393B35B8B2ED- <1> dt 1.0e1536 2256 000086FF 53 <1> 2257 00008700 8CB84A9284DD0DEE3F- <1> dt 1.0e1792 2257 00008709 57 <1> 2258 0000870A E55D3DC55D3B8B9E92- <1> dt 1.0e2048 2258 00008713 5A <1> 2259 00008714 6F80F44132202ED3E4- <1> dt 1.0e2304 2259 0000871D 5D <1> 2260 0000871E A6F0A120C054A58C37- <1> dt 1.0e2560 2260 00008727 61 <1> 2261 00008728 CC77D99B9A0A57BB89- <1> dt 1.0e2816 2261 00008731 64 <1> 2262 00008732 8B5A8BD8255D89F9DB- <1> dt 1.0e3072 2262 0000873B 67 <1> 2263 0000873C 45FE99567DEF30A62E- <1> dt 1.0e3328 2263 00008745 6B <1> 2264 00008746 F8F327BFA2C85DDD80- <1> dt 1.0e3584 2264 0000874F 6E <1> 2265 00008750 9B97208A025260C425- <1> dt 1.0e4096 2265 00008759 75 <1> 2266 0000875A B41CE17BE352C98278- <1> dt 1.0e4352 2266 00008763 78 <1> 2267 00008764 F059D56E621135AECA- <1> dt 1.0e4608 2267 0000876D 7B <1> 2268 0000876E 6D6D14B97F380BE81C- <1> dt 1.0e4864 2268 00008777 7F <1> 2269 <1> 2270 <1> 2271 <1> usesection lDEBUG_CODE 2272 <1> 2273 <1> ; Divide or multiply st0 to normalize it 2274 <1> ; 2275 <1> ; INP: ax = exponent word 2276 <1> ; CHG: bx, dx, cl 2277 <1> PowerOf10: 2278 00002E4C 56 <1> push si 2279 00002E4D 50 <1> push ax 2280 00002E4E 85C0 <1> test ax, ax 2281 00002E50 7902 <1> jns .notnegative 2282 00002E52 F7D8 <1> neg ax 2283 <1> .notnegative: 2284 00002E54 D9E8 <1> fld1 2285 00002E56 88C3 <1> mov bl, al 2286 00002E58 80E30F <1> and bl, 0Fh ; bits 0..3 2287 00002E5B 7406 <1> je .0..3zero 2288 00002E5D BE[9885] <1> mov si, ten_1 2289 00002E60 E82B00 <1> call mul10 2290 <1> .0..3zero: 2291 00002E63 88C3 <1> mov bl, al 2292 00002E65 B104 <1> mov cl, 4 2293 00002E67 D2EB <1> shr bl, cl 2294 00002E69 80E30F <1> and bl, 0Fh ; bits 4..7 2295 00002E6C 7406 <1> je .4..7zero 2296 00002E6E BE[2E86] <1> mov si, ten_16 2297 00002E71 E81A00 <1> call mul10 2298 <1> .4..7zero: 2299 00002E74 88E3 <1> mov bl, ah 2300 00002E76 80E31F <1> and bl, 1Fh ; bits 8..12 2301 00002E79 7406 <1> jz .8..12zero 2302 00002E7B BE[C486] <1> mov si, ten_256 2303 00002E7E E80D00 <1> call mul10 2304 <1> .8..12zero: 2305 00002E81 58 <1> pop ax 2306 00002E82 85C0 <1> test ax, ax 2307 00002E84 7904 <1> jns .notnegative2 2308 00002E86 DEF9 <1> fdivp st1 2309 00002E88 5E <1> pop si 2310 00002E89 C3 <1> retn 2311 <1> 2312 <1> .notnegative2: 2313 00002E8A DEC9 <1> fmulp st1 2314 00002E8C 5E <1> pop si 2315 00002E8D C3 <1> retn 2316 <1> 2317 <1> mul10: 2318 00002E8E FECB <1> dec bl 2319 00002E90 B700 <1> mov bh, 0 2320 00002E92 50 <1> push ax 2321 00002E93 89D8 <1> mov ax, bx 2322 00002E95 01C0 <1> add ax, ax 2323 00002E97 01C0 <1> add ax, ax ; *4 2324 00002E99 01C3 <1> add bx, ax ; *5 2325 00002E9B 01DB <1> add bx, bx ; *10 2326 00002E9D 58 <1> pop ax 2327 00002E9E DB28 <1> fld tword [bx + si] 2328 00002EA0 DEC9 <1> fmulp st1 2329 00002EA2 C3 <1> retn 2330 <1> 2331 <1> 2332 <1> ; Convert a floating point register to ASCII. For internal use. 2333 <1> ; The result always has exactly 18 digits, with zero padding 2334 <1> ; on the left if required. 2335 <1> ; 2336 <1> ; INP: st0 = number to convert, 0 <= st0 < 1.0E19 2337 <1> ; di-> 18-character output buffer 2338 <1> ; CHG: si, di, cx, ax 2339 <1> FloatToBCD: 2340 00002EA3 55 <1> push bp 2341 00002EA4 89E5 <1> mov bp, sp 2342 00002EA6 83EC0C <1> sub sp, 12 2343 <1> 2344 <1> ; The fbstp instruction converts the top of the stack to 2345 <1> ; a packed BCD form in ten bytes, with two digits per 2346 <1> ; byte. The top byte has the sign, which we ignore. 2347 00002EA9 DF76F4 <1> fbstp [ bp-12 ] 2348 <1> 2349 <1> ; Now we need to unpack the BCD to ASCII. 2350 00002EAC 8D76FC <1> lea si, [ bp-4 ] 2351 00002EAF B90900 <1> mov cx, 9 2352 <1> .nextdigits: 2353 00002EB2 8A04 <1> mov al, byte [ si ] ; xxxx xxxx AAAA BBBB 2354 00002EB4 4E <1> dec si 2355 <1> %if 1 2356 00002EB5 B400 <1> mov ah, 0 ; 0000 0000 AAAA BBBB 2357 00002EB7 51 <1> push cx 2358 00002EB8 B104 <1> mov cl, 4 2359 00002EBA D3C8 <1> ror ax, cl ; BBBB xxxx xxxx AAAA 2360 00002EBC D2C4 <1> rol ah, cl ; xxxx BBBB xxxx AAAA 2361 00002EBE 59 <1> pop cx 2362 <1> ;and ax, 0F0Fh ; 0000 BBBB 0000 AAAA 2363 <1> %else 2364 <1> aam 16 ; 0000 AAAA 0000 BBBB 2365 <1> xchg al, ah ; 0000 BBBB 0000 AAAA 2366 <1> %endif 2367 00002EBF 053030 <1> add ax, "00" 2368 00002EC2 AB <1> stosw 2369 00002EC3 E2ED <1> loop .nextdigits 2370 00002EC5 89EC <1> mov sp, bp 2371 00002EC7 5D <1> pop bp 2372 00002EC8 C3 <1> retn 2373 <1> 2374 <1> 2375 <1> ; Convert a double precision number to a string. 2376 <1> ; 2377 <1> ; Entry: dword [far pfpin] -> 8-byte double to convert, non-zero 2378 <1> ; es = ss : word [pszDbl] -> character buffer 2379 <1> ; 2380 <1> ; Exit: es = ss : word [pszDbl] -> converted value 2381 <1> ; 2382 <1> ; CHG: ax, bx, cx, dx 2383 <1> ; 2384 <1> ; The buffer at pszDbl should be at least 19 bytes long. 2385 <1> ; The buffer needs to be initialized with blanks. 2386 <1> 2387 <1> ;FloatToStr PROC stdcall public USES si di pfpin: ptr TBYTE, pszDbl: PTR BYTE 2388 <1> FloatToStr: 2389 <1> lframe near 2390 <1> lpar word, ??pszDbl ; pszDbl: PTR BYTE, near 2391 <1> lpar dword, ??pfpin ; pfpin: ptr TBYTE, but far 2392 <1> lvar word, ??iExp ; LOCAL iExp: WORD 2393 <1> lvar word, ??mystat ; LOCAL mystat: WORD 2394 <1> lvar 10, ??fpin ; LOCAL fpin: TBYTE 2395 <1> lvar 22, ??szTemp ; LOCAL szTemp[22]: BYTE 2396 00002EC9 5589E58D66DC <1> lenter 2397 <1> 2398 <1> %define iExp bp+???%+%? 2399 <1> %define mystat bp+???%+%? 2400 <1> %define fpin bp+???%+%? 2401 <1> %define szTemp bp+???%+%? 2402 <1> %define pfpin bp+???%+%? 2403 <1> %define pszDbl bp+???%+%? 2404 <1> 2405 00002ECF 1E <1> push ds 2406 00002ED0 56 <1> push si ; USES si 2407 00002ED1 06 <1> push es 2408 00002ED2 57 <1> push di ; USES di 2409 <1> 2410 <1> ; Special case zero has been filtered already. (fxtract fails for zero.) 2411 00002ED3 C57604 <1> lds si, [pfpin] 2412 00002ED6 16 <1> push ss 2413 00002ED7 07 <1> pop es 2414 00002ED8 8D7EF2 <1> lea di, [fpin] 2415 00002EDB B90500 <1> mov cx, 5 2416 00002EDE F3A5 <1> rep movsw ; store number in local buffer 2417 00002EE0 16 <1> push ss 2418 00002EE1 1F <1> pop ds 2419 <1> 2420 00002EE2 8B7E08 <1> mov di, [pszDbl] ; -> output buffer 2421 <1> 2422 <1> ; Check for a negative number. 2423 00002EE5 F646FB80 <1> test byte [fpin+9], 80h 2424 00002EE9 7407 <1> jz .ispositive 2425 00002EEB 8066FB7F <1> and byte [fpin+9], ~80h ; change to positive 2426 00002EEF B02D <1> mov al, '-' ; store a minus sign 2427 00002EF1 AA <1> stosb 2428 <1> .ispositive: 2429 <1> 2430 <1> ; Load our value onto the stack two times. 2431 00002EF2 DB6EF2 <1> fld tword [fpin] 2432 00002EF5 D9C0 <1> fld st0 2433 <1> 2434 <1> ; Compute the closest power of 10 below the number. We can't get an 2435 <1> ; exact value because of rounding. We could get close by adding in 2436 <1> ; log10(mantissa), but it still wouldn't be exact. Since we'll have to 2437 <1> ; check the result anyway, it's silly to waste cycles worrying about 2438 <1> ; the mantissa. 2439 <1> ; 2440 <1> ; The exponent is basically log2(fpin). Those of you who remember 2441 <1> ; algebra realize that log2(fpin) x log10(2) = log10(fpin), which is 2442 <1> ; what we want. 2443 <1> 2444 00002EF7 D9F4 <1> fxtract ; ST = mantissa, exponent, fpin 2445 00002EF9 DDD8 <1> fstp st0 ; discard the mantissa 2446 00002EFB D9EC <1> fldlg2 ; push log10(2) 2447 00002EFD DEC9 <1> fmulp st1, st0 ; ST = log10(fpin), fpin 2448 00002EFF DF5EFE <1> fistp word [iExp] ; ST = fpin 2449 <1> 2450 <1> ; An 8-byte double can carry almost 16 digits of precision. Actually, it's 2451 <1> ; 15.9 digits, so some numbers close to 1E17 will be wrong in the bottom 2452 <1> ; digit. If this is a concern, change the 18 or 16 to a 15. 2453 <1> ; 2454 <1> ; A 10-byte double can carry almost 19 digits, but fbstp only stores the 2455 <1> ; guaranteed 18. Since we're doing 10-byte doubles, we check for 18 instead of 16. 2456 <1> 2457 00002F02 837EFE12 <1> cmp word [iExp], 18 2458 00002F06 7332 <1> jae .notbelow18 2459 00002F08 D9C0 <1> fld st0 ; ST = fpin, fpin 2460 00002F0A D9FC <1> frndint ; ST = int(fpin), fpin 2461 00002F0C D8D9 <1> fcomp st1 ; ST = fpin, status set 2462 00002F0E 9BDD7EFC <1> fstsw word [mystat] 2463 00002F12 8B46FC <1> mov ax, word [mystat] 2464 00002F15 9E <1> sahf 2465 00002F16 7522 <1> jne .notequal 2466 <1> 2467 <1> ; We have an integer! Lucky day. Go convert it into a temp buffer. 2468 <1> 2469 00002F18 57 <1> push di 2470 00002F19 8D7EDC <1> lea di, [szTemp] 2471 00002F1C E884FF <1> call FloatToBCD 2472 00002F1F 5F <1> pop di 2473 <1> 2474 00002F20 B81100 <1> mov ax, 16+1 2475 00002F23 8B4EFE <1> mov cx, word [iExp] 2476 00002F26 29C8 <1> sub ax, cx 2477 00002F28 41 <1> inc cx 2478 00002F29 8D76DC <1> lea si, [szTemp] 2479 00002F2C 01C6 <1> add si, ax 2480 <1> 2481 <1> ; The off-by-one order of magnitude problem below can hit us here. 2482 <1> ; We just trim off the possible leading zero. 2483 <1> 2484 00002F2E 803C30 <1> cmp byte [si], '0' 2485 00002F31 7502 <1> jnz .not0digit 2486 00002F33 46 <1> inc si 2487 00002F34 49 <1> dec cx 2488 <1> .not0digit: 2489 <1> 2490 <1> ; Copy the rest of the converted BCD value to our buffer. 2491 <1> 2492 00002F35 F3A4 <1> rep movsb 2493 00002F37 E99800 <1> jmp .ftsExit 2494 <1> 2495 <1> .notequal: 2496 <1> .notbelow18: 2497 <1> 2498 <1> ; Have fbstp round to 17 places. 2499 <1> 2500 00002F3A B81000 <1> mov ax, 16 ; experiment 2501 00002F3D 2B46FE <1> sub ax, word [iExp] ; adjust exponent to 17 2502 00002F40 E809FF <1> call PowerOf10 2503 <1> 2504 <1> ; Either we have exactly 17 digits, or we have exactly 16 digits. We can 2505 <1> ; detect that condition and adjust now. 2506 <1> 2507 00002F43 DC16[9085] <1> fcom qword [ten16] 2508 <1> ; x0xxxx00 means top of stack > ten16 2509 <1> ; x0xxxx01 means top of stack < ten16 2510 <1> ; x1xxxx00 means top of stack = ten16 2511 00002F47 9BDD7EFC <1> fstsw word [mystat] 2512 00002F4B 8B46FC <1> mov ax, word [mystat] 2513 00002F4E F6C401 <1> test ah, 1 2514 00002F51 7407 <1> jz .notset1 2515 00002F53 DC0E[8885] <1> fmul qword [ten] 2516 00002F57 FF4EFE <1> dec word [iExp] 2517 <1> .notset1: 2518 <1> 2519 <1> ; Go convert to BCD. 2520 <1> 2521 00002F5A 57 <1> push di 2522 00002F5B 8D7EDC <1> lea di, [szTemp] 2523 00002F5E E842FF <1> call FloatToBCD 2524 00002F61 5F <1> pop di 2525 <1> 2526 00002F62 8D76DD <1> lea si, [szTemp+1] ; point to converted buffer 2527 <1> 2528 <1> ; If the exponent is between -15 and 16, we should express this as a number 2529 <1> ; without scientific notation. 2530 <1> 2531 00002F65 8B4EFE <1> mov cx, word [iExp] 2532 00002F68 51 <1> push cx 2533 00002F69 83C10F <1> add cx, 15 2534 00002F6C 83F91F <1> cmp cx, 15+16 2535 00002F6F 59 <1> pop cx 2536 00002F70 7734 <1> ja .fts6 2537 <1> 2538 <1> ; If the exponent is less than zero, we insert '0.', then -cx 2539 <1> ; leading zeros, then 16 digits of mantissa. If the exponent is 2540 <1> ; positive, we copy cx+1 digits, then a decimal point (maybe), then 2541 <1> ; the remaining 16-cx digits. 2542 <1> 2543 00002F72 41 <1> inc cx 2544 00002F73 83F900 <1> cmp cx, byte 0 2545 00002F76 7F0F <1> jg .ispos1 2546 00002F78 B8302E <1> mov ax, "0." 2547 00002F7B AB <1> stosw 2548 00002F7C F7D9 <1> neg cx 2549 00002F7E B030 <1> mov al, '0' 2550 00002F80 F3AA <1> rep stosb 2551 00002F82 B91000 <1> mov cx, 16 2552 00002F85 EB0B <1> jmp short .fts3 2553 <1> .ispos1: 2554 00002F87 F3A4 <1> rep movsb 2555 00002F89 B02E <1> mov al, '.' 2556 00002F8B AA <1> stosb 2557 00002F8C B91000 <1> mov cx, 16 2558 00002F8F 2B4EFE <1> sub cx, word [iExp] 2559 <1> .fts3: 2560 00002F92 F3A4 <1> rep movsb 2561 <1> 2562 <1> ; Trim off trailing zeros. 2563 <1> 2564 <1> .nextitem2: 2565 00002F94 807DFF30 <1> cmp byte [di-1], '0' 2566 00002F98 7503 <1> jne .fts1 2567 00002F9A 4F <1> dec di 2568 00002F9B EBF7 <1> jmp short .nextitem2 2569 <1> .fts1: 2570 <1> 2571 <1> ; If we cleared out all the decimal digits, kill the decimal point, too. 2572 <1> 2573 00002F9D 807DFF2E <1> cmp byte [di-1], '.' 2574 00002FA1 7501 <1> jnz .fts2 2575 00002FA3 4F <1> dec di 2576 <1> .fts2: 2577 <1> 2578 <1> ; That's it. 2579 <1> 2580 00002FA4 EB2C <1> jmp short .ftsExit 2581 <1> .fts6: 2582 <1> 2583 <1> ; Now convert this to a standard, usable format. If needed, a minus 2584 <1> ; sign is already present in the outgoing buffer, and di already points 2585 <1> ; past it. 2586 <1> 2587 00002FA6 A4 <1> movsb ; copy the first digit 2588 00002FA7 B02E <1> mov al, '.' 2589 00002FA9 AA <1> stosb ; plop in a decimal point 2590 00002FAA A5 <1> movsw 2591 00002FAB A5 <1> movsw 2592 00002FAC A5 <1> movsw ; copy six more digits 2593 <1> 2594 <1> %if 0 2595 <1> 2596 <1> ; The printf %g specified trims off trailing zeros here. I dislike 2597 <1> ; this, so I've disabled it. Comment out the %if 0 and %endif if you 2598 <1> ; want this. 2599 <1> 2600 <1> .fts61: 2601 <1> cmp byte [di-1], '0' 2602 <1> je .fts62 2603 <1> dec di 2604 <1> jmp short .fts61 2605 <1> .fts62: 2606 <1> %endif 2607 <1> 2608 <1> ; Shove in the exponent. If you support 10-byte reals, remember to 2609 <1> ; allow 4 digits for the exponent. 2610 <1> 2611 00002FAD B8652B <1> mov ax, "e+" 2612 00002FB0 8B56FE <1> mov dx, word [iExp] 2613 00002FB3 85D2 <1> test dx, dx 2614 00002FB5 7904 <1> jns .fts7 2615 00002FB7 F7DA <1> neg dx 2616 00002FB9 B42D <1> mov ah, '-' 2617 <1> .fts7: 2618 00002FBB AB <1> stosw 2619 <1> 2620 00002FBC 92 <1> xchg ax, dx 2621 00002FBD BE0A00 <1> mov si, 10 2622 00002FC0 B90400 <1> mov cx, 4 2623 <1> .fts8: 2624 00002FC3 31D2 <1> xor dx, dx 2625 00002FC5 F7F6 <1> div si 2626 00002FC7 52 <1> push dx 2627 00002FC8 E2F9 <1> loop .fts8 2628 00002FCA B104 <1> mov cl, 4 2629 <1> .fts9: 2630 00002FCC 58 <1> pop ax 2631 00002FCD 0430 <1> add al, '0' 2632 00002FCF AA <1> stosb 2633 00002FD0 E2FA <1> loop .fts9 2634 <1> 2635 <1> %if 0 2636 <1> add di, byte 4 ; -> terminator 2637 <1> %endif 2638 <1> 2639 <1> ; Clean up and go home. 2640 <1> 2641 <1> .ftsExit: 2642 <1> ; fldcw [stat] ; restore control word 2643 <1> ; fwait 2644 <1> %if 0 2645 <1> mov ax, di 2646 <1> sub ax, word [pszDbl] 2647 <1> mov cx, 21 2648 <1> sub cx, ax 2649 <1> mov al, 32 2650 <1> rep stosb 2651 <1> %endif 2652 00002FD2 5F <1> pop di 2653 00002FD3 07 <1> pop es 2654 00002FD4 5E <1> pop si 2655 00002FD5 1F <1> pop ds 2656 <1> 2657 00002FD6 89EC5D <1> lleave 2658 00002FD9 C20600 <1> lret 2659 <1> 2660 <1> %undef pfpin 2661 <1> %undef pszDbl 2662 <1> %undef iExp 2663 <1> %undef mystat 2664 <1> %undef fpin 2665 <1> %undef szTemp 2185 %endif 2186 %include "run.asm" 2187 <1> 2188 <1> %if 0 2189 <1> 2190 <1> lDebug code and commands (P, T, G) to run debuggee code 2191 <1> 2192 <1> Copyright (C) 1995-2003 Paul Vojta 2193 <1> Copyright (C) 2008-2012 C. Masloch 2194 <1> 2195 <1> Usage of the works is permitted provided that this 2196 <1> instrument is retained with the works, so that any entity 2197 <1> that uses the works is notified of this instrument. 2198 <1> 2199 <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 2200 <1> 2201 <1> %endif 2202 <1> 2203 <1> 2204 <1> usesection lDEBUG_CODE 2205 <1> 2206 <1> gg_repeat: 2207 00002FDC E898D5 <1> call guard_re 2208 00002FDF 800E[A000]20 <1> setopt [internalflags2], dif2_gg_again 2209 00002FE4 EB17 <1> jmp @F 2210 <1> 2211 <1> ; G command - go. 2212 <1> gg: 2213 00002FE6 4E <1> dec si 2214 00002FE7 4E <1> dec si 2215 00002FE8 BA[7366] <1> mov dx, msg.goto 2216 00002FEB E82F8B <1> call isstring? 2217 00002FEE 7503E91BA0 <1> je cmd_goto 2218 00002FF3 46 <1> inc si 2219 00002FF4 AC <1> lodsb 2220 <1> 2221 00002FF5 E87FD5 <1> call guard_re 2222 <1> 2223 00002FF8 8026[A000]DF <1> clropt [internalflags2], dif2_gg_again 2224 <1> @@: 2225 00002FFD C706[C000][7072] <1> mov word [gg_deferred_message], msg.empty_message 2226 00003003 8326[C200]00 <1> and word [bb_deferred_message_in_lineout_behind], 0 2227 <1> 2228 00003008 BB[5C04] <1> mov bx, dmycmd 2229 0000300B F606[7E00]02 <1> testopt [options], gg_no_autorepeat 2230 00003010 7503 <1> jnz @F 2231 00003012 BB[DC2F] <1> mov bx, gg_repeat 2232 <1> @@: 2233 00003015 891E[E60B] <1> mov word [lastcmd], bx 2234 <1> 2235 00003019 800E[A000]08 <1> setopt [internalflags2], dif2_gg_is_gg 2236 0000301E 8026[A000]E8 <1> clropt [internalflags2], dif2_gg_is_first | dif2_gg_first_detected | dif2_gg_skip_cseip | dif2_gg_skip_non_cseip 2239 <1> 2240 00003023 FF36[9C0C] <1> push word [reg_cs] ; save original CS 2241 00003027 8F06[E20B] <1> pop word [eqladdr+4] 2242 0000302B E89C18 <1> call parseql ; process =addr 2243 <1> 2244 0000302E F606[7E00]01 <1> testopt [options], gg_do_not_skip_bp 2245 00003033 752C <1> jnz .do_not_skip_cseip 2246 00003035 800E[A000]01 <1> setopt [internalflags2], dif2_gg_is_first 2247 <1> 2248 0000303A 803E[DC0B]00 <1> cmp byte [eqflag], 0 2249 0000303F 7508 <1> jne .cseip_take_eql 2250 <1> 2251 00003041 66 <1> _386_PM_o32 ; xor ecx, ecx 2252 00003042 31C9 <1> xor cx, cx 2253 00003044 E86808 <1> call get_cseip_ecx_linear 2254 00003047 EB0C <1> jmp .got_cseip 2255 <1> 2256 <1> .cseip_take_eql: 2257 00003049 8B1E[E20B] <1> mov bx, word [eqladdr + 4] 2258 0000304D 66 <1> _386_PM_o32 ; mov edx, dword [eqladdr] 2259 0000304E 8B16[DE0B] <1> mov dx, word [eqladdr] 2260 00003052 E86608 <1> call getlinear 2261 <1> .got_cseip: 2262 00003055 7303E9F076 <1> jc error 2263 0000305A A3[B400] <1> mov word [gg_first_cseip_linear], ax 2264 0000305D 8916[B600] <1> mov word [gg_first_cseip_linear + 2], dx 2265 <1> .do_not_skip_cseip: 2266 <1> 2267 <1> %ifn _NUM_G_BP 2268 <1> call chkeol 2269 <1> 2270 <1> testopt [options3], opt3_gg_no_paging 2271 <1> jz @F 2272 <1> clropt [internalflags], pagedcommand 2273 <1> @@: 2274 <1> call tpg_initialise_empty_auxbuff 2275 <1> 2276 <1> %if _BREAKPOINTS 2277 <1> call bb_writepoints_init_reset 2278 <1> %endif 2279 <1> 2280 <1> %else 2281 00003061 4E <1> dec si 2282 00003062 E83D8B <1> call skipcomma 2283 00003065 4E <1> dec si 2284 00003066 BA[7672] <1> mov dx, msg.again 2285 00003069 E8B18A <1> call isstring? 2286 0000306C 7531 <1> jne @F ; (after this, do not dec si!) 2287 <1> 2288 <1> gg_again: 2289 <1> 2290 <1> %if _AUXBUFFSIZE < (BPSIZE * _NUM_G_BP + 1) 2291 <1> %error auxbuff not large enough for gg breakpoint list 2292 <1> %endif 2293 <1> 2294 0000306E 56 <1> push si 2295 0000306F BE[7B07] <1> mov si, g_bplist.used_count 2296 00003072 31C0 <1> xor ax, ax 2297 00003074 AC <1> lodsb ; ax = number of breakpoints set yet 2298 00003075 4E <1> dec si ; -> gg breakpoint list 2299 00003076 89C1 <1> mov cx, ax 2300 00003078 01C9 <1> add cx, cx 2301 0000307A 01C9 <1> add cx, cx ; * 4 2302 <1> %if BPSIZE == 4 2303 <1> %elif BPSIZE == 5 2304 <1> add cx, ax ; * 5 2305 <1> %elif BPSIZE == 6 2306 <1> add cx, ax ; * 5 2307 <1> add cx, ax ; * 6 2308 <1> %elif BPSIZE == 9 2309 0000307C 01C9 <1> add cx, cx ; * 8 2310 0000307E 01C1 <1> add cx, ax ; * 9 2311 <1> %else 2312 <1> %error Unexpected breakpoint size 2313 <1> %endif 2314 00003080 41 <1> inc cx ; include the count 2315 00003081 E8D7D4 <1> call guard_auxbuff 2316 00003084 8E06[FA09] <1> mov es, word [auxbuff_segorsel] 2317 00003088 31FF <1> xor di, di ; es:di -> auxbuff 2318 0000308A F3A4 <1> rep movsb ; initialise auxbuff list 2319 <1> 2320 0000308C 5E <1> pop si ; si -> separator after "AGAIN" keyword 2321 0000308D BF0100 <1> mov di, 1 ; -> first point 2322 00003090 89C1 <1> mov cx, ax 2323 00003092 B0CC <1> mov al, 0CCh 2324 00003094 E306 <1> jcxz .end 2325 <1> .loop: 2326 00003096 83C708 <1> add di, BPSIZE - 1 ; -> point content 2327 00003099 AA <1> stosb ; initialise breakpoint content 2328 0000309A E2FA <1> loop .loop 2329 <1> .end: 2330 <1> ; es:di -> after last breakpoint in array 2331 0000309C E9B200 <1> jmp gg3 ; parse additional points (do not dec si!) 2332 <1> 2333 <1> @@: 2334 0000309F F606[A000]20 <1> testopt [internalflags2], dif2_gg_again 2335 000030A4 75C8 <1> jnz gg_again 2336 <1> 2337 <1> 2338 <1> gg_list: 2339 000030A6 BA[7172] <1> mov dx, msg.list 2340 000030A9 E8718A <1> call isstring? 2341 000030AC 7403E99400 <1> jne .not 2342 <1> 2343 000030B1 AC <1> lodsb 2344 000030B2 E8DC8A <1> call chkeol 2345 <1> 2346 000030B5 800E[A000]05 <1> setopt [internalflags2], dif2_gg_is_first | dif2_gg_skip_cseip 2347 <1> 2348 000030BA BE[7C07] <1> mov si, g_bplist.bp 2349 000030BD 31C9 <1> xor cx, cx 2350 000030BF 8A4CFF <1> mov cl, byte [si - 1] 2351 000030C2 31DB <1> xor bx, bx 2352 000030C4 E379 <1> jcxz .none 2353 <1> .loop: 2354 000030C6 43 <1> inc bx 2355 000030C7 51 <1> push cx 2356 000030C8 53 <1> push bx 2357 <1> 2358 000030C9 89D8 <1> mov ax, bx ; 1-based index 2359 000030CB BF[0E08] <1> mov di, line_out 2360 000030CE E84707 <1> call ordinalbyte 2361 <1> 2362 000030D1 57 <1> push di 2363 000030D2 81EF[1108] <1> sub di, line_out + 1 + 2 2364 <1> ; 1 = a digit, 2 = ordinal suffix, 2365 <1> ; result = how many additional digits are used 2366 000030D6 BA[FA71] <1> mov dx, msg.list_bp.first 2367 000030D9 01FA <1> add dx, di 2368 000030DB E8558F <1> call putsz ; show blanks first 2369 000030DE 5F <1> pop di 2370 000030DF E8D68B <1> call putsline 2371 <1> 2372 000030E2 E8A504 <1> call gg_bb_lods_bp_linear 2373 <1> ; BPSIZE implied 2374 <1> 2375 000030E5 BF[1472] <1> mov di, msg.list_bp.address1 2376 000030E8 92 <1> xchg ax, dx 2377 000030E9 E8908B <1> call hexword 2378 000030EC 47 <1> inc di 2379 <1> ; mov di, msg.list_bp.address2 2380 000030ED 92 <1> xchg ax, dx 2381 000030EE E88B8B <1> call hexword 2382 <1> 2383 000030F1 E8EA06 <1> call gg_bb_check_is_first 2384 <1> ; we set up the dif2_gg_skip_cseip flag, 2385 000030F4 B9[5176] <1> mov cx, msg.list_bp_not_cseip 2386 <1> ; so if CY (do not skip), initialise this 2387 000030F7 721C <1> jc .not_cseip 2388 <1> ; if NC (do skip), use other string 2389 <1> %if _PM 2390 000030F9 53 <1> push bx 2391 000030FA 8B1E[9C0C] <1> mov bx, word [reg_cs] 2392 000030FE 803E[DC0B]00 <1> cmp byte [eqflag], 0 2393 00003103 7404 <1> je @F 2394 00003105 8B1E[E20B] <1> mov bx, word [eqladdr + 4] 2395 <1> @@: 2396 00003109 E8332E <1> call test_d_b_bit 2397 0000310C 5B <1> pop bx 2398 0000310D B9[2B72] <1> mov cx, msg.list_bp_cseip_32 2399 00003110 7503 <1> jnz @F ; if 32-bit cs --> 2400 <1> %endif 2401 00003112 B9[3D72] <1> mov cx, msg.list_bp_csip_16 2402 <1> @@: 2403 <1> .not_cseip: 2404 <1> %if BPSIZE == 6 || BPSIZE == 9 2405 <1> ; INP: dx:ax = linear address 2406 <1> ; si -> (d)word offset 2407 <1> ; di -> where to store 2408 <1> ; OUT: cx = length displayed 2409 <1> ; si -> after offset 2410 <1> ; di -> after stored string 2411 <1> ; CHG: ax, dx 2412 00003115 51 <1> push cx 2413 00003116 BF[0E08] <1> mov di, line_out 2414 00003119 E85B5C <1> call bp_display_offset ; BPSIZE implied 2415 0000311C 57 <1> push di 2416 <1> %endif 2417 0000311D BF[2872] <1> mov di, msg.list_bp.value 2418 00003120 AC <1> lodsb ; BPSIZE implied 2419 00003121 E85F8B <1> call hexbyte 2420 <1> 2421 00003124 BA[FE71] <1> mov dx, msg.list_bp.second 2422 00003127 E8098F <1> call putsz 2423 <1> 2424 <1> %if BPSIZE == 6 || BPSIZE == 9 2425 0000312A 5F <1> pop di 2426 0000312B E88A8B <1> call putsline 2427 0000312E 59 <1> pop cx 2428 <1> %endif 2429 <1> 2430 0000312F BA[1E72] <1> mov dx, msg.list_bp.third 2431 00003132 E8FE8E <1> call putsz 2432 <1> 2433 00003135 89CA <1> mov dx, cx 2434 00003137 E8F98E <1> call putsz 2435 <1> 2436 0000313A 5B <1> pop bx 2437 0000313B 59 <1> pop cx 2438 0000313C E288 <1> loop .loop 2439 <1> .end: 2440 <1> ; mov dx, msg.list_bp_first_detected 2441 <1> ; testopt [internalflags2], dif2_gg_first_detected 2442 <1> ; jnz .putsz 2443 0000313E C3 <1> retn 2444 <1> 2445 <1> .none: 2446 0000313F BA[4E72] <1> mov dx, msg.list_bp_none 2447 <1> .putsz: 2448 00003142 E9EE8E <1> jmp putsz 2449 <1> 2450 <1> .not: 2451 <1> 2452 <1> ; Store the address of each breakpoint into the buffer. We also 2453 <1> ; make sure that there aren't too many breakpoints. (The user can 2454 <1> ; specify them with 2 byte per breakpoints which gives about 128 2455 <1> ; breakpoints with a full command line.) The breakpoints will only 2456 <1> ; be set later when we have verified that the line contains no 2457 <1> ; syntax errors and that there aren't too many breakpoints. 2458 <1> ; 2459 <1> ; Note: With "G AGAIN" (or the gg_repeat handler), the user 2460 <1> ; can actually specify an arbitrary amount of 2461 <1> ; breakpoints. However, we limit the amount. 2462 <1> %if _AUXBUFFSIZE < (BPSIZE * _NUM_G_BP + 1) 2463 <1> %error auxbuff not large enough for gg breakpoint list 2464 <1> %endif 2465 00003145 E813D4 <1> call guard_auxbuff 2466 00003148 8E06[FA09] <1> mov es, word [auxbuff_segorsel] 2467 0000314C 31FF <1> xor di, di ; es:di -> auxbuff 2468 0000314E 31C0 <1> xor ax, ax 2469 00003150 AA <1> stosb ; counter of saved breakpoints 2470 <1> gg3: 2471 <1> ; dec si ; don't use skipcomm0 instead - need to restore al 2472 00003151 E84E8A <1> call skipcomma 2473 00003154 E8258A <1> call iseol? 2474 00003157 7453 <1> je gg4 ; if done --> 2475 <1> 2476 00003159 06 <1> push es 2477 0000315A 16 <1> push ss 2478 0000315B 07 <1> pop es ; set STT es = ds = ss 2479 0000315C 4E <1> dec si 2480 0000315D BA[6A66] <1> mov dx, msg.remember 2481 00003160 E8BA89 <1> call isstring? 2482 00003163 AC <1> lodsb 2483 00003164 7517 <1> jne @F 2484 <1> 2485 00003166 E8288A <1> call chkeol 2486 00003169 89F9 <1> mov cx, di ; -> after last point, = size of list 2487 0000316B 1E <1> push ds 2488 0000316C 07 <1> pop es 2489 0000316D 1F <1> pop ds ; swap 2490 0000316E 31F6 <1> xor si, si ; ds:si -> auxbuff 2491 00003170 BF[7B07] <1> mov di, g_bplist.used_count 2492 <1> ; es:di -> gg breakpoint list 2493 00003173 F3A4 <1> rep movsb ; copy list over 2494 00003175 16 <1> push ss 2495 00003176 1F <1> pop ds ; reset segregs 2496 00003177 8026[A700]EF <1> clropt [internalflags3], dif3_auxbuff_guarded_1 2497 0000317C C3 <1> retn 2498 <1> 2499 <1> @@: 2500 0000317D 8B1E[E20B] <1> mov bx, word [eqladdr+4]; default segment 2501 00003181 E88307 <1> call getlinearaddr ; get linear address into bx:dx (CHG edx) 2502 00003184 07 <1> pop es 2503 00003185 7303E9C075 <1> jc error 2504 0000318A 26803E000010 <1> cmp byte [es:0], _NUM_G_BP 2505 00003190 7203E9B575 <1> jae error ; can't store another breakpoint, g_bplist is full --> 2506 00003195 92 <1> xchg ax, dx ; ax = low word 2507 00003196 AB <1> stosw 2508 00003197 93 <1> xchg ax, bx ; to store high byte/word 2509 <1> %if _PM 2510 00003198 AB <1> stosw 2511 <1> %else 2512 <1> stosb ; bits 24-31 (dh) always zero in 21-bit addresses 2513 <1> %endif 2514 <1> ; BPSIZE implied 2515 <1> %if BPSIZE == 6 2516 <1> mov ax, word [bp_offset] 2517 <1> stosw ; write offset (R86M-only 16-bit) 2518 <1> %elif BPSIZE == 9 2519 00003199 A1[7887] <1> mov ax, word [bp_offset] 2520 0000319C AB <1> stosw 2521 0000319D A1[7A87] <1> mov ax, word [bp_offset + 2] 2522 000031A0 AB <1> stosw ; write offset (PM 32-bit) 2523 <1> %endif 2524 000031A1 B0CC <1> mov al, 0CCh 2525 000031A3 AA <1> stosb ; later filled with the byte read from this address 2526 000031A4 26FE060000 <1> inc byte [es:0] ; increment count 2527 000031A9 4E <1> dec si 2528 000031AA EBA5 <1> jmp short gg3 2529 <1> 2530 <1> gg4: 2531 000031AC 89F9 <1> mov cx, di ; -> after last point, = size of list 2532 000031AE 06 <1> push es 2533 000031AF 1E <1> push ds 2534 000031B0 07 <1> pop es 2535 000031B1 1F <1> pop ds ; swap 2536 000031B2 31F6 <1> xor si, si ; ds:si -> auxbuff 2537 000031B4 BF[7B07] <1> mov di, g_bplist.used_count 2538 <1> ; es:di -> gg breakpoint list 2539 000031B7 F3A4 <1> rep movsb ; copy list over 2540 000031B9 16 <1> push ss 2541 000031BA 1F <1> pop ds ; reset segregs 2542 000031BB 8026[A700]EF <1> clropt [internalflags3], dif3_auxbuff_guarded_1 2543 <1> 2544 000031C0 F606[8400]08 <1> testopt [options3], opt3_gg_no_paging 2545 000031C5 7405 <1> jz @F 2546 000031C7 8026[9C00]F7 <1> clropt [internalflags], pagedcommand 2547 <1> @@: 2548 <1> 2549 <1> gg5: 2550 000031CC E8EE16 <1> call tpg_initialise_empty_auxbuff 2551 <1> %if _BREAKPOINTS 2552 000031CF E83804 <1> call bb_writepoints_init_reset 2553 <1> ; try to write bb points 2554 <1> ; (detect and write to cseip point too) 2555 <1> ; If this fails, it handles the errors and tries to restore 2556 <1> ; all its own points, then aborts the command. 2557 <1> 2558 <1> ; This call might return modeswitched. 2559 <1> %endif 2560 000031D2 BE[7B07] <1> mov si, g_bplist.used_count 2561 000031D5 31C0 <1> xor ax, ax 2562 000031D7 AC <1> lodsb ; si-> first point 2563 000031D8 89C1 <1> mov cx, ax ; cx = number of saved breakpoints 2564 000031DA 51 <1> push cx 2565 000031DB E8A305 <1> call gg_writepoints ; Store breakpoint bytes in the given locations. 2566 000031DE 5A <1> pop dx 2567 <1> ; dx = number of points tried to write 2568 <1> ; cx = number of points not written 2569 000031DF 7342 <1> jnc .points_set ; successful --> 2570 <1> 2571 <1> 2572 <1> ; Failure to write to a gg breakpoint. Now the fun starts! 2573 000031E1 29CA <1> sub dx, cx ; = number of points written 2574 000031E3 89D1 <1> mov cx, dx 2575 <1> ; We now first have to try restoring all the points we 2576 <1> ; already set because they might be inside the DOS or 2577 <1> ; BIOS handlers we would otherwise call. So instead of 2578 <1> ; displaying errors as we detect them, all the intel is 2579 <1> ; stored first until all points have been taken care of 2580 <1> ; (if possible). We then display error messages. 2581 <1> %if _BREAKPOINTS 2582 000031E5 83EC20 <1> sub sp, _NUM_B_BP * 2 ; reserve space for bb error info 2583 <1> %endif 2584 000031E8 89E5 <1> mov bp, sp ; -> behind gg error info, -> bb error info 2585 000031EA 01D2 <1> add dx, dx 2586 000031EC 29D4 <1> sub sp, dx ; reserve space for gg error info 2587 000031EE 50 <1> push ax ; store error info on point that failed to be written 2588 <1> 2589 <1> ; The gg points were written last, so restore them first. 2590 000031EF E89604 <1> call gg_restorepoints_and_init_error_info 2591 <1> %if _BREAKPOINTS 2592 000031F2 51 <1> push cx 2593 <1> ; Next, restore the bb points. 2594 000031F3 B91000 <1> mov cx, _NUM_B_BP ; = index above last one to restore 2595 000031F6 E8DF04 <1> call bb_restorepoints_and_init_error_info 2596 000031F9 59 <1> pop cx ; (preserve index of failed gg point) 2597 <1> %endif 2598 000031FA 58 <1> pop ax 2599 <1> 2600 000031FB E8AA01 <1> call put_deferred_message_silent 2601 <1> ; CHG: dx 2602 <1> 2603 <1> ; ax = info on initially failed point 2604 <1> ; cx = 0-based index of initially failed point 2605 <1> ; = number of points tried to restore 2606 000031FE 89CE <1> mov si, cx 2607 00003200 01F6 <1> add si, si 2608 00003202 01F6 <1> add si, si ; *4 2609 <1> %if BPSIZE == 4 2610 <1> %elif BPSIZE == 5 2611 <1> add si, cx ; * 5 2612 <1> %elif BPSIZE == 6 2613 <1> add si, cx ; * 5 2614 <1> add si, cx ; * 6 2615 <1> %elif BPSIZE == 9 2616 00003204 01F6 <1> add si, si ; * 8 2617 00003206 01CE <1> add si, cx ; * 9 2618 <1> %else 2619 <1> %error Unexpected breakpoint size 2620 <1> %endif 2621 00003208 81C6[7C07] <1> add si, g_bplist.bp 2622 <1> 2623 <1> ; si-> point 2624 <1> ; ax = info (ah = reason, al = new value if reason 3) 2625 <1> ; cx = 0-based index of initially failed point 2626 0000320C 51 <1> push cx 2627 0000320D FF7402 <1> push word [si + 2] 2628 00003210 FF34 <1> push word [si] ; stack: linear address 2629 00003212 BB0080 <1> mov bx, 8000h ; bh = 80h (gg), 2630 <1> ; bl = what we tried to restore (n/a) 2631 00003215 E86410 <1> call display_breakpoint_failure 2632 00003218 59 <1> pop cx 2633 00003219 E85606 <1> call gg_handlefailedrestore 2634 <1> %if _BREAKPOINTS 2635 0000321C E82106 <1> call bb_handlefailedrestore 2636 0000321F 8D6620 <1> lea sp, [bp + _NUM_B_BP * 2] 2637 <1> %else 2638 <1> mov sp, bp 2639 <1> %endif 2640 <1> ; (discard bb + gg error info) 2641 00003222 C3 <1> retn 2642 <1> 2643 <1> 2644 <1> .points_set: 2645 <1> ; All bb and gg points were successfully written. 2646 <1> ; Next: Handle cseip case, if such a point has been detected. 2647 <1> 2648 <1> 2649 <1> ; old cseip breakpoint handling comment: 2650 <1> ; interrupt ? emuint : .isstdtrace (including DPMI hack, pushf handling) 2651 <1> 2652 <1> %endif ; _NUM_G_BP 2653 <1> 2654 <1> 2655 <1> %if _NUM_G_BP || _BREAKPOINTS 2656 00003223 F606[A000]10 <1> testopt [internalflags2], dif2_gg_first_detected 2657 00003228 7503E91C01 <1> jz .only_run ; easy case, no cseip point detected --> 2658 <1> 2659 <1> 2660 <1> ; Enter special mode: Restore cseip breakpoint content. 2661 0000322D 800E[A000]02 <1> setopt [internalflags2], dif2_gg_skip_non_cseip 2662 <1> 2663 00003232 89D1 <1> mov cx, dx ; = number of points set 2664 <1> %if _BREAKPOINTS 2665 00003234 83EC20 <1> sub sp, _NUM_B_BP * 2 2666 <1> %endif 2667 00003237 89E5 <1> mov bp, sp ; -> behind error info 2668 <1> %if _NUM_G_BP 2669 00003239 89CA <1> mov dx, cx 2670 0000323B 01D2 <1> add dx, dx 2671 0000323D 29D4 <1> sub sp, dx 2672 0000323F E84604 <1> call gg_restorepoints_and_init_error_info 2673 <1> 2674 00003242 7326 <1> jnc .gg_restore_cseip_success 2675 <1> 2676 <1> 2677 <1> ; Error in gg_restorepoints. Try to restore other gg, all bb. 2678 <1> 2679 <1> ; Exit special mode: Handle non-cseip breakpoints again. 2680 00003244 8026[A000]FD <1> clropt [internalflags2], dif2_gg_skip_non_cseip 2681 <1> 2682 <1> ; Enter special mode: Skip cseip breakpoints. 2683 00003249 800E[A000]04 <1> setopt [internalflags2], dif2_gg_skip_cseip 2684 <1> 2685 <1> ; As we already tried to restore all cseip gg points, 2686 <1> ; here we skip these in the gg_restorepoints call. 2687 0000324E E83A04 <1> call gg_restorepoints 2688 <1> 2689 <1> ; Exit special mode: No longer skip cseip breakpoints. 2690 00003251 8026[A000]FB <1> clropt [internalflags2], dif2_gg_skip_cseip 2691 <1> 2692 <1> ; Any cseip bb points aren't yet restored, so do not skip them. 2693 <1> %if _BREAKPOINTS 2694 00003256 51 <1> push cx 2695 00003257 B91000 <1> mov cx, _NUM_B_BP 2696 0000325A E87B04 <1> call bb_restorepoints_and_init_error_info 2697 0000325D 59 <1> pop cx 2698 <1> %endif 2699 <1> %else 2700 <1> jmp .gg_restore_cseip_success 2701 <1> %endif 2702 <1> 2703 <1> .gg_bb_cseip_fail_common: 2704 <1> ; The failure that led us here is already noted in the info. 2705 <1> %if _NUM_G_BP 2706 0000325E E81106 <1> call gg_handlefailedrestore 2707 <1> %endif 2708 <1> %if _BREAKPOINTS 2709 00003261 E8DC05 <1> call bb_handlefailedrestore 2710 <1> %endif 2711 <1> %if _NUM_G_BP 2712 <1> %if _BREAKPOINTS 2713 00003264 8D6620 <1> lea sp, [bp + _NUM_B_BP * 2] 2714 <1> %else 2715 <1> mov sp, bp 2716 <1> %endif 2717 <1> %elif _BREAKPOINTS 2718 <1> add sp, _NUM_B_BP * 2 2719 <1> %endif 2720 00003267 E996CD <1> jmp cmd3 2721 <1> 2722 <1> .gg_restore_cseip_success: 2723 <1> %if _BREAKPOINTS 2724 0000326A B91000 <1> mov cx, _NUM_B_BP ; = index above last one to restore 2725 0000326D E86804 <1> call bb_restorepoints_and_init_error_info 2726 00003270 7322 <1> jnc @F ; no error ? --> 2727 <1> 2728 <1> ; Error in bb_restorepoints. Try to restore other gg, other bb. 2729 <1> 2730 <1> ; Exit special mode: Handle non-cseip breakpoints again. 2731 00003272 8026[A000]FD <1> clropt [internalflags2], dif2_gg_skip_non_cseip 2732 <1> 2733 <1> ; Enter special mode: Skip cseip breakpoints. 2734 00003277 800E[A000]04 <1> setopt [internalflags2], dif2_gg_skip_cseip 2735 <1> 2736 <1> ; As we already tried to restore all cseip gg and bb points, 2737 <1> ; here we skip these in the bb_restorepoints call. 2738 <1> %if _NUM_G_BP 2739 0000327C 31C9 <1> xor cx, cx 2740 0000327E 8A0E[7B07] <1> mov cl, byte [g_bplist.used_count] 2741 00003282 E80604 <1> call gg_restorepoints 2742 00003285 51 <1> push cx 2743 <1> %endif 2744 00003286 B91000 <1> mov cx, _NUM_B_BP 2745 00003289 E84F04 <1> call bb_restorepoints 2746 <1> %if _NUM_G_BP 2747 0000328C 59 <1> pop cx 2748 <1> %endif 2749 <1> 2750 <1> ; Exit special mode: No longer skip cseip breakpoints. 2751 0000328D 8026[A000]FB <1> clropt [internalflags2], dif2_gg_skip_cseip 2752 <1> 2753 00003292 EBCA <1> jmp .gg_bb_cseip_fail_common 2754 <1> 2755 <1> @@: 2756 <1> ; Success! Now discard the reserved error info. 2757 00003294 8D6620 <1> lea sp, [bp + _NUM_B_BP * 2] 2758 <1> %else 2759 <1> mov sp, bp 2760 <1> %endif 2761 <1> 2762 <1> ; Special mode restoration handled. Now trace one instruction. 2763 <1> ; (Proceed if repeated string op or interrupt.) 2764 <1> %if _PM 2765 00003297 E83A07 <1> call resetmode 2766 <1> %endif 2767 0000329A E85B16 <1> call seteq ; make the = operand take effect 2768 0000329D BA0F00 <1> mov dx, 15 ; DL = number of bytes to go; DH = prefix flags. 2769 000032A0 8B1E[9C0C] <1> mov bx, word [reg_cs] 2770 000032A4 66 <1> _386_PM_o32 ; mov esi, dword [reg_eip] 2771 000032A5 8B36[A80C] <1> mov si, word [reg_eip] 2772 <1> .pp2: 2773 000032A9 E83611 <1> call pp16 ; get next instruction byte into AL 2774 000032AC BF[F010] <1> mov di, ppbytes 2775 000032AF B91900 <1> mov cx, PPLEN_ONLY_STRING 2776 <1> ; mov byte [pp_instruction], al 2777 000032B2 F2AE <1> repne scasb 2778 000032B4 752D <1> jne .not_p ; if not one of these --> 2779 000032B6 8A451F <1> mov al,byte [di+PPLEN-1]; get corresponding byte in ppinfo 2780 000032B9 A880 <1> test al, PP_PREFIX ; prefix ? 2781 000032BB 740E <1> jz .pp3 ; no --> 2782 000032BD 08C6 <1> or dh, al ; set the OSIZE or ASIZE flags if either of these 2783 <1> ; Note: Multiple OSIZE in a 16-bit cs do not toggle 2784 <1> ; between decoding as O32 and O16, they're always 2785 <1> ; decoded as O32. The same is true for A32, and 2786 <1> ; in a 32-bit cs for O16 and A16. 2787 000032BF FECA <1> dec dl 2788 000032C1 75E6 <1> jnz .pp2 ; if not out of bytes --> 2789 000032C3 C706[C000][E673] <1> mov word [gg_deferred_message], msg.warnprefix 2790 000032C9 EB18 <1> jmp .not_p 2791 <1> 2792 <1> ; A repeatable string instruction is to be decoded. 2793 <1> ; Finish the decoding and skip the appropriate number 2794 <1> ; of opcode bytes. 2795 <1> .pp3: 2796 000032CB E8B70C <1> _386_PM call pp_fix32bitflags 2797 000032CE A847 <1> test al, PP_VARSIZ | PP_SIZ_MASK 2798 000032D0 7403E97574 <1> jnz error 2799 <1> %if 0 2800 <1> test al, PP_VARSIZ ; different opcode length depends on OSIZE ? 2801 <1> jz .ignoreosize ; no --> 2802 <1> and dh, 2 2803 <1> add al, dh 2804 <1> .ignoreosize: 2805 <1> and ax, PP_SIZ_MASK 2806 <1> _386_PM movzx eax, ax ; clear high word (in case it counts) 2807 <1> _386_PM_o32 ; add esi, eax 2808 <1> add si, ax 2809 <1> %endif 2810 <1> ; pp10: 2811 <1> ; jmp short pp11 ; we have a skippable instruction here 2812 <1> ; pp11: 2813 000032D5 E8672C <1> _386_PM call test_d_b_bit 2814 000032D8 7504 <1> _386_PM jnz .32 ; full 32-bit offset valid --> 2815 000032DA 660FB7F6 <1> _386_PM movzx esi, si ; clear high word here 2816 <1> .32: 2817 000032DE E86B10 <1> call proceedbreakpoint ; run until the breakpoint is hit 2818 <1> ; This call might return modeswitched. 2819 000032E1 EB03 <1> jmp short @F 2820 <1> 2821 <1> .not_p: 2822 000032E3 E8FB0A <1> call traceone ; call common code 2823 <1> @@: 2824 000032E6 9C <1> pushf 2825 <1> 2826 <1> ; Exit special mode, do not skip non-cseip breakpoints anymore. 2827 000032E7 8026[A000]FD <1> clropt [internalflags2], dif2_gg_skip_non_cseip 2828 <1> 2829 <1> ; Enter special mode: Skip matching/restoring cseip breakpoint. 2830 000032EC 800E[A000]04 <1> setopt [internalflags2], dif2_gg_skip_cseip 2831 <1> 2832 000032F1 F6C47F <1> test ah, 7Fh ; error happened during proceedbreakpoint ? 2833 000032F4 7440 <1> jz @F ; no --> 2834 <1> 2835 000032F6 59 <1> pop cx ; (discard flags on stack) 2836 <1> 2837 <1> %if _NUM_G_BP 2838 000032F7 31C9 <1> xor cx, cx 2839 000032F9 8A0E[7B07] <1> mov cl, byte [g_bplist.used_count] 2840 <1> %endif 2841 <1> 2842 <1> %if _BREAKPOINTS 2843 000032FD 83EC20 <1> sub sp, _NUM_B_BP * 2 ; reserve space for bb error info 2844 <1> %endif 2845 00003300 89E5 <1> mov bp, sp ; -> behind gg error info, -> bb error info 2846 <1> %if _NUM_G_BP 2847 00003302 89CA <1> mov dx, cx 2848 00003304 01D2 <1> add dx, dx 2849 00003306 29D4 <1> sub sp, dx ; reserve space for gg error info 2850 <1> %endif 2851 00003308 50 <1> push ax 2852 <1> %if _NUM_G_BP 2853 00003309 E87C03 <1> call gg_restorepoints_and_init_error_info 2854 <1> %endif 2855 <1> %if _BREAKPOINTS 2856 0000330C 51 <1> push cx 2857 0000330D B91000 <1> mov cx, _NUM_B_BP 2858 00003310 E8C503 <1> call bb_restorepoints_and_init_error_info 2859 00003313 59 <1> pop cx 2860 <1> %endif 2861 <1> ; Exit special mode: No longer skip cseip breakpoints. 2862 00003314 8026[A000]FB <1> clropt [internalflags2], dif2_gg_skip_cseip 2863 00003319 58 <1> pop ax 2864 0000331A 51 <1> push cx 2865 <1> 2866 <1> %if _PM 2867 0000331B E8B606 <1> call resetmode 2868 <1> %endif 2869 0000331E E88700 <1> call put_deferred_message_silent 2870 <1> 2871 00003321 FF36[C600] <1> push word [tpg_proceed_bp + 2] 2872 00003325 FF36[C400] <1> push word [tpg_proceed_bp] 2873 00003329 8A1E[CC00] <1> mov bl, [tpg_proceed_bp + BPSIZE - 1] 2874 0000332D B700 <1> mov bh, 0 ; proceed breakpoint 2875 0000332F E84A0F <1> call display_breakpoint_failure 2876 00003332 59 <1> pop cx 2877 00003333 E928FF <1> jmp .gg_bb_cseip_fail_common 2878 <1> 2879 <1> 2880 <1> @@: 2881 00003336 9D <1> popf ; CF 2882 <1> 2883 00003337 7218 <1> jc .after_run ; an unexpected interrupt occured --> 2884 <1> 2885 00003339 E84000 <1> call .after_run_restore ; restore stuff 2886 0000333C E85002 <1> call gg_bb_check_hit ; expected interrupt matches our gg or bb ? 2887 0000333F 7321 <1> jnc .expectedinterrupt ; yes, handle expected interrupt --> 2888 <1> 2889 <1> 2890 <1> ; Clear all special modes. Stop specialcasing cseip breakpoint. 2891 00003341 8026[A000]E8 <1> clropt [internalflags2], dif2_gg_is_first | dif2_gg_first_detected | dif2_gg_skip_cseip | dif2_gg_skip_non_cseip 2894 00003346 E983FE <1> jmp gg5 ; next write all points and run --> 2895 <1> %endif ; _NUM_G_BP || _BREAKPOINTS 2896 <1> 2897 <1> .only_run: 2898 <1> ; Clear all special modes. Stop specialcasing cseip breakpoint. 2899 00003349 8026[A000]E8 <1> clropt [internalflags2], dif2_gg_is_first | dif2_gg_first_detected | dif2_gg_skip_cseip | dif2_gg_skip_non_cseip 2902 <1> 2903 0000334E E82711 <1> call run ; Now run the program. 2904 <1> .after_run: 2905 <1> %if _NUM_G_BP || _BREAKPOINTS 2906 00003351 E82800 <1> call .after_run_restore 2907 <1> 2908 00003354 E83802 <1> call gg_bb_check_hit 2909 <1> .after_gg_bb_check_hit: 2910 00003357 7309 <1> jnc .expectedinterrupt 2911 <1> %endif ; _NUM_G_BP || _BREAKPOINTS 2912 <1> .unexpectedinterrupt: 2913 <1> %if _PM 2914 00003359 E87806 <1> call resetmode 2915 <1> %endif 2916 0000335C E84900 <1> call put_deferred_message_silent 2917 0000335F E9460A <1> jmp unexpectedinterrupt ; print messages for unexpected breakpoint and quit. 2918 <1> 2919 <1> %if _NUM_G_BP || _BREAKPOINTS 2920 <1> .expectedinterrupt: 2921 00003362 E86500 <1> call adjust_cseip_after_breakpoint 2922 <1> ; it's one of our breakpoints, adjust (e)ip 2923 <1> 2924 00003365 89C1 <1> mov cx, ax ; handle_bb_* expects flags in cx 2925 00003367 50 <1> push ax 2926 00003368 50 <1> push ax ; handle_bb_* expects dword counter on stack 2927 00003369 E8DD08 <1> call handle_bb_hit_pass_match 2928 0000336C 58 <1> pop ax 2929 0000336D 58 <1> pop ax ; discard 2930 0000336E 7203E959FE <1> jnc gg5 ; if it was a pass non-hit or non-pass non-hit 2931 <1> ; then jump back to do a subsequent G step 2932 <1> ; If jumping, the function has set up gg_first_cseip_linear 2933 <1> ; with the current CS:(E)IP so that the next step will start 2934 <1> ; out with skipping past the breakpoint(s) on that address. 2935 <1> ; Note that gg_bb_check_hit returns ax = 7 if a gg point is 2936 <1> ; hit, so we always fall through to .actual_hit here. 2937 <1> 2938 <1> .actual_hit: 2939 <1> %if _PM 2940 00003373 E85E06 <1> call resetmode 2941 <1> %endif 2942 00003376 E82F00 <1> call put_deferred_message_silent 2943 <1> ; (put bb message after gg_bb_check_hit call) 2944 00003379 E9D50D <1> jmp dumpregs_extended_silent 2945 <1> ; (handles sf_(double_)ctrl_c) 2946 <1> %endif 2947 <1> 2948 <1> 2949 <1> .after_run_restore: 2950 <1> %if _NUM_G_BP || _BREAKPOINTS 2951 0000337C 83EC20 <1> sub sp, _NUM_B_BP * 2 ; reserve space for bb error info 2952 0000337F 89E5 <1> mov bp, sp ; -> behind gg error info, -> bb error info 2953 <1> %if _NUM_G_BP 2954 00003381 31C9 <1> xor cx, cx 2955 00003383 8A0E[7B07] <1> mov cl, byte [g_bplist.used_count] 2956 00003387 89CA <1> mov dx, cx 2957 00003389 01D2 <1> add dx, dx 2958 0000338B 29D4 <1> sub sp, dx ; reserve space for gg error info 2959 0000338D E8F802 <1> call gg_restorepoints_and_init_error_info 2960 <1> ; try restoring gg points, and fill error info 2961 <1> %endif 2962 <1> %if _BREAKPOINTS 2963 00003390 51 <1> push cx 2964 00003391 B91000 <1> mov cx, _NUM_B_BP ; = index above last one to restore 2965 00003394 E84103 <1> call bb_restorepoints_and_init_error_info 2966 <1> ; try restoring bb points, and fill error info 2967 00003397 59 <1> pop cx 2968 <1> %endif 2969 <1> 2970 <1> %if _PM 2971 00003398 E83906 <1> call resetmode 2972 <1> %endif 2973 0000339B E80A00 <1> call put_deferred_message_silent 2974 <1> 2975 <1> %if _NUM_G_BP 2976 0000339E E8D104 <1> call gg_handlefailedrestore 2977 <1> ; handle gg point restore failures 2978 <1> %endif 2979 <1> %if _BREAKPOINTS 2980 000033A1 E89C04 <1> call bb_handlefailedrestore 2981 <1> ; handle bb point restore failures 2982 <1> %endif 2983 <1> %if _NUM_G_BP 2984 <1> %if _BREAKPOINTS 2985 000033A4 8D6620 <1> lea sp, [bp + _NUM_B_BP * 2] 2986 <1> %else 2987 <1> mov sp, bp ; remove the stack frame 2988 <1> %endif 2989 <1> %else 2990 <1> add sp, _NUM_B_BP * 2 2991 <1> %endif 2992 <1> %endif ; _NUM_G_BP || _BREAKPOINTS 2993 000033A7 C3 <1> retn 2994 <1> 2995 <1> 2996 <1> ; INP: word [gg_deferred_message] 2997 <1> ; word [bb_deferred_message_in_lineout_behind] 2998 <1> ; OUT: variables reset to msg.empty_message 2999 <1> ; messages displayed; first the gg one then the bb one 3000 <1> ; CHG: dx 3001 <1> ; STT: ds = es = ss 3002 <1> ; 3003 <1> ; Note: Uses putsz_silent and putsline_silent, meaning 3004 <1> ; if silent mode is enabled, the messages are 3005 <1> ; written to the silent buffer instead of displayed. 3006 <1> put_deferred_message_silent: 3007 000033A8 BA[7072] <1> mov dx, msg.empty_message 3008 000033AB 8716[C000] <1> xchg dx, word [gg_deferred_message] 3009 000033AF E89E09 <1> call putsz_silent 3010 000033B2 BA[6C3D] <1> mov dx, putsline_silent 3011 <1> 3012 <1> ; INP: dx = puts function to call, CHG ax, bx, cx, dx, di 3013 <1> ; CHG: dx 3014 <1> ; STT: ds = es = ss 3015 <1> put_bb_deferred_message_calling_dx: 3016 000033B5 57 <1> push di 3017 000033B6 31FF <1> xor di, di 3018 000033B8 873E[C200] <1> xchg di, word [bb_deferred_message_in_lineout_behind] 3019 000033BC 85FF <1> test di, di 3020 000033BE 7408 <1> jz @F 3021 000033C0 50 <1> push ax 3022 000033C1 53 <1> push bx 3023 000033C2 51 <1> push cx 3024 000033C3 FFD2 <1> call dx 3025 000033C5 59 <1> pop cx 3026 000033C6 5B <1> pop bx 3027 000033C7 58 <1> pop ax 3028 <1> @@: 3029 000033C8 5F <1> pop di 3030 000033C9 C3 <1> retn 3031 <1> 3032 <1> 3033 <1> ; INP: [internalflags2] & dif2_tpg_adjusted_cseip 3034 <1> ; [internalflags2] & dif2_tpg_do_not_adjust 3035 <1> ; word [reg_cs] 3036 <1> ; (d)word [reg_eip] 3037 <1> ; OUT: If both flags clear on input, 3038 <1> ; set [internalflags2] & dif2_tpg_adjusted_cseip 3039 <1> ; cs:(e)ip adjusted by decrementing (e)ip 3040 <1> ; (It is only decremented by the first call to this 3041 <1> ; function, which sets the flag in dif2.) 3042 <1> ; Else, 3043 <1> ; do nothing 3044 <1> ; CHG: bx 3045 <1> ; STT: ds = ss = debugger data selector 3046 <1> adjust_cseip_after_breakpoint: 3047 000033CA F606[A100]06 <1> testopt [internalflags2], dif2_tpg_adjusted_cseip | dif2_tpg_do_not_adjust 3049 000033CF 7513 <1> jnz .retn 3050 000033D1 800E[A100]02 <1> setopt [internalflags2], dif2_tpg_adjusted_cseip 3051 000033D6 8B1E[9C0C] <1> _386_PM mov bx, word [reg_cs] 3052 000033DA E85F2B <1> _386_PM call resetmode_and_test_d_b_bit 3053 000033DD 7401 <1> _386_PM jz .16 ; 16-bit cs --> 3054 000033DF 66 <1> _386_PM o32 ; dec dword [reg_eip] 3055 <1> .16: 3056 000033E0 FF0E[A80C] <1> dec word [reg_eip] ; re-execute (restored) opcode one byte in front of this 3057 <1> .retn: 3058 000033E4 C3 <1> retn 3059 <1> 3060 <1> 3061 <1> %ifn _BREAKPOINTS 3062 <1> bb_check_hit: 3063 <1> xor ax, ax 3064 <1> stc 3065 <1> retn 3066 <1> %else 3067 <1> ; INP: word [run_int] 3068 <1> ; word [reg_cs] 3069 <1> ; (d)word [reg_eip] 3070 <1> ; bb breakpoints 3071 <1> ; OUT: NC if a breakpoint was hit, 3072 <1> ; (e)ip must be decremented by one 3073 <1> ; word [bb_deferred_message_in_lineout_behind] set 3074 <1> ; and line_out written if bb point matched 3075 <1> ; (The bb point's index is already written to this msg.) 3076 <1> ; ax & 1 set if non-pass match (actual hit), 3077 <1> ; else ax & 2 set if pass match (consider as hit first, 3078 <1> ; but dump registers next (not to silent buffer) 3079 <1> ; and then continue execution) 3080 <1> ; else ax & 4 always set, indicates any match 3081 <1> ; (including matches that should merely continue) 3082 <1> ; all pass points' counters stepped 3083 <1> ; CY if no breakpoint was hit, 3084 <1> ; ax = 0 3085 <1> ; CHG: all 3086 <1> ; STT: es = ds = ss 3087 <1> bb_check_hit: 3088 <1> lframe near 3089 000033E5 5589E5 <1> lenter 3090 000033E8 31C0 <1> xor ax, ax 3091 <1> lequ 1, flag_trigger 3092 <1> lequ 2, flag_pass 3093 <1> lequ 4, flag_match 3094 <1> lvar word, flags 3095 000033EA 50 <1> push ax 3096 <1> 3097 <1> ; Finish up. Check if it was one of _our_ breakpoints. 3098 000033EB 813E[E40B][A07C] <1> cmp word [run_int], int3msg 3099 000033F1 7505 <1> jne @F ; if not interrupt 03h --> 3100 <1> 3101 <1> ; Get previous cs:eip (where breakpoint was executed if any at all). 3102 000033F3 E86405 <1> call get_cseip_of_possible_breakpoint 3103 <1> ; dx:ax = linear address of previous cs:eip 3104 <1> ; bx = reg_cs 3105 000033F6 EB16 <1> jmp .check 3106 <1> 3107 <1> @@: 3108 <1> ; For T/TP/P: if trace interrupt fired just while 3109 <1> ; pointing at a bb point, do match. 3110 000033F8 813E[E40B][7D7C] <1> cmp word [run_int], int1msg 3111 000033FE 7403E95501 <1> jne .gg9 3112 <1> 3113 00003403 800E[A100]04 <1> setopt [internalflags2], dif2_tpg_do_not_adjust 3114 <1> ; remember that we should not adjust 3115 00003408 66 <1> _386_PM_o32 3116 00003409 31C9 <1> xor cx, cx 3117 0000340B E8A104 <1> call get_cseip_ecx_linear 3118 <1> ; get linear of this cs:(e)ip 3119 <1> .check: 3120 0000340E 7303E94501 <1> jc .gg9 3121 <1> 3122 <1> ; Store the matched address (if any) here in case of non-hit 3123 <1> ; match. (Ie, non-hit pass match or non-hit non-pass match.) 3124 00003413 A3[B800] <1> mov word [gg_next_cseip_linear], ax 3125 00003416 8916[BA00] <1> mov word [gg_next_cseip_linear + 2], dx 3126 <1> 3127 0000341A 87DA <1> xchg bx, dx 3128 0000341C 91 <1> xchg cx, ax ; bx:cx = linear address of previous cs:eip 3129 0000341D 31C0 <1> xor ax, ax 3130 <1> .loop: 3131 0000341F 53 <1> push bx 3132 00003420 50 <1> push ax 3133 00003421 E8BD58 <1> call calcpointbit ; bx = index, ah = value 3134 00003424 84A7[0201] <1> test byte [b_bplist.used_mask+bx], ah 3135 <1> ; (NC) 3136 00003428 7503E91901 <1> jz .next 3137 0000342D 84A7[0401] <1> test byte [b_bplist.disabled_mask+bx], ah 3138 <1> ; (NC) 3139 00003431 7403E91001 <1> jnz .next 3140 00003436 58 <1> pop ax 3141 00003437 5B <1> pop bx 3142 00003438 53 <1> push bx 3143 00003439 50 <1> push ax 3144 0000343A 89C6 <1> mov si, ax 3145 0000343C 01F6 <1> add si, si 3146 0000343E 01F6 <1> add si, si 3147 <1> %if BPSIZE == 4 3148 <1> %elif BPSIZE == 5 3149 <1> add si, ax 3150 <1> %elif BPSIZE == 6 3151 <1> add si, ax ; * 5 3152 <1> add si, ax ; * 6 3153 <1> %elif BPSIZE == 9 3154 00003440 01F6 <1> add si, si ; * 8 3155 00003442 01C6 <1> add si, ax ; * 9 3156 <1> %else 3157 <1> %error Unexpected breakpoint size 3158 <1> %endif 3159 00003444 81C6[0601] <1> add si, b_bplist.bp ; -> point 3160 <1> 3161 00003448 E83F01 <1> call gg_bb_lods_bp_linear 3162 <1> 3163 0000344B E89003 <1> call gg_bb_check_is_first 3164 0000344E 7203E9F300 <1> jnc .next 3165 <1> 3166 00003453 39C8 <1> cmp ax, cx 3167 00003455 7403E9EC00 <1> jne .next 3168 0000345A 39DA <1> cmp dx, bx 3169 0000345C 7403E9E500 <1> jne .next 3170 <1> 3171 <1> .hit: 3172 00003461 58 <1> pop ax 3173 00003462 50 <1> push ax 3174 <1> 3175 00003463 804EFE04 <1> or byte [bp + ?flags], ?flag_match 3176 <1> 3177 00003467 89C7 <1> mov di, ax 3178 00003469 01FF <1> add di, di 3179 <1> 3180 0000346B 8BB5[D601] <1> mov si, [b_bplist.when + di] 3181 <1> ; si -> condition 3182 0000346F 85F6 <1> test si, si ; any ? 3183 00003471 741E <1> jz @F ; no --> 3184 <1> %if _PM 3185 00003473 E85E05 <1> call resetmode 3186 <1> %endif 3187 00003476 FF36[FE0A] <1> push word [rc] 3188 0000347A 8F06[000B] <1> pop word [priorrc] 3189 0000347E AC <1> lodsb 3190 0000347F E8F380 <1> call getexpression ; parse stored expression 3191 00003482 E80C87 <1> call chkeol 3192 00003485 E8F87A <1> call toboolean ; get boolean 3193 00003488 85D2 <1> test dx, dx ; true ? 3194 0000348A 7503E9B700 <1> jz .next ; no, skip --> 3195 0000348F 58 <1> pop ax 3196 00003490 50 <1> push ax 3197 <1> @@: 3198 <1> 3199 00003491 8D9D[9601] <1> lea bx, [b_bplist.counter + di] 3200 <1> ; word [bx] = this matched point's counter 3201 <1> 3202 00003495 F646FE03 <1> test byte [bp + ?flags], ?flag_trigger | ?flag_pass 3203 00003499 7413 <1> jz @F ; none set yet ? --> 3204 0000349B E8C900 <1> call step_pass_counter ; step counter even if already matched 3205 0000349E 7203E9A300 <1> jnc .next ; (either is already set, so additional 3206 <1> ; setting of ?flag_pass is skipped) 3207 000034A3 F646FE01 <1> test byte [bp + ?flags], ?flag_trigger 3208 000034A7 7403E99A00 <1> jnz .next ; (trigger is already set, so skip triggering) 3209 000034AC EB05 <1> jmp .setup_trigger ; triggered (after previous pass match) 3210 <1> 3211 <1> @@: 3212 000034AE E8B600 <1> call step_pass_counter ; step counter of matched point, no flag yet 3213 000034B1 7340 <1> jnc .check_pass ; not triggered, check for pass match --> 3214 <1> 3215 <1> .setup_trigger: 3216 <1> ; Trigger! (And the first detected triggering point.) 3217 000034B3 804EFE01 <1> or byte [bp + ?flags], ?flag_trigger 3218 <1> 3219 000034B7 51 <1> push cx 3220 000034B8 BF[0E08] <1> mov di, line_out 3221 000034BB BE[FE6F] <1> mov si, msg.bb_hit.1 3222 000034BE E89E00 <1> call copy_single_counted_string 3223 <1> ; Now si -> msg.bb_hit.2.nocounter 3224 <1> 3225 000034C1 89C2 <1> mov dx, ax 3226 <1> ; Store breakpoint index in message. 3227 000034C3 E8BD87 <1> call hexbyte ; store index of this point 3228 <1> 3229 <1> ; Get counter of this breakpoint. 3230 000034C6 8B07 <1> mov ax, word [bx] 3231 <1> 3232 <1> ; Is it equal to default ? 3233 000034C8 3D0080 <1> cmp ax, 8000h 3234 000034CB 7409 <1> je @F ; yes, skip --> 3235 <1> 3236 000034CD BE[3870] <1> mov si, msg.bb_hit.2.counter 3237 000034D0 E88C00 <1> call copy_single_counted_string 3238 <1> ; Now si -> msg.bb_hit.3.counter.no_id 3239 <1> 3240 <1> ; Store counter in message. 3241 000034D3 E8A687 <1> call hexword 3242 <1> 3243 <1> @@: 3244 000034D6 F606[A000]08 <1> testopt [internalflags2], dif2_gg_is_gg 3245 000034DB 7407 <1> jz @F 3246 000034DD F606[7E00]08 <1> testopt [options], gg_bb_hit_no_repeat 3247 000034E2 EB05 <1> jmp @FF 3248 <1> @@: 3249 000034E4 F606[7E00]10 <1> testopt [options], tp_bb_hit_no_repeat 3250 <1> @@: 3251 000034E9 7406 <1> jz @F 3252 000034EB C706[E60B][5C04] <1> mov word [lastcmd], dmycmd 3253 <1> @@: 3254 000034F1 EB1D <1> jmp .trigger_common 3255 <1> 3256 <1> 3257 <1> .check_pass: 3258 000034F3 7451 <1> jz .next ; no pass match ? --> 3259 <1> 3260 000034F5 804EFE02 <1> or byte [bp + ?flags], ?flag_pass 3261 <1> 3262 000034F9 51 <1> push cx 3263 000034FA BF[0E08] <1> mov di, line_out 3264 000034FD BE[1B70] <1> mov si, msg.bb_pass.1 3265 00003500 E85C00 <1> call copy_single_counted_string 3266 <1> ; Now si -> msg.bb_pass.2 3267 <1> 3268 00003503 89C2 <1> mov dx, ax 3269 <1> ; Store breakpoint index in message. 3270 00003505 E87B87 <1> call hexbyte ; store index of this point 3271 <1> 3272 00003508 E85400 <1> call copy_single_counted_string 3273 <1> ; Now si -> msg.bb_pass.3.no_id 3274 <1> 3275 <1> ; Get counter of this breakpoint. 3276 0000350B 8B07 <1> mov ax, word [bx] 3277 <1> ; Store counter in message. 3278 0000350D E86C87 <1> call hexword 3279 <1> 3280 <1> .trigger_common: 3281 00003510 53 <1> push bx 3282 00003511 BBFFFF <1> mov bx, -1 3283 00003514 E8D853 <1> call get_set_id_offset_length 3284 00003517 F6C7FC <1> test bh, 63 << 2 ; length nonzero ? 3285 0000351A 7421 <1> jz @F ; no --> 3286 <1> 3287 <1> ; The maximum length of a short ID is based on 3288 <1> ; how much space there is after the longest message 3289 <1> ; ("Passed ..., counter=XXXX") assuming 80 columns. 3290 0000351C BE[4E70] <1> mov si, msg.bb_hitpass_id.short 3291 0000351F 80FF74 <1> cmp bh, 29 << 2 ; long ? 3292 00003522 7203 <1> jb .trigger_short_id 3293 <1> ; This jump MUST be a jb, not jbe. The jbe 3294 <1> ; would not match ZR for words where the 3295 <1> ; idbuffer offset is a nonzero value. 3296 00003524 BE[4670] <1> mov si, msg.bb_hitpass_id.long 3297 <1> .trigger_short_id: 3298 <1> 3299 00003527 E83500 <1> call copy_single_counted_string 3300 0000352A 88F9 <1> mov cl, bh 3301 0000352C D0E9 <1> shr cl, 1 3302 0000352E D0E9 <1> shr cl, 1 ; cx = length 3303 00003530 81E3FF03 <1> and bx, 1023 ; bx = offset 3304 00003534 8DB7[FA01] <1> lea si, [b_bplist.idbuffer + bx] 3305 00003538 F3A4 <1> rep movsb 3306 <1> 3307 0000353A BE[4370] <1> mov si, msg.bb_hitpass_id.after 3308 <1> 3309 <1> @@: 3310 0000353D 5B <1> pop bx 3311 0000353E E81E00 <1> call copy_single_counted_string 3312 <1> 3313 00003541 893E[C200] <1> mov word [bb_deferred_message_in_lineout_behind], di 3314 00003545 59 <1> pop cx 3315 <1> 3316 <1> .next: 3317 00003546 58 <1> pop ax 3318 00003547 5B <1> pop bx 3319 <1> 3320 00003548 40 <1> inc ax 3321 00003549 83F810 <1> cmp ax, _NUM_B_BP 3322 0000354C 7303E9CEFE <1> jb .loop 3323 <1> 3324 00003551 8B46FE <1> mov ax, word [bp + ?flags] 3325 00003554 A807 <1> test al, ?flag_pass | ?flag_trigger | ?flag_match 3326 00003556 7503 <1> jnz .return ; (NC) 3327 <1> 3328 <1> .gg9: 3329 00003558 31C0 <1> xor ax, ax 3330 0000355A F9 <1> stc 3331 <1> .return: 3332 0000355B 89EC5D <1> lleave 3333 0000355E C3 <1> retn 3334 <1> 3335 <1> 3336 <1> ; INP: byte [ds:si] = length of source string 3337 <1> ; ds:si + 1 -> source string 3338 <1> ; es:di -> destination buffer 3339 <1> ; OUT: cx = 0 3340 <1> ; ds:si -> after source string 3341 <1> ; es:di -> after written string 3342 <1> ; CHG: - 3343 <1> ; STT: UP 3344 <1> copy_single_counted_string: 3345 0000355F 91 <1> xchg ax, cx 3346 00003560 31C0 <1> xor ax, ax 3347 00003562 AC <1> lodsb 3348 00003563 91 <1> xchg ax, cx 3349 00003564 F3A4 <1> rep movsb 3350 00003566 C3 <1> retn 3351 <1> 3352 <1> 3353 <1> ; INP: word [bx] = pass counter of this breakpoint 3354 <1> ; OUT: NC if to proceed (no trigger), 3355 <1> ; ZR if no pass message display 3356 <1> ; NZ if pass message display 3357 <1> ; CY if to trigger 3358 <1> step_pass_counter: 3359 00003567 F707FF3F <1> test word [bx], 3FFFh ; is it already at a terminal state ? 3360 0000356B 740A <1> jz .no_decrement ; yes, do not further decrement --> 3361 0000356D FF0F <1> dec word [bx] ; decrement (to 0/4000h/8000h/C000h) 3362 0000356F 7417 <1> jz .trigger ; case for decrementing 1 to 0 --> 3363 00003571 813F0040 <1> cmp word [bx], 4000h 3364 00003575 7411 <1> je .trigger ; case for decrementing 4001h to 4000h 3365 <1> .no_decrement: 3366 00003577 813F0080 <1> cmp word [bx], 8000h ; decrement resulted in 8000h 3367 0000357B 740B <1> je .trigger ; or was already in that state? --> 3368 0000357D 813F00C0 <1> cmp word [bx], 0_C000h 3369 00003581 7405 <1> je .trigger ; or C000h --> 3370 <1> .proceed: 3371 00003583 F6470140 <1> test byte [bx + 1], 40h ; (NC) ZR if no pass message 3372 00003587 C3 <1> retn 3373 <1> 3374 <1> .trigger: 3375 00003588 F9 <1> stc 3376 00003589 C3 <1> retn 3377 <1> %endif 3378 <1> 3379 <1> 3380 <1> ; INP: si -> linear address of breakpoint 3381 <1> ; (32 bits if _PM, else 24 bits) 3382 <1> ; OUT: dx:ax = linear address of breakpoint 3383 <1> ; si -> behind linear address 3384 <1> gg_bb_lods_bp_linear: 3385 0000358A AD <1> lodsw 3386 0000358B 92 <1> xchg ax, dx 3387 <1> %if _PM 3388 0000358C AD <1> lodsw 3389 <1> %else 3390 <1> xor ax, ax 3391 <1> lodsb 3392 <1> %endif 3393 0000358D 92 <1> xchg ax, dx 3394 0000358E C3 <1> retn 3395 <1> 3396 <1> 3397 <1> ; INP: word [run_int] 3398 <1> ; word [reg_cs] 3399 <1> ; (d)word [reg_eip] 3400 <1> ; gg/bb breakpoints 3401 <1> ; OUT: NC if a breakpoint was hit, 3402 <1> ; (e)ip must be decremented by one 3403 <1> ; word [bb_deferred_message_in_lineout_behind] set 3404 <1> ; and line_out written if bb point matched 3405 <1> ; (The bb point's index is already written to this msg.) 3406 <1> ; ax = 7 if non-bb match, else 3407 <1> ; ax & 1 set if non-pass match (actual hit), 3408 <1> ; else ax & 2 set if pass match (consider as hit first, 3409 <1> ; but dump registers next (not to silent buffer) 3410 <1> ; and then continue execution) 3411 <1> ; else ax & 4 always set, indicates any match 3412 <1> ; (including matches that should merely continue) 3413 <1> ; all pass points' counters stepped 3414 <1> ; CY if no breakpoint was hit, 3415 <1> ; ax = 0 3416 <1> ; CHG: all 3417 <1> ; STT: es = ds = ss 3418 <1> gg_bb_check_hit: 3419 0000358F E853FE <1> call bb_check_hit 3420 00003592 720D <1> jc .gg_check_hit 3421 <1> 3422 00003594 A801 <1> test al, 1 ; actual bb hit ? 3423 00003596 7507 <1> jnz .ret_NC ; yes, return as hit 3424 <1> 3425 00003598 50 <1> push ax ; bb is pass match or any other match, 3426 00003599 E80500 <1> call gg_check_hit ; is gg a match ? 3427 0000359C 58 <1> pop ax 3428 0000359D 732D <1> jnc gg_check_hit.hit ; yes --> (set NC, ax = 7) 3429 <1> 3430 <1> ; Here, we return the flags 2 (set if pass match) and 3431 <1> ; 4 (always set, indicating any match). 3432 <1> 3433 <1> .ret_NC: 3434 0000359F F8 <1> clc 3435 000035A0 C3 <1> retn 3436 <1> 3437 <1> .gg_check_hit: 3438 <1> ; (fall through) 3439 <1> 3440 <1> %ifn _NUM_G_BP 3441 <1> gg_check_hit: 3442 <1> stc 3443 <1> retn 3444 <1> %else 3445 <1> ; INP: word [run_int] 3446 <1> ; word [reg_cs] 3447 <1> ; (d)word [reg_eip] 3448 <1> ; bb breakpoints 3449 <1> ; OUT: NC if a breakpoint was hit, 3450 <1> ; (e)ip must be decremented by one 3451 <1> ; ax = 7 3452 <1> ; CY if no breakpoint was hit, 3453 <1> ; ax = 0 3454 <1> ; CHG: all 3455 <1> ; STT: es = ds = ss 3456 <1> gg_check_hit: 3457 <1> ; Finish up. Check if it was one of _our_ breakpoints. 3458 000035A1 813E[E40B][A07C] <1> cmp word [run_int], int3msg 3459 000035A7 752D <1> jne .gg9 ; if not interrupt 03h --> 3460 <1> 3461 <1> ; Get previous cs:eip (where breakpoint was executed if any at all). 3462 000035A9 E8AE03 <1> call get_cseip_of_possible_breakpoint 3463 <1> ; dx:ax = linear address of previous cs:eip 3464 000035AC 7228 <1> jc .gg9 3465 000035AE BE[7C07] <1> mov si, g_bplist.bp 3466 000035B1 31C9 <1> xor cx, cx 3467 000035B3 8A4CFF <1> mov cl, byte [si-1] ; number of saved breakpoints 3468 000035B6 E31E <1> jcxz .gg9 ; none, so always unexpected --> 3469 <1> 3470 000035B8 89C7 <1> mov di, ax 3471 000035BA 89D3 <1> mov bx, dx ; bx:di = linear address of previous cs:(e)ip 3472 <1> 3473 <1> .loop_gg6: 3474 000035BC E8CBFF <1> call gg_bb_lods_bp_linear 3475 <1> 3476 000035BF E81C02 <1> call gg_bb_check_is_first 3477 000035C2 730D <1> jnc .next 3478 <1> 3479 000035C4 39DA <1> cmp dx, bx 3480 000035C6 7509 <1> jne .next 3481 000035C8 39F8 <1> cmp ax, di 3482 000035CA 7505 <1> jne .next 3483 <1> 3484 <1> .hit: 3485 000035CC B80700 <1> mov ax, 7 3486 000035CF F8 <1> clc 3487 000035D0 C3 <1> retn 3488 <1> 3489 <1> .next: 3490 <1> 3491 <1> %if BPSIZE == 4 || BPSIZE == 5 3492 <1> inc si ; skip saved (actually CCh) byte 3493 <1> %elif BPSIZE == 6 3494 <1> add si, 3 ; skip word offset and byte content 3495 <1> %elif BPSIZE == 9 3496 000035D1 83C605 <1> add si, 5 ; skip dword offset and byte content 3497 <1> %endif 3498 <1> ; BPSIZE implied 3499 000035D4 E2E6 <1> loop .loop_gg6 ; try next if there's any 3500 <1> 3501 <1> .gg9: 3502 000035D6 31C0 <1> xor ax, ax 3503 000035D8 F9 <1> stc 3504 000035D9 C3 <1> retn 3505 <1> %endif 3506 <1> 3507 <1> 3508 <1> %if _DELAY_BEFORE_BP 3509 <1> delay_before_bp: 3510 000035DA F606[8700]04 <1> testopt [options3], opt3_delay_before_bp 3511 000035DF 7428 <1> jz .ret 3512 000035E1 F606[A600]80 <1> testopt [internalflags3], dif3_delayed 3513 000035E6 7521 <1> jnz .ret 3514 000035E8 800E[A600]80 <1> setopt [internalflags3], dif3_delayed 3515 000035ED 06 <1> push es 3516 000035EE 57 <1> push di 3517 000035EF 50 <1> push ax 3518 000035F0 BF4000 <1> mov di, 40h ; dual mode segment/selector 3519 000035F3 8EC7 <1> mov es, di 3520 000035F5 268B3E6C00 <1> mov di, word [es:6Ch] 3521 <1> @@: 3522 000035FA 263B3E6C00 <1> cmp di, word [es:6Ch] 3523 000035FF 7505 <1> jne @F 3524 00003601 E85A8D <1> call idle 3525 00003604 EBF4 <1> jmp @B 3526 <1> @@: 3527 00003606 58 <1> pop ax 3528 00003607 5F <1> pop di 3529 00003608 07 <1> pop es 3530 <1> .ret: 3531 00003609 C3 <1> retn 3532 <1> %endif 3533 <1> 3534 <1> 3535 <1> %if _BREAKPOINTS 3536 <1> bb_writepoints_init_reset: 3537 0000360A BF[0601] <1> mov di, b_bplist.bp 3538 0000360D B0CC <1> mov al, 0CCh 3539 0000360F B91000 <1> mov cx, _NUM_B_BP 3540 <1> .loop: 3541 00003612 83C708 <1> add di, BPSIZE - 1 3542 00003615 AA <1> stosb 3543 00003616 E2FA <1> loop .loop 3544 <1> 3545 <1> ; This is called first by gg before writing any of the 3546 <1> ; gg points. So, if it fails, it only needs to restore 3547 <1> ; its own points, not any of the gg points. 3548 <1> ; This is also called deep down in run_with_bb when called 3549 <1> ; from tt or pp. In this case, there may be a proceed 3550 <1> ; breakpoint already written. On failure, after having 3551 <1> ; restored all yet-written bb points, this proceed 3552 <1> ; breakpoint is restored too. 3553 <1> ; 3554 <1> ; INP: bb breakpoints 3555 <1> ; tpg_proceed_bp 3556 <1> ; OUT: does not return if an error occurred, 3557 <1> ; instead jumps to cmd3 3558 <1> ; STT: might return modeswitched 3559 <1> bb_writepoints_init: 3560 00003618 E8D500 <1> call bb_writepoints 3561 0000361B 735B <1> jnc .retn 3562 <1> 3563 0000361D 83EC20 <1> sub sp, _NUM_B_BP * 2 ; reserve space for bb error info 3564 00003620 89E5 <1> mov bp, sp 3565 <1> ; cx = index of failed point 3566 <1> ; = index above last one to restore 3567 <1> ; ax = error info of failed point 3568 00003622 50 <1> push ax 3569 00003623 51 <1> push cx 3570 00003624 E8B100 <1> call bb_restorepoints_and_init_error_info 3571 <1> 3572 <1> bb_restorepoints_exit: equ $ 3573 <1> ; If this is not gg and T/P wrote a proceed breakpoint, 3574 <1> ; restore it here (after having restored bb points). 3575 00003627 E8E90B <1> call proceed_writepoint_restore 3576 <1> ; This call might return modeswitched. 3577 0000362A BB0000 <1> mov bx, 0 ; (preserve CF) 3578 0000362D 7305 <1> jnc @F 3579 0000362F 80CC80 <1> or ah, 80h ; mark error during restoration 3580 00003632 89C3 <1> mov bx, ax ; bx & 80h set: error restoring pp 3581 <1> @@: 3582 <1> 3583 00003634 59 <1> pop cx 3584 00003635 58 <1> pop ax ; error info + index of failed point 3585 <1> 3586 00003636 89CE <1> mov si, cx 3587 00003638 01F6 <1> add si, si 3588 0000363A 01F6 <1> add si, si ; * 4 3589 <1> %if BPSIZE == 4 3590 <1> %elif BPSIZE == 5 3591 <1> add si, cx ; * 5 3592 <1> %elif BPSIZE == 6 3593 <1> add si, cx ; * 5 3594 <1> add si, cx ; * 6 3595 <1> %elif BPSIZE == 9 3596 0000363C 01F6 <1> add si, si ; * 8 3597 0000363E 01CE <1> add si, cx ; * 9 3598 <1> %else 3599 <1> %error Unexpected breakpoint size 3600 <1> %endif 3601 00003640 81C6[0601] <1> add si, b_bplist.bp ; -> point 3602 <1> 3603 00003644 53 <1> push bx 3604 <1> 3605 00003645 E860FD <1> call put_deferred_message_silent 3606 <1> ; CHG: dx 3607 <1> 3608 00003648 83F9FF <1> cmp cx, -1 3609 0000364B 740B <1> je @F 3610 <1> 3611 <1> ; si-> point 3612 <1> ; ax = info (ah = reason, al = new value if reason 3) 3613 <1> ; cx = 0-based index of initially failed point 3614 0000364D FF7402 <1> push word [si + 2] 3615 00003650 FF34 <1> push word [si] ; stack: linear address 3616 00003652 BB0040 <1> mov bx, 4000h ; bh = 40h (bb), 3617 <1> ; bl = what we tried to restore (n/a) 3618 00003655 E8240C <1> call display_breakpoint_failure 3619 <1> ; This function calls resetmode. 3620 <1> 3621 <1> @@: 3622 00003658 E8E501 <1> call bb_handlefailedrestore 3623 <1> ; This function calls resetmode. 3624 <1> 3625 0000365B 58 <1> pop ax 3626 0000365C F6C480 <1> test ah, 80h ; pp failed to restore ? 3627 0000365F 7411 <1> jz @F 3628 <1> 3629 00003661 FF36[C600] <1> push word [tpg_proceed_bp + 2] 3630 00003665 FF36[C400] <1> push word [tpg_proceed_bp] 3631 00003669 8A1E[CC00] <1> mov bl, [tpg_proceed_bp + BPSIZE - 1] 3632 0000366D B700 <1> mov bh, 0 ; proceed breakpoint 3633 0000366F E80A0C <1> call display_breakpoint_failure 3634 <1> @@: 3635 00003672 83C420 <1> add sp, _NUM_B_BP * 2 ; discard bb error info 3636 00003675 E988C9 <1> jmp cmd3 3637 <1> 3638 <1> .retn: 3639 00003678 C3 <1> retn 3640 <1> %endif 3641 <1> 3642 <1> 3643 <1> %if _NUM_G_BP 3644 <1> ; INP: ss:bp -> behind gg error info space 3645 <1> ; cx = number of error info words on stack 3646 <1> ; OUT: error info space initialised to all zeros 3647 <1> ; CHG: ax, di, es 3648 <1> ; STT: sets es to ss 3649 <1> gg_restorepoints_init_error_info: 3650 00003679 16 <1> push ss 3651 0000367A 07 <1> pop es 3652 0000367B 89EF <1> mov di, bp ; es:di -> behind error info 3653 0000367D 51 <1> push cx 3654 0000367E 4F <1> dec di 3655 0000367F 4F <1> dec di 3656 00003680 31C0 <1> xor ax, ax 3657 00003682 FD <1> std ; _AMD_ERRATUM_109_WORKAROUND does not apply 3658 00003683 F3AB <1> rep stosw ; initialize error info 3659 00003685 FC <1> cld 3660 00003686 59 <1> pop cx 3661 00003687 C3 <1> retn 3662 <1> 3663 <1> 3664 <1> gg_restorepoints_and_init_error_info: 3665 00003688 E8EEFF <1> call gg_restorepoints_init_error_info 3666 <1> 3667 <1> ; Restore gg breakpoints. 3668 <1> ; On errors remember failures but restore all remaining anyway. 3669 <1> ; 3670 <1> ; INP: cx = number of breakpoints to restore (<= 255), 3671 <1> ; assumed at beginning of g_bplist.bp 3672 <1> ; ss:bp -> behind cx words for error info 3673 <1> ; OUT: NC if all points restored successfully 3674 <1> ; CY if at least one point couldn't be restored, 3675 <1> ; error info filled, high byte: 3676 <1> ; reason = 0 = no error (this point didn't fail), 3677 <1> ; 1 = couldn't write, 3678 <1> ; 2 = unreachable, 3679 <1> ; 3 = overwritten), 3680 <1> ; low byte: new byte value (if reason 3) 3681 <1> ; CHG: ax, bx, (e)dx, si, di, es 3682 <1> ; STT: sets es to ss 3683 <1> ; might return modeswitched 3684 <1> ; 3685 <1> ; Note: The points are restored in reverse, from the last back 3686 <1> ; to the front. The first point is handled last. 3687 <1> gg_restorepoints: 3688 0000368B 89CE <1> mov si, cx 3689 0000368D 01F6 <1> add si, si 3690 0000368F 01F6 <1> add si, si ; * 4 3691 <1> %if BPSIZE == 4 3692 <1> %elif BPSIZE == 5 3693 <1> add si, cx ; * 5 3694 <1> %elif BPSIZE == 6 3695 <1> add si, cx ; * 5 3696 <1> add si, cx ; * 6 3697 <1> %elif BPSIZE == 9 3698 00003691 01F6 <1> add si, si ; * 8 3699 00003693 01CE <1> add si, cx ; * 9 3700 <1> %else 3701 <1> %error Unexpected breakpoint size 3702 <1> %endif 3703 00003695 81C6[7307] <1> add si, g_bplist.bp - BPSIZE ; -> last point in list (first to restore) 3704 <1> 3705 00003699 F8 <1> clc ; assume success 3706 0000369A 51 <1> push cx 3707 0000369B 9C <1> pushf 3708 0000369C E329 <1> jcxz .done ; nothing to do --> 3709 <1> .loop: 3710 0000369E E8E400 <1> call gg_writepoints_restore ; Restore breakpoint bytes. 3711 000036A1 7324 <1> jnc .done ; successful --> 3712 000036A3 5A <1> pop dx ; discard flags 3713 000036A4 5B <1> pop bx 3714 000036A5 53 <1> push bx 3715 000036A6 9C <1> pushf ; store (CY) flags 3716 <1> 3717 000036A7 50 <1> push ax 3718 000036A8 89F7 <1> mov di, si 3719 000036AA 81EF[8507] <1> sub di, BPSIZE+g_bplist.bp 3720 <1> %if BPSIZE == 5 || BPSIZE == 6 || BPSIZE == 9 3721 000036AE 89F8 <1> mov ax, di 3722 000036B0 31D2 <1> xor dx, dx 3723 000036B2 BF0900 <1> mov di, BPSIZE 3724 000036B5 F7F7 <1> div di 3725 000036B7 89C7 <1> mov di, ax ; di = 0-based point index 3726 000036B9 D1E7 <1> shl di, 1 ; di = 0-based error info offset 3727 <1> %elif BPSIZE == 4 3728 <1> shr di, 1 ; di = 0-based error info offset 3729 <1> %else 3730 <1> %error "Unexpected BPSIZE" 3731 <1> %endif 3732 000036BB 29DF <1> sub di, bx 3733 000036BD 29DF <1> sub di, bx 3734 000036BF 8F03 <1> pop word [bp+di] ; store error info 3735 000036C1 49 <1> dec cx ; exclude the failed point 3736 000036C2 83EE12 <1> sub si, 2*BPSIZE ; -> the point _before_ failed one 3737 000036C5 EBD7 <1> jmp short .loop 3738 <1> .done: 3739 000036C7 9D <1> popf ; get flags. CY if any couldn't be restored 3740 000036C8 59 <1> pop cx ; restore cx 3741 000036C9 C3 <1> retn 3742 <1> %endif 3743 <1> 3744 <1> 3745 <1> %if _BREAKPOINTS 3746 <1> ; INP: ss:bp -> error info space (one word per bb breakpoint) 3747 <1> ; OUT: error info space initialised to all zeros 3748 <1> ; CHG: ax, di, es 3749 <1> ; STT: sets es to ss 3750 <1> ; 3751 <1> ; Note: This initialises words for all bb points. 3752 <1> ; While the value in cx is preserved, it is 3753 <1> ; assumed that space for all points is allocated. 3754 <1> bb_restorepoints_init_error_info: 3755 000036CA 16 <1> push ss 3756 000036CB 07 <1> pop es 3757 000036CC 89EF <1> mov di, bp 3758 000036CE 31C0 <1> xor ax, ax 3759 000036D0 51 <1> push cx 3760 000036D1 B91000 <1> mov cx, _NUM_B_BP 3761 000036D4 F3AB <1> rep stosw 3762 000036D6 59 <1> pop cx 3763 000036D7 C3 <1> retn 3764 <1> 3765 <1> 3766 <1> bb_restorepoints_and_init_error_info: 3767 000036D8 E8EFFF <1> call bb_restorepoints_init_error_info 3768 <1> 3769 <1> ; Restore bb breakpoints. 3770 <1> ; On errors remember failures but restore all remaining anyway. 3771 <1> ; 3772 <1> ; INP: cx = index above last one to restore 3773 <1> ; ss:bp -> error info space (one word per bb breakpoint) 3774 <1> ; OUT: NC if all points restored successfully 3775 <1> ; CY if at least one point couldn't be restored, 3776 <1> ; error info filled, high byte: 3777 <1> ; reason = 0 = no error (this point didn't fail), 3778 <1> ; 1 = couldn't write, 3779 <1> ; 2 = unreachable, 3780 <1> ; 3 = overwritten), 3781 <1> ; low byte: new byte value (if reason 3) 3782 <1> ; CHG: ax, bx, cx, (e)dx, si, di, es 3783 <1> ; STT: sets es to ss 3784 <1> ; might return modeswitched 3785 <1> ; 3786 <1> ; Note: The points are restored in reverse, from the list back 3787 <1> ; to the front. The first point is handled last. 3788 <1> bb_restorepoints: 3789 <1> 3790 000036DB F8 <1> clc ; assume success 3791 000036DC 9C <1> pushf 3792 000036DD E30F <1> jcxz .done 3793 <1> .loop: 3794 000036DF E81400 <1> call bb_writepoints_restore 3795 000036E2 730A <1> jnc .done 3796 000036E4 5A <1> pop dx ; (discard flags) 3797 000036E5 9C <1> pushf ; store (CY) flags 3798 <1> ; cx = index of point that failed to write 3799 <1> ; ah = reason, al = new byte value (reason 3) 3800 000036E6 89CF <1> mov di, cx 3801 000036E8 01FF <1> add di, di 3802 000036EA 8903 <1> mov word [bp + di], ax ; store error info 3803 000036EC EBF1 <1> jmp .loop 3804 <1> 3805 <1> .done: 3806 000036EE 9D <1> popf ; CF 3807 000036EF C3 <1> retn 3808 <1> 3809 <1> 3810 <1> ; Loop through bb breakpoints and exchange the saved 3811 <1> ; byte with that one at the actual address. Used to write 3812 <1> ; the breakpoints. 3813 <1> ; 3814 <1> ; INP: - 3815 <1> ; OUT: NC if successful 3816 <1> ; CY if error writing a point, 3817 <1> ; cx = index of point that failed to write 3818 <1> ; (all PRIOR points were processed successfully, 3819 <1> ; either written successfully or skipped) 3820 <1> ; CHG: ax, bx, (e)dx, si, cx, di 3821 <1> ; STT: might return modeswitched 3822 <1> bb_writepoints: 3823 000036F0 31C9 <1> xor cx, cx 3824 000036F2 BF0100 <1> mov di, 1 3825 000036F5 A9 <1> db __TEST_IMM16 ; (skip xor, NC) 3826 <1> 3827 <1> ; Same, but go through the breakpoints in reverse order 3828 <1> ; and check that what we overwrite is a 0CCh byte. If so, 3829 <1> ; restore the original value. (The 0CCh is discarded.) 3830 <1> ; 3831 <1> ; INP: cx = index *above* last to write (_NUM_B_BP for all) 3832 <1> ; OUT: NC if successful 3833 <1> ; CY if error writing a point, 3834 <1> ; cx = index of point that failed to write 3835 <1> ; ah = 1 if error because point could not be written 3836 <1> ; ah = 2 if error because address is unreachable 3837 <1> ; ah = 3 if error because point contained non-0CCh value, 3838 <1> ; al = new byte 3839 <1> ; CHG: ax, bx, (e)dx, si, cx, di 3840 <1> ; STT: might return modeswitched 3841 <1> bb_writepoints_restore: 3842 000036F6 31FF <1> xor di, di ; (NC) 3843 <1> bb_wp: 3844 <1> lframe near 3845 000036F8 5589E5 <1> lenter 3846 <1> lvar word, is_write 3847 000036FB 57 <1> push di 3848 <1> 3849 000036FC F646FE01 <1> test byte [bp + ?is_write], 1 3850 <1> ; (NC) is it writing ? 3851 00003700 7459 <1> jz .next ; no, is restoring, first decrement cx --> 3852 <1> 3853 <1> .loop: 3854 00003702 89C8 <1> mov ax, cx 3855 00003704 E8DA55 <1> call calcpointbit ; bx = index, ah = value 3856 00003707 84A7[0201] <1> test byte [b_bplist.used_mask+bx], ah 3857 <1> ; (NC) 3858 0000370B 744E <1> jz .next 3859 0000370D 84A7[0401] <1> test byte [b_bplist.disabled_mask+bx], ah 3860 <1> ; (NC) 3861 00003711 7548 <1> jnz .next 3862 <1> 3863 00003713 89CE <1> mov si, cx 3864 00003715 01F6 <1> add si, si 3865 00003717 01F6 <1> add si, si ; * 4 3866 <1> %if BPSIZE == 4 3867 <1> %elif BPSIZE == 5 3868 <1> add si, cx ; * 5 3869 <1> %elif BPSIZE == 6 3870 <1> add si, cx ; * 5 3871 <1> add si, cx ; * 6 3872 <1> %elif BPSIZE == 9 3873 00003719 01F6 <1> add si, si ; * 8 3874 0000371B 01CE <1> add si, cx ; * 9 3875 <1> %else 3876 <1> %error Unexpected breakpoint size 3877 <1> %endif 3878 0000371D 81C6[0601] <1> add si, b_bplist.bp ; -> point 3879 <1> 3880 00003721 E866FE <1> call gg_bb_lods_bp_linear 3881 <1> ; dx:ax = linear address 3882 <1> 3883 00003724 E8B700 <1> call gg_bb_check_is_first 3884 00003727 7332 <1> jnc .next ; (NC) 3885 <1> 3886 00003729 E8CD02 <1> call getsegmented ; bx:(e)dx = segmented address 3887 <1> %if BPSIZE == 6 3888 <1> lodsw ; skip word offset 3889 <1> %elif BPSIZE == 9 3890 0000372C AD <1> lodsw 3891 0000372D AD <1> lodsw ; skip dword offset 3892 <1> %endif 3893 0000372E AC <1> lodsb ; get byte to write 3894 0000372F B402 <1> mov ah, 2 3895 00003731 723E <1> jc .return ; not in PM anymore/address not available --> (CY) 3896 00003733 F646FE01 <1> test byte [bp + ?is_write], 1 3897 <1> ; writing? 3898 00003737 7517 <1> jnz .forward_nocheck ; yes --> 3899 <1> 3900 <1> .backward_check: 3901 00003739 50 <1> push ax 3902 0000373A E85564 <1> call readmem ; read current byte 3903 0000373D 3CCC <1> cmp al, 0CCh ; is this still what we wrote? 3904 0000373F B483 <1> mov ah, 83h ; (80h = error occurred while restoring) 3905 00003741 F9 <1> stc 3906 00003742 752D <1> jne .return_discard ; nope --> (CY) 3907 00003744 58 <1> pop ax 3908 00003745 E81D64 <1> call writemem ; return the byte to its original value 3909 00003748 7211 <1> jc .next ; failed --> (CY, handled there) 3910 0000374A C644FFCC <1> mov byte [si-1], 0CCh ; reset stored point 3911 0000374E EB0B <1> jmp short .next 3912 <1> 3913 <1> .forward_nocheck: 3914 <1> %if _DELAY_BEFORE_BP 3915 00003750 E887FE <1> call delay_before_bp 3916 <1> %endif 3917 00003753 E80F64 <1> call writemem 3918 00003756 7203 <1> jc .next 3919 00003758 8844FF <1> mov byte [si-1], al ; save the previous byte there 3920 <1> .next: 3921 0000375B B401 <1> mov ah, 1 ; (in case of error) 3922 0000375D 7212 <1> jc .return ; failed to write --> (CY) 3923 <1> 3924 0000375F F646FE01 <1> test byte [bp + ?is_write], 1 3925 00003763 7505 <1> jnz .is_write_next 3926 00003765 49 <1> dec cx ; restore: decrement index 3927 00003766 799A <1> jns .loop ; decremented to 0FFFFh ? no, loop --> 3928 00003768 EB06 <1> jmp .return_NC 3929 <1> 3930 <1> .is_write_next: 3931 0000376A 41 <1> inc cx ; write: increment index 3932 0000376B 83F910 <1> cmp cx, _NUM_B_BP ; above last ? 3933 0000376E 7292 <1> jb .loop ; no, loop --> 3934 <1> .return_NC: 3935 00003770 F8 <1> clc 3936 <1> .return: 3937 <1> .return_discard: 3938 00003771 730A <1> jnc .ret 3939 <1> 3940 00003773 F646FE01 <1> test byte [bp + ?is_write], 1 3941 <1> ; restoring ? 3942 00003777 7503 <1> jnz .ret_CY ; no --> 3943 00003779 80CC80 <1> or ah, 80h ; error occurred while restoring 3944 <1> .ret_CY: 3945 0000377C F9 <1> stc 3946 <1> .ret: 3947 0000377D 89EC5D <1> lleave 3948 00003780 C3 <1> lret 3949 <1> %endif 3950 <1> 3951 <1> 3952 <1> %if _NUM_G_BP 3953 <1> ; Loop through saved breakpoints and exchange the saved 3954 <1> ; byte with that one at the actual address. Used to write 3955 <1> ; the breakpoints. 3956 <1> ; 3957 <1> ; INP: si-> current point 3958 <1> ; cx = number of points to write (might be zero) 3959 <1> ; OUT: NC if successful 3960 <1> ; CY if error writing a point, 3961 <1> ; cx = number of points still to write (including failed one) 3962 <1> ; (si-BPSIZE)-> point that failed 3963 <1> ; CHG: ax, bx, (e)dx, si, cx, di 3964 <1> gg_writepoints: 3965 00003781 BF0100 <1> mov di, 1 3966 00003784 A9 <1> db __TEST_IMM16 ; (skip xor, NC) 3967 <1> 3968 <1> ; Same, but go through the breakpoints in reverse order 3969 <1> ; and check that what we overwrite is a 0CCh byte. If so, 3970 <1> ; restore the original value. (The 0CCh is discarded.) 3971 <1> ; 3972 <1> ; Additionally: 3973 <1> ; OUT: CY if error writing a point, 3974 <1> ; ah = 1 if error because point could not be written 3975 <1> ; ah = 2 if error because address is unreachable 3976 <1> ; ah = 3 if error because point contained non-0CCh value, 3977 <1> ; al = new byte 3978 <1> gg_writepoints_restore: 3979 00003785 31FF <1> xor di, di ; (NC) 3980 <1> gg_wp: 3981 00003787 E348 <1> jcxz .return ;if nothing to do --> (still NC from xor/test) 3982 <1> .loop: 3983 00003789 E8FEFD <1> call gg_bb_lods_bp_linear 3984 <1> ; dx:ax = linear address 3985 <1> 3986 0000378C E84F00 <1> call gg_bb_check_is_first 3987 0000378F 7209 <1> jc @F ; if to handle this breakpoint --> 3988 <1> 3989 <1> ; Skip to next breakpoint. 3990 <1> %if BPSIZE == 4 || BPSIZE == 5 3991 <1> inc si ; -> after point 3992 <1> %elif BPSIZE == 6 3993 <1> add si, 3 ; skip word offset and byte content 3994 <1> %elif BPSIZE == 9 3995 00003791 83C605 <1> add si, 5 ; skip dword offset and byte content 3996 <1> %endif 3997 <1> ; BPSIZE implied 3998 <1> 3999 00003794 85FF <1> test di, di ; (NC) 4000 00003796 7533 <1> jnz .next ; going forward --> 4001 00003798 EB23 <1> jmp .next_lea_si ; (NC) 4002 <1> 4003 <1> ; Handle this breakpoint. 4004 <1> @@: 4005 0000379A E85C02 <1> call getsegmented ; bx:(e)dx = segmented address 4006 <1> %if BPSIZE == 6 4007 <1> lodsw ; skip word offset 4008 <1> %elif BPSIZE == 9 4009 0000379D AD <1> lodsw 4010 0000379E AD <1> lodsw ; skip dword offset 4011 <1> %endif 4012 0000379F AC <1> lodsb ; get byte to write 4013 000037A0 B402 <1> mov ah, 2 4014 000037A2 722D <1> jc .return ; not in PM anymore/address not available --> (CY) 4015 000037A4 85FF <1> test di, di ; writing? 4016 000037A6 751A <1> jnz .forward_nocheck ; yes --> 4017 <1> 4018 <1> .backward_check: 4019 000037A8 50 <1> push ax 4020 000037A9 E8E663 <1> call readmem ; read current byte 4021 000037AC 3CCC <1> cmp al, 0CCh ; is this still what we wrote? 4022 000037AE B483 <1> mov ah, 83h ; (80h = error occurred while restoring) 4023 000037B0 F9 <1> stc 4024 000037B1 7529 <1> jne .return_discard ; nope --> (CY) 4025 000037B3 58 <1> pop ax 4026 000037B4 E8AE63 <1> call writemem ; return the byte to its original value 4027 000037B7 7212 <1> jc .next ; failed --> (CY, handled there) 4028 000037B9 C644FFCC <1> mov byte [si-1], 0CCh ; reset stored point 4029 <1> .next_lea_si: 4030 000037BD 8D74EE <1> lea si, [si-2*BPSIZE] ; adjust (for reverse writing) 4031 000037C0 EB09 <1> jmp short .next 4032 <1> 4033 <1> .forward_nocheck: 4034 <1> %if _DELAY_BEFORE_BP 4035 000037C2 E815FE <1> call delay_before_bp 4036 <1> %endif 4037 000037C5 E89D63 <1> call writemem 4038 000037C8 8844FF <1> mov byte [si-1], al ; save the previous byte there 4039 <1> .next: 4040 000037CB B401 <1> mov ah, 1 ; (in case of error) 4041 000037CD 7202 <1> jc .return ; failed to write --> (CY) 4042 000037CF E2B8 <1> loop .loop 4043 <1> .return: ; (NC) 4044 000037D1 730A <1> jnc .ret 4045 <1> 4046 000037D3 85FF <1> test di, di ; restoring ? 4047 000037D5 7503 <1> jnz .ret_CY ; no --> 4048 000037D7 80CC80 <1> or ah, 80h ; error occurred while restoring 4049 <1> .ret_CY: 4050 000037DA F9 <1> stc 4051 000037DB 52 <1> push dx ; (counteract effect of pop) 4052 <1> .return_discard: 4053 000037DC 5A <1> pop dx 4054 <1> .ret: 4055 000037DD C3 <1> retn 4056 <1> %endif 4057 <1> 4058 <1> 4059 <1> ; INP: dx:ax = linear address of point to be (re)set 4060 <1> ; dword [internalflags2] 4061 <1> ; dword [gg_first_cseip_linear] 4062 <1> ; OUT: CY if to (re)set breakpoint 4063 <1> ; if: no flag set 4064 <1> ; or: dx:ax doesn't match, dif2_gg_skip_non_cseip clear 4065 <1> ; (setting non-cseip point) 4066 <1> ; or: dx:ax matches, dif2_gg_skip_cseip clear 4067 <1> ; (setting cseip point afterwards) 4068 <1> ; NC if to not (re)set breakpoint 4069 <1> ; if: dx:ax doesn't match, dif2_gg_skip_non_cseip set 4070 <1> ; (not setting non-cseip point afterwards) 4071 <1> ; or: dx:ax matches, dif2_gg_skip_cseip set 4072 <1> ; (not setting cseip point) 4073 <1> gg_bb_check_is_first: 4074 000037DE F606[A000]07 <1> testopt [internalflags2], dif2_gg_is_first | dif2_gg_skip_cseip | dif2_gg_skip_non_cseip 4076 000037E3 7418 <1> jz .continue 4077 <1> 4078 000037E5 3906[B400] <1> cmp [gg_first_cseip_linear], ax 4079 000037E9 7514 <1> jne .is_not_first 4080 000037EB 3916[B600] <1> cmp [gg_first_cseip_linear + 2], dx 4081 000037EF 750E <1> jne .is_not_first 4082 <1> 4083 <1> .is_first: 4084 000037F1 800E[A000]10 <1> setopt [internalflags2], dif2_gg_first_detected 4085 000037F6 F606[A000]04 <1> testopt [internalflags2], dif2_gg_skip_cseip 4086 000037FB 7509 <1> jnz .skip 4087 <1> .continue: 4088 000037FD F9 <1> stc 4089 000037FE C3 <1> retn 4090 <1> 4091 <1> .is_not_first: 4092 000037FF F606[A000]02 <1> testopt [internalflags2], dif2_gg_skip_non_cseip 4093 00003804 74F7 <1> jz .continue 4094 <1> .skip: 4095 00003806 F8 <1> clc 4096 00003807 C3 <1> retn 4097 <1> 4098 <1> 4099 <1> ; INP: al = number to put 4100 <1> ; OUT: putsline called with ordinal string 4101 <1> ; CHG: di, [line_out], ax 4102 <1> putordinalbyte: 4103 00003808 53 <1> push bx 4104 00003809 51 <1> push cx 4105 0000380A 52 <1> push dx 4106 <1> 4107 <1> ; Note that trim_overflow in front of line_out is 4108 <1> ; initialised to '0', which we depend on here. 4109 <1> ; With the output from decbyte, at least two decimal 4110 <1> ; digits are always valid in the buffer. 4111 0000380B BF[0E08] <1> mov di, line_out 4112 0000380E E80700 <1> call ordinalbyte 4113 00003811 E8A484 <1> call putsline 4114 00003814 5A <1> pop dx 4115 00003815 59 <1> pop cx 4116 00003816 5B <1> pop bx 4117 00003817 C3 <1> retn 4118 <1> 4119 <1> 4120 <1> ordinalbyte: 4121 00003818 E8C883 <1> call decbyte 4122 0000381B 8B45FE <1> mov ax, [di - 2] ; al = lower address, higher decimal digit 4123 <1> ; ah = higher address, lower decimal digit 4124 0000381E 3C31 <1> cmp al, '1' 4125 00003820 7417 <1> je .gotsuf_th ; 11th, 12th, 13th or other teen --> 4126 00003822 BA7374 <1> mov dx, "st" 4127 00003825 80FC31 <1> cmp ah, '1' 4128 00003828 7412 <1> je .gotsuf ; if low digit was one --> 4129 0000382A BA6E64 <1> mov dx, "nd" 4130 0000382D 80FC32 <1> cmp ah, '2' 4131 00003830 740A <1> je .gotsuf ; if low digit was two --> 4132 00003832 B272 <1> mov dl, 'r' 4133 00003834 80FC33 <1> cmp ah, '3' 4134 00003837 7403 <1> je .gotsuf ; if low digit was three --> 4135 <1> .gotsuf_th: 4136 00003839 BA7468 <1> mov dx, "th" 4137 <1> .gotsuf: 4138 0000383C 89D0 <1> mov ax, dx 4139 0000383E AB <1> stosw 4140 0000383F C3 <1> retn 4141 <1> 4142 <1> 4143 <1> %if _BREAKPOINTS 4144 <1> ; INP: ss:bp -> error info (points at first info word) 4145 <1> ; Each word provides information for one point we tried 4146 <1> ; to restore. The lowest info word corresponds to the 4147 <1> ; first bb breakpoint (bb 00), followed by the info word 4148 <1> ; for the second bb breakpoint (bb 01), and so on. 4149 <1> ; There are always as many info words as there are 4150 <1> ; bb breakpoints. 4151 <1> ; CHG: ax, bx, cx, dx, di, si 4152 <1> ; STT: sets es to ss 4153 <1> bb_handlefailedrestore: 4154 <1> %if _PM 4155 00003840 E89101 <1> call resetmode 4156 <1> %endif 4157 00003843 31FF <1> xor di, di 4158 00003845 31C9 <1> xor cx, cx 4159 00003847 16 <1> push ss 4160 00003848 07 <1> pop es 4161 00003849 BE[0601] <1> mov si, b_bplist.bp 4162 <1> .loop: 4163 0000384C 8B03 <1> mov ax, word [bp + di] 4164 0000384E F6C47F <1> test ah, 7Fh ; failed ? 4165 00003851 7414 <1> jz .next 4166 00003853 51 <1> push cx 4167 00003854 57 <1> push di 4168 <1> ; cx = 0-based index 4169 00003855 FF7402 <1> push word [si + 2] 4170 00003858 FF34 <1> push word [si] ; stack: linear address 4171 0000385A 8A5C08 <1> mov bl, byte [si + BPSIZE - 1] 4172 <1> ; bl = what we tried to restore 4173 0000385D B740 <1> mov bh, 40h ; bh = 40h (bb) 4174 0000385F 80CC80 <1> or ah, 80h ; ah & 80h = set (is restore) 4175 00003862 E8170A <1> call display_breakpoint_failure 4176 00003865 5F <1> pop di 4177 00003866 59 <1> pop cx 4178 <1> .next: 4179 00003867 83C609 <1> add si, BPSIZE 4180 0000386A AF <1> scasw ; di += 2 4181 0000386B 41 <1> inc cx 4182 0000386C 83F910 <1> cmp cx, _NUM_B_BP 4183 0000386F 72DB <1> jb .loop 4184 <1> .end: 4185 00003871 C3 <1> retn 4186 <1> %endif 4187 <1> 4188 <1> 4189 <1> %if _NUM_G_BP 4190 <1> ; INP: cx = number of restored points (number of info words) 4191 <1> ; ss:bp-> error info (points *behind* last info word) 4192 <1> ; Each word provides information for one point we tried 4193 <1> ; to restore. The lowest info word corresponds to the 4194 <1> ; first gg breakpoint, followed by the info word for 4195 <1> ; the second gg breakpoint (if any), and so on. 4196 <1> ; CHG: ax, bx, cx, dx, di, si 4197 <1> ; STT: sets es to ss 4198 <1> gg_handlefailedrestore: 4199 <1> %if _PM 4200 00003872 E85F01 <1> call resetmode 4201 <1> %endif 4202 00003875 89CF <1> mov di, cx 4203 00003877 01FF <1> add di, di 4204 00003879 F7DF <1> neg di 4205 0000387B 16 <1> push ss 4206 0000387C 07 <1> pop es 4207 0000387D BB0000 <1> mov bx, 0 4208 00003880 BE[7C07] <1> mov si, g_bplist.bp 4209 00003883 E325 <1> jcxz .end 4210 <1> .loop: 4211 00003885 8B03 <1> mov ax, word [bp+di] 4212 00003887 F6C47F <1> test ah, 7Fh ; failed? 4213 0000388A 7416 <1> jz .next ; no --> 4214 <1> 4215 <1> ; si-> point 4216 <1> ; ax = info (ah = reason, al = new value if reason 3) 4217 <1> ; bx = point's 0-based index 4218 <1> .display: 4219 0000388C 53 <1> push bx 4220 0000388D 57 <1> push di 4221 0000388E 89D9 <1> mov cx, bx ; cx = 0-based index 4222 00003890 FF7402 <1> push word [si + 2] 4223 00003893 FF34 <1> push word [si] ; stack: linear address 4224 00003895 8A5C08 <1> mov bl, byte [si + BPSIZE - 1] 4225 <1> ; bl = what we tried to restore 4226 00003898 B780 <1> mov bh, 80h ; bh = 80h (gg) 4227 0000389A 80CC80 <1> or ah, 80h ; ah & 80h = set (is restore) 4228 0000389D E8DC09 <1> call display_breakpoint_failure 4229 000038A0 5F <1> pop di 4230 000038A1 5B <1> pop bx 4231 <1> .next: 4232 000038A2 43 <1> inc bx ; increment counter 4233 000038A3 83C609 <1> add si, BPSIZE ; -> next point 4234 000038A6 47 <1> inc di 4235 000038A7 47 <1> inc di ; di+bp-> next error info 4236 000038A8 75DB <1> jnz .loop ; not yet at end --> 4237 <1> .end: 4238 000038AA C3 <1> retn 4239 <1> %endif ; _NUM_G_BP 4240 <1> 4241 <1> 4242 <1> ; INP: word [reg_cs] 4243 <1> ; (d)word [reg_eip] 4244 <1> ; OUT: bx = word [reg_cs] 4245 <1> ; CY if invalid address 4246 <1> ; NC if address is valid, 4247 <1> ; dx:ax = linear address 4248 <1> ; CHG: edx, ax, ecx 4249 <1> get_cseip_minus_1_linear: 4250 000038AB 66 <1> _386_PM_o32 ; or ecx, byte -1 4251 000038AC 83C9FF <1> or cx, byte -1 4252 <1> 4253 <1> ; INP: word [reg_cs] 4254 <1> ; (d)word [reg_eip] 4255 <1> ; (e)cx = adjustment to (e)ip 4256 <1> ; OUT: bx = word [reg_cs] 4257 <1> ; CY if invalid address 4258 <1> ; NC if address is valid, 4259 <1> ; dx:ax = linear address 4260 <1> ; CHG: edx, ax 4261 <1> get_cseip_ecx_linear: 4262 000038AF 8B1E[9C0C] <1> mov bx, [reg_cs] ; bx = cs 4263 000038B3 66 <1> _386_PM_o32 4264 000038B4 8B16[A80C] <1> mov dx, [reg_eip] ; (e)dx = (e)ip 4265 000038B8 66 <1> _386_PM_o32 4266 000038B9 01CA <1> add dx, cx ; bx:(e)dx = adjusted cs:(e)ip 4267 <1> ; (getlinear doesn't use the high word of edx if it's a 16-bit cs) 4268 <1> ; call getlinear ; dx:ax = linear address of this cs:eip 4269 <1> ; (fall through) 4270 <1> 4271 <1> ; INP: If currently in RM, 4272 <1> ; bx:dx = segment:offset of address 4273 <1> ; If currently in PM, 4274 <1> ; bx:(e)dx = selector:offset of address 4275 <1> ; OUT: bx = unchanged (selector/segment) 4276 <1> ; CY if address is invalid, 4277 <1> ; because Int31.0006 failed for bx or 4278 <1> ; because 32-bit address overflowed or 4279 <1> ; because A20 could not be switched on 4280 <1> ; NC if address is valid, 4281 <1> ; dx:ax = linear address 4282 <1> ; dh is always zero if the address is in RM address space 4283 <1> ; CHG: dx, ax 4284 <1> getlinear: 4285 <1> %if _PM 4286 000038BB E81601 <1> call resetmode 4287 <1> ; This must execute in the correct mode, 4288 <1> ; because we get the input from whatever 4289 <1> ; mode we were originally entered in. 4290 <1> %endif 4291 <1> %if _DEBUG1 4292 <1> call .do_not_use_test ; get linear address 4293 <1> jc @F ; already an error ? then return --> 4294 <1> push bx 4295 <1> push cx 4296 <1> mov bx, test_records_getLinear 4297 <1> call handle_test_case_multiple_16 4298 <1> ; check whether this should testcase the error 4299 <1> ; CY to indicate error from this call 4300 <1> pop cx 4301 <1> pop bx 4302 <1> @@: 4303 <1> retn 4304 <1> 4305 <1> %endif 4306 <1> .do_not_use_test: 4307 000038BE 53 <1> push bx 4308 <1> %if _PM 4309 000038BF E8135B <1> call ispm 4310 000038C2 7521 <1> jnz .rm 4311 000038C4 B80600 <1> mov ax, 0006h 4312 000038C7 51 <1> push cx 4313 000038C8 52 <1> push dx 4314 000038C9 CD31 <1> int 31h ; get selector base address into cx:dx 4315 000038CB 58 <1> pop ax ; (edxh:)ax = offset, cx:dx = base 4316 000038CC 7214 <1> jc .return_cx_bx 4317 <1> 4318 000038CE E86E26 <1> _386 call test_d_b_bit 4319 000038D1 7406 <1> _386 jz .16 4320 000038D3 6652 <1> _386 push edx 4321 000038D5 5B <1> _386 pop bx 4322 000038D6 5B <1> _386 pop bx ; bx = high word edx (in 32-bit PM segment) 4323 000038D7 EB02 <1> _386 jmp .32 4324 <1> .16: ; bx:ax = offset 4325 000038D9 31DB <1> xor bx, bx ; 16-bit PM segment, clear offset high word 4326 <1> .32: 4327 000038DB 01D0 <1> add ax, dx 4328 000038DD 11CB <1> adc bx, cx ; add the base 4329 000038DF 87DA <1> xchg bx, dx ; dx:ax = 32-bit linear address 4330 000038E1 F8 <1> clc 4331 <1> 4332 <1> .return_cx_bx: 4333 000038E2 59 <1> pop cx 4334 000038E3 5B <1> pop bx 4335 000038E4 C3 <1> retn 4336 <1> .rm: 4337 <1> %endif 4338 000038E5 89D8 <1> mov ax, bx 4339 000038E7 51 <1> push cx 4340 000038E8 B104 <1> mov cl, 4 4341 000038EA D3C0 <1> rol ax, cl 4342 000038EC 59 <1> pop cx 4343 000038ED BBF0FF <1> mov bx, 0FFF0h 4344 000038F0 21C3 <1> and bx, ax ; bx = low word adjustment 4345 000038F2 83E00F <1> and ax, byte 0Fh ; ax = higher bits which don't fit in the low word 4346 000038F5 01DA <1> add dx, bx 4347 000038F7 83D000 <1> adc ax, byte 0 4348 000038FA 92 <1> xchg ax, dx ; dx:ax = 21-bit linear address 4349 000038FB F606[9D00]10 <1> testopt [internalflags], debuggeeA20 4350 00003900 7503 <1> jnz .return_bx ; A20 line enabled, no need to adjust (NC) 4351 00003902 80E2EF <1> and dl, ~10h ; clear corresponding bit of the address if it was set (NC) 4352 <1> .return_bx: 4353 00003905 5B <1> pop bx 4354 00003906 C3 <1> retn 4355 <1> 4356 <1> 4357 <1> ; INP: bx = segment/selector to use by default 4358 <1> ; al = next character in input 4359 <1> ; si -> following character in input 4360 <1> ; OUT: NC if successful, 4361 <1> ; bx:dx = linear address 4362 <1> ; (if not _PM, this always fits in 24 bits) 4363 <1> ; al = next character 4364 <1> ; si -> following character 4365 <1> ; (d)word [bp_offset] = preferred offset, -1 if none 4366 <1> ; CY if error 4367 <1> ; CHG: edx, bx, ax, si, (d)word [bp_offset] 4368 <1> getlinearaddr: 4369 <1> %if _PM 4370 00003907 E8CA00 <1> call resetmode 4371 <1> %endif 4372 0000390A 66 <1> _386_PM_o32 ; or dword 4373 0000390B 830E[7887]FF <1> or word [bp_offset], strict byte -1 4374 00003910 E89082 <1> call skipcomm0 4375 00003913 3C40 <1> cmp al, '@' 4376 00003915 752B <1> jne .at_not 4377 00003917 AC <1> lodsb ; insure we have a blank or opening parens 4378 00003918 3C28 <1> cmp al, '(' 4379 0000391A 740A <1> je .at 4380 0000391C 3C09 <1> cmp al, 9 4381 0000391E 7406 <1> je .at 4382 00003920 3C20 <1> cmp al, 32 4383 00003922 7402 <1> je .at 4384 00003924 EB19 <1> jmp .at_not_reload ; assume the @ is part of a symbol 4385 <1> 4386 <1> .at: 4387 00003926 E8A982 <1> call skipwh0 4388 00003929 3C28 <1> cmp al, '(' 4389 0000392B 750D <1> jne .at_not_paren 4390 <1> 4391 0000392D E8457C <1> call getdword 4392 00003930 E89F82 <1> call skipwh0 4393 00003933 3C29 <1> cmp al, ')' 4394 00003935 7521 <1> jne .error 4395 00003937 AC <1> lodsb 4396 <1> 4397 00003938 EB03 <1> jmp .at_got 4398 <1> 4399 <1> .at_not_paren: 4400 0000393A E8387C <1> call getdword 4401 <1> .at_got: 4402 <1> %ifn _PM 4403 <1> ; test bh, bh 4404 <1> ; jnz .error 4405 <1> cmp bx, 11h 4406 <1> jae .error 4407 <1> %endif 4408 0000393D F8 <1> clc 4409 0000393E C3 <1> retn 4410 <1> 4411 <1> .at_not_reload: 4412 0000393F 4E <1> dec si 4413 00003940 4E <1> dec si 4414 00003941 AC <1> lodsb 4415 <1> .at_not: 4416 00003942 E84272 <1> call getaddrX 4417 <1> %if _PM 4418 00003945 8326[7A87]00 <1> _no386 and word [bp_offset + 2], 0 4419 <1> %endif 4420 0000394A 66 <1> _386_PM_o32 ; mov dword [bp_offset], edx 4421 0000394B 8916[7887] <1> mov word [bp_offset], dx 4422 0000394F 50 <1> push ax 4423 00003950 E868FF <1> call getlinear 4424 00003953 93 <1> xchg bx, ax ; dx:bx = linear 4425 00003954 87D3 <1> xchg dx, bx ; bx:dx = linear 4426 00003956 58 <1> pop ax ; al = next character 4427 00003957 C3 <1> retn 4428 <1> 4429 <1> .error: 4430 00003958 F9 <1> stc 4431 00003959 C3 <1> retn 4432 <1> 4433 <1> 4434 <1> usesection lDEBUG_DATA_ENTRY 4435 <1> align 4, db 0 4436 00008778 0000 <1> bp_offset: dw 0 4437 <1> %if _PM 4438 0000877A 0000 <1> dw 0 4439 <1> %endif 4440 <1> usesection lDEBUG_CODE 4441 <1> 4442 <1> 4443 <1> ; INP: word [reg_cs] 4444 <1> ; (d)word [reg_eip] 4445 <1> ; dword [tpg_possible_breakpoint] 4446 <1> ; [internalflags2] & dif2_tpg_have_bp 4447 <1> ; OUT: CY if invalid address 4448 <1> ; NC if address is valid, 4449 <1> ; dx:ax = linear address 4450 <1> ; CHG: edx, ax, ecx, bx 4451 <1> ; STT: ds = ss = debugger data selector 4452 <1> get_cseip_of_possible_breakpoint: 4453 0000395A A1[BC00] <1> mov ax, [tpg_possible_breakpoint] 4454 0000395D 8B16[BE00] <1> mov dx, [tpg_possible_breakpoint + 2] 4455 <1> ; dx:ax = stored possible breakpoint address 4456 00003961 F606[A100]01 <1> testopt [internalflags2], dif2_tpg_have_bp 4457 00003966 7511 <1> jnz .retn ; (NC) if already stored --> 4458 00003968 E840FF <1> call get_cseip_minus_1_linear 4459 <1> ; dx:ax = linear address at cs:(e)ip - 1 4460 0000396B 720C <1> jc .retn ; (CY) if getlinear failed --> 4461 0000396D A3[BC00] <1> mov [tpg_possible_breakpoint], ax 4462 00003970 8916[BE00] <1> mov [tpg_possible_breakpoint + 2], dx 4463 <1> ; store for later use 4464 00003974 800E[A100]01 <1> setopt [internalflags2], dif2_tpg_have_bp 4465 <1> ; (NC) 4466 <1> .retn: 4467 00003979 C3 <1> retn 4468 <1> 4469 <1> 4470 <1> %if _PM 4471 <1> 4472 <1> ; DEBUGX: when a mode switch from PM to RM did occur in the debuggee, 4473 <1> ; breakpoint addresses in non-RM address space are unreachable. 4474 <1> ; To enable the debugger to reset the breakpoints, it has to switch 4475 <1> ; temporarily to PM. (In DEBUG/X 1.19, a switch from RM to PM in the 4476 <1> ; debuggee will temporarily switch the debugger back to RM too. We 4477 <1> ; handle this case without a switch as the linear RM address can be 4478 <1> ; accessed directly in PM, assuming that the DPMI hosts linear-to- 4479 <1> ; physical mapping for the RM address space is the same as the one 4480 <1> ; we get in PM.) 4481 <1> 4482 <1> ; (To use mode switching in any case, the format the breakpoints are 4483 <1> ; stored in needs to be modified. Additionally, the mode switching 4484 <1> ; needs to be done elsewhere instead of in getsegmented. resetmode 4485 <1> ; can be used as is, even if a mode switch from PM to RM occured.) 4486 <1> 4487 <1> switchmode: 4488 <1> ;--- raw switch: 4489 <1> ;--- si:e/di: new cs:e/ip 4490 <1> ;--- dx:e/bx: new ss:e/sp 4491 <1> ;--- ax: new ds 4492 <1> ;--- cx: new es 4493 0000397A 6631DB <1> _386 xor ebx, ebx ; clear ebxh 4494 0000397D 89E3 <1> mov bx, sp 4495 0000397F 6631FF <1> _386 xor edi, edi ; clear edih 4496 00003982 BF[A939] <1> mov di, .back_after_switch 4497 00003985 E84D5A <1> call ispm 4498 00003988 740F <1> jz .pm 4499 <1> .r86m: 4500 <1> d4 call d4message 4501 <1> d4 asciz "In switchmode.r86m",13,10 4502 0000398A A1[048B] <1> mov ax, [dssel] ; switch rm -> pm 4503 0000398D 8B36[D600] <1> mov si, [code_sel] 4504 00003991 89C2 <1> mov dx, ax 4505 00003993 89C1 <1> mov cx, ax 4506 00003995 FF2E[F08A] <1> jmp far [dpmi_rm2pm] 4507 <1> .pm: 4508 <1> d4 call d4message 4509 <1> d4 asciz "In switchmode.pm",13,10 4510 00003999 A1[B00A] <1> mov ax, [pspdbg] ; switch pm -> rm 4511 0000399C 8B36[D400] <1> mov si, [code_seg] 4512 000039A0 89C2 <1> mov dx, ax 4513 000039A2 89C1 <1> mov cx, ax 4514 000039A4 66 <1> _386_o32 ; jmp far dword [dpmi_pm2rm] 4515 000039A5 FF2E[F88A] <1> jmp far [dpmi_pm2rm] 4516 <1> 4517 <1> .back_after_switch: 4518 000039A9 8036[9D00]08 <1> xoropt [internalflags], protectedmode 4519 <1> d4 call d4message 4520 <1> d4 asciz "In switchmode.back_after_switch",13,10 4521 000039AE C3 <1> retn 4522 <1> 4523 <1> 4524 <1> ; INP: al = direction, 0 = save state, 1 = restore state 4525 <1> ; [auxbuff] = state buffer 4526 <1> ; ES = debugger data selector 4527 <1> ; CHG: edi 4528 <1> sr_state: 4529 000039AF F606[9E00]20 <1> testopt [internalflags], switchbuffer 4530 000039B4 741B <1> jz .return ; no need to call --> 4531 000039B6 66 <1> _386_o32 ; xor edi, edi 4532 000039B7 31FF <1> xor di, di 4533 000039B9 E8195A <1> call ispm 4534 000039BC 740A <1> jz .pm 4535 <1> .r86m: 4536 <1> d4 call d4message 4537 <1> d4 asciz "In sr_state.r86m",13,10 4538 000039BE 8E06[FC09] <1> mov es, word [auxbuff_segorsel + soaSegment] 4539 000039C2 FF1E[F48A] <1> call far [dpmi_rmsav] 4540 000039C6 EB09 <1> jmp .return 4541 <1> 4542 <1> .pm: 4543 <1> d4 call d4message 4544 <1> d4 asciz "In sr_state.pm",13,10 4545 000039C8 8E06[FE09] <1> mov es, word [auxbuff_segorsel + soaSelector] 4546 000039CC 66 <1> _386_o32 ; call far dword [dpmi_pmsav] 4547 000039CD FF1E[FE8A] <1> call far [dpmi_pmsav] 4548 <1> .return: 4549 000039D1 16 <1> push ss 4550 000039D2 07 <1> pop es 4551 000039D3 C3 <1> retn 4552 <1> 4553 <1> 4554 <1> ; INP: [internalflags] & modeswitched 4555 <1> ; OUT: flag cleared, mode switched back if had been switched 4556 <1> ; EI 4557 <1> ; CHG: - (not even flags!) 4558 <1> ; STT: es = ds = ss = gs = fs = debugger data segment/selector 4559 <1> ; 4560 <1> ; Switches back to RM if a mode switch to PM was done by getsegmented. 4561 <1> ; Does nothing otherwise. (Can be called multiple times.) 4562 <1> resetmode: 4563 000039D4 9C <1> pushf 4564 000039D5 F606[9E00]08 <1> testopt [internalflags], modeswitched ; switched mode previously ? 4565 000039DA 741A <1> jz .return ; no --> 4566 <1> d4 call d4message 4567 <1> d4 asciz "In resetmode (actually resetting)",13,10 4568 <1> subcpu 286 4569 000039DC 66 <1> _386_o32 4570 000039DD 60 <1> pusha 4571 000039DE E899FF <1> call switchmode ; switch back to the mode we were entered in (RM) 4572 000039E1 B001 <1> mov al, 1 4573 000039E3 E8C9FF <1> call sr_state ; restore state 4574 000039E6 E8170C <1> call handle_mode_changed ; ! called with flag set 4575 000039E9 8026[9E00]F7 <1> clropt [internalflags], modeswitched ; reset the flag 4576 000039EE 16 <1> _386 push ss 4577 000039EF 0FA9 <1> _386 pop gs 4578 000039F1 16 <1> _386 push ss 4579 000039F2 0FA1 <1> _386 pop fs 4580 000039F4 66 <1> _386_o32 4581 000039F5 61 <1> popa 4582 <1> subcpureset 4583 <1> .return: 4584 000039F6 9D <1> popf 4585 000039F7 FB <1> sti 4586 000039F8 C3 <1> retn 4587 <1> %endif 4588 <1> 4589 <1> ; INP: dx:ax = linear address 4590 <1> ; OUT: CY if inaccessible 4591 <1> ; NC if accessible, 4592 <1> ; bx:(e)dx = segment:offset or selector:offset address 4593 <1> ; A temporary mode switch from RM to PM might have occured. 4594 <1> ; This has to be reset by calling resetmode. 4595 <1> ; CHG: (e)ax, (e)bx, (e)dx, fs, gs 4596 <1> ; STT: es = ds = ss = our segment/selector 4597 <1> ; 4598 <1> ; It is assumed that only one byte needs to be accessed. 4599 <1> ; (A workaround to access multiple bytes would be to access each 4600 <1> ; byte separately and call this function for each of the bytes.) 4601 <1> ; 4602 <1> ; The TSR command code assumes that getsegmented.pm does not switch 4603 <1> ; modes and that it will return an offset in (e)dx that allows 4604 <1> ; 16-bit access. Adjust that code if either is no longer true. 4605 <1> getsegmented: 4606 <1> %if _DEBUG1 4607 <1> push bx 4608 <1> push cx 4609 <1> mov bx, test_records_getSegmented 4610 <1> call handle_test_case_multiple_16 4611 <1> pop cx 4612 <1> pop bx 4613 <1> jnc @F 4614 <1> ; stc ; (already CY if the conditional didn't jump) 4615 <1> retn 4616 <1> 4617 <1> @@: 4618 <1> %endif 4619 <1> .do_not_use_test: 4620 <1> 4621 <1> %if _PM 4622 000039F9 E8D959 <1> call ispm 4623 000039FC 7513 <1> jnz .rm 4624 <1> .pm: 4625 000039FE 51 <1> push cx 4626 000039FF 8B1E[088B] <1> mov bx, word [scratchsel] 4627 00003A03 92 <1> xchg ax, dx 4628 00003A04 91 <1> xchg ax, cx ; cx:dx = linear address 4629 00003A05 B80700 <1> mov ax, 0007h 4630 00003A08 CD31 <1> int 31h ; set base to the address 4631 00003A0A 59 <1> pop cx 4632 00003A0B 723B <1> jc .invalid 4633 <1> %if 0 ; scratchsel is expected by other code to access arbitrary data ?? 4634 <1> push cx 4635 <1> mov ax, 0008h 4636 <1> xor cx, cx 4637 <1> xor dx, dx 4638 <1> int 31h ; set limit to zero (access to one byte only) 4639 <1> pop cx 4640 <1> jc .invalid 4641 <1> %endif 4642 00003A0D 66 <1> _386_o32 ; xor edx, edx 4643 00003A0E 31D2 <1> xor dx, dx ; bx:(e)dx = selector:offset (using scratchsel with the address as base) 4644 00003A10 C3 <1> retn ; (NC) 4645 <1> %endif 4646 <1> .rm: 4647 00003A11 83FA10 <1> cmp dx, byte 10h ; check for address space 4648 00003A14 7249 <1> jb .nothma ; below HMA, normal access --> 4649 00003A16 7432 <1> je .checkhma ; possibly in HMA --> 4650 <1> .nonrmspace: ; above HMA 4651 <1> %if _PM 4652 <1> ; It's a PM address but we are in RM. 4653 00003A18 F606[9E00]04 <1> testopt [internalflags], canswitchmode 4654 00003A1D 7429 <1> jz .invalid ; can't switch to PM --> 4655 <1> .switchmodes: 4656 00003A1F 66 <1> _386_o32 4657 00003A20 56 <1> push si 4658 00003A21 66 <1> _386_o32 4659 00003A22 57 <1> push di 4660 00003A23 66 <1> _386_o32 4661 00003A24 51 <1> push cx 4662 00003A25 66 <1> _386_o32 4663 00003A26 55 <1> push bp 4664 00003A27 52 <1> push dx 4665 00003A28 50 <1> push ax 4666 <1> d4 call d4message 4667 <1> d4 asciz "In getsegmented.switchmodes (switching to access memory beyond 1088 KiB)",13,10 4668 00003A29 E8A50C <1> call remember_mode 4669 00003A2C 800E[9E00]08 <1> setopt [internalflags], modeswitched ; set flag for resetmode 4670 00003A31 B000 <1> mov al, 0 4671 00003A33 E879FF <1> call sr_state ; save state 4672 00003A36 E841FF <1> call switchmode ; switch to PM 4673 00003A39 E8C40B <1> call handle_mode_changed ; ! called with flag set 4674 00003A3C 58 <1> pop ax 4675 00003A3D 5A <1> pop dx 4676 00003A3E 66 <1> _386_o32 4677 00003A3F 5D <1> pop bp 4678 00003A40 66 <1> _386_o32 4679 00003A41 59 <1> pop cx 4680 00003A42 66 <1> _386_o32 4681 00003A43 5F <1> pop di 4682 00003A44 66 <1> _386_o32 4683 00003A45 5E <1> pop si 4684 00003A46 EBB6 <1> jmp .pm 4685 <1> 4686 <1> .invalid: ; the address is inaccessible 4687 <1> %endif 4688 00003A48 F9 <1> stc 4689 00003A49 C3 <1> retn 4690 <1> 4691 <1> .checkhma: 4692 00003A4A 83F8F0 <1> cmp ax, -10h ; valid offset for HMA ? 4693 00003A4D 73C9 <1> jae .nonrmspace ; no, above HMA --> 4694 00003A4F F606[9D00]20 <1> testopt [internalflags], debuggerA20 ; A20 on, HMA accessible ? 4695 00003A54 74C2 <1> jz .nonrmspace ; no, treat as above HMA (DEBUGX) --> 4696 00003A56 BBFFFF <1> mov bx, 0FFFFh ; the HMA must always be addressed by segment FFFFh 4697 00003A59 83C010 <1> add ax, byte 10h ; and the offset is always at least 0010h (FFFFh:0010h = 00100000h) 4698 <1> ; (NC because we checked that this won't overflow) 4699 00003A5C 92 <1> xchg ax, dx ; bx:dx = segment:offset 4700 00003A5D EB11 <1> jmp .zero_edxh 4701 <1> 4702 <1> .nothma: 4703 00003A5F 51 <1> push cx 4704 00003A60 B104 <1> mov cl, 4 4705 00003A62 D3CA <1> ror dx, cl ; dx (high 4 bits) = high 4 bits of segment 4706 00003A64 89C3 <1> mov bx, ax 4707 00003A66 D3EB <1> shr bx, cl ; bx = low 12 bits of segment 4708 00003A68 09DA <1> or dx, bx ; dx = segment 4709 00003A6A 83E00F <1> and ax, byte 0Fh ; ax = low 4 bits of linear, used as offset (NC) 4710 00003A6D 92 <1> xchg ax, dx 4711 00003A6E 93 <1> xchg ax, bx ; bx:dx = segment:offset 4712 00003A6F 59 <1> pop cx 4713 <1> .zero_edxh: 4714 00003A70 660FB7D2 <1> _386_PM movzx edx, dx 4715 00003A74 C3 <1> retn 4716 <1> 4717 <1> 4718 <1> ; T command - Trace. 4719 <1> tt: 4720 00003A75 88C4 <1> mov ah, al 4721 00003A77 80E4DF <1> and ah, TOUPPER 4722 00003A7A 80FC4D <1> cmp ah, 'M' 4723 00003A7D 7548 <1> jnz isnotmodeset 4724 00003A7F E82081 <1> call skipcomma 4725 00003A82 E8F780 <1> call iseol? 4726 00003A85 741C <1> je ismodeget 4727 00003A87 E8D17F <1> call getword 4728 00003A8A E80481 <1> call chkeol ; expect end of line here 4729 00003A8D 83FA01 <1> cmp dx, 1 4730 00003A90 7603E9B56C <1> ja error 4731 00003A95 7407 <1> je .set ; selected 1 --> 4732 <1> .clear: ; selected 0 4733 00003A97 8026[7C00]FD <1> clropt [options], traceints 4734 00003A9C EB05 <1> jmp short .get 4735 <1> .set: 4736 00003A9E 800E[7C00]02 <1> setopt [options], traceints 4737 <1> .get: 4738 <1> ismodeget: 4739 00003AA3 B030 <1> mov al, '0' 4740 00003AA5 BE[2D7C] <1> mov si, tmode0 4741 00003AA8 F606[7C00]02 <1> testopt [options], traceints 4742 00003AAD 7404 <1> jz .zero 4743 00003AAF 40 <1> inc ax 4744 00003AB0 BE[267C] <1> mov si, tmode1 4745 <1> .zero: 4746 00003AB3 A2[127C] <1> mov byte [tmodev], al 4747 00003AB6 BF[0E08] <1> mov di, line_out 4748 00003AB9 56 <1> push si 4749 00003ABA BE[047C] <1> mov si, tmodes 4750 00003ABD E81D81 <1> call showstring 4751 00003AC0 5E <1> pop si 4752 00003AC1 E81981 <1> call showstring 4753 00003AC4 E9ED81 <1> jmp putsline_crlf 4754 <1> 4755 <1> isnotmodeset: 4756 <1> %if _TTEST 4757 00003AC7 50 <1> push ax 4758 00003AC8 80FC54 <1> cmp ah, 'T' 4759 00003ACB 7516 <1> jne @F 4760 00003ACD 8B04 <1> mov ax, word [si] 4761 00003ACF 25DFDF <1> and ax, TOUPPER_W 4762 00003AD2 3D4553 <1> cmp ax, "ES" 4763 00003AD5 750C <1> jne @F 4764 00003AD7 8A4402 <1> mov al, byte [si + 2] 4765 00003ADA 24DF <1> and al, TOUPPER 4766 00003ADC 3C54 <1> cmp al, 'T' 4767 00003ADE 7503E9C900 <1> je ttestcmd 4768 <1> @@: 4769 00003AE3 58 <1> pop ax 4770 <1> %endif 4771 <1> %if _TSR 4772 00003AE4 80FC53 <1> cmp ah, 'S' 4773 00003AE7 750D <1> jne @F 4774 00003AE9 50 <1> push ax 4775 00003AEA 8A04 <1> mov al, byte [si] 4776 00003AEC 24DF <1> and al, TOUPPER 4777 00003AEE 3C52 <1> cmp al, 'R' 4778 00003AF0 58 <1> pop ax 4779 00003AF1 7503E9C401 <1> je tsr 4780 <1> %endif 4781 <1> @@: 4782 00003AF6 8026[9F00]F7 <1> clropt [internalflags], tt_p 4783 00003AFB 80FC50 <1> cmp ah, 'P' 4784 00003AFE 7506 <1> jne @F 4785 00003B00 AC <1> lodsb 4786 00003B01 800E[9F00]08 <1> setopt [internalflags], tt_p 4787 <1> @@: 4788 <1> tt0: 4789 00003B06 C706[E60B][063B] <1> mov word [lastcmd], tt0 4790 00003B0C 8026[A100]EF <1> clropt [internalflags2], dif2_is_pp 4791 00003B11 E81A0C <1> call parse_pt ; process arguments 4792 <1> 4793 <1> ; Do it times. 4794 <1> tt1: 4795 00003B14 53 <1> push bx 4796 00003B15 51 <1> push cx 4797 <1> 4798 00003B16 F606[9F00]08 <1> testopt [internalflags], tt_p 4799 00003B1B 7449 <1> jz .not_p 4800 <1> 4801 <1> %if _PM 4802 00003B1D E8B4FE <1> call resetmode 4803 <1> %endif 4804 00003B20 BA0F00 <1> mov dx, 15 ; DL = number of bytes to go; DH = prefix flags. 4805 00003B23 8B1E[9C0C] <1> mov bx, word [reg_cs] 4806 00003B27 66 <1> _386_PM_o32 ; mov esi, dword [reg_eip] 4807 00003B28 8B36[A80C] <1> mov si, word [reg_eip] 4808 <1> .pp2: 4809 00003B2C E8B308 <1> call pp16 ; get next instruction byte into AL 4810 00003B2F BF[F010] <1> mov di, ppbytes 4811 00003B32 B91900 <1> mov cx, PPLEN_ONLY_STRING 4812 <1> ; mov byte [pp_instruction], al 4813 00003B35 F2AE <1> repne scasb 4814 00003B37 752D <1> jne .not_p ; if not one of these --> 4815 00003B39 8A451F <1> mov al,byte [di+PPLEN-1]; get corresponding byte in ppinfo 4816 00003B3C A880 <1> test al, PP_PREFIX ; prefix ? 4817 00003B3E 740E <1> jz .pp3 ; no --> 4818 00003B40 08C6 <1> or dh, al ; set the OSIZE or ASIZE flags if either of these 4819 <1> ; Note: Multiple OSIZE in a 16-bit cs do not toggle 4820 <1> ; between decoding as O32 and O16, they're always 4821 <1> ; decoded as O32. The same is true for A32, and 4822 <1> ; in a 32-bit cs for O16 and A16. 4823 00003B42 FECA <1> dec dl 4824 00003B44 75E6 <1> jnz .pp2 ; if not out of bytes --> 4825 00003B46 BA[E673] <1> mov dx, msg.warnprefix 4826 00003B49 E8E784 <1> call putsz 4827 00003B4C EB18 <1> jmp .not_p 4828 <1> 4829 <1> ; A repeatable string instruction is to be decoded. 4830 <1> ; Finish the decoding and skip the appropriate number 4831 <1> ; of opcode bytes. 4832 <1> .pp3: 4833 00003B4E E83404 <1> _386_PM call pp_fix32bitflags 4834 00003B51 A847 <1> test al, PP_VARSIZ | PP_SIZ_MASK 4835 00003B53 7403E9F26B <1> jnz error 4836 <1> %if 0 4837 <1> test al, PP_VARSIZ ; different opcode length depends on OSIZE ? 4838 <1> jz .ignoreosize ; no --> 4839 <1> and dh, 2 4840 <1> add al, dh 4841 <1> .ignoreosize: 4842 <1> and ax, PP_SIZ_MASK 4843 <1> _386_PM movzx eax, ax ; clear high word (in case it counts) 4844 <1> _386_PM_o32 ; add esi, eax 4845 <1> add si, ax 4846 <1> %endif 4847 <1> ; pp10: 4848 <1> ; jmp short pp11 ; we have a skippable instruction here 4849 <1> ; pp11: 4850 00003B58 E8E123 <1> _386_PM call resetmode_and_test_d_b_bit 4851 00003B5B 7504 <1> _386_PM jnz .32 ; full 32-bit offset valid --> 4852 00003B5D 660FB7F6 <1> _386_PM movzx esi, si ; clear high word here 4853 <1> .32: 4854 00003B61 E8E807 <1> call proceedbreakpoint ; run until the breakpoint is hit 4855 <1> ; This call might return modeswitched. 4856 00003B64 EB03 <1> jmp short @F 4857 <1> 4858 <1> .not_p: 4859 00003B66 E87802 <1> call traceone ; call common code 4860 <1> @@: 4861 00003B69 7303E93A02 <1> jc unexpectedinterrupt ; an unexpected interrupt occured --> 4862 <1> %if _BREAKPOINTS 4863 00003B6E 7416 <1> jz @F ; (breakpoint after instruction was hit) 4864 <1> 4865 <1> ; bb breakpoint was hit. dumpregs, then return 4866 00003B70 E8D600 <1> call handle_bb_hit_pass_match 4867 00003B73 7204 <1> jc .actual_hit ; actual match ? --> 4868 00003B75 7418 <1> jz tt2.nodump ; non-silent mode ? --> 4869 00003B77 EB0D <1> jmp tt2 ; silent mode --> 4870 <1> 4871 <1> .actual_hit: 4872 <1> %if _PM 4873 00003B79 E858FE <1> call resetmode 4874 <1> %endif 4875 00003B7C E829F8 <1> call put_deferred_message_silent 4876 00003B7F E8CF05 <1> call dumpregs_extended_silent 4877 00003B82 59 <1> pop cx 4878 00003B83 5B <1> pop bx ; (discard counter) 4879 00003B84 EB1C <1> jmp @FF 4880 <1> @@: 4881 <1> %endif 4882 <1> tt2: 4883 <1> %if _PM 4884 00003B86 E84BFE <1> call resetmode 4885 <1> %endif 4886 00003B89 E81CF8 <1> call put_deferred_message_silent 4887 00003B8C E8C205 <1> call dumpregs_extended_silent 4888 <1> ; dump registers 4889 <1> .nodump: 4890 <1> 4891 00003B8F E85600 <1> call tt_handle_while 4892 00003B92 59 <1> pop cx 4893 00003B93 5B <1> pop bx 4894 <1> 4895 00003B94 83E901 <1> sub cx, 1 4896 00003B97 83DB00 <1> sbb bx, 0 ; decrement loop counter 4897 <1> 4898 00003B9A 85DB <1> test bx, bx 4899 00003B9C 750B <1> jnz tt1_jmp ; loop --> 4900 00003B9E 85C9 <1> test cx, cx 4901 00003BA0 7507 <1> jnz tt1_jmp ; loop --> 4902 <1> 4903 <1> @@: 4904 <1> %if _PM 4905 00003BA2 E82FFE <1> call resetmode 4906 <1> %endif 4907 00003BA5 E8CB83 <1> call silence_dump 4908 <1> 4909 00003BA8 C3 <1> retn 4910 <1> 4911 <1> tt1_jmp: 4912 00003BA9 E968FF <1> jmp tt1 4913 <1> 4914 <1> 4915 <1> %if _TTEST 4916 <1> ttestcmd: 4917 00003BAC 58 <1> pop ax 4918 00003BAD 46 <1> inc si 4919 00003BAE 46 <1> inc si 4920 00003BAF 46 <1> inc si 4921 00003BB0 E81E80 <1> call skipwhite 4922 <1> 4923 <1> .tt0: 4924 00003BB3 C706[E60B][B33B] <1> mov word [lastcmd], .tt0 4925 00003BB9 8026[A100]EF <1> clropt [internalflags2], dif2_is_pp 4926 00003BBE E86D0B <1> call parse_pt ; process arguments 4927 <1> 4928 <1> ; Do it times. 4929 <1> .tt1: 4930 00003BC1 53 <1> push bx 4931 00003BC2 51 <1> push cx 4932 <1> 4933 <1> .tt2: 4934 <1> %if _PM 4935 00003BC3 E80EFE <1> call resetmode 4936 <1> %endif 4937 00003BC6 E8DFF7 <1> call put_deferred_message_silent 4938 00003BC9 E88505 <1> call dumpregs_extended_silent 4939 <1> ; dump registers 4940 <1> .nodump: 4941 <1> 4942 00003BCC E81900 <1> call tt_handle_while 4943 00003BCF 59 <1> pop cx 4944 00003BD0 5B <1> pop bx 4945 <1> 4946 00003BD1 83E901 <1> sub cx, 1 4947 00003BD4 83DB00 <1> sbb bx, 0 ; decrement loop counter 4948 <1> 4949 00003BD7 85DB <1> test bx, bx 4950 00003BD9 750B <1> jnz .tt1_jmp ; loop --> 4951 00003BDB 85C9 <1> test cx, cx 4952 00003BDD 7507 <1> jnz .tt1_jmp ; loop --> 4953 <1> 4954 <1> @@: 4955 <1> %if _PM 4956 00003BDF E8F2FD <1> call resetmode 4957 <1> %endif 4958 00003BE2 E88E83 <1> call silence_dump 4959 <1> 4960 00003BE5 C3 <1> retn 4961 <1> 4962 <1> .tt1_jmp: 4963 00003BE6 EBD9 <1> jmp .tt1 4964 <1> %endif 4965 <1> 4966 <1> 4967 <1> tt_handle_while: 4968 00003BE8 F606[9F00]04 <1> testopt [internalflags], tt_while 4969 00003BED 7434 <1> jz @F 4970 <1> 4971 <1> %if _PM 4972 00003BEF E8E2FD <1> call resetmode 4973 <1> %endif 4974 00003BF2 E82F00 <1> call .copy_condition_to_line_out 4975 <1> ; dx = si -> line_out with condition 4976 00003BF5 FF36[FE0A] <1> push word [rc] 4977 00003BF9 8F06[000B] <1> pop word [priorrc] 4978 00003BFD AC <1> lodsb 4979 00003BFE E87479 <1> call getexpression ; parse stored expression 4980 00003C01 E88D7F <1> call chkeol 4981 00003C04 E87973 <1> call toboolean ; get boolean 4982 00003C07 85D2 <1> test dx, dx ; true ? 4983 00003C09 7518 <1> jnz @F ; yes, continue --> 4984 <1> 4985 00003C0B E86583 <1> call silence_dump 4986 <1> 4987 00003C0E BA[CF6A] <1> mov dx, msg.while_terminated_before 4988 00003C11 E81F84 <1> call putsz 4989 00003C14 E80D00 <1> call .copy_condition_to_line_out 4990 00003C17 E81984 <1> call putsz ; display condition 4991 00003C1A BA[E16A] <1> mov dx, msg.while_terminated_after 4992 00003C1D E81384 <1> call putsz 4993 00003C20 E9DDC3 <1> jmp cmd3 4994 <1> 4995 <1> @@: 4996 00003C23 C3 <1> retn 4997 <1> 4998 <1> 4999 <1> .copy_condition_to_line_out: 5000 00003C24 8E06[FA09] <1> mov es, word [auxbuff_segorsel] 5001 00003C28 31FF <1> xor di, di ; -> stored expression (if not PM) 5002 <1> %if _PM 5003 00003C2A 033E[F809] <1> add di, word [auxbuff_switchbuffer_size] 5004 <1> ; -> stored expression 5005 <1> %endif 5006 00003C2E 89FE <1> mov si, di 5007 00003C30 B9FFFF <1> mov cx, -1 5008 00003C33 B000 <1> mov al, 0 5009 00003C35 F2AE <1> repne scasb 5010 00003C37 F7D1 <1> not cx ; = length, including zero terminator 5011 00003C39 06 <1> push es 5012 00003C3A 1F <1> pop ds ; ds:si -> auxbuff stored expression 5013 00003C3B 16 <1> push ss 5014 00003C3C 07 <1> pop es 5015 00003C3D BF[0E08] <1> mov di, line_out ; -> line_out 5016 00003C40 57 <1> push di 5017 00003C41 F3A4 <1> rep movsb ; move over 5018 00003C43 5E <1> pop si 5019 <1> 5020 00003C44 89F2 <1> mov dx, si 5021 00003C46 16 <1> push ss 5022 00003C47 1F <1> pop ds ; -> line_out 5023 00003C48 C3 <1> retn 5024 <1> 5025 <1> 5026 <1> ; INP: cl = flags indicating what kind of bb match occurred 5027 <1> ; cl & 1 set if actual hit, 5028 <1> ; else cl & 2 set if pass match, 5029 <1> ; else it is a non-pass non-hit match 5030 <1> ; (cl & 4 always set (indicates any bb match)) 5031 <1> ; cl & 8 set if pp/tt breakpoint hit 5032 <1> ; dword [ss:sp] = command repetition counter 5033 <1> ; OUT: NC if pass match or non-pass non-hit match, 5034 <1> ; if pass match: deferred message output, dumpregs output 5035 <1> ; if cl & 8 set (pass/nonpass bb, tt/pp hit): 5036 <1> ; ZR if [internalflags] & tt_silent_mode clear 5037 <1> ; NZ if [internalflags] & tt_silent_mode set 5038 <1> ; if cl & 8 clear (pass/nonpass bb, no tt/pp hit): 5039 <1> ; ZR 5040 <1> ; dword [ss:sp] increased by 1 5041 <1> ; CY if actual hit (hit bb) 5042 <1> ; ax = INP:cx 5043 <1> ; CHG: dx, bx, cx, si, di, all high words, fs, gs 5044 <1> ; STT: ds = es = ss 5045 <1> handle_bb_hit_pass_match: 5046 <1> d5 call d5message 5047 <1> d5 asciz "in handle_bb_hit_pass_match",13,10 5048 <1> 5049 00003C49 91 <1> xchg ax, cx 5050 <1> 5051 00003C4A F606[A100]08 <1> testopt [internalflags2], dif2_bp_failure 5052 00003C4F 7567 <1> jnz .actual_hit ; after failure, handle as actual hit 5053 <1> 5054 00003C51 A801 <1> test al, 1 ; actual hit ? else: non-hit, pass or non-pass 5055 00003C53 7563 <1> jnz .actual_hit ; yes --> 5056 <1> 5057 00003C55 A802 <1> test al, 2 ; at least pass match ? 5058 00003C57 7418 <1> jz .nonpassnonhit ; no --> 5059 <1> 5060 <1> .passnonhit: 5061 <1> 5062 <1> d5 call d5message 5063 <1> d5 asciz "bb pass non-hit",13,10 5064 <1> 5065 <1> %if _PM 5066 00003C59 E878FD <1> call resetmode 5067 <1> %endif 5068 <1> ; call put_deferred_message_loud 5069 00003C5C BA[7072] <1> mov dx, msg.empty_message 5070 00003C5F 8716[C000] <1> xchg dx, word [gg_deferred_message] 5071 00003C63 E8CD83 <1> call putsz 5072 00003C66 BA[B8BC] <1> mov dx, putsline 5073 00003C69 E849F7 <1> call put_bb_deferred_message_calling_dx 5074 <1> 5075 00003C6C 50 <1> push ax 5076 <1> ; call dumpregs_extended_loud 5077 <1> ; (includes handle_serial_flags_ctrl_c) 5078 00003C6D E824EB <1> call dumpregs_extended 5079 00003C70 58 <1> pop ax ; (preserve so the test al, 8 can use it) 5080 <1> .nonpassnonhit: 5081 00003C71 E8FE04 <1> call handle_serial_flags_ctrl_c 5082 <1> 5083 <1> ; al & 4 always set 5084 <1> 5085 00003C74 8026[A000]E9 <1> clropt [internalflags2], dif2_gg_skip_non_cseip | dif2_gg_skip_cseip | dif2_gg_first_detected 5087 00003C79 800E[A000]01 <1> setopt [internalflags2], dif2_gg_is_first 5088 <1> 5089 00003C7E FF36[BA00] <1> push word [gg_next_cseip_linear + 2] 5090 00003C82 FF36[B800] <1> push word [gg_next_cseip_linear] 5091 00003C86 8F06[B400] <1> pop word [gg_first_cseip_linear] 5092 00003C8A 8F06[B600] <1> pop word [gg_first_cseip_linear + 2] 5093 <1> 5094 00003C8E A808 <1> test al, 8 ; not bb hit, is tt/pp hit ? 5095 00003C90 7519 <1> jnz @FF ; yes --> 5096 <1> 5097 00003C92 F706[A000]8010 <1> testopt [internalflags2], dif2_is_pp | dif2_tpg_keep_proceed_bp, 1 5098 00003C98 7502 <1> jnz @F 5099 00003C9A EB0F <1> jmp @FF 5100 <1> 5101 <1> @@: 5102 <1> lframe near 5103 <1> lpar dword, counter 5104 <1> lpar_return 5105 00003C9C 5589E5 <1> lenter 5106 00003C9F 83460401 <1> add word [bp + ?counter], 1 5107 00003CA3 83560600 <1> adc word [bp + ?counter + 2], 0 5108 00003CA7 5D <1> lleave 5109 00003CA8 38C0 <1> cmp al, al ; (NC, ZR) 5110 00003CAA C3 <1> retn 5111 <1> 5112 <1> @@: 5113 00003CAB A802 <1> test al, 2 ; displayed pass point ? 5114 00003CAD 7503 <1> jnz @F ; yes --> 5115 00003CAF A8FF <1> test al, -1 ; NC, NZ (do not skip dump) 5116 <1> ; al & 0Ch is set so this test is NZ 5117 00003CB1 C3 <1> retn 5118 <1> 5119 <1> @@: 5120 00003CB2 F606[9F00]10 <1> testopt [internalflags], tt_silent_mode 5121 <1> ; (NC, ZF is ZR if to skip dump) 5122 00003CB7 C3 <1> retn 5123 <1> 5124 <1> .actual_hit: 5125 <1> d5 call d5message 5126 <1> d5 asciz "bb hit",13,10 5127 <1> 5128 00003CB8 F9 <1> stc 5129 00003CB9 C3 <1> retn 5130 <1> 5131 <1> 5132 <1> %if _TSR 5133 <1> tsr: 5134 00003CBA E8BAC8 <1> call guard_re 5135 00003CBD 46 <1> inc si 5136 00003CBE AC <1> lodsb 5137 00003CBF E8CF7E <1> call chkeol 5138 00003CC2 F606[9E00]40 <1> testopt [internalflags], tsrmode 5139 00003CC7 7405 <1> jz .try ; not yet resident --> 5140 00003CC9 BA[0060] <1> mov dx, msg.alreadytsr 5141 00003CCC EB53 <1> jmp short .putsz 5142 <1> .try: 5143 00003CCE 8B16[AE0A] <1> mov dx, word [pspdbe] 5144 00003CD2 8B1E[B00A] <1> mov bx, word [pspdbg] 5145 00003CD6 BF0A00 <1> mov di, 0Ah 5146 <1> .loop: 5147 <1> %if _PM 5148 00003CD9 89D1 <1> mov cx, dx ; = original segment address 5149 00003CDB E8F756 <1> call ispm 5150 00003CDE 7514 <1> jnz .rm 5151 00003CE0 53 <1> push bx 5152 00003CE1 89D0 <1> mov ax, dx 5153 <1> [cpu 286] 5154 00003CE3 C1EA0C <1> shr dx, 12 5155 00003CE6 C1E004 <1> shl ax, 4 ; shift to get a 32-bit linear address 5156 <1> __CPU__ 5157 00003CE9 E812FD <1> call getsegmented.pm ; set up selector for access 5158 <1> ; This call makes some assumptions: 5159 <1> ; - No mode switch occurs; we are still in PM. 5160 <1> ; Currently none is performed from PM. 5161 <1> ; - (e)dx isn't larger than about FFD0h. 5162 <1> ; Currently scratchsel with an offset of zero is returned. 5163 00003CEC 89D7 <1> mov di, dx ; -> PSP 5164 00003CEE 89DA <1> mov dx, bx 5165 00003CF0 5B <1> pop bx 5166 00003CF1 83C70A <1> add di, byte 0Ah ; -> PSP termination vector 5167 <1> .rm: 5168 <1> %endif 5169 00003CF4 8EC2 <1> mov es, dx 5170 00003CF6 268B450C <1> mov ax, word [es:(di-0Ah)+16h] 5171 00003CFA 40 <1> inc ax 5172 00003CFB 741F <1> jz .pspnotfound 5173 00003CFD 48 <1> dec ax 5174 00003CFE 741C <1> jz .pspnotfound ; parent is invalid --> 5175 <1> %if _PM 5176 00003D00 39C8 <1> cmp ax, cx 5177 <1> %else 5178 <1> cmp ax, dx 5179 <1> %endif 5180 00003D02 7418 <1> je .pspnotfound ; parent is the process itself --> 5181 00003D04 89C2 <1> mov dx, ax 5182 00003D06 39D8 <1> cmp ax, bx 5183 00003D08 75CF <1> jne .loop ; parent is not us --> 5184 00003D0A 26813D[FA87] <1> cmp word [es:di], int22 5185 00003D0F 7506 <1> jne .psphooked 5186 00003D11 26395D02 <1> cmp word [es:di+2], bx 5187 00003D15 740D <1> je .found ; correct vector --> (otherwise: hooked) 5188 <1> .psphooked: 5189 00003D17 BA[A05F] <1> mov dx, msg.psphooked 5190 00003D1A EB03 <1> jmp short .putsz_es 5191 <1> .pspnotfound: 5192 00003D1C BA[755F] <1> mov dx, msg.pspnotfound 5193 <1> .putsz_es: 5194 00003D1F 16 <1> push ss 5195 00003D20 07 <1> pop es 5196 <1> .putsz: 5197 00003D21 E90F83 <1> jmp putsz 5198 <1> 5199 <1> .found: 5200 00003D24 BE[D40A] <1> mov si, psp22 5201 00003D27 A5 <1> movsw 5202 00003D28 A5 <1> movsw ; write our parent's vector 5203 00003D29 83C708 <1> add di, 16h-(0Ah+4) 5204 00003D2C A5 <1> movsw ; write our parent 5205 00003D2D 800E[9E00]40 <1> setopt [internalflags], tsrmode ; note that we are resident 5206 <1> %if _PM 5207 00003D32 51 <1> push cx 5208 <1> %else 5209 <1> push es 5210 <1> %endif 5211 00003D33 BA[DE5F] <1> mov dx, msg.nowtsr1 5212 00003D36 E8E6FF <1> call .putsz_es 5213 00003D39 58 <1> pop ax 5214 00003D3A BF[0E08] <1> mov di, line_out 5215 00003D3D E83C7F <1> call hexword 5216 00003D40 E8757F <1> call putsline 5217 00003D43 BF[D40A] <1> mov di, psp22 5218 00003D46 31C0 <1> xor ax, ax 5219 00003D48 AB <1> stosw 5220 00003D49 AB <1> stosw 5221 00003D4A AB <1> stosw ; clear our parent/int22 fields 5222 00003D4B BA[EE5F] <1> mov dx, msg.nowtsr2 5223 00003D4E EBD1 <1> jmp short .putsz 5224 <1> %endif 5225 <1> 5226 <1> 5227 <1> ; INP: dx -> message, zero-terminated 5228 <1> ; CHG: - 5229 <1> ; OUT: message displayed or put into silent buffer 5230 <1> ; STT: ds = es = ss = debugger data selector 5231 <1> putsz_silent: 5232 00003D50 F606[9F00]10 <1> testopt [internalflags], tt_silent_mode 5233 00003D55 7405 <1> jz @F 5234 00003D57 800E[9F00]20 <1> setopt [internalflags], tt_silence 5235 <1> @@: 5236 00003D5C E8D482 <1> call putsz ; print string 5237 00003D5F F606[9F00]10 <1> testopt [internalflags], tt_silent_mode 5238 00003D64 7405 <1> jz @F 5239 00003D66 8026[9F00]DF <1> clropt [internalflags], tt_silence 5240 <1> @@: 5241 00003D6B C3 <1> retn 5242 <1> 5243 <1> 5244 <1> ; INP: es:di -> behind message in line_out 5245 <1> ; CHG: ax, bx, cx, dx 5246 <1> ; OUT: message displayed or put into silent buffer 5247 <1> ; STT: ds = es = ss = debugger data selector 5248 <1> putsline_silent: 5249 00003D6C F606[9F00]10 <1> testopt [internalflags], tt_silent_mode 5250 00003D71 7405 <1> jz @F 5251 00003D73 800E[9F00]20 <1> setopt [internalflags], tt_silence 5252 <1> @@: 5253 00003D78 E83D7F <1> call putsline 5254 00003D7B F606[9F00]10 <1> testopt [internalflags], tt_silent_mode 5255 00003D80 7405 <1> jz @F 5256 00003D82 8026[9F00]DF <1> clropt [internalflags], tt_silence 5257 <1> @@: 5258 00003D87 C3 <1> retn 5259 <1> 5260 <1> 5261 <1> ; INP: word [run_int] 5262 <1> ; InDOS status 5263 <1> ; STT: es = ds = ss 5264 <1> ; OUT: dx -> message 5265 <1> ; CHG: ax, di 5266 <1> getrunint: 5267 00003D88 8B16[E40B] <1> mov dx, word [run_int] 5268 00003D8C 81FA[497F] <1> cmp dx, progtrm 5269 00003D90 7515 <1> jne .ret 5270 <1> 5271 00003D92 B8FFFF <1> mov ax, -1 5272 00003D95 E8816B <1> call InDos 5273 00003D98 7504 <1> jnz .no_int21_4D 5274 <1> 5275 00003D9A B44D <1> mov ah, 4Dh 5276 00003D9C CD21 <1> int 21h 5277 <1> .no_int21_4D: 5278 00003D9E A3[7C87] <1> mov word [usertermcode], ax 5279 00003DA1 BF[687F] <1> mov di, progexit 5280 00003DA4 E8D57E <1> call hexword 5281 <1> .ret: 5282 00003DA7 C3 <1> retn 5283 <1> 5284 <1> 5285 <1> usesection lDEBUG_DATA_ENTRY 5286 <1> align 2, db 0 5287 0000877C 0000 <1> usertermcode: dw 0 5288 <1> usesection lDEBUG_CODE 5289 <1> 5290 <1> 5291 <1> ; Print message about unexpected interrupt, dump registers, and 5292 <1> ; end command. This code is also used by the G and P commands. 5293 <1> unexpectedinterrupt: 5294 <1> %if _PM 5295 00003DA8 E829FC <1> call resetmode 5296 <1> %endif 5297 00003DAB E8DAFF <1> call getrunint 5298 00003DAE E89FFF <1> call putsz_silent 5299 <1> %if _CATCHINT19 5300 00003DB1 81FA[737D] <1> cmp dx, int19msg 5301 00003DB5 7409 <1> je .noregs ; if it terminated, skip the registers 5302 <1> %endif 5303 00003DB7 81FA[497F] <1> cmp dx, progtrm 5304 00003DBB 7403 <1> je .noregs ; if it terminated, skip the registers 5305 00003DBD E89103 <1> call dumpregs_extended_silent 5306 <1> .noregs: 5307 00003DC0 E8B081 <1> call silence_dump 5308 <1> 5309 00003DC3 F606[A000]08 <1> testopt [internalflags2], dif2_gg_is_gg 5310 00003DC8 7407 <1> jz @F 5311 00003DCA F606[7E00]20 <1> testopt [options], gg_unexpected_no_repeat 5312 00003DCF EB05 <1> jmp @FF 5313 <1> @@: 5314 00003DD1 F606[7E00]40 <1> testopt [options], tp_unexpected_no_repeat 5315 <1> @@: 5316 00003DD6 7406 <1> jz @F 5317 00003DD8 C706[E60B][5C04] <1> mov word [lastcmd], dmycmd 5318 <1> @@: 5319 <1> 5320 00003DDE E91FC2 <1> jmp cmd3 ; back to the start 5321 <1> 5322 <1> 5323 <1> ; Trace an instruction. 5324 <1> ; INP: word [reg_cs], dword [reg_eip], other register values 5325 <1> ; OUT: NC if the breakpoint or trace interrupt was hit, 5326 <1> ; ah = 0 5327 <1> ; ch = 0 5328 <1> ; d[reg_eip] adjusted if a breakpoint (bb) hit 5329 <1> ; cx & 8 set if trace interrupt hit 5330 <1> ; (assumed to be the expected trace hit) 5331 <1> ; (ZF only set if _BREAKPOINTS) 5332 <1> ; ZR if trace interrupt was hit, 5333 <1> ; cx & 7 = 0 5334 <1> ; NZ if a breakpoint (bb) was hit (or both were hit), 5335 <1> ; cx & 1 set if non-pass match (actual hit), 5336 <1> ; else cx & 2 set if pass match (consider as hit first, 5337 <1> ; but dump registers next (not to silent buffer) 5338 <1> ; and then continue execution) 5339 <1> ; else cx & 4 always set, indicates any match 5340 <1> ; (including matches that should merely continue) 5341 <1> ; all pass points' counters stepped 5342 <1> ; CY if no breakpoint and no trace interrupt was hit, 5343 <1> ; cx = 0 5344 <1> ; If [internalflags2] & dif2_gg_is_gg is set: 5345 <1> ; ah & 7Fh = status = 0 = no error, 5346 <1> ; 1 = couldn't write, 5347 <1> ; 2 = unreachable, 5348 <1> ; 3 = overwritten, al = new value 5349 <1> ; ah & 80h = set if error restoring point, 5350 <1> ; else error writing point to begin with 5351 <1> ; If that flag is clear: 5352 <1> ; Does not return if a breakpoint cannot be written 5353 <1> ; or cannot be restored, jumps to cmd3 instead. 5354 <1> ; CHG: all 5355 <1> ; STT: ds = es = ss 5356 <1> ; might return modeswitched (if dif2_gg_is_gg) 5357 <1> ; might be called while modeswitched 5358 <1> traceone: 5359 00003DE1 F606[A000]80 <1> testopt [internalflags2], dif2_tpg_keep_proceed_bp 5360 00003DE6 7403E99A00 <1> jnz .proceedbreakpoint 5361 <1> 5362 <1> %if _PM 5363 00003DEB E8E6FB <1> call resetmode 5364 <1> %endif 5365 00003DEE 31C9 <1> xor cx, cx 5366 00003DF0 E8155D <1> call getcseipbyte 5367 00003DF3 3CCD <1> cmp al, 0CDh ; int opcode? 5368 00003DF5 7403E98E00 <1> jne .isstdtrace ; no --> 5369 00003DFA 41 <1> inc cx 5370 00003DFB E80A5D <1> call getcseipbyte 5371 00003DFE 3C03 <1> cmp al, 3 5372 00003E00 7503E98300 <1> je .isstdtrace ; int 3 opcode --> 5373 00003E05 F606[7C00]02 <1> testopt [options], traceints ; TM=1? 5374 00003E0A 7503E9E800 <1> jz isstdtraceX 5375 00003E0F 3C01 <1> cmp al, 1 5376 00003E11 7475 <1> je .isstdtrace ; int 1 opcode --> 5377 <1> 5378 <1> ; TM==1, single-step into the INT 5379 00003E13 88C3 <1> mov bl, al 5380 <1> %if _PM 5381 00003E15 E8BD55 <1> call ispm 5382 00003E18 745C <1> jz .singlestep_into_interrupt_pm 5383 <1> %endif 5384 00003E1A B700 <1> mov bh, 0 5385 00003E1C 1E <1> push ds 5386 00003E1D 31C0 <1> xor ax, ax 5387 00003E1F 8ED8 <1> mov ds, ax 5388 00003E21 D1E3 <1> shl bx, 1 5389 00003E23 D1E3 <1> shl bx, 1 5390 00003E25 C537 <1> lds si, [bx] 5391 00003E27 FA <1> cli 5392 00003E28 8A04 <1> mov al, byte [si] 5393 00003E2A FE04 <1> inc byte [si] 5394 00003E2C 3804 <1> cmp byte [si], al 5395 00003E2E 8804 <1> mov byte [si], al 5396 00003E30 FB <1> sti 5397 00003E31 8CDB <1> mov bx, ds ; bx:si-> interrupt handler (RM, 16 bit) 5398 00003E33 89D8 <1> mov ax, bx 5399 00003E35 1F <1> pop ds 5400 00003E36 754D <1> jne .singlestep_into_interrupt_setbp 5401 <1> 5402 <1> ; The interrupt handler is in a ROM. 5403 <1> %if 0 5404 <1> jmp short isstdtraceX 5405 <1> %else 5406 00003E38 8736[A80C] <1> xchg si, word [reg_eip] 5407 00003E3C 8706[9C0C] <1> xchg ax, word [reg_cs] ; get cs:ip, set interrupt handler address 5408 00003E40 8B0E[AC0C] <1> mov cx, word [reg_efl] ; get flags 5409 00003E44 1E <1> push ds 5410 00003E45 8B1E[800C] <1> mov bx, word [reg_esp] 5411 00003E49 8E1E[980C] <1> mov ds, word [reg_ss] ; ds:bx-> debuggee stack 5412 00003E4D 83EB06 <1> sub bx, byte 6 ; reserve enough space for flags, cs, ip 5413 00003E50 46 <1> inc si 5414 00003E51 46 <1> inc si ; skip CDh xxh opcode 5415 00003E52 894F04 <1> mov word [bx+4], cx 5416 00003E55 894702 <1> mov word [bx+2], ax 5417 00003E58 8937 <1> mov word [bx+0], si ; save flags, cs, ip on stack 5418 00003E5A 1F <1> pop ds 5419 00003E5B 891E[800C] <1> mov word [reg_esp], bx ; update sp 5420 00003E5F 8026[AD0C]FC <1> and byte [reg_efl+1], ~(2|1) ; clear IF and TF (NC) 5421 <1> ; Note: If invalid flag values were previously set by the user 5422 <1> ; by directly accessing the FL or EFL register, these won't be 5423 <1> ; fixed by us now. This could be worked around by executing a 5424 <1> ; NOP in debuggee's environment (or only with debuggee's flags) 5425 <1> ; first, but I don't think it's much of an issue. 5426 00003E64 C706[E40B][7D7C] <1> mov word [run_int], int1msg 5427 00003E6A 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 5430 00003E70 B90800 <1> mov cx, 8 5431 00003E73 31C0 <1> xor ax, ax ; NC, ZR 5432 00003E75 C3 <1> retn 5433 <1> 5434 <1> %endif 5435 <1> %if _PM 5436 <1> .singlestep_into_interrupt_pm: 5437 00003E76 B80402 <1> mov ax, 0204h 5438 00003E79 CD31 <1> int 31h 5439 00003E7B 89CB <1> mov bx, cx 5440 00003E7D 66 <1> _386_o32 ; mov esi, edx 5441 00003E7E 89D6 <1> mov si, dx ; bx:(e)si-> interrupt handler 5442 00003E80 F6C304 <1> test bl, 4 ; is it a LDT selector? (NC) 5443 00003E83 7472 <1> jz isstdtraceX ; no --> 5444 <1> %endif 5445 <1> .singlestep_into_interrupt_setbp: 5446 <1> .proceedbreakpoint: 5447 00003E85 E9C404 <1> jmp proceedbreakpoint 5448 <1> 5449 <1> .isstdtrace: 5450 <1> %if _PM 5451 00003E88 E84A55 <1> call ispm 5452 00003E8B 7415 <1> jz .notdpmientry ; already in PM --> 5453 00003E8D A1[A80C] <1> mov ax, w[reg_eip] ; is this a switch to protected mode ? 5454 00003E90 3B06[EC8A] <1> cmp ax, w[dpmiwatch+0] 5455 00003E94 750C <1> jne .notdpmientry 5456 00003E96 A1[9C0C] <1> mov ax, w[reg_cs] 5457 00003E99 3B06[EE8A] <1> cmp ax, w[dpmiwatch+2] 5458 00003E9D 7503E98304 <1> je isdpmientry ; yes, catch it --> (this means really "go") 5459 <1> .notdpmientry: 5460 <1> %endif 5461 00003EA2 800E[AD0C]01 <1> or byte [reg_efl+1], 1 ; set single-step mode (cleared when returning into DEBUG) 5462 00003EA7 31C9 <1> xor cx, cx 5463 00003EA9 E86300 <1> call skipprefixes 5464 00003EAC 3C9C <1> cmp al, 9Ch ; opcode "PUSHF"? 5465 00003EAE 7527 <1> jnz .notpushf 5466 <1> %if _BREAKPOINTS 5467 00003EB0 E83B05 <1> call run_with_bb 5468 00003EB3 B400 <1> mov ah, 0 5469 00003EB5 9C <1> pushf 5470 <1> %else 5471 <1> call run 5472 <1> xor cx, cx 5473 <1> xor ax, ax 5474 <1> %endif 5475 <1> ; Clear TF in the fl word or efl dword 5476 <1> ; pointed to by debuggee's ss:(e)sp 5477 00003EB6 06 <1> push es 5478 <1> %if _PM 5479 00003EB7 8B1E[980C] <1> mov bx, word [reg_ss] ; get ss selector into bx 5480 00003EBB 8EC3 <1> mov es, bx 5481 00003EBD E87F20 <1> _386 call test_d_b_bit ; check whether a 32-bit ss 5482 <1> %else 5483 <1> mov es, word [reg_ss] 5484 <1> %endif 5485 00003EC0 66 <1> _386_PM_o32 ; mov ebx, dword [reg_esp] 5486 00003EC1 8B1E[800C] <1> mov bx, word [reg_esp] ; es:(e)bx-> debuggee's stack 5487 00003EC5 7408 <1> _386_PM jz .pushf_16 5488 00003EC7 2667806301FE <1> _386_PM and byte [es:ebx+1], ~1 ; clear TF 5489 00003ECD EB05 <1> _386_PM jmp short .pushf_common 5490 <1> .pushf_16: 5491 00003ECF 26806701FE <1> and byte [es:bx+1], ~1 ; clear TF 5492 <1> .pushf_common: 5493 00003ED4 07 <1> pop es 5494 00003ED5 EB06 <1> jmp short .checkreturn 5495 <1> .notpushf: 5496 <1> %if _BREAKPOINTS 5497 00003ED7 E81405 <1> call run_with_bb 5498 00003EDA B400 <1> mov ah, 0 5499 00003EDC 9C <1> pushf 5500 <1> %else 5501 <1> call run 5502 <1> xor cx, cx 5503 <1> xor ax, ax 5504 <1> %endif 5505 <1> .checkreturn: 5506 00003EDD 813E[E40B][7D7C] <1> cmp word [run_int], int1msg 5507 00003EE3 7509 <1> jne .nomatch 5508 00003EE5 80C908 <1> or cl, 8 5509 <1> %if _BREAKPOINTS 5510 00003EE8 9D <1> popf ; CF 5511 00003EE9 7308 <1> jnc .ret_NZ_NC 5512 <1> %endif 5513 00003EEB 38C0 <1> cmp al, al ; if correct interrupt (ZR, NC) 5514 00003EED C3 <1> retn 5515 <1> 5516 <1> .nomatch: 5517 <1> %if _BREAKPOINTS 5518 00003EEE 9D <1> popf ; CF 5519 00003EEF 7302 <1> jnc .ret_NZ_NC 5520 <1> %endif 5521 00003EF1 F9 <1> stc 5522 00003EF2 C3 <1> retn 5523 <1> 5524 <1> %if _BREAKPOINTS 5525 <1> .ret_NZ_NC: 5526 00003EF3 80C904 <1> or cl, 4 ; (NZ, NC) 5527 00003EF6 C3 <1> retn 5528 <1> %endif 5529 <1> 5530 <1> 5531 <1> ; an INT is to be processed (TM is 0) 5532 <1> ; to avoid the nasty x86 bug which makes IRET 5533 <1> ; cause a debug exception 1 instruction too late 5534 <1> ; a breakpoint is set behind the INT 5535 <1> 5536 <1> isstdtraceX: 5537 00003EF7 B90200 <1> mov cx, 2 5538 00003EFA E84800 <1> call iswriteablecseip ; is it ROM ? 5539 00003EFD 7289 <1> jc traceone.isstdtrace ; is read-only --> 5540 00003EFF 8B1E[9C0C] <1> mov bx, word [reg_cs] 5541 <1> 5542 <1> ; (e)si = (e)ip + 2 5543 <1> ; We don't test whether it's a 32-bit code segment here. 5544 <1> ; The previous code would leave the high word of esi uninitialized then. 5545 00003F03 66 <1> _386_PM_o32 ; mov esi, dword [reg_eip] 5546 00003F04 8B36[A80C] <1> mov si, word [reg_eip] 5547 00003F08 66 <1> _386_PM_o32 ; add esi, byte 2 5548 00003F09 83C602 <1> add si, byte 2 ; ! do not remove the byte override, else o32 won't work 5549 00003F0C E93D04 <1> jmp proceedbreakpoint ; set BP at BX:(E)SI and run debuggee 5550 <1> 5551 <1> ; Call getcseipbyte and loop while increasing cx if the returned 5552 <1> ; byte was a prefix. Returns the first non-prefix byte (an opcode) 5553 <1> ; in al. (WAIT or FWAIT is not considered a prefix because it's 5554 <1> ; really an opcode and we also trace it without executing a 5555 <1> ; following FPU opcode.) 5556 <1> skipprefixes: 5557 <1> .: 5558 00003F0F E8F65B <1> call getcseipbyte 5559 00003F12 3C26 <1> cmp al, 26h 5560 00003F14 742A <1> je .prefix ; ES 5561 00003F16 3C2E <1> cmp al, 2Eh 5562 00003F18 7426 <1> je .prefix ; CS 5563 00003F1A 3C36 <1> cmp al, 36h 5564 00003F1C 7422 <1> je .prefix ; SS 5565 00003F1E 3C3E <1> cmp al, 3Eh 5566 00003F20 741E <1> je .prefix ; DS 5567 00003F22 3CF0 <1> cmp al, 0F0h 5568 00003F24 741A <1> je .prefix ; LOCK 5569 00003F26 3CF3 <1> cmp al, 0F3h 5570 00003F28 7416 <1> je .prefix ; REPZ 5571 00003F2A 3CF2 <1> cmp al, 0F2h 5572 00003F2C 7412 <1> je .prefix ; REPNZ 5573 00003F2E EB14 <1> _no386_jmps .noprefix ; no 386, following aren't prefixes (invalid opcodes on 186+) --> 5574 00003F30 3C64 <1> cmp al, 64h 5575 00003F32 740C <1> je .prefix ; FS 5576 00003F34 3C65 <1> cmp al, 65h 5577 00003F36 7408 <1> je .prefix ; GS 5578 00003F38 3C66 <1> cmp al, 66h 5579 00003F3A 7404 <1> je .prefix ; o32/o16 5580 00003F3C 3C67 <1> cmp al, 67h 5581 00003F3E 7504 <1> jne .noprefix ; not a32/a16 5582 <1> .prefix: 5583 00003F40 41 <1> inc cx 5584 <1> ; jmp short . 5585 00003F41 79CC <1> jns . ; this is not correct but serves as hack to avoid an infinite loop 5586 <1> ; (note that getcseipbyte really uses cx as signed number) 5587 00003F43 49 <1> dec cx ; back to 07FFFh 5588 <1> .noprefix: 5589 00003F44 C3 <1> retn 5590 <1> 5591 <1> 5592 <1> ;--- test if memory at CS:E/IP can be written to 5593 <1> ;--- return C if not 5594 <1> 5595 <1> iswriteablecseip: 5596 00003F45 E8C05B <1> call getcseipbyte ; get byte at CS:EIP+CX 5597 00003F48 88C4 <1> mov ah, al 5598 00003F4A 34FF <1> xor al, 0FFh 5599 00003F4C E8E65B <1> call setcseipbyte 5600 00003F4F 720E <1> jc .return 5601 00003F51 E8B45B <1> call getcseipbyte 5602 00003F54 38C4 <1> cmp ah, al ; is it ROM? 5603 00003F56 F9 <1> stc 5604 00003F57 7406 <1> jz .return 5605 00003F59 88E0 <1> mov al, ah 5606 00003F5B E8D75B <1> call setcseipbyte 5607 00003F5E F8 <1> clc 5608 <1> .return: 5609 00003F5F C3 <1> retn 5610 <1> 5611 <1> 5612 <1> %if _PM 5613 <1> debuggerexception: 5614 00003F60 FC <1> cld 5615 00003F61 16 <1> push ss 5616 00003F62 1F <1> pop ds 5617 00003F63 E88869 <1> call unhack ; sets es to ss 5618 00003F66 E81FFE <1> call getrunint 5619 00003F69 E8C780 <1> call putsz ; print string 5620 <1> %if _EXCCSIP 5621 00003F6C BF[CC7D] <1> mov di, exccsip 5622 00003F6F A1[E68A] <1> mov ax, word [exception_csip + 2] 5623 00003F72 E8077D <1> call hexword 5624 00003F75 47 <1> inc di 5625 00003F76 A1[E48A] <1> mov ax, word [exception_csip] 5626 00003F79 E8007D <1> call hexword 5627 <1> 5628 00003F7C BA[C67D] <1> mov dx, excloc 5629 00003F7F E8B180 <1> call putsz 5630 <1> %endif 5631 00003F82 E97BC0 <1> jmp cmd3 5632 <1> %endif 5633 <1> 5634 <1> 5635 <1> %if _PM 5636 <1> [cpu 386] 5637 <1> ; INP: dh = flags as for pp2,pp3,pp5 (1 = ASIZE, 2 = OSIZE) 5638 <1> ; OUT: dh = flags as used by pp3,pp5 (1 = A32, 2 = O32) 5639 <1> pp_fix32bitflags: 5640 00003F85 E8B71F <1> call test_d_b_bit 5641 00003F88 7403 <1> jz .16 5642 00003F8A 80F603 <1> xor dh, 1|2 ; toggle OSIZE and ASIZE (once) 5643 <1> .16: 5644 00003F8D C3 <1> retn 5645 <1> __CPU__ 5646 <1> %endif 5647 <1> 5648 <1> ; P command - proceed (i.e., skip over call/int/loop/string instruction). 5649 <1> pp: 5650 00003F8E C706[E60B][8E3F] <1> mov word [lastcmd], pp 5651 00003F94 800E[A100]10 <1> setopt [internalflags2], dif2_is_pp 5652 00003F99 E89207 <1> call parse_pt ; process arguments 5653 <1> 5654 <1> ; Do it times. First check the type of instruction. 5655 <1> pp1: 5656 00003F9C 53 <1> push bx 5657 00003F9D 51 <1> push cx ; save bx:cx 5658 <1> %if _PM 5659 00003F9E E833FA <1> call resetmode 5660 <1> %endif 5661 00003FA1 BA0F00 <1> mov dx, 15 ; DL = number of bytes to go; DH = prefix flags. 5662 00003FA4 8B1E[9C0C] <1> mov bx, word [reg_cs] 5663 00003FA8 66 <1> _386_PM_o32 ; mov esi, dword [reg_eip] 5664 00003FA9 8B36[A80C] <1> mov si, word [reg_eip] 5665 <1> pp2: 5666 00003FAD E83204 <1> call pp16 ; get next instruction byte into AL 5667 00003FB0 BF[F010] <1> mov di, ppbytes 5668 00003FB3 B92000 <1> mov cx, PPLEN 5669 00003FB6 A2[CD00] <1> mov byte [pp_instruction], al 5670 00003FB9 F2AE <1> repne scasb 5671 00003FBB 7533 <1> jne pp5 ; if not one of these --> 5672 00003FBD 8A451F <1> mov al,byte [di+PPLEN-1]; get corresponding byte in ppinfo 5673 00003FC0 A880 <1> test al, PP_PREFIX ; prefix ? 5674 00003FC2 740F <1> jz pp3 ; no --> 5675 00003FC4 08C6 <1> or dh, al ; set the OSIZE or ASIZE flags if either of these 5676 <1> ; Note: Multiple OSIZE in a 16-bit cs do not toggle 5677 <1> ; between decoding as O32 and O16, they're always 5678 <1> ; decoded as O32. The same is true for A32, and 5679 <1> ; in a 32-bit cs for O16 and A16. 5680 00003FC6 FECA <1> dec dl 5681 00003FC8 75E3 <1> jnz pp2 ; if not out of bytes --> 5682 00003FCA BA[E673] <1> mov dx, msg.warnprefix 5683 00003FCD E86380 <1> call putsz 5684 00003FD0 E9EC00 <1> jmp pp12 5685 <1> 5686 <1> ; A repeatable string, interrupt, call immediate or loop 5687 <1> ; instruction is to be decoded. Finish the decoding and 5688 <1> ; skip the appropriate number of opcode bytes. 5689 <1> pp3: 5690 00003FD3 E8AFFF <1> _386_PM call pp_fix32bitflags 5691 00003FD6 66 <1> _386_PM_o32 5692 00003FD7 8936[D000] <1> mov word [pp_operand], si 5693 00003FDB A840 <1> test al, PP_VARSIZ ; different opcode length depends on OSIZE ? 5694 00003FDD 7405 <1> jz .ignoreosize ; no --> 5695 00003FDF 80E602 <1> and dh, 2 5696 00003FE2 00F0 <1> add al, dh 5697 <1> .ignoreosize: 5698 00003FE4 83E007 <1> and ax, PP_SIZ_MASK 5699 00003FE7 660FB7C0 <1> _386_PM movzx eax, ax ; clear high word (in case it counts) 5700 00003FEB 66 <1> _386_PM_o32 ; add esi, eax 5701 00003FEC 01C6 <1> add si, ax 5702 00003FEE EB5C <1> jmp pp10 5703 <1> 5704 <1> 5705 <1> pp5: 5706 00003FF0 E892FF <1> _386_PM call pp_fix32bitflags 5707 00003FF3 3CFF <1> cmp al, 0FFh ; FF/2 or FF/3 indirect NEAR or FAR call ? 5708 00003FF5 7403E9C500 <1> jne pp12 ; no, just an ordinary instruction --> 5709 00003FFA E8E503 <1> call pp16 ; get MOD REG R/M byte 5710 00003FFD 24F7 <1> and al, ~ (1 << 3) ; clear lowest bit of REG field (/3 to /2) 5711 00003FFF 3410 <1> xor al, 2 << 3 ; /3 or /2 to /0 5712 00004001 A838 <1> test al, 7 << 3 5713 00004003 7403E9B700 <1> jnz pp12 ; if not FF/2 or FF/3 --> 5714 00004008 3CC0 <1> cmp al, 0C0h ; mod = 3 ? 5715 0000400A 7340 <1> jae .adjust0 ; if just a register --> 5716 0000400C F6C601 <1> test dh, 1 5717 0000400F 750E <1> jnz .a32 ; if 32-bit addressing --> 5718 00004011 3C06 <1> cmp al, 6 ; mod = 0 r/m = 6 would encode bp ? 5719 00004013 7433 <1> je .adjust2 ; if just plain disp16 --> 5720 00004015 3C40 <1> cmp al, 40h 5721 00004017 7233 <1> jb .adjust0 ; if indirect register --> 5722 00004019 3C80 <1> cmp al, 80h 5723 0000401B 722D <1> jb .adjust1 ; if disp8[reg(s)] 5724 0000401D EB29 <1> jmp short .adjust2 ; it's disp16[reg(s)] 5725 <1> 5726 <1> ; Handle 32-bit addressing (A32 ModR/M referencing memory) 5727 <1> .a32: 5728 0000401F 3C05 <1> cmp al, 5 ; mod = 0 and r/m = 5 (would encode ebp) ? 5729 00004021 7421 <1> je .adjust4 ; if just plain disp32 --> 5730 00004023 3404 <1> xor al, 4 ; 4 to 0 (r/m 4 would encode esp) 5731 00004025 A807 <1> test al, 7 ; 0 if r/m would encode esp 5732 00004027 7513 <1> jnz .a32_nosib ; if no SIB byte --> 5733 00004029 86C4 <1> xchg al, ah 5734 0000402B E8B403 <1> call pp16 5735 0000402E 86C4 <1> xchg al, ah ; load and skip the SIB byte 5736 <1> ; The SIB byte is only used here to detect the 5737 <1> ; special case encoding of disp32 with mod=0 5738 <1> ; and base=5. index=4 is also special but it 5739 <1> ; does not alter the size of the displacement 5740 <1> ; that we have to skip. 5741 00004030 A8C0 <1> test al, 0C0h ; is it mod = 0 ? 5742 00004032 7508 <1> jnz @F ; no, not a special case --> 5743 00004034 80E407 <1> and ah, 7 5744 00004037 80FC05 <1> cmp ah, 5 ; is it base = 5 ? 5745 0000403A 7408 <1> je .adjust4 ; yes, special case encoding of disp32 --> 5746 <1> @@: 5747 <1> .a32_nosib: 5748 0000403C 3C40 <1> cmp al, 40h 5749 0000403E 720C <1> jb .adjust0 ; if indirect register --> 5750 00004040 3C80 <1> cmp al, 80h 5751 00004042 7206 <1> jb .adjust1 ; if disp8[reg(s)] --> 5752 <1> ; otherwise, it's disp32[reg(s)] 5753 <1> .adjust4: 5754 00004044 66 <1> _386_PM_o32 ; inc esi 5755 00004045 46 <1> inc si ; skip an instruction byte 5756 00004046 66 <1> _386_PM_o32 ; inc esi 5757 00004047 46 <1> inc si ; skip an instruction byte 5758 <1> .adjust2: 5759 00004048 66 <1> _386_PM_o32 ; inc esi 5760 00004049 46 <1> inc si ; skip an instruction byte 5761 <1> .adjust1: 5762 0000404A 66 <1> _386_PM_o32 ; inc esi 5763 0000404B 46 <1> inc si ; skip an instruction byte 5764 <1> .adjust0: 5765 <1> 5766 <1> pp10: 5767 0000404C 66 <1> _386_PM_o32 5768 0000404D 56 <1> push si 5769 <1> 5770 0000404E 803E[CD00]E8 <1> cmp byte [pp_instruction], 0E8h 5771 00004053 7552 <1> jne .done 5772 <1> 5773 00004055 66 <1> _386_PM_o32 5774 00004056 8B36[D000] <1> mov si, word [pp_operand] 5775 <1> 5776 0000405A 6631C0 <1> _386_PM xor eax, eax 5777 0000405D E88203 <1> call pp16 5778 00004060 86C4 <1> xchg al, ah 5779 00004062 E87D03 <1> call pp16 5780 00004065 86C4 <1> xchg al, ah 5781 00004067 EB05 <1> _386_PM jmp @F 5782 00004069 F6C602 <1> test dh, 2 5783 0000406C 7539 <1> jnz .notcallrel16 5784 <1> @@: 5785 0000406E F6C602 <1> _386_PM test dh, 2 5786 00004071 7412 <1> _386_PM jz @F 5787 <1> 5788 00004073 66C1C010 <1> _386_PM rol eax, 16 5789 00004077 E86803 <1> _386_PM call pp16 5790 0000407A 86C4 <1> _386_PM xchg al, ah 5791 0000407C E86303 <1> _386_PM call pp16 5792 0000407F 86C4 <1> _386_PM xchg al, ah 5793 00004081 66C1C010 <1> _386_PM rol eax, 16 5794 <1> @@: 5795 00004085 66 <1> _386_PM_o32 5796 00004086 01C6 <1> add si, ax 5797 00004088 B20F <1> mov dl, 15 ; number of bytes to go 5798 <1> .loop: 5799 0000408A E85503 <1> call pp16 5800 0000408D 3CCB <1> cmp al, 0CBh ; retf ? 5801 0000408F 7417 <1> je .trace 5802 00004091 3CCA <1> cmp al, 0CAh ; retf imm16 ? 5803 00004093 7413 <1> je .trace 5804 00004095 3CCF <1> cmp al, 0CFh ; iret ? 5805 00004097 740F <1> je .trace 5806 00004099 BF[F010] <1> mov di, ppbytes 5807 0000409C B90B00 <1> mov cx, PPLEN_ONLY_PREFIXES 5808 0000409F F2AE <1> repne scasb 5809 000040A1 7504 <1> jne .done 5810 <1> ; if one of the prefixes 5811 000040A3 FECA <1> dec dl 5812 000040A5 75E3 <1> jnz .loop ; if not out of bytes --> 5813 <1> 5814 <1> ; fall through: do not trace 5815 <1> .notcallrel16: 5816 <1> .done: 5817 000040A7 A8 <1> db __TEST_IMM8 ; (skip stc, NC) 5818 <1> .trace: 5819 000040A8 F9 <1> stc ; trace 5820 000040A9 66 <1> _386_PM_o32 5821 000040AA 5E <1> pop si 5822 <1> 5823 000040AB 7212 <1> jc pp12 ; trace --> 5824 <1> ; jmp pp11 ; we have a skippable instruction here 5825 <1> pp11: 5826 000040AD E88F1E <1> _386_PM call test_d_b_bit 5827 000040B0 7504 <1> _386_PM jnz .32 ; full 32-bit offset valid --> 5828 000040B2 660FB7F6 <1> _386_PM movzx esi, si ; clear high word here 5829 <1> .32: 5830 <1> @@: 5831 000040B6 E89302 <1> call proceedbreakpoint ; run until the breakpoint is hit 5832 000040B9 7256 <1> jc pp15 ; unexpected --> 5833 <1> %if _BREAKPOINTS 5834 000040BB 7510 <1> jnz pp12.bb_hit 5835 <1> %endif 5836 000040BD EB2C <1> jmp short pp13 5837 <1> 5838 <1> pp12: 5839 000040BF F606[A000]80 <1> testopt [internalflags2], dif2_tpg_keep_proceed_bp 5840 000040C4 75F0 <1> jnz @B 5841 <1> 5842 000040C6 E818FD <1> call traceone 5843 000040C9 7246 <1> jc pp15 5844 <1> ; jc unexpectedinterrupt 5845 <1> 5846 <1> %if _BREAKPOINTS 5847 000040CB 7416 <1> jz @F 5848 <1> 5849 <1> .bb_hit: 5850 000040CD E879FB <1> call handle_bb_hit_pass_match 5851 000040D0 7204 <1> jc .actual_hit 5852 <1> d5 call d5message 5853 <1> d5 asciz "in pp12.bb_hit after non-hit",13,10 5854 000040D2 7420 <1> jz pp13.nodump 5855 000040D4 EB15 <1> jmp pp13 5856 <1> 5857 <1> 5858 <1> .actual_hit: 5859 <1> %if _PM 5860 000040D6 E8FBF8 <1> call resetmode 5861 <1> %endif 5862 000040D9 E8CCF2 <1> call put_deferred_message_silent 5863 000040DC E87200 <1> call dumpregs_extended_silent 5864 000040DF 59 <1> pop cx 5865 000040E0 5B <1> pop bx ; (discard counter) 5866 000040E1 EB24 <1> jmp @FF 5867 <1> 5868 <1> @@: 5869 <1> %endif 5870 <1> 5871 <1> ; We could check here for the correct address too, but that 5872 <1> ; would require disassembling the instruction and correctly so. 5873 <1> ; (Disassembling it incorrectly would only result in spurious 5874 <1> ; "Unexpected single-step interrupt" messages aborting multi- 5875 <1> ; traces though, so it won't be fatal.) 5876 <1> ; Wouldn't really be useful though: Only the "int1" or "int 01h" 5877 <1> ; instructions should cause this, and their operation means we 5878 <1> ; might as well behave as if the breakpoint was expected. 5879 000040E3 813E[E40B][7D7C] <1> cmp word [run_int], int1msg 5880 000040E9 7526 <1> jne pp15 ; if some other interrupt (unexpected) --> 5881 <1> 5882 <1> pp13: 5883 <1> %if _PM 5884 000040EB E8E6F8 <1> call resetmode 5885 <1> %endif 5886 <1> ; An expected breakpoint. Dump registers, then loop. 5887 000040EE E8B7F2 <1> call put_deferred_message_silent 5888 000040F1 E85D00 <1> call dumpregs_extended_silent 5889 <1> 5890 <1> .nodump: 5891 000040F4 E8F1FA <1> call tt_handle_while 5892 000040F7 59 <1> pop cx 5893 000040F8 5B <1> pop bx 5894 <1> 5895 000040F9 83E901 <1> sub cx, 1 5896 000040FC 83DB00 <1> sbb bx, 0 5897 <1> 5898 000040FF 85DB <1> test bx, bx 5899 00004101 750B <1> jnz pp14 5900 00004103 85C9 <1> test cx, cx 5901 00004105 7507 <1> jnz pp14 ; back for more --> 5902 <1> 5903 <1> @@: 5904 <1> %if _PM 5905 00004107 E8CAF8 <1> call resetmode 5906 <1> %endif 5907 0000410A E8667E <1> call silence_dump 5908 <1> 5909 0000410D C3 <1> retn 5910 <1> 5911 <1> %if ($ - pp1 - 1) < 128 5912 <1> pp14: equ pp1 5913 <1> %else 5914 0000410E E98BFE <1> pp14: jmp pp1 5915 <1> %endif 5916 <1> 5917 <1> pp15: 5918 00004111 E994FC <1> jmp unexpectedinterrupt ; print message about unexpected interrupt 5919 <1> ; and quit 5920 <1> 5921 <1> 5922 <1> terminate_silent_dump.if_nonnull: 5923 00004114 F606[9F00]10 <1> testopt [internalflags], tt_silent_mode 5924 00004119 7435 <1> jz terminate_silent_dump.ret 5925 0000411B 06 <1> push es 5926 0000411C 57 <1> push di 5927 0000411D 50 <1> push ax 5928 0000411E 8E06[FA09] <1> mov es, word [auxbuff_segorsel] 5929 00004122 8B3E[020A] <1> mov di, word [auxbuff_behind_last_silent] 5930 00004126 3B3E[000A] <1> cmp di, word [auxbuff_behind_while_condition] 5931 0000412A 7421 <1> je terminate_silent_dump.done 5932 0000412C 4F <1> dec di 5933 0000412D B000 <1> mov al, 0 5934 0000412F AE <1> scasb 5935 00004130 741B <1> je terminate_silent_dump.done 5936 00004132 EB14 <1> jmp @F 5937 <1> 5938 <1> terminate_silent_dump: 5939 00004134 F606[9F00]10 <1> testopt [internalflags], tt_silent_mode 5940 00004139 7415 <1> jz .ret 5941 <1> .is_silent: 5942 0000413B 06 <1> push es 5943 0000413C 57 <1> push di 5944 0000413D 50 <1> push ax 5945 0000413E 8E06[FA09] <1> mov es, word [auxbuff_segorsel] 5946 00004142 8B3E[020A] <1> mov di, word [auxbuff_behind_last_silent] 5947 00004146 B000 <1> mov al, 0 5948 <1> @@: 5949 00004148 AA <1> stosb 5950 00004149 FF06[020A] <1> inc word [auxbuff_behind_last_silent] 5951 <1> ; -> point past the NUL 5952 <1> .done: 5953 0000414D 58 <1> pop ax 5954 0000414E 5F <1> pop di 5955 0000414F 07 <1> pop es 5956 <1> .ret: 5957 00004150 C3 <1> retn 5958 <1> 5959 <1> 5960 <1> dumpregs_extended_silent: 5961 <1> %if _PM 5962 00004151 E880F8 <1> call resetmode 5963 <1> %endif 5964 00004154 F606[9F00]10 <1> testopt [internalflags], tt_silent_mode 5965 00004159 7405 <1> jz @F 5966 0000415B 800E[9F00]20 <1> setopt [internalflags], tt_silence 5967 <1> ; Call dumpregs (trimputs, puts, putsline, disasm) with 5968 <1> ; "silence" flag (writes to auxbuff instead of terminal). 5969 <1> @@: 5970 00004160 E831E6 <1> call dumpregs_extended 5971 00004163 F606[9F00]10 <1> testopt [internalflags], tt_silent_mode 5972 00004168 7408 <1> jz @F 5973 <1> ; Terminate the last dump's output with a NUL byte. 5974 0000416A E8CEFF <1> call terminate_silent_dump.is_silent 5975 0000416D 8026[9F00]DF <1> clropt [internalflags], tt_silence 5976 <1> @@: 5977 <1> 5978 <1> handle_serial_flags_ctrl_c: 5979 00004172 1E <1> push ds 5980 00004173 50 <1> push ax 5981 00004174 16 <1> push ss 5982 00004175 1F <1> pop ds 5983 00004176 F606[8700]40 <1> testopt [options3], opt3_check_ctrlc_0bh 5984 0000417B 740A <1> jz @FF 5985 <1> ; The following DOS call originated in sleepcmd. 5986 <1> ; However, it is useful for all callers of this 5987 <1> ; function so put it here. 5988 0000417D E89967 <1> call InDos 5989 00004180 7505 <1> jnz @F 5990 00004182 B40B <1> mov ah, 0Bh 5991 <1> doscall ; allow to break with Ctrl-C 2160 00004184 E8EB1D <2> call _doscall 5992 <1> @@: 5993 <1> @@: 5994 00004187 F606[F70B]02 <1> testopt [serial_flags], sf_ctrl_c 5995 0000418C 755B <1> jnz handle_ctrl_c 5996 0000418E F606[7D00]40 <1> testopt [options], enable_serial 5997 00004193 7551 <1> jnz .ret 5998 00004195 E88167 <1> call InDos 5999 00004198 744C <1> jz .ret 6000 0000419A F606[8700]20 <1> testopt [options3], opt3_check_ctrlc_keyb 6001 0000419F 7445 <1> jz .ret 6002 <1> 6003 <1> .check_rombios_buffer: 6004 000041A1 53 <1> push bx 6005 000041A2 52 <1> push dx 6006 000041A3 B84000 <1> mov ax, 40h ; dual mode segment/selector 6007 000041A6 50 <1> push ax 6008 000041A7 A1[060C] <1> mov ax, word [io_end_buffer] 6009 000041AA 8B16[040C] <1> mov dx, word [io_start_buffer] 6010 000041AE 1F <1> pop ds 6011 000041AF 85C0 <1> test ax, ax 6012 000041B1 7503 <1> jnz @F 6013 000041B3 A18200 <1> mov ax, word [82h] ; end of circular keypress buffer 6014 <1> @@: 6015 000041B6 85D2 <1> test dx, dx 6016 000041B8 7504 <1> jnz @F 6017 000041BA 8B168000 <1> mov dx, word [80h] ; start of circular buffer 6018 <1> @@: 6019 000041BE 89C3 <1> mov bx, ax 6020 000041C0 29D3 <1> sub bx, dx ; cmp end, start 6021 000041C2 7620 <1> jbe .ret_dx_bx ; invalid --> 6022 000041C4 F6C301 <1> test bl, 1 ; even amount of bytes ? 6023 000041C7 751B <1> jnz .ret_dx_bx ; invalid --> 6024 000041C9 8B1E1A00 <1> mov bx, word [1Ah] ; current head of circular buffer 6025 <1> .loop: 6026 000041CD 3B1E1C00 <1> cmp bx, word [1Ch] ; equal to current tail ? 6027 000041D1 7411 <1> je .ret_dx_bx ; yes, all entries checked --> 6028 000041D3 803F03 <1> cmp byte [bx], 3 ; is it Ctrl-C ? 6029 000041D6 7411 <1> je handle_ctrl_c ; yes, handle --> 6030 000041D8 43 <1> inc bx 6031 000041D9 43 <1> inc bx ; -> next entry 6032 000041DA 39C3 <1> cmp bx, ax ; at end of buffer ? 6033 000041DC 72EF <1> jb .loop ; no, loop --> 6034 000041DE 7704 <1> ja .ret_dx_bx ; invalid --> 6035 000041E0 89D3 <1> mov bx, dx ; reset to start of buffer 6036 000041E2 EBE9 <1> jmp .loop ; then loop --> 6037 <1> 6038 <1> .ret_dx_bx: 6039 000041E4 5A <1> pop dx 6040 000041E5 5B <1> pop bx 6041 <1> 6042 <1> .ret: 6043 000041E6 58 <1> pop ax 6044 000041E7 1F <1> pop ds 6045 000041E8 C3 <1> retn 6046 <1> 6047 <1> 6048 <1> handle_ctrl_c: 6049 000041E9 16 <1> push ss 6050 000041EA 1F <1> pop ds 6051 000041EB 16 <1> push ss 6052 000041EC 07 <1> pop es 6053 000041ED 8026[F70B]F9 <1> clropt [serial_flags], sf_ctrl_c | sf_double_ctrl_c 6054 <1> %if _PM 6055 000041F2 E8DFF7 <1> call resetmode 6056 <1> %endif 6057 000041F5 E81CFF <1> call terminate_silent_dump.if_nonnull 6058 000041F8 E8787D <1> call silence_dump 6059 000041FB BA[C35D] <1> mov dx, msg.ctrlc 6060 000041FE E8327E <1> call putsz 6061 <1> 6062 00004201 800E[A400]10 <1> setopt [internalflags3], dif3_input_terminal_override 6063 <1> ; make sure we drain terminal input 6064 <1> @@: 6065 00004206 E87B80 <1> call getc_if_any ; drain the buffer 6066 00004209 75FB <1> jnz @B ; if any was available --> 6067 <1> 6068 0000420B 8026[A400]EF <1> clropt [internalflags3], dif3_input_terminal_override 6069 00004210 E9F6C1 <1> jmp cmd2_reset_re 6070 <1> 6071 <1> 6072 <1> ; INP: bp [tpg_proceed_bp], 6073 <1> ; linear address and point content to write 6074 <1> ; opt [internalflags2] & dif2_tpg_proceed_bp_set 6075 <1> ; set if a breakpoint was written 6076 <1> ; OUT: CY if error, 6077 <1> ; bp [tpg_proceed_bp] = has point content to restore 6078 <1> ; ah = reason = 0 = no error (never), 6079 <1> ; 1 = couldn't write, 6080 <1> ; 2 = unreachable, 6081 <1> ; 3 = overwritten, al = new byte value 6082 <1> ; NC if no error, 6083 <1> ; ah = 0 6084 <1> ; opt [internalflags2] & dif2_tpg_proceed_bp_set 6085 <1> ; cleared 6086 <1> ; CHG: di, (e)dx, ax, bx 6087 <1> ; STT: might switch modes due to getsegmented call 6088 <1> proceed_writepoint_restore: 6089 00004213 B400 <1> mov ah, 0 6090 00004215 F606[A000]40 <1> testopt [internalflags2], dif2_tpg_proceed_bp_set 6091 0000421A 745F <1> jz proceed_wp.retn ; (NC) 6092 0000421C BF0100 <1> mov di, 1 6093 0000421F EB05 <1> jmp proceed_wp 6094 <1> 6095 <1> ; INP: bp [tpg_proceed_bp], 6096 <1> ; linear address and point content to write (0CCh) 6097 <1> ; OUT: CY if error, 6098 <1> ; bp [tpg_proceed_bp] = has point content 0CCh 6099 <1> ; ah = reason = 0 = no error (never), 6100 <1> ; 1 = couldn't write, 6101 <1> ; 2 = unreachable, 6102 <1> ; 3 = overwritten (never) 6103 <1> ; NC if no error (either flag not set or point restored), 6104 <1> ; ah = 0 6105 <1> ; opt [internalflags2] & dif2_tpg_proceed_bp_set 6106 <1> ; set 6107 <1> ; CHG: di, (e)dx, ax, bx 6108 <1> ; STT: might switch modes due to getsegmented call 6109 <1> proceed_writepoint: 6110 <1> %if _DELAY_BEFORE_BP 6111 00004221 E8B6F3 <1> call delay_before_bp 6112 <1> %endif 6113 00004224 31FF <1> xor di, di 6114 <1> proceed_wp: 6115 <1> lframe near 6116 00004226 5589E5 <1> lenter 6117 00004229 83F701 <1> xor di, 1 6118 <1> lvar word, is_write 6119 0000422C 57 <1> push di 6120 <1> 6121 0000422D A1[C400] <1> mov ax, word [tpg_proceed_bp] 6122 <1> %if _PM 6123 00004230 8B16[C600] <1> mov dx, word [tpg_proceed_bp + 2] 6124 <1> %else 6125 <1> xor dx, dx 6126 <1> mov dl, byte [tpg_proceed_bp + 2] 6127 <1> %endif 6128 00004234 E8C2F7 <1> call getsegmented 6129 00004237 A0[CC00] <1> mov al, byte [tpg_proceed_bp + BPSIZE - 1] 6130 <1> ; al = byte to restore 6131 0000423A B402 <1> mov ah, 2 ; error reason: unreachable 6132 0000423C 723A <1> jc .return 6133 <1> 6134 0000423E F646FE01 <1> test byte [bp + ?is_write], 1 6135 <1> ; (NC) is it writing ? 6136 00004242 7518 <1> jnz .write 6137 <1> .restore: 6138 00004244 50 <1> push ax 6139 00004245 E84A59 <1> call readmem ; read current byte 6140 00004248 3CCC <1> cmp al, 0CCh ; is this still what we wrote? 6141 0000424A B403 <1> mov ah, 3 ; error reason: overwritten, al = new value 6142 0000424C F9 <1> stc 6143 0000424D 7529 <1> jne .return_discard ; nope --> (CY) 6144 0000424F 58 <1> pop ax 6145 00004250 E81259 <1> call writemem ; return the byte to its original value 6146 00004253 720D <1> jc .next ; failed --> (CY, handled there) 6147 00004255 C606[CC00]CC <1> mov byte [tpg_proceed_bp + BPSIZE - 1], 0CCh 6148 <1> ; reset stored point 6149 0000425A EB06 <1> jmp short .next 6150 <1> 6151 <1> .write: 6152 0000425C E80659 <1> call writemem 6153 0000425F A2[CC00] <1> mov byte [tpg_proceed_bp + BPSIZE - 1], al 6154 <1> ; save the previous byte there 6155 <1> .next: 6156 00004262 B401 <1> mov ah, 1 ; (in case of error) error reason: cannot write 6157 00004264 7212 <1> jc .return ; failed to write --> (CY) 6158 00004266 B400 <1> mov ah, 0 ; (no error) 6159 <1> 6160 00004268 800E[A000]40 <1> setopt [internalflags2], dif2_tpg_proceed_bp_set 6161 <1> ; set flag in case of successful writing 6162 0000426D F646FE01 <1> test byte [bp + ?is_write], 1 6163 <1> ; (NC) is it writing ? 6164 00004271 7505 <1> jnz .return ; yes, leave flag set --> 6165 00004273 8026[A000]BF <1> clropt [internalflags2], dif2_tpg_proceed_bp_set 6166 <1> ; (NC) clear flag in case of successful restoring 6167 <1> .return: 6168 <1> .return_discard: 6169 00004278 89EC5D <1> lleave 6170 <1> .retn: 6171 0000427B C3 <1> retn 6172 <1> 6173 <1> 6174 <1> ; INP: ah & 7Fh = status = 0 = no error, 6175 <1> ; 1 = couldn't write, 6176 <1> ; 2 = unreachable, 6177 <1> ; 3 = overwritten, al = new value 6178 <1> ; ah & 80h = set if error restoring point, 6179 <1> ; else error writing point 6180 <1> ; bh & 80h = set if gg breakpoint, 6181 <1> ; cx = index (0-based) 6182 <1> ; bh & 40h = set if bb breakpoint, 6183 <1> ; cx = index (0-based) 6184 <1> ; bh & C0h = clear if proceed breakpoint 6185 <1> ; bl = what we tried to restore, only set if ah & 80h set 6186 <1> ; dword [ss:sp] = linear address (24 bit if non-_PM) 6187 <1> ; CHG: ax, bx, cx, dx, di 6188 <1> ; STT: ds = es = ss = debugger data selector 6189 <1> display_breakpoint_failure: 6190 <1> %if _PM 6191 0000427C E855F7 <1> call resetmode 6192 <1> %endif 6193 <1> 6194 0000427F 50 <1> push ax 6195 00004280 53 <1> push bx 6196 00004281 51 <1> push cx 6197 00004282 56 <1> push si 6198 00004283 E8ED7C <1> call silence_dump ; do away with silent mode 6199 00004286 5E <1> pop si 6200 00004287 59 <1> pop cx 6201 00004288 5B <1> pop bx 6202 00004289 58 <1> pop ax 6203 <1> 6204 0000428A 800E[A100]08 <1> setopt [internalflags2], dif2_bp_failure 6205 <1> 6206 <1> lframe near 6207 <1> lpar dword, linear 6208 0000428F 5589E5 <1> lenter 6209 <1> lvar word, input_ax 6210 00004292 50 <1> push ax 6211 <1> 6212 00004293 BA[D270] <1> mov dx, msg.cant_bp_the 6213 00004296 E89A7D <1> call putsz 6214 00004299 F6C780 <1> test bh, 80h 6215 0000429C 740B <1> jz @F 6216 <1> 6217 0000429E 89C8 <1> mov ax, cx 6218 000042A0 40 <1> inc ax ; make it 1-based 6219 000042A1 E864F5 <1> call putordinalbyte 6220 <1> 6221 000042A4 BA[0271] <1> mov dx, msg.cant_bp_type_gg 6222 000042A7 EB15 <1> jmp .got_type 6223 <1> 6224 <1> @@: 6225 000042A9 F6C740 <1> test bh, 40h 6226 000042AC 740D <1> jz @F 6227 <1> 6228 000042AE 89C8 <1> mov ax, cx 6229 000042B0 BF[FF70] <1> mov di, msg.cant_bp_type_permanent.index 6230 000042B3 E8CD79 <1> call hexbyte ; (0-based index) 6231 <1> 6232 000042B6 BA[EA70] <1> mov dx, msg.cant_bp_type_permanent 6233 000042B9 EB03 <1> jmp .got_type 6234 <1> 6235 <1> @@: 6236 000042BB BA[D770] <1> mov dx, msg.cant_bp_type_proceed 6237 <1> 6238 <1> .got_type: 6239 000042BE E8727D <1> call putsz 6240 <1> 6241 000042C1 BF[1971] <1> mov di, msg.cant_bp_linear.address1 6242 000042C4 8B4606 <1> mov ax, word [bp + ?linear + 2] 6243 <1> %ifn _PM 6244 <1> mov ah, 0 6245 <1> %endif 6246 000042C7 E8B279 <1> call hexword 6247 000042CA 47 <1> inc di 6248 <1> ; mov di, msg.cant_bp_linear.address2 6249 000042CB 8B4604 <1> mov ax, word [bp + ?linear] 6250 000042CE E8AB79 <1> call hexword 6251 <1> 6252 000042D1 BA[1071] <1> mov dx, msg.cant_bp_linear 6253 000042D4 E85C7D <1> call putsz 6254 <1> 6255 000042D7 BF[4E71] <1> mov di, msg.cant_bp_restore.value 6256 000042DA 89D8 <1> mov ax, bx 6257 000042DC E8A479 <1> call hexbyte 6258 <1> 6259 000042DF BA[2571] <1> mov dx, msg.cant_bp_write 6260 000042E2 8B46FE <1> mov ax, word [bp + ?input_ax] 6261 000042E5 F6C480 <1> test ah, 80h 6262 000042E8 7406 <1> jz @F 6263 000042EA 80E47F <1> and ah, ~80h 6264 000042ED BA[3871] <1> mov dx, msg.cant_bp_restore 6265 <1> @@: 6266 000042F0 E8407D <1> call putsz 6267 <1> 6268 000042F3 BF[C971] <1> mov di, msg.cant_bp_reason3.value 6269 000042F6 E88A79 <1> call hexbyte 6270 <1> 6271 000042F9 BA[5271] <1> mov dx, msg.cant_bp_reason 6272 000042FC E8347D <1> call putsz 6273 <1> 6274 000042FF BA[5E71] <1> mov dx, msg.cant_bp_reason0 6275 00004302 80FC01 <1> cmp ah, 1 6276 00004305 7215 <1> jb @F 6277 00004307 BA[8471] <1> mov dx, msg.cant_bp_reason1 6278 0000430A 7410 <1> je @F 6279 0000430C BA[9771] <1> mov dx, msg.cant_bp_reason2 6280 0000430F 80FC03 <1> cmp ah, 3 6281 00004312 7208 <1> jb @F 6282 00004314 BA[AC71] <1> mov dx, msg.cant_bp_reason3 6283 00004317 7403 <1> je @F 6284 00004319 BA[CF71] <1> mov dx, msg.cant_bp_reasonu 6285 <1> @@: 6286 0000431C E8147D <1> call putsz 6287 <1> 6288 0000431F 89EC5D <1> lleave 6289 00004322 C20400 <1> lret 6290 <1> 6291 <1> 6292 <1> %if _PM 6293 <1> isdpmientry: 6294 00004325 F606[A800]02 <1> testopt [internalflags4], dif4_int_2F_hooked 6295 0000432A 7407 <1> jz @F 6296 0000432C F606[9D00]02 <1> testopt [internalflags], nohook2F 6297 00004331 740A <1> jz .stdhook 6298 <1> @@: 6299 00004333 C706[A80C][A68B] <1> mov word [reg_eip], mydpmientry 6300 00004339 8C1E[9C0C] <1> mov word [reg_cs], ds ; if Int2F not hooked, point to the hook here 6301 <1> ; ds => lDEBUG_DATA_ENTRY 6302 <1> .stdhook: 6303 <1> ; Run code until it returned far. 6304 0000433D 8B1E[800C] <1> mov bx, word [reg_esp] 6305 00004341 1E <1> push ds 6306 00004342 8E1E[980C] <1> mov ds, word [reg_ss] ; ds:bx-> (16-bit) stack 6307 00004346 8B37 <1> mov si, word [bx+0] 6308 00004348 8B5F02 <1> mov bx, word [bx+2] ; get (16-bit) far return address 6309 0000434B 1F <1> pop ds 6310 <1> %endif 6311 <1> ; Proceed over an instruction 6312 <1> ; INP: bx:(e)si-> where to write the breakpoint 6313 <1> ; OUT: NC if the breakpoint was hit, 6314 <1> ; ah = 0 6315 <1> ; ch = 0 6316 <1> ; d[reg_eip] adjusted 6317 <1> ; cx & 8 set if proceed point hit 6318 <1> ; (ZF only set if _BREAKPOINTS) 6319 <1> ; ZR if breakpoint after instruction was hit, 6320 <1> ; cx & 7 = 0 6321 <1> ; NZ if another breakpoint (bb) was hit (or both), 6322 <1> ; cx & 1 set if non-pass match (actual hit), 6323 <1> ; else cx & 2 set if pass match (consider as hit first, 6324 <1> ; but dump registers next (not to silent buffer) 6325 <1> ; and then continue execution) 6326 <1> ; else cx & 4 always set, indicates any match 6327 <1> ; (including matches that should merely continue) 6328 <1> ; all pass points' counters stepped 6329 <1> ; CY if the breakpoint was not hit, 6330 <1> ; cx = 0 6331 <1> ; If [internalflags2] & dif2_gg_is_gg is set: 6332 <1> ; ah & 7Fh = status = 0 = no error, 6333 <1> ; 1 = couldn't write, 6334 <1> ; 2 = unreachable, 6335 <1> ; 3 = overwritten, al = new value 6336 <1> ; ah & 80h = set if error restoring point, 6337 <1> ; else error writing point to begin with 6338 <1> ; If that flag is clear: 6339 <1> ; Does not return if a breakpoint cannot be written 6340 <1> ; or cannot be restored, jumps to cmd3 instead. 6341 <1> ; CHG: all 6342 <1> ; STT: ds = es = ss 6343 <1> ; might return modeswitched (if dif2_gg_is_gg) 6344 <1> ; might be called while modeswitched 6345 <1> proceedbreakpoint: 6346 0000434C F606[A000]80 <1> testopt [internalflags2], dif2_tpg_keep_proceed_bp 6347 00004351 750D <1> jnz @F 6348 <1> 6349 00004353 66 <1> _386_PM_o32 ; mov edx, esi 6350 00004354 89F2 <1> mov dx, si ; bx:(e)dx = segmented 6351 00004356 E862F5 <1> call getlinear ; dx:ax = linear 6352 <1> 6353 00004359 A3[C400] <1> mov word [tpg_proceed_bp], ax 6354 <1> ; The following two instructions must be in this order. 6355 <1> ; For the non-_PM build, writing to the second word 6356 <1> ; of the breakpoint also writes to the content byte. 6357 0000435C 8916[C600] <1> mov word [tpg_proceed_bp + 2], dx 6358 <1> ; store in point 6359 <1> @@: 6360 00004360 C606[CC00]CC <1> mov byte [tpg_proceed_bp + BPSIZE - 1], 0CCh 6361 <1> ; initialise content 6362 00004365 E8B9FE <1> call proceed_writepoint 6363 <1> ; This call might return modeswitched. 6364 00004368 7308 <1> jnc @F 6365 <1> 6366 0000436A 80E47F <1> and ah, ~80h ; mark error during writing 6367 <1> 6368 0000436D 31C9 <1> xor cx, cx ; cx = 0 in case of branching 6369 0000436F 51 <1> push cx ; put the zero on the stack 6370 <1> 6371 00004370 EB0E <1> jmp .failure 6372 <1> 6373 <1> @@: 6374 <1> ; The run functions call resetmode. 6375 <1> %if _BREAKPOINTS 6376 00004372 E87900 <1> call run_with_bb 6377 00004375 89C8 <1> mov ax, cx 6378 <1> %else 6379 <1> call run 6380 <1> xor ax, ax 6381 <1> %endif 6382 00004377 50 <1> push ax 6383 <1> 6384 <1> ; It's important to keep the linear address saved inbetween, 6385 <1> ; even though we save by value (as opposed to DEBUG/X G's saving 6386 <1> ; of the reference) because the selector that we used for the 6387 <1> ; access might now be invalid or (worse) point elsewhere, or 6388 <1> ; a mode change might have occured. (The latter is sometimes 6389 <1> ; handled by a specific kludge in DEBUG/X, but not always.) 6390 <1> 6391 00004378 E898FE <1> call proceed_writepoint_restore 6392 <1> ; This call might return modeswitched. 6393 0000437B 7329 <1> jnc @F 6394 <1> 6395 0000437D 80CC80 <1> or ah, 80h ; mark error during restoration 6396 <1> 6397 <1> .failure: 6398 <1> ; Here we may be modeswitched. 6399 00004380 F606[A000]08 <1> testopt [internalflags2], dif2_gg_is_gg 6400 <1> ; is it from gg ? 6401 00004385 7558 <1> jnz .return_CY_pop_cx ; (CY) yes, return to gg 6402 <1> ; This branch may be taken while modeswitched. 6403 <1> 6404 <1> %if _PM 6405 00004387 E84AF6 <1> call resetmode 6406 <1> %endif 6407 <1> 6408 0000438A E81BF0 <1> call put_deferred_message_silent 6409 <1> 6410 0000438D 50 <1> push ax 6411 0000438E E8E27B <1> call silence_dump 6412 00004391 58 <1> pop ax 6413 <1> 6414 00004392 FF36[C600] <1> push word [tpg_proceed_bp + 2] 6415 00004396 FF36[C400] <1> push word [tpg_proceed_bp] 6416 0000439A 8A1E[CC00] <1> mov bl, [tpg_proceed_bp + BPSIZE - 1] 6417 0000439E B700 <1> mov bh, 0 6418 000043A0 E8D9FE <1> call display_breakpoint_failure 6419 <1> ; This function calls resetmode. 6420 000043A3 E95ABC <1> jmp cmd3 6421 <1> 6422 <1> @@: 6423 000043A6 E8B1F5 <1> call get_cseip_of_possible_breakpoint 6424 <1> ; dx:ax = linear address 1 before cs:(e)ip 6425 000043A9 7232 <1> jc .return_CY_pop_cx_ax_zero 6426 <1> 6427 000043AB 59 <1> pop cx 6428 <1> %if _PM 6429 000043AC 3916[C600] <1> cmp word [tpg_proceed_bp + 2], dx 6430 <1> %else 6431 <1> test dh, dh ; (bits 24 to 31 set. shouldn't happen) 6432 <1> jnz .not_pp 6433 <1> cmp byte [tpg_proceed_bp + 2], dl 6434 <1> %endif 6435 000043B0 7511 <1> jne .not_pp 6436 000043B2 3906[C400] <1> cmp word [tpg_proceed_bp], ax 6437 000043B6 750B <1> jne .not_pp ; is unexpected (not behind the breakpoint) --> 6438 <1> 6439 <1> ; Need to check this here, because we have to 6440 <1> ; decrement (e)ip if the breakpoint was hit. 6441 000043B8 813E[E40B][A07C] <1> cmp word [run_int], int3msg 6442 000043BE 7503 <1> jne .not_pp ; is unexpected (not returned by interrupt 03h) --> 6443 000043C0 80C908 <1> or cl, 8 ; set flag: pp hit 6444 <1> 6445 <1> .not_pp: 6446 000043C3 B400 <1> mov ah, 0 ; set error to "no error" 6447 <1> 6448 000043C5 E319 <1> jcxz .return_CY ; bb hit/pass/nonpass or pp hit ? if no --> 6449 <1> 6450 000043C7 E800F0 <1> call adjust_cseip_after_breakpoint 6451 <1> ; decrement (e)ip to point at the instruction 6452 <1> 6453 000043CA F6C101 <1> test cl, 1 ; bb hit ? 6454 000043CD 750A <1> jnz .return ; yes, return (NC, NZ) --> 6455 <1> 6456 000043CF F6C108 <1> test cl, 8 ; proceed point matched ? 6457 000043D2 7506 <1> jnz @F ; yes --> 6458 <1> 6459 000043D4 800E[A000]80 <1> setopt [internalflags2], dif2_tpg_keep_proceed_bp 6460 <1> ; flag that we should keep this proceed point 6461 <1> ; (NC, NZ) 6462 <1> .return: 6463 000043D9 C3 <1> retn 6464 <1> 6465 <1> @@: 6466 <1> ; return with ax = 0, NC, ZR 6467 <1> ; 6468 <1> ; (hit proceed point, no hit bb (possibly pass/non-pass bb) 6469 000043DA 31C0 <1> xor ax, ax ; ah = 0 (NC, ZR) 6470 000043DC C3 <1> retn 6471 <1> 6472 <1> ; set ax = 0, pop cx, CY 6473 <1> .return_CY_pop_cx_ax_zero: 6474 000043DD 31C0 <1> xor ax, ax 6475 <1> 6476 <1> ; pop cx, CY (preserve ax) 6477 <1> .return_CY_pop_cx: 6478 000043DF 59 <1> pop cx 6479 <1> .return_CY: 6480 000043E0 F9 <1> stc 6481 000043E1 C3 <1> retn 6482 <1> 6483 <1> 6484 <1> ; PPX - Get next byte in instruction stream. 6485 <1> ; INP: bx:(e)si-> next byte 6486 <1> ; OUT: al = next byte 6487 <1> ; (e)si incremented 6488 <1> pp16: 6489 <1> %if _PM 6490 000043E2 E8571B <1> call resetmode_and_test_d_b_bit 6491 <1> %endif 6492 000043E5 1E <1> push ds 6493 000043E6 8EDB <1> mov ds, bx 6494 <1> %if _PM 6495 000043E8 7401 <1> jz .16 6496 000043EA 67 <1> a32 ; use esi for lodsb 6497 <1> .16: 6498 <1> %endif 6499 000043EB AC <1> lodsb 6500 000043EC 1F <1> pop ds 6501 000043ED C3 <1> retn 6502 <1> ; begin loop over instruction bytes. 6503 <1> 6504 <1> 6505 <1> %if _BREAKPOINTS 6506 <1> ; Run with bb breakpoints 6507 <1> ; 6508 <1> ; OUT: CY if another breakpoint (not a bb one) or trace hit, 6509 <1> ; cx = 0 6510 <1> ; NC if a bb breakpoint hit, 6511 <1> ; cx & 1 set if it is an actual hit 6512 <1> ; else cx & 2 set if it is a pass match, 6513 <1> ; else it is a non-pass non-match 6514 <1> ; (cx & 4 always set) 6515 <1> ; STT: might return modeswitched 6516 <1> run_with_bb: 6517 000043EE F606[A000]08 <1> testopt [internalflags2], dif2_gg_is_gg 6518 000043F3 750C <1> jnz .no_bb 6519 <1> 6520 000043F5 F606[9F00]C0 <1> testopt [internalflags], tt_no_bb | tt_no_bb_first 6521 000043FA 740C <1> jz @F 6522 <1> 6523 000043FC 8026[9F00]7F <1> clropt [internalflags], tt_no_bb_first 6524 <1> 6525 <1> .no_bb: 6526 00004401 E87400 <1> call run 6527 00004404 31C9 <1> xor cx, cx 6528 00004406 F9 <1> stc 6529 00004407 C3 <1> retn 6530 <1> 6531 <1> @@: 6532 <1> .gg5: 6533 <1> %if _BREAKPOINTS 6534 00004408 E8FFF1 <1> call bb_writepoints_init_reset 6535 <1> %endif 6536 <1> 6537 0000440B F606[A000]10 <1> testopt [internalflags2], dif2_gg_first_detected 6538 00004410 7436 <1> jz .only_run ; easy case, no cseip point detected --> 6539 <1> 6540 <1> 6541 <1> ; Enter special mode: Restore cseip breakpoint content. 6542 00004412 800E[A000]02 <1> setopt [internalflags2], dif2_gg_skip_non_cseip 6543 <1> 6544 00004417 83EC20 <1> sub sp, _NUM_B_BP * 2 6545 0000441A 89E5 <1> mov bp, sp ; -> error info 6546 <1> 6547 0000441C B91000 <1> mov cx, _NUM_B_BP ; = index above last one to restore 6548 0000441F E8B6F2 <1> call bb_restorepoints_and_init_error_info 6549 00004422 7317 <1> jnc @F ; no error ? --> 6550 <1> 6551 <1> ; Error in bb_restorepoints. Try to restore other bb. 6552 <1> 6553 <1> ; Exit special mode: Handle non-cseip breakpoints again. 6554 00004424 8026[A000]FD <1> clropt [internalflags2], dif2_gg_skip_non_cseip 6555 <1> 6556 <1> ; Enter special mode: Skip cseip breakpoints. 6557 00004429 800E[A000]04 <1> setopt [internalflags2], dif2_gg_skip_cseip 6558 <1> 6559 <1> ; As we already tried to restore all cseip bb points, 6560 <1> ; here we skip these in the bb_restorepoints call. 6561 0000442E B91000 <1> mov cx, _NUM_B_BP 6562 00004431 E8A7F2 <1> call bb_restorepoints 6563 <1> 6564 <1> ; Exit special mode: No longer skip cseip breakpoints. 6565 00004434 8026[A000]FB <1> clropt [internalflags2], dif2_gg_skip_cseip 6566 <1> 6567 <1> ; The failure that led us here is already noted in the info. 6568 00004439 EB1D <1> jmp .bb_exit 6569 <1> 6570 <1> 6571 <1> @@: 6572 <1> ; Success! Now discard the reserved error info. 6573 0000443B 83C420 <1> add sp, _NUM_B_BP * 2 6574 <1> 6575 <1> ; Exit special mode, do not skip non-cseip breakpoints anymore. 6576 0000443E 8026[A000]FD <1> clropt [internalflags2], dif2_gg_skip_non_cseip 6577 <1> 6578 <1> ; Enter special mode: Skip matching/restoring cseip breakpoint. 6579 00004443 800E[A000]04 <1> setopt [internalflags2], dif2_gg_skip_cseip 6580 <1> 6581 <1> .only_run: 6582 00004448 E82D00 <1> call run 6583 <1> .after_run: 6584 <1> 6585 <1> %if _BREAKPOINTS 6586 0000444B 83EC20 <1> sub sp, _NUM_B_BP * 2 6587 0000444E 89E5 <1> mov bp, sp 6588 <1> 6589 00004450 B91000 <1> mov cx, _NUM_B_BP ; = index above last one to restore 6590 00004453 E882F2 <1> call bb_restorepoints_and_init_error_info 6591 00004456 7308 <1> jnc @F 6592 <1> 6593 <1> .bb_exit: 6594 00004458 B8FFFF <1> mov ax, -1 6595 0000445B 50 <1> push ax ; (unused: ax error info) 6596 0000445C 50 <1> push ax ; cx error point index, -1 = invalid 6597 <1> 6598 0000445D E9C7F1 <1> jmp bb_restorepoints_exit 6599 <1> 6600 <1> 6601 <1> @@: 6602 00004460 83C420 <1> add sp, _NUM_B_BP * 2 6603 <1> 6604 00004463 E87FEF <1> call bb_check_hit 6605 00004466 89C1 <1> mov cx, ax 6606 00004468 9C <1> pushf 6607 <1> ; Clear all special modes. Stop specialcasing cseip breakpoint. 6608 <1> ; 6609 <1> ; This resets all the special flags for subsequent calls. 6610 00004469 8026[A000]E8 <1> clropt [internalflags2], dif2_gg_is_first | dif2_gg_first_detected | dif2_gg_skip_cseip | dif2_gg_skip_non_cseip 6613 0000446E 9D <1> popf ; CF 6614 0000446F 7302 <1> jnc @F 6615 <1> 6616 00004471 F9 <1> stc 6617 <1> ; cx = flags as returned by bb_check_hit 6618 00004472 C3 <1> retn 6619 <1> 6620 <1> @@: 6621 00004473 E854EF <1> call adjust_cseip_after_breakpoint 6622 <1> ; re-execute (restored) opcode one byte in front of this 6623 00004476 F8 <1> clc ; (NC) 6624 <1> ; cx = flags as returned by bb_check_hit 6625 00004477 C3 <1> retn 6626 <1> %endif 6627 <1> %endif 6628 <1> 6629 <1> 6630 <1> ; Run - Start up the running program. 6631 <1> ; 6632 <1> ; INP: b[eqflag], a[eqladdr] = address given behind '=' for command 6633 <1> ; w[pspdbe] = process of debuggee 6634 <1> ; [run2324] = interrupt handlers 23h and 24h to set 6635 <1> ; values for registers in d[reg_eax] etc 6636 <1> ; OUT: (_DEBUG && _DEBUGUPDATESAVE) 6637 <1> ; interrupt handlers' ieNext fields updated 6638 <1> ; d[reg_eax] etc updated 6639 <1> ; w[run_int]-> message of how execution returned 6640 <1> ; UP, EI, high word efl = 0, es = ds = ss 6641 <1> ; CHG: all 6642 <1> ; STT: ds = ss 6643 <1> ; UP 6644 <1> ; (INP:es ignored) 6645 <1> run: 6646 00004478 16 <1> push ss 6647 00004479 07 <1> pop es 6648 <1> %if _PM 6649 0000447A E857F5 <1> call resetmode 6650 0000447D E85102 <1> call remember_mode 6651 <1> %endif 6652 <1> %if _DELAY_BEFORE_BP 6653 00004480 8026[A600]7F <1> clropt [internalflags3], dif3_delayed 6654 <1> %endif 6655 00004485 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 6659 0000448B E86A04 <1> call seteq ; set CS:IP to '=' address 6660 <1> 6661 <1> ; For DDebugX: Do this before we install our 6662 <1> ; exception handlers. So if an exception 6663 <1> ; is raised then it is handled by the outer 6664 <1> ; instance instead of our handler. 6665 <1> ; (The actual problem may be that we don't 6666 <1> ; restore the handlers in the entrypoint 6667 <1> ; that leads to debuggerexception.) 6668 <1> ; Also, for non-_DEBUG DebugX too, check the 6669 <1> ; validity before setting debuggee PSP and 6670 <1> ; int 23h, 24h so they needn't be reset. 6671 <1> %if _PM 6672 <1> ; Load segreg values into es to make sure 6673 <1> ; they're valid. (Previously done with 6674 <1> ; the stack pointing into the reg array. 6675 <1> ; Better to do it now with a valid stack.) 6676 <1> ; Only done if we may be in Protected Mode. 6677 <1> ; 86 Mode allows any value to be loaded. 6678 0000448E 8E06[900C] <1> mov es, word [reg_ds] 6679 00004492 8E06[980C] <1> mov es, word [reg_ss] 6680 00004496 8E06[A00C] <1> _386 mov es, word [reg_fs] 6681 0000449A 8E06[A40C] <1> _386 mov es, word [reg_gs] 6682 <1> %endif 6683 0000449E 8E06[940C] <1> mov es, word [reg_es] ; last one: actual es value 6684 <1> 6685 000044A2 8B1E[AE0A] <1> mov bx, word [pspdbe] 6686 000044A6 E8394F <1> call setpsp ; set debuggee's PSP 6687 000044A9 E83063 <1> call setint2324 ; set debuggee's int 23/24 6688 <1> %if _DEBUG ; set this copy's divide/trace/breakpoint ints 6689 <1> %if _TSR || _BOOTLDR 6690 <1> ..@patch_tsr_quit_run: 6691 <1> db __TEST_IMM16 6692 <1> dw __REL16__(.skipints) 6693 <1> %endif 6694 <1> push cx 6695 <1> push si 6696 <1> push ax 6697 <1> push dx 6698 <1> push es 6699 <1> push bx 6700 <1> push bp 6701 <1> push di 6702 <1> 6703 <1> %if _PM 6704 <1> call ispm 6705 <1> jz @F ; in PM --> 6706 <1> testopt [internalflags], canswitchmode 6707 <1> jz @FF ; in 86 Mode and cannot switch to PM --> 6708 <1> 6709 <1> d4 call d4message 6710 <1> d4 asciz "In run (switch mode before calling pm_set_handlers)",13,10 6711 <1> setopt [internalflags], modeswitched ; set flag for resetmode 6712 <1> mov al, 0 6713 <1> call sr_state ; save state 6714 <1> call switchmode ; switch to PM 6715 <1> ; ! handle_mode_changed not called here ! 6716 <1> ; do not call InDos or other functions using seg/sels 6717 <1> @@: 6718 <1> call pm_set_handlers 6719 <1> ; ! this calls resetmode 6720 <1> @@: 6721 <1> %endif 6722 <1> 6723 <1> mov cx, inttab_number 6724 <1> mov si, inttab 6725 <1> .intloop: 6726 <1> lodsb 6727 <1> xchg ax, dx 6728 <1> lodsw ; get address 6729 <1> xchg ax, dx 6730 <1> %if _DEBUGUPDATESAVE 6731 <1> mov di, dx ; -> IISP header 6732 <1> %endif 6733 <1> 6734 <1> call InDos 6735 <1> jz .int21_25 6736 <1> 6737 <1> xor bx, bx 6738 <1> %if _PM 6739 <1> call ispm 6740 <1> jnz @F 6741 <1> push dx 6742 <1> mov dx, bx ; set segment to access (= 0) 6743 <1> call setrmsegm ; get bx = selector configured to this 6744 <1> pop dx 6745 <1> @@: 6746 <1> %endif 6747 <1> mov es, bx ; => 86 Mode IVT (segment or selector) 6748 <1> %if _PM 6749 <1> xor bx, bx ; bh = 0 6750 <1> %endif 6751 <1> mov bl, al 6752 <1> add bx, bx 6753 <1> add bx, bx 6754 <1> 6755 <1> %if _DEBUGUPDATESAVE 6756 <1> push word [ es:bx + 2 ] 6757 <1> push word [ es:bx ] ; get vector 6758 <1> pop word [ di + ieNext ] 6759 <1> pop word [ di + ieNext + 2] 6760 <1> %endif 6761 <1> 6762 <1> mov word [ es:bx ], dx 6763 <1> %if _PM 6764 <1> push word [ pspdbg ] ; => lDEBUG_DATA_ENTRY (86 Mode seg) 6765 <1> pop word [ es:bx + 2 ] 6766 <1> %else 6767 <1> mov word [ es:bx + 2 ], ds ; => lDEBUG_DATA_ENTRY 6768 <1> %endif 6769 <1> jmp short .intset 6770 <1> 6771 <1> .int21_25: 6772 <1> 6773 <1> %if _PM 6774 <1> %if _DEBUGUPDATESAVE 6775 <1> mov ah, 35h ; get interrupt vector 6776 <1> push word [pspdbg] ; => lDEBUG_DATA_ENTRY 6777 <1> call _doscall_return_es_parameter_es_ds 6778 <1> mov word [ di + ieNext ], bx 6779 <1> pop word [ di + ieNext + 2 ] 6780 <1> %endif 6781 <1> mov ah, 25h ; set interrupt vector 6782 <1> push word [pspdbg] ; => lDEBUG_DATA_ENTRY 6783 <1> call _doscall_return_es_parameter_es_ds 6784 <1> pop ax ; (discard returned parameter) 6785 <1> %else 6786 <1> %if _DEBUGUPDATESAVE 6787 <1> mov ah, 35h 6788 <1> int 21h ; get vector 6789 <1> mov word [ di + ieNext ], bx 6790 <1> mov word [ di + ieNext + 2 ], es 6791 <1> %endif 6792 <1> mov ah, 25h ; set interrupt vector 6793 <1> int 21h ; ds => lDEBUG_DATA_ENTRY 6794 <1> %endif 6795 <1> .intset: 6796 <1> loop .intloop 6797 <1> 6798 <1> pop di 6799 <1> pop bp 6800 <1> pop bx 6801 <1> pop es 6802 <1> pop dx 6803 <1> pop ax 6804 <1> pop si 6805 <1> pop cx 6806 <1> .skipints: 6807 <1> %endif 6808 <1> 6809 <1> .2: 6810 000044AC 8926[A80A] <1> mov word [run_sp], sp ; save stack position 6811 <1> 6812 <1> ; Disable this for now. The debugger uses its ss 6813 <1> ; for 86 Mode and Protected Mode at the same area 6814 <1> ; so it should always be valid to adjust SPSAV with 6815 <1> ; the current run_sp, regardless of current mode. 6816 <1> ; Update: SPSAV should always hold a 86 Mode address. 6817 <1> ; So check for our segment, not the current ss. (But 6818 <1> ; for _PM=0 ss is always equal to word [pspdbg].) 6819 <1> ; I assume that the original fix was intended for cases 6820 <1> ; where the segment doesn't match our 86 Mode ss, that 6821 <1> ; is the word [pspdbg]. 6822 <1> %if 1 6823 <1> ; 16.2.2021: check if saved SS is debugger's SS. If no, don't adjust saved SP. 6824 <1> ; SS may be != saved SS if debugger is stopped in protected-mode - then the 6825 <1> ; current DPMI real-mode stack may be stored in SPSAV. 6826 <1> %if _PM 6827 000044B0 A1[B00A] <1> mov ax, word [pspdbg] 6828 <1> %else 6829 <1> mov ax, ss 6830 <1> %endif 6831 000044B3 3B063000 <1> cmp ax, word [SPSAV + 2] 6832 000044B7 7508 <1> jne @F 6833 <1> %endif 6834 000044B9 2B26[AC0A] <1> sub sp, word [spadjust] 6835 000044BD 89262E00 <1> mov word [SPSAV], sp 6836 <1> @@: 6837 000044C1 FA <1> cli 6838 <1> 6839 000044C2 BC[700C] <1> mov sp, regs 6840 <1> %ifn _ONLY386 6841 000044C5 EB11 <1> _386_jmps .386 ; --> 6842 000044C7 58 <1> pop ax 6843 000044C8 58 <1> pop ax ; discard all high words 6844 000044C9 5B <1> pop bx 6845 000044CA 58 <1> pop ax 6846 000044CB 59 <1> pop cx 6847 000044CC 58 <1> pop ax 6848 000044CD 5A <1> pop dx 6849 000044CE 58 <1> pop ax 6850 000044CF 58 <1> pop ax ; we'll get esp later 6851 000044D0 58 <1> pop ax 6852 000044D1 5D <1> pop bp 6853 000044D2 58 <1> pop ax 6854 000044D3 5E <1> pop si 6855 000044D4 58 <1> pop ax 6856 000044D5 5F <1> pop di 6857 <1> ; ds, ss, cs loaded later 6858 <1> ; es already loaded 6859 <1> %endif 6860 <1> %ifn _ONLYNON386 6861 <1> %ifn _ONLY386 6862 000044D6 EB18 <1> jmp short .common 6863 <1> %endif 6864 <1> 6865 <1> .386: 6866 <1> [cpu 386] 6867 000044D8 6658 <1> pop eax 6868 000044DA 665B <1> pop ebx 6869 000044DC 6659 <1> pop ecx 6870 000044DE 665A <1> pop edx 6871 000044E0 58 <1> pop ax 6872 000044E1 58 <1> pop ax ; we'll get esp later 6873 000044E2 665D <1> pop ebp 6874 000044E4 665E <1> pop esi 6875 000044E6 665F <1> pop edi 6876 <1> ; pop ax ; get ds later 6877 <1> ; pop ax ; discard high words of segment registers 6878 <1> ; pop ax ; es already loaded 6879 <1> ; pop ax 6880 <1> ; pop ax ; get ss later 6881 <1> ; pop ax 6882 <1> ; pop ax ; get cs later 6883 <1> ; pop ax 6884 000044E8 83C410 <1> add sp, byte 8 * 2 6885 000044EB 0FA1 <1> pop fs 6886 000044ED 58 <1> pop ax 6887 000044EE 0FA9 <1> pop gs 6888 <1> __CPU__ 6889 <1> .common: 6890 <1> %endif 6891 000044F0 A1[700C] <1> mov ax, word [reg_eax] ; restore ax (used to discard words) 6892 000044F3 8E16[980C] <1> mov ss, word [reg_ss] 6893 <1> %if _ONLYNON386 6894 <1> mov sp, word [reg_esp] 6895 <1> %else 6896 <1> ..@patch_no386_ds: 6897 000044F7 66 <1> o32 ; mov esp, dword [reg_esp] 6898 000044F8 8B26[800C] <1> mov sp, word [reg_esp] ; restore program stack 6899 <1> %endif 6900 000044FC C606[F30A]00 <1> mov byte [bInDbg], 0 6901 00004501 66 <1> _386_o32 ; push dword [reg_efl] 6902 00004502 FF36[AC0C] <1> push word [reg_efl] 6903 00004506 66 <1> _386_o32 ; push dword [reg_cs] ; high word is zero 6904 00004507 FF36[9C0C] <1> push word [reg_cs] 6905 0000450B 66 <1> _386_o32 ; push dword [reg_eip] 6906 0000450C FF36[A80C] <1> push word [reg_eip] 6907 00004510 F606[AD0C]02 <1> test byte [reg_efl+1], 2 ; IF set? 6908 00004515 8E1E[900C] <1> mov ds, word [reg_ds] ; restore ds 6909 00004519 7401 <1> jz .di 6910 0000451B FB <1> sti ; required for ring3 protected mode if IOPL==0 6911 <1> .di: 6912 <1> %if _ONLYNON386 6913 <1> iret 6914 <1> %else 6915 <1> ..@patch_no386_iret: 6916 0000451C 66 <1> o32 ; iretd 6917 0000451D CF <1> iret ; jump to program 6918 <1> %endif 6919 <1> 6920 <1> ; The byte at ..@patch_no386_ds will be adjusted to a ds prefix on non-386 processors. 6921 <1> ; This does not change the following instruction's behaviour (aside from changing it 6922 <1> ; to a 16-bit instruction as intended) and insures that sp is set in the instruction 6923 <1> ; right behind the instruction that sets ss. 6924 <1> 6925 <1> ; The byte at ..@patch_no386_iret will be adjusted to an iret instruction on non-386 processors. 6926 <1> ; This avoids the NOP that would be written there if _386_o32 was used, because the iret 6927 <1> ; should follow right behind the sti instruction. 6928 <1> 6929 <1> 6930 <1> usesection lDEBUG_DATA_ENTRY 6931 <1> 6932 <1> %if _CATCHINT08 6933 0000877E CB90EB10000000004B- <1> iispentry intr8, 0 6933 00008787 4200EBF300 <1> 6934 <1> intr8_original: equ intr8.next 6935 00008792 9C <1> pushf 6936 00008793 2EFF1E[8287] <1> call far [cs:intr8_original] 6937 00008798 9C <1> pushf 6938 00008799 53 <1> push bx 6939 0000879A 1E <1> push ds 6940 <1> 6941 0000879B 0E <1> push cs 6942 0000879C 1F <1> pop ds 6943 <1> 6944 0000879D 803E[F30A]00 <1> cmp byte [bInDbg], 0 ; in debugger ? 6945 000087A2 754D <1> jne .reset ; yes --> 6946 <1> 6947 000087A4 F606[F70B]04 <1> testopt [serial_flags], sf_double_ctrl_c 6948 000087A9 7408 <1> jz @F 6949 <1> 6950 000087AB C706[E40B][307D] <1> mov word [run_int], runint_ctrlc_msg 6951 000087B1 EB38 <1> jmp @FF 6952 <1> 6953 <1> @@: 6954 000087B3 BB4000 <1> mov bx, 40h 6955 000087B6 8EDB <1> mov ds, bx 6956 000087B8 F606170004 <1> test byte [17h], 4 ; CTRL currently pressed ? 6957 000087BD 0E <1> push cs 6958 000087BE 1F <1> pop ds 6959 000087BF 7430 <1> jz .reset ; no --> 6960 <1> 6961 000087C1 FF06[F00B] <1> inc word [intr8_counter] 6962 000087C5 833E[F00B]5A <1> cmp word [intr8_counter], 18 * 5 ; ca 5 seconds 6963 000087CA 722A <1> jb .return 6964 <1> 6965 000087CC C706[E40B][D37C] <1> mov word [run_int], int8msg 6966 000087D2 F606[7D00]80 <1> testopt [options], int8_disable_serial 6967 000087D7 7412 <1> jz @F 6968 000087D9 F606[7D00]40 <1> testopt [options], enable_serial 6969 000087DE 740B <1> jz @F 6970 <1> 6971 000087E0 8026[7D00]BF <1> clropt [options], enable_serial 6972 000087E5 C706[E40B][F87C] <1> mov word [run_int], int8_kbd_msg 6973 <1> 6974 <1> @@: 6975 000087EB 1F <1> pop ds 6976 000087EC 5B <1> pop bx 6977 000087ED 9D <1> popf ; (in 86 Mode) 6978 000087EE E90501 <1> jmp intrtn 6979 <1> 6980 <1> .reset: 6981 000087F1 8326[F00B]00 <1> and word [intr8_counter], 0 6982 <1> .return: 6983 000087F6 1F <1> pop ds 6984 000087F7 5B <1> pop bx 6985 000087F8 9D <1> popf ; (in 86 Mode) 6986 000087F9 CF <1> iret 6987 <1> %endif 6988 <1> 6989 <1> 6990 <1> ; Interrupt 22h (program termination) handler. 6991 <1> int22: 6992 000087FA FA <1> cli 6993 <1> .cleartraceflag: 6994 000087FB 0E <1> push cs 6995 000087FC 1F <1> pop ds 6996 000087FD 0E <1> push cs 6997 000087FE 17 <1> pop ss 6998 000087FF 8B26[A80A] <1> mov sp, word [run_sp] ; restore running stack 6999 00008803 C706[E40B][497F] <1> mov word [run_int], progtrm ; set interrupt message 7000 00008809 C706[E60B][5C04] <1> mov word [lastcmd], dmycmd ; disable T/P/G auto-repeat 7001 <1> %if _PM 7002 0000880F 8026[9D00]F7 <1> clropt [internalflags], protectedmode ; reset PM flag 7003 <1> %endif 7004 00008814 90 <1> times 1 - (($ - $$) & 1) nop ; align in-code parameter 7005 00008815 E8EFFA <1> call entry_to_code_seg 7006 00008818 [9545] <1> dw intrtn1_code 7007 <1> ; jump to register saving routine 7008 <1> 7009 <1> 7010 <1> sharedentry1.hwreset: 7011 0000881A CB <1> retf 7012 <1> 7013 <1> 7014 <1> ; Interrupt 01h (single-step interrupt) handler. 7015 0000881B 90EB10000000004B42- <1> iispentry intr1, 0, sharedentry1 7015 00008824 00EBF300 <1> 7016 <1> lframe int 7017 0000882E 5589E5 <1> lenter 7018 00008831 50 <1> push ax 7019 <1> 7020 00008832 806607FE <1> clropt [bp + ?frame_fl], 100h ; clear TF (always) 7021 00008836 8CC8 <1> mov ax, cs 7022 00008838 394604 <1> cmp word [bp + ?frame_cs], ax ; entry segment ? 7023 0000883B 7513 <1> jne .if_ZR ; no --> (NZ) 7024 <1> %if _PM 7025 0000883D 817E02[C198] <1> cmp word [bp + ?frame_ip], getline_extra_int22.cleartraceflag 7026 00008842 740C <1> je .if_ZR ; that one --> (ZR) 7027 <1> %endif 7028 00008844 817E02[FB87] <1> cmp word [bp + ?frame_ip], int22.cleartraceflag 7029 00008849 7405 <1> je .if_ZR ; that one --> (ZR) 7030 0000884B 817E02[2883] <1> cmp word [bp + ?frame_ip], debug22.cleartraceflag 7031 <1> .if_ZR: 7032 00008850 58 <1> pop ax 7033 00008851 5D <1> lleave , optimiserestoresp 7034 00008852 7501 <1> jnz @F 7035 00008854 CF <1> iret ; continue run if matched 7036 <1> 7037 <1> @@: 7038 00008855 2EC706[E40B][7D7C] <1> mov word [cs:run_int], int1msg ; remember interrupt type 7039 0000885C E99700 <1> jmp intrtn ; jump to register saving routine 7040 <1> 7041 <1> 7042 <1> ; Interrupt 00h (divide error) handler. 7043 0000885F 90EB10000000004B42- <1> iispentry intr0, 0, sharedentry1 7043 00008868 00EBAF00 <1> 7044 00008872 2EC706[E40B][6E7C] <1> mov word [cs:run_int], int0msg ; remember interrupt type 7045 00008879 EB7B <1> jmp intrtn ; jump to register saving routine 7046 <1> 7047 <1> 7048 <1> 7049 <1> ; Interrupt 03h (breakpoint interrupt) handler. 7050 0000887B 90EB10000000004B42- <1> iispentry intr3, 0, sharedentry1 7050 00008884 00EB9300 <1> 7051 0000888E 2EC706[E40B][A07C] <1> mov word [cs:run_int], int3msg ; remember interrupt type 7052 <1> %if _CATCHINT06 7053 00008895 EB5F <1> jmp intrtn ; jump to register saving routine 7054 <1> 7055 <1> 7056 <1> ; Interrupt 06h (invalid opcode) handler. 7057 00008897 90EB10000000004B42- <1> iispentry intr6, 0, sharedentry2 7057 000088A0 00EB7500 <1> 7058 000088AA 2EC706[E40B][C27C] <1> mov word [cs:run_int], int6msg ; remember interrupt type 7059 <1> %endif 7060 <1> %if _CATCHINT18 7061 000088B1 EB43 <1> jmp intrtn ; jump to register saving routine 7062 <1> 7063 <1> 7064 <1> ; Interrupt 18h (diskless boot hook) handler. 7065 000088B3 90EB10000000004B42- <1> iispentry intr18, 0, sharedentry2 7065 000088BC 00EB5900 <1> 7066 000088C6 2EC706[E40B][577D] <1> mov word [cs:run_int], int18msg ; remember interrupt type 7067 <1> %endif 7068 <1> %if _CATCHINT19 7069 000088CD EB27 <1> jmp intrtn ; jump to register saving routine 7070 <1> 7071 <1> 7072 <1> ; Interrupt 19h (boot load) handler. 7073 000088CF 90EB10000000004B42- <1> iispentry intr19, 0, sharedentry2 7073 000088D8 00EB3D00 <1> 7074 000088E2 2EC706[E40B][737D] <1> mov word [cs:run_int], int19msg ; remember interrupt type 7075 000088E9 2EC706[E60B][5C04] <1> mov word [cs:lastcmd], dmycmd ; disable T/P/G auto-repeat 7076 000088F0 2E8026[A300]FE <1> clropt [cs:internalflags2], dif2_boot_loaded_kernel 7077 <1> %endif 7078 <1> 7079 <1> ; Common interrupt routine. 7080 <1> 7081 <1> ; Housekeeping. 7082 <1> intrtn: 7083 000088F6 FA <1> cli ; just in case 7084 000088F7 2E8F06[A80C] <1> pop word [cs:reg_eip] ; recover things from stack 7085 000088FC 2E8F06[9C0C] <1> pop word [cs:reg_cs] 7086 00008901 2E8F06[AC0C] <1> pop word [cs:reg_efl] 7087 00008906 2E8C1E[900C] <1> mov word [cs:reg_ds], ds ; ! word-aligned (AC flag) 7088 0000890B 2EA3[700C] <1> mov word [cs:reg_eax], ax ; ! word-aligned (AC flag) 7089 0000890F 8CC8 <1> mov ax, cs 7090 00008911 8ED8 <1> mov ds, ax ; => lDEBUG_DATA_ENTRY 7091 <1> times 1 - (($ - $$) & 1) nop ; align in-code parameter 7092 00008913 E8F1F9 <1> call entry_to_code_seg 7093 00008916 [1E45] <1> dw intrtn_code 7094 <1> ; To avoid delaying the code segment switch, we use the client's 7095 <1> ; stack here to call (jump) via entry_to_code_seg. 7096 <1> 7097 <1> 7098 <1> sharedentry2.hwreset: 7099 00008918 CB <1> retf 7100 <1> 7101 <1> 7102 <1> usesection lDEBUG_CODE 7103 <1> 7104 <1> code_insure_low_byte_not_0CCh 7105 <1> intrtn_code: 7106 <1> %if _PM 7107 0000451E 8026[9D00]F7 <1> clropt [internalflags], protectedmode ; reset PM flag 7108 <1> .from_installdpmi: 7109 <1> %endif 7110 00004523 8C16[980C] <1> mov word [reg_ss], ss ; save stack position 7111 00004527 8326[AA0C]00 <1> _386 and word [reg_eip+2], byte 0 ; we're from real mode 7112 0000452C 66 <1> _386_o32 ; mov dword [reg_esp], esp 7113 0000452D 8926[800C] <1> mov word [reg_esp], sp 7114 00004531 8ED0 <1> mov ss, ax ; mov ss, cs ; (don't use the stack here) 7115 <1> 7116 <1> %if _PM 7117 00004533 EB0D <1> jmp @F 7118 <1> 7119 <1> intrtn2_code: ; <--- entry protected mode 7120 00004535 368C1E[900C] <1> mov word [ss:reg_ds], ds ; ! word-aligned (AC flag) 7121 0000453A 36A3[700C] <1> mov word [ss:reg_eax], ax ; ! word-aligned (AC flag) 7122 0000453E 8CD0 <1> mov ax, ss 7123 00004540 8ED8 <1> mov ds, ax ; mov ds, ss 7124 <1> @@: 7125 <1> %endif 7126 00004542 B80200 <1> mov ax, 2 7127 <1> %ifn _ONLY386 7128 00004545 EB1A <1> _386_jmps .386 ; --> 7129 00004547 BC[960C] <1> mov sp, reg_es+2 7130 0000454A 06 <1> push es 7131 <1> ; sub sp, ax 7132 <1> ; sub sp, ax ; ds already saved 7133 <1> ; sub sp, ax ; don't overwrite high word of di 7134 0000454B 83EC06 <1> sub sp, byte 3*2 7135 0000454E 57 <1> push di 7136 0000454F 29C4 <1> sub sp, ax 7137 00004551 56 <1> push si 7138 00004552 29C4 <1> sub sp, ax 7139 00004554 55 <1> push bp 7140 <1> ; sub sp, ax 7141 <1> ; sub sp, ax ; sp already saved 7142 <1> ; sub sp, ax 7143 00004555 83EC06 <1> sub sp, byte 3*2 7144 00004558 52 <1> push dx 7145 00004559 29C4 <1> sub sp, ax 7146 0000455B 51 <1> push cx 7147 0000455C 29C4 <1> sub sp, ax 7148 0000455E 53 <1> push bx 7149 <1> %endif 7150 <1> %ifn _ONLYNON386 7151 <1> %ifn _ONLY386 7152 0000455F EB34 <1> jmp short .common 7153 <1> %endif 7154 <1> 7155 <1> .386: 7156 <1> [cpu 386] 7157 00004561 66BC[A60C0000] <1> mov esp, reg_gs+2 7158 00004567 0FA8 <1> push gs 7159 00004569 29C4 <1> sub sp, ax ; don't overwrite high words of segments 7160 0000456B 0FA0 <1> push fs 7161 <1> ; sub sp, ax 7162 <1> ; sub sp, ax ; cs already saved 7163 <1> ; sub sp, ax 7164 <1> ; sub sp, ax ; ss already saved 7165 <1> ; sub sp, ax 7166 0000456D 83EC0A <1> sub sp, byte 5*2 7167 00004570 06 <1> push es 7168 <1> ; sub sp, ax 7169 <1> ; sub sp, ax ; ds already saved 7170 00004571 83EC04 <1> sub sp, byte 2*2 7171 00004574 6657 <1> push edi 7172 00004576 6656 <1> push esi 7173 00004578 6655 <1> push ebp 7174 <1> ; sub sp, ax 7175 <1> ; sub sp, ax ; sp already saved 7176 0000457A 83EC04 <1> sub sp, byte 2*2 7177 0000457D 6652 <1> push edx 7178 0000457F 6651 <1> push ecx 7179 00004581 669C <1> pushfd ; (this overwrites reg_ebx) 7180 00004583 01C4 <1> add sp, ax ; discard low word of efl 7181 00004585 8F06[AE0C] <1> pop word [reg_efl+2] 7182 00004589 6A00 <1> push 0 7183 0000458B 9C <1> pushf ; (this also overwrites reg_ebx) 7184 0000458C 669D <1> popfd ; clear high word of efl inside debugger (resets AC flag) 7185 0000458E 6653 <1> push ebx 7186 00004590 A1[700C] <1> mov ax, word [reg_eax] ; restore ax 7187 00004593 6650 <1> push eax ; so we don't overwrite it with 2 here 7188 <1> __CPU__ 7189 <1> .common: 7190 <1> %endif 7191 <1> 7192 <1> code_insure_low_byte_not_0CCh 7193 <1> ; Clean up. 7194 <1> intrtn1_code: 7195 00004595 66 <1> _386_o32 ; mov esp, dword [run_sp] 7196 00004596 8B26[A80A] <1> mov sp, word [run_sp] ; restore running stack 7197 0000459A FC <1> cld ; clear direction flag 7198 0000459B FB <1> sti ; interrupts back on 7199 0000459C 8026[AD0C]FE <1> clropt [reg_efl], 100h ; clear TF 7200 <1> 7201 <1> %if _PM 7202 000045A1 E85C00 <1> call handle_mode_changed 7203 <1> %endif 7204 <1> 7205 000045A4 E8804E <1> call getpsp 7206 000045A7 891E[AE0A] <1> mov word [pspdbe], bx 7207 <1> 7208 000045AB E86F62 <1> call getint2324 ; save debuggee's int 23/24, set debugger's int 23/24 7209 <1> 7210 000045AE 16 <1> push ss 7211 000045AF 07 <1> pop es 7212 000045B0 E82D4E <1> call setpspdbg ; set PSP of debugger 7213 <1> 7214 000045B3 E8A4F3 <1> call get_cseip_of_possible_breakpoint 7215 <1> ; Initialise this here. This means we do not need to call 7216 <1> ; resetmode between proceed_wp and bb_wp and gg_wp. If 7217 <1> ; more than one point needs to switch modes this avoids 7218 <1> ; repeated modeswitching back and forth. 7219 <1> 7220 <1> %if _DEBUG ; reset to next copy's divide/trace/breakpoint ints 7221 <1> push cx 7222 <1> push si 7223 <1> push di 7224 <1> push ax 7225 <1> push bx 7226 <1> push dx 7227 <1> push bp 7228 <1> 7229 <1> %if _PM 7230 <1> call ispm 7231 <1> jz @F ; in PM --> 7232 <1> testopt [internalflags], canswitchmode 7233 <1> jz @FF ; in 86 Mode and cannot switch to PM --> 7234 <1> 7235 <1> d4 call d4message 7236 <1> d4 asciz "In intrtn1_code (switch mode before calling pm_reset_handlers)",13,10 7237 <1> setopt [internalflags], modeswitched ; set flag for resetmode 7238 <1> mov al, 0 7239 <1> call sr_state ; save state 7240 <1> call switchmode ; switch to PM 7241 <1> ; ! handle_mode_changed not called here ! 7242 <1> ; do not call InDos or other functions using seg/sels 7243 <1> @@: 7244 <1> call pm_reset_handlers 7245 <1> ; ! this calls resetmode 7246 <1> @@: 7247 <1> 7248 <1> numdef OVERRIDE_BUILD_PM_DEBUG, 0 7249 <1> %if ! _CATCHPMINT214C && ! _OVERRIDE_BUILD_PM_DEBUG 7250 <1> %fatal Cannot build DDEBUGX: handler switching without Int21.4C hook untested 7251 <1> %endif 7252 <1> %endif 7253 <1> 7254 <1> %if CATCHINTAMOUNT 7255 <1> mov cx, inttab_number 7256 <1> mov si, inttab 7257 <1> mov dx, -1 ; always force 7258 <1> .nextint: 7259 <1> lodsb 7260 <1> xchg ax, bx ; bl = number 7261 <1> lodsw ; si -> list 7262 <1> xchg ax, si ; si -> entry, ax -> list 7263 <1> xchg ax, bx ; al = number, bx -> list 7264 <1> call UnhookInterruptForce 7265 <1> xchg bx, si ; si -> list 7266 <1> loop .nextint 7267 <1> %endif 7268 <1> 7269 <1> pop bp 7270 <1> pop dx 7271 <1> pop bx 7272 <1> pop ax 7273 <1> pop di 7274 <1> pop si 7275 <1> pop cx 7276 <1> %endif 7277 <1> 7278 000045B6 800E[9D00]30 <1> setopt [internalflags], debuggerA20|debuggeeA20 ; assume A20 is on 7279 <1> %if _PM 7280 000045BB E8174E <1> call ispm 7281 000045BE 7420 <1> jz .a20done ; assume A20 on. (is this the right thing to do?) 7282 <1> %endif 7283 000045C0 06 <1> push es 7284 000045C1 1E <1> push ds 7285 000045C2 57 <1> push di 7286 000045C3 56 <1> push si 7287 000045C4 51 <1> push cx 7288 000045C5 31F6 <1> xor si, si 7289 000045C7 8EDE <1> mov ds, si ; ds = 0000h 7290 000045C9 4E <1> dec si 7291 000045CA 8EC6 <1> mov es, si ; es = FFFFh 7292 000045CC 46 <1> inc si ; ds:si = 0000h:0000h = 00000h 7293 000045CD BF1000 <1> mov di, 0010h ; es:di = FFFFh:0010h = 100000h (same address if it overflows) 7294 000045D0 89F9 <1> mov cx, di ; 32 byte (16 = 10h word) 7295 000045D2 F3A7 <1> repe cmpsw ; compare them and assume A20 line switched off if same 7296 000045D4 59 <1> pop cx 7297 000045D5 5E <1> pop si 7298 000045D6 5F <1> pop di 7299 000045D7 1F <1> pop ds 7300 000045D8 07 <1> pop es 7301 000045D9 7505 <1> jne .a20done ; not equal, A20 line is switched on --> 7302 <1> ; if equal, the A20 line is probably switched off 7303 000045DB 8026[9D00]CF <1> clropt [internalflags], debuggerA20|debuggeeA20 ; assume A20 is off 7304 <1> 7305 <1> %if 0 ;_LOCALENABLEA20 7306 <1> ; This doesn't serve any particular reason if we have no business accessing the HMA. 7307 <1> ; What's more important is that the dump, assemble, and disassemble commands *should* 7308 <1> ; use a disabled A20 if it is disabled to the debuggee. Thus, enabling A20 belongs, if 7309 <1> ; at all, into getsegmented (similar to the switch to PM) as there may be breakpoints in 7310 <1> ; the HMA that we need to reset. 7311 <1> %if _GUARD_86M_INT2F 7312 <1> push es 7313 <1> xor ax, ax 7314 <1> mov es, ax ; (only used in 86 Mode) 7315 <1> mov ax, [es:2Fh * 4] 7316 <1> cmp ax, -1 7317 <1> je @F ; --> (ZR) 7318 <1> or ax, [es:2Fh * 4 + 2] 7319 <1> @@: 7320 <1> pop es 7321 <1> jz @F 7322 <1> %endif 7323 <1> mov ax, 4300h 7324 <1> int 2Fh ; XMS v2 installation check 7325 <1> cmp al, 80h ; installed ? 7326 <1> jne .a20done ; no --> 7327 <1> mov ax, 4310h 7328 <1> int 2Fh ; get entry 7329 <1> mov ah, 05h 7330 <1> push cs 7331 <1> call callfaresbx ; local enable A20 7332 <1> push ds 7333 <1> pop es 7334 <1> dec ax 7335 <1> jnz .a20done ; not able to enable A20 --> 7336 <1> ; actually check here to insure it is on? 7337 <1> setopt [internalflags], debuggerA20 ; our A20 is on 7338 <1> @@: 7339 <1> %endif 7340 <1> .a20done: 7341 <1> 7342 000045E0 C606[F30A]01 <1> mov byte [bInDbg], 1 7343 <1> %if _CATCHINT19 7344 000045E5 813E[E40B][737D] <1> cmp word [run_int], int19msg 7345 000045EB 7505 <1> jne @F 7346 000045ED 800E[A600]20 <1> setopt [internalflags3], dif3_gotint19 7347 <1> %endif 7348 <1> @@: 7349 000045F2 813E[E40B][497F] <1> cmp word [run_int], progtrm 7350 000045F8 7505 <1> jnz @F 7351 000045FA 800E[9E00]80 <1> setopt [internalflags], attachedterm 7352 <1> @@: 7353 000045FF C3 <1> retn 7354 <1> 7355 <1> %if 0 ;_LOCALENABLEA20 7356 <1> callfaresbx: 7357 <1> push es 7358 <1> push bx 7359 <1> retf 7360 <1> %endif 7361 <1> 7362 <1> 7363 <1> %if _PM 7364 <1> ; INP: flag for PM 7365 <1> ; flag for prior PM (from remember_mode) 7366 <1> ; flag for modeswitched (set if in modeswitching) 7367 <1> ; OUT: seg/sels initialised for new mode, if changed 7368 <1> handle_mode_changed: 7369 00004600 BE[0E8B] <1> mov si, convsegs 7370 00004603 B90600 <1> mov cx, convsegs.amount 7371 <1> 7372 00004606 E8CC4D <1> call ispm 7373 00004609 7503E98000 <1> jz .now_pm 7374 <1> [cpu 286] 7375 <1> .now_86m: 7376 0000460E F606[A700]40 <1> testopt [internalflags3], dif3_prior_pm 7377 00004613 7503E9B900 <1> jz .from_no_change 7378 <1> .from_pm_now_86m: 7379 <1> .from_pm_now_86m.loop: 7380 00004618 AD <1> lodsw 7381 00004619 97 <1> xchg ax, di 7382 0000461A 81FE[168B] <1> cmp si, convsegs.end_fixed 7383 0000461E 770A <1> ja @F 7384 00004620 8B5502 <1> mov dx, word [di + soaSegment] 7385 00004623 8915 <1> mov word [di + soaSegSel], dx 7386 00004625 E2F1 <1> loop .from_pm_now_86m.loop 7387 00004627 E9A700 <1> jmp .from_done_change 7388 <1> 7389 <1> @@: 7390 <1> ; We want to switch modes to get the segment bases. 7391 <1> ; First check we aren't already modeswitched. 7392 0000462A F606[9E00]08 <1> testopt [internalflags], modeswitched 7393 0000462F 7403E99D00 <1> jnz .from_done_change ; cancel this --> 7394 <1> 7395 00004634 F606[9E00]04 <1> testopt [internalflags], canswitchmode 7396 00004639 7510 <1> jnz @FF 7397 0000463B EB02 <1> jmp @F 7398 <1> 7399 <1> .from_pm_now_86m.loop.nonfixed.nomodeswitch: 7400 0000463D AD <1> lodsw 7401 0000463E 97 <1> xchg ax, di 7402 <1> @@: 7403 0000463F 31D2 <1> xor dx, dx 7404 00004641 895502 <1> mov word [di + soaSegment], dx 7405 00004644 8915 <1> mov word [di + soaSegSel], dx 7406 00004646 E2F5 <1> loop .from_pm_now_86m.loop.nonfixed.nomodeswitch 7407 00004648 E98600 <1> jmp .from_done_change 7408 <1> 7409 <1> @@: 7410 0000464B 51 <1> push cx 7411 0000464C 57 <1> push di 7412 0000464D 56 <1> push si 7413 <1> d4 call d4message 7414 <1> d4 asciz "In intrtn1_code.from_pm_now_86m (switching modes to access selectors)",13,10 7415 0000464E 800E[9E00]08 <1> setopt [internalflags], modeswitched ; set flag for resetmode 7416 00004653 B000 <1> mov al, 0 7417 00004655 E857F3 <1> call sr_state ; save state 7418 00004658 E81FF3 <1> call switchmode ; switch to PM 7419 <1> ; ! handle_mode_changed not called here ! 7420 <1> ; do not call InDos or other functions using seg/sels 7421 0000465B 5E <1> pop si 7422 0000465C 5F <1> pop di 7423 0000465D EB03 <1> jmp @F 7424 <1> 7425 <1> .from_pm_now_86m.loop.nonfixed: 7426 0000465F AD <1> lodsw 7427 00004660 97 <1> xchg ax, di 7428 00004661 51 <1> push cx 7429 <1> @@: 7430 00004662 31DB <1> xor bx, bx 7431 00004664 875D04 <1> xchg bx, word [di + soaSelector] 7432 00004667 B80600 <1> mov ax, 0006h 7433 0000466A CD31 <1> int 31h 7434 0000466C 7245 <1> jc @F 7435 0000466E F6C20F <1> test dl, 15 7436 00004671 7540 <1> jnz @F 7437 00004673 F7C1F0FF <1> test cx, 0FFF0h 7438 00004677 753A <1> jnz @F 7439 00004679 C1EA04 <1> shr dx, 4 7440 0000467C C1E10C <1> shl cx, 12 7441 0000467F 09CA <1> or dx, cx 7442 00004681 895502 <1> mov word [di + soaSegment], dx 7443 00004684 59 <1> pop cx 7444 00004685 8915 <1> mov word [di + soaSegSel], dx 7445 00004687 E2D6 <1> loop .from_pm_now_86m.loop.nonfixed 7446 00004689 E848F3 <1> call resetmode ; ! only if we did the switch 7447 <1> ; Note: This recursively calls this function, 7448 <1> ; handle_mode_changed. Because the modeswitched 7449 <1> ; flag is set during this call, this only re- 7450 <1> ; initialises the fixed seg/sels with the segment 7451 <1> ; values. That is redundant but does no harm. 7452 0000468C EB43 <1> jmp .from_done_change 7453 <1> __CPU__ 7454 <1> 7455 <1> .now_pm: 7456 0000468E F606[A700]40 <1> testopt [internalflags3], dif3_prior_pm 7457 00004693 753C <1> jnz .from_no_change 7458 <1> .from_86m_now_pm: 7459 <1> .from_86m_now_pm.loop: 7460 00004695 AD <1> lodsw 7461 00004696 97 <1> xchg ax, di 7462 00004697 81FE[168B] <1> cmp si, convsegs.end_fixed 7463 0000469B 7716 <1> ja @F 7464 <1> 7465 0000469D 8B4504 <1> mov ax, word [di + soaSelector] 7466 000046A0 85C0 <1> test ax, ax 7467 000046A2 750B <1> jnz .no_dosdata_change 7468 000046A4 8B5D02 <1> mov bx, word [di + soaSegment] 7469 000046A7 B80200 <1> mov ax, 0002h 7470 000046AA CD31 <1> int 31h 7471 000046AC 894504 <1> mov word [di + soaSelector], ax 7472 <1> 7473 <1> .no_dosdata_change: 7474 000046AF 8905 <1> mov word [di + soaSegSel], ax 7475 000046B1 EB1C <1> jmp @FFF 7476 <1> 7477 <1> @@: 7478 <1> ; Magic: Do not modify if called during modeswitching. 7479 000046B3 F606[9E00]08 <1> testopt [internalflags], modeswitched 7480 000046B8 7517 <1> jnz .from_done_change ; cancel this --> 7481 <1> 7482 000046BA 8B5D02 <1> mov bx, word [di + soaSegment] 7483 000046BD B80200 <1> mov ax, 0002h 7484 000046C0 CD31 <1> int 31h 7485 000046C2 7302 <1> jnc @F 7486 000046C4 31C0 <1> xor ax, ax 7487 <1> @@: 7488 000046C6 8905 <1> mov word [di + soaSegSel], ax 7489 000046C8 894504 <1> mov word [di + soaSelector], ax 7490 000046CB 83650200 <1> and word [di + soaSegment], 0 7491 <1> @@: 7492 <1> %if $ - .from_86m_now_pm.loop > 126 7493 <1> loop .from_86m_now_pm.loop_j 7494 <1> jmp .from_done_change 7495 <1> 7496 <1> .from_86m_now_pm.loop_j: 7497 <1> jmp .from_86m_now_pm.loop 7498 <1> %else 7499 000046CF E2C4 <1> loop .from_86m_now_pm.loop 7500 <1> %endif 7501 <1> .from_done_change: 7502 <1> .from_no_change: 7503 <1> 7504 <1> 7505 <1> remember_mode: 7506 000046D1 E8014D <1> call ispm 7507 000046D4 7507 <1> jnz .from_86m 7508 <1> .from_pm: 7509 000046D6 800E[A700]40 <1> setopt [internalflags3], dif3_prior_pm 7510 000046DB EB05 <1> jmp @F 7511 <1> 7512 <1> .from_86m: 7513 000046DD 8026[A700]BF <1> clropt [internalflags3], dif3_prior_pm 7514 <1> @@: 7515 000046E2 C3 <1> retn 7516 <1> %endif 7517 <1> 7518 <1> 7519 <1> %if _PM && _DEBUG 7520 <1> ; INP: - 7521 <1> ; OUT: es = ds 7522 <1> ; CHG: eax, edx, bx, cx, bp, si, di 7523 <1> ; STT: in PM 7524 <1> ; do not call InDos or other functions using seg/sels 7525 <1> pm_set_handlers: 7526 <1> xor bp, bp ; = 0 if no 386 7527 <1> _386 inc bp 7528 <1> _386 inc bp ; = 2 if 386 7529 <1> 7530 <1> push ds 7531 <1> pop es 7532 <1> 7533 <1> mov si, exctab ; hook several exceptions 7534 <1> %if _DEBUGUPDATESAVE 7535 <1> mov di, excsave 7536 <1> %endif 7537 <1> _386 xor edx, edx ; clear edxh 7538 <1> mov dx, exc_first 7539 <1> .loopexc: 7540 <1> lodsb 7541 <1> mov bl, al 7542 <1> 7543 <1> %if _DEBUGUPDATESAVE 7544 <1> _386_o32 ; push edx 7545 <1> push dx ; preserve excXX pointer 7546 <1> mov ax, 0202h 7547 <1> ; (edxh is zero) 7548 <1> int 31h ; cx:(e)dx -> prior handler 7549 <1> _386_o32 ; xchg eax, edx 7550 <1> xchg ax, dx 7551 <1> _386_o32 ; stosd 7552 <1> stosw ; store offset (dword on 386+, else word) 7553 <1> xchg ax, cx 7554 <1> stosw ; store selector 7555 <1> mov ax, 4 7556 <1> sub ax, bp ; if 386, ax = 4 - 2 = 2, else ax = 4 7557 <1> add di, ax ; -> next entry of excsave 7558 <1> _386_o32 ; pop edx 7559 <1> pop dx 7560 <1> %endif 7561 <1> 7562 <1> mov cx, word [cssel] ; -> our handler for this exception 7563 <1> mov ax, 0203h 7564 <1> int 31h ; set our handler 7565 <1> add dx, byte exc_second - exc_first 7566 <1> ; -> next handler 7567 <1> cmp si, endexctab ; if another to go --> 7568 <1> jb .loopexc 7569 <1> 7570 <1> %if _CATCHPMINT214C 7571 <1> mov si, pminttab ; ds:si -> pminttab 7572 <1> %if _DEBUGUPDATESAVE 7573 <1> mov di, pmintsave ; es:di -> pmintsave 7574 <1> %endif 7575 <1> .loopint: 7576 <1> lodsb ; get interrupt number 7577 <1> mov bl, al ; bl = interrupt number 7578 <1> 7579 <1> %if _DEBUGUPDATESAVE 7580 <1> _386 xor edx, edx ; clear edxh 7581 <1> mov ax, 0204h 7582 <1> int 31h ; cx:(e)dx -> prior handler 7583 <1> _386_o32 ; xchg eax, edx 7584 <1> xchg ax, dx ; (e)ax = offset 7585 <1> _386_o32 ; stosd 7586 <1> stosw ; store offset (dword on 386+, else word) 7587 <1> xchg ax, cx 7588 <1> stosw ; store selector 7589 <1> mov ax, 4 7590 <1> sub ax, bp ; if 386, ax = 4 - 2 = 2, else ax = 4 7591 <1> add di, ax ; -> next entry of pmintsave 7592 <1> %endif 7593 <1> 7594 <1> lodsw ; ax -> our handler 7595 <1> _386 xor edx, edx 7596 <1> xchg ax, dx ; (e)dx -> our handler 7597 <1> mov cx, word [cssel] ; cx:(e)dx -> our handler 7598 <1> mov ax, 0205h 7599 <1> int 31h 7600 <1> cmp si, pminttab.end 7601 <1> jb .loopint 7602 <1> %endif 7603 <1> 7604 <1> jmp resetmode 7605 <1> %endif 7606 <1> 7607 <1> 7608 <1> %if _PM && (_DEBUG || 1 || _CATCHPMINT214C) 7609 <1> ; INP: - 7610 <1> ; OUT: - 7611 <1> ; CHG: eax, edx, bx, cx, bp, si, di 7612 <1> ; STT: in PM 7613 <1> ; do not call InDos or other functions using seg/sels 7614 <1> pm_reset_handlers: 7615 000046E3 31ED <1> xor bp, bp ; = 0 if no 386 7616 000046E5 45 <1> _386 inc bp 7617 000046E6 45 <1> _386 inc bp ; = 2 if 386 7618 <1> 7619 <1> 7620 <1> %if CATCHEXCAMOUNT 7621 <1> ; unhook exceptions 7622 000046E7 BF[1A8B] <1> mov di, exctab 7623 000046EA BE[288B] <1> mov si, excsave 7624 <1> .loopexc: 7625 000046ED 8A1D <1> mov bl, [di] ; bl = exception number 7626 000046EF 47 <1> inc di 7627 000046F0 66 <1> _386_o32 ; lodsd 7628 000046F1 AD <1> lodsw ; load offset (dword on 386+, else word) 7629 000046F2 66 <1> _386_o32 ; xchg eax, edx 7630 000046F3 92 <1> xchg ax, dx 7631 000046F4 AD <1> lodsw ; load selector 7632 000046F5 91 <1> xchg ax, cx ; cx:(e)dx -> prior handler 7633 000046F6 B80400 <1> mov ax, 4 7634 000046F9 29E8 <1> sub ax, bp ; if 386, ax = 4 - 2 = 2, else ax = 4 7635 000046FB 01C6 <1> add si, ax ; -> next entry of excsave 7636 000046FD B80302 <1> mov ax, 0203h 7637 00004700 CD31 <1> int 31h ; set previous handler 7638 00004702 81FF[218B] <1> cmp di, endexctab ; if another to go --> 7639 00004706 72E5 <1> jb .loopexc 7640 <1> %endif 7641 <1> 7642 <1> 7643 <1> %if CATCHPMINTAMOUNT 7644 <1> ; unhook interrupts 7645 00004708 BF[608B] <1> mov di, pminttab ; ds:di -> pminttab 7646 0000470B BE[688B] <1> mov si, pmintsave ; ds:si -> pmintsave 7647 <1> .loopint: 7648 0000470E 8A1D <1> mov bl, [di] ; bl = interrupt number 7649 00004710 83C703 <1> add di, 3 ; -> after this pminttab entry 7650 00004713 66 <1> _386_o32 ; lodsd 7651 00004714 AD <1> lodsw ; load offset (dword on 386+, else word) 7652 00004715 66 <1> _386_o32 ; xchg eax, edx 7653 00004716 92 <1> xchg ax, dx 7654 00004717 AD <1> lodsw ; load selector 7655 00004718 91 <1> xchg ax, cx ; cx:(e)dx -> prior handler 7656 00004719 B80400 <1> mov ax, 4 7657 0000471C 29E8 <1> sub ax, bp ; if 386, ax = 4 - 2 = 2, else ax = 4 7658 0000471E 01C6 <1> add si, ax ; -> next entry of pmintsave 7659 00004720 B80502 <1> mov ax, 0205h 7660 00004723 CD31 <1> int 31h ; set previous handler 7661 00004725 81FF[638B] <1> cmp di, pminttab.end ; if another to go --> 7662 00004729 72E3 <1> jb .loopint 7663 <1> %endif 7664 <1> 7665 0000472B E9A6F2 <1> jmp resetmode 7666 <1> %endif 7667 <1> 7668 <1> 7669 <1> %if _DEBUG1 7670 <1> ; INP: bx -> dword address, word counter 7671 <1> ; dx:ax = linear address to check 7672 <1> ; OUT: NC if to proceed as usual 7673 <1> ; CY if address matched and counter indicates trigger 7674 <1> ; (ie, this should cause the caller to fail) 7675 <1> ; If the address matched, the counter has been stepped. 7676 <1> ; (The result of that step indicates whether to trigger.) 7677 <1> ; STT: ds = ss = debugger data selector 7678 <1> handle_test_case: 7679 <1> cmp word [bx], ax 7680 <1> jne .proceed 7681 <1> cmp word [bx + 2], dx 7682 <1> jne .proceed 7683 <1> 7684 <1> test word [bx + 4], 7FFFh ; is it already at a terminal state ? 7685 <1> jz .no_decrement ; yes, do not further decrement --> 7686 <1> dec word [bx + 4] ; decrement (towards 0 or 8000h) 7687 <1> jz .trigger ; case for decrementing 1 to 0 --> 7688 <1> .no_decrement: 7689 <1> cmp word [bx + 4], 8000h ; decrement resulted in 8000h 7690 <1> je .trigger ; or was already in that state? --> 7691 <1> .proceed: 7692 <1> clc 7693 <1> retn 7694 <1> 7695 <1> .trigger: 7696 <1> stc 7697 <1> retn 7698 <1> 7699 <1> 7700 <1> ; INP: bx -> first test record (dword address, word counter) 7701 <1> ; dx:ax = linear address to check 7702 <1> ; cx = number of consecutive test records to check 7703 <1> ; OUT: NC if to proceed as usual 7704 <1> ; CY if address matched and counter indicates trigger 7705 <1> ; (ie, this should cause the caller to fail) 7706 <1> ; CHG: bx, cx 7707 <1> ; STT: ds = ss = debugger data selector 7708 <1> ; 7709 <1> ; Note that all test cases are tried and, if the address 7710 <1> ; matches, their counters are stepped. In particular, 7711 <1> ; a trigger no longer causes us to skip all further 7712 <1> ; test cases that may have the same address. 7713 <1> ; If at least one of the matching test cases indicates a 7714 <1> ; trigger condition after its stepping, the return is CY. 7715 <1> handle_test_case_multiple_16: 7716 <1> mov cx, 16 7717 <1> handle_test_case_multiple: 7718 <1> clc 7719 <1> pushf ; initialise flags on stack with NC 7720 <1> jcxz .end 7721 <1> .loop: 7722 <1> call handle_test_case 7723 <1> jnc .next 7724 <1> popf ; (discard) 7725 <1> stc 7726 <1> pushf ; new flags on stack with CY 7727 <1> .next: 7728 <1> add bx, 6 7729 <1> loop .loop 7730 <1> .end: 7731 <1> popf ; CF 7732 <1> retn 7733 <1> %endif 7734 <1> 7735 <1> 7736 <1> usesection lDEBUG_DATA_ENTRY 7737 00008919 00 <1> align 4, db 0 7738 0000891C 01000000 <1> default_pp_count: dd 1 7739 00008920 01000000 <1> default_tp_count: dd 1 7740 00008924 01000000 <1> default_tt_count: dd 1 7741 <1> 7742 <1> 7743 <1> usesection lDEBUG_CODE 7744 <1> ; PARSE_PT - Parse 'p' or 't' command. Also resets pagedcommand flag. 7745 <1> ; Entry AL First character of command 7746 <1> ; SI Address of next character 7747 <1> ; [internalflags2] & dif2_is_pp = set if P 7748 <1> ; [internalflags] & tt_p = set if TP 7749 <1> ; both clear if T 7750 <1> ; Exit BX:CX Number of times to repeat 7751 <1> ; Uses AH,BX,CX,DX. 7752 <1> 7753 <1> parse_pt: 7754 0000472E E846BE <1> call guard_re 7755 00004731 C706[C000][7072] <1> mov word [gg_deferred_message], msg.empty_message 7756 00004737 8326[C200]00 <1> and word [bb_deferred_message_in_lineout_behind], 0 7757 0000473C 8026[A000]F7 <1> clropt [internalflags2], dif2_gg_is_gg 7758 00004741 8026[9F00]2B <1> clropt [internalflags], tt_while | tt_silent_mode | tt_no_bb | tt_no_bb_first 7760 00004746 8326[040A]00 <1> and word [tt_silent_mode_number], 0 7761 <1> 7762 <1> ; TP.NB, T.NB, P.NB: trace/proceed without bb breakpoints 7763 <1> ; 7764 <1> ; Note that when such a command is repeated through lastcmd, 7765 <1> ; it gets an empty line, thus tt_no_bb remains clear, and 7766 <1> ; the corresponding command without .NB is run. 7767 0000474B 3C2E <1> cmp al, '.' 7768 0000474D 7520 <1> jne .no_dot 7769 <1> 7770 0000474F AD <1> lodsw 7771 00004750 25DFDF <1> and ax, TOUPPER_W 7772 00004753 3D4E42 <1> cmp ax, "NB" 7773 00004756 7411 <1> je .dot_nb 7774 <1> ; TP.SB, T.SB, P.SB: trace/proceed without bb for first step 7775 00004758 3D5342 <1> cmp ax, "SB" 7776 0000475B 7405 <1> je .dot_sb 7777 0000475D 4E <1> dec si 7778 0000475E 4E <1> dec si 7779 0000475F E9E85F <1> jmp error 7780 <1> 7781 <1> .dot_sb: 7782 00004762 800E[9F00]80 <1> setopt [internalflags], tt_no_bb_first 7783 00004767 EB05 <1> jmp .dot_common 7784 <1> 7785 <1> .dot_nb: 7786 00004769 800E[9F00]40 <1> setopt [internalflags], tt_no_bb 7787 <1> .dot_common: 7788 0000476E AC <1> lodsb 7789 <1> .no_dot: 7790 0000476F E85801 <1> call parseql ; process =addr 7791 00004772 E82E74 <1> call skipcomm0 ; skip any white space 7792 <1> 7793 00004775 BA0400 <1> mov dx, opt3_pp_no_paging 7794 00004778 8B1E[1E89] <1> mov bx, word [default_pp_count + 2] 7795 0000477C 8B0E[1C89] <1> mov cx, word [default_pp_count] 7796 00004780 F606[A100]10 <1> testopt [internalflags2], dif2_is_pp 7797 00004785 751D <1> jnz @F 7798 00004787 BA0200 <1> mov dx, opt3_tp_no_paging 7799 0000478A 8B1E[2289] <1> mov bx, word [default_tp_count + 2] 7800 0000478E 8B0E[2089] <1> mov cx, word [default_tp_count] 7801 00004792 F606[9F00]08 <1> testopt [internalflags], tt_p 7802 00004797 750B <1> jnz @F 7803 00004799 BA0100 <1> mov dx, opt3_tt_no_paging 7804 0000479C 8B1E[2689] <1> mov bx, word [default_tt_count + 2] 7805 000047A0 8B0E[2489] <1> mov cx, word [default_tt_count] 7806 <1> @@: ; bx:cx = default count 7807 <1> 7808 000047A4 8516[8400] <1> test word [options3], dx 7809 000047A8 7405 <1> jz @F 7810 000047AA 8026[9C00]F7 <1> clropt [internalflags], pagedcommand 7811 <1> @@: 7812 <1> 7813 <1> ; Initialise auxbuff pointers in case there is no WHILE clause. 7814 000047AF E80B01 <1> call tpg_initialise_empty_auxbuff 7815 <1> 7816 000047B2 E8C773 <1> call iseol? 7817 000047B5 7503E99500 <1> je .ppt1 ; if no count given --> (uses bx:cx = default) 7818 000047BA E8B86D <1> call getdword ; bx:dx = given count 7819 <1> 7820 000047BD 53 <1> push bx 7821 000047BE 52 <1> push dx ; push count 7822 000047BF E81074 <1> call skipwh0 7823 000047C2 E8B773 <1> call iseol? 7824 000047C5 7503E98300 <1> je .no_while 7825 000047CA 4E <1> dec si 7826 000047CB BA[FE69] <1> mov dx, msg.while 7827 000047CE E84C73 <1> call isstring? 7828 000047D1 7408 <1> je .found_while 7829 <1> 7830 000047D3 E885BD <1> call guard_auxbuff 7831 000047D6 E8C100 <1> call .handle_silent ; (error if no SILENT keyword) 7832 <1> 7833 000047D9 EB72 <1> jmp .no_while 7834 <1> 7835 <1> 7836 <1> .found_while: 7837 000047DB E87DBD <1> call guard_auxbuff 7838 000047DE E8C173 <1> call skipcomma 7839 000047E1 4E <1> dec si 7840 000047E2 89F1 <1> mov cx, si 7841 000047E4 AC <1> lodsb 7842 000047E5 E88D6D <1> call getexpression 7843 000047E8 E89567 <1> call toboolean 7844 000047EB E8E473 <1> call skipwh0 7845 000047EE 52 <1> push dx 7846 000047EF 56 <1> push si 7847 000047F0 E88973 <1> call iseol? ; expect end of line here 7848 000047F3 7404 <1> je .no_while_silent 7849 <1> 7850 000047F5 4E <1> dec si 7851 000047F6 E8A100 <1> call .handle_silent 7852 <1> 7853 <1> .no_while_silent: 7854 000047F9 5E <1> pop si 7855 000047FA 5A <1> pop dx 7856 000047FB 85D2 <1> test dx, dx ; condition true now ? 7857 000047FD 7509 <1> jnz @F 7858 <1> 7859 000047FF BA[A86A] <1> mov dx, msg.while_not_true 7860 00004802 E82E78 <1> call putsz 7861 00004805 E9F8B7 <1> jmp cmd3 7862 <1> 7863 <1> @@: 7864 <1> %if _PM 7865 00004808 8B1E[F809] <1> mov bx, word [auxbuff_switchbuffer_size] 7866 <1> %else 7867 <1> xor bx, bx 7868 <1> %endif 7869 <1> ; (si + 1) -> line terminator (13, ';', 0) or next keyword 7870 <1> @@: 7871 0000480C 4E <1> dec si ; -> terminator, or blank 7872 0000480D 807CFF20 <1> cmp byte [si - 1], 32 ; another blank at end ? 7873 00004811 74F9 <1> je @B ; yes --> 7874 00004813 807CFF09 <1> cmp byte [si - 1], 9 7875 00004817 74F3 <1> je @B ; yes --> 7876 00004819 89F0 <1> mov ax, si 7877 0000481B 29C8 <1> sub ax, cx ; ax = length of expression 7878 0000481D 53 <1> push bx 7879 0000481E 01C3 <1> add bx, ax 7880 00004820 81FB0F20 <1> cmp bx, _AUXBUFFSIZE - 1 7881 00004824 7603E9215F <1> ja error 7882 00004829 8E06[FA09] <1> mov es, word [auxbuff_segorsel] 7883 <1> ; => auxbuff 7884 0000482D 5B <1> pop bx ; -> behind switchbuffer 7885 0000482E 89CE <1> mov si, cx ; -> expression start 7886 00004830 89C1 <1> mov cx, ax ; = length of expression 7887 <1> .loop: 7888 00004832 AC <1> lodsb 7889 00004833 268807 <1> mov byte [es:bx], al 7890 00004836 43 <1> inc bx ; store expression 7891 00004837 E2F9 <1> loop .loop 7892 00004839 26C60700 <1> mov byte [es:bx], 0 ; terminate string 7893 0000483D 43 <1> inc bx 7894 0000483E 891E[000A] <1> mov word [auxbuff_behind_while_condition], bx 7895 00004842 891E[020A] <1> mov word [auxbuff_behind_last_silent], bx 7896 00004846 16 <1> push ss 7897 00004847 07 <1> pop es 7898 <1> 7899 00004848 800E[9F00]04 <1> setopt [internalflags], tt_while 7900 <1> .no_while: 7901 0000484D 59 <1> pop cx 7902 0000484E 5B <1> pop bx ; bx:cx = given count 7903 <1> 7904 <1> .ppt1: 7905 0000484F 85DB <1> test bx, bx 7906 00004851 7507 <1> jnz @F 7907 00004853 85C9 <1> test cx, cx 7908 00004855 7503E9F05E <1> jz error ; must be at least 1, else error --> 7909 <1> @@: 7910 0000485A 53 <1> push bx 7911 0000485B 51 <1> push cx 7912 <1> 7913 0000485C 8026[A000]E8 <1> clropt [internalflags2], dif2_gg_is_first | dif2_gg_first_detected | dif2_gg_skip_cseip | dif2_gg_skip_non_cseip 7916 <1> 7917 00004861 F606[7E00]04 <1> testopt [options], tp_do_not_skip_bp 7918 00004866 752C <1> jnz .do_not_skip_cseip 7919 00004868 800E[A000]01 <1> setopt [internalflags2], dif2_gg_is_first 7920 <1> 7921 0000486D 803E[DC0B]00 <1> cmp byte [eqflag], 0 7922 00004872 7508 <1> jne .cseip_take_eql 7923 <1> 7924 00004874 66 <1> _386_PM_o32 ; xor ecx, ecx 7925 00004875 31C9 <1> xor cx, cx 7926 00004877 E835F0 <1> call get_cseip_ecx_linear 7927 0000487A EB0C <1> jmp .got_cseip 7928 <1> 7929 <1> .cseip_take_eql: 7930 0000487C 8B1E[E20B] <1> mov bx, word [eqladdr + 4] 7931 00004880 66 <1> _386_PM_o32 ; mov edx, dword [eqladdr] 7932 00004881 8B16[DE0B] <1> mov dx, word [eqladdr] 7933 00004885 E833F0 <1> call getlinear 7934 <1> .got_cseip: 7935 00004888 7303E9BD5E <1> jc error 7936 0000488D A3[B400] <1> mov word [gg_first_cseip_linear], ax 7937 00004890 8916[B600] <1> mov word [gg_first_cseip_linear + 2], dx 7938 <1> .do_not_skip_cseip: 7939 <1> 7940 00004894 59 <1> pop cx 7941 00004895 5B <1> pop bx 7942 <1> 7943 00004896 E85F00 <1> call seteq ; make the = operand take effect 7944 00004899 C3 <1> retn 7945 <1> 7946 <1> 7947 <1> .handle_silent: 7948 0000489A BA[046A] <1> mov dx, msg.silent 7949 0000489D E87D72 <1> call isstring? 7950 000048A0 7403E9A55E <1> jne error 7951 000048A5 E8FA72 <1> call skipcomma 7952 000048A8 E8D172 <1> call iseol? 7953 000048AB 740A <1> je .no_silent_mode_number 7954 <1> 7955 000048AD E8AB71 <1> call getword 7956 000048B0 8916[040A] <1> mov word [tt_silent_mode_number], dx 7957 000048B4 E8DA72 <1> call chkeol 7958 <1> 7959 <1> .no_silent_mode_number: 7960 000048B7 800E[9F00]10 <1> setopt [internalflags], tt_silent_mode 7961 000048BC C3 <1> retn 7962 <1> 7963 <1> 7964 <1> ; INP: (_PM) word [auxbuff_switchbuffer_size] 7965 <1> ; OUT: word [auxbuff_behind_while_condition] 7966 <1> ; word [auxbuff_behind_last_silent] 7967 <1> ; CHG: dx 7968 <1> tpg_initialise_empty_auxbuff: 7969 <1> %if _PM 7970 000048BD 8B16[F809] <1> mov dx, word [auxbuff_switchbuffer_size] 7971 <1> %else 7972 <1> xor dx, dx 7973 <1> %endif 7974 000048C1 8916[000A] <1> mov word [auxbuff_behind_while_condition], dx 7975 000048C5 8916[020A] <1> mov word [auxbuff_behind_last_silent], dx 7976 000048C9 C3 <1> retn 7977 <1> 7978 <1> 7979 <1> ; PARSEQL - Parse `=' operand for `g', 'p' and `t' commands. 7980 <1> ; Entry AL First character of command 7981 <1> ; SI Address of next character 7982 <1> ; Exit AL First character beyond range 7983 <1> ; SI Address of the character after that 7984 <1> ; eqflag Nonzero if an `=' operand was present 7985 <1> ; eqladdr Address, if one was given 7986 <1> ; Uses AH,BX,CX,DX. 7987 <1> 7988 <1> parseql: 7989 000048CA C606[DC0B]00 <1> mov byte [eqflag], 0 ; mark '=' as absent 7990 000048CF 3C3D <1> cmp al, '=' 7991 000048D1 7524 <1> jne peq1 ; if no '=' operand 7992 000048D3 E8FB72 <1> call skipwhite 7993 000048D6 8B1E[9C0C] <1> mov bx, word [reg_cs] ; default segment 7994 000048DA E8AA62 <1> call getaddrX ; get the address into bx:(e)dx 7995 <1> %if _PM 7996 000048DD C706[E00B]0000 <1> mov word [eqladdr+2], 0 7997 000048E3 803E[0C8B]00 <1> cmp byte [bAddr32], 0 7998 000048E8 7401 <1> jz .nohighofs 7999 000048EA 66 <1> o32 ; mov dword [eqladdr], edx 8000 <1> .nohighofs: 8001 <1> %endif 8002 000048EB 8916[DE0B] <1> mov word [eqladdr+0], dx 8003 000048EF 891E[E20B] <1> mov word [eqladdr+4], bx 8004 000048F3 FE06[DC0B] <1> inc byte [eqflag] 8005 <1> peq1: 8006 000048F7 C3 <1> retn 8007 <1> 8008 <1> 8009 <1> ; SETEQ - Copy the = arguments to their place, if appropriate. 8010 <1> ; (This is not done immediately, because the command may have 8011 <1> ; a syntax error.) 8012 <1> ; Uses AX. 8013 <1> seteq: 8014 000048F8 803E[DC0B]00 <1> cmp byte [eqflag], 0 8015 000048FD 7417 <1> je .return ; if no `=' operand 8016 000048FF A1[DE0B] <1> mov ax, word [eqladdr+0] 8017 00004902 A3[A80C] <1> mov word [reg_eip], ax 8018 <1> %if _PM 8019 00004905 A1[E00B] <1> mov ax, word [eqladdr+2] 8020 00004908 A3[AA0C] <1> mov word [reg_eip+2], ax 8021 <1> %endif 8022 0000490B A1[E20B] <1> mov ax, word [eqladdr+4] 8023 0000490E A3[9C0C] <1> mov word [reg_cs], ax 8024 00004911 C606[DC0B]00 <1> mov byte [eqflag], 0 ; clear the flag 8025 <1> .return: 8026 00004916 C3 <1> retn 2187 %include "uu.asm" 2188 <1> 2189 <1> %if 0 2190 <1> 2191 <1> lDebug U command - Disassembler 2192 <1> 2193 <1> Copyright (C) 1995-2003 Paul Vojta 2194 <1> Copyright (C) 2008-2012 C. Masloch 2195 <1> 2196 <1> Usage of the works is permitted provided that this 2197 <1> instrument is retained with the works, so that any entity 2198 <1> that uses the works is notified of this instrument. 2199 <1> 2200 <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 2201 <1> 2202 <1> %endif 2203 <1> 2204 <1> 2205 <1> usesection lDEBUG_CODE 2206 <1> 2207 <1> ; U command - disassemble. 2208 <1> uu: 2209 00004917 C706[E60B][2249] <1> mov word [lastcmd], lastuu 2210 0000491D E85C72 <1> call iseol? 2211 00004920 7514 <1> jne uu1 ; if an address was given 2212 <1> 2213 <1> lastuu: 2214 00004922 66 <1> _386_PM_o32 ; mov ecx, dword [u_addr] 2215 00004923 8B0E[2C0B] <1> mov cx, word [u_addr] 2216 00004927 66 <1> _386_PM_o32 ; mov edx, ecx 2217 00004928 89CA <1> mov dx, cx 2218 0000492A 66 <1> _386_PM_o32 ; add ecx, byte 1Fh 2219 0000492B 83C11F <1> add cx, byte 1Fh 2220 0000492E 7304 <1> jnc .no_overflow ; if no overflow --> 2221 00004930 66 <1> _386_PM_o32 ; or ecx, byte -1 2222 00004931 83C9FF <1> or cx, byte -1 ; til end of segment 2223 <1> .no_overflow: 2224 00004934 EB25 <1> jmp short uu2 2225 <1> 2226 <1> uu1: 2227 00004936 B92000 <1> mov cx, 20h ; default length 2228 00004939 8B1E[9C0C] <1> mov bx, word [reg_cs] 2229 0000493D E85961 <1> call getrangeX ; get address range into bx:(e)dx 2230 00004940 E84E72 <1> call chkeol ; expect end of line here 2231 00004943 891E[300B] <1> mov word [u_addr + saSegSel], bx 2232 <1> %if _PM 2233 00004947 E88B4A <1> call ispm 2234 0000494A 7506 <1> jnz .86m 2235 <1> .pm: 2236 0000494C 891E[340B] <1> mov word [u_addr + saSelector], bx 2237 00004950 EB04 <1> jmp @F 2238 <1> .86m: 2239 00004952 891E[320B] <1> mov word [u_addr + saSegment], bx 2240 <1> @@: 2241 <1> %endif 2242 00004956 66 <1> _386_PM_o32 ; mov dword [u_addr], edx 2243 00004957 8916[2C0B] <1> mov word [u_addr], dx 2244 <1> 2245 <1> ; (d)word [u_addr] = offset start address 2246 <1> ; word [u_addr + saSegSel] = segment start address 2247 <1> ; (e)cx = end address 2248 <1> ; (e)dx = start adddress (same as [u_addr]) 2249 <1> uu2: 2250 0000495B 66 <1> _386_PM_o32 ; inc ecx 2251 0000495C 41 <1> inc cx 2252 <1> uu3: 2253 0000495D E812F8 <1> call handle_serial_flags_ctrl_c 2254 00004960 66 <1> _386_PM_o32 ; push ecx 2255 00004961 51 <1> push cx 2256 00004962 66 <1> _386_PM_o32 ; push edx 2257 00004963 52 <1> push dx 2258 00004964 8326[068A]00 <1> and word [disflags], 0 2259 00004969 E81700 <1> call disasm ; do it 2260 0000496C 66 <1> _386_PM_o32 ; pop ebx 2261 0000496D 5B <1> pop bx 2262 0000496E 66 <1> _386_PM_o32 ; pop ecx 2263 0000496F 59 <1> pop cx 2264 00004970 66 <1> _386_PM_o32 ; mov eax, dword [u_addr] 2265 00004971 A1[2C0B] <1> mov ax, word [u_addr] 2266 00004974 66 <1> _386_PM_o32 ; mov edx, eax 2267 00004975 89C2 <1> mov dx, ax 2268 00004977 66 <1> _386_PM_o32 ; sub eax, ecx 2269 00004978 29C8 <1> sub ax, cx ; current position - end 2270 0000497A 66 <1> _386_PM_o32 ; sub ebx, ecx 2271 0000497B 29CB <1> sub bx, cx ; previous position - end 2272 0000497D 66 <1> _386_PM_o32 ; cmp eax, ebx 2273 0000497E 39D8 <1> cmp ax, bx 2274 00004980 73DB <1> jnb uu3 ; if we haven't reached the goal 2275 00004982 C3 <1> retn 2276 <1> 2277 <1> 2278 <1> usesection lDEBUG_DATA_ENTRY 2279 <1> 2280 <1> ; Jump table for displaying sized operands. 2281 <1> ; Entries are defined in the debug.asm opsizeditem list. 2282 <1> align 2, db 0 2283 <1> disjmp2: 2284 00008928 [7F51][B051][E053]- <1> dw DISJMP2_OPSIZEDITEMS 2284 0000892E [ED53][A151][F653]- <1> 2284 00008934 [3054][3554] <1> 2285 <1> .end: 2286 <1> 2287 <1> ; Jump table for displaying operands. 2288 <1> ; Entries are defined in the debug.asm opitem list. 2289 <1> align 2, db 0 2290 <1> optab: 2291 00008938 [134B] <1> dw da_internal_error ; entry for OP_END 2292 0000893A [3954][3D54][4E54]- <1> dw OPTAB_OPITEMS 2292 00008940 [6B54][8154][9354]- <1> 2292 00008946 [3E55][7C55][3D57]- <1> 2292 0000894C [4D57][6357][8357]- <1> 2292 00008952 [8E57][AD57][CE57]- <1> 2292 00008958 [CE57][E057][E657]- <1> 2292 0000895E [F457][FC57][CC58]- <1> 2292 00008964 [F658][1159][1D59]- <1> 2292 0000896A [2459][D558][DC58]- <1> 2292 00008970 [E358][EF58][EA58]- <1> 2292 00008976 [0D58][3558][7458]- <1> 2292 0000897C [134B]310033004458- <1> 2292 00008984 434C53544353445345- <1> 2292 0000898D 53465347535353 <1> 2293 <1> 2294 <1> 2295 <1> %if _MEMREF_AMOUNT 2296 00008994 00 <1> align 16, db 0 2297 000089A0 00 <1> memrefs: times MEMREF_size * _MEMREF_AMOUNT db 0 2298 000089E0 0000 <1> .free: dw 0 2299 <1> 2300 000089E2 00 <1> align 4, db 0 2301 <1> string_memref_counter: 2302 000089E4 00000000 <1> dd 0 2303 <1> %endif 2304 <1> 2305 <1> 2306 <1> ; DISASM - Disassemble. 2307 <1> 2308 <1> align 2, db 0 2309 000089E8 0000 <1> dis_n: dw 0 ; number of bytes in instruction so far 2310 000089EA 0000 <1> dw 0 2311 000089EC 00 <1> preflags: db 0 ; flags for prefixes found so far (includes OSIZE,ASIZE) 2312 000089ED 00 <1> preused: db 0 ; flags for prefixes used so far 2313 <1> %if _PM 2314 000089EE 00 <1> presizeflags: db 0 ; O32,A32 flags = (OSIZE,ASIZE) XOR (32-bit cs?) 2315 <1> %else 2316 <1> presizeflags: equ preflags ; O32,A32 flags are always equal to OSIZE,ASIZE 2317 <1> %endif 2318 <1> 2319 <1> PRESEG equ 1 ; segment prefix 2320 <1> PREREP equ 2 ; rep prefixes 2321 <1> PREREPZ equ 4 ; F3h, not F2h 2322 <1> PRELOCK equ 8 ; lock prefix 2323 <1> PREOSIZE equ 10h ; flag for OSIZE prefix 2324 <1> PREASIZE equ 20h ; flag for ASIZE prefix 2325 <1> PRE32D equ 10h ; flag for 32-bit data 2326 <1> PRE32A equ 20h ; flag for 32-bit addressing 2327 <1> PREWAIT equ 40h ; prefix wait (not really a prefix) 2328 <1> GOTREGM equ 80h ; set if we have the reg/mem part 2329 <1> 2330 000089EF 00 <1> instru: db 0 ; the main instruction byte 2331 000089F0 00 <1> disp8: db 0 2332 000089F1 00 <1> align 2, db 0 2333 000089F2 0000 <1> index: dw 0 ; index of the instruction (unsqueezed) 2334 000089F4 380339033C03 <1> obsinst:dw SFPGROUP3, SFPGROUP3+1, SFPGROUP3+4 2335 000089FA 04020602 <1> dw SPARSE_BASE+24h, SPARSE_BASE+26h ; obsolete-instruction values 2336 <1> ; This is used to search for obsolete instructions: 2337 <1> ; DBE0h: feni 2338 <1> ; DBE1h: fdisi 2339 <1> ; DBE4h: fsetpm 2340 <1> ; 124h: mov trX, reg 2341 <1> ; 126h: mov reg, trX 2342 <1> 2343 000089FE 00 <1> rmsize: db 0 ; <0 or 0 or >0 means mod r/m is 8 or 16 or 32 2344 000089FF 00 <1> segmnt: db 0 ; segment determined by prefix (or otherwise) 2345 <1> align 4, db 0 2346 00008A00 00000000 <1> addrr: dd 0 ; address in mod r/m byte 2347 00008A04 0000 <1> savesp2:dw 0 ; save the stack pointer here (used in disasm) 2348 <1> 2349 <1> align 2, db 0 2350 00008A06 0000 <1> disflags: dw 0 ; flags for the disassembler 2351 <1> 2352 <1> ;--- equates for disflags: 2353 <1> 2354 <1> DIS_F_REPT equ 1 ; repeat after pop ss, etc. 2355 <1> DIS_F_SHOW equ 2 ; show memory contents 2356 <1> DIS_I_SHOW equ 4 ; there are memory contents to show 2357 <1> DIS_I_UNUSED equ 8 ; (internal) print " (unused)" 2358 <1> DIS_I_SHOWSIZ equ 10h ; (internal) always show the operand size 2359 <1> DIS_I_KNOWSIZ equ 20h ; (internal) we know the operand size of instr. 2360 <1> DIS_I_MOV_SS equ 40h ; (internal) note for repetition: mov ss 2361 <1> DIS_I_DONTSHOW equ 80h ; do not show memory contents override 2362 <1> DIS_I_NOSIZ equ 100h ; do not show size 2363 <1> DIS_I_FAR_M equ 200h ; far memory reference, show segment word contents 2364 <1> DIS_I_DOUBLE_M equ 400h ; double memory reference, show second item contents 2365 <1> DIS_I_SHOW_A32 equ 800h ; memory contents to show are 32-bit addressed 2366 <1> DIS_I_M_SRC equ 1000h ; memory operand is source 2367 <1> DIS_I_M_DST equ 2000h ; memory operand is destination 2368 <1> ; both of the above may be set 2369 <1> 2370 00008A08 00 <1> disflags2: db 0 ; another copy of DIS_I_KNOWSIZ 2371 00008A09 00 <1> disrepeatcount: db 0 2372 <1> 2373 <1> align 2, db 0 2374 00008A0A 0000 <1> sizeloc: dw 0 ; address of size words in output line 2375 <1> %if _COND 2376 00008A0C 0000 <1> condmsg: dw 0 ; -> conditionals message to display (if R and no mem) 2377 <1> %endif 2378 <1> 2379 <1> ; Jump table for a certain place. 2380 <1> ; The size of this table matches OPTYPES_BASE. 2381 <1> align 2, db 0 2382 <1> disjmp: 2383 00008A0E [4459] <1> dw disbad ; illegal instruction 2384 00008A10 [244A] <1> dw da_twobyte ; two-byte instruction 2385 00008A12 [304A] <1> dw da_insgrp ; instruction group 2386 00008A14 [374A] <1> dw da_fpuins ; coprocessor instruction 2387 00008A16 [524A] <1> dw da_fpugrp ; coprocessor instruction group 2388 00008A18 [5B4A] <1> dw da_insprf ; instruction prefix (including 66h/67h) 2389 <1> %if ($ - disjmp) != OPTYPES_BASE 2390 <1> %error Wrong length of table disjmp 2391 <1> %endif 2392 <1> 2393 <1> ; Table for 16-bit mod r/m addressing. 8 = BX, 4 = BP, 2 = SI, 1 = DI. 2394 00008A1A 0A09060502010408 <1> rmtab: db 8+2, 8+1, 4+2, 4+1, 2, 1, 4, 8 2395 <1> 2396 <1> 2397 <1> %macro defgpr 1.nolist 2398 <1> REG_ %+ %1: equ ($ - rgnam816) / 2 2399 <1> %defstr %%string %1 2400 <1> db %%string 2401 <1> %endmacro 2402 <1> %macro defsr 1.nolist 2403 <1> REG_ %+ %1: equ REG_NO_GPR + ($ - segrgnam) / 2 2404 <1> %defstr %%string %1 2405 <1> db %%string 2406 <1> %endmacro 2407 <1> 2408 <1> REG_NO_GPR equ 24 ; 16..23 are registers eax..edi 2409 <1> 2410 <1> align 2, db 0 2411 <1> ; Tables of register names. 2412 <1> ; rgnam816/rgnam16/segrgnam/xregnam must be consecutive. 2413 <1> rgnam816: 2414 00008A22 414C <1> defgpr AL 2415 00008A24 434C <1> defgpr CL 2416 00008A26 444C <1> defgpr DL 2417 00008A28 424C <1> defgpr BL 2418 00008A2A 4148 <1> defgpr AH 2419 00008A2C 4348 <1> defgpr CH 2420 00008A2E 4448 <1> defgpr DH 2421 00008A30 4248 <1> defgpr BH ; 0..7 2422 <1> rgnam16: 2423 00008A32 4158 <1> defgpr AX 2424 00008A34 4358 <1> defgpr CX 2425 00008A36 4458 <1> defgpr DX 2426 00008A38 4258 <1> defgpr BX 2427 00008A3A 5350 <1> defgpr SP 2428 00008A3C 4250 <1> defgpr BP 2429 00008A3E 5349 <1> defgpr SI 2430 00008A40 4449 <1> defgpr DI ; 8..15 (16-bit), 16..23 (32-bit) 2431 <1> N_REGS16 equ ($ - rgnam16) >> 1 2432 <1> segrgnam: 2433 00008A42 4553 <1> defsr ES 2434 00008A44 4353 <1> defsr CS 2435 00008A46 5353 <1> defsr SS 2436 00008A48 4453 <1> defsr DS 2437 00008A4A 4653 <1> defsr FS 2438 00008A4C 4753 <1> defsr GS ; 24..29 2439 <1> N_SEGREGS equ ($ - segrgnam) >> 1 2440 <1> xregnam: 2441 00008A4E 5354 <1> defsr ST 2442 00008A50 4D4D <1> defsr MM 2443 00008A52 4352 <1> defsr CR 2444 00008A54 4452 <1> defsr DR 2445 00008A56 5452 <1> defsr TR ; 30..34 2446 <1> N_ALLREGS equ ($ - rgnam816) >> 1 2447 <1> 2448 <1> 2449 <1> align 2, db 0 2450 00008A58 [700C][780C][7C0C]- <1> reg32addr: dw reg_eax, reg_ecx, reg_edx, reg_ebx 2450 00008A5E [740C] <1> 2451 00008A60 [800C][840C][880C]- <1> dw reg_esp, reg_ebp, reg_esi, reg_edi 2451 00008A66 [8C0C] <1> 2452 <1> 2453 <1> align 2, db 0 2454 00008A68 [940C][9C0C][980C]- <1> segrgaddr: dw reg_es,reg_cs,reg_ss,reg_ds,reg_fs,reg_gs 2454 00008A6E [900C][A00C][A40C] <1> 2455 <1> 2456 <1> ; Tables for handling of named prefixes. 2457 <1> 2458 00008A74 262E363E6465 <1> prefixlist: db 26h,2Eh,36h,3Eh,64h,65h ; segment prefixes (in order) 2459 00008A7A 9BF0F2F3 <1> db 9Bh,0F0h,0F2h,0F3h ; WAIT,LOCK,REPNE,REPE 2460 00008A7E 6667 <1> db 066h,067h ; OSIZE, ASIZE 2461 <1> N_PREFIX: equ $ - prefixlist 2462 <1> 2463 <1> align 2, db 0 2464 00008A80 C309F90535082F08 <1> prefixmnem: dw MN_WAIT,MN_LOCK,MN_REPNE,MN_REPE 2465 00008A88 0C000200 <1> dw MN_O32,MN_A32 ; in 16-bit CS, OSIZE is O32 and ASIZE is A32 2466 <1> %if _PM 2467 00008A8C 11000700 <1> dw MN_O16,MN_A16 ; in 32-bit CS, OSIZE is O16 and ASIZE is A16 2468 <1> %endif 2469 <1> 2470 <1> %if _COND 2471 <1> align 2, db 0 2472 <1> cond_table: 2473 00008A90 0008 <1> dw 800h ; OF 2474 00008A92 0100 <1> dw 1 ; CF 2475 00008A94 4000 <1> dw 40h ; ZF 2476 00008A96 4100 <1> dw 41h ; CF | ZF 2477 00008A98 8000 <1> dw 80h ; SF 2478 00008A9A 0400 <1> dw 4 ; PF 2479 <1> ; dw cond_L_GE ; handled specifically 2480 <1> ; dw cond_LE_G ; handled specifically 2481 <1> %endif 2482 <1> 2483 <1> single_byte_opcodes_repeat_disassembly: 2484 <1> .: 2485 00008A9C 17 <1> db 17h ; pop ss 2486 00008A9D E6 <1> db 0E6h ; out imm8, al 2487 00008A9E E7 <1> db 0E7h ; out imm8, (e)ax 2488 00008A9F EE <1> db 0EEh ; out dx, al 2489 00008AA0 EF <1> db 0EFh ; out dx, (e)ax 2490 00008AA1 6E <1> db 06Eh ; outsb 2491 00008AA2 6F <1> db 06Fh ; outsw/outsd 2492 00008AA3 E4 <1> db 0E4h ; in al, imm8 2493 00008AA4 E5 <1> db 0E5h ; in (e)ax, imm8 2494 00008AA5 EC <1> db 0ECh ; in al, dx 2495 00008AA6 ED <1> db 0EDh ; in (e)ax, dx 2496 00008AA7 6C <1> db 06Ch ; insb 2497 00008AA8 6D <1> db 06Dh ; insw/insd 2498 00008AA9 F4 <1> db 0F4h ; hlt 2499 00008AAA FB <1> db 0FBh ; sti 2500 <1> .length: equ $ - . 2501 <1> 2502 <1> 2503 <1> usesection lDEBUG_CODE 2504 <1> 2505 <1> disasm: 2506 00004983 C606[098A]00 <1> mov byte [disrepeatcount], 0 ; number of repeated disassembly lines 2507 <1> 2508 <1> %if _MEMREF_AMOUNT 2509 00004988 B90400 <1> mov cx, _MEMREF_AMOUNT 2510 0000498B BF[A089] <1> mov di, memrefs 2511 <1> @@: 2512 0000498E E8190D <1> call init_one_memref 2513 00004991 E2FB <1> loop @B 2514 00004993 AB <1> stosw ; memrefs.free 2515 <1> %endif 2516 <1> 2517 <1> .preserve_disrepeatcount: 2518 <1> %if _COND 2519 00004994 8326[0C8A]00 <1> and word [condmsg], 0 ; initialize conditions message 2520 <1> %endif 2521 <1> .preserve_condmsg_and_disrepeatcount: 2522 00004999 8926[048A] <1> mov word [savesp2], sp 2523 0000499D 66 <1> _386_PM_o32 ; xor eax, eax 2524 0000499E 31C0 <1> xor ax, ax 2525 000049A0 66 <1> _386_PM_o32 ; mov dword [dis_n], eax 2526 000049A1 A3[E889] <1> mov word [dis_n], ax 2527 000049A4 A2[F089] <1> mov byte [disp8], al 2528 000049A7 A3[EC89] <1> mov word [preflags], ax ; clear preflags and preused 2529 000049AA C606[FF89]03 <1> mov byte [segmnt], 3 ; initially use DS segment 2530 000049AF C606[FE89]80 <1> mov byte [rmsize], 80h ; don't display any memory 2531 000049B4 A3[CA83] <1> mov word [dismach], ax ; no special machine needed, so far 2532 000049B7 8B1E[300B] <1> mov bx, word [u_addr + saSegSel] 2533 <1> %if _PM 2534 000049BB A2[0B8B] <1> mov byte [bCSAttr], al 2535 000049BE E87E15 <1> call test_d_b_bit 2536 000049C1 7405 <1> jz .16 2537 000049C3 C606[0B8B]40 <1> mov byte [bCSAttr], 40h 2538 <1> .16: 2539 <1> %endif 2540 <1> 2541 000049C8 E86111 <1> call disgetbyte ; get a byte of the instruction 2542 000049CB 3C9B <1> cmp al, 9Bh ; wait instruction (must be the first prefix) 2543 000049CD 7508 <1> jne da2 ; if not --> 2544 <1> 2545 <1> ; The wait instruction is actually a separate instruction as far as 2546 <1> ; the x86 is concerned, but we treat it as a prefix since there are 2547 <1> ; some mnemonics that incorporate it. But it has to be treated specially 2548 <1> ; since you can't do, e.g., seg cs wait ... but must do wait seg cs ... 2549 <1> ; instead. We'll catch it later if the wait instruction is not going to 2550 <1> ; be part of a shared mnemonic. 2551 <1> 2552 000049CF 800E[EC89]40 <1> or byte [preflags], PREWAIT 2553 <1> 2554 <1> ; If we've found a prefix, we return here for the actual instruction 2555 <1> ; (or another prefix). 2556 <1> 2557 <1> da1: 2558 000049D4 E85511 <1> call disgetbyte 2559 <1> da2: 2560 000049D7 A2[EF89] <1> mov [instru],al ; save away the instruction 2561 000049DA B400 <1> mov ah,0 2562 <1> 2563 <1> ; Now we have the sequence number of the instruction in AX. Look it up. 2564 <1> 2565 <1> da3: 2566 000049DC 89C3 <1> mov bx,ax 2567 000049DE A3[F289] <1> mov [index],ax ; save the compressed index 2568 000049E1 3DE001 <1> cmp ax,SPARSE_BASE 2569 000049E4 720A <1> jb da4 ; if it's not from the squeezed part of the table 2570 000049E6 8A9F[4812] <1> mov bl,[sqztab+bx-SPARSE_BASE] 2571 000049EA B700 <1> mov bh,0 2572 000049EC 81C3E001 <1> add bx,SPARSE_BASE ; bx = compressed index 2573 <1> 2574 <1> da4: 2575 000049F0 8A8F[500C] <1> mov cl, [optypes+bx]; cx = opcode type 2576 000049F4 B500 <1> mov ch, 0 2577 000049F6 D1E3 <1> shl bx, 1 2578 000049F8 8B9F[EE0E] <1> mov bx, [opinfo+bx] ; bx = other info (usually the mnemonic) 2579 000049FC 89CE <1> mov si, cx 2580 000049FE 89D8 <1> mov ax, bx 2581 00004A00 B10C <1> mov cl, 12 2582 00004A02 D3E8 <1> shr ax, cl 2583 00004A04 3A06[CA83] <1> cmp al, [dismach] 2584 00004A08 7203 <1> jb da5 ; if a higher machine is already required 2585 00004A0A A2[CA83] <1> mov [dismach], al ; set machine type 2586 <1> da5: 2587 00004A0D 80E70F <1> and bh, 0Fh ; remove the machine field 2588 00004A10 83FE0C <1> cmp si, OPTYPES_BASE 2589 00004A13 7360 <1> jae da13_unp ; if this is an actual instruction 2590 00004A15 F7C60100 <1> test si, 1 ; check whether valid displacement 2591 00004A19 7403E9F500 <1> jnz da_internal_error ; if not --> 2592 00004A1E FF94[0E8A] <1> call [disjmp+si] ; otherwise, do more specific processing 2593 00004A22 EBB8 <1> jmp s da3 ; back for more 2594 <1> 2595 <1> ; Two-byte instruction. 2596 <1> 2597 <1> da_twobyte: 2598 00004A24 E80511 <1> call disgetbyte 2599 00004A27 A2[EF89] <1> mov [instru],al 2600 00004A2A B400 <1> mov ah,0 2601 00004A2C 05E001 <1> add ax,SPARSE_BASE 2602 00004A2F C3 <1> ret 2603 <1> 2604 <1> ; Instruction group. 2605 <1> 2606 <1> da_insgrp: 2607 00004A30 E87B0F <1> call getregmem_r ; get the middle 3 bits of the R/M byte 2608 00004A33 98 <1> cbw 2609 00004A34 01D8 <1> add ax,bx ; offset 2610 00004A36 C3 <1> ret 2611 <1> 2612 <1> ; Coprocessor instruction. 2613 <1> 2614 <1> da_fpuins: 2615 00004A37 800E[068A]10 <1> or byte [disflags],DIS_I_SHOWSIZ 2616 00004A3C 800E[CB83]01 <1> or byte [dmflags],DM_COPR 2617 00004A41 E8740F <1> call getregmem 2618 00004A44 3CC0 <1> cmp al,0c0h 2619 00004A46 72E8 <1> jb da_insgrp ;range 00-bfh is same as an instruction group 2620 00004A48 B103 <1> mov cl,3 2621 00004A4A D2E8 <1> shr al,cl ;C0h --> 18h 2622 00004A4C 2C10 <1> sub al,18h-8 ;18h --> 8 2623 00004A4E 98 <1> cbw 2624 00004A4F 01D8 <1> add ax,bx ;offset 2625 00004A51 C3 <1> ret 2626 <1> 2627 <1> ; Coprocessor instruction group. 2628 <1> 2629 <1> da_fpugrp: 2630 00004A52 A0[C483] <1> mov al,[regmem] 2631 00004A55 2407 <1> and al,7 2632 00004A57 98 <1> cbw 2633 00004A58 01D8 <1> add ax,bx 2634 00004A5A C3 <1> ret 2635 <1> 2636 <1> ; Instruction prefix. At this point, bl = prefix bits; bh = segment 2637 <1> 2638 <1> da_insprf: 2639 00004A5B 841E[EC89] <1> test bl,[preflags] 2640 00004A5F 7511 <1> jnz da12 ; if there are duplicates 2641 00004A61 081E[EC89] <1> or [preflags],bl 2642 00004A65 F6C301 <1> test bl,PRESEG 2643 00004A68 7404 <1> jz da11 ; if not a segment 2644 00004A6A 883E[FF89] <1> mov [segmnt],bh ; save the segment 2645 <1> da11: 2646 00004A6E 58 <1> pop ax ; discard return address 2647 00004A6F E962FF <1> jmp da1 2648 <1> 2649 <1> da12: 2650 00004A72 E9CF0E <1> jmp disbad ; we don't allow duplicate prefixes 2651 <1> 2652 <1> ; si = index into table opindex, + OPTYPES_BASE 2653 <1> da13_unp: 2654 00004A75 83EE0C <1> sub si, OPTYPES_BASE ; = offset into opindex 2655 00004A78 31C0 <1> xor ax, ax 2656 00004A7A 8A84[2C16] <1> mov al, [si + opindex] ; ax = adjustment (from opindex) 2657 00004A7E 01F6 <1> add si, si ; take offset twice 2658 00004A80 4E <1> dec si ; subtract one 2659 00004A81 01C6 <1> add si, ax ; add in the adjustment 2660 <1> 2661 <1> ; OK. Here we go. This is an actual instruction. 2662 <1> ; bx = offset of mnemonic in mnlist 2663 <1> ; si = offset of operand list in oplists 2664 <1> ; First print the op mnemonic. 2665 <1> 2666 <1> da13: 2667 <1> %if _PM 2668 00004A83 A0[EC89] <1> mov al, byte [preflags] 2669 00004A86 2430 <1> and al, PREOSIZE | PREASIZE ; get OSIZE,ASIZE status (= O32,A32 in 16-bit cs) 2670 00004A88 F606[0B8B]40 <1> _386 test byte [bCSAttr], 40h ; in a 32-bit segment? 2671 00004A8D 7402 <1> _386 jz .16 ; no --> 2672 00004A8F 3430 <1> _386 xor al, PRE32D | PRE32A ; OSIZE,ASIZE present means O16,A16 2673 <1> .16: 2674 00004A91 A2[EE89] <1> mov byte [presizeflags], al ; set O32,A32 status 2675 <1> %endif 2676 00004A94 56 <1> push si 2677 00004A95 8DB7[9A01] <1> lea si,[mnlist+bx] ; offset of mnemonic 2678 00004A99 81FE[F101] <1> cmp si,mnlist+MN_BSWAP 2679 00004A9D 7505 <1> jne da13a ; if not BSWAP 2680 00004A9F E82010 <1> call dischk32d 2681 00004AA2 74CE <1> jz da12 ; if no operand-size prefix --> 2682 <1> da13a: 2683 00004AA4 E8590F <1> call showop ; print out the op code (at line_out+28) 2684 00004AA7 8326[0A8A]00 <1> and word [sizeloc], 0 ; clear out this flag 2685 00004AAC 5E <1> pop si ; recover list of operands (offset in oplists) 2686 00004AAD 81C6[0000] <1> add si, oplists ; -> actual oplist entry 2687 <1> 2688 <1> da14_check_end: 2689 00004AB1 803C00 <1> cmp byte [si], OP_END 2690 00004AB4 7503E98400 <1> je da_op_end_e ; if we're done --> 2691 <1> 2692 <1> ; Loop over operands. si-> next operand type. 2693 <1> ; Fortunately the operands appear in the instruction in the same 2694 <1> ; order as they appear in the disassembly output. 2695 <1> 2696 <1> da14: 2697 00004AB9 C606[088A]00 <1> mov byte [disflags2], 0 ; clear out size-related flags 2698 00004ABE AC <1> lodsb ; get the operand type 2699 00004ABF 3C40 <1> cmp al,OP_SIZE 2700 00004AC1 7259 <1> jb da18 ; if it's not size dependent 2701 00004AC3 C606[088A]20 <1> mov byte [disflags2],DIS_I_KNOWSIZ ;indicate variable size 2702 00004AC8 3CA0 <1> cmp al,OP_1632_DEFAULT 2703 00004ACA 7313 <1> jae da15_default 2704 00004ACC 3C60 <1> cmp al,OP_8 2705 00004ACE 7329 <1> jae da16 ; if the size is fixed (8, 16, 32, 64) 2706 00004AD0 3C50 <1> cmp al,OP_1632 2707 00004AD2 7317 <1> jae da15 ; if word or dword 2708 <1> ; OP_ALL here. This has a width of 2. 2709 <1> ; If the low bit is clear, this means 2710 <1> ; 8 bit, else 16/32 bits. 2711 00004AD4 B4FF <1> mov ah,-1 2712 00004AD6 F606[EF89]01 <1> test byte [instru],1 2713 00004ADB 7424 <1> jz da17 ; if byte --> 2714 00004ADD EB0C <1> jmp da15 2715 <1> da15_default: 2716 00004ADF F606[EC89]10 <1> test byte [preflags], PREOSIZE 2717 00004AE4 7505 <1> jnz da15 2718 00004AE6 800E[078A]01 <1> setopt [disflags], DIS_I_NOSIZ 2719 <1> da15: 2720 00004AEB 800E[ED89]10 <1> or byte [preused],PRE32D; mark this flag as used 2721 00004AF0 8A26[EE89] <1> mov ah,[presizeflags] 2722 00004AF4 80E410 <1> and ah,PRE32D ;this will be 10h for dword, 00h for word 2723 00004AF7 EB08 <1> jmp s da17 ;done 2724 <1> 2725 <1> da16: 2726 00004AF9 88C4 <1> mov ah,al ;OP_8, OP_16, OP_32 or OP_64 (we know which) 2727 00004AFB 80E4F0 <1> and ah,0f0h ;this converts ah to <0 for byte, =0 for word, 2728 00004AFE 80EC70 <1> sub ah,OP_16 ;and >0 for dword (byte=F0h, word=00h, dword=10h, qword=20h) 2729 <1> 2730 <1> ; Now we know the size (in ah); branch off to do the operand itself. 2731 <1> 2732 <1> da17: 2733 00004B01 88C3 <1> mov bl, al 2734 00004B03 83E30F <1> and bx, 0Fh ; 8 entries (IMM, RM, M, R_MOD, M_OFFS, R, R_ADD, AX) 2735 00004B06 D1E3 <1> shl bx, 1 2736 00004B08 83FB10 <1> cmp bx, disjmp2.end - disjmp2 2737 00004B0B 7306 <1> jae @F 2738 00004B0D FF97[2889] <1> call [disjmp2 + bx] ; print out the operand 2739 00004B11 EB27 <1> jmp short da20 ; done with operand 2740 <1> 2741 <1> @@: 2742 <1> da_internal_error: 2743 00004B13 BA[A672] <1> mov dx, msg.uu_internal_error 2744 00004B16 E81A75 <1> call putsz 2745 00004B19 E9E4B4 <1> jmp cmd3 2746 <1> 2747 <1> 2748 <1> ; Sizeless operands. 2749 <1> 2750 <1> da18: 2751 00004B1C 98 <1> cbw 2752 00004B1D 93 <1> xchg ax, bx ; bx = index 2753 00004B1E D1E3 <1> shl bx, 1 2754 00004B20 8B87[3889] <1> mov ax, [optab + bx] 2755 00004B24 83FB46 <1> cmp bx, OP_FIRST_STRING << 1 2756 00004B27 720F <1> jb da19 ; if it's not a string 2757 00004B29 83FB5C <1> cmp bx, OP_AFTER_LAST << 1 2758 00004B2C 73E5 <1> jae @B 2759 00004B2E E8260F <1> call dis_stosw_lowercase 2760 00004B31 84E4 <1> test ah, ah 2761 00004B33 7505 <1> jnz da20 ; if it's two characters 2762 00004B35 4F <1> dec di 2763 00004B36 EB02 <1> jmp s da20 ; done with operand 2764 <1> 2765 <1> da19: 2766 00004B38 FFD0 <1> call ax ; otherwise, do something else 2767 <1> 2768 <1> ; Operand done, check if there's another one. 2769 <1> da20: 2770 00004B3A 803C00 <1> cmp byte [si], OP_END 2771 <1> da_op_end_e: 2772 00004B3D 7410 <1> je da_op_end ; if we're done --> 2773 00004B3F B02C <1> mov al,',' 2774 00004B41 AA <1> stosb 2775 00004B42 F606[AC00]02 <1> testopt [asm_options], disasm_commablank 2776 00004B47 7403 <1> jz .nospace 2777 00004B49 B020 <1> mov al, 32 2778 00004B4B AA <1> stosb 2779 <1> .nospace: 2780 00004B4C E96AFF <1> jmp da14 ;another operand 2781 <1> 2782 <1> 2783 <1> ; All operands done. Now handle prefixes: 2784 <1> ; OPSIZE (66h), ADDRSIZE (67h), WAIT, segment, REP, LOCK 2785 <1> da_op_end: 2786 <1> 2787 <1> ; Now check whether O32 or A32 modifies the opcode. 2788 <1> da_modify_opcode_osize_asize: 2789 00004B4F B90200 <1> mov cx, N_LTABO 2790 00004B52 BB[C415] <1> mov bx, ltabo1 2791 00004B55 BA0200 <1> mov dx, 2*N_LTABO-2 2792 00004B58 B410 <1> mov ah, PRE32D 2793 00004B5A E87D00 <1> call da23_osize_asize 2794 <1> 2795 00004B5D B90100 <1> mov cx, N_LTABA 2796 00004B60 BB[CC15] <1> mov bx, ltaba1 2797 00004B63 BA0000 <1> mov dx, 2*N_LTABA-2 2798 00004B66 B420 <1> mov ah, PRE32A 2799 00004B68 E86F00 <1> call da23_osize_asize 2800 <1> 2801 <1> ; Now check and loop for unused prefixes. 2802 <1> da21: 2803 00004B6B A0[ED89] <1> mov al, [preused] ; = flags that are used 2804 00004B6E F6D0 <1> not al ; = flags that are not used 2805 00004B70 2206[EC89] <1> and al, [preflags] ; = flags that are not used but present 2806 00004B74 7503E92B01 <1> jz da28 ; if all present flags were used --> 2807 <1> 2808 00004B79 B90B00 <1> mov cx, N_WTAB 2809 00004B7C BB[9815] <1> mov bx, wtab1 2810 00004B7F BA1400 <1> mov dx, 2*N_WTAB-2 2811 00004B82 B440 <1> mov ah, PREWAIT 2812 00004B84 84E0 <1> test al, ah 2813 00004B86 7407 <1> jz @F 2814 <1> ; if there's a WAIT prefix hanging 2815 00004B88 E84B00 <1> call da23_wait 2816 00004B8B 7572 <1> jne disbad2 2817 00004B8D EBDC <1> jmp da21 2818 <1> 2819 <1> @@: 2820 00004B8F B420 <1> mov ah, PREASIZE 2821 00004B91 84E0 <1> test al, ah 2822 00004B93 746D <1> jz da24 ; if it isn't a 67h prefix --> 2823 <1> 2824 <1> ; check whether ASIZE applies to an implicit operand 2825 00004B95 57 <1> push di 2826 00004B96 50 <1> push ax 2827 00004B97 A1[F289] <1> mov ax, [index] 2828 00004B9A 84E4 <1> test ah, ah 2829 00004B9C 750D <1> jnz .nota32prfx_nz ; opcode index > FF, not in this list --> 2830 00004B9E BF[3811] <1> mov di, a32prfxtab 2831 00004BA1 AE <1> scasb ; xlatb ? 2832 00004BA2 7407 <1> je @F ; yes --> (ZR) 2833 00004BA4 24FE <1> and al, ~1 ; clear the low bit (MOVSW -> MOVSB) 2834 00004BA6 B90700 <1> mov cx, A32P_LEN - 1 2835 00004BA9 F2AE <1> repne scasb ; scan table (low bit cleared) 2836 <1> @@: 2837 <1> .nota32prfx_nz: 2838 00004BAB 58 <1> pop ax 2839 00004BAC 5F <1> pop di 2840 00004BAD 7550 <1> jne .nota32prfx ; not in the list --> 2841 <1> 2842 00004BAF 0826[ED89] <1> or [preused], ah ; mark it as used 2843 00004BB3 B104 <1> mov cl, 4 ; (ch = 0 because A32P_LEN < 256) 2844 00004BB5 E8C60F <1> call moveover ; make space for "A32 " 2845 00004BB8 B84133 <1> mov ax, "A3" 2846 00004BBB E8170E <1> call dis_lowercase ; al = "a" if lowercase option specified 2847 00004BBE A3[2A08] <1> mov word [line_out+MNEMONOFS], ax 2848 00004BC1 C706[2C08]3220 <1> mov word [line_out+MNEMONOFS+2], "2 " 2849 00004BC7 F606[EE89]20 <1> _386_PM test byte [presizeflags], PRE32A 2850 <1> _386_PM ; do we have 32-bit ASIZE ? 2851 00004BCC 7506 <1> _386_PM jnz da21_j0 ; yes, keep a32 (in 16-bit cs) --> 2852 00004BCE C706[2B08]3136 <1> _386_PM mov word [line_out + MNEMONOFS + 1], "16" 2853 <1> ; no, make it a16 (in 32-bit cs) 2854 <1> da21_j0: equ $ 2855 00004BD4 EB95 <1> jmp s da21 2856 <1> 2857 <1> .nota32prfx: equ disbad2 2858 <1> 2859 <1> 2860 <1> da23_osize_asize: equ da23 2861 <1> 2862 <1> da23_wait: 2863 <1> %if _PM 2864 00004BD6 0826[EE89] <1> or byte [presizeflags], ah 2865 <1> ; Fake that this flag is set for da23's check. 2866 <1> ; If not _PM then presizeflags == preflags and 2867 <1> ; PREWAIT is already set in that variable. 2868 <1> %endif 2869 <1> 2870 <1> ; INP: bx -> array of words to match against word [index] 2871 <1> ; cx = number of array entries 2872 <1> ; ah = preused flag to mark as used if match 2873 <1> ; ah = presizeflags flag to check if in use 2874 <1> ; dx = offset to add to di -> behind matched word 2875 <1> ; OUT: ZR if one of the array entries matched, 2876 <1> ; byte [preused] |= INP:ah 2877 <1> ; if also flag in byte [presizeflags] was set, 2878 <1> ; mnemonic replaced 2879 <1> ; NZ if no entry matched 2880 <1> ; CHG: ax, cx, si 2881 <1> ; 2882 <1> ; Note: If this is called with a 32-bit CS then the 2883 <1> ; OSIZE/ASIZE value in the byte [preflags] is 2884 <1> ; inverted to that in the byte [presizeflags]. 2885 <1> ; As we check the latter, for O16/A16 we will 2886 <1> ; not modify the mnemonics (keeping the 16-bit 2887 <1> ; default mnemonics) but will mark the prefix 2888 <1> ; as used by setting the flag in byte [preused]. 2889 <1> ; If there is no OSIZE/ASIZE in 32-bit CS then 2890 <1> ; the preused flag is also set (which does no 2891 <1> ; harm) and the 32-bit mnemonic is selected. 2892 <1> ; Operation in 16-bit CS has the same result as 2893 <1> ; the prior handling, though it will always 2894 <1> ; scan for the affected opcodes, and set the 2895 <1> ; preused flag even if no prefix is used. 2896 <1> da23: 2897 00004BDA 57 <1> push di 2898 00004BDB 89DF <1> mov di, bx 2899 00004BDD 50 <1> push ax 2900 00004BDE A1[F289] <1> mov ax, [index] 2901 00004BE1 F2AF <1> repne scasw 2902 00004BE3 58 <1> pop ax 2903 00004BE4 7517 <1> jne .ret ; if not found in the list --> (NZ) 2904 00004BE6 0826[ED89] <1> or byte [preused], ah ; mark this (OSIZE, ASIZE or WAIT) prefix as used 2905 00004BEA 8426[EE89] <1> test byte [presizeflags], ah 2906 <1> ; is it O32, A32, or is WAIT present ? 2907 00004BEE 740D <1> jz .ret ; no, do not modify mnemonic --> 2908 00004BF0 01D7 <1> add di, dx ; replace the mnemonic with the modified name 2909 00004BF2 8B35 <1> mov si, [di] 2910 00004BF4 81C6[9A01] <1> add si, mnlist 2911 00004BF8 E8050E <1> call showop ; copy instruction mnemonic 2912 00004BFB 38C0 <1> cmp al, al ; ZR 2913 <1> .ret: 2914 00004BFD 5F <1> pop di 2915 00004BFE C3 <1> retn 2916 <1> 2917 <1> 2918 <1> da21_j1: equ da21_j0 2919 <1> 2920 <1> disbad2: 2921 00004BFF E9420D <1> jmp disbad 2922 <1> 2923 <1> da24: 2924 00004C02 A801 <1> test al, PRESEG 2925 00004C04 7434 <1> jz da25 ; if not because of a segment prefix --> 2926 00004C06 A1[F289] <1> mov ax, [index] 2927 00004C09 84E4 <1> test ah, ah 2928 00004C0B 75F2 <1> jnz disbad2 ; if index > 256, it's none of these --> 2929 00004C0D 57 <1> push di 2930 00004C0E B90900 <1> mov cx, SEGP_LEN 2931 00004C11 BF[3011] <1> mov di, segprfxtab 2932 00004C14 F2AE <1> repne scasb 2933 00004C16 5F <1> pop di 2934 00004C17 75E6 <1> jne disbad2 ; if it's not on the list --> 2935 00004C19 B90300 <1> mov cx, 3 2936 00004C1C E85F0F <1> call moveover 2937 00004C1F 57 <1> push di 2938 00004C20 BF[2A08] <1> mov di, line_out+MNEMONOFS 2939 00004C23 E82E0E <1> call showseg ; show segment register 2940 00004C26 B03A <1> mov al, ':' 2941 00004C28 F606[AC00]04 <1> testopt [asm_options], disasm_nasm 2942 00004C2D 7402 <1> jz .notnasm 2943 00004C2F B020 <1> mov al, 32 2944 <1> .notnasm: 2945 00004C31 AA <1> stosb 2946 00004C32 5F <1> pop di 2947 00004C33 800E[ED89]01 <1> or byte [preused], PRESEG ; mark it as used 2948 <1> da21_j2: 2949 00004C38 EB9A <1> jmp s da21_j1 2950 <1> 2951 <1> da25: 2952 00004C3A A802 <1> test al, PREREP 2953 00004C3C 7435 <1> jz da26 ; if not a REP prefix 2954 00004C3E 2406 <1> and al, PREREP|PREREPZ 2955 00004C40 0806[ED89] <1> or [preused], al 2956 00004C44 A1[F289] <1> mov ax, [index] 2957 00004C47 84E4 <1> test ah, ah 2958 00004C49 7525 <1> jnz disbad3 ; if not in the first 256 bytes 2959 00004C4B 24FE <1> and al, ~1 ; clear the low bit (MOVSW -> MOVSB) 2960 00004C4D 57 <1> push di 2961 00004C4E BF[3911] <1> mov di, replist 2962 00004C51 B90500 <1> mov cx, REP_SAME_LEN; scan those for REP first 2963 00004C54 F2AE <1> repne scasb 2964 00004C56 BE[B709] <1> mov si, mnlist+MN_REP 2965 00004C59 7439 <1> je da27 ; if one of the REP instructions --> 2966 00004C5B B102 <1> mov cl, REP_DIFF_LEN; (ch = 0) 2967 00004C5D F2AE <1> repne scasb 2968 00004C5F 750F <1> jne disbad3 ; if not one of the REPE/REPNE instructions 2969 00004C61 BE[C909] <1> mov si, mnlist+MN_REPE 2970 00004C64 F606[ED89]04 <1> test byte [preused], PREREPZ 2971 00004C69 7529 <1> jnz da27 ; if REPE 2972 00004C6B BE[CF09] <1> mov si, mnlist+MN_REPNE 2973 00004C6E EB24 <1> jmp s da27 ; it's REPNE 2974 <1> 2975 <1> disbad3: 2976 00004C70 E9D10C <1> jmp disbad 2977 <1> 2978 <1> da26: 2979 00004C73 A808 <1> test al, PRELOCK 2980 00004C75 74F9 <1> jz disbad3 ; if not a lock prefix, either --> 2981 00004C77 57 <1> push di 2982 00004C78 A1[F289] <1> mov ax, [index] 2983 00004C7B BF[D015] <1> mov di, locktab 2984 00004C7E B92E00 <1> mov cx, N_LOCK 2985 00004C81 F2AF <1> repne scasw 2986 00004C83 75EB <1> jne disbad3 ; if not in the approved list --> 2987 00004C85 F606[ED89]01 <1> test byte [preused], PRESEG 2988 00004C8A 74E4 <1> jz disbad3 ; if memory was not accessed --> 2989 00004C8C BE[9307] <1> mov si, mnlist+MN_LOCK 2990 00004C8F 800E[ED89]08 <1> or byte [preused], PRELOCK 2991 <1> 2992 <1> ; Slip in another mnemonic (REP or LOCK). 2993 <1> ; SI = offset of mnemonic, what should be 2994 <1> ; DI is on the stack. 2995 <1> 2996 <1> da27: 2997 00004C94 5F <1> pop di 2998 00004C95 B90800 <1> mov cx, 8 2999 00004C98 56 <1> push si 3000 00004C99 E8E20E <1> call moveover 3001 00004C9C 5E <1> pop si 3002 00004C9D 57 <1> push di 3003 00004C9E E85F0D <1> call showop 3004 00004CA1 5F <1> pop di 3005 00004CA2 EB94 <1> jmp s da21_j2 3006 <1> 3007 <1> ; Done with instruction. Erase the size indicator, if appropriate. 3008 <1> 3009 <1> da28: 3010 00004CA4 8B0E[0A8A] <1> mov cx, [sizeloc] 3011 00004CA8 E324 <1> jcxz da28b ;if there was no size given 3012 00004CAA A0[068A] <1> mov al,[disflags] 3013 00004CAD A810 <1> test al,DIS_I_SHOWSIZ 3014 00004CAF 751D <1> jnz da28b ;if we need to show the size 3015 00004CB1 A820 <1> test al,DIS_I_KNOWSIZ 3016 00004CB3 7419 <1> jz da28b ;if the size is not known already 3017 00004CB5 87CF <1> xchg cx,di 3018 00004CB7 89FE <1> mov si,di ;save old di 3019 00004CB9 B020 <1> mov al, 32 3020 <1> da28a: 3021 00004CBB AE <1> scasb ;skip size name 3022 00004CBC 75FD <1> jne da28a ;if not done yet 3023 <1> ;(The above is the same as repne scasb, but 3024 <1> ;has no effect on cx.) 3025 00004CBE F606[AC00]04 <1> testopt [asm_options], disasm_nasm 3026 00004CC3 7503 <1> jnz .nasm 3027 00004CC5 83C704 <1> add di, byte 4 ;skip 'PTR ' 3028 <1> .nasm: 3029 00004CC8 87F7 <1> xchg si,di 3030 00004CCA 29F1 <1> sub cx,si 3031 00004CCC F3A4 <1> rep movsb ;move the line 3032 <1> 3033 <1> ; Now we're really done. Print out the bytes on the left. 3034 <1> 3035 <1> da28b: 3036 00004CCE 57 <1> push di ;print start of disassembly line 3037 00004CCF BF[0E08] <1> mov di,line_out 3038 00004CD2 A1[300B] <1> mov ax,[u_addr + saSegSel] 3039 <1> ; print address 3040 00004CD5 E8A46F <1> call hexword 3041 00004CD8 B03A <1> mov al,':' 3042 00004CDA AA <1> stosb 3043 00004CDB 66 <1> _386_PM_o32 ; mov eax, dword [u_addr] 3044 00004CDC A1[2C0B] <1> mov ax, word [u_addr] 3045 <1> %if _PM 3046 00004CDF F606[0B8B]40 <1> test byte [bCSAttr], 40h 3047 00004CE4 7403 <1> jz .16 3048 00004CE6 E8876F <1> call hexword_high 3049 <1> .16: 3050 <1> %endif 3051 00004CE9 E8906F <1> call hexword 3052 00004CEC B020 <1> mov al, 32 3053 00004CEE AA <1> stosb 3054 00004CEF 8B1E[E889] <1> mov bx, [dis_n] 3055 <1> da28c: 3056 00004CF3 BE[2908] <1> mov si,line_out+MNEMONOFS - 1 3057 00004CF6 29FE <1> sub si, di 3058 00004CF8 D1EE <1> shr si, 1 3059 00004CFA 39F3 <1> cmp bx, si 3060 00004CFC 7619 <1> jbe da29 ; if it's a short instruction which fits in one line 3061 00004CFE 29F3 <1> sub bx, si 3062 00004D00 53 <1> push bx 3063 00004D01 89F3 <1> mov bx, si 3064 00004D03 57 <1> push di 3065 00004D04 E85E0E <1> call disshowbytes 3066 00004D07 E8AA6F <1> call putsline_crlf 3067 00004D0A 59 <1> pop cx 3068 00004D0B 5B <1> pop bx 3069 00004D0C BF[0E08] <1> mov di, line_out 3070 00004D0F 29F9 <1> sub cx, di 3071 00004D11 B020 <1> mov al, 32 3072 00004D13 F3AA <1> rep stosb 3073 00004D15 EBDC <1> jmp short da28c 3074 <1> da29: 3075 00004D17 E84B0E <1> call disshowbytes 3076 <1> da30: 3077 00004D1A B020 <1> mov al, 32 ; pad to op code 3078 00004D1C B9[2A08] <1> mov cx,line_out+MNEMONOFS 3079 00004D1F 29F9 <1> sub cx,di 3080 00004D21 7202 <1> jc da30_1 3081 00004D23 F3AA <1> rep stosb 3082 <1> da30_1: 3083 00004D25 5F <1> pop di 3084 00004D26 F606[068A]08 <1> test byte [disflags],DIS_I_UNUSED 3085 00004D2B 740D <1> jz da32 ; if we don't print ` (unused)' 3086 00004D2D BE[377C] <1> mov si,unused 3087 00004D30 807DFF20 <1> cmp byte [di-1], 32 3088 00004D34 7501 <1> jne da31 ; if there's already a space here 3089 00004D36 46 <1> inc si 3090 <1> da31: 3091 00004D37 E8A36E <1> call showstring 3092 <1> 3093 <1> ; Print info on minimal processor needed. 3094 <1> 3095 <1> da32: 3096 00004D3A A0[CA83] <1> mov al, [dismach] 3097 00004D3D 3A06[F20B] <1> cmp al, [maxmachinetype] 3098 00004D41 7603 <1> jbe @F 3099 00004D43 A2[F20B] <1> mov [maxmachinetype], al 3100 <1> @@: 3101 00004D46 57 <1> push di 3102 00004D47 BF[F489] <1> mov di, obsinst 3103 00004D4A 8B0E[F289] <1> mov cx, word [index] 3104 00004D4E E87C0D <1> call showmach ;show the machine type, if needed 3105 00004D51 5F <1> pop di 3106 00004D52 E30F <1> jcxz da32f_j1 ; if no message --> 3107 <1> 3108 <1> ; Print a message on the far right. 3109 <1> 3110 <1> da32_tabto: 3111 00004D54 B8[5D08] <1> mov ax, line_out+79 3112 00004D57 29C8 <1> sub ax, cx 3113 00004D59 51 <1> push cx 3114 00004D5A E83C6F <1> call tab_to ; tab out to the location 3115 00004D5D 59 <1> pop cx 3116 00004D5E F3A4 <1> rep movsb ; copy the string 3117 <1> da32z_j1: 3118 00004D60 E97302 <1> jmp da32z ; done 3119 <1> 3120 <1> da32f_j1: 3121 00004D63 EB73 <1> jmp da32f 3122 <1> 3123 <1> %if _COND 3124 <1> ; Try dumping a condition status. 3125 <1> da32_cond: 3126 <1> %if _COND_RDUMP_ONLY 3127 00004D65 A802 <1> test al, DIS_F_SHOW ; (! DIS_F_SHOW|DIS_I_SHOW is negated here) 3128 00004D67 75F7 <1> jnz da32z_j1 ; not showing conditionals message --> 3129 <1> %endif 3130 00004D69 8B36[0C8A] <1> mov si, word [condmsg] 3131 00004D6D 85F6 <1> test si, si ; stored a message here ? 3132 00004D6F 74EF <1> jz da32z_j1 ; no --> 3133 00004D71 57 <1> push di 3134 00004D72 89F7 <1> mov di, si 3135 00004D74 B9FFFF <1> mov cx, -1 3136 00004D77 31C0 <1> xor ax, ax 3137 00004D79 F2AE <1> repne scasb 3138 00004D7B F7D9 <1> neg cx 3139 00004D7D 49 <1> dec cx 3140 00004D7E 49 <1> dec cx ; get string length 3141 00004D7F 5F <1> pop di 3142 00004D80 EBD2 <1> jmp short da32_tabto 3143 <1> %else 3144 <1> da32_cond: equ da32z_j1 3145 <1> %endif 3146 <1> 3147 <1> da32_xlatb: 3148 00004D82 A802 <1> test al, DIS_F_SHOW ; (! DIS_F_SHOW|DIS_I_SHOW is negated here) 3149 00004D84 75DF <1> jnz da32_cond 3150 00004D86 803E[FF89]03 <1> _no386 cmp byte [segmnt], 3 3151 00004D8B 77D8 <1> _no386 ja da32_cond ; if FS or GS on non-386 --> (invalid) 3152 00004D8D F606[EE89]20 <1> _no386 test byte [presizeflags], PRE32A 3153 00004D92 75D1 <1> _no386 jnz da32_cond 3154 00004D94 803E[FF89]05 <1> cmp byte [segmnt], 5 3155 00004D99 77CA <1> ja da32_cond ; if invalid segment --> 3156 00004D9B 813E[F289]D700 <1> cmp word [index], 0D7h ; xlatb ? 3157 00004DA1 75C2 <1> jne da32_cond 3158 00004DA3 A1[740C] <1> mov ax, word [reg_ebx] 3159 00004DA6 A3[008A] <1> mov word [addrr], ax 3160 00004DA9 A1[760C] <1> mov ax, word [reg_ebx + 2] 3161 00004DAC A3[028A] <1> mov word [addrr + 2], ax; get address in (e)bx 3162 00004DAF A0[700C] <1> mov al, byte [reg_eax] 3163 00004DB2 0006[008A] <1> add byte [addrr], al 3164 00004DB6 8016[018A]00 <1> adc byte [addrr + 1], 0 3165 00004DBB 8316[028A]00 <1> adc word [addrr + 2], 0 ; add al 3166 00004DC0 C606[FE89]80 <1> mov byte [rmsize], 80h ; byte size 3167 <1> %if _MEMREF_AMOUNT 3168 00004DC5 800E[078A]10 <1> setopt [disflags], DIS_I_M_SRC 3169 <1> %endif 3170 00004DCA F606[EE89]20 <1> test byte [presizeflags], PRE32A 3171 00004DCF 7425 <1> jz @F 3172 00004DD1 800E[078A]08 <1> setopt [disflags], DIS_I_SHOW_A32 3173 <1> ; set flag if 32-bit 3174 00004DD6 EB1E <1> jmp @F 3175 <1> 3176 <1> 3177 <1> ; Dump referenced memory location. 3178 <1> 3179 <1> da32f: 3180 00004DD8 A0[068A] <1> mov al,[disflags] 3181 00004DDB 3406 <1> xor al, DIS_F_SHOW | DIS_I_SHOW 3182 00004DDD A886 <1> test al, DIS_F_SHOW | DIS_I_SHOW | DIS_I_DONTSHOW 3183 <1> ; (NZ if either _SHOW is clear, or _DONTSHOW is set) 3184 00004DDF 75A1 <1> jnz da32_xlatb ; if there is no memory location to show --> 3185 00004DE1 803E[FF89]03 <1> _no386 cmp byte [segmnt], 3 3186 00004DE6 779A <1> _no386 ja da32_xlatb ; if FS or GS on non-386 --> (invalid) 3187 00004DE8 F606[078A]08 <1> _no386 testopt [disflags], DIS_I_SHOW_A32 3188 00004DED 7593 <1> _no386 jnz da32_xlatb 3189 00004DEF 803E[FF89]05 <1> cmp byte [segmnt], 5 3190 00004DF4 778C <1> ja da32_xlatb ; if invalid segment --> 3191 <1> @@: 3192 <1> %if _PM 3193 00004DF6 50 <1> push ax 3194 <1> %endif 3195 00004DF7 A0[FF89] <1> mov al, [segmnt] ; segment number 3196 00004DFA 98 <1> cbw 3197 00004DFB D1E0 <1> shl ax, 1 3198 00004DFD 93 <1> xchg ax, bx ; mov bx, ax 3199 00004DFE 8B9F[688A] <1> mov bx, [segrgaddr + bx]; get address of value 3200 <1> %if _PM 3201 00004E02 58 <1> pop ax 3202 00004E03 E8CF45 <1> call ispm 3203 00004E06 7508 <1> jnz @F ; if 86 Mode, all segments readable --> 3204 <1> [cpu 286] 3205 00004E08 0F0027 <1> verr word [bx] 3206 00004E0B 7403E955FF <1> jnz da32_cond ; (NOT to da32_xlatb) 3207 <1> __CPU__ 3208 <1> @@: 3209 <1> %endif 3210 00004E10 53 <1> push bx 3211 <1> %if _MEMREF_AMOUNT 3212 00004E11 FF37 <1> push word [bx] ; = segment/selector value 3213 00004E13 E84508 <1> call get_free_memref ; memrefs + bx -> the memref structure 3214 00004E16 8F87[A889] <1> pop word [memrefs + bx + mrSegmentSelector] 3215 00004E1A 808F[AA89]02 <1> or byte [memrefs + bx + mrFlags], mrfMem 3216 00004E1F F606[078A]10 <1> testopt [disflags], DIS_I_M_SRC 3217 00004E24 7405 <1> jz @F 3218 00004E26 808F[AA89]04 <1> or byte [memrefs + bx + mrFlags], mrfMemSource 3219 <1> @@: 3220 00004E2B F606[078A]20 <1> testopt [disflags], DIS_I_M_DST 3221 00004E30 7405 <1> jz @F 3222 00004E32 808F[AA89]08 <1> or byte [memrefs + bx + mrFlags], mrfMemDest 3223 <1> @@: 3224 <1> %endif 3225 <1> 3226 00004E37 B8[5408] <1> mov ax, line_out + 79 - 9 3227 <1> ; 9 is composed of: 3228 <1> ; 1 additional blank (added to the one that is 3229 <1> ; already given by tab_to in any case) 3230 <1> ; 3 segreg name + colon 3231 <1> ; 4 low word offset 3232 <1> ; 1 equals sign 3233 <1> ; 79 means we write to the very right of an 80-columns 3234 <1> ; display, up to the second-to-last column. 3235 00004E3A B90200 <1> mov cx, 2 ; if byte then content uses 2 digits 3236 <1> %if _MEMREF_AMOUNT 3237 00004E3D C687[AC89]01 <1> mov byte [memrefs + bx + mrLength], 1 3238 <1> ; if byte then length = 1 3239 <1> %endif 3240 00004E42 803E[FE89]00 <1> cmp byte [rmsize],0 3241 00004E47 7C10 <1> jl da32h ; if byte 3242 00004E49 7408 <1> jz da32g ; if word 3243 <1> %if _MEMREF_AMOUNT 3244 00004E4B 8087[AC89]02 <1> add byte [memrefs + bx + mrLength], 2 3245 <1> ; add 2 bytes to length for high half of dword 3246 <1> %endif 3247 00004E50 83C104 <1> add cx, byte 4 ; add 4 digits for high half of dword 3248 <1> da32g: 3249 <1> %if _MEMREF_AMOUNT 3250 00004E53 FE87[AC89] <1> inc byte [memrefs + bx + mrLength] 3251 <1> ; add 1 byte to length for the high byte 3252 <1> %endif 3253 00004E57 41 <1> inc cx 3254 00004E58 41 <1> inc cx ; add 2 digits for the high byte 3255 <1> da32h: 3256 00004E59 F606[078A]04 <1> testopt [disflags], DIS_I_DOUBLE_M 3257 00004E5E 740B <1> jz @F 3258 <1> %if _MEMREF_AMOUNT 3259 00004E60 8A97[AC89] <1> mov dl, byte [memrefs + bx + mrLength] 3260 00004E64 0097[AC89] <1> add byte [memrefs + bx + mrLength], dl 3261 <1> ; double the amount of bytes 3262 <1> %endif 3263 00004E68 01C9 <1> add cx, cx ; double the amount of digits 3264 00004E6A 41 <1> inc cx ; plus one slot for the comma 3265 <1> @@: 3266 00004E6B F606[078A]02 <1> testopt [disflags], DIS_I_FAR_M 3267 00004E70 7408 <1> jz @F 3268 <1> %if _MEMREF_AMOUNT 3269 00004E72 8087[AC89]02 <1> add byte [memrefs + bx + mrLength], 2 3270 <1> ; add 2 bytes to the length for the segment 3271 <1> %endif 3272 00004E77 83C105 <1> add cx, 5 ; 4 digits for segment plus 1 colon 3273 <1> @@: 3274 <1> %if _MEMREF_AMOUNT 3275 00004E7A FF36[008A] <1> push word [addrr] 3276 00004E7E 8F87[A489] <1> pop word [memrefs + bx + mrOffset] 3277 <1> %endif 3278 00004E82 F606[078A]08 <1> testopt [disflags], DIS_I_SHOW_A32 3279 00004E87 7410 <1> jz @F 3280 <1> %if _MEMREF_AMOUNT 3281 00004E89 FF36[028A] <1> push word [addrr + 2] 3282 00004E8D 8F87[A689] <1> pop word [memrefs + bx + mrOffset + 2] 3283 00004E91 808F[AA89]10 <1> or byte [memrefs + bx + mrFlags], mrfA32 3284 <1> %endif 3285 00004E96 83C104 <1> add cx, 4 ; add 4 digits for high word offset 3286 <1> @@: 3287 <1> %if _MEMREF_AMOUNT 3288 00004E99 E8DA07 <1> call calc_linear_memref_and_mark_nonfree 3289 <1> %endif 3290 00004E9C 29C8 <1> sub ax, cx 3291 00004E9E E8F86D <1> call tab_to ; CHG: ax, bx, cx, dx, di 3292 00004EA1 B020 <1> mov al, 32 3293 00004EA3 AA <1> stosb 3294 00004EA4 E8A10B <1> call showseg_uppercase_ax 3295 <1> ; ax = segment register name 3296 00004EA7 E83D0B <1> call dis_lowercase_refmem_w 3297 00004EAA AB <1> stosw 3298 00004EAB B03A <1> mov al, ':' 3299 00004EAD AA <1> stosb 3300 00004EAE F606[078A]08 <1> testopt [disflags], DIS_I_SHOW_A32 3301 00004EB3 7406 <1> jz @F 3302 00004EB5 A1[028A] <1> mov ax, [addrr + 2] 3303 00004EB8 E8C16D <1> call hexword ; show high word of offset 3304 <1> @@: 3305 00004EBB A1[008A] <1> mov ax, [addrr] 3306 00004EBE E8BB6D <1> call hexword ; show offset 3307 00004EC1 B03D <1> mov al,'=' 3308 00004EC3 AA <1> stosb 3309 00004EC4 5B <1> pop bx 3310 00004EC5 06 <1> push es 3311 00004EC6 8E07 <1> mov es, [bx] 3312 00004EC8 66 <1> _386_o32 3313 00004EC9 8B1E[008A] <1> mov bx, [addrr] 3314 <1> 3315 00004ECD F606[078A]02 <1> testopt [disflags], DIS_I_FAR_M 3316 00004ED2 743D <1> jz .no_far_m 3317 00004ED4 BE0100 <1> mov si, 1 3318 00004ED7 803E[FE89]00 <1> cmp byte [rmsize], 0 3319 00004EDC 7C08 <1> jl @F 3320 00004EDE BE0200 <1> mov si, 2 3321 00004EE1 7403 <1> jz @F 3322 00004EE3 BE0400 <1> mov si, 4 3323 <1> @@: 3324 00004EE6 F606[078A]08 <1> testopt [disflags], DIS_I_SHOW_A32 3325 00004EEB 7411 <1> jz @F 3326 <1> [cpu 386] 3327 00004EED 660FB7F6 <1> movzx esi, si 3328 00004EF1 26678A0433 <1> mov al, byte [es:ebx + esi] 3329 00004EF6 26678A643301 <1> mov ah, byte [es:ebx + esi + 1] 3330 <1> __CPU__ 3331 00004EFC EB07 <1> jmp @FF 3332 <1> @@: 3333 00004EFE 268A00 <1> mov al, byte [es:bx + si] 3334 00004F01 268A6001 <1> mov ah, byte [es:bx + si + 1] 3335 <1> @@: 3336 00004F05 8CC6 <1> mov si, es 3337 00004F07 07 <1> pop es 3338 00004F08 06 <1> push es 3339 00004F09 E8706D <1> call hexword 3340 00004F0C B03A <1> mov al, ':' 3341 00004F0E AA <1> stosb 3342 00004F0F 8EC6 <1> mov es, si 3343 <1> .no_far_m: 3344 <1> 3345 00004F11 8CC6 <1> mov si, es 3346 00004F13 F606[078A]08 <1> testopt [disflags], DIS_I_SHOW_A32 3347 00004F18 741E <1> jz @F 3348 <1> [cpu 386] 3349 00004F1A 26678A03 <1> mov al, [es:ebx] ; avoid a "mov ax,[-1]" 3350 00004F1E 803E[FE89]00 <1> cmp byte [rmsize], 0 3351 00004F23 7C38 <1> jl .displaybyte ; if byte --> 3352 00004F25 26678A6301 <1> mov ah, [es:ebx + 1] 3353 00004F2A 742B <1> jz .displayword ; if word --> 3354 00004F2C 26678A5302 <1> mov dl, [es:ebx + 2] ; avoid a "mov dx,[-1]" 3355 00004F31 26678A7303 <1> mov dh, [es:ebx + 3] 3356 <1> __CPU__ 3357 00004F36 EB18 <1> jmp .displaydword ; is dword --> 3358 <1> @@: 3359 00004F38 268A07 <1> mov al, [es:bx] ; avoid a "mov ax,[-1]" 3360 00004F3B 803E[FE89]00 <1> cmp byte [rmsize], 0 3361 00004F40 7C1B <1> jl .displaybyte ; if byte 3362 00004F42 268A6701 <1> mov ah, [es:bx + 1] 3363 00004F46 740F <1> jz .displayword ; if word 3364 00004F48 268A5702 <1> mov dl, [es:bx + 2] ; avoid a "mov dx,[-1]" 3365 00004F4C 268A7703 <1> mov dh, [es:bx + 3] 3366 <1> .displaydword: 3367 00004F50 07 <1> pop es 3368 00004F51 92 <1> xchg ax, dx 3369 00004F52 E8276D <1> call hexword 3370 00004F55 92 <1> xchg ax, dx 3371 00004F56 A8 <1> db __TEST_IMM8 ; (skip pop) 3372 <1> .displayword: 3373 00004F57 07 <1> pop es 3374 00004F58 E8216D <1> call hexword 3375 00004F5B EB04 <1> jmp short .displayed ; done 3376 <1> .displaybyte: 3377 00004F5D 07 <1> pop es 3378 00004F5E E8226D <1> call hexbyte ; display byte 3379 <1> .displayed: 3380 <1> 3381 00004F61 F606[078A]04 <1> testopt [disflags], DIS_I_DOUBLE_M 3382 00004F66 746E <1> jz .no_double_m 3383 <1> 3384 00004F68 B02C <1> mov al, ',' 3385 00004F6A AA <1> stosb 3386 <1> 3387 00004F6B 06 <1> push es 3388 00004F6C 8EC6 <1> mov es, si 3389 <1> 3390 00004F6E BE0100 <1> mov si, 1 3391 00004F71 803E[FE89]00 <1> cmp byte [rmsize], 0 3392 00004F76 7C08 <1> jl @F 3393 00004F78 BE0200 <1> mov si, 2 3394 00004F7B 7403 <1> jz @F 3395 00004F7D BE0400 <1> mov si, 4 3396 <1> @@: 3397 00004F80 F606[078A]08 <1> testopt [disflags], DIS_I_SHOW_A32 3398 00004F85 7426 <1> jz @F 3399 <1> [cpu 386] 3400 00004F87 660FB7F6 <1> movzx esi, si 3401 00004F8B 26678A0433 <1> mov al, [es:ebx + esi] ; avoid a "mov ax,[-1]" 3402 00004F90 803E[FE89]00 <1> cmp byte [rmsize], 0 3403 00004F95 7C3B <1> jl .double_displaybyte ; if byte --> 3404 00004F97 26678A643301 <1> mov ah, [es:ebx + esi + 1] 3405 00004F9D 742D <1> jz .double_displayword ; if word --> 3406 00004F9F 26678A543302 <1> mov dl, [es:ebx + esi + 2] 3407 <1> ; avoid a "mov dx,[-1]" 3408 00004FA5 26678A743303 <1> mov dh, [es:ebx + esi + 3] 3409 <1> __CPU__ 3410 00004FAB EB18 <1> jmp .double_displaydword 3411 <1> @@: 3412 00004FAD 268A00 <1> mov al, [es:bx + si] ; avoid a "mov ax,[-1]" 3413 00004FB0 803E[FE89]00 <1> cmp byte [rmsize], 0 3414 00004FB5 7C1B <1> jl .double_displaybyte ; if byte --> 3415 00004FB7 268A6001 <1> mov ah, [es:bx + si + 1] 3416 00004FBB 740F <1> jz .double_displayword ; if word --> 3417 00004FBD 268A5002 <1> mov dl, [es:bx + si + 2]; avoid a "mov dx,[-1]" 3418 00004FC1 268A7003 <1> mov dh, [es:bx + si + 3] 3419 <1> .double_displaydword: 3420 00004FC5 07 <1> pop es 3421 00004FC6 92 <1> xchg ax, dx 3422 00004FC7 E8B26C <1> call hexword 3423 00004FCA 92 <1> xchg ax, dx 3424 00004FCB A8 <1> db __TEST_IMM8 ; (skip pop) 3425 <1> .double_displayword: 3426 00004FCC 07 <1> pop es 3427 00004FCD E8AC6C <1> call hexword 3428 00004FD0 EB04 <1> jmp short .double_displayed 3429 <1> .double_displaybyte: 3430 00004FD2 07 <1> pop es 3431 00004FD3 E8AD6C <1> call hexbyte ; display byte 3432 <1> .double_displayed: 3433 <1> .no_double_m: 3434 <1> 3435 <1> da32z: 3436 00004FD6 E8D36C <1> call trimputs ; done with operand list 3437 <1> 3438 <1> %if _MEMREF_AMOUNT 3439 <1> set_string_memref: 3440 00004FD9 A1[F289] <1> mov ax, [index] 3441 00004FDC 84E4 <1> test ah, ah 3442 00004FDE 7403E9F100 <1> jnz .none 3443 00004FE3 BF[FB10] <1> mov di, ppbytes.string ; list of string opcodes 3444 00004FE6 B90E00 <1> mov cx, ppbytes.string_amount 3445 00004FE9 F2AE <1> repne scasb 3446 00004FEB 7403E9E400 <1> jne .none ; if not one of these --> 3447 <1> ; last entries are: 0A6h,0A7h,0AEh,0AFh 3448 <1> ; corresponding to cmpsb, cmpsw/d, scasb, scasw/d 3449 <1> ; so cx = 0 means scasw, = 1 scasb, = 2 cmpsw, = 3 cmpsb 3450 00004FF0 8A451F <1> mov al,byte [di+PPLEN-1]; get corresponding byte in ppinfo 3451 <1> 3452 00004FF3 31D2 <1> xor dx, dx 3453 00004FF5 FF36[780C] <1> push word [reg_ecx] 3454 00004FF9 8F06[E489] <1> pop word [string_memref_counter] 3455 00004FFD F606[EE89]20 <1> test byte [presizeflags], PRE32A 3456 00005002 7404 <1> jz @F ; if 16-bit addressing --> 3457 00005004 8B16[7A0C] <1> mov dx, [reg_ecx + 2] ; = ecxh value 3458 <1> @@: 3459 00005008 8916[E689] <1> mov word [string_memref_counter + 2], dx 3460 <1> 3461 0000500C 80F904 <1> cmp cl, 4 ; repetition differs for memory content ? 3462 0000500F 737B <1> jae @F ; no --> 3463 00005011 F606[EC89]02 <1> test byte [preflags], PREREP 3464 00005016 7474 <1> jz @F ; if not repeated --> 3465 <1> 3466 00005018 01C9 <1> add cx, cx ; 0 = scasd, 2 = scasb, 4 = cmpsd, 6 = cmpsb 3467 0000501A F606[EE89]10 <1> test byte [presizeflags], PRE32D 3468 0000501F 7501 <1> jnz .iso32 3469 00005021 41 <1> inc cx ; point to word entry, not dword 3470 <1> .iso32: 3471 <1> 3472 00005022 01C9 <1> add cx, cx ; table entries are words, so 0..14 3473 <1> 3474 00005024 F606[EC89]04 <1> test byte [preflags], PREREPZ 3475 00005029 7403 <1> jz .isrepne 3476 0000502B 83C110 <1> add cx, simulate_rep_sca_cmp.table_repe_offset 3477 <1> ; from 0..14 to 16..30 3478 <1> .isrepne: 3479 <1> 3480 0000502E 89CB <1> mov bx, cx ; = index into table 3481 00005030 8B97[AC8A] <1> mov dx, word [bx + simulate_rep_sca_cmp.table] 3482 <1> ; function to call 3483 00005034 F606[EE89]20 <1> test byte [presizeflags], PRE32A 3484 00005039 7401 <1> jz .isa16 ; if 16-bit addressing --> 3485 0000503B 4A <1> dec dx ; a32 prefix is 1 byte lower than table entry 3486 <1> .isa16: 3487 <1> 3488 0000503C 66 <1> _386_o32 3489 0000503D 8B36[880C] <1> mov si, word [reg_esi] 3490 00005041 66 <1> _386_o32 3491 00005042 8B3E[8C0C] <1> mov di, word [reg_edi] 3492 00005046 66 <1> _386_o32 3493 00005047 8B0E[780C] <1> mov cx, word [reg_ecx] 3494 0000504B 8E06[940C] <1> mov es, word [reg_es] 3495 0000504F 50 <1> push ax 3496 00005050 A810 <1> test al, PP_STRSRC ; cmps ? 3497 00005052 740D <1> jz .issca ; no, no need to load ds --> 3498 <1> 3499 00005054 A0[FF89] <1> mov al, [segmnt] ; segment number 3500 00005057 98 <1> cbw 3501 00005058 D1E0 <1> shl ax, 1 3502 0000505A 93 <1> xchg ax, bx ; mov bx, ax 3503 0000505B 8B9F[688A] <1> mov bx, word [segrgaddr + bx] 3504 <1> ; si = address of segment/selector reg 3505 0000505F 8E1F <1> mov ds, [bx] 3506 <1> 3507 <1> .issca: 3508 00005061 66 <1> _386_o32 3509 00005062 36A1[700C] <1> mov ax, word [ss:reg_eax] 3510 <1> 3511 00005066 36F606[AD0C]04 <1> testopt [ss:reg_efl], 400h 3512 <1> ; DF set ? 3513 0000506C 7401 <1> jz .up 3514 0000506E FD <1> std 3515 <1> .up: 3516 0000506F FFD2 <1> call dx ; simulate the repeated string op 3517 00005071 FC <1> cld 3518 00005072 16 <1> push ss 3519 00005073 1F <1> pop ds 3520 00005074 16 <1> push ss 3521 00005075 07 <1> pop es 3522 <1> 3523 00005076 6651 <1> _386 push ecx 3524 00005078 59 <1> _386 pop cx 3525 00005079 5A <1> _386 pop dx 3526 <1> 3527 0000507A F606[EE89]20 <1> _386 test byte [presizeflags], PRE32A 3528 0000507F 7502 <1> _386 jnz .count32 ; if 32-bit addressing --> 3529 00005081 31D2 <1> xor dx, dx 3530 <1> .count32: 3531 00005083 290E[E489] <1> sub word [string_memref_counter], cx 3532 00005087 1916[E689] <1> sbb word [string_memref_counter + 2], dx 3533 <1> 3534 0000508B 58 <1> pop ax 3535 <1> @@: 3536 <1> 3537 0000508C A810 <1> test al, PP_STRSRC 3538 0000508E 7429 <1> jz .no_src 3539 <1> 3540 00005090 803E[FF89]03 <1> _no386 cmp byte [segmnt], 3 3541 00005095 7722 <1> _no386 ja .no_src ; if FS or GS on non-386 --> (invalid) 3542 00005097 803E[FF89]05 <1> cmp byte [segmnt], 5 3543 0000509C 771B <1> ja .no_src ; if invalid segment --> 3544 <1> 3545 0000509E 50 <1> push ax 3546 0000509F A0[FF89] <1> mov al, [segmnt] ; segment number 3547 000050A2 98 <1> cbw 3548 000050A3 D1E0 <1> shl ax, 1 3549 000050A5 93 <1> xchg ax, bx ; mov bx, ax 3550 000050A6 58 <1> pop ax 3551 000050A7 8BB7[688A] <1> mov si, word [segrgaddr + bx] 3552 <1> ; si = address of segment/selector reg 3553 000050AB BF[880C] <1> mov di, reg_esi ; di = address of offset reg 3554 000050AE E80606 <1> call init_string_memref 3555 <1> @@: ; entry: set memref to string source and mark 3556 <1> ; (jump to .none afterwards if al is zero) 3557 000050B1 808F[AA89]60 <1> or byte [memrefs + bx + mrFlags], mrfString | mrfStringSource 3558 000050B6 E8BD05 <1> call calc_linear_memref_and_mark_nonfree 3559 <1> 3560 <1> .no_src: 3561 000050B9 A828 <1> test al, PP_STRDEST | PP_STRSRC2 3562 000050BB 7417 <1> jz .none 3563 000050BD BE[940C] <1> mov si, reg_es ; si = address of segment/selector reg 3564 000050C0 BF[8C0C] <1> mov di, reg_edi ; di = address of offset reg 3565 000050C3 E8F105 <1> call init_string_memref 3566 000050C6 A808 <1> test al, PP_STRSRC2 ; alternative string source ? 3567 000050C8 B000 <1> mov al, 0 ; (cause conditional branch to jump) 3568 000050CA 75E5 <1> jnz @B ; yes, set as string source --> 3569 000050CC 808F[AA89]A0 <1> or byte [memrefs + bx + mrFlags], mrfString | mrfStringDest 3570 000050D1 E8A205 <1> call calc_linear_memref_and_mark_nonfree 3571 <1> 3572 <1> .none: 3573 <1> 3574 <1> %if _DEBUG2 3575 <1> display_memrefs: 3576 <1> mov cx, [memrefs.free] 3577 <1> test cx, cx 3578 <1> jz .none 3579 <1> xor si, si 3580 <1> .loop: 3581 <1> mov bx, si 3582 <1> call get_memref_index_bx 3583 <1> mov ax, word [memrefs + bx + mrFlags] 3584 <1> mov dx, msg.memrefs_branchdirect 3585 <1> test al, mrfBranchDirect 3586 <1> jnz .gotmsg 3587 <1> mov dx, msg.memrefs_stringsource 3588 <1> test al, mrfStringSource 3589 <1> jnz .gotmsg 3590 <1> mov dx, msg.memrefs_stringdest 3591 <1> test al, mrfStringDest 3592 <1> jnz .gotmsg 3593 <1> mov dl, al 3594 <1> and dl, mrfMemSource | mrfMemDest 3595 <1> cmp dl, mrfMemSource | mrfMemDest 3596 <1> mov dx, msg.memrefs_memsourcedest 3597 <1> je .gotmsg 3598 <1> mov dx, msg.memrefs_memsource 3599 <1> test al, mrfMemSource 3600 <1> jnz .gotmsg 3601 <1> mov dx, msg.memrefs_memdest 3602 <1> test al, mrfMemDest 3603 <1> jnz .gotmsg 3604 <1> mov dx, msg.memrefs_mem_unknown 3605 <1> test al, mrfMem 3606 <1> jnz .gotmsg 3607 <1> mov dx, msg.memrefs_unknown 3608 <1> .gotmsg: 3609 <1> call putsz 3610 <1> 3611 <1> mov di, line_out 3612 <1> mov ax, word [memrefs + bx + mrSegmentSelector] 3613 <1> call hexword 3614 <1> push word [memrefs + bx + mrOffset] 3615 <1> mov al, ':' 3616 <1> stosb 3617 <1> %if 1 || _PM 3618 <1> mov ax, word [memrefs + bx + mrOffset + 2] 3619 <1> test byte [memrefs + bx + mrFlags], mrfA32 3620 <1> jz .16 3621 <1> call hexword 3622 <1> .16: 3623 <1> %endif 3624 <1> pop ax 3625 <1> call hexword 3626 <1> push si 3627 <1> push cx 3628 <1> mov si, msg.memrefs_length 3629 <1> call copy_single_counted_string 3630 <1> mov ax, word [memrefs + bx + mrLength + 2] 3631 <1> test ax, ax 3632 <1> jz @F 3633 <1> call hexword 3634 <1> @@: 3635 <1> mov ax, word [memrefs + bx + mrLength] 3636 <1> call hexword 3637 <1> call putsline_crlf 3638 <1> pop cx 3639 <1> pop si 3640 <1> 3641 <1> inc si 3642 <1> dec cx 3643 <1> jnz .loop 3644 <1> .none: 3645 <1> %endif ; _DEBUG2 3646 <1> %endif ; _MEMREF_AMOUNT 3647 <1> 3648 <1> da_repeat: 3649 000050D4 A0[068A] <1> mov al, [disflags] 3650 000050D7 A801 <1> test al, DIS_F_REPT 3651 000050D9 7437 <1> jz @FF ; if not repeating --> 3652 000050DB A808 <1> test al, DIS_I_UNUSED 3653 000050DD 751A <1> jnz @F ; if " (unused)" was displayed --> 3654 000050DF A840 <1> test al, DIS_I_MOV_SS 3655 000050E1 A1[F289] <1> mov ax, [index] 3656 000050E4 7405 <1> jz .not_mov_to_ss ; not mov to ss --> 3657 <1> 3658 <1> ; DIS_I_MOV_SS is set, check for wo[index] == 8Eh; 3659 <1> ; as we only want to match move *to* ss, not from (8Ch). 3660 000050E6 3D8E00 <1> cmp ax, 8Eh ; move to seg reg? 3661 000050E9 740E <1> je @F ; yes, it is mov to ss --> 3662 <1> 3663 <1> .not_mov_to_ss: 3664 000050EB 84E4 <1> test ah, ah 3665 000050ED 7524 <1> jnz .not_single_byte_opcode 3666 <1> 3667 000050EF BF[9C8A] <1> mov di, single_byte_opcodes_repeat_disassembly 3668 000050F2 B90F00 <1> mov cx, single_byte_opcodes_repeat_disassembly.length 3669 000050F5 F2AE <1> repne scasb 3670 000050F7 751A <1> jne @FFF 3671 <1> @@: 3672 000050F9 8326[068A]03 <1> and word [disflags], DIS_F_REPT|DIS_F_SHOW 3673 000050FE FE06[098A] <1> inc byte [disrepeatcount] 3674 00005102 803E[098A]10 <1> cmp byte [disrepeatcount], 16 3675 00005107 7303E988F8 <1> jb disasm.preserve_disrepeatcount 3676 <1> 3677 0000510C BA[7C72] <1> mov dx, msg.uu_too_many_repeat 3678 0000510F E8216F <1> call putsz 3679 <1> @@: 3680 00005112 C3 <1> retn 3681 <1> 3682 <1> @@: 3683 <1> .not_single_byte_opcode: 3684 <1> 3685 00005113 8A3E[F089] <1> mov bh, byte [disp8] 3686 00005117 3DEB00 <1> cmp ax, 0EBh ; unconditional short jump ? 3687 0000511A 74F6 <1> je @BB ; yes, return --> 3688 0000511C 66 <1> _386_PM_o32 ; and dword [dis_n], byte 0 3689 0000511D 8326[E889]00 <1> and word [dis_n], byte 0 3690 00005122 E8070A <1> call disgetbyte 3691 00005125 B302 <1> mov bl, 2 ; displacement to skip a jmp short 3692 00005127 3CEB <1> cmp al, 0EBh ; jmp short ? 3693 00005129 740F <1> je @F ; yes --> 3694 0000512B B303 <1> mov bl, 3 ; displacement to skip a 16-bit jmp near 3695 0000512D 3CE9 <1> cmp al, 0E9h ; jmp near ? 3696 0000512F 75E1 <1> jne @BB ; no, return --> 3697 <1> %if _PM 3698 00005131 F606[0B8B]40 <1> test byte [bCSAttr], 40h ; 32-bit code segment ? 3699 00005136 7402 <1> jz @F ; no, 16-bit, use displacement 3 --> 3700 00005138 B305 <1> mov bl, 5 ; displacement to skip a 32-bit jmp near 3701 <1> %endif 3702 <1> @@: 3703 0000513A 38DF <1> cmp bh, bl ; right displacement ? 3704 0000513C 75D4 <1> jne @BBB ; no --> 3705 <1> 3706 0000513E 8326[068A]03 <1> and word [disflags], DIS_F_REPT|DIS_F_SHOW 3707 00005143 8336[0C8A]0C <1> xor word [condmsg], (msg.condnotjump + DATASECTIONFIXUP) ^ (msg.condjump + DATASECTIONFIXUP) 3709 00005148 E94EF8 <1> jmp disasm.preserve_condmsg_and_disrepeatcount 3710 <1> 3711 <1> 3712 <1> %if _MEMREF_AMOUNT 3713 <1> simulate_rep_sca_cmp: 3714 <1> 3715 0000514B 67 <1> _386_a32 3716 <1> .repne_scasd: 3717 0000514C 66 <1> _386_o32 3718 0000514D F2 <1> repne 3719 0000514E AF <1> scasw 3720 0000514F C3 <1> retn 3721 <1> 3722 00005150 67 <1> _386_a32 3723 <1> .repne_scasw: 3724 00005151 F2AF <1> repne scasw 3725 00005153 C3 <1> retn 3726 <1> 3727 00005154 67 <1> _386_a32 3728 <1> .repne_scasb: 3729 00005155 F2AE <1> repne scasb 3730 00005157 C3 <1> retn 3731 <1> 3732 00005158 67 <1> _386_a32 3733 <1> .repne_cmpsd: 3734 00005159 66 <1> _386_o32 3735 0000515A F2 <1> repne 3736 0000515B A7 <1> cmpsw 3737 0000515C C3 <1> retn 3738 <1> 3739 0000515D 67 <1> _386_a32 3740 <1> .repne_cmpsw: 3741 0000515E F2A7 <1> repne cmpsw 3742 00005160 C3 <1> retn 3743 <1> 3744 00005161 67 <1> _386_a32 3745 <1> .repne_cmpsb: 3746 00005162 F2A6 <1> repne cmpsb 3747 00005164 C3 <1> retn 3748 <1> 3749 00005165 67 <1> _386_a32 3750 <1> .repe_scasd: 3751 00005166 66 <1> _386_o32 3752 00005167 F3 <1> repe 3753 00005168 AF <1> scasw 3754 00005169 C3 <1> retn 3755 <1> 3756 0000516A 67 <1> _386_a32 3757 <1> .repe_scasw: 3758 0000516B F3AF <1> repe scasw 3759 0000516D C3 <1> retn 3760 <1> 3761 0000516E 67 <1> _386_a32 3762 <1> .repe_scasb: 3763 0000516F F3AE <1> repe scasb 3764 00005171 C3 <1> retn 3765 <1> 3766 00005172 67 <1> _386_a32 3767 <1> .repe_cmpsd: 3768 00005173 66 <1> _386_o32 3769 00005174 F3 <1> repe 3770 00005175 A7 <1> cmpsw 3771 00005176 C3 <1> retn 3772 <1> 3773 00005177 67 <1> _386_a32 3774 <1> .repe_cmpsw: 3775 00005178 F3A7 <1> repe cmpsw 3776 0000517A C3 <1> retn 3777 <1> 3778 0000517B 67 <1> _386_a32 3779 <1> .repe_cmpsb: 3780 0000517C F3A6 <1> repe cmpsb 3781 0000517E C3 <1> retn 3782 <1> 3783 <1> 3784 <1> usesection lDEBUG_DATA_ENTRY 3785 00008AAB 00 <1> align 2, db 0 3786 <1> .table: 3787 00008AAC [4C51] <1> dw .repne_scasd 3788 00008AAE [5151] <1> dw .repne_scasw 3789 00008AB0 [5551] <1> dw .repne_scasb 3790 00008AB2 [5551] <1> dw .repne_scasb 3791 00008AB4 [5951] <1> dw .repne_cmpsd 3792 00008AB6 [5E51] <1> dw .repne_cmpsw 3793 00008AB8 [6251] <1> dw .repne_cmpsb 3794 00008ABA [6251] <1> dw .repne_cmpsb 3795 <1> .table_repe_offset: equ $ - .table 3796 00008ABC [6651] <1> dw .repe_scasd 3797 00008ABE [6B51] <1> dw .repe_scasw 3798 00008AC0 [6F51] <1> dw .repe_scasb 3799 00008AC2 [6F51] <1> dw .repe_scasb 3800 00008AC4 [7351] <1> dw .repe_cmpsd 3801 00008AC6 [7851] <1> dw .repe_cmpsw 3802 00008AC8 [7C51] <1> dw .repe_cmpsb 3803 00008ACA [7C51] <1> dw .repe_cmpsb 3804 <1> 3805 <1> usesection lDEBUG_CODE 3806 <1> %endif 3807 <1> 3808 <1> 3809 <1> ; Here are the routines for printing out the operands themselves. 3810 <1> ; Immediate data (OP_IMM) 3811 <1> 3812 <1> dop_imm: 3813 0000517F 80FC00 <1> cmp ah, 0 3814 00005182 7C17 <1> jl dop03 ; if just a byte --> 3815 00005184 9C <1> pushf 3816 00005185 F606[068A]10 <1> test byte [disflags], DIS_I_SHOWSIZ 3817 0000518A 7403 <1> jz .nosize ; if we don't need to show the size --> 3818 0000518C E8CD08 <1> call showsize 3819 <1> .nosize: 3820 0000518F E8B609 <1> call disgetword 3821 00005192 9D <1> popf ; ZF 3822 00005193 7503E9E46A <1> je hexword ; if just a word 3823 00005198 E90D09 <1> jmp disp32.ax 3824 <1> 3825 <1> dop03: 3826 0000519B E88E09 <1> call disgetbyte ; print immediate byte 3827 0000519E E9E26A <1> jmp hexbyte 3828 <1> 3829 <1> 3830 <1> ; Memory offset reference (OP_MOFFS) 3831 <1> 3832 <1> dop_moffs: 3833 000051A1 B005 <1> mov al, 5 3834 000051A3 F606[EE89]20 <1> test byte [presizeflags], PRE32A 3835 000051A8 7501 <1> jnz .32 ; if 32-bit addressing --> 3836 000051AA 40 <1> inc ax 3837 <1> .32: 3838 000051AB A2[C483] <1> mov [regmem], al 3839 000051AE EB0A <1> jmp s dop05 3840 <1> 3841 <1> 3842 <1> ; MOD R/M (OP_RM) 3843 <1> 3844 <1> dop_rm: 3845 000051B0 E80508 <1> call getregmem 3846 000051B3 3CC0 <1> cmp al,0c0h 3847 000051B5 7203E93F02 <1> jae dop33 ; if pure register reference --> 3848 <1> 3849 <1> dop05: ; <--- used by OP_M, OP_M64, OP_M80, OP_MOFFS 3850 000051BA 8826[FE89] <1> mov byte [rmsize], ah ; save r/m size 3851 000051BE F606[078A]01 <1> testopt [disflags], DIS_I_NOSIZ 3852 000051C3 7506 <1> jnz @F 3853 000051C5 E89408 <1> call showsize ; print out size 3854 000051C8 E8C808 <1> call showptr ; append "PTR " (if not NASM syntax) 3855 <1> @@: 3856 <1> dop06: ; <--- used by OP_MXX, OP_MFLOAT, OP_MDOUBLE 3857 000051CB 800E[ED89]01 <1> or byte [preused],PRESEG ; needed even if there's no segment override 3858 <1> ; because handling of LOCK prefix relies on it 3859 000051D0 B05B <1> mov al, '[' 3860 000051D2 E80202 <1> call stosb_nasm 3861 <1> 3862 000051D5 F606[EC89]01 <1> test byte [preflags],PRESEG 3863 000051DA 7406 <1> jz dop07 ;if no segment override 3864 000051DC E87508 <1> call showseg ;print segment name 3865 000051DF B03A <1> mov al,':' 3866 000051E1 AA <1> stosb 3867 <1> dop07: 3868 000051E2 A0[C483] <1> mov al,[regmem] 3869 000051E5 24C7 <1> and al,0c7h 3870 000051E7 800E[ED89]20 <1> or byte [preused],PREASIZE 3871 000051EC F606[EE89]20 <1> test byte [presizeflags],PRE32A 3872 000051F1 7403E9AF00 <1> jnz dop18 ;if 32-bit addressing 3873 000051F6 800E[068A]04 <1> or byte [disflags],DIS_I_SHOW ;we'd like to show this address 3874 000051FB 8326[008A]00 <1> and word [addrr], 0 ; zero out the address initially 3875 00005200 93 <1> xchg ax,bx ;mov bx,ax 3876 00005201 E8C601 <1> call store_opensqubracket 3877 00005204 80FB06 <1> cmp bl,6 3878 00005207 7503E98B00 <1> je dop16 ;if [xxxx] 3879 0000520C 83E307 <1> and bx,7 3880 0000520F 8A9F[1A8A] <1> mov bl,[rmtab+bx] 3881 00005213 F6C308 <1> test bl,8 3882 00005216 7525 <1> jnz dop09 ;if BX 3883 00005218 F6C304 <1> test bl,4 3884 0000521B 7436 <1> jz dop11 ;if not BP 3885 0000521D B84250 <1> mov ax,'BP' 3886 00005220 8B0E[840C] <1> mov cx,[reg_ebp] 3887 00005224 E80A00 <1> call da_set_default_ss 3888 00005227 EB1B <1> jmp dop10 3889 <1> 3890 <1> 3891 <1> ; INP: al = 2 * register number 3892 <1> ; [preflags] & PRESEG set if segment overridden 3893 <1> ; else, 3894 <1> ; byte [segmnt] = initialised to 3 (ds) 3895 <1> ; OUT: no action if register number not for esp or ebp 3896 <1> ; no action if segment overridden 3897 <1> ; otherwise, 3898 <1> ; byte [segmnt] -= 1, resulting in 2 (ss) 3899 <1> da_set_default_ss_if_esp_ebp: 3900 00005229 3C08 <1> cmp al, 2 * 4 3901 0000522B 7404 <1> je @F 3902 0000522D 3C0A <1> cmp al, 2 * 5 3903 0000522F 750B <1> jne @FF 3904 <1> @@: 3905 <1> da_set_default_ss: 3906 00005231 F606[EC89]01 <1> test byte [preflags], PRESEG 3907 00005236 7504 <1> jnz @F ; if segment override --> 3908 00005238 FE0E[FF89] <1> dec byte [segmnt] ; default is now SS 3909 <1> @@: 3910 0000523C C3 <1> retn 3911 <1> 3912 <1> 3913 <1> dop09: 3914 0000523D B84258 <1> mov ax,'BX' ;BX 3915 00005240 8B0E[740C] <1> mov cx,[reg_ebx] 3916 <1> 3917 <1> dop10: 3918 00005244 890E[008A] <1> mov [addrr],cx ;print it out, etc. 3919 00005248 E80C08 <1> call dis_stosw_lowercase 3920 0000524B F6C303 <1> test bl,2+1 3921 0000524E 741C <1> jz dop13 ;if done 3922 00005250 B02B <1> mov al,'+' 3923 00005252 AA <1> stosb 3924 <1> dop11: 3925 00005253 B85349 <1> mov ax,'SI' 3926 00005256 8B0E[880C] <1> mov cx,[reg_esi] 3927 0000525A F6C301 <1> test bl,1 3928 0000525D 7406 <1> jz dop12 ;if SI 3929 0000525F B044 <1> mov al,'D' ;DI 3930 00005261 8B0E[8C0C] <1> mov cx,[reg_edi] 3931 <1> 3932 <1> dop12: 3933 00005265 010E[008A] <1> add [addrr], cx ; print it out, etc. 3934 00005269 E8EB07 <1> call dis_stosw_lowercase 3935 <1> dop13: 3936 0000526C F606[C483]C0 <1> test byte [regmem], 0C0h 3937 00005271 742E <1> jz s dop17 ; if no displacement --> 3938 00005273 F606[C483]80 <1> test byte [regmem], 80h 3939 00005278 751A <1> jnz dop15 ; if word displacement --> 3940 0000527A E8AF08 <1> call disgetbyte 3941 0000527D 98 <1> cbw 3942 0000527E 0106[008A] <1> add [addrr], ax 3943 00005282 3C00 <1> cmp al, 0 3944 00005284 B42B <1> mov ah, '+' 3945 00005286 7D04 <1> jge dop14 ; if not negative --> 3946 00005288 B42D <1> mov ah, '-' 3947 0000528A F6D8 <1> neg al 3948 <1> dop14: 3949 0000528C 8825 <1> mov [di], ah 3950 0000528E 47 <1> inc di 3951 0000528F E8F169 <1> call hexbyte ; print the byte displacement 3952 00005292 EB0D <1> jmp s dop17 ; done --> 3953 <1> 3954 <1> dop15: 3955 00005294 B02B <1> mov al, '+' 3956 00005296 AA <1> stosb 3957 <1> dop16: 3958 00005297 E8AE08 <1> call disgetword 3959 0000529A 0106[008A] <1> add [addrr], ax 3960 0000529E E8DB69 <1> call hexword ; print word displacement 3961 <1> 3962 <1> dop17: 3963 000052A1 B05D <1> mov al, ']' 3964 000052A3 AA <1> stosb 3965 000052A4 C3 <1> retn 3966 <1> 3967 <1> ; 32-bit MOD REG R/M addressing. 3968 <1> 3969 <1> dop18: 3970 000052A5 810E[068A]0408 <1> or word [disflags], DIS_I_SHOW | DIS_I_SHOW_A32 3971 000052AB 8326[008A]00 <1> and word [addrr], 0 3972 000052B0 8326[028A]00 <1> and word [addrr + 2], 0 ; zero out the address initially 3973 000052B5 3C05 <1> cmp al, 5 ; mod=0 and r/m=5 ? 3974 000052B7 7503E98200 <1> je dop19 ; yes, just a disp32 address --> 3975 000052BC 50 <1> push ax 3976 000052BD 2407 <1> and al, 7 3977 000052BF 3C04 <1> cmp al, 4 3978 000052C1 7506 <1> jne dop20 ; if no SIB --> 3979 000052C3 E86608 <1> call disgetbyte ; get and save it 3980 000052C6 A2[C583] <1> mov [sibbyte], al 3981 <1> dop20: 3982 000052C9 58 <1> pop ax 3983 000052CA A880 <1> test al, 80h 3984 000052CC 7538 <1> jnz dop22 ; if disp32 --> 3985 000052CE A840 <1> test al, 40h 3986 000052D0 743A <1> jz dop23 ; if no disp8 --> 3987 000052D2 E85708 <1> call disgetbyte 3988 <1> 3989 000052D5 98 <1> cbw 3990 000052D6 99 <1> cwd 3991 000052D7 0106[008A] <1> add word [addrr], ax 3992 000052DB 1116[028A] <1> adc word [addrr + 2], dx 3993 <1> 3994 000052DF 3C00 <1> cmp al, 0 3995 000052E1 7D06 <1> jge dop21 ; if not negative --> 3996 000052E3 F6D8 <1> neg al 3997 000052E5 C6052D <1> mov byte [di], '-' 3998 000052E8 47 <1> inc di 3999 <1> dop21: 4000 000052E9 E89769 <1> call hexbyte 4001 000052EC EB1B <1> jmp s dop22a ; done --> 4002 <1> 4003 <1> disp32_add_to_addrr: 4004 000052EE E85708 <1> call disgetword 4005 000052F1 0106[008A] <1> add word [addrr], ax 4006 000052F5 50 <1> push ax 4007 000052F6 9C <1> pushf 4008 000052F7 E84E08 <1> call disgetword 4009 000052FA 9D <1> popf 4010 000052FB 1106[028A] <1> adc word [addrr + 2], ax 4011 000052FF E87A69 <1> call hexword 4012 00005302 58 <1> pop ax 4013 00005303 E97669 <1> jmp hexword 4014 <1> 4015 <1> dop22: 4016 00005306 E8E5FF <1> call disp32_add_to_addrr 4017 <1> ; print disp32 4018 <1> 4019 <1> dop22a: 4020 00005309 E8C900 <1> call store_plus 4021 <1> 4022 <1> dop23: 4023 0000530C A0[C483] <1> mov al,[regmem] 4024 0000530F 2407 <1> and al,7 4025 00005311 3C04 <1> cmp al,4 4026 00005313 7403E99800 <1> jne dop28 ;if no SIB 4027 00005318 A0[C583] <1> mov al, [sibbyte] 4028 0000531B 88C4 <1> mov ah, al 4029 0000531D 250738 <1> and ax, 00_111_000_00_000_111b 4030 <1> ; ah = index << 3, al = base 4031 00005320 80FC20 <1> cmp ah, 4 << 3 ; index encodes esp ? 4032 00005323 7414 <1> je dop_sib_index_4 ; yes, use base only --> 4033 <1> ; When this branch is taken, the scale is ignored. 4034 <1> ; This is typically used only for encoding [esp] 4035 <1> ; and [esp + x] but is a valid encoding even for 4036 <1> ; other base registers. So better support it. 4037 <1> ; (This used to be a special case for SIB == 24h 4038 <1> ; only because it doesn't usually occur else. 4039 <1> ; The other cases were rejected in dop25.) 4040 <1> 4041 00005325 E80700 <1> call dop_is_mod_0_and_base_5 4042 00005328 7539 <1> jnz dop24 ; if not mod=0 base=5 --> 4043 0000532A E8C1FF <1> call disp32_add_to_addrr; show 32-bit displacement instead of [EBP] 4044 0000532D EB45 <1> jmp dop25 ; and handle the scale and index --> 4045 <1> 4046 <1> 4047 <1> ; INP: al = low 3 bits of SIB byte (= base) 4048 <1> ; byte [regmem] = ModR/M byte 4049 <1> ; OUT: NZ if not mod=0 base=5 special case 4050 <1> ; ZR else 4051 <1> ; REM: base=5 usually encodes [ebp], and mod=0 4052 <1> ; usually encodes no displacement field. 4053 <1> ; If both are true however, then the 4054 <1> ; special case is true: there is no base 4055 <1> ; register and a 32-bit displacement. 4056 <1> dop_is_mod_0_and_base_5: 4057 0000532F 3C05 <1> cmp al, 5 4058 00005331 7505 <1> jne @F ; NZ if not base=5 --> 4059 00005333 F606[C483]C0 <1> test byte [regmem], 1100_0000b 4060 <1> ; NZ if not mod=0 4061 <1> @@: 4062 00005338 C3 <1> retn 4063 <1> 4064 <1> 4065 <1> dop_sib_index_4: 4066 <1> ; The mod=0 base=5 special case and the 4067 <1> ; index=4 special case can occur both 4068 <1> ; together. That is a SIB encoding of 4069 <1> ; a 32-bit displacement without any 4070 <1> ; index or base registers. 4071 <1> ; 4072 <1> ; This was noted on stackoverflow.com by 4073 <1> ; Peter Cordes: "x86-32 has 2 redundant 4074 <1> ; ways to encode [0x123456], i.e. no-base 4075 <1> ; + disp32: with or without a SIB byte, 4076 <1> ; because SIB has an encoding for no-base 4077 <1> ; and no-index." (There is a use for this 4078 <1> ; distinction and thus the SIB form only 4079 <1> ; in 64-bit mode but it is accepted as a 4080 <1> ; valid alternative encoding even for us.) 4081 <1> ; 4082 <1> ; - https://stackoverflow.com/questions/48124293/can-rip-be-used-with-another-register-with-rip-relative-addressing/48125453#48125453 4083 00005339 E8F3FF <1> call dop_is_mod_0_and_base_5 4084 0000533C 7572 <1> jnz dop28 ; if not mod=0 base=5 --> 4085 <1> ; fall through to dop19 4086 <1> 4087 <1> dop19: 4088 0000533E E88900 <1> call store_opensqubracket 4089 00005341 E8AAFF <1> call disp32_add_to_addrr 4090 <1> ; display 32-bit offset 4091 <1> dop17_j1: 4092 00005344 E95AFF <1> jmp dop17 4093 <1> 4094 <1> add_reg32_to_addrr: 4095 00005347 B90100 <1> mov cx, 1 4096 <1> add_reg32_times_cx_to_addrr: 4097 0000534A 50 <1> push ax 4098 0000534B 53 <1> push bx 4099 0000534C 93 <1> xchg ax, bx 4100 0000534D 8B9F[588A] <1> mov bx, word [reg32addr + bx] 4101 <1> @@: 4102 00005351 8B07 <1> mov ax, word [bx] 4103 00005353 0106[008A] <1> add word [addrr], ax 4104 00005357 8B4702 <1> mov ax, word [bx + 2] 4105 0000535A 1106[028A] <1> adc word [addrr + 2], ax 4106 0000535E E2F1 <1> loop @B 4107 00005360 5B <1> pop bx 4108 00005361 58 <1> pop ax 4109 00005362 C3 <1> retn 4110 <1> 4111 <1> dop24: 4112 00005363 E85800 <1> call store_opensqubracket_e 4113 00005366 E84A07 <1> call showreg16 ; show 16-bit register name (number in AL) 4114 00005369 E8BDFE <1> call da_set_default_ss_if_esp_ebp 4115 0000536C E8D8FF <1> call add_reg32_to_addrr 4116 0000536F B05D <1> mov al, ']' 4117 00005371 E85800 <1> call stosb_notnasm 4118 <1> dop25: 4119 00005374 E85E00 <1> call store_plus 4120 <1> 4121 00005377 A0[C583] <1> mov al, [sibbyte] 4122 0000537A E83406 <1> call da_get_bits_3_to_5 ; al = index 4123 <1> ; (In dop23 we already checked this is not = 4 4124 <1> ; which is a special escaping encoding.) 4125 <1> 4126 0000537D E83E00 <1> call store_opensqubracket_e 4127 <1> 4128 00005380 8A26[C583] <1> mov ah, [sibbyte] 4129 00005384 B90100 <1> mov cx, 1 4130 00005387 F6C4C0 <1> test ah, 0C0h 4131 0000538A 740F <1> jz @F 4132 0000538C 41 <1> inc cx 4133 0000538D F6C480 <1> test ah, 80h 4134 00005390 7409 <1> jz @F 4135 00005392 B104 <1> mov cl, 4 4136 00005394 F6C440 <1> test ah, 40h 4137 00005397 7402 <1> jz @F 4138 00005399 B108 <1> mov cl, 8 4139 <1> @@: 4140 <1> 4141 0000539B E81507 <1> call showreg16 4142 0000539E 51 <1> push cx 4143 0000539F E8A8FF <1> call add_reg32_times_cx_to_addrr 4144 000053A2 59 <1> pop cx 4145 000053A3 49 <1> dec cx ; = 0-based scale 4146 000053A4 7408 <1> jz dop27 ; if scale == 1 (S=00b) --> 4147 000053A6 B02A <1> mov al, '*' 4148 000053A8 AA <1> stosb 4149 000053A9 88C8 <1> mov al, cl 4150 000053AB 0431 <1> add al, '1' ; from 0-based to '1'-based 4151 <1> dop26: 4152 000053AD AA <1> stosb 4153 <1> dop27: 4154 <1> dop17_j2: 4155 000053AE EB94 <1> jmp s dop17_j1 4156 <1> 4157 <1> ; 32-bit addressing without SIB 4158 <1> 4159 <1> dop28: 4160 000053B0 E80B00 <1> call store_opensqubracket_e 4161 000053B3 E8FD06 <1> call showreg16 4162 000053B6 E870FE <1> call da_set_default_ss_if_esp_ebp 4163 000053B9 E88BFF <1> call add_reg32_to_addrr 4164 000053BC EBF0 <1> jmp short dop27 4165 <1> 4166 <1> ; Store '[' if not NASM syntax, 4167 <1> ; then (regardless of syntax) store 'E' 4168 <1> ; INP: di-> buffer 4169 <1> ; OUT: di-> behind "[E" or 'E' 4170 <1> ; CHG: - 4171 <1> ; 4172 <1> ; The 'E' is lowercased if that option is selected. 4173 <1> store_opensqubracket_e: 4174 000053BE 50 <1> push ax 4175 000053BF E80800 <1> call store_opensqubracket 4176 000053C2 B045 <1> mov al, 'E' 4177 000053C4 E80E06 <1> call dis_lowercase 4178 000053C7 AA <1> stosb 4179 000053C8 58 <1> pop ax 4180 000053C9 C3 <1> retn 4181 <1> 4182 <1> ; Store '[' if not NASM syntax 4183 <1> ; INP: di-> buffer 4184 <1> ; OUT: di-> behind '[' if not NASM syntax 4185 <1> ; CHG: al 4186 <1> store_opensqubracket: 4187 000053CA B05B <1> mov al, '[' 4188 <1> 4189 <1> ; Store al if not NASM syntax 4190 <1> ; INP: di-> buffer 4191 <1> ; OUT: di-> behind stored byte if not NASM syntax 4192 <1> ; CHG: - 4193 <1> stosb_notnasm: 4194 000053CC F606[AC00]04 <1> testopt [asm_options], disasm_nasm 4195 000053D1 7501 <1> jnz .ret 4196 000053D3 AA <1> stosb 4197 000053D4 C3 <1> .ret: retn 4198 <1> 4199 <1> ; Store '+' if NASM syntax 4200 <1> ; INP: di-> buffer 4201 <1> ; OUT: di-> behind '+' if NASM syntax 4202 <1> ; CHG: al 4203 <1> store_plus: 4204 000053D5 B02B <1> mov al, '+' 4205 <1> 4206 <1> ; Store al if NASM syntax 4207 <1> ; INP: di-> buffer 4208 <1> ; OUT: di-> behind stored byte if NASM syntax 4209 <1> ; CHG: - 4210 <1> stosb_nasm: 4211 000053D7 F606[AC00]04 <1> testopt [asm_options], disasm_nasm 4212 000053DC 7401 <1> jz .ret 4213 000053DE AA <1> stosb 4214 000053DF C3 <1> .ret: retn 4215 <1> 4216 <1> 4217 <1> ; Memory-only reference (OP_M) 4218 <1> 4219 <1> dop_m: 4220 000053E0 E8D505 <1> call getregmem 4221 000053E3 3CC0 <1> cmp al, 0C0h 4222 000053E5 7303E9D0FD <1> jb dop05 ; if it's what we expect --> 4223 <1> 4224 <1> ; it's a register reference 4225 000053EA E95705 <1> disbad1:jmp disbad ; this is not supposed to happen --> 4226 <1> 4227 <1> ; Register reference from MOD R/M part (OP_R_MOD) 4228 <1> 4229 <1> dop_r_mod: 4230 000053ED E8C805 <1> call getregmem 4231 000053F0 3CC0 <1> cmp al,0c0h 4232 000053F2 72F6 <1> jb disbad1 ;if it's a memory reference 4233 000053F4 EB03 <1> jmp s dop33 4234 <1> 4235 <1> ; Pure register reference (OP_R) 4236 <1> 4237 <1> dop_r: 4238 000053F6 E8B505 <1> call getregmem_r 4239 <1> 4240 <1> dop33: ; <--- used by OP_RM, OP_R_MOD and OP_R_ADD 4241 000053F9 2407 <1> and al,7 ;entry point for regs from MOD R/M, and others 4242 000053FB 8A0E[088A] <1> mov cl,[disflags2] 4243 000053FF 080E[068A] <1> or [disflags],cl ;if it was variable size operand, the size 4244 <1> ;should now be marked as known. 4245 00005403 80FC00 <1> cmp ah,0 4246 00005406 7C11 <1> jl dop35 ;if byte register 4247 00005408 740D <1> jz dop34 ;if word register 4248 <1> dop33a: 4249 0000540A 80FC20 <1> cmp ah, 20h ; qword register (MMX) ? 4250 0000540D 7415 <1> je dop35_1 ; --> 4251 0000540F 50 <1> push ax 4252 00005410 B045 <1> mov al, 'E' 4253 00005412 E8C005 <1> call dis_lowercase 4254 00005415 AA <1> stosb 4255 00005416 58 <1> pop ax 4256 <1> ;mov byte [di],'E' ;enter here from OP_ECX 4257 <1> ;inc di 4258 <1> dop34: 4259 00005417 0408 <1> add al,8 4260 <1> dop35: 4261 00005419 98 <1> cbw 4262 0000541A D1E0 <1> shl ax,1 4263 0000541C 93 <1> xchg ax,bx ;mov bx,ax 4264 0000541D 8B87[228A] <1> mov ax,[rgnam816+bx];get the register name 4265 00005421 E93306 <1> jmp dis_stosw_lowercase 4266 <1> 4267 <1> dop35_1: 4268 00005424 50 <1> push ax 4269 00005425 B84D4D <1> mov ax, "MM" 4270 00005428 E82C06 <1> call dis_stosw_lowercase 4271 0000542B 58 <1> pop ax 4272 0000542C 0430 <1> add al, '0' 4273 0000542E AA <1> stosb 4274 0000542F C3 <1> retn 4275 <1> 4276 <1> ; Register number embedded in the instruction (OP_R_ADD) 4277 <1> 4278 <1> dop_r_add: 4279 00005430 A0[EF89] <1> mov al,[instru] 4280 00005433 EBC4 <1> jmp s dop33 4281 <1> 4282 <1> ; AL or AX or EAX (OP_AX) 4283 <1> 4284 <1> dop_ax: 4285 00005435 B000 <1> mov al,0 4286 00005437 EBC0 <1> jmp s dop33 4287 <1> 4288 <1> ; QWORD mem (OP_M64) 4289 <1> ; This operand type is used by CMPXCHG8B, FILD and FISTP. 4290 <1> dop_m64: 4291 <1> ;mov ax, 'Q' ; print "QWORD" 4292 00005439 B420 <1> mov ah, 20h ; size QWORD 4293 0000543B EB35 <1> jmp s dop40 4294 <1> 4295 <1> ; FLOAT (=REAL4) mem (OP_MFLOAT) 4296 <1> dop_mfloat: 4297 0000543D B8464C <1> mov ax, "FL" 4298 00005440 E81406 <1> call dis_stosw_lowercase 4299 00005443 B84F41 <1> mov ax, "OA" 4300 00005446 E80E06 <1> call dis_stosw_lowercase 4301 00005449 B85420 <1> mov ax, "T " 4302 0000544C EB15 <1> jmp short dop38c 4303 <1> 4304 <1> ; DOUBLE (=REAL8) mem (OP_MDOUBLE). 4305 <1> 4306 <1> dop_mdouble: 4307 0000544E B8444F <1> mov ax, "DO" 4308 00005451 E80306 <1> call dis_stosw_lowercase 4309 00005454 B85542 <1> mov ax, "UB" 4310 00005457 E8FD05 <1> call dis_stosw_lowercase 4311 0000545A B04C <1> mov al, 'L' 4312 0000545C E87605 <1> call dis_lowercase 4313 0000545F AA <1> stosb 4314 00005460 B84520 <1> mov ax, "E " 4315 <1> dop38c: 4316 00005463 E8F105 <1> call dis_stosw_lowercase 4317 00005466 E82A06 <1> call showptr 4318 00005469 EB1B <1> jmp s dop42a 4319 <1> 4320 <1> ; TBYTE (=REAL10) mem (OP_M80). 4321 <1> 4322 <1> dop_m80: 4323 0000546B B854FF <1> mov ax,0FF00h+'T' ;print 'T' + "BYTE" 4324 0000546E E86405 <1> call dis_lowercase 4325 00005471 AA <1> stosb 4326 <1> dop40: 4327 00005472 E84305 <1> call getregmem 4328 00005475 3CC0 <1> cmp al,0c0h 4329 00005477 7317 <1> jae disbad5 ; if it's a register reference 4330 00005479 800E[068A]80 <1> or byte [disflags], DIS_I_DONTSHOW 4331 <1> ; don't show this 4332 0000547E E939FD <1> jmp dop05 4333 <1> 4334 <1> %if 0 4335 <1> ; Far memory (OP_FARMEM). 4336 <1> ; This is either a FAR16 (DWORD) or FAR32 (FWORD) pointer. 4337 <1> dop_farmem: 4338 <1> call dischk32d 4339 <1> jz dop41a ; if not dword far 4340 <1> call showdword 4341 <1> dop41a: 4342 <1> mov ax, "FA" ; store "FAR " 4343 <1> call dis_stosw_lowercase 4344 <1> mov ax, "R " 4345 <1> call dis_stosw_lowercase 4346 <1> %endif 4347 <1> 4348 <1> ; mem (OP_MXX). 4349 <1> 4350 <1> dop_mxx: 4351 00005481 800E[068A]80 <1> or byte [disflags], DIS_I_DONTSHOW 4352 <1> ; don't show this 4353 <1> dop42a: 4354 00005486 E82F05 <1> call getregmem 4355 00005489 3CC0 <1> cmp al,0c0h 4356 0000548B 7303E93BFD <1> jb dop06 ; mem ref, don't show size --> 4357 <1> disbad5: 4358 00005490 E9B104 <1> jmp disbad 4359 <1> 4360 <1> ; Far immediate (OP_FARP). Either FAR16 or FAR32. 4361 <1> dop_farimm: 4362 00005493 E8B206 <1> call disgetword 4363 00005496 50 <1> push ax 4364 00005497 E82806 <1> call dischk32d 4365 0000549A 7410 <1> jz dop44_word ; if not 32-bit address 4366 <1> 4367 <1> dop44_dword: 4368 <1> %if _PM 4369 0000549C F606[0B8B]40 <1> test byte [bCSAttr],40h ; for 16-bit code segments 4370 000054A1 7503 <1> jnz @F ; no need to display "WORD " 4371 <1> %endif 4372 000054A3 E8D505 <1> call showdword 4373 <1> @@: 4374 <1> 4375 000054A6 E89F06 <1> call disgetword 4376 000054A9 50 <1> push ax 4377 000054AA EB0A <1> jmp dop44_common 4378 <1> 4379 <1> dop44_word: 4380 <1> %if _PM 4381 000054AC F606[0B8B]40 <1> test byte [bCSAttr],40h ; for 32-bit code segments 4382 000054B1 7403 <1> jz @F ; no need to display "DWORD " 4383 000054B3 E8CB05 <1> call showword 4384 <1> @@: 4385 <1> %endif 4386 <1> 4387 <1> dop44_common: 4388 000054B6 E88F06 <1> call disgetword 4389 <1> %if _MEMREF_AMOUNT 4390 000054B9 E89F01 <1> call get_free_memref 4391 000054BC 8987[A889] <1> mov word [memrefs + bx + mrSegmentSelector], ax 4392 <1> %endif 4393 000054C0 E8B967 <1> call hexword 4394 000054C3 B03A <1> mov al,':' 4395 000054C5 AA <1> stosb 4396 000054C6 E8F905 <1> call dischk32d 4397 000054C9 740D <1> jz dop45 ;if not 32-bit address 4398 000054CB 58 <1> pop ax 4399 <1> %if _MEMREF_AMOUNT 4400 000054CC 8987[A689] <1> mov word [memrefs + bx + mrOffset + 2], ax 4401 000054D0 808F[AA89]10 <1> or byte [memrefs + bx + mrFlags], mrfA32 4402 <1> %endif 4403 000054D5 E8A467 <1> call hexword 4404 <1> dop45: 4405 000054D8 58 <1> pop ax 4406 <1> %if _MEMREF_AMOUNT 4407 000054D9 8987[A489] <1> mov word [memrefs + bx + mrOffset], ax 4408 000054DD 808F[AA89]01 <1> or byte [memrefs + bx + mrFlags], mrfBranchDirect 4409 000054E2 E89101 <1> call calc_linear_memref_and_mark_nonfree 4410 <1> %endif 4411 000054E5 E99467 <1> jmp hexword 4412 <1> 4413 <1> 4414 <1> %if _COND 4415 <1> ; INP: [presizeflags] & PRE32A, d[reg_ecx] 4416 <1> ; OUT: dx:ax = (e)cx 4417 <1> cond_get_ecx: 4418 000054E8 A1[780C] <1> mov ax, word [reg_ecx] 4419 000054EB F606[EE89]20 <1> test byte [presizeflags], PRE32A ; A32 ? 4420 000054F0 8B16[7A0C] <1> mov dx, word [reg_ecx+2] 4421 000054F4 7502 <1> jnz .ecx 4422 000054F6 31D2 <1> xor dx, dx 4423 <1> .ecx: 4424 000054F8 C3 <1> retn 4425 <1> 4426 <1> ; INP: ax = 0..15 condition code, else invalid 4427 <1> ; OUT: w[condmsg] set as appropriate 4428 <1> cond_handle: 4429 000054F9 83F80F <1> cmp ax, 15 4430 000054FC 7738 <1> ja .return 4431 000054FE 8B0E[AC0C] <1> mov cx, word [reg_efl] ; get flags 4432 00005502 89C3 <1> mov bx, ax 4433 00005504 80E3FE <1> and bl, ~1 ; make even 4434 00005507 2401 <1> and al, 1 ; 1 if negated condition 4435 00005509 80FB0C <1> cmp bl, 12 ; L/GE or LE/G? 4436 0000550C 7306 <1> jae .specific ; yes --> 4437 <1> 4438 0000550E 858F[908A] <1> test cx, [cond_table+bx]; flag(s) set ? 4439 00005512 EB14 <1> jmp short .jump_ZF ; NZ if (normal) condition true --> 4440 <1> 4441 <1> .specific: 4442 00005514 80FB0E <1> cmp bl, 14 4443 00005517 7205 <1> jb .L_GE 4444 <1> 4445 <1> ; Handle LE/NG and G/NLE conditions. 4446 <1> ; The former says ZF | (OF ^ SF). 4447 <1> .LE_G: 4448 00005519 F6C140 <1> test cl, 40h ; ZF | .. 4449 0000551C 750C <1> jnz .jump_true 4450 <1> 4451 <1> ; Handle L/NGE and GE/NL conditions. 4452 <1> ; The former says OF ^ SF. 4453 <1> .L_GE: 4454 0000551E 81E18008 <1> and cx, 880h ; OF ^ SF 4455 00005522 7408 <1> jz .jump_false ; both clear --> 4456 00005524 81F18008 <1> xor cx, 880h 4457 <1> .jump_ZF: 4458 00005528 7402 <1> jz .jump_false ; both set --> (or ZR: (normal) condition false) 4459 <1> .jump_true: 4460 0000552A 3401 <1> xor al, 1 ; (negating ^ raw truth) = cooked truth 4461 <1> .jump_false: 4462 0000552C 84C0 <1> test al, al ; true ? 4463 0000552E 7507 <1> jnz .msg_jumping ; yes --> 4464 <1> 4465 <1> .msg_notjumping: 4466 00005530 C706[0C8A][7482] <1> mov word [condmsg], msg.condnotjump 4467 <1> .return: 4468 00005536 C3 <1> retn 4469 <1> 4470 <1> .msg_jumping: 4471 00005537 C706[0C8A][7882] <1> mov word [condmsg], msg.condjump 4472 0000553D C3 <1> retn 4473 <1> %endif 4474 <1> 4475 <1> 4476 <1> ; 8-bit relative jump (OP_REL8) 4477 <1> 4478 <1> dop_rel8: 4479 <1> %if _COND 4480 0000553E A1[F289] <1> mov ax, word [index] 4481 00005541 3DE300 <1> cmp ax, 0E3h 4482 00005544 772C <1> ja .cond_done ; no conditional jump --> 4483 00005546 7211 <1> jb .cond_noncx ; not jcxz, check for other --> 4484 <1> 4485 00005548 E89DFF <1> call cond_get_ecx 4486 0000554B 09D0 <1> or ax, dx 4487 0000554D 7405 <1> jz .cond_msg_jumping 4488 <1> .cond_msg_notjumping: 4489 0000554F E8DEFF <1> call cond_handle.msg_notjumping 4490 00005552 EB1E <1> jmp short .cond_done 4491 <1> 4492 <1> .cond_msg_jumping: 4493 00005554 E8E0FF <1> call cond_handle.msg_jumping 4494 00005557 EB19 <1> jmp short .cond_done 4495 <1> 4496 <1> .cond_noncx: 4497 00005559 3CE0 <1> cmp al, 0E0h 4498 0000555B 7210 <1> jb .cond_nonloop ; not loop, check for other --> 4499 <1> 4500 0000555D 50 <1> push ax 4501 0000555E E887FF <1> call cond_get_ecx 4502 00005561 48 <1> dec ax ; = 0 if cx is 1 4503 00005562 09D0 <1> or ax, dx ; = 0 if cx is 1 and ecx is cx 4504 00005564 58 <1> pop ax 4505 00005565 74E8 <1> jz .cond_msg_notjumping ; if (e)cx is 1 --> 4506 00005567 3CE2 <1> cmp al, 0E2h 4507 00005569 74E9 <1> je .cond_msg_jumping ; loop without additional condition --> 4508 0000556B 3495 <1> xor al, 0E0h^75h ; E0h (loopnz) to 75h (jnz), 4509 <1> ; E1h (loopz) to 74h (jz) 4510 <1> 4511 <1> .cond_nonloop: 4512 0000556D 2C70 <1> sub al, 70h ; (ah = 0) 4513 0000556F E887FF <1> call cond_handle ; call common code (checks for ax < 16) 4514 <1> .cond_done: 4515 <1> %endif 4516 00005572 E8B705 <1> call disgetbyte 4517 00005575 98 <1> cbw 4518 00005576 A2[F089] <1> mov byte [disp8], al 4519 00005579 E99E00 <1> jmp dop48 4520 <1> 4521 <1> ; 16/32-bit relative jump (OP_REL1632) 4522 <1> 4523 <1> dop_rel1632: 4524 <1> %if _COND 4525 0000557C A1[F289] <1> mov ax, word [index] 4526 0000557F 2D6002 <1> sub ax, SPARSE_BASE+80h 4527 00005582 E874FF <1> call cond_handle 4528 <1> %endif 4529 00005585 E8C005 <1> call disgetword 4530 00005588 E83705 <1> call dischk32d 4531 0000558B 7465 <1> jz dop48_near ; if not 32-bit offset 4532 0000558D 92 <1> xchg ax, dx ; mov dx, ax 4533 0000558E E8B705 <1> call disgetword 4534 <1> 4535 00005591 813E[F289]E800 <1> cmp word [index], 00E8h 4536 00005597 7429 <1> je .not_show_keyword ; no need to distinguish NEAR call --> 4537 <1> ; ax:dx between FFFFh:FF80h (-128) .. 0000h:007Fh (127): 4538 <1> ; == show "NEAR" keyword 4539 <1> ; 4540 <1> ; Note: This is not entirely correct. If a jump short is 4541 <1> ; used, the actual opcode is shorter, thus the 4542 <1> ; exact distance that can be reached by the jump short 4543 <1> ; differs from what the jump near can reach with 4544 <1> ; a rel16/32 displacement between -128..127. 4545 00005599 83F8FF <1> cmp ax, -1 4546 0000559C 7410 <1> je .checkminus 4547 0000559E 85C0 <1> test ax, ax 4548 000055A0 7520 <1> jnz .not_show_keyword 4549 <1> .checkplus: 4550 000055A2 83FA7F <1> cmp dx, byte 127 4551 000055A5 7F1B <1> jg .not_show_keyword 4552 000055A7 83FA00 <1> cmp dx, 0 4553 000055AA 7C16 <1> jl .not_show_keyword 4554 000055AC EB0A <1> jmp .show_keyword 4555 <1> 4556 <1> .checkminus: 4557 000055AE 83FA80 <1> cmp dx, byte -128 4558 000055B1 7C0F <1> jl .not_show_keyword 4559 000055B3 83FA00 <1> cmp dx, 0 4560 000055B6 7D0A <1> jge .not_show_keyword 4561 <1> 4562 <1> .show_keyword: 4563 000055B8 F606[AC00]20 <1> testopt [asm_options], disasm_show_near 4564 000055BD 7503 <1> jnz .not_show_keyword 4565 000055BF E87003 <1> call dop_show_near 4566 <1> .not_show_keyword: 4567 <1> 4568 <1> %if _PM 4569 000055C2 F606[0B8B]40 <1> test byte [bCSAttr],40h ; for 32-bit code segments 4570 000055C7 7505 <1> jnz @F ; no need to display "DWORD " 4571 <1> %endif 4572 000055C9 50 <1> push ax 4573 000055CA E8AE04 <1> call showdword 4574 000055CD 58 <1> pop ax 4575 <1> @@: 4576 <1> 4577 000055CE 8B1E[2C0B] <1> mov bx,[u_addr+0] 4578 000055D2 031E[E889] <1> add bx,[dis_n] 4579 000055D6 1306[EA89] <1> adc ax,[dis_n + 2] 4580 000055DA 01DA <1> add dx,bx 4581 <1> %if _PM 4582 000055DC 1306[2E0B] <1> adc ax,[u_addr+2] 4583 <1> %else 4584 <1> adc ax, 0 4585 <1> %endif 4586 <1> %if _MEMREF_AMOUNT 4587 000055E0 E87800 <1> call get_free_memref 4588 000055E3 8987[A689] <1> mov word [memrefs + bx + mrOffset + 2], ax 4589 000055E7 808F[AA89]10 <1> or byte [memrefs + bx + mrFlags], mrfA32 4590 <1> %endif 4591 000055EC E88D66 <1> call hexword 4592 000055EF 92 <1> xchg ax,dx 4593 000055F0 EB4F <1> jmp s dop_branch_word 4594 <1> 4595 <1> 4596 <1> dop48_near: 4597 000055F2 813E[F289]E800 <1> cmp word [index], 00E8h 4598 000055F8 7414 <1> je @F ; no need to distinguish NEAR call --> 4599 <1> ; ax between FF80h (-128) .. 007Fh (127): 4600 <1> ; == show "NEAR" keyword 4601 <1> ; 4602 <1> ; Note: This is not entirely correct. If a jump short is 4603 <1> ; used, the actual opcode is shorter, thus the 4604 <1> ; exact distance that can be reached by the jump short 4605 <1> ; differs from what the jump near can reach with 4606 <1> ; a rel16/32 displacement between -128..127. 4607 000055FA 83F880 <1> cmp ax, byte -128 4608 000055FD 7C0F <1> jl @F 4609 000055FF 83F87F <1> cmp ax, byte 127 4610 00005602 7F0A <1> jg @F 4611 00005604 F606[AC00]20 <1> testopt [asm_options], disasm_show_near 4612 00005609 7503 <1> jnz @F 4613 0000560B E82403 <1> call dop_show_near 4614 <1> @@: 4615 <1> 4616 <1> %if _PM 4617 0000560E F606[0B8B]40 <1> test byte [bCSAttr],40h ; for 16-bit code segments 4618 00005613 7405 <1> jz @F ; no need to display "WORD " 4619 00005615 50 <1> push ax 4620 00005616 E86804 <1> call showword 4621 00005619 58 <1> pop ax 4622 <1> @@: 4623 <1> %endif 4624 <1> 4625 <1> dop48: 4626 0000561A 99 <1> cwd 4627 0000561B 0306[2C0B] <1> add ax, word [u_addr] 4628 <1> %if _PM 4629 0000561F 1316[2E0B] <1> adc dx, word [u_addr + 2] 4630 <1> %else 4631 <1> adc dx, 0 4632 <1> %endif 4633 00005623 0306[E889] <1> add ax, word [dis_n] 4634 00005627 1316[EA89] <1> adc dx, word [dis_n + 2] 4635 0000562B E89404 <1> call dischk32d ; 32-bit opsize ? 4636 0000562E 7411 <1> jz .16 ; no --> 4637 00005630 92 <1> xchg ax, dx 4638 00005631 E84866 <1> call hexword ; yes, display high word 4639 00005634 92 <1> xchg ax, dx 4640 <1> %if _MEMREF_AMOUNT 4641 00005635 E82300 <1> call get_free_memref 4642 00005638 8997[A689] <1> mov word [memrefs + bx + mrOffset + 2], dx 4643 0000563C 808F[AA89]10 <1> or byte [memrefs + bx + mrFlags], mrfA32 4644 <1> %endif 4645 <1> .16: 4646 <1> 4647 <1> dop_branch_word: 4648 <1> %if _MEMREF_AMOUNT 4649 00005641 E81700 <1> call get_free_memref 4650 00005644 8987[A489] <1> mov word [memrefs + bx + mrOffset], ax 4651 00005648 FF36[300B] <1> push word [u_addr + saSegSel] 4652 0000564C 8F87[A889] <1> pop word [memrefs + bx + mrSegmentSelector] 4653 00005650 808F[AA89]01 <1> or byte [memrefs + bx + mrFlags], mrfBranchDirect 4654 00005655 E81E00 <1> call calc_linear_memref_and_mark_nonfree 4655 <1> %endif 4656 00005658 E92166 <1> jmp hexword ; call hexword and return 4657 <1> 4658 <1> 4659 <1> %if _MEMREF_AMOUNT 4660 <1> ; INP: word [memrefs.free] 4661 <1> ; OUT: bx = byte index into memref array 4662 <1> ; CHG: - 4663 <1> ; STT: ss = ds = es 4664 <1> get_free_memref: 4665 0000565B 8B1E[E089] <1> mov bx, [memrefs.free] 4666 <1> get_memref_index_bx: 4667 0000565F 83FB04 <1> cmp bx, _MEMREF_AMOUNT 4668 00005662 7309 <1> jae @F 4669 00005664 01DB <1> add bx, bx 4670 00005666 01DB <1> add bx, bx 4671 00005668 01DB <1> add bx, bx 4672 0000566A 01DB <1> add bx, bx 4673 <1> %if MEMREF_size != 16 4674 <1> %error Adjust multiplication 4675 <1> %endif 4676 0000566C C3 <1> retn 4677 <1> 4678 <1> @@: 4679 0000566D BA[B373] <1> mov dx, msg.memrefs_invalid_internal 4680 00005670 E8C069 <1> call putsz 4681 00005673 E98AA9 <1> jmp cmd3 4682 <1> 4683 <1> 4684 <1> ; INP: word [memrefs.free] 4685 <1> ; [memrefs] array entry 4686 <1> ; OUT: NC if valid segmented address (getlinear succeeded), 4687 <1> ; dword [memrefs + x + mrLinear] filled 4688 <1> ; word [memrefs.free] incremented 4689 <1> ; CY if invalid address, 4690 <1> ; [memrefs + x] re-initialised 4691 <1> ; word [memrefs.free] left unmodified 4692 <1> ; CHG: - 4693 <1> ; STT: ss = ds = es 4694 <1> calc_linear_memref_and_mark_nonfree: 4695 00005676 50 <1> push ax 4696 00005677 53 <1> push bx 4697 00005678 66 <1> _386_PM_o32 4698 00005679 52 <1> push dx 4699 0000567A E8DEFF <1> call get_free_memref 4700 0000567D 53 <1> push bx 4701 0000567E 66 <1> _386_PM_o32 4702 0000567F 8B97[A489] <1> mov dx, word [memrefs + bx + mrOffset] 4703 00005683 8B9F[A889] <1> mov bx, word [memrefs + bx + mrSegmentSelector] 4704 00005687 E831E2 <1> call getlinear 4705 0000568A 5B <1> pop bx 4706 0000568B 7211 <1> jc .error 4707 <1> 4708 0000568D 8987[A089] <1> mov word [memrefs + bx + mrLinear], ax 4709 00005691 8997[A289] <1> mov word [memrefs + bx + mrLinear + 2], dx 4710 00005695 FF06[E089] <1> inc word [memrefs.free] 4711 <1> 4712 <1> ; clc 4713 <1> .return: 4714 00005699 66 <1> _386_PM_o32 4715 0000569A 5A <1> pop dx 4716 0000569B 5B <1> pop bx 4717 0000569C 58 <1> pop ax 4718 0000569D C3 <1> retn 4719 <1> 4720 <1> .error: 4721 0000569E 57 <1> push di 4722 0000569F 8DBF[A089] <1> lea di, [memrefs + bx] 4723 000056A3 E80400 <1> call init_one_memref 4724 000056A6 5F <1> pop di 4725 000056A7 F9 <1> stc 4726 000056A8 EBEF <1> jmp .return 4727 <1> 4728 <1> 4729 <1> ; INP: di -> memref to initialise 4730 <1> ; OUT: ax = 0 4731 <1> ; di -> past initialised memref 4732 <1> ; CHG: - 4733 <1> ; STT: ss = ds = es 4734 <1> init_one_memref: 4735 000056AA 31C0 <1> xor ax, ax 4736 <1> 4737 <1> ; INP: di -> memref to initialise 4738 <1> ; ax = 0 4739 <1> ; OUT: di -> past initialised memref 4740 <1> ; CHG: - 4741 <1> ; STT: ss = ds = es 4742 <1> .ax_already_zero: 4743 000056AC AB <1> stosw ; zero-initialise all memrefs 4744 000056AD AB <1> stosw ; mrLinear 4745 000056AE AB <1> stosw 4746 000056AF AB <1> stosw ; mrOffset 4747 000056B0 AB <1> stosw ; mrSegmentSelector 4748 000056B1 AB <1> stosw ; mrFlags 4749 000056B2 40 <1> inc ax 4750 000056B3 AB <1> stosw 4751 000056B4 48 <1> dec ax 4752 000056B5 AB <1> stosw ; mrLength = 1 4753 000056B6 C3 <1> retn 4754 <1> 4755 <1> 4756 <1> ; INP: si = address of segreg (reg_cs, reg_ds, etc) 4757 <1> ; di = address of index reg (reg_esi or reg_edi) 4758 <1> ; [memrefs] 4759 <1> ; [presizeflags] 4760 <1> ; byte [index] = which opcode 4761 <1> ; [reg_ecx] 4762 <1> ; [reg_efl] & 400h = Direction Flag 4763 <1> ; OUT: memrefs + bx -> current memref (partially filled) 4764 <1> ; CHG: bx, si, di, cx, dx 4765 <1> init_string_memref: 4766 000056B7 E8A1FF <1> call get_free_memref 4767 000056BA FF34 <1> push word [si] ; get segment/selector 4768 000056BC 8F87[A889] <1> pop word [memrefs + bx + mrSegmentSelector] 4769 <1> ; store segment/selector 4770 000056C0 FF35 <1> push word [di] 4771 000056C2 8F87[A489] <1> pop word [memrefs + bx + mrOffset] 4772 <1> ; store low word of offset 4773 000056C6 8B0E[E689] <1> mov cx, word [string_memref_counter + 2] 4774 000056CA 8B16[E489] <1> mov dx, word [string_memref_counter] 4775 <1> 4776 000056CE F606[EE89]20 <1> test byte [presizeflags], PRE32A 4777 000056D3 740C <1> jz @F ; if 16-bit addressing --> 4778 000056D5 FF7502 <1> push word [di + 2] 4779 000056D8 8F87[A689] <1> pop word [memrefs + bx + mrOffset + 2] 4780 <1> ; store high word of offset 4781 000056DC 808F[AA89]10 <1> or byte [memrefs + bx + mrFlags], mrfA32 4782 <1> ; remember that it is a32 4783 <1> @@: 4784 <1> 4785 000056E1 F606[EC89]02 <1> test byte [preflags], PREREP 4786 000056E6 7505 <1> jnz @F ; if to take (e)cx repetitions --> 4787 000056E8 BA0100 <1> mov dx, 1 4788 000056EB 31C9 <1> xor cx, cx ; cx:dx = 1, just one element 4789 <1> @@: 4790 <1> 4791 000056ED 50 <1> push ax 4792 000056EE B80100 <1> mov ax, 1 4793 000056F1 F606[F289]01 <1> test byte [index], 1 ; element size is byte ? 4794 000056F6 740A <1> jz @F ; yes, ax = 1 4795 000056F8 40 <1> inc ax ; = 2 4796 000056F9 F606[EE89]10 <1> test byte [presizeflags], PRE32D 4797 <1> ; element size is word ? 4798 000056FE 7402 <1> jz @F ; yes, ax = 2 4799 00005700 01C0 <1> add ax, ax ; = 4 4800 <1> @@: 4801 <1> 4802 00005702 3C01 <1> cmp al, 1 ; byte size ? 4803 00005704 7415 <1> je @F ; yes, do not multiply --> 4804 00005706 01D2 <1> add dx, dx 4805 00005708 11C9 <1> adc cx, cx ; * 2, word to byte 4806 0000570A 720A <1> jc .carry_counter 4807 0000570C 3C02 <1> cmp al, 2 ; word size ? 4808 0000570E 740B <1> je @F ; yes, done multiplying --> 4809 00005710 01D2 <1> add dx, dx 4810 00005712 11C9 <1> adc cx, cx ; * 4, dword to byte 4811 00005714 7305 <1> jnc @F 4812 <1> .carry_counter: 4813 00005716 BAFFFF <1> mov dx, -1 4814 00005719 89D1 <1> mov cx, dx ; in case the counter is large 4815 <1> ; A carry out of an a16 address is not yet handled. 4816 <1> ; Note that eg cx=8000h a16 movsw may be valid to 4817 <1> ; copy exactly 64 KiB. Likewise, technically a 4818 <1> ; size of exactly 4 GiB is valid; however, our 4819 <1> ; memref format cannot store that. 4820 <1> @@: 4821 0000571B 8997[AC89] <1> mov word [memrefs + bx + mrLength], dx 4822 0000571F 898F[AE89] <1> mov word [memrefs + bx + mrLength + 2], cx 4823 <1> 4824 00005723 F606[AD0C]04 <1> testopt [reg_efl], 400h ; DF set ? 4825 00005728 7411 <1> jz @F 4826 <1> 4827 0000572A 0187[A489] <1> add word [memrefs + bx + mrOffset], ax 4828 0000572E 8397[A689]00 <1> adc word [memrefs + bx + mrOffset + 2], 0 4829 00005733 2997[A489] <1> sub word [memrefs + bx + mrOffset], dx 4830 00005737 198F[A689] <1> sbb word [memrefs + bx + mrOffset + 2], cx 4831 <1> 4832 <1> @@: 4833 0000573B 58 <1> pop ax 4834 0000573C C3 <1> retn 4835 <1> %endif 4836 <1> 4837 <1> 4838 <1> ; Check for ST(1) (OP_1CHK). 4839 <1> 4840 <1> dop49: 4841 0000573D 58 <1> pop ax ;discard return address 4842 0000573E A0[C483] <1> mov al,[regmem] 4843 00005741 2407 <1> and al,7 4844 00005743 3C01 <1> cmp al,1 4845 00005745 7403 <1> je dop50 ;if it's ST(1) 4846 00005747 E96FF3 <1> jmp da14 ;another operand (but no comma) 4847 <1> 4848 <1> dop50: 4849 0000574A E902F4 <1> jmp da_op_end ; end of list --> 4850 <1> 4851 <1> ; ST(I) (OP_STI). 4852 <1> 4853 <1> dop_sti: 4854 0000574D A0[C483] <1> mov al, byte [regmem] 4855 00005750 2407 <1> and al, 7 4856 00005752 93 <1> xchg ax, bx ;mov bx,ax 4857 00005753 B85354 <1> mov ax, 'ST' 4858 00005756 E8FE02 <1> call dis_stosw_lowercase; store ST(bl) 4859 00005759 B028 <1> mov al, '(' 4860 0000575B AA <1> stosb 4861 0000575C B83029 <1> mov ax, '0)' 4862 0000575F 08D8 <1> or al, bl 4863 00005761 AB <1> stosw 4864 00005762 C3 <1> retn 4865 <1> 4866 <1> ; CRx (OP_CR). 4867 <1> 4868 <1> dop_cr: 4869 00005763 BB4352 <1> mov bx,'CR' 4870 00005766 E84502 <1> call getregmem_r 4871 00005769 3C04 <1> cmp al,4 4872 0000576B 7713 <1> ja disbad4 ;if too large 4873 0000576D 7505 <1> jne dop52a 4874 0000576F C606[CA83]05 <1> mov byte [dismach],5 ;CR4 is new to the 586 4875 <1> dop52a: 4876 00005774 813E[F289]0202 <1> cmp word [index],SPARSE_BASE+22h 4877 0000577A 7528 <1> jne dop55 ;if not MOV CRx,xx 4878 0000577C 3C01 <1> cmp al,1 4879 0000577E 7524 <1> jne dop55 ;if not CR1 4880 <1> 4881 00005780 E9C101 <1> disbad4:jmp disbad ;can't MOV CR1,xx 4882 <1> 4883 <1> ; DRx (OP_DR). 4884 <1> 4885 <1> dop_dr: 4886 00005783 E82802 <1> call getregmem_r 4887 00005786 BB4452 <1> mov bx,'DR' 4888 00005789 B9FFFF <1> mov cx,-1 ;no max or illegal value 4889 0000578C EB16 <1> jmp s dop55 4890 <1> 4891 <1> ; TRx (OP_TR). 4892 <1> 4893 <1> dop_tr: 4894 0000578E E81D02 <1> call getregmem_r 4895 00005791 3C03 <1> cmp al,3 4896 00005793 7303E9AC01 <1> jb disbad ;if too small 4897 00005798 3C06 <1> cmp al,6 4898 0000579A 7305 <1> jae dop54a ;if TR6-7 4899 0000579C C606[CA83]04 <1> mov byte [dismach],4 ;TR3-5 are new to the 486 4900 <1> dop54a: 4901 000057A1 BB5452 <1> mov bx,'TR' 4902 <1> 4903 <1> dop55: 4904 000057A4 93 <1> xchg ax, bx 4905 000057A5 E8AF02 <1> call dis_stosw_lowercase; store XX 4906 000057A8 93 <1> xchg ax, bx 4907 000057A9 0C30 <1> or al, '0' 4908 000057AB AA <1> stosb 4909 000057AC C3 <1> retn 4910 <1> 4911 <1> ; Segment register (OP_SEGREG). 4912 <1> 4913 <1> dop_segreg: 4914 000057AD E8FE01 <1> call getregmem_r 4915 000057B0 3C06 <1> cmp al,6 4916 000057B2 7203E98D01 <1> jae disbad ; if not a segment register --> 4917 000057B7 3C02 <1> cmp al,2 4918 000057B9 7505 <1> jne @F ; if not SS --> 4919 000057BB 800E[068A]40 <1> or byte [disflags], DIS_I_MOV_SS ; note this 4920 <1> @@: 4921 000057C0 3C04 <1> cmp al,4 4922 000057C2 7205 <1> jb dop57a ;if not FS or GS 4923 000057C4 C606[CA83]03 <1> mov byte [dismach],3;(no new 486-686 instructions involve seg regs) 4924 <1> dop57a: 4925 000057C9 0410 <1> add al,16 4926 000057CB E94BFC <1> jmp dop35 ;go print it out 4927 <1> 4928 <1> ; Sign-extended immediate byte (OP_IMMS8). "push xx" 4929 <1> 4930 <1> dop_imms8: 4931 000057CE E85B03 <1> call disgetbyte 4932 000057D1 3C00 <1> cmp al,0 4933 000057D3 93 <1> xchg ax,bx ;mov bl,al 4934 000057D4 B02B <1> mov al,'+' 4935 000057D6 7D04 <1> jge dop58a ;if >= 0 4936 000057D8 F6DB <1> neg bl 4937 000057DA B02D <1> mov al,'-' 4938 <1> dop58a: 4939 000057DC AA <1> stosb 4940 000057DD 93 <1> xchg ax,bx ;mov al,bl 4941 000057DE EB03 <1> jmp s dop59a ;call hexbyte and return 4942 <1> 4943 <1> 4944 <1> ; Immediate byte (OP_IMM8). 4945 <1> 4946 <1> dop_imm8: 4947 000057E0 E84903 <1> call disgetbyte 4948 <1> dop59a: 4949 000057E3 E99D64 <1> jmp hexbyte ;call hexbyte and return 4950 <1> 4951 <1> 4952 <1> dop_imm8_int: 4953 000057E6 E84303 <1> call disgetbyte 4954 000057E9 3C03 <1> cmp al, 3 4955 000057EB 75F6 <1> jne dop59a 4956 000057ED 50 <1> push ax 4957 000057EE E87F02 <1> call showsize.byte 4958 000057F1 58 <1> pop ax 4959 000057F2 EBEF <1> jmp dop59a 4960 <1> 4961 <1> 4962 <1> ; Show MMx reg (OP_MMX; previously was "Show ECX if 32-bit LOOPxx"). 4963 <1> dop_mmx: 4964 000057F4 BB4D4D <1> mov bx, "MM" 4965 000057F7 E8B401 <1> call getregmem_r 4966 000057FA EBA8 <1> jmp short dop55 4967 <1> 4968 <1> ; MMX register (in ModR/M part) 4969 <1> dop_mmx_mod: 4970 000057FC BB4D4D <1> mov bx, "MM" 4971 000057FF E8B601 <1> call getregmem 4972 00005802 3CC0 <1> cmp al, 0C0h 4973 00005804 7303E93B01 <1> jb disbad ; needs to be encoded as register --> 4974 00005809 2407 <1> and al, 7 4975 0000580B EB97 <1> jmp short dop55 4976 <1> 4977 <1> 4978 <1> %if _MEMREF_AMOUNT 4979 <1> dop_stack_push: 4980 0000580D B80200 <1> mov ax, 2 4981 <1> .special: 4982 00005810 F606[EE89]10 <1> test byte [presizeflags], PRE32D 4983 00005815 7402 <1> jz .iso16 4984 00005817 01C0 <1> add ax, ax 4985 <1> .iso16: 4986 00005819 E83FFE <1> call get_free_memref ; memrefs + bx -> the memref structure 4987 <1> 4988 0000581C 8987[AC89] <1> mov word [memrefs + bx + mrLength], ax 4989 00005820 8B0E[820C] <1> mov cx, word [reg_esp + 2] 4990 00005824 8B16[800C] <1> mov dx, word [reg_esp] 4991 00005828 29C2 <1> sub dx, ax 4992 0000582A 83D900 <1> sbb cx, 0 4993 <1> 4994 0000582D 8997[A489] <1> mov word [memrefs + bx + mrOffset], dx 4995 <1> 4996 00005831 B20A <1> mov dl, mrfMemDest | mrfMem 4997 <1> 4998 00005833 EB21 <1> jmp dop_stack_common 4999 <1> 5000 <1> 5001 <1> dop_stack_pop: 5002 00005835 B80200 <1> mov ax, 2 5003 <1> .special: 5004 00005838 8B0E[820C] <1> mov cx, word [reg_esp + 2] 5005 0000583C 8B16[800C] <1> mov dx, word [reg_esp] 5006 <1> .leave: 5007 00005840 F606[EE89]10 <1> test byte [presizeflags], PRE32D 5008 00005845 7402 <1> jz .iso16 5009 00005847 01C0 <1> add ax, ax 5010 <1> .iso16: 5011 00005849 E80FFE <1> call get_free_memref ; memrefs + bx -> the memref structure 5012 <1> 5013 0000584C 8987[AC89] <1> mov word [memrefs + bx + mrLength], ax 5014 <1> 5015 00005850 8997[A489] <1> mov word [memrefs + bx + mrOffset], dx 5016 <1> 5017 00005854 B206 <1> mov dl, mrfMemSource | mrfMem 5018 <1> 5019 <1> dop_stack_common: 5020 00005856 A1[980C] <1> mov ax, word [reg_ss] ; get ss selector into ax 5021 00005859 8987[A889] <1> mov word [memrefs + bx + mrSegmentSelector], ax 5022 <1> 5023 0000585D 93 <1> _386_PM xchg ax, bx ; selector in bx 5024 0000585E E8DE06 <1> _386_PM call test_d_b_bit ; check whether a 32-bit ss 5025 00005861 93 <1> _386_PM xchg ax, bx 5026 00005862 7407 <1> _386_PM jz .isstack16 5027 00005864 80CA10 <1> _386_PM or dl, mrfA32 5028 00005867 898F[A689] <1> _386_PM mov word [memrefs + bx + mrOffset + 2], cx 5029 <1> .isstack16: 5030 <1> 5031 0000586B 0897[AA89] <1> or byte [memrefs + bx + mrFlags], dl 5032 0000586F E804FE <1> call calc_linear_memref_and_mark_nonfree 5033 00005872 EB54 <1> jmp dop_continue_maybe_end 5034 <1> 5035 <1> 5036 <1> dop_stack_special: 5037 00005874 A1[F289] <1> mov ax, [index] 5038 00005877 3D3301 <1> cmp ax, GROUP7 + 3 ; call far [mem] ? 5039 0000587A 7414 <1> je .callfar 5040 0000587C 84E4 <1> test ah, ah 5041 0000587E 7545 <1> jnz .error 5042 00005880 57 <1> push di 5043 00005881 BF[CC8A] <1> mov di, .bytes ; list of opcodes 5044 00005884 B90B00 <1> mov cx, .bytes_amount 5045 00005887 F2AE <1> repne scasb 5046 00005889 8A450A <1> mov al, [di + .bytes_amount - 1] 5047 0000588C 5F <1> pop di 5048 0000588D 7536 <1> jne .error ; if not one of these --> 5049 <1> 5050 0000588F A9 <1> db __TEST_IMM16 ; (skip mov) 5051 <1> .callfar: 5052 00005890 B044 <1> mov al, 40h + 4 5053 <1> 5054 <1> .haveinfo: 5055 00005892 89C3 <1> mov bx, ax 5056 00005894 83E03F <1> and ax, 3Fh 5057 00005897 80FB80 <1> cmp bl, 80h 5058 0000589A 739C <1> jae dop_stack_pop.special 5059 0000589C 80FB40 <1> cmp bl, 40h 5060 0000589F 7203E96CFF <1> jae dop_stack_push.special 5061 000058A4 84C0 <1> test al, al 5062 000058A6 740F <1> jz .leave 5063 000058A8 3C01 <1> cmp al, 1 5064 000058AA 7519 <1> jne .error 5065 <1> .into: 5066 000058AC F606[AD0C]08 <1> testopt [reg_efl], 800h 5067 000058B1 7415 <1> jz .none 5068 000058B3 B046 <1> mov al, 40h + 6 5069 000058B5 EBDB <1> jmp .haveinfo 5070 <1> 5071 <1> .leave: 5072 000058B7 B80200 <1> mov ax, 2 ; pop size = 1 word or 1 dword 5073 000058BA 8B0E[860C] <1> mov cx, word [reg_ebp + 2] 5074 000058BE 8B16[840C] <1> mov dx, word [reg_ebp] ; pop from address in (e)bp, not (e)sp 5075 000058C2 E97BFF <1> jmp dop_stack_pop.leave 5076 <1> 5077 <1> .error: 5078 000058C5 E94BF2 <1> jmp da_internal_error 5079 <1> 5080 <1> usesection lDEBUG_DATA_ENTRY 5081 <1> 5082 <1> .bytes: 5083 00008ACC CDCE <1> db 0CDh, 0CEh ; int, into 5084 00008ACE CCF1 <1> db 0CCh, 0F1h ; int3, int1 5085 00008AD0 9A <1> db 9Ah ; call far imm:imm 5086 00008AD1 CFCACB <1> db 0CFh, 0CAh, 0CBh ; iret, retf imm, retf 5087 00008AD4 60 <1> db 60h ; pusha 5088 00008AD5 61 <1> db 61h ; popa 5089 00008AD6 C9 <1> db 0C9h ; leave 5090 <1> .bytes_amount: equ $ - .bytes 5091 <1> 5092 <1> ; In this table the bits have the following meaning: 5093 <1> ; 5094 <1> ; flag 80h: special pop 5095 <1> ; flag 40h: special push 5096 <1> ; if neither flag set: unusual, for leave and into 5097 <1> ; else: masked with 3Fh gives amount of bytes to push/pop 5098 <1> ; in o16, which needs to be doubled to get the amount 5099 <1> ; to push/pop in o32 instead. 5100 <1> .info: 5101 00008AD7 46 <1> db 40h + 6 ; int 5102 00008AD8 01 <1> db 1 ; into 5103 00008AD9 46 <1> db 40h + 6 ; int3 5104 00008ADA 46 <1> db 40h + 6 ; int1 5105 00008ADB 44 <1> db 40h + 4 ; call far imm:imm 5106 00008ADC 86 <1> db 80h + 6 ; iret 5107 00008ADD 84 <1> db 80h + 4 ; retf imm 5108 00008ADE 84 <1> db 80h + 4 ; retf 5109 00008ADF 50 <1> db 40h + 16 ; pusha 5110 00008AE0 90 <1> db 80h + 16 ; popa 5111 00008AE1 00 <1> db 0 ; leave 5112 <1> 5113 <1> usesection lDEBUG_CODE 5114 <1> 5115 <1> .none: 5116 <1> %else 5117 <1> dop_stack_push: 5118 <1> dop_stack_pop: 5119 <1> dop_stack_special: 5120 <1> %endif 5121 <1> dop_continue_maybe_end: 5122 000058C8 58 <1> pop ax ; discard return address 5123 000058C9 E9E5F1 <1> jmp da14_check_end ; next --> 5124 <1> 5125 <1> ; Set flag to always show size (OP_SHOSIZ). 5126 <1> dop_shosiz: 5127 000058CC 800E[068A]10 <1> or byte [disflags],DIS_I_SHOWSIZ 5128 <1> dop60a: 5129 000058D1 58 <1> pop ax ; discard return address 5130 000058D2 E9E4F1 <1> jmp da14 ; next... 5131 <1> 5132 <1> dop_far_m: 5133 000058D5 800E[078A]02 <1> setopt [disflags], DIS_I_FAR_M 5134 000058DA EBF5 <1> jmp dop60a 5135 <1> 5136 <1> dop_double_m: 5137 000058DC 800E[078A]04 <1> setopt [disflags], DIS_I_DOUBLE_M 5138 000058E1 EBEE <1> jmp dop60a 5139 <1> 5140 <1> 5141 <1> %if _MEMREF_AMOUNT 5142 <1> dop_m_src: 5143 000058E3 800E[078A]10 <1> setopt [disflags], DIS_I_M_SRC 5144 000058E8 EBE7 <1> jmp dop60a 5145 <1> 5146 <1> dop_m_src_dst: 5147 000058EA 800E[078A]10 <1> setopt [disflags], DIS_I_M_SRC 5148 <1> dop_m_dst: 5149 000058EF 800E[078A]20 <1> setopt [disflags], DIS_I_M_DST 5150 000058F4 EBDB <1> jmp dop60a 5151 <1> %else 5152 <1> dop_m_src: equ dop60a 5153 <1> dop_m_src_dst: equ dop60a 5154 <1> dop_m_dst: equ dop60a 5155 <1> %endif 5156 <1> 5157 <1> 5158 <1> dop_short: 5159 000058F6 F606[AC00]10 <1> testopt [asm_options], disasm_show_short 5160 000058FB 74D4 <1> jz dop60a 5161 000058FD B85348 <1> mov ax, "SH" 5162 00005900 E85401 <1> call dis_stosw_lowercase 5163 00005903 B84F52 <1> mov ax, "OR" 5164 00005906 E84E01 <1> call dis_stosw_lowercase 5165 00005909 B85420 <1> mov ax, "T " 5166 0000590C E84801 <1> call dis_stosw_lowercase 5167 <1> dop60a_1: 5168 0000590F EBC0 <1> jmp dop60a 5169 <1> 5170 <1> dop_near: 5171 00005911 F606[AC00]20 <1> testopt [asm_options], disasm_show_near 5172 00005916 74F7 <1> jz dop60a_1 5173 00005918 E81700 <1> call dop_show_near 5174 <1> dop60a_2: 5175 0000591B EBF2 <1> jmp dop60a_1 5176 <1> 5177 <1> dop_far: 5178 0000591D F606[AC00]40 <1> testopt [asm_options], disasm_show_far 5179 00005922 74F7 <1> jz dop60a_2 5180 <1> dop_far_required: 5181 00005924 B84641 <1> mov ax, "FA" ; store "FAR " 5182 00005927 E82D01 <1> call dis_stosw_lowercase 5183 0000592A B85220 <1> mov ax, "R " 5184 0000592D E82701 <1> call dis_stosw_lowercase 5185 00005930 EBE9 <1> jmp dop60a_2 5186 <1> 5187 <1> dop_show_near: 5188 00005932 50 <1> push ax 5189 00005933 B84E45 <1> mov ax, "NE" 5190 00005936 E81E01 <1> call dis_stosw_lowercase 5191 00005939 B84152 <1> mov ax, "AR" 5192 0000593C E81801 <1> call dis_stosw_lowercase 5193 0000593F B020 <1> mov al, " " 5194 00005941 AA <1> stosb 5195 00005942 58 <1> pop ax 5196 00005943 C3 <1> retn 5197 <1> 5198 <1> 5199 <1> disbad: 5200 00005944 8B26[048A] <1> mov sp,[savesp2] ;pop junk off stack 5201 00005948 B8[834A] <1> mov ax, da13 5202 0000594B 50 <1> push ax 5203 0000594C 66 <1> _386_PM_o32 ; xor eax, eax 5204 0000594D 31C0 <1> xor ax, ax 5205 0000594F 66 <1> _386_PM_o32 ; mov dword [dis_n], eax 5206 00005950 A3[E889] <1> mov word [dis_n], ax 5207 00005953 A3[EC89] <1> mov word [preflags], ax ; clear preflags and preused 5208 <1> %if _COND 5209 00005956 A3[0C8A] <1> mov word [condmsg], ax ; initialize conditions message 5210 <1> %endif 5211 00005959 C606[FE89]80 <1> mov byte [rmsize], 80h ; don't display any memory 5212 0000595E A3[CA83] <1> mov word [dismach], ax ; forget about the machine type 5213 00005961 8026[068A]FB <1> and byte [disflags],~DIS_I_SHOW ;and flags 5214 00005966 E8C301 <1> call disgetbyte 5215 00005969 BF[748A] <1> mov di,prefixlist 5216 0000596C B90C00 <1> mov cx,N_PREFIX 5217 0000596F F2AE <1> repne scasb 5218 00005971 740C <1> je .namedprefix ;if it's a named prefix 5219 00005973 66 <1> _386_PM_o32 ; dec dword [dis_n] 5220 00005974 FF0E[E889] <1> dec word [dis_n] 5221 00005978 BBC101 <1> mov bx,MN_DB ;offset of 'DB' mnemonic 5222 0000597B BEAC16 <1> mov si, fake_oplist.op_imm8 - oplists 5223 0000597E C3 <1> retn 5224 <1> 5225 <1> .namedprefix: 5226 0000597F 800E[068A]08 <1> or byte [disflags],DIS_I_UNUSED ;print special flag 5227 00005984 BB0B00 <1> mov bx,N_PREFIX - 1 5228 00005987 29CB <1> sub bx,cx 5229 00005989 D1E3 <1> shl bx,1 5230 0000598B 83FB0C <1> cmp bx, byte 6 *2 5231 0000598E 7216 <1> jb .segprefix ; if SEG directive --> 5232 <1> %if _PM 5233 00005990 83FB14 <1> cmp bx, byte 10 *2 5234 00005993 720A <1> jb .non16prefix ; if not OSIZE or ASIZE --> 5235 00005995 F606[0B8B]40 <1> test byte [bCSAttr], 40h; 32-bit code segment ? 5236 0000599A 7403 <1> jz .non16prefix ; no, O32 or A32 --> 5237 0000599C 83C304 <1> add bx, byte 4 ; yes, change to O16 or A16 5238 <1> .non16prefix: 5239 <1> %endif 5240 0000599F 8B9F[748A] <1> mov bx,[prefixmnem+bx-6*2] 5241 000059A3 31F6 <1> xor si, si ; no operand (empty oplist) 5242 000059A5 C3 <1> retn 5243 <1> 5244 <1> .segprefix: 5245 000059A6 8DB7AE16 <1> lea si, [bx + fake_oplist.op_segments - oplists] 5246 <1> ; -> fake OPLIST for segments 5247 000059AA BB5108 <1> mov bx,MN_SEG 5248 000059AD C3 <1> retn 5249 <1> 5250 <1> 5251 <1> usesection ASMTABLE1, 1 5252 <1> fake_oplist: 5253 <1> .op_imm8: 5254 000016AC 1100 <1> db OP_IMM8, 0 5255 <1> .op_segments: 5256 000016AE 2A00 <1> db OP_ES, 0 5257 000016B0 2800 <1> db OP_CS, 0 5258 000016B2 2D00 <1> db OP_SS, 0 5259 000016B4 2900 <1> db OP_DS, 0 5260 000016B6 2B00 <1> db OP_FS, 0 5261 000016B8 2C00 <1> db OP_GS, 0 5262 <1> __SECT__ 5263 <1> 5264 <1> 5265 <1> ; GETREGMEM_R - Get the reg part of the reg/mem part of the instruction 5266 <1> ; Uses CL 5267 <1> 5268 <1> getregmem_r: 5269 000059AE E80700 <1> call getregmem 5270 <1> 5271 <1> ; INP: al = bits 3 to 5 has value to extract 5272 <1> ; OUT: al = (INP:al >> 3) & 7 5273 <1> ; CHG: cl 5274 <1> da_get_bits_3_to_5: 5275 000059B1 B103 <1> mov cl,3 5276 000059B3 D2E8 <1> shr al,cl 5277 000059B5 2407 <1> and al,7 5278 000059B7 C3 <1> ret 5279 <1> 5280 <1> ; GETREGMEM - Get the reg/mem part of the instruction 5281 <1> 5282 <1> getregmem: 5283 000059B8 F606[ED89]80 <1> test byte [preused],GOTREGM 5284 000059BD 750B <1> jnz grm1 ;if we have it already 5285 000059BF 800E[ED89]80 <1> or byte [preused],GOTREGM 5286 000059C4 E86501 <1> call disgetbyte ;get the byte 5287 000059C7 A2[C483] <1> mov [regmem],al ;save it away 5288 <1> 5289 000059CA A0[C483] <1> grm1: mov al,[regmem] 5290 000059CD C3 <1> ret 5291 <1> 5292 <1> dis_lowercase_w: 5293 000059CE 86C4 <1> xchg al, ah 5294 000059D0 E80200 <1> call dis_lowercase 5295 000059D3 86C4 <1> xchg al, ah 5296 <1> dis_lowercase: 5297 000059D5 3C41 <1> cmp al, 'A' 5298 000059D7 720D <1> jb .not 5299 000059D9 3C5A <1> cmp al, 'Z' 5300 000059DB 7709 <1> ja .not 5301 000059DD F606[AC00]01 <1> testopt [asm_options], disasm_lowercase 5302 000059E2 7402 <1> jz .not 5303 000059E4 0C20 <1> or al, 20h 5304 <1> .not: 5305 000059E6 C3 <1> retn 5306 <1> 5307 <1> 5308 <1> dis_lowercase_refmem_w: 5309 000059E7 86C4 <1> xchg al, ah 5310 000059E9 E80200 <1> call dis_lowercase_refmem 5311 000059EC 86C4 <1> xchg al, ah 5312 <1> dis_lowercase_refmem: 5313 000059EE 3C41 <1> cmp al, 'A' 5314 000059F0 720D <1> jb .not 5315 000059F2 3C5A <1> cmp al, 'Z' 5316 000059F4 7709 <1> ja .not 5317 000059F6 F606[AC00]08 <1> testopt [asm_options], disasm_lowercase_refmem 5318 000059FB 7402 <1> jz .not 5319 000059FD 0C20 <1> or al, 20h 5320 <1> .not: 5321 000059FF C3 <1> retn 5322 <1> 5323 <1> 5324 <1> ; Show the opcode mnemonic 5325 <1> ; 5326 <1> ; INP: si-> Opcode mnemonic string of an mnlist entry. 5327 <1> ; w[si-2] & 0Fh = Length of that string. 5328 <1> ; OUT: di-> next available byte in output line 5329 <1> ; (>= line_out + 32 due to padding) 5330 <1> ; CHG: ax, cx, si 5331 <1> showop: 5332 00005A00 BF[2A08] <1> mov di, line_out+MNEMONOFS 5333 00005A03 56 <1> push si 5334 <1> 5335 00005A04 8B4CFE <1> mov cx, [si-2] 5336 00005A07 83E10F <1> and cx, 0Fh 5337 <1> .loop: 5338 00005A0A AC <1> lodsb 5339 00005A0B E8C7FF <1> call dis_lowercase 5340 00005A0E AA <1> stosb 5341 00005A0F E2F9 <1> loop .loop 5342 <1> 5343 00005A11 58 <1> pop ax ; ax-> mnemonic 5344 00005A12 3D[8E0B] <1> cmp ax, mnlist_a_suffix_allowed ; non-suffixed mnemonic ? 5345 00005A15 7227 <1> jb .nosuffix ; yes --> 5346 00005A17 3D[B20B] <1> cmp ax, mnlist_o_suffix_allowed ; optional address size suffix ? 5347 00005A1A 7208 <1> jb .a_suffix_allowed ; yes --> 5348 00005A1C 3D[270C] <1> cmp ax, mnlist_o_suffix_required; optional operand size suffix ? 5349 00005A1F B410 <1> mov ah, PREOSIZE ; (OSIZE: check OSIZE/O32) 5350 00005A21 7309 <1> jae .suffix_decide ; no, it's required --> 5351 00005A23 A9 <1> db __TEST_IMM16 ; (skip mov) 5352 <1> .a_suffix_allowed: 5353 00005A24 B420 <1> mov ah, PREASIZE ; optional ASIZE: check ASIZE/A32 5354 <1> 5355 <1> .suffix_decide_optional: ; check whether the suffix is necessary 5356 00005A26 8426[EC89] <1> test byte [preflags], ah ; check if such a prefix occured (ZR if not) 5357 00005A2A 740E <1> jz .suffix_invisible ; no, is default form --> (hide suffix) 5358 <1> 5359 <1> .suffix_decide: ; suffix will be displayed, now only decide which 5360 00005A2C B057 <1> mov al, 'W' 5361 00005A2E 8426[EE89] <1> test byte [presizeflags], ah ; 32-bit form ? 5362 00005A32 7402 <1> jz .got_suffix ; no --> 5363 00005A34 B044 <1> mov al, 'D' 5364 <1> .got_suffix: 5365 00005A36 E89CFF <1> call dis_lowercase 5366 00005A39 AA <1> stosb ; store suffix 5367 <1> 5368 <1> .suffix_invisible: ; notional suffix either displayed or left hidden, 5369 00005A3A 0826[ED89] <1> or byte [preused], ah ; in any case, mark opcode prefix as used 5370 <1> 5371 <1> .nosuffix: 5372 <1> 5373 <1> ; Store blanks to pad to 8 characters, but at least one 5374 00005A3E B020 <1> mov al, 32 5375 <1> .pad: 5376 00005A40 AA <1> stosb 5377 00005A41 81FF[3208] <1> cmp di, line_out+MNEMONOFS+8 5378 00005A45 72F9 <1> jb .pad 5379 <1> 5380 00005A47 C3 <1> retn 5381 <1> 5382 <1> 5383 <1> ; INP: byte [segmnt] = number of segment register 5384 <1> ; [segrgnam] = uppercase segment register names 5385 <1> ; CHG: bx, ax 5386 <1> ; OUT: ax = uppercase segment register name 5387 <1> showseg_uppercase_ax: 5388 00005A48 A0[FF89] <1> mov al,[segmnt] ;segment number 5389 00005A4B 98 <1> cbw 5390 00005A4C D1E0 <1> shl ax,1 5391 00005A4E 93 <1> xchg ax,bx ;mov bx,ax 5392 00005A4F 8B87[428A] <1> mov ax,[segrgnam+bx] ;get register name 5393 00005A53 C3 <1> retn 5394 <1> 5395 <1> ; SHOWSEG - Show the segment descriptor in SEGMNT 5396 <1> ; Entry DI Where to put it 5397 <1> ; Exit DI Updated 5398 <1> ; Uses AX, BX 5399 <1> 5400 <1> showseg: 5401 00005A54 E8F1FF <1> call showseg_uppercase_ax 5402 <1> dis_stosw_lowercase: 5403 00005A57 E874FF <1> call dis_lowercase_w 5404 00005A5A AB <1> stosw 5405 00005A5B C3 <1> retn 5406 <1> 5407 <1> 5408 <1> ; Write a size specifier to the buffer 5409 <1> ; and set some flags 5410 <1> ; INP: ah = r/m size value, 5411 <1> ; F0h byte (less than zero) 5412 <1> ; 00h word (equal to zero) 5413 <1> ; 10h dword (greater than zero, but != 20h) 5414 <1> ; 20h qword (greater than zero, == 20h) 5415 <1> ; di-> buffer 5416 <1> ; OUT: di-> behind size specifier in buffer 5417 <1> ; by[rmsize] set 5418 <1> ; wo[sizeloc]-> size specifier in buffer 5419 <1> ; CHG: ax 5420 <1> ; 5421 <1> ; Size specifiers are BYTE, WORD, DWORD, and QWORD. One 5422 <1> ; blank is appended to the size specifier. 5423 <1> ; 5424 <1> ; Size specifiers are lowercased if that option is selected. 5425 <1> showsize: 5426 00005A5C 8826[FE89] <1> mov [rmsize], ah ; save r/m size 5427 00005A60 893E[0A8A] <1> mov [sizeloc], di ; save where we're putting this 5428 00005A64 B051 <1> mov al, 'Q' 5429 00005A66 80FC20 <1> cmp ah, 20h ; QWORD ? 5430 00005A69 7412 <1> je .qword ; yes --> 5431 00005A6B 80FC00 <1> cmp ah, 0 5432 00005A6E 7D09 <1> jge .notbyte ; if word or dword --> 5433 <1> .byte: 5434 00005A70 B85445 <1> mov ax, "TE" 5435 00005A73 50 <1> push ax 5436 00005A74 B84259 <1> mov ax, "BY" 5437 00005A77 EB0F <1> jmp s .common 5438 <1> 5439 <1> .notbyte: 5440 00005A79 7406 <1> je .word ; if word 5441 <1> .dword: 5442 00005A7B B044 <1> mov al, 'D' 5443 <1> .qword: 5444 00005A7D E855FF <1> call dis_lowercase 5445 00005A80 AA <1> stosb 5446 <1> .word: 5447 00005A81 B85244 <1> mov ax, "RD" 5448 00005A84 50 <1> push ax 5449 00005A85 B8574F <1> mov ax, "WO" 5450 <1> .common: 5451 00005A88 E8CCFF <1> call dis_stosw_lowercase 5452 00005A8B 58 <1> pop ax 5453 00005A8C E8C8FF <1> call dis_stosw_lowercase 5454 00005A8F B020 <1> mov al, 32 5455 00005A91 AA <1> stosb 5456 <1> showptr.ret: 5457 00005A92 C3 <1> retn 5458 <1> 5459 <1> ; Write "PTR " to a buffer if NASM syntax is not selected. 5460 <1> ; INP: di-> buffer 5461 <1> ; OUT: di-> behind written string "PTR " (or unchanged) 5462 <1> ; CHG: ax 5463 <1> ; 5464 <1> ; The string is lowercased if that option is selected. 5465 <1> showptr: 5466 00005A93 F606[AC00]04 <1> testopt [asm_options], disasm_nasm 5467 00005A98 75F8 <1> jnz .ret 5468 00005A9A B85054 <1> mov ax, "PT" 5469 00005A9D E8B7FF <1> call dis_stosw_lowercase 5470 00005AA0 B85220 <1> mov ax, "R " 5471 00005AA3 EBB2 <1> jmp s dis_stosw_lowercase 5472 <1> 5473 <1> ; Write "DWORD " to a buffer 5474 <1> ; INP: di-> buffer 5475 <1> ; OUT: di-> behind written string "DWORD " 5476 <1> ; CHG: ax 5477 <1> ; 5478 <1> ; The string is lowercased if that option is selected. 5479 <1> showdword: equ showsize.dword 5480 <1> showword: equ showsize.word 5481 <1> 5482 <1> ; DISP32 - Print 32-bit displacement for addressing modes. 5483 <1> ; Entry None 5484 <1> ; Exit None 5485 <1> ; Uses AX 5486 <1> 5487 <1> disp32: 5488 00005AA5 E8A000 <1> call disgetword 5489 <1> .ax: 5490 00005AA8 50 <1> push ax 5491 00005AA9 E89C00 <1> call disgetword 5492 00005AAC E8CD61 <1> call hexword 5493 00005AAF 58 <1> pop ax 5494 00005AB0 E9C961 <1> jmp hexword 5495 <1> 5496 <1> ; SHOWREG16 - Show 16-bit register name. 5497 <1> ; 5498 <1> ; INP: al = register number, 0 to 7 5499 <1> ; di -> buffer 5500 <1> ; OUT: register name stored to buffer 5501 <1> ; ax = INP:al * 2 5502 <1> showreg16: 5503 00005AB3 98 <1> cbw 5504 00005AB4 D1E0 <1> shl ax,1 5505 00005AB6 93 <1> xchg ax,bx 5506 00005AB7 50 <1> push ax 5507 00005AB8 8B87[328A] <1> mov ax,[rgnam16+bx] 5508 00005ABC E898FF <1> call dis_stosw_lowercase 5509 00005ABF 58 <1> pop ax 5510 00005AC0 93 <1> xchg ax,bx 5511 00005AC1 C3 <1> ret 5512 <1> 5513 <1> 5514 <1> ; DISCHK32D - Check for O32 (32-bit operand size). 5515 <1> dischk32d: 5516 00005AC2 800E[ED89]10 <1> or byte [preused], PREOSIZE 5517 00005AC7 F606[EE89]10 <1> test byte [presizeflags], PRE32D 5518 00005ACC C3 <1> retn 5519 <1> 5520 <1> 5521 <1> ; SHOWMACH - Return string "[needs math coprocessor]", etc. 5522 <1> ; Entry di -> table of 5 words 5523 <1> ; cx = instruction 5524 <1> ; Exit si Address of string 5525 <1> ; cx Length of string, or 0 if not needed 5526 <1> ; Uses al, di 5527 <1> 5528 <1> showmach: 5529 00005ACD BE[417C] <1> mov si,needsmsg ; candidate message 5530 00005AD0 F606[CB83]01 <1> test byte [dmflags],DM_COPR 5531 00005AD5 741E <1> jz sm1 ; if not a coprocessor instruction 5532 00005AD7 C6440937 <1> mov byte [si + needsmsg.digit_6_ofs], '7' 5533 <1> ; change message text 5534 00005ADB A0[F00A] <1> mov al,[mach_87] 5535 00005ADE 803E[EF0A]00 <1> cmp byte [has_87],0 5536 00005AE3 7517 <1> jnz sm2 ; if it has a coprocessor 5537 00005AE5 A0[EE0A] <1> mov al,[machine] 5538 00005AE8 3A06[CA83] <1> cmp al,[dismach] 5539 00005AEC 7214 <1> jb sm3 ; if we display the message 5540 00005AEE BE[4C7C] <1> mov si,needsmath ; print this message instead 5541 00005AF1 B91800 <1> mov cx,needsmath_L 5542 00005AF4 C3 <1> retn 5543 <1> 5544 <1> sm1: 5545 00005AF5 C6440936 <1> mov byte [si + needsmsg.digit_6_ofs], '6' 5546 <1> ; reset message text 5547 00005AF9 A0[EE0A] <1> mov al,[machine] 5548 <1> sm2: 5549 00005AFC 3A06[CA83] <1> cmp al,[dismach] 5550 00005B00 730C <1> jae sm4 ; if no message (so far) 5551 <1> sm3: 5552 00005B02 A0[CA83] <1> mov al,[dismach] 5553 00005B05 0430 <1> add al,'0' 5554 00005B07 884407 <1> mov byte [si + needsmsg.digit_x_ofs], al 5555 00005B0A B90B00 <1> mov cx,needsmsg_L ; length of the message 5556 00005B0D C3 <1> retn 5557 <1> 5558 <1> ; Check for obsolete instruction. 5559 <1> sm4: 5560 00005B0E BE[647C] <1> mov si, obsolete ; candidate message 5561 00005B11 89C8 <1> mov ax, cx ; get info on this instruction 5562 00005B13 B90500 <1> mov cx, 5 5563 00005B16 F2AF <1> repne scasw 5564 00005B18 7511 <1> jne sm6 ; if no matches 5565 00005B1A BF[E483] <1> mov di, obsmach + 5 - 1 5566 00005B1D 29CF <1> sub di, cx 5567 00005B1F 31C9 <1> xor cx, cx ; clear CX: no message 5568 00005B21 A0[F00A] <1> mov al, byte [mach_87] 5569 00005B24 3A05 <1> cmp al, byte [di] 5570 00005B26 7E03 <1> jle sm5 ; if this machine is OK 5571 00005B28 B90A00 <1> mov cx, obsolete_L 5572 <1> sm5: 5573 00005B2B C3 <1> retn 5574 <1> 5575 <1> sm6: equ sm5 5576 <1> 5577 <1> 5578 <1> ; DISGETBYTE - Get byte for disassembler. 5579 <1> ; Entry None 5580 <1> ; Exit AL Next byte in instruction stream 5581 <1> ; Uses None 5582 <1> 5583 <1> disgetbyte: 5584 00005B2C 1E <1> push ds 5585 00005B2D 66 <1> _386_PM_o32 ; push esi 5586 00005B2E 56 <1> push si ; save ds, (e)si 5587 00005B2F 66 <1> _386_PM_o32 ; mov esi, dword [u_addr] 5588 00005B30 8B36[2C0B] <1> mov si, word [u_addr] 5589 00005B34 66 <1> _386_PM_o32 ; add esi, dword [dis_n] 5590 00005B35 0336[E889] <1> add si, word [dis_n] ; index to the right byte 5591 00005B39 8E1E[300B] <1> mov ds, word [u_addr + saSegSel] 5592 00005B3D 67 <1> _386_PM_a32 5593 00005B3E AC <1> lodsb ; get the byte 5594 00005B3F 66 <1> _386_PM_o32 ; pop esi 5595 00005B40 5E <1> pop si 5596 00005B41 1F <1> pop ds ; restore regs 5597 00005B42 66 <1> _386_PM_o32 ; inc dword [dis_n] 5598 00005B43 FF06[E889] <1> inc word [dis_n] ; indicate that we've gotten this byte 5599 00005B47 C3 <1> retn 5600 <1> 5601 <1> 5602 <1> ; DISGETWORD - Get word for disassembler. 5603 <1> ; Entry None 5604 <1> ; Exit AX Next word 5605 <1> ; Uses None 5606 <1> 5607 <1> disgetword: 5608 00005B48 1E <1> push ds 5609 00005B49 66 <1> _386_PM_o32 ; push esi 5610 00005B4A 56 <1> push si ; save ds, (e)si 5611 00005B4B 66 <1> _386_PM_o32 ; mov esi, dword [u_addr] 5612 00005B4C 8B36[2C0B] <1> mov si, word [u_addr] 5613 00005B50 66 <1> _386_PM_o32 ; add esi, dword [dis_n] 5614 00005B51 0336[E889] <1> add si, word [dis_n] ; index to the right byte 5615 00005B55 8E1E[300B] <1> mov ds, word [u_addr + saSegSel] 5616 00005B59 67 <1> _386_PM_a32 5617 00005B5A AD <1> lodsw ; get the word 5618 00005B5B 66 <1> _386_PM_o32 ; pop esi 5619 00005B5C 5E <1> pop si 5620 00005B5D 1F <1> pop ds ; restore regs 5621 00005B5E 66 <1> _386_PM_o32 ; add dword [dis_n], byte 2 5622 00005B5F 8306[E889]02 <1> add word [dis_n], byte 2 ; indicate that we've gotten this word 5623 00005B64 C3 <1> retn 5624 <1> 5625 <1> 5626 <1> ; DISSHOWBYTES - Show bytes for the disassembler. 5627 <1> ; Entry BX Number of bytes (must be > 0) 5628 <1> ; di-> output line 5629 <1> ; Exit u_addr updated 5630 <1> ; Uses BX, (E)SI. 5631 <1> 5632 <1> disshowbytes: 5633 00005B65 66 <1> _386_PM_o32 ; mov esi, dword [u_addr] 5634 00005B66 8B36[2C0B] <1> mov si, word [u_addr] 5635 00005B6A 8E1E[300B] <1> mov ds, word [u_addr + saSegSel] 5636 <1> .loop: 5637 00005B6E 67 <1> _386_PM_a32 5638 00005B6F AC <1> lodsb 5639 00005B70 E81061 <1> call hexbyte 5640 00005B73 4B <1> dec bx 5641 00005B74 75F8 <1> jnz .loop 5642 00005B76 16 <1> push ss 5643 00005B77 1F <1> pop ds 5644 00005B78 66 <1> _386_PM_o32 ; mov dword [u_addr], esi 5645 00005B79 8936[2C0B] <1> mov word [u_addr], si 5646 00005B7D C3 <1> retn 5647 <1> 5648 <1> ; MOVEOVER - Move the line to the right. 5649 <1> ; Entry DI Last address + 1 of line so far 5650 <1> ; Exit CX Number of bytes to move 5651 <1> ; DI Updated 5652 <1> ; Uses SI 5653 <1> moveover: 5654 00005B7E 833E[0A8A]00 <1> cmp word [sizeloc], byte 0 5655 00005B83 7404 <1> je mo1 ; if sizeloc not saved 5656 00005B85 010E[0A8A] <1> add word [sizeloc], cx 5657 <1> 5658 <1> mo1: 5659 00005B89 89FE <1> mov si, di 5660 00005B8B 01CF <1> add di, cx 5661 00005B8D 89F9 <1> mov cx, di 5662 00005B8F 81E9[2A08] <1> sub cx, line_out+MNEMONOFS 5663 00005B93 57 <1> push di 5664 00005B94 FD <1> std ; _AMD_ERRATUM_109_WORKAROUND as below 5665 00005B95 4E <1> dec si 5666 00005B96 4F <1> dec di 5667 <1> 5668 <1> 5669 <1> numdef AMD_ERRATUM_109_WORKAROUND, 1 5670 <1> ; Refer to comment in init.asm init_movp. 5671 <1> 5672 <1> %if _AMD_ERRATUM_109_WORKAROUND 5673 00005B97 E308 <1> jcxz @FF 5674 00005B99 83F914 <1> cmp cx, 20 5675 00005B9C 7703 <1> ja @FF 5676 <1> @@: 5677 00005B9E A4 <1> movsb 5678 00005B9F E2FD <1> loop @B 5679 <1> @@: 5680 <1> %endif 5681 00005BA1 F3A4 <1> rep movsb 5682 00005BA3 5F <1> pop di 5683 00005BA4 FC <1> cld 5684 00005BA5 C3 <1> retn 2188 2189 2190 %if _PM 2191 %include "pmdata.asm" 2192 <1> 2193 <1> %if 0 2194 <1> 2195 <1> lDebugX PM data 2196 <1> 2197 <1> Copyright (C) 1995-2003 Paul Vojta 2198 <1> Copyright (C) 2008-2021 C. Masloch 2199 <1> 2200 <1> Usage of the works is permitted provided that this 2201 <1> instrument is retained with the works, so that any entity 2202 <1> that uses the works is notified of this instrument. 2203 <1> 2204 <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 2205 <1> 2206 <1> %endif 2207 <1> 2208 <1> 2209 <1> usesection lDEBUG_DATA_ENTRY 2210 <1> 2211 00008AE2 00 <1> align 4, db 0 2212 00008AE4 00000000 <1> exception_csip: dd 0 ; 16:16 far 16-bit address of debugger exception 2213 00008AE8 00000000 <1> dpmientry: dd 0 ; DPMI entry point returned by DPMI host 2214 00008AEC 00000000 <1> dpmiwatch: dd 0 2215 00008AF0 00000000 <1> dpmi_rm2pm: dd 0 2216 00008AF4 00000000 <1> dpmi_rmsav: dd 0 2217 00008AF8 000000000000 <1> dpmi_pm2rm: dw 0,0,0 2218 00008AFE 000000000000 <1> dpmi_pmsav: dw 0,0,0 2219 <1> align 2, db 0 2220 00008B04 0000 <1> dssel: dw 0 ; debugger's (16-bit RW) data selector 2221 00008B06 0000 <1> cssel: dw 0 ; debugger's (16-bit RE) code selector 2222 00008B08 0000 <1> scratchsel: dw 0 ; scratch selector used for various purposes, limit -1 2223 00008B0A 00 <1> dpmi32: db 0 ; 32-bit client if true 2224 00008B0B 00 <1> bCSAttr: db 0 ; current code attribute (D bit) 2225 <1> align 2, db 0 2226 00008B0C 00 <1> bAddr32: db 0 ; Address attribute. if 1, hiword(edx) is valid 2227 00008B0D 00 <1> db 0 ; read/written when bAddr32 is pushed/popped 2228 <1> 2229 <1> 2230 <1> align 2, db 0 2231 <1> convsegs: 2232 <1> .: 2233 00008B0E [E00A] <1> dw pInDOS + so16aSegSel 2234 <1> %if _USESDA 2235 00008B10 [E80A] <1> dw pSDA + so16aSegSel 2236 <1> %endif 2237 00008B12 [FA09] <1> dw auxbuff_segorsel + soaSegSel 2238 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 2239 00008B14 [040B] <1> dw history.segorsel + soaSegSel 2240 <1> %endif 2241 <1> .end_fixed: 2242 <1> .amount_fixed: equ (.end_fixed - .) / 2 2243 00008B16 [120B] <1> dw a_addr + saSegSel 2244 00008B18 [1C0B] <1> dw d_addr + saSegSel 2245 <1> .end: 2246 <1> .amount: equ (.end - .) / 2 2247 <1> 2248 <1> exctab: 2249 <1> %if _CATCHEXC00 2250 00008B1A 00 <1> db 00h 2251 <1> %endif 2252 <1> %if _CATCHEXC01 2253 00008B1B 01 <1> db 01h 2254 <1> %endif 2255 <1> %if _CATCHEXC03 2256 00008B1C 03 <1> db 03h 2257 <1> %endif 2258 <1> %if _CATCHEXC06 2259 00008B1D 06 <1> db 06h 2260 <1> %endif 2261 <1> %if _CATCHEXC0C 2262 00008B1E 0C <1> db 0Ch 2263 <1> %endif 2264 <1> %if _CATCHEXC0D 2265 00008B1F 0D <1> db 0Dh 2266 <1> %endif 2267 <1> %if _CATCHEXC0E 2268 00008B20 0E <1> db 0Eh 2269 <1> %endif 2270 <1> endexctab: 2271 <1> 2272 <1> %if _CATCHPMINT214C || _DEBUG 2273 00008B21 00 <1> align 8, db 0 2274 <1> excsave: 2275 <1> .: 2276 <1> %if _CATCHEXC00 2277 00008B28 FFFFFFFFFFFF0000 <1> dw -1,-1,-1,0 ; 0 2278 <1> %endif 2279 <1> %if _CATCHEXC01 2280 00008B30 FFFFFFFFFFFF0000 <1> dw -1,-1,-1,0 ; 1 2281 <1> %endif 2282 <1> %if _CATCHEXC03 2283 00008B38 FFFFFFFFFFFF0000 <1> dw -1,-1,-1,0 ; 3 2284 <1> %endif 2285 <1> %if _CATCHEXC06 2286 00008B40 FFFFFFFFFFFF0000 <1> dw -1,-1,-1,0 ; 6 2287 <1> %endif 2288 <1> %if _CATCHEXC0C 2289 00008B48 FFFFFFFFFFFF0000 <1> dw -1,-1,-1,0 ; 0C 2290 <1> %endif 2291 <1> %if _CATCHEXC0D 2292 00008B50 FFFFFFFFFFFF0000 <1> dw -1,-1,-1,0 ; 0D 2293 <1> %endif 2294 <1> %if _CATCHEXC0E 2295 00008B58 FFFFFFFFFFFF0000 <1> dw -1,-1,-1,0 ; 0E 2296 <1> %endif 2297 <1> .end: 2298 <1> .amount: equ (.end - .) / 8 2299 <1> 2300 <1> %if .amount != (endexctab - exctab) 2301 <1> %error Wrong excsave length 2302 <1> %endif 2303 <1> %endif 2304 <1> 2305 <1> %if CATCHPMINTAMOUNT 2306 <1> pminttab: 2307 <1> .: 2308 <1> %if _CATCHPMINT214C 2309 00008B60 21 <1> db 21h 2310 00008B61 [6B8C] <1> dw pmint21 2311 <1> %endif 2312 <1> .end: 2313 <1> .amount: equ (.end - .) / 3 2314 <1> 2315 00008B63 00 <1> align 8, db 0 2316 <1> pmintsave: 2317 <1> .: 2318 <1> %if _CATCHPMINT214C 2319 00008B68 FFFFFFFFFFFF0000 <1> .int21: dw -1,-1,-1,0 2320 <1> %endif 2321 <1> .end: 2322 <1> .amount: equ (.end - .) / 8 2323 <1> %endif 2192 %include "pminit.asm" 2193 <1> 2194 <1> %if 0 2195 <1> 2196 <1> lDebugX PM initialisation 2197 <1> 2198 <1> Copyright (C) 1995-2003 Paul Vojta 2199 <1> Copyright (C) 2008-2021 C. Masloch 2200 <1> 2201 <1> Usage of the works is permitted provided that this 2202 <1> instrument is retained with the works, so that any entity 2203 <1> that uses the works is notified of this instrument. 2204 <1> 2205 <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 2206 <1> 2207 <1> %endif 2208 <1> 2209 <1> 2210 <1> usesection lDEBUG_DATA_ENTRY 2211 <1> 2212 <1> ; Int2F handler. Starts with an IISP header. 2213 <1> align 2, db 0 2214 00008B70 EB10000000004B4200- <1> iispentry debug2F, 0, debug2F 2214 00008B79 EB4100 <1> 2215 <1> oldi2F: equ debug2F.next 2216 00008B82 9C <1> pushf 2217 00008B83 3D8716 <1> cmp ax, 1687h 2218 <1> dpmidisable: ; set this byte to __TEST_IMM8 to disable new DPMI entry 2219 00008B86 7406 <1> je short dpmiquery 2220 00008B88 9D <1> popf 2221 <1> jumpoldi2F: 2222 00008B89 2EFF2E[728B] <1> jmp far [ cs:oldi2F ] 2223 <1> 2224 <1> dpmiquery: 2225 00008B8E 0E <1> push cs 2226 00008B8F E8F7FF <1> call jumpoldi2F 2227 00008B92 85C0 <1> test ax, ax 2228 00008B94 750F <1> jnz .nohost 2229 <1> 2230 00008B96 2E893E[E88A] <1> mov word [ cs:dpmientry+0 ], di 2231 00008B9B 2E8C06[EA8A] <1> mov word [ cs:dpmientry+2 ], es 2232 00008BA0 BF[A68B] <1> mov di, mydpmientry 2233 00008BA3 0E <1> push cs 2234 00008BA4 07 <1> pop es 2235 <1> .nohost: 2236 00008BA5 CF <1> iret 2237 <1> 2238 <1> mydpmientry: 2239 00008BA6 2EC606[0A8B]00 <1> mov byte [ cs:dpmi32 ], 0 2240 00008BAC A801 <1> test al, 1 2241 00008BAE 7405 <1> jz .16 2242 00008BB0 2EFE06[0A8B] <1> inc byte [ cs:dpmi32 ] 2243 <1> .16: 2244 00008BB5 2EFF1E[E88A] <1> call far [ cs:dpmientry ] 2245 00008BBA 7301 <1> jnc installdpmi 2246 <1> debug2F.hwreset: 2247 00008BBC CB <1> retf 2248 <1> 2249 <1> 2250 <1> subcpu 286 2251 <1> installdpmi: 2252 00008BBD 60 <1> pusha 2253 00008BBE 89E5 <1> mov bp, sp ; [bp+16]=ip, [bp+18]=cs 2254 00008BC0 9C <1> pushf 2255 00008BC1 1E <1> push ds 2256 00008BC2 06 <1> push es 2257 <1> 2258 00008BC3 8CCB <1> mov bx, cs 2259 00008BC5 B80600 <1> mov ax, 0006h 2260 00008BC8 CD31 <1> int 31h 2261 00008BCA 7303E99700 <1> jc .fataldpmierr ; get base address of cs 2262 00008BCF F6C20F <1> test dl, 15 2263 00008BD2 7403E98F00 <1> jnz .fataldpmierr 2264 00008BD7 F7C1F0FF <1> test cx, 0FFF0h 2265 00008BDB 7403E98600 <1> jnz .fataldpmierr 2266 00008BE0 C1EA04 <1> shr dx, 4 2267 00008BE3 C1E10C <1> shl cx, 12 2268 00008BE6 09CA <1> or dx, cx 2269 00008BE8 2E3916[B00A] <1> cmp word [cs:pspdbg], dx 2270 00008BED 7577 <1> jne .fataldpmierr 2271 <1> 2272 00008BEF 8CCB <1> mov bx, cs 2273 00008BF1 B80A00 <1> mov ax, 000Ah ; get a data descriptor for DEBUG's segment 2274 00008BF4 CD31 <1> int 31h 2275 00008BF6 726E <1> jc .fataldpmierr 2276 00008BF8 8ED8 <1> mov ds, ax 2277 00008BFA 8C0E[068B] <1> mov word [ cssel ], cs 2278 00008BFE A3[048B] <1> mov word [ dssel ], ax 2279 <1> 2280 00008C01 8026[A600]EF <1> clropt [internalflags3], dif3_ss_b_bit_set 2281 00008C06 89C3 <1> mov bx, ax ; bx = debugger ss/ds selector 2282 00008C08 0F02CB <1> lar cx, bx ; ch = access rights 2283 00008C0B 7559 <1> jnz .fataldpmierr 2284 00008C0D C1E908 <1> shr cx, 8 ; get format for 31.0009 call 2285 00008C10 F606[8600]10 <1> testopt [options3], opt3_ss_b_bit_set 2286 00008C15 7407 <1> jz @F 2287 00008C17 800E[A600]10 <1> setopt [internalflags3], dif3_ss_b_bit_set 2288 00008C1C B540 <1> mov ch, 40h ; set B bit if requested 2289 <1> @@: 2290 00008C1E B80900 <1> mov ax, 0009h 2291 00008C21 CD31 <1> int 31h ; set or clear B bit 2292 00008C23 7241 <1> jc .fataldpmierr 2293 <1> 2294 00008C25 B90100 <1> mov cx, 1 ; allocate code_sel selector 2295 00008C28 31C0 <1> xor ax, ax 2296 00008C2A CD31 <1> int 31h 2297 00008C2C 7238 <1> jc .fataldpmierr 2298 00008C2E A3[D600] <1> mov word [ code_sel ], ax 2299 00008C31 89C3 <1> mov bx, ax 2300 00008C33 31C9 <1> xor cx, cx 2301 00008C35 83CAFF <1> or dx, -1 ; cx:dx = 0FFFFh 2302 00008C38 B80800 <1> mov ax, 0008h 2303 00008C3B CD31 <1> int 31h ; set limit 64 KiB 2304 00008C3D 7227 <1> jc .fataldpmierr 2305 00008C3F 0F020E[068B] <1> lar cx, word [ cssel ] ; get access rights/type of cs 2306 00008C44 7520 <1> jnz .fataldpmierr 2307 00008C46 C1E908 <1> shr cx, 8 ; proper format for 31.0009 2308 <1> ; high byte zero (16-bit and byte-granular selector) 2309 00008C49 B80900 <1> mov ax, 0009h 2310 00008C4C CD31 <1> int 31h ; set descriptor access rights/type 2311 00008C4E 7216 <1> jc .fataldpmierr 2312 <1> 2313 00008C50 8B16[D400] <1> mov dx, word [ code_seg ] 2314 00008C54 89D1 <1> mov cx, dx 2315 00008C56 C1E204 <1> shl dx, 4 2316 00008C59 C1E90C <1> shr cx, 12 2317 00008C5C B80700 <1> mov ax, 0007h 2318 00008C5F CD31 <1> int 31h ; set selector base to code segment's base 2319 <1> 2320 00008C61 E8AAF6 <1> call entry_to_code_sel 2321 00008C64 [A65B] <1> dw installdpmi_code 2322 <1> 2323 <1> .fataldpmierr: 2324 00008C66 B8FF4C <1> mov ax, 4CFFh 2325 00008C69 CD21 <1> int 21h 2326 <1> 2327 <1> 2328 <1> usesection lDEBUG_CODE 2329 <1> 2330 <1> code_insure_low_byte_not_0CCh 2331 <1> installdpmi_code: 2332 00005BA6 6653 <1> _386 push ebx 2333 00005BA8 6652 <1> _386 push edx 2334 <1> ; Some code (particularly d4message) may expect us to 2335 <1> ; run on the debugger's stack, to access the data 2336 <1> ; segment. Therefore, switch stacks. 2337 00005BAA 8CDA <1> mov dx, ds ; dx = ds = debugger data selector 2338 00005BAC 8CD0 <1> mov ax, ss 2339 00005BAE 66 <1> _386_o32 ; mov ebx, esp 2340 00005BAF 89E3 <1> mov bx, sp ; ax:bx = stack to restore 2341 00005BB1 8ED2 <1> mov ss, dx 2342 <1> %ifn _ONLYNON386 2343 <1> ..@patch_no386_ds_4: ; (insure to set sp directly after ss) 2344 00005BB3 66 <1> o32 ; mov esp, dword [run_sp] 2345 <1> %endif 2346 00005BB4 8B26[A80A] <1> mov sp, [run_sp] ; switch to our stack 2347 <1> 2348 00005BB8 50 <1> push ax 2349 00005BB9 66 <1> _386_o32 ; push ebx 2350 00005BBA 53 <1> push bx ; save original stack, far pointer 2351 <1> 2352 00005BBB 800E[9D00]08 <1> setopt [internalflags], protectedmode 2353 <1> 2354 <1> d4 call d4message 2355 <1> d4 asciz "In installdpmi_code",13,10 2356 <1> 2357 00005BC0 B90200 <1> mov cx, 2 ; alloc 2 descriptors 2358 00005BC3 31C0 <1> xor ax, ax 2359 00005BC5 CD31 <1> int 31h 2360 00005BC7 7303E91F02 <1> jc .fataldpmierr 2361 <1> 2362 <1> d4 call d4message 2363 <1> d4 asciz "In installdpmi_code, allocated 2 descriptors",13,10 2364 <1> 2365 00005BCC A3[088B] <1> mov word [ scratchsel ], ax ; the first is used as scratch descriptor 2366 00005BCF 89C3 <1> mov bx, ax 2367 00005BD1 31C9 <1> xor cx, cx 2368 <1> %if 1 2369 00005BD3 49 <1> _386 dec cx ; set a limit of FFFFFFFFh if 386 2370 <1> %else 2371 <1> cmp byte [ dpmi32 ], 0 2372 <1> je .16 2373 <1> dec cx ; set a limit of FFFFFFFFh if 32-bit client 2374 <1> .16: 2375 <1> %endif 2376 00005BD4 83CAFF <1> or dx, byte -1 2377 00005BD7 B80800 <1> mov ax, 0008h 2378 00005BDA CD31 <1> int 31h 2379 00005BDC B80300 <1> mov ax, 0003h 2380 00005BDF CD31 <1> int 31h ; get selector increment 2381 <1> %if 0 2382 <1> jnc .03sup 2383 <1> mov ax, 8 2384 <1> .03sup: 2385 <1> %endif 2386 00005BE1 01C3 <1> add bx, ax ; the second selector is client's CS 2387 00005BE3 31C9 <1> xor cx, cx ; this limit is FFFFh even for 32-bits 2388 00005BE5 B80800 <1> mov ax, 0008h 2389 00005BE8 CD31 <1> int 31h 2390 <1> 2391 00005BEA 66 <1> _386_o32 2392 00005BEB 5A <1> pop dx ; pop preserved (e)sp 2393 00005BEC 58 <1> pop ax ; get client ss 2394 00005BED 8EC0 <1> mov es, ax 2395 00005BEF 50 <1> push ax ; preserve ss again 2396 00005BF0 66 <1> _386_o32 2397 00005BF1 52 <1> push dx ; preserve (e)sp again 2398 <1> 2399 00005BF2 268B5612 <1> mov dx, word [ es:bp+18 ] 2400 <1> ; get client's CS 2401 00005BF6 E8FB3E <1> call setrmaddr ; set base 2402 00005BF9 0F020E[068B] <1> lar cx, word [ cssel ] 2403 00005BFE 7403E9E801 <1> jnz .fataldpmierr 2404 00005C03 C1E908 <1> shr cx, 8 ; CS remains 16-bit 2405 00005C06 B80900 <1> mov ax, 0009h 2406 00005C09 CD31 <1> int 31h 2407 00005C0B 26895E12 <1> mov word [ es:bp+18 ], bx 2408 <1> 2409 00005C0F FC <1> cld 2410 <1> 2411 00005C10 BE[0E8B] <1> mov si, convsegs 2412 00005C13 B90400 <1> mov cx, convsegs.amount_fixed 2413 <1> .loopseg: 2414 <1> d4 call d4message 2415 <1> d4 asciz "In installdpmi_code.loopseg",13,10 2416 <1> 2417 00005C16 AD <1> lodsw 2418 00005C17 89C7 <1> mov di, ax 2419 00005C19 8B5D02 <1> mov bx, word [di + soaSegment] 2420 00005C1C B80200 <1> mov ax, 0002h 2421 00005C1F CD31 <1> int 31h 2422 00005C21 7303E9C501 <1> jc .fataldpmierr 2423 00005C26 894504 <1> mov word [di + soaSelector], ax 2424 00005C29 E2EB <1> loop .loopseg 2425 <1> 2426 <1> d4 call d4message 2427 <1> d4 asciz "In installdpmi_code after .loopseg",13,10 2428 <1> 2429 00005C2B 6657 <1> _386 push edi 2430 00005C2D 6631FF <1> _386 xor edi, edi ; clear edih 2431 00005C30 8026[9E00]DB <1> clropt [internalflags], canswitchmode|switchbuffer 2432 00005C35 31ED <1> xor bp, bp 2433 00005C37 45 <1> _386 inc bp 2434 00005C38 45 <1> _386 inc bp 2435 <1> .save16: 2436 00005C39 B80503 <1> mov ax, 0305h ; get raw mode-switch save state addresses 2437 00005C3C CD31 <1> int 31h 2438 00005C3E 7303E9A000 <1> jc .cannotswitch 2439 00005C43 3D1020 <1> cmp ax, _AUXBUFFSIZE ; fits into auxbuff ? 2440 00005C46 7603E99800 <1> ja .cannotswitch ; no --> 2441 00005C4B 85C0 <1> test ax, ax 2442 00005C4D 7473 <1> jz .nobuffer 2443 <1> 2444 <1> .switchbuffer_init: 2445 00005C4F 50 <1> push ax ; ax = target switchbuffer size 2446 00005C50 53 <1> push bx 2447 00005C51 51 <1> push cx 2448 00005C52 56 <1> push si 2449 00005C53 57 <1> push di ; preserve regs returned by fn 0305h 2450 <1> 2451 00005C54 8B3E[F809] <1> mov di, word [auxbuff_switchbuffer_size] 2452 00005C58 89F9 <1> mov cx, di 2453 00005C5A 29C1 <1> sub cx, ax 2454 00005C5C 7441 <1> je .no_switchbuffer_size_change 2455 00005C5E 8E06[FE09] <1> mov es, word [auxbuff_segorsel + soaSelector] 2456 00005C62 7737 <1> ja .fillblanks 2457 <1> 2458 00005C64 F7D9 <1> neg cx ; = amount of bytes to move 2459 <1> 2460 <1> .try_again: 2461 00005C66 8B36[020A] <1> mov si, word [auxbuff_behind_last_silent] 2462 <1> ; (auxbuff):di -> next buffer (if it fits) 2463 00005C6A B81020 <1> mov ax, _AUXBUFFSIZE 2464 00005C6D 29F0 <1> sub ax, si ; number of bytes left free 2465 00005C6F 39C8 <1> cmp ax, cx ; fits ? 2466 00005C71 7307 <1> jae .simple ; yes --> 2467 <1> 2468 <1> .delete: 2469 00005C73 E8D062 <1> call silence_delete_one_string.internal 2470 00005C76 7228 <1> jc .switchbuffer_error 2471 00005C78 EBEC <1> jmp .try_again 2472 <1> 2473 <1> .simple: 2474 00005C7A 1E <1> push ds 2475 00005C7B 56 <1> push si 2476 <1> ; -> behind used data minus start of auxbuff (0) 2477 <1> ; = how much to copy 2478 00005C7C 4E <1> dec si ; -> last used byte 2479 00005C7D 89F7 <1> mov di, si ; -> last used source byte 2480 00005C7F 01CF <1> add di, cx ; -> destination of last byte 2481 00005C81 010E[020A] <1> add word [auxbuff_behind_last_silent], cx 2482 <1> ; update silent pointer 2483 00005C85 010E[000A] <1> add word [auxbuff_behind_while_condition], cx 2484 <1> ; update while pointer 2485 00005C89 59 <1> pop cx ; = how much to copy 2486 00005C8A FD <1> std ; _AMD_ERRATUM_109_WORKAROUND as below 2487 00005C8B 06 <1> push es 2488 00005C8C 1F <1> pop ds 2489 <1> 2490 <1> numdef AMD_ERRATUM_109_WORKAROUND, 1 2491 <1> ; Refer to comment in init.asm init_movp. 2492 <1> 2493 <1> %if _AMD_ERRATUM_109_WORKAROUND 2494 00005C8D E308 <1> jcxz @FF 2495 00005C8F 83F914 <1> cmp cx, 20 2496 00005C92 7703 <1> ja @FF 2497 <1> @@: 2498 00005C94 A4 <1> movsb 2499 00005C95 E2FD <1> loop @B 2500 <1> @@: 2501 <1> %endif 2502 00005C97 F3A4 <1> rep movsb ; copy up silent buffer and while cond 2503 00005C99 FC <1> cld 2504 <1> 2505 00005C9A 1F <1> pop ds 2506 <1> 2507 <1> ; (fall through. cx is equal to zero here so the 2508 <1> ; rep stosb in .fillblanks is effectively a no-op.) 2509 <1> 2510 <1> .fillblanks: 2511 <1> ; This isn't really supported but we'll do enough 2512 <1> ; to handle basic cases. WHILE conditions use the 2513 <1> ; switchbuffer size to find their stored condition. 2514 <1> ; So fill the additional space with blanks, which 2515 <1> ; WHILE condition parsing will happily eat up. 2516 00005C9B B020 <1> mov al, 32 2517 00005C9D F3AA <1> rep stosb 2518 <1> 2519 <1> .no_switchbuffer_size_change: 2520 00005C9F A8 <1> db __TEST_IMM8 ; (skip stc, NC) 2521 <1> .switchbuffer_error: 2522 00005CA0 F9 <1> stc 2523 00005CA1 5F <1> pop di 2524 00005CA2 5E <1> pop si 2525 00005CA3 59 <1> pop cx 2526 00005CA4 5B <1> pop bx ; restore returned registers 2527 00005CA5 58 <1> pop ax ; ax = target switchbuffer size 2528 00005CA6 723B <1> jc .cannotswitch 2529 00005CA8 A3[F809] <1> mov word [auxbuff_switchbuffer_size], ax 2530 00005CAB 800E[9E00]20 <1> setopt [internalflags], switchbuffer 2531 00005CB0 890E[F48A] <1> mov word [dpmi_rmsav+0], cx 2532 00005CB4 891E[F68A] <1> mov word [dpmi_rmsav+2], bx 2533 00005CB8 66 <1> _386_o32 ; mov dword [dpmi_pmsav], edi 2534 00005CB9 893E[FE8A] <1> mov word [dpmi_pmsav], di 2535 00005CBD 3E89B6[008B] <1> mov word [ds:bp+dpmi_pmsav+2], si 2536 <1> .nobuffer: 2537 00005CC2 6631FF <1> _386 xor edi, edi ; clear edih 2538 00005CC5 B80603 <1> mov ax, 0306h ; get raw mode-switch addresses 2539 00005CC8 CD31 <1> int 31h 2540 00005CCA 7217 <1> jc .cannotswitch 2541 00005CCC 800E[9E00]04 <1> setopt [internalflags], canswitchmode 2542 00005CD1 890E[F08A] <1> mov word [dpmi_rm2pm+0], cx 2543 00005CD5 891E[F28A] <1> mov word [dpmi_rm2pm+2], bx 2544 00005CD9 66 <1> _386_o32 ; mov dword [dpmi_pm2rm], edi 2545 00005CDA 893E[F88A] <1> mov word [dpmi_pm2rm], di 2546 00005CDE 3E89B6[FA8A] <1> mov word [ds:bp+dpmi_pm2rm+2], si 2547 <1> .cannotswitch: 2548 00005CE3 665F <1> _386 pop edi 2549 <1> 2550 00005CE5 6650 <1> _386 push eax 2551 <1> %if (_CATCHPMINT214C || _DEBUG) || 1 2552 00005CE7 06 <1> push es 2553 00005CE8 1E <1> push ds 2554 00005CE9 07 <1> pop es 2555 <1> %endif 2556 <1> 2557 <1> %if CATCHEXCAMOUNT 2558 00005CEA BE[1A8B] <1> mov si, exctab ; hook several exceptions 2559 <1> %if (_CATCHPMINT214C || _DEBUG) || 1 2560 00005CED BF[288B] <1> mov di, excsave 2561 <1> %endif 2562 00005CF0 6631D2 <1> _386 xor edx, edx ; clear edxh 2563 00005CF3 BA[828C] <1> mov dx, exc_first 2564 <1> .loopexc: 2565 00005CF6 AC <1> lodsb 2566 <1> d4 call d4message 2567 <1> d4 asciz "In installdpmi_code.loopexc, ax=" 2568 <1> d4 push ax 2569 <1> d4 call d4disp_stack_hex 2570 <1> d4 call d4message 2571 <1> d4 asciz 13,10 2572 <1> 2573 00005CF7 88C3 <1> mov bl, al 2574 <1> %if (_CATCHPMINT214C || _DEBUG) || 1 2575 00005CF9 66 <1> _386_o32 ; push edx 2576 00005CFA 52 <1> push dx ; preserve excXX pointer 2577 00005CFB B80202 <1> mov ax, 0202h 2578 <1> ; (edxh is zero) 2579 00005CFE CD31 <1> int 31h ; cx:(e)dx -> prior handler 2580 00005D00 66 <1> _386_o32 ; xchg eax, edx 2581 00005D01 92 <1> xchg ax, dx 2582 00005D02 66 <1> _386_o32 ; stosd 2583 00005D03 AB <1> stosw ; store offset (dword on 386+, else word) 2584 00005D04 91 <1> xchg ax, cx 2585 00005D05 AB <1> stosw ; store selector 2586 00005D06 B80400 <1> mov ax, 4 2587 00005D09 29E8 <1> sub ax, bp ; if 386, ax = 4 - 2 = 2, else ax = 4 2588 00005D0B 01C7 <1> add di, ax ; -> next entry of excsave 2589 00005D0D 66 <1> _386_o32 ; pop edx 2590 00005D0E 5A <1> pop dx 2591 <1> %endif 2592 00005D0F 8B0E[068B] <1> mov cx, word [cssel] ; -> our handler for this exception 2593 00005D13 B80302 <1> mov ax, 0203h 2594 00005D16 CD31 <1> int 31h ; set our handler 2595 00005D18 83C206 <1> add dx, byte exc_second - exc_first 2596 <1> ; -> next handler 2597 00005D1B 81FE[218B] <1> cmp si, endexctab ; if another to go --> 2598 00005D1F 72D5 <1> jb .loopexc 2599 <1> %endif 2600 <1> 2601 <1> %if CATCHPMINTAMOUNT 2602 00005D21 BE[608B] <1> mov si, pminttab ; ds:si -> pminttab 2603 00005D24 BF[688B] <1> mov di, pmintsave ; es:di -> pmintsave 2604 <1> .loopint: 2605 00005D27 AC <1> lodsb ; get interrupt number 2606 00005D28 88C3 <1> mov bl, al ; bl = interrupt number 2607 00005D2A 6631D2 <1> _386 xor edx, edx ; clear edxh 2608 00005D2D B80402 <1> mov ax, 0204h 2609 00005D30 CD31 <1> int 31h ; cx:(e)dx -> prior handler 2610 00005D32 66 <1> _386_o32 ; xchg eax, edx 2611 00005D33 92 <1> xchg ax, dx ; (e)ax = offset 2612 00005D34 66 <1> _386_o32 ; stosd 2613 00005D35 AB <1> stosw ; store offset (dword on 386+, else word) 2614 00005D36 91 <1> xchg ax, cx 2615 00005D37 AB <1> stosw ; store selector 2616 00005D38 B80400 <1> mov ax, 4 2617 00005D3B 29E8 <1> sub ax, bp ; if 386, ax = 4 - 2 = 2, else ax = 4 2618 00005D3D 01C7 <1> add di, ax ; -> next entry of pmintsave 2619 00005D3F AD <1> lodsw ; ax -> our handler 2620 00005D40 6631D2 <1> _386 xor edx, edx 2621 00005D43 92 <1> xchg ax, dx ; (e)dx -> our handler 2622 00005D44 8B0E[068B] <1> mov cx, word [cssel] ; cx:(e)dx -> our handler 2623 00005D48 B80502 <1> mov ax, 0205h 2624 00005D4B CD31 <1> int 31h 2625 00005D4D 81FE[638B] <1> cmp si, pminttab.end 2626 00005D51 72D4 <1> jb .loopint 2627 <1> %endif 2628 <1> 2629 <1> %if (_CATCHPMINT214C || _DEBUG) || 1 2630 00005D53 07 <1> pop es 2631 <1> %endif 2632 00005D54 6658 <1> _386 pop eax 2633 <1> 2634 00005D56 BE[0E8B] <1> mov si, convsegs 2635 <1> @@: 2636 00005D59 AD <1> lodsw 2637 00005D5A 97 <1> xchg ax, di 2638 00005D5B FF7504 <1> push word [di + soaSelector] 2639 00005D5E 8F05 <1> pop word [di + soaSegSel] 2640 00005D60 81FE[168B] <1> cmp si, convsegs.end_fixed 2641 00005D64 72F3 <1> jb @B 2642 <1> 2643 00005D66 F606[9D00]01 <1> testopt [internalflags], hooked2F 2644 00005D6B 7431 <1> jz .notours ; not currently hooked --> 2645 <1> 2646 00005D6D B02F <1> mov al, 2Fh ; interrupt number 2647 00005D6F BE[708B] <1> mov si, debug2F ; -> IISP entry header 2648 00005D72 BA0200 <1> mov dx, opt4_int_2F_force >> 16 2649 00005D75 E8A477 <1> call UnhookInterruptForce 2650 <1> ; try unhooking it 2651 00005D78 730B <1> jnc .got2F 2652 <1> 2653 <1> .not2F: 2654 00005D7A C706[A46C]3246 <1> mov word [msg.serial_cannot_unhook.int], "2F" 2655 00005D80 BA[806C] <1> mov dx, msg.serial_cannot_unhook 2656 00005D83 EB16 <1> jmp @F 2657 <1> 2658 <1> .got2F: 2659 00005D85 8026[9D00]FE <1> clropt [internalflags], hooked2F 2660 00005D8A 8026[A800]FD <1> clropt [internalflags4], dif4_int_2F_hooked 2661 00005D8F E89778 <1> call update_inttab_optional 2662 00005D92 C706[166D]3246 <1> mov word [msg.serial_late_unhook.int], "2F" 2663 00005D98 BA[F56C] <1> mov dx, msg.serial_late_unhook 2664 <1> @@: 2665 00005D9B E89562 <1> call putsz 2666 <1> .notours: 2667 <1> 2668 <1> 2669 <1> ; This is a bit silly: If we're never 2670 <1> ; entered in PM except for installdpmi 2671 <1> ; then the debugger thinks that the 2672 <1> ; SegSel fields should be segments. 2673 <1> ; It won't re-initialise them because 2674 <1> ; according to the flag used by run, 2675 <1> ; it was last running in 86 Mode. 2676 <1> ; So for now just hack them back. 2677 00005D9E BE[0E8B] <1> mov si, convsegs 2678 <1> @@: 2679 00005DA1 AD <1> lodsw 2680 00005DA2 97 <1> xchg ax, di 2681 00005DA3 FF7502 <1> push word [di + soaSegment] 2682 00005DA6 8F05 <1> pop word [di + soaSegSel] 2683 00005DA8 81FE[168B] <1> cmp si, convsegs.end_fixed 2684 00005DAC 72F3 <1> jb @B 2685 <1> 2686 <1> d4 call d4message 2687 <1> d4 asciz "In installdpmi_code end",13,10 2688 <1> 2689 00005DAE 66 <1> _386_o32 ; pop ebx 2690 00005DAF 5B <1> pop bx 2691 00005DB0 58 <1> pop ax 2692 00005DB1 8ED0 <1> mov ss, ax 2693 <1> %ifn _ONLYNON386 2694 <1> ..@patch_no386_ds_5: ; (insure to set sp directly after ss) 2695 00005DB3 66 <1> o32 ; mov esp, ebx 2696 <1> %endif 2697 00005DB4 89DC <1> mov sp, bx ; return to user stack 2698 <1> 2699 00005DB6 665A <1> _386 pop edx 2700 00005DB8 665B <1> _386 pop ebx 2701 00005DBA 07 <1> pop es 2702 <1> %if _BREAK_INSTALLDPMI 2703 00005DBB F606[8600]20 <1> testopt [options3], opt3_break_installdpmi 2704 00005DC0 7504 <1> jnz .break 2705 <1> %endif 2706 00005DC2 1F <1> pop ds 2707 00005DC3 9D <1> popf 2708 00005DC4 61 <1> popa 2709 00005DC5 CB <1> retf 2710 <1> 2711 <1> %if _BREAK_INSTALLDPMI 2712 <1> .break: 2713 00005DC6 FA <1> cli 2714 00005DC7 8F06[900C] <1> pop word [reg_ds] ; set client ds 2715 00005DCB 8F06[AC0C] <1> pop word [reg_efl] ; set client fl 2716 00005DCF 61 <1> popa ; restore client GPRs 2717 00005DD0 A3[700C] <1> mov word [reg_eax], ax ; set client ax 2718 00005DD3 8CD8 <1> mov ax, ds ; ax = entry/data selector 2719 00005DD5 8F06[A80C] <1> pop word [reg_eip] ; set client ip (intrtn_code clears eiph) 2720 00005DD9 8F06[9C0C] <1> pop word [reg_cs] ; set client cs 2721 00005DDD C706[E40B][E57D] <1> mov word [run_int], installdpmimsg ; remember interrupt type 2722 00005DE3 800E[9D00]08 <1> setopt [internalflags], protectedmode 2723 00005DE8 E938E7 <1> jmp intrtn_code.from_installdpmi 2724 <1> %endif 2725 <1> 2726 <1> 2727 <1> .fataldpmierr: 2728 <1> d4 call d4message 2729 <1> d4 asciz "In installdpmi_code.fataldpmierr",13,10 2730 00005DEB B8FF4C <1> mov ax, 4CFFh 2731 00005DEE CD21 <1> int 21h 2193 %include "pmentry.asm" 2194 <1> 2195 <1> %if 0 2196 <1> 2197 <1> lDebugX PM entrypoints 2198 <1> 2199 <1> Copyright (C) 1995-2003 Paul Vojta 2200 <1> Copyright (C) 2008-2021 C. Masloch 2201 <1> 2202 <1> Usage of the works is permitted provided that this 2203 <1> instrument is retained with the works, so that any entity 2204 <1> that uses the works is notified of this instrument. 2205 <1> 2206 <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 2207 <1> 2208 <1> %endif 2209 <1> 2210 <1> 2211 <1> usesection lDEBUG_DATA_ENTRY 2212 <1> 2213 <1> %if _CATCHPMINT214C 2214 <1> pmint21: 2215 00008C6B 80FC4C <1> cmp ah, 4Ch 2216 00008C6E 750C <1> jne .next_no_pop 2217 00008C70 1E <1> push ds 2218 00008C71 2E8E1E[048B] <1> mov ds, word [cs:dssel] 2219 00008C76 E895F6 <1> call entry_to_code_sel 2220 00008C79 [F05D] <1> dw pmint21_4C_code 2221 <1> 2222 <1> .next: 2223 00008C7B 1F <1> pop ds 2224 <1> .next_no_pop: 2225 <1> %ifn _ONLYNON386 2226 <1> ..@patch_no386_nop_DATA_ENTRY: 2227 00008C7C 66 <1> o32 2228 <1> %endif 2229 00008C7D 2EFF2E[688B] <1> jmp far [cs:pmintsave.int21] 2230 <1> 2231 <1> 2232 <1> usesection lDEBUG_CODE 2233 <1> 2234 <1> code_insure_low_byte_not_0CCh 2235 <1> pmint21_4C_code: 2236 00005DF0 FF36[068B] <1> push word [cssel] 2237 00005DF4 68[7B8C] <1> push word pmint21.next 2238 <1> 2239 00005DF7 66 <1> _386_o32 2240 00005DF8 60 <1> pusha 2241 00005DF9 06 <1> push es 2242 <1> 2243 <1> ; Some code (particularly d4message) may expect us to 2244 <1> ; run on the debugger's stack, to access the data 2245 <1> ; segment. Therefore, switch stacks. 2246 00005DFA 8CDA <1> mov dx, ds ; dx = ds = debugger data selector 2247 00005DFC 8CD0 <1> mov ax, ss 2248 00005DFE 66 <1> _386_o32 ; mov ebx, esp 2249 00005DFF 89E3 <1> mov bx, sp ; ax:(e)bx = stack to restore 2250 00005E01 66 <1> _386_o32 ; mov ecx, dword [run_sp] 2251 00005E02 8B0E[A80A] <1> mov cx, word [run_sp] ; dx:(e)cx = our stack 2252 00005E06 8ED2 <1> mov ss, dx 2253 <1> %ifn _ONLYNON386 2254 <1> ..@patch_no386_ds_2: ; (as for the other case in run.asm 2255 <1> ; insure to set sp directly after ss) 2256 00005E08 66 <1> o32 ; mov esp, ecx 2257 <1> %endif 2258 00005E09 89CC <1> mov sp, cx ; switch to our stack 2259 <1> 2260 00005E0B 50 <1> push ax 2261 00005E0C 66 <1> _386_o32 ; push ebx 2262 00005E0D 53 <1> push bx ; save original stack, far pointer 2263 <1> 2264 00005E0E 800E[9D00]08 <1> setopt [internalflags], protectedmode 2265 <1> 2266 <1> 2267 <1> ; remember that we cannot access Protected Mode any longer 2268 <1> ; (also clear modeswitched flag so resetmode is a no-op) 2269 00005E13 8026[9E00]D3 <1> clropt [internalflags], canswitchmode | switchbuffer | modeswitched 2270 <1> 2271 00005E18 8B0E[F809] <1> mov cx, word [auxbuff_switchbuffer_size] 2272 00005E1C E30A <1> jcxz .no_switchbuffer_size_change 2273 00005E1E 8E06[FE09] <1> mov es, word [auxbuff_segorsel + soaSelector] 2274 00005E22 31FF <1> xor di, di ; es:di -> auxbuff switchbuffer 2275 00005E24 B020 <1> mov al, 32 2276 00005E26 F3AA <1> rep stosb ; fill with blanks (for WHILE) 2277 <1> .no_switchbuffer_size_change: 2278 00005E28 8326[F809]00 <1> and word [auxbuff_switchbuffer_size], 0 2279 <1> 2280 00005E2D 16 <1> push ss 2281 00005E2E 07 <1> pop es 2282 <1> 2283 00005E2F E8B1E8 <1> call pm_reset_handlers 2284 <1> 2285 <1> 2286 00005E32 66 <1> _386_o32 2287 00005E33 5B <1> pop bx 2288 00005E34 58 <1> pop ax ; ax:(e)bx = original stack 2289 00005E35 8ED0 <1> mov ss, ax 2290 <1> %ifn _ONLYNON386 2291 <1> ..@patch_no386_ds_3: ; (as for the other case above 2292 <1> ; insure to set sp directly after ss) 2293 00005E37 66 <1> o32 ; mov esp, ebx 2294 <1> %endif 2295 00005E38 89DC <1> mov sp, bx ; return to user stack 2296 <1> 2297 00005E3A 07 <1> pop es 2298 00005E3B 66 <1> _386_o32 2299 00005E3C 61 <1> popa 2300 <1> 2301 00005E3D CB <1> retf ; jump to cssel:pmint21.next 2302 <1> %endif 2303 <1> 2304 <1> 2305 <1> usesection lDEBUG_DATA_ENTRY 2306 <1> 2307 <1> struc exceptionframe16 2308 00000000 <1> resw 8 ; pusha 2309 00000010 ???? <1> fr16_ds: resw 1 ; push ds 2310 00000012 ???????? <1> resw 2 ; 16-bit return address to DPMI host 2311 00000016 ???? <1> resw 1 ; error code 2312 00000018 ???? <1> fr16_ip: resw 1 2313 0000001A ???? <1> fr16_cs: resw 1 2314 0000001C ???? <1> fr16_fl: resw 1 2315 0000001E ???? <1> fr16_sp: resw 1 2316 00000020 ???? <1> fr16_ss: resw 1 2317 <1> endstruc 2318 <1> 2319 <1> struc exceptionframe32 2320 00000000 <1> resd 8 ; pushad 2321 00000020 ???? <1> resw 1 ; stack alignment 2322 00000022 ???? <1> fr32_ds: resw 1 ; push ds 2323 00000024 ???????????????? <1> resd 2 ; 32-bit return address to DPMI host 2324 0000002C ???????? <1> resd 1 ; error code 2325 00000030 ???????? <1> fr32_eip: resd 1 2326 00000034 ???????? <1> fr32_cs: resd 1 2327 00000038 ???????? <1> fr32_efl: resd 1 2328 0000003C ???????? <1> fr32_esp: resd 1 2329 00000040 ???????? <1> fr32_ss: resd 1 2330 <1> endstruc 2331 <1> 2332 <1> %assign EXC_ENTRY_FIRST 1 2333 <1> %macro exc_entry 2.nolist 2334 <1> %ifn EXC_ENTRY_FIRST 2335 <1> jmp strict short exc 2336 <1> %endif 2337 <1> exc %+ %1 %+ : 2338 <1> push ds 2339 <1> push %2 2340 <1> %if EXC_ENTRY_FIRST 2341 <1> exc_second: equ $ + 2 ; + 2 for short jump 2342 <1> %endif 2343 <1> %assign EXC_ENTRY_FIRST 0 2344 <1> %endmacro 2345 <1> 2346 <1> align 2, db 0 2347 <1> ; Exception handlers. 2348 <1> ; These are the entry into the debugger in protected mode. 2349 <1> ; The address difference between exc_first and exc_second 2350 <1> ; is assumed to be the same for all the entries. This is 2351 <1> ; above, in installdpmi, as well as in run.asm run. These 2352 <1> ; are where the exception handlers are installed. 2353 <1> 2354 <1> exc_first: 2355 <1> %if _CATCHEXC00 2356 00008C82 1E68[6E7C] <1> exc_entry 00, int0msg 2357 <1> %endif 2358 <1> %if _CATCHEXC01 2359 00008C86 EB221E68[7D7C] <1> exc_entry 01, int1msg 2360 <1> %endif 2361 <1> %if _CATCHEXC03 2362 00008C8C EB1C1E68[A07C] <1> exc_entry 03, int3msg 2363 <1> %endif 2364 <1> %if _CATCHEXC06 2365 00008C92 EB161E68[867D] <1> exc_entry 06, exc6msg 2366 <1> %endif 2367 <1> %if _CATCHEXC0C 2368 00008C98 EB101E68[9D7D] <1> exc_entry 0C, excCmsg 2369 <1> %endif 2370 <1> %if _CATCHEXC0D 2371 00008C9E EB0A1E68[AB7D] <1> exc_entry 0D, excDmsg 2372 <1> %endif 2373 <1> %if _CATCHEXC0E 2374 00008CA4 EB041E68[D87D] <1> exc_entry 0E, excEmsg 2375 <1> %endif 2376 <1> exc: 2377 00008CAA 2E8E1E[048B] <1> mov ds, word [cs:dssel] 2378 00008CAF 8F06[E40B] <1> pop word [run_int] 2379 <1> times 1 - (($ - $$) & 1) nop ; align in-code parameter 2380 00008CB3 E858F6 <1> call entry_to_code_sel 2381 00008CB6 [3E5E] <1> dw exc_code 2382 <1> 2383 <1> 2384 <1> usesection lDEBUG_CODE 2385 <1> 2386 <1> code_insure_low_byte_not_0CCh 2387 <1> exc_code: 2388 00005E3E 803E[0A8B]00 <1> cmp byte [dpmi32], 0 2389 00005E43 7503E98D00 <1> jz exc16 2390 <1> 2391 <1> [cpu 386] 2392 <1> exc32: 2393 00005E48 50 <1> push ax ; stack alignment 2394 00005E49 6660 <1> pushad 2395 00005E4B 6689E5 <1> mov ebp, esp 2396 00005E4E 66678B4530 <1> mov eax, dword [ ebp + fr32_eip ] 2397 00005E53 678B5D34 <1> mov bx, word [ ebp + fr32_cs ] 2398 00005E57 66678B4D38 <1> mov ecx, dword [ ebp + fr32_efl ] 2399 00005E5C 66678B553C <1> mov edx, dword [ ebp + fr32_esp ] 2400 00005E61 678B7540 <1> mov si, word [ ebp + fr32_ss ] 2401 00005E65 678C4D34 <1> mov word [ ebp + fr32_cs ], cs 2402 00005E69 678C5D40 <1> mov word [ ebp + fr32_ss ], ds 2403 00005E6D 803E[F30A]00 <1> cmp byte [ bInDbg ], 0 ; did the exception occur inside DEBUG? 2404 00005E72 7422 <1> je @F ; no --> 2405 <1> 2406 <1> ; inside debugger 2407 <1> %if _EXCCSIP 2408 00005E74 A3[E48A] <1> mov word [exception_csip], ax 2409 00005E77 891E[E68A] <1> mov word [exception_csip + 2], bx 2410 <1> ; render CS:IP if internal GPF 2411 <1> %endif 2412 00005E7B 6667C74530- <1> mov dword [ ebp + fr32_eip ], debuggerexception 2412 00005E80 [603F0000] <1> 2413 00005E84 660FB706[9C0A] <1> movzx eax, word [ savesp ] 2414 00005E8A 666789453C <1> mov dword [ ebp + fr32_esp ], eax 2415 00005E8F 67806539FE <1> clropt [ ebp + fr32_efl ], 100h ; reset TF 2416 00005E94 EB39 <1> jmp short @FF 2417 <1> 2418 <1> @@: ; inside debuggee 2419 00005E96 800E[9D00]08 <1> setopt [internalflags], protectedmode 2420 00005E9B 6667C74530- <1> mov dword [ ebp + fr32_eip ], intrtn2_code 2420 00005EA0 [35450000] <1> 2421 00005EA4 67806539FC <1> clropt [ ebp + fr32_efl ], 300h ; reset IF + TF 2422 00005EA9 6667C7453C- <1> mov dword [ ebp + fr32_esp ], reg_ss 2422 00005EAE [980C0000] <1> 2423 00005EB2 66A3[A80C] <1> mov dword [ reg_eip ], eax 2424 00005EB6 891E[9C0C] <1> mov word [ reg_cs ], bx 2425 <1> ; mov dword [ reg_efl ], ecx ; (eflh is saved in intrtn2_code) 2426 00005EBA 890E[AC0C] <1> mov word [ reg_efl ], cx 2427 00005EBE 668916[800C] <1> mov dword [ reg_esp ], edx 2428 00005EC3 8936[980C] <1> mov word [ reg_ss ], si 2429 00005EC7 67FF7522 <1> push word [ ebp + fr32_ds ] 2430 00005ECB 8F06[900C] <1> pop word [ reg_ds ] 2431 <1> 2432 <1> @@: 2433 00005ECF 6661 <1> popad 2434 00005ED1 58 <1> pop ax ; stack alignment 2435 00005ED2 1F <1> pop ds 2436 00005ED3 66CB <1> o32 retf 2437 <1> 2438 <1> __CPU__ 2439 <1> exc16: 2440 00005ED5 60 <1> pusha 2441 00005ED6 89E5 <1> mov bp, sp 2442 00005ED8 8B4618 <1> mov ax, word [ bp + fr16_ip ] 2443 00005EDB 8B5E1A <1> mov bx, word [ bp + fr16_cs ] 2444 00005EDE 8B4E1C <1> mov cx, word [ bp + fr16_fl ] 2445 00005EE1 8B561E <1> mov dx, word [ bp + fr16_sp ] 2446 00005EE4 8B7620 <1> mov si, word [ bp + fr16_ss ] 2447 00005EE7 8C4E1A <1> mov word [ bp + fr16_cs ], cs 2448 00005EEA 8C5E20 <1> mov word [ bp + fr16_ss ], ds 2449 00005EED 803E[F30A]00 <1> cmp byte [ bInDbg ], 0 ; did the exception occur inside DEBUG? 2450 00005EF2 7418 <1> je isdebuggee16 2451 <1> %if _EXCCSIP 2452 00005EF4 A3[E48A] <1> mov word [exception_csip], ax 2453 00005EF7 891E[E68A] <1> mov word [exception_csip + 2], bx 2454 <1> ; render CS:IP if internal GPF 2455 <1> %endif 2456 00005EFB C74618[603F] <1> mov word [ bp + fr16_ip ], debuggerexception 2457 00005F00 A1[9C0A] <1> mov ax, word [ savesp ] 2458 00005F03 89461E <1> mov word [ bp + fr16_sp ], ax 2459 00005F06 80661DFE <1> clropt [ bp + fr16_fl ], 100h ; reset TF 2460 00005F0A EB2D <1> jmp short isdebugger16 2461 <1> isdebuggee16: 2462 00005F0C 800E[9D00]08 <1> setopt [internalflags], protectedmode 2463 00005F11 C74618[3545] <1> mov word [ bp + fr16_ip ], intrtn2_code 2464 00005F16 80661DFC <1> clropt [ bp + fr16_fl ], 300h ; reset IF + TF 2465 00005F1A C7461E[980C] <1> mov word [ bp + fr16_sp ], reg_ss 2466 00005F1F A3[A80C] <1> mov word [ reg_eip ], ax 2467 00005F22 891E[9C0C] <1> mov word [ reg_cs ], bx 2468 00005F26 890E[AC0C] <1> mov word [ reg_efl ], cx 2469 00005F2A 8916[800C] <1> mov word [ reg_esp ], dx 2470 00005F2E 8936[980C] <1> mov word [ reg_ss ], si 2471 00005F32 FF7610 <1> push word [ bp + fr16_ds ] 2472 00005F35 8F06[900C] <1> pop word [ reg_ds ] 2473 <1> isdebugger16: 2474 00005F39 61 <1> popa 2475 00005F3A 1F <1> pop ds 2476 00005F3B CB <1> retf 2477 <1> 2478 <1> 2479 <1> usesection lDEBUG_DATA_ENTRY 2480 <1> 2481 <1> i23pm: 2482 <1> %if 1 2483 00008CB8 1E <1> push ds 2484 00008CB9 2E8E1E[048B] <1> mov ds, word [cs:dssel] 2485 00008CBE 800E[F70B]02 <1> setopt [serial_flags], sf_ctrl_c 2486 00008CC3 1F <1> pop ds 2487 <1> %endif 2488 00008CC4 2E803E[0A8B]00 <1> cmp byte [ cs:dpmi32 ], 0 ; ! always NC 2489 00008CCA 7404 <1> je .retfw_2 2490 <1> [cpu 386] 2491 00008CCC 66CA0400 <1> retfd 4 ; (NC) 2492 <1> __CPU__ 2493 <1> .retfw_2: 2494 00008CD0 CA0200 <1> retfw 2 ; (NC) 2495 <1> 2496 <1> i24pm: 2497 00008CD3 B003 <1> mov al, 03h ; fail 2498 00008CD5 2E803E[0A8B]00 <1> cmp byte [ cs:dpmi32 ], 0 2499 00008CDB 7401 <1> je .iret16 2500 00008CDD 66 <1> o32 ; iretd 2501 <1> .iret16: 2502 00008CDE CF <1> iret 2194 2195 2196 usesection lDEBUG_CODE 2197 2198 resetmode_and_test_d_b_bit: 2199 %if _PM 2200 00005F3C E895DA call resetmode 2201 %endif 2202 2203 ; Test if bx is a 32-bit selector 2204 ; (as opposed to a 16-bit selector or a segment) 2205 ; 2206 ; INP: bx = selector (PM) or segment (86M) 2207 ; OUT: NZ = 32-bit 2208 ; ZR = 16-bit (always if 86M) 2209 ; NC 2210 ; REM: This checks whether a code segment's D bit or 2211 ; a stack segment's B bit is set. This operation 2212 ; is not meaningful otherwise. 2213 test_d_b_bit: 2214 00005F3F E89334 _386 call ispm 2215 00005F42 7403 _386 jz .pm ; 386 and PM, check selector --> 2216 ; not PM or no 386 2217 .ZR: 2218 00005F44 38C0 cmp al, al ; ZR, NC 2219 00005F46 C3 retn 2220 .pm: 2221 [cpu 386] 2222 00005F47 6650 push eax 2223 00005F49 6631C0 xor eax, eax ; use rights = 0 if inaccessible 2224 00005F4C 660F02C3 lar eax, ebx ; access rights 2225 ; eax is unchanged if the access rights are inaccessible 2226 ; (and NZ is set in that case) 2227 00005F50 66A900004000 test eax, 400000h ; test bit (NC) 2228 00005F56 6658 pop eax 2229 00005F58 C3 retn 2230 __CPU__ 2231 2232 2233 ; Test if selector in bx has a limit beyond 64 KiB - 1 B 2234 ; 2235 ; INP: bx = selector (PM) or segment (86M) 2236 ; OUT: NZ = limit above 64 KiB - 1 B 2237 ; ZR = limit below 64 KiB (always if 86M) 2238 ; NC 2239 test_high_limit: 2240 00005F59 E87934 _386 call ispm 2241 00005F5C 7402 _386 jz .pm ; 386 and PM, check selector --> 2242 ; not PM or no 386 2243 00005F5E EBE4 jmp test_d_b_bit.ZR 2244 2245 .pm: 2246 [cpu 386] 2247 00005F60 6650 push eax 2248 00005F62 6631C0 xor eax, eax ; use limit = 0 if inaccessible 2249 00005F65 660F03C3 lsl eax, ebx ; segment limit 2250 ; eax is unchanged if the segment limit is inaccessible 2251 ; (and NZ is set in that case) 2252 00005F69 66A90000FFFF test eax, 0FFFF_0000h ; (NC) ZR if low limit, else NZ 2253 00005F6F 6658 pop eax 2254 00005F71 C3 retn 2255 __CPU__ 2256 2257 subcpureset ; subcpu used in pminit.asm 2258 %endif ; _PM 2259 2260 %if _NOEXTENDER 2261 ; When we support non-extended DPMI, some calls to Int21 2262 ; are (extended) Int21 calls and some are (not extended) 2263 ; calls down to the real mode Int21. doscall is a macro 2264 ; that will always call the non-extended Int21. 2265 2266 ; Execute a non-extended DOS call 2267 _doscall: 2268 00005F72 9C pushf 2269 00005F73 E85F34 call ispm 2270 00005F76 750C jnz .rm 2271 subcpu 286 2272 ; Execute a non-extended DOS call from PM 2273 00005F78 9D popf 2274 .pm: 2275 00005F79 36FF36[B00A] push word [ss:pspdbg] 2276 00005F7E 6A21 push 21h 2277 00005F80 E8A135 call intcall 2278 00005F83 C3 retn 2279 subcpureset 2280 .rm: 2281 00005F84 9D popf 2282 00005F85 E90D35 jmp _int21 2283 %endif 2284 2285 %if _PM 2286 ; For branches other than symbolic, here's selector_to_segment 2287 ; (as used by the puts in expr.asm). Picked from symsnip 2288 ; binsrch.asm at revision 9c232415d568. 2289 ; INP: word [ss:sp] = selector to access 2290 ; OUT: word [ss:sp] = segment value to use for access 2291 ; CHG: - 2292 selector_to_segment: 2293 lframe near 2294 lpar word, in_selector_out_segment 2295 lpar_return 2296 00005F88 5589E5 lenter 2297 2298 00005F8B E84734 call ispm ; is it PM ? 2299 00005F8E 751B jnz .ret ; no, 86M --> (selector == segment) 2300 2301 subcpu 286 2302 00005F90 50 push ax 2303 00005F91 53 push bx 2304 00005F92 51 push cx 2305 00005F93 52 push dx 2306 2307 00005F94 8B5E04 mov bx, word [bp + ?in_selector_out_segment] 2308 00005F97 B80600 mov ax, 6 2309 00005F9A CD31 int 31h ; get segment base to cx:dx 2310 00005F9C C1EA04 shr dx, 4 2311 00005F9F C1E10C shl cx, 12 2312 00005FA2 09CA or dx, cx 2313 00005FA4 895604 mov word [bp + ?in_selector_out_segment], dx 2314 2315 00005FA7 5A pop dx 2316 00005FA8 59 pop cx 2317 00005FA9 5B pop bx 2318 00005FAA 58 pop ax 2319 subcpureset 2320 2321 .ret: 2322 00005FAB 5D lleave 2323 00005FAC C3 lret 2324 %endif 2325 2326 2327 ; support functions for symbols.asm 2328 2329 2330 ; INP: ds:dx -> message 2331 ; cx = length 2332 ; CHG: - 2333 ; STT: ds, es don't care 2334 disp_message_length_cx: 2335 00005FAD 50 push ax 2336 00005FAE 53 push bx 2337 00005FAF 51 push cx 2338 00005FB0 52 push dx 2339 00005FB1 06 push es 2340 00005FB2 1E push ds 2341 00005FB3 1E push ds 2342 00005FB4 07 pop es ; es:dx -> message, cx = length 2343 00005FB5 16 push ss 2344 00005FB6 1F pop ds ; ds = ss (required for puts) 2345 00005FB7 E8055D call puts 2346 00005FBA 1F pop ds 2347 00005FBB 07 pop es 2348 00005FBC 5A pop dx 2349 00005FBD 59 pop cx 2350 00005FBE 5B pop bx 2351 00005FBF 58 pop ax 2352 00005FC0 C3 retn 2353 2354 ; INP: ds:dx -> message, ASCIZ 2355 ; CHG: - 2356 ; STT: ds, es don't care 2357 disp_message: 2358 00005FC1 06 push es 2359 00005FC2 1E push ds 2360 00005FC3 07 pop es ; es:dx -> message 2361 00005FC4 E86C60 call putsz ; (sets up ds = ss internally) 2362 00005FC7 07 pop es 2363 00005FC8 C3 retn 2364 2365 ; INP: al = character to display 2366 ; CHG: - 2367 ; STT: ds, es don't care 2368 disp_al: equ putc 2369 2370 2371 ; Display number in ax hexadecimal, always 4 digits 2372 ; 2373 ; INP: ax = number 2374 ; OUT: displayed using disp_al 2375 ; CHG: none 2376 disp_ax_hex: 2377 00005FC9 86C4 xchg al, ah 2378 00005FCB E80200 call disp_al_hex 2379 00005FCE 86C4 xchg al, ah 2380 disp_al_hex: 2381 00005FD0 51 push cx 2382 00005FD1 B104 mov cl, 4 2383 00005FD3 D2C0 rol al, cl 2384 00005FD5 E80300 call disp_al_nybble_hex 2385 00005FD8 D2C0 rol al, cl 2386 00005FDA 59 pop cx 2387 disp_al_nybble_hex: 2388 00005FDB 50 push ax 2389 00005FDC 240F and al, 0Fh 2390 00005FDE 0430 add al, '0' 2391 00005FE0 3C39 cmp al, '9' 2392 00005FE2 7602 jbe @F 2393 00005FE4 0407 add al, -'9' -1 +'A' 2394 @@: 2395 00005FE6 E86D60 call disp_al 2396 00005FE9 58 pop ax 2397 00005FEA C3 retn 2398 2399 2400 ; Display number in ax decimal 2401 ; 2402 ; INP: ax = number 2403 ; OUT: displayed using disp_al 2404 ; CHG: none 2405 disp_ax_dec: ; ax (no leading zeros) 2406 00005FEB 53 push bx 2407 00005FEC 31DB xor bx, bx 2408 .pushax: 2409 00005FEE 52 push dx 2410 00005FEF 50 push ax 2411 00005FF0 08DB or bl, bl 2412 00005FF2 7405 jz .nobl 2413 00005FF4 80EB05 sub bl, 5 2414 00005FF7 F6DB neg bl 2415 .nobl: 2416 00005FF9 51 push cx 2417 00005FFA B91027 mov cx, 10000 2418 00005FFD E81B00 call .divide_out 2419 00006000 B9E803 mov cx, 1000 2420 00006003 E81500 call .divide_out 2421 00006006 B96400 mov cx, 100 2422 00006009 E80F00 call .divide_out 2423 0000600C B10A mov cl, 10 2424 0000600E E80A00 call .divide_out 2425 ; (Divisor 1 is useless) 2426 00006011 0430 add al, '0' 2427 00006013 E84060 call disp_al 2428 00006016 59 pop cx 2429 00006017 58 pop ax 2430 00006018 5A pop dx 2431 00006019 5B pop bx ; Caller's register 2432 0000601A C3 retn 2433 2434 2435 ; INP: ax = number 2436 ; cx = divisor 2437 ; OUT: ax = remainder of operation 2438 ; result displayed 2439 .divide_out: 2440 0000601B 52 push dx 2441 0000601C 31D2 xor dx, dx 2442 0000601E F7F1 div cx ; 0:ax / cx 2443 00006020 52 push dx ; remainder 2444 00006021 FECB dec bl 2445 00006023 7503 jnz .nobl2 2446 00006025 80CF01 or bh, 1 2447 .nobl2: 2448 00006028 08C7 or bh, al 2449 0000602A 7405 jz .leadingzero 2450 0000602C 0430 add al, '0' 2451 0000602E E82560 call disp_al ; display result 2452 .leadingzero: 2453 00006031 58 pop ax ; remainder 2454 00006032 5A pop dx 2455 00006033 C3 retn 2456 2457 2458 ; C command - compare bytes. 2459 cc: 2460 00006034 E83549 call parsecm ; parse arguments 2461 2462 ; To make the 16-bit 64 KiB compare hack below work, the 2463 ; full ecx mustn't be increased here for 16-bit segments. 2464 ; The passed ecx isn't higher than FFFFh for 16-bit segments, 2465 ; and a value of 0001_0000h needs to be passed as zero to 2466 ; the hack anyway. 2467 %if _PM 2468 00006037 36803E[0C8B]00 cmp byte [ss:bAddr32], 0 2469 0000603D 7407 je .16 2470 [cpu 386] 2471 0000603F 6641 inc ecx 2472 00006041 7504 jnz cc1 2473 00006043 E90447 jmp error 2474 __CPU__ 2475 .16: 2476 %endif 2477 00006046 41 inc cx 2478 cc1: 2479 00006047 1E push ds 2480 00006048 06 push es 2481 00006049 16 push ss 2482 0000604A 1F pop ds ; ds := cs 2483 0000604B E86C48 call dohack ; do the interrupt pointer hack 2484 0000604E 07 pop es 2485 0000604F 1F pop ds 2486 %if _PM 2487 00006050 36803E[0C8B]00 cmp byte [ss:bAddr32], 0 2488 00006056 740E jz .cmp16 2489 00006058 F367A6 a32 repe cmpsb 2490 0000605B 678A56FF mov dl, byte [esi-1] 2491 0000605F 26678A77FF mov dh, byte [es:edi-1] 2492 00006064 EB0D jmp short .cmpdone 2493 .cmp16: 2494 %endif 2495 ; The following 3 instructions make a hack to support 64 KiB 2496 ; compare. The only time we get here with cx = 0 is the first 2497 ; iteration for a 64 KiB compare. In that case, dec cx results 2498 ; in FFFFh making repe cmpsb work. The single cmpsb will either 2499 ; jump the repe cmpsb (if it found a mismatch) or not jump it. 2500 ; The repe cmpsb might be executed with cx = 0, but will then 2501 ; not change anything including the flags so it works. 2502 00006066 49 dec cx 2503 00006067 A6 cmpsb 2504 00006068 7502 jne .skip 2505 0000606A F3A6 repe cmpsb ; start comparing 2506 .skip: 2507 0000606C 8A54FF mov dl, byte [si-1] ; save the possibly errant characters 2508 0000606F 268A75FF mov dh, byte [es:di-1] 2509 .cmpdone: 2510 00006073 9F lahf 2511 00006074 1E push ds 2512 00006075 06 push es 2513 00006076 16 push ss 2514 00006077 1F pop ds 2515 00006078 E87348 call unhack ; undo the interrupt pointer hack 2516 0000607B 07 pop es 2517 0000607C 1F pop ds 2518 0000607D 9E sahf 2519 0000607E 7475 je cc2 ; if we're done 2520 00006080 06 push es 2521 00006081 16 push ss 2522 00006082 07 pop es 2523 00006083 66 _386_PM_o32 ; mov ebx, edi 2524 00006084 89FB mov bx, di 2525 00006086 BF[0E08] mov di, line_out 2526 00006089 8CD8 mov ax, ds 2527 0000608B E8EE5B call hexword 2528 0000608E B03A mov al, ':' 2529 00006090 AA stosb 2530 00006091 66 _386_PM_o32 ; mov eax, esi 2531 00006092 89F0 mov ax, si 2532 00006094 66 _386_PM_o32 ; dec eax 2533 00006095 48 dec ax 2534 %if _PM 2535 00006096 36803E[0C8B]00 cmp byte [ss:bAddr32], 0 2536 0000609C 7403 jz .16si 2537 0000609E E8CF5B call hexword_high 2538 .16si: 2539 %endif 2540 000060A1 E8D85B call hexword 2541 000060A4 B82020 mov ax, 32<<8|32 2542 000060A7 AB stosw 2543 000060A8 88D0 mov al, dl 2544 000060AA E8D65B call hexbyte 2545 000060AD B82020 mov ax, 32<<8|32 2546 000060B0 AB stosw 2547 000060B1 88F0 mov al, dh 2548 000060B3 E8CD5B call hexbyte 2549 000060B6 B82020 mov ax, 32<<8|32 2550 000060B9 AB stosw 2551 000060BA 58 pop ax 2552 000060BB 50 push ax 2553 000060BC E8BD5B call hexword 2554 000060BF B03A mov al, ':' 2555 000060C1 AA stosb 2556 000060C2 66 _386_PM_o32 ; mov eax, ebx 2557 000060C3 89D8 mov ax, bx 2558 000060C5 66 _386_PM_o32 ; dec eax 2559 000060C6 48 dec ax 2560 %if _PM 2561 000060C7 36803E[0C8B]00 cmp byte [ss:bAddr32], 0 2562 000060CD 7403 jz .16bx 2563 000060CF E89E5B call hexword_high 2564 .16bx: 2565 %endif 2566 000060D2 E8A75B call hexword 2567 000060D5 1E push ds 2568 000060D6 16 push ss 2569 000060D7 1F pop ds 2570 000060D8 53 push bx 2571 000060D9 51 push cx 2572 000060DA E8D75B call putsline_crlf 2573 000060DD 59 pop cx 2574 000060DE 5F pop di 2575 000060DF 1F pop ds 2576 000060E0 07 pop es 2577 %if _PM 2578 000060E1 36803E[0C8B]00 cmp byte [ss:bAddr32],0 2579 000060E7 7406 jz cc1_6 2580 [cpu 386] 2581 000060E9 67E309 jecxz cc2 2582 __CPU__ 2583 cc1_j1: 2584 000060EC E958FF jmp cc1 2585 cc1_6: 2586 %else 2587 cc1_j1 equ cc1 2588 %endif 2589 %if 0 2590 _386_PM_o32 ; inc ecx 2591 inc cx 2592 _386_PM_a32 ; loopd cc1 2593 loop cc1 ; if not done yet 2594 %else 2595 000060EF 67 _386_PM_a32 ; jecxz cc2 2596 000060F0 E303 jcxz cc2 2597 000060F2 E952FF jmp cc1 ; if not done yet 2598 %endif 2599 cc2: 2600 000060F5 16 push ss ; restore segment registers 2601 000060F6 1F pop ds 2602 000060F7 16 push ss 2603 000060F8 07 pop es 2604 000060F9 C3 retn 2605 2606 2607 %if _BOOTLDR 2608 %include "boot.asm" 2609 <1> 2610 <1> %if 0 2611 <1> 2612 <1> lDebug "boot" commands - boot loading 2613 <1> 2614 <1> Copyright (C) 2008-2017 C. Masloch 2615 <1> 2616 <1> Usage of the works is permitted provided that this 2617 <1> instrument is retained with the works, so that any entity 2618 <1> that uses the works is notified of this instrument. 2619 <1> 2620 <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 2621 <1> 2622 <1> %endif 2623 <1> 2624 <1> 2625 <1> usesection lDEBUG_DATA_ENTRY 2626 <1> 2627 00008CDF 00 <1> align 16, db 0 2628 <1> load_unit_flags: 2629 00008CE0 00 <1> times 128 db _LUF_DEFAULT_DISKETTE 2630 00008D60 00 <1> times 128 db _LUF_DEFAULT_HARDDISK 2631 <1> 2632 <1> align 16, db 0 2633 00008DE0 00 <1> load_partition_table: times 16 * 4 db 0 2634 <1> .end: 2635 <1> 2636 <1> align 16, db 0 2637 <1> ; Data passed to us from loader (in case we booted) 2638 <1> loaddata_loadedfrom: 2639 00008E20 00 <1> times (-LOADDATA + bsBPB + ebpbNew + BPBN_size) db 0 2640 <1> 2641 00008E9A 00 <1> align 16, db 0 2642 <1> load_data_lowest: 2643 00008EA0 00 <1> times LOADDATA3_size db 0 2644 <1> ; data used to access storage 2645 <1> load_data: 2646 00008EB0 00 <1> times (-LOADDATA2 + bsBPB + ebpbNew + BPBN_size) db 0 2647 00008F3A 00 <1> align 16, db 0 2648 <1> load_current_settings: 2649 <1> istruc LOADSETTINGS 2650 00008F40 0000 <1> at lsKernelName, load_kernelname_default: dw 0 2651 00008F42 0000 <1> at lsAddName, load_addname_default: dw 0 2652 00008F44 0000 <1> at lsMinPara, load_minpara: dw 0 2653 00008F46 0000 <1> at lsMaxPara, load_maxpara: dw 0 2654 00008F48 0000 <1> at lsOptions, load_options: dw 0 2655 00008F4A 0000 <1> at lsSegment, load_loadseg: dw 0 2656 00008F4C 00000000 <1> at lsEntry, load_entrypoint: dd 0 2657 00008F50 00000000 <1> at lsBPB, load_bpb: dd 0 2658 00008F54 0000 <1> at lsCheckOffset, load_check_offset: dw 0 2659 00008F56 0000 <1> at lsCheckValue, load_check_value: dw 0 2660 <1> at lsName 2661 <1> ; iend 2662 <1> %pop ; (pop off the istruc context) 2663 <1> 2664 <1> %if _INPUT_FILE_BOOT 2665 00008F58 00 <1> align 16, db 0 2666 <1> load_yy_direntry: 2667 00008F60 00 <1> times DIRENTRY_size db 0 2668 <1> 2669 <1> LOAD_INPUT_FILE_SIZE equ fromparas(paras(-LOADDATA3 + bsBPB + ebpbNew + BPBN_size)) 2670 <1> align 16, db 0 2671 <1> load_input_file: 2672 00008F80 00 <1> times _INPUT_FILE_BOOT * LOAD_INPUT_FILE_SIZE db 0 2673 <1> .active: 2674 00009200 0000 <1> dw 0 2675 <1> .goto_offset: 2676 00009202 0000 <1> dw 0 2677 <1> %endif 2678 <1> 2679 <1> align 4, db 0 2680 00009204 00000000 <1> load_bpb_dest: dd 0 2681 <1> load_sectors: equ load_data - LOADDATA2 + bsBPB + bpbCHSSectors 2682 <1> load_heads: equ load_data - LOADDATA2 + bsBPB + bpbCHSHeads 2683 <1> load_sectorsize: equ load_data - LOADDATA2 + bsBPB + bpbBytesPerSector 2684 <1> load_sectorsizepara: equ load_data - LOADDATA2 + ldParaPerSector 2685 <1> load_sectorseg: equ load_data - LOADDATA2 + ldSectorSeg 2686 00009208 00000000 <1> load_partition_sector: dd 0 2687 <1> load_ldp_sector: equ loaddata_loadedfrom - LOADDATA + bsBPB + bpbHiddenSectors 2688 <1> ; load_sdp_sector: equ load_data - LOADDATA2 + bsBPB + bpbHiddenSectors 2689 0000920C 0000 <1> load_partition_cycle: dw 0 2690 0000920E 0000 <1> load_cmdline: dw 0 2691 <1> load_ldflags: equ load_data - LOADDATA2 + ldFlags 2692 <1> load_unit: equ load_data - LOADDATA2 + bsBPB + ebpbNew + bpbnBootUnit 2693 00009210 0000 <1> load_partition_entry: dw 0 2694 00009212 00 <1> load_partition: db 0 2695 00009213 00 <1> load_current_partition: db 0 2696 00009214 00 <1> load_found_partition: db 0 2697 00009215 00 <1> load_check_dir_attr: db 0 2698 00009216 00 <1> load_sector_alt: db 0 2699 <1> 2700 00009217 00 <1> align 4, db 0 2701 00009218 00 <1> load_kernel_name: times 11 + 1 db 0 2702 <1> align 2, db 0 2703 <1> ; load_kernelname_default:dw 0 2704 <1> ; ASCIZ filename for if load_kernelname_input terminates in '/' 2705 00009224 0000 <1> load_kernelname_input: dw 0 2706 <1> ; input (ASCIZ '/'-terminated pathnames + optional filename) 2707 00009226 0000 <1> load_kernelname_next: dw 0 2708 <1> ; next element in ASCIZ load_kernelname_input, 2709 <1> ; empty string if pathname terminated in '/' 2710 <1> ; load_addname_default: dw 0 2711 00009228 0000 <1> load_addname_input: dw 0 2712 0000922A 0000 <1> load_addname_next: dw 0 2713 <1> %if _INPUT_FILE_BOOT 2714 0000922C 0000 <1> load_yyname_input: dw 0 2715 0000922E 0000 <1> load_yyname_next: dw 0 2716 <1> %endif 2717 <1> 2718 <1> align 2, db 0 2719 00009230 0000 <1> load_adr_dirbuf_segment:dw 0 2720 00009232 0000 <1> boot_new_memsizekib: dw 0 2721 00009234 0000 <1> boot_old_memsizekib: dw 0 2722 00009236 00 <1> boot_ebdaflag: db 0 ; EBDA flag: non-zero if present 2723 <1> 2724 00009237 00 <1> align 4, db 0 2725 00009238 00000000 <1> load_readwrite_sector: dd 0 2726 0000923C 0000 <1> load_readwrite_buffer: dw 0 2727 0000923E 0000 <1> load_readwrite_count: dw 0 2728 00009240 0000 <1> load_readwrite_function:dw 0 2729 <1> 2730 <1> 2731 <1> usesection lDEBUG_CODE 2732 <1> 2733 <1> init_bootcmd: 2734 000060FA E87AA4 <1> call guard_re 2735 000060FD BD[E08E] <1> mov bp, load_data - LOADDATA2 2736 <1> 2737 00006100 F606[A400]80 <1> testopt [internalflags3], dif3_partition_changed 2738 00006105 7413 <1> jz @F 2739 <1> 2740 00006107 FF761E <1> push word [bp + bsBPB + bpbHiddenSectors + 2] 2741 0000610A FF761C <1> push word [bp + bsBPB + bpbHiddenSectors] 2742 0000610D 8F06[0892] <1> pop word [load_partition_sector] 2743 00006111 8F06[0A92] <1> pop word [load_partition_sector + 2] 2744 00006115 8026[A400]7F <1> clropt [internalflags3], dif3_partition_changed 2745 <1> @@: 2746 <1> 2747 0000611A 31C9 <1> xor cx, cx 2748 0000611C 894E1C <1> mov [bp + bsBPB + bpbHiddenSectors + 0], cx 2749 0000611F 894E1E <1> mov [bp + bsBPB + bpbHiddenSectors + 2], cx 2750 00006122 880E[1692] <1> mov byte [load_sector_alt], cl 2751 00006126 C3 <1> retn 2752 <1> 2753 <1> 2754 <1> bootcmd: 2755 <1> %if _PM 2756 00006127 E8AB32 <1> call ispm 2757 0000612A 750C <1> jnz .rm 2758 0000612C BA[3F7E] <1> mov dx, nopmsupp 2759 0000612F B80102 <1> mov ax, 0201h 2760 00006132 E85C46 <1> call setrc 2761 00006135 E9F55E <1> jmp putsz_error 2762 <1> .rm: 2763 <1> %endif 2764 <1> d4 call d4message 2765 <1> d4 asciz "In bootcmd",13,10 2766 <1> 2767 00006138 E8BFFF <1> call init_bootcmd 2768 <1> 2769 0000613B E8645A <1> call skipcomma 2770 0000613E 4E <1> dec si 2771 0000613F BA[7172] <1> mov dx, msg.list 2772 00006142 E8D859 <1> call isstring? 2773 00006145 7503E9D304 <1> je .list 2774 <1> 2775 0000614A BA[4864] <1> mov dx, msg.quit 2776 0000614D E8CD59 <1> call isstring? 2777 00006150 7536 <1> jne .not_quit 2778 <1> .quit: 2779 <1> %if _DOSEMU 2780 00006152 F606[9F00]01 <1> testopt [internalflags], runningdosemu 2781 00006157 7407 <1> jz .quit_not_dosemu 2782 <1> 2783 00006159 31DB <1> xor bx, bx 2784 0000615B B8FFFF <1> mov ax, -1 2785 0000615E CDE6 <1> int 0E6h ; dosemu quit 2786 <1> 2787 <1> .quit_not_dosemu: 2788 <1> %endif 2789 <1> 2790 <1> ; from https://stackoverflow.com/a/5240330/738287 2791 00006160 B80153 <1> mov ax, 5301h 2792 00006163 31DB <1> xor bx, bx 2793 00006165 CD15 <1> int 15h ; connect to APM API 2794 <1> 2795 00006167 B80E53 <1> mov ax, 530Eh 2796 0000616A 31DB <1> xor bx, bx 2797 0000616C B90201 <1> mov cx, 0102h 2798 0000616F CD15 <1> int 15h ; set APM version to 1.02 2799 <1> 2800 00006171 B80753 <1> mov ax, 5307h 2801 00006174 BB0100 <1> mov bx, 1 2802 00006177 B90300 <1> mov cx, 3 2803 0000617A CD15 <1> int 15h ; shut down system 2804 <1> 2805 0000617C BA[6960] <1> mov dx, msg.boot_quit_fail 2806 0000617F B80202 <1> mov ax, 0202h 2807 00006182 E80C46 <1> call setrc 2808 00006185 E9A55E <1> jmp putsz_error 2809 <1> 2810 <1> .not_quit: 2811 00006188 BA[2264] <1> mov dx, msg.read 2812 0000618B E88F59 <1> call isstring? 2813 0000618E 7503E96508 <1> je boot_read 2814 <1> 2815 00006193 BA[2764] <1> mov dx, msg.write 2816 00006196 E88459 <1> call isstring? 2817 00006199 7503E96208 <1> je boot_write 2818 <1> 2819 0000619E BA[3464] <1> mov dx, msg.dir 2820 000061A1 E87959 <1> call isstring? 2821 000061A4 7503E97210 <1> je boot_dir 2822 <1> 2823 000061A9 BA[4D64] <1> mov dx, msg.protocol 2824 000061AC E86E59 <1> call isstring? 2825 000061AF 7533 <1> jne .notproto 2826 <1> 2827 000061B1 E8075A <1> call skipequals 2828 000061B4 4E <1> dec si 2829 000061B5 BA[8F64] <1> mov dx, msg.sector 2830 000061B8 E86259 <1> call isstring? 2831 000061BB 7423 <1> je .proto_sector 2832 <1> 2833 000061BD BA[9664] <1> mov dx, msg.sector_alt 2834 000061C0 E85A59 <1> call isstring? 2835 000061C3 7416 <1> je .proto_sector_alt 2836 <1> 2837 000061C5 BB[2479] <1> mov bx, loadsettings 2838 <1> .proto_settings_next: 2839 000061C8 8D5718 <1> lea dx, [bx + lsName] 2840 000061CB E84F59 <1> call isstring? 2841 000061CE 7421 <1> je .proto_settings 2842 000061D0 83C320 <1> add bx, LOADSETTINGS_size 2843 000061D3 833F00 <1> cmp word [bx], 0 2844 000061D6 75F0 <1> jne .proto_settings_next 2845 <1> 2846 000061D8 E96F45 <1> jmp error 2847 <1> 2848 <1> .proto_sector_alt: 2849 000061DB C606[1692]01 <1> mov byte [load_sector_alt], 1 2850 <1> .proto_sector: 2851 000061E0 E8BF59 <1> call skipcomma 2852 000061E3 A8 <1> db __TEST_IMM8 2853 <1> .notproto: 2854 000061E4 AC <1> lodsb 2855 000061E5 E81D06 <1> call parseloadunit_default_sdp 2856 000061E8 E93303 <1> jmp .load 2857 <1> 2858 <1> 2859 <1> .errordec: 2860 000061EB 4E <1> dec si 2861 <1> .error: 2862 000061EC A8 <1> db __TEST_IMM8 ; skip pop 2863 <1> .errorpop: 2864 000061ED 5E <1> pop si 2865 000061EE E95945 <1> jmp error 2866 <1> 2867 <1> 2868 <1> .proto_settings: 2869 000061F1 56 <1> push si 2870 000061F2 89DE <1> mov si, bx 2871 000061F4 BF[408F] <1> mov di, load_current_settings 2872 000061F7 B90C00 <1> mov cx, lsName >> 1 2873 000061FA F3A5 <1> rep movsw 2874 <1> %if lsName & 1 2875 <1> movsb 2876 <1> %endif 2877 000061FC FF75E8 <1> push word [load_kernelname_default - (load_current_settings + lsName) + di] 2878 000061FF 8F85CC02 <1> pop word [load_kernelname_input - (load_current_settings + lsName) + di] 2879 00006203 FF75EA <1> push word [load_addname_default - (load_current_settings + lsName) + di] 2880 00006206 8F85D002 <1> pop word [load_addname_input - (load_current_settings + lsName) + di] 2881 <1> 2882 0000620A 5E <1> pop si 2883 <1> 2884 <1> d4 call d4message 2885 <1> d4 asciz "In bootcmd.proto_settings",13,10 2886 <1> 2887 <1> .proto_next: 2888 0000620B E89459 <1> call skipcomma 2889 0000620E 4E <1> dec si 2890 0000620F BA[5664] <1> mov dx, msg.segment 2891 00006212 E80859 <1> call isstring? 2892 00006215 7478 <1> je .proto_segment 2893 00006217 BA[5E64] <1> mov dx, msg.entry 2894 0000621A E80059 <1> call isstring? 2895 0000621D 7503E98C00 <1> je .proto_entry 2896 00006222 BA[6464] <1> mov dx, msg.bpb 2897 00006225 E8F558 <1> call isstring? 2898 00006228 7503E9A000 <1> je .proto_bpb 2899 0000622D BA[6864] <1> mov dx, msg.minpara 2900 00006230 E8EA58 <1> call isstring? 2901 00006233 7503E9B400 <1> je .proto_minpara 2902 00006238 BA[7064] <1> mov dx, msg.maxpara 2903 0000623B E8DF58 <1> call isstring? 2904 0000623E 7503E9B700 <1> je .proto_maxpara 2905 00006243 BA[7864] <1> mov dx, msg.checkoffset 2906 00006246 E8D458 <1> call isstring? 2907 00006249 7503E9BA00 <1> je .proto_checkoffset 2908 0000624E BA[8464] <1> mov dx, msg.checkvalue 2909 00006251 E8C958 <1> call isstring? 2910 00006254 7503E9C800 <1> je .proto_checkvalue 2911 <1> 2912 00006259 BB[B477] <1> mov bx, loadoptiontable 2913 <1> .proto_lot_next: 2914 0000625C 8B0F <1> mov cx, [bx] ; flag 2915 0000625E 8B5702 <1> mov dx, [bx + 2] ; -> ASCIZ message 2916 00006261 85C9 <1> test cx, cx 2917 00006263 7503E9C700 <1> jz .proto_done 2918 00006268 E8B258 <1> call isstring? 2919 0000626B 7405 <1> je .proto_lot 2920 0000626D 83C304 <1> add bx, 4 2921 00006270 EBEA <1> jmp .proto_lot_next 2922 <1> 2923 <1> .proto_lot: 2924 00006272 E84659 <1> call skipequals 2925 00006275 89CA <1> mov dx, cx 2926 00006277 F7D2 <1> not dx 2927 00006279 2116[488F] <1> and word [load_options], dx 2928 0000627D E8F552 <1> call getexpression 2929 00006280 E8FD4C <1> call toboolean 2930 00006283 85D2 <1> test dx, dx 2931 00006285 7404 <1> jz @F 2932 00006287 090E[488F] <1> or word [load_options], cx 2933 <1> @@: 2934 0000628B 4E <1> dec si 2935 0000628C E97CFF <1> jmp .proto_next 2936 <1> 2937 <1> .proto_segment: 2938 0000628F E82959 <1> call skipequals 2939 00006292 E8C657 <1> call getword ; dx = word 2940 00006295 83FA50 <1> cmp dx, 50h 2941 00006298 7208 <1> jb @F 2942 0000629A 8916[4A8F] <1> mov word [load_loadseg], dx 2943 0000629E 4E <1> dec si 2944 0000629F E969FF <1> jmp .proto_next 2945 <1> 2946 <1> @@: 2947 000062A2 BA[C963] <1> mov dx, msg.boot_segment_too_low 2948 000062A5 B81002 <1> mov ax, 0210h 2949 000062A8 E8E644 <1> call setrc 2950 000062AB E95803 <1> jmp .fail 2951 <1> 2952 <1> 2953 <1> .proto_entry: 2954 000062AE E80A59 <1> call skipequals 2955 000062B1 31DB <1> xor bx, bx 2956 000062B3 E8CB48 <1> call getaddr ; bx:(e)dx = addr 2957 000062B6 66F7C20000FFFF <1> _386 test edx, 0_FFFF_0000h 2958 000062BD 0F852BFF <1> _386 jnz .error 2959 000062C1 8916[4C8F] <1> mov word [load_entrypoint], dx 2960 000062C5 891E[4E8F] <1> mov word [load_entrypoint + 2], bx 2961 000062C9 4E <1> dec si 2962 000062CA E93EFF <1> jmp .proto_next 2963 <1> 2964 <1> .proto_bpb: 2965 000062CD E8EB58 <1> call skipequals 2966 000062D0 31DB <1> xor bx, bx 2967 000062D2 E8AC48 <1> call getaddr ; bx:(e)dx = addr 2968 000062D5 66F7C20000FFFF <1> _386 test edx, 0_FFFF_0000h 2969 000062DC 0F850CFF <1> _386 jnz .error 2970 000062E0 8916[508F] <1> mov word [load_bpb], dx 2971 000062E4 891E[528F] <1> mov word [load_bpb + 2], bx 2972 000062E8 4E <1> dec si 2973 000062E9 E91FFF <1> jmp .proto_next 2974 <1> 2975 <1> .proto_minpara: 2976 000062EC E8CC58 <1> call skipequals 2977 000062EF E86957 <1> call getword ; dx = word 2978 000062F2 8916[448F] <1> mov word [load_minpara], dx 2979 000062F6 4E <1> dec si 2980 000062F7 E911FF <1> jmp .proto_next 2981 <1> 2982 <1> .proto_maxpara: 2983 000062FA E8BE58 <1> call skipequals 2984 000062FD E85B57 <1> call getword ; dx = word 2985 00006300 8916[468F] <1> mov word [load_maxpara], dx 2986 00006304 4E <1> dec si 2987 00006305 E903FF <1> jmp .proto_next 2988 <1> 2989 <1> .proto_checkoffset: 2990 00006308 E8B058 <1> call skipequals 2991 0000630B E84D57 <1> call getword ; dx = word 2992 0000630E 89D0 <1> mov ax, dx 2993 00006310 241F <1> and al, 31 2994 00006312 3C1F <1> cmp al, 31 2995 00006314 7503E9D3FE <1> je .error 2996 <1> ; Previously we rejected all odd values here. Now, 2997 <1> ; we only reject a subset of odd values, namely 2998 <1> ; those that may actually cross a sector boundary. 2999 <1> ; Note that sectors may be as small as 32 bytes. 3000 <1> ; This insures the checked word never crosses a sector 3001 <1> ; boundary. Thus, loading a single sector suffices. 3002 00006319 8916[548F] <1> mov word [load_check_offset], dx 3003 0000631D 4E <1> dec si 3004 0000631E E9EAFE <1> jmp .proto_next 3005 <1> 3006 <1> .proto_checkvalue: 3007 00006321 E89758 <1> call skipequals 3008 00006324 E83457 <1> call getword ; dx = word 3009 00006327 8916[568F] <1> mov word [load_check_value], dx 3010 0000632B 4E <1> dec si 3011 0000632C E9DCFE <1> jmp .proto_next 3012 <1> 3013 <1> .proto_done: 3014 0000632F BB[F077] <1> mov bx, loadoptiontable.incompatible 3015 <1> @@: 3016 00006332 8B0F <1> mov cx, [bx] 3017 00006334 0B4F02 <1> or cx, [bx + 2] 3018 00006337 746B <1> jz .proto_compatible 3019 00006339 8B16[488F] <1> mov dx, word [load_options] 3020 0000633D 21CA <1> and dx, cx 3021 0000633F 39CA <1> cmp dx, cx 3022 00006341 7405 <1> je .proto_incompatible 3023 00006343 83C304 <1> add bx, 4 3024 00006346 EBEA <1> jmp @B 3025 <1> 3026 <1> .proto_incompatible: 3027 00006348 16 <1> push ss 3028 00006349 07 <1> pop es 3029 0000634A B80302 <1> mov ax, 0203h 3030 0000634D E84144 <1> call setrc 3031 00006350 BA[8360] <1> mov dx, msg.bootfail 3032 00006353 E8D75C <1> call putsz_error 3033 00006356 BA[7C63] <1> mov dx, msg.boot_cannot_set_both 3034 00006359 E8D15C <1> call putsz_error 3035 0000635C 8B07 <1> mov ax, word [bx] 3036 0000635E E82200 <1> call .proto_incompatible_get_label 3037 00006361 E8C95C <1> call putsz_error 3038 00006364 BA[8D63] <1> mov dx, msg.boot_and 3039 00006367 E8C35C <1> call putsz_error 3040 0000636A 8B4702 <1> mov ax, word [bx + 2] 3041 0000636D E81300 <1> call .proto_incompatible_get_label 3042 00006370 E8BA5C <1> call putsz_error 3043 00006373 BA[9363] <1> mov dx, msg.boot_dot_crlf 3044 <1> .putsz_errret: 3045 00006376 B80402 <1> mov ax, 0204h 3046 00006379 E81544 <1> call setrc 3047 0000637C E8AE5C <1> call putsz_error 3048 0000637F FF26[A20A] <1> jmp near word [errret] 3049 <1> 3050 <1> .proto_incompatible_get_label: 3051 00006383 53 <1> push bx 3052 00006384 BB[B477] <1> mov bx, loadoptiontable 3053 <1> @@: 3054 00006387 8B0F <1> mov cx, [bx] 3055 00006389 E30E <1> jcxz .proto_internal_error 3056 0000638B 39C8 <1> cmp ax, cx 3057 0000638D 8B5702 <1> mov dx, word [bx + 2] 3058 00006390 7405 <1> je @F 3059 00006392 83C304 <1> add bx, 4 3060 00006395 EBF0 <1> jmp @B 3061 <1> 3062 <1> @@: 3063 00006397 5B <1> pop bx 3064 00006398 C3 <1> retn 3065 <1> 3066 <1> .proto_internal_error: 3067 00006399 BA[9763] <1> mov dx, msg.boot_internal_error 3068 0000639C B80502 <1> mov ax, 0205h 3069 0000639F E8EF43 <1> call setrc 3070 000063A2 EBD2 <1> jmp .putsz_errret 3071 <1> 3072 <1> 3073 <1> .proto_compatible: 3074 000063A4 AC <1> lodsb 3075 000063A5 E85D04 <1> call parseloadunit_default_sdp 3076 000063A8 7503E98800 <1> jz .fn_done_eol ; no filename given, use defaults --> 3077 <1> ; al was = '/' or '\' or first pathname's first character 3078 <1> ; si-> next char 3079 000063AD BB[2492] <1> mov bx, load_kernelname_input 3080 000063B0 E83E00 <1> call .pathname_parse_super 3081 <1> 3082 000063B3 56 <1> push si 3083 000063B4 50 <1> push ax 3084 000063B5 E81A58 <1> call skipwh0 3085 000063B8 E8C157 <1> call iseol? 3086 000063BB 58 <1> pop ax 3087 000063BC 5E <1> pop si 3088 000063BD 7478 <1> je .fn_done 3089 <1> 3090 000063BF BB[2892] <1> mov bx, load_addname_input 3091 <1> 3092 000063C2 E80D58 <1> call skipwh0 3093 000063C5 3C2F <1> cmp al, '/' 3094 000063C7 7404 <1> je @F 3095 000063C9 3C5C <1> cmp al, '\' 3096 000063CB 751F <1> jne .proto_not_double_slash 3097 <1> @@: 3098 000063CD 803C2F <1> cmp byte [si], '/' 3099 000063D0 7405 <1> je @F 3100 000063D2 803C5C <1> cmp byte [si], '\' 3101 000063D5 7515 <1> jne .proto_not_double_slash 3102 <1> @@: 3103 000063D7 4E <1> dec si 3104 000063D8 8937 <1> mov word [bx], si 3105 000063DA C7042F2F <1> mov word [si], "//" 3106 000063DE 46 <1> inc si 3107 000063DF 46 <1> inc si 3108 000063E0 E89957 <1> call iseol? 3109 000063E3 C60400 <1> mov byte [si], 0 3110 000063E6 7401 <1> je @F 3111 000063E8 46 <1> inc si 3112 <1> @@: 3113 000063E9 AC <1> lodsb 3114 000063EA EB4B <1> jmp .fn_done 3115 <1> 3116 <1> .proto_not_double_slash: 3117 000063EC E80200 <1> call .pathname_parse_super 3118 000063EF EB46 <1> jmp .fn_done 3119 <1> 3120 <1> 3121 <1> ; INP: bx -> word variable to hold filename 3122 <1> ; OUT: word [bx] -> list of /-separated pathnames, zero-terminated 3123 <1> ; CHG: ax, cx, si, di, [es:load_kernel_name] 3124 <1> .pathname_parse_super: 3125 <1> d4 call d4message 3126 <1> d4 asciz "In bootcmd.pathname_parse_super",13,10 3127 <1> 3128 000063F1 E8DE57 <1> call skipwh0 3129 000063F4 3C2F <1> cmp al, '/' 3130 000063F6 7404 <1> je @F 3131 000063F8 3C5C <1> cmp al, '\' 3132 000063FA 7506 <1> jne @FF 3133 <1> @@: 3134 000063FC 4E <1> dec si 3135 000063FD 8937 <1> mov word [bx], si 3136 000063FF 46 <1> inc si 3137 00006400 EB0E <1> jmp .pathname_check 3138 <1> 3139 <1> @@: 3140 00006402 4E <1> dec si 3141 00006403 8937 <1> mov word [bx], si 3142 <1> 3143 <1> .pathname_parse: 3144 <1> .pathname_next: 3145 <1> d4 call d4message 3146 <1> d4 asciz "In bootcmd.pathname_parse",13,10 3147 00006405 E8D406 <1> call boot_parse_fn 3148 <1> ; al = separator char 3149 <1> ; si -> next char after that (if any) 3150 00006408 3C2F <1> cmp al, '/' ; path separator? 3151 0000640A 7404 <1> je .pathname_check 3152 0000640C 3C5C <1> cmp al, '\' 3153 0000640E 7517 <1> jne .pathname_none ; no, this was the filename --> 3154 <1> .pathname_check: 3155 <1> d4 call d4message 3156 <1> d4 asciz "In bootcmd.pathname_parse_check",13,10 3157 00006410 C644FF2F <1> mov byte [si - 1], '/' ; normalise path separator 3158 00006414 AC <1> lodsb 3159 00006415 3C20 <1> cmp al, 32 ; space ? 3160 00006417 740E <1> je .pathname_gotfirst 3161 00006419 3C09 <1> cmp al, 9 3162 0000641B 740A <1> je .pathname_gotfirst ; yes, allow for second name --> 3163 0000641D 4E <1> dec si 3164 0000641E E85B57 <1> call iseol? ; EOL ? 3165 00006421 75E2 <1> jne .pathname_next ; no, next pathname element --> 3166 00006423 C60400 <1> mov byte [si], 0 ; terminate after trailing path sep 3167 00006426 C3 <1> retn 3168 <1> 3169 <1> .pathname_gotfirst: 3170 <1> .pathname_none: 3171 00006427 B000 <1> mov al, 0 3172 00006429 4E <1> dec si 3173 0000642A 8604 <1> xchg al, byte [si] ; terminate after filename 3174 0000642C 8936[1A0C] <1> mov word [terminator_in_line_in.offset], si 3175 00006430 A2[1C0C] <1> mov byte [terminator_in_line_in.value], al 3176 00006433 46 <1> inc si 3177 00006434 C3 <1> retn 3178 <1> 3179 <1> 3180 <1> ; DPR:word [load_kernelname_input] -> ASCIZ pathname. 3181 <1> ; if it ends in '/', append DPR:word [load_kernelname_default] 3182 <1> ; DPR:word [load_addname_input] -> ASCIZ pathname. 3183 <1> ; if it ends in '/', append DPR:word [load_addname_default] 3184 <1> ; if it's empty (and no trailing '/' in front of the zero) 3185 <1> ; then no additional name is given. 3186 <1> .fn_done_eol: 3187 00006435 B00D <1> mov al, 13 3188 <1> .fn_done: 3189 <1> d4 call d4message 3190 <1> d4 asciz "In bootcmd.fn_done",13,10 3191 <1> 3192 00006437 8326[0E92]00 <1> and word [load_cmdline], 0 3193 <1> 3194 0000643C E83D57 <1> call iseol? 3195 0000643F 743E <1> je @F 3196 <1> 3197 00006441 F606[498F]10 <1> testopt [load_options], LOAD_CMDLINE 3198 00006446 7503E9FF42 <1> jz error 3199 <1> 3200 0000644B E88457 <1> call skipwh0 3201 0000644E B400 <1> mov ah, 0 3202 00006450 3C22 <1> cmp al, '"' 3203 00006452 7404 <1> je .cmdline_quote 3204 00006454 3C27 <1> cmp al, "'" 3205 00006456 7503 <1> jne .cmdline_no_quote 3206 <1> .cmdline_quote: 3207 00006458 88C4 <1> mov ah, al 3208 0000645A A8 <1> db __TEST_IMM8 3209 <1> .cmdline_no_quote: 3210 0000645B 4E <1> dec si 3211 0000645C 8936[0E92] <1> mov word [load_cmdline], si 3212 <1> .cmdline_loop: 3213 00006460 AC <1> lodsb 3214 00006461 E81C57 <1> call iseol?.notsemicolon 3215 00006464 740E <1> je .cmdline_eol 3216 00006466 38E0 <1> cmp al, ah 3217 00006468 75F6 <1> jne .cmdline_loop 3218 <1> .cmdline_quote_eol: 3219 0000646A C644FF00 <1> mov byte [si - 1], 0 3220 0000646E AC <1> lodsb 3221 0000646F E81F57 <1> call chkeol 3222 00006472 EB0B <1> jmp @F 3223 <1> 3224 <1> .cmdline_eol: 3225 00006474 84E4 <1> test ah, ah 3226 00006476 7403E9CF42 <1> jnz error 3227 0000647B C644FF00 <1> mov byte [si - 1], 0 3228 <1> 3229 <1> @@: 3230 0000647F F606[A400]07 <1> testopt [internalflags3], dif3_load_is_dp 3231 00006484 7527 <1> jnz .load_kernel_from_ldp 3232 <1> 3233 00006486 8A1E[1292] <1> mov bl, [load_partition] 3234 0000648A 803E[208F]80 <1> cmp byte [load_unit], 80h 3235 0000648F 7228 <1> jb .p_f_is_diskette 3236 00006491 84DB <1> test bl, bl ; partition specified ? 3237 00006493 7503E954FD <1> jz .error ; no, error --> 3238 <1> 3239 00006498 E8BA14 <1> call query_geometry 3240 <1> 3241 0000649B B9[D06B] <1> mov cx, load_freedos_from_partition 3242 0000649E E80C13 <1> call scan_partitions 3243 000064A1 BA[1D62] <1> mov dx, msg.boot_partition_not_found 3244 000064A4 B81102 <1> mov ax, 0211h 3245 000064A7 E8E742 <1> call setrc 3246 000064AA E95901 <1> jmp .fail 3247 <1> 3248 <1> 3249 <1> .load_kernel_from_ldp: 3250 000064AD E8A514 <1> call query_geometry 3251 000064B0 A1[0892] <1> mov ax, word [load_partition_sector] 3252 000064B3 8B16[0A92] <1> mov dx, word [load_partition_sector + 2] 3253 000064B7 EB0E <1> jmp @F 3254 <1> 3255 <1> 3256 <1> .p_f_is_diskette: 3257 000064B9 84DB <1> test bl, bl ; partition specified ? 3258 000064BB 7403E92CFD <1> jnz .error ; yes, error --> 3259 <1> 3260 000064C0 E89214 <1> call query_geometry 3261 <1> 3262 000064C3 31C0 <1> xor ax, ax 3263 000064C5 31D2 <1> xor dx, dx 3264 <1> @@: 3265 000064C7 8B1E[FA09] <1> mov bx, word [auxbuff_segorsel] ; bx => auxbuff 3266 000064CB 52 <1> push dx 3267 000064CC 50 <1> push ax 3268 000064CD E83B16 <1> call read_ae_512_bytes 3269 <1> 3270 000064D0 26813EFE0155AA <1> cmp word [es:510], 0AA55h 3271 000064D7 7403E91D19 <1> jne boot_sigmismatch 3272 000064DC 58 <1> pop ax 3273 000064DD 5A <1> pop dx 3274 <1> 3275 000064DE 06 <1> push es 3276 000064DF F606[498F]40 <1> testopt [load_options], LOAD_SET_DSSI_PARTINFO 3277 000064E4 7434 <1> jz @F 3278 <1> 3279 000064E6 50 <1> push ax 3280 000064E7 31FF <1> xor di, di 3281 000064E9 8EC7 <1> mov es, di 3282 000064EB BF0006 <1> mov di, 600h 3283 000064EE B8CD19 <1> mov ax, 19CDh 3284 000064F1 AB <1> stosw ; fake boot sector loader 3285 000064F2 B9FE00 <1> mov cx, 508 / 2 3286 000064F5 31C0 <1> xor ax, ax 3287 000064F7 F3AB <1> rep stosw ; initialise pseudo MBR 3288 000064F9 B855AA <1> mov ax, 0AA55h 3289 000064FC AB <1> stosw ; fake boot sector signature 3290 000064FD 58 <1> pop ax 3291 <1> 3292 000064FE BEBE07 <1> mov si, 600h + 512 - 2 - 64 3293 00006501 26894408 <1> mov word [es:si + 8], ax 3294 00006505 2689540A <1> mov word [es:si + 8 + 2], dx ; store in partition table entry 3295 00006509 26C60480 <1> mov byte [es:si + piBoot], 80h ; fake primary active 3296 0000650D 26C64404FF <1> mov byte [es:si + piType], 0FFh ; fake a type 3297 00006512 26FE440C <1> inc byte [es:si + piLength] ; fake a size 3298 <1> 3299 00006516 8936[1092] <1> mov word [load_partition_entry], si 3300 <1> @@: 3301 0000651A 07 <1> pop es 3302 <1> 3303 0000651B E92107 <1> jmp load_freedos_common 3304 <1> 3305 <1> 3306 <1> .load: 3307 0000651E 7403E9C9FC <1> jnz bootcmd.error 3308 <1> 3309 00006523 F606[A400]07 <1> testopt [internalflags3], dif3_load_is_dp 3310 00006528 751C <1> jnz .load_sector_from_ldp 3311 <1> 3312 0000652A 803E[1292]00 <1> cmp byte [load_partition], 0 3313 0000652F 7421 <1> je .load_boot 3314 <1> 3315 00006531 E82114 <1> call query_geometry 3316 <1> 3317 <1> d4 call d4message 3318 <1> d4 asciz "In bootcmd.load (before call to scan_partitions)",13,10 3319 <1> 3320 00006534 B9[616B] <1> mov cx, load_from_partition 3321 00006537 E87312 <1> call scan_partitions 3322 0000653A BA[1D62] <1> mov dx, msg.boot_partition_not_found 3323 0000653D B81202 <1> mov ax, 0212h 3324 00006540 E84E42 <1> call setrc 3325 00006543 E9C000 <1> jmp .fail 3326 <1> 3327 <1> 3328 <1> .load_sector_from_ldp: 3329 00006546 E80C14 <1> call query_geometry 3330 00006549 A1[0892] <1> mov ax, word [load_partition_sector] 3331 0000654C 8B16[0A92] <1> mov dx, word [load_partition_sector + 2] 3332 00006550 EB07 <1> jmp @F 3333 <1> 3334 <1> .load_boot: 3335 00006552 E80014 <1> call query_geometry 3336 <1> 3337 00006555 31C0 <1> xor ax, ax 3338 00006557 31D2 <1> xor dx, dx 3339 <1> @@: 3340 00006559 BBC007 <1> mov bx, 7C0h 3341 <1> d4 call d4dumpregs 3342 <1> d4 call d4message 3343 <1> d4 asciz 13,10,"In bootcmd.load_boot (before call to read_sector)",13,10 3344 0000655C 52 <1> push dx 3345 0000655D 50 <1> push ax 3346 0000655E E8AA15 <1> call read_ae_512_bytes 3347 <1> d4 call d4message 3348 <1> d4 asciz "In bootcmd.load_boot (after call to read_sector)",13,10 3349 00006561 31D2 <1> xor dx, dx 3350 00006563 8EC2 <1> mov es, dx 3351 <1> 3352 00006565 A0[208F] <1> mov al, byte [load_unit] ; al = boot unit 3353 00006568 BB007C <1> mov bx, 7C00h 3354 <1> 3355 0000656B 26813EFE7D55AA <1> cmp word [es:7C00h + 510], 0AA55h 3356 00006572 7403E98218 <1> jne boot_sigmismatch 3357 <1> 3358 00006577 26833F00 <1> cmp word [es:bx], 0 3359 0000657B 7503E98518 <1> je boot_codemismatch 3360 <1> 3361 00006580 50 <1> push ax 3362 00006581 B9FF00 <1> mov cx, 510 / 2 3363 00006584 BF0006 <1> mov di, 600h ; MBR location 3364 00006587 31C0 <1> xor ax, ax 3365 00006589 F3AB <1> rep stosw ; initialise (sector and all entries) 3366 0000658B B855AA <1> mov ax, 0AA55h 3367 0000658E AB <1> stosw ; initialise boot sector signature 3368 0000658F 26C7060006CD19 <1> mov word [es:600h], 019CDh ; initialise boot sector code 3369 00006596 BFBE07 <1> mov di, 600h + 510 - 4*16 ; -> first partition table entry 3370 00006599 58 <1> pop ax 3371 0000659A 268F4508 <1> pop word [es:di + piStart] 3372 0000659E 268F450A <1> pop word [es:di + piStart + 2] ; = boot sector LBA 3373 000065A2 26C60580 <1> mov byte [es:di + 0], 80h ; "bootable" flag set 3374 000065A6 26C64504FF <1> mov byte [es:di + 4], 0FFh ; dummy value for FS type (nonzero) 3375 000065AB 26C6450C01 <1> mov byte [es:di + 12], 1 ; dummy value for length (nonzero) 3376 <1> 3377 <1> load_partition_common: equ $ 3378 000065B0 8126[AC0C]FFF8 <1> and word [reg_efl], ~(400h|200h|100h) ; UP, DI, TF=0 3379 000065B6 893E[880C] <1> mov word [reg_esi], di 3380 000065BA 893E[840C] <1> mov word [reg_ebp], di 3381 000065BE 890E[900C] <1> mov word [reg_ds], cx ; ds:si -> 0:600h + offset to first entry 3382 000065C2 A2[7C0C] <1> mov byte [reg_edx], al ; dl = boot unit 3383 000065C5 891E[A80C] <1> mov word [reg_eip], bx 3384 000065C9 890E[AA0C] <1> mov word [reg_eip + 2], cx 3385 000065CD 890E[9C0C] <1> mov word [reg_cs], cx ; cs:eip = 0:7C00h 3386 000065D1 803E[1692]00 <1> cmp byte [load_sector_alt], 0 3387 000065D6 740A <1> je @F 3388 000065D8 890E[A80C] <1> mov word [reg_eip], cx 3389 000065DC C706[9C0C]C007 <1> mov word [reg_cs], 7C0h ; cs:eip = 07C0h:0 3390 <1> @@: 3391 000065E2 891E[800C] <1> mov word [reg_esp], bx 3392 000065E6 890E[820C] <1> mov word [reg_esp + 2], cx 3393 000065EA 890E[980C] <1> mov word [reg_ss], cx ; ss:esp = 0:7C00h 3394 000065EE 800E[A300]01 <1> setopt [internalflags2], dif2_boot_loaded_kernel 3395 000065F3 C3 <1> retn 3396 <1> 3397 <1> 3398 <1> .fail_read: 3399 000065F4 16 <1> push ss 3400 000065F5 07 <1> pop es 3401 000065F6 BF[AF60] <1> mov di, msg.bootfail_read_errorcode 3402 000065F9 88E0 <1> mov al, ah 3403 000065FB B404 <1> mov ah, 04h 3404 000065FD E89141 <1> call setrc 3405 00006600 E88056 <1> call hexbyte 3406 00006603 BA[9260] <1> mov dx, msg.bootfail_read 3407 <1> 3408 <1> .fail: 3409 00006606 16 <1> push ss 3410 00006607 07 <1> pop es 3411 00006608 52 <1> push dx 3412 00006609 BA[8360] <1> mov dx, msg.bootfail 3413 0000660C E81E5A <1> call putsz_error 3414 0000660F 5A <1> pop dx 3415 00006610 E81A5A <1> call putsz_error 3416 00006613 B8FF02 <1> mov ax, 02FFh 3417 00006616 E87841 <1> call setrc 3418 00006619 FF26[A20A] <1> jmp near word [errret] 3419 <1> 3420 <1> 3421 <1> bootcmd.list: 3422 0000661D E88255 <1> call skipcomma 3423 <1> 3424 00006620 E8E201 <1> call parseloadunit_default_sdp 3425 00006623 7403E9C4FB <1> jnz bootcmd.error 3426 <1> 3427 00006628 E82A13 <1> call query_geometry 3428 <1> 3429 0000662B F606[A400]07 <1> testopt [internalflags3], dif3_load_is_dp 3430 00006630 752B <1> jnz .list_ldp 3431 <1> 3432 00006632 803E[1292]00 <1> cmp byte [load_partition], 0 3433 00006637 741E <1> je .listall 3434 <1> 3435 00006639 C606[1492]00 <1> mov byte [load_found_partition], 0 3436 0000663E B9[9666] <1> mov cx, list_single_partition 3437 00006641 E86911 <1> call scan_partitions 3438 00006644 803E[1492]00 <1> cmp byte [load_found_partition], 0 3439 00006649 750B <1> jne @F 3440 0000664B BA[1D62] <1> mov dx, msg.boot_partition_not_found 3441 0000664E B81302 <1> mov ax, 0213h 3442 00006651 E83D41 <1> call setrc 3443 00006654 EBB0 <1> jmp bootcmd.fail 3444 <1> @@: 3445 00006656 C3 <1> retn 3446 <1> 3447 <1> .listall: 3448 00006657 B9[A466] <1> mov cx, list_any_partition 3449 0000665A E95011 <1> jmp scan_partitions 3450 <1> 3451 <1> .list_ldp: 3452 0000665D C606[1492]00 <1> mov byte [load_found_partition], 0 3453 00006662 B9[7B66] <1> mov cx, list_partition_if_ldp 3454 00006665 E84511 <1> call scan_partitions 3455 00006668 803E[1492]00 <1> cmp byte [load_found_partition], 0 3456 0000666D 750B <1> jne @F 3457 0000666F BA[1D62] <1> mov dx, msg.boot_partition_not_found 3458 00006672 B81402 <1> mov ax, 0214h 3459 00006675 E81941 <1> call setrc 3460 00006678 EB8C <1> jmp bootcmd.fail 3461 <1> @@: 3462 0000667A C3 <1> retn 3463 <1> 3464 <1> 3465 <1> list_partition_if_ldp: 3466 <1> d4 call d4message 3467 <1> d4 asciz "In list_partition_if_ldp",13,10 3468 <1> 3469 0000667B 8B43F8 <1> mov ax, word [bp + di - 8] 3470 0000667E 8B53FA <1> mov dx, word [bp + di - 6] ; root 3471 00006681 26034408 <1> add ax, word [es:si + 8] 3472 00006685 2613540A <1> adc dx, word [es:si + 8 + 2] ; add partition offset 3473 00006689 3906[0892] <1> cmp word [load_partition_sector], ax 3474 0000668D 7506 <1> jne @F 3475 0000668F 3916[0A92] <1> cmp word [load_partition_sector + 2], dx 3476 00006693 740B <1> je list_single_partition.gotit 3477 <1> @@: 3478 00006695 C3 <1> retn 3479 <1> 3480 <1> list_single_partition: 3481 <1> d4 call d4message 3482 <1> d4 asciz "In list_single_partition",13,10 3483 <1> 3484 00006696 A0[1392] <1> mov al, byte [load_current_partition] 3485 00006699 3A06[1292] <1> cmp al, byte [load_partition] 3486 0000669D 7401 <1> je .gotit 3487 0000669F C3 <1> retn 3488 <1> 3489 <1> .gotit: 3490 000066A0 FE06[1492] <1> inc byte [load_found_partition] 3491 <1> 3492 <1> ; INP: es:si -> partition table entry, 3493 <1> ; si = load_partition_table .. load_partition_table+48, 3494 <1> ; es = ss 3495 <1> ; bp + di -> above part table metadata, 3496 <1> ; dwo [bp + di - 4] = root (outermost extended position) 3497 <1> ; dwo [bp + di - 8] = base (current table position) 3498 <1> ; CHG: ax, bx, (cx), dx 3499 <1> list_any_partition: 3500 000066A4 06 <1> push es 3501 000066A5 51 <1> push cx 3502 000066A6 56 <1> push si 3503 000066A7 57 <1> push di 3504 <1> 3505 000066A8 BF[0E08] <1> mov di, line_out ; reset di 3506 000066AB B075 <1> mov al, "u" 3507 000066AD AA <1> stosb 3508 000066AE A0[208F] <1> mov al, byte [load_unit] 3509 000066B1 E8CF55 <1> call hexbyte 3510 000066B4 B02E <1> mov al, '.' 3511 000066B6 AA <1> stosb 3512 000066B7 A0[1392] <1> mov al, byte [load_current_partition] 3513 000066BA E82655 <1> call decbyte 3514 000066BD 3C0A <1> cmp al, 10 3515 000066BF B020 <1> mov al, 32 3516 000066C1 7301 <1> jae @F 3517 000066C3 AA <1> stosb 3518 <1> @@: 3519 000066C4 AA <1> stosb 3520 <1> 3521 000066C5 A0[208F] <1> mov al, byte [load_unit] 3522 000066C8 BB6664 <1> mov bx, "fd" 3523 000066CB 3C80 <1> cmp al, 80h 3524 000066CD 7202 <1> jb @F 3525 000066CF B368 <1> mov bl, "h" 3526 <1> @@: 3527 000066D1 247F <1> and al, ~80h 3528 000066D3 0461 <1> add al, 'a' 3529 000066D5 3C7A <1> cmp al, 'z' 3530 000066D7 7609 <1> jbe @F 3531 000066D9 B020 <1> mov al, 32 3532 000066DB B90500 <1> mov cx, 3 + 2 3533 000066DE F3AA <1> rep stosb 3534 000066E0 EB11 <1> jmp @FF 3535 <1> 3536 <1> @@: 3537 000066E2 93 <1> xchg ax, bx 3538 000066E3 AB <1> stosw 3539 000066E4 93 <1> xchg ax, bx 3540 000066E5 AA <1> stosb 3541 000066E6 A0[1392] <1> mov al, byte [load_current_partition] 3542 000066E9 E8F754 <1> call decbyte 3543 000066EC 3C0A <1> cmp al, 10 3544 000066EE B020 <1> mov al, 32 3545 000066F0 7301 <1> jae @F 3546 000066F2 AA <1> stosb 3547 <1> @@: 3548 000066F3 AA <1> stosb 3549 <1> 3550 000066F4 8A4404 <1> mov al, byte [si + 4] 3551 000066F7 E88955 <1> call hexbyte 3552 <1> 3553 000066FA B020 <1> mov al, 32 3554 000066FC AA <1> stosb 3555 <1> 3556 000066FD 89F9 <1> mov cx, di ; (preserve di in line_out) 3557 000066FF 5F <1> pop di ; get di of scan_partitions 3558 00006700 57 <1> push di 3559 00006701 8B43F8 <1> mov ax, word [bp + di - 8] 3560 00006704 8B53FA <1> mov dx, word [bp + di - 6] ; root 3561 00006707 89CF <1> mov di, cx ; (preserve di in line_out) 3562 00006709 034408 <1> add ax, word [si + 8] 3563 0000670C 13540A <1> adc dx, word [si + 8 + 2] ; add partition offset 3564 0000670F 92 <1> xchg ax, dx 3565 00006710 E86955 <1> call hexword 3566 00006713 92 <1> xchg ax, dx 3567 00006714 E86555 <1> call hexword 3568 <1> 3569 00006717 50 <1> push ax 3570 00006718 B82028 <1> mov ax, " (" 3571 0000671B AB <1> stosw 3572 0000671C 58 <1> pop ax 3573 0000671D 51 <1> push cx 3574 0000671E 53 <1> push bx 3575 0000671F 8B0E[EB8E] <1> mov cx, [load_sectorsize] 3576 00006723 BB0800 <1> mov bx, 4+4 3577 00006726 E88FB8 <1> call disp_dxax_times_cx_width_bx_size.store 3578 00006729 50 <1> push ax 3579 0000672A B82920 <1> mov ax, ") " 3580 0000672D AB <1> stosw 3581 0000672E 58 <1> pop ax 3582 <1> 3583 0000672F 52 <1> push dx 3584 00006730 50 <1> push ax 3585 <1> 3586 00006731 8B440C <1> mov ax, word [si + 12] 3587 00006734 8B540E <1> mov dx, word [si + 12 + 2] 3588 00006737 92 <1> xchg ax, dx 3589 00006738 E84155 <1> call hexword 3590 0000673B 92 <1> xchg ax, dx 3591 0000673C E83D55 <1> call hexword 3592 <1> 3593 0000673F 50 <1> push ax 3594 00006740 B82028 <1> mov ax, " (" 3595 00006743 AB <1> stosw 3596 00006744 58 <1> pop ax 3597 00006745 E870B8 <1> call disp_dxax_times_cx_width_bx_size.store 3598 00006748 B029 <1> mov al, ")" 3599 0000674A AA <1> stosb 3600 <1> 3601 0000674B 58 <1> pop ax 3602 0000674C 5A <1> pop dx 3603 <1> 3604 0000674D 5B <1> pop bx 3605 0000674E 59 <1> pop cx 3606 <1> 3607 0000674F 807C0483 <1> cmp byte [si + piType], ptLinux 3608 00006753 7544 <1> jne .notlinux 3609 <1> 3610 00006755 8B1E[FA09] <1> mov bx, word [auxbuff_segorsel] ; bx => auxbuff 3611 00006759 E89E13 <1> call read_ae_1536_bytes 3612 <1> 3613 0000675C 26813E380453EF <1> cmp word [es:1024 + 56], 0xEF53 ; s_magic == EXT2_SUPER_MAGIC ? 3614 00006763 7403E99300 <1> jne .nolabel 3615 <1> 3616 00006768 26833E4E0400 <1> cmp word [es:1024 + 76 + 2], 0 3617 0000676E 7403E98800 <1> jne .nolabel 3618 00006773 26833E4C0401 <1> cmp word [es:1024 + 76], 1 ; s_rev_level == EXT2_DYNAMIC_REV ? 3619 00006779 7403E97D00 <1> jne .nolabel 3620 <1> 3621 0000677E 06 <1> push es 3622 0000677F 1F <1> pop ds 3623 00006780 BE7804 <1> mov si, 1024 + 120 3624 00006783 B91000 <1> mov cx, 16 3625 00006786 16 <1> push ss 3626 00006787 07 <1> pop es 3627 <1> 3628 00006788 B020 <1> mov al, 32 3629 0000678A AA <1> stosb 3630 <1> @@: 3631 0000678B AC <1> lodsb 3632 0000678C 84C0 <1> test al, al 3633 0000678E 7403 <1> jz @F 3634 00006790 AA <1> stosb 3635 00006791 E2F8 <1> loop @B 3636 <1> @@: 3637 <1> 3638 00006793 16 <1> push ss 3639 00006794 1F <1> pop ds 3640 <1> 3641 00006795 59 <1> pop cx 3642 00006796 5E <1> pop si 3643 00006797 56 <1> push si ; get si of scan_partitions 3644 00006798 51 <1> push cx 3645 <1> 3646 <1> .notlinux: 3647 00006799 8A5C04 <1> mov bl, byte [si + piType] 3648 0000679C 80FB01 <1> cmp bl, ptFAT12 3649 0000679F 7419 <1> je .isfat 3650 000067A1 80FB04 <1> cmp bl, ptFAT16_16BIT_CHS 3651 000067A4 7414 <1> je .isfat 3652 000067A6 80FB06 <1> cmp bl, ptFAT16_CHS 3653 000067A9 740F <1> je .isfat 3654 000067AB 80FB0B <1> cmp bl, ptFAT32_CHS 3655 000067AE 740A <1> je .isfat 3656 000067B0 80FB0C <1> cmp bl, ptFAT32 3657 000067B3 7405 <1> je .isfat 3658 000067B5 80FB0E <1> cmp bl, ptFAT16 3659 000067B8 7541 <1> jne .notfat 3660 <1> .isfat: 3661 <1> 3662 000067BA 8B1E[FA09] <1> mov bx, word [auxbuff_segorsel] ; bx => auxbuff 3663 000067BE E84A13 <1> call read_ae_512_bytes 3664 <1> 3665 000067C1 26813EFE0155AA <1> cmp word [es:510], 0AA55h 3666 000067C8 7531 <1> jne .nolabel 3667 000067CA 26833E0B0000 <1> cmp word [es:bsBPB + bpbBytesPerSector], 0 3668 000067D0 7429 <1> je .nolabel 3669 000067D2 BE2B00 <1> mov si, bsBPB + bpbNew + bpbnVolumeLabel 3670 000067D5 26833E160000 <1> cmp word [es:bsBPB + bpbSectorsPerFAT], 0 3671 000067DB 7503 <1> jne @F 3672 000067DD BE4700 <1> mov si, bsBPB + ebpbNew + bpbnVolumeLabel 3673 <1> @@: 3674 000067E0 26807CFB29 <1> cmp byte [es:si - bpbnVolumeLabel + bpbnExtBPBSignature], 29h 3675 000067E5 7514 <1> jne .nolabel 3676 000067E7 B90B00 <1> mov cx, 11 3677 <1> 3678 000067EA 06 <1> push es 3679 000067EB 1F <1> pop ds 3680 000067EC 16 <1> push ss 3681 000067ED 07 <1> pop es 3682 <1> 3683 000067EE B020 <1> mov al, 32 3684 000067F0 AA <1> stosb 3685 <1> @@: 3686 000067F1 AC <1> lodsb 3687 000067F2 84C0 <1> test al, al 3688 000067F4 7403 <1> jz @F 3689 000067F6 AA <1> stosb 3690 000067F7 E2F8 <1> loop @B 3691 <1> @@: 3692 <1> 3693 000067F9 16 <1> push ss 3694 000067FA 1F <1> pop ds 3695 <1> .notfat: 3696 <1> .nolabel: 3697 000067FB 16 <1> push ss 3698 000067FC 07 <1> pop es 3699 000067FD E8B454 <1> call putsline_crlf 3700 <1> 3701 00006800 5F <1> pop di 3702 00006801 5E <1> pop si 3703 00006802 59 <1> pop cx 3704 00006803 07 <1> pop es 3705 00006804 C3 <1> retn 3706 <1> 3707 <1> 3708 <1> ; INP: al = first character 3709 <1> ; si -> next 3710 <1> ; OUT: NC 3711 <1> ; byte [load_unit] set 3712 <1> ; byte [load_partition] set 3713 <1> ; (zero if none specified, -1 if ldp or sdp) 3714 <1> ; opt [internalflags3] & dif3_load_is_ldp 3715 <1> ; opt [internalflags3] & dif3_load_is_sdp 3716 <1> ; dword [load_partition_sector] set if ldp or sdp 3717 <1> ; ZR if no filename specified (at end of input) 3718 <1> ; NZ if presumably a filename specified, 3719 <1> ; al = first character (slash or whatever non-blank) 3720 <1> ; si -> next 3721 <1> ; CHG: bx, cx, dx, ax, si, di 3722 <1> ; STT: ds = es = ss 3723 <1> parseloadunit_default_sdp: 3724 00006805 E81C00 <1> call parseloadunit 3725 00006808 7319 <1> jnc @F 3726 <1> 3727 0000680A 8A16[208F] <1> mov dl, byte [load_data - LOADDATA2 + bsBPB + ebpbNew + bpbnBootUnit] 3729 0000680E 8816[208F] <1> mov byte [load_unit], dl 3730 00006812 C606[1292]FF <1> mov byte [load_partition], -1 3731 00006817 800E[A400]02 <1> or byte [internalflags3], dif3_load_is_sdp 3732 <1> 3733 0000681C E8B353 <1> call skipwh0 3734 0000681F E85A53 <1> call iseol? 3735 00006822 F8 <1> clc 3736 <1> @@: 3737 00006823 C3 <1> retn 3738 <1> 3739 <1> 3740 <1> ; INP: al = first character 3741 <1> ; si -> next 3742 <1> ; OUT: CY if no load unit 3743 <1> ; (not "HD[A-Z]", "FD[A-Z]", "LD[P]", "SD[P]", "U[0-9A-F]") 3744 <1> ; note: this is barely used! 3745 <1> ; NC else, 3746 <1> ; byte [load_unit] set 3747 <1> ; byte [load_partition] set 3748 <1> ; (zero if none specified, -1 if ldp or sdp) 3749 <1> ; opt [internalflags3] & dif3_load_is_ldp 3750 <1> ; opt [internalflags3] & dif3_load_is_sdp 3751 <1> ; dword [load_partition_sector] set if ldp or sdp 3752 <1> ; ZR if no filename specified (at end of input) 3753 <1> ; NZ if presumably a filename specified, 3754 <1> ; al = first character (slash or whatever non-blank) 3755 <1> ; si -> next 3756 <1> ; CHG: bx, cx, dx, ax, si, di 3757 <1> ; STT: ds = es = ss 3758 <1> parseloadunit: 3759 00006824 31DB <1> xor bx, bx 3760 <1> lframe near 3761 <1> lvar word, unit_low_partition_high 3762 <1> lequ ?unit_low_partition_high, unit 3763 <1> lequ ?unit_low_partition_high + 1, partition 3764 00006826 5589E550 <1> lenter 3765 <1> lvar word, dif3_set 3766 0000682A 53 <1> push bx 3767 <1> lvar dword, load_partition_sector 3768 0000682B FF36[0A92] <1> push word [load_partition_sector + 2] 3769 0000682F FF36[0892] <1> push word [load_partition_sector] 3770 <1> 3771 00006833 89F7 <1> mov di, si 3772 00006835 8026[A400]F8 <1> clropt [internalflags3], dif3_load_is_dp 3773 0000683A E8DE25 <1> call uppercase 3774 0000683D 3C48 <1> cmp al, 'H' 3775 0000683F 7503E9EF00 <1> je .load_hd 3776 00006844 3C46 <1> cmp al, 'F' 3777 00006846 7503E9E500 <1> je .load_fd 3778 0000684B B401 <1> mov ah, dif3_load_is_ldp 3779 0000684D 3C4C <1> cmp al, 'L' 3780 0000684F 7419 <1> je .load_ld_sd 3781 00006851 B402 <1> mov ah, dif3_load_is_sdp 3782 00006853 3C53 <1> cmp al, 'S' 3783 00006855 7413 <1> je .load_ld_sd 3784 <1> %if _INPUT_FILE_BOOT 3785 00006857 B404 <1> mov ah, dif3_load_is_ydp 3786 00006859 3C59 <1> cmp al, 'Y' 3787 0000685B 740D <1> je .load_ld_sd 3788 <1> %endif 3789 0000685D 3C55 <1> cmp al, 'U' 3790 0000685F 747C <1> je .load_u 3791 <1> .retc: 3792 00006861 89FE <1> mov si, di 3793 00006863 4E <1> dec si 3794 00006864 AC <1> lodsb 3795 00006865 F9 <1> stc 3796 <1> .ret: 3797 00006866 89EC5D <1> lleave code 3798 00006869 C3 <1> lret 3799 <1> 3800 <1> .load_ld_sd: 3801 0000686A AC <1> lodsb 3802 0000686B E8AD25 <1> call uppercase 3803 0000686E 3C44 <1> cmp al, 'D' 3804 00006870 75EF <1> jne .retc 3805 <1> 3806 <1> d4 call d4message 3807 <1> d4 asciz "In parseloadunit.load_ld_sd",13,10 3808 <1> 3809 00006872 8A16[208F] <1> mov dl, byte [load_data - LOADDATA2 + bsBPB + ebpbNew + bpbnBootUnit] 3811 00006876 80FC02 <1> cmp ah, dif3_load_is_sdp 3812 00006879 741D <1> je @F 3813 0000687B 8A16[808E] <1> mov dl, byte [loaddata_loadedfrom - LOADDATA + bsBPB + ebpbNew + bpbnBootUnit] 3815 <1> %if _INPUT_FILE_BOOT 3816 0000687F 80FC01 <1> cmp ah, dif3_load_is_ldp 3817 00006882 7414 <1> je @F 3818 00006884 F606[A300]02 <1> testopt [internalflags2], dif2_input_file_boot 3819 00006889 74D6 <1> jz .retc 3820 <1> 3821 0000688B 93 <1> xchg ax, bx 3822 0000688C B8A000 <1> mov ax, LOAD_INPUT_FILE_SIZE 3823 0000688F F726[0092] <1> mul word [load_input_file.active] 3824 <1> 3825 <1> ; test dx, dx 3826 <1> ; jnz .error 3827 <1> 3828 00006893 93 <1> xchg ax, bx 3829 00006894 8A97[0090] <1> mov dl, byte [load_input_file + bx - LOADDATA3 + bsBPB + ebpbNew + bpbnBootUnit] 3831 <1> %endif 3832 <1> @@: 3833 00006898 AC <1> lodsb 3834 00006899 E87F25 <1> call uppercase 3835 0000689C 3C50 <1> cmp al, 'P' 3836 0000689E 7403E9AD00 <1> jne .got_unit 3837 <1> 3838 <1> d4 call d4message 3839 <1> d4 asciz "In parseloadunit.load_ld_sd with ldp",13,10 3840 <1> 3841 000068A3 8856FE <1> mov byte [bp + ?unit], dl 3842 000068A6 C646FFFF <1> mov byte [bp + ?partition], -1 3843 000068AA 0866FC <1> or byte [bp + ?dif3_set], ah 3844 <1> 3845 000068AD 80FC02 <1> cmp ah, dif3_load_is_sdp 3846 000068B0 741D <1> je @F 3847 <1> %if _INPUT_FILE_BOOT 3848 000068B2 80FC01 <1> cmp ah, dif3_load_is_ldp 3849 000068B5 740A <1> je .is_ldp 3850 000068B7 FFB7[DE8F] <1> push word [load_input_file + bx - LOADDATA3 + bsBPB + bpbHiddenSectors + 2] 3852 000068BB FFB7[DC8F] <1> push word [load_input_file + bx - LOADDATA3 + bsBPB + bpbHiddenSectors] 3854 000068BF EB08 <1> jmp .is_ldp_ydp 3855 <1> 3856 <1> %endif 3857 <1> .is_ldp: 3858 000068C1 FF36[5E8E] <1> push word [load_ldp_sector + 2] 3859 000068C5 FF36[5C8E] <1> push word [load_ldp_sector] 3860 <1> .is_ldp_ydp: 3861 000068C9 8F46F8 <1> pop word [bp + ?load_partition_sector] 3862 000068CC 8F46FA <1> pop word [bp + ?load_partition_sector + 2] 3863 <1> @@: 3864 <1> 3865 000068CF E8FF52 <1> call skipwhite 3866 000068D2 E8A752 <1> call iseol? 3867 000068D5 7403E9F700 <1> jne .fn 3868 000068DA E9F000 <1> jmp .ret_nc 3869 <1> 3870 <1> .load_u: 3871 000068DD AC <1> lodsb 3872 000068DE E83A25 <1> call uppercase 3873 <1> 3874 000068E1 3C28 <1> cmp al, '(' 3875 000068E3 7419 <1> je @F 3876 000068E5 3C30 <1> cmp al, '0' 3877 000068E7 7303E975FF <1> jb .retc 3878 000068EC 3C39 <1> cmp al, '9' 3879 000068EE 760E <1> jbe @F 3880 000068F0 3C41 <1> cmp al, 'A' 3881 000068F2 7303E96AFF <1> jb .retc 3882 000068F7 3C46 <1> cmp al, 'F' 3883 000068F9 7603E963FF <1> ja .retc 3884 <1> @@: 3885 <1> 3886 000068FE 3C28 <1> cmp al, '(' 3887 00006900 7511 <1> jne .u_not_expr 3888 00006902 AC <1> lodsb 3889 00006903 E86F4C <1> call getexpression 3890 00006906 E8C952 <1> call skipwh0 3891 00006909 3C29 <1> cmp al, ')' 3892 0000690B AC <1> lodsb 3893 0000690C 7403E9DAF8 <1> jne bootcmd.errordec 3894 00006911 EB03 <1> jmp .u_check_dot 3895 <1> 3896 <1> .u_not_expr: 3897 00006913 E8EA0F <1> call boot_get_hexadecimal_literal 3898 <1> .u_check_dot: 3899 00006916 3C2E <1> cmp al, '.' 3900 00006918 7403E9CFF8 <1> jne bootcmd.error 3901 0000691D AC <1> lodsb 3902 0000691E 85DB <1> test bx, bx 3903 00006920 7403E9C7F8 <1> jnz bootcmd.error 3904 00006925 81FA0001 <1> cmp dx, 256 3905 00006929 7203E9BEF8 <1> jae bootcmd.error 3906 0000692E EB20 <1> jmp .got_unit 3907 <1> 3908 <1> .load_fd: 3909 00006930 B200 <1> mov dl, 0 3910 <1> 3911 <1> d4 call d4message 3912 <1> d4 asciz "In parseloadunit.load_fd",13,10 3913 <1> 3914 00006932 A9 <1> db __TEST_IMM16 ; skip mov 3915 <1> .load_hd: 3916 00006933 B280 <1> mov dl, 80h 3917 <1> d4 call d4message 3918 <1> d4 asciz "In parseloadunit.load_fd or .load_hd",13,10 3919 <1> 3920 00006935 AC <1> lodsb 3921 00006936 E8E224 <1> call uppercase 3922 00006939 3C44 <1> cmp al, 'D' 3923 0000693B 7403E921FF <1> jne .retc 3924 00006940 AC <1> lodsb 3925 00006941 E8D724 <1> call uppercase 3926 00006944 2C41 <1> sub al, 'A' 3927 00006946 3C19 <1> cmp al, 'Z' - 'A' 3928 00006948 7603E914FF <1> ja .retc 3929 0000694D 08C2 <1> or dl, al ; hdX: 80h + number, fdX: 0 + number 3930 0000694F AC <1> lodsb 3931 <1> 3932 <1> .got_unit: 3933 00006950 89D1 <1> mov cx, dx 3934 00006952 884EFE <1> mov byte [bp + ?unit], cl 3935 00006955 C646FF00 <1> mov byte [bp + ?partition], 0 3936 00006959 3C2F <1> cmp al, '/' ; slash ? 3937 0000695B 7474 <1> je .fn 3938 0000695D 3C5C <1> cmp al, '\' 3939 0000695F 7470 <1> je .fn ; got a filename --> 3940 00006961 3C20 <1> cmp al, 32 ; or blank ? 3941 00006963 7404 <1> je @F 3942 00006965 3C09 <1> cmp al, 9 3943 00006967 7508 <1> jne .checkeol ; check for EOL -- but no filename 3944 <1> ; (hdd1name is invalid -- must be hdd1/name or hdd1 name) 3945 <1> @@: ; was blank 3946 00006969 E86652 <1> call skipwh0 ; skip blanks 3947 0000696C E80D52 <1> call iseol? ; EOL ? 3948 0000696F 7560 <1> jne .fn ; no, is filename --> 3949 <1> ; will jump after this 3950 <1> .checkeol: 3951 00006971 E80852 <1> call iseol? ; EOL ? 3952 00006974 7457 <1> je .ret_nc ; yes, no filename --> 3953 <1> 3954 00006976 3C28 <1> cmp al, '(' 3955 00006978 740E <1> je @F 3956 0000697A 3C30 <1> cmp al, '0' 3957 0000697C 7303E9E0FE <1> jb .retc 3958 00006981 3C39 <1> cmp al, '9' 3959 00006983 7603E9D9FE <1> ja .retc 3960 <1> @@: 3961 <1> 3962 <1> d4 call d4message 3963 <1> d4 asciz "In parseloadunit (after no EOL found)",13,10 3964 00006988 51 <1> push cx 3965 00006989 80FA80 <1> cmp dl, 80h 3966 0000698C 7303E95BF8 <1> jb bootcmd.error ; diskettes aren't partitioned 3967 00006991 3C28 <1> cmp al, '(' 3968 00006993 750F <1> jne .not_expr 3969 00006995 AC <1> lodsb ; skip opening paren 3970 <1> 3971 <1> d4 call d4message 3972 <1> d4 asciz "In parseloadunit (before call to getexpression)",13,10 3973 <1> 3974 00006996 E8DC4B <1> call getexpression 3975 <1> 3976 <1> d4 call d4message 3977 <1> d4 asciz "In parseloadunit (after call to getexpression)",13,10 3978 00006999 E83652 <1> call skipwh0 3979 0000699C 3C29 <1> cmp al, ')' 3980 0000699E AC <1> lodsb 3981 0000699F 7406 <1> je .got_expr 3982 000069A1 E947F8 <1> jmp bootcmd.errordec 3983 <1> 3984 <1> .not_expr: 3985 <1> d4 call d4message 3986 <1> d4 asciz "In parseloadunit (before call to boot_get_decimal_literal)",13,10 3987 000069A4 E8510F <1> call boot_get_decimal_literal 3988 <1> .got_expr: ; bx:dx = load partition number 3989 <1> d4 call d4message 3990 <1> d4 asciz "In parseloadunit.got_expr",13,10 3991 000069A7 59 <1> pop cx ; cl = load unit 3992 000069A8 85DB <1> test bx, bx 3993 000069AA 7403E93DF8 <1> jnz bootcmd.error 3994 000069AF 81FAFF00 <1> cmp dx, 255 3995 000069B3 7603E934F8 <1> ja bootcmd.error 3996 000069B8 85D2 <1> test dx, dx 3997 000069BA 7503E92DF8 <1> jz bootcmd.error 3998 000069BF E81052 <1> call skipwh0 3999 000069C2 8856FF <1> mov byte [bp + ?partition], dl 4000 000069C5 884EFE <1> mov byte [bp + ?unit], cl 4001 000069C8 E8B151 <1> call iseol? 4002 000069CB 7504 <1> jne .fn 4003 <1> .ret_nc: 4004 000069CD 31DB <1> xor bx, bx ; NC, ZR 4005 000069CF EB06 <1> jmp @F 4006 <1> 4007 <1> .fn: 4008 000069D1 E8FE51 <1> call skipwh0 4009 000069D4 83CB01 <1> or bx, 1 ; NC, NZ 4010 <1> @@: 4011 000069D7 8F06[0892] <1> pop word [load_partition_sector] 4012 000069DB 8F06[0A92] <1> pop word [load_partition_sector + 2] 4013 <1> ; pop from ?load_partition_sector 4014 000069DF 9C <1> pushf 4015 000069E0 8B5EFE <1> mov bx, word [bp + ?unit_low_partition_high] 4016 000069E3 881E[208F] <1> mov byte [load_unit], bl 4017 000069E7 883E[1292] <1> mov byte [load_partition], bh 4018 000069EB 8A5EFC <1> mov bl, byte [bp + ?dif3_set] 4019 000069EE 081E[A400] <1> or byte [internalflags3], bl 4020 000069F2 9D <1> popf ; ZF, CF 4021 000069F3 E970FE <1> jmp .ret 4022 <1> 4023 <1> lleave ctx 4024 <1> 4025 <1> 4026 000069F6 00 <1> align 4, db 0 4027 <1> 4028 <1> boot_read: 4029 000069F8 C706[4092][1D7B] <1> mov word [load_readwrite_function], read_sector 4030 000069FE EB06 <1> jmp boot_readwrite 4031 <1> 4032 <1> boot_write: 4033 00006A00 C706[4092][1C7B] <1> mov word [load_readwrite_function], write_sector 4034 <1> 4035 <1> boot_readwrite: 4036 <1> 4037 <1> d4 call d4message 4038 <1> d4 asciz "In boot_readwrite",13,10 4039 <1> 4040 00006A06 E8B251 <1> call skipequals 4041 00006A09 E8F9FD <1> call parseloadunit_default_sdp 4042 00006A0C 7503E9C800 <1> jz .error 4043 <1> 4044 <1> %if 0 4045 <1> call skipwh0 4046 <1> mov bx, word [reg_ds] ; default segment 4047 <1> call getaddr ; get buffer address into bx:(e)dx 4048 <1> 4049 <1> _386 test edx, 0FFFF_0000h 4050 <1> _386 jnz .error 4051 <1> 4052 <1> ; (variable must be a dword!) 4053 <1> mov word [load_readwrite_buffer], dx 4054 <1> mov word [load_readwrite_buffer + 2], bx 4055 <1> %else 4056 00006A11 E84750 <1> call getword 4057 <1> ; (variable is a word) 4058 00006A14 8916[3C92] <1> mov word [load_readwrite_buffer], dx 4059 <1> %endif 4060 <1> 4061 00006A18 E8B751 <1> call skipwh0 4062 00006A1B E85E51 <1> call iseol? 4063 00006A1E 750F <1> jne @F 4064 <1> 4065 <1> d4 call d4message 4066 <1> d4 asciz "In boot_readwrite no sector given no count given",13,10 4067 <1> 4068 00006A20 8326[3892]00 <1> and word [load_readwrite_sector], 0 4069 00006A25 8326[3A92]00 <1> and word [load_readwrite_sector + 2], 0 4070 00006A2A BA0100 <1> mov dx, 1 4071 00006A2D EB36 <1> jmp @FF 4072 <1> 4073 <1> @@: 4074 00006A2F BA[2D64] <1> mov dx, msg.hidden 4075 00006A32 4E <1> dec si 4076 00006A33 E8E750 <1> call isstring? 4077 00006A36 7510 <1> jne .nothidden 4078 <1> 4079 00006A38 E88051 <1> call skipequals 4080 00006A3B E8374B <1> call getdword 4081 <1> 4082 00006A3E 89561C <1> mov word [bp + bsBPB + bpbHiddenSectors + 0], dx 4083 00006A41 895E1E <1> mov word [bp + bsBPB + bpbHiddenSectors + 2], bx 4084 00006A44 E88B51 <1> call skipwh0 4085 <1> 4086 00006A47 A8 <1> db __TEST_IMM8 4087 <1> .nothidden: 4088 00006A48 AC <1> lodsb 4089 00006A49 E8294B <1> call getexpression ; bx:dx = value 4090 <1> 4091 00006A4C 8916[3892] <1> mov word [load_readwrite_sector], dx 4092 00006A50 891E[3A92] <1> mov word [load_readwrite_sector + 2], bx 4093 <1> 4094 00006A54 E87B51 <1> call skipwh0 4095 00006A57 BA0100 <1> mov dx, 1 4096 00006A5A E81F51 <1> call iseol? 4097 00006A5D 7406 <1> je @F 4098 00006A5F E8F94F <1> call getword 4099 00006A62 E82C51 <1> call chkeol 4100 <1> @@: 4101 00006A65 8916[3E92] <1> mov word [load_readwrite_count], dx 4102 <1> 4103 00006A69 E8E90E <1> call query_geometry 4104 <1> 4105 00006A6C F606[A400]07 <1> testopt [internalflags3], dif3_load_is_dp 4106 00006A71 753C <1> jnz .ldp 4107 <1> 4108 00006A73 803E[1292]00 <1> cmp byte [load_partition], 0 4109 00006A78 7447 <1> je .whole_unit 4110 <1> 4111 00006A7A C606[1492]00 <1> mov byte [load_found_partition], 0 4112 00006A7F B9[916A] <1> mov cx, .single_partition 4113 00006A82 E8280D <1> call scan_partitions 4114 <1> ; cmp byte [load_found_partition], 0 4115 <1> ; jne @F 4116 00006A85 BA[1D62] <1> mov dx, msg.boot_partition_not_found 4117 00006A88 B81502 <1> mov ax, 0215h 4118 00006A8B E8033D <1> call setrc 4119 00006A8E E975FB <1> jmp bootcmd.fail 4120 <1> ;@@: 4121 <1> ; retn 4122 <1> 4123 <1> 4124 <1> .single_partition: 4125 <1> ; INP: es:si -> partition table entry, 4126 <1> ; si = load_partition_table .. load_partition_table+48, 4127 <1> ; es = ss 4128 <1> ; bp + di -> above part table metadata, 4129 <1> ; dwo [bp + di - 4] = root (outermost extended position) 4130 <1> ; dwo [bp + di - 8] = base (current table position) 4131 <1> ;; CHG: ax, bx, (cx), dx 4132 <1> ; CHG: all 4133 <1> 4134 <1> d4 call d4message 4135 <1> d4 asciz "In boot_readwrite.single_partition",13,10 4136 <1> 4137 00006A91 A0[1392] <1> mov al, byte [load_current_partition] 4138 00006A94 3A06[1292] <1> cmp al, byte [load_partition] 4139 00006A98 7401 <1> je .gotit 4140 00006A9A C3 <1> retn 4141 <1> 4142 <1> .gotit: 4143 <1> d4 call d4message 4144 <1> d4 asciz "In boot_readwrite.gotit",13,10 4145 <1> 4146 <1> ; inc byte [load_found_partition] 4147 <1> 4148 00006A9B 8B43F8 <1> mov ax, [bp + di - 8] 4149 00006A9E 8B53FA <1> mov dx, [bp + di - 6] ; base (current table position) 4150 <1> 4151 00006AA1 26034408 <1> add ax, [es:si + 8] 4152 00006AA5 2613540A <1> adc dx, [es:si + 8 + 2] ; add offset to logical partition 4153 <1> 4154 00006AA9 89EC <1> mov sp, bp 4155 00006AAB 5D <1> pop bp ; restore bp (scan_partitions) 4156 00006AAC 5B <1> pop bx ; discard ret address (scan_partitions) 4157 00006AAD EB07 <1> jmp .gotbase_dxax 4158 <1> 4159 <1> 4160 <1> .ldp: 4161 00006AAF A1[0892] <1> mov ax, word [load_partition_sector] 4162 00006AB2 8B16[0A92] <1> mov dx, word [load_partition_sector + 2] 4163 <1> 4164 <1> .gotbase_dxax: 4165 00006AB6 89461C <1> mov word [bp + bsBPB + bpbHiddenSectors + 0], ax 4166 00006AB9 89561E <1> mov word [bp + bsBPB + bpbHiddenSectors + 2], dx 4167 00006ABC 800E[A400]80 <1> setopt [internalflags3], dif3_partition_changed 4168 <1> 4169 <1> .whole_unit: 4170 00006AC1 A1[3892] <1> mov ax, word [load_readwrite_sector] 4171 00006AC4 8B16[3A92] <1> mov dx, word [load_readwrite_sector + 2] 4172 00006AC8 8B0E[3E92] <1> mov cx, word [load_readwrite_count] 4173 00006ACC 8B1E[3C92] <1> mov bx, word [load_readwrite_buffer] 4174 <1> 4175 00006AD0 E306 <1> jcxz @FF 4176 <1> @@: 4177 00006AD2 FF16[4092] <1> call near word [load_readwrite_function] 4178 00006AD6 E2FA <1> loop @B 4179 <1> @@: 4180 00006AD8 C3 <1> retn 4181 <1> 4182 <1> .error: 4183 00006AD9 E96E3C <1> jmp error 4184 <1> 4185 <1> 4186 <1> ; INP: ds:si-> first letter of name 4187 <1> ; es:load_kernel_name-> 12-byte buffer (for fn + 0) 4188 <1> ; CHG: ax, cx, di 4189 <1> ; OUT: al = first character after name (EOL, blank, or slash) 4190 <1> ; si -> next character 4191 <1> boot_parse_fn: 4192 00006ADC B020 <1> mov al, 32 4193 00006ADE BF[1892] <1> mov di, load_kernel_name 4194 00006AE1 B90B00 <1> mov cx, 11 4195 00006AE4 F3AA <1> rep stosb ; initialise to empty 4196 <1> 4197 00006AE6 BF[1892] <1> mov di, load_kernel_name 4198 00006AE9 B90900 <1> mov cx, 9 4199 <1> .loop_name: 4200 00006AEC AC <1> lodsb 4201 00006AED E82B23 <1> call uppercase 4202 00006AF0 E88950 <1> call iseol? 4203 00006AF3 7455 <1> je .loop_name_done 4204 00006AF5 3C20 <1> cmp al, 32 4205 00006AF7 7451 <1> je .loop_name_done 4206 00006AF9 3C09 <1> cmp al, 9 4207 00006AFB 744D <1> je .loop_name_done 4208 00006AFD 3C2F <1> cmp al, '/' 4209 00006AFF 7449 <1> je .loop_name_done 4210 00006B01 3C5C <1> cmp al, '\' 4211 00006B03 7445 <1> je .loop_name_done 4212 00006B05 3C2E <1> cmp al, '.' 4213 00006B07 740F <1> je .loop_name_ext 4214 00006B09 AA <1> stosb 4215 00006B0A E2E0 <1> loop .loop_name 4216 <1> .invalid: 4217 00006B0C BA[6863] <1> mov dx, msg.boot_invalid_filename 4218 00006B0F B81602 <1> mov ax, 0216h 4219 00006B12 E87C3C <1> call setrc 4220 00006B15 E9EEFA <1> jmp bootcmd.fail 4221 <1> 4222 <1> .loop_name_ext: 4223 00006B18 83F909 <1> cmp cx, 9 4224 00006B1B 74EF <1> je .invalid 4225 00006B1D B90400 <1> mov cx, 4 4226 00006B20 BF[2092] <1> mov di, load_kernel_name + 8 4227 <1> .loop_ext: 4228 00006B23 AC <1> lodsb 4229 00006B24 E8F422 <1> call uppercase 4230 00006B27 E85250 <1> call iseol? 4231 00006B2A 7419 <1> je .loop_ext_done 4232 00006B2C 3C20 <1> cmp al, 32 4233 00006B2E 7415 <1> je .loop_ext_done 4234 00006B30 3C09 <1> cmp al, 9 4235 00006B32 7411 <1> je .loop_ext_done 4236 00006B34 3C2F <1> cmp al, '/' 4237 00006B36 740D <1> je .loop_ext_done 4238 00006B38 3C5C <1> cmp al, '\' 4239 00006B3A 7409 <1> je .loop_ext_done 4240 00006B3C 3C2E <1> cmp al, '.' 4241 00006B3E 74CC <1> je .invalid 4242 00006B40 AA <1> stosb 4243 00006B41 E2E0 <1> loop .loop_ext 4244 00006B43 EBC7 <1> jmp .invalid 4245 <1> 4246 <1> .loop_ext_done: 4247 00006B45 83F904 <1> cmp cx, 4 4248 00006B48 74C2 <1> je .invalid 4249 <1> .loop_name_done: 4250 00006B4A 83F909 <1> cmp cx, 9 4251 00006B4D 74BD <1> je .invalid 4252 00006B4F C606[2392]00 <1> mov byte [load_kernel_name + 11], 0 4253 00006B54 803E[1892]E5 <1> cmp byte [load_kernel_name], 0E5h 4254 00006B59 7505 <1> jne @F 4255 00006B5B C606[1892]05 <1> mov byte [load_kernel_name], 05h 4256 <1> @@: 4257 00006B60 C3 <1> retn 4258 <1> 4259 <1> 4260 <1> ; INP: es:si -> partition table entry, 4261 <1> ; si = load_partition_table .. load_partition_table+48, 4262 <1> ; es = ss 4263 <1> ; bp + di -> above part table metadata, 4264 <1> ; dwo [bp + di - 4] = root (outermost extended position) 4265 <1> ; dwo [bp + di - 8] = base (current table position) 4266 <1> ; CHG: ax, bx, (cx), dx 4267 <1> load_from_partition: 4268 <1> d4 call d4message 4269 <1> d4 asciz "In load_from_partition",13,10 4270 <1> 4271 00006B61 A0[1392] <1> mov al, byte [load_current_partition] 4272 00006B64 3A06[1292] <1> cmp al, byte [load_partition] 4273 00006B68 7401 <1> je .gotit 4274 00006B6A C3 <1> retn 4275 <1> 4276 <1> .gotit: 4277 <1> d4 call d4message 4278 <1> d4 asciz "In load_from_partition.gotit",13,10 4279 <1> 4280 00006B6B 8B43F8 <1> mov ax, [bp + di - 8] 4281 00006B6E 8B53FA <1> mov dx, [bp + di - 6] ; base (current table position) 4282 <1> 4283 00006B71 52 <1> push dx 4284 00006B72 50 <1> push ax 4285 00006B73 06 <1> push es 4286 00006B74 BB6000 <1> mov bx, 60h 4287 00006B77 E8910F <1> call read_ae_512_bytes ; load partition table to 0:600h 4288 00006B7A 07 <1> pop es 4289 00006B7B 58 <1> pop ax 4290 00006B7C 5A <1> pop dx 4291 <1> 4292 00006B7D 26034408 <1> add ax, [es:si + 8] 4293 00006B81 2613540A <1> adc dx, [es:si + 8 + 2] ; add offset to logical partition 4294 <1> 4295 00006B85 26894408 <1> mov word [es:si + 8], ax 4296 00006B89 2689540A <1> mov word [es:si + 8 + 2], dx ; store in partition table entry 4297 <1> 4298 00006B8D 31C9 <1> xor cx, cx 4299 00006B8F 8EC1 <1> mov es, cx ; es = 0 4300 00006B91 8DB4DE78 <1> lea si, [si - (load_partition_table + DATASECTIONFIXUP) + 600h + (510 - 64)] 4301 <1> ; si = 600h + 510-64 .. 600h + 510-16 4302 00006B95 26894408 <1> mov word [es:si + 8], ax 4303 00006B99 2689540A <1> mov word [es:si + 8 + 2], dx ; store in partition table entry 4304 <1> 4305 <1> ; dx:ax = absolute sector number 4306 00006B9D BBC007 <1> mov bx, 7C0h ; bx:0 = 7C0h:0 -> boot sector area 4307 00006BA0 E8680F <1> call read_ae_512_bytes ; load partition boot sector to 0:7C00h 4308 <1> 4309 00006BA3 89EC <1> mov sp, bp 4310 00006BA5 5D <1> pop bp ; restore bp (scan_partitions) 4311 00006BA6 58 <1> pop ax ; discard ret address (scan_partitions) 4312 <1> 4313 00006BA7 26813EFE0155AA <1> cmp word [es:510], 0AA55h 4314 00006BAE 7403E94612 <1> jne boot_sigmismatch 4315 <1> 4316 00006BB3 31C9 <1> xor cx, cx 4317 00006BB5 26390E0000 <1> cmp word [es:0], cx 4318 00006BBA 7503E94612 <1> je boot_codemismatch 4319 <1> 4320 00006BBF 8EC1 <1> mov es, cx ; cx = 0, es = 0 4321 00006BC1 89F7 <1> mov di, si ; di -> partition table entry (seg 0) 4322 00006BC3 26800D80 <1> or byte [es:di + 0], 80h ; set bootable flag 4323 00006BC7 A0[208F] <1> mov al, byte [load_unit] ; al = unit 4324 00006BCA BB007C <1> mov bx, 7C00h ; bx = 7C00h 4325 00006BCD E9E0F9 <1> jmp load_partition_common 4326 <1> 4327 <1> 4328 <1> ; INP: es:si -> partition table entry, 4329 <1> ; si = load_partition_table .. load_partition_table+48, 4330 <1> ; es = ss 4331 <1> ; bp + di -> above part table metadata, 4332 <1> ; dwo [bp + di - 4] = root (outermost extended position) 4333 <1> ; dwo [bp + di - 8] = base (current table position) 4334 <1> ; CHG: ax, bx, (cx), dx 4335 <1> load_freedos_from_partition: 4336 <1> d4 call d4message 4337 <1> d4 asciz "In load_freedos_from_partition",13,10 4338 <1> 4339 00006BD0 A0[1392] <1> mov al, byte [load_current_partition] 4340 00006BD3 3A06[1292] <1> cmp al, byte [load_partition] 4341 00006BD7 7401 <1> je .gotit 4342 00006BD9 C3 <1> retn 4343 <1> 4344 <1> .gotit: 4345 <1> d4 call d4message 4346 <1> d4 asciz "In load_freedos_from_partition.gotit",13,10 4347 <1> 4348 00006BDA 8B43F8 <1> mov ax, [bp + di - 8] 4349 00006BDD 8B53FA <1> mov dx, [bp + di - 6] ; base (current table position) 4350 <1> 4351 00006BE0 26034408 <1> add ax, [es:si + 8] 4352 00006BE4 2613540A <1> adc dx, [es:si + 8 + 2] ; add offset to logical partition 4353 <1> 4354 00006BE8 26894408 <1> mov word [es:si + 8], ax 4355 00006BEC 2689540A <1> mov word [es:si + 8 + 2], dx ; store in partition table entry 4356 00006BF0 26800C80 <1> or byte [es:si + 0], 80h ; set bootable flag 4357 <1> 4358 <1> 4359 00006BF4 F606[498F]40 <1> testopt [load_options], LOAD_SET_DSSI_PARTINFO 4360 00006BF9 7427 <1> jz @F 4361 <1> 4362 00006BFB 52 <1> push dx 4363 00006BFC 50 <1> push ax 4364 <1> 4365 00006BFD 8B43F8 <1> mov ax, [bp + di - 8] 4366 00006C00 8B53FA <1> mov dx, [bp + di - 6] ; base (current table position) 4367 <1> 4368 00006C03 52 <1> push dx 4369 00006C04 50 <1> push ax 4370 00006C05 06 <1> push es 4371 00006C06 BB6000 <1> mov bx, 60h 4372 00006C09 E8FF0E <1> call read_ae_512_bytes ; load partition table to 0:600h 4373 00006C0C 07 <1> pop es 4374 00006C0D 58 <1> pop ax 4375 00006C0E 5A <1> pop dx 4376 <1> 4377 00006C0F 31C9 <1> xor cx, cx 4378 00006C11 8EC1 <1> mov es, cx ; es = 0 4379 00006C13 8DBCDE78 <1> lea di, [si - (load_partition_table + DATASECTIONFIXUP) + 600h + (510 - 64)] 4380 <1> ; si = 600h + 510-64 .. 600h + 510-16 4381 00006C17 B108 <1> mov cl, 16 / 2 4382 00006C19 57 <1> push di 4383 00006C1A F3A5 <1> rep movsw 4384 <1> 4385 00006C1C 8F06[1092] <1> pop word [load_partition_entry] 4386 <1> 4387 00006C20 58 <1> pop ax 4388 00006C21 5A <1> pop dx 4389 <1> @@: 4390 <1> 4391 <1> 4392 00006C22 89EC <1> mov sp, bp 4393 00006C24 5D <1> pop bp ; restore bp (scan_partitions) 4394 00006C25 5B <1> pop bx ; discard ret address (scan_partitions) 4395 <1> 4396 <1> ; dx:ax = absolute sector number 4397 00006C26 8B1E[FA09] <1> mov bx, word [auxbuff_segorsel] ; bx => auxbuff 4398 00006C2A 50 <1> push ax 4399 00006C2B 52 <1> push dx 4400 00006C2C E8DC0E <1> call read_ae_512_bytes ; load partition boot sector 4401 <1> 4402 00006C2F 26813EFE0155AA <1> cmp word [es:510], 0AA55h 4403 00006C36 7403E9BE11 <1> jne boot_sigmismatch 4404 <1> 4405 00006C3B 31C9 <1> xor cx, cx 4406 <1> ; cmp word [es:0], cx 4407 <1> ; je boot_codemismatch 4408 <1> 4409 00006C3D 5A <1> pop dx 4410 00006C3E 58 <1> pop ax 4411 <1> 4412 <1> ; dx:ax = boot sector 4413 <1> ; byte [load_unit] = unit 4414 <1> ; es:0-> read sector 4415 <1> load_freedos_common: 4416 00006C3F 26A31C00 <1> mov word [es:bsBPB + bpbHiddenSectors], ax 4417 00006C43 2689161E00 <1> mov word [es:bsBPB + bpbHiddenSectors + 2], dx 4418 <1> 4419 00006C48 8B5E0B <1> mov bx, [bp + bsBPB + bpbBytesPerSector] 4420 00006C4B 263B1E0B00 <1> cmp bx, [es:bsBPB + bpbBytesPerSector] 4421 00006C50 7403E9B811 <1> jne boot_secsizemismatch 4422 <1> 4423 <1> ; preserve some variables from our pseudo BPB 4424 00006C55 31C0 <1> xor ax, ax 4425 00006C57 FF7618 <1> push word [bp + bsBPB + bpbCHSSectors] 4426 00006C5A 268F061800 <1> pop word [es:bsBPB + bpbCHSSectors] 4427 00006C5F FF761A <1> push word [bp + bsBPB + bpbCHSHeads] 4428 00006C62 268F061A00 <1> pop word [es:bsBPB + bpbCHSHeads] ; preserve geometry 4429 <1> 4430 00006C67 8B5EEA <1> mov bx, word [bp + ldParaPerSector] 4431 00006C6A D1EB <1> shr bx, 1 4432 00006C6C 895ED4 <1> mov word [bp + ldEntriesPerSector], bx 4433 <1> 4434 00006C6F 2639061600 <1> cmp word [es:bsBPB + bpbSectorsPerFAT], ax 4435 00006C74 8A5E40 <1> mov bl, byte [bp + bsBPB + ebpbNew + bpbnBootUnit] 4436 00006C77 7407 <1> je .is_fat32 4437 00006C79 26881E2400 <1> mov byte [es:bsBPB + bpbNew + bpbnBootUnit], bl 4438 00006C7E EB05 <1> jmp short .was_fat1612 4439 <1> .is_fat32: 4440 00006C80 26881E4000 <1> mov byte [es:bsBPB + ebpbNew + bpbnBootUnit], bl 4441 <1> .was_fat1612: 4442 <1> 4443 00006C85 06 <1> push es 4444 00006C86 1E <1> push ds 4445 00006C87 06 <1> push es 4446 00006C88 1F <1> pop ds 4447 00006C89 31F6 <1> xor si, si ; -> BPB from boot partition 4448 00006C8B 16 <1> push ss 4449 00006C8C 07 <1> pop es 4450 00006C8D BF[E08E] <1> mov di, load_data - LOADDATA2 ; -> our copy of a BPB 4451 00006C90 B95A00 <1> mov cx, (bsBPB + ebpbNew + BPBN_size) 4452 00006C93 F3A4 <1> rep movsb ; get the BPB 4453 <1> 4454 00006C95 1F <1> pop ds 4455 00006C96 800E[A400]80 <1> setopt [internalflags3], dif3_partition_changed 4456 <1> 4457 00006C9B 394616 <1> cmp word [bp + bsBPB + bpbSectorsPerFAT], ax 4458 00006C9E 740B <1> je @F ; is FAT32 --> 4459 00006CA0 BE[048F] <1> mov si, load_data - LOADDATA2 + bsBPB + bpbNew 4460 00006CA3 BF[208F] <1> mov di, load_data - LOADDATA2 + bsBPB + ebpbNew 4461 00006CA6 B91A00 <1> mov cx, BPBN_size 4462 00006CA9 F3A4 <1> rep movsb ; clone the FAT16 / FAT12 BPBN 4463 <1> ; to where the FAT32 BPBN lives 4464 <1> @@: 4465 00006CAB 07 <1> pop es 4466 <1> 4467 00006CAC E8AA69 <1> call bootgetmemorysize 4468 00006CAF 8956E0 <1> mov word [bp + ldMemoryTop], dx 4469 00006CB2 81EA0005 <1> sub dx, (20 * 1024) >> 4 4470 <1> ; leave 20 KiB free at the top, to 4471 <1> ; allow loading with the lDOS protocol (needs BPB and FAT seg 4472 <1> ; to live below its destination buffers for these) 4473 00006CB6 7303 <1> jnc @F 4474 <1> .outofmem: 4475 00006CB8 E9FE0D <1> jmp query_geometry.out_of_memory_error 4476 <1> @@: 4477 <1> 4478 00006CBB 81EA0002 <1> sub dx, 8192 >> 4 4479 00006CBF 72F7 <1> jc .outofmem 4480 00006CC1 8956F8 <1> mov word [bp + lsvFATSeg], dx 4481 00006CC4 B8FFFF <1> mov ax, -1 4482 00006CC7 8946F4 <1> mov word [bp + lsvFATSector], ax 4483 00006CCA 8946F6 <1> mov word [bp + lsvFATSector + 2], ax 4484 <1> 4485 00006CCD FF36[4A8F] <1> push word [load_loadseg] 4486 00006CD1 8F46FA <1> pop word [bp + lsvLoadSeg] 4487 <1> 4488 00006CD4 31DB <1> xor bx, bx 4489 00006CD6 B90808 <1> mov cx, ((- LOADSTACKVARS + 15 + 4096) & ~15) >> 1 4490 00006CD9 F606[498F]20 <1> testopt [load_options], LOAD_NO_BPB 4491 00006CDE 7506 <1> jnz @F 4492 00006CE0 BB0002 <1> mov bx, 512 4493 00006CE3 B90809 <1> mov cx, ((512 - LOADSTACKVARS + 15 + 4096) & ~15) >> 1 4494 <1> @@: 4495 <1> 4496 00006CE6 833E[528F]FF <1> cmp word [load_bpb + 2], -1 4497 00006CEB 7469 <1> je .auto_bpb 4498 <1> 4499 00006CED A1[508F] <1> mov ax, [load_bpb] 4500 00006CF0 D1E8 <1> shr ax, 1 4501 00006CF2 D1E8 <1> shr ax, 1 4502 00006CF4 D1E8 <1> shr ax, 1 4503 00006CF6 D1E8 <1> shr ax, 1 ; round down: start of BPB 4504 00006CF8 0306[528F] <1> add ax, [load_bpb + 2] ; start of BPB 4505 00006CFC 2D0101 <1> sub ax, (4096 - LOADSTACKVARS + 15) >> 4 4506 <1> ; start of stack area 4507 00006CFF 50 <1> push ax 4508 00006D00 7235 <1> jc .bpb_too_low 4509 <1> 4510 00006D02 3B46FA <1> cmp ax, word [bp + lsvLoadSeg] 4511 00006D05 773B <1> ja .loads_below_bpb 4512 <1> 4513 00006D07 83F860 <1> cmp ax, 60h 4514 00006D0A 722B <1> jb .bpb_too_low 4515 <1> 4516 00006D0C A1[508F] <1> mov ax, [load_bpb] 4517 00006D0F 01D8 <1> add ax, bx 4518 00006D11 83C00F <1> add ax, 15 4519 00006D14 D1E8 <1> shr ax, 1 4520 00006D16 D1E8 <1> shr ax, 1 4521 00006D18 D1E8 <1> shr ax, 1 4522 00006D1A D1E8 <1> shr ax, 1 4523 00006D1C 0306[528F] <1> add ax, [load_bpb + 2] ; end of BPB / pseudo-boot-sector 4524 <1> 4525 00006D20 3B46FA <1> cmp ax, word [bp + lsvLoadSeg] 4526 00006D23 761F <1> jbe .loads_above_bpb 4527 <1> 4528 00006D25 BA[AC63] <1> mov dx, msg.boot_bpb_load_overlap 4529 00006D28 B81702 <1> mov ax, 0217h 4530 00006D2B E8633A <1> call setrc 4531 <1> .fail: 4532 00006D2E B81802 <1> mov ax, 0218h 4533 00006D31 E85D3A <1> call setrc 4534 00006D34 E9CFF8 <1> jmp bootcmd.fail 4535 <1> 4536 <1> .bpb_too_low: 4537 00006D37 BA[DC63] <1> mov dx, msg.boot_bpb_too_low 4538 00006D3A B81902 <1> mov ax, 0219h 4539 00006D3D E8513A <1> call setrc 4540 00006D40 EBEC <1> jmp .fail 4541 <1> 4542 <1> 4543 <1> 4544 <1> .loads_below_bpb: 4545 00006D42 89C2 <1> mov dx, ax ; set load top to before BPB/lsv/stack 4546 <1> 4547 <1> .loads_above_bpb: ; dx = word [bp + ldLoadTop] = word [bp + lsvFATSeg] 4548 00006D44 FF36[528F] <1> push word [load_bpb + 2] 4549 00006D48 8F06[0692] <1> pop word [load_bpb_dest + 2] 4550 00006D4C FF36[508F] <1> push word [load_bpb] 4551 00006D50 8F06[0492] <1> pop word [load_bpb_dest] 4552 00006D54 EB37 <1> jmp .got_bpb_set_load_top 4553 <1> 4554 <1> 4555 <1> ; auto-BPB: allocate BPB at top and load below that 4556 <1> .auto_bpb: 4557 00006D56 81EA0101 <1> sub dx, (-LOADSTACKVARS + 15 + 4096) >> 4 4558 00006D5A 7303E959FF <1> jc .outofmem 4559 00006D5F 85DB <1> test bx, bx 4560 00006D61 7408 <1> jz @F 4561 00006D63 83EA20 <1> sub dx, 512 >> 4 4562 00006D66 7303E94DFF <1> jc .outofmem 4563 <1> @@: 4564 <1> 4565 00006D6B 52 <1> push dx 4566 00006D6C 89D0 <1> mov ax, dx 4567 <1> ; eg dx = 800h 4568 <1> ; want (((800h<<4) + 4096 - LOADSTACKVARS) - 7C00h) >> 4 4569 <1> ; which is 143h 4570 <1> ; which :7C00h = 903h:0 4571 <1> ; dx + ( 4096 - LOADSTACKVARS - 7C00h) / 16 4572 <1> ; dx - (-4096 + LOADSTACKVARS + 7C00h) / 16 4573 00006D6E BBF0EF <1> mov bx, (-4096 +LOADSTACKVARS) 4574 00006D71 031E[508F] <1> add bx, word [load_bpb] 4575 00006D75 51 <1> push cx 4576 00006D76 B104 <1> mov cl, 4 4577 00006D78 D3EB <1> shr bx, cl 4578 00006D7A 59 <1> pop cx 4579 00006D7B 29D8 <1> sub ax, bx 4580 <1> ; sub ax, (-4096 +LOADSTACKVARS + 7C00h) / 16 4581 00006D7D 7303E936FF <1> jc .outofmem 4582 <1> ; mov word [load_bpb_dest], 7C00h 4583 00006D82 FF36[508F] <1> push word [load_bpb] 4584 00006D86 8F06[0492] <1> pop word [load_bpb_dest] 4585 00006D8A A3[0692] <1> mov word [load_bpb_dest + 2], ax 4586 <1> .got_bpb_set_load_top: 4587 00006D8D 8956E2 <1> mov word [bp + ldLoadTop], dx 4588 <1> 4589 <1> .got_bpb: ; cx = how many words are used for stack/lsv/BPB 4590 00006D90 58 <1> pop ax ; -> stack area 4591 00006D91 06 <1> push es 4592 00006D92 8EC0 <1> mov es, ax 4593 00006D94 31FF <1> xor di, di 4594 00006D96 31C0 <1> xor ax, ax 4595 00006D98 F3AB <1> rep stosw 4596 00006D9A 07 <1> pop es 4597 <1> 4598 00006D9B E8C916 <1> call initialise_fs 4599 <1> 4600 00006D9E C606[1592]00 <1> mov byte [load_check_dir_attr], 0 4601 00006DA3 8B36[2492] <1> mov si, word [load_kernelname_input] 4602 00006DA7 803C2F <1> cmp byte [si], '/' 4603 00006DAA 7501 <1> jne @F 4604 00006DAC 46 <1> inc si 4605 <1> @@: 4606 00006DAD 803C00 <1> cmp byte [si], 0 4607 00006DB0 7504 <1> jne @F 4608 00006DB2 8B36[408F] <1> mov si, word [load_kernelname_default] 4609 <1> @@: 4610 00006DB6 16 <1> push ss 4611 00006DB7 07 <1> pop es 4612 00006DB8 E821FD <1> call boot_parse_fn ; get next pathname 4613 00006DBB 3C2F <1> cmp al, '/' 4614 00006DBD 7509 <1> jne @F 4615 00006DBF C606[1592]10 <1> mov byte [load_check_dir_attr], ATTR_DIRECTORY 4616 00006DC4 8936[2692] <1> mov word [load_kernelname_next], si 4617 <1> @@: 4618 <1> 4619 00006DC8 BFFFFF <1> mov di, -1 4620 00006DCB 89FE <1> mov si, di 4621 00006DCD 897EF4 <1> mov [bp + lsvFATSector], di 4622 00006DD0 8976F6 <1> mov [bp + lsvFATSector + 2], si 4623 <1> 4624 00006DD3 31C0 <1> xor ax, ax 4625 00006DD5 31D2 <1> xor dx, dx 4626 <1> 4627 <1> scan_dir_kernelname_loop: 4628 00006DD7 8946EC <1> mov word [bp + ldDirCluster], ax 4629 00006DDA 8956EE <1> mov word [bp + ldDirCluster + 2], dx 4630 <1> 4631 00006DDD 31DB <1> xor bx, bx 4632 00006DDF 8EC3 <1> mov es, bx 4633 00006DE1 BB0005 <1> mov bx, 500h 4634 00006DE4 E8C607 <1> call scan_dir_aux_for_file 4635 <1> 4636 00006DE7 803E[1592]10 <1> cmp byte [load_check_dir_attr], ATTR_DIRECTORY 4637 00006DEC 753C <1> jne got_kernelentry 4638 <1> 4639 00006DEE 56 <1> push si 4640 00006DEF 57 <1> push di 4641 00006DF0 C606[1592]00 <1> mov byte [load_check_dir_attr], 0 4642 00006DF5 8B36[2692] <1> mov si, word [load_kernelname_next] 4643 00006DF9 803C00 <1> cmp byte [si], 0 4644 00006DFC 7504 <1> jne @F 4645 00006DFE 8B36[408F] <1> mov si, word [load_kernelname_default] 4646 <1> @@: 4647 00006E02 06 <1> push es 4648 00006E03 16 <1> push ss 4649 00006E04 07 <1> pop es 4650 00006E05 E8D4FC <1> call boot_parse_fn ; get next pathname 4651 00006E08 07 <1> pop es 4652 00006E09 3C2F <1> cmp al, '/' 4653 00006E0B 7509 <1> jne @F 4654 00006E0D C606[1592]10 <1> mov byte [load_check_dir_attr], ATTR_DIRECTORY 4655 00006E12 8936[2692] <1> mov word [load_kernelname_next], si 4656 <1> @@: 4657 00006E16 5F <1> pop di 4658 00006E17 5E <1> pop si 4659 <1> 4660 00006E18 31D2 <1> xor dx, dx 4661 00006E1A 268B471A <1> mov ax, [es:bx + deClusterLow] 4662 <1> ; = first cluster (not FAT32) 4663 00006E1E 807EE620 <1> cmp byte [bp + ldFATType], 32 4664 00006E22 7504 <1> jne @F 4665 00006E24 268B5714 <1> mov dx, [es:bx + deClusterHigh] 4666 <1> ; dx:ax = first cluster (FAT32) 4667 <1> @@: 4668 <1> 4669 00006E28 EBAD <1> jmp scan_dir_kernelname_loop 4670 <1> 4671 <1> 4672 <1> got_kernelentry: 4673 00006E2A 56 <1> push si 4674 00006E2B 57 <1> push di 4675 <1> 4676 00006E2C C606[1592]00 <1> mov byte [load_check_dir_attr], 0 4677 00006E31 8B36[2892] <1> mov si, word [load_addname_input] 4678 00006E35 803C2F <1> cmp byte [si], '/' 4679 00006E38 7511 <1> jne @F 4680 00006E3A 46 <1> inc si 4681 00006E3B 803C2F <1> cmp byte [si], '/' 4682 00006E3E 7503E9A400 <1> je got_no_addentry.no_dxax_on_stack 4683 <1> 4684 00006E43 31C0 <1> xor ax, ax 4685 00006E45 8946EC <1> mov word [bp + ldDirCluster], ax 4686 00006E48 8946EE <1> mov word [bp + ldDirCluster + 2], ax 4687 <1> ; search from root directory 4688 <1> @@: 4689 00006E4B 803C00 <1> cmp byte [si], 0 4690 00006E4E 750C <1> jne @F 4691 00006E50 8B36[428F] <1> mov si, word [load_addname_default] 4692 00006E54 803C00 <1> cmp byte [si], 0 4693 00006E57 7503E98B00 <1> je got_no_addentry.no_dxax_on_stack 4694 <1> @@: 4695 00006E5C 16 <1> push ss 4696 00006E5D 07 <1> pop es 4697 00006E5E E87BFC <1> call boot_parse_fn ; get next pathname 4698 00006E61 3C2F <1> cmp al, '/' 4699 00006E63 7509 <1> jne @F 4700 00006E65 C606[1592]10 <1> mov byte [load_check_dir_attr], ATTR_DIRECTORY 4701 00006E6A 8936[2692] <1> mov word [load_kernelname_next], si 4702 <1> @@: 4703 00006E6E 5F <1> pop di 4704 00006E6F 5E <1> pop si 4705 00006E70 EB06 <1> jmp @F 4706 <1> 4707 <1> scan_dir_addname_loop: 4708 00006E72 8946EC <1> mov word [bp + ldDirCluster], ax 4709 00006E75 8956EE <1> mov word [bp + ldDirCluster + 2], dx 4710 <1> 4711 <1> @@: 4712 00006E78 31DB <1> xor bx, bx 4713 00006E7A 8EC3 <1> mov es, bx 4714 00006E7C BB2005 <1> mov bx, 520h ; 0:bx -> space for second directory entry 4715 00006E7F E82B07 <1> call scan_dir_aux_for_file 4716 <1> 4717 00006E82 803E[1592]10 <1> cmp byte [load_check_dir_attr], ATTR_DIRECTORY 4718 00006E87 756C <1> jne got_addentry 4719 <1> 4720 00006E89 56 <1> push si 4721 00006E8A 57 <1> push di 4722 00006E8B 52 <1> push dx 4723 00006E8C 50 <1> push ax 4724 00006E8D C606[1592]00 <1> mov byte [load_check_dir_attr], 0 4725 00006E92 8B36[2A92] <1> mov si, word [load_addname_next] 4726 00006E96 803C00 <1> cmp byte [si], 0 4727 00006E99 7509 <1> jne @F 4728 00006E9B 8B36[428F] <1> mov si, word [load_addname_default] 4729 00006E9F 803C00 <1> cmp byte [si], 0 4730 00006EA2 7441 <1> je got_no_addentry 4731 <1> @@: 4732 00006EA4 06 <1> push es 4733 00006EA5 16 <1> push ss 4734 00006EA6 07 <1> pop es 4735 00006EA7 E832FC <1> call boot_parse_fn ; get next pathname 4736 00006EAA 07 <1> pop es 4737 00006EAB 3C2F <1> cmp al, '/' 4738 00006EAD 7509 <1> jne @F 4739 00006EAF C606[1592]10 <1> mov byte [load_check_dir_attr], ATTR_DIRECTORY 4740 00006EB4 8936[2A92] <1> mov word [load_addname_next], si 4741 <1> @@: 4742 00006EB8 58 <1> pop ax 4743 00006EB9 5A <1> pop dx 4744 00006EBA 5F <1> pop di 4745 00006EBB 5E <1> pop si 4746 <1> 4747 00006EBC 31D2 <1> xor dx, dx 4748 00006EBE 268B471A <1> mov ax, [es:bx + deClusterLow] 4749 <1> ; = first cluster (not FAT32) 4750 00006EC2 807EE620 <1> cmp byte [bp + ldFATType], 32 4751 00006EC6 7504 <1> jne @F 4752 00006EC8 268B5714 <1> mov dx, [es:bx + deClusterHigh] 4753 <1> ; dx:ax = first cluster (FAT32) 4754 <1> @@: 4755 <1> 4756 00006ECC EBA4 <1> jmp scan_dir_addname_loop 4757 <1> 4758 <1> 4759 <1> helper_shift_down_and_clamp: 4760 00006ECE B90400 <1> mov cx, 4 4761 <1> @@: 4762 00006ED1 D0EA <1> shr dl, 1 4763 00006ED3 D1D8 <1> rcr ax, 1 4764 00006ED5 D1DB <1> rcr bx, 1 4765 00006ED7 E2F8 <1> loop @B 4766 <1> 4767 00006ED9 08D0 <1> or al, dl 4768 00006EDB 89DA <1> mov dx, bx ; size in paragraphs 4769 00006EDD 85C0 <1> test ax, ax ; > 0FFFFh ? 4770 00006EDF 7403 <1> jz @F ; no, take actual size --> 4771 00006EE1 BAFFFF <1> mov dx, 0FFFFh ; clamp to 0FFFFh 4772 <1> @@: 4773 00006EE4 C3 <1> retn 4774 <1> 4775 <1> got_no_addentry: 4776 00006EE5 58 <1> pop ax 4777 00006EE6 5A <1> pop dx 4778 <1> .no_dxax_on_stack: 4779 <1> ; push ax 4780 00006EE7 B91000 <1> mov cx, 16 4781 00006EEA 31C0 <1> xor ax, ax 4782 00006EEC 8EC0 <1> mov es, ax 4783 00006EEE BF2005 <1> mov di, 520h ; es:di -> space for second directory entry 4784 00006EF1 F3AB <1> rep stosw ; store zeros 4785 <1> ; pop ax 4786 <1> 4787 00006EF3 5F <1> pop di 4788 00006EF4 5E <1> pop si 4789 <1> 4790 <1> got_addentry: 4791 00006EF5 31C0 <1> xor ax, ax 4792 00006EF7 8EC0 <1> mov es, ax 4793 <1> 4794 <1> 4795 <1> ; (boot32.asm code starts here) 4796 <1> 4797 00006EF9 8B46E2 <1> mov ax, word [bp + ldLoadTop] 4798 00006EFC 2B46EA <1> sub ax, word [bp + ldParaPerSector] 4799 00006EFF 7303E9B4FD <1> jc load_freedos_common.outofmem 4800 00006F04 8946D6 <1> mov [bp + ldLastAvailableSector], ax 4801 <1> 4802 00006F07 268B1E1C05 <1> mov bx, [es:500h + deSize] 4803 00006F0C 26A11E05 <1> mov ax, [es:500h + deSize + 2] ; ax:bx = file size 4804 00006F10 268A160C05 <1> mov dl, [es:500h + 12] ; dl = FAT+ size bits 4805 00006F15 88D6 <1> mov dh, dl 4806 00006F17 81E207E0 <1> and dx, 0E007h ; obtain bits 7-5 and 2-0 4807 00006F1B D0EE <1> shr dh, 1 4808 00006F1D D0EE <1> shr dh, 1 4809 00006F1F 08F2 <1> or dl, dh ; dl:ax:bx = file size 4810 00006F21 52 <1> push dx 4811 00006F22 50 <1> push ax 4812 00006F23 53 <1> push bx 4813 <1> 4814 00006F24 E8A7FF <1> call helper_shift_down_and_clamp 4815 <1> ; round down to next paragraph boundary 4816 00006F27 3916[448F] <1> cmp word [load_minpara], dx 4817 00006F2B 7603E9A400 <1> ja error_filetoosmall 4818 <1> 4819 00006F30 5B <1> pop bx 4820 00006F31 58 <1> pop ax 4821 00006F32 5A <1> pop dx 4822 00006F33 8B4E0B <1> mov cx, [bp + bsBPB + bpbBytesPerSector] 4823 00006F36 49 <1> dec cx ; BpS - 1 4824 00006F37 01CB <1> add bx, cx 4825 00006F39 83D000 <1> adc ax, 0 4826 00006F3C 80D200 <1> adc dl, 0 ; round up to next sector 4827 00006F3F F7D1 <1> not cx ; ~ (BpS - 1) 4828 00006F41 21CB <1> and bx, cx ; mask to limit to rounded-up sector 4829 00006F43 E888FF <1> call helper_shift_down_and_clamp 4830 <1> 4831 <1> ; dl:ax:bx = size in paragraphs 4832 00006F46 A1[468F] <1> mov ax, word [load_maxpara] 4833 00006F49 39C2 <1> cmp dx, ax ; actual size below maximum ? 4834 00006F4B 7602 <1> jbe @F ; yes, use actual size --> 4835 00006F4D 89C2 <1> mov dx, ax ; use maximum size 4836 <1> @@: 4837 00006F4F 8956D8 <1> mov word [bp + ldParasLeft], dx 4838 00006F52 C746DA0000 <1> mov word [bp + ldParasDone], 0 4839 <1> 4840 <1> ; get starting cluster of file 4841 00006F57 31D2 <1> xor dx, dx 4842 00006F59 26A11A05 <1> mov ax, [es:500h + deClusterLow] 4843 <1> ; = first cluster (not FAT32) 4844 <1> 4845 00006F5D 807EE620 <1> cmp byte [bp + ldFATType], 32 4846 00006F61 7505 <1> jne @F 4847 00006F63 268B161405 <1> mov dx, [es:500h + deClusterHigh] 4848 <1> ; dx:ax = first cluster (FAT32) 4849 <1> @@: 4850 <1> 4851 00006F68 8946F0 <1> mov word [bp + lsvFirstCluster], ax 4852 00006F6B 8956F2 <1> mov word [bp + lsvFirstCluster + 2], dx 4853 <1> 4854 00006F6E E80A08 <1> call check_clust 4855 00006F71 7303E92E15 <1> jc error_badchain 4856 <1> 4857 <1> next_load_cluster: 4858 00006F76 E82107 <1> call clust_to_first_sector 4859 <1> ; dx:ax = first sector of cluster 4860 <1> ; cx:bx = cluster value 4861 00006F79 51 <1> push cx 4862 00006F7A 53 <1> push bx ; preserve cluster number for later 4863 <1> 4864 00006F7B 8B4EE8 <1> mov cx, [bp + ldClusterSize] 4865 <1> 4866 00006F7E 8B5EFA <1> mov bx, [bp + lsvLoadSeg] 4867 <1> ; xxx - this will always load an entire cluster (e.g. 64 sectors), 4868 <1> ; even if the file is shorter than this 4869 <1> @@: 4870 00006F81 3B5ED6 <1> cmp bx, [bp + ldLastAvailableSector] 4871 00006F84 7613 <1> jbe @F 4872 00006F86 833E[468F]00 <1> cmp word [load_maxpara], 0 4873 00006F8B 743D <1> je @FF ; if to allow partial load --> 4874 00006F8D BA[FA62] <1> mov dx, msg.boot_file_too_big_error 4875 00006F90 B81A02 <1> mov ax, 021Ah 4876 00006F93 E8FB37 <1> call setrc 4877 00006F96 E96DF6 <1> jmp bootcmd.fail 4878 <1> 4879 <1> @@: 4880 00006F99 06 <1> push es ; (must preserve ADR_FATBUF reference) 4881 00006F9A E8800B <1> call read_sector 4882 00006F9D 07 <1> pop es 4883 00006F9E 895EFA <1> mov [bp + lsvLoadSeg], bx ; => after last read data 4884 <1> 4885 00006FA1 50 <1> push ax 4886 00006FA2 8B46EA <1> mov ax, [bp + ldParaPerSector] 4887 00006FA5 0146DA <1> add word [bp + ldParasDone], ax 4888 00006FA8 833E[468F]00 <1> cmp word [load_maxpara], 0 4889 00006FAD 7407 <1> je .donotuseleft 4890 00006FAF 2946D8 <1> sub word [bp + ldParasLeft], ax 4891 00006FB2 58 <1> pop ax 4892 00006FB3 7615 <1> jbe @F ; read enough --> 4893 00006FB5 A8 <1> db __TEST_IMM8 ; (skip pop) 4894 <1> .donotuseleft: 4895 00006FB6 58 <1> pop ax 4896 <1> 4897 00006FB7 E2C8 <1> loop @BB 4898 00006FB9 5B <1> pop bx 4899 00006FBA 59 <1> pop cx 4900 <1> 4901 00006FBB E80507 <1> call clust_next 4902 00006FBE 73B6 <1> jnc next_load_cluster 4903 00006FC0 40 <1> inc ax 4904 00006FC1 40 <1> inc ax 4905 00006FC2 A808 <1> test al, 8 ; set in 0FFF_FFF8h--0FFF_FFFFh, 4906 <1> ; clear in 0, 1, and 0FFF_FFF7h 4907 00006FC4 7503E9DB14 <1> jz error_badchain 4908 00006FC9 A9 <1> db __TEST_IMM16 4909 <1> @@: 4910 00006FCA 5B <1> pop bx 4911 00006FCB 59 <1> pop cx 4912 <1> 4913 00006FCC A1[448F] <1> mov ax, word [load_minpara] 4914 00006FCF 3B46DA <1> cmp ax, word [bp + ldParasDone] 4915 00006FD2 760C <1> jbe @F 4916 <1> error_filetoosmall: 4917 00006FD4 BA[0A63] <1> mov dx, msg.boot_file_too_small_error 4918 00006FD7 B81B02 <1> mov ax, 021Bh 4919 00006FDA E8B437 <1> call setrc 4920 00006FDD E926F6 <1> jmp bootcmd.fail 4921 <1> @@: 4922 <1> 4923 <1> 4924 00006FE0 8E06[4A8F] <1> mov es, word [load_loadseg] 4925 00006FE4 8B3E[548F] <1> mov di, word [load_check_offset] 4926 00006FE8 A1[568F] <1> mov ax, word [load_check_value] 4927 00006FEB 85C0 <1> test ax, ax 4928 00006FED 7406 <1> jz @F 4929 00006FEF AF <1> scasw 4930 00006FF0 7403E9F301 <1> jne .error_check_mismatch 4931 <1> @@: 4932 <1> 4933 <1> ; turn off floppy motor 4934 00006FF5 BAF203 <1> mov dx,3F2h 4935 00006FF8 B000 <1> mov al,0 4936 00006FFA EE <1> out dx,al 4937 <1> 4938 <1> ; Set-up registers for and jump to loaded file 4939 <1> 4940 00006FFB 8A5640 <1> mov dl, [bp + bsBPB + ebpbNew + bpbnBootUnit] 4941 <1> ; testopt [load_options], LOAD_SET_DL_UNIT 4942 <1> ; jz @F 4943 <1> ; (always set dl) 4944 00006FFE 8816[7C0C] <1> mov byte [reg_edx], dl 4945 <1> @@: 4946 <1> 4947 <1> ; testopt [load_options], LOAD_SET_BL_UNIT 4948 <1> ; jz @F 4949 <1> ; (always set bl -- overwritten later if LOAD_SET_AXBX_DATASTART) 4950 00007002 8816[740C] <1> mov byte [reg_ebx], dl 4951 <1> @@: 4952 <1> 4953 00007006 8A6E15 <1> mov ch, byte [bp + bsBPB + bpbMediaID] 4954 00007009 882E[790C] <1> mov byte [reg_ecx + 1], ch 4955 <1> 4956 0000700D F606[488F]40 <1> testopt [load_options], LOAD_DATASTART_HIDDEN 4957 00007012 740C <1> jz @F 4958 00007014 8B5E1C <1> mov bx, [bp + bsBPB + bpbHiddenSectors] 4959 00007017 8B461E <1> mov ax, [bp + bsBPB + bpbHiddenSectors + 2] 4960 0000701A 015EFC <1> add word [bp + lsvDataStart], bx 4961 0000701D 1146FE <1> adc word [bp + lsvDataStart + 2], ax 4962 <1> @@: 4963 <1> 4964 00007020 F606[488F]80 <1> testopt [load_options], LOAD_SET_AXBX_DATASTART 4965 00007025 740D <1> jz @F 4966 00007027 8B5EFC <1> mov bx, word [bp + lsvDataStart] 4967 0000702A 8B46FE <1> mov ax, word [bp + lsvDataStart + 2] 4968 0000702D 891E[740C] <1> mov word [reg_ebx], bx 4969 00007031 A3[700C] <1> mov word [reg_eax], ax 4970 <1> @@: 4971 <1> 4972 00007034 F606[498F]08 <1> testopt [load_options], LOAD_SET_AXBX_ROOT_HIDDEN 4973 00007039 7413 <1> jz @F 4974 0000703B 8B5ED0 <1> mov bx, word [bp + ldRootSector] 4975 0000703E 8B46D2 <1> mov ax, word [bp + ldRootSector + 2] 4976 00007041 035E1C <1> add bx, word [bp + bsBPB + bpbHiddenSectors] 4977 00007044 13461E <1> adc ax, word [bp + bsBPB + bpbHiddenSectors + 2] 4978 00007047 891E[740C] <1> mov word [reg_ebx], bx 4979 0000704B A3[700C] <1> mov word [reg_eax], ax 4980 <1> @@: 4981 <1> 4982 0000704E F606[488F]04 <1> testopt [load_options], LOAD_SET_SIDI_CLUSTER 4983 00007053 740D <1> jz @F 4984 00007055 8B56F2 <1> mov dx, word [bp + lsvFirstCluster + 2] 4985 00007058 8B46F0 <1> mov ax, word [bp + lsvFirstCluster] 4986 0000705B 8916[880C] <1> mov word [reg_esi], dx 4987 0000705F A3[8C0C] <1> mov word [reg_edi], ax 4988 <1> @@: 4989 <1> 4990 <1> ; (boot.asm code ends here) 4991 <1> 4992 <1> 4993 00007062 C43E[0492] <1> les di, [load_bpb_dest] 4994 00007066 57 <1> push di 4995 00007067 83EF10 <1> sub di, -LOADSTACKVARS 4996 0000706A BE[D08E] <1> mov si, load_data - LOADDATA2 + LOADSTACKVARS 4997 0000706D B91000 <1> mov cx, -LOADSTACKVARS 4998 00007070 F606[498F]20 <1> testopt [load_options], LOAD_NO_BPB 4999 00007075 7568 <1> jnz .no_bpb_movsb 5000 00007077 B93400 <1> mov cx, -LOADSTACKVARS + bsBPB + bpbNew 5001 0000707A F3A4 <1> rep movsb ; move common BPB part 5002 <1> 5003 0000707C 394E16 <1> cmp word [bp + bsBPB + bpbSectorsPerFAT], cx 5004 0000707F B93600 <1> mov cx, ebpbNew - bpbNew + BPBN_size ; move FAT32 EBPB part + BPBN 5005 00007082 7406 <1> je @F 5006 00007084 83C61C <1> add si, ebpbNew - bpbNew; -> BPBN 5007 00007087 B91A00 <1> mov cx, BPBN_size ; move only BPBN 5008 <1> @@: 5009 0000708A F3A4 <1> rep movsb 5010 <1> 5011 0000708C 89F8 <1> mov ax, di 5012 0000708E 5F <1> pop di 5013 0000708F 29F8 <1> sub ax, di 5014 00007091 48 <1> dec ax 5015 00007092 48 <1> dec ax 5016 00007093 86C4 <1> xchg al, ah 5017 00007095 B0EB <1> mov al, 0EBh 5018 00007097 268905 <1> mov word [es:di], ax 5019 0000709A 26C6450290 <1> mov byte [es:di + 2], 90h 5020 <1> 5021 0000709F F606[498F]02 <1> testopt [load_options], LOAD_LBA_SET_TYPE 5022 000070A4 7416 <1> jz @F 5023 000070A6 F646E701 <1> test byte [bp + ldFlags], ldfHasLBA 5024 000070AA 7410 <1> jz @F 5025 <1> 5026 000070AC 26C645020E <1> mov byte [es:di + 2], 0Eh ; (LBA-enabled) FAT16 FS partition type 5027 000070B1 807EE620 <1> cmp byte [bp + ldFATType], 32 5028 000070B5 7205 <1> jb @F 5029 000070B7 26C645020C <1> mov byte [es:di + 2], 0Ch ; (LBA-enabled) FAT32 FS partition type 5030 <1> @@: 5031 <1> 5032 000070BC 26C785FE0155AA <1> mov word [es:di + 510], 0AA55h 5033 000070C3 1E <1> push ds 5034 000070C4 31C9 <1> xor cx, cx 5035 000070C6 8ED9 <1> mov ds, cx 5036 000070C8 BE0005 <1> mov si, 500h 5037 000070CB 57 <1> push di 5038 000070CC 81C7D601 <1> add di, 512 - 2 - 2 - 14 - 12 - 12 5039 <1> ; 2: AA55 sig, 2: null word, 14: MS-DOS 7 protocol 5040 <1> ; message table pointer lives here, 5041 <1> ; 12: add name, 12: kernel name 5042 000070D0 B10B <1> mov cl, 11 5043 000070D2 F3A4 <1> rep movsb ; put kernel filename into the pseudo boot sector 5044 000070D4 47 <1> inc di 5045 000070D5 BE2005 <1> mov si, 520h 5046 000070D8 B10B <1> mov cl, 11 5047 000070DA F3A4 <1> rep movsb ; put additional filename (if any), cx = 0 5048 000070DC 5F <1> pop di 5049 000070DD 1F <1> pop ds 5050 <1> 5051 <1> ; cx = 0 5052 000070DE A8 <1> db __TEST_IMM8 ; (skip pop) 5053 <1> .no_bpb_movsb: 5054 000070DF 58 <1> pop ax ; discard word on stack 5055 000070E0 F3A4 <1> rep movsb 5056 <1> 5057 000070E2 8126[AC0C]FFF8 <1> and word [reg_efl], ~(400h|200h|100h) ; UP, DI, TF=0 5058 <1> 5059 000070E8 890E[AA0C] <1> mov word [reg_eip + 2], cx 5060 000070EC FF36[4C8F] <1> push word [load_entrypoint] 5061 000070F0 8F06[A80C] <1> pop word [reg_eip] 5062 000070F4 A1[4E8F] <1> mov ax, word [load_entrypoint + 2] 5063 000070F7 0306[4A8F] <1> add ax, word [load_loadseg] 5064 000070FB A3[9C0C] <1> mov word [reg_cs], ax 5065 <1> 5066 000070FE A1[0692] <1> mov ax, word [load_bpb_dest + 2] 5067 00007101 A3[980C] <1> mov word [reg_ss], ax 5068 <1> ; testopt [load_options], LOAD_SET_DSBP_BPB 5069 <1> ; jz @F 5070 <1> ; (always set ds -- overwritten later if LOAD_SET_DSSI_DPT) 5071 00007104 A3[900C] <1> mov word [reg_ds], ax 5072 <1> @@: 5073 00007107 8B1E[0492] <1> mov bx, word [load_bpb_dest] 5074 0000710B 890E[860C] <1> mov word [reg_ebp + 2], cx 5075 0000710F 891E[840C] <1> mov word [reg_ebp], bx 5076 00007113 89D8 <1> mov ax, bx 5077 00007115 83EB10 <1> sub bx, -LOADSTACKVARS ; (subtracts --10h) 5078 00007118 890E[820C] <1> mov word [reg_esp + 2], cx 5079 0000711C 891E[800C] <1> mov word [reg_esp], bx 5080 <1> 5081 00007120 F606[498F]20 <1> testopt [load_options], LOAD_NO_BPB 5082 00007125 751B <1> jnz @F 5083 <1> 5084 00007127 F606[498F]04 <1> testopt [load_options], LOAD_MESSAGE_TABLE 5085 0000712C 7414 <1> jz @F 5086 0000712E B96000 <1> mov cx, (bsBPB + ebpbNew + BPBN_size + 2 + 15) & ~15 5087 00007131 01C8 <1> add ax, cx 5088 00007133 268985EE01 <1> mov word [es:di + 1EEh], ax 5089 <1> ; this pointer points to the MS-DOS 7 message table. 5090 <1> ; 5091 <1> ; note that in actual MS-DOS 7 boot sectors, this value is 5092 <1> ; eg 17Fh, which is incorrectly used with the boot sector's 5093 <1> ; ss to load the table into the initial loader. 5094 <1> ; 5095 <1> ; refer to comments in msg.asm about msdos7_message_table. 5096 00007138 BE[E178] <1> mov si, msdos7_message_table 5097 0000713B 01CF <1> add di, cx 5098 0000713D B94300 <1> mov cx, msdos7_message_table.size 5099 00007140 F3A4 <1> rep movsb 5100 <1> @@: 5101 <1> 5102 00007142 F606[498F]10 <1> testopt [load_options], LOAD_CMDLINE 5103 00007147 7440 <1> jz .no_cmdline 5104 <1> 5105 00007149 8B36[0E92] <1> mov si, word [load_cmdline] 5106 0000714D 85F6 <1> test si, si 5107 0000714F 7503 <1> jnz @F 5108 00007151 BE[0E92] <1> mov si, load_cmdline 5109 <1> @@: 5110 <1> 5111 <1> ; due to the size of our line_in buffer, 5112 <1> ; the command line is never too long for 5113 <1> ; the lsv command line buffer (256 bytes). 5114 00007154 B98000 <1> mov cx, lsvclBufferLength / 2 5115 00007157 812E[800C]0401 <1> sub word [reg_esp], - lsvCommandLine.start + LOADSTACKVARS 5116 <1> ; hazard: if sp is too low, this underflows! 5117 0000715D 7303E9AD00 <1> jc .error_stack_underflow 5118 00007162 8E06[980C] <1> mov es, [reg_ss] 5119 00007166 8B3E[800C] <1> mov di, [reg_esp] ; es:di -> stack area for the pointers 5120 0000716A 81FF0001 <1> cmp di, 256 5121 0000716E 7303E99C00 <1> jb .error_stack_underflow 5122 00007173 57 <1> push di 5123 00007174 F3A5 <1> rep movsw 5124 00007176 26884DFF <1> mov byte [es:di - 1], cl; truncate command line if too long 5125 0000717A B8434C <1> mov ax, lsvclSignature 5126 0000717D AB <1> stosw ; write lsvCommandLine.signature 5127 0000717E 31C0 <1> xor ax, ax 5128 00007180 AB <1> stosw ; write lsvExtra 5129 00007181 5F <1> pop di 5130 00007182 B90001 <1> mov cx, lsvclBufferLength 5131 00007185 F2AE <1> repne scasb ; search terminator 5132 00007187 F3AA <1> rep stosb ; zero buffer behind terminator 5133 <1> .no_cmdline: 5134 <1> 5135 00007189 31C0 <1> xor ax, ax 5136 0000718B 8EC0 <1> mov es, ax 5137 0000718D BF7800 <1> mov di, 1Eh * 4 5138 00007190 268B5502 <1> mov dx, word [es:di + 2] 5139 00007194 268B1D <1> mov bx, word [es:di] 5140 <1> 5141 00007197 F606[488F]10 <1> testopt [load_options], LOAD_SET_DSSI_DPT 5142 0000719C 7408 <1> jz @F 5143 0000719E 8916[900C] <1> mov word [reg_ds], dx 5144 000071A2 891E[880C] <1> mov word [reg_esi], bx 5145 <1> @@: 5146 000071A6 F606[488F]20 <1> testopt [load_options], LOAD_PUSH_DPT 5147 000071AB 7419 <1> jz @F 5148 <1> 5149 000071AD 06 <1> push es 5150 000071AE 57 <1> push di 5151 000071AF 832E[800C]08 <1> sub word [reg_esp], 4 * 2 ; push four words 5152 000071B4 8E06[980C] <1> mov es, [reg_ss] 5153 000071B8 8B3E[800C] <1> mov di, [reg_esp] ; es:di -> stack area for the pointers 5154 000071BC 58 <1> pop ax ; di (1Eh * 4) 5155 000071BD AB <1> stosw 5156 000071BE 58 <1> pop ax ; es (0) 5157 000071BF AB <1> stosw 5158 000071C0 89D8 <1> mov ax, bx 5159 000071C2 AB <1> stosw ; si (Int1E offset) 5160 000071C3 89D0 <1> mov ax, dx 5161 000071C5 AB <1> stosw ; ds (Int1E segment) 5162 <1> @@: 5163 <1> 5164 000071C6 F606[498F]40 <1> testopt [load_options], LOAD_SET_DSSI_PARTINFO 5165 000071CB 7415 <1> jz @F 5166 000071CD A1[1092] <1> mov ax, word [load_partition_entry] 5167 000071D0 8326[900C]00 <1> and word [reg_ds], 0 5168 000071D5 A3[880C] <1> mov word [reg_esi], ax 5169 000071D8 F606[498F]20 <1> testopt [load_options], LOAD_NO_BPB 5170 000071DD 7403 <1> jz @F 5171 000071DF A3[840C] <1> mov word [reg_ebp], ax 5172 <1> @@: 5173 000071E2 800E[A300]01 <1> setopt [internalflags2], dif2_boot_loaded_kernel 5174 000071E7 C3 <1> retn 5175 <1> 5176 <1> 5177 <1> .error_check_mismatch: 5178 000071E8 4F <1> dec di 5179 000071E9 4F <1> dec di ; = offset into file 5180 000071EA 26FF35 <1> push word [es:di] ; = value we got in file 5181 000071ED 57 <1> push di ; = offset 5182 000071EE 16 <1> push ss 5183 000071EF 07 <1> pop es ; set STT 5184 000071F0 BF[A061] <1> mov di, msg.bootfail_check_mismatch.check_value 5185 000071F3 E8864A <1> call hexword ; write expected value 5186 000071F6 58 <1> pop ax 5187 000071F7 BF[B061] <1> mov di, msg.bootfail_check_mismatch.check_offset 5188 000071FA E87F4A <1> call hexword ; write offset 5189 000071FD 58 <1> pop ax 5190 000071FE BF[BE61] <1> mov di, msg.bootfail_check_mismatch.check_got 5191 00007201 E8784A <1> call hexword ; write what we got in file 5192 <1> 5193 00007204 BA[8761] <1> mov dx, msg.bootfail_check_mismatch 5194 00007207 B81C02 <1> mov ax, 021Ch 5195 0000720A E88435 <1> call setrc 5196 0000720D EB09 <1> jmp @F ; fail with error message 5197 <1> 5198 <1> .error_stack_underflow: 5199 0000720F BA[6D61] <1> mov dx, msg.bootfail_stack_underflow 5200 00007212 B81D02 <1> mov ax, 021Dh 5201 00007215 E87935 <1> call setrc 5202 <1> @@: 5203 00007218 E9EBF3 <1> jmp bootcmd.fail 5204 <1> 5205 <1> 5206 <1> boot_dir: 5207 0000721B 8026[A400]F7 <1> clropt [internalflags3], dif3_load_dir_dir 5208 00007220 E8AE49 <1> call skipwhite 5209 00007223 4E <1> dec si 5210 00007224 BA[3464] <1> mov dx, msg.dir 5211 00007227 E8F348 <1> call isstring? 5212 0000722A 7505 <1> jne @F 5213 0000722C 800E[A400]08 <1> setopt [internalflags3], dif3_load_dir_dir 5214 <1> @@: 5215 00007231 C706[2492][4164] <1> mov word [load_kernelname_input], msg.emptydirname 5216 00007237 AC <1> lodsb 5217 00007238 E8CAF5 <1> call parseloadunit_default_sdp 5218 0000723B 7409 <1> jz .fn_done_eol ; no filename given, use defaults --> 5219 <1> ; al was = '/' or '\' or first pathname's first character 5220 <1> ; si-> next char 5221 0000723D BB[2492] <1> mov bx, load_kernelname_input 5222 00007240 E8AEF1 <1> call bootcmd.pathname_parse_super 5223 00007243 E84B49 <1> call chkeol 5224 <1> 5225 <1> .fn_done_eol: 5226 00007246 F606[A400]07 <1> testopt [internalflags3], dif3_load_is_dp 5227 0000724B 7527 <1> jnz .boot_dir_from_ldp 5228 <1> 5229 0000724D 8A1E[1292] <1> mov bl, [load_partition] 5230 00007251 803E[208F]80 <1> cmp byte [load_unit], 80h 5231 00007256 7228 <1> jb .boot_dir_is_diskette 5232 00007258 84DB <1> test bl, bl ; partition specified ? 5233 0000725A 7503E98DEF <1> jz bootcmd.error ; no, error --> 5234 <1> 5235 0000725F E8F306 <1> call query_geometry 5236 <1> 5237 00007262 B9[A772] <1> mov cx, boot_dir_from_partition 5238 00007265 E84505 <1> call scan_partitions 5239 00007268 BA[1D62] <1> mov dx, msg.boot_partition_not_found 5240 0000726B B81102 <1> mov ax, 0211h 5241 0000726E E82035 <1> call setrc 5242 00007271 E992F3 <1> jmp bootcmd.fail 5243 <1> 5244 <1> 5245 <1> .boot_dir_from_ldp: 5246 00007274 E8DE06 <1> call query_geometry 5247 00007277 A1[0892] <1> mov ax, word [load_partition_sector] 5248 0000727A 8B16[0A92] <1> mov dx, word [load_partition_sector + 2] 5249 0000727E EB0E <1> jmp @F 5250 <1> 5251 <1> 5252 <1> .boot_dir_is_diskette: 5253 00007280 84DB <1> test bl, bl ; partition specified ? 5254 00007282 7403E965EF <1> jnz bootcmd.error ; yes, error --> 5255 <1> 5256 00007287 E8CB06 <1> call query_geometry 5257 <1> 5258 0000728A 31C0 <1> xor ax, ax 5259 0000728C 31D2 <1> xor dx, dx 5260 <1> @@: 5261 0000728E 8B1E[FA09] <1> mov bx, word [auxbuff_segorsel] ; bx => auxbuff 5262 00007292 52 <1> push dx 5263 00007293 50 <1> push ax 5264 00007294 E87408 <1> call read_ae_512_bytes 5265 <1> 5266 00007297 26813EFE0155AA <1> cmp word [es:510], 0AA55h 5267 0000729E 7403E9560B <1> jne boot_sigmismatch 5268 000072A3 58 <1> pop ax 5269 000072A4 5A <1> pop dx 5270 <1> 5271 000072A5 EB41 <1> jmp boot_dir_common 5272 <1> 5273 <1> 5274 <1> ; INP: es:si -> partition table entry, 5275 <1> ; si = load_partition_table .. load_partition_table+48, 5276 <1> ; es = ss 5277 <1> ; bp + di -> above part table metadata, 5278 <1> ; dwo [bp + di - 4] = root (outermost extended position) 5279 <1> ; dwo [bp + di - 8] = base (current table position) 5280 <1> ; CHG: ax, bx, (cx), dx 5281 <1> boot_dir_from_partition: 5282 <1> d4 call d4message 5283 <1> d4 asciz "In boot_dir_from_partition",13,10 5284 <1> 5285 000072A7 A0[1392] <1> mov al, byte [load_current_partition] 5286 000072AA 3A06[1292] <1> cmp al, byte [load_partition] 5287 000072AE 7401 <1> je .gotit 5288 000072B0 C3 <1> retn 5289 <1> 5290 <1> .gotit: 5291 <1> d4 call d4message 5292 <1> d4 asciz "In boot_dir_from_partition.gotit",13,10 5293 <1> 5294 000072B1 8B43F8 <1> mov ax, [bp + di - 8] 5295 000072B4 8B53FA <1> mov dx, [bp + di - 6] ; base (current table position) 5296 <1> 5297 000072B7 26034408 <1> add ax, [es:si + 8] 5298 000072BB 2613540A <1> adc dx, [es:si + 8 + 2] ; add offset to logical partition 5299 <1> 5300 000072BF 26894408 <1> mov word [es:si + 8], ax 5301 000072C3 2689540A <1> mov word [es:si + 8 + 2], dx ; store in partition table entry 5302 000072C7 26800C80 <1> or byte [es:si + 0], 80h ; set bootable flag 5303 <1> 5304 000072CB 89EC <1> mov sp, bp 5305 000072CD 5D <1> pop bp ; restore bp (scan_partitions) 5306 000072CE 5B <1> pop bx ; discard ret address (scan_partitions) 5307 <1> 5308 <1> ; dx:ax = absolute sector number 5309 000072CF 8B1E[FA09] <1> mov bx, word [auxbuff_segorsel] ; bx => auxbuff 5310 000072D3 50 <1> push ax 5311 000072D4 52 <1> push dx 5312 000072D5 E83308 <1> call read_ae_512_bytes ; load partition boot sector 5313 <1> 5314 000072D8 26813EFE0155AA <1> cmp word [es:510], 0AA55h 5315 000072DF 7403E9150B <1> jne boot_sigmismatch 5316 <1> 5317 000072E4 31C9 <1> xor cx, cx 5318 <1> ; cmp word [es:0], cx 5319 <1> ; je boot_codemismatch 5320 <1> 5321 000072E6 5A <1> pop dx 5322 000072E7 58 <1> pop ax 5323 <1> 5324 <1> ; dx:ax = boot sector 5325 <1> ; byte [load_unit] = unit 5326 <1> ; es:0-> read sector 5327 <1> boot_dir_common: 5328 000072E8 26A31C00 <1> mov word [es:bsBPB + bpbHiddenSectors], ax 5329 000072EC 2689161E00 <1> mov word [es:bsBPB + bpbHiddenSectors + 2], dx 5330 <1> 5331 000072F1 8B5E0B <1> mov bx, [bp + bsBPB + bpbBytesPerSector] 5332 000072F4 263B1E0B00 <1> cmp bx, [es:bsBPB + bpbBytesPerSector] 5333 000072F9 7403E90F0B <1> jne boot_secsizemismatch 5334 <1> 5335 <1> ; preserve some variables from our pseudo BPB 5336 000072FE 31C0 <1> xor ax, ax 5337 00007300 FF7618 <1> push word [bp + bsBPB + bpbCHSSectors] 5338 00007303 268F061800 <1> pop word [es:bsBPB + bpbCHSSectors] 5339 00007308 FF761A <1> push word [bp + bsBPB + bpbCHSHeads] 5340 0000730B 268F061A00 <1> pop word [es:bsBPB + bpbCHSHeads] ; preserve geometry 5341 <1> 5342 00007310 8B5EEA <1> mov bx, word [bp + ldParaPerSector] 5343 00007313 D1EB <1> shr bx, 1 5344 00007315 895ED4 <1> mov word [bp + ldEntriesPerSector], bx 5345 <1> 5346 00007318 2639061600 <1> cmp word [es:bsBPB + bpbSectorsPerFAT], ax 5347 0000731D 8A5E40 <1> mov bl, byte [bp + bsBPB + ebpbNew + bpbnBootUnit] 5348 00007320 7407 <1> je .is_fat32 5349 00007322 26881E2400 <1> mov byte [es:bsBPB + bpbNew + bpbnBootUnit], bl 5350 00007327 EB05 <1> jmp short .was_fat1612 5351 <1> .is_fat32: 5352 00007329 26881E4000 <1> mov byte [es:bsBPB + ebpbNew + bpbnBootUnit], bl 5353 <1> .was_fat1612: 5354 <1> 5355 0000732E 06 <1> push es 5356 0000732F 1E <1> push ds 5357 00007330 06 <1> push es 5358 00007331 1F <1> pop ds 5359 00007332 31F6 <1> xor si, si ; -> BPB from boot partition 5360 00007334 16 <1> push ss 5361 00007335 07 <1> pop es 5362 00007336 BF[E08E] <1> mov di, load_data - LOADDATA2 ; -> our copy of a BPB 5363 00007339 B95A00 <1> mov cx, (bsBPB + ebpbNew + BPBN_size) 5364 0000733C F3A4 <1> rep movsb ; get the BPB 5365 <1> 5366 0000733E 1F <1> pop ds 5367 0000733F 800E[A400]80 <1> setopt [internalflags3], dif3_partition_changed 5368 <1> 5369 00007344 394616 <1> cmp word [bp + bsBPB + bpbSectorsPerFAT], ax 5370 00007347 740B <1> je @F ; is FAT32 --> 5371 00007349 BE[048F] <1> mov si, load_data - LOADDATA2 + bsBPB + bpbNew 5372 0000734C BF[208F] <1> mov di, load_data - LOADDATA2 + bsBPB + ebpbNew 5373 0000734F B91A00 <1> mov cx, BPBN_size 5374 00007352 F3A4 <1> rep movsb ; clone the FAT16 / FAT12 BPBN 5375 <1> ; to where the FAT32 BPBN lives 5376 <1> @@: 5377 00007354 07 <1> pop es 5378 <1> 5379 00007355 FF36[FA09] <1> push word [auxbuff_segorsel] 5380 00007359 8F46F8 <1> pop word [bp + lsvFATSeg] 5381 0000735C 804EE702 <1> or byte [bp + ldFlags], ldfFATInvalid 5382 00007360 B8FFFF <1> mov ax, -1 5383 00007363 8946F4 <1> mov word [bp + lsvFATSector], ax 5384 00007366 8946F6 <1> mov word [bp + lsvFATSector + 2], ax 5385 <1> 5386 00007369 E8FB10 <1> call initialise_fs 5387 <1> 5388 0000736C C706[4292][7E75] <1> mov word [handle_scan_dir_entry], scan_dir_entry 5389 <1> 5390 00007372 C606[1592]00 <1> mov byte [load_check_dir_attr], 0 5391 00007377 8B36[2492] <1> mov si, word [load_kernelname_input] 5392 0000737B 803C2F <1> cmp byte [si], '/' 5393 0000737E 7501 <1> jne @F 5394 00007380 46 <1> inc si 5395 <1> @@: 5396 00007381 803C00 <1> cmp byte [si], 0 5397 00007384 7503E99B00 <1> je .root 5398 00007389 16 <1> push ss 5399 0000738A 07 <1> pop es 5400 0000738B E84EF7 <1> call boot_parse_fn ; get next pathname 5401 0000738E 3C2F <1> cmp al, '/' 5402 00007390 7509 <1> jne @F 5403 00007392 C606[1592]10 <1> mov byte [load_check_dir_attr], ATTR_DIRECTORY 5404 00007397 8936[2692] <1> mov word [load_kernelname_next], si 5405 <1> @@: 5406 0000739B 84C0 <1> test al, al 5407 0000739D 7506 <1> jnz @F 5408 0000739F C706[4292][7B75] <1> mov word [handle_scan_dir_entry], scan_dir_entry_dir_or_file 5409 <1> @@: 5410 <1> 5411 000073A5 BFFFFF <1> mov di, -1 5412 000073A8 89FE <1> mov si, di 5413 000073AA 897EF4 <1> mov [bp + lsvFATSector], di 5414 000073AD 8976F6 <1> mov [bp + lsvFATSector + 2], si 5415 <1> 5416 000073B0 31C0 <1> xor ax, ax 5417 000073B2 31D2 <1> xor dx, dx 5418 <1> 5419 000073B4 83EC20 <1> sub sp, 32 5420 <1> 5421 <1> .scan_dir_dirname_loop: 5422 000073B7 8946EC <1> mov word [bp + ldDirCluster], ax 5423 000073BA 8956EE <1> mov word [bp + ldDirCluster + 2], dx 5424 <1> 5425 000073BD 16 <1> push ss 5426 000073BE 07 <1> pop es 5427 000073BF 89E3 <1> mov bx, sp 5428 000073C1 E8EF01 <1> call scan_dir_aux_with_error 5429 <1> 5430 000073C4 803E[1592]10 <1> cmp byte [load_check_dir_attr], ATTR_DIRECTORY 5431 000073C9 7542 <1> jne .got_direntry 5432 <1> 5433 000073CB 56 <1> push si 5434 000073CC 57 <1> push di 5435 000073CD C606[1592]00 <1> mov byte [load_check_dir_attr], 0 5436 000073D2 8B36[2692] <1> mov si, word [load_kernelname_next] 5437 000073D6 803C00 <1> cmp byte [si], 0 5438 000073D9 744F <1> je .sub 5439 <1> 5440 000073DB 06 <1> push es 5441 000073DC 16 <1> push ss 5442 000073DD 07 <1> pop es 5443 000073DE E8FBF6 <1> call boot_parse_fn ; get next pathname 5444 000073E1 07 <1> pop es 5445 000073E2 3C2F <1> cmp al, '/' 5446 000073E4 7509 <1> jne @F 5447 000073E6 C606[1592]10 <1> mov byte [load_check_dir_attr], ATTR_DIRECTORY 5448 000073EB 8936[2692] <1> mov word [load_kernelname_next], si 5449 <1> @@: 5450 000073EF 84C0 <1> test al, al 5451 000073F1 7506 <1> jnz @F 5452 000073F3 C706[4292][7B75] <1> mov word [handle_scan_dir_entry], scan_dir_entry_dir_or_file 5453 <1> @@: 5454 <1> 5455 000073F9 5F <1> pop di 5456 000073FA 5E <1> pop si 5457 <1> 5458 000073FB 31D2 <1> xor dx, dx 5459 000073FD 268B471A <1> mov ax, [es:bx + deClusterLow] 5460 <1> ; = first cluster (not FAT32) 5461 00007401 807EE620 <1> cmp byte [bp + ldFATType], 32 5462 00007405 7504 <1> jne @F 5463 00007407 268B5714 <1> mov dx, [es:bx + deClusterHigh] 5464 <1> ; dx:ax = first cluster (FAT32) 5465 <1> @@: 5466 <1> 5467 0000740B EBAA <1> jmp .scan_dir_dirname_loop 5468 <1> 5469 <1> .got_direntry: 5470 0000740D F606[A400]08 <1> testopt [internalflags3], dif3_load_dir_dir 5471 00007412 7507 <1> jnz @F 5472 00007414 26F6470B10 <1> test byte [es:bx + deAttrib], ATTR_DIRECTORY 5473 00007419 7511 <1> jnz @FF 5474 <1> @@: 5475 0000741B 89DF <1> mov di, bx 5476 0000741D E83400 <1> call list_dir_entry 5477 00007420 83C420 <1> add sp, 32 5478 00007423 C3 <1> retn 5479 <1> 5480 <1> .root: 5481 00007424 31C0 <1> xor ax, ax 5482 00007426 31D2 <1> xor dx, dx 5483 00007428 EB15 <1> jmp .scan 5484 <1> 5485 <1> .sub: 5486 0000742A 5F <1> pop di 5487 0000742B 5E <1> pop si 5488 <1> 5489 <1> @@: 5490 0000742C 83C420 <1> add sp, 32 5491 <1> 5492 0000742F 31D2 <1> xor dx, dx 5493 00007431 268B471A <1> mov ax, [es:bx + deClusterLow] 5494 <1> ; = first cluster (not FAT32) 5495 00007435 807EE620 <1> cmp byte [bp + ldFATType], 32 5496 00007439 7504 <1> jne @F 5497 0000743B 268B5714 <1> mov dx, [es:bx + deClusterHigh] 5498 <1> ; dx:ax = first cluster (FAT32) 5499 <1> @@: 5500 <1> .scan: 5501 0000743F 8946EC <1> mov word [bp + ldDirCluster], ax 5502 00007442 8956EE <1> mov word [bp + ldDirCluster + 2], dx 5503 <1> 5504 00007445 C706[4292][5474] <1> mov word [handle_scan_dir_entry], list_dir_entry 5505 0000744B C706[4492][5C04] <1> mov word [handle_scan_dir_not_found], dmycmd 5506 <1> 5507 00007451 E96501 <1> jmp scan_dir_aux 5508 <1> 5509 <1> 5510 <1> list_dir_entry: 5511 00007454 26803D00 <1> cmp byte [es:di], 0 5512 00007458 7503E91D01 <1> je .ret ; (NC, ZR) 5513 0000745D 26803DE5 <1> cmp byte [es:di], 0E5h 5514 00007461 7504 <1> jne @F 5515 00007463 80CB01 <1> or bl, 1 ; (NC, NZ) 5516 00007466 C3 <1> retn 5517 <1> 5518 <1> @@: 5519 00007467 268A5D0B <1> mov bl, byte [es:di + deAttrib] 5520 0000746B F6C308 <1> test bl, ATTR_VOLLABEL 5521 0000746E 7403E90401 <1> jnz .ret_NC_NZ ; skip volume labels (and LFNs) --> (NZ) 5522 <1> 5523 00007473 26803D2E <1> cmp byte [es:di], '.' ; dot or dotdot entry ? 5524 00007477 7503E9FB00 <1> je .ret_NC_NZ ; yes, skip --> 5525 <1> 5526 0000747C 50 <1> push ax 5527 0000747D 53 <1> push bx 5528 0000747E 51 <1> push cx 5529 0000747F 52 <1> push dx 5530 00007480 56 <1> push si 5531 00007481 57 <1> push di 5532 00007482 06 <1> push es 5533 00007483 1E <1> push ds 5534 00007484 06 <1> push es 5535 00007485 1F <1> pop ds 5536 00007486 89FE <1> mov si, di 5537 <1> 5538 00007488 16 <1> push ss 5539 00007489 07 <1> pop es 5540 0000748A BF[0E08] <1> mov di, line_out 5541 0000748D B90800 <1> mov cx, 8 5542 00007490 F3A4 <1> rep movsb 5543 00007492 B82020 <1> mov ax, 2020h 5544 00007495 AA <1> stosb 5545 00007496 B103 <1> mov cl, 3 5546 00007498 F3A4 <1> rep movsb 5547 0000749A AB <1> stosw 5548 <1> 5549 0000749B 1F <1> pop ds 5550 0000749C B02D <1> mov al, '-' 5551 0000749E F6C320 <1> test bl, ATTR_ARCHIVE 5552 000074A1 7402 <1> jz @F 5553 000074A3 B041 <1> mov al, 'A' 5554 <1> @@: 5555 000074A5 AA <1> stosb 5556 000074A6 B02D <1> mov al, '-' 5557 000074A8 F6C302 <1> test bl, ATTR_HIDDEN 5558 000074AB 7402 <1> jz @F 5559 000074AD B048 <1> mov al, 'H' 5560 <1> @@: 5561 000074AF AA <1> stosb 5562 000074B0 B02D <1> mov al, '-' 5563 000074B2 F6C301 <1> test bl, ATTR_READONLY 5564 000074B5 7402 <1> jz @F 5565 000074B7 B052 <1> mov al, 'R' 5566 <1> @@: 5567 000074B9 AA <1> stosb 5568 000074BA B02D <1> mov al, '-' 5569 000074BC F6C304 <1> test bl, ATTR_SYSTEM 5570 000074BF 7402 <1> jz @F 5571 000074C1 B053 <1> mov al, 'S' 5572 <1> @@: 5573 000074C3 AA <1> stosb 5574 000074C4 B82020 <1> mov ax, 2020h 5575 000074C7 AB <1> stosw 5576 <1> 5577 000074C8 F6C310 <1> test bl, ATTR_DIRECTORY 5578 000074CB 7408 <1> jz @F 5579 000074CD BE[3864] <1> mov si, msg.dirinsteadsize 5580 000074D0 E88CC0 <1> call copy_single_counted_string 5581 000074D3 EB2D <1> jmp @FF 5582 <1> 5583 <1> @@: 5584 000074D5 07 <1> pop es 5585 000074D6 5E <1> pop si 5586 000074D7 56 <1> push si 5587 000074D8 06 <1> push es 5588 000074D9 268A440C <1> mov al, byte [es:si + dePlusSize] 5589 000074DD 88C4 <1> mov ah, al 5590 000074DF 2507E0 <1> and ax, 0E007h 5591 000074E2 88E2 <1> mov dl, ah 5592 000074E4 B400 <1> mov ah, 0 5593 000074E6 B600 <1> mov dh, 0 5594 000074E8 D1EA <1> shr dx, 1 5595 000074EA D1EA <1> shr dx, 1 5596 000074EC 09D0 <1> or ax, dx 5597 000074EE 50 <1> push ax 5598 000074EF 268B541E <1> mov dx, word [es:si + deSize + 2] 5599 000074F3 268B441C <1> mov ax, word [es:si + deSize] 5600 000074F7 5E <1> pop si 5601 000074F8 16 <1> push ss 5602 000074F9 07 <1> pop es 5603 000074FA 31C9 <1> xor cx, cx 5604 000074FC BB0800 <1> mov bx, 4+4 5605 000074FF E8B6AA <1> call disp_dxax_times_cx_width_bx_size.store 5606 <1> 5607 <1> @@: 5608 00007502 B82020 <1> mov ax, 2020h 5609 00007505 AB <1> stosw 5610 00007506 07 <1> pop es 5611 00007507 5E <1> pop si 5612 00007508 56 <1> push si 5613 00007509 06 <1> push es 5614 0000750A 268B5C18 <1> mov bx, word [es:si + deDate] 5615 0000750E 268B7416 <1> mov si, word [es:si + deTime] 5616 00007512 16 <1> push ss 5617 00007513 07 <1> pop es 5618 00007514 89D8 <1> mov ax, bx 5619 00007516 B90900 <1> mov cx, 9 5620 00007519 D3E8 <1> shr ax, cl 5621 0000751B 05BC07 <1> add ax, 1980 5622 0000751E 31D2 <1> xor dx, dx 5623 00007520 B104 <1> mov cl, 4 5624 00007522 E8EF46 <1> call dec_dword_minwidth 5625 00007525 B02D <1> mov al, '-' 5626 00007527 AA <1> stosb 5627 00007528 89D8 <1> mov ax, bx 5628 0000752A B105 <1> mov cl, 5 5629 0000752C D3E8 <1> shr ax, cl 5630 0000752E 83E00F <1> and ax, 15 5631 00007531 B102 <1> mov cl, 2 5632 00007533 E8DE46 <1> call dec_dword_minwidth 5633 00007536 B02D <1> mov al, '-' 5634 00007538 AA <1> stosb 5635 00007539 89D8 <1> mov ax, bx 5636 0000753B 83E01F <1> and ax, 31 5637 0000753E E8D346 <1> call dec_dword_minwidth 5638 00007541 B020 <1> mov al, 32 5639 00007543 AA <1> stosb 5640 00007544 89F0 <1> mov ax, si 5641 00007546 B10B <1> mov cl, 11 5642 00007548 D3E8 <1> shr ax, cl 5643 0000754A B102 <1> mov cl, 2 5644 0000754C E8C546 <1> call dec_dword_minwidth 5645 0000754F B03A <1> mov al, ':' 5646 00007551 AA <1> stosb 5647 00007552 89F0 <1> mov ax, si 5648 00007554 B105 <1> mov cl, 5 5649 00007556 D3E8 <1> shr ax, cl 5650 00007558 83E03F <1> and ax, 63 5651 0000755B B102 <1> mov cl, 2 5652 0000755D E8B446 <1> call dec_dword_minwidth 5653 00007560 B03A <1> mov al, ':' 5654 00007562 AA <1> stosb 5655 00007563 89F0 <1> mov ax, si 5656 00007565 83E01F <1> and ax, 31 5657 00007568 D1E0 <1> shl ax, 1 5658 0000756A E8A746 <1> call dec_dword_minwidth 5659 <1> 5660 0000756D E84447 <1> call putsline_crlf 5661 <1> 5662 00007570 07 <1> pop es 5663 00007571 5F <1> pop di 5664 00007572 5E <1> pop si 5665 00007573 5A <1> pop dx 5666 00007574 59 <1> pop cx 5667 00007575 5B <1> pop bx 5668 00007576 58 <1> pop ax 5669 <1> 5670 <1> .ret_NC_NZ: 5671 00007577 80CB01 <1> or bl, 1 ; (NC, NZ) 5672 <1> .ret: 5673 0000757A C3 <1> retn 5674 <1> 5675 <1> 5676 <1> usesection lDEBUG_DATA_ENTRY 5677 <1> 5678 <1> align 2, db 0 5679 <1> handle_scan_dir_entry: 5680 00009242 [4AA7] <1> dw error 5681 <1> handle_scan_dir_not_found: 5682 00009244 [4AA7] <1> dw error 5683 <1> 5684 <1> 5685 <1> usesection lDEBUG_CODE 5686 <1> 5687 <1> scan_dir_entry_dir_or_file: 5688 0000757B B701 <1> mov bh, 1 5689 0000757D A9 <1> db __TEST_IMM16 ; (skip mov) 5690 <1> 5691 <1> scan_dir_entry: 5692 0000757E B700 <1> mov bh, 0 5693 00007580 26803D00 <1> cmp byte [es:di], 0 5694 00007584 F9 <1> stc 5695 00007585 7425 <1> je .ret 5696 00007587 268A5D0B <1> mov bl, byte [es:di + deAttrib] 5697 0000758B F6C308 <1> test bl, ATTR_VOLLABEL 5698 0000758E 751B <1> jnz @F ; skip volume labels (and LFNs) --> (NZ) 5699 00007590 84FF <1> test bh, bh 5700 00007592 7509 <1> jnz .no_check_dir 5701 00007594 80E310 <1> and bl, ATTR_DIRECTORY ; isolate directory bit 5702 00007597 3A1E[1592] <1> cmp bl, byte [load_check_dir_attr] ; is it what we're searching? 5703 0000759B 750E <1> jne @F ; no --> 5704 <1> .no_check_dir: 5705 0000759D 56 <1> push si 5706 0000759E 57 <1> push di 5707 0000759F 51 <1> push cx 5708 000075A0 BE[1892] <1> mov si, load_kernel_name ; ds:si-> name to match 5709 000075A3 B90B00 <1> mov cx, 11 ; length of padded 8.3 FAT filename 5710 000075A6 F3A6 <1> repe cmpsb ; check entry 5711 000075A8 59 <1> pop cx 5712 000075A9 5F <1> pop di 5713 000075AA 5E <1> pop si 5714 <1> @@: 5715 000075AB F8 <1> clc 5716 <1> .ret: 5717 000075AC C3 <1> retn 5718 <1> 5719 <1> 5720 <1> ; INP: es:bx -> where to place directory entry 5721 <1> ; si:di = loaded FAT sector (0 = first FAT sector) 5722 <1> ; dword [bp + ldDirCluster] = directory cluster to scan, 5723 <1> ; 0 for root dir 5724 <1> ; byte [bp + ldFATType] = size of FAT entry in bits 5725 <1> ; OUT: es:bx -> directory entry (es:bx unchanged) 5726 <1> ; si:di = loaded FAT sector 5727 <1> ; CHG: dx, ax, si, di, cx 5728 <1> scan_dir_aux_for_file: 5729 000075AD C706[4292][7E75] <1> mov word [handle_scan_dir_entry], scan_dir_entry 5730 <1> 5731 <1> scan_dir_aux_with_error: 5732 000075B3 C706[4492][0F76] <1> mov word [handle_scan_dir_not_found], error_filenotfound 5733 <1> 5734 <1> scan_dir_aux: 5735 000075B9 FF36[FA09] <1> push word [auxbuff_segorsel] 5736 000075BD 8F06[3092] <1> pop word [load_adr_dirbuf_segment] 5737 <1> 5738 <1> scan_dir: 5739 000075C1 8B46EC <1> mov ax, word [bp + ldDirCluster] 5740 000075C4 8B56EE <1> mov dx, word [bp + ldDirCluster + 2] 5741 <1> 5742 000075C7 85C0 <1> test ax, ax 5743 000075C9 7576 <1> jnz fat32_scan_root.dir_clust_dxax 5744 000075CB 85D2 <1> test dx, dx 5745 000075CD 7572 <1> jnz fat32_scan_root.dir_clust_dxax 5746 <1> 5747 <1> ; got to scan root directory. use FAT12/FAT16 walker if so, 5748 <1> ; else use FAT32 walker 5749 <1> 5750 000075CF 807EE610 <1> cmp byte [bp + ldFATType], 16 5751 000075D3 7766 <1> ja fat32_scan_root 5752 <1> 5753 000075D5 56 <1> push si 5754 000075D6 57 <1> push di 5755 000075D7 06 <1> push es 5756 000075D8 53 <1> push bx 5757 <1> 5758 000075D9 8B7611 <1> mov si, word [bp + bsBPB + bpbNumRootDirEnts] 5759 <1> 5760 <1> 5761 <1> ; (boot.asm code starts here) 5762 <1> 5763 <1> fat16_scan_root: 5764 000075DC 85F6 <1> test si, si 5765 000075DE 7424 <1> jz handle_filenotfound_fat16 5766 <1> 5767 000075E0 8B46D0 <1> mov ax, [bp + ldRootSector] 5768 000075E3 8B56D2 <1> mov dx, [bp + ldRootSector + 2] 5769 <1> 5770 <1> ; Scan root directory for file. We don't bother to check for deleted 5771 <1> ; entries (E5h) or entries that mark the end of the directory (00h). 5772 <1> ; number of root entries in si here 5773 <1> fat16_next_sect: 5774 000075E6 8B1E[3092] <1> mov bx, [load_adr_dirbuf_segment] 5775 000075EA E83005 <1> call read_sector 5776 <1> 5777 000075ED 8B4ED4 <1> mov cx, [bp + ldEntriesPerSector] ; entries per sector as loop counter 5778 000075F0 31FF <1> xor di, di ; es:di-> first entry in this sector 5779 <1> fat16_next_ent: 5780 000075F2 FF16[4292] <1> call near word [handle_scan_dir_entry] 5781 000075F6 720C <1> jc handle_filenotfound_fat16 5782 000075F8 8D7D20 <1> lea di, [di + DIRENTRY_size] ; bytes/dirent 5783 000075FB 7428 <1> je fat16_found_it ; found entry --> 5784 <1> 5785 000075FD 4E <1> dec si ; count down entire root's entries 5786 000075FE E0F2 <1> loopnz fat16_next_ent ; count down sector's entries (jumps iff si >0 && cx >0) 5787 00007600 85F6 <1> test si, si ; work around qemu bug 5788 00007602 75E2 <1> jnz fat16_next_sect ; (jumps iff si >0 && cx ==0) 5789 <1> ; ends up here iff si ==0 5790 <1> ; ie all root entries checked unsuccessfully 5791 <1> %if 0 5792 <1> 5793 <1> qemu prior to 2020-08 has a bug which affects the above 5794 <1> conditionals. The bug is that if NZ is set (like when the 5795 <1> branch to fat16_found_it is not taken) and then another 5796 <1> instruction sets ZR (like the dec si at the end of the root 5797 <1> directory) and then loopnz is used which sets cx to zero 5798 <1> then after the loopnz FL will be NZ leading to the jnz branch 5799 <1> to be taken. Eventually the entire load unit is traversed and 5800 <1> qemu returns error 01h when trying to read past the end of 5801 <1> the unit (at least for 1440 KiB diskettes). 5802 <1> 5803 <1> The bug is now worked around by the comparison with zero at 5804 <1> the fat16_next_ent label. The test si, si serves as another 5805 <1> workaround to forcibly set the flag correctly after loopnz. 5806 <1> It is only really needed when the entire root is filled with 5807 <1> non-zero directory entries and an older qemu is used. 5808 <1> 5809 <1> Reference: https://bugs.launchpad.net/qemu/+bug/1888165 5810 <1> 5811 <1> %endif 5812 <1> 5813 <1> handle_filenotfound_fat16: 5814 00007604 5B <1> pop bx 5815 00007605 07 <1> pop es 5816 00007606 5F <1> pop di 5817 00007607 5E <1> pop si 5818 <1> 5819 00007608 A9 <1> db __TEST_IMM16 ; (skip pop and pop) 5820 <1> handle_filenotfound_fat32: 5821 00007609 5B <1> pop bx 5822 0000760A 07 <1> pop es 5823 <1> 5824 <1> handle_filenotfound: 5825 0000760B FF26[4492] <1> jmp near word [handle_scan_dir_not_found] 5826 <1> 5827 <1> error_filenotfound: 5828 <1> %if _INPUT_FILE_BOOT 5829 0000760F F606[A700]08 <1> testopt [internalflags3], dif3_in_if 5830 00007614 7403E96E1C <1> jnz if_exists_not_found 5831 <1> %endif 5832 00007619 BA[E862] <1> mov dx, msg.boot_file_not_found 5833 0000761C B81E02 <1> mov ax, 021Eh 5834 0000761F E86F31 <1> call setrc 5835 00007622 E9E1EF <1> jmp bootcmd.fail 5836 <1> 5837 <1> fat16_found_it: 5838 00007625 5B <1> pop bx 5839 00007626 58 <1> pop ax 5840 00007627 B92000 <1> mov cx, 32 5841 0000762A 29CF <1> sub di, cx 5842 0000762C 1E <1> push ds 5843 0000762D 06 <1> push es 5844 0000762E 1F <1> pop ds 5845 0000762F 89FE <1> mov si, di ; ds:si -> entry in directory buffer 5846 00007631 89DF <1> mov di, bx 5847 00007633 8EC0 <1> mov es, ax ; es:di -> destination for entry 5848 00007635 F3A4 <1> rep movsb 5849 00007637 1F <1> pop ds 5850 00007638 5F <1> pop di 5851 00007639 5E <1> pop si 5852 0000763A C3 <1> retn 5853 <1> 5854 <1> 5855 <1> ; (boot32.asm code starts here) 5856 <1> 5857 <1> fat32_scan_root: 5858 0000763B 8B462C <1> mov ax, [bp + bsBPB + ebpbRootCluster] 5859 0000763E 8B562E <1> mov dx, [bp + bsBPB + ebpbRootCluster + 2] 5860 <1> 5861 <1> .dir_clust_dxax: 5862 00007641 06 <1> push es 5863 00007642 53 <1> push bx 5864 <1> 5865 00007643 E83501 <1> call check_clust 5866 00007646 72C1 <1> jc handle_filenotfound_fat32 5867 <1> 5868 <1> fat32_next_root_clust: 5869 00007648 E84F00 <1> call clust_to_first_sector 5870 0000764B 51 <1> push cx 5871 0000764C 53 <1> push bx 5872 0000764D 8B4EE8 <1> mov cx, [bp + ldClusterSize] 5873 <1> fat32_next_root_sect: 5874 00007650 51 <1> push cx 5875 00007651 8B4ED4 <1> mov cx, [bp + ldEntriesPerSector] 5876 <1> 5877 <1> ; Scan root directory for file. We don't bother to check for deleted 5878 <1> ; entries (E5h) or entries that mark the end of the directory (00h). 5879 00007654 8B1E[3092] <1> mov bx, [load_adr_dirbuf_segment] 5880 00007658 E8C204 <1> call read_sector 5881 <1> 5882 0000765B 57 <1> push di 5883 0000765C 31FF <1> xor di, di ; es:di-> first entry in this sector 5884 <1> fat32_next_ent: 5885 0000765E FF16[4292] <1> call near word [handle_scan_dir_entry] 5886 00007662 7214 <1> jc handle_filenotfound_fat32_pop 5887 00007664 8D7D20 <1> lea di, [di + DIRENTRY_size] ; bytes/dirent 5888 00007667 7415 <1> je fat32_found_it ; found entry --> 5889 <1> 5890 00007669 E2F3 <1> loop fat32_next_ent ; count down sector's entries (jumps iff cx >0) 5891 0000766B 5F <1> pop di 5892 0000766C 59 <1> pop cx 5893 0000766D E2E1 <1> loop fat32_next_root_sect 5894 0000766F 5B <1> pop bx 5895 00007670 59 <1> pop cx 5896 00007671 E84F00 <1> call clust_next 5897 00007674 73D2 <1> jnc fat32_next_root_clust 5898 00007676 EB04 <1> jmp @F 5899 <1> 5900 <1> handle_filenotfound_fat32_pop: 5901 00007678 5F <1> pop di 5902 00007679 59 <1> pop cx 5903 0000767A 5B <1> pop bx 5904 0000767B 59 <1> pop cx 5905 <1> @@: 5906 0000767C EB8B <1> jmp handle_filenotfound_fat32 5907 <1> 5908 <1> 5909 <1> fat32_found_it: 5910 0000767E 5A <1> pop dx ; value for di 5911 0000767F 83C406 <1> add sp, 6 ; discard sector-in-cluster counter and cluster 5912 00007682 5B <1> pop bx 5913 00007683 58 <1> pop ax 5914 00007684 B92000 <1> mov cx, 32 5915 00007687 29CF <1> sub di, cx 5916 00007689 1E <1> push ds 5917 0000768A 06 <1> push es 5918 0000768B 1F <1> pop ds 5919 0000768C 56 <1> push si 5920 0000768D 89FE <1> mov si, di ; ds:si -> entry in directory buffer 5921 0000768F 89DF <1> mov di, bx 5922 00007691 8EC0 <1> mov es, ax ; es:di -> destination for entry 5923 00007693 F3A4 <1> rep movsb 5924 00007695 5E <1> pop si 5925 00007696 1F <1> pop ds 5926 00007697 89D7 <1> mov di, dx ; restore si:di = loaded FAT sector 5927 00007699 C3 <1> retn 5928 <1> 5929 <1> 5930 <1> ; (iniload.asm code continues here) 5931 <1> 5932 <1> ; INP: dx:ax = cluster - 2 (0-based cluster) 5933 <1> ; OUT: cx:bx = input dx:ax 5934 <1> ; dx:ax = first sector of that cluster 5935 <1> ; CHG: - 5936 <1> clust_to_first_sector: 5937 0000769A 52 <1> push dx 5938 0000769B 50 <1> push ax 5939 0000769C 52 <1> push dx 5940 0000769D F726[C88E] <1> mul word [load_data - LOADDATA2 + ldClusterSize] 5941 000076A1 93 <1> xchg bx, ax 5942 000076A2 87CA <1> xchg cx, dx 5943 000076A4 58 <1> pop ax 5944 000076A5 F726[C88E] <1> mul word [load_data - LOADDATA2 + ldClusterSize] 5945 000076A9 85D2 <1> test dx, dx 5946 000076AB 7513 <1> jnz .error_badchain 5947 000076AD 92 <1> xchg dx, ax 5948 000076AE 01CA <1> add dx, cx 5949 000076B0 720E <1> jc .error_badchain 5950 000076B2 93 <1> xchg ax, bx 5951 <1> 5952 000076B3 0306[DC8E] <1> add ax, [load_data - LOADDATA2 + lsvDataStart] 5953 000076B7 1316[DE8E] <1> adc dx, [load_data - LOADDATA2 + lsvDataStart + 2] 5954 000076BB 7203 <1> jc .error_badchain 5955 <1> ; dx:ax = first sector in cluster 5956 000076BD 5B <1> pop bx 5957 000076BE 59 <1> pop cx ; cx:bx = cluster 5958 000076BF C3 <1> retn 5959 <1> 5960 <1> .error_badchain: 5961 000076C0 E9E10D <1> jmp error_badchain 5962 <1> 5963 <1> 5964 <1> ; INP: cx:bx = cluster (0-based) 5965 <1> ; si:di = loaded FAT sector, -1 if none 5966 <1> ; OUT: CY if no next cluster 5967 <1> ; NC if next cluster found, 5968 <1> ; dx:ax = next cluster value (0-based) 5969 <1> ; si:di = loaded FAT sector 5970 <1> ; CHG: cx, bx 5971 <1> clust_next: 5972 000076C3 89D8 <1> mov ax, bx 5973 000076C5 89CA <1> mov dx, cx 5974 <1> .dxax: 5975 000076C7 83C002 <1> add ax, 2 5976 000076CA 83D200 <1> adc dx, 0 5977 <1> 5978 000076CD 06 <1> push es 5979 000076CE 803E[C68E]10 <1> cmp byte [load_data - LOADDATA2 + ldFATType], 16 5980 000076D3 7452 <1> je .fat16 5981 000076D5 774C <1> ja .fat32 5982 <1> 5983 <1> .fat12: 5984 <1> ; FAT12 entries are 12 bits, bytes are 8 bits. Ratio is 3 / 2, 5985 <1> ; so multiply cluster number by 3 first, then divide by 2. 5986 <1> ; ax = cluster number (up to 12 bits set) 5987 000076D7 89C2 <1> mov dx, ax 5988 000076D9 D1E0 <1> shl ax, 1 ; = 2n (up to 13 bits set) 5989 000076DB 01D0 <1> add ax, dx ; = 2n+n = 3n (up to 14 bits set) 5990 000076DD D1E8 <1> shr ax, 1 ; ax = byte offset into FAT (0..6129) 5991 <1> ; CF = whether to use high 12 bits 5992 000076DF 19C9 <1> sbb cx, cx ; = -1 iff CY, else 0 5993 <1> 5994 <1> ; Use the calculated byte offset as an offset into the FAT 5995 <1> ; buffer, which holds all of the FAT's relevant data. 5996 000076E1 8E06[D88E] <1> mov es, [load_data - LOADDATA2 + lsvFATSeg] 5997 000076E5 89C3 <1> mov bx, ax ; -> 16-bit word in FAT to load 5998 <1> 5999 000076E7 F606[C78E]02 <1> test byte [load_ldflags], ldfFATInvalid 6000 000076EC 7426 <1> jz .fat12_have_fat ; already have it --> 6001 000076EE 51 <1> push cx 6002 000076EF 31D2 <1> xor dx, dx 6003 000076F1 F736[EB8E] <1> div word [load_data - LOADDATA2 + bsBPB + bpbBytesPerSector] 6004 <1> ; dx = remainder, byte offset 6005 <1> ; ax = sector to read 6006 000076F5 52 <1> push dx 6007 000076F6 31D2 <1> xor dx, dx 6008 000076F8 0306[EE8E] <1> add ax, [load_data - LOADDATA2 + bsBPB + bpbReservedSectors] 6009 000076FC 11D2 <1> adc dx, dx 6010 000076FE 8B1E[D88E] <1> mov bx, [load_data - LOADDATA2 + lsvFATSeg] 6011 00007702 E81804 <1> call read_sector 6012 00007705 59 <1> pop cx 6013 00007706 3B0E[EB8E] <1> cmp cx, word [load_data - LOADDATA2 + bsBPB + bpbBytesPerSector] 6014 0000770A 7505 <1> jne .fat12_have_fat_cx 6015 0000770C 06 <1> push es 6016 0000770D E80D04 <1> call read_sector ; read second sector for straddling entry 6017 00007710 07 <1> pop es 6018 <1> 6019 <1> .fat12_have_fat_cx: 6020 00007711 89CB <1> mov bx, cx 6021 00007713 59 <1> pop cx 6022 <1> 6023 <1> .fat12_have_fat: 6024 <1> 6025 <1> ; get 16 bits from FAT 6026 00007714 268B07 <1> mov ax, [es:bx] 6027 <1> 6028 00007717 80E104 <1> and cl, 4 ; = 4 iff CY after shift, else 0 6029 0000771A D3E8 <1> shr ax, cl ; shift down iff odd entry, else unchanged 6030 0000771C 25FF0F <1> and ax, 0FFFh ; insure it's only 12 bits 6031 0000771F 31D2 <1> xor dx, dx 6032 00007721 EB57 <1> jmp short .gotvalue 6033 <1> 6034 <1> .fat32: 6035 <1> ; * 4 = byte offset into FAT (0--4000_0000h) 6036 00007723 01C0 <1> add ax, ax 6037 00007725 11D2 <1> adc dx, dx 6038 <1> .fat16: 6039 <1> ; * 2 = byte offset into FAT (0--2_0000h) 6040 00007727 01C0 <1> add ax, ax 6041 00007729 11D2 <1> adc dx, dx 6042 <1> 6043 0000772B 50 <1> push ax 6044 0000772C 92 <1> xchg ax, dx 6045 0000772D 31D2 <1> xor dx, dx ; dx:ax = high word 6046 0000772F F736[EB8E] <1> div word [load_data - LOADDATA2 + bsBPB + bpbBytesPerSector] 6047 00007733 89C3 <1> mov bx, ax 6048 00007735 58 <1> pop ax ; dx = remainder, ax = low word 6049 00007736 F736[EB8E] <1> div word [load_data - LOADDATA2 + bsBPB + bpbBytesPerSector] 6050 0000773A 87D3 <1> xchg dx, bx ; dx:ax = result, bx = remainder 6051 <1> ; dx:ax = sector offset into FAT (0--200_0000h) 6052 <1> ; bx = byte offset into FAT sector (0--8190) 6053 0000773C F606[C78E]02 <1> test byte [load_ldflags], ldfFATInvalid 6054 00007741 7513 <1> jnz .read_no_store ; always read --> 6055 <1> 6056 00007743 39F2 <1> cmp dx, si 6057 00007745 7504 <1> jne @F ; read sector 6058 00007747 39F8 <1> cmp ax, di 6059 00007749 741B <1> je @FF ; sector is already buffered 6060 <1> @@: 6061 0000774B 89D6 <1> mov si, dx 6062 0000774D 89C7 <1> mov di, ax 6063 0000774F 8916[D68E] <1> mov word [load_data - LOADDATA2 + lsvFATSector + 2], dx 6064 00007753 A3[D48E] <1> mov word [load_data - LOADDATA2 + lsvFATSector + 0], ax 6065 <1> 6066 <1> .read_no_store: 6067 00007756 53 <1> push bx 6068 00007757 0306[EE8E] <1> add ax, [load_data - LOADDATA2 + bsBPB + bpbReservedSectors] 6069 0000775B 83D200 <1> adc dx, 0 6070 0000775E 8B1E[D88E] <1> mov bx, [load_data - LOADDATA2 + lsvFATSeg] 6071 00007762 E8B803 <1> call read_sector 6072 00007765 5B <1> pop bx 6073 <1> @@: 6074 00007766 8E06[D88E] <1> mov es, [load_data - LOADDATA2 + lsvFATSeg] 6075 0000776A 31D2 <1> xor dx, dx 6076 0000776C 268B07 <1> mov ax, [es:bx] 6077 <1> 6078 0000776F 803E[C68E]10 <1> cmp byte [load_data - LOADDATA2 + ldFATType], 16 6079 00007774 7404 <1> je @F 6080 00007776 268B5702 <1> mov dx, [es:bx + 2] 6081 <1> @@: 6082 <1> .gotvalue: 6083 0000777A 07 <1> pop es 6084 <1> 6085 <1> ; INP: dx:ax = cluster value, 2-based 6086 <1> ; OUT: dx:ax -= 2 (makes it 0-based) 6087 <1> ; CY iff invalid cluster 6088 <1> check_clust: 6089 0000777B 80E60F <1> and dh, 0Fh 6090 0000777E 83E802 <1> sub ax, 2 6091 00007781 83DA00 <1> sbb dx, 0 6092 <1> 6093 00007784 803E[C68E]10 <1> cmp byte [load_data - LOADDATA2 + ldFATType], 16 6094 00007789 7707 <1> ja .fat32 6095 0000778B 740B <1> je .fat16 6096 <1> 6097 <1> .fat12: 6098 0000778D 3DF50F <1> cmp ax, 0FF7h - 2 6099 00007790 EB09 <1> jmp short .common 6100 <1> 6101 <1> .fat32: 6102 00007792 81FAFF0F <1> cmp dx, 0FFFh 6103 00007796 7203 <1> jb @F ; CY here means valid ...- 6104 <1> 6105 <1> .fat16: 6106 00007798 83F8F5 <1> cmp ax, 0FFF7h - 2 6107 <1> @@: ; -... or if NC first, CY here also 6108 <1> .common: 6109 0000779B F5 <1> cmc ; NC if valid 6110 0000779C 720E <1> jc .ret 6111 0000779E 3B16[A28E] <1> cmp dx, word [load_data - LOADDATA2 + ldMaxCluster + 2] 6112 000077A2 7504 <1> jne @F 6113 000077A4 3B06[A08E] <1> cmp ax, word [load_data - LOADDATA2 + ldMaxCluster] 6114 <1> @@: 6115 000077A8 7701 <1> ja .ret_CY 6116 000077AA A8 <1> db __TEST_IMM8 ; (skip stc, NC) 6117 <1> .ret_CY: 6118 000077AB F9 <1> stc 6119 <1> .ret: 6120 000077AC C3 <1> retn 6121 <1> 6122 <1> 6123 <1> partition_table equ load_partition_table 6124 <1> partition_table.end equ load_partition_table.end 6125 <1> %define _SCANPTAB_PREFIX 6126 <1> %define _SCANPTAB_DEBUG4_PREFIX 6127 <1> %assign _PARTITION_TABLE_IN_CS 0 6128 <1> %define _BASE bp 6129 <1> %include "scanptab.asm" 6130 <2> 6131 <2> %if 0 6132 <2> 6133 <2> scanptab - Scan partition table 6134 <2> 2019 by C. Masloch 6135 <2> 6136 <2> Usage of the works is permitted provided that this 6137 <2> instrument is retained with the works, so that any entity 6138 <2> that uses the works is notified of this instrument. 6139 <2> 6140 <2> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 6141 <2> 6142 <2> %endif 6143 <2> 6144 <2> ; _SCANPTAB_PREFIX = prefix for our variables and functions 6145 <2> ; _SCANPTAB_DEBUG4_PREFIX = prefix for d4 function calls 6146 <2> numdef PARTITION_TABLE_IN_CS, 1 6147 <2> numdef BOOTCMD_FAIL_ERROR, 1 6148 <2> gendef BASE, ss:bx 6149 <2> %ifidn _BASE, ss:bx 6150 <2> %elifidn _BASE, bp 6151 <2> %else 6152 <2> %error Invalid base 6153 <2> %endif 6154 <2> 6155 <2> 6156 <2> ; INP: byte [%load_unit] = unit to scan 6157 <2> ; cx = function to call for each partition 6158 <2> ; OUT: function called for each partition 6159 <2> ; CHG: di, si, ax, bx, (cx), dx, es 6160 <2> ; STT: ds => data segment (used for %load_* variables, unless bp-based) 6161 <2> ; 6162 <2> ; Note: Calls %read_partition_table (in this module), 6163 <2> ; which calls %read_ae_512_bytes, which calls 6164 <2> ; read_sector. The read_sector base must be 6165 <2> ; zero and the geometry must be initialised. 6166 <2> 6167 <2> ; Function in cx is called with: 6168 <2> ; INP: es:si -> partition table entry, 6169 <2> ; si = %partition_table .. %partition_table+48, 6170 <2> ; es = ss (if not _PARTITION_TABLE_IN_CS) 6171 <2> ; es = cs (if _PARTITION_TABLE_IN_CS) 6172 <2> ; byte [%load_current_partition] = partition number, 6173 <2> ; 0 for diskette (unpartitioned), 6174 <2> ; 1 to 4 for primary partitions, 6175 <2> ; 5+ for logical partitions 6176 <2> ; _BASE + di -> above part table metadata, 6177 <2> ; dword [_BASE + di - 4] = root (outermost extended position) 6178 <2> ; dword [_BASE + di - 8] = base (current table position) 6179 <2> ; dword [es:si + piStart] = local partition start 6180 <2> ; base + local start = absolute partition start 6181 <2> ; _BASE -> bp value (dummy if _BASE is not bp), 6182 <2> ; near return address of scan_partitions 6183 <2> ; CHG: ax, (cx), dx, bx (unless part of _BASE) 6184 <2> ; STT: ds => data segment (used for load_* variables, unless bp-based) 6185 <2> ; Note: preserves (cx), si, di, ds, es, (bp), _BASE 6186 <2> ; 6187 <2> ; Note: If the function returns to scan_partitions, 6188 <2> ; cx must be left as the function to call for 6189 <2> ; subsequent partitions afterwards. 6190 <2> ; Note: May load sp from _BASE then pop bp then return 6191 <2> ; near if the scan should stop after the call. 6192 <2> %[_SCANPTAB_PREFIX]scan_partitions: 6193 000077AD 8326[0C92]00 <2> and word [ %[_SCANPTAB_PREFIX]load_partition_cycle], 0 6194 <2> d4 call %[_SCANPTAB_DEBUG4_PREFIX]d4message 6195 <2> d4 asciz "In scan_partitions",13,10 6196 <2> 6197 000077B2 55 <2> push bp 6198 <2> %ifidn _BASE, ss:bx 6199 <2> mov bx, sp 6200 <2> %elifidn _BASE, bp 6201 000077B3 89E5 <2> mov bp, sp 6202 <2> %endif 6203 000077B5 31FF <2> xor di, di 6204 000077B7 57 <2> push di ; [_BASE+di-2] 6205 000077B8 57 <2> push di ; [_BASE+di-4] 6206 000077B9 57 <2> push di ; [_BASE+di-6] 6207 000077BA 57 <2> push di ; [_BASE+di-8] 6208 <2> 6209 000077BB 803E[208F]80 <2> cmp byte [ %[_SCANPTAB_PREFIX]load_unit], 80h 6210 000077C0 7325 <2> jae @F 6211 <2> 6212 000077C2 57 <2> push di 6213 000077C3 51 <2> push cx 6214 <2> %if _PARTITION_TABLE_IN_CS 6215 <2> push cs 6216 <2> %else 6217 000077C4 16 <2> push ss 6218 <2> %endif 6219 000077C5 07 <2> pop es 6220 000077C6 BF[E08D] <2> mov di, %[_SCANPTAB_PREFIX]partition_table 6221 000077C9 31C0 <2> xor ax, ax 6222 000077CB B92000 <2> mov cx, (4 * 16) >> 1 6223 000077CE F3AB <2> rep stosw ; initialise fake partition table 6224 000077D0 59 <2> pop cx 6225 000077D1 5F <2> pop di 6226 000077D2 BE[E08D] <2> mov si, %[_SCANPTAB_PREFIX]partition_table 6227 <2> ; -> fake PARTINFO 6228 000077D5 26C60480 <2> mov byte [es:si + piBoot], 80h ; fake primary active 6229 000077D9 26C64404FF <2> mov byte [es:si + piType], 0FFh ; fake a type 6230 000077DE C606[1392]00 <2> mov byte [ %[_SCANPTAB_PREFIX]load_current_partition], 0 ; special: 0 = diskette 6231 <2> ; piLength is 0, too 6232 000077E3 FFD1 <2> call cx 6233 <2> 6234 000077E5 EB66 <2> jmp %[_SCANPTAB_PREFIX]scan_logical.end 6235 <2> 6236 <2> 6237 <2> @@: 6238 000077E7 31C0 <2> xor ax, ax 6239 000077E9 31D2 <2> xor dx, dx 6240 <2> d4 call %[_SCANPTAB_DEBUG4_PREFIX]d4message 6241 <2> d4 asciz "In scan_partitions (before first call to read_partition_table)",13,10 6242 000077EB E8DA00 <2> call %[_SCANPTAB_PREFIX]read_partition_table 6243 <2> d4 call %[_SCANPTAB_DEBUG4_PREFIX]d4message 6244 <2> d4 asciz "In scan_partitions (after first call to read_partition_table)",13,10 6245 000077EE BE[E08D] <2> mov si, %[_SCANPTAB_PREFIX]partition_table 6246 000077F1 8816[1392] <2> mov byte [ %[_SCANPTAB_PREFIX]load_current_partition], dl ; = 0 6247 <2> .loop_primary_parts: 6248 000077F5 FE06[1392] <2> inc byte [ %[_SCANPTAB_PREFIX]load_current_partition] 6249 000077F9 26807C0400 <2> cmp byte [es:si + piType], 0 6250 000077FE 7402 <2> je .loop_primary_skip 6251 00007800 FFD1 <2> call cx ; es:si -> partition table entry 6252 <2> ; byte [load_current_partition] = which 6253 <2> .loop_primary_skip: 6254 00007802 83C610 <2> add si, 16 6255 00007805 81FE[208E] <2> cmp si, %[_SCANPTAB_PREFIX]partition_table.end 6256 00007809 72EA <2> jb .loop_primary_parts 6257 <2> 6258 <2> %[_SCANPTAB_PREFIX]scan_logical: 6259 <2> .: 6260 <2> d4 call %[_SCANPTAB_DEBUG4_PREFIX]d4message 6261 <2> d4 asciz "In scan_logical.",13,10 6262 0000780B BE[E08D] <2> mov si, %[_SCANPTAB_PREFIX]partition_table 6263 <2> .loop: 6264 0000780E FF06[0C92] <2> inc word [ %[_SCANPTAB_PREFIX]load_partition_cycle] 6265 00007812 7503E9A500 <2> jz .got_partition_cycle 6266 <2> 6267 00007817 268A4404 <2> mov al, [es:si + piType] 6268 <2> 6269 <2> %ifidn _BASE, bp 6270 0000781B 31DB <2> xor bx, bx 6271 <2> %endif 6272 0000781D 84C0 <2> test al, al 6273 0000781F 741F <2> jz .next 6274 00007821 3C0F <2> cmp al, 0Fh ; extended partition (LBA aware) ? 6275 00007823 742C <2> je .push ; yes --> 6276 00007825 247F <2> and al, ~80h ; extended partition Linux (85h) ? 6277 00007827 3C05 <2> cmp al, 05h ; or extended partition DOS (05h) ? 6278 00007829 7426 <2> je .push ; yes --> 6279 <2> 6280 <2> %ifidn _BASE, bp 6281 0000782B 395BFE <2> cmp word [_BASE+di-2], bx 6282 0000782E 7505 <2> jne .logical 6283 00007830 395BFC <2> cmp word [_BASE+di-4], bx 6284 <2> %else 6285 <2> cmp word [_BASE+di-2], 0 6286 <2> jne .logical 6287 <2> cmp word [_BASE+di-4], 0 6288 <2> %endif 6289 00007833 740B <2> je .next 6290 <2> .logical: 6291 00007835 FE06[1392] <2> inc byte [ %[_SCANPTAB_PREFIX]load_current_partition] 6292 00007839 7503E98400 <2> jz .error_too_many_partitions 6293 0000783E FFD1 <2> call cx 6294 <2> ; CHG: ax, (cx), dx, bx if _BASE = bp 6295 <2> ; preserve: (cx), si, di, ds, es, bx if _BASE = ss:bx 6296 <2> .next: 6297 00007840 83C610 <2> add si, 16 ; -> next partition table entry 6298 00007843 81FE[208E] <2> cmp si, %[_SCANPTAB_PREFIX]partition_table.end 6299 <2> ; was last? 6300 00007847 72C5 <2> jb .loop ; no, loop --> 6301 00007849 85FF <2> test di, di ; still some on stack? 6302 0000784B 7546 <2> jnz .pop ; yes, pop 6303 <2> .end: 6304 <2> %ifidn _BASE, bp 6305 0000784D 89EC <2> mov sp, bp ; restore sp 6306 0000784F 5D <2> pop bp 6307 <2> %else 6308 <2> mov sp, bx ; restore sp 6309 <2> pop ax ; (discard dummy bp value) 6310 <2> %endif 6311 00007850 C3 <2> retn ; and bye 6312 <2> 6313 <2> .push: 6314 <2> d4 call %[_SCANPTAB_DEBUG4_PREFIX]d4message 6315 <2> d4 asciz "In scan_logical.push",13,10 6316 <2> 6317 00007851 56 <2> push si 6318 <2> .push_check_empty_next: 6319 00007852 83C610 <2> add si, 16 ; -> next 6320 00007855 81FE[208E] <2> cmp si, %[_SCANPTAB_PREFIX]partition_table.end 6321 <2> ; at end? 6322 00007859 734A <2> jae .replace ; yes, no other partitions found, replace --> 6323 0000785B 26807C0400 <2> cmp byte [es:si + piType], 0 ; is this a partition? 6324 00007860 74F0 <2> je .push_check_empty_next ; no, check next --> 6325 <2> ; found a partition after this, do push 6326 <2> ; (possibly logical or another extended) 6327 <2> .push_check_is_not_empty: 6328 <2> d4 call %[_SCANPTAB_DEBUG4_PREFIX]d4message 6329 <2> d4 asciz "In scan_logical.push_check_is_not_empty",13,10 6330 00007862 5E <2> pop si ; restore -> partition table entry 6331 00007863 56 <2> push si ; stored at word [_BASE+di-10] 6332 00007864 83EF0A <2> sub di, 10 6333 00007867 FF7308 <2> push word [_BASE+di+10-2] 6334 0000786A FF7306 <2> push word [_BASE+di+10-4] ; copy root 6335 <2> 6336 0000786D 268B4408 <2> mov ax, word [es:si + piStart] 6337 00007871 268B540A <2> mov dx, word [es:si + piStart + 2] ; get extended partition offset 6338 00007875 0343FC <2> add ax, word [_BASE+di-4] 6339 00007878 1353FE <2> adc dx, word [_BASE+di-2] ; add in root to get absolute sector number 6340 <2> 6341 0000787B 52 <2> push dx 6342 0000787C 50 <2> push ax ; new base 6343 <2> 6344 <2> .replace_common: 6345 <2> %ifidn _BASE, bp 6346 0000787D 395BFE <2> cmp word [_BASE+di-2], bx ; have a (nonzero) root? 6347 00007880 750B <2> jne .have_root 6348 00007882 395BFC <2> cmp word [_BASE+di-4], bx 6349 <2> %else 6350 <2> cmp word [_BASE+di-2], 0 ; have a (nonzero) root? 6351 <2> jne .have_root 6352 <2> cmp word [_BASE+di-4], 0 6353 <2> %endif 6354 00007885 7506 <2> jne .have_root ; yes --> 6355 <2> 6356 00007887 8953FE <2> mov word [_BASE+di-2], dx 6357 0000788A 8943FC <2> mov word [_BASE+di-4], ax ; set root 6358 <2> .have_root: 6359 <2> 6360 0000788D E83800 <2> call %[_SCANPTAB_PREFIX]read_partition_table 6361 00007890 E978FF <2> jmp . 6362 <2> 6363 <2> .pop: 6364 <2> d4 call %[_SCANPTAB_DEBUG4_PREFIX]d4message 6365 <2> d4 asciz "In scan_logical.pop",13,10 6366 <2> 6367 00007893 83C70A <2> add di, 10 6368 00007896 83C408 <2> add sp, 8 6369 00007899 5E <2> pop si 6370 <2> 6371 0000789A 8B43F8 <2> mov ax, word [_BASE+di-8] 6372 0000789D 8B53FA <2> mov dx, word [_BASE+di-6] 6373 000078A0 E82500 <2> call %[_SCANPTAB_PREFIX]read_partition_table 6374 000078A3 EB9B <2> jmp .next 6375 <2> 6376 <2> .replace: 6377 <2> d4 call %[_SCANPTAB_DEBUG4_PREFIX]d4message 6378 <2> d4 asciz "In scan_logical.replace",13,10 6379 <2> 6380 000078A5 5E <2> pop si ; (discard) 6381 000078A6 268B4408 <2> mov ax, word [es:si + piStart] 6382 000078AA 268B540A <2> mov dx, word [es:si + piStart + 2] ; get extended partition offset 6383 000078AE 0343FC <2> add ax, word [_BASE+di - 4] 6384 000078B1 1353FE <2> adc dx, word [_BASE+di - 2] ; add in root 6385 000078B4 8943F8 <2> mov word [_BASE+di - 8], ax 6386 000078B7 8953FA <2> mov word [_BASE+di - 6], dx ; set base 6387 <2> 6388 000078BA EBC1 <2> jmp .replace_common 6389 <2> 6390 <2> 6391 <2> %if _BOOTCMD_FAIL_ERROR 6392 <2> .got_partition_cycle: 6393 000078BC BA[FB61] <2> mov dx, msg.boot_partition_cycle_error 6394 000078BF E944ED <2> jmp bootcmd.fail 6395 <2> 6396 <2> .error_too_many_partitions: 6397 000078C2 BA[D861] <2> mov dx, msg.boot_too_many_partitions_error 6398 000078C5 E93EED <2> jmp bootcmd.fail 6399 <2> %endif 6400 <2> 6401 <2> 6402 <2> ; if _PARTITION_TABLE_IN_CS: 6403 <2> ; INP: dx:ax = partition table sector to read 6404 <2> ; CHG: ax, dx 6405 <2> ; OUT: es = cs 6406 <2> ; 64 bytes [es:partition_table] = partition table 6407 <2> ; does not return if error 6408 <2> 6409 <2> ; else: 6410 <2> ; INP: dx:ax = partition table sector to read 6411 <2> ; CHG: ax, dx 6412 <2> ; OUT: es = ss 6413 <2> ; 64 bytes [es:partition_table] = partition table 6414 <2> ; does not return if error 6415 <2> %[_SCANPTAB_PREFIX]read_partition_table: 6416 000078C8 53 <2> push bx 6417 <2> %ifidn _BASE, bp 6418 000078C9 8B1E[FA09] <2> mov bx, word [auxbuff_segorsel] ; bx => auxbuff 6419 <2> %else 6420 <2> mov bx, word [bp + ldSectorSeg] 6421 <2> %endif 6422 000078CD E83B02 <2> call %[_SCANPTAB_PREFIX]read_ae_512_bytes 6423 000078D0 5B <2> pop bx 6424 000078D1 26813EFE0155AA <2> cmp word [es:510], 0AA55h 6425 000078D8 7518 <2> jne .signature_fail 6426 000078DA 1E <2> push ds 6427 000078DB 57 <2> push di 6428 000078DC 56 <2> push si 6429 000078DD 51 <2> push cx 6430 000078DE 06 <2> push es 6431 000078DF 1F <2> pop ds 6432 000078E0 BEBE01 <2> mov si, 510 - 4*16 ; ds:si -> partition table in sectorseg 6433 <2> %if _PARTITION_TABLE_IN_CS 6434 <2> push cs 6435 <2> %else 6436 000078E3 16 <2> push ss 6437 <2> %endif 6438 000078E4 07 <2> pop es 6439 000078E5 BF[E08D] <2> mov di, %[_SCANPTAB_PREFIX]partition_table 6440 <2> ; es:di -> cs:%[_SCANPTAB_PREFIX]partition_table 6441 000078E8 B92000 <2> mov cx, 4*16 / 2 6442 000078EB F3A5 <2> rep movsw 6443 000078ED 59 <2> pop cx 6444 000078EE 5E <2> pop si 6445 000078EF 5F <2> pop di 6446 000078F0 1F <2> pop ds 6447 000078F1 C3 <2> retn 6448 <2> 6449 <2> 6450 <2> %if _BOOTCMD_FAIL_ERROR 6451 <2> .signature_fail: 6452 000078F2 BA[E760] <2> mov dx, msg.bootfail_sig_parttable 6453 000078F5 E90EED <2> jmp bootcmd.fail 6454 <2> %endif 6130 <1> 6131 <1> 6132 <1> ; INP: al = first character 6133 <1> ; si -> next 6134 <1> ; OUT: doesn't return if error 6135 <1> ; bx:dx = number read 6136 <1> ; al = character after the number 6137 <1> ; si -> next 6138 <1> ; CHG: cx, ax, di 6139 <1> boot_get_decimal_literal: 6140 000078F8 BA0A00 <1> mov dx, 10 ; set base: decimal 6141 <1> %if 1 6142 000078FB B93940 <1> mov cx, '9' | (('A'-10-1 + 10) << 8) 6143 <1> %else 6144 <1> mov cl, dl 6145 <1> add cl, '0'-1 6146 <1> cmp cl, '9' 6147 <1> jbe .lit_basebelow11 6148 <1> mov cl, '9' 6149 <1> .lit_basebelow11: ; cl = highest decimal digit for base ('1'..'9') 6150 <1> mov ch, dl 6151 <1> add ch, 'A'-10-1 ; ch = highest letter for base ('A'-x..'Z') 6152 <1> %endif 6153 000078FE EB06 <1> jmp @F 6154 <1> 6155 <1> 6156 <1> boot_get_hexadecimal_literal: 6157 00007900 BA1000 <1> mov dx, 16 ; set base: hexadecimal 6158 <1> %if 1 6159 00007903 B93946 <1> mov cx, '9' | (('A'-10-1 + 16) << 8) 6160 <1> %else 6161 <1> mov cl, dl 6162 <1> add cl, '0'-1 6163 <1> cmp cl, '9' 6164 <1> jbe .lit_basebelow11 6165 <1> mov cl, '9' 6166 <1> .lit_basebelow11: ; cl = highest decimal digit for base ('1'..'9') 6167 <1> mov ch, dl 6168 <1> add ch, 'A'-10-1 ; ch = highest letter for base ('A'-x..'Z') 6169 <1> %endif 6170 <1> 6171 <1> @@: 6172 00007906 B400 <1> mov ah, 0 6173 00007908 31DB <1> xor bx, bx 6174 0000790A 89D7 <1> mov di, dx ; di = base 6175 <1> 6176 0000790C E8C040 <1> call getexpression.lit_isdigit? ; first character must be a digit 6177 0000790F 7241 <1> jc .err2 6178 00007911 31D2 <1> xor dx, dx ; initialize value 6179 <1> .lit_loopdigit: 6180 00007913 3C5F <1> cmp al, '_' 6181 00007915 7432 <1> je .lit_skip 6182 00007917 E8B540 <1> call getexpression.lit_isdigit? ; was last character ? 6183 0000791A 7230 <1> jc .lit_end ; yes --> 6184 0000791C E8FC14 <1> call uppercase 6185 0000791F 2C30 <1> sub al, '0' 6186 00007921 3C09 <1> cmp al, 9 ; was decimal digit ? 6187 00007923 7602 <1> jbe .lit_decimaldigit ; yes --> 6188 00007925 2C07 <1> sub al, 'A'-('9'+1) ; else adjust for hexadecimal digit 6189 <1> .lit_decimaldigit: 6190 00007927 50 <1> push ax 6191 00007928 89D0 <1> mov ax, dx 6192 0000792A 53 <1> push bx 6193 0000792B F7E7 <1> mul di ; multiply low word with base 6194 0000792D 89D3 <1> mov bx, dx 6195 0000792F 89C2 <1> mov dx, ax 6196 00007931 58 <1> pop ax 6197 00007932 52 <1> push dx 6198 00007933 F7E7 <1> mul di ; multiply high word with base 6199 00007935 85D2 <1> test dx, dx 6200 00007937 5A <1> pop dx 6201 00007938 7518 <1> jnz .err2 ; overflow --> 6202 0000793A 01C3 <1> add bx, ax ; add them 6203 0000793C 58 <1> pop ax 6204 0000793D 7213 <1> jc .err2 ; overflow --> 6205 0000793F 00C2 <1> add dl, al ; add in the new digit 6206 00007941 80D600 <1> adc dh, 0 6207 00007944 83D300 <1> adc bx, byte 0 6208 00007947 7209 <1> jc .err2 ; overflow --> 6209 <1> 6210 <1> .lit_skip: 6211 00007949 AC <1> lodsb 6212 0000794A EBC7 <1> jmp short .lit_loopdigit 6213 <1> 6214 <1> .lit_end: 6215 0000794C E80133 <1> call isseparator? ; after the number, there must be a separator 6216 0000794F 7501 <1> jne .err2 ; none here --> 6217 00007951 C3 <1> retn 6218 <1> 6219 <1> .err2: 6220 00007952 E9F52D <1> jmp error 6221 <1> 6222 <1> 6223 <1> query_geometry: 6224 00007955 E8038C <1> call guard_auxbuff 6225 00007958 8A16[208F] <1> mov dl, [load_unit] 6226 <1> ; test dl, dl ; floppy? 6227 <1> ; jns @F ; don't attempt query, might fail --> 6228 <1> ; Note that while the original PC BIOS doesn't support this function 6229 <1> ; (for its diskettes), it does properly return the error code 01h. 6230 <1> ; https://sites.google.com/site/pcdosretro/ibmpcbios (IBM PC version 1) 6231 0000795C B408 <1> mov ah, 08h 6232 0000795E 31C9 <1> xor cx, cx ; initialise cl to 0 6233 00007960 890E[FA8E] <1> mov [load_heads], cx 6234 00007964 890E[F88E] <1> mov [load_sectors], cx 6235 00007968 F9 <1> stc ; initialise to CY 6236 00007969 E83701 <1> call .int13_retry ; query drive geometry 6237 0000796C 720C <1> jc .try_bootsector ; apparently failed --> 6238 0000796E 88F2 <1> mov dl, dh 6239 00007970 B600 <1> mov dh, 0 ; dx = maximum head number 6240 00007972 42 <1> inc dx ; dx = number of heads (H is 0-based) 6241 00007973 89C8 <1> mov ax, cx ; ax & 3Fh = maximum sector number 6242 00007975 83E03F <1> and ax, 3Fh ; get sectors (number of sectors, S is 1-based) 6243 00007978 7523 <1> jnz .got_sectors_heads ; valid (S is 1-based), use these --> 6244 <1> ; zero = invalid 6245 <1> .try_bootsector: 6246 0000797A 8E06[FA09] <1> mov es, word [auxbuff_segorsel] ; es => auxbuff 6247 0000797E 31DB <1> xor bx, bx ; es:bx -> auxbuff 6248 00007980 B80102 <1> mov ax, 0201h ; read sector, 1 sector 6249 00007983 B90100 <1> mov cx, 1 ; sector 1 (1-based!), cylinder 0 (0-based) 6250 00007986 B600 <1> mov dh, 0 ; head 0 (0-based) 6251 00007988 8A16[208F] <1> mov dl, [load_unit] 6252 0000798C F9 <1> stc 6253 0000798D E81301 <1> call .int13_retry 6254 00007990 7303E92B01 <1> jc .access_error 6255 <1> 6256 <1> ; note: the smallest supported sector size, 32 bytes, 6257 <1> ; does contain these entries (offset 18h and 1Ah in sector) 6258 <1> ; within the first BPB sector. 6259 00007995 268B4718 <1> mov ax, word [es:bx + bsBPB + bpbCHSSectors] 6260 00007999 268B571A <1> mov dx, word [es:bx + bsBPB + bpbCHSHeads] 6261 <1> 6262 <1> .got_sectors_heads: 6263 0000799D A3[F88E] <1> mov word [load_sectors], ax 6264 000079A0 8916[FA8E] <1> mov word [load_heads], dx 6265 <1> 6266 000079A4 85C0 <1> test ax, ax 6267 000079A6 7503E93B01 <1> jz .invalid_sectors 6268 000079AB 83F83F <1> cmp ax, 63 6269 000079AE 7603E93301 <1> ja .invalid_sectors 6270 000079B3 85D2 <1> test dx, dx 6271 000079B5 7503E93301 <1> jz .invalid_heads 6272 000079BA 81FA0001 <1> cmp dx, 100h 6273 000079BE 7603E92A01 <1> ja .invalid_heads 6274 <1> 6275 000079C3 8E06[FA09] <1> mov es, word [auxbuff_segorsel] ; es => auxbuff 6276 000079C7 31DB <1> xor bx, bx ; es:bx -> auxbuff 6277 000079C9 31C0 <1> xor ax, ax 6278 <1> 6279 <1> %if _AUXBUFFSIZE < 8192+2 6280 <1> %error Expecting to use auxbuff as sector size detection buffer 6281 <1> %endif 6282 <1> 6283 <1> d5 call d5dumpregs 6284 <1> d5 call d5message 6285 <1> d5 asciz 13,10,"In query_geometry 0",13,10 6286 <1> 6287 000079CB 89DF <1> mov di, bx 6288 000079CD B90110 <1> mov cx, (8192 + 2) >> 1 6289 <1> ; es:bx -> auxbuff, es:di = same 6290 000079D0 F3AB <1> rep stosw ; fill buffer, di -> behind (auxbuff+8192+2) 6291 000079D2 B80102 <1> mov ax, 0201h ; read sector, 1 sector 6292 000079D5 41 <1> inc cx ; sector 1 (1-based!), cylinder 0 (0-based) 6293 000079D6 B600 <1> mov dh, 0 ; head 0 (0-based) 6294 000079D8 8A16[208F] <1> mov dl, [load_unit] 6295 000079DC F9 <1> stc 6296 000079DD E8C300 <1> call .int13_retry 6297 000079E0 7303E9DB00 <1> jc .access_error 6298 <1> 6299 000079E5 FD <1> std ; _AMD_ERRATUM_109_WORKAROUND does not apply 6300 000079E6 AF <1> scasw ; -> auxbuff+8192 (at last word to sca) 6301 <1> d5 call d5dumpregs 6302 <1> d5 call d5message 6303 <1> d5 asciz 13,10,"In query_geometry 1",13,10 6304 000079E7 B90110 <1> mov cx, (8192 + 2) >> 1 6305 000079EA 31C0 <1> xor ax, ax 6306 000079EC F3AF <1> repe scasw 6307 000079EE 83C704 <1> add di, 4 ; di -> first differing byte (from top) 6308 000079F1 FC <1> cld 6309 000079F2 57 <1> push di 6310 <1> 6311 000079F3 89DF <1> mov di, bx 6312 000079F5 B90110 <1> mov cx, (8192 + 2) >> 1 6313 000079F8 48 <1> dec ax ; = FFFFh 6314 000079F9 F3AB <1> rep stosw 6315 <1> 6316 000079FB B80102 <1> mov ax, 0201h 6317 000079FE 41 <1> inc cx 6318 000079FF B600 <1> mov dh, 0 6319 00007A01 8A16[208F] <1> mov dl, [load_unit] 6320 00007A05 F9 <1> stc 6321 00007A06 E89A00 <1> call .int13_retry 6322 00007A09 7303E9B200 <1> jc .access_error 6323 <1> 6324 00007A0E FD <1> std ; _AMD_ERRATUM_109_WORKAROUND does not apply 6325 00007A0F AF <1> scasw ; di -> auxbuff+8192 (last word to sca) 6326 <1> d5 call d5dumpregs 6327 <1> d5 call d5message 6328 <1> d5 asciz 13,10,"In query_geometry 2",13,10 6329 00007A10 5A <1> pop dx 6330 00007A11 B8FFFF <1> mov ax, -1 6331 00007A14 B90110 <1> mov cx, (8192 + 2) >> 1 6332 00007A17 F3AF <1> repe scasw 6333 <1> %if 0 6334 <1> AAAB 6335 <1> ^ 6336 <1> sca B, match 6337 <1> ^ 6338 <1> sca B, mismatch 6339 <1> ^ 6340 <1> stop 6341 <1> %endif 6342 00007A19 83C704 <1> add di, 4 ; di -> first differing byte (from top) 6343 00007A1C FC <1> cld 6344 <1> 6345 <1> %if 0 6346 <1> 0000000000000 6347 <1> AAAAAAAA00000 6348 <1> ^ 6349 <1> FFFFFFFFFFFFF 6350 <1> AAAAAAAA00FFF 6351 <1> ^ 6352 <1> %endif 6353 00007A1D 39FA <1> cmp dx, di ; choose the higher one 6354 00007A1F 7302 <1> jae @F 6355 00007A21 89FA <1> mov dx, di 6356 <1> @@: 6357 00007A23 29DA <1> sub dx, bx ; dx = sector size 6358 <1> 6359 <1> d5 call d5dumpregs 6360 <1> d5 call d5message 6361 <1> d5 asciz 13,10,"In query_geometry 3",13,10 6362 <1> 6363 00007A25 81FA0220 <1> cmp dx, 8192 + 2 6364 00007A29 7203E9A300 <1> jae .sector_too_large 6365 00007A2E B82000 <1> mov ax, 32 6366 00007A31 39C2 <1> cmp dx, ax 6367 00007A33 7303E9A000 <1> jb .sector_too_small 6368 <1> @@: 6369 00007A38 39C2 <1> cmp dx, ax 6370 00007A3A 740C <1> je .got_match 6371 00007A3C 3D0020 <1> cmp ax, 8192 6372 00007A3F 7203E99B00 <1> jae .sector_not_power 6373 00007A44 D1E0 <1> shl ax, 1 6374 00007A46 EBF0 <1> jmp @B 6375 <1> 6376 <1> .got_match: 6377 00007A48 A3[EB8E] <1> mov word [load_sectorsize], ax 6378 00007A4B B104 <1> mov cl, 4 6379 00007A4D D3E8 <1> shr ax, cl 6380 00007A4F A3[CA8E] <1> mov word [load_sectorsizepara], ax 6381 <1> 6382 00007A52 C606[C78E]00 <1> mov byte [load_ldflags], 0 6383 00007A57 8A16[208F] <1> mov dl, [load_unit] 6384 00007A5B 31DB <1> xor bx, bx 6385 00007A5D 88D3 <1> mov bl, dl 6386 00007A5F F687[E08C]01 <1> testopt [load_unit_flags + bx], lufForceCHS 6387 00007A64 7519 <1> jnz .no_lba 6388 00007A66 B441 <1> mov ah, 41h 6389 00007A68 BBAA55 <1> mov bx, 55AAh 6390 00007A6B F9 <1> stc 6391 00007A6C CD13 <1> int 13h ; 13.41.bx=55AA extensions installation check 6392 00007A6E 720F <1> jc .no_lba 6393 00007A70 81FB55AA <1> cmp bx, 0AA55h 6394 00007A74 7509 <1> jne .no_lba 6395 00007A76 F6C101 <1> test cl, 1 ; support bitmap bit 0 6396 00007A79 7404 <1> jz .no_lba 6397 <1> 6398 <1> %if ldfHasLBA != 1 6399 <1> %error Assuming ldfHasLBA is 1 6400 <1> %endif 6401 00007A7B FE06[C78E] <1> inc byte [load_ldflags] 6402 <1> .no_lba: 6403 <1> 6404 00007A7F A1[FA09] <1> mov ax, word [auxbuff_segorsel] ; ax => auxbuff 6405 00007A82 89C2 <1> mov dx, ax 6406 00007A84 81C2FF01 <1> add dx, (8192 - 16) >> 4 6407 00007A88 89C3 <1> mov bx, ax 6408 00007A8A 89D1 <1> mov cx, dx 6409 00007A8C 81E300F0 <1> and bx, 0F000h 6410 00007A90 81E100F0 <1> and cx, 0F000h 6411 00007A94 39D9 <1> cmp cx, bx 6412 00007A96 7504 <1> jne @F 6413 00007A98 A3[C48E] <1> mov word [load_sectorseg], ax 6414 00007A9B C3 <1> retn 6415 <1> 6416 <1> @@: 6417 00007A9C BA[EB63] <1> mov dx, msg.boot_auxbuff_crossing 6418 00007A9F B020 <1> mov al, 20h 6419 00007AA1 EB4F <1> jmp .error_common_j 6420 <1> 6421 <1> 6422 <1> .int13_retry: 6423 00007AA3 9C <1> pushf 6424 00007AA4 50 <1> push ax 6425 00007AA5 CD13 <1> int 13h ; first try 6426 00007AA7 730B <1> jnc @F ; NC, success on first attempt --> 6427 <1> 6428 <1> ; reset drive 6429 00007AA9 31C0 <1> xor ax, ax 6430 00007AAB CD13 <1> int 13h 6431 00007AAD 7205 <1> jc @F ; CY, reset failed, error in ah --> 6432 <1> 6433 <1> ; try read again 6434 00007AAF 58 <1> pop ax ; restore function number 6435 00007AB0 9D <1> popf ; CF 6436 00007AB1 CD13 <1> int 13h ; retry, CF error status, ah error number 6437 00007AB3 C3 <1> retn 6438 <1> 6439 <1> @@: ; NC or CY, stack has function number 6440 00007AB4 44 <1> inc sp 6441 00007AB5 44 <1> inc sp 6442 00007AB6 44 <1> inc sp 6443 00007AB7 44 <1> inc sp ; discard two words on stack, preserve CF 6444 00007AB8 C3 <1> retn 6445 <1> 6446 <1> 6447 <1> .out_of_memory_error: 6448 00007AB9 BA[C761] <1> mov dx, msg.boot_out_of_memory_error 6449 00007ABC B021 <1> mov al, 21h 6450 00007ABE EB32 <1> jmp .error_common_j 6451 <1> .access_error: 6452 <1> %if _INPUT_FILE_BOOT 6453 00007AC0 F606[A700]08 <1> testopt [internalflags3], dif3_in_if 6454 00007AC5 7403E9BD17 <1> jnz if_exists_not_found 6455 <1> %endif 6456 00007ACA BA[3462] <1> mov dx, msg.boot_access_error 6457 00007ACD B022 <1> mov al, 22h 6458 00007ACF EB21 <1> jmp .error_common_j 6459 <1> .sector_too_large: 6460 00007AD1 BA[4262] <1> mov dx, msg.boot_sector_too_large 6461 00007AD4 B023 <1> mov al, 23h 6462 00007AD6 EB1A <1> jmp .error_common_j 6463 <1> .sector_too_small: 6464 00007AD8 BA[6862] <1> mov dx, msg.boot_sector_too_small 6465 00007ADB B024 <1> mov al, 24h 6466 00007ADD EB13 <1> jmp .error_common_j 6467 <1> .sector_not_power: 6468 00007ADF BA[9062] <1> mov dx, msg.boot_sector_not_power 6469 00007AE2 B025 <1> mov al, 25h 6470 00007AE4 EB0C <1> jmp .error_common_j 6471 <1> .invalid_sectors: 6472 00007AE6 BA[B262] <1> mov dx, msg.boot_invalid_sectors 6473 00007AE9 B026 <1> mov al, 26h 6474 00007AEB EB05 <1> jmp .error_common_j 6475 <1> .invalid_heads: 6476 00007AED BA[CE62] <1> mov dx, msg.boot_invalid_heads 6477 00007AF0 B027 <1> mov al, 27h 6478 <1> .error_common_j: 6479 00007AF2 B402 <1> mov ah, 02h 6480 00007AF4 E89A2C <1> call setrc 6481 00007AF7 E90CEB <1> jmp bootcmd.fail 6482 <1> 6483 <1> 6484 <1> ; INP: dx:ax = first sector 6485 <1> ; bx:0 -> buffer 6486 <1> ; OUT: dx:ax = sector number after last read 6487 <1> ; es = input bx 6488 <1> ; bx:0 -> buffer after last written 6489 <1> ; CHG: - 6490 <1> ; STT: ds = ss 6491 <1> read_ae_1536_bytes: 6492 00007AFA 51 <1> push cx 6493 00007AFB 53 <1> push bx 6494 00007AFC B90006 <1> mov cx, 1536 6495 <1> .loop: 6496 00007AFF E81B00 <1> call read_sector 6497 00007B02 2B0E[EB8E] <1> sub cx, word [load_data - LOADDATA2 + bsBPB + bpbBytesPerSector] 6498 00007B06 77F7 <1> ja .loop 6499 00007B08 07 <1> pop es 6500 00007B09 59 <1> pop cx 6501 00007B0A C3 <1> retn 6502 <1> 6503 <1> ; INP: dx:ax = first sector 6504 <1> ; bx:0 -> buffer 6505 <1> ; OUT: dx:ax = sector number after last read 6506 <1> ; es = input bx 6507 <1> ; bx:0 -> buffer after last written 6508 <1> ; CHG: - 6509 <1> ; STT: ds = ss 6510 <1> read_ae_512_bytes: 6511 00007B0B 51 <1> push cx 6512 00007B0C 53 <1> push bx 6513 00007B0D B90002 <1> mov cx, 512 6514 <1> .loop: 6515 00007B10 E80A00 <1> call read_sector 6516 00007B13 2B0E[EB8E] <1> sub cx, word [load_data - LOADDATA2 + bsBPB + bpbBytesPerSector] 6517 00007B17 77F7 <1> ja .loop 6518 00007B19 07 <1> pop es 6519 00007B1A 59 <1> pop cx 6520 00007B1B C3 <1> retn 6521 <1> 6522 <1> 6523 <1> ; Write a sector using Int13.03 or Int13.43 6524 <1> ; 6525 <1> ; Protocol as for read_sector 6526 <1> write_sector: 6527 00007B1C A8 <1> db __TEST_IMM8 ; (skip stc, NC) 6528 <1> 6529 <1> ; Read a sector using Int13.02 or Int13.42 6530 <1> ; 6531 <1> ; INP: dx:ax = sector number (within partition) 6532 <1> ; bx:0-> buffer 6533 <1> ; (_LBA) ds = ss 6534 <1> ; dword[load_data - LOADDATA2 + bsBPB + bpbHiddenSectors] 6535 <1> ; = base sector number (dx:ax is added to this to get 6536 <1> ; the absolute sector number in the selected unit.) 6537 <1> ; OUT: If unable to read, 6538 <1> ; ! jumps to error instead of returning 6539 <1> ; If sector has been read, 6540 <1> ; dx:ax = next sector number (has been incremented) 6541 <1> ; bx:0-> next buffer (bx = es+word[load_sectorsizepara]) 6542 <1> ; es = input bx 6543 <1> ; CHG: - 6544 <1> ; 6545 <1> ; Note: If error 09h (data boundary error) is returned, 6546 <1> ; the read is done into the load_sectorseg buffer, 6547 <1> ; then copied into the user buffer. 6548 <1> read_sector: 6549 00007B1D F9 <1> stc 6550 <1> 6551 <1> read_sector_CY_or_write_sector_NC: 6552 <1> lframe near 6553 00007B1E 5589E5 <1> lenter 6554 <1> lvar word, is_read_bit0 6555 00007B21 9C <1> pushf 6556 <1> 6557 <1> .err: equ bootcmd.fail_read 6558 <1> d5 call d5dumpregs 6559 <1> d5 call d5message 6560 <1> d5 asciz 13,10,"In read_sector",13,10 6561 <1> 6562 00007B22 52 <1> push dx 6563 00007B23 51 <1> push cx 6564 00007B24 50 <1> push ax 6565 00007B25 56 <1> push si 6566 <1> 6567 00007B26 53 <1> push bx 6568 <1> 6569 <1> ; DX:AX==LBA sector number 6570 <1> ; add partition start (= number of hidden sectors) 6571 00007B27 0306[FC8E] <1> add ax,[load_data - LOADDATA2 + bsBPB + bpbHiddenSectors + 0] 6572 00007B2B 1316[FE8E] <1> adc dx,[load_data - LOADDATA2 + bsBPB + bpbHiddenSectors + 2] 6573 <1> 6574 00007B2F 19F6 <1> sbb si, si ; -1 if was CY, 0 else 6575 00007B31 F7DE <1> neg si ; 1 if was CY, 0 else 6576 00007B33 31C9 <1> xor cx, cx 6577 00007B35 51 <1> push cx 6578 00007B36 56 <1> push si ; bit 32 = 1 if operating in 33-bit space 6579 00007B37 52 <1> push dx 6580 00007B38 50 <1> push ax ; qword sector number (lpSector) 6581 00007B39 53 <1> push bx 6582 00007B3A 51 <1> push cx ; bx:0 -> buffer (lpBuffer) 6583 00007B3B 41 <1> inc cx 6584 00007B3C 51 <1> push cx ; word number of sectors to read (lpCount) 6585 00007B3D B110 <1> mov cl, 10h 6586 00007B3F 51 <1> push cx ; word size of disk address packet (lpSize) 6587 00007B40 89E6 <1> mov si, sp ; ds:si -> disk address packet (on stack) 6588 <1> 6589 00007B42 F606[C78E]01 <1> test byte [load_data - LOADDATA2 + ldFlags], ldfHasLBA 6590 00007B47 7503E9BB00 <1> jz .no_lba 6591 <1> 6592 <1> d5 call d5message 6593 <1> d5 asciz "In read_sector.lba",13,10 6594 <1> 6595 00007B4C 8A16[208F] <1> mov dl, byte [load_unit] 6596 00007B50 E89A01 <1> call .set_ah_function_42_or_43 6597 00007B53 CD13 <1> int 13h ; 13.42 extensions read 6598 00007B55 7203E9A600 <1> jnc .lba_done 6599 <1> 6600 00007B5A 31C0 <1> xor ax, ax 6601 00007B5C CD13 <1> int 13h 6602 00007B5E 7303E991EA <1> jc .lba_error 6603 <1> 6604 <1> ; have to reset the LBAPACKET's lpCount, as the handler may 6605 <1> ; set it to "the number of blocks successfully transferred". 6606 <1> ; (in any case, the high byte is still zero.) 6607 00007B63 C6440201 <1> mov byte [si + lpCount], 1 6608 <1> 6609 00007B67 E88301 <1> call .set_ah_function_42_or_43 6610 00007B6A CD13 <1> int 13h 6611 00007B6C 7203E98F00 <1> jnc .lba_done 6612 <1> 6613 00007B71 80FC09 <1> cmp ah, 9 ; data boundary error? 6614 00007B74 7403E97BEA <1> jne .lba_error 6615 <1> 6616 <1> .lba_sectorseg: 6617 <1> d4 call d4dumpregs 6618 <1> d4 call d4message 6619 <1> d4 asciz 13,10,"In read_sector.lba_sectorseg",13,10 6620 <1> 6621 00007B79 F646FE01 <1> test byte [bp + ?is_read_bit0], 1 6622 00007B7D 7542 <1> jnz .lba_sectorseg_read 6623 <1> 6624 <1> .lba_sectorseg_write: 6625 00007B7F 1E <1> push ds 6626 00007B80 56 <1> push si 6627 00007B81 06 <1> push es 6628 00007B82 57 <1> push di 6629 00007B83 8B0E[EB8E] <1> mov cx, word [load_sectorsize] 6630 00007B87 8E06[C48E] <1> mov es, word [load_sectorseg] ; => sectorseg 6631 <1> ; lds si, [si + lpBuffer + 0] 6632 00007B8B 8E5C06 <1> mov ds, word [si + lpBuffer + 2]; => user buffer 6633 00007B8E 31F6 <1> xor si, si 6634 00007B90 31FF <1> xor di, di 6635 00007B92 F3A4 <1> rep movsb ; copy data into sectorseg 6636 00007B94 5F <1> pop di 6637 00007B95 07 <1> pop es 6638 00007B96 5E <1> pop si 6639 00007B97 1F <1> pop ds 6640 <1> 6641 00007B98 FF36[C48E] <1> push word [load_sectorseg] 6642 00007B9C 8F4406 <1> pop word [si + lpBuffer + 2] ; => sectorseg 6643 <1> ; and word [si + lpBuffer + 0], byte 0 6644 <1> 6645 00007B9F C6440201 <1> mov byte [si + lpCount], 1 6646 00007BA3 B443 <1> mov ah, 43h 6647 00007BA5 CD13 <1> int 13h 6648 00007BA7 7316 <1> jnc @F 6649 <1> 6650 00007BA9 31C0 <1> xor ax, ax 6651 00007BAB CD13 <1> int 13h 6652 00007BAD 7303E942EA <1> jc .lba_error 6653 <1> 6654 00007BB2 C6440201 <1> mov byte [si + lpCount], 1 6655 00007BB6 B443 <1> mov ah, 43h 6656 00007BB8 CD13 <1> int 13h 6657 00007BBA 7303E935EA <1> jc .lba_error 6658 <1> @@: 6659 00007BBF EB3F <1> jmp .lba_done 6660 <1> 6661 <1> 6662 <1> .lba_sectorseg_read: 6663 <1> ; the offset part of the pointer is already zero! 6664 <1> ; push word [si + lpBuffer + 0] 6665 00007BC1 FF7406 <1> push word [si + lpBuffer + 2] ; user buffer 6666 00007BC4 FF36[C48E] <1> push word [load_sectorseg] 6667 00007BC8 8F4406 <1> pop word [si + lpBuffer + 2] 6668 <1> ; and word [si + lpBuffer + 0], byte 0 6669 <1> 6670 00007BCB C6440201 <1> mov byte [si + lpCount], 1 6671 00007BCF E81B01 <1> call .set_ah_function_42_or_43 6672 00007BD2 CD13 <1> int 13h 6673 00007BD4 7317 <1> jnc .lba_sectorseg_done 6674 <1> 6675 00007BD6 31C0 <1> xor ax, ax 6676 00007BD8 CD13 <1> int 13h 6677 00007BDA 7303E915EA <1> jc .lba_error 6678 <1> 6679 00007BDF C6440201 <1> mov byte [si + lpCount], 1 6680 00007BE3 E80701 <1> call .set_ah_function_42_or_43 6681 00007BE6 CD13 <1> int 13h 6682 00007BE8 7303E907EA <1> jc .lba_error 6683 <1> .lba_sectorseg_done: 6684 <1> 6685 00007BED 31F6 <1> xor si, si 6686 00007BEF 8E1E[C48E] <1> mov ds, word [load_sectorseg] 6687 00007BF3 07 <1> pop es 6688 <1> ; pop cx 6689 00007BF4 57 <1> push di 6690 <1> ; mov di, cx 6691 00007BF5 31FF <1> xor di, di 6692 00007BF7 8B0E[EB8E] <1> mov cx, word [load_sectorsize] 6693 00007BFB F3A4 <1> rep movsb 6694 00007BFD 5F <1> pop di 6695 <1> 6696 00007BFE 16 <1> push ss 6697 00007BFF 1F <1> pop ds 6698 <1> .lba_done: 6699 00007C00 83C410 <1> add sp, 10h 6700 00007C03 5B <1> pop bx 6701 00007C04 E9D400 <1> jmp .chs_done 6702 <1> 6703 <1> .lba_error: equ .err 6704 <1> 6705 <1> .no_lba: 6706 00007C07 83C408 <1> add sp, 8 6707 00007C0A 58 <1> pop ax 6708 00007C0B 5A <1> pop dx 6709 00007C0C 5E <1> pop si 6710 00007C0D 59 <1> pop cx 6711 00007C0E 85F6 <1> test si, si 6712 00007C10 7403E9DFE9 <1> jnz .err 6713 <1> 6714 <1> ; DX:AX=LBA sector number 6715 <1> ; divide by number of sectors per track to get sector number 6716 <1> ; Use 32:16 DIV instead of 64:32 DIV for 8088 compatability 6717 <1> ; Use two-step 32:16 divide to avoid overflow 6718 00007C15 89C1 <1> mov cx,ax 6719 00007C17 89D0 <1> mov ax,dx 6720 00007C19 31D2 <1> xor dx,dx 6721 00007C1B F736[F88E] <1> div word [load_sectors] 6722 00007C1F 91 <1> xchg cx,ax 6723 00007C20 F736[F88E] <1> div word [load_sectors] 6724 00007C24 87CA <1> xchg cx,dx 6725 <1> 6726 <1> ; DX:AX=quotient, CX=remainder=sector (S) - 1 6727 <1> ; divide quotient by number of heads 6728 00007C26 89C3 <1> mov bx, ax 6729 00007C28 92 <1> xchg ax, dx 6730 00007C29 31D2 <1> xor dx, dx 6731 00007C2B F736[FA8E] <1> div word [load_heads] 6732 00007C2F 93 <1> xchg bx, ax 6733 00007C30 F736[FA8E] <1> div word [load_heads] 6734 <1> 6735 <1> ; bx:ax=quotient=cylinder (C), dx=remainder=head (H) 6736 <1> ; move variables into registers for INT 13h AH=02h 6737 00007C34 88D6 <1> mov dh, dl ; dh = head 6738 00007C36 41 <1> inc cx ; cl5:0 = sector 6739 00007C37 86E8 <1> xchg ch, al ; ch = cylinder 7:0, al = 0 6740 00007C39 D1E8 <1> shr ax, 1 6741 00007C3B D1E8 <1> shr ax, 1 ; al7:6 = cylinder 9:8 6742 <1> ; bx has bits set iff it's > 0, indicating a cylinder >= 65536. 6743 00007C3D 08FB <1> or bl, bh ; collect set bits from bh 6744 00007C3F 08C1 <1> or cl, al ; cl7:6 = cylinder 9:8 6745 <1> ; ah has bits set iff it was >= 4, indicating a cylinder >= 1024. 6746 00007C41 08E3 <1> or bl, ah ; collect set bits from ah 6747 00007C43 8A16[208F] <1> mov dl, [load_unit] 6748 <1> ; dl = drive 6749 00007C47 B404 <1> mov ah, 04h ; error number: sector not found 6750 00007C49 7403E9A6E9 <1> jnz .err ; error if cylinder >= 1024 --> 6751 <1> ; ! bx = 0 (for 13.02 call) 6752 <1> 6753 <1> ; we call INT 13h AH=02h once for each sector. Multi-sector reads 6754 <1> ; may fail if we cross a track or 64K boundary 6755 00007C4E 07 <1> pop es 6756 <1> 6757 00007C4F BE1100 <1> mov si, 16 + 1 6758 <1> .loop_chs_retry_repeat: 6759 00007C52 E8A300 <1> call .set_ax_function_0201_or_0301 6760 00007C55 CD13 <1> int 13h ; read one sector 6761 00007C57 7203E97D00 <1> jnc .done 6762 00007C5C 50 <1> push ax 6763 00007C5D 31C0 <1> xor ax, ax 6764 00007C5F CD13 <1> int 13h ; reset disk 6765 00007C61 58 <1> pop ax 6766 00007C62 4E <1> dec si ; another attempt ? 6767 00007C63 75ED <1> jnz .loop_chs_retry_repeat ; yes --> 6768 <1> 6769 00007C65 80FC09 <1> cmp ah, 9 ; data boundary error? 6770 00007C68 7403E987E9 <1> jne .err 6771 <1> 6772 <1> .chs_sectorseg: 6773 <1> d4 call d4dumpregs 6774 <1> d4 call d4message 6775 <1> d4 asciz 13,10,"In read_sector.chs_sectorseg",13,10 6776 <1> 6777 00007C6D F646FE01 <1> test byte [bp + ?is_read_bit0], 1 6778 00007C71 7534 <1> jnz .chs_sectorseg_read 6779 <1> 6780 <1> .chs_sectorseg_write: 6781 00007C73 06 <1> push es 6782 <1> 6783 00007C74 1E <1> push ds 6784 00007C75 57 <1> push di 6785 00007C76 51 <1> push cx 6786 00007C77 8B0E[EB8E] <1> mov cx, word [load_sectorsize] 6787 00007C7B 06 <1> push es 6788 00007C7C 8E06[C48E] <1> mov es, word [load_sectorseg] ; => sectorseg 6789 00007C80 1F <1> pop ds ; => user buffer 6790 00007C81 31F6 <1> xor si, si 6791 00007C83 31FF <1> xor di, di 6792 00007C85 F3A4 <1> rep movsb ; copy data into sectorseg 6793 00007C87 59 <1> pop cx 6794 00007C88 5F <1> pop di 6795 00007C89 1F <1> pop ds 6796 <1> 6797 00007C8A B80103 <1> mov ax, 0301h 6798 00007C8D CD13 <1> int 13h 6799 00007C8F 7313 <1> jnc @F 6800 <1> 6801 00007C91 31C0 <1> xor ax, ax 6802 00007C93 CD13 <1> int 13h 6803 00007C95 7303E95AE9 <1> jc .err 6804 <1> 6805 00007C9A B80103 <1> mov ax, 0301h 6806 00007C9D CD13 <1> int 13h 6807 00007C9F 7303E950E9 <1> jc .err 6808 <1> @@: 6809 00007CA4 5B <1> pop bx 6810 00007CA5 EB34 <1> jmp .chs_done 6811 <1> 6812 <1> 6813 <1> .chs_sectorseg_read: 6814 <1> 6815 00007CA7 06 <1> push es ; user buffer 6816 00007CA8 8E06[C48E] <1> mov es, word [load_sectorseg] 6817 <1> 6818 00007CAC E84900 <1> call .set_ax_function_0201_or_0301 6819 00007CAF CD13 <1> int 13h 6820 00007CB1 7313 <1> jnc .chs_sectorseg_done 6821 <1> 6822 00007CB3 31C0 <1> xor ax, ax 6823 00007CB5 CD13 <1> int 13h 6824 00007CB7 7303E938E9 <1> jc .err 6825 <1> 6826 00007CBC E83900 <1> call .set_ax_function_0201_or_0301 6827 00007CBF CD13 <1> int 13h 6828 00007CC1 7303E92EE9 <1> jc .err 6829 <1> .chs_sectorseg_done: 6830 <1> 6831 00007CC6 31F6 <1> xor si, si 6832 00007CC8 8E1E[C48E] <1> mov ds, word [load_sectorseg] 6833 00007CCC 07 <1> pop es 6834 00007CCD 57 <1> push di 6835 00007CCE 31FF <1> xor di, di 6836 00007CD0 8B0E[EB8E] <1> mov cx, word [load_sectorsize] 6837 00007CD4 F3A4 <1> rep movsb 6838 00007CD6 5F <1> pop di 6839 <1> 6840 00007CD7 16 <1> push ss 6841 00007CD8 1F <1> pop ds 6842 <1> .done: 6843 <1> ; increment segment 6844 00007CD9 8CC3 <1> mov bx, es 6845 <1> 6846 <1> .chs_done: 6847 00007CDB 8EC3 <1> mov es, bx 6848 00007CDD 031E[CA8E] <1> add bx, word [load_sectorsizepara] 6849 <1> 6850 00007CE1 5E <1> pop si 6851 00007CE2 58 <1> pop ax 6852 00007CE3 59 <1> pop cx 6853 00007CE4 5A <1> pop dx 6854 <1> ; increment LBA sector number 6855 00007CE5 40 <1> inc ax 6856 00007CE6 7501 <1> jne @F 6857 00007CE8 42 <1> inc dx 6858 <1> @@: 6859 00007CE9 89EC5D <1> lleave code 6860 00007CEC C3 <1> retn 6861 <1> 6862 <1> .set_ah_function_42_or_43: 6863 00007CED B442 <1> mov ah, 42h 6864 00007CEF F646FE01 <1> test byte [bp + ?is_read_bit0], 1 6865 00007CF3 7502 <1> jnz @F 6866 00007CF5 B443 <1> mov ah, 43h 6867 <1> @@: 6868 00007CF7 C3 <1> retn 6869 <1> 6870 <1> .set_ax_function_0201_or_0301: 6871 00007CF8 B001 <1> mov al, 1 6872 <1> .set_ah_function_02_or_03: 6873 00007CFA B402 <1> mov ah, 02h 6874 00007CFC F646FE01 <1> test byte [bp + ?is_read_bit0], 1 6875 00007D00 7502 <1> jnz @F 6876 00007D02 B403 <1> mov ah, 03h 6877 <1> @@: 6878 00007D04 C3 <1> retn 6879 <1> 6880 <1> lleave ctx 6881 <1> 6882 <1> 6883 <1> %if _INPUT_FILE_BOOT 6884 <1> yy_boot: 6885 00007D05 E8F2E3 <1> call init_bootcmd 6886 <1> 6887 00007D08 E8FAEA <1> call parseloadunit_default_sdp 6888 00007D0B 7510 <1> jnz .have_filename 6889 <1> 6890 00007D0D BA[926E] <1> mov dx, msg.yy_requires_filename 6891 <1> .disp_error_1: 6892 00007D10 B80002 <1> mov ax, 0200h 6893 00007D13 E87B2A <1> call setrc 6894 00007D16 E81443 <1> call putsz_error 6895 00007D19 FF26[A20A] <1> jmp near word [errret] 6896 <1> 6897 <1> .have_filename: 6898 00007D1D F606[A300]02 <1> testopt [internalflags2], dif2_input_file_boot 6899 00007D22 740C <1> jz @F 6900 00007D24 833E[0092]03 <1> cmp word [load_input_file.active], _INPUT_FILE_BOOT - 1 6901 00007D29 7205 <1> jb @F 6902 <1> 6903 00007D2B BA[D26E] <1> mov dx, msg.yy_too_many_handles 6904 00007D2E EBE0 <1> jmp .disp_error_1 6905 <1> @@: 6906 <1> 6907 <1> ; al was = '/' or '\' or first pathname's first character 6908 <1> ; si-> next char 6909 00007D30 3C3A <1> cmp al, ':' 6910 00007D32 751F <1> jne .not_yy_goto_subfunction 6911 <1> 6912 00007D34 F606[A300]02 <1> testopt [internalflags2], dif2_input_file_boot 6913 00007D39 7413 <1> jz @F 6914 <1> 6915 00007D3B E8933E <1> call skipwhite 6916 00007D3E 4E <1> dec si 6917 00007D3F 8936[0292] <1> mov word [load_input_file.goto_offset], si 6918 <1> 6919 00007D43 E8F402 <1> call yy_boot_get 6920 00007D46 800E[A400]80 <1> setopt [internalflags3], dif3_partition_changed 6921 00007D4B E97F02 <1> jmp load_yy_finish 6922 <1> 6923 <1> @@: 6924 00007D4E BA[186F] <1> mov dx, msg.yy_no_file 6925 00007D51 EBBD <1> jmp .disp_error_1 6926 <1> .not_yy_goto_subfunction: 6927 <1> 6928 00007D53 BB[2C92] <1> mov bx, load_yyname_input 6929 00007D56 E898E6 <1> call bootcmd.pathname_parse_super 6930 <1> 6931 00007D59 8326[0292]00 <1> and word [load_input_file.goto_offset], 0 6932 00007D5E E8713E <1> call skipwh0 6933 00007D61 8936[120C] <1> mov word [if_exists_then_address], si 6934 00007D65 E8033E <1> call iseol?_or_then 6935 00007D68 7427 <1> je .not_yy_goto 6936 <1> 6937 00007D6A 3C3A <1> cmp al, ':' 6938 00007D6C 7403E9D929 <1> jne error 6939 <1> 6940 00007D71 E85D3E <1> call skipwhite 6941 00007D74 4E <1> dec si 6942 00007D75 8936[0292] <1> mov word [load_input_file.goto_offset], si 6943 <1> 6944 <1> @@: 6945 00007D79 AC <1> lodsb 6946 00007D7A 3C20 <1> cmp al, 32 6947 00007D7C 7409 <1> je @F 6948 00007D7E 3C09 <1> cmp al, 9 6949 00007D80 7405 <1> je @F 6950 00007D82 E8F73D <1> call iseol? 6951 00007D85 75F2 <1> jne @B 6952 <1> @@: 6953 00007D87 E8483E <1> call skipwh0 6954 00007D8A 8936[120C] <1> mov word [if_exists_then_address], si 6955 00007D8E E8F63D <1> call chkeol_or_then 6956 <1> 6957 <1> .not_yy_goto: 6958 <1> 6959 00007D91 F606[A400]07 <1> testopt [internalflags3], dif3_load_is_dp 6960 00007D96 7555 <1> jnz .load_yy_from_ldp 6961 <1> 6962 00007D98 8A1E[1292] <1> mov bl, [load_partition] 6963 00007D9C 803E[208F]80 <1> cmp byte [load_unit], 80h 6964 00007DA1 7226 <1> jb .p_f_is_diskette 6965 00007DA3 84DB <1> test bl, bl ; partition specified ? 6966 00007DA5 7503E9A029 <1> jz error ; no, error --> 6967 <1> 6968 00007DAA E8A8FB <1> call query_geometry 6969 <1> 6970 00007DAD B9[157E] <1> mov cx, load_yy_from_partition 6971 00007DB0 E8FAF9 <1> call scan_partitions 6972 00007DB3 F606[A700]08 <1> testopt [internalflags3], dif3_in_if 6973 00007DB8 7403E9CA14 <1> jnz if_exists_not_found 6974 00007DBD BA[1D62] <1> mov dx, msg.boot_partition_not_found 6975 00007DC0 B80602 <1> mov ax, 0206h 6976 00007DC3 E8CB29 <1> call setrc 6977 00007DC6 E93DE8 <1> jmp bootcmd.fail 6978 <1> 6979 <1> 6980 <1> .p_f_is_diskette: 6981 00007DC9 84DB <1> test bl, bl ; partition specified ? 6982 00007DCB 7403E97A29 <1> jnz error ; yes, error --> 6983 <1> 6984 00007DD0 E882FB <1> call query_geometry 6985 <1> 6986 00007DD3 31C0 <1> xor ax, ax 6987 00007DD5 31D2 <1> xor dx, dx 6988 <1> @@: 6989 00007DD7 8B1E[FA09] <1> mov bx, word [auxbuff_segorsel] ; bx => auxbuff 6990 00007DDB 52 <1> push dx 6991 00007DDC 50 <1> push ax 6992 00007DDD E82BFD <1> call read_ae_512_bytes 6993 <1> 6994 00007DE0 26813EFE0155AA <1> cmp word [es:510], 0AA55h 6995 00007DE7 7510 <1> jne boot_sigmismatch 6996 00007DE9 58 <1> pop ax 6997 00007DEA 5A <1> pop dx 6998 <1> 6999 00007DEB EB62 <1> jmp load_yy_common 7000 <1> 7001 <1> 7002 <1> .load_yy_from_ldp: 7003 00007DED E865FB <1> call query_geometry 7004 00007DF0 A1[0892] <1> mov ax, word [load_partition_sector] 7005 00007DF3 8B16[0A92] <1> mov dx, word [load_partition_sector + 2] 7006 00007DF7 EBDE <1> jmp @B 7007 <1> %endif 7008 <1> 7009 <1> 7010 <1> boot_sigmismatch: 7011 00007DF9 BA[B760] <1> mov dx, msg.bootfail_sig 7012 00007DFC B80702 <1> mov ax, 0207h 7013 <1> @@: 7014 00007DFF E88F29 <1> call setrc 7015 00007E02 E901E8 <1> jmp bootcmd.fail 7016 <1> 7017 <1> boot_codemismatch: 7018 00007E05 BA[1B61] <1> mov dx, msg.bootfail_code 7019 00007E08 B80802 <1> mov ax, 0208h 7020 00007E0B EBF2 <1> jmp @B 7021 <1> 7022 <1> boot_secsizemismatch: 7023 00007E0D BA[4261] <1> mov dx, msg.bootfail_secsizediffer 7024 00007E10 B80902 <1> mov ax, 0209h 7025 00007E13 EBEA <1> jmp @B 7026 <1> 7027 <1> 7028 <1> %if _INPUT_FILE_BOOT 7029 <1> ; INP: es:si -> partition table entry, 7030 <1> ; si = load_partition_table .. load_partition_table+48, 7031 <1> ; es = ss 7032 <1> ; bp + di -> above part table metadata, 7033 <1> ; dwo [bp + di - 4] = root (outermost extended position) 7034 <1> ; dwo [bp + di - 8] = base (current table position) 7035 <1> ; CHG: ax, bx, (cx), dx 7036 <1> load_yy_from_partition: 7037 <1> d4 call d4message 7038 <1> d4 asciz "In load_yy_from_partition",13,10 7039 <1> 7040 00007E15 A0[1392] <1> mov al, byte [load_current_partition] 7041 00007E18 3A06[1292] <1> cmp al, byte [load_partition] 7042 00007E1C 7401 <1> je .gotit 7043 00007E1E C3 <1> retn 7044 <1> 7045 <1> .gotit: 7046 <1> d4 call d4message 7047 <1> d4 asciz "In load_yy_from_partition.gotit",13,10 7048 <1> 7049 00007E1F 8B43F8 <1> mov ax, [bp + di - 8] 7050 00007E22 8B53FA <1> mov dx, [bp + di - 6] ; base (current table position) 7051 <1> 7052 00007E25 26034408 <1> add ax, [es:si + 8] 7053 00007E29 2613540A <1> adc dx, [es:si + 8 + 2] ; add offset to logical partition 7054 <1> 7055 00007E2D 26894408 <1> mov word [es:si + 8], ax 7056 00007E31 2689540A <1> mov word [es:si + 8 + 2], dx ; store in partition table entry 7057 <1> 7058 00007E35 89EC <1> mov sp, bp 7059 00007E37 5D <1> pop bp ; restore bp (scan_partitions) 7060 00007E38 5B <1> pop bx ; discard ret address (scan_partitions) 7061 <1> 7062 <1> ; dx:ax = absolute sector number 7063 00007E39 8B1E[FA09] <1> mov bx, word [auxbuff_segorsel] ; bx => auxbuff 7064 00007E3D 50 <1> push ax 7065 00007E3E 52 <1> push dx 7066 00007E3F E8C9FC <1> call read_ae_512_bytes ; load partition boot sector 7067 <1> 7068 00007E42 26813EFE0155AA <1> cmp word [es:510], 0AA55h 7069 00007E49 75AE <1> jne boot_sigmismatch 7070 <1> 7071 00007E4B 31C9 <1> xor cx, cx 7072 <1> ; cmp word [es:0], cx 7073 <1> ; je boot_codemismatch 7074 <1> 7075 00007E4D 5A <1> pop dx 7076 00007E4E 58 <1> pop ax 7077 <1> 7078 <1> ; dx:ax = boot sector 7079 <1> ; byte [load_unit] = unit 7080 <1> ; es:0-> read sector 7081 <1> load_yy_common: 7082 00007E4F 26A31C00 <1> mov word [es:bsBPB + bpbHiddenSectors], ax 7083 00007E53 2689161E00 <1> mov word [es:bsBPB + bpbHiddenSectors + 2], dx 7084 <1> 7085 00007E58 8B5E0B <1> mov bx, [bp + bsBPB + bpbBytesPerSector] 7086 00007E5B 263B1E0B00 <1> cmp bx, [es:bsBPB + bpbBytesPerSector] 7087 00007E60 75AB <1> jne boot_secsizemismatch 7088 <1> 7089 <1> ; preserve some variables from our pseudo BPB 7090 00007E62 31C0 <1> xor ax, ax 7091 00007E64 FF7618 <1> push word [bp + bsBPB + bpbCHSSectors] 7092 00007E67 268F061800 <1> pop word [es:bsBPB + bpbCHSSectors] 7093 00007E6C FF761A <1> push word [bp + bsBPB + bpbCHSHeads] 7094 00007E6F 268F061A00 <1> pop word [es:bsBPB + bpbCHSHeads] ; preserve geometry 7095 <1> 7096 00007E74 8B5EEA <1> mov bx, word [bp + ldParaPerSector] 7097 00007E77 D1EB <1> shr bx, 1 7098 00007E79 895ED4 <1> mov word [bp + ldEntriesPerSector], bx 7099 <1> 7100 00007E7C 2639061600 <1> cmp word [es:bsBPB + bpbSectorsPerFAT], ax 7101 00007E81 8A5E40 <1> mov bl, byte [bp + bsBPB + ebpbNew + bpbnBootUnit] 7102 00007E84 7407 <1> je .is_fat32 7103 00007E86 26881E2400 <1> mov byte [es:bsBPB + bpbNew + bpbnBootUnit], bl 7104 00007E8B EB05 <1> jmp short .was_fat1612 7105 <1> .is_fat32: 7106 00007E8D 26881E4000 <1> mov byte [es:bsBPB + ebpbNew + bpbnBootUnit], bl 7107 <1> .was_fat1612: 7108 <1> 7109 00007E92 06 <1> push es 7110 00007E93 1E <1> push ds 7111 00007E94 06 <1> push es 7112 00007E95 1F <1> pop ds 7113 00007E96 31F6 <1> xor si, si ; -> BPB from boot partition 7114 00007E98 16 <1> push ss 7115 00007E99 07 <1> pop es 7116 00007E9A BF[E08E] <1> mov di, load_data - LOADDATA2 ; -> our copy of a BPB 7117 00007E9D B95A00 <1> mov cx, (bsBPB + ebpbNew + BPBN_size) 7118 00007EA0 F3A4 <1> rep movsb ; get the BPB 7119 <1> 7120 00007EA2 1F <1> pop ds 7121 00007EA3 800E[A400]80 <1> setopt [internalflags3], dif3_partition_changed 7122 <1> 7123 00007EA8 394616 <1> cmp word [bp + bsBPB + bpbSectorsPerFAT], ax 7124 00007EAB 740B <1> je @F ; is FAT32 --> 7125 00007EAD BE[048F] <1> mov si, load_data - LOADDATA2 + bsBPB + bpbNew 7126 00007EB0 BF[208F] <1> mov di, load_data - LOADDATA2 + bsBPB + ebpbNew 7127 00007EB3 B91A00 <1> mov cx, BPBN_size 7128 00007EB6 F3A4 <1> rep movsb ; clone the FAT16 / FAT12 BPBN 7129 <1> ; to where the FAT32 BPBN lives 7130 <1> @@: 7131 00007EB8 07 <1> pop es 7132 <1> 7133 <1> .outofmem: equ query_geometry.out_of_memory_error 7134 <1> 7135 00007EB9 FF36[FA09] <1> push word [auxbuff_segorsel] 7136 00007EBD 8F46F8 <1> pop word [bp + lsvFATSeg] 7137 00007EC0 804EE702 <1> or byte [bp + ldFlags], ldfFATInvalid 7138 00007EC4 B8FFFF <1> mov ax, -1 7139 00007EC7 8946F4 <1> mov word [bp + lsvFATSector], ax 7140 00007ECA 8946F6 <1> mov word [bp + lsvFATSector + 2], ax 7141 <1> 7142 00007ECD E89705 <1> call initialise_fs 7143 <1> 7144 00007ED0 C606[1592]00 <1> mov byte [load_check_dir_attr], 0 7145 00007ED5 8B36[2C92] <1> mov si, word [load_yyname_input] 7146 00007ED9 803C2F <1> cmp byte [si], '/' 7147 00007EDC 7501 <1> jne @F 7148 00007EDE 46 <1> inc si 7149 <1> @@: 7150 00007EDF 803C00 <1> cmp byte [si], 0 7151 00007EE2 750C <1> jne @F 7152 <1> ..@yy_filename_empty: 7153 00007EE4 BA[B36E] <1> mov dx, msg.yy_filename_empty 7154 00007EE7 B80A02 <1> mov ax, 020Ah 7155 00007EEA E8A428 <1> call setrc 7156 00007EED E916E7 <1> jmp bootcmd.fail 7157 <1> @@: 7158 00007EF0 16 <1> push ss 7159 00007EF1 07 <1> pop es 7160 00007EF2 E8E7EB <1> call boot_parse_fn ; get next pathname 7161 00007EF5 3C2F <1> cmp al, '/' 7162 00007EF7 7509 <1> jne @F 7163 00007EF9 C606[1592]10 <1> mov byte [load_check_dir_attr], ATTR_DIRECTORY 7164 00007EFE 8936[2E92] <1> mov word [load_yyname_next], si 7165 <1> @@: 7166 <1> 7167 00007F02 BFFFFF <1> mov di, -1 7168 00007F05 89FE <1> mov si, di 7169 00007F07 897EF4 <1> mov [bp + lsvFATSector], di 7170 00007F0A 8976F6 <1> mov [bp + lsvFATSector + 2], si 7171 <1> 7172 00007F0D 31C0 <1> xor ax, ax 7173 00007F0F 31D2 <1> xor dx, dx 7174 <1> 7175 <1> scan_dir_yyname_loop: 7176 00007F11 8946EC <1> mov word [bp + ldDirCluster], ax 7177 00007F14 8956EE <1> mov word [bp + ldDirCluster + 2], dx 7178 <1> 7179 00007F17 16 <1> push ss 7180 00007F18 07 <1> pop es 7181 00007F19 BB[608F] <1> mov bx, load_yy_direntry 7182 <1> 7183 00007F1C E88EF6 <1> call scan_dir_aux_for_file 7184 <1> 7185 00007F1F 803E[1592]10 <1> cmp byte [load_check_dir_attr], ATTR_DIRECTORY 7186 00007F24 753A <1> jne got_yyentry 7187 <1> 7188 00007F26 56 <1> push si 7189 00007F27 57 <1> push di 7190 00007F28 C606[1592]00 <1> mov byte [load_check_dir_attr], 0 7191 00007F2D 8B36[2E92] <1> mov si, word [load_yyname_next] 7192 00007F31 803C00 <1> cmp byte [si], 0 7193 00007F34 7502 <1> jne @F 7194 00007F36 EBAC <1> jmp ..@yy_filename_empty 7195 <1> @@: 7196 00007F38 06 <1> push es 7197 00007F39 16 <1> push ss 7198 00007F3A 07 <1> pop es 7199 00007F3B E89EEB <1> call boot_parse_fn ; get next pathname 7200 00007F3E 07 <1> pop es 7201 00007F3F 3C2F <1> cmp al, '/' 7202 00007F41 7509 <1> jne @F 7203 00007F43 C606[1592]10 <1> mov byte [load_check_dir_attr], ATTR_DIRECTORY 7204 00007F48 8936[2E92] <1> mov word [load_yyname_next], si 7205 <1> @@: 7206 00007F4C 5F <1> pop di 7207 00007F4D 5E <1> pop si 7208 <1> 7209 00007F4E 31D2 <1> xor dx, dx 7210 00007F50 268B471A <1> mov ax, [es:bx + deClusterLow] 7211 <1> ; = first cluster (not FAT32) 7212 00007F54 807EE620 <1> cmp byte [bp + ldFATType], 32 7213 00007F58 7504 <1> jne @F 7214 00007F5A 268B5714 <1> mov dx, [es:bx + deClusterHigh] 7215 <1> ; dx:ax = first cluster (FAT32) 7216 <1> @@: 7217 <1> 7218 00007F5E EBB1 <1> jmp scan_dir_yyname_loop 7219 <1> 7220 <1> 7221 <1> got_yyentry: 7222 <1> 7223 <1> 7224 <1> ; (boot32.asm code starts here) 7225 <1> 7226 00007F60 8B1E[7C8F] <1> mov bx, [load_yy_direntry + deSize] 7227 00007F64 A1[7E8F] <1> mov ax, [load_yy_direntry + deSize + 2] 7228 <1> ; ax:bx = file size 7229 00007F67 8A16[6C8F] <1> mov dl, [load_yy_direntry + 12] 7230 <1> ; dl = FAT+ size bits 7231 00007F6B 88D6 <1> mov dh, dl 7232 00007F6D 81E207E0 <1> and dx, 0E007h ; obtain bits 7-5 and 2-0 7233 00007F71 740C <1> jz @F 7234 00007F73 BA[A56F] <1> mov dx, msg.yy_too_large 7235 00007F76 B80B02 <1> mov ax, 020Bh 7236 00007F79 E81528 <1> call setrc 7237 00007F7C E987E6 <1> jmp bootcmd.fail 7238 <1> @@: 7239 00007F7F 895EC4 <1> mov word [bp + ldFileSize], bx 7240 00007F82 8946C6 <1> mov word [bp + ldFileSize + 2], ax 7241 <1> 7242 00007F85 09D8 <1> or ax, bx 7243 00007F87 7516 <1> jnz @F 7244 <1> 7245 00007F89 F606[A700]08 <1> testopt [internalflags3], dif3_in_if 7246 00007F8E 7403E9F412 <1> jnz if_exists_not_found 7247 00007F93 BA[C16F] <1> mov dx, msg.yy_empty 7248 00007F96 B80C02 <1> mov ax, 020Ch 7249 00007F99 E8F527 <1> call setrc 7250 00007F9C E967E6 <1> jmp bootcmd.fail 7251 <1> @@: 7252 <1> 7253 <1> ; get starting cluster of file 7254 00007F9F 31D2 <1> xor dx, dx 7255 00007FA1 A1[7A8F] <1> mov ax, [load_yy_direntry + deClusterLow] 7256 <1> ; = first cluster (not FAT32) 7257 <1> 7258 00007FA4 807EE620 <1> cmp byte [bp + ldFATType], 32 7259 00007FA8 7504 <1> jne @F 7260 00007FAA 8B16[748F] <1> mov dx, [load_yy_direntry + deClusterHigh] 7261 <1> ; dx:ax = first cluster (FAT32) 7262 <1> @@: 7263 <1> 7264 00007FAE 80E60F <1> and dh, 0Fh 7265 00007FB1 8946F0 <1> mov word [bp + lsvFirstCluster], ax 7266 00007FB4 8956F2 <1> mov word [bp + lsvFirstCluster + 2], dx 7267 <1> 7268 00007FB7 8946C8 <1> mov word [bp + ldCurrentCluster], ax 7269 00007FBA 8956CA <1> mov word [bp + ldCurrentCluster + 2], dx 7270 00007FBD 31DB <1> xor bx, bx 7271 00007FBF 895ECC <1> mov word [bp + ldCurrentSeek], bx 7272 00007FC2 895ECE <1> mov word [bp + ldCurrentSeek + 2], bx 7273 00007FC5 E8B3F7 <1> call check_clust 7274 00007FC8 7303E9D704 <1> jc error_badchain 7275 <1> 7276 <1> load_yy_finish: 7277 00007FCD 31ED <1> xor bp, bp 7278 00007FCF 31DB <1> xor bx, bx 7279 00007FD1 BE[A08E] <1> mov si, load_data_lowest 7280 00007FD4 B95000 <1> mov cx, (LOAD_INPUT_FILE_SIZE + 1) >> 1 7281 <1> 7282 00007FD7 BF[808F] <1> mov di, load_input_file 7283 00007FDA F606[A300]02 <1> testopt [internalflags2], dif2_input_file_boot 7284 00007FDF 7415 <1> jz @F 7285 00007FE1 8B1E[0092] <1> mov bx, word [load_input_file.active] 7286 00007FE5 43 <1> inc bx 7287 00007FE6 B8A000 <1> mov ax, LOAD_INPUT_FILE_SIZE 7288 00007FE9 F7E3 <1> mul bx 7289 <1> ; test dx, dx 7290 <1> ; jnz error 7291 00007FEB 01C7 <1> add di, ax 7292 00007FED 8B5586 <1> mov dx, word [di - LOAD_INPUT_FILE_SIZE - LOADDATA3 + ldFATType] 7293 00007FF0 81E200F0 <1> and dx, ifhfTestReserved1 | ifhfTestReserved2 | ifhfQuietInput | ifhfQuietOutput 7295 00007FF4 09D5 <1> or bp, dx 7296 <1> 7297 <1> @@: 7298 <1> 7299 00007FF6 092E[C68E] <1> or word [load_data - LOADDATA2 + ldFATType], bp 7300 00007FFA 16 <1> push ss 7301 00007FFB 07 <1> pop es 7302 00007FFC F3A5 <1> rep movsw 7303 <1> 7304 <1> ; hazard: this uses load_input_file and 7305 <1> ; load_data_lowest if we are already in 7306 <1> ; a yy_boot script. 7307 00007FFE 8026[A700]EF <1> clropt [internalflags3], dif3_auxbuff_guarded_1 7308 00008003 E89C4E <1> call yy_reset_buf 7309 <1> 7310 00008006 891E[0092] <1> mov word [load_input_file.active], bx 7311 0000800A 800E[A300]02 <1> setopt [internalflags2], dif2_input_file_boot 7312 <1> 7313 0000800F 8B36[0292] <1> mov si, word [load_input_file.goto_offset] 7314 00008013 85F6 <1> test si, si 7315 00008015 7403E91650 <1> jnz cmd_goto.yy_entry 7316 <1> 7317 0000801A F606[A700]08 <1> testopt [internalflags3], dif3_in_if 7318 0000801F 7403E97012 <1> jnz if_exists_found_open 7319 00008024 C3 <1> retn 7320 <1> 7321 <1> 7322 <1> ; INP: [load_input_file], dif2_input_file_boot 7323 <1> ; OUT: most recent file closed, flag cleared if no longer file 7324 <1> ; CHG: di, bx, ax 7325 <1> yy_boot_close_file: 7326 00008025 A1[0092] <1> mov ax, word [load_input_file.active] 7327 00008028 48 <1> dec ax 7328 00008029 790B <1> jns .next 7329 0000802B 8026[A300]FD <1> clropt [internalflags2], dif2_input_file_boot 7330 00008030 800E[A300]04 <1> setopt [internalflags2], dif2_closed_input_file_boot 7331 00008035 C3 <1> retn 7332 <1> .next: 7333 00008036 A3[0092] <1> mov word [load_input_file.active], ax 7334 00008039 C3 <1> retn 7335 <1> 7336 <1> 7337 <1> ; INP: [load_input_file] 7338 <1> ; OUT: [load_data_lowest] = LOADDATA[123], lsv, BPB 7339 <1> ; CHG: es, ax, dx, di, si 7340 <1> yy_boot_get: 7341 0000803A 16 <1> push ss 7342 0000803B 07 <1> pop es 7343 <1> 7344 0000803C B8A000 <1> mov ax, LOAD_INPUT_FILE_SIZE 7345 0000803F F726[0092] <1> mul word [load_input_file.active] 7346 <1> 7347 <1> ; test dx, dx 7348 <1> ; jnz .error 7349 <1> 7350 00008043 51 <1> push cx 7351 00008044 BF[A08E] <1> mov di, load_data_lowest 7352 00008047 B95000 <1> mov cx, (LOAD_INPUT_FILE_SIZE + 1) >> 1 7353 <1> 7354 0000804A BE[808F] <1> mov si, load_input_file 7355 0000804D 01C6 <1> add si, ax 7356 <1> 7357 0000804F F3A5 <1> rep movsw 7358 00008051 59 <1> pop cx 7359 00008052 C3 <1> retn 7360 <1> 7361 <1> 7362 <1> ; INP: [load_data_lowest] = LOADDATA3 7363 <1> ; OUT: [load_input_file] 7364 <1> ; CHG: es, ax, dx, di, si 7365 <1> ; Note: Preserves flags (ZF, CF) 7366 <1> yy_boot_update: 7367 00008053 9C <1> pushf 7368 <1> 7369 00008054 16 <1> push ss 7370 00008055 07 <1> pop es 7371 <1> 7372 00008056 B8A000 <1> mov ax, LOAD_INPUT_FILE_SIZE 7373 00008059 F726[0092] <1> mul word [load_input_file.active] 7374 <1> 7375 <1> ; test dx, dx 7376 <1> ; jnz .error 7377 <1> 7378 0000805D 51 <1> push cx 7379 0000805E BE[A08E] <1> mov si, load_data_lowest 7380 00008061 B90800 <1> mov cx, LOADDATA3_size >> 1 7381 <1> 7382 00008064 BF[808F] <1> mov di, load_input_file 7383 00008067 01C7 <1> add di, ax 7384 <1> 7385 00008069 F3A5 <1> rep movsw 7386 0000806B 59 <1> pop cx 7387 0000806C 9D <1> popf ; ZF, CF 7388 0000806D C3 <1> retn 7389 <1> 7390 <1> 7391 <1> 7392 <1> ; INP: [load_input_file] = active file 7393 <1> ; cx = how many bytes to read 7394 <1> ; ds:dx -> buffer 7395 <1> ; OUT: CY if error reading 7396 <1> ; NC if success 7397 <1> ; ax = how many bytes read 7398 <1> ; CHG: bx, cx 7399 <1> ; STT: ds = es = ss 7400 <1> yy_boot_read: 7401 <1> lframe near 7402 <1> lvar word, length 7403 <1> lvar word, length_this_cluster 7404 <1> lvar dword, bytes_per_cluster 7405 <1> lvar dword, how_far_in_cluster 7406 0000806E 5589E58D66F4 <1> lenter 7407 <1> lvar dword, pointer 7408 00008074 1E <1> push ds 7409 00008075 52 <1> push dx 7410 00008076 31C0 <1> xor ax, ax 7411 <1> lvar word, did_guard_auxbuff 7412 00008078 50 <1> push ax 7413 <1> lvar word, read_how_many 7414 00008079 50 <1> push ax 7415 0000807A 52 <1> push dx 7416 0000807B 56 <1> push si 7417 0000807C 57 <1> push di 7418 <1> 7419 0000807D FF36[A20A] <1> push word [errret] 7420 00008081 FF36[A40A] <1> push word [throwret] 7421 00008085 FF36[A60A] <1> push word [throwsp] 7422 <1> 7423 00008089 55 <1> push bp 7424 <1> 7425 0000808A C706[A20A][F281] <1> mov word [errret], .err_ret 7426 00008090 C706[A40A][F281] <1> mov word [throwret], .err_ret 7427 00008096 8926[A60A] <1> mov word [throwsp], sp 7428 <1> 7429 0000809A E89DFF <1> call yy_boot_get 7430 <1> 7431 0000809D E8BB84 <1> call guard_auxbuff 7432 000080A0 FF46EE <1> inc word [bp + ?did_guard_auxbuff] 7433 <1> 7434 000080A3 8B16[A68E] <1> mov dx, word [load_data - LOADDATA2 + ldFileSize + 2] 7435 000080A7 A1[A48E] <1> mov ax, word [load_data - LOADDATA2 + ldFileSize] 7436 <1> 7437 000080AA 2B06[AC8E] <1> sub ax, word [load_data - LOADDATA2 + ldCurrentSeek] 7438 000080AE 1B16[AE8E] <1> sbb dx, word [load_data - LOADDATA2 + ldCurrentSeek + 2] 7439 <1> 7440 000080B2 85D2 <1> test dx, dx 7441 000080B4 7506 <1> jnz .use_count 7442 000080B6 39C8 <1> cmp ax, cx 7443 000080B8 7302 <1> jae .use_count 7444 000080BA 89C1 <1> mov cx, ax 7445 <1> .use_count: 7446 000080BC 85C9 <1> test cx, cx 7447 000080BE 7503E90801 <1> jz .success 7448 000080C3 894EFE <1> mov word [bp + ?length], cx 7449 <1> 7450 <1> .next_cluster: 7451 000080C6 8B36[AE8E] <1> mov si, word [load_data - LOADDATA2 + ldCurrentSeek + 2] 7452 000080CA 8B3E[AC8E] <1> mov di, word [load_data - LOADDATA2 + ldCurrentSeek] 7453 000080CE A1[EB8E] <1> mov ax, word [load_data - LOADDATA2 + bsBPB + bpbBytesPerSector] 7454 000080D1 F726[C88E] <1> mul word [load_data - LOADDATA2 + ldClusterSize] 7455 <1> 7456 000080D5 8946F8 <1> mov word [bp + ?bytes_per_cluster], ax 7457 000080D8 8956FA <1> mov word [bp + ?bytes_per_cluster + 2], dx 7458 000080DB 83E801 <1> sub ax, 1 7459 000080DE 83DA00 <1> sbb dx, 0 7460 000080E1 21D6 <1> and si, dx 7461 000080E3 21C7 <1> and di, ax ; how far are we into cluster 7462 <1> 7463 000080E5 897EF4 <1> mov word [bp + ?how_far_in_cluster], di 7464 000080E8 8976F6 <1> mov word [bp + ?how_far_in_cluster + 2], si 7465 <1> 7466 000080EB F7DE <1> neg si 7467 000080ED F7DF <1> neg di 7468 000080EF 83DE00 <1> sbb si, byte 0 ; neg si:di 7469 <1> 7470 000080F2 037EF8 <1> add di, word [bp + ?bytes_per_cluster] 7471 000080F5 1376FA <1> adc si, word [bp + ?bytes_per_cluster + 2] 7472 <1> ; cluster size - how far we are 7473 <1> ; = how much to read from this cluster 7474 000080F8 85F6 <1> test si, si 7475 000080FA 7506 <1> jnz .use_count_2 7476 000080FC 39CF <1> cmp di, cx 7477 000080FE 7302 <1> jae .use_count_2 7478 00008100 89F9 <1> mov cx, di 7479 <1> .use_count_2: 7480 00008102 894EFC <1> mov word [bp + ?length_this_cluster], cx 7481 <1> 7482 <1> .next_sector: 7483 00008105 A1[A88E] <1> mov ax, word [load_data - LOADDATA2 + ldCurrentCluster] 7484 00008108 8B16[AA8E] <1> mov dx, word [load_data - LOADDATA2 + ldCurrentCluster + 2] 7485 0000810C E86CF6 <1> call check_clust 7486 0000810F 7303E9B800 <1> jc .error 7487 00008114 E883F5 <1> call clust_to_first_sector 7488 00008117 8B1E[EB8E] <1> mov bx, word [load_data - LOADDATA2 + bsBPB + bpbBytesPerSector] 7489 0000811B 8B7EF4 <1> mov di, word [bp + ?how_far_in_cluster] 7490 0000811E 8B76F6 <1> mov si, word [bp + ?how_far_in_cluster + 2] 7491 00008121 87D6 <1> xchg dx, si 7492 00008123 97 <1> xchg ax, di 7493 00008124 F7F3 <1> div bx 7494 <1> ; dx = byte offset into sector 7495 <1> ; ax = sector offset into cluster's data 7496 00008126 01C7 <1> add di, ax 7497 00008128 83D600 <1> adc si, 0 7498 0000812B 87D6 <1> xchg dx, si 7499 0000812D 97 <1> xchg ax, di 7500 <1> ; dx:ax = sector in fs 7501 <1> ; si = byte offset 7502 <1> 7503 0000812E 89F1 <1> mov cx, si ; = byte offset 7504 00008130 F7D9 <1> neg cx ; - byte offset 7505 00008132 01D9 <1> add cx, bx ; sector size - byte offset 7506 <1> ; = length this sector 7507 00008134 3B4EFC <1> cmp cx, word [bp + ?length_this_cluster] 7508 00008137 7603 <1> jbe @F ; sector has less than requested --> 7509 00008139 8B4EFC <1> mov cx, word [bp + ?length_this_cluster] 7510 <1> ; fill entire remaining request 7511 <1> @@: 7512 0000813C 8B1E[FA09] <1> mov bx, word [auxbuff_segorsel] 7513 00008140 E8DAF9 <1> call read_sector 7514 00008143 1E <1> push ds 7515 <1> 7516 00008144 06 <1> push es 7517 <1> ; es:si -> data in sector buffer 7518 00008145 C47EF0 <1> les di, [bp + ?pointer] 7519 <1> ; es:di -> buffer 7520 00008148 014EEC <1> add word [bp + ?read_how_many], cx 7521 0000814B 294EFC <1> sub word [bp + ?length_this_cluster], cx 7522 0000814E 294EFE <1> sub word [bp + ?length], cx 7523 00008151 010E[AC8E] <1> add word [load_data - LOADDATA2 + ldCurrentSeek], cx 7524 00008155 8316[AE8E]00 <1> adc word [load_data - LOADDATA2 + ldCurrentSeek + 2], 0 7525 0000815A 014EF4 <1> add word [bp + ?how_far_in_cluster], cx 7526 0000815D 8356F600 <1> adc word [bp + ?how_far_in_cluster + 2], 0 7527 00008161 1F <1> pop ds ; ds:si -> data in sector buffer 7528 00008162 F3A4 <1> rep movsb ; copy 7529 00008164 897EF0 <1> mov word [bp + ?pointer], di 7530 <1> ; update pointer 7531 00008167 1F <1> pop ds 7532 <1> 7533 00008168 837EFC00 <1> cmp word [bp + ?length_this_cluster], 0 7534 0000816C 7597 <1> jne .next_sector 7535 <1> 7536 0000816E 8B7EF8 <1> mov di, word [bp + ?bytes_per_cluster] 7537 00008171 8B76FA <1> mov si, word [bp + ?bytes_per_cluster + 2] 7538 00008174 397EF4 <1> cmp word [bp + ?how_far_in_cluster], di 7539 00008177 7505 <1> jne @F 7540 00008179 3976F6 <1> cmp word [bp + ?how_far_in_cluster + 2], si 7541 0000817C 7408 <1> je @FF 7542 <1> @@: 7543 0000817E 837EFE00 <1> cmp word [bp + ?length], 0 7544 00008182 7548 <1> jne .error 7545 00008184 EB45 <1> jmp .success 7546 <1> 7547 <1> @@: 7548 00008186 A1[A88E] <1> mov ax, word [load_data - LOADDATA2 + ldCurrentCluster] 7549 00008189 8B16[AA8E] <1> mov dx, word [load_data - LOADDATA2 + ldCurrentCluster + 2] 7550 0000818D E8EBF5 <1> call check_clust 7551 00008190 723A <1> jc .error 7552 00008192 E832F5 <1> call clust_next.dxax 7553 00008195 731B <1> jnc @F ; (NC) --> 7554 00008197 B8F6FF <1> mov ax, 0FFF8h - 2 7555 0000819A BAFF0F <1> mov dx, 0FFFh 7556 0000819D 8B3E[AC8E] <1> mov di, word [load_data - LOADDATA2 + ldCurrentSeek] 7557 000081A1 8B36[AE8E] <1> mov si, word [load_data - LOADDATA2 + ldCurrentSeek + 2] 7558 000081A5 3B36[A48E] <1> cmp si, word [load_data - LOADDATA2 + ldFileSize] 7559 000081A9 7506 <1> jne .set_error 7560 000081AB 3B3E[A68E] <1> cmp di, word [load_data - LOADDATA2 + ldFileSize + 2] 7561 000081AF 7401 <1> je .do_not_set_error ; if same then NC --> 7562 <1> .set_error: 7563 000081B1 F9 <1> stc 7564 <1> .do_not_set_error: 7565 <1> @@: 7566 000081B2 9C <1> pushf 7567 000081B3 83C002 <1> add ax, 2 7568 000081B6 83D200 <1> adc dx, 0 7569 000081B9 A3[A88E] <1> mov word [load_data - LOADDATA2 + ldCurrentCluster], ax 7570 000081BC 8916[AA8E] <1> mov word [load_data - LOADDATA2 + ldCurrentCluster + 2], dx 7571 000081C0 9D <1> popf ; CF 7572 000081C1 7209 <1> jc .error 7573 000081C3 8B4EFE <1> mov cx, word [bp + ?length] 7574 000081C6 E303 <1> jcxz .success 7575 000081C8 E9FBFE <1> jmp .next_cluster 7576 <1> 7577 <1> .success: 7578 000081CB A8 <1> db __TEST_IMM8 ; (skip stc, NC) 7579 <1> .error: 7580 000081CC F9 <1> stc 7581 <1> 7582 000081CD 5D <1> pop bp 7583 <1> 7584 000081CE 8F06[A60A] <1> pop word [throwsp] 7585 000081D2 8F06[A40A] <1> pop word [throwret] ; restore throw destination 7586 000081D6 8F06[A20A] <1> pop word [errret] 7587 <1> 7588 000081DA 9C <1> pushf 7589 000081DB F646EE01 <1> testopt [bp + ?did_guard_auxbuff], 1 7590 000081DF 7405 <1> jz @F 7591 000081E1 8026[A700]EF <1> clropt [internalflags3], dif3_auxbuff_guarded_1 7592 <1> @@: 7593 000081E6 9D <1> popf ; CF 7594 <1> 7595 000081E7 E869FE <1> call yy_boot_update 7596 <1> 7597 000081EA 5F <1> pop di 7598 000081EB 5E <1> pop si 7599 000081EC 5A <1> pop dx 7600 000081ED 58 <1> pop ax ; pop from ?read_how_many 7601 000081EE 89EC5D <1> lleave 7602 000081F1 C3 <1> retn 7603 <1> 7604 <1> .err_ret: 7605 000081F2 8B26[A60A] <1> mov sp, word [throwsp] ; restore stack 7606 <1> ; (needed here if returned to errret) 7607 000081F6 EBD4 <1> jmp .error 7608 <1> 7609 <1> 7610 <1> ; INP: [load_input_file] = active file 7611 <1> ; cx:dx = signed seek distance from current 7612 <1> ; OUT: - 7613 <1> ; CHG: ax, bx, cx, dx 7614 <1> ; STT: ds = es = ss 7615 <1> yy_boot_seek_current: 7616 <1> lframe near 7617 <1> lvar dword, length 7618 <1> lvar dword, length_this_cluster 7619 <1> lvar dword, bytes_per_cluster 7620 <1> lvar dword, how_far_in_cluster 7621 000081F8 5589E58D66F0 <1> lenter 7622 <1> lvar dword, seek_distance 7623 000081FE 51 <1> push cx 7624 000081FF 52 <1> push dx 7625 00008200 31C0 <1> xor ax, ax 7626 <1> lvar word, did_guard_auxbuff 7627 00008202 50 <1> push ax 7628 00008203 56 <1> push si 7629 00008204 57 <1> push di 7630 <1> 7631 00008205 FF36[A20A] <1> push word [errret] 7632 00008209 FF36[A40A] <1> push word [throwret] 7633 0000820D FF36[A60A] <1> push word [throwsp] 7634 <1> 7635 00008211 55 <1> push bp 7636 <1> 7637 00008212 C706[A20A][3C84] <1> mov word [errret], .err_ret 7638 00008218 C706[A40A][3C84] <1> mov word [throwret], .err_ret 7639 0000821E 8926[A60A] <1> mov word [throwsp], sp 7640 <1> 7641 00008222 E815FE <1> call yy_boot_get 7642 <1> 7643 00008225 E83383 <1> call guard_auxbuff 7644 00008228 FF46EA <1> inc word [bp + ?did_guard_auxbuff] 7645 <1> 7646 0000822B 85C9 <1> test cx, cx 7647 0000822D 7975 <1> jns .plus 7648 <1> 7649 0000822F 8B36[AE8E] <1> mov si, word [load_data - LOADDATA2 + ldCurrentSeek + 2] 7650 00008233 8B3E[AC8E] <1> mov di, word [load_data - LOADDATA2 + ldCurrentSeek] 7651 00008237 A1[EB8E] <1> mov ax, word [load_data - LOADDATA2 + bsBPB + bpbBytesPerSector] 7652 0000823A F726[C88E] <1> mul word [load_data - LOADDATA2 + ldClusterSize] 7653 <1> 7654 0000823E 8946F4 <1> mov word [bp + ?bytes_per_cluster], ax 7655 00008241 8956F6 <1> mov word [bp + ?bytes_per_cluster + 2], dx 7656 00008244 83E801 <1> sub ax, 1 7657 00008247 83DA00 <1> sbb dx, 0 7658 0000824A F7D0 <1> not ax 7659 0000824C F7D2 <1> not dx 7660 <1> 7661 0000824E 56 <1> push si 7662 0000824F 57 <1> push di 7663 <1> 7664 00008250 21D6 <1> and si, dx 7665 00008252 21C7 <1> and di, ax ; start seek of current cluster 7666 <1> 7667 00008254 58 <1> pop ax 7668 00008255 5A <1> pop dx ; current seek 7669 <1> 7670 00008256 0346EC <1> add ax, word [bp + ?seek_distance] 7671 00008259 1356EE <1> adc dx, word [bp + ?seek_distance + 2] 7672 0000825C 7203E9B801 <1> jnc .error ; target seek 7673 <1> 7674 <1> ; if the cluster is invalid, need to reset 7675 00008261 813E[AA8E]FF0F <1> cmp word [load_data - LOADDATA2 + ldCurrentCluster + 2], 0FFFh 7676 00008267 7207 <1> jb @F 7677 00008269 833E[A88E]F8 <1> cmp word [load_data - LOADDATA2 + ldCurrentCluster], 0FFF8h 7678 0000826E 7308 <1> jae .minus_reset 7679 <1> @@: 7680 <1> 7681 00008270 39F2 <1> cmp dx, si ; is target seek 7682 <1> ; >= start seek of current cluster? 7683 00008272 7502 <1> jne @F 7684 00008274 39F8 <1> cmp ax, di 7685 <1> @@: 7686 00008276 7322 <1> jae .minus_simple ; yes, simple --> 7687 <1> 7688 <1> .minus_reset: 7689 <1> ; reset current cluster to first, seek to 0 7690 00008278 FF36[D28E] <1> push word [load_data - LOADDATA2 + lsvFirstCluster + 2] 7691 0000827C FF36[D08E] <1> push word [load_data - LOADDATA2 + lsvFirstCluster] 7692 00008280 8F06[A88E] <1> pop word [load_data - LOADDATA2 + ldCurrentCluster] 7693 00008284 8F06[AA8E] <1> pop word [load_data - LOADDATA2 + ldCurrentCluster + 2] 7694 00008288 8326[AC8E]00 <1> and word [load_data - LOADDATA2 + ldCurrentSeek], 0 7695 0000828D 8326[AE8E]00 <1> and word [load_data - LOADDATA2 + ldCurrentSeek + 2], 0 7696 <1> 7697 <1> ; set distance 7698 00008292 8946EC <1> mov word [bp + ?seek_distance], ax 7699 00008295 8956EE <1> mov word [bp + ?seek_distance + 2], dx 7700 <1> ; use positive seek code 7701 00008298 EB0A <1> jmp .plus 7702 <1> 7703 <1> .minus_simple: 7704 <1> ; just set seek, current cluster still valid 7705 0000829A A3[AC8E] <1> mov word [load_data - LOADDATA2 + ldCurrentSeek], ax 7706 0000829D 8916[AE8E] <1> mov word [load_data - LOADDATA2 + ldCurrentSeek + 2], dx 7707 000082A1 E97501 <1> jmp .return 7708 <1> 7709 <1> .plus: 7710 000082A4 8B16[A68E] <1> mov dx, word [load_data - LOADDATA2 + ldFileSize + 2] 7711 000082A8 A1[A48E] <1> mov ax, word [load_data - LOADDATA2 + ldFileSize] 7712 <1> 7713 000082AB 2B06[AC8E] <1> sub ax, word [load_data - LOADDATA2 + ldCurrentSeek] 7714 000082AF 1B16[AE8E] <1> sbb dx, word [load_data - LOADDATA2 + ldCurrentSeek + 2] 7715 <1> 7716 000082B3 720A <1> jc .eof 7717 <1> ; dx:ax = how far we can seek within file 7718 000082B5 3B56EE <1> cmp dx, word [bp + ?seek_distance + 2] 7719 000082B8 7503 <1> jne @F 7720 000082BA 3B46EC <1> cmp ax, word [bp + ?seek_distance] 7721 <1> @@: 7722 000082BD 771D <1> ja .not_eof 7723 <1> .eof: 7724 000082BF 8B46EC <1> mov ax, word [bp + ?seek_distance] 7725 000082C2 8B56EE <1> mov dx, word [bp + ?seek_distance + 2] 7726 000082C5 0106[AC8E] <1> add word [load_data - LOADDATA2 + ldCurrentSeek], ax 7727 000082C9 1116[AE8E] <1> adc word [load_data - LOADDATA2 + ldCurrentSeek + 2], dx 7728 000082CD C706[A88E]F8FF <1> mov word [load_data - LOADDATA2 + ldCurrentCluster], 0FFF8h 7729 000082D3 C706[AA8E]FF0F <1> mov word [load_data - LOADDATA2 + ldCurrentCluster + 2], 0FFFh 7730 000082D9 E93D01 <1> jmp .return 7731 <1> 7732 <1> .not_eof: 7733 000082DC 8B4EEC <1> mov cx, word [bp + ?seek_distance] 7734 000082DF 8B5EEE <1> mov bx, word [bp + ?seek_distance + 2] 7735 000082E2 85DB <1> test bx, bx 7736 000082E4 7507 <1> jnz @F 7737 000082E6 85C9 <1> test cx, cx 7738 000082E8 7503E92C01 <1> jz .return 7739 <1> @@: 7740 000082ED 894EFC <1> mov word [bp + ?length], cx 7741 000082F0 895EFE <1> mov word [bp + ?length + 2], bx 7742 <1> 7743 <1> ; bx:cx = length 7744 <1> .next_cluster: 7745 000082F3 8B36[AE8E] <1> mov si, word [load_data - LOADDATA2 + ldCurrentSeek + 2] 7746 000082F7 8B3E[AC8E] <1> mov di, word [load_data - LOADDATA2 + ldCurrentSeek] 7747 000082FB A1[EB8E] <1> mov ax, word [load_data - LOADDATA2 + bsBPB + bpbBytesPerSector] 7748 000082FE F726[C88E] <1> mul word [load_data - LOADDATA2 + ldClusterSize] 7749 <1> 7750 00008302 8946F4 <1> mov word [bp + ?bytes_per_cluster], ax 7751 00008305 8956F6 <1> mov word [bp + ?bytes_per_cluster + 2], dx 7752 00008308 83E801 <1> sub ax, 1 7753 0000830B 83DA00 <1> sbb dx, 0 7754 0000830E 21D6 <1> and si, dx 7755 00008310 21C7 <1> and di, ax ; how far are we into cluster 7756 <1> 7757 00008312 897EF0 <1> mov word [bp + ?how_far_in_cluster], di 7758 00008315 8976F2 <1> mov word [bp + ?how_far_in_cluster + 2], si 7759 <1> 7760 00008318 F7DE <1> neg si 7761 0000831A F7DF <1> neg di 7762 0000831C 83DE00 <1> sbb si, byte 0 ; neg si:di 7763 <1> 7764 0000831F 037EF4 <1> add di, word [bp + ?bytes_per_cluster] 7765 00008322 1376F6 <1> adc si, word [bp + ?bytes_per_cluster + 2] 7766 <1> ; cluster size - how far we are 7767 <1> ; = how much to read from this cluster 7768 00008325 39DE <1> cmp si, bx 7769 00008327 7502 <1> jne @F 7770 00008329 39CF <1> cmp di, cx 7771 <1> @@: 7772 0000832B 7304 <1> jae .use_count_2 7773 0000832D 89F9 <1> mov cx, di 7774 0000832F 89F3 <1> mov bx, si 7775 <1> .use_count_2: 7776 <1> ; bx:cx = how far to seek in this cluster 7777 00008331 894EF8 <1> mov word [bp + ?length_this_cluster], cx 7778 00008334 895EFA <1> mov word [bp + ?length_this_cluster + 2], bx 7779 <1> 7780 <1> .next_sector: 7781 00008337 A1[A88E] <1> mov ax, word [load_data - LOADDATA2 + ldCurrentCluster] 7782 0000833A 8B16[AA8E] <1> mov dx, word [load_data - LOADDATA2 + ldCurrentCluster + 2] 7783 0000833E E83AF4 <1> call check_clust 7784 00008341 7303E9D300 <1> jc .error 7785 00008346 8B1E[EB8E] <1> mov bx, word [load_data - LOADDATA2 + bsBPB + bpbBytesPerSector] 7786 0000834A 8B7EF0 <1> mov di, word [bp + ?how_far_in_cluster] 7787 0000834D 8B76F2 <1> mov si, word [bp + ?how_far_in_cluster + 2] 7788 <1> 7789 00008350 87D6 <1> xchg dx, si 7790 00008352 97 <1> xchg ax, di 7791 00008353 F7F3 <1> div bx 7792 <1> ; dx = byte offset into sector 7793 <1> ; ax = sector offset into cluster's data 7794 00008355 87D6 <1> xchg dx, si 7795 00008357 97 <1> xchg ax, di 7796 <1> ; si = byte offset 7797 <1> 7798 00008358 89F1 <1> mov cx, si ; = byte offset 7799 0000835A F7D9 <1> neg cx ; - byte offset 7800 0000835C 01D9 <1> add cx, bx ; sector size - byte offset 7801 <1> ; = length this sector 7802 0000835E 837EFA00 <1> cmp word [bp + ?length_this_cluster + 2], 0 7803 00008362 7508 <1> jne @F ; fill remaining sector size 7804 00008364 3B4EF8 <1> cmp cx, word [bp + ?length_this_cluster] 7805 00008367 7603 <1> jbe @F ; sector has less than requested --> 7806 00008369 8B4EF8 <1> mov cx, word [bp + ?length_this_cluster] 7807 <1> ; fill entire remaining request 7808 <1> @@: 7809 0000836C 294EF8 <1> sub word [bp + ?length_this_cluster], cx 7810 0000836F 835EFA00 <1> sbb word [bp + ?length_this_cluster + 2], 0 7811 00008373 294EFC <1> sub word [bp + ?length], cx 7812 00008376 835EFE00 <1> sbb word [bp + ?length + 2], 0 7813 0000837A 010E[AC8E] <1> add word [load_data - LOADDATA2 + ldCurrentSeek], cx 7814 0000837E 8316[AE8E]00 <1> adc word [load_data - LOADDATA2 + ldCurrentSeek + 2], 0 7815 00008383 014EF0 <1> add word [bp + ?how_far_in_cluster], cx 7816 00008386 8356F200 <1> adc word [bp + ?how_far_in_cluster + 2], 0 7817 <1> 7818 0000838A 837EFA00 <1> cmp word [bp + ?length_this_cluster + 2], 0 7819 0000838E 75A7 <1> jne .next_sector 7820 00008390 837EF800 <1> cmp word [bp + ?length_this_cluster], 0 7821 00008394 75A1 <1> jne .next_sector 7822 <1> 7823 00008396 8B7EF4 <1> mov di, word [bp + ?bytes_per_cluster] 7824 00008399 8B76F6 <1> mov si, word [bp + ?bytes_per_cluster + 2] 7825 0000839C 397EF0 <1> cmp word [bp + ?how_far_in_cluster], di 7826 0000839F 7505 <1> jne @F 7827 000083A1 3976F2 <1> cmp word [bp + ?how_far_in_cluster + 2], si 7828 000083A4 740E <1> je @FF 7829 <1> @@: 7830 000083A6 837EFE00 <1> cmp word [bp + ?length + 2], 0 7831 000083AA 756D <1> jne .error 7832 000083AC 837EFC00 <1> cmp word [bp + ?length], 0 7833 000083B0 7567 <1> jne .error 7834 000083B2 EB65 <1> jmp .return 7835 <1> 7836 <1> @@: 7837 000083B4 A1[A88E] <1> mov ax, word [load_data - LOADDATA2 + ldCurrentCluster] 7838 000083B7 8B16[AA8E] <1> mov dx, word [load_data - LOADDATA2 + ldCurrentCluster + 2] 7839 000083BB E8BDF3 <1> call check_clust 7840 000083BE 7259 <1> jc .error 7841 000083C0 E804F3 <1> call clust_next.dxax 7842 000083C3 732F <1> jnc @F ; (NC) --> 7843 000083C5 B8F6FF <1> mov ax, 0FFF8h - 2 7844 000083C8 BAFF0F <1> mov dx, 0FFFh 7845 000083CB 8B3E[AC8E] <1> mov di, word [load_data - LOADDATA2 + ldCurrentSeek] 7846 000083CF 8B36[AE8E] <1> mov si, word [load_data - LOADDATA2 + ldCurrentSeek + 2] 7847 000083D3 3B36[A48E] <1> cmp si, word [load_data - LOADDATA2 + ldFileSize] 7848 000083D7 7506 <1> jne .set_error 7849 000083D9 3B3E[A68E] <1> cmp di, word [load_data - LOADDATA2 + ldFileSize + 2] 7850 000083DD 7401 <1> je .do_not_set_error ; if same then NC --> 7851 <1> .set_error: 7852 000083DF F9 <1> stc 7853 <1> .do_not_set_error: 7854 000083E0 9C <1> pushf 7855 000083E1 31C9 <1> xor cx, cx 7856 000083E3 31DB <1> xor bx, bx 7857 000083E5 874EFC <1> xchg cx, word [bp + ?length] 7858 000083E8 875EFE <1> xchg bx, word [bp + ?length + 2] 7859 000083EB 010E[AC8E] <1> add word [load_data - LOADDATA2 + ldCurrentSeek], cx 7860 000083EF 111E[AE8E] <1> adc word [load_data - LOADDATA2 + ldCurrentSeek + 2], bx 7861 000083F3 A8 <1> db __TEST_IMM8 ; (skip pushf) 7862 <1> @@: 7863 000083F4 9C <1> pushf 7864 000083F5 83C002 <1> add ax, 2 7865 000083F8 83D200 <1> adc dx, 0 7866 000083FB A3[A88E] <1> mov word [load_data - LOADDATA2 + ldCurrentCluster], ax 7867 000083FE 8916[AA8E] <1> mov word [load_data - LOADDATA2 + ldCurrentCluster + 2], dx 7868 00008402 9D <1> popf ; CF 7869 00008403 7214 <1> jc .error 7870 00008405 8B4EFC <1> mov cx, word [bp + ?length] 7871 00008408 8B5EFE <1> mov bx, word [bp + ?length + 2] 7872 0000840B 85DB <1> test bx, bx 7873 0000840D 7403E9E1FE <1> jnz .next_cluster 7874 00008412 85C9 <1> test cx, cx 7875 00008414 7403E9DAFE <1> jnz .next_cluster 7876 <1> .return: 7877 <1> .error: 7878 <1> 7879 00008419 5D <1> pop bp 7880 <1> 7881 0000841A 8F06[A60A] <1> pop word [throwsp] 7882 0000841E 8F06[A40A] <1> pop word [throwret] ; restore throw destination 7883 00008422 8F06[A20A] <1> pop word [errret] 7884 <1> 7885 00008426 9C <1> pushf 7886 00008427 F646EA01 <1> testopt [bp + ?did_guard_auxbuff], 1 7887 0000842B 7405 <1> jz @F 7888 0000842D 8026[A700]EF <1> clropt [internalflags3], dif3_auxbuff_guarded_1 7889 <1> @@: 7890 00008432 9D <1> popf ; CF 7891 <1> 7892 00008433 E81DFC <1> call yy_boot_update 7893 <1> 7894 00008436 5F <1> pop di 7895 00008437 5E <1> pop si 7896 00008438 89EC5D <1> lleave 7897 0000843B C3 <1> retn 7898 <1> 7899 <1> .err_ret: 7900 0000843C 8B26[A60A] <1> mov sp, word [throwsp] ; restore stack 7901 <1> ; (needed here if returned to errret) 7902 00008440 EBD7 <1> jmp .error 7903 <1> 7904 <1> 7905 <1> ; INP: [load_input_file] = active file 7906 <1> ; cx:dx = 0 7907 <1> ; OUT: - 7908 <1> ; CHG: ax, bx, cx, dx 7909 <1> ; STT: ds = es = ss 7910 <1> yy_boot_seek_start: 7911 00008442 56 <1> push si 7912 00008443 57 <1> push di 7913 <1> 7914 00008444 E8F3FB <1> call yy_boot_get 7915 <1> 7916 <1> .reset: 7917 <1> ; reset current cluster to first, seek to 0 7918 00008447 FF36[D28E] <1> push word [load_data - LOADDATA2 + lsvFirstCluster + 2] 7919 0000844B FF36[D08E] <1> push word [load_data - LOADDATA2 + lsvFirstCluster] 7920 0000844F 8F06[A88E] <1> pop word [load_data - LOADDATA2 + ldCurrentCluster] 7921 00008453 8F06[AA8E] <1> pop word [load_data - LOADDATA2 + ldCurrentCluster + 2] 7922 00008457 8326[AC8E]00 <1> and word [load_data - LOADDATA2 + ldCurrentSeek], 0 7923 0000845C 8326[AE8E]00 <1> and word [load_data - LOADDATA2 + ldCurrentSeek + 2], 0 7924 <1> 7925 00008461 E8EFFB <1> call yy_boot_update 7926 <1> 7927 00008464 5F <1> pop di 7928 00008465 5E <1> pop si 7929 00008466 C3 <1> retn 7930 <1> %endif 7931 <1> 7932 <1> 7933 <1> ; INP: bp = load_data - LOADDATA2 7934 <1> initialise_fs: 7935 <1> ; (boot.asm code starts here) 7936 <1> 7937 00008467 31C0 <1> xor ax, ax 7938 <1> ; calculate some values that we need: 7939 <1> ; adjusted sectors per cluster (store in a word, 7940 <1> ; and decode EDR-DOS's special value 0 meaning 256) 7941 00008469 8A460D <1> mov al, [bp + bsBPB + bpbSectorsPerCluster] 7942 0000846C FEC8 <1> dec al 7943 0000846E 40 <1> inc ax 7944 0000846F 8946E8 <1> mov [bp + ldClusterSize], ax 7945 <1> 7946 00008472 8B46D4 <1> mov ax, [bp + ldEntriesPerSector] 7947 <1> 7948 <1> ; number of sectors used for root directory (store in CX) 7949 00008475 31D2 <1> xor dx, dx 7950 00008477 89C3 <1> mov bx, ax 7951 00008479 48 <1> dec ax ; rounding up 7952 0000847A 034611 <1> add ax, [bp + bsBPB + bpbNumRootDirEnts] ; (0 iff FAT32) 7953 0000847D 11D2 <1> adc dx, dx ; account for overflow (dx was zero) 7954 0000847F F7F3 <1> div bx ; get number of root sectors 7955 00008481 91 <1> xchg ax, cx ; cx = number of root secs 7956 <1> 7957 <1> 7958 <1> ; (iniload.asm code starts here) 7959 <1> 7960 00008482 51 <1> push cx ; number of root secs 7961 00008483 31C0 <1> xor ax, ax 7962 <1> ; first sector of root directory 7963 00008485 8A4610 <1> mov al, [bp + bsBPB + bpbNumFATs] ; ! ah = 0, hence ax = number of FATs 7964 00008488 8B4E16 <1> mov cx, word [bp + bsBPB + bpbSectorsPerFAT] 7965 0000848B 31FF <1> xor di, di ; di:cx = sectors per FAT 7966 <1> ; iff FAT12, FAT16 7967 0000848D 85C9 <1> test cx, cx ; is FAT32 ? 7968 0000848F 7506 <1> jnz @F ; no --> 7969 00008491 8B4E24 <1> mov cx, word [bp + bsBPB + ebpbSectorsPerFATLarge] 7970 00008494 8B7E26 <1> mov di, word [bp + bsBPB + ebpbSectorsPerFATLarge + 2] ; for FAT32 7971 <1> @@: 7972 00008497 50 <1> push ax 7973 00008498 F7E1 <1> mul cx 7974 <1> ; ax = low word SpF*nF 7975 <1> ; dx = high word 7976 0000849A 93 <1> xchg bx, ax 7977 0000849B 87CA <1> xchg cx, dx 7978 <1> ; cx:bx = first mul 7979 0000849D 58 <1> pop ax 7980 0000849E F7E7 <1> mul di 7981 <1> ; ax = high word adjust 7982 <1> ; dx = third word 7983 000084A0 85D2 <1> test dx, dx 7984 000084A2 740C <1> jz @F 7985 <1> .error_badchain: 7986 <1> error_badchain: equ $ 7987 000084A4 BA[3663] <1> mov dx, msg.boot_badchain 7988 000084A7 B80D02 <1> mov ax, 020Dh 7989 000084AA E8E422 <1> call setrc 7990 000084AD E956E1 <1> jmp bootcmd.fail 7991 <1> 7992 <1> @@: 7993 000084B0 92 <1> xchg dx, ax 7994 <1> ; dx = high word adjust 7995 000084B1 01CA <1> add dx, cx 7996 <1> ; dx:bx = result 7997 000084B3 93 <1> xchg ax, bx 7998 <1> ; dx:ax = result 7999 000084B4 72EE <1> jc .error_badchain 8000 <1> 8001 000084B6 03460E <1> add ax, [bp + bsBPB + bpbReservedSectors] 8002 000084B9 83D200 <1> adc dx, byte 0 8003 000084BC 72E6 <1> jc .error_badchain 8004 <1> 8005 000084BE 59 <1> pop cx ; number of root sectors 8006 000084BF 31FF <1> xor di, di 8007 <1> 8008 <1> ; first sector of disk data area: 8009 000084C1 01C1 <1> add cx, ax 8010 000084C3 11D7 <1> adc di, dx 8011 000084C5 72DD <1> jc .error_badchain 8012 000084C7 894EFC <1> mov [bp + lsvDataStart], cx 8013 000084CA 897EFE <1> mov [bp + lsvDataStart + 2], di 8014 <1> 8015 000084CD 8946D0 <1> mov [bp + ldRootSector], ax 8016 000084D0 8956D2 <1> mov [bp + ldRootSector + 2], dx 8017 <1> 8018 <1> ; total sectors 8019 000084D3 31D2 <1> xor dx, dx 8020 000084D5 8B4613 <1> mov ax, [bp + bsBPB + bpbTotalSectors] 8021 000084D8 85C0 <1> test ax, ax 8022 000084DA 7506 <1> jnz @F 8023 000084DC 8B5622 <1> mov dx, [bp + bsBPB + bpbTotalSectorsLarge + 2] 8024 000084DF 8B4620 <1> mov ax, [bp + bsBPB + bpbTotalSectorsLarge] 8025 <1> 8026 <1> ; fall through and let it overwrite the field with the 8027 <1> ; already current contents. saves a jump. 8028 <1> @@: 8029 000084E2 895622 <1> mov [bp + bsBPB + bpbTotalSectorsLarge + 2], dx 8030 000084E5 894620 <1> mov [bp + bsBPB + bpbTotalSectorsLarge], ax 8031 <1> 8032 <1> ; dx:ax = total sectors 8033 <1> 8034 000084E8 8B5E16 <1> mov bx, [bp + bsBPB + bpbSectorsPerFAT] 8035 000084EB C646E620 <1> mov byte [bp + ldFATType], 32 8036 000084EF 85DB <1> test bx, bx 8037 000084F1 740B <1> jz @F 8038 <1> 8039 000084F3 31C9 <1> xor cx, cx 8040 <1> 8041 000084F5 895E24 <1> mov word [bp + bsBPB + ebpbSectorsPerFATLarge], bx 8042 000084F8 894E26 <1> mov word [bp + bsBPB + ebpbSectorsPerFATLarge + 2], cx 8043 000084FB 894E28 <1> mov word [bp + bsBPB + ebpbFSFlags], cx 8044 <1> ; FSVersion, RootCluster, FSINFOSector, BackupSector, Reserved: 8045 <1> ; uninitialised here (initialised by loaded_all later) 8046 <1> 8047 <1> @@: 8048 <1> ; dx:ax = total amount of sectors 8049 000084FE 2B46FC <1> sub ax, word [bp + lsvDataStart] 8050 00008501 1B56FE <1> sbb dx, word [bp + lsvDataStart + 2] 8051 <1> 8052 <1> ; dx:ax = total amount of data sectors 8053 00008504 89C3 <1> mov bx, ax 8054 00008506 92 <1> xchg ax, dx 8055 00008507 31D2 <1> xor dx, dx 8056 00008509 F776E8 <1> div word [bp + ldClusterSize] 8057 0000850C 93 <1> xchg bx, ax 8058 0000850D F776E8 <1> div word [bp + ldClusterSize] 8059 <1> ; bx:ax = quotient, dx = remainder 8060 <1> ; bx:ax = number of clusters 8061 00008510 85DB <1> test bx, bx 8062 00008512 741F <1> jz @FF 8063 <1> ; >= 1_0000h clusters, should be FAT32 8064 00008514 81FBFF0F <1> cmp bx, 0FFFh 8065 00008518 770D <1> ja .badclusters 8066 0000851A 7505 <1> jne @F 8067 0000851C 83F8F5 <1> cmp ax, 0FFF7h - 2 8068 0000851F 7706 <1> ja .badclusters 8069 <1> @@: 8070 <1> ; check it is really FAT32 8071 00008521 837E1600 <1> cmp word [bp + bsBPB + bpbSectorsPerFAT], 0 8072 00008525 7447 <1> je .gotfattype 8073 <1> 8074 <1> .badclusters: 8075 00008527 BA[1C63] <1> mov dx, msg.boot_badclusters 8076 0000852A B80E02 <1> mov ax, 020Eh 8077 0000852D E86122 <1> call setrc 8078 00008530 E9D3E0 <1> jmp bootcmd.fail 8079 <1> 8080 <1> @@: 8081 <1> ; <= FFFFh clusters, must be FAT16 or FAT12 8082 <1> ; check it is really not FAT32 8083 00008533 837E1600 <1> cmp word [bp + bsBPB + bpbSectorsPerFAT], 0 8084 00008537 74EE <1> je .badclusters 8085 <1> 8086 00008539 83F8F5 <1> cmp ax, 0FFF7h - 2 ; too much for FAT16 ? 8087 0000853C 77E9 <1> ja .badclusters 8088 0000853E C646E610 <1> mov byte [bp + ldFATType], 16 8089 00008542 3DF50F <1> cmp ax, 0FF7h - 2 ; is it FAT12 ? 8090 00008545 7727 <1> ja .gotfattype ; no, is FAT16 --> 8091 <1> 8092 00008547 C646E60C <1> mov byte [bp + ldFATType], 12 8093 <1> 8094 0000854B F606[C78E]02 <1> testopt [load_ldflags], ldfFATInvalid 8095 00008550 751C <1> jnz .gotfattype 8096 <1> 8097 00008552 53 <1> push bx 8098 00008553 50 <1> push ax 8099 <1> ; (boot.asm code continues here) 8100 <1> 8101 <1> ; Load the entire FAT into memory. This is easily feasible for FAT12, 8102 <1> ; as the FAT can only contain at most 4096 entries. 8103 <1> ; (The exact condition should be "at most 4087 entries", or with a 8104 <1> ; specific FF7h semantic, "at most 4088 entries"; the more reliable 8105 <1> ; and portable alternative would be "at most 4080 entries".) 8106 <1> ; Thus, no more than 6 KiB need to be read, even though the FAT size 8107 <1> ; as indicated by word[sectors_per_fat] could be much higher. The 8108 <1> ; first loop condition below is to correctly handle the latter case. 8109 <1> ; (Sector size is assumed to be a power of two between 32 and 8192 8110 <1> ; bytes, inclusive. An 8 KiB buffer is necessary if the sector size 8111 <1> ; is 4 or 8 KiB, because reading the FAT can or will write to 8 KiB 8112 <1> ; of memory instead of only the relevant 6 KiB. This is always true 8113 <1> ; if the sector size is 8 KiB, and with 4 KiB sector size it is true 8114 <1> ; iff word[sectors_per_fat] is higher than one.) 8115 00008554 BF0018 <1> mov di, 6 << 10 ; maximum size of FAT12 to load 8116 00008557 8B4E16 <1> mov cx, [bp + bsBPB + bpbSectorsPerFAT] 8117 <1> ; maximum size of this FS's FAT 8118 0000855A 31D2 <1> xor dx, dx 8119 0000855C 8B460E <1> mov ax, [bp + bsBPB + bpbReservedSectors]; = first FAT sector 8120 0000855F 8B5EF8 <1> mov bx, [bp + lsvFATSeg] 8121 <1> @@: 8122 00008562 E8B8F5 <1> call read_sector ; read next FAT sector 8123 00008565 2B7E0B <1> sub di, [bp + bsBPB + bpbBytesPerSector] 8124 <1> ; di = bytes still left to read 8125 00008568 7602 <1> jbe @F ; if none --> 8126 <1> ; (jbe means jump if CF || ZF) 8127 0000856A E2F6 <1> loop @B ; if any FAT sector still remains --> 8128 <1> @@: ; one of the limits reached; FAT read 8129 0000856C 58 <1> pop ax 8130 0000856D 5B <1> pop bx 8131 <1> 8132 <1> .gotfattype: 8133 <1> 8134 <1> ; if bx:ax = 1, then entries 0, 1, 2 are valid 8135 0000856E 83C001 <1> add ax, 1 8136 00008571 83D300 <1> adc bx, 0 8137 <1> ; max entry is x+1 (2 if x=1) 8138 <1> 8139 00008574 8946C0 <1> mov word [bp + ldMaxCluster], ax 8140 00008577 895EC2 <1> mov word [bp + ldMaxCluster + 2], bx 8141 <1> 8142 <1> ; if bx:ax was = 1, then entries below 3 have to exist 8143 0000857A 83C001 <1> add ax, 1 8144 0000857D 83D300 <1> adc bx, 0 8145 <1> ; if bx:ax was 1, bx:ax now = 3 8146 <1> 8147 00008580 89DA <1> mov dx, bx 8148 <1> 8149 00008582 807EE610 <1> cmp byte [bp + ldFATType], 16 8150 00008586 720C <1> jb .check_fat_limit_12 8151 00008588 7404 <1> je .check_fat_limit_16 8152 <1> .check_fat_limit_32: 8153 0000858A 01C0 <1> add ax, ax 8154 0000858C 11D2 <1> adc dx, dx 8155 <1> .check_fat_limit_16: 8156 0000858E 01C0 <1> add ax, ax 8157 00008590 11D2 <1> adc dx, dx 8158 00008592 EB0D <1> jmp @F 8159 <1> 8160 <1> .check_fat_limit_12: 8161 00008594 89C2 <1> mov dx, ax 8162 00008596 01C0 <1> add ax, ax 8163 00008598 01D0 <1> add ax, dx ; * 3 8164 0000859A D1E8 <1> shr ax, 1 ; * 3 / 2 = * 1.5 8165 0000859C 83D000 <1> adc ax, 0 ; if the last nybble is needed 8166 0000859F 31D2 <1> xor dx, dx 8167 <1> 8168 <1> @@: 8169 000085A1 8B5E0B <1> mov bx, word [bp + bsBPB + bpbBytesPerSector] 8170 000085A4 4B <1> dec bx 8171 000085A5 01D8 <1> add ax, bx 8172 000085A7 83D200 <1> adc dx, 0 8173 000085AA 43 <1> inc bx 8174 <1> 8175 000085AB 91 <1> xchg cx, ax 8176 000085AC 89D0 <1> mov ax, dx 8177 000085AE 31D2 <1> xor dx, dx 8178 000085B0 F7F3 <1> div bx 8179 000085B2 91 <1> xchg cx, ax 8180 000085B3 F7F3 <1> div bx 8181 000085B5 87CA <1> xchg cx, dx 8182 <1> ; cx = remainder, dx:ax = number of sectors needed 8183 <1> 8184 000085B7 8B4E16 <1> mov cx, word [bp + bsBPB + bpbSectorsPerFAT] 8185 000085BA 31FF <1> xor di, di ; di:cx = sectors per FAT 8186 <1> ; iff FAT12, FAT16 8187 000085BC 85C9 <1> test cx, cx ; is FAT32 ? 8188 000085BE 7506 <1> jnz @F ; no --> 8189 000085C0 8B4E24 <1> mov cx, word [bp + bsBPB + ebpbSectorsPerFATLarge] 8190 000085C3 8B7E26 <1> mov di, word [bp + bsBPB + ebpbSectorsPerFATLarge + 2] ; for FAT32 8191 <1> @@: 8192 <1> 8193 000085C6 39D7 <1> cmp di, dx 8194 000085C8 7502 <1> jne @F 8195 000085CA 39C1 <1> cmp cx, ax 8196 <1> @@: 8197 000085CC 730C <1> jae @F 8198 <1> .badfat: 8199 000085CE BA[4B63] <1> mov dx, msg.boot_badfat 8200 000085D1 B80F02 <1> mov ax, 020Fh 8201 000085D4 E8BA21 <1> call setrc 8202 000085D7 E92CE0 <1> jmp bootcmd.fail 8203 <1> 8204 <1> @@: 8205 000085DA C3 <1> retn 2609 %endif 2610 2611 2612 usesection lDEBUG_CODE 2613 2614 bb: 2615 %if _BOOTLDR 2616 000085DB F606[9D00]40 testopt [internalflags], nodosloaded 2617 000085E0 740F jz @F 2618 000085E2 4E dec si 2619 000085E3 4E dec si ; -> at 'B' 2620 000085E4 BA[4364] mov dx, msg.boot 2621 000085E7 E83335 call isstring? ; check for "BOOT" 2622 000085EA 7503E938DB je bootcmd 2623 000085EF 46 inc si ; skip 'B' 2624 000085F0 AC lodsb ; load next 2625 @@: 2626 %endif 2627 000085F1 E82708 call uppercase 2628 %if _BREAKPOINTS 2629 000085F4 3C50 cmp al, 'P' 2630 000085F6 7449 je point_set 2631 000085F8 3C4E cmp al, 'N' 2632 000085FA 7503E91302 je point_number 2633 000085FF 3C43 cmp al, 'C' 2634 00008601 7503E9AA04 je point_clear 2635 00008606 3C44 cmp al, 'D' 2636 00008608 7503E91E05 je point_disable 2637 0000860D 3C45 cmp al, 'E' 2638 0000860F 7503E90B05 je point_enable 2639 00008614 3C54 cmp al, 'T' 2640 00008616 7503E91A05 je point_toggle 2641 0000861B 3C4C cmp al, 'L' 2642 0000861D 7503E91D05 je point_list 2643 00008622 3C49 cmp al, 'I' 2644 00008624 7503E94102 je point_id 2645 00008629 3C57 cmp al, 'W' 2646 0000862B 7503E97F03 je point_when 2647 %if BPSIZE == 6 || BPSIZE == 9 2648 00008630 3C4F cmp al, 'O' 2649 00008632 7503E91803 je point_offset 2650 %endif 2651 %endif 2652 00008637 3C55 cmp al, 'U' ; BU command ? 2653 00008639 7503E9D307 je bu_breakpoint 2654 2655 0000863E E90921 jmp error ; no valid subcommand --> 2656 2657 %if _BREAKPOINTS 2658 point_set: 2659 00008641 E88D35 call skipwhite 2660 2661 00008644 E8EB06 call getpointat ; "AT" keyword ? 2662 00008647 720B jc .not_at ; no --> 2663 00008649 BF[8786] mov di, .get_saved ; access saved address later 2664 0000864C E8A106 call findpointat ; do we find it ? 2665 0000864F 7210 jc .find_new ; no, treat as if "NEW" keyword given --> 2666 ; point index is in dx 2667 00008651 52 push dx 2668 00008652 EB51 jmp @FF ; skip check whether used 2669 2670 .not_at: 2671 00008654 BF[7B86] mov di, .get_addr ; get address from input command line later 2672 00008657 E8F906 call getpointindex 2673 0000865A 7338 jnc @F ; got an index --> 2674 0000865C 7503E9E920 jz error ; "ALL" is invalid 2675 ; got "NEW" keyword 2676 .find_new: 2677 00008661 31C9 xor cx, cx 2678 00008663 50 push ax 2679 .new_loop: 2680 00008664 89C8 mov ax, cx ; try this index 2681 00008666 E87806 call calcpointbit 2682 %if ((_NUM_B_BP+7)>>3) != 1 2683 00008669 84A7[0201] test byte [b_bplist.used_mask+bx], ah 2684 %else 2685 test byte [b_bplist.used_mask], ah 2686 %endif 2687 0000866D 7421 jz .new_found ; found unused one --> 2688 2689 0000866F 41 inc cx ; = next index 2690 00008670 83F910 cmp cx, _NUM_B_BP ; valid ? 2691 00008673 72EF jb .new_loop ; yes, try next --> 2692 2693 00008675 BA[E16F] mov dx, msg.bb_no_new 2694 00008678 E96E7E jmp prnquit 2695 2696 2697 ; INP: al=, si-> input line 2698 ; OUT: al=, si-> after 2699 ; bx:dx = linear adddress 2700 ; does not return if error 2701 ; CHG: edxh 2702 .get_addr: 2703 0000867B 8B1E[9C0C] mov bx, word [reg_cs] 2704 0000867F E885B2 call getlinearaddr 2705 00008682 730B jnc .retn 2706 00008684 E9C320 jmp error 2707 2708 2709 ; INP: al=, si-> input line 2710 ; OUT: bx:dx = linear address 2711 ; CHG: - 2712 .get_saved: 2713 00008687 8B16[4892] mov dx, word [..@bb_saved_linear] 2714 0000868B 8B1E[4A92] mov bx, word [..@bb_saved_linear + 2] 2715 .retn: 2716 0000868F C3 retn 2717 2718 usesection lDEBUG_DATA_ENTRY 2719 00009246 00 align 4, db 0 2720 ..@bb_saved_linear: 2721 00009248 00000000 dd 0 2722 usesection lDEBUG_CODE 2723 2724 2725 .new_found: 2726 00008690 58 pop ax 2727 00008691 51 push cx 2728 00008692 EB11 jmp @FF 2729 2730 @@: 2731 00008694 52 push dx 2732 00008695 50 push ax 2733 00008696 89D0 mov ax, dx 2734 00008698 E84606 call calcpointbit 2735 %if ((_NUM_B_BP+7)>>3) != 1 2736 0000869B 84A7[0201] test byte [b_bplist.used_mask+bx], ah 2737 %else 2738 test byte [b_bplist.used_mask], ah 2739 %endif 2740 0000869F 58 pop ax 2741 000086A0 7403E9A520 jnz error 2742 @@: 2743 000086A5 FFD7 call di ; call either .get_addr or .get_saved 2744 ; in any case, bx:dx = linear address 2745 000086A7 BF0080 mov di, 8000h ; default counter 2746 000086AA 52 push dx 2747 000086AB 31D2 xor dx, dx 2748 2749 usesection lDEBUG_DATA_ENTRY 2750 align 4, db 0 2751 ..@bb_id_start: 2752 0000924C 0000 dw 0 2753 ..@bb_id_length: 2754 0000924E 0000 dw 0 2755 ..@bb_when_start: 2756 00009250 0000 dw 0 2757 ..@bb_when_length: 2758 00009252 0000 dw 0 2759 usesection lDEBUG_CODE 2760 2761 2762 000086AD 8916[4E92] mov word [..@bb_id_length], dx 2763 000086B1 8916[5292] mov word [..@bb_when_length], dx 2764 ; initialise to empty ID 2765 000086B5 52 push dx 2766 .loop_additional: 2767 000086B6 E81935 call skipwh0 2768 000086B9 4E dec si 2769 000086BA BA[4466] mov dx, msg.number 2770 000086BD E85D34 call isstring? 2771 000086C0 7435 je .additional_number 2772 000086C2 BA[4B66] mov dx, msg.counter 2773 000086C5 E85534 call isstring? 2774 000086C8 742D je .additional_number 2775 000086CA BA[5366] mov dx, msg.id 2776 000086CD E84D34 call isstring? 2777 000086D0 745A je .additional_id 2778 000086D2 BA[5666] mov dx, msg.when 2779 000086D5 E84534 call isstring? 2780 000086D8 7444 je .additional_when 2781 %if BPSIZE == 6 || BPSIZE == 9 2782 000086DA BA[5B66] mov dx, msg.offset 2783 000086DD E83D34 call isstring? 2784 000086E0 7425 je .additional_offset 2785 %endif 2786 000086E2 AC lodsb 2787 000086E3 E89634 call iseol? 2788 000086E6 744B je .no_additional 2789 000086E8 5A pop dx 2790 000086E9 85D2 test dx, dx ; already got a number without keyword? 2791 000086EB 7403E95A20 jnz error ; yes --> 2792 000086F0 42 inc dx ; remember for subsequent iterations 2793 000086F1 52 push dx 2794 000086F2 E8DD34 call skipwh0 2795 000086F5 EB0B jmp @F 2796 2797 .additional_number: 2798 000086F7 E8C134 call skipequals 2799 000086FA E87F34 call iseol? 2800 000086FD 7503E94820 je error 2801 @@: 2802 00008702 E8DC00 call getcounter 2803 00008705 EBAF jmp .loop_additional 2804 2805 %if BPSIZE == 6 || BPSIZE == 9 2806 .additional_offset: 2807 00008707 5A pop dx 2808 00008708 80CA01 or dl, 1 ; remember for subsequent iterations 2809 ; not to accept number without keyword 2810 0000870B 52 push dx 2811 0000870C E8AC34 call skipequals 2812 %if _PM 2813 0000870F 53 push bx 2814 00008710 E8622E call getdword 2815 00008713 8916[7887] mov word [bp_offset], dx 2816 00008717 891E[7A87] mov word [bp_offset + 2], bx 2817 0000871B 5B pop bx 2818 %else 2819 call getword 2820 mov word [bp_offset], dx 2821 %endif 2822 0000871C EB98 jmp .loop_additional 2823 %endif 2824 2825 .additional_when: 2826 0000871E 5A pop dx 2827 0000871F 80CA01 or dl, 1 ; remember for subsequent iterations 2828 ; not to accept number without keyword 2829 00008722 52 push dx 2830 00008723 E89534 call skipequals 2831 00008726 4E dec si 2832 00008727 E88C00 call get_when 2833 0000872A EB8A jmp .loop_additional 2834 2835 .additional_id: 2836 0000872C E88C34 call skipequals 2837 0000872F 4E dec si 2838 00008730 E85300 call get_id 2839 2840 .no_additional: 2841 00008733 5A pop dx ; discard non-keyword NUMBER indicator 2842 00008734 5A pop dx ; restore dx = low word of linear 2843 2844 00008735 87DA xchg bx, dx ; dx:bx = linear 2845 00008737 93 xchg bx, ax ; dx:ax = linear 2846 00008738 5B pop bx ; = 0-based point index to set 2847 00008739 52 push dx 2848 0000873A 50 push ax ; on stack: dword linear 2849 2850 0000873B 57 push di 2851 0000873C 87D3 xchg dx, bx ; dx = point index 2852 2853 ; As for set_id, set_when will free a prior condition 2854 ; when writing the new one. However, we check for the 2855 ; appropriate buffer size being still free before 2856 ; calling set_when because we want to cancel the point 2857 ; initialisation if either the ID or the condition do 2858 ; not fit, without having yet written anything. 2859 0000873E E8F602 call check_when_space ; CHG ax, bx, cx, si, di 2860 2861 ; Note that point_clear and init both leave the 2862 ; empty word in the ID array. Therefore we can 2863 ; always handle this by freeing the prior value 2864 ; first, which is required if we're resetting 2865 ; an existing point with BP AT. 2866 ; The set_id function takes care of this. 2867 00008741 E86501 call set_id ; CHG ax, bx, cx, si, di 2868 2869 ; After check_when_space then set_id both returned, 2870 ; we have finally checked all error conditions and 2871 ; are now actually modifying things. 2872 00008744 E8B402 call set_when ; CHG ax, bx, cx, si, di 2873 00008747 92 xchg ax, dx ; ax = point index 2874 00008748 5F pop di ; preserve counter value 2875 2876 00008749 89C3 mov bx, ax 2877 0000874B 01DB add bx, bx 2878 0000874D 01DB add bx, bx 2879 %if BPSIZE == 4 2880 %elif BPSIZE == 5 2881 add bx, ax 2882 %elif BPSIZE == 6 2883 add bx, ax ; * 5 2884 add bx, ax ; * 6 2885 %elif BPSIZE == 9 2886 0000874F 01DB add bx, bx ; * 8 2887 00008751 01C3 add bx, ax ; * 9 2888 %else 2889 %error Unexpected breakpoint size 2890 %endif 2891 00008753 8F87[0601] pop word [ b_bplist.bp + bx ] 2892 ; These two instructions need to stay in that order. 2893 ; For the non-PM version, the pop overwrites the byte 2894 ; that is then initialized to 0CCh (the breakpoint 2895 ; content byte). 2896 ; (This is not true for BPSIZE == 6. Instead, the pop 2897 ; overwrites the first byte of the preferred offset.) 2898 00008757 8F87[0801] pop word [ b_bplist.bp + bx + 2 ] 2899 0000875B C687[0E01]CC mov byte [ b_bplist.bp + bx + BPSIZE - 1 ], 0CCh 2900 %if BPSIZE == 6 2901 push word [bp_offset] 2902 pop word [ b_bplist.bp + bx + 3 ] 2903 %elif BPSIZE == 9 2904 00008760 FF36[7887] push word [bp_offset] 2905 00008764 8F87[0A01] pop word [ b_bplist.bp + bx + 4 ] 2906 00008768 FF36[7A87] push word [bp_offset + 2] 2907 0000876C 8F87[0C01] pop word [ b_bplist.bp + bx + 6 ] 2908 %endif 2909 00008770 89C3 mov bx, ax 2910 00008772 01DB add bx, bx 2911 00008774 89BF[9601] mov word [ b_bplist.counter + bx ], di 2912 00008778 E86605 call calcpointbit 2913 %if ((_NUM_B_BP+7)>>3) != 1 2914 0000877B 08A7[0201] or byte [b_bplist.used_mask+bx], ah 2915 0000877F F6D4 not ah 2916 00008781 20A7[0401] and byte [b_bplist.disabled_mask+bx], ah 2917 %if _BREAKPOINTS_STICKY 2918 and byte [b_bplist.sticky_mask+bx], ah 2919 %endif 2920 %else 2921 or byte [b_bplist.used_mask], ah 2922 not ah 2923 and byte [b_bplist.disabled_mask], ah 2924 %if _BREAKPOINTS_STICKY 2925 and byte [b_bplist.sticky_mask], ah 2926 %endif 2927 %endif 2928 00008785 C3 retn 2929 2930 2931 ; INP: si -> first non-blank character 2932 ; OUT: ..@bb_id_start and ..@bb_id_length set 2933 ; does not return if error (too long) 2934 ; CHG: ax, cx, si 2935 get_id: 2936 00008786 8936[4C92] mov word [..@bb_id_start], si 2937 @@: 2938 0000878A AC lodsb 2939 0000878B E8F233 call iseol?.notsemicolon 2940 0000878E 75FA jne @B 2941 ; si -> after EOL char 2942 ; si - 1 -> EOL char 2943 @@: 2944 00008790 4E dec si 2945 00008791 3B36[4C92] cmp si, word [..@bb_id_start] 2946 00008795 740C je @F 2947 00008797 807CFF20 cmp byte [si - 1], 32 2948 0000879B 74F3 je @B 2949 0000879D 807CFF09 cmp byte [si - 1], 9 2950 000087A1 74ED je @B 2951 @@: 2952 000087A3 89F1 mov cx, si 2953 000087A5 2B0E[4C92] sub cx, word [..@bb_id_start] 2954 000087A9 890E[4E92] mov word [..@bb_id_length], cx 2955 000087AD 83F93F cmp cx, 63 2956 000087B0 7603E9951F ja error 2957 2958 %if 0 2959 push dx 2960 mov dx, msg.id 2961 call putsz 2962 mov al, 32 2963 call putc 2964 mov al, '"' 2965 call putc 2966 mov dx, word [..@bb_id_start] 2967 mov cx, word [..@bb_id_length] 2968 call disp_message_length_cx 2969 mov al, '"' 2970 call putc 2971 mov dx, crlf 2972 call putsz 2973 pop dx 2974 %endif 2975 000087B5 C3 retn 2976 2977 2978 ; INP: si -> first non-blank character 2979 ; OUT: ..@bb_when_start and ..@bb_when_length set 2980 ; does not return if error 2981 ; al = character after the condition, si -> next 2982 ; CHG: ax, cx, si 2983 get_when: 2984 000087B6 8936[5092] mov word [..@bb_when_start], si 2985 @@: 2986 000087BA AC lodsb 2987 000087BB 52 push dx 2988 000087BC 53 push bx 2989 000087BD E8B52D call getexpression 2990 000087C0 5B pop bx 2991 000087C1 5A pop dx 2992 ; si -> after condition char 2993 ; si - 1 -> last condition char 2994 @@: 2995 000087C2 4E dec si 2996 000087C3 3B36[5092] cmp si, word [..@bb_when_start] 2997 000087C7 740C je @F 2998 000087C9 807CFF20 cmp byte [si - 1], 32 2999 000087CD 74F3 je @B 3000 000087CF 807CFF09 cmp byte [si - 1], 9 3001 000087D3 74ED je @B 3002 @@: 3003 000087D5 89F1 mov cx, si 3004 000087D7 2B0E[5092] sub cx, word [..@bb_when_start] 3005 000087DB 890E[5292] mov word [..@bb_when_length], cx 3006 3007 000087DF AC lodsb 3008 %if 0 3009 push dx 3010 mov dx, msg.when 3011 call putsz 3012 mov al, 32 3013 call putc 3014 mov al, '"' 3015 call putc 3016 mov dx, word [..@bb_when_start] 3017 mov cx, word [..@bb_when_length] 3018 call disp_message_length_cx 3019 mov al, '"' 3020 call putc 3021 mov dx, crlf 3022 call putsz 3023 dec si 3024 lodsb 3025 pop dx 3026 %endif 3027 000087E0 C3 retn 3028 3029 3030 ; INP: al = first character, si -> next character 3031 ; di = default value 3032 ; OUT: di = counter value (default if EOL) 3033 ; al = first character after number, si -> next 3034 ; CHG: - 3035 ; does not return if error encountered 3036 getcounter: 3037 .: 3038 000087E1 E8EE33 call skipwh0 3039 000087E4 E89533 call iseol? 3040 000087E7 7407 je .got_counter 3041 000087E9 52 push dx 3042 000087EA E86E32 call getword 3043 000087ED 89D7 mov di, dx 3044 000087EF 5A pop dx 3045 .got_counter: 3046 000087F0 C3 retn 3047 3048 3049 ; INP: al = first character, si -> next character 3050 ; OUT: di = counter value (defaults to 8000h) 3051 ; CHG: ax, si (flags not changed) 3052 ; does not return if error encountered 3053 .pushf_chkeol: 3054 000087F1 9C pushf 3055 000087F2 52 push dx 3056 000087F3 4E dec si 3057 000087F4 BA[4466] mov dx, msg.number 3058 000087F7 E82333 call isstring? 3059 000087FA 7408 je @F 3060 000087FC BA[4B66] mov dx, msg.counter 3061 000087FF E81B33 call isstring? 3062 00008802 7504 jne @FF 3063 @@: 3064 00008804 E8B433 call skipequals 3065 00008807 A8 db __TEST_IMM8 ; (skip lodsb) 3066 @@: 3067 00008808 AC lodsb 3068 00008809 5A pop dx 3069 0000880A E8D4FF call . 3070 0000880D E88133 call chkeol 3071 00008810 9D popf 3072 00008811 C3 retn 3073 3074 3075 point_number: 3076 00008812 E8BC33 call skipwhite 3077 3078 00008815 E81A05 call getpointat ; "AT" keyword ? 3079 00008818 7210 jc .not_at ; no --> 3080 0000881A E8D304 call findpointat ; do we find it ? 3081 0000881D 7303E9281F jc error ; not found --> 3082 00008822 BF0080 mov di, 8000h ; default counter 3083 00008825 E8C9FF call getcounter.pushf_chkeol 3084 00008828 EB29 jmp @F ; point index is in dx --> 3085 3086 .not_at: 3087 0000882A E82605 call getpointindex 3088 0000882D BF0080 mov di, 8000h ; default counter 3089 00008830 E8BEFF call getcounter.pushf_chkeol 3090 00008833 731E jnc @F 3091 00008835 7403E9101F jnz error ; "NEW" is invalid --> 3092 3093 0000883A 31C9 xor cx, cx 3094 .all_loop: 3095 0000883C 89C8 mov ax, cx 3096 0000883E 89CA mov dx, cx 3097 00008840 E89E04 call calcpointbit 3098 %if ((_NUM_B_BP+7)>>3) != 1 3099 00008843 84A7[0201] test byte [b_bplist.used_mask+bx], ah 3100 %else 3101 test byte [b_bplist.used_mask], ah 3102 %endif 3103 00008847 7403 jz .all_next 3104 00008849 E81500 call .setnumber 3105 .all_next: 3106 0000884C 41 inc cx 3107 0000884D 83F910 cmp cx, _NUM_B_BP 3108 00008850 72EA jb .all_loop 3109 00008852 C3 retn 3110 3111 @@: 3112 00008853 89D0 mov ax, dx 3113 00008855 E88904 call calcpointbit 3114 %if ((_NUM_B_BP+7)>>3) != 1 3115 00008858 84A7[0201] test byte [b_bplist.used_mask+bx], ah 3116 %else 3117 test byte [b_bplist.used_mask], ah 3118 %endif 3119 0000885C 7503E9E91E jz error 3120 3121 .setnumber: 3122 00008861 89D3 mov bx, dx 3123 00008863 01DB add bx, bx 3124 00008865 89BF[9601] mov word [b_bplist.counter + bx], di 3125 00008869 C3 retn 3126 3127 3128 point_id: 3129 0000886A E86433 call skipwhite 3130 3131 0000886D E8C204 call getpointat ; "AT" keyword ? 3132 00008870 720A jc .not_at ; no --> 3133 00008872 E87B04 call findpointat ; do we find it ? 3134 00008875 7303E9D01E jc error ; not found --> 3135 0000887A EB08 jmp @F ; point index is in dx --> 3136 3137 .not_at: 3138 0000887C E8D404 call getpointindex 3139 0000887F 7303E9C61E jc error ; "NEW" and "ALL" keywords are invalid --> 3140 3141 @@: 3142 00008884 50 push ax 3143 00008885 89D0 mov ax, dx 3144 00008887 E85704 call calcpointbit 3145 %if ((_NUM_B_BP+7)>>3) != 1 3146 0000888A 84A7[0201] test byte [b_bplist.used_mask+bx], ah 3147 %else 3148 test byte [b_bplist.used_mask], ah 3149 %endif 3150 0000888E 7503E9B71E jz error 3151 00008893 58 pop ax 3152 3153 00008894 E83B33 call skipwh0 3154 3155 00008897 4E dec si 3156 00008898 52 push dx 3157 00008899 BA[5366] mov dx, msg.id 3158 0000889C E87E32 call isstring? 3159 0000889F 7504 jne .no_id_kw 3160 000088A1 E81733 call skipequals 3161 000088A4 4E dec si 3162 .no_id_kw: 3163 000088A5 5A pop dx 3164 000088A6 E8DDFE call get_id 3165 3166 ; INP: ..@bb_id_start 3167 ; ..@bb_id_length 3168 ; dx = point index 3169 ; OUT: jumps to error if failure (too long) 3170 ; CHG: ax, bx, cx, si, di 3171 set_id: 3172 000088A9 BBFFFF mov bx, -1 3173 000088AC E84000 call get_set_id_offset_length 3174 000088AF B10A mov cl, 10 3175 000088B1 89D8 mov ax, bx 3176 000088B3 D3EB shr bx, cl ; bx = length of ID to free 3177 3178 000088B5 8B36[F601] mov si, word [b_bplist.idbuffer.free] 3179 ; offset free 3180 000088B9 F7DE neg si ; - offset free 3181 000088BB 81C68001 add si, b_bplist.idbuffer.length 3182 ; 1024 - offset free = amount free 3183 000088BF 01DE add si, bx ; amount free + length of ID to free 3184 000088C1 8B0E[4E92] mov cx, word [..@bb_id_length] 3185 000088C5 E33F jcxz .empty ; if no ID to set --> 3186 000088C7 39CE cmp si, cx ; enough free ? 3187 000088C9 8B36[4C92] mov si, word [..@bb_id_start] 3188 ; -> ID string 3189 000088CD 7303E9781E jb error ; no --> 3190 3191 000088D2 51 push cx 3192 000088D3 E83700 call free_id ; actually free it now 3193 000088D6 59 pop cx 3194 000088D7 51 push cx 3195 000088D8 89CB mov bx, cx ; length 3196 000088DA B10A mov cl, 10 ; offset part is 10 bits (0..1023) 3197 000088DC D3E3 shl bx, cl ; length is in top 6 bits (0..63) 3198 000088DE 59 pop cx 3199 000088DF 8B3E[F601] mov di, word [b_bplist.idbuffer.free] 3200 ; = offset of free part 3201 000088E3 010E[F601] add word [b_bplist.idbuffer.free], cx 3202 ; mark space as used 3203 000088E7 09FB or bx, di ; OR in the offset 3204 000088E9 81C7[FA01] add di, b_bplist.idbuffer 3205 ; -> into buffer space 3206 000088ED F3A4 rep movsb ; write 3207 3208 ; now remember this 3209 .after_empty: 3210 ; INP: dx = 0-based point index 3211 ; bx = word to set (-1 if not to modify) 3212 ; OUT: bx = word read 3213 get_set_id_offset_length: equ $ 3214 000088EF 87D3 xchg dx, bx 3215 000088F1 D1E3 shl bx, 1 3216 000088F3 FFB7[B601] push word [b_bplist.id + bx] 3217 000088F7 83FAFF cmp dx, -1 3218 000088FA 7404 je @F 3219 000088FC 8997[B601] mov word [b_bplist.id + bx], dx 3220 @@: 3221 00008900 5A pop dx 3222 00008901 D1EB shr bx, 1 3223 00008903 87D3 xchg dx, bx 3224 00008905 C3 retn 3225 3226 .empty: 3227 00008906 E80400 call free_id 3228 00008909 31DB xor bx, bx ; offset = 0 and length = 0 3229 0000890B EBE2 jmp .after_empty 3230 3231 3232 ; INP: ax = offset/length word of ID to free 3233 ; (length zero means none) 3234 ; b_bplist.id = ID array (ONE of which matches ax) 3235 ; CHG: ax, bx, cx 3236 ; OUT: b_bplist.id entries adjusted 3237 ; (the one that is being freed is unaffected) 3238 ; b_bplist.idbuffer adjusted 3239 ; STT: UP, ss = ds = es 3240 ; REM: The b_bplist.id array contains zeroes as 3241 ; indicators of unused entries. This implies 3242 ; that the length field is zero too. However, 3243 ; the canonical NULL entry is *all* zeros. 3244 free_id: 3245 0000890D B10A mov cl, 10 3246 0000890F 89C3 mov bx, ax 3247 00008911 81E3FF03 and bx, 1023 ; bx = offset of ID to free 3248 00008915 D3E8 shr ax, cl ; ax = length of ID to free 3249 00008917 91 xchg cx, ax ; cx = length of ID to free 3250 3251 00008918 56 push si 3252 00008919 57 push di 3253 3254 0000891A E330 jcxz .return ; if none to free --> 3255 3256 0000891C 51 push cx 3257 0000891D 8DBF[FA01] lea di, [b_bplist.idbuffer + bx] 3258 ; -> ID to be freed 3259 ; (destination of following data) 3260 00008921 89FE mov si, di 3261 00008923 01CE add si, cx ; -> behind ID to be freed 3262 ; (source of following data) 3263 00008925 89F1 mov cx, si 3264 00008927 F7D9 neg cx ; minus pointer to first subsequent data 3265 00008929 81C1[7A03] add cx, b_bplist.idbuffer + b_bplist.idbuffer.length 3266 ; pointer behind buffer - pointer subsequent data 3267 ; = length of data to move 3268 0000892D F3A4 rep movsb ; now di -> first uninitialised byte 3269 0000892F 59 pop cx ; = length of data freed 3270 3271 00008930 290E[F601] sub word [b_bplist.idbuffer.free], cx 3272 ; mark as free 3273 00008934 51 push cx 3274 00008935 30C0 xor al, al 3275 00008937 F3AA rep stosb ; clear the buffer trailer (uninitialised part) 3276 00008939 5F pop di ; di = length of data freed 3277 3278 0000893A BE[B601] mov si, b_bplist.id 3279 %if _NUM_B_BP < 256 3280 0000893D B110 mov cl, _NUM_B_BP 3281 %else 3282 mov cx, _NUM_B_BP 3283 %endif 3284 .loop: 3285 0000893F AD lodsw 3286 00008940 25FF03 and ax, 1023 ; get offset 3287 00008943 39D8 cmp ax, bx ; offset matches what we're freeing ?, OR 3288 ; is it below/equal the offset we're freeing ? 3289 00008945 7603 jbe .next ; yes --> (also jumps if ax == 0) 3290 00008947 297CFE sub word [si - 2], di ; adjust offset 3291 ; This subtraction shouldn't underflow the 10 bits 3292 ; used for the offset, so it should leave the top 3293 ; 6 bits for the ID length unchanged. 3294 .next: 3295 0000894A E2F3 loop .loop 3296 3297 .return: 3298 0000894C 5F pop di 3299 0000894D 5E pop si 3300 0000894E C3 retn 3301 3302 3303 %if BPSIZE == 6 || BPSIZE == 9 3304 point_offset: 3305 0000894F E87F32 call skipwhite 3306 3307 00008952 E8DD03 call getpointat ; "AT" keyword ? 3308 00008955 720A jc .not_at ; no --> 3309 00008957 E89603 call findpointat ; do we find it ? 3310 0000895A 7303E9EB1D jc error ; not found --> 3311 0000895F EB08 jmp @F ; point index is in dx --> 3312 3313 .not_at: 3314 00008961 E8EF03 call getpointindex 3315 00008964 7303E9E11D jc error ; "NEW" and "ALL" keywords are invalid --> 3316 3317 @@: 3318 00008969 50 push ax 3319 0000896A 89D0 mov ax, dx 3320 0000896C E87203 call calcpointbit 3321 %if ((_NUM_B_BP+7)>>3) != 1 3322 0000896F 84A7[0201] test byte [b_bplist.used_mask+bx], ah 3323 %else 3324 test byte [b_bplist.used_mask], ah 3325 %endif 3326 00008973 7503E9D21D jz error 3327 00008978 58 pop ax 3328 3329 00008979 E85632 call skipwh0 3330 0000897C 52 push dx 3331 0000897D BAFFFF mov dx, -1 3332 %if BPSIZE == 9 3333 00008980 89D3 mov bx, dx 3334 %endif 3335 00008982 E8F731 call iseol? 3336 00008985 7414 je @F 3337 00008987 4E dec si 3338 00008988 BA[5B66] mov dx, msg.offset 3339 0000898B E88F31 call isstring? 3340 0000898E 7504 jne .no_offset_kw 3341 00008990 E82832 call skipequals 3342 00008993 4E dec si 3343 .no_offset_kw: 3344 00008994 AC lodsb 3345 %if BPSIZE == 9 3346 00008995 E8DD2B call getdword ; bx:dx = offset 3347 %else 3348 call getword ; dx = offset 3349 %endif 3350 00008998 E8F631 call chkeol 3351 @@: 3352 0000899B 58 pop ax 3353 0000899C 89C7 mov di, ax 3354 0000899E 01FF add di, di 3355 000089A0 01FF add di, di ; * 4 3356 %if BPSIZE == 6 3357 add di, ax ; * 5 3358 add di, ax ; * 6 3359 add di, b_bplist.bp + 3 3360 %elif BPSIZE == 9 3361 000089A2 01FF add di, di ; * 8 3362 000089A4 01C7 add di, ax ; * 9 3363 000089A6 81C7[0A01] add di, b_bplist.bp + 4 3364 %else 3365 %error Unexpected breakpoint size 3366 %endif 3367 000089AA 92 xchg ax, dx 3368 000089AB AB stosw ; store low word of offset 3369 %if BPSIZE == 9 3370 000089AC 93 xchg ax, bx 3371 000089AD AB stosw ; store high word of offset 3372 %endif 3373 000089AE C3 retn 3374 %endif 3375 3376 3377 point_when: 3378 000089AF E81F32 call skipwhite 3379 3380 000089B2 E87D03 call getpointat ; "AT" keyword ? 3381 000089B5 720A jc .not_at ; no --> 3382 000089B7 E83603 call findpointat ; do we find it ? 3383 000089BA 7303E98B1D jc error ; not found --> 3384 000089BF EB08 jmp @F ; point index is in dx --> 3385 3386 .not_at: 3387 000089C1 E88F03 call getpointindex 3388 000089C4 7303E9811D jc error ; "NEW" and "ALL" keywords are invalid --> 3389 3390 @@: 3391 000089C9 50 push ax 3392 000089CA 89D0 mov ax, dx 3393 000089CC E81203 call calcpointbit 3394 %if ((_NUM_B_BP+7)>>3) != 1 3395 000089CF 84A7[0201] test byte [b_bplist.used_mask+bx], ah 3396 %else 3397 test byte [b_bplist.used_mask], ah 3398 %endif 3399 000089D3 7503E9721D jz error 3400 000089D8 58 pop ax 3401 3402 000089D9 E8F631 call skipwh0 3403 000089DC 8326[5292]00 and word [..@bb_when_length], 0 3404 000089E1 E89831 call iseol? 3405 000089E4 7415 je @F 3406 000089E6 4E dec si 3407 000089E7 52 push dx 3408 000089E8 BA[5666] mov dx, msg.when 3409 000089EB E82F31 call isstring? 3410 000089EE 7504 jne .no_when_kw 3411 000089F0 E8C831 call skipequals 3412 000089F3 4E dec si 3413 .no_when_kw: 3414 000089F4 5A pop dx 3415 000089F5 E8BEFD call get_when 3416 000089F8 E89631 call chkeol 3417 @@: 3418 3419 3420 ; INP: ..@bb_when_start 3421 ; ..@bb_when_length 3422 ; dx = point index 3423 ; OUT: jumps to error if failure (too long) 3424 ; CHG: ax, bx, cx, si, di 3425 ; STT: UP, ss = ds = es 3426 set_when: 3427 000089FB E83900 call check_when_space ; cx = length (with terminating NUL) or 0, 3428 ; si -> clause (if cx != 0), 3429 ; ax = prior pointer or 0 3430 000089FE E330 jcxz .empty 3431 3432 00008A00 51 push cx 3433 00008A01 E86B00 call free_when ; actually free it now (INP ax) 3434 00008A04 59 pop cx 3435 00008A05 8B3E[F801] mov di, word [b_bplist.whenbuffer.free] 3436 ; = offset of free part 3437 00008A09 010E[F801] add word [b_bplist.whenbuffer.free], cx 3438 ; mark space as used 3439 00008A0D 81C7[7A03] add di, b_bplist.whenbuffer 3440 ; -> into buffer space 3441 00008A11 89FB mov bx, di ; bx -> buffer for clause, for set function 3442 ; si -> new clause (left by check function) 3443 00008A13 F3A4 rep movsb ; write (with space for the NUL) 3444 00008A15 C645FF00 mov byte [di - 1], 0 ; actually write a NUL 3445 3446 ; now remember this 3447 .after_empty: 3448 ; INP: dx = 0-based point index 3449 ; bx = word to set (-1 if not to modify) 3450 ; OUT: bx = word read 3451 get_set_when_offset: equ $ 3452 00008A19 87D3 xchg dx, bx 3453 00008A1B D1E3 shl bx, 1 3454 00008A1D FFB7[D601] push word [b_bplist.when + bx] 3455 00008A21 83FAFF cmp dx, -1 3456 00008A24 7404 je @F 3457 00008A26 8997[D601] mov word [b_bplist.when + bx], dx 3458 @@: 3459 00008A2A 5A pop dx 3460 00008A2B D1EB shr bx, 1 3461 00008A2D 87D3 xchg dx, bx 3462 00008A2F C3 retn 3463 3464 .empty: 3465 00008A30 E83C00 call free_when 3466 00008A33 31DB xor bx, bx ; offset = 0 3467 00008A35 EBE2 jmp .after_empty 3468 3469 3470 ; INP: ..@bb_when_start 3471 ; ..@bb_when_length 3472 ; dx = point index 3473 ; OUT: jumps to error if failure (too long) 3474 ; ax = prior pointer from array (to be freed), 3475 ; or 0 if no prior clause to free 3476 ; cx = length (including terminating NUL) 3477 ; or = 0 if no WHEN clause 3478 ; (if cx != 0) si -> WHEN clause data 3479 ; CHG: ax, bx, cx, si, di 3480 ; STT: UP, ss = ds = es 3481 check_when_space: 3482 00008A37 BBFFFF mov bx, -1 3483 00008A3A E8DCFF call get_set_when_offset 3484 3485 00008A3D 53 push bx 3486 00008A3E 85DB test bx, bx 3487 00008A40 740D jz @F 3488 00008A42 89DF mov di, bx 3489 00008A44 B9FFFF mov cx, -1 3490 00008A47 B000 mov al, 0 3491 00008A49 F2AE repne scasb 3492 00008A4B F7D1 not cx ; = length to free (including terminating NUL) 3493 00008A4D 89CB mov bx, cx 3494 @@: ; bx = length to free 3495 00008A4F 58 pop ax ; ax -> prior clause in .whenbuffer 3496 3497 00008A50 8B36[F801] mov si, word [b_bplist.whenbuffer.free] 3498 ; offset free 3499 00008A54 F7DE neg si ; - offset free 3500 00008A56 81C60004 add si, b_bplist.whenbuffer.length 3501 ; 1024 - offset free = amount free 3502 00008A5A 01DE add si, bx ; amount free + length of condition to free 3503 00008A5C 8B0E[5292] mov cx, word [..@bb_when_length] 3504 00008A60 E30C jcxz .empty ; if no condition to set --> 3505 00008A62 41 inc cx ; count terminating NUL 3506 00008A63 39CE cmp si, cx ; enough free ? 3507 00008A65 8B36[5092] mov si, word [..@bb_when_start] 3508 ; -> condition string 3509 00008A69 7303E9DC1C jb error ; no --> 3510 .empty: 3511 00008A6E C3 retn 3512 3513 3514 ; INP: ax = offset word of condition to free 3515 ; (zero means none) 3516 ; b_bplist.when = condition array (ONE of which matches ax) 3517 ; CHG: ax, bx, cx 3518 ; OUT: b_bplist.when entries adjusted 3519 ; (the one that is being freed is unaffected) 3520 ; b_bplist.whenbuffer adjusted 3521 ; STT: UP, ss = ds = es 3522 ; REM: The b_bplist.when array contains actual offsets 3523 ; into the b_bplist.whenbuffer space. Therefore 3524 ; a value of zero acts as a NULL pointer and valid 3525 ; values are >= b_bplist.whenbuffer. 3526 free_when: 3527 00008A6F 56 push si 3528 00008A70 57 push di 3529 3530 00008A71 85C0 test ax, ax 3531 00008A73 7438 jz .return 3532 3533 00008A75 89C7 mov di, ax 3534 00008A77 89C3 mov bx, ax 3535 ; -> condition to be freed 3536 ; (destination of following data) 3537 00008A79 57 push di 3538 00008A7A B9FFFF mov cx, -1 3539 00008A7D B000 mov al, 0 3540 00008A7F F2AE repne scasb 3541 00008A81 F7D1 not cx ; = length to free (including terminating NUL) 3542 00008A83 5F pop di 3543 00008A84 51 push cx 3544 00008A85 89FE mov si, di 3545 00008A87 01CE add si, cx ; -> behind condition to be freed 3546 ; (source of following data) 3547 00008A89 89F1 mov cx, si 3548 00008A8B F7D9 neg cx ; minus pointer to first subsequent data 3549 00008A8D 81C1[7A07] add cx, b_bplist.whenbuffer + b_bplist.whenbuffer.length 3550 ; pointer behind buffer - pointer subsequent data 3551 ; = length of data to move 3552 00008A91 F3A4 rep movsb ; now di -> first uninitialised byte 3553 00008A93 59 pop cx ; = length of data freed 3554 3555 00008A94 290E[F801] sub word [b_bplist.whenbuffer.free], cx 3556 ; mark as free 3557 00008A98 51 push cx 3558 00008A99 30C0 xor al, al 3559 00008A9B F3AA rep stosb ; clear the buffer trailer (uninitialised part) 3560 00008A9D 5F pop di ; di = length of data freed 3561 3562 00008A9E BE[D601] mov si, b_bplist.when 3563 %if _NUM_B_BP < 256 3564 00008AA1 B110 mov cl, _NUM_B_BP 3565 %else 3566 mov cx, _NUM_B_BP 3567 %endif 3568 .loop: 3569 00008AA3 AD lodsw 3570 00008AA4 39D8 cmp ax, bx ; offset we're freeing ?, OR 3571 ; is it below/equal the offset we're freeing ? 3572 00008AA6 7603 jbe .next ; yes --> (also jumps if ax == 0) 3573 00008AA8 297CFE sub word [si - 2], di ; adjust offset 3574 .next: 3575 00008AAB E2F6 loop .loop 3576 3577 .return: 3578 00008AAD 5F pop di 3579 00008AAE 5E pop si 3580 00008AAF C3 retn 3581 3582 3583 point_clear: 3584 00008AB0 BF[B58A] mov di, .clear 3585 00008AB3 EB1F jmp point_clear_enable_disable_toggle_common 3586 3587 .clear: 3588 00008AB5 F7D0 not ax 3589 %if ((_NUM_B_BP+7)>>3) != 1 3590 00008AB7 20A7[0201] and byte [b_bplist.used_mask+bx], ah 3591 00008ABB 20A7[0401] and byte [b_bplist.disabled_mask+bx], ah 3592 %else 3593 and byte [b_bplist.used_mask], ah 3594 and byte [b_bplist.disabled_mask], ah 3595 %endif 3596 00008ABF 51 push cx 3597 3598 00008AC0 31DB xor bx, bx ; replace by empty word 3599 00008AC2 E82AFE call get_set_id_offset_length 3600 00008AC5 93 xchg ax, bx ; ax = word what to free 3601 00008AC6 E844FE call free_id ; actually free it now 3602 3603 00008AC9 31DB xor bx, bx ; replace by empty word 3604 00008ACB E84BFF call get_set_when_offset 3605 00008ACE 93 xchg ax, bx ; ax = word what to free 3606 00008ACF E89DFF call free_when ; actually free it now 3607 3608 %if 0 3609 xor cx, cx 3610 3611 mov bx, dx 3612 add bx, bx ; * 2 3613 mov word [b_bplist.counter + bx], cx 3614 3615 add bx, bx ; * 4 3616 %if BPSIZE == 4 3617 %elif BPSIZE == 5 3618 add bx, dx ; * 5 3619 %elif BPSIZE == 6 3620 add bx, dx ; * 5 3621 add bx, dx ; * 6 3622 %elif BPSIZE == 9 3623 add bx, bx ; * 8 3624 add bx, dx ; * 9 3625 %else 3626 %error Unexpected breakpoint size 3627 %endif 3628 add bx, b_bplist.bp 3629 mov word [bx], cx 3630 mov word [bx + 2], cx 3631 %if BPSIZE == 4 3632 %elif BPSIZE == 5 3633 mov byte [bx + 4], cl 3634 %elif BPSIZE == 6 3635 mov word [bx + 4], cx 3636 %elif BPSIZE == 9 3637 mov word [bx + 4], cx 3638 mov word [bx + 6], cx 3639 mov byte [bx + 8], cl 3640 %else 3641 %error Unexpected breakpoint size 3642 %endif 3643 3644 %endif 3645 3646 00008AD2 59 pop cx 3647 00008AD3 C3 retn 3648 3649 point_clear_enable_disable_toggle_common: 3650 00008AD4 E8FA30 call skipwhite 3651 3652 00008AD7 E85802 call getpointat ; "AT" keyword ? 3653 00008ADA 720A jc .not_at ; no --> 3654 00008ADC E81102 call findpointat ; do we find it ? 3655 00008ADF 7303E9661C jc error ; not found --> 3656 00008AE4 EB25 jmp @F ; point index is in dx --> 3657 3658 .not_at: 3659 00008AE6 E86A02 call getpointindex 3660 00008AE9 7320 jnc @F ; point index is in dx, no keyword --> 3661 00008AEB 7403E95A1C jnz error ; "NEW" is invalid --> 3662 3663 00008AF0 E89E30 call chkeol 3664 00008AF3 31C9 xor cx, cx 3665 .all_loop: 3666 00008AF5 89C8 mov ax, cx 3667 00008AF7 E8E701 call calcpointbit 3668 %if ((_NUM_B_BP+7)>>3) != 1 3669 00008AFA 84A7[0201] test byte [b_bplist.used_mask+bx], ah 3670 %else 3671 test byte [b_bplist.used_mask], ah 3672 %endif 3673 00008AFE 7404 jz .all_next 3674 00008B00 89CA mov dx, cx 3675 00008B02 FFD7 call di 3676 .all_next: 3677 00008B04 41 inc cx 3678 00008B05 83F910 cmp cx, _NUM_B_BP 3679 00008B08 72EB jb .all_loop 3680 00008B0A C3 retn 3681 3682 @@: 3683 00008B0B E88330 call chkeol 3684 00008B0E 89D0 mov ax, dx 3685 00008B10 E8CE01 call calcpointbit 3686 %if ((_NUM_B_BP+7)>>3) != 1 3687 00008B13 84A7[0201] test byte [b_bplist.used_mask+bx], ah 3688 %else 3689 test byte [b_bplist.used_mask], ah 3690 %endif 3691 00008B17 7503E92E1C jz error 3692 00008B1C FFD7 call di 3693 00008B1E C3 retn 3694 3695 3696 point_enable: 3697 00008B1F BF[248B] mov di, .enable 3698 00008B22 EBB0 jmp point_clear_enable_disable_toggle_common 3699 3700 .enable: 3701 00008B24 F7D0 not ax 3702 %if ((_NUM_B_BP+7)>>3) != 1 3703 00008B26 20A7[0401] and byte [b_bplist.disabled_mask+bx], ah 3704 %else 3705 and byte [b_bplist.disabled_mask], ah 3706 %endif 3707 00008B2A C3 retn 3708 3709 3710 point_disable: 3711 00008B2B BF[308B] mov di, .disable 3712 00008B2E EBA4 jmp point_clear_enable_disable_toggle_common 3713 3714 .disable: 3715 %if ((_NUM_B_BP+7)>>3) != 1 3716 00008B30 08A7[0401] or byte [b_bplist.disabled_mask+bx], ah 3717 %else 3718 or byte [b_bplist.disabled_mask], ah 3719 %endif 3720 00008B34 C3 retn 3721 3722 3723 point_toggle: 3724 00008B35 BF[3A8B] mov di, .toggle 3725 00008B38 EB9A jmp point_clear_enable_disable_toggle_common 3726 3727 .toggle: 3728 %if ((_NUM_B_BP+7)>>3) != 1 3729 00008B3A 30A7[0401] xor byte [b_bplist.disabled_mask+bx], ah 3730 %else 3731 xor byte [b_bplist.disabled_mask], ah 3732 %endif 3733 00008B3E C3 retn 3734 3735 3736 point_list: 3737 00008B3F E88F30 call skipwhite 3738 00008B42 E83730 call iseol? 3739 00008B45 747B je .all 3740 3741 00008B47 E8E801 call getpointat ; "AT" keyword ? 3742 00008B4A 7256 jc .not_at ; no --> 3743 00008B4C E8A101 call findpointat ; do we find it ? 3744 ; Here we ignore the point index in dx, we just 3745 ; take note that at least one point matching the 3746 ; specified address exists. The points are matched 3747 ; against the linear address in ..@bb_saved_linear. 3748 00008B4F 7307 jnc .all_matching 3749 3750 00008B51 BA[A270] mov dx, msg.bpnone_at 3751 00008B54 E8DC34 call putsz 3752 00008B57 C3 retn 3753 3754 3755 .all_matching: 3756 00008B58 31ED xor bp, bp 3757 00008B5A 31DB xor bx, bx 3758 00008B5C 31D2 xor dx, dx 3759 00008B5E BF[0E08] mov di, line_out 3760 .loop_matching: 3761 00008B61 89DE mov si, bx 3762 00008B63 01F6 add si, si 3763 00008B65 01F6 add si, si 3764 %if BPSIZE == 4 3765 %elif BPSIZE == 5 3766 add si, bx 3767 %elif BPSIZE == 6 3768 add si, bx ; * 5 3769 add si, bx ; * 6 3770 %elif BPSIZE == 9 3771 00008B67 01F6 add si, si ; * 8 3772 00008B69 01DE add si, bx ; * 9 3773 %else 3774 %error Unexpected breakpoint size 3775 %endif 3776 00008B6B 81C6[0601] add si, b_bplist.bp 3777 00008B6F AD lodsw 3778 00008B70 3906[4892] cmp word [..@bb_saved_linear], ax 3779 00008B74 7524 jne .next_matching 3780 %if _PM 3781 00008B76 AD lodsw 3782 %else 3783 xor ax, ax 3784 lodsb 3785 %endif 3786 00008B77 3906[4A92] cmp word [..@bb_saved_linear + 2], ax 3787 00008B7B 751D jne .next_matching 3788 3789 00008B7D 57 push di 3790 00008B7E B020 mov al, 32 3791 00008B80 B92800 mov cx, 40 3792 00008B83 F3AA rep stosb ; initialize field with blanks 3793 00008B85 30C0 xor al, al 3794 00008B87 AA stosb ; terminate it 3795 00008B88 5F pop di 3796 3797 00008B89 E88000 call .single ; fill buffer 3798 3799 00008B8C 52 push dx 3800 00008B8D 53 push bx 3801 %if 0 3802 test dl, 1 ; an odd point ? 3803 jnz .odd_matching ; yes --> 3804 mov di, line_out + 40 ; write next point after the field 3805 jmp .was_even_matching 3806 .odd_matching: 3807 %endif 3808 00008B8E E82331 call putsline_crlf ; put line with linebreak (and no excess blanks) 3809 00008B91 E83301 call handle_bl_when 3810 00008B94 BF[0E08] mov di, line_out ; write next point at start of field 3811 .was_even_matching: 3812 00008B97 5B pop bx 3813 00008B98 5A pop dx 3814 00008B99 42 inc dx ; increment odd/even counter 3815 .next_matching: 3816 00008B9A 43 inc bx ; increment breakpoint index 3817 00008B9B 83FB10 cmp bx, _NUM_B_BP 3818 00008B9E 75C1 jne .loop_matching 3819 00008BA0 EB51 jmp .end 3820 3821 3822 .not_at: 3823 00008BA2 E8AE01 call getpointindex 3824 00008BA5 730A jnc @F 3825 00008BA7 7403E99E1B jnz error ; "NEW" is invalid --> 3826 3827 00008BAC E8E22F call chkeol 3828 00008BAF EB11 jmp .all 3829 @@: 3830 00008BB1 E8DD2F call chkeol 3831 00008BB4 89D3 mov bx, dx 3832 00008BB6 BF[0E08] mov di, line_out 3833 00008BB9 E85000 call .single 3834 00008BBC E8F530 call putsline_crlf 3835 00008BBF E90501 jmp handle_bl_when 3836 3837 3838 .all: 3839 00008BC2 31ED xor bp, bp ; high byte: any set points encountered yet, 3840 ; low byte: current line has any set points 3841 00008BC4 31DB xor bx, bx 3842 00008BC6 BF[0E08] mov di, line_out 3843 .loop: 3844 00008BC9 57 push di 3845 00008BCA B020 mov al, 32 3846 00008BCC B92800 mov cx, 40 3847 00008BCF F3AA rep stosb ; initialize field with blanks 3848 00008BD1 30C0 xor al, al 3849 00008BD3 AA stosb ; terminate it 3850 00008BD4 5F pop di 3851 3852 00008BD5 E83400 call .single ; fill buffer 3853 3854 00008BD8 53 push bx 3855 %if 0 3856 test bl, 1 ; an odd point ? 3857 jnz .odd ; yes --> 3858 mov di, line_out + 40 ; write next point after the field 3859 jmp .was_even 3860 .odd: 3861 %endif 3862 00008BD9 F7C5FF00 test bp, 00FFh ; any point set in this line ? 3863 00008BDD 740A jz .skip_putsline ; no --> 3864 00008BDF E8D230 call putsline_crlf ; put line with linebreak (and no excess blanks) 3865 00008BE2 E8E200 call handle_bl_when 3866 3867 00008BE5 81E500FF and bp, ~00FFh ; clear flag for next line processing 3868 .skip_putsline: 3869 00008BE9 BF[0E08] mov di, line_out ; write next point at start of field 3870 .was_even: 3871 00008BEC 5B pop bx 3872 00008BED 43 inc bx 3873 00008BEE 83FB10 cmp bx, _NUM_B_BP 3874 00008BF1 75D6 jne .loop 3875 .end: 3876 00008BF3 81FF[0E08] cmp di, line_out 3877 00008BF7 7406 je @F 3878 00008BF9 E8B830 call putsline_crlf 3879 00008BFC E8C800 call handle_bl_when 3880 @@: 3881 00008BFF F7C500FF test bp, 0FF00h 3882 00008C03 7506 jnz @F 3883 00008C05 BA[8270] mov dx, msg.bpnone 3884 00008C08 E82834 call putsz 3885 @@: 3886 00008C0B C3 retn 3887 3888 .single: 3889 00008C0C BE[5C70] mov si, msg.bp 3890 00008C0F E8CB2F call showstring 3891 00008C12 53 push bx 3892 00008C13 89D8 mov ax, bx 3893 00008C15 E86B30 call hexbyte ; store index of this point 3894 00008C18 E8C600 call calcpointbit 3895 00008C1B BE[6670] mov si, msg.bpunused 3896 %if ((_NUM_B_BP+7)>>3) != 1 3897 00008C1E 84A7[0201] test byte [b_bplist.used_mask+bx], ah 3898 %else 3899 test byte [b_bplist.used_mask], ah 3900 %endif 3901 00008C22 7508 jnz @F ; if set --> 3902 00008C24 E8B62F call showstring 3903 00008C27 31F6 xor si, si 3904 00008C29 E99900 jmp .unused 3905 3906 @@: 3907 00008C2C 81CD0101 or bp, 0101h ; flag that there was a point set in this line 3908 00008C30 BE[6370] mov si, msg.bpdisabled 3909 %if ((_NUM_B_BP+7)>>3) != 1 3910 00008C33 84A7[0401] test byte [b_bplist.disabled_mask+bx], ah 3911 %else 3912 test byte [b_bplist.disabled_mask], ah 3913 %endif 3914 00008C37 7503 jnz .disabled ; disabled --> (D) 3915 00008C39 BE[6070] mov si, msg.bpenabled 3916 .disabled: 3917 00008C3C E89E2F call showstring 3918 00008C3F BE[6E70] mov si, msg.bpaddress 3919 00008C42 E8982F call showstring 3920 00008C45 58 pop ax 3921 00008C46 50 push ax 3922 00008C47 89C6 mov si, ax 3923 00008C49 01F6 add si, si 3924 00008C4B 01F6 add si, si 3925 %if BPSIZE == 4 3926 %elif BPSIZE == 5 3927 add si, ax 3928 %elif BPSIZE == 6 3929 add si, ax ; * 5 3930 add si, ax ; * 6 3931 %elif BPSIZE == 9 3932 00008C4D 01F6 add si, si ; * 8 3933 00008C4F 01C6 add si, ax ; * 9 3934 %else 3935 %error Unexpected breakpoint size 3936 %endif 3937 00008C51 81C6[0601] add si, b_bplist.bp ; -> point 3938 00008C55 52 push dx 3939 00008C56 AD lodsw 3940 00008C57 92 xchg ax, dx 3941 %if _PM 3942 00008C58 AD lodsw 3943 00008C59 E82030 call hexword 3944 %else 3945 xor ax, ax 3946 lodsb 3947 call hexbyte 3948 %endif 3949 00008C5C 50 push ax 3950 00008C5D B05F mov al, '_' 3951 00008C5F AA stosb 3952 00008C60 58 pop ax 3953 00008C61 92 xchg ax, dx 3954 00008C62 E81730 call hexword ; display (linear) address 3955 %if BPSIZE == 6 || BPSIZE == 9 3956 ; INP: dx:ax = linear address 3957 ; si -> (d)word offset 3958 ; di -> where to store 3959 ; OUT: cx = length displayed 3960 ; si -> after offset 3961 ; di -> after stored string 3962 ; CHG: ax, dx 3963 00008C65 E80F01 call bp_display_offset ; BPSIZE implied 3964 %else 3965 xor cx, cx 3966 %endif 3967 00008C68 5A pop dx 3968 00008C69 AC lodsb 3969 00008C6A 50 push ax 3970 00008C6B BE[7470] mov si, msg.bpcontent 3971 00008C6E E86C2F call showstring 3972 00008C71 58 pop ax 3973 00008C72 E80E30 call hexbyte ; display content 3974 00008C75 BE[7770] mov si, msg.bpcounter 3975 00008C78 E8622F call showstring 3976 00008C7B 58 pop ax 3977 00008C7C 50 push ax 3978 00008C7D 89C3 mov bx, ax 3979 00008C7F 52 push dx 3980 00008C80 89C2 mov dx, ax 3981 00008C82 01DB add bx, bx 3982 00008C84 8B87[9601] mov ax, word [b_bplist.counter + bx] 3983 00008C88 E8F12F call hexword 3984 3985 00008C8B BBFFFF mov bx, -1 3986 00008C8E E85EFC call get_set_id_offset_length 3987 00008C91 F6C7FC test bh, 63 << 2 ; length nonzero ? 3988 00008C94 7426 jz @F ; no --> 3989 3990 ; The maximum length of a short ID is based on 3991 ; how much space there is assuming 80 columns. 3992 00008C96 BE[4E70] mov si, msg.bb_hitpass_id.short 3993 00008C99 D0E1 shl cl, 1 3994 00008C9B D0E1 shl cl, 1 3995 00008C9D F6D9 neg cl 3996 00008C9F 80C18C add cl, 35 << 2 3997 00008CA2 38CF cmp bh, cl ; long ? 3998 00008CA4 7203 jb .trigger_short_id 3999 ; This jump MUST be a jb, not jbe. The jbe 4000 ; would not match ZR for words where the 4001 ; idbuffer offset is a nonzero value. 4002 00008CA6 BE[4670] mov si, msg.bb_hitpass_id.long 4003 .trigger_short_id: 4004 4005 00008CA9 E8B3A8 call copy_single_counted_string 4006 00008CAC 88F9 mov cl, bh 4007 00008CAE D0E9 shr cl, 1 4008 00008CB0 D0E9 shr cl, 1 ; cx = length 4009 00008CB2 81E3FF03 and bx, 1023 ; bx = offset 4010 00008CB6 8DB7[FA01] lea si, [b_bplist.idbuffer + bx] 4011 00008CBA F3A4 rep movsb 4012 4013 @@: 4014 4015 00008CBC BBFFFF mov bx, -1 4016 00008CBF E857FD call get_set_when_offset 4017 00008CC2 89DE mov si, bx 4018 00008CC4 5A pop dx 4019 4020 .unused: 4021 00008CC5 5B pop bx ; restore counter (if displaying all) 4022 00008CC6 C3 retn 4023 4024 4025 ; CHG: si, al 4026 handle_bl_when: 4027 00008CC7 87D6 xchg dx, si 4028 00008CC9 85D2 test dx, dx 4029 00008CCB 7411 jz @F 4030 00008CCD 52 push dx 4031 00008CCE BA[5570] mov dx, msg.bb_when 4032 00008CD1 E85F33 call putsz 4033 00008CD4 5A pop dx 4034 00008CD5 E85B33 call putsz 4035 %if 0 4036 mov al, '$' 4037 call putc 4038 %endif 4039 00008CD8 BA[5176] mov dx, crlf 4040 00008CDB E85533 call putsz 4041 @@: 4042 00008CDE 87D6 xchg dx, si 4043 00008CE0 C3 retn 4044 4045 4046 ; INP: ax = 0-based index of point 4047 ; OUT: (bx-> byte to access. only if at least 9 points) 4048 ; (bx = 0 always if 8 or fewer points) 4049 ; ah = value to access 4050 ; CHG: al 4051 calcpointbit: 4052 %if ((_NUM_B_BP+7)>>3) != 1 4053 00008CE1 89C3 mov bx, ax 4054 %endif 4055 00008CE3 2407 and al, 7 4056 00008CE5 B401 mov ah, 1 4057 00008CE7 91 xchg ax, cx 4058 00008CE8 D2E5 shl ch, cl 4059 %if ((_NUM_B_BP+7)>>3) != 1 4060 00008CEA B103 mov cl, 3 4061 00008CEC D3EB shr bx, cl 4062 %else 4063 xor bx, bx 4064 %endif 4065 00008CEE 91 xchg ax, cx 4066 00008CEF C3 retn 4067 4068 4069 ; INP: bx:dx = linear address 4070 ; OUT: NC if point found, 4071 ; dx = point index 4072 ; CY if point not found, 4073 ; bx:dx unchanged 4074 ; CHG: di 4075 findpointat: 4076 lframe near 4077 00008CF0 5589E5 lenter 4078 lvar word, orig_ax 4079 00008CF3 50 push ax 4080 lvar word, orig_si 4081 00008CF4 56 push si 4082 lvar dword, orig_bxdx 4083 00008CF5 53 push bx 4084 00008CF6 52 push dx 4085 00008CF7 31D2 xor dx, dx 4086 .loop: 4087 00008CF9 89D0 mov ax, dx 4088 00008CFB E8E3FF call calcpointbit 4089 %if ((_NUM_B_BP+7)>>3) != 1 4090 00008CFE 84A7[0201] test byte [b_bplist.used_mask + bx], ah 4091 %else 4092 test byte [b_bplist.used_mask], ah 4093 %endif 4094 00008D02 741F jz .next 4095 4096 00008D04 89D6 mov si, dx 4097 00008D06 01F6 add si, si 4098 00008D08 01F6 add si, si 4099 %if BPSIZE == 4 4100 %elif BPSIZE == 5 4101 add si, dx 4102 %elif BPSIZE == 6 4103 add si, dx ; * 5 4104 add si, dx ; * 6 4105 %elif BPSIZE == 9 4106 00008D0A 01F6 add si, si ; * 8 4107 00008D0C 01D6 add si, dx ; * 9 4108 %else 4109 %error Unexpected breakpoint size 4110 %endif 4111 00008D0E 81C6[0601] add si, b_bplist.bp ; -> point 4112 00008D12 AD lodsw 4113 00008D13 3946F8 cmp word [bp + ?orig_bxdx], ax 4114 00008D16 750B jne .next 4115 %if _PM 4116 00008D18 AD lodsw 4117 %else 4118 xor ax, ax 4119 lodsb 4120 %endif 4121 00008D19 3946FA cmp word [bp + ?orig_bxdx + 2], ax 4122 00008D1C 7505 jne .next 4123 ; (NC) 4124 00008D1E 8956F8 mov word [bp + ?orig_bxdx], dx 4125 00008D21 EB07 jmp .ret 4126 4127 .next: 4128 00008D23 42 inc dx 4129 00008D24 83FA10 cmp dx, _NUM_B_BP 4130 00008D27 72D0 jb .loop 4131 4132 00008D29 F9 stc 4133 .ret: 4134 00008D2A 5A pop dx 4135 00008D2B 5B pop bx ; pop ?orig_bxdx 4136 00008D2C 5E pop si ; pop ?orig_si 4137 00008D2D 58 pop ax ; pop ?orig_ax 4138 00008D2E 89EC5D lleave 4139 00008D31 C3 lret 4140 4141 4142 ; INP: si->, al= 4143 ; OUT: CY if no "AT" keyword + address, 4144 ; si, al unchanged 4145 ; NC if "AT" keyword + address, 4146 ; si->, al= after 4147 ; bx:dx = dword [..@bb_saved_linear] = linear address 4148 ; CHG: edx, bx 4149 getpointat: 4150 00008D32 4E dec si 4151 00008D33 BA[FB69] mov dx, msg.at 4152 00008D36 E8E42D call isstring? 4153 00008D39 AC lodsb 4154 00008D3A 7402 je .at 4155 00008D3C F9 stc 4156 00008D3D C3 retn 4157 4158 .at: 4159 00008D3E 8B1E[9C0C] mov bx, word [reg_cs] 4160 00008D42 E8C2AB call getlinearaddr 4161 00008D45 7303E9001A jc error 4162 00008D4A 8916[4892] mov word [..@bb_saved_linear], dx 4163 00008D4E 891E[4A92] mov word [..@bb_saved_linear + 2], bx 4164 00008D52 C3 retn 4165 4166 4167 ; INP: si->, al= 4168 ; OUT: NC if a point is specified, 4169 ; dx = point index (0-based, below _NUM_B_BP) 4170 ; CY if a keyword is specified, 4171 ; ZR if "ALL" keyword specified 4172 ; NZ if "NEW" keyword specified 4173 getpointindex: 4174 00008D53 4E dec si 4175 00008D54 BA[D96F] mov dx, msg.all 4176 00008D57 E8C32D call isstring? 4177 00008D5A 7418 je .is_all ; (ZR) 4178 00008D5C BA[DD6F] mov dx, msg.new 4179 00008D5F E8BB2D call isstring? 4180 00008D62 740E je .is_new 4181 00008D64 AC lodsb 4182 00008D65 E8F32C call getword 4183 00008D68 83FA10 cmp dx, _NUM_B_BP 4184 00008D6B 7203E9DA19 jae error 4185 00008D70 F8 clc ; (NC) 4186 00008D71 C3 retn 4187 4188 .is_new: 4189 00008D72 85F6 test si, si ; (NZ) 4190 .is_all: 4191 00008D74 F9 stc ; (CY) 4192 00008D75 AC lodsb ; al = separator, si-> after 4193 00008D76 C3 retn 4194 %endif 4195 4196 4197 %if BPSIZE == 6 || BPSIZE == 9 4198 ; INP: dx:ax = linear address 4199 ; si -> (d)word offset 4200 ; di -> where to store 4201 ; OUT: cx = length displayed 4202 ; si -> after offset 4203 ; di -> after stored string 4204 ; CHG: ax, dx 4205 bp_display_offset: 4206 lframe 4207 lvar dword, offset 4208 00008D77 5589E55050 lenter 4209 lvar dword, linear 4210 00008D7C 52 push dx 4211 00008D7D 50 push ax 4212 00008D7E B82020 mov ax, " " 4213 lvar word, prefix 4214 00008D81 50 push ax 4215 lvar word, start_write 4216 00008D82 57 push di 4217 00008D83 53 push bx 4218 00008D84 AD lodsw 4219 %if _PM 4220 00008D85 92 xchg ax, dx 4221 00008D86 AD lodsw 4222 00008D87 83F8FF cmp ax, -1 4223 00008D8A 92 xchg ax, dx 4224 00008D8B 7505 jne @F 4225 %else 4226 xor dx, dx 4227 %endif 4228 00008D8D 83F8FF cmp ax, -1 4229 00008D90 746A je .skip 4230 @@: 4231 00008D92 8956FE mov word [bp + ?offset + 2], dx 4232 00008D95 8946FC mov word [bp + ?offset], ax 4233 4234 00008D98 8B56FA mov dx, word [bp + ?linear + 2] 4235 00008D9B 8B46F8 mov ax, word [bp + ?linear] 4236 00008D9E 2B46FC sub ax, word [bp + ?offset] 4237 00008DA1 1B56FE sbb dx, word [bp + ?offset + 2] 4238 4239 %if _PM 4240 00008DA4 E82E06 call ispm 4241 00008DA7 7525 jnz .r86m 4242 4243 00008DA9 52 push dx 4244 00008DAA 50 push ax 4245 00008DAB B80600 mov ax, 6 4246 00008DAE 8B1E[9C0C] mov bx, word [reg_cs] 4247 00008DB2 CD31 int 31h 4248 00008DB4 58 pop ax 4249 00008DB5 5B pop bx 4250 00008DB6 7212 jc .try_r86m 4251 4252 00008DB8 39D9 cmp cx, bx 4253 00008DBA 750E jne .try_r86m 4254 00008DBC 39C2 cmp dx, ax 4255 00008DBE 750A jne .try_r86m 4256 4257 00008DC0 B82020 mov ax, " " 4258 00008DC3 AB stosw 4259 00008DC4 B84353 mov ax, "CS" 4260 00008DC7 AB stosw 4261 00008DC8 EB1F jmp .offset 4262 4263 .try_r86m: 4264 00008DCA C646F724 mov byte [bp + ?prefix + 1], '$' 4265 %endif 4266 4267 .r86m: 4268 00008DCE B90400 mov cx, 4 4269 00008DD1 A80F test al, 15 4270 00008DD3 7531 jnz .questionmarks 4271 00008DD5 F7C2F0FF test dx, 0FFF0h 4272 00008DD9 752B jnz .questionmarks 4273 00008DDB D3E8 shr ax, cl 4274 00008DDD D3CA ror dx, cl 4275 00008DDF 09C2 or dx, ax 4276 00008DE1 8B46F6 mov ax, word [bp + ?prefix] 4277 00008DE4 AB stosw 4278 00008DE5 92 xchg ax, dx 4279 00008DE6 E8932E call hexword 4280 4281 .offset: 4282 00008DE9 B03A mov al, ':' 4283 00008DEB AA stosb 4284 %if _PM 4285 00008DEC 8B46FE mov ax, word [bp + ?offset + 2] 4286 00008DEF 85C0 test ax, ax 4287 00008DF1 7403 jz @F 4288 00008DF3 E8862E call hexword 4289 @@: 4290 %endif 4291 00008DF6 8B46FC mov ax, word [bp + ?offset] 4292 00008DF9 E8802E call hexword 4293 4294 .skip: 4295 00008DFC 5B pop bx 4296 00008DFD 59 pop cx ; get ?start_write 4297 00008DFE F7D9 neg cx 4298 00008E00 01F9 add cx, di 4299 00008E02 89EC5D lleave 4300 00008E05 C3 retn 4301 4302 .questionmarks: 4303 00008E06 B82020 mov ax, " " 4304 00008E09 AB stosw 4305 00008E0A B83F3F mov ax, "??" 4306 00008E0D AB stosw 4307 00008E0E AB stosw 4308 00008E0F EBD8 jmp .offset 4309 %endif 4310 4311 4312 bu_breakpoint: 4313 00008E11 AC lodsb 4314 00008E12 E87C2D call chkeol 4315 %if _DEBUG 4316 mov dx, msg.bu 4317 call putsz 4318 int3 4319 retn 4320 %else 4321 00008E15 BA[1D74] mov dx, msg.notbu 4322 00008E18 E91832 jmp putsz 4323 %endif 4324 4325 4326 uppercase: 4327 00008E1B 3C61 cmp al, 'a' 4328 00008E1D 7206 jb .ret 4329 00008E1F 3C7A cmp al, 'z' 4330 00008E21 7702 ja .ret 4331 00008E23 24DF and al, TOUPPER 4332 .ret: 4333 00008E25 C3 retn 4334 4335 4336 errorj4: 4337 00008E26 E92119 jmp error 4338 4339 4340 %if 0 4341 4342 ee 0: 4343 push ss 4344 pop ds 4345 push ss 4346 pop es 4347 mov ax, word [ savesp ] 4348 inc ax 4349 inc ax 4350 mov sp, ax ; restore stack 4351 mov bx, word [e_addr + saSegSel] 4352 _386_PM_o32 4353 mov dx, word [ e_addr ] ; get back address 4354 4355 4356 ; Prompt mode. 4357 ee 1: 4358 mov word [ errret ], ee 0 4359 4360 ; Begin loop over lines. 4361 ee 2: ; <--- next line 4362 mov word [e_addr + saSegSel], bx 4363 %if _PM 4364 call ispm 4365 jnz .86m 4366 .pm: 4367 mov word [e_addr + saSelector], bx 4368 jmp @F 4369 .86m: 4370 mov word [e_addr + saSegment], bx 4371 @@: 4372 %endif 4373 _386_PM_o32 4374 mov word [ e_addr ], dx ; save address 4375 mov di, line_out 4376 mov ax, bx ; print out segment and offset 4377 call hexword 4378 4379 === 4380 4381 4382 mov al, '.' 4383 stosb 4384 call getline00 ; read input line 4385 call iseol? 4386 je .end 4387 %if _PM 4388 xor bx, bx 4389 %endif 4390 mov dx, 1 4391 call ee_checkplusminus 4392 jne .notplusminus 4393 cmp al, '+' 4394 je ee 3 4395 jmp short ee 2 4396 4397 .notplusminus: 4398 4399 === 4400 4401 4402 ; INP: al = character, si-> line 4403 ; bx:dx = increment to add/subtract if this is an add/sub request 4404 ; OUT: al, si unchanged 4405 ; NZ if no add/sub request 4406 ; ZR if add/sub request, 4407 ; [ e_addr ] offset adjusted 4408 ee_checkplusminus: 4409 cmp al, '-' 4410 jne .not 4411 cmp al, '+' 4412 jne .not 4413 push si 4414 push ax 4415 call skipwhite 4416 call iseol? 4417 pop ax 4418 pop si 4419 jne .not 4420 cmp al, '-' 4421 je .minus 4422 add word [ e_addr ], dx 4423 _386_PM adc word [ e_addr+2 ], bx 4424 jmp short .done 4425 4426 .minus: 4427 sub word [ e_addr ], dx 4428 _386_PM sbb word [ e_addr+2 ], bx 4429 .done: 4430 cmp al, al 4431 .not: 4432 retn 4433 4434 === 4435 4436 4437 ee 9: 4438 call getline00 4439 4440 %endif 4441 4442 4443 ; E command - edit memory. 4444 ee: 4445 00008E29 E8601A call prephack 4446 00008E2C 8B1E[900C] mov bx, word [reg_ds] 4447 00008E30 E84E1D call getaddr ; get address into bx:(e)dx 4448 00008E33 E86D2D call skipcomm0 4449 00008E36 E8432D call iseol? 4450 00008E39 743E je ee1 ; if prompt mode 4451 4452 eeparsestr: 4453 00008E3B 52 push dx ; save destination offset 4454 00008E3C E8B41D call getstr ; get data bytes 4455 00008E3F 89F9 mov cx, di 4456 00008E41 BA[0E08] mov dx, line_out 4457 00008E44 29D1 sub cx, dx ; length of byte string 4458 00008E46 5F pop di 4459 00008E47 89C8 mov ax, cx 4460 00008E49 48 dec ax 4461 00008E4A 01F8 add ax, di 4462 00008E4C 72D8 jc short errorj4 ; if it wraps around 4463 00008E4E E8691A call dohack 4464 00008E51 89D6 mov si, dx 4465 00008E53 8EC3 mov es, bx 4466 %if _PM 4467 00008E55 803E[0C8B]00 cmp byte [bAddr32], 0 4468 00008E5A 740E jz ee_2 4469 [cpu 386] 4470 00008E5C 89FA mov dx, di ; dx was destroyed 4471 00008E5E 6689D7 mov edi, edx 4472 00008E61 660FB7F6 movzx esi, si 4473 00008E65 660FB7C9 movzx ecx, cx 4474 00008E69 67 a32 4475 __CPU__ 4476 ee_2: 4477 %endif 4478 00008E6A F3A4 rep movsb 4479 4480 ; Restore ds + es and undo the interrupt vector hack. 4481 ; This code is also used by the `m' command. 4482 ee0a: 4483 00008E6C 16 push ss ; restore ds 4484 00008E6D 1F pop ds 4485 00008E6E 16 push ss ; restore es 4486 00008E6F 07 pop es 4487 00008E70 BF[B40A] mov di, run2324 ; debuggee's int 23/24 values 4488 00008E73 E82F1A call prehak1 ; copy things back 4489 00008E76 E9751A jmp unhack 4490 4491 4492 4493 ; Prompt mode. 4494 ee1: 4495 00008E79 E8FB76 call guard_re 4496 ; Begin loop over lines. 4497 ee2: ; <--- next line 4498 00008E7C 89D8 mov ax, bx ; print out segment and offset 4499 00008E7E E8FB2D call hexword 4500 00008E81 B03A mov al, ':' 4501 00008E83 AA stosb 4502 00008E84 66 _386_PM_o32 ; mov eax, edx 4503 00008E85 89D0 mov ax, dx 4504 %if _PM 4505 00008E87 E8B5D0 call test_d_b_bit ; 32-bit segment ? 4506 00008E8A 7403 jz .16 ; no --> 4507 00008E8C E8E12D call hexword_high 4508 .16: 4509 %endif 4510 00008E8F E8EA2D call hexword 4511 4512 ; Begin loop over bytes. 4513 ee3: ; <--- next byte 4514 00008E92 B82020 mov ax, 32<<8|32 ; print old value of byte 4515 00008E95 AB stosw 4516 00008E96 E8211A call dohack ; do the INT pointer hack 4517 00008E99 E8F60C call readmem ; read mem at BX:(E)DX 4518 00008E9C E84F1A call unhack ; undo the INT pointer hack 4519 00008E9F E8E12D call hexbyte 4520 00008EA2 B02E mov al, '.' 4521 00008EA4 AA stosb 4522 00008EA5 C606[9B0A]00 mov byte [ linecounter ], 0 ; reset counter 4523 00008EAA 8026[9E00]EF clropt [internalflags], promptwaiting 4524 00008EAF 53 push bx 4525 00008EB0 52 push dx 4526 00008EB1 E8042E call putsline 4527 00008EB4 5A pop dx 4528 00008EB5 5B pop bx 4529 00008EB6 BE[1E08] mov si, line_out+16 ; address of buffer for characters 4530 00008EB9 31C9 xor cx, cx ; number of characters so far 4531 4532 ee4_next: 4533 00008EBB E8BD37 call getline_is_input_file? 4534 00008EBE 7238 jc ee9_getc_tty ; if it's a TTY 4535 4536 ee_getc_file: 4537 00008EC0 800E[A200]40 setopt [internalflags2], dif2_did_getline_file 4538 ; set this flag so yy_reset_buf knows 4539 ; that we may have buffered the file 4540 4541 00008EC5 56 push si 4542 %if _NEWFULLHANDLING 4543 00008EC6 BF[0300] mov di, line_in+3 ; read max 4544 %else 4545 mov di, line_in+2 4546 %endif 4547 00008EC9 8B36[FA0A] mov si, word [bufnext] 4548 ee5: 4549 00008ECD 3B36[FC0A] cmp si, word [bufend] 4550 00008ED1 7207 jb ee6 ; if there's a character already 4551 00008ED3 E8C83C call fillbuf 4552 00008ED6 B00D mov al, 13 4553 00008ED8 7217 jc ee8 ; if eof 4554 ee6: 4555 00008EDA 803E[F40A]0D cmp byte [notatty], 13 4556 00008EDF 750C jne ee7 ; if no need to compress CR/LF 4557 00008EE1 803C0A cmp byte [si], 10 4558 00008EE4 7507 jne ee7 ; if not a line feed 4559 00008EE6 46 inc si ; skip it 4560 00008EE7 FE06[F40A] inc byte [notatty] ; avoid repeating this 4561 00008EEB EBE0 jmp ee5 ; next character 4562 4563 ee7: 4564 00008EED AC lodsb ; get the character 4565 00008EEE A2[F40A] mov byte [notatty], al 4566 ee8: 4567 00008EF1 8936[FA0A] mov word [bufnext], si 4568 00008EF5 5E pop si 4569 00008EF6 EB03 jmp ee10_got_codepoint 4570 4571 ee9_getc_tty: 4572 00008EF8 E89D31 call getc ; character input without echo 4573 ee10_got_codepoint: 4574 00008EFB 3C20 cmp al, 32 ; (go to next byte) 4575 00008EFD 7448 je ee13_write 4576 00008EFF 3C2D cmp al, '-' ; (go to prior byte) 4577 00008F01 7444 je ee13_write 4578 00008F03 3C2E cmp al, '.' ; (exit E interactive mode) 4579 00008F05 7440 je ee13_write 4580 00008F07 3C0A cmp al, 10 4581 00008F09 743C je ee13_write 4582 00008F0B E8722C call iseol?.notsemicolon; (also exit E interactive mode) 4583 00008F0E 7437 je ee13_write ; all: done with this byte --> 4584 00008F10 3C08 cmp al, 8 4585 00008F12 7423 je ee11_backspace ; if backspace --> 4586 00008F14 3C7F cmp al, 7Fh 4587 00008F16 741F je ee11_backspace ; if DEL (handle like backspace) --> 4588 00008F18 83F902 cmp cx, byte 2 ; otherwise, it should be a hex character 4589 00008F1B 739E jae ee4_next ; if we have a full byte already 4590 00008F1D 8804 mov byte [si], al 4591 00008F1F E85E2B call getnyb 4592 00008F22 7297 jc ee4_next ; if it's not a hex character 4593 00008F24 41 inc cx 4594 00008F25 AC lodsb ; get the character back 4595 00008F26 EB19 jmp ee12_put_then_next 4596 4597 ee112_priorbyte: 4598 00008F28 E82B31 call putc ; display the minus 4599 00008F2B E811D0 _386_PM call test_d_b_bit ; 32-bit segment ? 4600 00008F2E 7401 _386_PM jz .16 ; no --> 4601 00008F30 66 _386_PM_o32 4602 .16: 4603 00008F31 4A dec dx ; decrement offset (16 bit or 32 bit) 4604 00008F32 BF[0E08] mov di, line_out 4605 00008F35 EB6E jmp ee15_linebreak_and_ee2 4606 4607 ee11_backspace: 4608 00008F37 E382 jcxz ee4_next ; if nothing to backspace over 4609 00008F39 49 dec cx 4610 00008F3A 4E dec si 4611 00008F3B E8A53B call fullbsout 4612 00008F3E E97AFF jmp ee4_next 4613 4614 ee12_put_then_next: 4615 00008F41 E81231 call putc 4616 00008F44 E974FF jmp ee4_next ; back for more 4617 4618 ; We have a byte (if CX != 0). 4619 ; 4620 ; cx = number of digits we have (0..2) 4621 ; al = codepoint specifying how to proceed after writing 4622 ee13_write: 4623 00008F47 E329 jcxz ee14_done_write ; if no change for this byte 4624 4625 00008F49 50 push ax ; preserve proceed control 4626 00008F4A 31C0 xor ax, ax ; ah = 0, al = 0 4627 00008F4C 8804 mov byte [si], al ; terminate the string 4628 00008F4E 29CE sub si, cx ; point to beginning 4629 @@: 4630 00008F50 00E4 add ah, ah 4631 00008F52 00E4 add ah, ah 4632 00008F54 00E4 add ah, ah 4633 00008F56 00E4 add ah, ah ; prior value times 16 4634 00008F58 00C4 add ah, al ; add next digit (0 in first iteration) 4635 00008F5A AC lodsb ; load next digit (or NUL) 4636 00008F5B E8222B call getnyb 4637 00008F5E 73F0 jnc @B ; if another digit --> (NC) 4638 ; (CY can only mean we reached the NUL) 4639 00008F60 88E0 mov al, ah ; get byte value 4640 00008F62 E85519 call dohack ; do the INT pointer hack 4641 00008F65 E8FD0B call writemem ; write AL at BX:(E)DX 4642 00008F68 BF[B40A] mov di, run2324 ; debuggee's int 23/24 4643 00008F6B E83719 call prehak1 ; copy things back 4644 00008F6E E87D19 call unhack ; undo the INT pointer hack 4645 00008F71 58 pop ax ; al = how to proceed 4646 4647 ; End the loop over bytes. 4648 ee14_done_write: 4649 00008F72 BF[0E08] mov di, line_out ; reset output buffer 4650 4651 00008F75 3C20 cmp al, 32 ; (go to next byte) 4652 00008F77 7414 je ee_nextbyte 4653 00008F79 3C2D cmp al, '-' ; (go to prior byte) 4654 00008F7B 74AB je ee112_priorbyte 4655 00008F7D 3C2E cmp al, '.' ; (exit E interactive mode) 4656 00008F7F 742B je ee16_end 4657 00008F81 3C0A cmp al, 10 4658 00008F83 7427 je ee16_end 4659 00008F85 E8F82B call iseol?.notsemicolon; (also exit E interactive mode) 4660 00008F88 7422 je ee16_end 4661 00008F8A E9BD17 jmp error ; unexpected value 4662 4663 ee_nextbyte: 4664 00008F8D E8AFCF _386_PM call test_d_b_bit ; 32-bit segment ? 4665 00008F90 7401 _386_PM jz .16 ; no --> 4666 00008F92 66 _386_PM_o32 4667 .16: 4668 00008F93 42 inc dx ; increment offset (16 bit or 32 bit) 4669 00008F94 F6C207 test dl, 7 4670 00008F97 740C jz ee15_linebreak_and_ee2 4671 ; if new line 4672 00008F99 F7D1 not cx 4673 00008F9B 83C104 add cx, byte 4 ; compute 3 - cx 4674 00008F9E B020 mov al, 32 4675 00008FA0 F3AA rep stosb ; store that many spaces 4676 00008FA2 E9EDFE jmp ee3 ; back for more 4677 4678 ee15_linebreak_and_ee2: 4679 00008FA5 B80D0A mov ax, 10 << 8 | 13 ; terminate this line 4680 00008FA8 AB stosw 4681 00008FA9 E9D0FE jmp ee2 ; back for a new line 4682 4683 ee16_end: 4684 00008FAC E9052D jmp putsline_crlf ; call putsline and return 4685 4686 4687 ; F command - fill memory 4688 ff: 4689 00008FAF 31C9 xor cx, cx ; get address range (no default length) 4690 00008FB1 8B1E[900C] mov bx, word [reg_ds] 4691 00008FB5 E8F11A call getrange ; get address range into bx:(e)dx 4692 00008FB8 66 _386_PM_o32 ; sub ecx, edx 4693 00008FB9 29D1 sub cx, dx 4694 00008FBB 66 _386_PM_o32 ; inc ecx 4695 00008FBC 41 inc cx ; (e)cx = number of bytes 4696 00008FBD 53 push bx 4697 00008FBE 66 _386_PM_o32 ; push ecx 4698 00008FBF 51 push cx ; save it 4699 00008FC0 66 _386_PM_o32 ; push edx 4700 00008FC1 52 push dx ; save start address 4701 4702 00008FC2 4E dec si 4703 00008FC3 BA[6168] mov dx, msg.range 4704 00008FC6 E8542B call isstring? 4705 00008FC9 AC lodsb 4706 00008FCA 7517 jne .notrange 4707 4708 00008FCC 8B1E[900C] mov bx, word [reg_ds] ; get search range 4709 00008FD0 800E[A700]04 setopt [internalflags3], dif3_accept_getrange_0 4710 00008FD5 E8CA1A call getrangeX.ecx_and_0_valid 4711 ; try to get second range 4712 00008FD8 E8B62B call chkeol ; and insure end-of-line 4713 ; successful if it returned 4714 00008FDB 66 _386_PM_o32 ; mov esi, edx 4715 00008FDC 89D6 mov si, dx ; bx:esi-> source string 4716 00008FDE 66 _386_PM_o32 ; sub ecx, edx 4717 00008FDF 29D1 sub cx, dx ; ecx = count - 1 4718 00008FE1 EB1E jmp short @F 4719 4720 .notrange: 4721 00008FE3 E8BD2B call skipcomm0 4722 00008FE6 E80A1C call getstr ; get string of bytes 4723 00008FE9 89F9 mov cx, di 4724 00008FEB 81E9[0E08] sub cx, line_out 4725 00008FEF 7503E95617 jz error 4726 00008FF4 49 dec cx 4727 00008FF5 660FB7C9 _386_PM movzx ecx, cx 4728 00008FF9 8CDB mov bx, ds 4729 00008FFB 6631F6 _386_PM xor esi, esi 4730 00008FFE BE[0E08] mov si, line_out 4731 4732 @@: 4733 00009001 66 _386_PM_o32 ; pop edi 4734 00009002 5F pop di 4735 00009003 66 _386_PM_o32 ; pop eax 4736 00009004 58 pop ax 4737 00009005 07 pop es 4738 00009006 8EDB mov ds, bx 4739 %if _PM 4740 00009008 36803E[0C8B]00 cmp byte [ss:bAddr32], 0 4741 0000900E 7440 jz ff16 4742 ff32: 4743 [cpu 386] 4744 00009010 6641 inc ecx 4745 00009012 0F843417 jz error 4746 00009016 6683F901 cmp ecx, byte 1 4747 0000901A 7429 je .onebytesource 4748 0000901C 6631D2 xor edx, edx ; edx:eax = size 4749 0000901F 66F7F1 div ecx 4750 00009022 6685C0 test eax, eax 4751 00009025 7413 jz .partial 4752 .loop: 4753 00009027 6656 push esi 4754 00009029 6651 push ecx 4755 0000902B 67A4 a32 movsb 4756 0000902D 6649 dec ecx 4757 0000902F F367A4 a32 rep movsb 4758 00009032 6659 pop ecx 4759 00009034 665E pop esi 4760 00009036 6648 dec eax 4761 00009038 75ED jnz .loop 4762 .partial: 4763 0000903A 6689D1 mov ecx, edx ; get remainder (number of bytes in partial copy) 4764 0000903D 67E344 jecxz ffret ; if no partial copy --> 4765 00009040 F367A4 a32 rep movsb 4766 00009043 EB3F jmp short ffret ; done --> 4767 .onebytesource: 4768 00009045 6689C1 mov ecx, eax ; size 4769 00009048 678A06 mov al, byte [esi] 4770 0000904B F367AA a32 rep stosb 4771 0000904E EB34 jmp short ffret 4772 __CPU__ 4773 ff16: 4774 %endif 4775 00009050 31D2 xor dx, dx ; dx:ax = size 4776 00009052 83F801 cmp ax, byte 1 4777 00009055 83D200 adc dx, byte 0 ; convert 0000:0000 to 0001:0000 (0 = 64 KiB) 4778 00009058 41 inc cx 4779 00009059 7503 jnz @F 4780 ; dx:ax = 1_0000h, remainder = 0, quotient = 1 4781 ; dx:ax = 1, remainder = 1, quotient = 0 4782 ; dx:ax = 1234h, remainder = 1234h, quotient = 0 4783 0000905B 92 xchg ax, dx 4784 0000905C EB07 jmp @FF 4785 4786 @@: 4787 0000905E 83F901 cmp cx, byte 1 4788 00009061 7419 je .onebytesource ; a common optimization 4789 00009063 F7F1 div cx ; compute number of whole repetitions 4790 @@: 4791 00009065 85C0 test ax, ax 4792 00009067 740B jz .partial ; if less than one whole rep 4793 .loop: 4794 00009069 56 push si 4795 0000906A 51 push cx 4796 0000906B A4 movsb 4797 0000906C 49 dec cx 4798 0000906D F3A4 rep movsb 4799 0000906F 59 pop cx 4800 00009070 5E pop si 4801 00009071 48 dec ax 4802 00009072 75F5 jnz .loop ; if more to go 4803 .partial: 4804 00009074 89D1 mov cx, dx ; get remainder (number of bytes in partial copy) 4805 00009076 E30C jcxz ffret ; if no partial copy --> 4806 00009078 F3A4 rep movsb 4807 0000907A EB08 jmp short ffret ; done --> 4808 .onebytesource: 4809 0000907C 89C1 mov cx, ax ; size 4810 0000907E 8A04 mov al, byte [si] 4811 00009080 AA stosb ; cx=0 -> 64 kB 4812 00009081 49 dec cx 4813 00009082 F3AA rep stosb 4814 ffret: 4815 00009084 16 push ss ; restore ds 4816 00009085 1F pop ds 4817 00009086 16 push ss ; restore es 4818 00009087 07 pop es 4819 00009088 C3 retn 4820 4821 4822 %if _EXPRESSIONS 4823 4824 ; H command - hex computation 4825 hh: 4826 00009089 E8172B call skipcomm0 4827 0000908C 4E dec si 4828 0000908D BA[B568] mov dx, msg.base 4829 00009090 E88A2A call isstring? 4830 00009093 7403E9CC00 jne .normal 4831 00009098 E8202B call skipequals 4832 0000909B E8D724 call getexpression 4833 0000909E 85DB test bx, bx 4834 @@: 4835 000090A0 7403E9A516 jnz error 4836 000090A5 83FA24 cmp dx, 36 4837 000090A8 77F6 ja @B 4838 000090AA 83FA02 cmp dx, 2 4839 000090AD 72F1 jb @B 4840 000090AF 52 push dx 4841 4842 000090B0 E8F02A call skipcomm0 4843 000090B3 4E dec si 4844 000090B4 BA[BA68] mov dx, msg.group 4845 000090B7 E8632A call isstring? 4846 000090BA BA0000 mov dx, 0 4847 000090BD 7513 jne .gotgroup 4848 000090BF E8F92A call skipequals 4849 000090C2 E8B024 call getexpression 4850 000090C5 E8DB2A call skipcomm0 4851 000090C8 85DB test bx, bx 4852 000090CA 75D4 jnz @B 4853 000090CC 83FA20 cmp dx, 32 4854 000090CF 77CF ja @B 4855 000090D1 4E dec si 4856 .gotgroup: 4857 000090D2 52 push dx 4858 000090D3 BA[C068] mov dx, msg.width 4859 000090D6 E8442A call isstring? 4860 000090D9 BB0000 mov bx, 0 4861 000090DC 7515 jne .gotwidth 4862 000090DE E8DA2A call skipequals 4863 000090E1 E89124 call getexpression 4864 000090E4 E8BC2A call skipcomm0 4865 000090E7 85DB test bx, bx 4866 000090E9 75B5 jnz @B 4867 000090EB 83FA20 cmp dx, 32 4868 000090EE 77B0 ja @B 4869 000090F0 89D3 mov bx, dx 4870 000090F2 A8 db __TEST_IMM8 ; (skip lodsb) 4871 .gotwidth: 4872 000090F3 AC lodsb 4873 000090F4 53 push bx 4874 000090F5 E8E200 call .compute 4875 000090F8 58 pop ax 4876 000090F9 5E pop si 4877 000090FA 59 pop cx 4878 000090FB BF[5008] mov di, line_out + 66 4879 4880 000090FE E81901 call .storeresult 4881 4882 00009101 93 xchg bx, ax ; ax:dx = number, bx = width 4883 00009102 92 xchg ax, dx ; dx:ax = number 4884 lframe 4885 00009103 5589E5 lenter 4886 lvar dword, dividend 4887 00009106 52 push dx 4888 00009107 50 push ax 4889 00009108 4B dec bx 4890 lvar word, minwidth 4891 00009109 53 push bx 4892 lvar word, group 4893 0000910A 56 push si 4894 lvar word, groupcounter 4895 0000910B 56 push si 4896 4897 0000910C 89FB mov bx, di 4898 0000910E FD std ; _AMD_ERRATUM_109_WORKAROUND does not apply 4899 4900 ; dword [bp + ?dividend] = number to display 4901 ; cx = base 4902 .loop_write: 4903 4904 0000910F 31D2 xor dx, dx 4905 00009111 57 push di 4906 00009112 BF0400 mov di, 4 4907 .loop_divide: 4908 00009115 8B43FA mov ax, [bp + ?dividend - 2 + di] 4909 00009118 F7F1 div cx 4910 0000911A 8943FA mov word [bp + ?dividend - 2 + di], ax 4911 0000911D 4F dec di 4912 0000911E 4F dec di 4913 0000911F 75F4 jnz .loop_divide 4914 ; dx = last remainder 4915 00009121 5F pop di 4916 00009122 92 xchg ax, dx ; ax = remainder (next digit) 4917 ; dword [bp + ?dividend] = result of div 4918 00009123 0430 add al, '0' 4919 00009125 3C39 cmp al, '9' 4920 00009127 7602 jbe @F 4921 00009129 0407 add al, -('9'+1)+'A' 4922 @@: 4923 0000912B AA stosb 4924 4925 0000912C FF4EF6 dec word [bp + ?groupcounter] 4926 0000912F 7509 jnz @F 4927 00009131 FF76F8 push word [bp + ?group] 4928 00009134 8F46F6 pop word [bp + ?groupcounter] 4929 00009137 B05F mov al, '_' 4930 00009139 AA stosb 4931 @@: 4932 4933 0000913A FF4EFA dec word [bp + ?minwidth] 4934 0000913D 79D0 jns .loop_write 4935 4936 0000913F 837EFE00 cmp word [bp + ?dividend + 2], 0 4937 00009143 75CA jnz .loop_write 4938 00009145 837EFC00 cmp word [bp + ?dividend], 0 4939 ; any more ? 4940 00009149 75C4 jnz .loop_write ; loop --> 4941 4942 0000914B FC cld 4943 4944 0000914C 29FB sub bx, di 4945 0000914E 89D9 mov cx, bx 4946 00009150 89FE mov si, di 4947 00009152 46 inc si 4948 4949 00009153 BF[0E08] mov di, line_out 4950 4951 00009156 803C5F cmp byte [si], '_' 4952 00009159 7502 jne @F 4953 0000915B 46 inc si 4954 0000915C 49 dec cx 4955 ; never need to loop because next digit is always a digit 4956 4957 @@: 4958 0000915D F3A4 rep movsb ; overlapping! 4959 4960 0000915F 89EC5D lleave 4961 00009162 EB73 jmp short .putsline_crlf 4962 4963 4964 .normal: 4965 00009164 AC lodsb 4966 00009165 56 push si 4967 00009166 50 push ax 4968 00009167 800E[A898]01 or byte [hhflag], 1 ; set flag so no operator means add 4969 0000916C E86B00 call .compute 4970 0000916F 58 pop ax 4971 00009170 5E pop si 4972 00009171 E8A600 call .storeresult 4973 00009174 F606[A898]04 test byte [hhflag], 4 ; any two-fold operation ? 4974 00009179 741F jz .single ; no --> 4975 0000917B 8A26[8100] mov ah, byte [options2 + 1] 4976 0000917F 80E410 and ah, opt2_hh_compat >> 8 4977 00009182 E87100 call .store2 ; display "FFFFFFFF (-0001)" 4978 00009185 50 push ax 4979 00009186 B82020 mov ax, 32<<8|32 4980 00009189 AB stosw 4981 0000918A 58 pop ax 4982 0000918B 50 push ax 4983 0000918C 800E[A898]02 or byte [hhflag], 2 ; set flag so no operator means sub 4984 00009191 E84600 call .compute 4985 00009194 58 pop ax 4986 00009195 E85E00 call .store2 ; display "FFFFFFFF (-0001)" 4987 00009198 EB3D jmp short .putsline_crlf 4988 4989 .single: 4990 0000919A B400 mov ah, 0 4991 0000919C 53 push bx 4992 0000919D 52 push dx 4993 0000919E E85500 call .store2 4994 4995 000091A1 B82020 mov ax, (32 << 8) | 32 4996 000091A4 AB stosw 4997 000091A5 B86465 mov ax, "de" 4998 000091A8 AB stosw 4999 000091A9 B86369 mov ax, "ci" 5000 000091AC AB stosw 5001 000091AD B86D61 mov ax, "ma" 5002 000091B0 AB stosw 5003 000091B1 B86C3A mov ax, "l:" 5004 000091B4 AB stosw 5005 000091B5 B020 mov al, 32 5006 000091B7 AA stosb 5007 000091B8 58 pop ax 5008 000091B9 5A pop dx 5009 000091BA E84F2A call decdword 5010 000091BD 85D2 test dx, dx ; result negative ? 5011 000091BF 7916 jns @F ; no --> 5012 000091C1 50 push ax 5013 000091C2 B82028 mov ax, " (" 5014 000091C5 AB stosw 5015 000091C6 B02D mov al, "-" 5016 000091C8 AA stosb 5017 000091C9 58 pop ax 5018 000091CA F7DA neg dx 5019 000091CC F7D8 neg ax 5020 000091CE 83DA00 sbb dx, byte 0 ; neg bx:dx 5021 000091D1 E8382A call decdword 5022 000091D4 B029 mov al, ")" 5023 000091D6 AA stosb 5024 @@: 5025 .putsline_crlf: 5026 000091D7 E9DA2A jmp putsline_crlf 5027 5028 5029 .compute: 5030 000091DA E89823 call getdword 5031 000091DD E8B129 call chkeol ; expect end of line here 5032 .comp_ret: 5033 000091E0 C3 retn 5034 5035 ; INP: bx:dx = result 5036 ; ah = flag, nonzero if to stay 86-DOS Debug compatible 5037 ; OUT: displayed 5038 ; CHG: di, bx, dx 5039 .store: 5040 000091E1 50 push ax 5041 000091E2 84E4 test ah, ah 5042 000091E4 7509 jnz .store_nothigh 5043 000091E6 85DB test bx, bx 5044 000091E8 7405 jz .store_nothigh ; no need to display 32-bit value 5045 000091EA 89D8 mov ax, bx 5046 000091EC E88D2A call hexword 5047 .store_nothigh: 5048 000091EF 89D0 mov ax, dx 5049 000091F1 E8882A call hexword 5050 000091F4 58 pop ax 5051 000091F5 C3 retn 5052 5053 .store2: 5054 000091F6 E8E8FF call .store 5055 000091F9 50 push ax 5056 000091FA 84E4 test ah, ah 5057 000091FC 751A jnz .store2_ret 5058 000091FE 85DB test bx, bx ; result negative ? 5059 00009200 7916 jns .store2_ret ; no --> 5060 00009202 B82028 mov ax, " (" 5061 00009205 AB stosw 5062 00009206 B02D mov al, "-" 5063 00009208 AA stosb 5064 00009209 F7DB neg bx 5065 0000920B F7DA neg dx 5066 0000920D 83DB00 sbb bx, byte 0 ; neg bx:dx 5067 00009210 58 pop ax 5068 00009211 50 push ax 5069 00009212 E8CCFF call .store 5070 00009215 B029 mov al, ")" 5071 00009217 AA stosb 5072 .store2_ret: 5073 00009218 58 pop ax 5074 00009219 C3 retn 5075 5076 5077 .storeresult: 5078 0000921A 8916[5492] mov word [hhresult], dx 5079 0000921E 891E[5692] mov word [hhresult + 2], bx 5080 00009222 C3 retn 5081 %else 5082 ; H command - hex addition and subtraction. 5083 hh: 5084 call getdword 5085 push bx 5086 push dx 5087 call skipcomm0 5088 call getdword 5089 call chkeol ; expect end of line here 5090 pop cx 5091 pop ax ; first value in AX:CX, second in BX:DX 5092 mov si, ax 5093 mov bp, cx ; first value in SI:BP now 5094 mov ax, cx 5095 add ax, dx 5096 push ax 5097 mov ax, si 5098 adc ax, bx 5099 jz .nothigh1 ; no need to display 32-bit value 5100 call hexword 5101 .nothigh1: 5102 pop ax 5103 call hexword 5104 mov ax, 2020h 5105 stosw 5106 mov ax, bp 5107 sub ax, dx 5108 push ax 5109 mov ax, si 5110 sbb ax, bx 5111 jz .nothigh2 ; no need to display 32-bit value 5112 or si, bx 5113 jz .nothigh2 ; both were zero, non-zero result only by carry --> 5114 call hexword 5115 .nothigh2: 5116 pop ax 5117 call hexword 5118 call putsline_crlf 5119 retn 5120 %endif 5121 5122 5123 usesection lDEBUG_DATA_ENTRY 5124 5125 align 4, db 0 5126 00009254 00000000 hhresult: dd 0 5127 5128 usesection lDEBUG_CODE 5129 5130 5131 ; O command - output to I/O port. 5132 oo: 5133 00009223 B44F mov ah, 'O' 5134 00009225 BB[2C92] mov bx, .tab 5135 00009228 E95A01 jmp ii.common 5136 5137 5138 0000922B 00 align 2, db 0 5139 .tab: 5140 0000922C [3292][3C92][4692] dw .byte, .word, .dword 5141 5142 5143 .byte: 5144 00009232 E83428 call getbyte ; read value from command line 5145 00009235 E85929 call chkeol ; expect end of line here 5146 00009238 92 xchg ax, dx ; al = value 5147 00009239 5A pop dx ; recover port number 5148 0000923A EE out dx, al ; send 5149 0000923B C3 retn 5150 5151 .word: 5152 0000923C E81C28 call getword 5153 0000923F E84F29 call chkeol 5154 00009242 92 xchg ax, dx ; ax = value 5155 00009243 5A pop dx 5156 00009244 EF out dx, ax 5157 00009245 C3 retn 5158 5159 .dword: 5160 [cpu 386] 5161 00009246 E82C23 call getdword 5162 00009249 E84529 call chkeol ; expect end of line here 5163 0000924C 53 push bx 5164 0000924D 52 push dx 5165 0000924E 6658 pop eax ; eax = value 5166 00009250 5A pop dx 5167 00009251 66EF out dx, eax 5168 00009253 C3 retn 5169 __CPU__ 5170 5171 5172 %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 5173 if_exists_check: 5174 00009254 16 push ss 5175 00009255 07 pop es 5176 00009256 8B3E[140C] mov di, word [if_exists_si] 5177 0000925A 8B0E[180C] mov cx, word [if_exists_length] 5178 0000925E 8B36[160C] mov si, word [if_exists_sp] 5179 00009262 F3A4 rep movsb 5180 00009264 8B0E[180C] mov cx, word [if_exists_length] 5181 00009268 41 inc cx 5182 00009269 80E1FE and cl, ~1 5183 5184 0000926C 8B36[120C] mov si, word [if_exists_then_address] 5185 00009270 85F6 test si, si 5186 00009272 740A jz .error 5187 00009274 4E dec si 5188 00009275 BA[5865] mov dx, msg.then 5189 00009278 E8A228 call isstring? 5190 0000927B 7501 jne .error 5191 0000927D C3 retn 5192 5193 .error: 5194 0000927E B80701 mov ax, 107h 5195 00009281 E80D15 call setrc 5196 00009284 E9C314 jmp error 5197 5198 if_exists_not_found: 5199 00009287 E8CAFF call if_exists_check 5200 0000928A F606[A400]40 testopt [internalflags3], dif3_if_not 5201 0000928F 7512 jnz if_exists_condition_met 5202 if_exists_condition_not_met: 5203 00009291 E96C6D jmp cmd3 5204 5205 if_exists_found_open: 5206 00009294 16 push ss 5207 00009295 07 pop es 5208 00009296 E81B34 call getline_close_file 5209 5210 if_exists_found_closed: 5211 00009299 E8B8FF call if_exists_check 5212 0000929C F606[A400]40 testopt [internalflags3], dif3_if_not 5213 000092A1 75EE jnz if_exists_condition_not_met 5214 if_exists_condition_met: 5215 000092A3 8B26[160C] mov sp, word [if_exists_sp] 5216 000092A7 01CC add sp, cx 5217 000092A9 E82529 call skipwhite 5218 000092AC 5A pop dx ; discard near return address 5219 000092AD 8026[A700]E7 clropt [internalflags3], dif3_in_if | dif3_auxbuff_guarded_1 5220 000092B2 E90871 jmp cmd3_notblank 5221 %endif 5222 5223 5224 ; I command - input from I/O port. 5225 ; 5226 ; IF command -- conditional 5227 ii: 5228 000092B5 89F2 mov dx, si 5229 000092B7 50 push ax 5230 000092B8 8B44FE mov ax, [si - 2] 5231 000092BB 25DFDF and ax, TOUPPER_W 5232 000092BE 3D4946 cmp ax, "IF" 5233 000092C1 58 pop ax 5234 000092C2 7403E9B500 jne .not_if 5235 5236 000092C7 E80729 call skipwhite 5237 000092CA E86D19 call isoperator? 5238 000092CD 7514 jne .if 5239 000092CF 89CB mov bx, cx 5240 000092D1 01DB add bx, bx ; bh = 0 ! 5241 000092D3 50 push ax 5242 000092D4 FF97[0493] call near [operatordispatchers+bx] 5243 000092D8 58 pop ax 5244 000092D9 85DB test bx, bx 5245 000092DB 7403E99C00 jnz .not_if 5246 000092E0 E8EE28 call skipwhite 5247 .if: 5248 000092E3 8026[A400]BF clropt [internalflags3], dif3_if_not 5249 000092E8 4E dec si 5250 000092E9 BA[5D65] mov dx, msg.not 5251 000092EC E82E28 call isstring? 5252 000092EF AC lodsb 5253 000092F0 7508 jne @F 5254 000092F2 E8DD28 call skipwh0 5255 000092F5 800E[A400]40 setopt [internalflags3], dif3_if_not 5256 5257 @@: 5258 %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 5259 000092FA 4E dec si 5260 000092FB BA[896E] mov dx, msg.exists 5261 000092FE E81C28 call isstring? 5262 00009301 AC lodsb 5263 00009302 754C jne .if_numeric 5264 00009304 E8CB28 call skipwh0 5265 00009307 4E dec si 5266 00009308 BA[906E] mov dx, msg.y 5267 0000930B E80F28 call isstring? 5268 0000930E 7403E93714 jne error 5269 00009313 E8BB28 call skipwhite 5270 5271 00009316 4E dec si 5272 00009317 8936[140C] mov word [if_exists_si], si 5273 0000931B 89F3 mov bx, si 5274 @@: 5275 0000931D AC lodsb 5276 0000931E E85F28 call iseol?.notsemicolon 5277 00009321 75FA jne @B 5278 00009323 89F1 mov cx, si ; -> after EOL byte 5279 00009325 29D9 sub cx, bx ; = length including EOL 5280 00009327 890E[180C] mov word [if_exists_length], cx 5281 0000932B 41 inc cx ; round up 5282 0000932C 80E1FE and cl, ~1 ; make even 5283 0000932F 29CC sub sp, cx 5284 00009331 8926[160C] mov word [if_exists_sp], sp 5285 00009335 89E7 mov di, sp 5286 00009337 89DE mov si, bx 5287 00009339 D1E9 shr cx, 1 5288 0000933B F3A5 rep movsw 5289 5290 0000933D 89DE mov si, bx 5291 0000933F AC lodsb 5292 00009340 8326[120C]00 and word [if_exists_then_address], 0 5293 00009345 800E[A700]08 setopt [internalflags3], dif3_in_if 5294 0000934A E80F39 call yy 5295 0000934D E9FA13 jmp error 5296 %endif 5297 5298 .if_numeric: 5299 00009350 E82222 call getexpression 5300 00009353 E82A1C call toboolean 5301 00009356 89D3 mov bx, dx 5302 00009358 BA[5865] mov dx, msg.then 5303 0000935B 4E dec si 5304 0000935C E8BE27 call isstring? 5305 0000935F 7403E9E613 jne error 5306 00009364 E86A28 call skipwhite 5307 00009367 F606[A400]40 testopt [internalflags3], dif3_if_not 5308 0000936C 7403 jz @F 5309 0000936E 80F301 xor bl, 1 5310 @@: 5311 00009371 85DB test bx, bx 5312 00009373 7404 jz .if_false 5313 00009375 5B pop bx ; discard near return address to cmd3 5314 00009376 E94470 jmp cmd3_notblank ; execute tail 5315 5316 .if_false: 5317 00009379 E9A03D jmp resetrc 5318 5319 .not_if: 5320 0000937C 89D6 mov si, dx 5321 0000937E 4E dec si 5322 0000937F AC lodsb 5323 5324 00009380 B449 mov ah, 'I' 5325 00009382 BB[B893] mov bx, .tab 5326 5327 ; bx = jump table for byte, word, dword handler 5328 ; ah = letter of the command 5329 ; si, al etc. 5330 .common: 5331 00009385 50 push ax 5332 00009386 E892FA call uppercase 5333 00009389 3C57 cmp al, 'W' 5334 0000938B 7507 jne .notw 5335 .incbx2: 5336 0000938D 43 inc bx 5337 0000938E 43 inc bx ; use word handler 5338 0000938F E83F28 call skipwhite ; skip the 'W' til next character 5339 00009392 EB12 jmp short .sizeset 5340 5341 .notw: 5342 00009394 3C44 cmp al, 'D' 5343 00009396 750E jne .sizeset 5344 %if 1 5345 00009398 3264FE xor ah, byte [si-2] 5346 0000939B 7405 jz .d ; "Id" or "Od" --> (uppercase command) 5347 0000939D 80F420 xor ah, 32 5348 000093A0 7504 jnz .sizeset ; no space is allowed between the command and 'D' --> 5349 ; "id" or "od" here (lowercase command) 5350 .d: 5351 %endif 5352 000093A2 43 _386 inc bx 5353 000093A3 43 _386 inc bx ; use dword handler 5354 000093A4 EBE7 _386_jmps .incbx2 ; bx += 2 and skip the 'D' 5355 ; no 386 here. try with D as part of port number 5356 .sizeset: 5357 000093A6 E8B226 call getword ; get port 5358 000093A9 59 pop cx ; restore letter if necessary 5359 000093AA 80FD49 cmp ch, 'I' ; check whether I or O 5360 000093AD 7504 jne .o ; O --> 5361 000093AF E8DF27 call chkeol ; expect end of line here for I commands 5362 000093B2 A8 db __TEST_IMM8 ; (skip push) 5363 .o: 5364 000093B3 52 push dx ; save port number for O commands 5365 000093B4 2EFF27 jmp near [cs:bx] 5366 5367 5368 000093B7 00 align 2, db 0 5369 .tab: 5370 000093B8 [BE93][C493][CB93] dw .byte, .word, .dword 5371 5372 .byte: 5373 000093BE EC in al, dx 5374 000093BF E8C128 call hexbyte 5375 000093C2 EB04 jmp short .done 5376 5377 .word: 5378 000093C4 ED in ax, dx 5379 .doneword: 5380 000093C5 E8B428 call hexword 5381 .done: 5382 000093C8 E9E928 jmp putsline_crlf 5383 5384 .dword: 5385 [cpu 386] 5386 000093CB 66ED in eax, dx 5387 000093CD E8A028 call hexword_high 5388 __CPU__ 5389 000093D0 EBF3 jmp short .doneword 5390 5391 5392 000093D2 E97513 errorj5:jmp error 5393 5394 5395 %if _PM 5396 ; OUT: NC 5397 ; ZR if in protected mode 5398 ; NZ otherwise 5399 ; STT: - 5400 ; ([internalflags] & nodosloaded, [internalflags] & protectedmode set up) 5401 ispm: 5402 000093D5 50 push ax 5403 %if protectedmode & ~0FF00h 5404 %error Internal flags re-ordered, adjust code here 5405 %endif 5406 000093D6 36A0[9D00] mov al, byte [ss:internalflags+1] ; get flag byte 5407 000093DA 2408 and al, protectedmode>>8 ; separate PM flag 5408 000093DC 3408 xor al, protectedmode>>8 ; ZR if in PM (NC) 5409 000093DE 58 pop ax 5410 000093DF C3 retn 5411 %endif 5412 5413 5414 setpspdbg: 5415 000093E0 8CD3 mov bx, ss 5416 setpsp: 5417 %if _BOOTLDR 5418 000093E2 F606[9D00]40 testopt [internalflags], nodosloaded 5419 000093E7 753D jnz .ret ; no PSPs --> 5420 %endif 5421 000093E9 B450 mov ah, 50h 5422 %if _PM && (_NOEXTENDER || _USESDA) 5423 000093EB E8E7FF call ispm 5424 %if _NOEXTENDER 5425 000093EE 751B jnz .rm 5426 subcpu 286 5427 000093F0 51 push cx 5428 000093F1 52 push dx 5429 000093F2 53 push bx 5430 000093F3 50 push ax 5431 000093F4 B80600 mov ax, 0006h 5432 000093F7 CD31 int 31h 5433 000093F9 58 pop ax 5434 000093FA C1E10C shl cx, 12 5435 000093FD C1EA04 shr dx, 4 5436 00009400 09CA or dx, cx 5437 00009402 89D3 mov bx, dx 5438 00009404 E872CB call _doscall.pm ; insure non-extended 5439 00009407 5B pop bx 5440 00009408 5A pop dx 5441 00009409 59 pop cx 5442 0000940A C3 retn 5443 subcpureset 5444 %else 5445 jz _int21 ; extended 5446 %endif 5447 %endif 5448 .rm: 5449 %if _USESDA 5450 0000940B 833E[E60A]FF cmp word [pSDA+0], byte -1 5451 00009410 7503E98000 je _int21 5452 00009415 1E push ds 5453 00009416 56 push si 5454 00009417 BE[E80A] mov si, pSDA + so16aSegSel 5455 0000941A E81B15 call update_dosdata_segment 5456 0000941D C574FE lds si, [si - so16aSegSel] 5457 00009420 895C10 mov word [si+10h], bx 5458 00009423 5E pop si 5459 00009424 1F pop ds 5460 00009425 C3 retn 5461 %else 5462 jmp short _int21 5463 %endif 5464 %if _BOOTLDR 5465 .ret: 5466 getpsp.ret: 5467 00009426 C3 retn 5468 %endif 5469 5470 getpsp: 5471 %if _BOOTLDR 5472 00009427 31DB xor bx, bx 5473 00009429 F606[9D00]40 testopt [internalflags], nodosloaded 5474 0000942E 75F6 jnz .ret ; no PSPs --> 5475 %endif 5476 00009430 B451 mov ah, 51h 5477 %if _PM && (_NOEXTENDER || _USESDA) 5478 00009432 E8A0FF call ispm 5479 %if _NOEXTENDER 5480 00009435 750B jnz .rm 5481 00009437 E83FCB call _doscall.pm ; insure non-extended 5482 0000943A B80200 mov ax, 2 5483 0000943D CD31 int 31h 5484 0000943F 89C3 mov bx, ax 5485 00009441 C3 retn 5486 %else 5487 jz _int21 ; extended 5488 %endif 5489 %endif 5490 .rm: 5491 %if _USESDA 5492 00009442 833E[E60A]FF cmp word [pSDA+0], byte -1 5493 00009447 744C je _int21 5494 00009449 1E push ds 5495 0000944A 56 push si 5496 0000944B BE[E80A] mov si, pSDA + so16aSegSel 5497 0000944E E8E714 call update_dosdata_segment 5498 00009451 C574FE lds si, [si - so16aSegSel] 5499 00009454 8B5C10 mov bx, word [si + 10h] 5500 00009457 5E pop si 5501 00009458 1F pop ds 5502 00009459 C3 retn 5503 %else 5504 jmp short _int21 5505 %endif 5506 5507 5508 _doscall_return_es: 5509 _doscall_return_es_parameter_es_ds: 5510 lframe near 5511 lpar word, es_ds_value 5512 lpar_return 5513 %if _PM 5514 lvar word, int_number 5515 0000945A 5589E550 lenter 5516 0000945E C746FE2100 mov word [bp + ?int_number], 21h 5517 00009463 9C pushf 5518 00009464 E86EFF call ispm 5519 00009467 7518 jnz .rm 5520 .pm: 5521 00009469 9D popf 5522 0000946A FF7604 push word [bp + ?es_ds_value] 5523 0000946D FF7604 push word [bp + ?es_ds_value] 5524 00009470 FF76FE push word [bp + ?int_number] 5525 00009473 FF7600 push word [bp + ?frame_bp] 5526 00009476 E82E00 call intcall_return_parameter_es_parameter_ds 5527 00009479 8F4604 pop word [bp + ?es_ds_value] ; discard returned ds 5528 0000947C 8F4604 pop word [bp + ?es_ds_value] ; get es 5529 0000947F EB10 jmp .ret 5530 .rm: 5531 00009481 9D popf 5532 %else 5533 lenter 5534 %endif 5535 00009482 06 push es 5536 00009483 1E push ds 5537 00009484 8E5E04 mov ds, word [bp + ?es_ds_value] 5538 00009487 8E4604 mov es, word [bp + ?es_ds_value] 5539 0000948A CD21 int 21h 5540 0000948C 8C4604 mov word [bp + ?es_ds_value], es 5541 0000948F 1F pop ds 5542 00009490 07 pop es 5543 .ret: 5544 00009491 89EC5D lleave 5545 00009494 C3 lret 5546 5547 5548 ; Execute real Int21 instruction. If this is in PM it might get extended. 5549 _int21: 5550 %if _BOOTLDR 5551 00009495 9C pushf 5552 00009496 F606[9D00]40 testopt [internalflags], nodosloaded 5553 0000949B 7504 jnz .reterr ; no Int21 --> (throw?) 5554 0000949D 9D popf 5555 %endif 5556 0000949E CD21 int 21h 5557 000094A0 C3 retn 5558 %if _BOOTLDR 5559 .reterr: 5560 000094A1 9D popf 5561 000094A2 B80100 mov ax, 1 5562 000094A5 F9 stc 5563 000094A6 C3 retn 5564 %endif 5565 5566 5567 %if _PM 5568 intcall_return_parameter_es_parameter_ds: 5569 lframe near 5570 lpar word, es_value 5571 lpar word, ds_value 5572 lpar_return 5573 lpar word, int_number 5574 lpar word, bp_value 5575 lvar 32h, 86m_call_struc 5576 000094A7 5589E58D66CE lenter 5577 000094AD 06 push es 5578 000094AE 897ECE mov word [bp + ?86m_call_struc +00h], di ; edi 5579 000094B1 8976D2 mov word [bp + ?86m_call_struc +04h], si ; esi 5580 000094B4 895EDE mov word [bp + ?86m_call_struc +10h], bx ; ebx 5581 000094B7 8956E2 mov word [bp + ?86m_call_struc +14h], dx ; edx 5582 000094BA 894EE6 mov word [bp + ?86m_call_struc +18h], cx ; ecx 5583 000094BD 8946EA mov word [bp + ?86m_call_struc +1Ch], ax ; eax 5584 000094C0 8B4604 mov ax, word [bp + ?bp_value] 5585 000094C3 8946D6 mov word [bp + ?86m_call_struc +08h], ax ; bp 5586 000094C6 B000 mov al, 0 ; (preserve flags!) 5587 000094C8 9F lahf 5588 000094C9 86C4 xchg al, ah 5589 000094CB 8946EE mov word [bp + ?86m_call_struc +20h], ax ; flags 5590 000094CE 31C0 xor ax, ax 5591 000094D0 8946DC mov word [bp + ?86m_call_struc +0Ch + 2], ax 5592 000094D3 8946DA mov word [bp + ?86m_call_struc +0Ch], ax 5593 000094D6 8946FC mov word [bp + ?86m_call_struc +2Eh], ax ; sp 5594 000094D9 8946FE mov word [bp + ?86m_call_struc +30h], ax ; ss 5595 000094DC 8B460A mov ax, word [bp + ?es_value] ; usually [pspdbg] 5596 000094DF 8946F0 mov word [bp + ?86m_call_struc +22h], ax ; es 5597 000094E2 8B4608 mov ax, word [bp + ?ds_value] ; usually [pspdbg] 5598 000094E5 8946F2 mov word [bp + ?86m_call_struc +24h], ax ; ds 5599 000094E8 16 push ss 5600 000094E9 07 pop es ; => stack 5601 000094EA 8D7ECE lea di, [bp + ?86m_call_struc] ; -> 86-Mode call structure 5602 000094ED 660FB7FF _386 movzx edi, di ; (previously checked b[dpmi32] here) 5603 000094F1 8B5E06 mov bx, word [bp + ?int_number] ; int# 5604 000094F4 31C9 xor cx, cx 5605 000094F6 B80003 mov ax, 0300h 5606 000094F9 CD31 int 31h 5607 000094FB 8A66EE mov ah, byte [bp + ?86m_call_struc +20h] ; flags 5608 000094FE 9E sahf 5609 000094FF 8B7ECE mov di, word [bp + ?86m_call_struc +00h] ; edi 5610 00009502 8B76D2 mov si, word [bp + ?86m_call_struc +04h] ; esi 5611 00009505 8B5EDE mov bx, word [bp + ?86m_call_struc +10h] ; ebx 5612 00009508 8B56E2 mov dx, word [bp + ?86m_call_struc +14h] ; edx 5613 0000950B 8B4EE6 mov cx, word [bp + ?86m_call_struc +18h] ; ecx 5614 0000950E 8B46EA mov ax, word [bp + ?86m_call_struc +1Ch] ; eax 5615 00009511 FF76F0 push word [bp + ?86m_call_struc +22h] ; return es value 5616 00009514 8F460A pop word [bp + ?es_value] ; in the parameter 5617 00009517 FF76F2 push word [bp + ?86m_call_struc +24h] ; return ds value 5618 0000951A 8F4608 pop word [bp + ?ds_value] ; in the parameter 5619 0000951D 07 pop es 5620 0000951E 89EC5D lleave 5621 00009521 C20400 lret 5622 5623 intcall: 5624 lframe near 5625 lpar word, es_ds_value 5626 lpar word, int_number 5627 00009524 5589E5 lenter 5628 00009527 FF7606 push word [bp + ?es_ds_value] ; es 5629 0000952A FF7606 push word [bp + ?es_ds_value] ; ds 5630 0000952D FF7604 push word [bp + ?int_number] ; int number 5631 00009530 FF7600 push word [bp + ?frame_bp] ; bp 5632 00009533 E871FF call intcall_return_parameter_es_parameter_ds 5633 ; (discard returned parameters ?es_value, ?ds_value, done by lleave) 5634 00009536 89EC5D lleave , forcerestoresp 5635 00009539 C20400 lret 5636 5637 5638 call_int2D: 5639 0000953C E896FE call ispm 5640 0000953F 750B jnz short .rm 5641 subcpu 286 5642 00009541 36FF36[B00A] push word [ss:pspdbg] ; es ds value. generally unused 5643 00009546 6A2D push 2Dh ; interrupt 2Dh 5644 00009548 E8D9FF call intcall ; call it 5645 0000954B C3 retn 5646 subcpureset 5647 .rm: 5648 0000954C CD2D int 2Dh ; directly call int 2Dh 5649 0000954E C3 retn 5650 5651 5652 ; Called in PM only, ds unknown. 5653 ; 5654 ; INP: - 5655 ; OUT: CY if no DOS extender available ("MS-DOS" on Int2F.168A) 5656 ; NC if DOS extender available 5657 ; CHG: - 5658 isextenderavailable: 5659 subcpu 286 5660 0000954F 1E push ds 5661 00009550 06 push es 5662 00009551 60 pusha 5663 00009552 16 push ss 5664 00009553 1F pop ds 5665 00009554 BE[EE7E] mov si, msg.msdos 5666 00009557 660FB7F6 _386 movzx esi, si 5667 0000955B B88A16 mov ax, 168Ah 5668 0000955E CD2F int 2Fh 5669 00009560 3C01 cmp al, 1 ; CY if al is zero 5670 00009562 F5 cmc ; NC if al is zero, CY else 5671 00009563 61 popa 5672 00009564 07 pop es 5673 00009565 1F pop ds 5674 00009566 C3 retn 5675 subcpureset 5676 5677 nodosextinst: 5678 00009567 16 push ss 5679 00009568 1F pop ds 5680 00009569 BA[FE7D] mov dx, nodosext 5681 0000956C E9C42A jmp putsz 5682 %endif 5683 5684 5685 ; L command - read a program, or disk sectors, from disk. 5686 ll: 5687 %if _BOOTLDR 5688 0000956F F606[9D00]40 testopt [internalflags], nodosloaded 5689 00009574 7406 jz @F 5690 00009576 BA[3C60] mov dx, msg.nobootsupp 5691 00009579 E9B72A jmp putsz 5692 @@: 5693 %endif 5694 5695 0000957C E82B14 call parselw ; parse L and W argument format 5696 0000957F 7441 jz ll1 ; if request to read program 5697 %if _PM && _NOEXTENDER 5698 00009581 E851FE call ispm 5699 00009584 7505 jnz .rm 5700 00009586 E8C6FF call isextenderavailable 5701 00009589 72DC jc nodosextinst 5702 .rm: 5703 %endif 5704 0000958B 36F606[9C00]06 testopt [ss:internalflags], newpacket| ntpacket 5705 00009591 7427 jz .oldint 5706 00009593 88C2 mov dl, al ; zero-based drive 5707 00009595 BE0060 mov si, 6000h ; read, assume "file data" 5708 %if _VDD 5709 00009598 F606[9C00]04 testopt [internalflags], ntpacket 5710 0000959D 750A jnz .vdd 5711 %endif 5712 0000959F FEC2 inc dl ; one-based drive 5713 000095A1 B80573 mov ax, 7305h ; ds:(e)bx-> packet 5714 000095A4 F9 stc 5715 000095A5 CD21 int 21h ; use int 21h here, not doscall 5716 000095A7 EB13 jmp short .done 5717 %if _VDD 5718 .vdd: 5719 000095A9 A1[C40A] mov ax, word [hVdd] 5720 000095AC B90500 mov cx, 5 5721 %if _PM 5722 000095AF 020E[0A8B] add cl, byte [dpmi32] 5723 %endif 5724 000095B3 C4C4580290 DispatchCall 5725 000095B8 EB02 jmp short .done 5726 %endif 5727 .oldint: 5728 000095BA CD25 int 25h 5729 .done: 5730 000095BC BA[AF7B] mov dx, reading 5731 000095BF E9420E jmp ww1 5732 5733 ; For .COM or .EXE files, we can only load at cs:100. Check that first. 5734 ll1: 5735 000095C2 E85413 call InDos 5736 000095C5 7519 jnz not_while_indos 5737 000095C7 E8AD6F call guard_re 5738 000095CA F606[E80B]06 test byte [fileext], EXT_COM| EXT_EXE 5739 000095CF 7423 jz ll4 ; if not .COM or .EXE file 5740 000095D1 3B1E[9C0C] cmp bx, word [reg_cs] 5741 000095D5 7506 jne ll2 ; if segment is wrong 5742 000095D7 81FA0001 cmp dx, 100h 5743 000095DB 7417 je ll4 ; if address is OK (or not given) 5744 ll2: 5745 000095DD E96A11 jmp error ; can only load .COM or .EXE at cs:100 5746 5747 not_while_indos: 5748 000095E0 B80501 mov ax, 0105h 5749 000095E3 E8AB11 call setrc 5750 000095E6 BA[FC5D] mov dx, msg.not_while_indos 5751 000095E9 E9412A jmp putsz_error 5752 5753 5754 ; load (any) file (if not .EXE or .COM, load at BX:DX) 5755 ll3: 5756 000095EC 803E[E80B]00 cmp byte [fileext], 0 5757 000095F1 7501 jne ll4 5758 000095F3 C3 retn 5759 5760 ; open file and get length 5761 ll4: 5762 000095F4 89DE mov si, bx ; save destination address, segment 5763 000095F6 89D7 mov di, dx ; and offset 5764 000095F8 B8003D mov ax, 3D00h ; open file for reading 5765 000095FB BA8000 mov dx, DTA 5766 doscall 2160 000095FE E871C9 <1> call _doscall 5767 00009601 7303E9A801 jc ll16 ; error 5768 00009606 93 xchg ax, bx ; mov bx, ax 5769 00009607 B80242 mov ax, 4202h ; lseek 5770 0000960A 31C9 xor cx, cx 5771 0000960C 31D2 xor dx, dx 5772 0000960E CD21 int 21h 5773 5774 ; Split off file types 5775 ; At this point: 5776 ; bx file handle 5777 ; dx:ax file length 5778 ; si:di load address (CS:100h for .EXE or .COM) 5779 5780 00009610 F606[E80B]06 test byte [fileext], EXT_COM | EXT_EXE 5781 00009615 7403E98000 jnz ll13 ; if .COM or .EXE file 5782 5783 %if _PM 5784 ;--- dont load a file in protected mode, 5785 ;--- the read loop makes some segment register arithmetic 5786 0000961A E8B8FD call ispm 5787 0000961D 7508 jnz .rm 5788 0000961F BA[3F7E] mov dx, nopmsupp 5789 00009622 E80E2A call putsz 5790 00009625 EB6C jmp ll12 5791 .rm: 5792 %endif 5793 5794 ; Load it ourselves. 5795 ; For non-.com/.exe files, we just do a read, and set BX:CX to the 5796 ; number of bytes read. 5797 ; 5798 ; si:di = address where to load 5799 5800 00009627 E86540 call ensuredebuggeeloaded ; make sure a debuggee is loaded 5801 0000962A 7531 jnz ll9.common ; if have no process --> 5802 ; si:di = preserved if had a process, 5803 ; else si:di = cs:ip (psp:100h) 5804 ; ? Can we ever get NC, ZR return here ? 5805 5806 0000962C 8E06[AE0A] mov es, word [pspdbe] 5807 5808 ; Check the size against available space. 5809 00009630 56 push si 5810 00009631 53 push bx 5811 5812 00009632 263B360200 cmp si, word [es:ALASAP] 5813 00009637 9C pushf 5814 00009638 F7DE neg si 5815 0000963A 9D popf 5816 0000963B 7305 jae ll6 ; if loading past end of mem, allow through ffff 5817 0000963D 2603360200 add si, word [es:ALASAP] ; si = number of paragraphs available 5818 ll6: 5819 00009642 B90400 mov cx, 4 5820 00009645 31DB xor bx, bx ; bx:si = amount of paragraphs 5821 ll7: 5822 00009647 D1E6 shl si, 1 5823 00009649 D1D3 rcl bx, 1 5824 0000964B E2FA loop ll7 ; bx:si = amount of bytes from paragraphs 5825 0000964D 29FE sub si, di 5826 0000964F 19CB sbb bx, cx ; bx:si = amount of bytes left 5827 00009651 7208 jb ll9 ; if already we're out of space --> 5828 00009653 39D3 cmp bx, dx ; cmp bx:si, dx:ax (compare high word) 5829 00009655 7502 jne @F ; if high word differs --> 5830 00009657 39C6 cmp si, ax ; compare low word 5831 @@: 5832 00009659 730A jae ll10 ; if not out of space --> 5833 ll9: 5834 0000965B 5B pop bx ; out of space 5835 0000965C 5E pop si 5836 .common: 5837 0000965D BA[2380] mov dx, doserr8 ; not enough memory 5838 00009660 E8D029 call putsz ; print string 5839 00009663 EB2E jmp short ll12 ; finally close file --> 5840 5841 ll10: 5842 00009665 5B pop bx 5843 00009666 5E pop si 5844 5845 ; Store length in registers 5846 5847 ; seems a bit unwise to modify registers if a debuggee is running 5848 ; but MS DEBUG does it as well 5849 5850 %if 0 5851 mov cx,[reg_cs] 5852 cmp cx,[pspdbe] 5853 jnz .noregmodify 5854 cmp word [reg_eip], 100h 5855 jnz .noregmodify 5856 %endif 5857 00009667 8916[740C] mov word [reg_ebx], dx 5858 0000966B A3[780C] mov word [reg_ecx], ax 5859 .noregmodify: 5860 5861 ; Rewind the file 5862 0000966E B80042 mov ax, 4200h ; lseek 5863 00009671 31C9 xor cx, cx 5864 00009673 31D2 xor dx, dx 5865 00009675 CD21 int 21h 5866 5867 00009677 BA0F00 mov dx, 0Fh 5868 0000967A 21FA and dx, di 5869 0000967C B104 mov cl, 4 5870 0000967E D3EF shr di, cl 5871 00009680 01FE add si, di ; si:dx -> address to read to 5872 5873 ; Loop over chunks to read 5874 ll11: 5875 00009682 B43F mov ah, 3Fh ; read from file into DS:(E)DX 5876 00009684 B900FE mov cx, 0FE00h ; read up to this many bytes 5877 00009687 8EDE mov ds, si 5878 00009689 CD21 int 21h ; ax = how many bytes read 5879 5880 0000968B 81C6E00F add si, 0FE0h ; (won't work in protected mode!) 5881 0000968F 39C8 cmp ax, cx ; read a full chunk ? 5882 00009691 74EF je ll11 ; yes, end of file maybe not yet reached --> 5883 5884 ; Close the file and finish up. 5885 ll12: 5886 00009693 B43E mov ah, 3Eh ; close file 5887 00009695 CD21 int 21h 5888 00009697 16 push ss ; restore ds 5889 00009698 1F pop ds 5890 00009699 C3 retn ; done 5891 5892 ll13: 5893 ; file is .EXE or .COM 5894 ; Close the file 5895 %if 0 5896 push ax 5897 mov ah, 3Eh ; close file 5898 int 21h 5899 pop bx ; dx:bx is the file length 5900 5901 ; adjust .exe size by 200h (who knows why) 5902 ; cm: this is wrong. It needs to be adjusted by the header size, 5903 ; which is stored (as number of paragraphs) in the .EXE header. 5904 ; The header size is often 200h, but not always. 5905 test byte [fileext], EXT_EXE 5906 jz ll14 ; if not .EXE 5907 sub bx, 200h 5908 sbb dx, 0 5909 %else 5910 0000969A 52 push dx 5911 0000969B 50 push ax 5912 5913 0000969C B80042 mov ax, 4200h ; lseek set 5914 0000969F 31C9 xor cx, cx 5915 000096A1 31D2 xor dx, dx 5916 000096A3 CD21 int 21h 5917 000096A5 16 push ss 5918 000096A6 1F pop ds 5919 5920 000096A7 89E5 mov bp, sp 5921 000096A9 B91C00 mov cx, EXEHEADER_size 5922 000096AC 29CC sub sp, cx 5923 000096AE 89E2 mov dx, sp 5924 000096B0 89E6 mov si, sp 5925 000096B2 B43F mov ah, 3Fh 5926 000096B4 CD21 int 21h 5927 5928 000096B6 50 push ax 5929 000096B7 B43E mov ah, 3Eh ; close file 5930 000096B9 CD21 int 21h 5931 000096BB 58 pop ax 5932 5933 000096BC 39C8 cmp ax, cx 5934 000096BE 7524 jne .no_exe 5935 000096C0 813C4D5A cmp word [si + exeSignature], "MZ" 5936 000096C4 7406 je @F 5937 000096C6 813C5A4D cmp word [si + exeSignature], "ZM" 5938 000096CA 7518 jne .no_exe 5939 @@: 5940 5941 ; This possibly should honour the size of the image in pages 5942 ; as indicated by the header, instead of the file size. 5943 ; Oh well, for now we use the file size (on stack). 5944 000096CC 8B4408 mov ax, [si + exeHeaderSize] 5945 000096CF 31F6 xor si, si 5946 000096D1 B90400 mov cx, 4 5947 @@: 5948 000096D4 D1E0 shl ax, 1 5949 000096D6 D1D6 rcl si, 1 5950 000096D8 E2FA loop @B ; si:ax <<= 4 5951 5952 000096DA 89EC mov sp, bp 5953 000096DC 5B pop bx 5954 000096DD 5A pop dx 5955 5956 000096DE 29C3 sub bx, ax 5957 000096E0 19F2 sbb dx, si ; file size minus header size 5958 5959 000096E2 EB04 jmp @F 5960 5961 .no_exe: 5962 000096E4 89EC mov sp, bp 5963 000096E6 5B pop bx 5964 000096E7 5A pop dx ; full file size 5965 @@: 5966 %endif 5967 5968 ; Clear registers 5969 5970 ll14: 5971 000096E8 53 push bx 5972 000096E9 52 push dx 5973 ; mov word [reg_ebx], dx 5974 ; mov word [reg_ecx], bx 5975 5976 ;--- cancel current process (unless there is none) 5977 ;--- this will also put cpu back in real-mode!!! 5978 5979 000096EA E8AF10 call terminate_attached_process 5980 000096ED 7503E9BF00 jz ll_attached_unterminated 5981 5982 000096F2 BF[700C] mov di, regs 5983 000096F5 B92000 mov cx, 16*2 ;(8 std, 6 seg, ip, fl) * 2 5984 000096F8 31C0 xor ax, ax 5985 000096FA F3AB rep stosw 5986 5987 000096FC 8F06[740C] pop word [reg_ebx] 5988 00009700 8F06[780C] pop word [reg_ecx] 5989 5990 ; Fix up interrupt vectors in PSP 5991 00009704 BE0E00 mov si, CCIV ; address of original INT 23 and 24 (in PSP) 5992 00009707 BF[B40A] mov di, run2324 5993 0000970A A5 movsw 5994 0000970B A5 movsw 5995 0000970C A5 movsw 5996 0000970D A5 movsw 5997 5998 ; Actual program loading. Use the DOS interrupt. 5999 0000970E B8014B mov ax, 4B01h ; load program 6000 00009711 BA8000 mov dx, DTA ; offset of file to load 6001 00009714 BB[580C] mov bx, execblk ; parameter block 6002 00009717 CD21 int 21h ; load it 6003 00009719 7303E99000 jc ll16 ; if error 6004 0000971E 89E0 mov ax, sp 6005 00009720 2B062E00 sub ax, [SPSAV] 6006 00009724 3D8000 cmp ax, 80h 6007 00009727 7203 jb ll15 ; if in range 6008 00009729 B88000 mov ax, 80h 6009 ll15: 6010 0000972C A3[AC0A] mov word [spadjust], ax 6011 0000972F C436[660C] les si, [execblk+14] 6012 00009733 26AD es lodsw ; recover ax 6013 00009735 A3[700C] mov word [reg_eax], ax 6014 00009738 8936[800C] mov word [reg_esp], si 6015 0000973C 8326[820C]00 and word [reg_esp + 2], 0 6016 00009741 8C06[980C] mov word [reg_ss], es 6017 00009745 C436[6A0C] les si, [execblk+18] 6018 00009749 8936[A80C] mov word [reg_eip], si 6019 0000974D 8326[AA0C]00 and word [reg_eip + 2], 0 6020 00009752 8C06[9C0C] mov word [reg_cs], es 6021 00009756 16 push ss 6022 00009757 07 pop es 6023 00009758 E89040 call set_efl_to_fl 6024 0000975B E8C9FC call getpsp 6025 0000975E 89D8 mov ax, bx 6026 00009760 A3[AE0A] mov word [pspdbe], ax 6027 00009763 8026[9E00]7F clropt [internalflags], attachedterm 6028 00009768 BF[900C] mov di, reg_ds 6029 0000976B AB stosw 6030 0000976C AF scasw 6031 0000976D AB stosw ; reg_es 6032 0000976E E86FFC call setpspdbg 6033 6034 ; Finish up. Set termination address. 6035 00009771 B82225 mov ax, 2522h ; set interrupt vector 22h 6036 00009774 BA[FA87] mov dx, int22 ; ds => lDEBUG_DATA_ENTRY 6037 00009777 CD21 int 21h 6038 00009779 8E1E[AE0A] mov ds, word [pspdbe] 6039 0000977D 89160A00 mov word [TPIV], dx 6040 00009781 8C160C00 mov word [TPIV+2], ss ; => lDEBUG_DATA_ENTRY 6041 00009785 16 push ss 6042 00009786 1F pop ds 6043 6044 ; Set up initial addresses for 'a', 'd', and 'u' commands. 6045 adusetup: 6046 00009787 A1[A80C] mov ax, word [reg_eip] 6047 0000978A 8B0E[AA0C] mov cx, word [reg_eip+2] 6048 0000978E 8B1E[9C0C] mov bx, word [reg_cs] 6049 00009792 BA0900 mov dx, var_addr_entries.amount 6050 00009795 BF[0E0B] mov di, var_addr_entries 6051 6052 .loop: 6053 00009798 AB stosw ; IP 6054 %if saSegSel == 4 6055 00009799 890D mov word [di], cx 6056 0000979B AF scasw ; skip this word 6057 %endif 6058 0000979C 93 xchg ax, bx 6059 0000979D AB stosw ; CS 6060 %if _PM 6061 %if SEGADR_size != 10 6062 %error Unexpected SEGADR size 6063 %endif 6064 0000979E E834FC call ispm 6065 000097A1 7504 jnz .86m 6066 .pm: 6067 000097A3 AF scasw ; skip saSegment 6068 000097A4 AB stosw ; store saSelector 6069 000097A5 EB02 jmp @F 6070 .86m: 6071 000097A7 AB stosw ; store saSegment 6072 000097A8 AF scasw ; skip saSelector 6073 @@: 6074 %else 6075 %if SEGADR_size == 10 6076 %error Unexpected SEGADR size 6077 %endif 6078 %endif 6079 000097A9 93 xchg ax, bx ; d_addr 6080 6081 000097AA 4A dec dx 6082 000097AB 75EB jnz .loop 6083 000097AD C3 retn 6084 6085 ; Error messages. Print and quit. 6086 ll16: 6087 000097AE E94E0D jmp ww15 ; print error message 6088 6089 ll_attached_unterminated: 6090 000097B1 BA[5A6D] mov dx, msg.ll_unterm 6091 000097B4 E97C28 jmp putsz 6092 6093 ; M command - move from place to place. 6094 ; 6095 ; First check for machine-related M commands. 6096 ; Those are: M, MNC, M?, MC, MC2, MC3, M [one expression] 6097 ; Move M command has more than one expression. 6098 mm: 6099 000097B7 89F2 mov dx, si ; - 1 -> input 6100 000097B9 56 push si 6101 000097BA E8BF23 call iseol? 6102 000097BD 7503E9E800 je mc ; no argument, CPU-related M command 6103 000097C2 8A24 mov ah, byte [ si ] 6104 000097C4 50 push ax 6105 000097C5 25DFDF and ax, ~(2020h) 6106 000097C8 3D4E43 cmp ax, "NC" 6107 000097CB 58 pop ax 6108 000097CC 7506 jne @F 6109 000097CE BA[876E] mov dx, msg.c0 + 1 ; - 1 -> C0 string 6110 000097D1 46 inc si ; skip 'N' 6111 000097D2 EB07 jmp .checkend 6112 6113 @@: 6114 000097D4 3C3F cmp al, '?' 6115 000097D6 7512 jne @F 6116 000097D8 BA[896E] mov dx, msg.cr + 1 ; - 1 -> empty string 6117 .checkend: 6118 000097DB E8F323 call skipwhite ; skip '?' or 'C' (in "NC") 6119 000097DE E89B23 call iseol? 6120 000097E1 7503E9C400 je mc 6121 000097E6 5E pop si 6122 000097E7 56 push si 6123 000097E8 4E dec si 6124 000097E9 AC lodsb 6125 @@: 6126 000097EA 56 push si 6127 000097EB E8871D call getexpression 6128 000097EE 5A pop dx ; - 1 -> input 6129 000097EF E88A23 call iseol? 6130 000097F2 7503E9B300 je mc ; one argument, CPU-related 6131 6132 000097F7 5E pop si 6133 000097F8 4E dec si 6134 000097F9 AC lodsb ; reload 6135 6136 ; It is a normal M command (Move) 6137 000097FA E86F11 call parsecm ; parse arguments (DS:ESI, ES:EDI, ECX) 6138 000097FD 51 push cx 6139 %if _PM 6140 000097FE E8D4FB call ispm 6141 00009801 7543 jnz .rm 6142 00009803 8CD8 mov ax, ds 6143 00009805 8CC1 mov cx, es 6144 00009807 39C8 cmp ax, cx 6145 00009809 7470 je .pmsimple ; same selector, simple --> 6146 6147 0000980B B80600 mov ax, 0006h 6148 0000980E 8CDB mov bx, ds 6149 00009810 CD31 int 31h ; get selector's base 6150 00009812 7303E9330F jc error 6151 00009817 51 push cx 6152 00009818 52 push dx 6153 00009819 B80600 mov ax, 0006h 6154 0000981C 8CC3 mov bx, es 6155 0000981E CD31 int 31h ; get selector's base 6156 00009820 7303E9250F jc error ; throw 6157 00009825 36803E[0C8B]00 cmp byte [ss:bAddr32], 0 6158 0000982B 7430 je .pm16 6159 [cpu 386] 6160 0000982D 6658 pop eax 6161 0000982F 51 push cx 6162 00009830 52 push dx 6163 00009831 665A pop edx ; mov edx, cxdx 6164 00009833 6601F0 add eax, esi ; add offset to source selector's base 6165 00009836 0F82100F jc error 6166 0000983A 6601FA add edx, edi ; add offset to destination selector's base 6167 0000983D 0F82090F jc error ; if overflow (> 4 GiB) --> 6168 00009841 6639D0 cmp eax, edx ; compare linear source to linear destination 6169 00009844 EB38 jmp short m3 ; and decide whether to move up or down --> 6170 __CPU__ 6171 6172 .rm: 6173 00009846 8CD8 mov ax, ds 6174 00009848 8CDB mov bx, ds 6175 0000984A 8CC2 mov dx, es 6176 0000984C B10C mov cl, 12 6177 0000984E D3EB shr bx, cl 6178 00009850 D3EA shr dx, cl 6179 00009852 52 push dx 6180 00009853 8CC2 mov dx, es 6181 00009855 B104 mov cl, 4 6182 00009857 D3E0 shl ax, cl 6183 00009859 D3E2 shl dx, cl 6184 0000985B 59 pop cx 6185 0000985C A9 db __TEST_IMM16 ; (skip 2 pop instructions) 6186 6187 .pm16: 6188 0000985D 58 pop ax 6189 0000985E 5B pop bx 6190 0000985F 01F0 add ax, si 6191 00009861 83D300 adc bx, byte 0 ; add offset to source selector's base 6192 00009864 7303E9E10E jc error 6193 00009869 01FA add dx, di 6194 0000986B 83D100 adc cx, byte 0 ; add offset to destination selector's base 6195 0000986E 7303E9D70E jc error ; if overflow (> 4 GiB) --> 6196 00009873 39CB cmp bx, cx ; compare linear source to linear destination 6197 00009875 7507 jne m3 6198 00009877 39D0 cmp ax, dx 6199 00009879 EB03 jmp short m3 ; and decide whether to move up or down --> 6200 6201 .pmsimple: 6202 0000987B 66 _386_o32 ; cmp esi, edi 6203 0000987C 39FE cmp si, di 6204 %else 6205 mov dx, di 6206 mov bx, es 6207 mov cl, 4 6208 shr dx, cl 6209 add dx, bx ; upper 16 bits of destination 6210 mov ax, si 6211 shr ax, cl 6212 mov bx, ds 6213 add ax, bx 6214 cmp ax, dx 6215 jne m3 ; if we know which is larger 6216 mov ax, si 6217 and al, 0Fh 6218 mov bx, di 6219 and bl, 0Fh 6220 cmp al, bl 6221 %endif 6222 0000987E 59 m3: pop cx 6223 0000987F 9F lahf 6224 00009880 1E push ds 6225 00009881 06 push es 6226 00009882 16 push ss ; ds := cs 6227 00009883 1F pop ds 6228 00009884 E83310 call dohack ; do the interrupt pointer hack 6229 00009887 07 pop es 6230 00009888 1F pop ds 6231 00009889 9E sahf 6232 0000988A 7315 jae .forward ; if forward copy is OK 6233 0000988C 66 _386_PM_o32 6234 0000988D 01CE add si, cx 6235 0000988F 66 _386_PM_o32 6236 00009890 01CF add di, cx ; point both behind data 6237 00009892 FD std ; _AMD_ERRATUM_109_WORKAROUND as below 6238 6239 6240 numdef AMD_ERRATUM_109_WORKAROUND, 1 6241 ; Refer to comment in init.asm init_movp. 6242 6243 %if _AMD_ERRATUM_109_WORKAROUND 6244 00009893 67 _386_PM_a32 6245 00009894 E30B jcxz @FF 6246 00009896 66 _386_PM_o32 6247 00009897 83F914 cmp cx, strict byte 20 6248 0000989A 7705 ja @FF 6249 @@: 6250 0000989C 67 _386_PM_a32 6251 0000989D A4 movsb 6252 0000989E 67 _386_PM_a32 6253 0000989F E2FB loop @B 6254 @@: 6255 %endif 6256 .forward: 6257 000098A1 67 _386_PM_a32 6258 000098A2 F3A4 rep movsb ; do the move 6259 000098A4 67 _386_PM_a32 6260 000098A5 A4 movsb ; one more byte (length of zero means 64 KiB. or 4 GiB..) 6261 .was32: 6262 000098A6 FC cld ; restore flag 6263 000098A7 E9C2F5 jmp ee0a ; restore segments and undo the interrupt pointer hack 6264 6265 6266 ; Other M command: set machine type. 6267 ; 6268 ; INP: dx -> numeric input (expression 0..6, C, C0, C2, C3) 6269 ; or dx -> EOL 6270 ; word [ss:sp] = to discard 6271 mc: 6272 000098AA 89D6 mov si, dx 6273 000098AC 5A pop dx ; discard 6274 000098AD 4E dec si 6275 000098AE E82023 call skipwhite ; reload 6276 000098B1 E8C822 call iseol? 6277 000098B4 7460 je mquery ; if just an M or M? (query machine type) --> 6278 000098B6 E8B021 call getbyte ; get numeric input 6279 000098B9 E8D522 call chkeol ; insure valid 6280 000098BC 92 xchg ax, dx 6281 000098BD 3C06 cmp al, 6 6282 000098BF 7725 ja mc_fpu 6283 6284 mc_cpu: 6285 000098C1 A2[EE0A] mov byte [machine], al ; set machine type 6286 000098C4 A2[F00A] mov byte [mach_87], al ; coprocessor type, too 6287 6288 mc_encode: 6289 000098C7 803E[EF0A]00 cmp byte [has_87], 0 6290 000098CC B0C0 mov al, 0C0h 6291 000098CE 7412 je .done 6292 000098D0 803E[EE0A]03 cmp byte [machine], 3 6293 000098D5 B00C mov al, 0Ch 6294 000098D7 7509 jne .done 6295 000098D9 803E[F00A]02 cmp byte [mach_87], 2 6296 000098DE 7502 jne .done 6297 000098E0 B0C2 mov al, 0C2h 6298 .done: 6299 000098E2 A2[F10A] mov byte [encodedmach87], al 6300 000098E5 C3 retn 6301 6302 mc_fpu: 6303 000098E6 8A26[EE0A] mov ah, byte [machine] 6304 000098EA 3C0C cmp al, 0Ch ; MC command ? 6305 000098EC 741D je mcc_ah 6306 000098EE 3CC0 cmp al, 0C0h ; MC0 command or MNC command ? 6307 000098F0 7410 je mnc 6308 000098F2 80FC03 cmp ah, 3 ; MC2 or MC3 only valid for machine 386 6309 000098F5 7508 jne .error 6310 000098F7 3CC2 cmp al, 0C2h ; MC2 command ? 6311 000098F9 740E je mcc_2 6312 000098FB 3CC3 cmp al, 0C3h ; MC3 command ? 6313 000098FD 740C je mcc_3 ; (ah = 3) 6314 .error: ; invalid input 6315 000098FF E9480E jmp error 6316 6317 mnc: 6318 00009902 C606[EF0A]00 mov byte [has_87], 0 ; clear coprocessor flag 6319 00009907 EBBE jmp mc_encode ; done 6320 6321 mcc_2: 6322 00009909 B402 mov ah, 2 ; set type to 287 6323 mcc_3: ; (if jumping here ah = 3) set type to 387 6324 mcc_ah: 6325 0000990B C606[EF0A]01 mov byte [has_87], 1 ; set coprocessor flag 6326 00009910 8826[F00A] mov byte [mach_87], ah ; set coprocessor type 6327 00009914 EBB1 jmp mc_encode ; done 6328 6329 6330 ; Display machine type. 6331 mquery: 6332 00009916 BE[C77B] mov si, msg8088 6333 00009919 A0[EE0A] mov al, byte [machine] 6334 0000991C 3C00 cmp al, 0 6335 0000991E 7407 je .88or86 ; if 8088 6336 00009920 BE[CF7B] mov si, msgx86 6337 00009923 0430 add al, '0' 6338 00009925 8804 mov byte [si], al 6339 .88or86: 6340 00009927 E8B322 call showstring 6341 0000992A BE[D37B] mov si, no_copr 6342 0000992D 803E[EF0A]00 cmp byte [has_87], 0 6343 00009932 740F je .m12 ; if no coprocessor 6344 00009934 BE[E87B] mov si, has_copr 6345 00009937 A0[F00A] mov al, byte [mach_87] 6346 0000993A 3A06[EE0A] cmp al, byte [machine] 6347 0000993E 7403 je .m12 ; if has coprocessor same as processor 6348 00009940 BE[FA7B] mov si, has_287 6349 .m12: 6350 00009943 E89722 call showstring ; show string 6351 00009946 E96B23 jmp putsline_crlf ; call puts and quit 6352 6353 6354 ; N command - change the name of the program being debugged. 6355 nn: 6356 00009949 16 push ss 6357 0000994A 07 pop es 6358 %if _BOOTLDR 6359 0000994B 36F606[9D00]40 testopt [ss:internalflags], nodosloaded 6360 00009951 7406 jz @F 6361 00009953 BA[3C60] mov dx, msg.nobootsupp 6362 00009956 E9DA26 jmp putsz 6363 @@: 6364 %endif 6365 00009959 BF8000 mov di, DTA ; destination address 6366 6367 ; Copy and canonicalize file name. 6368 nn1: 6369 0000995C 81FF[4A00] cmp di, N_BUFFER_END 6370 00009960 7313 jae .toolong 6371 00009962 E83D01 call ifsep ; check for separators CR, blank, tab, comma, ;, = 6372 00009965 7428 je nn3 ; if end of file name 6373 00009967 363A06[F60A] cmp al, byte [ss:swch1] 6374 ; The use of ss here appears to be intended to 6375 ; allow loading from ds different from the 6376 ; data entry and PSP segment, However, the 6377 ; subsequent copy of the command tail around 6378 ; nn4 does not participate in this scheme. 6379 ; So if this is used make sure to adjust that. 6380 0000996C 7421 je nn3 ; if '/' (and '/' is the switch character) 6381 0000996E E8AAF4 call uppercase 6382 00009971 AA stosb 6383 00009972 AC lodsb 6384 00009973 EBE7 jmp short nn1 ; back for more 6385 6386 .toolong: 6387 nn4.toolong: 6388 00009975 16 push ss 6389 00009976 1F pop ds 6390 00009977 BA[2966] mov dx, msg.n_toolongname 6391 0000997A E8B626 call putsz 6392 0000997D BF[4700] mov di, N_BUFFER_END - 3 6393 00009980 B000 mov al, 0 ; truncate the name 6394 00009982 AA stosb 6395 00009983 A2[E80B] mov byte [fileext], al ; invalid / none 6396 00009986 893E[5A0C] mov word [execblk+2], di 6397 0000998A B8000D mov ax, 13 << 8 ; 0 in low byte (tail length), CR in high byte 6398 0000998D AB stosw 6399 0000998E C3 retn 6400 6401 6402 nn3: 6403 0000998F 16 push ss 6404 00009990 1F pop ds 6405 00009991 B000 mov al, 0 ; null terminate the file name string 6406 00009993 AA stosb 6407 00009994 893E[5A0C] mov word [execblk+2], di; save start of command tail 6408 6409 %if _DEBUG4 6410 push dx 6411 mov dx, DTA 6412 call d4disp_msg 6413 mov dx, crlf 6414 call d4disp_msg 6415 pop dx 6416 %endif 6417 ; Determine file extension 6418 00009998 81FF8100 cmp di, DTA+1 6419 0000999C 7438 je nn3d ; if no file name at all 6420 0000999E 81FF8500 cmp di, DTA+5 6421 000099A2 7230 jb nn3c ; if no extension (name too short) 6422 000099A4 B008 mov al, EXT_HEX 6423 000099A6 817DFB2E48 cmp word [di-5], ".H" 6424 000099AB 7507 jne nn3a ; if not .HEX 6425 000099AD 817DFD4558 cmp word [di-3], "EX" 6426 000099B2 7422 je nn3d ; if .HEX 6427 nn3a: 6428 000099B4 B004 mov al, EXT_EXE 6429 000099B6 817DFB2E45 cmp word [di-5], ".E" 6430 000099BB 7507 jne nn3b ; if not .EXE 6431 000099BD 817DFD5845 cmp word [di-3], "XE" 6432 000099C2 7412 je nn3d ; if .EXE 6433 nn3b: 6434 000099C4 B002 mov al, EXT_COM 6435 000099C6 817DFB2E43 cmp word [di-5], ".C" 6436 000099CB 7507 jne nn3c ; if not .COM 6437 000099CD 817DFD4F4D cmp word [di-3], "OM" 6438 000099D2 7402 je nn3d ; if .COM 6439 nn3c: 6440 000099D4 B001 mov al, EXT_OTHER 6441 nn3d: 6442 000099D6 A2[E80B] mov byte [fileext], al 6443 6444 ; Finish the N command 6445 000099D9 57 push di 6446 000099DA BF[0E08] mov di, line_out 6447 000099DD 4E dec si 6448 nn4: 6449 000099DE AC lodsb ; copy the remainder to line_out 6450 000099DF AA stosb 6451 000099E0 E89D21 call iseol?.notsemicolon 6452 000099E3 75F9 jne nn4 6453 6454 000099E5 E8310F call InDos 6455 000099E8 7407 jz .fcb_setup 6456 000099EA 8326[700C]00 and word [reg_eax], 0 6457 000099EF EB15 jmp .fcb_none 6458 6459 .fcb_setup: 6460 ; Set up FCBs. 6461 000099F1 BE[0E08] mov si, line_out 6462 000099F4 BF5C00 mov di, 5Ch 6463 000099F7 E85100 call nn6 ; do first FCB 6464 000099FA A2[700C] mov byte [reg_eax], al 6465 000099FD BF6C00 mov di, 6Ch 6466 00009A00 E84800 call nn6 ; second FCB 6467 00009A03 A2[710C] mov byte [reg_eax+1], al 6468 .fcb_none: 6469 6470 ; Copy command tail. 6471 00009A06 BE[0E08] mov si, line_out 6472 00009A09 5F pop di 6473 00009A0A 81FF[4800] cmp di, N_BUFFER_END - 2 6474 00009A0E 7203E962FF jae .toolong 6475 00009A13 57 push di 6476 00009A14 47 inc di 6477 nn5: 6478 00009A15 AC lodsb 6479 00009A16 AA stosb 6480 00009A17 81FF[4A00] cmp di, N_BUFFER_END 6481 00009A1B 731F jae .toolong 6482 00009A1D E86021 call iseol?.notsemicolon 6483 00009A20 75F3 jne nn5 ; if not end of string 6484 ; test al, al 6485 ; jnz @B 6486 00009A22 C645FF0D mov byte [di - 1], 13 ; (just overwrite this unconditionally) 6487 ; @@: ; jump destination from above if al == 13 6488 @@: ; jump destination from .toolong 6489 00009A26 57 push di 6490 00009A27 89F9 mov cx, di 6491 00009A29 81E9[4A00] sub cx, N_BUFFER_END 6492 00009A2D F7D9 neg cx 6493 00009A2F 31C0 xor ax, ax 6494 00009A31 F3AA rep stosb 6495 00009A33 5F pop di 6496 00009A34 58 pop ax ; recover old DI 6497 00009A35 97 xchg ax, di 6498 00009A36 29F8 sub ax, di ; compute length of tail 6499 00009A38 48 dec ax 6500 00009A39 48 dec ax 6501 00009A3A AA stosb 6502 %if _DEBUG4 6503 mov dx, DTA 6504 call d4disp_msg 6505 mov dx, crlf 6506 call d4disp_msg 6507 %endif 6508 00009A3B C3 retn ; done 6509 6510 .toolong: 6511 00009A3C BA[0E66] mov dx, msg.n_toolongtail 6512 00009A3F E8F125 call putsz 6513 00009A42 BF[4A00] mov di, N_BUFFER_END 6514 00009A45 C645FF0D mov byte [di - 1], 13 6515 00009A49 EBDB jmp @B 6516 6517 6518 ; Subroutine to process an FCB. 6519 ; 6520 ; INP: di -> FCB 6521 ; si -> input 6522 nn6: 6523 00009A4B AC lodsb 6524 00009A4C E83121 call iseol?.notsemicolon 6525 00009A4F 740B je nn7 ; if end 6526 00009A51 E84E00 call ifsep 6527 00009A54 74F5 je nn6 ; if separator (other than CR) 6528 00009A56 3A06[F50A] cmp al, byte [switchar] 6529 00009A5A 741C je nn10 ; if switch character 6530 nn7: 6531 00009A5C 4E dec si 6532 00009A5D B80129 mov ax, 2901h ; parse filename 6533 doscall 2160 00009A60 E80FC5 <1> call _doscall 6534 00009A63 50 push ax ; save AL 6535 nn8: 6536 00009A64 AC lodsb ; skip till separator 6537 00009A65 E83A00 call ifsep 6538 00009A68 7406 je nn9 ; if separator character (including CR) 6539 00009A6A 3A06[F60A] cmp al, byte [swch1] 6540 00009A6E 75F4 jne nn8 ; if not switchar (sort of) 6541 nn9: 6542 00009A70 4E dec si 6543 00009A71 58 pop ax ; recover AL 6544 00009A72 3C01 cmp al, 1 6545 00009A74 7501 jne nn9a ; if not 1 6546 00009A76 48 dec ax 6547 nn9a: 6548 00009A77 C3 retn 6549 6550 ; Handle a switch (differently). 6551 00009A78 AC nn10: lodsb 6552 00009A79 E80421 call iseol?.notsemicolon 6553 00009A7C 74DE je nn7 ; if end of string 6554 00009A7E E82100 call ifsep 6555 00009A81 74F5 je nn10 ; if another separator (other than CR) 6556 00009A83 B000 mov al, 0 6557 00009A85 AA stosb 6558 00009A86 4E dec si 6559 00009A87 AC lodsb 6560 00009A88 3C61 cmp al, 'a' 6561 00009A8A 7206 jb nn11 ; if not a lower case letter 6562 00009A8C 3C7A cmp al, 'z' 6563 00009A8E 7702 ja nn11 6564 00009A90 24DF and al, TOUPPER ; convert to upper case 6565 00009A92 AA nn11: stosb 6566 00009A93 B82020 mov ax, 32<<8|32 6567 00009A96 AB stosw 6568 00009A97 AB stosw 6569 00009A98 AB stosw 6570 00009A99 AB stosw 6571 00009A9A AB stosw 6572 00009A9B 31C0 xor ax, ax 6573 00009A9D AB stosw 6574 00009A9E AB stosw 6575 00009A9F AB stosw 6576 00009AA0 AB stosw 6577 00009AA1 C3 retn ; return with al = 0 6578 6579 6580 ; Compare character with separators 6581 ; 6582 ; INP: al = character 6583 ; OUT: ZR if al is CR, NUL, blank, tab, comma, semicolon, or equal sign 6584 ; NZ else 6585 ; REM: This is only used for parsing FCBs. 6586 ifsep: 6587 00009AA2 E8D720 call iseol? ; semicolon or CR or NUL 6588 00009AA5 740E je .return 6589 00009AA7 3C20 cmp al, 32 6590 00009AA9 740A je .return 6591 00009AAB 3C09 cmp al, 9 6592 00009AAD 7406 je .return 6593 00009AAF 3C2C cmp al, ',' 6594 00009AB1 7402 je .return 6595 00009AB3 3C3D cmp al, '=' 6596 .return: 6597 00009AB5 C3 retn 6598 6599 6600 ; Ensure segment in bx is writeable 6601 ; 6602 ; INP: bx = selector/segment 6603 ; OUT: NC if in 86M, bx unchanged 6604 ; NC if in PM and bx not a code segment, bx unchanged 6605 ; NC if in PM and was a code segment, 6606 ; bx = word [scratchsel], set up to mirror INP:bx selector 6607 ; CY if in PM and a failure occurred, segment not writeable 6608 ; CHG: bx 6609 ; STT: (if in PM) es = ss = debugger data selector 6610 %if _PM 6611 verifysegm: 6612 00009AB6 E81CF9 call ispm 6613 00009AB9 7533 jnz .rm ; (NC) 6614 00009ABB 50 push ax 6615 00009ABC 66 _386_o32 ; push edi 6616 00009ABD 57 push di 6617 00009ABE 55 push bp 6618 00009ABF 89E5 mov bp, sp 6619 00009AC1 83EC08 sub sp, 8 6620 00009AC4 89E7 mov di, sp 6621 00009AC6 660FB7FF _386 movzx edi, di 6622 00009ACA B80B00 mov ax, 000Bh ; get descriptor 6623 00009ACD CD31 int 31h 6624 00009ACF 7217 jc @F 6625 00009AD1 F6450508 test byte [di+5], 8 ; code segment ? 6626 00009AD5 7411 jz @F ; (NC) no --> 6627 00009AD7 806505F3 and byte [di+5], 0F3h ; reset CODE+conforming attr 6628 00009ADB 804D0502 or byte [di+5], 2 ; set writable 6629 00009ADF 8B1E[088B] mov bx, word [scratchsel] 6630 00009AE3 B80C00 mov ax, 000Ch 6631 00009AE6 CD31 int 31h 6632 @@: 6633 00009AE8 89EC mov sp, bp 6634 00009AEA 5D pop bp 6635 00009AEB 66 _386_o32 ; pop edi 6636 00009AEC 5F pop di 6637 00009AED 58 pop ax 6638 .rm: 6639 00009AEE C3 retn 6640 6641 subcpu 286 6642 ; INP: dx = 86 Mode segment to access 6643 ; OUT: bx = scratch selector, addressing that segment 6644 ; CHG: - 6645 ; STT: ss = lDEBUG_DATA_ENTRY selector, in PM 6646 setrmsegm: 6647 00009AEF 368B1E[088B] mov bx, word [ss:scratchsel] 6648 setrmaddr: ;<--- set selector in BX to segment address in DX 6649 .: 6650 00009AF4 52 push dx 6651 00009AF5 50 push ax 6652 00009AF6 51 push cx 6653 00009AF7 89D1 mov cx, dx 6654 00009AF9 C1E204 shl dx, 4 6655 00009AFC C1E90C shr cx, 12 6656 00009AFF B80700 mov ax, 7 6657 00009B02 CD31 int 31h 6658 00009B04 59 pop cx 6659 00009B05 58 pop ax 6660 00009B06 5A pop dx 6661 00009B07 C3 retn 6662 6663 subcpureset 6664 %endif 6665 6666 ; Read a byte relative to cs:eip 6667 ; 6668 ; INP: reg_cs, reg_eip 6669 ; cx = (signed) eip adjustment 6670 ; OUT: al = byte at that address 6671 ; (e)bx = new offset (eip+adjustment) 6672 ; CHG: - 6673 getcseipbyte: 6674 00009B08 06 push es 6675 %if _PM 6676 00009B09 8B1E[9C0C] mov bx, word [reg_cs] 6677 00009B0D 8EC3 mov es, bx 6678 00009B0F E82DC4 call test_d_b_bit 6679 00009B12 7416 jz .16 6680 [cpu 386] 6681 00009B14 668B1E[A80C] mov ebx, dword [reg_eip] 6682 00009B19 6652 push edx 6683 00009B1B 660FBFD1 movsx edx, cx 6684 00009B1F 6601D3 add ebx, edx 6685 00009B22 26678A03 mov al, byte [es:ebx] 6686 00009B26 665A pop edx 6687 00009B28 07 pop es 6688 00009B29 C3 retn 6689 __CPU__ 6690 .16: 6691 %else 6692 mov es, word [reg_cs] 6693 %endif 6694 00009B2A 8B1E[A80C] mov bx, word [reg_eip] 6695 00009B2E 01CB add bx, cx 6696 00009B30 268A07 mov al, byte [es:bx] 6697 00009B33 07 pop es 6698 00009B34 C3 retn 6699 6700 ; Write to a byte relative to cs:eip 6701 ; 6702 ; INP: reg_cs, reg_eip 6703 ; cx = (signed) eip adjustment 6704 ; OUT: al = byte at that address 6705 ; CHG: (e)bx 6706 setcseipbyte: 6707 00009B35 06 push es 6708 %if _PM 6709 00009B36 8B1E[9C0C] mov bx, word [reg_cs] 6710 00009B3A E879FF call verifysegm 6711 00009B3D 7224 jc .ret 6712 00009B3F 8EC3 mov es, bx 6713 00009B41 E8FBC3 call test_d_b_bit 6714 00009B44 7414 jz .16 6715 [cpu 386] 6716 00009B46 668B1E[A80C] mov ebx, dword [reg_eip] 6717 00009B4B 6652 push edx 6718 00009B4D 660FBFD1 movsx edx, cx 6719 00009B51 2667880413 mov byte [es:ebx+edx],al 6720 00009B56 665A pop edx 6721 00009B58 07 pop es 6722 00009B59 C3 retn 6723 __CPU__ 6724 .16: 6725 %else 6726 mov es, word [reg_cs] 6727 %endif 6728 00009B5A 8B1E[A80C] mov bx, word [reg_eip] 6729 00009B5E 01CB add bx, cx 6730 00009B60 268807 mov byte [es:bx], al 6731 .ret: 6732 00009B63 07 pop es 6733 00009B64 C3 retn 6734 6735 ; Exchange byte with memory 6736 ; 6737 ; INP: bx:(e)dx-> destination byte 6738 ; al = source byte 6739 ; OUT: CY if failed due to segment not writable 6740 ; NC if successful, 6741 ; al = previous value of destination byte 6742 ; CHG: ah 6743 writemem: 6744 %if _DEBUG1 6745 push dx 6746 push ax 6747 6748 call getlinear.do_not_use_test 6749 jc @F ; already an error ? then return --> (CY) 6750 push bx 6751 push cx 6752 mov bx, test_records_Writemem 6753 call handle_test_case_multiple_16 6754 ; check whether this should testcase the error 6755 ; CY to indicate error from this call 6756 pop cx 6757 pop bx 6758 @@: 6759 pop ax 6760 pop dx 6761 jnc .do_not_use_test 6762 retn ; return CY here 6763 6764 %endif 6765 .do_not_use_test: 6766 6767 00009B65 88C4 mov ah, al 6768 %if _PM 6769 00009B67 E86BF8 call ispm 6770 00009B6A 7516 jnz .16 ; (NC from ispm) --> 6771 00009B6C E847FF call verifysegm ; make bx a writeable segment 6772 00009B6F 7220 jc .ret 6773 00009B71 E8CBC3 call test_d_b_bit 6774 00009B74 740C jz .16 ; (NC from test_d_b_bit) --> 6775 [cpu 386] 6776 00009B76 1E push ds 6777 00009B77 8EDB mov ds, bx 6778 00009B79 678602 xchg al, byte [edx] 6779 00009B7C 673A22 cmp ah, byte [edx] 6780 00009B7F 1F pop ds 6781 __CPU__ 6782 00009B80 EB0C jmp short .cmp 6783 .16: 6784 %endif 6785 00009B82 1E push ds 6786 00009B83 8EDB mov ds, bx 6787 00009B85 53 push bx 6788 00009B86 89D3 mov bx, dx 6789 00009B88 8607 xchg al, byte [bx] 6790 00009B8A 3A27 cmp ah, byte [bx] 6791 00009B8C 5B pop bx 6792 00009B8D 1F pop ds 6793 .cmp: 6794 00009B8E 7401 je .ret ; (NC) 6795 00009B90 F9 stc ; Failed to compare (i.e. memory wasn't our byte after writing). 6796 ; This check catches ROM that will silently fail to write. 6797 .ret: 6798 00009B91 C3 retn 6799 6800 6801 ;--- read byte at BX:EDX into AL 6802 6803 readmem: 6804 %if _DEBUG1 6805 push dx 6806 push ax 6807 6808 call getlinear.do_not_use_test 6809 jc @F ; already an error ? then return --> (CY) 6810 push bx 6811 push cx 6812 mov bx, test_records_Readmem 6813 call handle_test_case_multiple_16 6814 ; check whether this should testcase the error 6815 ; CY to indicate error from this call 6816 pop cx 6817 pop bx 6818 @@: 6819 pop ax 6820 pop dx 6821 jnc .do_not_use_test 6822 mov al, byte [test_readmem_value] 6823 ; return a most likely wrong value 6824 retn 6825 6826 %endif 6827 .do_not_use_test: 6828 6829 %if _PM 6830 00009B92 E8AAC3 call test_d_b_bit 6831 00009B95 7408 jz .16 6832 [cpu 386] 6833 00009B97 1E push ds 6834 00009B98 8EDB mov ds, bx 6835 00009B9A 678A02 mov al, byte [edx] 6836 00009B9D 1F pop ds 6837 00009B9E C3 retn 6838 __CPU__ 6839 .16: 6840 %endif 6841 00009B9F 1E push ds 6842 00009BA0 53 push bx 6843 00009BA1 8EDB mov ds, bx 6844 00009BA3 89D3 mov bx, dx 6845 00009BA5 8A07 mov al, byte [bx] 6846 00009BA7 5B pop bx 6847 00009BA8 1F pop ds 6848 00009BA9 C3 retn 6849 6850 6851 ; Q command - quit. 6852 qq: 6853 00009BAA E8CA69 call guard_re 6854 00009BAD C606[5892]00 mov byte [qq_b_mode], 0 6855 00009BB2 E866F2 call uppercase 6856 00009BB5 3C41 cmp al, 'A' 6857 00009BB7 740E je qq_a 6858 00009BB9 3C42 cmp al, 'B' 6859 00009BBB 7402 je qq_b 6860 00009BBD EB22 jmp qq_default 6861 6862 qq_b: 6863 00009BBF AC lodsb 6864 00009BC0 C606[5892]01 mov byte [qq_b_mode], 1 6865 00009BC5 EB1A jmp qq_default 6866 6867 usesection lDEBUG_DATA_ENTRY 6868 00009258 00 qq_b_mode: db 0 6869 usesection lDEBUG_CODE 6870 6871 qq_a: 6872 00009BC7 AC lodsb 6873 00009BC8 E8C61F call chkeol 6874 00009BCB E8CE0B call terminate_attached_process 6875 00009BCE BB[086E] mov bx, msg.qq_a_unterminated 6876 00009BD1 7403 jz .attached_unterminated 6877 00009BD3 BB[2D6E] mov bx, msg.qq_a_terminated 6878 .attached_unterminated: 6879 00009BD6 E8AFA1 call getrunint 6880 00009BD9 E85724 call putsz 6881 00009BDC 89DA mov dx, bx 6882 00009BDE E95224 jmp putsz 6883 6884 6885 qq_default: 6886 00009BE1 E8AD1F call chkeol 6887 %if _BOOTLDR 6888 ; Test whether we are in non-DOS mode, and were 6889 ; currently entered in protected mode. Since 6890 ; this will make the entire operation fail, 6891 ; it has to be checked for before modifying 6892 ; or releasing any of the resources. 6893 ; (Does this ever occur? No?) 6894 00009BE4 F606[9D00]40 testopt [internalflags], nodosloaded 6895 00009BE9 7418 jz .notpmnodos 6896 %if _PM 6897 00009BEB E8E7F7 call ispm 6898 %if _TSR ; same message, reuse code 6899 00009BEE 741F jz .cannotpmquit 6900 %else 6901 jnz .notpmnodos_nodos 6902 mov dx, msg.cannotpmquit 6903 jmp putsz 6904 %endif 6905 %endif 6906 .notpmnodos_nodos: 6907 00009BF0 E8663A call bootgetmemorysize ; dx => behind usable memory 6908 00009BF3 A1[3292] mov ax, word [ boot_new_memsizekib ] 6909 00009BF6 B106 mov cl, 6 6910 00009BF8 D3E0 shl ax, cl 6911 00009BFA 39D0 cmp ax, dx ; same? 6912 00009BFC 7405 je @F 6913 00009BFE BA[3465] mov dx, msg.cannotbootquit_memsizes 6914 00009C01 EB0F jmp .putsz 6915 %if !_TSR || !_PM 6916 .putsz equ putsz 6917 %endif 6918 6919 @@: 6920 .notpmnodos: 6921 %endif 6922 %if _PM 6923 %if _TSR 6924 ; Test whether we are in TSR mode, and were 6925 ; currently entered in protected mode. Since 6926 ; this will make the entire operation fail, 6927 ; it has to be checked for before modifying 6928 ; or releasing any of the resources. 6929 00009C03 F606[9E00]40 testopt [internalflags], tsrmode 6930 00009C08 740B jz .notpmtsr 6931 00009C0A E8C8F7 call ispm 6932 00009C0D 7506 jnz .notpmtsr 6933 6934 ; This isn't yet implemented. Broken down: 6935 ; * Uses terminate_attached_process which returns in real mode. 6936 ; * Exception vectors are implicitly restored/discarded by that. 6937 ; * (RM) Interrupt vectors are currently restored in real mode. Unnecessary. 6938 ; * The VDD is un-registered in real mode. Necessary? 6939 ; * Normal 21.4C is used to return to the real parent. 6940 ; * We have to discard our DOS process resources. Any DPMI TSR resources? 6941 ; * We must again gain control in debuggee's mode after discarding them. 6942 ; * We must return to the debuggee and seemlessly discard our memory. The 6943 ; stack trick possibly/probably does not work in protected mode. 6944 6945 .cannotpmquit: 6946 00009C0F BA[1460] mov dx, msg.cannotpmquit 6947 .putsz: 6948 00009C12 E91E24 jmp putsz 6949 6950 .notpmtsr: 6951 %endif 6952 6953 %if (nohook2F)&~0FF00h 6954 %fatal Internal flags re-ordered, adjust code here 6955 %endif 6956 00009C15 A1[9C00] mov ax, [internalflags] 6957 00009C18 B0A8 mov al, __TEST_IMM8 6958 00009C1A 8606[868B] xchg al, [dpmidisable] ; disable DPMI hook 6959 ; (SMC in section lDEBUG_DATA_ENTRY) 6960 00009C1E 50 push ax 6961 00009C1F 800E[9D00]02 setopt [internalflags], nohook2F ; avoid a new hook while terminating 6962 %endif 6963 6964 6965 qq_restore_interrupts_simulated: 6966 00009C24 31ED xor bp, bp 6967 %if _CATCHINT2D 6968 .2D: 6969 00009C26 F606[A800]08 testopt [internalflags4], dif4_int_2D_hooked 6970 00009C2B 741C jz .noint2D 6971 6972 00009C2D B02D mov al, 2Dh ; interrupt number 6973 00009C2F BE[7483] mov si, int2D ; -> IISP entry header 6974 00009C32 BA0800 mov dx, opt4_int_2D_force >> 16 6975 00009C35 E81339 call UnhookInterruptForceSim 6976 ; try unhooking it 6977 00009C38 16 push ss 6978 00009C39 07 pop es 6979 00009C3A 730D jnc .got2D 6980 6981 .not2D: 6982 00009C3C C706[A46C]3244 mov word [msg.serial_cannot_unhook.int], "2D" 6983 00009C42 BA[896C] mov dx, msg.serial_cannot_unhook.nowarn 6984 00009C45 E8EB23 call putsz 6985 00009C48 45 inc bp 6986 6987 .got2D: 6988 .noint2D: 6989 %endif 6990 6991 6992 %if _CATCHINT08 6993 .08: 6994 00009C49 F606[A800]04 testopt [internalflags4], dif4_int_08_hooked 6995 00009C4E 741C jz .noint08 6996 6997 00009C50 B008 mov al, 08h ; interrupt number 6998 00009C52 BE[8087] mov si, intr8 ; -> IISP entry header 6999 00009C55 BA0400 mov dx, opt4_int_08_force >> 16 7000 00009C58 E8F038 call UnhookInterruptForceSim 7001 ; try unhooking it 7002 00009C5B 16 push ss 7003 00009C5C 07 pop es 7004 00009C5D 730D jnc .got08 7005 7006 .not08: 7007 00009C5F C706[A46C]3038 mov word [msg.serial_cannot_unhook.int], "08" 7008 00009C65 BA[896C] mov dx, msg.serial_cannot_unhook.nowarn 7009 00009C68 E8C823 call putsz 7010 00009C6B 45 inc bp 7011 7012 .got08: 7013 .noint08: 7014 %endif 7015 7016 7017 .serial: 7018 00009C6C F606[A800]01 testopt [internalflags4], dif4_int_serial_hooked 7019 00009C71 7420 jz .done_serial 7020 00009C73 BE[D498] mov si, serial_interrupt_handler 7021 00009C76 A0[1E0C] mov al, byte [serial_installed_intnum] 7022 00009C79 BA0100 mov dx, opt4_int_serial_force >> 16 7023 00009C7C E8CC38 call UnhookInterruptForceSim 7024 00009C7F 16 push ss 7025 00009C80 07 pop es 7026 00009C81 7310 jnc .done_serial ; if it succeeded --> 7027 7028 00009C83 BF[A46C] mov di, msg.serial_cannot_unhook.int 7029 00009C86 A0[1E0C] mov al, byte [serial_installed_intnum] 7030 00009C89 E8F71F call hexbyte 7031 00009C8C BA[896C] mov dx, msg.serial_cannot_unhook.nowarn 7032 00009C8F E8A123 call putsz 7033 00009C92 45 inc bp 7034 7035 .done_serial: 7036 7037 %if _PM 7038 .2F: 7039 00009C93 F606[9D00]01 testopt [internalflags], hooked2F 7040 00009C98 741C jz .noint2F 7041 7042 00009C9A B02F mov al, 2Fh ; interrupt number 7043 00009C9C BE[708B] mov si, debug2F ; -> IISP entry header 7044 00009C9F BA0200 mov dx, opt4_int_2F_force >> 16 7045 00009CA2 E8A638 call UnhookInterruptForceSim 7046 ; try unhooking it 7047 00009CA5 16 push ss 7048 00009CA6 07 pop es 7049 00009CA7 730D jnc .got2F 7050 7051 .not2F: 7052 00009CA9 C706[A46C]3246 mov word [msg.serial_cannot_unhook.int], "2F" 7053 00009CAF BA[896C] mov dx, msg.serial_cannot_unhook.nowarn 7054 00009CB2 E87E23 call putsz 7055 00009CB5 45 inc bp 7056 7057 .got2F: 7058 .noint2F: 7059 %endif 7060 7061 7062 %if CATCHINTAMOUNT && ! _DEBUG 7063 ; Simulate to restore interrupt vectors. 7064 00009CB6 BE[3D0C] mov si, inttab 7065 00009CB9 BF[520C] mov di, intforcetab 7066 00009CBC B90600 mov cx, inttab_number 7067 00009CBF 31D2 xor dx, dx 7068 .nextintsim: 7069 00009CC1 AC lodsb 7070 00009CC2 93 xchg ax, bx ; bl = number 7071 00009CC3 AD lodsw ; si -> list 7072 00009CC4 96 xchg ax, si ; si -> entry, ax -> list 7073 00009CC5 93 xchg ax, bx ; al = number, bx -> list 7074 00009CC6 57 push di 7075 00009CC7 8A35 mov dh, byte [di] 7076 00009CC9 E87F38 call UnhookInterruptForceSim 7077 00009CCC 5F pop di 7078 00009CCD 16 push ss 7079 00009CCE 07 pop es 7080 00009CCF 730D jnc @F 7081 00009CD1 BF[A46C] mov di, msg.serial_cannot_unhook.int 7082 00009CD4 E8AC1F call hexbyte 7083 00009CD7 BA[896C] mov dx, msg.serial_cannot_unhook.nowarn 7084 00009CDA E85623 call putsz 7085 00009CDD 45 inc bp 7086 @@: 7087 00009CDE 47 inc di 7088 00009CDF 87DE xchg bx, si ; si -> list 7089 00009CE1 E2DE loop .nextintsim 7090 %endif 7091 7092 00009CE3 BA[7072] mov dx, msg.empty_message 7093 00009CE6 85ED test bp, bp 7094 00009CE8 7403E99E01 jnz qq_attached_unterminated.common 7095 7096 7097 qq_restore_interrupts: 7098 %if _CATCHINT2D 7099 .2D: 7100 00009CED F606[A800]08 testopt [internalflags4], dif4_int_2D_hooked 7101 00009CF2 741E jz .noint2D 7102 7103 00009CF4 B02D mov al, 2Dh ; interrupt number 7104 00009CF6 BE[7483] mov si, int2D ; -> IISP entry header 7105 00009CF9 BA0800 mov dx, opt4_int_2D_force >> 16 7106 00009CFC E81D38 call UnhookInterruptForce 7107 ; try unhooking it 7108 00009CFF 730C jnc .got2D 7109 7110 .not2D: 7111 00009D01 C706[A46C]3244 mov word [msg.serial_cannot_unhook.int], "2D" 7112 00009D07 BA[896C] mov dx, msg.serial_cannot_unhook.nowarn 7113 00009D0A E97E01 jmp qq_attached_unterminated.common 7114 7115 .got2D: 7116 00009D0D 8026[A800]F7 clropt [internalflags4], dif4_int_2D_hooked 7117 .noint2D: 7118 %endif 7119 7120 7121 %if _CATCHINT08 7122 .08: 7123 00009D12 F606[A800]04 testopt [internalflags4], dif4_int_08_hooked 7124 00009D17 7421 jz .noint08 7125 7126 00009D19 B008 mov al, 08h ; interrupt number 7127 00009D1B BE[8087] mov si, intr8 ; -> IISP entry header 7128 00009D1E BA0400 mov dx, opt4_int_08_force >> 16 7129 00009D21 E8F837 call UnhookInterruptForce 7130 ; try unhooking it 7131 00009D24 730C jnc .got08 7132 7133 .not08: 7134 00009D26 C706[A46C]3038 mov word [msg.serial_cannot_unhook.int], "08" 7135 00009D2C BA[896C] mov dx, msg.serial_cannot_unhook.nowarn 7136 00009D2F E95901 jmp qq_attached_unterminated.common 7137 7138 .got08: 7139 00009D32 8026[A800]FB clropt [internalflags4], dif4_int_08_hooked 7140 00009D37 E8EF38 call update_inttab_optional 7141 .noint08: 7142 %endif 7143 7144 7145 .serial: 7146 00009D3A F606[F70B]01 testopt [serial_flags], sf_init_done 7147 00009D3F 740D jz @F 7148 00009D41 E82935 call serial_clean_up ; unhook interrupt 7149 00009D44 8026[F70B]FE clropt [serial_flags], sf_init_done ; clear (in case return to cmd3) 7150 00009D49 8026[7D00]BF clropt [options], enable_serial ; do not output to serial any longer 7151 @@: 7152 00009D4E F606[A800]01 testopt [internalflags4], dif4_int_serial_hooked 7153 00009D53 7419 jz .done_serial 7154 00009D55 E86035 call serial_uninstall_interrupt_handler 7155 00009D58 7314 jnc .done_serial ; if it succeeded --> 7156 7157 00009D5A BF[A46C] mov di, msg.serial_cannot_unhook.int 7158 00009D5D A0[1E0C] mov al, byte [serial_installed_intnum] 7159 00009D60 E8201F call hexbyte 7160 00009D63 BA[896C] mov dx, msg.serial_cannot_unhook.nowarn 7161 00009D66 C606[DC98]00 mov byte [serial_interrupt_handler + ieEOI], 0 7162 ; we do not issue EOI any longer 7163 00009D6B E91D01 jmp qq_attached_unterminated.common 7164 7165 7166 .done_serial: 7167 7168 %if _PM 7169 .2F: 7170 00009D6E F606[9D00]01 testopt [internalflags], hooked2F 7171 00009D73 7426 jz .noint2F 7172 7173 00009D75 B02F mov al, 2Fh ; interrupt number 7174 00009D77 BE[708B] mov si, debug2F ; -> IISP entry header 7175 00009D7A BA0200 mov dx, opt4_int_2F_force >> 16 7176 00009D7D E89C37 call UnhookInterruptForce 7177 ; try unhooking it 7178 00009D80 730C jnc .got2F 7179 7180 .not2F: 7181 00009D82 C706[A46C]3246 mov word [msg.serial_cannot_unhook.int], "2F" 7182 00009D88 BA[896C] mov dx, msg.serial_cannot_unhook.nowarn 7183 00009D8B E9FD00 jmp qq_attached_unterminated.common 7184 7185 .got2F: 7186 00009D8E 8026[9D00]FE clropt [internalflags], hooked2F 7187 00009D93 8026[A800]FD clropt [internalflags4], dif4_int_2F_hooked 7188 00009D98 E88E38 call update_inttab_optional 7189 .noint2F: 7190 %endif 7191 7192 7193 %if _BOOTLDR 7194 00009D9B F606[9D00]40 testopt [internalflags], nodosloaded 7195 00009DA0 753D jnz .restoreints 7196 %endif 7197 7198 ; Cancel child's process if any. 7199 ; This will drop to real mode if debuggee is in protected mode. 7200 %if _TSR 7201 00009DA2 F606[9E00]40 testopt [internalflags], tsrmode 7202 00009DA7 7423 jz .terminate_attached 7203 7204 %if _PM 7205 00009DA9 E829F6 call ispm 7206 00009DAC 7414 jz @F ; in PM --> 7207 00009DAE F606[9E00]04 testopt [internalflags], canswitchmode 7208 00009DB3 7415 jz @FF ; in 86 Mode and cannot switch to PM --> 7209 7210 00009DB5 800E[9E00]08 setopt [internalflags], modeswitched ; set flag for resetmode 7211 00009DBA B000 mov al, 0 7212 00009DBC E8F09B call sr_state ; save state 7213 00009DBF E8B89B call switchmode ; switch to PM 7214 ; ! handle_mode_changed not called here ! 7215 ; do not call InDos or other functions using seg/sels 7216 @@: 7217 00009DC2 E81EA9 call pm_reset_handlers 7218 ; ! this calls resetmode 7219 7220 ; remember that we cannot access Protected Mode any longer 7221 00009DC5 8026[9E00]DB clropt [internalflags], canswitchmode | switchbuffer 7222 @@: 7223 %endif 7224 7225 00009DCA EB13 jmp .restoreints 7226 7227 .terminate_attached: 7228 %endif 7229 7230 00009DCC E8CD09 call terminate_attached_process 7231 00009DCF 7503E9B400 jz qq_attached_unterminated 7232 %if _PM 7233 00009DD4 E8FEF5 call ispm 7234 00009DD7 7506 jnz @F 7235 7236 00009DD9 BA[CA6D] mov dx, msg.qq_still_pm 7237 00009DDC E9AC00 jmp qq_attached_unterminated.common 7238 @@: 7239 %endif 7240 7241 .restoreints: 7242 %if CATCHINTAMOUNT && ! _DEBUG 7243 ; Restore interrupt vectors. 7244 00009DDF BE[3D0C] mov si, inttab 7245 00009DE2 BF[520C] mov di, intforcetab 7246 00009DE5 B90600 mov cx, inttab_number 7247 00009DE8 31D2 xor dx, dx 7248 .nextint: 7249 00009DEA AC lodsb 7250 00009DEB 93 xchg ax, bx ; bl = number 7251 00009DEC AD lodsw ; si -> list 7252 00009DED 96 xchg ax, si ; si -> entry, ax -> list 7253 00009DEE 93 xchg ax, bx ; al = number, bx -> list 7254 00009DEF 57 push di 7255 00009DF0 8A35 mov dh, byte [di] 7256 00009DF2 E82737 call UnhookInterruptForce 7257 00009DF5 5F pop di 7258 00009DF6 47 inc di 7259 00009DF7 87DE xchg bx, si ; si -> list 7260 00009DF9 E2EF loop .nextint 7261 %endif 7262 7263 7264 %if _PM 7265 00009DFB 58 pop ax ; (discard) 7266 %endif 7267 7268 7269 qqlate: 7270 ; Release the registered VDD. 7271 %if _VDD 7272 00009DFC F606[9C00]04 testopt [internalflags], ntpacket 7273 00009E01 7408 jz .novdd 7274 00009E03 A1[C40A] mov ax, word [hVdd] 7275 00009E06 C4C4580190 UnRegisterModule 7276 .novdd: 7277 %endif 7278 7279 ; Restore termination address. 7280 %if _BOOTLDR 7281 00009E0B F606[9D00]40 testopt [internalflags], nodosloaded 7282 00009E10 7403E99A00 jnz .bootterminate ; terminate --> 7283 %endif 7284 %if _TSR 7285 00009E15 F606[9E00]40 testopt [internalflags], tsrmode 7286 00009E1A 744C jz .nontsrterminate 7287 00009E1C 31F6 xor si, si 7288 00009E1E E83A67 call guard_auxbuff 7289 00009E21 8E06[FA09] mov es, word [auxbuff_segorsel] 7290 00009E25 31FF xor di, di 7291 00009E27 31C0 xor ax, ax 7292 00009E29 B90800 mov cx, 8 7293 00009E2C F3AB rep stosw ; 10h MCB bytes 7294 00009E2E B94000 mov cx, 40h 7295 00009E31 F3A5 rep movsw ; 80h PSP bytes 7296 00009E33 8CC0 mov ax, es 7297 00009E35 40 inc ax 7298 00009E36 26A30100 mov word [es:1], ax ; fake MCB 7299 00009E3A 1E push ds 7300 00009E3B 8ED8 mov ds, ax 7301 00009E3D C70634001800 mov word [34h], 18h 7302 00009E43 A33600 mov word [36h], ax ; insure default PHT and fix segment 7303 00009E46 C70632000100 mov word [32h], 1 ; only one PHT entry (zero might crash) 7304 00009E4C C6061800FF mov byte [18h], -1 ; PHT entry is closed 7305 00009E51 C7062C000000 mov word [2Ch], 0 ; PSP clear 7306 00009E57 E84700 call .setparent ; make it self-owned, just in case 7307 00009E5A 8CD3 mov bx, ss 7308 00009E5C 4B dec bx 7309 00009E5D 8EDB mov ds, bx ; => our (real) MCB 7310 00009E5F A30100 mov word [1], ax ; parent = fake PSP 7311 00009E62 1F pop ds 7312 00009E63 E83B00 call .setparent ; make the fake PSP our parent 7313 00009E66 EB1B jmp short terminate_00 ; see ya 7314 7315 .nontsrterminate: 7316 %endif 7317 00009E68 BE[D40A] mov si, psp22 ; restore termination address 7318 00009E6B BF0A00 mov di, TPIV 7319 00009E6E A5 movsw 7320 00009E6F A5 movsw 7321 00009E70 BF1600 mov di, 16h ; restore PSP of parent 7322 00009E73 A5 movsw 7323 ; Really done. 7324 7325 00009E74 F606[5892]01 testopt [qq_b_mode], 1 7326 00009E79 7401 jz @F 7327 00009E7B CC int3 7328 7329 @@: 7330 00009E7C B44C mov ah, 4Ch ; quit 7331 00009E7E A0[1D0C] mov al, byte [qqtermcode] 7332 ; return code 7333 00009E81 CD21 int 21h 7334 7335 7336 terminate_00: ; used by terminate_attached_process 7337 00009E83 B8004C mov ax, 4C00h ; quit 7338 00009E86 CD21 int 21h 7339 7340 7341 qq_attached_unterminated: 7342 00009E88 BA[986D] mov dx, msg.qq_unterm 7343 7344 .common: 7345 ; Restore state: 7346 %if _PM 7347 %if (nohook2F)&~0FF00h 7348 %fatal Internal flags re-ordered, adjust code here 7349 %endif 7350 00009E8B 58 pop ax 7351 00009E8C A2[868B] mov [dpmidisable], al ; (SMC in section lDEBUG_DATA_ENTRY) 7352 00009E8F 80E402 and ah, nohook2F>>8 7353 00009E92 8026[9D00]FD clropt [internalflags], nohook2F 7354 00009E97 0826[9D00] or [internalflags+1], ah 7355 %endif 7356 00009E9B E99521 jmp putsz 7357 7358 7359 usesection lDEBUG_DATA_ENTRY 7360 7361 %if _TSR 7362 qq.proceedtsrtermination: 7363 00009259 FA cli 7364 0000925A FC cld 7365 0000925B 8CC8 mov ax, cs 7366 0000925D 8ED8 mov ds, ax 7367 0000925F 8ED0 mov ss, ax 7368 00009261 BC[400C] mov sp, stack_end 7369 00009264 FB sti 7370 00009265 832E[800C]10 sub word [reg_esp], 2+4+((qq.tsrfreecode_size+1)&~1) 7371 0000926A 8B3E[800C] mov di, word [reg_esp] ; -> stack frame 7372 0000926E 8E06[980C] mov es, word [reg_ss] 7373 00009272 A1[900C] mov ax, word [reg_ds] 7374 00009275 AB stosw ; debuggee's ds 7375 00009276 A1[A80C] mov ax, word [reg_eip] 7376 00009279 AB stosw 7377 0000927A A1[9C0C] mov ax, word [reg_cs] 7378 0000927D AB stosw ; debuggee's cs:ip 7379 0000927E 06 push es 7380 0000927F 57 push di 7381 00009280 BE[A892] mov si, qq.tsrfreecode 7382 00009283 B90500 mov cx, ((qq.tsrfreecode_size+1)>>1) 7383 00009286 F3A5 rep movsw ; code on stack 7384 00009288 8CC8 mov ax, cs 7385 0000928A 48 dec ax 7386 0000928B A3[900C] mov word [reg_ds], ax ; = our MCB 7387 0000928E 8F06[A80C] pop word [reg_eip] 7388 00009292 8F06[9C0C] pop word [reg_cs] ; -> code on stack 7389 00009296 F606[8700]80 testopt [options3], opt3_tsr_quit_leave_tf 7390 0000929B 7505 jnz @F 7391 0000929D 8026[AD0C]FE clropt [reg_efl], 100h ; clear TF 7392 @@: 7393 7394 000092A2 E862F0 call entry_to_code_seg 7395 000092A5 [9E9E] dw .proceedtsrcode 7396 7397 7398 usesection lDEBUG_CODE 7399 7400 code_insure_low_byte_not_0CCh 7401 .proceedtsrcode: 7402 %if _DEBUG 7403 ; avoid hooking interrupts again: 7404 mov byte [cs:..@patch_tsr_quit_run], __JMP_REL16 7405 ; (SMC in section lDEBUG_CODE) 7406 %endif 7407 00009E9E E9D7A5 jmp run ; run this 7408 7409 7410 usesection lDEBUG_DATA_ENTRY 7411 7412 000092A7 00 align 2, db 0 7413 ; (Update: Explicitly clears TF now, except if the 7414 ; option opt3_tsr_quit_leave_tf is set. See above.) 7415 ; 7416 ; Note that since we are in control of debuggee's TF and 7417 ; reset it every time the debugger is entered, this code 7418 ; will not be entered with TF set. It might be entered 7419 ; with IF set and an interrupt might occur; the only harm 7420 ; done then is that the interrupt handler has less stack 7421 ; available. All flags must be preserved by this code. 7422 qq.tsrfreecode: 7423 000092A8 C70601000000 mov word [1], 0 ; free the MCB 7424 000092AE 1F pop ds ; restore debuggee's ds 7425 000092AF CA0A00 retf ((qq.tsrfreecode_size+1)&~1) ; jump 7426 qq.tsrfreecode_size: equ $-qq.tsrfreecode 7427 7428 7429 usesection lDEBUG_CODE 7430 7431 qqlate.setparent: 7432 00009EA1 A31600 mov word [16h], ax 7433 00009EA4 C7060A00[5992] mov word [0Ah], qq.proceedtsrtermination 7434 00009EAA 8C160C00 mov word [0Ah+2], ss 7435 00009EAE C3 retn 7436 %endif 7437 7438 %if _BOOTLDR 7439 qqlate.bootterminate: 7440 00009EAF 812E[800C]BC00 sub word [reg_esp], 2*8+4+((qq.bootfreecode_size+1)&~1) 7441 00009EB5 8B3E[800C] mov di, word [reg_esp] ; -> stack frame 7442 00009EB9 8E06[980C] mov es, word [reg_ss] 7443 00009EBD A1[900C] mov ax, word [reg_ds] 7444 00009EC0 AB stosw 7445 00009EC1 A1[940C] mov ax, word [reg_es] 7446 00009EC4 AB stosw 7447 00009EC5 A1[880C] mov ax, word [reg_esi] 7448 00009EC8 AB stosw 7449 00009EC9 A1[8C0C] mov ax, word [reg_edi] 7450 00009ECC AB stosw 7451 00009ECD A1[700C] mov ax, word [reg_eax] 7452 00009ED0 AB stosw 7453 00009ED1 A1[780C] mov ax, word [reg_ecx] 7454 00009ED4 AB stosw 7455 00009ED5 A1[740C] mov ax, word [reg_ebx] 7456 00009ED8 AB stosw 7457 00009ED9 A1[7C0C] mov ax, word [reg_edx] 7458 00009EDC AB stosw 7459 00009EDD A1[A80C] mov ax, word [reg_eip] 7460 00009EE0 AB stosw 7461 00009EE1 A1[9C0C] mov ax, word [reg_cs] 7462 00009EE4 AB stosw ; debuggee's cs:ip 7463 00009EE5 06 push es 7464 00009EE6 57 push di 7465 00009EE7 1E push ds 7466 00009EE8 0E push cs 7467 00009EE9 1F pop ds ; => lDEBUG_CODE 7468 00009EEA BE[529F] mov si, qq.bootfreecode 7469 00009EED B95400 mov cx, ((qq.bootfreecode_size+1)>>1) 7470 00009EF0 F3A5 rep movsw ; code on stack 7471 00009EF2 1F pop ds 7472 7473 00009EF3 16 push ss 7474 00009EF4 07 pop es 7475 7476 00009EF5 A1[3292] mov ax, word [ boot_new_memsizekib ] 7477 00009EF8 B106 mov cl, 6 7478 00009EFA D3E0 shl ax, cl ; ax => source of EBDA (new position) 7479 00009EFC 8B16[3492] mov dx, word [ boot_old_memsizekib ] 7480 00009F00 D3E2 shl dx, cl ; dx => destination of EBDA (old position) 7481 00009F02 31C9 xor cx, cx ; size of EBDA to move (if none) 7482 00009F04 1E push ds 7483 00009F05 8ED9 mov ds, cx 7484 00009F07 8B1E0E04 mov bx, word [40Eh] ; new ref in word [0:40Eh] (if none) 7485 00009F0B 1F pop ds 7486 00009F0C 803E[3692]00 cmp byte [ boot_ebdaflag ], 0 ; any EBDA ? 7487 00009F11 7412 jz .noebda 7488 7489 00009F13 1E push ds 7490 00009F14 8ED8 mov ds, ax ; => EBDA 7491 00009F16 31DB xor bx, bx 7492 00009F18 8A1E0000 mov bl, byte [ 0 ] ; EBDA size in KiB 7493 00009F1C B106 mov cl, 6 7494 00009F1E D3E3 shl bx, cl ; *64, to paragraphs 7495 00009F20 89D9 mov cx, bx ; = size of EBDA to move (in paragraphs) 7496 00009F22 89D3 mov bx, dx ; = new EBDA reference to put in word [0:40Eh] 7497 00009F24 1F pop ds 7498 7499 .noebda: 7500 00009F25 A3[700C] mov word [reg_eax], ax ; => relocated (new) EBDA position 7501 ; (in front of debugger image) 7502 00009F28 891E[740C] mov word [reg_ebx], bx ; = what to put in word [0:40Eh], 7503 ; unchanged content of that word if no EBDA 7504 00009F2C 890E[780C] mov word [reg_ecx], cx ; = EBDA size, 0 if no EBDA 7505 00009F30 8916[7C0C] mov word [reg_edx], dx ; = original (old) EBDA position 7506 ; = original mem size (in paras) 7507 ; (behind/in debugger image) 7508 00009F34 C706[900C]0000 mov word [reg_ds], 0 7509 7510 00009F3A 8F06[A80C] pop word [reg_eip] 7511 00009F3E 8F06[9C0C] pop word [reg_cs] ; -> code on stack 7512 00009F42 F606[8700]80 testopt [options3], opt3_tsr_quit_leave_tf 7513 00009F47 7505 jnz @F 7514 00009F49 8026[AD0C]FE clropt [reg_efl], 100h ; clear TF 7515 @@: 7516 ; call dumpregs 7517 %if _DEBUG 7518 ; avoid hooking interrupts again: 7519 mov byte [cs:..@patch_tsr_quit_run], __JMP_REL16 7520 ; (SMC in section lDEBUG_CODE) 7521 %endif 7522 ; jmp cmd3 7523 00009F4E E927A5 jmp run ; run this 7524 7525 7526 00009F51 00 align 2, db 0 7527 qq.bootfreecode: 7528 00009F52 9C pushf 7529 00009F53 E81800 call movp ; move EBDA back (if any) 7530 00009F56 891E0E04 mov word [40Eh], bx ; back relocate EBDA (if any) 7531 00009F5A B106 mov cl, 6 7532 00009F5C D3EA shr dx, cl ; = to KiB 7533 00009F5E 89161304 mov word [413h], dx ; back relocate mem size 7534 00009F62 9D popf 7535 00009F63 1F pop ds 7536 00009F64 07 pop es 7537 00009F65 5E pop si 7538 00009F66 5F pop di 7539 00009F67 58 pop ax 7540 00009F68 59 pop cx 7541 00009F69 5B pop bx 7542 00009F6A 5A pop dx 7543 00009F6B CAA800 retf ((qq.bootfreecode_size+1)&~1) 7544 7545 7546 ; Move paragraphs 7547 ; 7548 ; INP: ax:0-> source 7549 ; dx:0-> destination 7550 ; cx = number of paragraphs 7551 ; CHG: - 7552 ; Note: Doesn't work correctly on HMA; doesn't always wrap to LMA either. 7553 ; Do not provide a wrapped/HMA source or destination! 7554 movp: 7555 00009F6E 51 push cx 7556 00009F6F 1E push ds 7557 00009F70 56 push si 7558 00009F71 06 push es 7559 00009F72 57 push di 7560 7561 00009F73 39D0 cmp ax, dx ; source above destination ? 7562 00009F75 770A ja .up ; yes, move up (forwards) --> 7563 00009F77 747B je .return ; same, no need to move --> 7564 00009F79 50 push ax 7565 00009F7A 01C8 add ax, cx ; (expected not to carry) 7566 00009F7C 39D0 cmp ax, dx ; end of source is above destination ? 7567 00009F7E 58 pop ax 7568 00009F7F 7730 ja .down ; yes, move from top down --> 7569 ; Here, the end of source is below-or-equal the destination, 7570 ; so they do not overlap. In this case we prefer moving up. 7571 7572 .up: 7573 00009F81 50 push ax 7574 00009F82 52 push dx 7575 .uploop: 7576 00009F83 8ED8 mov ds, ax 7577 00009F85 8EC2 mov es, dx 7578 00009F87 31FF xor di, di 7579 00009F89 31F6 xor si, si ; -> start of segment 7580 00009F8B 81E90010 sub cx, 1000h ; 64 KiB left ? 7581 00009F8F 7610 jbe .uplast ; no --> 7582 00009F91 51 push cx 7583 00009F92 B90080 mov cx, 10000h /2 7584 00009F95 F3A5 rep movsw ; move 64 KiB 7585 00009F97 59 pop cx 7586 00009F98 050010 add ax, 1000h 7587 00009F9B 81C20010 add dx, 1000h ; -> next segment 7588 00009F9F EBE2 jmp short .uploop ; proceed for more --> 7589 .uplast: 7590 00009FA1 81C10010 add cx, 1000h ; restore counter 7591 00009FA5 D1E1 shl cx, 1 7592 00009FA7 D1E1 shl cx, 1 7593 00009FA9 D1E1 shl cx, 1 ; *8, paragraphs to words 7594 00009FAB F3A5 rep movsw ; move last part 7595 00009FAD 5A pop dx 7596 00009FAE 58 pop ax 7597 00009FAF EB43 jmp short .return 7598 7599 .down: 7600 00009FB1 FD std ; _AMD_ERRATUM_109_WORKAROUND as below 7601 .dnloop: 7602 00009FB2 81E90010 sub cx, 1000h ; 64 KiB left ? 7603 00009FB6 761A jbe .dnlast ; no --> 7604 00009FB8 50 push ax 7605 00009FB9 52 push dx 7606 00009FBA 01C8 add ax, cx 7607 00009FBC 01CA add dx, cx 7608 00009FBE 8ED8 mov ds, ax ; -> 64 KiB not yet moved 7609 00009FC0 8EC2 mov es, dx 7610 00009FC2 5A pop dx 7611 00009FC3 58 pop ax 7612 00009FC4 BFFEFF mov di, -2 7613 00009FC7 89FE mov si, di ; moved from last word down 7614 00009FC9 51 push cx 7615 00009FCA B90080 mov cx, 10000h /2 7616 00009FCD F3A5 rep movsw ; move 64 KiB 7617 00009FCF 59 pop cx 7618 00009FD0 EBE0 jmp short .dnloop ; proceed for more --> 7619 .dnlast: 7620 00009FD2 81C10010 add cx, 1000h ; restore counter 7621 00009FD6 D1E1 shl cx, 1 7622 00009FD8 D1E1 shl cx, 1 7623 00009FDA D1E1 shl cx, 1 ; *8, paragraphs to words 7624 00009FDC 89CF mov di, cx 7625 00009FDE 4F dec di 7626 00009FDF D1E7 shl di, 1 ; words to offset, -> last word 7627 00009FE1 89FE mov si, di 7628 00009FE3 8ED8 mov ds, ax 7629 00009FE5 8EC2 mov es, dx ; first segment correct 7630 7631 7632 numdef AMD_ERRATUM_109_WORKAROUND, 1 7633 ; Refer to comment in init.asm init_movp. 7634 7635 %if _AMD_ERRATUM_109_WORKAROUND 7636 00009FE7 E308 jcxz @FF 7637 00009FE9 83F914 cmp cx, 20 7638 00009FEC 7703 ja @FF 7639 @@: 7640 00009FEE A5 movsw 7641 00009FEF E2FD loop @B 7642 @@: 7643 %endif 7644 00009FF1 F3A5 rep movsw ; move first part 7645 00009FF3 FC cld 7646 .return: 7647 00009FF4 5F pop di 7648 00009FF5 07 pop es 7649 00009FF6 5E pop si 7650 00009FF7 1F pop ds 7651 00009FF8 59 pop cx 7652 00009FF9 C3 retn 7653 qq.bootfreecode_size: equ $-qq.bootfreecode 7654 %endif 7655 7656 7657 sleepcmd: 7658 00009FFA E8A51B call skipcomma 7659 00009FFD E87515 call getdword 7660 0000A000 53 push bx 7661 0000A001 52 push dx 7662 0000A002 E8CD1B call skipwh0 7663 0000A005 E8741B call iseol? 7664 0000A008 7421 je .seconds 7665 0000A00A 4E dec si 7666 0000A00B BA[116A] mov dx, msg.seconds 7667 0000A00E E80C1B call isstring? 7668 0000A011 7414 je .seconds_check_eol 7669 0000A013 BA[196A] mov dx, msg.ticks 7670 0000A016 E8041B call isstring? 7671 .error_NZ: 7672 0000A019 7403E92C07 jne error 7673 .ticks_check_eol: 7674 0000A01E AC lodsb 7675 0000A01F E86F1B call chkeol 7676 7677 0000A022 B80100 mov ax, 1 7678 0000A025 EB07 jmp .common 7679 7680 .seconds_check_eol: 7681 0000A027 AC lodsb 7682 0000A028 E8661B call chkeol 7683 .seconds: 7684 0000A02B B81200 mov ax, 18 7685 .common: 7686 0000A02E 5A pop dx 7687 0000A02F 50 push ax 7688 0000A030 F7E2 mul dx ; dx:ax = low word times multiplier 7689 0000A032 89D3 mov bx, dx 7690 0000A034 89C1 mov cx, ax ; bx:cx = low word times multiplier 7691 0000A036 58 pop ax 7692 0000A037 5A pop dx 7693 0000A038 F7E2 mul dx ; dx:ax = high word times multiplier 7694 0000A03A 01C3 add bx, ax 7695 0000A03C 83D200 adc dx, 0 ; dx:bx:cx = entire result 7696 0000A03F 75D8 jnz .error_NZ 7697 7698 0000A041 85C9 test cx, cx 7699 0000A043 7504 jnz @F 7700 0000A045 85DB test bx, bx 7701 0000A047 7436 jz .end 7702 @@: 7703 7704 0000A049 B84000 mov ax, 40h ; bimodal segment/selector 7705 0000A04C 8EC0 mov es, ax 7706 .loop_reset: 7707 0000A04E 268B166C00 mov dx, word [es:6Ch] 7708 .loop: 7709 0000A053 263B166C00 cmp dx, word [es:6Ch] 7710 0000A058 7519 jne .next 7711 0000A05A E815A1 call handle_serial_flags_ctrl_c 7712 0000A05D F606[8700]40 testopt [options3], opt3_check_ctrlc_0bh 7713 0000A062 750A jnz @F ; already called function 0Bh --> 7714 0000A064 E8B208 call InDos 7715 0000A067 7505 jnz @F 7716 0000A069 B40B mov ah, 0Bh 7717 doscall ; allow to break with Ctrl-C 2160 0000A06B E804BF <1> call _doscall 7718 @@: 7719 0000A06E E8ED22 call idle 7720 0000A071 EBE0 jmp .loop 7721 7722 .next: 7723 0000A073 83E901 sub cx, 1 7724 0000A076 83DB00 sbb bx, 0 7725 0000A079 75D3 jnz .loop_reset 7726 0000A07B E302 jcxz .end 7727 0000A07D EBCF jmp .loop_reset 7728 7729 .end: 7730 0000A07F C3 retn 7731 7732 7733 ; S command - search for a string of bytes. 7734 sss: 7735 0000A080 4E dec si 7736 0000A081 4E dec si ; -> at 'S' 7737 0000A082 BA[0B6A] mov dx, msg.sleep 7738 0000A085 E8951A call isstring? ; check for "SLEEP" 7739 0000A088 7503E96DFF je sleepcmd 7740 0000A08D 46 inc si ; skip 'S' 7741 0000A08E AC lodsb ; load next 7742 7743 0000A08F 8026[A700]7F clropt [internalflags3], dif3_sss_is_reverse 7744 7745 0000A094 8B1E[900C] mov bx, word [reg_ds] ; get search range 7746 0000A098 66 _386_PM_o32 ; xor ecx, ecx 7747 0000A099 31C9 xor cx, cx 7748 0000A09B E8FB09 call getrangeX ; get address range into BX:(E)DX..BX:(E)CX 7749 0000A09E E8021B call skipcomm0 7750 0000A0A1 66 _386_PM_o32 ; push edx 7751 0000A0A2 52 push dx 7752 0000A0A3 66 _386_PM_o32 ; push ecx 7753 0000A0A4 51 push cx 7754 0000A0A5 53 push bx 7755 7756 0000A0A6 BA[6768] mov dx, msg.reverse 7757 0000A0A9 4E dec si 7758 0000A0AA E8701A call isstring? 7759 0000A0AD 7509 jne @F 7760 7761 0000A0AF 800E[A700]80 setopt [internalflags3], dif3_sss_is_reverse 7762 0000A0B4 E81A1B call skipwhite 7763 0000A0B7 4E dec si 7764 @@: 7765 0000A0B8 BA[6168] mov dx, msg.range 7766 0000A0BB E85F1A call isstring? 7767 0000A0BE AC lodsb 7768 0000A0BF 7514 jne .notrange 7769 7770 0000A0C1 8B1E[900C] mov bx, word [reg_ds] ; get search range 7771 0000A0C5 31C9 xor cx, cx 7772 0000A0C7 E8CF09 call getrangeX ; try to get second range 7773 0000A0CA E8C41A call chkeol ; and insure end-of-line 7774 ; successful if it returned 7775 0000A0CD 66 _386_PM_o32 ; mov esi, edx 7776 0000A0CE 89D6 mov si, dx ; bx:esi-> source string 7777 0000A0D0 66 _386_PM_o32 ; sub ecx, edx 7778 0000A0D1 29D1 sub cx, dx ; ecx = count - 1 7779 0000A0D3 EB28 jmp short .setesedi 7780 7781 .notrange: 7782 0000A0D5 E81B0B call getstr ; get string of bytes 7783 0000A0D8 81EF[0E08] sub di, line_out ; di = number of bytes to look for 7784 0000A0DC 7503E96906 jz error 7785 0000A0E1 89F9 mov cx, di 7786 0000A0E3 4F dec di ; minus one 7787 0000A0E4 BE[0E08] mov si, line_out 7788 0000A0E7 57 push di 7789 0000A0E8 E87064 call guard_auxbuff 7790 0000A0EB 8E06[FA09] mov es, word [auxbuff_segorsel] 7791 0000A0EF 31FF xor di, di 7792 0000A0F1 F3A4 rep movsb ; move to auxbuff 7793 0000A0F3 66 _386_PM_o32 ; xor esi, esi 7794 0000A0F4 31F6 xor si, si 7795 0000A0F6 8CC3 mov bx, es ; bx:esi -> auxbuff 7796 0000A0F8 59 pop cx 7797 0000A0F9 660FB7C9 _386_PM movzx ecx, cx ; ecx = count - 1 7798 .setesedi: 7799 0000A0FD 16 push ss 7800 0000A0FE 07 pop es 7801 0000A0FF BF[780B] mov di, search_results 7802 0000A102 31C0 xor ax, ax 7803 0000A104 A3[D80B] mov word [sscounter], ax 7804 0000A107 A3[DA0B] mov word [sscounter + 2], ax 7805 0000A10A 51 push cx 7806 %if _PM 7807 0000A10B B93000 mov cx, (6 * 16) >> 1 7808 %else 7809 mov cx, (4 * 16) >> 1 7810 %endif 7811 0000A10E F3AB rep stosw 7812 0000A110 59 pop cx 7813 7814 0000A111 E87807 call prephack ; set up for the interrupt vector hack 7815 0000A114 E8A307 call dohack 7816 0000A117 8EDB mov ds, bx 7817 0000A119 07 pop es 7818 0000A11A E92501 _386_PM_jmpn .386init ; 386 --> 7819 .init: 7820 0000A11D 5B pop bx 7821 0000A11E 5A pop dx 7822 .init_popped: 7823 0000A11F 29D3 sub bx, dx ; bx = number of bytes in search range minus one 7824 0000A121 29CB sub bx, cx ; = number of possible positions of string minus 1 7825 0000A123 7303E92206 jb error 7826 0000A128 89D7 mov di, dx 7827 0000A12A 89CA mov dx, cx 7828 0000A12C 89D9 mov cx, bx 7829 7830 ; ds:si-> search string, length (dx+1) 7831 ; es:di-> data to search in, (cx+1) bytes 7832 0000A12E 36F606[A700]80 testopt [ss:internalflags3], dif3_sss_is_reverse 7833 0000A134 7516 jnz .reverse 7834 .loop: 7835 0000A136 0C01 or al, 1 ; NZ (iff cx==0, repne scasb doesn't change ZF) 7836 0000A138 56 push si 7837 0000A139 AC lodsb ; first character in al 7838 0000A13A F2AE repne scasb ; look for first byte 7839 0000A13C 7408 je .foundbyte 7840 0000A13E AE scasb ; count in cx was cnt-1 7841 0000A13F 7536 jne .done 7842 .found_last_byte: 7843 0000A141 E85600 call .handle_found_byte 7844 0000A144 EB31 jmp .done 7845 7846 .foundbyte: 7847 0000A146 E85100 call .handle_found_byte 7848 0000A149 5E pop si 7849 0000A14A EBEA jmp .loop ; cx = 0 if one to search, 7850 ; cx = 1 if two to search, etc 7851 7852 .reverse: 7853 0000A14C 01CF add di, cx ; -> last position to check 7854 .reverseloop: 7855 0000A14E 0C01 or al, 1 ; NZ (iff cx==0, repne scasb doesn't change ZF) 7856 0000A150 56 push si 7857 0000A151 AC lodsb ; first character in al 7858 0000A152 FD std ; no AMD erratum workaround needed 7859 0000A153 F2AE repne scasb ; look for first byte 7860 0000A155 7411 je .reversefoundbyte 7861 0000A157 AE scasb ; count in cx was cnt-1 7862 0000A158 751D jne .done 7863 .reversefound_last_byte: 7864 0000A15A FC cld 7865 0000A15B 83C702 add di, 2 7866 0000A15E 38C0 cmp al, al ; ZR for case if dx = 0 7867 0000A160 E83700 call .handle_found_byte 7868 0000A163 83EF02 sub di, 2 7869 0000A166 EB0F jmp .done 7870 7871 .reversefoundbyte: 7872 0000A168 FC cld 7873 0000A169 83C702 add di, 2 7874 0000A16C 38C0 cmp al, al ; ZR for case if dx = 0 7875 0000A16E E82900 call .handle_found_byte 7876 0000A171 83EF02 sub di, 2 7877 0000A174 5E pop si 7878 0000A175 EBD7 jmp .reverseloop ; cx = 0 if one to search, 7879 ; cx = 1 if two to search, etc 7880 7881 .done: 7882 0000A177 5E pop si ; discard 7883 .commondone: 7884 0000A178 FC cld 7885 0000A179 16 push ss 7886 0000A17A 1F pop ds 7887 0000A17B E87007 call unhack 7888 0000A17E BF[0E08] mov di, line_out 7889 7890 0000A181 A1[DA0B] mov ax, word [sscounter + 2] 7891 0000A184 85C0 test ax, ax 7892 0000A186 7403 jz .nohighcounter 7893 0000A188 E8F11A call hexword 7894 .nohighcounter: 7895 7896 0000A18B A1[D80B] mov ax, word [sscounter] 7897 0000A18E E8EB1A call hexword 7898 0000A191 E8241B call putsline 7899 0000A194 BA[8082] mov dx, msg.matches 7900 0000A197 E9991E jmp putsz 7901 7902 7903 ; INP: ZR 7904 .handle_found_byte: 7905 0000A19A 51 push cx 7906 0000A19B 57 push di 7907 0000A19C 89D1 mov cx, dx 7908 0000A19E F3A6 repe cmpsb ; compare string behind first byte 7909 ; If we're searching for a single-byte value then 7910 ; dx is equal to zero here. In that case cx gets 7911 ; the value zero and then repe cmpsb does not 7912 ; alter ZF, meaning it will stay ZR (as noted for 7913 ; the comment INP section). 7914 0000A1A0 5F pop di 7915 0000A1A1 7402 je .display ; if equal 7916 .next: 7917 0000A1A3 59 pop cx 7918 0000A1A4 C3 retn 7919 7920 .display: 7921 0000A1A5 8CC3 mov bx, es 7922 0000A1A7 57 push di 7923 0000A1A8 1E push ds 7924 0000A1A9 06 push es 7925 0000A1AA 16 push ss 7926 0000A1AB 1F pop ds 7927 0000A1AC E83F07 call unhack ; undo the interrupt vector hack and restore es 7928 0000A1AF 57 push di 7929 0000A1B0 833E[DA0B]00 cmp word [sscounter + 2], 0 7930 0000A1B5 751F jne @F 7931 0000A1B7 8B3E[D80B] mov di, word [sscounter] 7932 0000A1BB 83FF10 cmp di, 16 7933 0000A1BE 7316 jae @F 7934 %if _PM 7935 0000A1C0 01FF add di, di ; * 2 7936 0000A1C2 89F8 mov ax, di 7937 0000A1C4 01FF add di, di ; * 4 7938 0000A1C6 01C7 add di, ax ; * 4 + * 2 = * 6 7939 %else 7940 add di, di 7941 add di, di ; * 4 7942 %endif 7943 0000A1C8 81C7[780B] add di, search_results 7944 0000A1CC 58 pop ax 7945 0000A1CD 50 push ax 7946 0000A1CE 48 dec ax 7947 0000A1CF AB stosw 7948 %if _PM 7949 0000A1D0 31C0 xor ax, ax 7950 0000A1D2 AB stosw 7951 %endif 7952 0000A1D3 89D8 mov ax, bx 7953 0000A1D5 AB stosw 7954 7955 @@: 7956 0000A1D6 8306[D80B]01 add word [sscounter], 1 7957 0000A1DB 8316[DA0B]00 adc word [sscounter + 2], 0 7958 0000A1E0 89D8 mov ax, bx 7959 0000A1E2 BF[0E08] mov di, line_out 7960 0000A1E5 E8941A call hexword ; 4 (segment) 7961 0000A1E8 B03A mov al, ':' 7962 0000A1EA AA stosb ; +1=5 7963 0000A1EB 58 pop ax 7964 0000A1EC 48 dec ax 7965 0000A1ED E88C1A call hexword 7966 %if _SDUMP 7967 0000A1F0 F606[7E00]80 testopt [options], ss_no_dump 7968 0000A1F5 753D jnz @F 7969 0000A1F7 F9 stc 7970 0000A1F8 11D0 adc ax, dx ; -> behind result 7971 0000A1FA 7638 jbe .noresult ; end of segment 7972 0000A1FC 89C6 mov si, ax 7973 0000A1FE B82020 mov ax, 32<<8|32 7974 0000A201 AB stosw 7975 0000A202 8D5D30 lea bx, [di+3*16] 7976 0000A205 89F1 mov cx, si 7977 0000A207 F7D9 neg cx 7978 0000A209 83F910 cmp cx, byte 16 7979 0000A20C 7603 jbe .cxdone 7980 0000A20E B91000 mov cx, 16 7981 .cxdone: 7982 0000A211 1F pop ds 7983 0000A212 1E push ds ; restore search's segment 7984 0000A213 51 push cx 7985 .disploop: 7986 0000A214 AC lodsb 7987 0000A215 E80C74 call dd_store 7988 0000A218 B020 mov al, 32 7989 0000A21A AA stosb 7990 0000A21B E2F7 loop .disploop 7991 0000A21D 59 pop cx 7992 0000A21E 16 push ss 7993 0000A21F 1F pop ds 7994 0000A220 F7D9 neg cx 7995 0000A222 83C110 add cx, byte 16 7996 0000A225 7407 jz .noblanks 7997 .loopblanks: 7998 0000A227 B82020 mov ax, 32<<8|32 7999 0000A22A AB stosw 8000 0000A22B AA stosb 8001 0000A22C E2F9 loop .loopblanks 8002 .noblanks: 8003 0000A22E C645E72D mov byte [di-(1+(8*3))], '-' 8004 0000A232 89DF mov di, bx 8005 .noresult: 8006 @@: 8007 %endif ; _SDUMP 8008 0000A234 52 push dx 8009 0000A235 E87C1A call putsline_crlf 8010 0000A238 E87F06 call dohack 8011 0000A23B 5A pop dx 8012 0000A23C 07 pop es 8013 0000A23D 1F pop ds 8014 0000A23E 5F pop di 8015 0000A23F E961FF jmp .next 8016 8017 %if _PM 8018 .386init: 8019 [cpu 386] 8020 0000A242 665B pop ebx 8021 0000A244 665A pop edx 8022 0000A246 E88CF1 call ispm 8023 0000A249 0F85D2FE jnz .init_popped ; not PM --> 8024 0000A24D 6629D3 sub ebx, edx ; ebx = number of bytes in search range minus one 8025 0000A250 6629CB sub ebx, ecx ; = number of possible positions of string minus 1 8026 0000A253 0F82F304 jb error 8027 0000A257 6689D7 mov edi, edx 8028 0000A25A 6689CA mov edx, ecx 8029 0000A25D 6689D9 mov ecx, ebx 8030 8031 ; ds:esi-> search string, length (edx+1) 8032 ; es:edi-> data to search in, (ecx+1) bytes 8033 ; Although 386+ RM still uses 64 KiB segments, it allows 8034 ; us to use the 32-bit addressing variant of the string 8035 ; instructions as long as we never access any byte above 8036 ; the 64 KiB limit. (Even if the index register contains 8037 ; 00010000h after an instruction executed.) 8038 0000A260 36F606[A700]80 testopt [ss:internalflags3], dif3_sss_is_reverse 8039 0000A266 751B jnz .386reverse 8040 .386loop: 8041 0000A268 0C01 or al, 1 ; NZ (iff cx==0, repne scasb doesn't change ZF) 8042 0000A26A 6656 push esi 8043 0000A26C 67AC a32 lodsb ; first character in al 8044 0000A26E F267AE a32 repne scasb ; look for first byte 8045 0000A271 7409 je .386foundbyte 8046 0000A273 67AE a32 scasb ; count in ecx was cnt-1 8047 0000A275 7541 jne .386done 8048 .386found_last_byte: 8049 0000A277 E84300 call .386handle_found_byte 8050 0000A27A EB3C jmp .386done 8051 8052 .386foundbyte: 8053 0000A27C E83E00 call .386handle_found_byte 8054 0000A27F 665E pop esi 8055 0000A281 EBE5 jmp .386loop ; ecx = 0 if one to search, 8056 ; ecx = 1 if two to search, etc 8057 8058 .386reverse: 8059 0000A283 6601CF add edi, ecx ; -> last position to check 8060 .386reverseloop: 8061 0000A286 0C01 or al, 1 ; NZ (iff cx==0, repne scasb doesn't change ZF) 8062 0000A288 6656 push esi 8063 0000A28A 67AC a32 lodsb ; first character in al 8064 0000A28C FD std ; no AMD erratum workaround needed 8065 0000A28D F267AE a32 repne scasb ; look for first byte 8066 0000A290 7414 je .386reversefoundbyte 8067 0000A292 67AE a32 scasb ; count in ecx was cnt-1 8068 0000A294 7522 jne .386done 8069 .386reversefound_last_byte: 8070 0000A296 FC cld 8071 0000A297 6683C702 add edi, 2 8072 0000A29B 38C0 cmp al, al ; ZR for case if edx = 0 8073 0000A29D E81D00 call .386handle_found_byte 8074 0000A2A0 6683EF02 sub edi, 2 8075 0000A2A4 EB12 jmp .386done 8076 8077 .386reversefoundbyte: 8078 0000A2A6 FC cld 8079 0000A2A7 6683C702 add edi, 2 8080 0000A2AB 38C0 cmp al, al ; ZR for case if edx = 0 8081 0000A2AD E80D00 call .386handle_found_byte 8082 0000A2B0 6683EF02 sub edi, 2 8083 0000A2B4 665E pop esi 8084 0000A2B6 EBCE jmp .386reverseloop ; ecx = 0 if one to search, 8085 ; ecx = 1 if two to search, etc 8086 8087 .386done: 8088 0000A2B8 665E pop esi ; discard 8089 0000A2BA E9BBFE jmp .commondone 8090 8091 8092 ; INP: ZR 8093 .386handle_found_byte: 8094 0000A2BD 6651 push ecx 8095 0000A2BF 6657 push edi 8096 0000A2C1 6689D1 mov ecx, edx 8097 0000A2C4 F367A6 a32 repe cmpsb ; compare string behind first byte 8098 ; If we're searching for a single-byte value then 8099 ; edx is equal to zero here. In that case ecx gets 8100 ; the value zero and then a32 repe cmpsb does not 8101 ; alter ZF, meaning it will stay ZR (as noted for 8102 ; the comment INP section). 8103 0000A2C7 665F pop edi 8104 0000A2C9 7403 je .386display ; if equal 8105 .386next: 8106 0000A2CB 6659 pop ecx 8107 0000A2CD C3 retn 8108 8109 .386display: 8110 0000A2CE 8CC3 mov bx, es 8111 0000A2D0 6657 push edi 8112 0000A2D2 1E push ds 8113 0000A2D3 06 push es 8114 0000A2D4 16 push ss 8115 0000A2D5 1F pop ds 8116 0000A2D6 E81506 call unhack ; undo the interrupt vector hack and restore es 8117 0000A2D9 6657 push edi 8118 0000A2DB 668B3E[D80B] mov edi, dword [sscounter] 8119 0000A2E0 6683FF10 cmp edi, 16 8120 0000A2E4 7317 jae @F 8121 0000A2E6 01FF add di, di ; * 2 8122 0000A2E8 89F8 mov ax, di 8123 0000A2EA 01FF add di, di ; * 4 8124 0000A2EC 01C7 add di, ax ; * 4 + * 2 = * 6 8125 0000A2EE 81C7[780B] add di, search_results 8126 0000A2F2 6658 pop eax 8127 0000A2F4 6650 push eax 8128 0000A2F6 6648 dec eax 8129 0000A2F8 66AB stosd 8130 0000A2FA 89D8 mov ax, bx 8131 0000A2FC AB stosw 8132 8133 @@: 8134 0000A2FD 66FF06[D80B] inc dword [sscounter] 8135 0000A302 89D8 mov ax, bx 8136 0000A304 BF[0E08] mov di, line_out 8137 0000A307 E87219 call hexword ; 4 (segment) 8138 0000A30A B03A mov al, ':' 8139 0000A30C AA stosb ; +1=5 8140 0000A30D 6658 pop eax 8141 0000A30F 6648 dec eax 8142 0000A311 E82BBC call test_d_b_bit 8143 0000A314 7403 jz .noa32 8144 0000A316 E85719 call hexword_high 8145 .noa32: 8146 0000A319 E86019 call hexword 8147 %if _SDUMP 8148 0000A31C F606[7E00]80 testopt [options], ss_no_dump 8149 0000A321 7543 jnz @F 8150 0000A323 F9 stc 8151 0000A324 6611D0 adc eax, edx ; -> behind result 8152 0000A327 763D jbe .386noresult ; end of segment 8153 0000A329 6689C6 mov esi, eax 8154 0000A32C B82020 mov ax, 32<<8|32 8155 0000A32F AB stosw 8156 0000A330 8D5D30 lea bx, [di+3*16] 8157 0000A333 6689F1 mov ecx, esi 8158 0000A336 66F7D9 neg ecx 8159 0000A339 6683F910 cmp ecx, byte 16 8160 0000A33D 7603 jbe .386cxdone 8161 0000A33F B91000 mov cx, 16 8162 .386cxdone: 8163 0000A342 1F pop ds 8164 0000A343 1E push ds ; restore search's segment 8165 0000A344 51 push cx 8166 .386disploop: 8167 0000A345 67AC a32 lodsb 8168 0000A347 E8DA72 call dd_store 8169 0000A34A B020 mov al, 32 8170 0000A34C AA stosb 8171 0000A34D E2F6 loop .386disploop 8172 0000A34F 59 pop cx 8173 0000A350 16 push ss 8174 0000A351 1F pop ds 8175 0000A352 F7D9 neg cx 8176 0000A354 83C110 add cx, byte 16 8177 0000A357 7407 jz .386noblanks 8178 .386loopblanks: 8179 0000A359 B82020 mov ax, 32<<8|32 8180 0000A35C AB stosw 8181 0000A35D AA stosb 8182 0000A35E E2F9 loop .386loopblanks 8183 .386noblanks: 8184 0000A360 C645E72D mov byte [di-(1+(8*3))], '-' 8185 0000A364 89DF mov di, bx 8186 .386noresult: 8187 @@: 8188 %endif ; _SDUMP 8189 0000A366 52 push dx 8190 0000A367 E84A19 call putsline_crlf 8191 0000A36A E84D05 call dohack 8192 0000A36D 5A pop dx 8193 0000A36E 07 pop es 8194 0000A36F 1F pop ds 8195 0000A370 665F pop edi 8196 0000A372 E956FF jmp .386next 8197 __CPU__ 8198 %endif ; _PM 8199 8200 8201 %if 0 8202 getdebuggeebyte: 8203 push bp 8204 mov bp, sp 8205 sub sp, byte 4 8206 push bx 8207 push cx 8208 %define _dedata -4 8209 %define _bp 0 8210 %define _ip 2 8211 %define _adroffset 4 8212 %define _adrsegment 8 8213 test byte [], memorydump 8214 jz .realmemory 8215 8216 jmp short .return 8217 .realmemory32: 8218 .realmemory: 8219 mov ax, word [ bp + _adrsegment ] 8220 mov bx, word [ bp + _adroffset ] 8221 push ds 8222 mov ds, ax 8223 push word [ bx ] 8224 pop word [ bp + _dedata ] 8225 push word [ bx +2 ] 8226 pop word [ bp + _dedata +2 ] 8227 pop ds 8228 ; test ax, ax 8229 ; jnz .return 8230 mov dx, ax 8231 mov cl, 4 8232 shl ax, cl 8233 mov cl, 12 8234 shr dx, cl 8235 add ax, bx 8236 adc dx, byte 0 8237 jnz .return 8238 sub ax, 23h*4 8239 jb .return 8240 cmp ax, 2*4 8241 jae .return 8242 8243 push ds 8244 xor bx, bx 8245 mov ds, bx 8246 push si 8247 push di 8248 mov si, 22h*4 8249 mov di, hackints.dummy22 8250 movsw 8251 movsw 8252 mov bl, 8 8253 add si, bx 8254 add di, bx 8255 movsw 8256 movsw 8257 8258 mov cl, byte [ bx - 4 + hackints2324 ] 8259 mov byte [ bp + _dedata ], cl 8260 .return: 8261 pop cx 8262 pop bx 8263 pop ax 8264 pop dx 8265 pop bp 8266 retn 6 8267 8268 8269 ; Interrupt hack table 8270 ; 8271 ; This contains the Int23 and Int24 handler we want to show 8272 ; the user. As we'll retrieve a dword per access, 8273 align 4, db 0 8274 hackints: 8275 .dummy22: dd 0 8276 .23: dd 0 8277 .24: dd 0 8278 .dummy25: dd 0 8279 %endif 8280 8281 8282 lockdrive: 8283 0000A375 50 push ax 8284 0000A376 53 push bx 8285 0000A377 51 push cx 8286 0000A378 52 push dx 8287 0000A379 88C3 mov bl, al 8288 0000A37B FEC3 inc bl 8289 0000A37D B700 mov bh, 0 8290 0000A37F B94A08 mov cx, 084Ah 8291 0000A382 BA0100 mov dx, 0001h 8292 0000A385 B80D44 mov ax, 440Dh 8293 0000A388 CD21 int 21h 8294 0000A38A 5A pop dx 8295 0000A38B 59 pop cx 8296 0000A38C 5B pop bx 8297 0000A38D 58 pop ax 8298 0000A38E C3 retn 8299 8300 unlockdrive: 8301 0000A38F 50 push ax 8302 0000A390 53 push bx 8303 0000A391 51 push cx 8304 0000A392 52 push dx 8305 0000A393 88C3 mov bl, al 8306 0000A395 FEC3 inc bl 8307 0000A397 B700 mov bh, 0 8308 0000A399 B96A08 mov cx, 086Ah 8309 0000A39C BA0100 mov dx, 0001h 8310 0000A39F B80D44 mov ax, 440Dh 8311 0000A3A2 CD21 int 21h 8312 0000A3A4 5A pop dx 8313 0000A3A5 59 pop cx 8314 0000A3A6 5B pop bx 8315 0000A3A7 58 pop ax 8316 0000A3A8 C3 retn 8317 8318 8319 ; W command - write a program, or disk sectors, to disk. 8320 ww: 8321 %if _BOOTLDR 8322 0000A3A9 F606[9D00]40 testopt [internalflags], nodosloaded 8323 0000A3AE 7406 jz @F 8324 0000A3B0 BA[3C60] mov dx, msg.nobootsupp 8325 0000A3B3 E97D1C jmp putsz 8326 @@: 8327 %endif 8328 8329 0000A3B6 E8F105 call parselw ; parse L and W argument format 8330 0000A3B9 747B jz ww4 ; if request to write program 8331 %if _PM && _NOEXTENDER 8332 0000A3BB E817F0 call ispm 8333 0000A3BE 7508 jnz .rm 8334 0000A3C0 E88CF1 call isextenderavailable 8335 0000A3C3 7303E99FF1 jc nodosextinst 8336 .rm: 8337 %endif 8338 0000A3C8 36F606[9C00]06 testopt [ss:internalflags], newpacket| ntpacket 8339 0000A3CE 742F jz .oldint 8340 0000A3D0 88C2 mov dl, al ; A: = 0, ... 8341 0000A3D2 BE0160 mov si, 6001h ; write, assume "file data" 8342 %if _VDD 8343 0000A3D5 F606[9C00]04 testopt [internalflags], ntpacket 8344 0000A3DA 7512 jnz .vdd 8345 %endif 8346 0000A3DC FEC2 inc dl ; A: = 1, ... 8347 0000A3DE E894FF call lockdrive 8348 0000A3E1 B80573 mov ax, 7305h ; ds:(e)bx-> packet 8349 0000A3E4 F9 stc 8350 0000A3E5 CD21 int 21h ; use int 21h here, not doscall 8351 0000A3E7 9C pushf 8352 0000A3E8 E8A4FF call unlockdrive 8353 0000A3EB 9D popf 8354 0000A3EC EB13 jmp short .done 8355 %if _VDD 8356 .vdd: 8357 0000A3EE A1[C40A] mov ax, word [hVdd] 8358 0000A3F1 B90500 mov cx, 5 8359 %if _PM 8360 0000A3F4 020E[0A8B] add cl, byte [dpmi32] 8361 %endif 8362 0000A3F8 C4C4580290 DispatchCall 8363 0000A3FD EB02 jmp short .done 8364 %endif 8365 .oldint: 8366 0000A3FF CD26 int 26h 8367 .done: 8368 0000A401 BA[B57B] mov dx, writing 8369 ww1: 8370 0000A404 8CD3 mov bx, ss ; restore segment registers 8371 0000A406 8EDB mov ds, bx 8372 0000A408 8B26[9C0A] mov sp, word [savesp] 8373 0000A40C 8EC3 mov es, bx 8374 0000A40E 7323 jnc ww3 ; if no error 8375 0000A410 3C0C cmp al, 0Ch 8376 0000A412 7602 jbe ww2 ; if in range 8377 0000A414 B00C mov al, 0Ch 8378 ww2: 8379 0000A416 98 cbw ; ah = 0 8380 0000A417 BB[E67A] mov bx, dskerrs ; -> byte table 8381 0000A41A D7 xlatb ; get offset from dskerrs 8382 0000A41B 01D8 add ax, bx ; -> message 8383 0000A41D BF[0E08] mov di, line_out 8384 0000A420 89C6 mov si, ax 8385 0000A422 E8B817 call showstring 8386 0000A425 89D6 mov si, dx 8387 0000A427 E8B317 call showstring 8388 0000A42A BE[BB7B] mov si, drive 8389 0000A42D E8AD17 call showstring 8390 0000A430 E88118 call putsline_crlf 8391 ww3: 8392 0000A433 E9CA5B jmp cmd3 ; can't return because Int26 leaves stack wrong 8393 8394 ; Write to file. First check the file extension. 8395 ; size of file is in client's BX:CX, 8396 ; default start address is DS:100h 8397 8398 ww4: 8399 0000A436 E8E004 call InDos 8400 0000A439 7403E9A2F1 jnz not_while_indos 8401 8402 0000A43E A0[E80B] mov al, byte [fileext] ; get flags of file extension 8403 0000A441 A80C test al, EXT_EXE + EXT_HEX 8404 0000A443 7405 jz ww5 ; if not EXE or HEX 8405 0000A445 BA[707F] mov dx, nowhexe 8406 0000A448 EB07 jmp short ww6 8407 8408 ww5: 8409 0000A44A 3C00 cmp al, 0 8410 0000A44C 7506 jnz ww7 ; if extension exists 8411 0000A44E BA[967F] mov dx, nownull 8412 ww6: 8413 0000A451 E9D400 jmp ww16 8414 8415 ; File extension is OK; write it. First, create the file. 8416 ww7: 8417 %if _PM 8418 0000A454 E87EEF call ispm 8419 0000A457 7506 jnz ww7_1 8420 0000A459 BA[3F7E] mov dx, nopmsupp 8421 0000A45C E9D41B jmp putsz 8422 ww7_1: 8423 %endif 8424 0000A45F BD[0E08] mov bp, line_out 8425 0000A462 80FEFE cmp dh, 0FEh 8426 0000A465 7207 jb ww8 ; if (dx < 0xFE00) 8427 0000A467 80EEFE sub dh, 0FEh ; dx -= 0xFE00; 8428 0000A46A 81C3E00F add bx, 0FE0h 8429 ww8: 8430 0000A46E 89560A mov word [bp+10], dx ; save lower part of address in line_out+10 8431 0000A471 89DE mov si, bx ; upper part goes into si 8432 0000A473 B43C mov ah, 3Ch ; create file 8433 0000A475 31C9 xor cx, cx ; no attributes 8434 0000A477 BA8000 mov dx, DTA 8435 doscall 2160 0000A47A E8F5BA <1> call _doscall 8436 0000A47D 7303E97D00 jc ww15 ; if error 8437 0000A482 50 push ax ; save file handle 8438 8439 ; Print message about writing. 8440 0000A483 BA[B97F] mov dx, wwmsg1 8441 0000A486 E8AA1B call putsz ; print string 8442 0000A489 A1[740C] mov ax, word [reg_ebx] 8443 0000A48C 83F810 cmp ax, 10h 8444 0000A48F 7202 jb ww9 ; if not too large 8445 0000A491 31C0 xor ax, ax ; too large: zero it out 8446 ww9: 8447 0000A493 894608 mov word [bp+8], ax 8448 0000A496 85C0 test ax, ax 8449 0000A498 7403 jz ww10 8450 0000A49A E8F117 call hexnyb 8451 ww10: 8452 0000A49D A1[780C] mov ax, word [reg_ecx] 8453 0000A4A0 894606 mov word [bp+6], ax 8454 0000A4A3 E8D617 call hexword 8455 0000A4A6 E80F18 call putsline ; print size 8456 0000A4A9 BA[C27F] mov dx, wwmsg2 8457 0000A4AC E8841B call putsz ; print string 8458 8459 ; Now write the file. Size remaining is in line_out+6. 8460 0000A4AF 5B pop bx ; recover file handle 8461 0000A4B0 8B560A mov dx, word [bp+10] ; address to write from is si:dx 8462 ww11: 8463 0000A4B3 B800FE mov ax, 0FE00h 8464 0000A4B6 29D0 sub ax, dx 8465 0000A4B8 807E0800 cmp byte [bp+8], 0 8466 0000A4BC 7508 jnz ww12 ; if more than 0FE00h bytes remaining 8467 0000A4BE 3B4606 cmp ax, word [bp+6] 8468 0000A4C1 7203 jb ww12 ; ditto 8469 0000A4C3 8B4606 mov ax, word [bp+6] 8470 ww12: 8471 0000A4C6 91 xchg ax, cx ; mov cx, ax 8472 0000A4C7 8EDE mov ds, si 8473 0000A4C9 B440 mov ah, 40h ; write to file 8474 0000A4CB CD21 int 21h ; use INT, not doscall 8475 0000A4CD 16 push ss ; restore DS 8476 0000A4CE 1F pop ds 8477 0000A4CF 39C8 cmp ax, cx 8478 0000A4D1 7515 jne ww13 ; if disk full 8479 0000A4D3 31D2 xor dx, dx ; next time write from xxxx:0 8480 0000A4D5 81C6E00F add si, 0FE0h ; update segment pointer 8481 0000A4D9 294E06 sub word [bp+6], cx 8482 0000A4DC 9F lahf 8483 0000A4DD 805E0800 sbb byte [bp+8], 0 8484 0000A4E1 75D0 jnz ww11 ; if more to go 8485 0000A4E3 9E sahf 8486 0000A4E4 75CD jnz ww11 ; ditto 8487 0000A4E6 EB12 jmp short ww14 ; done 8488 8489 ww13: 8490 0000A4E8 BA[CB7F] mov dx, diskful 8491 0000A4EB E8451B call putsz ; print string 8492 0000A4EE E80900 call ww14 ; close file 8493 8494 0000A4F1 B441 mov ah, 41h ; unlink file 8495 0000A4F3 BA8000 mov dx, DTA 8496 doscall 2160 0000A4F6 E879BA <1> call _doscall 8497 0000A4F9 C3 retn 8498 8499 ; Close the file. 8500 ww14: 8501 0000A4FA B43E mov ah, 3Eh ; close file 8502 0000A4FC CD21 int 21h 8503 0000A4FE C3 retn 8504 8505 ; Error opening file. This is also called by the load command. 8506 ww15: 8507 0000A4FF 83F802 cmp ax, byte 2 8508 0000A502 BA[F17F] mov dx, doserr2 ; File not found 8509 0000A505 7421 je ww16 8510 0000A507 83F803 cmp ax, byte 3 8511 0000A50A BA[0280] mov dx, doserr3 ; Path not found 8512 0000A50D 7419 je ww16 8513 0000A50F 83F805 cmp ax, byte 5 8514 0000A512 BA[1380] mov dx, doserr5 ; Access denied 8515 0000A515 7411 je ww16 8516 0000A517 83F808 cmp ax, byte 8 8517 0000A51A BA[2380] mov dx, doserr8 ; Insufficient memory 8518 0000A51D 7409 je ww16 8519 0000A51F BF[DD7F] mov di, openerr1 8520 0000A522 E85717 call hexword 8521 0000A525 BA[D77F] mov dx, openerr ; Error ____ opening file 8522 ww16: 8523 0000A528 E9081B jmp putsz 8524 8525 8526 %ifn _EMS 8527 xx: equ error 8528 %else 8529 ; X commands - manipulate EMS memory. 8530 ; 8531 ; Reference: 8532 ; http://www.nondot.org/sabre/os/files/MemManagement/LIMEMS41.txt 8533 8534 0000A52B 3C3F xx: cmp al, '?' 8535 0000A52D 741F je xhelp ; if a call for help 8536 0000A52F 0C20 or al, TOLOWER 8537 0000A531 3C61 cmp al, 'a' 8538 0000A533 7423 je xa ; if XA command 8539 0000A535 3C64 cmp al, 'd' 8540 0000A537 7446 je xd ; if XD command 8541 0000A539 3C6D cmp al, 'm' 8542 0000A53B 7503E97E00 je xm ; if XM command 8543 0000A540 3C72 cmp al, 'r' 8544 0000A542 7459 je xr ; if XR command 8545 0000A544 3C73 cmp al, 's' 8546 0000A546 7503E9A900 je xs ; if XS command 8547 0000A54B E9FC01 jmp error 8548 8549 0000A54E AC xhelp: lodsb 8550 0000A54F E83F16 call chkeol 8551 0000A552 BA[9E5E] mov dx, msg.xhelp 8552 0000A555 E9DB1A jmp putsz ; print string and return 8553 8554 ; XA - Allocate EMS. 8555 0000A558 E89201 xa: call emschk 8556 0000A55B E84416 call skipcomma 8557 0000A55E E8FA14 call getword ; get argument into DX 8558 0000A561 E82D16 call chkeol ; expect end of line here 8559 0000A564 89D3 mov bx, dx 8560 8561 0000A566 B8005A mov ax, 5A00h ; use the EMS 4.0 version to alloc 0 pages 8562 0000A569 85DB test bx, bx 8563 0000A56B 7402 jz short .nullcnt 8564 0000A56D B443 mov ah, 43h ; allocate handle 8565 .nullcnt: 8566 0000A56F E83C01 call emscall 8567 0000A572 92 xchg ax, dx ; mov ax, dx 8568 0000A573 BF[3481] mov di, xaans1 8569 0000A576 E80317 call hexword 8570 0000A579 BA[2381] mov dx, xaans 8571 0000A57C E9B41A jmp putsz ; print string and return 8572 8573 ; XD - Deallocate EMS handle. 8574 0000A57F E86B01 xd: call emschk 8575 0000A582 E81D16 call skipcomma 8576 0000A585 E8D314 call getword ; get argument into DX 8577 0000A588 E80616 call chkeol ; expect end of line here 8578 8579 0000A58B B445 mov ah, 45h ; deallocate handle 8580 0000A58D E81E01 call emscall 8581 0000A590 92 xchg ax, dx ; mov ax,dx 8582 0000A591 BF[4281] mov di, xdans1 8583 0000A594 E8E516 call hexword 8584 0000A597 BA[3B81] mov dx, xdans 8585 0000A59A E9961A jmp putsz ; print string and return 8586 8587 ; XR - Reallocate EMS handle. 8588 0000A59D E84D01 xr: call emschk 8589 0000A5A0 E8FF15 call skipcomma 8590 0000A5A3 E8B514 call getword ; get handle argument into DX 8591 0000A5A6 89D3 mov bx, dx 8592 0000A5A8 E8F815 call skipcomm0 8593 0000A5AB E8AD14 call getword ; get count argument into DX 8594 0000A5AE E8E015 call chkeol ; expect end of line here 8595 0000A5B1 87DA xchg bx, dx 8596 8597 0000A5B3 B451 mov ah, 51h ; reallocate handle 8598 0000A5B5 E8F600 call emscall 8599 0000A5B8 BA[5581] mov dx, xrans 8600 0000A5BB E9751A jmp putsz ; print string and return 8601 8602 ; XM - Map EMS memory to physical page. 8603 0000A5BE E82C01 xm: call emschk 8604 0000A5C1 E8DE15 call skipcomma 8605 0000A5C4 E89414 call getword ; get logical page (FFFFh means unmap) 8606 0000A5C7 89D3 mov bx, dx ; save it in BX 8607 0000A5C9 E8D715 call skipcomm0 8608 0000A5CC E89A14 call getbyte ; get physical page (DL) 8609 0000A5CF 52 push dx 8610 0000A5D0 E8D015 call skipcomm0 8611 0000A5D3 E88514 call getword ; get handle into DX 8612 0000A5D6 E8B815 call chkeol ; expect end of line 8613 0000A5D9 58 pop ax ; recover physical page into AL 8614 0000A5DA 50 push ax 8615 0000A5DB B444 mov ah, 44h ; function 5 - map memory 8616 0000A5DD E8CE00 call emscall 8617 0000A5E0 BF[7781] mov di, xmans1 8618 0000A5E3 93 xchg ax, bx ; mov ax, bx 8619 0000A5E4 E89516 call hexword 8620 0000A5E7 BF[9481] mov di, xmans2 8621 0000A5EA 58 pop ax 8622 0000A5EB E89516 call hexbyte 8623 0000A5EE BA[6A81] mov dx, xmans 8624 0000A5F1 E93F1A jmp putsz ; print string and return 8625 8626 ; XS - Print EMS status. 8627 xs: 8628 0000A5F4 E8F600 call emschk 8629 0000A5F7 AC lodsb 8630 0000A5F8 E89615 call chkeol ; no arguments allowed 8631 8632 ; First print out the handles and handle sizes. This can be done either 8633 ; by trying all possible handles or getting a handle table. 8634 ; The latter is preferable, if it fits in memory. 8635 0000A5FB B44B mov ah, 4Bh ; function 12 - get handle count 8636 0000A5FD E8AE00 call emscall 8637 0000A600 83FB42 cmp bx, (line_out_end-line_out)/4 8638 0000A603 762B jbe short xs3 ; if we can do it by getting the table 8639 0000A605 31D2 xor dx, dx ; handle 8640 8641 xs1: 8642 ; try EMS 4.0 function 5402h to get total number of handles 8643 0000A607 B80254 mov ax, 5402h 8644 0000A60A E8CB00 call emscall.witherrors 8645 0000A60D 89D9 mov cx, bx ; cx = number of handles 8646 0000A60F 7403 jz @F 8647 8648 0000A611 B9FF00 mov cx, 0FFh ; total number of handles (assumed) 8649 ; this does not match the prior code here, 8650 ; which used 100h handles assuming that 8651 ; 0FFh is the last valid handle number. 8652 ; however, if we assume that there are 0FFh 8653 ; valid handles then the last number is 0FEh! 8654 @@: 8655 8656 0000A614 B44C mov ah, 4Ch ; function 13 - get handle pages 8657 0000A616 E8BF00 call emscall.witherrors 8658 0000A619 750D jnz short .err 8659 0000A61B 93 xchg ax, bx ; mov ax,bx 8660 0000A61C E8E200 call hndlshow 8661 .cont: 8662 0000A61F 42 inc dx ; increment handle number to access 8663 0000A620 7404 jz @F ; (if 0000h handles, do not loop forever) 8664 0000A622 39CA cmp dx, cx ; end of the loop ? 8665 0000A624 72E1 jb short xs1 ; if more to be done --> 8666 @@: 8667 0000A626 EB1F jmp short xs5 ; done with this part 8668 8669 .err: 8670 0000A628 80FC83 cmp ah, 83h ; no such handle? 8671 0000A62B 74F2 je short .cont ; just skip --> 8672 0000A62D E98300 jmp emscall.errorhandle ; if other error --> 8673 8674 ; Get the information in tabular form. 8675 xs3: 8676 0000A630 B44D mov ah, 4Dh ; function 14 - get all handle pages 8677 0000A632 BF[0E08] mov di, line_out 8678 0000A635 E87600 call emscall 8679 0000A638 85DB test bx, bx 8680 0000A63A 740B jz short xs5 8681 0000A63C 89FE mov si, di 8682 xs4: 8683 0000A63E AD lodsw 8684 0000A63F 92 xchg ax, dx 8685 0000A640 AD lodsw 8686 0000A641 E8BD00 call hndlshow 8687 0000A644 4B dec bx 8688 0000A645 75F7 jnz short xs4 ; if more to go 8689 8690 xs5: 8691 0000A647 BA[5176] mov dx, crlf 8692 0000A64A E8E619 call putsz ; print string 8693 8694 ; Next print the mappable physical address array. 8695 ; The size of the array shouldn't be a problem. 8696 0000A64D B80058 mov ax, 5800h ; function 25 - get mappable phys. address array 8697 0000A650 BF[0E08] mov di, line_out ; address to put array 8698 0000A653 E85800 call emscall 8699 0000A656 BA[1C82] mov dx, xsnopgs 8700 0000A659 E328 jcxz xs7 ; NO mappable pages! 8701 8702 0000A65B 89FE mov si, di 8703 xs6: 8704 0000A65D 51 push cx 8705 0000A65E AD lodsw 8706 0000A65F BF[D881] mov di, xsstr2b 8707 0000A662 E81716 call hexword 8708 0000A665 AD lodsw 8709 0000A666 BF[CB81] mov di, xsstr2a 8710 0000A669 E81716 call hexbyte 8711 0000A66C BA[C081] mov dx, xsstr2 8712 0000A66F E8C119 call putsz ; print string 8713 0000A672 59 pop cx ; end of loop 8714 0000A673 F6C101 test cl, 1 8715 0000A676 7406 jz short xs_nonl 8716 0000A678 BA[5176] mov dx, crlf ; blank line 8717 0000A67B E8B519 call putsz ; print string 8718 xs_nonl: 8719 0000A67E E2DD loop xs6 8720 0000A680 BA[5176] mov dx, crlf ; blank line 8721 xs7: 8722 0000A683 E8AD19 call putsz ; print string 8723 8724 ; Finally, print the cumulative totals. 8725 0000A686 B442 mov ah, 42h ; function 3 - get unallocated page count 8726 0000A688 E82300 call emscall 8727 0000A68B 89D0 mov ax, dx ; total pages available 8728 0000A68D 29D8 sub ax, bx ; number of pages allocated 8729 0000A68F BB[1282] mov bx, xsstrpg 8730 0000A692 E88300 call sumshow ; print the line 8731 0000A695 B44B mov ah, 4Bh ; function 12 - get handle count 8732 0000A697 E81400 call emscall 8733 0000A69A 53 push bx ; number of handles allocated 8734 8735 ; try EMS 4.0 function 5402h to get total number of handles 8736 0000A69B B80254 mov ax, 5402h 8737 0000A69E E83700 call emscall.witherrors ; don't use emscall, this function may fail! 8738 0000A6A1 89DA mov dx, bx 8739 0000A6A3 7403 jz @F 8740 8741 0000A6A5 BAFF00 mov dx, 0FFh ; total number of handles 8742 @@: 8743 0000A6A8 58 pop ax ; ax = number of handles allocated 8744 0000A6A9 BB[1682] mov bx, xsstrhd 8745 0000A6AC EB6A jmp sumshow ; print the line 8746 8747 ; Call EMS 8748 emscall: 8749 0000A6AE E82700 call .witherrors 8750 0000A6B1 7439 jz short .ret ; return if OK 8751 .errorhandle: 8752 0000A6B3 88E0 mov al, ah 8753 0000A6B5 3C8B cmp al, 8Bh 8754 0000A6B7 7F0D jg short .ce2 ; if out of range (signed comparison intended) 8755 0000A6B9 98 cbw 8756 0000A6BA 89C3 mov bx, ax 8757 0000A6BC D1E3 shl bx, 1 8758 0000A6BE 8B97[0082] mov dx, word [emserrs+100h+bx] 8759 0000A6C2 85D2 test dx, dx 8760 0000A6C4 7538 jnz short .ce4 ; if there's a word there 8761 .ce2: 8762 0000A6C6 BA[1881] mov dx, emserrx 8763 0000A6C9 E86719 call putsz 8764 0000A6CC BF[0E08] mov di, line_out 8765 0000A6CF E8B115 call hexbyte 8766 0000A6D2 E8DF15 call putsline_crlf 8767 0000A6D5 E92859 jmp cmd3 ; quit 8768 8769 .witherrors: 8770 %if _PM 8771 0000A6D8 E8FAEC call ispm 8772 0000A6DB 750B jnz short .rm 8773 subcpu 286 8774 0000A6DD 36FF36[B00A] push word [ss:pspdbg] 8775 0000A6E2 6A67 push 67h 8776 0000A6E4 E83DEE call intcall 8777 0000A6E7 A9 db __TEST_IMM16 ; (skip int opcode) 8778 subcpureset 8779 .rm: 8780 %endif 8781 0000A6E8 CD67 int 67h 8782 0000A6EA 84E4 test ah, ah 8783 .ret: 8784 emschk.ret: 8785 0000A6EC C3 retn 8786 8787 8788 ; Check for EMS 8789 ; maybe should disable this while bootloaded ? 8790 emschk: 8791 0000A6ED B067 mov al, 67h 8792 0000A6EF E83C2D call intchk ; ZR if offset = -1 or segment = 0 8793 ; CHG: ax, dx, bx 8794 0000A6F2 7407 jz .failed 8795 0000A6F4 B446 mov ah, 46h 8796 0000A6F6 E8DFFF call emscall.witherrors ; get version 8797 0000A6F9 74F1 jz short .ret ; success --> 8798 .failed: 8799 0000A6FB BA[3980] mov dx, emsnot 8800 emscall.ce4: 8801 0000A6FE E9E85D jmp prnquit ; otherwise abort with message --> 8802 8803 ; HNDLSHOW - Print XS line giving the handle and pages allocated. 8804 ; 8805 ; Entry DX Handle 8806 ; AX Number of pages 8807 ; 8808 ; Exit Line printed 8809 ; 8810 ; Uses ax, di 8811 hndlshow: 8812 0000A701 BF[A981] mov di, xsstr1b 8813 0000A704 E87515 call hexword 8814 0000A707 89D0 mov ax, dx 8815 0000A709 BF[A081] mov di, xsstr1a 8816 0000A70C E86D15 call hexword 8817 0000A70F 52 push dx 8818 0000A710 BA[9981] mov dx, xsstr1 8819 0000A713 E81D19 call putsz ; print string 8820 0000A716 5A pop dx 8821 0000A717 C3 retn 8822 8823 ; SUMSHOW - Print summary line for XS command. 8824 ; 8825 ; Entry AX Number of xxxx's that have been used 8826 ; DX Total number of xxxx's 8827 ; BX Name of xxxx 8828 ; 8829 ; Exit String printed 8830 ; 8831 ; Uses AX, CX, DX, DI 8832 sumshow: 8833 0000A718 BF[DF81] mov di, xsstr3 8834 0000A71B 57 push di 8835 0000A71C E81600 call trimhex 8836 0000A71F 92 xchg ax, dx ; mov ax,dx 8837 0000A720 BF[EF81] mov di, xsstr3a 8838 0000A723 E80F00 call trimhex 8839 0000A726 5A pop dx ; mov dx,xsstr3 8840 0000A727 E80919 call putsz ; print string 8841 0000A72A 89DA mov dx, bx 8842 0000A72C E80419 call putsz ; print string 8843 0000A72F BA[F981] mov dx, xsstr4 8844 0000A732 E9FE18 jmp putsz ; print string and return 8845 8846 ; TRIMHEX - Print word without leading zeroes. 8847 ; 8848 ; Entry AX Number to print 8849 ; DI Where to print it 8850 ; 8851 ; Uses AX, CX, DI. 8852 trimhex: 8853 0000A735 E84415 call hexword 8854 0000A738 83EF04 sub di, 4 ; back up DI to start of word 8855 0000A73B B90300 mov cx, 3 8856 0000A73E B030 mov al, '0' 8857 .loop: 8858 0000A740 AE scasb 8859 0000A741 7506 jne .done ; return if not a '0' 8860 0000A743 C645FF20 mov byte [di-1], ' ' 8861 0000A747 E2F7 loop .loop 8862 .done: 8863 0000A749 C3 retn 8864 %endif ; _EMS 8865 8866 ; Error handlers. 8867 error: 8868 0000A74A 16 push ss 8869 0000A74B 07 pop es 8870 0000A74C 16 push ss 8871 0000A74D 1F pop ds 8872 0000A74E 89F1 mov cx, si 8873 0000A750 81E9[0300] sub cx, line_in+3 8874 0000A754 81F90001 cmp cx, 256 8875 0000A758 7705 ja .invalid 8876 0000A75A 030E[F80A] add cx, word [promptlen]; number of spaces to skip 8877 0000A75E A9 db __TEST_IMM16 ; (skip xor) 8878 .invalid: 8879 0000A75F 31C9 xor cx, cx ; if we're really messed up 8880 0000A761 8B26[A60A] mov sp, [throwsp] 8881 0000A765 FF26[A40A] jmp near [throwret] 8882 ; INP: cx = number of spaces to indent 8883 8884 ; This is the default address in throwret. 8885 ; Display the error, then jump to errret. 8886 errhandler: 8887 0000A769 E88623 call get_columns ; ax = columns 8888 .: 8889 0000A76C 29C1 sub cx, ax 8890 0000A76E 73FC jnc . 8891 0000A770 01C1 add cx, ax 8892 0000A772 7407 jz err2 8893 0000A774 B020 mov al, 32 8894 .loop: 8895 0000A776 E8DD18 call putc 8896 0000A779 E2FB loop .loop 8897 err2: 8898 0000A77B BA[4976] mov dx, errcarat 8899 0000A77E E8B218 call putsz ; print string 8900 0000A781 B8FF01 mov ax, 01FFh 8901 0000A784 E80A00 call setrc 8902 0000A787 C706[E60B][5C04] mov word [lastcmd], dmycmd 8903 ; cancel command repetition 8904 0000A78D FF26[A20A] jmp near [errret] ; return to the prompt (cmd3, aa01) 8905 8906 8907 setrc: 8908 0000A791 833E[FE0A]00 cmp word [rc], 0 8909 0000A796 7503 jne .ret 8910 0000A798 A3[FE0A] mov word [rc], ax 8911 .ret: 8912 0000A79B C3 retn 8913 8914 8915 ; Terminate the attached process, if any 8916 ; 8917 ; OUT: NZ if now no process attached 8918 ; ZR if still a process attached, 8919 ; ie we failed to terminate this one 8920 terminate_attached_process: 8921 0000A79C F606[9E00]80 testopt [internalflags], attachedterm 8922 0000A7A1 7538 jnz @F 8923 8924 0000A7A3 8026[AD0C]FC clropt [reg_efl], 300h ; clear TF and IF 8925 0000A7A8 8C0E[9C0C] mov word [reg_cs], cs 8926 0000A7AC C706[A80C][839E] mov word [reg_eip], terminate_00 8927 0000A7B2 50 push ax ; (dummy to take space for return address) 8928 0000A7B3 8C16[980C] mov word [reg_ss], ss 8929 0000A7B7 8926[800C] mov word [reg_esp], sp ; save current ss:sp 8930 0000A7BB 58 pop ax ; (discard) 8931 0000A7BC 31C0 xor ax, ax 8932 0000A7BE A3[AA0C] mov word [reg_eip+2], ax 8933 0000A7C1 A3[820C] mov word [reg_esp+2], ax 8934 0000A7C4 A3[AE0C] mov word [reg_efl+2], ax 8935 %if _PM 8936 0000A7C7 A3[940C] mov word [reg_es], ax 8937 0000A7CA A3[900C] mov word [reg_ds], ax 8938 0000A7CD A3[A00C] mov word [reg_fs], ax 8939 0000A7D0 A3[A40C] mov word [reg_gs], ax ; insure valid segregs in PM 8940 %endif 8941 0000A7D3 E8A29C call run 8942 ; The dummy stack space above is to hold the return address 8943 ; of this call. The debugger stack is used by this run. 8944 8945 0000A7D6 F606[9E00]80 testopt [internalflags], attachedterm 8946 @@: 8947 0000A7DB C3 retn 8948 8949 8950 ;--- this is called by "run" 8951 ;--- better don't use INTs inside 8952 ;--- set debuggee's INT 23/24 8953 8954 ; Low-level functions to reset to debuggee's interrupt vectors 23h/24h 8955 ; INP: - 8956 ; OUT: - 8957 ; CHG: bx, (e)dx, cx, ax 8958 ; STT: ds = our segment 8959 ; Do not use Int21, even if not in InDOS mode 8960 setint2324: 8961 %if _BOOTLDR 8962 0000A7DC F606[9D00]40 testopt [internalflags], nodosloaded 8963 0000A7E1 751C jnz .ret ; don't touch int23/24 --> 8964 %endif 8965 %if _PM 8966 0000A7E3 E8EFEB call ispm 8967 0000A7E6 7418 jz .pm 8968 %endif 8969 0000A7E8 06 push es 8970 0000A7E9 57 push di 8971 0000A7EA 56 push si 8972 8973 0000A7EB 31FF xor di, di 8974 0000A7ED 8EC7 mov es, di 8975 0000A7EF BF8C00 mov di, 23h *4 8976 0000A7F2 BE[B40A] mov si, run2324 8977 0000A7F5 A5 movsw 8978 0000A7F6 A5 movsw 8979 0000A7F7 A5 movsw 8980 0000A7F8 A5 movsw 8981 8982 %if _PM 8983 0000A7F9 E8FD2F call hook2F 8984 %endif 8985 0000A7FC 5E pop si 8986 0000A7FD 5F pop di 8987 0000A7FE 07 pop es 8988 .ret: 8989 0000A7FF C3 retn 8990 %if _PM 8991 .pm: 8992 0000A800 56 push si 8993 0000A801 BE[B40A] mov si, run2324 8994 0000A804 BB2302 mov bx, 0223h 8995 .loop: 8996 0000A807 66 _386_o32 ; mov edx, dword [si+0] 8997 0000A808 8B14 mov dx, word [si+0] 8998 0000A80A 8B4C04 mov cx, word [si+4] 8999 0000A80D B80502 mov ax, 0205h 9000 0000A810 CD31 int 31h 9001 0000A812 83C606 add si, 6 9002 0000A815 FEC3 inc bl 9003 0000A817 FECF dec bh 9004 0000A819 75EC jnz .loop 9005 0000A81B 5E pop si 9006 0000A81C C3 retn 9007 %endif 9008 9009 ; Low-level functions to save debuggee's interrupt vectors 23h/24h 9010 ; and set our interrupt vectors instead 9011 ; INP: - 9012 ; OUT: - 9013 ; CHG: - 9014 ; STT: ds = our segment 9015 ; Do not use Int21, even if not in InDOS mode 9016 getint2324: 9017 %if _BOOTLDR 9018 0000A81D F606[9D00]40 testopt [internalflags], nodosloaded 9019 0000A822 752A jnz .ret ; don't touch int23/24 --> 9020 %endif 9021 %if _PM 9022 0000A824 E8AEEB call ispm 9023 0000A827 7426 jz .pm 9024 %endif 9025 0000A829 56 push si 9026 0000A82A 57 push di 9027 0000A82B 06 push es 9028 9029 0000A82C 1E push ds 9030 0000A82D 07 pop es 9031 0000A82E 31FF xor di, di 9032 0000A830 8EDF mov ds, di 9033 0000A832 BF[B40A] mov di, run2324 9034 0000A835 BE8C00 mov si, 23h *4 9035 0000A838 56 push si 9036 0000A839 A5 movsw ; save interrupt vector 23h 9037 0000A83A A5 movsw 9038 0000A83B A5 movsw ; save interrupt vector 24h 9039 0000A83C A5 movsw 9040 0000A83D 5F pop di 9041 0000A83E 06 push es 9042 0000A83F 1F pop ds 9043 0000A840 31F6 xor si, si 9044 0000A842 8EC6 mov es, si 9045 0000A844 BE0E00 mov si, CCIV 9046 0000A847 A5 movsw 9047 0000A848 A5 movsw 9048 0000A849 A5 movsw 9049 0000A84A A5 movsw 9050 9051 0000A84B 07 pop es 9052 0000A84C 5F pop di 9053 0000A84D 5E pop si 9054 .ret: 9055 0000A84E C3 retn 9056 %if _PM 9057 subcpu 286 9058 .pm: 9059 0000A84F 66 _386_o32 9060 0000A850 60 pusha 9061 0000A851 BF[B40A] mov di, run2324 9062 0000A854 BB2302 mov bx, 0223h 9063 .loop: 9064 0000A857 B80402 mov ax, 0204h 9065 0000A85A CD31 int 31h 9066 0000A85C 66 _386_o32 ; mov dword [di+0], edx 9067 0000A85D 8915 mov word [di+0], dx 9068 0000A85F 894D04 mov word [di+4], cx 9069 0000A862 83C706 add di, byte 6 9070 0000A865 FEC3 inc bl 9071 0000A867 FECF dec bh 9072 0000A869 75EC jnz .loop 9073 %if _ONLYNON386 9074 db __TEST_IMM8 ; (skip pusha) 9075 %else 9076 0000A86B A9 db __TEST_IMM16 ; (skip pushad) 9077 %endif 9078 9079 restoredbgi2324: 9080 setdbgi2324: 9081 0000A86C 66 _386_o32 9082 0000A86D 60 pusha 9083 0000A86E BE[C00A] mov si, dbg2324 9084 0000A871 BB2302 mov bx, 0223h 9085 0000A874 6631D2 _386 xor edx, edx 9086 .loop: 9087 0000A877 AD lodsw 9088 0000A878 89C2 mov dx, ax 9089 0000A87A 8B0E[068B] mov cx, word [cssel] 9090 0000A87E B80502 mov ax, 0205h 9091 0000A881 CD31 int 31h 9092 0000A883 FEC3 inc bl 9093 0000A885 FECF dec bh 9094 0000A887 75EE jnz .loop 9095 0000A889 66 _386_o32 9096 0000A88A 61 popa 9097 0000A88B C3 retn 9098 subcpureset 9099 %endif 9100 9101 %if 0 9102 The next three subroutines concern the handling of Int23 and 24. 9103 These interrupt vectors are saved and restored when running the 9104 child process, but are not active when DEBUG itself is running. 9105 It is still useful for the programmer to be able to check where Int23 9106 and 24 point, so these values are copied into the interrupt table 9107 during parts of the C, D, (DX, DI,) E, M, and S commands, so that 9108 they appear to be in effect. The E command also copies these values 9109 back. 9110 9111 Between calls to dohack and unhack, there should be no calls to DOS, 9112 so that there is no possibility of these vectors being used when 9113 DEBUG itself is running. 9114 9115 ; As long as no DOS is loaded anyway, Int23 and Int24 won't be touched 9116 by us, so the whole hack is unnecessary and will be skipped. 9117 %endif 9118 9119 ; PREPHACK - Set up for interrupt vector substitution. 9120 ; Entry es = cs 9121 prephack: 9122 0000A88C 803E[D00A]00 cmp byte [hakstat], 0 9123 0000A891 7509 jne .err ; if hack status error --> 9124 0000A893 57 push di 9125 0000A894 BF[C80A] mov di, sav2324 ; debugger's Int2324 9126 0000A897 E80B00 call prehak1 9127 0000A89A 5F pop di 9128 0000A89B C3 retn 9129 9130 .err: 9131 0000A89C 52 push dx 9132 0000A89D BA[237F] mov dx, ph_msg 9133 0000A8A0 E89017 call putsz ; display error 9134 0000A8A3 5A pop dx 9135 0000A8A4 C3 retn 9136 9137 ; INP: di-> saved interrupt vectors 9138 ; OUT: - 9139 ; CHG: - 9140 prehak1: 9141 %if _PM 9142 0000A8A5 E82DEB call ispm 9143 0000A8A8 740F jz .pm ; nothing to do 9144 %endif 9145 0000A8AA 1E push ds 9146 0000A8AB 56 push si 9147 0000A8AC 31F6 xor si, si 9148 0000A8AE 8EDE mov ds, si 9149 0000A8B0 BE8C00 mov si, 23h *4 9150 0000A8B3 A5 movsw 9151 0000A8B4 A5 movsw 9152 0000A8B5 A5 movsw 9153 0000A8B6 A5 movsw 9154 0000A8B7 5E pop si 9155 0000A8B8 1F pop ds 9156 .pm: 9157 0000A8B9 C3 retn 9158 9159 9160 ; DOHACK - Fake the interrupt vectors 23h and 24h to debuggee's 9161 ; UNHACK - Restore interrupt vectors 23h and 24h to our values 9162 ; It's OK to do either of these twice in a row. 9163 ; In particular, the S command may do unhack twice in a row. 9164 ; INP: ds = our segment 9165 ; OUT: es = our segment 9166 ; CHG: - 9167 ; STT: Do not use Int21 9168 dohack: 9169 0000A8BA 16 push ss 9170 0000A8BB 07 pop es 9171 %if _BOOTLDR 9172 0000A8BC F606[9D00]40 testopt [internalflags], nodosloaded 9173 0000A8C1 7555 jnz unhack.ret ; nothing to hack --> 9174 %endif 9175 0000A8C3 56 push si 9176 0000A8C4 C606[D00A]01 mov byte [hakstat], 1 9177 0000A8C9 BE[B40A] mov si, run2324 ; debuggee's interrupt vectors 9178 %if _PM 9179 0000A8CC E806EB call ispm 9180 0000A8CF 7537 jnz unhack.common 9181 subcpu 286 9182 0000A8D1 66 _386_o32 9183 0000A8D2 60 pusha 9184 0000A8D3 BB2302 mov bx, 0223h 9185 .pm_loop: 9186 0000A8D6 66 _386_o32 9187 0000A8D7 8B14 mov dx, word [si+0+0] 9188 0000A8D9 8B4C04 mov cx, word [si+0+4] 9189 0000A8DC B80502 mov ax, 205h 9190 0000A8DF CD31 int 31h 9191 0000A8E1 83C606 add si, byte 6 9192 0000A8E4 FEC3 inc bl 9193 0000A8E6 FECF dec bh 9194 0000A8E8 75EC jnz .pm_loop 9195 0000A8EA 66 _386_o32 9196 0000A8EB 61 popa 9197 0000A8EC 5E pop si 9198 0000A8ED C3 retn 9199 subcpureset 9200 %else 9201 jmp short unhack.common 9202 %endif 9203 9204 unhack: 9205 0000A8EE 16 push ss 9206 0000A8EF 07 pop es 9207 %if _BOOTLDR 9208 0000A8F0 F606[9D00]40 testopt [internalflags], nodosloaded 9209 0000A8F5 7521 jnz .ret ; nothing to hack --> 9210 %endif 9211 0000A8F7 C606[D00A]00 mov byte [hakstat], 0 9212 %if _PM 9213 0000A8FC E8D6EA call ispm 9214 0000A8FF 7503E968FF jz restoredbgi2324 9215 %endif 9216 0000A904 56 push si 9217 0000A905 BE[C80A] mov si, sav2324 ; debugger's interrupt vectors 9218 .common: 9219 0000A908 57 push di 9220 0000A909 06 push es 9221 0000A90A 31FF xor di, di 9222 0000A90C 8EC7 mov es, di 9223 0000A90E BF8C00 mov di, 23h *4 9224 0000A911 A5 movsw 9225 0000A912 A5 movsw 9226 0000A913 A5 movsw 9227 0000A914 A5 movsw 9228 0000A915 07 pop es 9229 0000A916 5F pop di 9230 0000A917 5E pop si 9231 .ret: 9232 0000A918 C3 retn 9233 9234 9235 ; OUT: NZ if InDOS mode 9236 ; ZR if not 9237 ; CHG: - 9238 ; STT: ss = ds 9239 InDos: 9240 %if _BOOTLDR 9241 0000A919 F606[9D00]40 testopt [internalflags], nodosloaded 9242 0000A91E 7517 jnz .return ; always "in DOS" --> 9243 %endif 9244 0000A920 F606[7C00]08 testopt [options], fakeindos 9245 0000A925 7510 jnz .return ; faking InDOS on anyway --> 9246 .real_indos: 9247 0000A927 1E push ds 9248 0000A928 56 push si 9249 0000A929 BE[E00A] mov si, pInDOS + so16aSegSel 9250 0000A92C E80900 call update_dosdata_segment 9251 0000A92F C574FE lds si, [si - so16aSegSel] 9252 0000A932 803C00 cmp byte [si], 0 9253 0000A935 5E pop si 9254 0000A936 1F pop ds 9255 .return: 9256 0000A937 C3 retn 9257 9258 9259 ; INP: si -> word seg or sel, word segment, word selector 9260 update_dosdata_segment: 9261 0000A938 F606[A300]20 testopt [internalflags2], dif2_int31_segment 9262 0000A93D 742C jz .ret 9263 0000A93F 52 push dx 9264 0000A940 50 push ax 9265 0000A941 53 push bx 9266 0000A942 B031 mov al, 31h 9267 0000A944 E8AE2A call get_86m_interrupt_handler_no_dos 9268 %if _PM 9269 0000A947 395402 cmp word [si + soaSegment], dx 9270 0000A94A 7419 je @F 9271 9272 0000A94C E886EA call ispm 9273 0000A94F 750E jnz .realmode 9274 9275 0000A951 89D3 mov bx, dx 9276 0000A953 B80200 mov ax, 0002h 9277 0000A956 CD31 int 31h 9278 9279 0000A958 8904 mov word [si + soaSegSel], ax 9280 0000A95A 894404 mov word [si + soaSelector], ax 9281 0000A95D EB06 jmp @F 9282 9283 .realmode: 9284 0000A95F 8914 mov word [si + soaSegSel], dx 9285 0000A961 83640400 and word [si + soaSelector], 0 9286 9287 @@: 9288 0000A965 895402 mov word [si + soaSegment], dx 9289 0000A968 5B pop bx 9290 0000A969 58 pop ax 9291 %else 9292 pop bx 9293 pop ax 9294 mov word [si + soaSegSel], dx 9295 %endif 9296 0000A96A 5A pop dx 9297 .ret: 9298 0000A96B C3 retn 9299 9300 9301 ; PARSECM - Parse command line for C and M commands. 9302 ; Entry AL First nonwhite character of parameters 9303 ; SI Address of the character after that 9304 ; Exit DS:ESI Address from first parameter 9305 ; ES:EDI Address from second parameter 9306 ; ECX Length of address range minus one 9307 ; [bAddr32] Set if any high word non-zero 9308 9309 parsecm: 9310 0000A96C E81DFF call prephack 9311 0000A96F 8B1E[900C] mov bx, word [reg_ds] ; get source range 9312 0000A973 31C9 xor cx, cx 9313 0000A975 E83101 call getrange ; get address range into bx:(e)dx bx:(e)cx 9314 0000A978 53 push bx ; save segment first address 9315 0000A979 E82712 call skipcomm0 9316 0000A97C 8B1E[900C] mov bx, word [reg_ds] 9317 0000A980 66 _386_PM_o32 ; sub ecx, edx 9318 0000A981 29D1 sub cx, dx ; number of bytes minus one 9319 0000A983 66 _386_PM_o32 ; push edx 9320 0000A984 52 push dx 9321 0000A985 66 _386_PM_o32 ; push ecx 9322 0000A986 51 push cx 9323 %if _PM 9324 0000A987 8A0E[0C8B] mov cl, byte [bAddr32] 9325 0000A98B 51 push cx 9326 0000A98C E8F201 call getaddr ; get destination address into bx:edx 9327 0000A98F 59 pop cx 9328 0000A990 080E[0C8B] or byte [bAddr32], cl ; if either is 32-bit, handle both as 32-bit 9329 %else 9330 call getaddr ; get destination address into bx:dx 9331 %endif 9332 0000A994 66 _386_PM_o32 9333 0000A995 59 pop cx ; pop ecx 9334 0000A996 66 _386_PM_o32 ; mov edi, edx 9335 0000A997 89D7 mov di, dx 9336 0000A999 66 _386_PM_o32 9337 0000A99A 01CA add dx, cx ; add edx, ecx 9338 0000A99C 7209 jc short errorj7 ; if it wrapped around 9339 0000A99E E8F011 call chkeol ; expect end of line 9340 0000A9A1 8EC3 mov es, bx 9341 0000A9A3 66 _386_PM_o32 ; pop esi 9342 0000A9A4 5E pop si 9343 0000A9A5 1F pop ds 9344 0000A9A6 C3 retn 9345 9346 errorj7: 9347 0000A9A7 E9A0FD jmp error 9348 9349 ; PARSELW - Parse command line for L and W commands. 9350 ; 9351 ; Entry AL First nonwhite character of parameters 9352 ; SI Address of the character after that 9353 ; 9354 ; Exit If there is at most one argument (program load/write), then the 9355 ; zero flag is set, and registers are set as follows: 9356 ; bx:(e)dx Transfer address 9357 ; 9358 ; If there are more arguments (absolute disk read/write), then the 9359 ; zero flag is clear, and registers are set as follows: 9360 ; 9361 ; DOS versions prior to 3.31: 9362 ; AL Drive number 9363 ; CX Number of sectors to read 9364 ; DX Beginning logical sector number 9365 ; DS:BX Transfer address 9366 ; 9367 ; Later DOS versions: 9368 ; AL Drive number 9369 ; BX Offset of packet 9370 ; CX 0FFFFh 9371 9372 usesection lDEBUG_DATA_ENTRY 9373 000092B2 00 align 4, db 0 9374 000092B4 00000000 packet: dd 0 ; sector number 9375 000092B8 0000 dw 0 ; number of sectors to read 9376 000092BA 00000000 dd 0 ; transfer address Segm:OOOO 9377 %if _PM 9378 000092BE 0000 dw 0 ; transfer address might be Segm:OOOOOOOO! 9379 %endif 9380 9381 usesection lDEBUG_CODE 9382 parselw: 9383 0000A9AA 8B1E[9C0C] mov bx, word [reg_cs] ; default segment 9384 0000A9AE 6631D2 _386 xor edx, edx 9385 0000A9B1 BA0001 mov dx, 100h ; default offset 9386 0000A9B4 E8C511 call iseol? 9387 0000A9B7 7468 je plw2 ; if no arguments 9388 0000A9B9 E8C501 call getaddr ; get buffer address into bx:(e)dx 9389 0000A9BC E8E411 call skipcomm0 9390 0000A9BF E8BA11 call iseol? 9391 0000A9C2 745D je plw2 ; if only one argument 9392 0000A9C4 53 push bx ; save segment 9393 0000A9C5 52 push dx ; save offset 9394 0000A9C6 BB8000 mov bx, 80h ; max number of sectors to read 9395 0000A9C9 F7DA neg dx 9396 0000A9CB 7406 jz plw1 ; if address is zero 9397 0000A9CD B109 mov cl, 9 9398 0000A9CF D3EA shr dx, cl ; max number of sectors which can be read 9399 0000A9D1 89D7 mov di, dx 9400 plw1: 9401 0000A9D3 803C3A cmp byte [si], ':' ; drive letter specification ? 9402 0000A9D6 750F jne @F ; no --> 9403 9404 0000A9D8 50 push ax 9405 0000A9D9 E83FE4 call uppercase 9406 0000A9DC 2C41 sub al, 'A' 9407 0000A9DE 3C20 cmp al, 32 ; valid drive ? 9408 0000A9E0 88C2 mov dl, al ; put drive number 9409 0000A9E2 46 inc si ; -> past the colon 9410 0000A9E3 58 pop ax 9411 0000A9E4 7205 jb @FF ; got it --> 9412 0000A9E6 4E dec si ; -> at colon 9413 9414 @@: 9415 0000A9E7 E87F10 call getbyte ; get drive number (DL) 9416 0000A9EA A8 db __TEST_IMM8 ; (skip lodsb) 9417 @@: 9418 0000A9EB AC lodsb 9419 0000A9EC E8B411 call skipcomm0 9420 0000A9EF 52 push dx 9421 0000A9F0 80C241 add dl, 'A' 9422 0000A9F3 8816[C57B] mov byte [driveno], dl 9423 0000A9F7 E87B0B call getdword ; get relative sector number 9424 0000A9FA E8A611 call skipcomm0 9425 0000A9FD 53 push bx ; save sector number high 9426 0000A9FE 52 push dx ; save sector number low 9427 0000A9FF 56 push si ; in case we find an error 9428 0000AA00 E85810 call getword ; get sector count 9429 0000AA03 4A dec dx 9430 0000AA04 39FA cmp dx, di 9431 0000AA06 739F jae errorj7 ; if too many sectors 9432 0000AA08 42 inc dx 9433 0000AA09 89D1 mov cx, dx 9434 0000AA0B E88311 call chkeol ; expect end of line 9435 0000AA0E F606[9C00]07 testopt [internalflags], oldpacket| newpacket| ntpacket 9436 0000AA13 750D jnz plw3 ; if using a packet --> 9437 0000AA15 5E pop si ; in case of error 9438 0000AA16 5A pop dx ; get LoWord starting logical sector number 9439 0000AA17 5B pop bx ; get HiWord 9440 0000AA18 85DB test bx, bx ; just a 16-bit sector number possible 9441 0000AA1A 758B jnz errorj7 ; if too big 9442 0000AA1C 58 pop ax ; drive number 9443 0000AA1D 5B pop bx ; transfer buffer ofs 9444 0000AA1E 1F pop ds ; transfer buffer seg 9445 0000AA1F 85C9 test cx, cx ; NZ 9446 plw2: 9447 0000AA21 C3 retn 9448 9449 ; disk I/O packet for Int25/Int26, Int21.7305, VDD 9450 plw3: 9451 0000AA22 5B pop bx ; discard si 9452 0000AA23 BB[B492] mov bx, packet 9453 0000AA26 8F07 pop word [bx+0] ; LoWord sector number 9454 0000AA28 8F4702 pop word [bx+2] ; HiWord sector number 9455 0000AA2B 894F04 mov word [bx+4], cx ; number of sectors 9456 0000AA2E 58 pop ax ; drive number 9457 0000AA2F 8F4706 pop word [bx+6] ; transfer address ofs 9458 0000AA32 5A pop dx 9459 0000AA33 31C9 xor cx, cx 9460 %if _PM 9461 0000AA35 E89DE9 call ispm 9462 0000AA38 751B jnz plw3_1 9463 0000AA3A 803E[0A8B]00 cmp byte [dpmi32], 0 9464 0000AA3F 7414 jz plw3_1 9465 [cpu 386] 9466 0000AA41 89570A mov word [bx+10], dx ; save segment of transfer buffer 9467 0000AA44 660FB7DB movzx ebx, bx 9468 0000AA48 66C1EA10 shr edx, 16 ; get HiWord(offset) 9469 0000AA4C 803E[0C8B]01 cmp byte [bAddr32], 1 9470 0000AA51 7402 jz plw3_1 9471 0000AA53 31D2 xor dx, dx 9472 __CPU__ 9473 plw3_1: 9474 %endif 9475 0000AA55 895708 mov word [bx+8], dx ; transfer address seg 9476 0000AA58 49 dec cx ; NZ and make cx = -1 9477 0000AA59 C3 retn 9478 9479 9480 %include "expr.asm" 9481 <1> 9482 <1> %if 0 9483 <1> 9484 <1> lDebug expression evaluator 9485 <1> 9486 <1> Copyright (C) 1995-2003 Paul Vojta 9487 <1> Copyright (C) 2008-2012 C. Masloch 9488 <1> 9489 <1> Usage of the works is permitted provided that this 9490 <1> instrument is retained with the works, so that any entity 9491 <1> that uses the works is notified of this instrument. 9492 <1> 9493 <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 9494 <1> 9495 <1> %endif 9496 <1> 9497 <1> 9498 <1> usesection lDEBUG_CODE 9499 <1> 9500 <1> ;--- get a valid offset for segment in BX 9501 <1> 9502 <1> ; INP: bx = segment 9503 <1> ; al = first character, si -> next character 9504 <1> ; ah = 1 if might be a segment or pointer 9505 <1> ; ah = 0 if must be an offset 9506 <1> ; OUT: CY if pointer type return, bx:dx = pointer 9507 <1> ; DebugX on a 386: 9508 <1> ; edx = offset (even if 16-bit PM/86M segment) 9509 <1> ; ah = 1 if a 32-bit segment, 0 if a 16-bit segment 9510 <1> ; DebugX otherwise: 9511 <1> ; dx = offset 9512 <1> ; ah = 0 9513 <1> ; Debug: 9514 <1> ; dx = offset 9515 <1> ; al, si refer to next part of command line 9516 <1> ; CHG: Debug: ah, DebugX: - 9517 <1> ; REM: The byte [bAddr32] is no longer changed by this 9518 <1> ; function. The caller has to use the status that 9519 <1> ; is returned in ah, if desired. 9520 <1> getofsforbx: 9521 0000AA5A 51 <1> push cx ; preserve 9522 0000AA5B 53 <1> push bx ; preserve 9523 0000AA5C 88E5 <1> mov ch, ah ; ch = 0 if must be an offset 9524 <1> %if _PM 9525 0000AA5E 6631D2 <1> _386 xor edx, edx ; properly initialize high word 9526 0000AA61 E8DBB4 <1> call test_d_b_bit 9527 0000AA64 740E <1> jz .16 ; 16-bit segment --> 9528 <1> [cpu 386] 9529 0000AA66 E80C0B <1> call getdword 9530 0000AA69 53 <1> push bx 9531 0000AA6A 52 <1> push dx 9532 0000AA6B 665A <1> pop edx ; edx = 32-bit offset 9533 0000AA6D E81300 <1> call checkpointer 9534 0000AA70 B401 <1> mov ah, 1 ; return 32-bit offset flag 9535 0000AA72 EB0B <1> jmp .ret_pop_NC 9536 <1> __CPU__ 9537 <1> %endif 9538 <1> 9539 <1> .16: 9540 0000AA74 E8FE0A <1> call getexpression 9541 0000AA77 E80900 <1> call checkpointer 9542 0000AA7A E8E30F <1> call getword.checksignificantbits 9543 <1> %if _PM 9544 0000AA7D B400 <1> mov ah, 0 ; return 16-bit offset flag 9545 <1> %endif 9546 <1> .ret_pop_NC: 9547 0000AA7F 5B <1> pop bx 9548 0000AA80 59 <1> pop cx ; restore 9549 0000AA81 F8 <1> clc 9550 0000AA82 C3 <1> retn 9551 <1> 9552 <1> checkpointer: 9553 0000AA83 84E4 <1> test ah, ah ; pointer type ? 9554 0000AA85 790E <1> jns .ret ; no --> 9555 0000AA87 84ED <1> test ch, ch ; can be a pointer or segment ? 9556 0000AA89 740B <1> jz errorj10 ; no --> 9557 0000AA8B 59 <1> pop cx ; discard a near return address 9558 0000AA8C 59 <1> pop cx ; discard bx 9559 0000AA8D 59 <1> pop cx ; restore cx 9560 <1> %if _PM 9561 0000AA8E 660FB7D2 <1> _386 movzx edx, dx ; edx = dx 9562 0000AA92 B400 <1> mov ah, 0 ; always treat as 16-bit offset 9563 <1> %endif 9564 0000AA94 F9 <1> stc ; return a pointer type 9565 0000AA95 C3 <1> .ret: retn 9566 <1> 9567 0000AA96 E9B1FC <1> errorj10: jmp error 9568 <1> 9569 <1> 9570 <1> ; GETRANGE - Get address range from input line. 9571 <1> ; a range consists of either start and end address 9572 <1> ; or a start address, a 'L' and a length. 9573 <1> ; Entry AL First character of range 9574 <1> ; SI Address of next character 9575 <1> ; BX Default segment to use 9576 <1> ; CX Default length to use (or 0 if not allowed) 9577 <1> ; Exit AL First character beyond range 9578 <1> ; SI Address of the character after that 9579 <1> ; BX:(E)DX First address in range 9580 <1> ; BX:(E)CX Last address in range 9581 <1> ; Uses AH 9582 <1> 9583 <1> getrangeX: 9584 <1> %if _PM 9585 0000AA99 8026[A700]FB <1> clropt [internalflags3], dif3_accept_getrange_0 9586 0000AA9E 660FB7C9 <1> _386 movzx ecx, cx 9587 <1> .ecx_and_0_valid: 9588 0000AAA2 66 <1> _386_PM_o32 9589 0000AAA3 51 <1> push cx 9590 0000AAA4 E8E000 <1> call getaddrX 9591 0000AAA7 EB0E <1> jmp short getrange.common 9592 <1> %else 9593 <1> .ecx_and_0_valid: equ getrange.ecx_and_0_valid 9594 <1> %endif 9595 <1> 9596 <1> getrange: 9597 0000AAA9 8026[A700]FB <1> clropt [internalflags3], dif3_accept_getrange_0 9598 0000AAAE 660FB7C9 <1> _386_PM movzx ecx, cx 9599 <1> .ecx_and_0_valid: 9600 0000AAB2 66 <1> _386_PM_o32 9601 0000AAB3 51 <1> push cx ; save the default length 9602 0000AAB4 E8CA00 <1> call getaddr ; get address into bx:(e)dx (sets bAddr32) (returns edx) 9603 <1> .common: 9604 0000AAB7 56 <1> push si 9605 0000AAB8 E8E810 <1> call skipcomm0 9606 0000AABB E8BE10 <1> call iseol? 9607 0000AABE 753E <1> jne gr2 9608 0000AAC0 5E <1> pop si ; restore si and cx 9609 0000AAC1 66 <1> _386_PM_o32 9610 0000AAC2 59 <1> pop cx 9611 0000AAC3 4E <1> dec si ; restore al 9612 0000AAC4 AC <1> lodsb 9613 0000AAC5 F606[A700]04 <1> testopt [internalflags3], dif3_accept_getrange_0 9614 0000AACA 7503 <1> jnz @F 9615 0000AACC 67 <1> _386_PM_a32 9616 0000AACD E3C7 <1> jcxz errorj10 ; if a range is mandatory 9617 <1> @@: 9618 0000AACF 30E4 <1> xor ah, ah 9619 <1> gr3.addcheck: 9620 0000AAD1 803E[0C8B]00 <1> _386_PM cmp byte [bAddr32], 0 9621 0000AAD6 740D <1> _386_PM je .16 9622 0000AAD8 6649 <1> _386_PM dec ecx 9623 0000AADA 6601D1 <1> _386_PM add ecx, edx 9624 0000AADD 731E <1> _386_PM jnc gr1 ; if no wraparound 9625 0000AADF 6683C9FF <1> _386_PM or ecx, byte -1 ; go to end of segment 9626 0000AAE3 EB14 <1> _386_PM jmp short .checkgr3 9627 <1> .16: 9628 0000AAE5 6681F9FFFF0000 <1> _386_PM cmp ecx, 0FFFFh ; was high ? 9629 0000AAEC 7603 <1> _386_PM jbe @F ; no --> (ecxh = 0) 9630 0000AAEE 6631C9 <1> _386_PM xor ecx, ecx ; ecxh = 0 and prepare so as to 9631 <1> ; result in cx = FFFFh after dec 9632 <1> @@: 9633 0000AAF1 49 <1> dec cx 9634 0000AAF2 01D1 <1> add cx, dx 9635 0000AAF4 7307 <1> jnc gr1 ; if no wraparound 9636 0000AAF6 B9FFFF <1> mov cx, -1 ; go to end of segment 9637 <1> .checkgr3: 9638 0000AAF9 84E4 <1> test ah, ah 9639 0000AAFB 7599 <1> jnz short errorj10 ; if specified length wrapped --> 9640 <1> gr1: 9641 0000AAFD C3 <1> retn 9642 <1> 9643 <1> gr2: 9644 0000AAFE 83C402 <1> _386_PM add sp, byte 2 ; for the ecxh on stack 9645 0000AB01 83C404 <1> add sp, byte 4 ; discard saved cx, si 9646 0000AB04 E814E3 <1> call uppercase 9647 0000AB07 3C4C <1> cmp al, 'L' 9648 0000AB09 7414 <1> je gr3 ; if a range is given 9649 <1> ; call skipwh0 ; get next nonblank 9650 0000AB0B 66 <1> _386_PM_o32 ; xchg ecx, edx 9651 0000AB0C 87CA <1> xchg cx, dx 9652 0000AB0E B400 <1> mov ah, 0 ; must be offset 9653 0000AB10 E8D800 <1> call getofsforbx_remember_bitness 9654 <1> ; (DebugX: returns edx no matter what) 9655 0000AB13 66 <1> _386_PM_o32 ; xchg ecx, edx 9656 0000AB14 87CA <1> xchg cx, dx 9657 0000AB16 66 <1> _386_PM_o32 ; cmp edx, ecx 9658 0000AB17 39CA <1> cmp dx, cx 9659 0000AB19 7603E9A500 <1> ja errorj2 ; if empty range --> 9660 0000AB1E C3 <1> retn 9661 <1> 9662 <1> gr3: 9663 0000AB1F 4E <1> dec si ; -> at 'L' 9664 0000AB20 52 <1> push dx 9665 0000AB21 BA[5A68] <1> mov dx, msg.length 9666 0000AB24 E8F60F <1> call isstring? 9667 0000AB27 5A <1> pop dx 9668 0000AB28 7501 <1> jne .notlength 9669 0000AB2A A8 <1> db __TEST_IMM8 ; (skip inc, si -> terminator after "LENGTH") 9670 <1> .notlength: 9671 0000AB2B 46 <1> inc si ; -> behind 'L' 9672 0000AB2C E87310 <1> call skipcomma ; discard the 'L' 9673 <1> ;--- a range is entered with the L/ength argument 9674 <1> ;--- get a valid length for segment in BX 9675 0000AB2F 52 <1> push dx 9676 0000AB30 53 <1> push bx 9677 0000AB31 E80BB4 <1> _386_PM call test_d_b_bit 9678 0000AB34 9C <1> _386_PM pushf 9679 0000AB35 E83D0A <1> call getdword 9680 <1> 9681 0000AB38 4E <1> dec si 9682 0000AB39 52 <1> push dx 9683 0000AB3A B90200 <1> mov cx, 2 ; shift count = 2 (do times 4) 9684 0000AB3D BA[4D68] <1> mov dx, msg.dwords 9685 0000AB40 E8DA0F <1> call isstring? 9686 0000AB43 7410 <1> je .gotsize 9687 0000AB45 49 <1> dec cx ; shift count = 1 9688 0000AB46 BA[4E68] <1> mov dx, msg.words 9689 0000AB49 E8D10F <1> call isstring? 9690 0000AB4C 7407 <1> je .gotsize 9691 0000AB4E 49 <1> dec cx ; shift count = 0 9692 0000AB4F BA[5468] <1> mov dx, msg.bytes 9693 0000AB52 E8C80F <1> call isstring? 9694 <1> ; je .gotsize 9695 <1> .gotsize: ; si -> terminator after length unit 9696 <1> ; (or -> after expression if no unit) 9697 0000AB55 5A <1> pop dx 9698 0000AB56 E30B <1> jcxz .noshift ; "BYTES" or no unit given --> 9699 <1> .shiftloop: 9700 0000AB58 D1E2 <1> shl dx, 1 9701 0000AB5A D1D3 <1> rcl bx, 1 9702 0000AB5C 7303E9E9FB <1> jc error ; too large --> 9703 0000AB61 E2F5 <1> loop .shiftloop ; loop shifting (if it was shift count = 2) 9704 <1> .noshift: 9705 0000AB63 AC <1> lodsb ; al = next character, si -> after that 9706 0000AB64 9D <1> _386_PM popf 9707 0000AB65 740B <1> _386_PM jz .not16_64kib ; don't check for <= 64 KiB 9708 0000AB67 83FB01 <1> cmp bx, byte 1 9709 0000AB6A 7206 <1> jb .not16_64kib ; < 64 KiB in 16-bit segment --> 9710 0000AB6C 7555 <1> jne short errorj2 ; 16-bit segment, above 64 KiB --> 9711 0000AB6E 85D2 <1> test dx, dx 9712 0000AB70 7551 <1> jnz short errorj2 ; 16-bit segment, above 64 KiB --> 9713 <1> .not16_64kib: 9714 <1> %if _PM 9715 0000AB72 53 <1> _386 push bx ; (only push high word on 386+) 9716 0000AB73 52 <1> push dx 9717 0000AB74 66 <1> _386_o32 ; pop ecx ; mov ecx, bxdx 9718 0000AB75 59 <1> pop cx ; mov cx, dx 9719 <1> %else 9720 <1> mov cx, dx 9721 <1> %endif 9722 0000AB76 09D3 <1> or bx, dx ; zero ? 9723 0000AB78 7449 <1> jz short errorj2 ; yes, error --> 9724 0000AB7A 5B <1> pop bx 9725 0000AB7B 5A <1> pop dx 9726 0000AB7C B401 <1> mov ah, 1 9727 0000AB7E E950FF <1> jmp .addcheck 9728 <1> 9729 <1> %ifn _PM 9730 <1> errorj2: 9731 <1> jmp error 9732 <1> %endif 9733 <1> 9734 <1> 9735 <1> ; GETADDR - Get address from input line. 9736 <1> ; Entry AL First character of address 9737 <1> ; SI Address of next character 9738 <1> ; BX Default segment to use 9739 <1> ; Exit AL First character beyond address 9740 <1> ; SI Address of the character after that 9741 <1> ; BX:(E)DX Address found 9742 <1> ; Uses AH,CX 9743 <1> 9744 <1> getaddr: 9745 <1> %if _PM 9746 0000AB81 E80300 <1> call getaddrX 9747 0000AB84 E92FEF <1> jmp verifysegm ; make BX a writeable segment 9748 <1> 9749 <1> ; getaddrX differs from getaddr in that BX is not ensured 9750 <1> ; to be writeable in PM. 9751 <1> ; 9752 <1> ; For DEBUG without PM support, getaddr is getaddrX. Both don't return CF. 9753 <1> 9754 <1> getaddrX: 9755 0000AB87 C606[0C8B]00 <1> mov byte [bAddr32], 0 9756 0000AB8C 3C24 <1> cmp al, '$' ; a real-mode segment? 9757 0000AB8E 7536 <1> jne ga1_1 9758 0000AB90 AC <1> lodsb 9759 <1> 9760 0000AB91 6631D2 <1> _386 xor edx, edx ; edxh = 0 9761 0000AB94 E8DE09 <1> call getexpression 9762 0000AB97 84E4 <1> test ah, ah ; pointer type ? 9763 0000AB99 7911 <1> jns @F 9764 <1> 9765 0000AB9B E837E8 <1> call ispm ; need to translate ? 9766 0000AB9E 750B <1> jnz .ret ; no --> 9767 <1> ; bx = segment 9768 <1> ; after falling through we get bx:(e)dx = segmented address 9769 <1> 9770 <1> seg_bx_to_sel: equ $ ; (no base for local labels) 9771 0000ABA0 50 <1> push ax 9772 0000ABA1 B80200 <1> mov ax, 0002h 9773 0000ABA4 CD31 <1> int 31h 9774 0000ABA6 721B <1> jc short errorj2 9775 0000ABA8 89C3 <1> mov bx, ax ; bx = segment 9776 0000ABAA 58 <1> pop ax 9777 <1> .ret: 9778 0000ABAB C3 <1> retn 9779 <1> 9780 <1> @@: 9781 0000ABAC E8B10E <1> call getword.checksignificantbits 9782 0000ABAF E823E8 <1> call ispm ; need to translate ? 9783 0000ABB2 7507 <1> jnz .checkseg ; no --> 9784 0000ABB4 89D3 <1> mov bx, dx 9785 0000ABB6 E8E7FF <1> call seg_bx_to_sel 9786 0000ABB9 89DA <1> mov dx, bx 9787 <1> .checkseg: 9788 0000ABBB 56 <1> push si 9789 0000ABBC E81310 <1> call skipwh0 9790 0000ABBF 3C3A <1> cmp al, ':' ; was a segment at all? 9791 0000ABC1 7420 <1> je ga2_2 ; yes --> 9792 <1> errorj2: 9793 0000ABC3 E984FB <1> jmp error 9794 <1> %else 9795 <1> getaddrX: 9796 <1> cmp al, '$' 9797 <1> jne ga1_1 9798 <1> lodsb 9799 <1> call getexpression 9800 <1> test ah, ah ; pointer type ? 9801 <1> js .ret ; return bx:dx = segmented address 9802 <1> push ax ; (unused) 9803 <1> call getword.checksignificantbits 9804 <1> call skipwh0 9805 <1> cmp al, ':' 9806 <1> je ga2_2 9807 <1> jmp error 9808 <1> 9809 <1> .ret: 9810 <1> retn 9811 <1> %endif 9812 <1> ga1_1: 9813 0000ABC6 B401 <1> mov ah, 1 ; might be a pointer type 9814 0000ABC8 E88FFE <1> call getofsforbx 9815 0000ABCB 720B <1> jc .ret 9816 0000ABCD 56 <1> push si 9817 0000ABCE E80110 <1> call skipwh0 9818 0000ABD1 3C3A <1> cmp al, ':' 9819 0000ABD3 7405 <1> je ga2 ; if this is a segment/selector --> 9820 0000ABD5 5E <1> pop si 9821 0000ABD6 4E <1> dec si 9822 0000ABD7 AC <1> lodsb 9823 <1> .ret: 9824 <1> %if _PM 9825 0000ABD8 EB14 <1> jmp short remember_bitness 9826 <1> ; remember 32-bitness (only if no segment) 9827 <1> %else 9828 <1> retn 9829 <1> %endif 9830 <1> 9831 <1> ga2: 9832 0000ABDA 6681FA00000100 <1> _386_PM cmp edx, 0001_0000h ; segment/selector fits in word ? 9833 0000ABE1 73E0 <1> _386_PM jae short errorj2 ; no --> 9834 <1> ga2_2: 9835 0000ABE3 58 <1> pop ax ; throw away saved si 9836 0000ABE4 89D3 <1> mov bx, dx ; mov segment into BX 9837 0000ABE6 E8E80F <1> call skipwhite ; skip to next word 9838 0000ABE9 B400 <1> mov ah, 0 ; must be an offset 9839 <1> %if _PM 9840 <1> getofsforbx_remember_bitness: 9841 0000ABEB E86CFE <1> call getofsforbx 9842 <1> remember_bitness: 9843 0000ABEE 0826[0C8B] <1> or byte [bAddr32], ah ; remember 32-bitness 9844 0000ABF2 C3 <1> retn 9845 <1> %else 9846 <1> jmp getofsforbx 9847 <1> 9848 <1> getofsforbx_remember_bitness: equ getofsforbx 9849 <1> %endif 9850 <1> 9851 <1> 9852 <1> ; GETSTR - Get string of bytes. Put the answer in line_out. 9853 <1> ; Entry AL first character 9854 <1> ; SI address of next character 9855 <1> ; Exit [line_out] first byte of string 9856 <1> ; DI address of last+1 byte of string 9857 <1> ; Uses AX,CL,DL,SI 9858 <1> 9859 <1> getstr: 9860 0000ABF3 BF[0E08] <1> mov di, line_out 9861 0000ABF6 E8830F <1> call iseol? 9862 0000ABF9 74C8 <1> je short errorj2 ; we don't allow empty byte strings 9863 <1> gs1: 9864 0000ABFB 3C27 <1> cmp al, "'" 9865 0000ABFD 740C <1> je gs2 ; if string 9866 0000ABFF 3C22 <1> cmp al, '"' 9867 0000AC01 7408 <1> je gs2 ; ditto 9868 0000AC03 E8630E <1> call getbyte ; byte in DL 9869 0000AC06 8815 <1> mov byte [di], dl ; store the byte 9870 0000AC08 47 <1> inc di 9871 0000AC09 EB14 <1> jmp short gs6 9872 <1> 9873 <1> gs2: 9874 0000AC0B 88C4 <1> mov ah, al ; save quote character 9875 <1> gs3: 9876 0000AC0D AC <1> lodsb 9877 0000AC0E 38E0 <1> cmp al, ah 9878 0000AC10 7408 <1> je gs5 ; if possible end of string 9879 0000AC12 E86B0F <1> call iseol?.notsemicolon 9880 0000AC15 74AC <1> je short errorj2 ; if end of line 9881 <1> gs4: 9882 0000AC17 AA <1> stosb ; save character and continue 9883 0000AC18 EBF3 <1> jmp short gs3 9884 <1> 9885 <1> gs5: 9886 0000AC1A AC <1> lodsb 9887 0000AC1B 38E0 <1> cmp al, ah 9888 0000AC1D 74F8 <1> je gs4 ; if doubled quote character 9889 <1> gs6: 9890 0000AC1F E8810F <1> call skipcomm0 ; go back for more 9891 0000AC22 E8570F <1> call iseol? 9892 0000AC25 75D4 <1> jne gs1 ; if not done yet 9893 <1> .ret: 9894 0000AC27 C3 <1> retn 9895 <1> 9896 <1> isbracketorunaryoperator?: 9897 0000AC28 E80900 <1> call isunaryoperator? 9898 0000AC2B 7406 <1> je .yes 9899 <1> %if _INDIRECTION 9900 0000AC2D 3C5B <1> cmp al, '[' 9901 0000AC2F 7402 <1> je .yes 9902 <1> %endif 9903 0000AC31 3C28 <1> cmp al, '(' 9904 <1> .yes: 9905 0000AC33 C3 <1> retn 9906 <1> 9907 <1> 9908 <1> ; Is al one of the simple unary operators? 9909 <1> ; OUT: NZ if not 9910 <1> ; ZR if so, 9911 <1> ; NC 9912 <1> ; cx = index into unaryoperators 9913 <1> isunaryoperator?: 9914 0000AC34 57 <1> push di 9915 0000AC35 BF[F292] <1> mov di, unaryoperators 9916 0000AC38 EB04 <1> jmp short isoperator?.common 9917 <1> 9918 <1> ; See previous description. 9919 <1> isoperator?: 9920 0000AC3A 57 <1> push di 9921 0000AC3B BF[DC92] <1> mov di, operators 9922 <1> .common: 9923 0000AC3E 8B0D <1> mov cx, word [di] 9924 0000AC40 51 <1> push cx 9925 0000AC41 AF <1> scasw 9926 0000AC42 F2AE <1> repne scasb 9927 0000AC44 5F <1> pop di 9928 0000AC45 7507 <1> jne .no 9929 0000AC47 F7D9 <1> neg cx 9930 0000AC49 01F9 <1> add cx, di 9931 0000AC4B 49 <1> dec cx 9932 0000AC4C 38C0 <1> cmp al, al ; NC, ZR 9933 <1> .no: 9934 0000AC4E 5F <1> pop di 9935 0000AC4F C3 <1> retn 9936 <1> 9937 <1> 9938 <1> ; INP: al = character 9939 <1> ; OUT: al = capitalised character 9940 <1> ; ZR, NC if a separator 9941 <1> ; NZ if no separator 9942 <1> isseparator?: 9943 <1> .: 9944 0000AC50 E8C8E1 <1> call uppercase 9945 0000AC53 51 <1> push cx 9946 <1> %if _EXPRESSIONS 9947 0000AC54 3C41 <1> cmp al, 'A' 9948 0000AC56 7204 <1> jb @F 9949 0000AC58 3C5A <1> cmp al, 'Z' 9950 0000AC5A 7605 <1> jbe @FF 9951 <1> @@: 9952 0000AC5C E8DBFF <1> call isoperator? ; normal operators are separators (also handles equality sign) 9953 0000AC5F 740A <1> je .yes ; if match --> (ZR, NC) 9954 <1> @@: 9955 <1> %endif 9956 0000AC61 57 <1> push di 9957 0000AC62 BF[9098] <1> mov di, separators 9958 0000AC65 8B0D <1> mov cx, word [di] 9959 0000AC67 AF <1> scasw 9960 0000AC68 F2AE <1> repne scasb ; ZR, NC on match, NZ else 9961 0000AC6A 5F <1> pop di 9962 <1> .yes: 9963 0000AC6B 59 <1> pop cx 9964 0000AC6C C3 <1> retn 9965 <1> 9966 <1> ; INP: al = character 9967 <1> ; OUT: al = capitalised character 9968 <1> ; ZR, NC if a separator (not L or dot) 9969 <1> ; NZ if no separator (including L or dot) 9970 <1> .except_L_or_dot: 9971 0000AC6D E8ABE1 <1> call uppercase 9972 0000AC70 3C2E <1> cmp al, '.' 9973 0000AC72 7404 <1> je .ret_NZ 9974 0000AC74 3C4C <1> cmp al, 'L' 9975 0000AC76 75D8 <1> jne . 9976 <1> .ret_NZ: 9977 0000AC78 84C0 <1> test al, al 9978 0000AC7A C3 <1> retn 9979 <1> 9980 <1> 9981 <1> ; Does one of the type operators start in input? 9982 <1> ; 9983 <1> ; INP: al = first character 9984 <1> ; si-> next character 9985 <1> ; OUT: Iff NC, 9986 <1> ; bx>>1 = offset into typebitmasks and typehandlers tables 9987 <1> ; bx&1 = set iff signed type 9988 <1> ; di-> behind the type operator 9989 <1> ; CHG: bx, cx, di 9990 <1> ; 9991 <1> ; Note: Signed types are specified by an S prefix to 9992 <1> ; the type names. Only non-address types can 9993 <1> ; be signed (that is, offset, segment, and 9994 <1> ; pointer cannot be signed). 9995 <1> ; Types can be specified with abbreviated names, 9996 <1> ; except where that would clash with numeric 9997 <1> ; input or a register name or ambiguity would 9998 <1> ; be caused. These cases are: 9999 <1> ; SS, S (short, seg, signed, ss) 10000 <1> ; B (byte, numeric 0Bh) 10001 <1> ; C (char, numeric 0Ch) 10002 <1> ; D (dword, numeric 0Dh) 10003 <1> ; 3 (3byte, numeric 3) 10004 <1> ; 3B (3byte, numeric 3Bh) 10005 <1> ; CH (char, register ch) 10006 <1> istype?: 10007 <1> %if maxtypesize & 1 10008 0000AC7B B90800 <1> mov cx, maxtypesize+1 ; = maximum count + 1 10009 <1> %else 10010 <1> mov cx, maxtypesize ; = maximum count 10011 <1> %endif 10012 <1> ; cx is even here! 10013 0000AC7E 52 <1> push dx 10014 0000AC7F 50 <1> push ax 10015 0000AC80 56 <1> push si 10016 <1> 10017 0000AC81 29CC <1> sub sp, cx ; allocate name buffer 10018 0000AC83 89E7 <1> mov di, sp ; -> name buffer 10019 0000AC85 57 <1> push di 10020 0000AC86 31DB <1> xor bx, bx ; initialise count 10021 <1> %ifn maxtypesize & 1 10022 <1> inc cx ; = maximum count + 1 10023 <1> %endif 10024 <1> ; The +1 does not represent an off-by-one 10025 <1> ; because the below loop stores to the 10026 <1> ; buffer at the beginning of subsequent 10027 <1> ; iterations, after checking cx. 10028 <1> 10029 0000AC88 A9 <1> db __TEST_IMM16 ; (skip stosb and lodsb) 10030 <1> .storename: 10031 0000AC89 AA <1> stosb ; store in name buffer 10032 0000AC8A AC <1> lodsb ; get next character to check 10033 0000AC8B E88DE1 <1> call uppercase 10034 0000AC8E 51 <1> push cx 10035 0000AC8F E896FF <1> call isbracketorunaryoperator? ; terminator ? 10036 0000AC92 59 <1> pop cx 10037 0000AC93 7413 <1> je .endname 10038 0000AC95 E8E40E <1> call iseol? 10039 0000AC98 740E <1> je .endname 10040 0000AC9A 3C20 <1> cmp al, 32 10041 0000AC9C 740A <1> je .endname 10042 0000AC9E 3C09 <1> cmp al, 9 10043 0000ACA0 7406 <1> je .endname ; yes --> 10044 <1> ; We don't check for digits here. 10045 <1> ; Immediate values and variables 10046 <1> ; must leave a space inbetween. 10047 0000ACA2 43 <1> inc bx ; count characters 10048 0000ACA3 E2E4 <1> loop .storename ; count remaining buffer space 10049 <1> ; Here, the potential name was too 10050 <1> ; long for a valid type name. 10051 0000ACA5 F9 <1> stc 10052 0000ACA6 EB1F <1> jmp short .done ; --> 10053 <1> 10054 <1> .endname: 10055 0000ACA8 E8270F <1> call skipwh0 ; skip to next field 10056 0000ACAB 4E <1> dec si ; -> behind potential name 10057 0000ACAC 5F <1> pop di ; -> name buffer 10058 0000ACAD 89D9 <1> mov cx, bx ; cx = length 10059 0000ACAF 56 <1> push si ; save position in input line 10060 0000ACB0 89FE <1> mov si, di ; si-> name buffer 10061 0000ACB2 53 <1> push bx 10062 0000ACB3 57 <1> push di 10063 0000ACB4 F8 <1> clc ; indicate unsigned check 10064 0000ACB5 E81900 <1> call isunsignedtype? ; matches an unsigned type ? 10065 0000ACB8 5E <1> pop si 10066 0000ACB9 59 <1> pop cx 10067 0000ACBA 730B <1> jnc .done ; yes --> 10068 <1> 10069 0000ACBC AC <1> lodsb ; al = first, si-> second character 10070 0000ACBD 49 <1> dec cx ; cx = length less one 10071 0000ACBE 3C53 <1> cmp al, 'S' ; first character an "S" ? 10072 0000ACC0 F9 <1> stc ; (indicate signed check, or: no type) 10073 0000ACC1 7504 <1> jne .done ; no, not signed either --> 10074 0000ACC3 E80B00 <1> call isunsignedtype? ; matches an unsigned type now ? 10075 0000ACC6 43 <1> inc bx ; if NC, set to indicate signed type 10076 <1> .done: 10077 0000ACC7 9F <1> lahf 10078 0000ACC8 5F <1> pop di ; if NC, -> behind matched type name 10079 0000ACC9 83C408 <1> add sp, (maxtypesize+1) & ~1 ; discard name buffer 10080 0000ACCC 5E <1> pop si 10081 0000ACCD 9E <1> sahf 10082 0000ACCE 58 <1> pop ax 10083 0000ACCF 5A <1> pop dx 10084 0000ACD0 C3 <1> retn 10085 <1> 10086 <1> ; Does one of the unsigned type operators start in buffer? 10087 <1> ; 10088 <1> ; INP: si-> name buffer with capitalised potential name 10089 <1> ; cx = length of potential name 10090 <1> ; CY iff looking for signed type 10091 <1> ; OUT: Iff NC, 10092 <1> ; bx>>1 = offset into typebitmasks and typehandlers tables 10093 <1> ; bx&1 = 0 10094 <1> ; CHG: ax, bx, cx, dx, si, di 10095 <1> isunsignedtype?: 10096 0000ACD1 BF[BC82] <1> mov di, types 10097 0000ACD4 19D2 <1> sbb dx, dx ; 0FFFFh if signed check else 0 10098 0000ACD6 E351 <1> jcxz .notype ; if zero characters --> 10099 0000ACD8 83F902 <1> cmp cx, 2 10100 0000ACDB 750C <1> jne @F 10101 0000ACDD 813C4348 <1> cmp word [si], "CH" 10102 0000ACE1 7446 <1> je .notype 10103 0000ACE3 813C3342 <1> cmp word [si], "3B" 10104 0000ACE7 7440 <1> je .notype 10105 <1> @@: 10106 0000ACE9 E214 <1> loop .single_character_checked ; if not single character --> 10107 <1> 10108 0000ACEB AC <1> lodsb ; get that character 10109 0000ACEC 3C53 <1> cmp al, 'S' ; specified "S" or "SS" ? 10110 0000ACEE 7439 <1> je .notype ; yes, not allowed --> 10111 0000ACF0 08D0 <1> or al, dl ; iff signed check, al |= 0FFh 10112 0000ACF2 4E <1> dec si ; (restore) 10113 0000ACF3 3C33 <1> cmp al, '3' 10114 0000ACF5 7432 <1> je .notype 10115 0000ACF7 3C41 <1> cmp al, 'A' ; specified only a valid digit ? 10116 0000ACF9 7204 <1> jb .single_character_checked 10117 0000ACFB 3C47 <1> cmp al, 'F'+1 10118 0000ACFD 722A <1> jb .notype ; yes, not allowed --> 10119 <1> 10120 <1> .single_character_checked: 10121 0000ACFF 41 <1> inc cx ; (restore) 10122 0000AD00 83E2E1 <1> and dx, types.addresses-types.end ; = 0 iff unsigned check 10123 0000AD03 31C0 <1> xor ax, ax ; initialise ah, and ax = 0 first 10124 0000AD05 31DB <1> xor bx, bx 10125 0000AD07 87FE <1> xchg di, si 10126 0000AD09 81C2[0783] <1> add dx, types.end ; = .addresses for signed check, 10127 <1> ; = .end for unsigned check 10128 <1> 10129 <1> ; Before each iteration, 10130 <1> ; si-> byte-counted next name to check 10131 <1> ; di-> potential name (in name buffer) 10132 <1> ; cx = cl = length of potential name 10133 <1> ; (dx-1) = maximum value for si 10134 <1> ; ah = 0 10135 <1> ; Before the first iteration additionally, 10136 <1> ; bx&~3 = index to return for this name (if match) 10137 <1> ; al = 0 10138 <1> ; Before subsequent iterations additionally, 10139 <1> ; (bx+2)&~3 = index to return for this name (if match) 10140 <1> ; al = offset to add to si first 10141 0000AD0D A9 <1> db __TEST_IMM16 ; (skip two times inc bx) 10142 <1> .loop: 10143 0000AD0E 43 <1> inc bx 10144 0000AD0F 43 <1> inc bx ; increase index 10145 0000AD10 01C6 <1> add si, ax ; -> next table entry 10146 0000AD12 AC <1> lodsb ; ax = length of full name 10147 0000AD13 39D6 <1> cmp si, dx ; checked all allowed names? 10148 0000AD15 7312 <1> jae .notype ; yes, done --> 10149 0000AD17 39C8 <1> cmp ax, cx ; full name large enough ? 10150 0000AD19 72F3 <1> jb .loop ; no --> 10151 0000AD1B 57 <1> push di 10152 0000AD1C 51 <1> push cx 10153 0000AD1D 56 <1> push si 10154 0000AD1E F3A6 <1> repe cmpsb ; potential name matches ? 10155 0000AD20 5E <1> pop si 10156 0000AD21 59 <1> pop cx 10157 0000AD22 5F <1> pop di 10158 0000AD23 75E9 <1> jne .loop ; no --> 10159 <1> 10160 0000AD25 80E3FC <1> and bl, ~3 ; conflate alternative type names 10161 0000AD28 A8 <1> db __TEST_IMM8 ; (NC, skip stc) 10162 <1> .notype: 10163 0000AD29 F9 <1> stc 10164 0000AD2A C3 <1> retn 10165 <1> 10166 <1> 10167 <1> usesection lDEBUG_DATA_ENTRY 10168 <1> 10169 <1> ; Table of bit masks and shift counts to determine 10170 <1> ; how a type modifies the bit mask of required bytes. 10171 <1> ; 10172 <1> ; It would be possible to always retrieve a full dword 10173 <1> ; from memory to process indirection in expressions, 10174 <1> ; but this could fault if accessing inexistent data. 10175 <1> ; Hence the debugger should minimise memory access. 10176 <1> ; For this reason, types allow the expression evaluator 10177 <1> ; to keep track which of the term's bytes are actually 10178 <1> ; going to be used. The bit mask of required bytes 10179 <1> ; indicates which bytes are not discarded by any of a 10180 <1> ; term's type operators. 10181 <1> ; 10182 <1> ; The second byte of each entry (applied to ch by the 10183 <1> ; reader, ie high byte of cx) indicates a mask to 10184 <1> ; apply to the bit mask of required bytes. Note that 10185 <1> ; this mask is applied first, before the shift that's 10186 <1> ; described next. 10187 <1> ; The first byte of each entry (loaded into cl by the 10188 <1> ; reader, ie low byte of cx) indicates a shift left 10189 <1> ; count to apply to the bit mask of required bytes. 10190 <1> ; (Only the segment type doesn't have 0 currently.) 10191 <1> ; 10192 <1> ; Note that types are parsed forwards through the input 10193 <1> ; (ie the specified command) but are actually applied 10194 <1> ; to the numeric value they refer to backwards, that 10195 <1> ; is, a type that is closer to the term in the input 10196 <1> ; is applied to the term's result before a type that's 10197 <1> ; farther from the term. 10198 <1> ; Misleadingly, this reversal isn't very apparent in 10199 <1> ; most processing of the type and unary operators. 10200 <1> ; The segment type's shifting and masking reflects the 10201 <1> ; reversal: while the actual operation is to shift 10202 <1> ; right then restrict to the low word, the entry in 10203 <1> ; this table indicates to restrict the bit mask to 10204 <1> ; the low word then shift left. 10205 <1> align 2, db 0 10206 <1> typebitmasks: 10207 000092C0 0001 <1> db 0, 1b ; byte 10208 000092C2 0003 <1> db 0, 11b ; word 10209 000092C4 0007 <1> db 0, 111b ; 3byte 10210 000092C6 000F <1> db 0, 1111b ; dword 10211 000092C8 000F <1> db 0, 1111b ; pointer 10212 000092CA 0003 <1> db 0, 11b ; offset 10213 000092CC 0203 <1> db 2, 11b ; segment 10214 <1> 10215 <1> 10216 <1> ; Dispatch table for type conversion functions. 10217 <1> ; 10218 <1> ; INP: bx:dx = dword input 10219 <1> ; CF = signedness of type conversion 10220 <1> ; ah from lahf with the same CF as current 10221 <1> ; al = type (80h = pointer, 40h = signed) 10222 <1> ; OUT: bx:dx = new value 10223 <1> ; ah = type (80h = pointer, 40h = signed) 10224 <1> ; CHG: ax 10225 <1> align 2, db 0 10226 <1> typehandlers: 10227 000092CE [3EAD] <1> dw handlebyte 10228 000092D0 [49AD] <1> dw handleword 10229 000092D2 [31AD] <1> dw handle3byte 10230 000092D4 [54AD] <1> dw handledword 10231 000092D6 [5CAD] <1> dw handlepointer 10232 000092D8 [49AD] <1> dw handleoffset 10233 000092DA [2BAD] <1> dw handlesegment 10234 <1> 10235 <1> 10236 <1> usesection lDEBUG_CODE 10237 <1> 10238 <1> handlesegment: 10239 0000AD2B 89DA <1> mov dx, bx 10240 0000AD2D 30E4 <1> xor ah, ah ; NC, ah = 0 10241 0000AD2F EB18 <1> jmp short handleword 10242 <1> handleoffset equ handleword 10243 <1> 10244 <1> handle3byte: 10245 0000AD31 B700 <1> mov bh, 0 10246 0000AD33 7307 <1> jnc .zero ; (iff unsigned type -->) 10247 0000AD35 84DB <1> test bl, bl ; signed ? 10248 0000AD37 7902 <1> jns .zero_f ; no --> 10249 0000AD39 FECF <1> dec bh 10250 <1> .zero_f: 10251 0000AD3B 9E <1> sahf ; restore CF 10252 <1> .zero: 10253 0000AD3C EB16 <1> jmp handledword 10254 <1> 10255 <1> handlebyte: 10256 0000AD3E B600 <1> mov dh, 0 10257 0000AD40 7307 <1> jnc .zero ; (iff unsigned type -->) 10258 0000AD42 84D2 <1> test dl, dl ; signed ? 10259 0000AD44 7902 <1> jns .zero_f ; no --> 10260 0000AD46 FECE <1> dec dh 10261 <1> .zero_f: 10262 0000AD48 9E <1> sahf ; restore CF 10263 <1> .zero: 10264 <1> handleword: 10265 0000AD49 BB0000 <1> mov bx, 0 10266 0000AD4C 7306 <1> jnc .zero ; (iff unsigned type -->) 10267 0000AD4E 85D2 <1> test dx, dx ; signed ? 10268 0000AD50 7901 <1> jns .zero_f ; no --> 10269 0000AD52 4B <1> dec bx 10270 <1> .zero_f: 10271 0000AD53 9E <1> sahf ; restore CF 10272 <1> .zero: 10273 <1> handledword: 10274 0000AD54 7203 <1> jc .signed ; if signed --> 10275 0000AD56 30E4 <1> xor ah, ah ; return pointer=0 signed=0 10276 0000AD58 C3 <1> retn 10277 <1> 10278 <1> .signed: 10279 0000AD59 B440 <1> mov ah, 40h ; return pointer=0 signed=1 10280 0000AD5B C3 <1> retn 10281 <1> 10282 <1> handlepointer: 10283 0000AD5C B480 <1> mov ah, 80h ; return pointer=1 signed=0 10284 0000AD5E C3 <1> retn 10285 <1> 10286 <1> 10287 <1> usesection lDEBUG_DATA_ENTRY 10288 <1> 10289 <1> ; List of binary and unary operators. 10290 <1> ; The order has to match that in the respective 10291 <1> ; operator handler dispatch table below. 10292 <1> align 2, db 0 10293 <1> operators: 10294 000092DC 13002B2D2A2F253C3E- <1> .: countedw "+-*/%<>=!|&^oOaAxX?" 10294 000092E5 3D217C265E6F4F6141- <1> 10294 000092EE 78583F <1> 10295 <1> .amount: equ $ - . - 2 10296 000092F1 00 <1> align 2, db 0 10297 <1> unaryoperators: 10298 000092F2 05002B2D7E213F <1> .: countedw "+-~!?" 10299 <1> .amount: equ $ - . - 2 10300 <1> 10301 <1> 10302 <1> ; Dispatch table for unary operators, 10303 <1> ; used by getexpression. 10304 <1> ; Functions in this table are called with: 10305 <1> ; 10306 <1> ; INP: bx:dx = number 10307 <1> ; ah = type 10308 <1> ; OUT: bx:dx = result 10309 <1> ; ah = type 10310 <1> ; CHG: - 10311 000092F9 00 <1> align 2, db 0 10312 <1> unaryoperatorhandlers: 10313 <1> .: 10314 000092FA [71AD] <1> dw uoh_plus ; + 10315 000092FC [67AD] <1> dw uoh_minus ; - 10316 000092FE [72AD] <1> dw uoh_not_bitwise ; ~ 10317 00009300 [79AD] <1> dw uoh_not_boolean ; ! 10318 00009302 [5FAD] <1> dw uoh_abs ; ? 10319 <1> .amount: equ ($ - .) / 2 10320 <1> %if .amount != unaryoperators.amount 10321 <1> %error String and table mismatch 10322 <1> %endif 10323 <1> 10324 <1> 10325 <1> usesection lDEBUG_CODE 10326 <1> 10327 <1> uoh_abs: 10328 0000AD5F 80E4BF <1> and ah, ~ 40h ; make type signed=0 10329 0000AD62 F6C780 <1> test bh, 80h ; negative ? 10330 0000AD65 740A <1> jz uoh_plus ; no --> 10331 <1> uoh_minus: 10332 0000AD67 80CC40 <1> or ah, 40h ; make type signed=1 10333 <1> calculate_minus_bxdx: 10334 0000AD6A F7DB <1> neg bx 10335 0000AD6C F7DA <1> neg dx 10336 0000AD6E 83DB00 <1> sbb bx, byte 0 ; neg bx:dx 10337 <1> uoh_plus: ; (nop) 10338 0000AD71 C3 <1> retn 10339 <1> 10340 <1> uoh_not_bitwise: 10341 0000AD72 B400 <1> mov ah, 0 ; make type pointer=0 signed=0 10342 0000AD74 F7D3 <1> not bx 10343 0000AD76 F7D2 <1> not dx 10344 0000AD78 C3 <1> retn 10345 <1> 10346 <1> uoh_not_boolean: 10347 0000AD79 B400 <1> mov ah, 0 ; make type pointer=0 signed=0 10348 0000AD7B E80202 <1> call toboolean 10349 0000AD7E 80F201 <1> xor dl, 1 ; toggle only bit 0 10350 0000AD81 C3 <1> retn 10351 <1> 10352 <1> 10353 <1> usesection lDEBUG_DATA_ENTRY 10354 <1> 10355 <1> ; Word table operatordispatchers: order as in string operators 10356 <1> ; Pointed functions dispatch depending on operator characters 10357 <1> ; Return: operator index, 0 = invalid 10358 <1> 10359 <1> ; Operator index (byte): 10360 <1> ; 0 = invalid, no operator found 10361 <1> ; 1.. = 1-based index in byte table operatorprecedences 10362 <1> ; = 1-based index in word table operatorfunctions 10363 <1> 10364 <1> 10365 <1> ; Dispatch table for (binary) expression operators, 10366 <1> ; used by getexpression. 10367 <1> ; Functions in this table are called with: 10368 <1> ; INP: al = operator character (which is also implicit) 10369 <1> ; si-> remaining line (directly) behind operator character 10370 <1> ; OUT: bl != 0 if a valid operator, 10371 <1> ; bl = operator index 10372 <1> ; si-> behind the last character belonging to the operator 10373 <1> ; bl = 0 if no valid operator 10374 <1> ; CHG: al, bh, dx 10375 <1> 10376 <1> struc opprecs 10377 00000000 ?? <1> OPPREC_INVALID: resb 1 10378 00000001 ?? <1> OPPREC_COND: resb 1 10379 00000002 ?? <1> OPPREC_BOOL_OR: resb 1 10380 00000003 ?? <1> OPPREC_BOOL_XOR:resb 1 10381 00000004 ?? <1> OPPREC_BOOL_AND:resb 1 10382 00000005 ?? <1> OPPREC_COMPARE: resb 1 10383 00000006 ?? <1> OPPREC_BIT_OR: resb 1 10384 00000007 ?? <1> OPPREC_BIT_XOR: resb 1 10385 00000008 ?? <1> OPPREC_BIT_AND: resb 1 10386 00000009 ?? <1> OPPREC_SHIFT: resb 1 10387 0000000A ?? <1> OPPREC_ADDSUB: resb 1 10388 0000000B ?? <1> OPPREC_MULDIV: resb 1 10389 0000000C ?? <1> OPPREC_POWER: resb 1 10390 <1> OPPREC_RIGHTOP: ; (to process it first in getexpression) 10391 <1> endstruc 10392 <1> ; The number of precedence levels indicates how many 10393 <1> ; intermediate results getexpression might have to save 10394 <1> ; on its stack. With eleven levels of precedence, up to 10395 <1> ; ten intermediate results are pushed by getexpression. 10396 <1> ; (With 6 bytes each, that gives a moderate 60 bytes.) 10397 <1> ; Key to this is that, in case of a low enough operator 10398 <1> ; behind the one that triggered the pushing, the pushed 10399 <1> ; value will be popped before proceeding. This way more 10400 <1> ; intermediate results may be pushed later but the stack 10401 <1> ; never holds intermediate results that don't need to be 10402 <1> ; on the stack. 10403 <1> 10404 <1> ; This is the definition of operator index values. The tables 10405 <1> ; operatorprecedences and operatorfunctions are ordered by this. 10406 <1> ; The operator dispatchers return one of these. 10407 <1> struc ops 10408 00000000 ?? <1> OPERATOR_INVALID: resb 1 ; 0 - invalid 10409 00000001 ?? <1> OPERATOR_PLUS: resb 1 ; + 10410 00000002 ?? <1> OPERATOR_MINUS: resb 1 ; - 10411 00000003 ?? <1> OPERATOR_MULTIPLY: resb 1 ; * 10412 00000004 ?? <1> OPERATOR_DIVIDE: resb 1 ; / 10413 00000005 ?? <1> OPERATOR_MODULO: resb 1 ; % 10414 00000006 ?? <1> OPERATOR_POWER: resb 1 ; ** 10415 00000007 ?? <1> OPERATOR_CMP_BELOW: resb 1 ; < 10416 00000008 ?? <1> OPERATOR_CMP_BELOW_EQUAL: resb 1 ; <= 10417 00000009 ?? <1> OPERATOR_CMP_ABOVE: resb 1 ; > 10418 0000000A ?? <1> OPERATOR_CMP_ABOVE_EQUAL: resb 1 ; >= 10419 0000000B ?? <1> OPERATOR_CMP_EQUAL: resb 1 ; == 10420 0000000C ?? <1> OPERATOR_CMP_NOT_EQUAL: resb 1 ; != 10421 0000000D ?? <1> OPERATOR_SHIFT_LEFT: resb 1 ; << 10422 0000000E ?? <1> OPERATOR_SHIFT_RIGHT: resb 1 ; >> 10423 0000000F ?? <1> OPERATOR_SHIFT_RIGHT_SIGNED: resb 1 ; >>> 10424 00000010 ?? <1> OPERATOR_BIT_MIRROR: resb 1 ; >< 10425 00000011 ?? <1> OPERATOR_BIT_OR: resb 1 ; | 10426 00000012 ?? <1> OPERATOR_BIT_XOR: resb 1 ; ^ 10427 00000013 ?? <1> OPERATOR_BIT_AND: resb 1 ; & 10428 00000014 ?? <1> OPERATOR_BOOL_OR: resb 1 ; || 10429 00000015 ?? <1> OPERATOR_BOOL_XOR: resb 1 ; ^^ 10430 00000016 ?? <1> OPERATOR_BOOL_AND: resb 1 ; && 10431 00000017 ?? <1> OPERATOR_COND: resb 1 ; ?? :: construct (special) 10432 00000018 ?? <1> OPERATOR_RIGHTOP: resb 1 ; (dummy right-operand operator) 10433 <1> endstruc 10434 <1> ; Order of BIT_* needs to be the same as that of BOOL_*. 10435 <1> ; BOOL_* have to follow directly behind BIT_*. 10436 <1> ; "r cf op= expr" depends on that. 10437 <1> 10438 <1> align 2, db 0 10439 <1> operatordispatchers: 10440 <1> .: 10441 00009304 [85AD] <1> dw od_plus ; + 10442 00009306 [82AD] <1> dw od_minus ; - 10443 00009308 [88AD] <1> dw od_multiply ; * ** 10444 0000930A [92AD] <1> dw od_divide ; / 10445 0000930C [95AD] <1> dw od_modulo ; % 10446 0000930E [BDAD] <1> dw od_below ; < <> <= << 10447 00009310 [98AD] <1> dw od_above ; > >< >= >> >>> 10448 00009312 [DAAD] <1> dw od_equal ; == =< => 10449 00009314 [ECAD] <1> dw od_not ; != 10450 00009316 [F4AD] <1> dw od_or ; | || 10451 00009318 [FFAD] <1> dw od_and ; & && 10452 0000931A [0AAE] <1> dw od_xor ; ^ ^^ 10453 0000931C [1CAE] <1> dw od_o ; o 10454 0000931E [1CAE] <1> dw od_o ; O 10455 00009320 [23AE] <1> dw od_a ; a 10456 00009322 [23AE] <1> dw od_a ; A 10457 00009324 [2AAE] <1> dw od_x ; x 10458 00009326 [2AAE] <1> dw od_x ; X 10459 00009328 [15AE] <1> dw od_cond ; ? 10460 <1> .end: equ $ - . 10461 <1> .amount: equ ($ - .) / 2 10462 <1> %if .amount != operators.amount 10463 <1> %error String and table mismatch 10464 <1> %endif 10465 <1> %if .amount > 100h 10466 <1> %error Too many operator dispatchers 10467 <1> %endif 10468 <1> 10469 <1> 10470 <1> operatorprecedences: 10471 <1> .: 10472 0000932A 00 <1> db OPPREC_INVALID ; need this for some checks 10473 0000932B 0A <1> db OPPREC_ADDSUB ; + 10474 0000932C 0A <1> db OPPREC_ADDSUB ; - 10475 0000932D 0B <1> db OPPREC_MULDIV ; * 10476 0000932E 0B <1> db OPPREC_MULDIV ; / 10477 0000932F 0B <1> db OPPREC_MULDIV ; % 10478 00009330 0C <1> db OPPREC_POWER ; ** 10479 00009331 05 <1> db OPPREC_COMPARE ; < 10480 00009332 05 <1> db OPPREC_COMPARE ; <= 10481 00009333 05 <1> db OPPREC_COMPARE ; > 10482 00009334 05 <1> db OPPREC_COMPARE ; >= 10483 00009335 05 <1> db OPPREC_COMPARE ; == 10484 00009336 05 <1> db OPPREC_COMPARE ; != 10485 00009337 09 <1> db OPPREC_SHIFT ; << 10486 00009338 09 <1> db OPPREC_SHIFT ; >> 10487 00009339 09 <1> db OPPREC_SHIFT ; >>> 10488 0000933A 09 <1> db OPPREC_SHIFT ; >< 10489 0000933B 06 <1> db OPPREC_BIT_OR ; | 10490 0000933C 07 <1> db OPPREC_BIT_XOR ; ^ 10491 0000933D 08 <1> db OPPREC_BIT_AND ; & 10492 0000933E 02 <1> db OPPREC_BOOL_OR ; || 10493 0000933F 03 <1> db OPPREC_BOOL_XOR ; ^^ 10494 00009340 04 <1> db OPPREC_BOOL_AND ; && 10495 00009341 01 <1> db OPPREC_COND ; ?? :: construct 10496 00009342 0D <1> db OPPREC_RIGHTOP ; getexpression: no number yet 10497 <1> .amount: equ $ - . 10498 <1> %if .amount != ops_size 10499 <1> %error Operators table size mismatch 10500 <1> %endif 10501 <1> 10502 <1> 10503 00009343 00 <1> align 2, db 0 10504 <1> operatorfunctions: 10505 <1> .: 10506 00009344 [4AA7] <1> dw error ; should not be called 10507 00009346 [5AAE] <1> dw of_plus ; + 10508 00009348 [57AE] <1> dw of_minus ; - 10509 0000934A [67AE] <1> dw of_multiply ; * 10510 0000934C [92AE] <1> dw of_divide ; / 10511 0000934E [37AE] <1> dw of_modulo ; % 10512 00009350 [09AF] <1> dw of_power ; ** 10513 00009352 [62AF] <1> dw of_compare_below ; < 10514 00009354 [5CAF] <1> dw of_compare_below_equal ; <= 10515 00009356 [7AAF] <1> dw of_compare_above ; > 10516 00009358 [74AF] <1> dw of_compare_above_equal ; >= 10517 0000935A [6EAF] <1> dw of_compare_equal ; == 10518 0000935C [68AF] <1> dw of_compare_not_equal ; != 10519 0000935E [B5AF] <1> dw of_shift_left ; << 10520 00009360 [9DAF] <1> dw of_shift_right ; >> 10521 00009362 [A9AF] <1> dw of_shift_right_signed ; >>> 10522 00009364 [DCAF] <1> dw of_bit_mirror ; >< 10523 00009366 [27B0] <1> dw of_or_bitwise ; | 10524 00009368 [4AB0] <1> dw of_xor_bitwise ; ^ 10525 0000936A [39B0] <1> dw of_and_bitwise ; & 10526 0000936C [32B0] <1> dw of_or_boolean ; || 10527 0000936E [54B0] <1> dw of_xor_boolean ; ^^ 10528 00009370 [43B0] <1> dw of_and_boolean ; && 10529 00009372 [E9B9] <1> dw of_cond ; ?? :: construct 10530 00009374 [8AAF] <1> dw of_rightop ; set to right operand 10531 <1> .amount: equ ($ - .) / 2 10532 <1> %if .amount != ops_size 10533 <1> %error Operators table size mismatch 10534 <1> %endif 10535 <1> 10536 <1> 10537 <1> usesection lDEBUG_CODE 10538 <1> 10539 <1> od_minus: 10540 0000AD82 B302 <1> mov bl, OPERATOR_MINUS 10541 0000AD84 C3 <1> retn 10542 <1> 10543 <1> od_plus: 10544 0000AD85 B301 <1> mov bl, OPERATOR_PLUS 10545 0000AD87 C3 <1> retn 10546 <1> 10547 <1> od_multiply: 10548 0000AD88 B303 <1> mov bl, OPERATOR_MULTIPLY 10549 0000AD8A 3804 <1> cmp byte [si], al 10550 0000AD8C 7503 <1> jne .ret 10551 0000AD8E 46 <1> inc si 10552 0000AD8F B306 <1> mov bl, OPERATOR_POWER 10553 <1> .ret: 10554 0000AD91 C3 <1> retn 10555 <1> 10556 <1> od_divide: 10557 0000AD92 B304 <1> mov bl, OPERATOR_DIVIDE 10558 0000AD94 C3 <1> retn 10559 <1> 10560 <1> od_modulo: 10561 0000AD95 B305 <1> mov bl, OPERATOR_MODULO 10562 0000AD97 C3 <1> retn 10563 <1> 10564 <1> od_above: 10565 0000AD98 3804 <1> cmp byte [si], al 10566 0000AD9A 7411 <1> je .shr 10567 0000AD9C 803C3C <1> cmp byte [si], '<' 10568 0000AD9F 7418 <1> je .mirror 10569 0000ADA1 803C3D <1> cmp byte [si], '=' 10570 0000ADA4 7403 <1> je .cmp_ae 10571 0000ADA6 B309 <1> mov bl, OPERATOR_CMP_ABOVE 10572 0000ADA8 C3 <1> retn 10573 <1> .cmp_ae: 10574 0000ADA9 46 <1> inc si 10575 0000ADAA B30A <1> mov bl, OPERATOR_CMP_ABOVE_EQUAL 10576 0000ADAC C3 <1> retn 10577 <1> .shr: 10578 0000ADAD 46 <1> inc si 10579 0000ADAE 3804 <1> cmp byte [si], al 10580 0000ADB0 7403 <1> je .sar 10581 0000ADB2 B30E <1> mov bl, OPERATOR_SHIFT_RIGHT 10582 0000ADB4 C3 <1> retn 10583 <1> .sar: 10584 0000ADB5 46 <1> inc si 10585 0000ADB6 B30F <1> mov bl, OPERATOR_SHIFT_RIGHT_SIGNED 10586 0000ADB8 C3 <1> retn 10587 <1> .mirror: 10588 0000ADB9 46 <1> inc si 10589 0000ADBA B310 <1> mov bl, OPERATOR_BIT_MIRROR 10590 0000ADBC C3 <1> retn 10591 <1> 10592 <1> od_below: 10593 0000ADBD 3804 <1> cmp byte [si], al 10594 0000ADBF 7411 <1> je .shl 10595 0000ADC1 803C3E <1> cmp byte [si], '>' 10596 0000ADC4 7410 <1> je .ncmp 10597 0000ADC6 803C3D <1> cmp byte [si], '=' 10598 0000ADC9 7403 <1> je .cmp_be 10599 0000ADCB B307 <1> mov bl, OPERATOR_CMP_BELOW 10600 0000ADCD C3 <1> retn 10601 <1> .cmp_be: 10602 0000ADCE 46 <1> inc si 10603 0000ADCF B308 <1> mov bl, OPERATOR_CMP_BELOW_EQUAL 10604 0000ADD1 C3 <1> retn 10605 <1> .shl: 10606 0000ADD2 46 <1> inc si 10607 0000ADD3 B30D <1> mov bl, OPERATOR_SHIFT_LEFT 10608 0000ADD5 C3 <1> retn 10609 <1> .ncmp: 10610 <1> od_not.ncmp: 10611 0000ADD6 46 <1> inc si 10612 0000ADD7 B30C <1> mov bl, OPERATOR_CMP_NOT_EQUAL 10613 0000ADD9 C3 <1> retn 10614 <1> 10615 <1> od_equal: 10616 0000ADDA 803C3E <1> cmp byte [si], '>' 10617 0000ADDD 74CA <1> je od_above.cmp_ae 10618 0000ADDF 803C3C <1> cmp byte [si], '<' 10619 0000ADE2 74EA <1> je od_below.cmp_be 10620 0000ADE4 3804 <1> cmp byte [si], al 10621 0000ADE6 7509 <1> jne .invalid ; no valid operator --> 10622 <1> .cmp: 10623 0000ADE8 46 <1> inc si 10624 0000ADE9 B30B <1> mov bl, OPERATOR_CMP_EQUAL 10625 0000ADEB C3 <1> retn 10626 <1> 10627 <1> od_not: 10628 0000ADEC 803C3D <1> cmp byte [si], '=' 10629 0000ADEF 74E5 <1> je .ncmp 10630 <1> od_equal.invalid: 10631 0000ADF1 B300 <1> mov bl, OPERATOR_INVALID 10632 0000ADF3 C3 <1> retn 10633 <1> 10634 <1> od_or: 10635 0000ADF4 3804 <1> cmp byte [si], al 10636 0000ADF6 7403 <1> je .boolean 10637 0000ADF8 B311 <1> mov bl, OPERATOR_BIT_OR 10638 0000ADFA C3 <1> retn 10639 <1> .boolean: 10640 0000ADFB 46 <1> inc si 10641 0000ADFC B314 <1> mov bl, OPERATOR_BOOL_OR 10642 0000ADFE C3 <1> retn 10643 <1> od_and: 10644 0000ADFF 3804 <1> cmp byte [si], al 10645 0000AE01 7403 <1> je .boolean 10646 0000AE03 B313 <1> mov bl, OPERATOR_BIT_AND 10647 0000AE05 C3 <1> retn 10648 <1> .boolean: 10649 0000AE06 46 <1> inc si 10650 0000AE07 B316 <1> mov bl, OPERATOR_BOOL_AND 10651 0000AE09 C3 <1> retn 10652 <1> 10653 <1> od_xor: 10654 0000AE0A 3804 <1> cmp byte [si], al 10655 0000AE0C 7403 <1> je .boolean 10656 0000AE0E B312 <1> mov bl, OPERATOR_BIT_XOR 10657 0000AE10 C3 <1> retn 10658 <1> .boolean: 10659 0000AE11 46 <1> inc si 10660 0000AE12 B315 <1> mov bl, OPERATOR_BOOL_XOR 10661 0000AE14 C3 <1> retn 10662 <1> 10663 <1> 10664 <1> od_cond: 10665 0000AE15 B317 <1> mov bl, OPERATOR_COND 10666 0000AE17 BA[6266] <1> mov dx, msg.questionmark 10667 0000AE1A EB13 <1> jmp od_string_common 10668 <1> 10669 <1> od_o: 10670 0000AE1C B311 <1> mov bl, OPERATOR_BIT_OR 10671 0000AE1E BA[6566] <1> mov dx, msg.r 10672 0000AE21 EB0C <1> jmp od_string_common 10673 <1> 10674 <1> od_a: 10675 0000AE23 B313 <1> mov bl, OPERATOR_BIT_AND 10676 0000AE25 BA[6766] <1> mov dx, msg.nd 10677 0000AE28 EB05 <1> jmp od_string_common 10678 <1> 10679 <1> od_x: 10680 0000AE2A B312 <1> mov bl, OPERATOR_BIT_XOR 10681 0000AE2C BA[6466] <1> mov dx, msg.or 10682 <1> ; jmp od_string_common 10683 <1> 10684 <1> od_string_common: 10685 0000AE2F E8EB0C <1> call isstring? 10686 0000AE32 7402 <1> je .ret 10687 <1> .none: 10688 0000AE34 31DB <1> xor bx, bx 10689 <1> .ret: 10690 0000AE36 C3 <1> retn 10691 <1> 10692 <1> 10693 <1> ; (Binary) Expression operator functions, 10694 <1> ; used by getexpression. 10695 <1> ; These functions are called with: 10696 <1> ; INP: dword [hhvar] = previous number (left-hand operand) 10697 <1> ; byte [hhtype] = previous type 10698 <1> ; bx:dx = following number (right-hand operand) 10699 <1> ; ah = following type 10700 <1> ; OUT: bx:dx = result 10701 <1> ; ah = type 10702 <1> ; CHG: ax, cx 10703 <1> ; Note: Errors (divisor zero) are currently simply handled 10704 <1> ; by jumping to "error". 10705 <1> ; getexpression mustn't be called after until hhvar is 10706 <1> ; no longer used, as the call might overwrite hhvar. 10707 <1> ; 10708 <1> ; Type info (in ah and b[hhtype]) appears to be correctly 10709 <1> ; passed to here already. However, how should that be used? 10710 <1> ; 10711 <1> ; Quite simply, doing any arithmetic on two unsigned numbers 10712 <1> ; could return the smallest possible unsigned type (so that 10713 <1> ; if the result is <= 255 then the type is 1, if <= 65536 10714 <1> ; then the type is 2, else the type is 4). 10715 <1> ; 10716 <1> ; Handling two signed numbers here might be equally simple: 10717 <1> ; if the result is >= -128 && <= 127 then the type is 81h, 10718 <1> ; if the result is >= -32768 && <= 32767 then the type is 10719 <1> ; 82h, otherwise the type is 84h. Have to look into this. 10720 <1> ; (How does this interact with the unsignedness of the 10721 <1> ; actual computations?) 10722 <1> ; 10723 <1> ; It gets hairy when one operand is signed and the other 10724 <1> ; isn't; generally, two sub-cases of this exist: first, the 10725 <1> ; signed operand is positive, second, the signed operand is 10726 <1> ; negative. (Whether this distinction actually makes sense 10727 <1> ; for the implementation is still to be determined.) 10728 <1> ; Possible models: 10729 <1> ; * Result is always signed. 10730 <1> ; * Result is always unsigned(?!). 10731 <1> ; * Result is treated as signed, but if it's positive its 10732 <1> ; type is changed to unsigned. 10733 <1> ; 10734 <1> ; It is also possible that operators could be handled 10735 <1> ; differently, for example, (some) bit and boolean 10736 <1> ; operators could imply unsigned operands in any case. 10737 <1> ; (>>> obviously implies a signed left operand already.) 10738 <1> ; 10739 <1> ; Note that (signed) negative bit shifting counts could 10740 <1> ; imply reversing the operation; << becomes >> and such. 10741 <1> ; 10742 <1> ; Note that for the addition of, for example, bit rotation, 10743 <1> ; it would be useful to retain the originally used type 10744 <1> ; inside getdword. At the end of getdword, the current bit 10745 <1> ; counting could be changed to use the "signed" bit of the 10746 <1> ; types and then determine which signed or unsigned type is 10747 <1> ; large enough to hold the value. (It might already work 10748 <1> ; mostly like that.) (Is this specifically about binary 10749 <1> ; operators? - No. In fact, binary operators are the most 10750 <1> ; likely to be (one of) the syntactic element(s) which 10751 <1> ; should change (and possible 'optimize') types. - Then 10752 <1> ; this might still apply to unary operators, and brackets 10753 <1> ; and parentheses. In particular, the later should call 10754 <1> ; a different entry or instruct getdword not to optimize 10755 <1> ; the type at the end so as to retain it. - Although in 10756 <1> ; cases where that matters, the parentheses are arguably 10757 <1> ; unnecessary, aren't they?) 10758 <1> ; 10759 <1> ; It has to be decided whether there should be implicit 10760 <1> ; dispatching based on the operands' types' signedness. 10761 <1> ; For example, currently (with all operands being implied 10762 <1> ; to be unsigned) there exist >> and >>>, and there could 10763 <1> ; exist > and S>. With implicit signedness dispatching, the 10764 <1> ; behaviour of >> would change: it would expose the current 10765 <1> ; >>'s behaviour with an unsigned (left) operand, and the 10766 <1> ; current >>>'s behaviour with a signed (left) operand. 10767 <1> ; (Either U(nsigned)>> and S(igned)>> operators could then 10768 <1> ; exist, which would imply an unsigned or signed left 10769 <1> ; operand respectively, or the affected operands' signedness 10770 <1> ; could be changed with the currently available prefix or 10771 <1> ; possible new postfix unary operators. 10772 <1> of_modulo: 10773 0000AE37 FF36[A298] <1> push word [hhvar+2] 10774 0000AE3B FF36[A098] <1> push word [hhvar] 10775 0000AE3F 53 <1> push bx 10776 0000AE40 52 <1> push dx 10777 0000AE41 E84E00 <1> call of_divide ; bx:dx := prev / foll 10778 0000AE44 8F06[A098] <1> pop word [hhvar] 10779 0000AE48 8F06[A298] <1> pop word [hhvar+2] 10780 0000AE4C E81800 <1> call of_multiply ; bx:dx := (prev / foll) * foll 10781 0000AE4F 8F06[A098] <1> pop word [hhvar] 10782 0000AE53 8F06[A298] <1> pop word [hhvar+2] 10783 <1> ; jmp short of_minus ; bx:dx := prev - ((prev / foll) * foll) 10784 <1> 10785 <1> of_minus: 10786 0000AE57 E810FF <1> call calculate_minus_bxdx 10787 <1> of_plus: 10788 0000AE5A 0316[A098] <1> add dx, word [hhvar] 10789 0000AE5E 131E[A298] <1> adc bx, word [hhvar+2] 10790 <1> or_hhtype: 10791 0000AE62 0A26[A998] <1> or ah, byte [hhtype] 10792 0000AE66 C3 <1> retn 10793 <1> 10794 <1> of_multiply: ; bx:dx := var * bx:dx 10795 0000AE67 0826[A998] <1> or byte [hhtype], ah 10796 0000AE6B 56 <1> push si 10797 0000AE6C 57 <1> push di ; si:di is used as temporary storage 10798 0000AE6D 89D0 <1> mov ax, dx 10799 0000AE6F 50 <1> push ax 10800 0000AE70 F726[A098] <1> mul word [hhvar] 10801 0000AE74 89C7 <1> mov di, ax 10802 0000AE76 89D6 <1> mov si, dx 10803 0000AE78 58 <1> pop ax 10804 0000AE79 F726[A298] <1> mul word [hhvar+2] 10805 0000AE7D 01C6 <1> add si, ax 10806 0000AE7F 89D8 <1> mov ax, bx 10807 0000AE81 F726[A098] <1> mul word [hhvar] 10808 0000AE85 01C6 <1> add si, ax 10809 <1> ; bx*[hhvar+2] not required, completely overflows 10810 0000AE87 89FA <1> mov dx, di 10811 0000AE89 89F3 <1> mov bx, si 10812 0000AE8B 5F <1> pop di 10813 0000AE8C 5E <1> pop si ; restore those 10814 <1> set_hhtype: 10815 0000AE8D 8A26[A998] <1> mov ah, byte [hhtype] 10816 0000AE91 C3 <1> retn 10817 <1> 10818 <1> of_divide: ; bx:dx := var / bx:dx 10819 0000AE92 0826[A998] <1> or byte [hhtype], ah 10820 0000AE96 53 <1> push bx 10821 0000AE97 09D3 <1> or bx, dx ; divisor zero ? 10822 0000AE99 5B <1> pop bx 10823 0000AE9A 7503E9ABF8 <1> jz error ; divisor zero ! 10824 0000AE9F EB48 <1> _386_jmps .32 ; 386, use 32-bit code --> 10825 0000AEA1 85DB <1> test bx, bx ; need only 16-bit divisor ? 10826 0000AEA3 7514 <1> jnz .difficultdiv16 ; nope --> 10827 0000AEA5 89D1 <1> mov cx, dx 10828 0000AEA7 31D2 <1> xor dx, dx 10829 0000AEA9 A1[A298] <1> mov ax, word [hhvar+2] ; dx:ax = high word of previous number 10830 0000AEAC F7F1 <1> div cx 10831 0000AEAE 89C3 <1> mov bx, ax 10832 0000AEB0 A1[A098] <1> mov ax, word [hhvar] ; ax = low word of previous number, dx = remainder 10833 0000AEB3 F7F1 <1> div cx 10834 0000AEB5 89C2 <1> mov dx, ax ; bx:dx = result 10835 0000AEB7 EBD4 <1> jmp set_hhtype 10836 <1> 10837 <1> .difficultdiv16: ; code adapted from Art of Assembly chapter 9 10838 <1> ; refer to http://www.plantation-productions.com/Webster/www.artofasm.com/DOS/ch09/CH09-4.html#HEADING4-99 10839 0000AEB9 B92000 <1> mov cx, 32 10840 0000AEBC 55 <1> push bp 10841 0000AEBD 56 <1> push si 10842 0000AEBE 57 <1> push di 10843 0000AEBF A1[A098] <1> mov ax, word [hhvar] 10844 0000AEC2 8B2E[A298] <1> mov bp, word [hhvar+2] ; bp:ax = previous number 10845 0000AEC6 31FF <1> xor di, di 10846 0000AEC8 31F6 <1> xor si, si ; clear variable si:di 10847 0000AECA 92 <1> xchg ax, dx 10848 0000AECB 87EB <1> xchg bp, bx ; bx:dx = previous number, bp:ax = divisor 10849 <1> .bitloop: 10850 0000AECD D1E2 <1> shl dx, 1 10851 0000AECF D1D3 <1> rcl bx, 1 10852 0000AED1 D1D7 <1> rcl di, 1 10853 0000AED3 D1D6 <1> rcl si, 1 ; si:di:bx:dx << 1 10854 0000AED5 39EE <1> cmp si, bp ; does the divisor fit into si:di here ? 10855 0000AED7 7502 <1> jne @F 10856 0000AED9 39C7 <1> cmp di, ax 10857 <1> @@: 10858 0000AEDB 7205 <1> jb .trynext ; no --> 10859 <1> .goesinto: 10860 0000AEDD 29C7 <1> sub di, ax 10861 0000AEDF 19EE <1> sbb si, bp ; subtract divisor 10862 0000AEE1 42 <1> inc dx ; set a bit of the result (bit was zero before, never carries) 10863 <1> .trynext: 10864 0000AEE2 E2E9 <1> loop .bitloop ; loop for 32 bits 10865 0000AEE4 5F <1> pop di 10866 0000AEE5 5E <1> pop si 10867 0000AEE6 5D <1> pop bp 10868 0000AEE7 EBA4 <1> jmp set_hhtype 10869 <1> 10870 <1> %ifn _ONLYNON386 10871 <1> .32: 10872 <1> [cpu 386] 10873 0000AEE9 6650 <1> push eax 10874 0000AEEB 6653 <1> push ebx 10875 0000AEED 6652 <1> push edx ; to preserve the high words 10876 0000AEEF 53 <1> push bx 10877 0000AEF0 52 <1> push dx 10878 0000AEF1 665B <1> pop ebx ; ebx = following number 10879 0000AEF3 6631D2 <1> xor edx, edx 10880 0000AEF6 66A1[A098] <1> mov eax, dword [hhvar] ; edx:eax = previous number 10881 0000AEFA 66F7F3 <1> div ebx 10882 0000AEFD 665A <1> pop edx 10883 0000AEFF 665B <1> pop ebx ; restore high words 10884 0000AF01 6650 <1> push eax 10885 0000AF03 5A <1> pop dx 10886 0000AF04 5B <1> pop bx ; bx:dx = result 10887 0000AF05 6658 <1> pop eax ; restore high word of eax 10888 <1> __CPU__ 10889 0000AF07 EB84 <1> jmp set_hhtype 10890 <1> %endif 10891 <1> 10892 <1> 10893 <1> of_power: 10894 0000AF09 0826[A998] <1> or byte [hhtype], ah 10895 0000AF0D 89D9 <1> mov cx, bx 10896 0000AF0F 89D0 <1> mov ax, dx ; get exponent 10897 0000AF11 09D3 <1> or bx, dx ; exponent zero ? 10898 0000AF13 BB0000 <1> mov bx, 0 10899 0000AF16 BA0100 <1> mov dx, 1 10900 0000AF19 743E <1> jz .ret ; yes, return with result as 1 --> 10901 0000AF1B 3916[A098] <1> cmp word [hhvar], dx ; optimization: 10902 0000AF1F 7506 <1> jne .notone 10903 0000AF21 391E[A298] <1> cmp word [hhvar+2], bx 10904 0000AF25 7432 <1> je .ret ; if base is one (and exponent not zero), result is 1 --> 10905 <1> .notone: 10906 0000AF27 55 <1> push bp 10907 <1> 10908 <1> .loop: ; cx:ax non-zero here 10909 0000AF28 D1E9 <1> shr cx, 1 10910 0000AF2A D1D8 <1> rcr ax, 1 ; exponent /= 2 10911 0000AF2C 50 <1> push ax 10912 0000AF2D 51 <1> push cx 10913 0000AF2E 7303 <1> jnc .even ; if exponent was even --> 10914 0000AF30 E834FF <1> call of_multiply ; var *= base 10915 <1> .even: 10916 <1> ; In the last iteration, cx:ax might be zero here 10917 <1> ; making the next call unnecessary. Oh well. 10918 0000AF33 53 <1> push bx 10919 0000AF34 52 <1> push dx 10920 0000AF35 8B1E[A298] <1> mov bx, word [hhvar+2] 10921 0000AF39 8B16[A098] <1> mov dx, word [hhvar] ; base 10922 0000AF3D E827FF <1> call of_multiply ; * base = base squared 10923 0000AF40 891E[A298] <1> mov word [hhvar+2], bx 10924 0000AF44 8916[A098] <1> mov word [hhvar], dx ; store as new base 10925 0000AF48 5A <1> pop dx 10926 0000AF49 5B <1> pop bx 10927 0000AF4A 59 <1> pop cx 10928 0000AF4B 58 <1> pop ax 10929 <1> 10930 0000AF4C 89DD <1> mov bp, bx ; optimization: 10931 0000AF4E 09D5 <1> or bp, dx ; register now zero ? 10932 0000AF50 7406 <1> jz .ret_bp ; if so, return now --> (multiplying zero always results in zero) 10933 0000AF52 89CD <1> mov bp, cx 10934 0000AF54 09C5 <1> or bp, ax ; exponent now zero ? 10935 0000AF56 75D0 <1> jnz .loop ; no, loop --> 10936 <1> 10937 <1> .ret_bp: 10938 0000AF58 5D <1> pop bp 10939 <1> .ret: 10940 0000AF59 E931FF <1> jmp set_hhtype 10941 <1> 10942 <1> of_compare_below_equal: 10943 0000AF5C E82C00 <1> call of_helper_compare 10944 0000AF5F 7628 <1> jbe of_helper_compare_true 10945 0000AF61 C3 <1> retn 10946 <1> 10947 <1> of_compare_below: 10948 0000AF62 E82600 <1> call of_helper_compare 10949 0000AF65 7222 <1> jb of_helper_compare_true 10950 0000AF67 C3 <1> retn 10951 <1> 10952 <1> of_compare_not_equal: 10953 0000AF68 E82000 <1> call of_helper_compare 10954 0000AF6B 751C <1> jne of_helper_compare_true 10955 0000AF6D C3 <1> retn 10956 <1> 10957 <1> of_compare_equal: 10958 0000AF6E E81A00 <1> call of_helper_compare 10959 0000AF71 7416 <1> je of_helper_compare_true 10960 0000AF73 C3 <1> retn 10961 <1> 10962 <1> of_compare_above_equal: 10963 0000AF74 E81400 <1> call of_helper_compare 10964 0000AF77 7310 <1> jae of_helper_compare_true 10965 0000AF79 C3 <1> retn 10966 <1> 10967 <1> of_compare_above: 10968 0000AF7A E80E00 <1> call of_helper_compare 10969 0000AF7D 770A <1> ja of_helper_compare_true 10970 0000AF7F C3 <1> retn 10971 <1> 10972 <1> 10973 <1> ; Called by operator functions to convert a number to boolean 10974 <1> ; 10975 <1> ; INP: bx:dx 10976 <1> ; OUT: dx = 0 or 1 10977 <1> ; bx = 0 10978 <1> ; ZF 10979 <1> toboolean: 10980 0000AF80 09D3 <1> or bx, dx ; = 0 iff it was 0000_0000h 10981 0000AF82 83FB01 <1> cmp bx, byte 1 ; CY iff it was 0000_0000h, else NC 10982 0000AF85 19D2 <1> sbb dx, dx ; -1 iff it was 0000_0000h, else 0 10983 0000AF87 31DB <1> xor bx, bx 10984 <1> 10985 <1> ; INP: dx 10986 <1> ; OUT: dx += 1 10987 <1> of_helper_compare_true: 10988 0000AF89 42 <1> inc dx ; bx:dx = 0 iff it was 0000_0000h, else 1 10989 <1> 10990 <1> ; Dummy operator computation function, 10991 <1> ; used when setting a register without operator (rr) 10992 <1> ; and to initialize the first getexpression loop iteration 10993 <1> ; INP: dword [hhvar] = previous number (left-hand operand) 10994 <1> ; byte [hhtype] = previous type 10995 <1> ; bx:dx = following number (right-hand operand) 10996 <1> ; ah = following type 10997 <1> ; OUT: bx:dx = result (right-hand operand) 10998 <1> ; ah = type 10999 <1> ; CHG: ax, cx 11000 <1> of_rightop: 11001 0000AF8A C3 <1> retn 11002 <1> 11003 <1> 11004 <1> ; Called by operator functions to compare operands 11005 <1> ; 11006 <1> ; INP: dword [hhvar], byte [hhtype] 11007 <1> ; bx:dx, ah 11008 <1> ; OUT: Flags as for "cmp d[hhvar], bxdx" 11009 <1> ; bx:dx = 0 11010 <1> ; ah = 0 11011 <1> of_helper_compare: 11012 0000AF8B 30E4 <1> xor ah, ah ; type signed=0 pointer=0 11013 0000AF8D 391E[A298] <1> cmp word [hhvar+2], bx 11014 0000AF91 7504 <1> jne .ret 11015 0000AF93 3916[A098] <1> cmp word [hhvar], dx 11016 <1> .ret: 11017 0000AF97 BB0000 <1> mov bx, 0 11018 0000AF9A 89DA <1> mov dx, bx ; set both to zero (without affecting flags) 11019 0000AF9C C3 <1> retn 11020 <1> 11021 <1> of_shift_right: 11022 0000AF9D 30E4 <1> xor ah, ah 11023 0000AF9F E81F00 <1> call of_helper_getshiftdata 11024 <1> .loop: 11025 0000AFA2 D1EB <1> shr bx, 1 11026 0000AFA4 D1DA <1> rcr dx, 1 11027 0000AFA6 E2FA <1> loop .loop 11028 0000AFA8 C3 <1> retn 11029 <1> 11030 <1> of_shift_right_signed: 11031 0000AFA9 B440 <1> mov ah, 40h 11032 0000AFAB E81300 <1> call of_helper_getshiftdata 11033 <1> .loop: 11034 0000AFAE D1FB <1> sar bx, 1 11035 0000AFB0 D1DA <1> rcr dx, 1 11036 0000AFB2 E2FA <1> loop .loop 11037 0000AFB4 C3 <1> retn 11038 <1> 11039 <1> of_shift_left: 11040 0000AFB5 30E4 <1> xor ah, ah 11041 0000AFB7 E80700 <1> call of_helper_getshiftdata 11042 <1> .loop: 11043 0000AFBA D1E2 <1> shl dx, 1 11044 0000AFBC D1D3 <1> rcl bx, 1 11045 0000AFBE E2FA <1> loop .loop 11046 0000AFC0 C3 <1> retn 11047 <1> 11048 <1> ; Called by operator functions to get shift data 11049 <1> ; 11050 <1> ; This returns to the next caller with the unchanged input 11051 <1> ; operand if the shift count is zero. Otherwise, large shift 11052 <1> ; counts are normalized so the returned value in cx is not 11053 <1> ; zero and not higher than 32. This normalization is not just 11054 <1> ; an optimization, it's required for shift counts that don't 11055 <1> ; fit into a 16-bit counter. 11056 <1> ; 11057 <1> ; INP: bx:dx = shift count 11058 <1> ; OUT: bx:dx = input operand 11059 <1> ; If shift count is >= 1 and <= 32, 11060 <1> ; cx = shift count 11061 <1> ; If shift count is > 32, 11062 <1> ; cx = 32 11063 <1> ; If shift count is zero, 11064 <1> ; discards one near return address before returning 11065 <1> ; CHG: cx 11066 <1> of_helper_getshiftdata: 11067 0000AFC1 89D1 <1> mov cx, dx 11068 0000AFC3 85DB <1> test bx, bx 11069 0000AFC5 7505 <1> jnz .largeshift 11070 0000AFC7 83FA20 <1> cmp dx, byte 32 11071 0000AFCA 7203 <1> jb .normalshift 11072 <1> .largeshift: 11073 0000AFCC B92000 <1> mov cx, 32 ; fix at maximal shift count 11074 <1> .normalshift: 11075 0000AFCF 8B16[A098] <1> mov dx, word [hhvar] 11076 0000AFD3 8B1E[A298] <1> mov bx, word [hhvar+2] 11077 0000AFD7 E301 <1> jcxz .break ; shift count zero, return input --> 11078 0000AFD9 C3 <1> retn 11079 <1> 11080 <1> .break: 11081 0000AFDA 59 <1> pop cx ; discard near return address 11082 0000AFDB C3 <1> retn 11083 <1> 11084 <1> of_bit_mirror: 11085 0000AFDC 30E4 <1> xor ah, ah 11086 0000AFDE 89D1 <1> mov cx, dx 11087 0000AFE0 85DB <1> test bx, bx 11088 0000AFE2 7505 <1> jnz .large 11089 0000AFE4 83FA40 <1> cmp dx, byte 64 11090 0000AFE7 7205 <1> jb .normal 11091 <1> .large: 11092 0000AFE9 31DB <1> xor bx, bx ; mirror count 64 or higher: 11093 0000AFEB 31D2 <1> xor dx, dx ; all 32 bits mirrored with (nonexistent) zero bits 11094 0000AFED C3 <1> retn 11095 <1> .normal: 11096 0000AFEE 8B16[A098] <1> mov dx, word [hhvar] 11097 0000AFF2 8B1E[A298] <1> mov bx, word [hhvar+2] 11098 0000AFF6 80F901 <1> cmp cl, 1 11099 0000AFF9 762B <1> jbe .ret ; mirror count one or zero, return input --> 11100 0000AFFB 56 <1> push si 11101 0000AFFC 57 <1> push di 11102 <1> 11103 0000AFFD 51 <1> push cx 11104 0000AFFE BFFFFF <1> mov di, -1 11105 0000B001 89FE <1> mov si, di 11106 <1> .loopmask: 11107 0000B003 D1E7 <1> shl di, 1 11108 0000B005 D1D6 <1> rcl si, 1 11109 0000B007 E2FA <1> loop .loopmask ; create mask of bits not involved in mirroring 11110 0000B009 21DE <1> and si, bx 11111 0000B00B 21D7 <1> and di, dx ; get the uninvolved bits 11112 0000B00D 59 <1> pop cx 11113 <1> 11114 0000B00E 56 <1> push si 11115 0000B00F 57 <1> push di ; save them 11116 0000B010 31F6 <1> xor si, si 11117 0000B012 31FF <1> xor di, di ; initialize mirrored register 11118 <1> .loop: 11119 0000B014 D1EB <1> shr bx, 1 11120 0000B016 D1DA <1> rcr dx, 1 ; shift out of original register's current LSB 11121 0000B018 D1D7 <1> rcl di, 1 11122 0000B01A D1D6 <1> rcl si, 1 ; into other register's current LSB 11123 0000B01C E2F6 <1> loop .loop 11124 0000B01E 5A <1> pop dx 11125 0000B01F 5B <1> pop bx ; restore uninvolved bits 11126 0000B020 09F3 <1> or bx, si 11127 0000B022 09FA <1> or dx, di ; combine with mirrored bits 11128 <1> 11129 0000B024 5F <1> pop di 11130 0000B025 5E <1> pop si 11131 <1> .ret: 11132 0000B026 C3 <1> retn 11133 <1> 11134 <1> of_or_bitwise: 11135 0000B027 0B16[A098] <1> or dx, word [hhvar] 11136 0000B02B 0B1E[A298] <1> or bx, word [hhvar+2] ; bitwise or 11137 <1> or_hhtype_1: 11138 0000B02F E930FE <1> jmp or_hhtype 11139 <1> 11140 <1> of_or_boolean: 11141 0000B032 E82700 <1> call of_helper_getbool 11142 0000B035 09DA <1> or dx, bx ; boolean or 11143 0000B037 EB20 <1> jmp short of_helper_retbool 11144 <1> 11145 <1> of_and_bitwise: 11146 0000B039 2316[A098] <1> and dx, word [hhvar] 11147 0000B03D 231E[A298] <1> and bx, word [hhvar+2] ; bitwise and 11148 0000B041 EBEC <1> jmp or_hhtype_1 11149 <1> 11150 <1> of_and_boolean: 11151 0000B043 E81600 <1> call of_helper_getbool 11152 0000B046 21DA <1> and dx, bx ; boolean and 11153 0000B048 EB0F <1> jmp short of_helper_retbool 11154 <1> 11155 <1> of_xor_bitwise: 11156 0000B04A 3316[A098] <1> xor dx, word [hhvar] 11157 0000B04E 331E[A298] <1> xor bx, word [hhvar+2] ; bitwise xor 11158 0000B052 EBDB <1> jmp or_hhtype_1 11159 <1> 11160 <1> of_xor_boolean: 11161 0000B054 E80500 <1> call of_helper_getbool 11162 0000B057 31DA <1> xor dx, bx ; boolean xor 11163 <1> of_helper_retbool: 11164 0000B059 31DB <1> xor bx, bx ; high word always zero 11165 0000B05B C3 <1> retn 11166 <1> 11167 <1> ; Called by operator functions to convert operands to boolean 11168 <1> ; 11169 <1> ; INP: bx:dx = next number, ah = type 11170 <1> ; [hhvar] = previous number, [hhtype] = type 11171 <1> ; OUT: bx = next number's boolean value 11172 <1> ; dx = previous number's boolean value 11173 <1> ; ah = 0 11174 <1> of_helper_getbool: 11175 0000B05C 30E4 <1> xor ah, ah 11176 0000B05E E81FFF <1> call toboolean 11177 0000B061 52 <1> push dx 11178 0000B062 8B16[A098] <1> mov dx, word [hhvar] 11179 0000B066 8B1E[A298] <1> mov bx, word [hhvar+2] 11180 0000B06A E813FF <1> call toboolean 11181 0000B06D 5B <1> pop bx 11182 0000B06E C3 <1> retn 11183 <1> 11184 <1> 11185 <1> usesection lDEBUG_DATA_ENTRY 11186 <1> 11187 <1> isvariable_data: 11188 <1> 11189 <1> %if _DEBUG3 11190 <1> align 8, db 0 11191 <1> kregs: dd 0 11192 <1> dd 1 11193 <1> dd 0aa55aa55h 11194 <1> dd -1 11195 <1> times 12 dd 0 11196 <1> %endif 11197 <1> 11198 00009376 00 <1> align 8, db 0 11199 <1> isvariable_struc_list: 11200 <1> 11201 <1> %assign IVS_ONEBYTE 1 11202 <1> isvariable_struc_onebyte_list: 11203 <1> ; name, size, flags, address, array last index, array skip 11204 00009378 00003000[F00C]FF00 <1> isvariablestruc "V", 4, 0, vregs, 255 11205 <1> %if _DEBUG3 11206 <1> isvariablestruc "K", 4, 0, kregs, 15 11207 <1> %endif 11208 <1> isvariable_struc_onebyte_list_end: 11209 <1> 11210 <1> %assign IVS_ONEBYTE 0 11211 <1> isvariable_struc_morebyte_list: 11212 00009380 [7097]8500[EE0A]00- <1> isvariablestruc "MACHX86", 1, ivfReadOnly, machine 11212 00009387 00 <1> 11213 00009388 [7597]8500[F10A]00- <1> isvariablestruc "MACHX87", 1, ivfReadOnly, encodedmach87 11213 0000938F 00 <1> 11214 00009390 [7A97]0100[F20B]00- <1> isvariablestruc "MMT", 1, 0, maxmachinetype 11214 00009397 00 <1> 11215 00009398 [7B97]3103[7C00]04- <1> isvariablestruc "DCO", 4, ivfArrayOneBased | ivfArrayOptional, options, 4 11215 0000939F 00 <1> 11217 000093A0 [7C97]B103[8C00]04- <1> isvariablestruc "DCS", 4, ivfReadOnly | ivfArrayOneBased | ivfArrayOptional, startoptions, 4 11217 000093A7 00 <1> 11219 000093A8 [7D97]B103[9C00]04- <1> isvariablestruc "DIF", 4, ivfReadOnly | ivfArrayOneBased | ivfArrayOptional, internalflags, 4 11219 000093AF 00 <1> 11221 000093B0 [7E97]3100[AC00]00- <1> isvariablestruc "DAO", 4, 0, asm_options 11221 000093B7 00 <1> 11223 000093B8 [7F97]B100[B000]00- <1> isvariablestruc "DAS", 4, ivfReadOnly, asm_startoptions 11223 000093BF 00 <1> 11225 000093C0 [8097]B100[D40A]00- <1> isvariablestruc "DPI", 4, ivfReadOnly, psp22 11225 000093C7 00 <1> 11227 000093C8 [8197]9100[B00A]00- <1> isvariablestruc "DPR", 2, ivfReadOnly, pspdbg 11227 000093CF 00 <1> 11229 000093D0 [8297]9100[D80A]00- <1> isvariablestruc "DPP", 2, ivfReadOnly, parent 11229 000093D7 00 <1> 11231 000093D8 [8397]B200[D40A]00- <1> isvariablestruc "DPRA", 4, ivfReadOnly, psp22 11231 000093DF 00 <1> 11233 000093E0 [8597]9200[B00A]00- <1> isvariablestruc "DPSP", 2, ivfReadOnly, pspdbg 11233 000093E7 00 <1> 11235 000093E8 [8797]9500[D80A]00- <1> isvariablestruc "DPARENT", 2, ivfReadOnly, parent 11235 000093EF 00 <1> 11237 <1> %if _PM 11238 000093F0 [8C97]D100[76B0]00- <1> isvariablestruc "DPS", 2, ivfReadOnly | ivfSpecialSetUp, var_seldbg_setup 11238 000093F7 00 <1> 11240 000093F8 [8D97]D500[6FB0]00- <1> isvariablestruc "DPSPSEL", 2, ivfReadOnly | ivfSpecialSetUp, var_dpspsel_setup 11240 000093FF 00 <1> 11242 <1> %else 11243 <1> isvariablestruc "DPSPSEL", 2, ivfReadOnly, pspdbg 11245 <1> %endif 11246 <1> 11247 00009400 [9297]3100[1C89]00- <1> isvariablestruc "PPC", 4, 0, default_pp_count 11247 00009407 00 <1> 11248 00009408 [9397]3100[2089]00- <1> isvariablestruc "TPC", 4, 0, default_tp_count 11248 0000940F 00 <1> 11249 00009410 [9497]3100[2489]00- <1> isvariablestruc "TTC", 4, 0, default_tt_count 11249 00009417 00 <1> 11250 <1> 11251 00009418 [9597]3500[EC09]00- <1> isvariablestruc "RELIMIT", 4, 0, re_limit 11251 0000941F 00 <1> 11252 00009420 [9A97]3500[E809]00- <1> isvariablestruc "RECOUNT", 4, 0, re_count 11252 00009427 00 <1> 11253 00009428 [9F97]3500[F409]00- <1> isvariablestruc "RCLIMIT", 4, 0, rc_limit 11253 0000942F 00 <1> 11254 00009430 [A497]3500[F009]00- <1> isvariablestruc "RCCOUNT", 4, 0, rc_count 11254 00009437 00 <1> 11255 <1> 11256 00009438 [A997]1000[000B]00- <1> isvariablestruc "RC", 2, 0, priorrc 11256 0000943F 00 <1> 11257 00009440 [A997]1100[020B]00- <1> isvariablestruc "ERC", 2, 0, erc 11257 00009447 00 <1> 11258 00009448 [AA97]0400[1D0C]00- <1> isvariablestruc "QQCODE", 1, 0, qqtermcode 11258 0000944F 00 <1> 11259 00009450 [AE97]1600[7C87]00- <1> isvariablestruc "TERMCODE", 2, 0, usertermcode 11259 00009457 00 <1> 11260 <1> 11261 <1> %if _PM 11262 <1> %assign var_addr_offset 4 11263 <1> %else 11264 <1> %assign var_addr_offset 2 11265 <1> %endif 11266 <1> 11267 00009458 [B497]3100[0E0B]00- <1> isvariablestruc "AAO", var_addr_offset, 0, a_addr 11267 0000945F 00 <1> 11268 00009460 [B597]1100[120B]00- <1> isvariablestruc "AAS", 2, 0, a_addr + saSegSel 11268 00009467 00 <1> 11269 00009468 [B697]3100[180B]00- <1> isvariablestruc "ADO", var_addr_offset, 0, d_addr 11269 0000946F 00 <1> 11270 00009470 [B797]1100[1C0B]00- <1> isvariablestruc "ADS", 2, 0, d_addr + saSegSel 11270 00009477 00 <1> 11271 00009478 [B897]3100[220B]00- <1> isvariablestruc "ABO", var_addr_offset, 0, behind_r_u_addr 11271 0000947F 00 <1> 11272 00009480 [B997]1100[260B]00- <1> isvariablestruc "ABS", 2, 0, behind_r_u_addr + saSegSel 11272 00009487 00 <1> 11273 00009488 [BA97]3100[2C0B]00- <1> isvariablestruc "AUO", var_addr_offset, 0, u_addr 11273 0000948F 00 <1> 11274 00009490 [BB97]1100[300B]00- <1> isvariablestruc "AUS", 2, 0, u_addr + saSegSel 11274 00009497 00 <1> 11275 00009498 [BC97]3100[360B]00- <1> isvariablestruc "AEO", var_addr_offset, 0, e_addr 11275 0000949F 00 <1> 11276 000094A0 [BD97]1100[3A0B]00- <1> isvariablestruc "AES", 2, 0, e_addr + saSegSel 11276 000094A7 00 <1> 11277 <1> %if _DSTRINGS 11278 000094A8 [BE97]3100[400B]00- <1> isvariablestruc "AZO", var_addr_offset, 0, dz_addr 11278 000094AF 00 <1> 11279 000094B0 [BF97]1100[440B]00- <1> isvariablestruc "AZS", 2, 0, dz_addr + saSegSel 11279 000094B7 00 <1> 11280 000094B8 [C097]3100[4A0B]00- <1> isvariablestruc "ACO", var_addr_offset, 0, dcpm_addr 11280 000094BF 00 <1> 11281 000094C0 [C197]1100[4E0B]00- <1> isvariablestruc "ACS", 2, 0, dcpm_addr + saSegSel 11281 000094C7 00 <1> 11282 000094C8 [C297]3100[540B]00- <1> isvariablestruc "APO", var_addr_offset, 0, dcount_addr 11282 000094CF 00 <1> 11283 000094D0 [C397]1100[580B]00- <1> isvariablestruc "APS", 2, 0, dcount_addr + saSegSel 11283 000094D7 00 <1> 11284 000094D8 [C497]3100[5E0B]00- <1> isvariablestruc "AWO", var_addr_offset, 0, dwcount_addr 11284 000094DF 00 <1> 11285 000094E0 [C597]1100[620B]00- <1> isvariablestruc "AWS", 2, 0, dwcount_addr + saSegSel 11285 000094E7 00 <1> 11286 <1> %endif 11287 <1> %if _PM 11288 000094E8 [C697]3100[0E0B]00- <1> isvariablestruc "AXO", 4, 0, a_addr 11288 000094EF 00 <1> 11289 <1> %endif 11290 <1> 11291 000094F0 [C797]0100[F30B]00- <1> isvariablestruc "DSR", 1, 0, serial_rows 11291 000094F7 00 <1> 11292 000094F8 [C897]0100[F40B]00- <1> isvariablestruc "DSC", 1, 0, serial_columns 11292 000094FF 00 <1> 11293 00009500 [C997]0100[F50B]00- <1> isvariablestruc "DST", 1, 0, serial_keep_timeout 11293 00009507 00 <1> 11294 <1> %if _USE_TX_FIFO 11295 00009508 [CA97]0100[F60B]00- <1> isvariablestruc "DSF", 1, 0, serial_fifo_size 11295 0000950F 00 <1> 11296 <1> %endif 11297 00009510 [CB97]0300[F80B]00- <1> isvariablestruc "DSPVI", 1, 0, serial_var_intnum 11297 00009517 00 <1> 11298 00009518 [CE97]8300[2209]00- <1> isvariablestruc "DSPUI", 1, ivfReadOnly, serial_use_intnum 11298 0000951F 00 <1> 11299 00009520 [D197]0300[F90B]00- <1> isvariablestruc "DSPVS", 1, 0, serial_var_params 11299 00009527 00 <1> 11300 00009528 [D497]8300[2309]00- <1> isvariablestruc "DSPUS", 1, ivfReadOnly, serial_use_params 11300 0000952F 00 <1> 11301 00009530 [D797]0300[FA0B]00- <1> isvariablestruc "DSPVF", 1, 0, serial_var_fifo 11301 00009537 00 <1> 11302 00009538 [DA97]8300[2409]00- <1> isvariablestruc "DSPUF", 1, ivfReadOnly, serial_use_fifo 11302 0000953F 00 <1> 11303 00009540 [DD97]1300[FC0B]00- <1> isvariablestruc "DSPVP", 2, 0, serial_var_baseport 11303 00009547 00 <1> 11304 00009548 [E097]9300[2609]00- <1> isvariablestruc "DSPUP", 2, ivfReadOnly, serial_use_baseport 11304 0000954F 00 <1> 11305 00009550 [E397]0300[FE0B]00- <1> isvariablestruc "DSPVD", 1, 0, serial_var_dl 11305 00009557 00 <1> 11306 00009558 [E697]8300[2809]00- <1> isvariablestruc "DSPUD", 1, ivfReadOnly, serial_use_dl 11306 0000955F 00 <1> 11307 00009560 [E997]0300[000C]00- <1> isvariablestruc "DSPVM", 1, 0, serial_var_irqmask 11307 00009567 00 <1> 11308 00009568 [EC97]8300[2A09]00- <1> isvariablestruc "DSPUM", 1, ivfReadOnly, serial_use_irqmask 11308 0000956F 00 <1> 11309 <1> 11310 00009570 [EF97]0100[020C]00- <1> isvariablestruc "IOR", 1, 0, io_rows 11310 00009577 00 <1> 11311 00009578 [F097]0100[030C]00- <1> isvariablestruc "IOC", 1, 0, io_columns 11311 0000957F 00 <1> 11312 00009580 [F197]1100[040C]00- <1> isvariablestruc "IOS", 2, 0, io_start_buffer 11312 00009587 00 <1> 11313 00009588 [F297]1100[060C]00- <1> isvariablestruc "IOE", 2, 0, io_end_buffer 11313 0000958F 00 <1> 11314 00009590 [F397]1100[080C]00- <1> isvariablestruc "IOL", 2, 0, io_levels 11314 00009597 00 <1> 11315 00009598 [F497]1100[0A0C]00- <1> isvariablestruc "IOF", 2, 0, io_flags 11315 0000959F 00 <1> 11316 000095A0 [F597]D100[85B0]00- <1> isvariablestruc "IOI", 2, ivfReadOnly | ivfSpecialSetUp, var_ioi_setup 11316 000095A7 00 <1> 11317 <1> 11318 <1> %if _CATCHINT2D 11319 000095A8 [F697]8500[8883]00- <1> isvariablestruc "AMISNUM", 1, ivfReadOnly, amis_multiplex_number 11319 000095AF 00 <1> 11320 000095B0 [FB97]0800[7083]00- <1> isvariablestruc "TRYAMISNUM", 1, 0, try_amis_multiplex_number 11320 000095B7 00 <1> 11321 <1> %endif 11322 <1> 11323 000095B8 [0398]3600[5492]00- <1> isvariablestruc "HHRESULT", 4, 0, hhresult 11323 000095BF 00 <1> 11324 <1> 11325 <1> %if _DEBUG1 11326 <1> isvariablestruc "TRC", 2, ivfArrayOptional, test_records_Readmem + 4, 15, 4 11328 <1> isvariablestruc "TRA", 4, ivfArrayOptional, test_records_Readmem, 15, 2 11330 <1> isvariablestruc "TWC", 2, ivfArrayOptional, test_records_Writemem + 4, 15, 4 11332 <1> isvariablestruc "TWA", 4, ivfArrayOptional, test_records_Writemem, 15, 2 11334 <1> isvariablestruc "TLC", 2, ivfArrayOptional, test_records_getLinear + 4, 15, 4 11336 <1> isvariablestruc "TLA", 4, ivfArrayOptional, test_records_getLinear, 15, 2 11338 <1> isvariablestruc "TSC", 2, ivfArrayOptional, test_records_getSegmented + 4, 15, 4 11340 <1> isvariablestruc "TSA", 4, ivfArrayOptional, test_records_getSegmented, 15, 2 11342 <1> isvariablestruc "TRV", 1, 0, test_readmem_value 11344 <1> %endif 11345 <1> 11346 <1> 11347 <1> %if _PM 11348 000095C0 [0998]B102[780B]0F- <1> isvariablestruc "SRO", 4, ivfArrayOptional | ivfReadOnly, search_results, 15, 2 11348 000095C7 02 <1> 11350 000095C8 [0A98]9102[7C0B]0F- <1> isvariablestruc "SRS", 2, ivfArrayOptional | ivfReadOnly, search_results + 4, 15, 4 11350 000095CF 04 <1> 11352 <1> %else 11353 <1> isvariablestruc "SRO", 2, ivfArrayOptional | ivfReadOnly, search_results, 15, 2 11355 <1> isvariablestruc "SRS", 2, ivfArrayOptional | ivfReadOnly, search_results + 2, 15, 2 11357 <1> %endif 11358 000095D0 [0B98]B100[D80B]00- <1> isvariablestruc "SRC", 4, ivfReadOnly, sscounter 11358 000095D7 00 <1> 11360 <1> 11361 000095D8 [0C98]D004[67B4]FF- <1> isvariablestruc "RI", 2, ivfSpecialSetUp | ivfSeparatorSpecial | ivfReadOnly, var_ri_setup, 255 11361 000095DF 00 <1> 11363 <1> 11364 <1> %if _DEBUG3 11365 <1> isvariablestruc "MT", 4, ivfSpecialSetUp, var_mt_setup, 1 11366 <1> %endif 11367 <1> 11368 <1> %if _INPUT_FILE_BOOT || _INPUT_FILE_HANDLES 11369 000095E0 [0C98]5102[E9B4]0F- <1> isvariablestruc "YSF", 2, ivfSpecialSetUp | ivfArrayOptional, var_ysf_setup, 15 11369 000095E7 00 <1> 11371 <1> %if _INPUT_FILE_HANDLES 11372 000095E8 [0D98]5102[E9B4]0F- <1> isvariablestruc "YHF", 2, ivfSpecialSetUp | ivfArrayOptional, var_ysf_setup, 15 11372 000095EF 00 <1> 11374 <1> %endif 11375 <1> %if _INPUT_FILE_BOOT 11376 000095F0 [0E98]5102[E9B4]0F- <1> isvariablestruc "YBF", 2, ivfSpecialSetUp | ivfArrayOptional, var_ysf_setup, 15 11376 000095F7 00 <1> 11378 <1> %endif 11379 <1> %endif 11380 <1> 11381 <1> %if _ACCESS_VARIABLES_AMOUNT 11382 000095F8 [0F98]B502[2C85]03- <1> isvariablestruc "READADR", 4, ivfReadOnly | ivfArrayOptional, reading_access_variables, _ACCESS_VARIABLES_AMOUNT - 1, 4 11382 000095FF 04 <1> 11384 00009600 [1498]B502[3085]03- <1> isvariablestruc "READLEN", 4, ivfReadOnly | ivfArrayOptional, reading_access_variables + 4, _ACCESS_VARIABLES_AMOUNT - 1, 4 11384 00009607 04 <1> 11386 00009608 [1998]B502[4C85]03- <1> isvariablestruc "WRITADR", 4, ivfReadOnly | ivfArrayOptional, writing_access_variables, _ACCESS_VARIABLES_AMOUNT - 1, 4 11386 0000960F 04 <1> 11388 00009610 [1E98]B502[5085]03- <1> isvariablestruc "WRITLEN", 4, ivfReadOnly | ivfArrayOptional, writing_access_variables + 4, _ACCESS_VARIABLES_AMOUNT - 1, 4 11388 00009617 04 <1> 11390 <1> %endif 11391 <1> 11392 <1> %if _PSPVARIABLES 11393 00009618 [2398]9200[AE0A]00- <1> isvariablestruc "PSPS", 2, ivfReadOnly, pspdbe 11393 0000961F 00 <1> 11394 00009620 [2598]D100[8FB0]00- <1> isvariablestruc "PSP", 2, ivfReadOnly | ivfSpecialSetUp, var_psp_setup 11394 00009627 00 <1> 11395 00009628 [2698]D100[99B0]00- <1> isvariablestruc "PPR", 2, ivfReadOnly | ivfSpecialSetUp, var_ppr_setup 11395 0000962F 00 <1> 11396 00009630 [2798]F100[B2B0]00- <1> isvariablestruc "PPI", 4, ivfReadOnly | ivfSpecialSetUp, var_ppi_setup 11396 00009637 00 <1> 11397 00009638 [2898]9400[AE0A]00- <1> isvariablestruc "PSPSEL", 2, ivfReadOnly, pspdbe 11397 0000963F 00 <1> 11398 00009640 [2C98]D400[99B0]00- <1> isvariablestruc "PARENT", 2, ivfReadOnly | ivfSpecialSetUp, var_ppr_setup 11398 00009647 00 <1> 11399 00009648 [3098]F100[B2B0]00- <1> isvariablestruc "PRA", 4, ivfReadOnly | ivfSpecialSetUp, var_ppi_setup 11399 0000964F 00 <1> 11400 <1> %endif 11401 <1> 11402 <1> %if _BOOTLDR 11403 00009650 [3198]4800[68B1]FF- <1> isvariablestruc "BOOTUNITFL", 1, ivfSpecialSetUp, var_bootunitflags_setup, 255 11403 00009657 00 <1> 11404 00009658 [3998]C900[26B1]00- <1> isvariablestruc "BOOTLDPUNIT", 1, ivfReadOnly | ivfSpecialSetUp, var_bootldpunit_setup 11404 0000965F 00 <1> 11405 00009660 [4298]C900[2BB1]00- <1> isvariablestruc "BOOTSDPUNIT", 1, ivfReadOnly | ivfSpecialSetUp, var_bootsdpunit_setup 11405 00009667 00 <1> 11406 <1> %if _INPUT_FILE_BOOT 11407 00009668 [4B98]C900[30B1]00- <1> isvariablestruc "BOOTYDPUNIT", 1, ivfReadOnly | ivfSpecialSetUp, var_bootydpunit_setup 11407 0000966F 00 <1> 11408 <1> %endif 11409 00009670 [5498]F900[47B1]00- <1> isvariablestruc "BOOTLDPPART", 4, ivfReadOnly | ivfSpecialSetUp, var_bootldppart_setup 11409 00009677 00 <1> 11410 00009678 [5D98]F900[4CB1]00- <1> isvariablestruc "BOOTSDPPART", 4, ivfReadOnly | ivfSpecialSetUp, var_bootsdppart_setup 11410 0000967F 00 <1> 11411 <1> %if _INPUT_FILE_BOOT 11412 00009680 [6698]F900[51B1]00- <1> isvariablestruc "BOOTYDPPART", 4, ivfReadOnly | ivfSpecialSetUp, var_bootydppart_setup 11412 00009687 00 <1> 11413 <1> %endif 11414 <1> %endif 11415 <1> 11416 00009688 [6F98]0900[7183]00- <1> isvariablestruc "TRYDEBUGNUM", 1, 0, try_debugger_amis_multiplex_number 11416 0000968F 00 <1> 11417 00009690 [7898]9700[3E83]00- <1> isvariablestruc "DEBUGFUNC", 2, ivfReadOnly, debuggerfunction 11417 00009697 00 <1> 11418 <1> 11419 <1> isvariable_struc_morebyte_list_end: 11420 <1> isvariable_struc_list_end: 11421 <1> 11422 <1> align 2, db 0 11423 00009698 00000000 <1> interrupt_var: dd 0 11424 <1> align 2, db 0 11425 0000969C 0000 <1> ioi_var: dw 0 11426 <1> %if _PM 11427 <1> align 2, db 0 11428 0000969E 0000 <1> seldbg: dw 0 11429 <1> align 2, db 0 11430 000096A0 0000 <1> dpspsel: dw 0 11431 <1> %endif 11432 <1> %if _PSPVARIABLES 11433 <1> align 2, db 0 11434 000096A2 0000 <1> psp_segment: dw 0 11435 000096A4 0000 <1> psp_parent: dw 0 11436 000096A6 00000000 <1> psp_pra: dd 0 11437 <1> %endif 11438 <1> 11439 <1> align 2, db 0 11440 <1> isvariable_morebyte_nameheaders: 11441 000096AA 4D414D414D4D444344- <1> dw IVS_MOREBYTE_NAMEHEADERS 11441 000096B3 434449444144414450- <1> 11441 000096BC 445044504450445044- <1> 11441 000096C5 504450445050505450- <1> 11441 000096CE 545452455245524352- <1> 11441 000096D7 435243455251515445- <1> 11441 000096E0 414141414144414441- <1> 11441 000096E9 424142415541554145- <1> 11441 000096F2 4145415A415A414341- <1> 11441 000096FB 434150415041574157- <1> 11441 00009704 415844534453445344- <1> 11441 0000970D 534453445344534453- <1> 11441 00009716 445344534453445344- <1> 11441 0000971F 53445344534453494F- <1> 11441 00009728 494F494F494F494F49- <1> 11441 00009731 4F494F414D54524848- <1> 11441 0000973A 535253525352524959- <1> 11441 00009743 535948594252455245- <1> 11441 0000974C 575257525053505350- <1> 11441 00009755 505050505350415052- <1> 11441 0000975E 424F424F424F424F42- <1> 11441 00009767 4F424F424F54524445 <1> 11442 <1> .end: 11443 <1> %if IVS_HAVE_ONEBYTE && ! IVS_SINGLE_ONEBYTE 11444 <1> isvariable_onebyte_names: 11445 <1> db IVS_ONEBYTE_NAMES 11446 <1> .end: 11447 <1> %endif 11448 <1> 11449 00009770 434858383643485838- <1> isvariablestrings ISVARIABLESTRINGS 11449 00009779 37544F53464F534952- <1> 11449 00009782 50524153504152454E- <1> 11449 0000978B 5453535053454C4343- <1> 11449 00009794 434C494D4954434F55- <1> 11449 0000979D 4E544C494D4954434F- <1> 11449 000097A6 554E5443434F444552- <1> 11449 000097AF 4D434F44454F534F53- <1> 11449 000097B8 4F534F534F534F534F- <1> 11449 000097C1 534F534F534F524354- <1> 11449 000097CA 465056495055495056- <1> 11449 000097D3 535055535056465055- <1> 11449 000097DC 465056505055505056- <1> 11449 000097E5 4450554450564D5055- <1> 11449 000097EE 4D524353454C464949- <1> 11449 000097F7 534E554D59414D4953- <1> 11449 00009800 4E554D524553554C54- <1> 11449 00009809 4F5343464646414441- <1> 11449 00009812 445241444C454E4954- <1> 11449 0000981B 41445249544C454E50- <1> 11449 00009824 535052495053454C52- <1> 11449 0000982D 454E54414F54554E49- <1> 11449 00009836 54464C4F544C445055- <1> 11449 0000983F 4E49544F5453445055- <1> 11449 00009848 4E49544F5459445055- <1> 11449 00009851 4E49544F544C445050- <1> 11449 0000985A 4152544F5453445050- <1> 11449 00009863 4152544F5459445050- <1> 11449 0000986C 415254594445425547- <1> 11449 00009875 4E554D42554746554E- <1> 11449 0000987E 43 <1> 11450 <1> 11451 <1> 11452 <1> usesection lDEBUG_CODE 11453 <1> isvariable_code: 11454 <1> 11455 <1> %if _PM 11456 <1> var_dpspsel_setup: 11457 0000B06F BB[A096] <1> mov bx, dpspsel 11458 0000B072 8C17 <1> mov word [bx], ss 11459 0000B074 F8 <1> clc 11460 0000B075 C3 <1> retn 11461 <1> 11462 <1> var_seldbg_setup: 11463 0000B076 BB[9E96] <1> mov bx, seldbg 11464 0000B079 832700 <1> and word [bx], byte 0 11465 0000B07C E856E3 <1> call ispm 11466 0000B07F 7502 <1> jnz @F 11467 0000B081 8C1F <1> mov word [bx], ds 11468 <1> @@: 11469 0000B083 F8 <1> clc 11470 0000B084 C3 <1> retn 11471 <1> %endif 11472 <1> 11473 <1> %if _DEBUG3 11474 <1> var_mt_setup: 11475 <1> mov bx, ax 11476 <1> add bx, bx 11477 <1> add bx, bx 11478 <1> mov di, bx 11479 <1> add bx, mtest_regs 11480 <1> add di, masks_test 11481 <1> clc 11482 <1> retn 11483 <1> %endif 11484 <1> 11485 <1> var_ioi_setup: 11486 0000B085 E8E70F <1> call peekc 11487 0000B088 BB[9C96] <1> mov bx, ioi_var 11488 0000B08B 8907 <1> mov word [bx], ax 11489 0000B08D F8 <1> clc 11490 0000B08E C3 <1> retn 11491 <1> 11492 <1> %if _PSPVARIABLES 11493 <1> var_psp_setup: 11494 0000B08F BB[A296] <1> mov bx, psp_segment 11495 0000B092 E83B00 <1> call var_get_psp_segment 11496 0000B095 8907 <1> mov word [bx], ax 11497 0000B097 F8 <1> clc 11498 0000B098 C3 <1> retn 11499 <1> 11500 <1> 11501 <1> var_ppr_setup: 11502 0000B099 BB[A496] <1> mov bx, psp_parent 11503 0000B09C 31C0 <1> xor ax, ax 11504 0000B09E 8907 <1> mov word [bx], ax 11505 0000B0A0 E84700 <1> call var_get_psp_selector 11506 0000B0A3 7206 <1> jc @F 11507 0000B0A5 26A11600 <1> mov ax, word [es:16h] 11508 0000B0A9 8907 <1> mov word [bx], ax ; retrieve parent process 11509 <1> @@: 11510 0000B0AB 16 <1> push ss 11511 0000B0AC 07 <1> pop es 11512 <1> %if _PM ; This is not really needed but does not hurt either. 11513 <1> ; getsegmented is used above, but only from PM. 11514 <1> ; This is assumed not to switch modes. 11515 0000B0AD E82489 <1> call resetmode ; reset mode if we switched 11516 <1> %endif 11517 0000B0B0 F8 <1> clc 11518 0000B0B1 C3 <1> retn 11519 <1> 11520 <1> 11521 <1> var_ppi_setup: 11522 0000B0B2 BB[A696] <1> mov bx, psp_pra 11523 0000B0B5 31C0 <1> xor ax, ax 11524 0000B0B7 8907 <1> mov word [bx], ax 11525 0000B0B9 894702 <1> mov word [bx + 2], ax 11526 0000B0BC E82B00 <1> call var_get_psp_selector 11527 0000B0BF 72EA <1> jc @B 11528 0000B0C1 26A10A00 <1> mov ax, word [es:TPIV] 11529 0000B0C5 8907 <1> mov word [bx], ax 11530 0000B0C7 26A10C00 <1> mov ax, word [es:TPIV + 2] 11531 0000B0CB 894702 <1> mov word [bx + 2], ax ; retrieve Int22 address 11532 0000B0CE EBDB <1> jmp @B 11533 <1> 11534 <1> 11535 <1> var_get_psp_segment: 11536 0000B0D0 A1[AE0A] <1> mov ax, word [pspdbe] 11537 0000B0D3 40 <1> inc ax ; FFFFh ? 11538 0000B0D4 7410 <1> jz short .pspvar_psp_invalid ; yes, invalid --> 11539 0000B0D6 48 <1> dec ax ; 0 ? 11540 0000B0D7 740D <1> jz short .pspvar_psp_invalid ; yes, invalid --> 11541 <1> %if _PM 11542 0000B0D9 50 <1> push ax 11543 0000B0DA E8ABAE <1> call selector_to_segment 11544 0000B0DD 58 <1> pop ax 11545 0000B0DE 40 <1> inc ax ; FFFFh ? 11546 0000B0DF 7405 <1> jz short .pspvar_psp_invalid ; yes, invalid --> 11547 0000B0E1 48 <1> dec ax ; 0 ? 11548 0000B0E2 7402 <1> jz short .pspvar_psp_invalid ; yes, invalid --> 11549 <1> %endif 11550 0000B0E4 F8 <1> clc 11551 0000B0E5 C3 <1> retn 11552 <1> 11553 <1> .pspvar_psp_invalid: 11554 0000B0E6 31C0 <1> xor ax, ax 11555 0000B0E8 F9 <1> stc 11556 0000B0E9 C3 <1> retn 11557 <1> 11558 <1> 11559 <1> var_get_psp_selector: 11560 0000B0EA E8E3FF <1> call var_get_psp_segment 11561 0000B0ED 7230 <1> jc .pspvar_psp_invalid 11562 <1> %if _PM 11563 0000B0EF E8E3E2 <1> call ispm 11564 0000B0F2 751E <1> jnz short .pspvar_rm 11565 0000B0F4 53 <1> push bx 11566 0000B0F5 66 <1> _386_o32 ; push edx 11567 0000B0F6 52 <1> push dx 11568 0000B0F7 51 <1> push cx 11569 0000B0F8 31D2 <1> xor dx, dx 11570 0000B0FA B90400 <1> mov cx, 4 11571 <1> .pspvar_shift: 11572 0000B0FD D1E0 <1> shl ax, 1 11573 0000B0FF D1D2 <1> rcl dx, 1 11574 0000B101 E2FA <1> loop .pspvar_shift ; dx:ax = PSP segment << 4 11575 0000B103 E8F388 <1> call getsegmented 11576 <1> ; getsegmented is assumed not to switch modes (see below). 11577 0000B106 7219 <1> jc short .pspvar_error ; (shouldn't happen) 11578 0000B108 66 <1> _386_o32 11579 0000B109 85D2 <1> test dx, dx ; test edx, edx 11580 0000B10B 7514 <1> jnz short .pspvar_error ; (assumed not to happen) 11581 0000B10D 59 <1> pop cx 11582 0000B10E 66 <1> _386_o32 11583 0000B10F 5A <1> pop dx ; pop edx 11584 0000B110 93 <1> xchg ax, bx ; ax = selector 11585 0000B111 5B <1> pop bx 11586 <1> .pspvar_rm: 11587 <1> %endif 11588 0000B112 8EC0 <1> mov es, ax ; es = segment/selector 11589 0000B114 26813E0000CD20 <1> cmp word [es:0], 20CDh ; int 20h opcode ? 11590 0000B11B 7502 <1> jne short .pspvar_psp_invalid ; no, invalid --> 11591 0000B11D F8 <1> clc 11592 0000B11E C3 <1> retn 11593 <1> 11594 <1> .pspvar_psp_invalid: 11595 0000B11F F9 <1> stc 11596 0000B120 C3 <1> retn 11597 <1> 11598 <1> .pspvar_error: 11599 0000B121 31F6 <1> xor si, si 11600 0000B123 E924F6 <1> jmp error 11601 <1> %endif 11602 <1> 11603 <1> 11604 <1> %if _BOOTLDR 11605 <1> var_bootldpunit_setup: 11606 0000B126 BB[808E] <1> mov bx, loaddata_loadedfrom - LOADDATA + bsBPB + ebpbNew + bpbnBootUnit 11608 0000B129 EB45 <1> jmp @F 11609 <1> 11610 <1> var_bootsdpunit_setup: 11611 0000B12B BB[208F] <1> mov bx, load_data - LOADDATA2 + bsBPB + ebpbNew + bpbnBootUnit 11613 0000B12E EB40 <1> jmp @F 11614 <1> 11615 <1> %if _INPUT_FILE_BOOT 11616 <1> var_bootydpunit_setup: 11617 0000B130 F606[A300]02 <1> testopt [internalflags2], dif2_input_file_boot 11618 0000B135 7440 <1> jz .retc 11619 <1> 11620 0000B137 52 <1> push dx 11621 0000B138 B8A000 <1> mov ax, LOAD_INPUT_FILE_SIZE 11622 0000B13B F726[0092] <1> mul word [load_input_file.active] 11623 0000B13F 5A <1> pop dx 11624 <1> 11625 0000B140 93 <1> xchg ax, bx 11626 0000B141 8D9F[0090] <1> lea bx, [load_input_file + bx - LOADDATA3 + bsBPB + ebpbNew + bpbnBootUnit] 11628 0000B145 EB29 <1> jmp @F 11629 <1> %endif 11630 <1> 11631 <1> var_bootldppart_setup: 11632 0000B147 BB[5C8E] <1> mov bx, loaddata_loadedfrom - LOADDATA + bsBPB + bpbHiddenSectors 11634 0000B14A EB24 <1> jmp @F 11635 <1> 11636 <1> var_bootsdppart_setup: 11637 0000B14C BB[FC8E] <1> mov bx, load_data - LOADDATA2 + bsBPB + bpbHiddenSectors 11639 0000B14F EB1F <1> jmp @F 11640 <1> 11641 <1> %if _INPUT_FILE_BOOT 11642 <1> var_bootydppart_setup: 11643 0000B151 F606[A300]02 <1> testopt [internalflags2], dif2_input_file_boot 11644 0000B156 741F <1> jz .retc 11645 <1> 11646 0000B158 52 <1> push dx 11647 0000B159 B8A000 <1> mov ax, LOAD_INPUT_FILE_SIZE 11648 0000B15C F726[0092] <1> mul word [load_input_file.active] 11649 0000B160 5A <1> pop dx 11650 <1> 11651 0000B161 93 <1> xchg ax, bx 11652 0000B162 8D9F[DC8F] <1> lea bx, [load_input_file + bx - LOADDATA3 + bsBPB + bpbHiddenSectors] 11654 0000B166 EB08 <1> jmp @F 11655 <1> %endif 11656 <1> 11657 <1> var_bootunitflags_setup: 11658 0000B168 05[E08C] <1> add ax, load_unit_flags 11659 0000B16B 89C3 <1> mov bx, ax 11660 0000B16D BF[8C98] <1> mov di, mask_bootunitflags 11661 <1> @@: 11662 0000B170 F606[9D00]40 <1> testopt [internalflags], nodosloaded 11663 0000B175 7501 <1> jnz @F ; (NC) 11664 <1> var_bootydpunit_setup.retc: 11665 <1> var_bootydppart_setup.retc: 11666 0000B177 F9 <1> stc 11667 <1> @@: 11668 0000B178 C3 <1> retn 11669 <1> %endif 11670 <1> 11671 <1> 11672 <1> usesection lDEBUG_DATA_ENTRY 11673 <1> 11674 0000987F 00 <1> align 4, db 0 11675 <1> masks: 11676 <1> ; size 4 want masks + 0 11677 <1> ; size 3 want masks + 1 11678 <1> ; size 2 want masks + 2 11679 <1> ; size 1 want masks + 3 11680 <1> ; size 0 want masks + 4 11681 <1> ; 4 - size = offset into masks 11682 00009880 00 <1> mask_4byte: db 0 11683 00009881 00 <1> mask_3byte: db 0 11684 00009882 00 <1> mask_2byte: db 0 11685 00009883 00 <1> mask_1byte: db 0 11686 00009884 FFFFFFFF <1> mask_0byte: dd -1 11687 00009888 FF0FFFFF <1> mask_ysf: dd ~ (ifhfTestReserved1 | ifhfTestReserved2 | ifhfQuietInput | ifhfQuietOutput) 11689 <1> %if _BOOTLDR 11690 0000988C FEFFFFFF <1> mask_bootunitflags: dd ~ luf_mask_writable 11691 <1> %endif 11692 <1> 11693 <1> %if _DEBUG3 11694 <1> masks_test: 11695 <1> mask_test_0: dd 0AA55AA55h 11696 <1> mask_test_1: dd 00FF00FFh 11697 <1> mtest_regs: 11698 <1> mtest_reg_0: dd 0 11699 <1> mtest_reg_1: dd 00110022h 11700 <1> %endif 11701 <1> 11702 <1> 11703 <1> usesection lDEBUG_CODE 11704 <1> ; INP: al = first character 11705 <1> ; si-> next character 11706 <1> ; OUT: CY if no variable, 11707 <1> ; al, si = unchanged 11708 <1> ; NC if variable, 11709 <1> ; bx-> low word 11710 <1> ; dx-> high word 11711 <1> ; (if cl <= 2 then dx-> some word in our memory) 11712 <1> ; (dx != bx+2 if compound register) 11713 <1> ; cl = size of variable (1, 2, 3, 4 bytes) 11714 <1> ; ch = size of variable's name (2..13 bytes) 11715 <1> ; INP:si - 1 -> variable's name 11716 <1> ; (can be modified from original content) 11717 <1> ; ah = 0 if a writeable variable (ie simply memory) 11718 <1> ; 1 if a read-only variable (ie simply memory) 11719 <1> ; 2..33 if an MMX register, see note below 11720 <1> ; al = next character behind variable 11721 <1> ; si-> behind next character 11722 <1> ; dword [di] = mask of bits that are read-only 11723 <1> ; CHG: ah, bx, dx, cx, di 11724 <1> ; STT: ss = ds = es, UP 11725 <1> ; 11726 <1> ; Note: For read access to (half of) an MMX register, no 11727 <1> ; special handling is necessary at all, because cl, 11728 <1> ; bx, and dx are set up to access a buffer that 11729 <1> ; contains the current value. (The value should be 11730 <1> ; read at once though, as the buffer may be shared 11731 <1> ; or become outdated otherwise.) 11732 <1> ; Write access to an MMX register must be handled 11733 <1> ; specifically, however. The returned field type 11734 <1> ; in ah indicates the register number (0..7) in the 11735 <1> ; lowest three bits. The two bits above those specify 11736 <1> ; the access type, which also specifies what was read 11737 <1> ; but need not be examined by readers. The access 11738 <1> ; type must be adhered to by writers. These are the 11739 <1> ; access types: 11740 <1> ; 0 zero extension from 32 bits to write all 64 bits 11741 <1> ; 1 sign extension from 32 bits to write all 64 bits 11742 <1> ; 2 writes only low 32 bits 11743 <1> ; 3 writes only high 32 bits 11744 <1> ; (Access type 3 is the only one for which the read 11745 <1> ; buffer is initialised with the high 32 bits.) 11746 <1> ; 11747 <1> ; As dx points to 'some word in our memory' if it 11748 <1> ; doesn't serve any purpose, it is still valid to 11749 <1> ; read the word that it points to. Particularly dx 11750 <1> ; mustn't contain 0FFFFh then, but with the current 11751 <1> ; implementation, it can also be assumed that we do 11752 <1> ; actually 'own' the word (even with a PM segment 11753 <1> ; shorter than 64 KiB the read would be allowed). 11754 <1> isvariable?: 11755 0000B179 A8 <1> db __TEST_IMM8 ; (skip stc, NC) 11756 <1> 11757 <1> ; As above but additionally: 11758 <1> ; 11759 <1> ; INP: di -> buffer to receive variable name, 14 bytes 11760 <1> ; OUT: if NC, buffer filled with all-caps ASCIZ name 11761 <1> .return_name: 11762 0000B17A F9 <1> stc 11763 <1> 11764 0000B17B 4E <1> dec si 11765 <1> lframe 11766 0000B17C 5589E5 <1> lenter 11767 <1> lvar word, bit0_is_return_name 11768 0000B17F 9C <1> pushf 11769 <1> lvar word, return_name_pointer 11770 0000B180 57 <1> push di 11771 0000B181 31C0 <1> xor ax, ax 11772 <1> lvar 16, namebuffer 11773 0000B183 50 <1> push ax ; ax = 0 so that accidentally reading past 11774 <1> ; the actual buffer wouldn't match 11775 0000B184 FF740C <1> push word [si+12] 11776 0000B187 FF740A <1> push word [si+10] 11777 0000B18A FF7408 <1> push word [si+8] 11778 0000B18D FF7406 <1> push word [si+6] 11779 0000B190 FF7404 <1> push word [si+4] 11780 0000B193 FF7402 <1> push word [si+2] 11781 0000B196 FF34 <1> push word [si] 11782 0000B198 89E7 <1> mov di, sp ; -> name buffer 11783 <1> 11784 <1> lvar word, fieldtype_high_flags_low 11785 <1> lequ ?fieldtype_high_flags_low + 1, fieldtype 11786 <1> lequ ?fieldtype_high_flags_low, flags 11787 0000B19A 50 <1> push ax ; field type initialised to 0 (RW), flags too 11788 0000B19B 31DB <1> _386 xor bx, bx ; (a flag for the 32-bit register name check) 11789 <1> lvar word, length_to_add 11790 0000B19D 50 <1> push ax ; = 0 11791 <1> lvar word, startpointer 11792 0000B19E 56 <1> push si ; -> name start 11793 0000B19F 89FE <1> mov si, di 11794 0000B1A1 57 <1> push di 11795 <1> 11796 0000B1A2 B91000 <1> mov cx, 16 11797 <1> .store: 11798 0000B1A5 AC <1> lodsb 11799 <1> ; call uppercase ; (isseparator? calls uppercase) 11800 0000B1A6 E8A7FA <1> call isseparator? 11801 0000B1A9 F8 <1> clc 11802 0000B1AA 7501 <1> jne short .not_separator 11803 0000B1AC F9 <1> stc 11804 <1> .not_separator: 11805 0000B1AD D1DA <1> rcr dx, 1 ; dl = flags indicating separators 11806 0000B1AF AA <1> stosb 11807 0000B1B0 E2F3 <1> loop .store 11808 <1> 11809 0000B1B2 5E <1> pop si 11810 <1> 11811 0000B1B3 F646FE01 <1> test byte [bp + ?bit0_is_return_name], 1 11812 0000B1B7 7409 <1> jz @F 11813 <1> 11814 0000B1B9 56 <1> push si 11815 0000B1BA B107 <1> mov cl, 14 >> 1 11816 0000B1BC 8B7EFC <1> mov di, word [bp + ?return_name_pointer] 11817 0000B1BF F3A5 <1> rep movsw 11818 0000B1C1 5E <1> pop si 11819 <1> 11820 <1> @@: 11821 0000B1C2 F6C214 <1> test dl, 1<<2|1<<4 11822 0000B1C5 AD <1> lodsw 11823 0000B1C6 7460 <1> jz short .notreg16 11824 <1> 11825 0000B1C8 E84700 <1> call .reg16names_match ; (iff no match, --> .notreg16) 11826 <1> ; bx-> regs entry of (first) match 11827 0000B1CB F6C204 <1> test dl, 1<<2 11828 0000B1CE AD <1> lodsw 11829 0000B1CF 7403E99000 <1> jnz .reg16 ; iff single match --> 11830 <1> 11831 <1> ; Check for a second 16-bit register name 11832 <1> ; (ie check for a compound register name) 11833 0000B1D4 E83B00 <1> call .reg16names_match ; (iff no match, --> .notreg16) 11834 <1> ; bx-> regs entry of second match 11835 0000B1D7 92 <1> xchg dx, ax ; dx-> regs entry of first match 11836 0000B1D8 B90404 <1> mov cx, 4<<8|4 11837 <1> .return_success: ; cx, bx, dx, ?fieldtype set 11838 0000B1DB 31C0 <1> xor ax, ax 11839 0000B1DD 88C8 <1> mov al, cl 11840 0000B1DF F7D8 <1> neg ax 11841 0000B1E1 05[8498] <1> add ax, masks + 4 ; 4 - size = offset into masks 11842 0000B1E4 97 <1> xchg di, ax ; di -> mask 11843 0000B1E5 807EEB01 <1> cmp byte [bp + ?fieldtype], 1 11844 0000B1E9 7503 <1> jne @F 11845 0000B1EB BF[8498] <1> mov di, mask_0byte ; di -> mask 11846 <1> @@: 11847 <1> .return_success_di: 11848 0000B1EE 31C0 <1> xor ax, ax 11849 0000B1F0 88E8 <1> mov al, ch ; ax = length 11850 <1> 11851 0000B1F2 F646FE01 <1> test byte [bp + ?bit0_is_return_name], 1 11852 0000B1F6 7407 <1> jz @F 11853 <1> 11854 0000B1F8 8B76FC <1> mov si, word [bp + ?return_name_pointer] 11855 0000B1FB 01C6 <1> add si, ax 11856 0000B1FD 8824 <1> mov byte [si], ah ; zero-terminate 11857 <1> @@: 11858 <1> 11859 0000B1FF 5E <1> pop si ; ?startpointer 11860 0000B200 F646EA01 <1> testopt [bp + ?flags], 1 11861 0000B204 7402 <1> jz @F 11862 0000B206 58 <1> pop ax ; get length to add to start 11863 0000B207 50 <1> push ax ; fill stack slot again 11864 <1> @@: 11865 0000B208 01C6 <1> add si, ax ; -> behind name (should NC) 11866 0000B20A 58 <1> pop ax ; discard ?length_to_add 11867 0000B20B F8 <1> clc ; (NC) 11868 <1> .return_ax_frame_lodsb: 11869 0000B20C 58 <1> pop ax ; ah = ?type 11870 0000B20D 89EC5D <1> lleave code 11871 0000B210 AC <1> lodsb 11872 <1> .retn: 11873 0000B211 C3 <1> retn 11874 <1> 11875 <1> 11876 <1> ; INP: ax = capitalised candidate register name 11877 <1> ; ch = 0 11878 <1> ; dx, si, bx, etc set up for later checks 11879 <1> ; OUT: Iff match, 11880 <1> ; bx-> associated regs entry (dword-aligned) 11881 <1> ; ax = INP:bx 11882 <1> ; Else, 11883 <1> ; returns to .notreg16 11884 <1> ; bx left unchanged on 386 systems 11885 <1> ; CHG: cl, di, bx, ax 11886 <1> ; 11887 <1> ; Note: The 32-bit register name check depends on the 11888 <1> ; fact that the low two bits of bx are set to 11889 <1> ; zero on a match, which is true because regs 11890 <1> ; is dword-aligned. 11891 <1> ; It also depends on bx being left unchanged on 11892 <1> ; a mismatch, which is the case unless the 11893 <1> ; non-386 additional FS,GS filtering occurs. 11894 <1> .reg16names_match: 11895 0000B212 BF[9C82] <1> mov di, reg16names 11896 0000B215 B110 <1> mov cl, 16 11897 0000B217 F2AF <1> repne scasw 11898 0000B219 750C <1> jne short .notreg16_pop ; no match --> 11899 0000B21B 01FF <1> add di, di 11900 0000B21D 93 <1> xchg ax, bx ; (returned for compound register name match) 11901 0000B21E 8D9D[3405] <1> lea bx, [di -2*(reg16names+DATASECTIONFIXUP+2) +regs] 11902 <1> ; -> regs entry 11903 0000B222 C3 <1> _386 retn 11904 <1> ; cx = number of remaining reg16names 11905 0000B223 D1E9 <1> _no386 shr cx, 1 ; cx = number of remaining reg16names pairs 11906 <1> ; = 1 iff exactly the IP,FL pair remaining 11907 <1> ; (ie matched one of FS,GS) 11908 0000B225 E2EA <1> _no386 loop .retn ; iff cx != 1, return the match --> 11909 <1> ; on non-386 systems, FS,GS matches fall through here 11910 <1> .notreg16_pop: 11911 0000B227 58 <1> pop ax ; (discard near return address) 11912 <1> .notreg16: 11913 <1> ; Check for a 32-bit register name 11914 0000B228 F6C208 <1> _386 test dl, 1<<3 11915 0000B22B 7419 <1> _386 jz short .notreg32 11916 <1> 11917 0000B22D 8D76EC <1> _386 lea si, [bp+?namebuffer] 11918 0000B230 AC <1> _386 lodsb 11919 0000B231 D0EB <1> _386 shr bl, 1 ; CY iff second entry during same call 11920 <1> ; (in that case, al contains 'E') 11921 0000B233 1C45 <1> _386 sbb al, 'E' ; possibly an 'E' register ? (on first entry) 11922 0000B235 AD <1> _386 lodsw 11923 0000B236 750E <1> _386 jne short .notreg32 ; no --> (or after second entry) 11924 0000B238 43 <1> _386 inc bx ; prepare flag for second entry 11925 <1> ; (this requires regs to be dword-aligned!) 11926 0000B239 80FC53 <1> _386 cmp ah, 'S' ; candidate segment register ? 11927 0000B23C 7408 <1> _386 je short .notreg32 ; yes, skip check (disallow match) --> 11928 <1> 11929 0000B23E E8D1FF <1> _386 call .reg16names_match ; (iff no match, --> .notreg16 (second entry)) 11930 <1> ; bx-> regs entry of match 11931 0000B241 B90403 <1> _386 mov cx, 3<<8|4 11932 0000B244 EB22 <1> _386 jmp short .return_success_var32_set_dx 11933 <1> 11934 <1> .notreg32: 11935 <1> ; Check for an 8-bit register name 11936 0000B246 F6C204 <1> test dl, 1<<2 11937 0000B249 7423 <1> jz short .notreg8 11938 <1> 11939 0000B24B 8D76EC <1> lea si, [bp+?namebuffer] 11940 0000B24E AD <1> lodsw 11941 0000B24F BF[8C82] <1> mov di, reg8names 11942 0000B252 B108 <1> mov cl, 8 11943 0000B254 F2AF <1> repne scasw 11944 0000B256 7516 <1> jne short .notreg8 11945 <1> ; cx = cl = number of remaining reg8names 11946 0000B258 80E101 <1> and cl, 1 ; cx = cl = 1 iff an xL register, else 0 11947 0000B25B 8D9DE189 <1> lea bx, [di-reg8names-2+regs-1] 11948 <1> ; bx-> reg_eax-1 if AL, reg_eax+1 if AH, etc 11949 0000B25F 01CB <1> add bx, cx ; bx-> reg_eax if AL, reg_eax+1 if AH, etc 11950 0000B261 B101 <1> mov cl, 1 11951 <1> 11952 0000B263 A9 <1> db __TEST_IMM16 ; (NC, skip mov) 11953 <1> .reg16: 11954 0000B264 B102 <1> mov cl, 2 11955 <1> .got2bytename: 11956 <1> .got2bytename_var32_set_dx: 11957 0000B266 B502 <1> mov ch, 2 11958 <1> .return_success_var32_set_dx: 11959 0000B268 8D5702 <1> lea dx, [bx+2] ; (irrelevant to 8-/16-bit register return) 11960 <1> %define .return_success_j .return_success_j1 11961 <1> %[.return_success_j]: 11962 0000B26B E96DFF <1> jmp .return_success 11963 <1> 11964 <1> .notreg8: 11965 <1> 11966 0000B26E BF[AA96] <1> mov di, isvariable_morebyte_nameheaders 11967 <1> 11968 <1> .loop: 11969 0000B271 8B46EC <1> mov ax, word [bp + ?namebuffer] 11970 0000B274 B9[7097] <1> mov cx, isvariable_morebyte_nameheaders.end 11971 0000B277 39CF <1> cmp di, cx 11972 0000B279 730A <1> jae @F 11973 0000B27B 29F9 <1> sub cx, di 11974 0000B27D D1E9 <1> shr cx, 1 ; = how many headers remaining 11975 0000B27F F2AF <1> repne scasw 11976 0000B281 741E <1> je .check_morebyte 11977 <1> %if IVS_HAVE_ONEBYTE 11978 0000B283 EB0C <1> jmp .next_no_pop 11979 <1> 11980 <1> @@: 11981 <1> %if IVS_SINGLE_ONEBYTE 11982 0000B285 41 <1> inc cx 11983 0000B286 39CF <1> cmp di, cx ; iteration after one byte var check ? 11984 0000B288 7309 <1> jae @F ; yes, end --> 11985 0000B28A 47 <1> inc di ; remember we did the one byte check 11986 0000B28B 3C56 <1> cmp al, IVS_SINGLE_ONEBYTE_NAME 11987 0000B28D 7407 <1> je .check_onebyte 11988 <1> %else 11989 <1> mov cx, isvariable_onebyte_names.end 11990 <1> sub cx, di ; = how many names remaining 11991 <1> jbe @F ; if none --> 11992 <1> repne scasb 11993 <1> je .check_onebyte 11994 <1> %endif 11995 <1> %endif 11996 0000B28F A8 <1> db __TEST_IMM8 ; (skip pop) 11997 <1> .next: 11998 0000B290 5F <1> pop di 11999 <1> .next_no_pop: 12000 0000B291 EBDE <1> jmp .loop 12001 <1> 12002 <1> @@: 12003 0000B293 E94801 <1> jmp .end 12004 <1> 12005 <1> 12006 <1> %if IVS_HAVE_ONEBYTE 12007 <1> .check_onebyte: 12008 0000B296 57 <1> push di 12009 <1> %if IVS_SINGLE_ONEBYTE 12010 0000B297 BB[7893] <1> mov bx, isvariable_struc_onebyte_list 12011 <1> %else 12012 <1> sub di, isvariable_onebyte_names + 1 12013 <1> ; = index 12014 <1> %if ISVARIABLESTRUC_size == 8 12015 <1> add di, di ; = index * 2 12016 <1> add di, di ; = index * 4 12017 <1> add di, di ; = index * 8 12018 <1> %else 12019 <1> %error Unexpected structure size 12020 <1> %endif 12021 <1> lea bx, [di + isvariable_struc_onebyte_list] 12022 <1> %endif 12023 0000B29A 8D76ED <1> lea si, [bp + ?namebuffer + 1] ; -> buffered string (allcaps) 12024 0000B29D 31C9 <1> xor cx, cx ; = 0, gets incremented next 12025 0000B29F EB21 <1> jmp @F 12026 <1> %endif 12027 <1> 12028 <1> .check_morebyte: 12029 0000B2A1 57 <1> push di 12030 0000B2A2 81EF[AC96] <1> sub di, isvariable_morebyte_nameheaders + 2 12031 <1> ; = index * 2 12032 <1> %if ISVARIABLESTRUC_size == 8 12033 0000B2A6 01FF <1> add di, di ; = index * 4 12034 0000B2A8 01FF <1> add di, di ; = index * 8 12035 <1> %else 12036 <1> %error Unexpected structure size 12037 <1> %endif 12038 0000B2AA 8D9D[8093] <1> lea bx, [di + isvariable_struc_morebyte_list] 12039 0000B2AE 8B4F02 <1> mov cx, word [bx + ivFlags] 12040 0000B2B1 83E10F <1> and cx, ivfNameLengthMask ; cx = length 12041 0000B2B4 8B3F <1> mov di, word [bx + ivName] ; -> name 12042 0000B2B6 8D76EE <1> lea si, [bp + ?namebuffer + 2] ; -> buffered string (allcaps) 12043 0000B2B9 38C0 <1> cmp al, al ; ZR (in case remaining length is zero) 12044 0000B2BB 51 <1> push cx 12045 0000B2BC F3A6 <1> repe cmpsb ; compare 12046 0000B2BE 59 <1> pop cx 12047 0000B2BF 75CF <1> jne .next ; if not same --> 12048 0000B2C1 41 <1> inc cx ; increment twice 12049 <1> @@: 12050 0000B2C2 41 <1> inc cx ; increment once 12051 0000B2C3 AC <1> lodsb ; get next byte in buffer 12052 0000B2C4 807F0600 <1> cmp byte [bx + ivArrayLast], 0 12053 0000B2C8 7503E9BC00 <1> je .notarray 12054 <1> 12055 <1> .array: 12056 0000B2CD 3C28 <1> cmp al, '(' 12057 0000B2CF 754B <1> jne .array_not_index_expression ; not index expression --> 12058 <1> 12059 <1> .array_index_expression: 12060 0000B2D1 8B76E6 <1> mov si, word [bp + ?startpointer] 12061 0000B2D4 01CE <1> add si, cx ; -> at opening parens 12062 0000B2D6 46 <1> inc si ; -> behind opening parens 12063 0000B2D7 AC <1> lodsb 12064 0000B2D8 52 <1> push dx 12065 0000B2D9 E88D07 <1> call getbyte 12066 0000B2DC B600 <1> mov dh, 0 12067 0000B2DE 89D7 <1> mov di, dx ; di = index 12068 0000B2E0 5A <1> pop dx 12069 0000B2E1 E8EE08 <1> call skipwh0 12070 0000B2E4 3C29 <1> cmp al, ')' ; insure closing parens 12071 0000B2E6 7403E99B00 <1> jne .error_j1 12072 <1> 12073 0000B2EB 56 <1> push si 12074 0000B2EC 2B76E6 <1> sub si, word [bp + ?startpointer] 12075 <1> ; = how much to skip 12076 0000B2EF 8976E8 <1> mov word [bp + ?length_to_add], si 12077 0000B2F2 5E <1> pop si 12078 0000B2F3 804EEA01 <1> setopt [bp + ?flags], 1 12079 <1> 12080 0000B2F7 F646FE01 <1> test byte [bp + ?bit0_is_return_name], 1 12081 0000B2FB 7415 <1> jz .array_no_return_name 12082 <1> 12083 0000B2FD 97 <1> xchg ax, di 12084 0000B2FE 8B7EFC <1> mov di, word [bp + ?return_name_pointer] 12085 0000B301 01CF <1> add di, cx ; -> behind name 12086 0000B303 807F060F <1> cmp byte [bx + ivArrayLast], 0Fh 12087 0000B307 7705 <1> ja @F ; if >= 10h is a valid index --> 12088 0000B309 E88209 <1> call hexnyb ; expand to single digit 12089 0000B30C EB03 <1> jmp @FF 12090 <1> @@: 12091 0000B30E E87209 <1> call hexbyte ; expand to two digits 12092 <1> @@: 12093 0000B311 97 <1> xchg ax, di ; restore di = index 12094 <1> 12095 <1> .array_no_return_name: 12096 0000B312 41 <1> inc cx ; make space for one digit 12097 0000B313 807F060F <1> cmp byte [bx + ivArrayLast], 0Fh 12098 0000B317 7601 <1> jna @F ; if maximum index <= 0Fh --> 12099 0000B319 41 <1> inc cx ; make space for another digit 12100 <1> @@: 12101 0000B31A EB57 <1> jmp .array_index_expression_common 12102 <1> 12103 <1> .array_not_index_expression: 12104 0000B31C E831F9 <1> call isseparator? ; name ends ? 12105 0000B31F 7509 <1> jne @F ; no --> 12106 0000B321 F6470302 <1> testopt [bx + ivFlags], ivfArrayOptional 12107 <1> ; is the index optional ? 12108 0000B325 7567 <1> jnz .arrayfirst ; yes, handle as if first --> 12109 <1> .next_j1: 12110 0000B327 E966FF <1> jmp .next ; no, mismatch --> 12111 <1> 12112 <1> @@: 12113 0000B32A E85307 <1> call getnyb 12114 0000B32D 72F8 <1> jc .next_j1 12115 0000B32F 98 <1> cbw ; ax = first nybble of index 12116 0000B330 97 <1> xchg di, ax ; di = first nybble of index 12117 0000B331 AC <1> lodsb 12118 0000B332 F6470304 <1> testopt [bx + ivFlags], ivfSeparatorSpecial 12119 0000B336 7408 <1> jz @F 12120 0000B338 807F060F <1> cmp byte [bx + ivArrayLast], 0Fh 12121 <1> ; highest > 0Fh ? 12122 0000B33C 7629 <1> jna .gotseparatorspecial; no --> 12123 0000B33E EB0B <1> jmp .get_second_digit 12124 <1> 12125 <1> @@: 12126 0000B340 E80DF9 <1> call isseparator? ; single digit ? 12127 0000B343 7422 <1> je @F ; yes --> 12128 0000B345 807F060F <1> cmp byte [bx + ivArrayLast], 0Fh 12129 <1> ; highest > 0Fh ? 12130 0000B349 76DC <1> jna .next_j1 ; no --> 12131 <1> .get_second_digit: 12132 0000B34B E83207 <1> call getnyb 12133 0000B34E 72D7 <1> jc .next_j1 12134 0000B350 98 <1> cbw ; ax = second nybble of index 12135 0000B351 01FF <1> add di, di 12136 0000B353 01FF <1> add di, di 12137 0000B355 01FF <1> add di, di 12138 0000B357 01FF <1> add di, di ; di = first digit times 16 12139 0000B359 01C7 <1> add di, ax ; di = full index 12140 0000B35B AC <1> lodsb 12141 0000B35C F6470304 <1> testopt [bx + ivFlags], ivfSeparatorSpecial 12142 0000B360 7505 <1> jnz @F 12143 0000B362 E8EBF8 <1> call isseparator? 12144 0000B365 75C0 <1> jne .next_j1 12145 <1> @@: 12146 <1> .gotseparatorspecial: 12147 <1> 12148 0000B367 F7DE <1> neg si ; minus -> after separator 12149 0000B369 8D4AED <1> lea cx, [bp + ?namebuffer + 1 + si] 12150 <1> ; -> buffered string plus 1 minus -> after separator 12151 <1> ; -> buffered string plus 1 minus (-> at separator plus 1) 12152 <1> ; -> buffered string minus -> at separator 12153 0000B36C F7D9 <1> neg cx ; -> at separator minus -> buffered string 12154 0000B36E 8B76E6 <1> mov si, word [bp + ?startpointer] 12155 0000B371 01CE <1> add si, cx 12156 <1> 12157 <1> .array_index_expression_common: 12158 <1> ; si -> behind index 12159 0000B373 89F8 <1> mov ax, di 12160 <1> ; test ah, ah 12161 <1> ; jnz .error_j1 ; (not possible) 12162 0000B375 3A4706 <1> cmp al, byte [bx + ivArrayLast] 12163 <1> ; index > last ? 12164 0000B378 770C <1> ja .error_j1 ; then error --> 12165 <1> 12166 0000B37A F6470301 <1> testopt [bx + ivFlags], ivfArrayOneBased 12167 0000B37E 7403 <1> jz @F ; got index 12168 0000B380 48 <1> dec ax ; decrement index to get 0-based 12169 0000B381 7803 <1> js .error_j1 ; if it was 0, invalid --> 12170 <1> @@: 12171 0000B383 96 <1> xchg ax, si ; si = index 12172 0000B384 EB0A <1> jmp .arraycommon ; continue 12173 <1> 12174 <1> .error_j1: 12175 0000B386 E9C1F3 <1> jmp error 12176 <1> 12177 <1> 12178 <1> .notarray: 12179 0000B389 E8C4F8 <1> call isseparator? ; name ends ? 12180 0000B38C 7599 <1> jne .next_j1 ; no, mismatch --> 12181 <1> 12182 <1> .arrayfirst: 12183 0000B38E 31F6 <1> xor si, si ; si = array index (0 here) 12184 <1> 12185 <1> .arraycommon: 12186 0000B390 88CD <1> mov ch, cl ; ch = name length 12187 0000B392 8B4702 <1> mov ax, word [bx + ivFlags] 12188 0000B395 83E030 <1> and ax, ivfVarLengthMask; ax = shifted encoded var length 12189 0000B398 B104 <1> mov cl, ivfVarLengthShift 12190 0000B39A D3E8 <1> shr ax, cl ; ax = encoded var length 12191 0000B39C 40 <1> inc ax ; decode var length 12192 0000B39D 88C1 <1> mov cl, al ; cl = var length 12193 <1> 12194 0000B39F 96 <1> xchg ax, si ; ax = array index 12195 <1> 12196 0000B3A0 F6470280 <1> testopt [bx + ivFlags], ivfReadOnly 12197 0000B3A4 7403 <1> jz @F 12198 0000B3A6 FE46EB <1> inc byte [bp + ?fieldtype] 12199 <1> ; = 1 (RO) 12200 <1> @@: 12201 0000B3A9 31FF <1> xor di, di 12202 0000B3AB 8B7704 <1> mov si, word [bx + ivAddress] 12203 0000B3AE F6470240 <1> testopt [bx + ivFlags], ivfSpecialSetUp 12204 0000B3B2 7407 <1> jz .notspecial 12205 <1> ; (NC) 12206 0000B3B4 FFD6 <1> call si ; INP: ax = array index (0-based), di = 0 12207 <1> ; CHG: si, ax 12208 <1> ; OUT: NC if valid, 12209 <1> ; bx -> var, di = 0 or di -> mask 12210 0000B3B6 7318 <1> jnc @F 12211 0000B3B8 E9D5FE <1> jmp .next 12212 <1> 12213 <1> .notspecial: 12214 0000B3BB 8A5F07 <1> mov bl, byte [bx + ivArrayBetween] 12215 0000B3BE B700 <1> mov bh, 0 ; bx = array between offset 12216 0000B3C0 00CB <1> add bl, cl 12217 0000B3C2 80D700 <1> adc bh, 0 ; bx = array item size 12218 0000B3C5 F7E3 <1> mul bx ; dx:ax = ax times bx 12219 0000B3C7 85D2 <1> test dx, dx 12220 0000B3C9 75BB <1> jnz .error_j1 12221 0000B3CB 01F0 <1> add ax, si ; ax -> variable 12222 0000B3CD 72B7 <1> jc .error_j1 12223 0000B3CF 93 <1> xchg ax, bx ; bx -> variable 12224 <1> @@: 12225 0000B3D0 5A <1> pop dx ; (discard pointer into names/headers) 12226 0000B3D1 8D5702 <1> lea dx, [bx+2] ; (irrelevant to 8-/16-bit register return) 12227 0000B3D4 85FF <1> test di, di 12228 0000B3D6 7503E900FE <1> jz .return_success 12229 0000B3DB E910FE <1> jmp .return_success_di 12230 <1> 12231 <1> 12232 <1> .end: 12233 <1> %if _MMXSUPP 12234 <1> ;MMx MMxf MM(x) MM(x)f 12235 0000B3DE F6C278 <1> test dl, 1<<3|1<<4| 1<<5| 1<<6 12236 0000B3E1 746A <1> jz short .notmmx 12237 <1> 12238 0000B3E3 8D76EC <1> lea si, [bp+?namebuffer] 12239 0000B3E6 803E[F20A]00 <1> cmp byte [has_mmx], 0 ; MMX supported ? 12240 0000B3EB 7460 <1> je short .notmmx ; no --> 12241 <1> [cpu 586] 12242 0000B3ED AD <1> lodsw 12243 0000B3EE 3D4D4D <1> cmp ax, "MM" ; possibly an MMX register ? 12244 0000B3F1 755A <1> jne short .notmmx ; no --> 12245 0000B3F3 AC <1> lodsb 12246 0000B3F4 E85301 <1> call getstmmxdigit 12247 0000B3F7 7254 <1> jc short .notmmx 12248 0000B3F9 88DC <1> mov ah, bl 12249 0000B3FB C0E303 <1> shl bl, 3 ; shift into reg field 12250 0000B3FE 8D4C14 <1> lea cx, [si-?namebuffer] 12251 0000B401 80CB06 <1> or bl, 06h ; code to get our ModR/M byte (r/m = [ofs]) 12252 0000B404 29E9 <1> sub cx, bp ; length of name (if with suffix) 12253 0000B406 881E[38B4] <1> mov byte [.getmmxlow_modrm], bl 12254 0000B40A 43 <1> inc bx ; adjust the ModR/M byte (r/m = [bx]) 12255 0000B40B AC <1> lodsb 12256 0000B40C 881E[5DB4] <1> mov byte [.getmmxhigh_modrm], bl 12257 0000B410 4E <1> dec si 12258 0000B411 4E <1> dec si 12259 <1> 12260 0000B412 E83BF8 <1> call isseparator? ; a separator after potential suffix ? 12261 0000B415 AC <1> lodsb 12262 0000B416 B700 <1> mov bh, 0 12263 0000B418 7516 <1> jne short .check_mmx_no_suffix ; no --> 12264 <1> 12265 0000B41A 3C5A <1> cmp al, 'Z' 12266 0000B41C 7418 <1> je short .getmmxlow ; 0 = ZX --> 12267 0000B41E B710 <1> mov bh, 2<<3 ; = 10h = low 12268 0000B420 3C4C <1> cmp al, 'L' 12269 0000B422 7412 <1> je short .getmmxlow 12270 0000B424 B708 <1> mov bh, 1<<3 ; = 8h = SX 12271 0000B426 3C53 <1> cmp al, 'S' 12272 0000B428 740C <1> je short .getmmxlow 12273 0000B42A 3C48 <1> cmp al, 'H' 12274 0000B42C 7425 <1> je short .getmmxhigh 12275 0000B42E B700 <1> mov bh, 0 ; 0 = ZX 12276 <1> .check_mmx_no_suffix: 12277 0000B430 49 <1> dec cx ; length of name (if no suffix follows) 12278 0000B431 E81CF8 <1> call isseparator? ; immediately a separator (but no suffix) ? 12279 0000B434 7517 <1> jne short .notmmx ; no --> 12280 <1> ; yes, (default to) zero-extending full reg 12281 <1> .getmmxlow: 12282 <1> .getmmxlow_modrm: equ $+2 ; (opcode adjusted for the right MMX reg) 12283 0000B436 0F7E06[EC0B] <1> movd dword [mmxbuff], mm0 12284 0000B43B 08FC <1> or ah, bh 12285 <1> 12286 <1> .mmxcommon: 12287 0000B43D 80C402 <1> add ah, 2 12288 0000B440 B504 <1> mov ch, 4 12289 0000B442 86CD <1> xchg cl, ch 12290 0000B444 BB[EC0B] <1> mov bx, mmxbuff 12291 0000B447 8866EB <1> mov byte [bp+?fieldtype], ah 12292 <1> .return_success_var32_set_dx_j: 12293 0000B44A E91BFE <1> jmp .return_success_var32_set_dx 12294 <1> __CPU__ 12295 <1> 12296 <1> .notmmx: 12297 <1> %endif 12298 <1> 12299 <1> .return_failure: 12300 0000B44D 5E <1> pop si ; ?startpointer 12301 0000B44E 58 <1> pop ax ; ?length_to_add 12302 0000B44F F9 <1> stc 12303 0000B450 E9B9FD <1> jmp .return_ax_frame_lodsb 12304 <1> 12305 <1> 12306 <1> %if _MMXSUPP 12307 <1> [cpu 586] 12308 <1> .getmmxhigh: 12309 0000B453 83EC08 <1> sub sp, byte 8 12310 0000B456 80CC18 <1> or ah, 3<<3 ; = 18h = high 12311 0000B459 89E3 <1> mov bx, sp ; (ss = ds) 12312 <1> .getmmxhigh_modrm: equ $+2 ; (opcode adjusted for the right MMX reg) 12313 0000B45B 0F7F07 <1> movq qword [bx], mm0 12314 0000B45E 5B <1> pop bx 12315 0000B45F 5B <1> pop bx ; discard low dword 12316 0000B460 668F06[EC0B] <1> pop dword [mmxbuff] ; save high dword here 12317 0000B465 EBD6 <1> jmp short .mmxcommon 12318 <1> __CPU__ 12319 <1> %endif 12320 <1> 12321 <1> 12322 <1> var_ri_setup: 12323 0000B467 8D76F0 <1> lea si, [bp + ?namebuffer + 4] 12324 0000B46A F646EA01 <1> testopt [bp + ?flags], 1 12325 0000B46E 7409 <1> jz @F 12326 0000B470 8B76E6 <1> mov si, word [bp + ?startpointer] 12327 0000B473 0376E8 <1> add si, word [bp + ?length_to_add] 12328 0000B476 FF46E8 <1> inc word [bp + ?length_to_add] 12329 <1> @@: 12330 0000B479 50 <1> push ax 12331 0000B47A AC <1> lodsb ; al = last letter 12332 0000B47B E89DD9 <1> call uppercase 12333 0000B47E 88C7 <1> mov bh, al ; bh = letter 12334 0000B480 3C4C <1> cmp al, 'L' ; valid one ? 12335 0000B482 7408 <1> je @F 12336 0000B484 3C4F <1> cmp al, 'O' 12337 0000B486 7404 <1> je @F 12338 0000B488 3C53 <1> cmp al, 'S' 12339 0000B48A 755A <1> jne .ret_CY_pop ; no --> 12340 <1> @@: ; is valid letter 12341 0000B48C AC <1> lodsb ; = candidate separator 12342 0000B48D E8C0F7 <1> call isseparator? ; is it ? 12343 0000B490 7554 <1> jne .ret_CY_pop ; no --> 12344 0000B492 58 <1> pop ax 12345 <1> 12346 0000B493 F646FE01 <1> test byte [bp + ?bit0_is_return_name], 1 12347 0000B497 7408 <1> jz .interrupt_no_return_name 12348 <1> 12349 0000B499 8B7EFC <1> mov di, word [bp + ?return_name_pointer] 12350 0000B49C 83C704 <1> add di, 4 12351 0000B49F 883D <1> mov byte [di], bh ; store the additional letter 12352 <1> 12353 <1> .interrupt_no_return_name: 12354 0000B4A1 FEC5 <1> inc ch ; increment name length 12355 0000B4A3 93 <1> xchg ax, bx 12356 <1> 12357 <1> ; INP: bx = interrupt number 0..255 12358 <1> ; ah = 'S' for segment, 'O' for offset, 'L' for linear 12359 0000B4A4 31F6 <1> xor si, si 12360 <1> %if _PM 12361 0000B4A6 53 <1> push bx 12362 0000B4A7 E82F6A <1> call setds2si ; ds => IVT 12363 0000B4AA 5B <1> pop bx 12364 <1> %else 12365 <1> mov ds, si ; ds => IVT 12366 <1> %endif 12367 0000B4AB 80FC53 <1> cmp ah, 'S' 12368 0000B4AE 7502 <1> jne @F 12369 0000B4B0 46 <1> inc si 12370 0000B4B1 46 <1> inc si ; si = 2 (displacement to get segment) 12371 <1> @@: 12372 0000B4B2 01DB <1> add bx, bx 12373 0000B4B4 01DB <1> add bx, bx ; ds:bx -> IVT entry 12374 0000B4B6 FF7002 <1> push word [bx + si + 2] 12375 0000B4B9 FF30 <1> push word [bx + si] ; get segment:offset or trash:segment 12376 0000B4BB 16 <1> push ss 12377 0000B4BC 1F <1> pop ds 12378 0000B4BD BB[9896] <1> mov bx, interrupt_var 12379 0000B4C0 8F07 <1> pop word [bx] 12380 0000B4C2 8F4702 <1> pop word [bx + 2] 12381 <1> ; store in variable 12382 0000B4C5 80FC4C <1> cmp ah, 'L' 12383 0000B4C8 7519 <1> jne @FF 12384 0000B4CA 51 <1> push cx 12385 0000B4CB 31C0 <1> xor ax, ax 12386 0000B4CD 874702 <1> xchg ax, word [bx + 2] ; clear high word, get segment 12387 0000B4D0 31D2 <1> xor dx, dx ; dx:ax = segment 12388 0000B4D2 B90400 <1> mov cx, 4 12389 <1> @@: 12390 0000B4D5 D1E0 <1> shl ax, 1 12391 0000B4D7 D1D2 <1> rcl dx, 1 12392 0000B4D9 E2FA <1> loop @B ; shift up 4 bits 12393 0000B4DB 0107 <1> add word [bx], ax 12394 0000B4DD 115702 <1> adc word [bx + 2], dx ; add to dword 12395 0000B4E0 59 <1> pop cx 12396 0000B4E1 B103 <1> mov cl, 3 ; 3byte variable (21 bits needed) 12397 <1> @@: 12398 0000B4E3 31FF <1> xor di, di ; (NC) 12399 0000B4E5 C3 <1> retn 12400 <1> 12401 <1> .ret_CY_pop: 12402 0000B4E6 58 <1> pop ax 12403 <1> .ret_CY: 12404 0000B4E7 F9 <1> stc 12405 0000B4E8 C3 <1> retn 12406 <1> 12407 <1> 12408 <1> 12409 <1> %if _INPUT_FILE_BOOT || _INPUT_FILE_HANDLES 12410 <1> var_ysf_setup: 12411 0000B4E9 93 <1> xchg ax, bx ; bx = index 12412 0000B4EA 8A46ED <1> mov al, byte [bp + ?namebuffer + 1] 12413 0000B4ED 3C53 <1> cmp al, 'S' 12414 0000B4EF 750B <1> jne @F 12415 <1> %if _INPUT_FILE_BOOT 12416 0000B4F1 F606[A300]02 <1> testopt [internalflags2], dif2_input_file_boot 12417 0000B4F6 B042 <1> mov al, 'B' 12418 0000B4F8 7502 <1> jnz @F 12419 <1> %endif 12420 0000B4FA B048 <1> mov al, 'H' 12421 <1> @@: 12422 0000B4FC 3C42 <1> cmp al, 'B' 12423 0000B4FE 7509 <1> jne @F 12424 <1> %if _INPUT_FILE_BOOT 12425 0000B500 F606[A300]02 <1> testopt [internalflags2], dif2_input_file_boot 12426 0000B505 750D <1> jnz @FF 12427 <1> %endif 12428 <1> .notysf: 12429 0000B507 F9 <1> stc 12430 0000B508 C3 <1> retn 12431 <1> @@: 12432 <1> %if _INPUT_FILE_HANDLES 12433 0000B509 3C48 <1> cmp al, 'H' 12434 0000B50B 75FA <1> jne short .notysf 12435 0000B50D F606[A200]10 <1> testopt [internalflags2], dif2_input_file 12436 0000B512 74F3 <1> jz .notysf 12437 <1> %else 12438 <1> jmp .notysf 12439 <1> %endif 12440 <1> @@: 12441 <1> ; bx = index 12442 <1> %if _INPUT_FILE_HANDLES 12443 0000B514 BF[880A] <1> mov di, input_file_handles.active 12444 <1> ; -> active index for YHF 12445 <1> %endif 12446 <1> %if _INPUT_FILE_BOOT 12447 <1> %if _INPUT_FILE_HANDLES 12448 0000B517 3C42 <1> cmp al, 'B' 12449 0000B519 7503 <1> jne @F 12450 <1> %endif 12451 0000B51B BF[0092] <1> mov di, load_input_file.active 12452 <1> ; -> active index for YBF 12453 <1> @@: 12454 <1> %endif 12455 0000B51E F7DB <1> neg bx ; -1 .. 0 12456 0000B520 7406 <1> jz @F ; if 0, always valid --> 12457 <1> ; index was nonzero, meaning bx now holds a 12458 <1> ; negative number. if [.active] is large enough, 12459 <1> ; adding it to bx yields a positive number, which 12460 <1> ; carries in the addition. check for that. 12461 0000B522 031D <1> add bx, word [di] 12462 0000B524 73E1 <1> jnc .notysf ; not valid index --> 12463 0000B526 EB02 <1> jmp @FF ; valid, use it 12464 <1> @@: 12465 0000B528 031D <1> add bx, word [di] 12466 <1> ; 0 means the topmost level 12467 <1> @@: 12468 <1> %if _INPUT_FILE_BOOT 12469 <1> %if _INPUT_FILE_HANDLES 12470 0000B52A 3C42 <1> cmp al, 'B' 12471 0000B52C 750D <1> jne @F 12472 <1> %endif 12473 <1> 12474 0000B52E B8A000 <1> mov ax, LOAD_INPUT_FILE_SIZE 12475 0000B531 93 <1> xchg ax, bx 12476 0000B532 F7E3 <1> mul bx ; dx ignored, should be zero 12477 0000B534 93 <1> xchg ax, bx ; bx = offset into array 12478 0000B535 81C3[A68F] <1> add bx, load_input_file - LOADDATA3 + ldFATType 12479 <1> ; -> flag word 12480 0000B539 EB0A <1> jmp @FF 12481 <1> 12482 <1> @@: 12483 <1> %endif 12484 <1> %if _INPUT_FILE_HANDLES 12485 0000B53B D1E3 <1> shl bx, 1 12486 0000B53D D1E3 <1> shl bx, 1 12487 0000B53F D1E3 <1> shl bx, 1 ; to qword array index 12488 <1> %if INPUTFILEHANDLE_size != 8 12489 <1> %error Unexpected structure size 12490 <1> %endif 12491 0000B541 81C3[0A0A] <1> add bx, input_file_handles + ifhFlags 12492 <1> ; -> flags word 12493 <1> %endif 12494 <1> @@: 12495 0000B545 BF[8898] <1> mov di, mask_ysf ; give the mask of read-only bits 12496 0000B548 F8 <1> clc 12497 0000B549 C3 <1> retn 12498 <1> %endif 12499 <1> 12500 <1> 12501 <1> lleave ctx 12502 <1> 12503 <1> 12504 <1> ; INP: al, si-> string 12505 <1> ; OUT: CY if no valid digit 0..7 12506 <1> ; NC if valid digit, 12507 <1> ; bl = 0..7 12508 <1> ; al, si-> behind digit specification 12509 <1> ; CHG: bl 12510 <1> getstmmxdigit: 12511 0000B54A 3C28 <1> cmp al, '(' 12512 0000B54C 7407 <1> je .paropen 12513 0000B54E E81A00 <1> call .isdigit? 12514 0000B551 7201 <1> jc .ret 12515 <1> .retlodsb: 12516 0000B553 AC <1> lodsb 12517 <1> .ret: 12518 0000B554 C3 <1> retn 12519 <1> 12520 <1> .paropen: 12521 0000B555 50 <1> push ax 12522 0000B556 56 <1> push si 12523 0000B557 AC <1> lodsb 12524 0000B558 E81000 <1> call .isdigit? 12525 0000B55B 720B <1> jc .retpop 12526 0000B55D AC <1> lodsb 12527 0000B55E 3C29 <1> cmp al, ')' ; closing parenthesis ? 12528 0000B560 F9 <1> stc 12529 0000B561 7505 <1> jne .retpop ; no --> (CY) 12530 0000B563 83C404 <1> add sp, byte 4 ; discard saved registers (NC) 12531 0000B566 EBEB <1> jmp short .retlodsb 12532 <1> 12533 <1> .retpop: 12534 0000B568 5E <1> pop si 12535 0000B569 58 <1> pop ax 12536 0000B56A C3 <1> retn 12537 <1> 12538 <1> .isdigit?: 12539 0000B56B 88C3 <1> mov bl, al 12540 0000B56D 80EB30 <1> sub bl, '0' 12541 0000B570 80FB08 <1> cmp bl, 8 ; valid digit 0..7 ? (CY if so) 12542 0000B573 F5 <1> cmc ; NC if so 12543 0000B574 C3 <1> retn 12544 <1> 12545 <1> 12546 <1> usesection lDEBUG_CODE 12547 <1> isvariable_code_size equ $ - isvariable_code 12548 <1> 12549 <1> 12550 <1> usesection lDEBUG_DATA_ENTRY 12551 <1> isvariable_data_size equ $ - isvariable_data 12552 <1> 12553 <1> numdef SHOW_ISVARIABLE_SIZE, 0 12554 <1> %if _SHOW_ISVARIABLE_SIZE 12555 <1> %assign CODESIZE isvariable_code_size 12556 <1> %assign DATASIZE isvariable_data_size 12557 <1> %warning isvariable size: CODESIZE code, DATASIZE data 12558 <1> %endif 12559 <1> 12560 <1> 12561 <1> align 2, db 0 12562 00009890 0D0020090D2C4C3B5D- <1> separators: countedw 32,9,13,",L;]:)(=.",0 12562 00009899 3A29283D2E00 <1> 12563 <1> 12564 <1> %ifn _EXPRESSIONS 12565 <1> %error Building without the expression evaluator is not possible right now 12566 <1> %endif 12567 <1> 12568 <1> %if _EXPRESSIONS 12569 <1> 12570 0000989F 00 <1> align 4, db 0 12571 000098A0 00000000 <1> hhvar: dd 0 ; left-hand operand for operator functions 12572 <1> align 2, db 0 12573 <1> hh_depth: 12574 000098A4 0000 <1> dw 0 12575 <1> hh_depth_of_single_term: 12576 000098A6 0000 <1> dw 0 12577 000098A8 00 <1> hhflag: db 0 ; &2: getdword called from hh, default to sub (precedence over 1) 12578 <1> ; &1: getdword called from hh, default to add 12579 <1> ; &4: getdword defaulted to add/sub for hh 12580 <1> ; (Note that during recursive getexpression calls (ie, 12581 <1> ; bracket handling), hh_depth is incremented to 2 and 12582 <1> ; higher. As these flags are only used with hh_depth == 1, 12583 <1> ; this means inside brackets the hh defaulting is 12584 <1> ; not in effect.) 12585 000098A9 00 <1> hhtype: db 0 ; type info on left-hand operand for operator functions 12586 <1> %endif 12587 <1> 12588 <1> 12589 <1> usesection lDEBUG_CODE 12590 <1> 12591 <1> ; Get a numerical value from input line 12592 <1> ; INP: al = first character 12593 <1> ; si-> next character 12594 <1> ; OUT: bx:dx = numerical value 12595 <1> ; ah&80h = whether a pointer 12596 <1> ; ah&40h = whether a signed type 12597 <1> ; ah&3Fh = number of significant bits 12598 <1> ; one-based position of highest one bit if unsigned or signed but positive 12599 <1> ; one-based position of lowest one bit from the top if negative signed 12600 <1> getdword: 12601 <1> getexpression: 12602 0000B575 FF06[A498] <1> inc word [hh_depth] 12603 0000B579 E82706 <1> call skipcomm0 12604 0000B57C 51 <1> push cx 12605 0000B57D 57 <1> push di 12606 <1> lframe 12607 0000B57E 5589E5 <1> lenter 12608 <1> 12609 0000B581 31C9 <1> xor cx, cx 12610 0000B583 51 <1> push cx 12611 <1> lvar word, ??Count 12612 <1> %define lCount ???Count 12613 <1> 12614 <1> ; The first number field's operator is initialized to 12615 <1> ; the dummy right-operand operator, which is set up with 12616 <1> ; the highest precedence. This means it'll be processed 12617 <1> ; immediately in the first iteration below. 12618 0000B584 B118 <1> mov cl, OPERATOR_RIGHTOP 12619 0000B586 51 <1> push cx ; initialize dummy first number operator 12620 0000B587 83EC0A <1> sub sp, byte 6+4 12621 <1> lvar 6, ??A 12622 <1> %define lA ???A 12623 <1> lvar 6, ??B 12624 <1> %define lB ???B 12625 <1> 12626 <1> .loop: 12627 <1> ; Get next term of an expression. A term is one variable, 12628 <1> ; one immediate number, one expression contained within 12629 <1> ; round brackets or one expression used to access memory. 12630 <1> ; This code also parses any number of unary operators 12631 <1> ; (including type conversions) in front of the term. 12632 <1> ; 12633 <1> ; INP: (si-1)-> first character 12634 <1> ; OUT: (see label .operator) 12635 <1> ; bx:dx = numerical value of term 12636 <1> ; ah&80h = whether a pointer 12637 <1> ; ah&40h = whether a signed type 12638 <1> ; ah&20h = whether a positive value but signed type 12639 <1> ; al = first character behind term 12640 <1> ; si-> line 12641 <1> ; CHG: di, cx 12642 <1> ; 12643 <1> ; This part might be simplified by directly modifying 6byte[bp+lB] 12644 <1> ; instead of setting bx:dx and ah. (The current interface is one of 12645 <1> ; the holdovers of getexpressionterm as a separate function.) In 12646 <1> ; that case, bx:dx and ah presumably will then be simply added to 12647 <1> ; the CHG specification. 12648 <1> .term: 12649 0000B58A 4E <1> dec si 12650 0000B58B 56 <1> push si ; -> term 12651 <1> 12652 <1> ; count unary operators and type specifiers, 12653 <1> ; get the bit mask of required bytes 12654 <1> ; and skip past the operators and specifiers 12655 0000B58C E89504 <1> call count_unary_operators 12656 <1> 12657 <1> %if _INDIRECTION 12658 0000B58F 3C5B <1> cmp al, '[' 12659 0000B591 7503E91202 <1> je .indirection ; handle indirected value --> 12660 <1> %endif 12661 0000B596 3C28 <1> cmp al, '(' 12662 0000B598 7503E95E02 <1> je .parens ; handle term with precedence --> 12663 <1> 12664 0000B59D 52 <1> push dx ; remember the count+1 12665 <1> ; (only if no indirection or bracket) 12666 <1> 12667 0000B59E 4E <1> dec si 12668 0000B59F BA[6F68] <1> mov dx, msg.value ; does a VALUE keyword for VALUE x IN y go here ? 12669 0000B5A2 E87805 <1> call isstring? 12670 0000B5A5 7503E95701 <1> je .value_in ; yes --> 12671 <1> 12672 0000B5AA BA[AE68] <1> mov dx, msg.linear ; does a LINEAR keyword go here ? 12673 0000B5AD E86D05 <1> call isstring? 12674 0000B5B0 7503E91D01 <1> je .linear ; yes --> 12675 <1> 12676 0000B5B5 AC <1> lodsb 12677 <1> 12678 0000B5B6 E8C0FB <1> call isvariable? ; is it a variable ? 12679 0000B5B9 7226 <1> jc .literal ; no, must be an immediate value --> 12680 <1> 12681 <1> .variable: 12682 0000B5BB 87DA <1> xchg bx, dx ; bx-> high word 12683 0000B5BD 88CC <1> mov ah, cl 12684 0000B5BF 31C9 <1> xor cx, cx 12685 0000B5C1 80FC02 <1> cmp ah, 2 12686 0000B5C4 7609 <1> jbe .variable_nohigh 12687 0000B5C6 8B0F <1> mov cx, word [bx] ; get high word 12688 0000B5C8 80FC03 <1> cmp ah, 3 12689 0000B5CB 7702 <1> ja @F 12690 0000B5CD B500 <1> mov ch, 0 12691 <1> @@: 12692 <1> .variable_nohigh: 12693 0000B5CF 87DA <1> xchg bx, dx ; bx-> low word 12694 0000B5D1 8B17 <1> mov dx, word [bx] ; get low word 12695 0000B5D3 89CB <1> mov bx, cx ; high word/zero 12696 0000B5D5 80FC01 <1> cmp ah, 1 12697 0000B5D8 7702 <1> ja .variable_notbyte 12698 0000B5DA B600 <1> mov dh, 0 ; limit to byte 12699 <1> .variable_notbyte: 12700 0000B5DC B400 <1> mov ah, 0 ; type pointer=0 signed=0 12701 0000B5DE E92A02 <1> jmp .term_end 12702 <1> 12703 <1> 12704 <1> .literal: 12705 0000B5E1 31DB <1> xor bx, bx ; (in case of decimal base shortcut: 12706 0000B5E3 BA0A00 <1> mov dx, 10 ; set base: decimal) 12707 0000B5E6 3C23 <1> cmp al, '#' ; shortcut change to decimal base, or string literal? 12708 0000B5E8 753C <1> jne .lithex_common 12709 0000B5EA 803C22 <1> cmp byte [si], '"' 12710 0000B5ED 7407 <1> je .lit_string 12711 0000B5EF 803C27 <1> cmp byte [si], "'" 12712 0000B5F2 7402 <1> je .lit_string 12713 0000B5F4 EB72 <1> jmp .lit_base ; decimal base --> 12714 <1> 12715 <1> .lit_string: 12716 0000B5F6 31D2 <1> xor dx, dx 12717 0000B5F8 AC <1> lodsb 12718 0000B5F9 86C4 <1> xchg al, ah 12719 <1> 12720 0000B5FB E81900 <1> call @F 12721 0000B5FE 88C2 <1> mov dl, al 12722 0000B600 E81400 <1> call @F 12723 0000B603 88C6 <1> mov dh, al 12724 0000B605 E80F00 <1> call @F 12725 0000B608 88C3 <1> mov bl, al 12726 0000B60A E80A00 <1> call @F 12727 0000B60D 88C7 <1> mov bh, al 12728 0000B60F AC <1> lodsb 12729 0000B610 38E0 <1> cmp al, ah 12730 0000B612 740F <1> je @FFF 12731 <1> .err3: 12732 0000B614 E9B800 <1> jmp .err2 12733 <1> 12734 <1> @@: 12735 0000B617 AC <1> lodsb 12736 0000B618 38E0 <1> cmp al, ah 12737 0000B61A 7406 <1> je @F 12738 0000B61C E86105 <1> call iseol?.notsemicolon 12739 0000B61F 74F3 <1> je .err3 12740 0000B621 C3 <1> retn 12741 <1> 12742 <1> @@: 12743 0000B622 59 <1> pop cx ; (discard near return address) 12744 <1> @@: 12745 0000B623 AC <1> lodsb 12746 0000B624 EB38 <1> jmp .lit_end_string 12747 <1> 12748 <1> 12749 <1> .lithex_common: 12750 0000B626 E8A303 <1> call .lit_ishexdigit? ; the first character must be a digit then 12751 0000B629 7303E9A100 <1> jc .err2 12752 0000B62E 30D2 <1> xor dl, dl ; initialize value 12753 <1> .lithex_loopdigit: 12754 0000B630 3C5F <1> cmp al, '_' 12755 0000B632 7423 <1> je .lithex_skip 12756 0000B634 E89503 <1> call .lit_ishexdigit? ; was last character ? 12757 0000B637 7221 <1> jc .lit_end ; yes --> 12758 0000B639 F6C7F0 <1> test bh, 0F0h ; would shift bits out ? 12759 0000B63C 7403E98E00 <1> jnz .err2 12760 0000B641 E8D7D7 <1> call uppercase 12761 0000B644 2C30 <1> sub al, '0' 12762 0000B646 3C09 <1> cmp al, 9 ; was decimal digit ? 12763 0000B648 7602 <1> jbe .lithex_decimaldigit; yes --> 12764 0000B64A 2C07 <1> sub al, 'A'-('9'+1) ; else adjust for hexadecimal digit 12765 <1> .lithex_decimaldigit: 12766 0000B64C B90400 <1> mov cx, 4 12767 <1> .lithex_loopshift: 12768 0000B64F D1E2 <1> shl dx, 1 12769 0000B651 D1D3 <1> rcl bx, 1 12770 0000B653 E2FA <1> loop .lithex_loopshift ; *16 12771 0000B655 08C2 <1> or dl, al ; add in the new digit 12772 <1> .lithex_skip: 12773 0000B657 AC <1> lodsb 12774 0000B658 EBD6 <1> jmp short .lithex_loopdigit 12775 <1> 12776 <1> .lit_end: 12777 0000B65A 3C23 <1> cmp al, '#' ; base change specification? 12778 0000B65C 740A <1> je .lit_base ; yes --> 12779 <1> .lit_end_string: 12780 0000B65E E8EFF5 <1> call isseparator? ; after the number, there must be a separator 12781 0000B661 756C <1> jne .err2 ; none here --> 12782 0000B663 B400 <1> mov ah, 0 ; type pointer=0 signed=0 12783 0000B665 E9A301 <1> jmp .term_end ; okay --> 12784 <1> .lit_base: 12785 0000B668 85DB <1> test bx, bx ; insure base <= 36 12786 0000B66A 7563 <1> jnz .err2 12787 0000B66C 83FA24 <1> cmp dx, byte 36 12788 0000B66F 775E <1> ja .err2 12789 0000B671 83FA02 <1> cmp dx, byte 2 ; and >= 2 12790 0000B674 7259 <1> jb .err2 ; otherwise error --> 12791 <1> 12792 0000B676 AC <1> lodsb 12793 0000B677 80FA10 <1> cmp dl, 16 ; hexadecimal ? 12794 0000B67A 74AA <1> je .lithex_common ; yes, use specific handling --> 12795 <1> 12796 0000B67C 89D7 <1> mov di, dx ; di = base 12797 0000B67E 88D1 <1> mov cl, dl 12798 0000B680 80C12F <1> add cl, '0'-1 12799 0000B683 80F939 <1> cmp cl, '9' 12800 0000B686 7602 <1> jbe .lit_basebelow11 12801 0000B688 B139 <1> mov cl, '9' 12802 <1> .lit_basebelow11: ; cl = highest decimal digit for base ('1'..'9') 12803 0000B68A 88D5 <1> mov ch, dl 12804 0000B68C 80C536 <1> add ch, 'A'-10-1 ; ch = highest letter for base ('A'-x..'Z') 12805 <1> 12806 0000B68F E83D03 <1> call .lit_isdigit? ; first character must be a digit 12807 0000B692 723B <1> jc .err2 12808 0000B694 31D2 <1> xor dx, dx ; initialize value 12809 <1> .lit_loopdigit: 12810 0000B696 3C5F <1> cmp al, '_' 12811 0000B698 7432 <1> je .lit_skip 12812 0000B69A E83203 <1> call .lit_isdigit? ; was last character ? 12813 0000B69D 72BB <1> jc .lit_end ; yes --> 12814 0000B69F E879D7 <1> call uppercase 12815 0000B6A2 2C30 <1> sub al, '0' 12816 0000B6A4 3C09 <1> cmp al, 9 ; was decimal digit ? 12817 0000B6A6 7602 <1> jbe .lit_decimaldigit ; yes --> 12818 0000B6A8 2C07 <1> sub al, 'A'-('9'+1) ; else adjust for hexadecimal digit 12819 <1> .lit_decimaldigit: 12820 0000B6AA 50 <1> push ax 12821 0000B6AB 89D0 <1> mov ax, dx 12822 0000B6AD 53 <1> push bx 12823 0000B6AE F7E7 <1> mul di ; multiply low word with base 12824 0000B6B0 89D3 <1> mov bx, dx 12825 0000B6B2 89C2 <1> mov dx, ax 12826 0000B6B4 58 <1> pop ax 12827 0000B6B5 52 <1> push dx 12828 0000B6B6 F7E7 <1> mul di ; multiply high word with base 12829 0000B6B8 85D2 <1> test dx, dx 12830 0000B6BA 5A <1> pop dx 12831 0000B6BB 7512 <1> jnz .err2 ; overflow --> 12832 0000B6BD 01C3 <1> add bx, ax ; add them 12833 0000B6BF 58 <1> pop ax 12834 0000B6C0 720D <1> jc .err2 ; overflow --> 12835 0000B6C2 00C2 <1> add dl, al ; add in the new digit 12836 0000B6C4 80D600 <1> adc dh, 0 12837 0000B6C7 83D300 <1> adc bx, byte 0 12838 0000B6CA 7203 <1> jc .err2 ; overflow --> 12839 <1> ; The value 3#102002022201221111210 is exactly equal to ffffFFFFh 12840 <1> ; so 3#102002022201221111211 (or ...2) overflows 32 bits and 12841 <1> ; needs to be detected here when adding in the as yet least 12842 <1> ; significant digit. This is why this jump is needed. 12843 <1> ; This also applies to decimal #4294967296. 12844 <1> 12845 <1> .lit_skip: 12846 0000B6CC AC <1> lodsb 12847 0000B6CD EBC7 <1> jmp short .lit_loopdigit 12848 <1> 12849 <1> .err2: 12850 0000B6CF E978F0 <1> jmp error 12851 <1> 12852 <1> 12853 <1> .linear: 12854 0000B6D2 58 <1> pop ax ; discard unary operators counter 12855 <1> 12856 <1> %if _EXPRESSION_INDIRECTION_STACK_CHECK == _EXPRESSION_LINEAR_STACK_CHECK 12857 0000B6D3 E81D04 <1> call stack_check_indirection 12858 <1> %else 12859 <1> mov ax, _EXPRESSION_LINEAR_STACK_CHECK 12860 <1> call stack_check ; abort if deep recursion 12861 <1> %endif 12862 0000B6D6 A9[7A73] <1> test ax, msg.stack_overflow.linear 12863 <1> 12864 0000B6D9 E8F504 <1> call skipwhite 12865 0000B6DC FF36[0C8B] <1> _386_PM push word [bAddr32] 12866 0000B6E0 6652 <1> _386_PM push edx 12867 0000B6E2 5A <1> _386_PM pop dx 12868 0000B6E3 8B1E[900C] <1> mov bx, word [reg_ds] 12869 0000B6E7 E81D82 <1> call getlinearaddr 12870 0000B6EA 52 <1> _386_PM push dx 12871 0000B6EB 665A <1> _386_PM pop edx 12872 0000B6ED 8F06[0C8B] <1> _386_PM pop word [bAddr32] 12873 0000B6F1 72DC <1> jc .err2 12874 <1> 12875 0000B6F3 66 <1> _386_PM_o32 ; or dword 12876 0000B6F4 830E[7887]FF <1> or word [bp_offset], strict byte -1 12877 <1> ; do not use a preferred offset 12878 <1> 12879 0000B6F9 E8A704 <1> call skipcomm0 12880 0000B6FC B400 <1> mov ah, 0 ; type pointer=0 signed=0 12881 0000B6FE E90901 <1> jmp .term_end_recount 12882 <1> 12883 <1> 12884 <1> .value_in: 12885 0000B701 58 <1> pop ax ; discard unary operators counter 12886 <1> 12887 <1> %if _EXPRESSION_INDIRECTION_STACK_CHECK == _EXPRESSION_VALUE_IN_STACK_CHECK 12888 0000B702 E8EE03 <1> call stack_check_indirection 12889 <1> %else 12890 <1> mov ax, _EXPRESSION_VALUE_IN_STACK_CHECK 12891 <1> call stack_check ; abort if deep recursion 12892 <1> %endif 12893 0000B705 A9[5F73] <1> test ax, msg.stack_overflow.value_in 12894 <1> 12895 0000B708 E8C604 <1> call skipwhite 12896 0000B70B 4E <1> dec si 12897 0000B70C BA[8068] <1> mov dx, msg.executing 12898 0000B70F E80B04 <1> call isstring? 12899 0000B712 7514 <1> jne @F 12900 0000B714 E8BA04 <1> call skipwhite 12901 0000B717 56 <1> push si 12902 0000B718 BE[8A68] <1> mov si, msg.executing_value_range 12903 0000B71B E87D03 <1> call get_value_range 12904 0000B71E 9C <1> pushf 12905 0000B71F E86F04 <1> call chkeol 12906 0000B722 9D <1> popf 12907 0000B723 5E <1> pop si 12908 0000B724 4E <1> dec si 12909 0000B725 AC <1> lodsb 12910 0000B726 EB03 <1> jmp @FF 12911 <1> 12912 <1> @@: 12913 0000B728 E87003 <1> call get_value_range ; OUT: cx:di = from, bx:dx = to 12914 <1> @@: 12915 <1> 12916 <1> ; If the VALUE is a not normal range (zero length 12917 <1> ; or from > to) then we still have to parse the 12918 <1> ; remaining input line to find the end of the 12919 <1> ; VALUE x IN y construct. So we do this with a 12920 <1> ; sort of hack: we take the invalid / unset 12921 <1> ; range values, do all the (invalid) comparisons, 12922 <1> ; but do not count any of the possible matches. 12923 <1> ; Look at .value_in.found for this hack. 12924 <1> lframe none, nested 12925 0000B72B 5589E5 <1> lenter 12926 <1> lvar word, bit0_do_not_match 12927 0000B72E 9C <1> pushf 12928 <1> lvar dword, value_from 12929 0000B72F 51 <1> push cx 12930 0000B730 57 <1> push di 12931 <1> lvar dword, value_to 12932 0000B731 53 <1> push bx 12933 0000B732 52 <1> push dx 12934 0000B733 31C9 <1> xor cx, cx 12935 <1> lvar dword, found 12936 0000B735 51 <1> push cx 12937 0000B736 51 <1> push cx 12938 <1> 12939 0000B737 51 <1> push cx ; zero terminator of keyword remembered offsets 12940 0000B738 4E <1> dec si 12941 0000B739 BA[7568] <1> mov dx, msg.in 12942 0000B73C E8DE03 <1> call isstring? 12943 <1> .err3_NZ: 12944 <1> .err4_NZ: 12945 0000B73F 758E <1> jne .err2 12946 <1> 12947 <1> .value_in.loop: 12948 0000B741 E88D04 <1> call skipwhite 12949 0000B744 4E <1> dec si 12950 0000B745 BB[5476] <1> mov bx, msgtable_value_range 12951 <1> ; -> table 12952 <1> 12953 <1> @@: 12954 0000B748 8B17 <1> mov dx, word [bx] 12955 0000B74A 85D2 <1> test dx, dx 12956 0000B74C 7419 <1> jz @F ; last checked, go get range --> 12957 0000B74E E8CC03 <1> call isstring? 12958 0000B751 7405 <1> je .value_in.keyword ; found a keyword --> 12959 0000B753 83C304 <1> add bx, 4 ; go to next table entry 12960 0000B756 EBF0 <1> jmp @B 12961 <1> 12962 <1> .value_in.keyword: 12963 <1> %if _EXPRESSION_INDIRECTION_STACK_CHECK == _EXPRESSION_VALUE_IN_STACK_CHECK 12964 0000B758 E89803 <1> call stack_check_indirection 12965 <1> %else 12966 <1> mov ax, _EXPRESSION_VALUE_IN_STACK_CHECK 12967 <1> call stack_check ; abort if deep recursion 12968 <1> %endif 12969 0000B75B A9[5F73] <1> test ax, msg.stack_overflow.value_in 12970 <1> 12971 0000B75E E87004 <1> call skipwhite ; skip past blanks 12972 0000B761 56 <1> push si ; remember offset after keyword 12973 0000B762 8B7702 <1> mov si, word [bx + 2] ; -> keyword replacement text 12974 0000B765 EBDA <1> jmp .value_in.loop ; handle replacement --> 12975 <1> 12976 <1> @@: 12977 0000B767 E83103 <1> call get_value_range ; OUT: cx:di = from, bx:dx = to 12978 0000B76A 7223 <1> jc .value_in.next 12979 <1> 12980 <1> ; ! (StartVal > EndMatch) 12981 0000B76C 395EFC <1> cmp word [bp + ?value_from + 2], bx 12982 0000B76F 7503 <1> jne @F 12983 0000B771 3956FA <1> cmp word [bp + ?value_from], dx 12984 <1> @@: 12985 0000B774 7719 <1> ja .value_in.next 12986 <1> 12987 <1> ; ! (EndVal < StartMatch) 12988 0000B776 394EF8 <1> cmp word [bp + ?value_to + 2], cx 12989 0000B779 7503 <1> jne @F 12990 0000B77B 397EF6 <1> cmp word [bp + ?value_to], di 12991 <1> @@: 12992 0000B77E 720F <1> jb .value_in.next 12993 <1> 12994 <1> .value_in.found: 12995 0000B780 8B4EFE <1> mov cx, word [bp + ?bit0_do_not_match] 12996 0000B783 F7D1 <1> not cx 12997 0000B785 83E101 <1> and cx, 1 12998 0000B788 014EF2 <1> add word [bp + ?found], cx 12999 0000B78B 8356F200 <1> adc word [bp + ?found], 0 13000 <1> 13001 <1> .value_in.next: 13002 <1> @@: 13003 0000B78F E84004 <1> call skipwh0 13004 0000B792 3C2C <1> cmp al, ',' 13005 0000B794 74AB <1> je .value_in.loop 13006 <1> 13007 0000B796 59 <1> pop cx ; get next remembered offset 13008 0000B797 E306 <1> jcxz @F ; if none --> 13009 0000B799 89CE <1> mov si, cx ; -> behind keyword 13010 0000B79B 4E <1> dec si 13011 0000B79C AC <1> lodsb ; reload al 13012 0000B79D EBF0 <1> jmp @B ; continue after the keyword --> 13013 <1> 13014 <1> @@: 13015 0000B79F 5A <1> pop dx 13016 0000B7A0 5B <1> pop bx ; pop ?found counter variable 13017 0000B7A1 89EC5D <1> lleave 13018 <1> 13019 0000B7A4 B400 <1> mov ah, 0 ; type pointer=0 signed=0 13020 0000B7A6 EB62 <1> jmp .term_end_recount 13021 <1> 13022 <1> 13023 <1> %if _INDIRECTION 13024 <1> .indirection: 13025 0000B7A8 E84803 <1> call stack_check_indirection 13026 <1> ; abort if deep recursion 13027 0000B7AB A9[1273] <1> test ax, msg.stack_overflow.indirection 13028 <1> 13029 0000B7AE FF36[0C8B] <1> _386_PM push word [bAddr32] 13030 0000B7B2 6652 <1> _386_PM push edx 13031 0000B7B4 5A <1> _386_PM pop dx 13032 <1> 13033 0000B7B5 E8EA03 <1> call skipcomma ; also skips the '[' in al 13034 0000B7B8 8B1E[900C] <1> mov bx, word [reg_ds] ; default segment/selector 13035 0000B7BC 51 <1> push cx ; save previous bit mask (ch) 13036 0000B7BD E8C7F3 <1> call getaddrX ; (recursively calls getexpression:) 13037 0000B7C0 59 <1> pop cx 13038 0000B7C1 B100 <1> mov cl, 0 13039 0000B7C3 3C5D <1> cmp al, ']' ; verify this is the closing bracket 13040 <1> .err5_NZ: 13041 0000B7C5 7403E975FF <1> jne .err4_NZ ; if not --> 13042 0000B7CA AC <1> lodsb ; get next character 13043 <1> ; bx:(e)dx-> data 13044 <1> ; ch = bit mask of required bytes 13045 <1> ; cl = 0 13046 <1> 13047 0000B7CB 50 <1> push ax 13048 0000B7CC 55 <1> push bp 13049 0000B7CD 31ED <1> xor bp, bp 13050 0000B7CF 55 <1> push bp 13051 0000B7D0 55 <1> push bp 13052 0000B7D1 89E5 <1> mov bp, sp ; -> buffer 13053 <1> 13054 0000B7D3 E8B6F0 <1> call prephack 13055 0000B7D6 E8E1F0 <1> call dohack 13056 <1> ; Regarding how this loop handles cx, 13057 <1> ; remember that ch holds the flags for 13058 <1> ; the required bytes. 13059 <1> ; And cl is initialised to 0. In 13060 <1> ; each iteration, cl is incremented. 13061 <1> ; The loop instruction then decrements 13062 <1> ; cl again, but the entire cx is only 13063 <1> ; zero if no more bytes are required. 13064 <1> ; (This hack saves a single byte over 13065 <1> ; the "test ch, ch \ jnz" alternative 13066 <1> ; but it isn't very pretty. It 13067 <1> ; also probably slows down a bit.) 13068 <1> .indirection_loop: 13069 0000B7D9 D0ED <1> shr ch, 1 ; need to read this byte ? 13070 0000B7DB 7306 <1> jnc .indirection_skip ; no --> 13071 0000B7DD E8B2E3 <1> call readmem ; else read byte 13072 0000B7E0 884600 <1> mov byte [bp+0], al ; store byte 13073 <1> .indirection_skip: 13074 0000B7E3 41 <1> inc cx ; = 1 if no more to read 13075 0000B7E4 45 <1> inc bp ; increase buffer pointer 13076 0000B7E5 66 <1> _386_PM_o32 ; inc edx 13077 0000B7E6 42 <1> inc dx ; increase offset 13078 0000B7E7 E2F0 <1> loop .indirection_loop ; read next byte if any --> 13079 0000B7E9 E802F1 <1> call unhack 13080 <1> 13081 0000B7EC 5A <1> pop dx 13082 0000B7ED 5B <1> pop bx 13083 0000B7EE 5D <1> pop bp 13084 0000B7EF 58 <1> pop ax 13085 <1> 13086 0000B7F0 52 <1> _386_PM push dx 13087 0000B7F1 665A <1> _386_PM pop edx 13088 0000B7F3 8F06[0C8B] <1> _386_PM pop word [bAddr32] 13089 0000B7F7 B400 <1> mov ah, 0 ; type pointer=0 signed=0 13090 0000B7F9 EB0F <1> jmp short .term_end_recount 13091 <1> %endif 13092 <1> 13093 <1> 13094 <1> .parens: 13095 <1> %if _EXPRESSION_INDIRECTION_STACK_CHECK == _EXPRESSION_PARENS_STACK_CHECK 13096 0000B7FB E8F502 <1> call stack_check_indirection 13097 <1> %else 13098 <1> mov ax, _EXPRESSION_PARENS_STACK_CHECK 13099 <1> call stack_check ; abort if deep recursion 13100 <1> %endif 13101 0000B7FE A9[2C73] <1> test ax, msg.stack_overflow.parens 13102 <1> 13103 0000B801 AC <1> lodsb 13104 0000B802 E870FD <1> call getexpression ; (recursive) bx:dx = number, ah = type 13105 0000B805 3C29 <1> cmp al, ')' ; closing parens ? 13106 0000B807 75BC <1> jne .err5_NZ ; no --> 13107 0000B809 AC <1> lodsb 13108 <1> 13109 <1> .term_end_recount: 13110 0000B80A A9 <1> db __TEST_IMM16 ; skip pop, stc; NC 13111 <1> .term_end: 13112 0000B80B 59 <1> pop cx ; get count+1 of unary operators and type specifiers 13113 0000B80C F9 <1> stc 13114 0000B80D 5F <1> pop di ; -> term 13115 0000B80E 87F7 <1> xchg si, di 13116 0000B810 57 <1> push di ; save -> behind 13117 <1> ; si-> unary operators and types 13118 0000B811 720B <1> jc .unary_processnext ; if we preserved the count --> 13119 <1> 13120 0000B813 53 <1> push bx 13121 0000B814 52 <1> push dx 13122 0000B815 56 <1> push si 13123 0000B816 E80B02 <1> call count_unary_operators 13124 0000B819 89D1 <1> mov cx, dx ; get count+1 again 13125 0000B81B 5E <1> pop si 13126 0000B81C 5A <1> pop dx 13127 0000B81D 5B <1> pop bx 13128 <1> 13129 <1> .unary_processnext: 13130 0000B81E E204 <1> loop .unary_doprocess 13131 0000B820 5E <1> pop si ; -> behind term 13132 0000B821 4E <1> dec si ; -> character to reload in skipwhite 13133 0000B822 EB33 <1> jmp short .term_done 13134 <1> 13135 <1> .unary_doprocess: 13136 0000B824 56 <1> push si 13137 0000B825 51 <1> push cx 13138 0000B826 53 <1> push bx 13139 0000B827 52 <1> push dx 13140 <1> 13141 0000B828 89CF <1> mov di, cx ; count+1 of operators to skip 13142 0000B82A E8F901 <1> call count_unary_operators_restrict ; skip them 13143 0000B82D 7525 <1> jnz .err ; if not enough --> (?!) 13144 <1> 13145 0000B82F E849F4 <1> call istype? ; get type info if it's a type 13146 0000B832 7211 <1> jc .unary_processnotype ; isn't a type --> 13147 0000B834 86C4 <1> xchg al, ah ; al = type input 13148 0000B836 D1EB <1> shr bx, 1 ; CF = signedness 13149 0000B838 9F <1> lahf ; with CF = signedness 13150 0000B839 8B8F[CE92] <1> mov cx, word [ typehandlers + bx ] ; function 13151 <1> .unary_processcall: 13152 0000B83D 5A <1> pop dx 13153 0000B83E 5B <1> pop bx 13154 0000B83F FFD1 <1> call cx ; call type or unary operator handler 13155 <1> ; bx:dx = output number, ah = type 13156 0000B841 59 <1> pop cx ; restore processing counter 13157 0000B842 5E <1> pop si ; restore ->term 13158 0000B843 EBD9 <1> jmp short .unary_processnext 13159 <1> 13160 <1> .unary_processnotype: 13161 0000B845 E8ECF3 <1> call isunaryoperator? ; get unary operator index 13162 0000B848 750A <1> jne .err ; if no unary operator --> (?!) 13163 0000B84A 89CB <1> mov bx, cx 13164 0000B84C D1E3 <1> shl bx, 1 13165 0000B84E 8B8F[FA92] <1> mov cx, word [ unaryoperatorhandlers + bx ] 13166 0000B852 EBE9 <1> jmp short .unary_processcall 13167 <1> 13168 <1> .err: 13169 0000B854 E9F3EE <1> jmp error 13170 <1> 13171 <1> .term_done: ; bx:dx = number, ah = type 13172 <1> ; get the operator following this number 13173 0000B857 E87703 <1> call skipwhite 13174 0000B85A 8956F2 <1> mov word [bp+lB+0], dx 13175 0000B85D 895EF4 <1> mov word [bp+lB+2], bx ; store numeric value 13176 0000B860 8B1E[A698] <1> mov bx, word [hh_depth_of_single_term] 13177 0000B864 3B1E[A498] <1> cmp bx, word [hh_depth] 13178 0000B868 7455 <1> je .operator_invalid 13179 0000B86A E8CDF3 <1> call isoperator? ; cl = operator index (if any) 13180 0000B86D 7440 <1> je .operator_apparently_valid 13181 0000B86F E80A03 <1> call iseol? ; end of line follows ? 13182 0000B872 744B <1> je .operator_invalid 13183 <1> .hh_twofold_check: 13184 0000B874 807EFC17 <1> cmp byte [bp + lA + 4], OPERATOR_COND 13185 0000B878 7445 <1> je .operator_invalid ; special check for conditional operator 13186 0000B87A 807EFC18 <1> cmp byte [bp + lA + 4], OPERATOR_RIGHTOP 13187 0000B87E 750D <1> jne @F 13188 0000B880 837EFE00 <1> cmp word [bp + lCount], 0 13189 0000B884 7407 <1> je @F 13190 0000B886 59 <1> pop cx 13191 0000B887 51 <1> push cx 13192 0000B888 80F917 <1> cmp cl, OPERATOR_COND 13193 0000B88B 7432 <1> je .operator_invalid ; special check for conditional operator 13194 <1> @@: 13195 0000B88D 833E[A498]01 <1> cmp word [hh_depth], 1 ; are we in first level expression ? 13196 0000B892 752B <1> jne .operator_invalid ; no, do not do special H operation --> 13197 0000B894 F606[A898]03 <1> test byte [hhflag], 1|2 ; special H operation requested ? 13198 0000B899 7424 <1> jz .operator_invalid ; no --> 13199 0000B89B B302 <1> mov bl, OPERATOR_MINUS ; assume it's sub 13200 0000B89D F606[A898]02 <1> test byte [hhflag], 2 ; sub requested by H ? 13201 0000B8A2 7501 <1> jnz .hh_twofold_found ; yes --> 13202 0000B8A4 4B <1> dec bx ; else it must be add 13203 <1> %if (OPERATOR_MINUS - 1) != OPERATOR_PLUS 13204 <1> %error Remove optimisation 13205 <1> %endif 13206 <1> .hh_twofold_found: 13207 0000B8A5 800E[A898]04 <1> or byte [hhflag], 4 ; set flag for H twofold operation 13208 0000B8AA E8F602 <1> call skipcomm0 13209 0000B8AD EB12 <1> jmp short .operator_done ; return this --> 13210 <1> 13211 <1> .operator_apparently_valid: 13212 0000B8AF 89CB <1> mov bx, cx 13213 0000B8B1 01DB <1> add bx, bx 13214 0000B8B3 FF97[0493] <1> call [operatordispatchers + bx] 13215 0000B8B7 84DB <1> test bl, bl ; valid ? 13216 0000B8B9 74B9 <1> jz .hh_twofold_check ; no, check for H twofold operation --> 13217 0000B8BB E81303 <1> call skipwhite 13218 0000B8BE A9 <1> db __TEST_IMM16 13219 <1> .operator_invalid: 13220 0000B8BF 31DB <1> xor bx, bx ; bl = 0 (no operator) 13221 <1> .operator_done: 13222 0000B8C1 88E7 <1> mov bh, ah ; bh = type info 13223 0000B8C3 895EF6 <1> mov word [bp+lB+4], bx ; store type and following operator 13224 <1> 13225 0000B8C6 8A4EFC <1> mov cl, byte [bp+lA+4] 13226 0000B8C9 E8EE00 <1> call .compare_operators ; (cmp bl, cl = cmp Boprtr, Aoprtr) 13227 0000B8CC 7249 <1> jb .high_precedence_A ; compute the first operand first --> 13228 <1> ; (jump taken for invalid Boprtr too) 13229 0000B8CE 7505 <1> jne @F 13230 0000B8D0 83FB01 <1> cmp bx, OPPREC_COND 13231 0000B8D3 7542 <1> jne .high_precedence_A 13232 <1> 13233 <1> @@: 13234 0000B8D5 FF46FE <1> inc word [bp+lCount] ; increase loop count 13235 0000B8D8 FF76F8 <1> push word [bp+lA+0] 13236 0000B8DB FF76FA <1> push word [bp+lA+2] 13237 0000B8DE FF76FC <1> push word [bp+lA+4] ; push A and its operator 13238 <1> 13239 0000B8E1 FF76F6 <1> push word [bp+lB+4] 13240 0000B8E4 FF76F4 <1> push word [bp+lB+2] 13241 0000B8E7 FF76F2 <1> push word [bp+lB+0] 13242 0000B8EA 8F46F8 <1> pop word [bp+lA+0] 13243 0000B8ED 8F46FA <1> pop word [bp+lA+2] 13244 0000B8F0 8F46FC <1> pop word [bp+lA+4] ; set A to B, including operator 13245 <1> 13246 <1> %if _EXPRESSION_INDIRECTION_STACK_CHECK == _EXPRESSION_PRECEDENCE_STACK_CHECK 13247 0000B8F3 E8FD01 <1> call stack_check_indirection 13248 <1> %else 13249 <1> mov ax, _EXPRESSION_PRECEDENCE_STACK_CHECK 13250 <1> call stack_check ; abort if deep recursion 13251 <1> %endif 13252 0000B8F6 A9[4673] <1> test ax, msg.stack_overflow.precedence 13253 <1> 13254 <1> d4 call d4message 13255 <1> d4 asciz "getexpression: Entering loop/recursion",13,10 13256 <1> 13257 <1> .loop_j: 13258 0000B8F9 E98EFC <1> jmp .loop ; start again (former B as first term) --> 13259 <1> 13260 <1> .cont: 13261 <1> 13262 <1> d4 call d4message 13263 <1> d4 asciz "getexpression: End of loop/recursion",13,10 13264 <1> 13265 0000B8FC FF76FC <1> push word [bp+lA+4] 13266 0000B8FF FF76FA <1> push word [bp+lA+2] 13267 0000B902 FF76F8 <1> push word [bp+lA+0] 13268 0000B905 8F46F2 <1> pop word [bp+lB+0] 13269 0000B908 8F46F4 <1> pop word [bp+lB+2] 13270 0000B90B 8F46F6 <1> pop word [bp+lB+4] ; set B to A, including operator 13271 <1> 13272 0000B90E 8F46FC <1> pop word [bp+lA+4] 13273 0000B911 8F46FA <1> pop word [bp+lA+2] 13274 0000B914 8F46F8 <1> pop word [bp+lA+0] ; pop A and its operator 13275 <1> 13276 <1> .high_precedence_A: 13277 0000B917 8B4EFC <1> mov cx, word [bp+lA+4] ; retrieve A's type info and operator 13278 0000B91A FF76FA <1> push word [bp+lA+2] 13279 0000B91D FF76F8 <1> push word [bp+lA+0] 13280 0000B920 8B46F6 <1> mov ax, word [bp+lB+4] ; retrieve B's type info and operator 13281 0000B923 882E[A998] <1> mov byte [hhtype], ch ; set type info 13282 0000B927 8F06[A098] <1> pop word [hhvar] 13283 0000B92B B500 <1> mov ch, 0 ; cx = A's 1-based operator index 13284 0000B92D 8F06[A298] <1> pop word [hhvar+2] ; retrieve A's number 13285 0000B931 8B56F2 <1> mov dx, word [bp+lB+0] 13286 0000B934 89CF <1> mov di, cx 13287 0000B936 8B5EF4 <1> mov bx, word [bp+lB+2] ; retrieve B's number 13288 0000B939 01FF <1> add di, di ; = offset into dispatch table 13289 0000B93B 50 <1> push ax ; preserve B's operator 13290 0000B93C FF95[4493] <1> call near [operatorfunctions+di]; compute: (A) operatorA (B) 13291 0000B940 59 <1> pop cx ; cl = B's operator 13292 <1> 13293 0000B941 8956F8 <1> mov word [bp+lA+0], dx 13294 0000B944 88C8 <1> mov al, cl ; B's operator 13295 0000B946 895EFA <1> mov word [bp+lA+2], bx 13296 0000B949 8946FC <1> mov word [bp+lA+4], ax ; store result in A, with B's operator 13297 <1> 13298 <1> %if OPERATOR_INVALID != 0 13299 <1> %error Remove optimisation 13300 <1> %endif 13301 0000B94C 84C0 <1> test al, al ; (previous B's) operator valid ? 13302 0000B94E 7412 <1> jz .end ; no, end of sequence --> 13303 <1> 13304 0000B950 837EFE00 <1> cmp word [bp+lCount], byte 0 ; in recursion ? 13305 0000B954 74A3 <1> je .loop_j ; no, loop --> 13306 <1> 13307 0000B956 5B <1> pop bx 13308 0000B957 53 <1> push bx ; retrieve saved ('@') operator 13309 <1> 13310 0000B958 E85F00 <1> call .compare_operators ; (cmp bl, cl = cmp @oprtr, Aoprtr) 13311 0000B95B 729C <1> jb .loop_j ; A's operator's precedence higher --> 13312 <1> 13313 0000B95D 83FB01 <1> cmp bx, OPPREC_COND 13314 0000B960 7497 <1> je .loop_j 13315 <1> 13316 <1> d4 call d4message 13317 <1> d4 asciz "getexpression: Loop/recursion found to be not necessary anymore",13,10 13318 <1> 13319 <1> ; dec word [bp+lCount] 13320 <1> ; jmp .cont ; return to previous level --> 13321 <1> 13322 <1> .end: 13323 0000B962 FF4EFE <1> dec word [bp+lCount] ; decrease loop count 13324 0000B965 7995 <1> jns .cont ; process next operand from stack --> 13325 <1> 13326 0000B967 8B56F8 <1> mov dx, word [bp+lA+0] 13327 0000B96A 8B5EFA <1> mov bx, word [bp+lA+2] ; retrieve A 13328 0000B96D 8B46FC <1> mov ax, word [bp+lA+4] ; (discard (invalid) operator) 13329 <1> 13330 0000B970 89EC5D <1> lleave code ; remove the stack frame 13331 <1> 13332 0000B973 5F <1> pop di 13333 0000B974 59 <1> pop cx ; restore registers 13334 <1> 13335 0000B975 FF0E[A498] <1> dec word [hh_depth] 13336 0000B979 4E <1> dec si 13337 0000B97A AC <1> lodsb ; (restore al) 13338 <1> 13339 <1> .countsignificantbits: 13340 0000B97B 51 <1> push cx 13341 0000B97C 52 <1> push dx 13342 0000B97D 53 <1> push bx 13343 0000B97E B90100 <1> mov cx, 1 13344 0000B981 53 <1> push bx 13345 0000B982 F6C440 <1> test ah, 40h ; signed type ? 13346 0000B985 7416 <1> jz .unsigned ; no --> 13347 0000B987 F6C780 <1> test bh, 80h ; negative value ? 13348 0000B98A 7411 <1> jz .unsigned ; no --> 13349 <1> .signed: 13350 0000B98C 21D3 <1> and bx, dx 13351 0000B98E 43 <1> inc bx ; = 0 if -1 (all bits set) 13352 0000B98F 5B <1> pop bx 13353 0000B990 741F <1> jz .done ; is -1, 1 significant bit --> 13354 0000B992 B122 <1> mov cl, 32+1+1 ; number of significant bits is 1 + 1-based index of highest clear bit 13355 <1> .signedloop: 13356 0000B994 D1E2 <1> shl dx, 1 13357 0000B996 D1D3 <1> rcl bx, 1 ; shift up the number 13358 0000B998 49 <1> dec cx ; maintain index 13359 0000B999 72F9 <1> jc .signedloop ; still a set bit --> 13360 0000B99B EB14 <1> jmp short .done 13361 <1> .unsigned: 13362 0000B99D 09D3 <1> or bx, dx ; = 0 if 0 (all bits cleared) 13363 0000B99F 5B <1> pop bx 13364 0000B9A0 740F <1> jz .done ; is 0, 1 significant bit --> 13365 0000B9A2 B121 <1> mov cl, 32+1 ; number of significant bits is 1-based index of highest set bit 13366 <1> .unsignedloop: 13367 0000B9A4 D1E2 <1> shl dx, 1 13368 0000B9A6 D1D3 <1> rcl bx, 1 13369 0000B9A8 49 <1> dec cx 13370 0000B9A9 73F9 <1> jnc .unsignedloop 13371 0000B9AB F6C440 <1> test ah, 40h ; positive signed value ? 13372 0000B9AE 7401 <1> jz .done ; no --> 13373 0000B9B0 41 <1> inc cx ; then the following zero bit is required too 13374 <1> .done: 13375 0000B9B1 80E4C0 <1> and ah, 1100_0000b 13376 <1> ; insure we only pass the top two type bits 13377 0000B9B4 08CC <1> or ah, cl 13378 <1> ; low 6 bits = number of significant bits 13379 0000B9B6 5B <1> pop bx 13380 0000B9B7 5A <1> pop dx 13381 0000B9B8 59 <1> pop cx 13382 0000B9B9 C3 <1> retn 13383 <1> 13384 <1> 13385 <1> ; INP: bl = operator index 1 13386 <1> ; cl = operator index 2 13387 <1> ; OUT: flags as for "cmp precedence1, precedence2" 13388 <1> ; CHG: bx, cx 13389 <1> .compare_operators: 13390 0000B9BA E80600 <1> call .getprecedence 13391 0000B9BD E80300 <1> call .getprecedence 13392 0000B9C0 39CB <1> cmp bx, cx 13393 0000B9C2 C3 <1> retn 13394 <1> 13395 <1> .getprecedence: 13396 0000B9C3 30FF <1> xor bh, bh 13397 0000B9C5 8A9F[2A93] <1> mov bl, byte [operatorprecedences+bx] 13398 0000B9C9 87D9 <1> xchg bx, cx 13399 0000B9CB C3 <1> retn 13400 <1> 13401 <1> getexpression.lit_ishexdigit?: 13402 0000B9CC B93946 <1> mov cx, "9F" 13403 <1> getexpression.lit_isdigit?: 13404 0000B9CF 3C30 <1> cmp al, '0' 13405 0000B9D1 7214 <1> jb .no 13406 0000B9D3 38C8 <1> cmp al, cl 13407 0000B9D5 760D <1> jbe .yes 13408 0000B9D7 50 <1> push ax 13409 0000B9D8 E840D4 <1> call uppercase 13410 0000B9DB 38E8 <1> cmp al, ch 13411 0000B9DD 7707 <1> ja .no_p 13412 0000B9DF 3C41 <1> cmp al, 'A' 13413 0000B9E1 7203 <1> jb .no_p 13414 0000B9E3 58 <1> pop ax 13415 <1> .yes: 13416 0000B9E4 F8 <1> clc 13417 0000B9E5 C3 <1> retn 13418 <1> 13419 <1> .no_p: 13420 0000B9E6 58 <1> pop ax 13421 <1> .no: 13422 0000B9E7 F9 <1> stc 13423 0000B9E8 C3 <1> retn 13424 <1> 13425 <1> 13426 <1> of_cond: 13427 0000B9E9 50 <1> push ax ; second operand type 13428 0000B9EA 4E <1> dec si 13429 0000B9EB AD <1> lodsw 13430 0000B9EC 3D3A3A <1> cmp ax, "::" 13431 0000B9EF 7403E956ED <1> jne error 13432 <1> %if _EXPRESSION_INDIRECTION_STACK_CHECK == _EXPRESSION_COND_STACK_CHECK 13433 0000B9F4 E8FC00 <1> call stack_check_indirection 13434 <1> %else 13435 <1> mov ax, _EXPRESSION_COND_STACK_CHECK 13436 <1> call stack_check ; abort if deep recursion 13437 <1> %endif 13438 0000B9F7 A9[8F73] <1> test ax, msg.stack_overflow.cond 13439 <1> 13440 0000B9FA A1[A098] <1> mov ax, word [hhvar] 13441 0000B9FD 0B06[A298] <1> or ax, word [hhvar + 2] ; ax = flag (zero if to take third operand) 13442 0000BA01 53 <1> push bx 13443 0000BA02 52 <1> push dx 13444 0000BA03 50 <1> push ax ; preserve stack 13445 0000BA04 AC <1> lodsb 13446 0000BA05 E86DFB <1> call getexpression ; parse third operand 13447 0000BA08 E89801 <1> call skipcomm0 ; allow comma afterwards 13448 0000BA0B 59 <1> pop cx 13449 0000BA0C E309 <1> jcxz @F ; if to take third operand --> 13450 0000BA0E 5A <1> pop dx 13451 0000BA0F 5B <1> pop bx ; take second operand 13452 0000BA10 88C1 <1> mov cl, al 13453 0000BA12 58 <1> pop ax ; ah = second operand type 13454 0000BA13 88C8 <1> mov al, cl ; preserve al 13455 0000BA15 EB03 <1> jmp @FF 13456 <1> 13457 <1> @@: 13458 0000BA17 59 <1> pop cx 13459 0000BA18 59 <1> pop cx ; discard second operand value 13460 0000BA19 59 <1> pop cx ; discard second operand type 13461 <1> @@: 13462 0000BA1A 59 <1> pop cx ; discard near return address 13463 0000BA1B 59 <1> pop cx ; discard cx on stack 13464 <1> 13465 0000BA1C C646FC18 <1> mov byte [bp+lA+4], OPERATOR_RIGHTOP 13466 0000BA20 4E <1> dec si 13467 0000BA21 E933FE <1> jmp getexpression.term_done 13468 <1> 13469 <1> 13470 <1> lleave ctx 13471 <1> 13472 <1> 13473 <1> ; INP: si-> possible unary operators 13474 <1> ; OUT: dx = 1 + count of unary operators 13475 <1> ; al, si-> behind identified unary operators 13476 <1> ; ch = bit mask of required bytes, 13477 <1> ; bits 0..3 represent one byte of a dword each 13478 <1> ; bits 4..7 are clear 13479 <1> ; CHG: bx, ch, di 13480 <1> ; 13481 <1> ; Type specifications are parsed as unary operators 13482 <1> ; here. (Elsewhere, "unary operators" refers only to 13483 <1> ; the unary operators specified as one of "+-~!?".) 13484 <1> count_unary_operators: 13485 0000BA24 31FF <1> xor di, di 13486 <1> ; INP: si-> possible unary operators 13487 <1> ; di = maximum count+1 of unary operators to process, 13488 <1> ; zero means unlimited 13489 <1> ; OUT: dx = 1 + count of unary operators, 13490 <1> ; at most di 13491 <1> ; al, si-> behind identified unary operators 13492 <1> ; ch = bit mask of required bytes, 13493 <1> ; bits 0..3 represent one byte of a dword each 13494 <1> ; bits 4..7 are clear 13495 <1> ; ZR if maximum reached 13496 <1> ; NZ if maximum not reached 13497 <1> ; CHG: bx, ch 13498 <1> count_unary_operators_restrict: 13499 0000BA26 B50F <1> mov ch, 1111b ; default to access a full dword 13500 0000BA28 31D2 <1> xor dx, dx ; initialize counter to zero 13501 0000BA2A A8 <1> db __TEST_IMM8 ; skip pop 13502 <1> .loop: 13503 0000BA2B 5F <1> pop di ; get maximum count 13504 0000BA2C 42 <1> inc dx ; count unary operators and type specifiers 13505 0000BA2D 57 <1> push di ; save maximum count again 13506 0000BA2E E8A001 <1> call skipwhite ; load next character and skip blanks 13507 0000BA31 39FA <1> cmp dx, di ; reached maximum ? 13508 0000BA33 741B <1> je .end ; yes --> (ZR) 13509 0000BA35 51 <1> push cx 13510 0000BA36 E842F2 <1> call istype? ; check for type and if so retrieve info 13511 0000BA39 720F <1> jc .notype ; not a type --> 13512 0000BA3B 59 <1> pop cx 13513 <1> 13514 0000BA3C D1EB <1> shr bx, 1 ; discard signedness bit 13515 0000BA3E 89FE <1> mov si, di ; -> behind the type specifier 13516 0000BA40 B11F <1> mov cl, 01Fh ; prepare shift count register 13517 0000BA42 238F[C092] <1> and cx,[typebitmasks+bx]; apply mask and get shift count register 13518 0000BA46 D2E5 <1> shl ch, cl ; apply shift 13519 0000BA48 EBE1 <1> jmp short .loop ; check for more --> 13520 <1> 13521 <1> .notype: 13522 0000BA4A E8E7F1 <1> call isunaryoperator? ; is it a unary operator? 13523 0000BA4D 59 <1> pop cx 13524 0000BA4E 74DB <1> je .loop ; yes, check for more --> 13525 <1> ; (NZ) 13526 <1> .end: 13527 0000BA50 5F <1> pop di ; discard 13528 0000BA51 C3 <1> retn 13529 <1> 13530 <1> 13531 <1> get3byte.checksignificantbits: 13532 0000BA52 50 <1> push ax 13533 0000BA53 80E43F <1> and ah, 3Fh 13534 0000BA56 80FC18 <1> cmp ah, 24 13535 0000BA59 EB1E <1> jmp checksignificantbitscommon 13536 <1> 13537 <1> getword: 13538 0000BA5B 53 <1> push bx 13539 0000BA5C E816FB <1> call getexpression 13540 0000BA5F 5B <1> pop bx 13541 <1> .checksignificantbits: 13542 0000BA60 50 <1> push ax 13543 0000BA61 80E43F <1> and ah, 3Fh 13544 0000BA64 80FC10 <1> cmp ah, 16 13545 0000BA67 EB10 <1> jmp checksignificantbitscommon 13546 <1> 13547 <1> getbyte: 13548 0000BA69 53 <1> push bx 13549 0000BA6A 52 <1> push dx 13550 0000BA6B E807FB <1> call getexpression 13551 0000BA6E 5B <1> pop bx 13552 0000BA6F 88FE <1> mov dh, bh 13553 0000BA71 5B <1> pop bx 13554 <1> .checksignificantbits: 13555 0000BA72 50 <1> push ax 13556 0000BA73 80E43F <1> and ah, 3Fh 13557 0000BA76 80FC08 <1> cmp ah, 8 13558 <1> checksignificantbitscommon: 13559 0000BA79 58 <1> pop ax 13560 0000BA7A 7701 <1> ja short errorj6 ; if error 13561 0000BA7C C3 <1> retn 13562 <1> 13563 <1> errorj6: 13564 0000BA7D E9CAEC <1> jmp error 13565 <1> 13566 <1> 13567 <1> ; GETNYB - Convert the hex character in AL into a nybble. Return 13568 <1> ; carry set in case of error. 13569 <1> 13570 <1> getnyb: 13571 0000BA80 50 <1> push ax 13572 0000BA81 2C30 <1> sub al, '0' 13573 0000BA83 3C09 <1> cmp al, 9 13574 0000BA85 760D <1> jbe .return ; if normal digit 13575 0000BA87 58 <1> pop ax 13576 0000BA88 50 <1> push ax 13577 0000BA89 E88FD3 <1> call uppercase 13578 0000BA8C 2C41 <1> sub al, 'A' 13579 0000BA8E 3C05 <1> cmp al, 'F'-'A' 13580 0000BA90 7706 <1> ja .error ; if not A..F 13581 0000BA92 040A <1> add al, 10 13582 <1> .return: 13583 0000BA94 44 <1> inc sp ; normal return (first pop old AX) 13584 0000BA95 44 <1> inc sp 13585 0000BA96 F8 <1> clc 13586 0000BA97 C3 <1> retn 13587 <1> .error: 13588 0000BA98 58 <1> pop ax ; error return 13589 0000BA99 F9 <1> stc 13590 0000BA9A C3 <1> retn 13591 <1> 13592 <1> 13593 <1> ; INP: si -> input line 13594 <1> ; OUT: NC if normal range (nonzero, upper >= lower), 13595 <1> ; bx:dx = TO value (upper bound) 13596 <1> ; cx:di = FROM value (lower bound) 13597 <1> ; CY if not normal, 13598 <1> ; bx:dx and cx:di may be invalid 13599 <1> ; ZR if FROM LENGTH with zero length, cx:di valid 13600 <1> ; al = first character 13601 <1> ; si -> next character 13602 <1> ; jumps to error if invalid input 13603 <1> get_value_range: 13604 0000BA9B E83301 <1> call skipwhite 13605 0000BA9E 4E <1> dec si 13606 0000BA9F BA[7868] <1> mov dx, msg.from 13607 0000BAA2 E87800 <1> call isstring? 13608 0000BAA5 AC <1> lodsb 13609 0000BAA6 753B <1> jne .not_from 13610 <1> 13611 <1> .from: 13612 0000BAA8 E8CAFA <1> call getexpression ; (recursive) 13613 0000BAAB 89D7 <1> mov di, dx 13614 0000BAAD 89D9 <1> mov cx, bx ; cx:di = from 13615 <1> 13616 0000BAAF 4E <1> dec si 13617 0000BAB0 BA[7D68] <1> mov dx, msg.to 13618 0000BAB3 E86700 <1> call isstring? 13619 0000BAB6 7425 <1> je .from_to 13620 0000BAB8 BA[5A68] <1> mov dx, msg.length 13621 0000BABB E85F00 <1> call isstring? 13622 0000BABE 7403E987EC <1> jne error 13623 <1> 13624 <1> .from_length: 13625 0000BAC3 AC <1> lodsb 13626 0000BAC4 E8AEFA <1> call getexpression ; (recursive) 13627 0000BAC7 85DB <1> test bx, bx 13628 0000BAC9 7506 <1> jnz @F 13629 0000BACB 85D2 <1> test dx, dx 13630 0000BACD 7502 <1> jnz @F 13631 <1> ; ZR = length is zero, cx:di = from 13632 <1> .notnormal: 13633 0000BACF F9 <1> stc 13634 0000BAD0 C3 <1> retn 13635 <1> 13636 <1> @@: 13637 <1> ; bx:dx = length 13638 0000BAD1 01FA <1> add dx, di 13639 0000BAD3 11CB <1> adc bx, cx ; bx:dx = from + length 13640 0000BAD5 83EA01 <1> sub dx, 1 13641 0000BAD8 83DB00 <1> sbb bx, 0 ; bx:dx = from + length - 1 13642 0000BADB EB0D <1> jmp @F 13643 <1> 13644 <1> .from_to: 13645 0000BADD AC <1> lodsb 13646 <1> 13647 0000BADE E894FA <1> call getexpression ; (recursive) 13648 <1> ; bx:dx = to 13649 <1> ; cx:di = from 13650 0000BAE1 EB07 <1> jmp @F 13651 <1> 13652 <1> .not_from: 13653 0000BAE3 E88FFA <1> call getexpression ; (recursive) 13654 0000BAE6 89D7 <1> mov di, dx 13655 0000BAE8 89D9 <1> mov cx, bx ; bx:dx = cx:ax = value 13656 <1> 13657 <1> @@: 13658 0000BAEA 39CB <1> cmp bx, cx 13659 0000BAEC 7502 <1> jne @F 13660 0000BAEE 39FA <1> cmp dx, di 13661 <1> @@: 13662 0000BAF0 72DD <1> jb .notnormal ; NZ = length overflow or not normal FROM TO 13663 0000BAF2 C3 <1> retn ; (NC) 13664 <1> 13665 <1> 13666 <1> stack_check_indirection: 13667 0000BAF3 B88000 <1> mov ax, _EXPRESSION_INDIRECTION_STACK_CHECK 13668 <1> 13669 <1> ; INP: ax = how much stack should be left 13670 <1> ; word [cs:ip + 1] = message for location 13671 <1> ; OUT: doesn't return if stack overflow 13672 <1> ; CHG: ax 13673 <1> ; STT: ds = ss 13674 <1> stack_check: 13675 0000BAF6 05[400A] <1> add ax, stack 13676 0000BAF9 39C4 <1> cmp sp, ax 13677 0000BAFB 7201 <1> jb @F 13678 0000BAFD C3 <1> retn 13679 <1> 13680 <1> @@: 13681 0000BAFE 58 <1> pop ax 13682 <1> 13683 0000BAFF 16 <1> push ss 13684 0000BB00 07 <1> pop es 13685 0000BB01 8B26[A60A] <1> mov sp, [throwsp] 13686 <1> 13687 0000BB05 BF[0373] <1> mov di, msg.stack_overflow.caller 13688 0000BB08 E87101 <1> call hexword 13689 0000BB0B BA[E772] <1> mov dx, msg.stack_overflow 13690 0000BB0E E82205 <1> call putsz 13691 0000BB11 93 <1> xchg ax, bx 13692 0000BB12 2E8B5701 <1> mov dx, [cs:bx + 1] 13693 0000BB16 E81A05 <1> call putsz 13694 <1> 13695 0000BB19 FF26[A20A] <1> jmp near [errret] 9481 9482 9483 %include "lineio.asm" 9484 <1> 9485 <1> %if 0 9486 <1> 9487 <1> lDebug line input and output 9488 <1> 9489 <1> Copyright (C) 1995-2003 Paul Vojta 9490 <1> Copyright (C) 2008-2012 C. Masloch 9491 <1> 9492 <1> Usage of the works is permitted provided that this 9493 <1> instrument is retained with the works, so that any entity 9494 <1> that uses the works is notified of this instrument. 9495 <1> 9496 <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 9497 <1> 9498 <1> %endif 9499 <1> 9500 <1> 9501 <1> usesection lDEBUG_CODE 9502 <1> 9503 <1> ; Check for given string (cap-insensitive) 9504 <1> ; 9505 <1> ; INP: si-> input string to check (either cap), 9506 <1> ; terminated by CR (13), semicolon, space, tab, 9507 <1> ; comma, colon, [, ], (, or ) 9508 <1> ; dx-> ASCIZ string to check (all-caps) 9509 <1> ; OUT: Iff string matches, 9510 <1> ; ZR 9511 <1> ; si-> at separator that terminates the keyword 9512 <1> ; else, 9513 <1> ; NZ 9514 <1> ; si = input si 9515 <1> ; STT: ds = es = ss 9516 <1> ; CHG: dx, al 9517 <1> isstring?: 9518 0000BB1D 56 <1> push si 9519 0000BB1E 87D7 <1> xchg dx, di 9520 <1> .loop: 9521 0000BB20 AC <1> lodsb 9522 0000BB21 E8F7D2 <1> call uppercase 9523 0000BB24 AE <1> scasb 9524 0000BB25 7506 <1> jne .mismatch 9525 0000BB27 84C0 <1> test al, al 9526 0000BB29 75F5 <1> jne .loop 9527 0000BB2B EB38 <1> jmp .matched_zr 9528 <1> 9529 <1> .mismatch: 9530 0000BB2D E84C00 <1> call iseol? 9531 0000BB30 742C <1> je .checkend 9532 0000BB32 3C20 <1> cmp al, 32 9533 0000BB34 7428 <1> je .checkend 9534 0000BB36 3C09 <1> cmp al, 9 9535 0000BB38 7424 <1> je .checkend 9536 0000BB3A 3C2E <1> cmp al, '.' 9537 0000BB3C 7420 <1> je .checkend 9538 0000BB3E 3C2C <1> cmp al, ',' 9539 0000BB40 741C <1> je .checkend 9540 0000BB42 3C3D <1> cmp al, '=' 9541 0000BB44 7418 <1> je .checkend 9542 0000BB46 3C3A <1> cmp al, ':' 9543 0000BB48 7414 <1> je .checkend 9544 0000BB4A 3C5B <1> cmp al, '[' 9545 0000BB4C 7410 <1> je .checkend 9546 0000BB4E 3C5D <1> cmp al, ']' 9547 0000BB50 740C <1> je .checkend 9548 0000BB52 3C28 <1> cmp al, '(' 9549 0000BB54 7408 <1> je .checkend 9550 0000BB56 3C29 <1> cmp al, ')' 9551 0000BB58 7404 <1> je .checkend 9552 <1> .ret_nz: 9553 <1> ; NZ 9554 0000BB5A 5E <1> pop si 9555 <1> .ret: 9556 0000BB5B 87D7 <1> xchg dx, di 9557 0000BB5D C3 <1> retn 9558 <1> 9559 <1> .checkend: 9560 0000BB5E 26807DFF00 <1> cmp byte [es:di - 1], 0 9561 0000BB63 75F5 <1> jne .ret_nz 9562 <1> .matched_zr: ; ZR 9563 0000BB65 5F <1> pop di ; (discard) 9564 0000BB66 8D74FF <1> lea si, [si - 1] ; -> separator 9565 0000BB69 EBF0 <1> jmp .ret 9566 <1> 9567 <1> 9568 <1> iseol?_or_then: 9569 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 9570 0000BB6B F606[A700]08 <1> testopt [internalflags3], dif3_in_if 9571 0000BB70 740A <1> jz iseol? 9572 0000BB72 BA[5865] <1> mov dx, msg.then 9573 0000BB75 4E <1> dec si 9574 0000BB76 E8A4FF <1> call isstring? 9575 0000BB79 740B <1> je iseol?.ret 9576 0000BB7B AC <1> lodsb 9577 <1> %endif 9578 <1> 9579 <1> iseol?: 9580 0000BB7C 3C3B <1> cmp al, ';' 9581 0000BB7E 7406 <1> je .ret 9582 <1> .notsemicolon: 9583 0000BB80 3C0D <1> cmp al, 13 ; this *IS* iseol? 9584 0000BB82 7402 <1> je .ret 9585 0000BB84 3C00 <1> cmp al, 0 9586 <1> .ret: 9587 0000BB86 C3 <1> retn 9588 <1> 9589 <1> 9590 <1> chkeol_or_then: 9591 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 9592 0000BB87 E84800 <1> call skipwh0 9593 0000BB8A E8DEFF <1> call iseol?_or_then 9594 0000BB8D 74F7 <1> je iseol?.ret ; if EOL --> 9595 0000BB8F EB08 <1> jmp @F 9596 <1> %endif 9597 <1> 9598 <1> ; Check for end of line 9599 <1> ; 9600 <1> ; INP: al = first character 9601 <1> ; ds:si-> next character 9602 <1> ; OUT: ZR 9603 <1> ; al = 13 or al = ';' or al = 0 9604 <1> ; (does not return if anything on line beside blanks) 9605 <1> chkeol: 9606 0000BB91 E83E00 <1> call skipwh0 9607 0000BB94 E8E5FF <1> call iseol? 9608 0000BB97 74ED <1> je iseol?.ret ; if EOL --> 9609 <1> 9610 <1> @@: 9611 0000BB99 B80001 <1> mov ax, 0100h 9612 0000BB9C E8F2EB <1> call setrc 9613 <1> errorj8: 9614 0000BB9F E9A8EB <1> jmp error 9615 <1> 9616 <1> 9617 <1> ; SKIPCOMMA - Skip white space, then an optional comma, and more white 9618 <1> ; space. 9619 <1> ; SKIPCOMM0 - Same as above, but we already have the character in AL. 9620 <1> ; STK: 3 word 9621 <1> skipcomma: 9622 0000BBA2 AC <1> lodsb 9623 <1> skipcomm0: 9624 0000BBA3 E82C00 <1> call skipwh0 9625 0000BBA6 3C2C <1> cmp al, ',' 9626 0000BBA8 7510 <1> jne .return ; if no comma 9627 0000BBAA 56 <1> push si 9628 0000BBAB E82300 <1> call skipwhite 9629 0000BBAE E8CBFF <1> call iseol? 9630 0000BBB1 7504 <1> jne .noteol ; if not end of line 9631 0000BBB3 5E <1> pop si 9632 0000BBB4 B02C <1> mov al, ',' 9633 0000BBB6 C3 <1> retn 9634 <1> .noteol: 9635 0000BBB7 83C402 <1> add sp, byte 2 ; pop si into nowhere 9636 <1> .return: 9637 0000BBBA C3 <1> retn 9638 <1> 9639 <1> 9640 <1> skipequals: 9641 0000BBBB AC <1> lodsb 9642 <1> skipequ0: 9643 0000BBBC E81300 <1> call skipwh0 9644 0000BBBF 3C3D <1> cmp al, '=' 9645 0000BBC1 7503 <1> jne .return 9646 0000BBC3 E80B00 <1> call skipwhite 9647 <1> .return: 9648 0000BBC6 C3 <1> retn 9649 <1> 9650 <1> 9651 <1> ; Skip alphabetic characters, and then white space 9652 <1> ; 9653 <1> ; INP: ds:si-> first character 9654 <1> ; OUT: al = first non-blank character behind alphabetic characters 9655 <1> ; ds:si-> character behind the first non-blank behind alpha. 9656 <1> ; NC 9657 <1> skipalpha: 9658 <1> .: 9659 0000BBC7 AC <1> lodsb 9660 0000BBC8 24DF <1> and al, TOUPPER 9661 0000BBCA 2C41 <1> sub al, 'A' 9662 0000BBCC 3C19 <1> cmp al, 'Z'-'A' 9663 0000BBCE 76F7 <1> jbe . 9664 0000BBD0 4E <1> dec si 9665 <1> 9666 <1> ; Skip blanks and tabs 9667 <1> ; 9668 <1> ; INP: ds:si-> first character 9669 <1> ; OUT: al = first non-blank character 9670 <1> ; ds:si-> character behind the first non-blank 9671 <1> ; NC 9672 <1> ; CHG: - 9673 <1> ; STK: 1 word 9674 <1> skipwhite: 9675 0000BBD1 AC <1> lodsb 9676 <1> 9677 <1> ; Same as above, but first character in al 9678 <1> ; 9679 <1> ; INP: al = first character 9680 <1> ; ds:si-> next character 9681 <1> ; OUT: al = first non-blank character 9682 <1> ; ds:si-> character behind the first non-blank 9683 <1> ; NC 9684 <1> ; CHG: - 9685 <1> ; STK: 1 word 9686 <1> skipwh0: 9687 0000BBD2 3C20 <1> cmp al, 32 9688 0000BBD4 74FB <1> je skipwhite 9689 0000BBD6 3C09 <1> cmp al, 9 9690 0000BBD8 74F7 <1> je skipwhite 9691 0000BBDA F8 <1> clc 9692 0000BBDB C3 <1> retn 9693 <1> 9694 <1> 9695 <1> ; SHOWSTRING - Print ASCIZ string. 9696 <1> showstring.next: 9697 0000BBDC AA <1> stosb 9698 <1> showstring: 9699 0000BBDD AC <1> lodsb 9700 0000BBDE 84C0 <1> test al, al 9701 0000BBE0 75FA <1> jnz .next 9702 0000BBE2 C3 <1> retn 9703 <1> 9704 <1> 9705 <1> ; Dump byte as decimal number string 9706 <1> ; 9707 <1> ; INP: al = byte 9708 <1> ; di-> where to store 9709 <1> ; OUT: - 9710 <1> ; CHG: di-> behind variable-length string 9711 <1> decbyte: 9712 0000BBE3 50 <1> push ax 9713 0000BBE4 51 <1> push cx 9714 0000BBE5 B96400 <1> mov cx, 100 9715 0000BBE8 E80B00 <1> call .div 9716 0000BBEB B10A <1> mov cl, 10 9717 0000BBED E80600 <1> call .div 9718 0000BBF0 0430 <1> add al, '0' 9719 0000BBF2 AA <1> stosb 9720 0000BBF3 59 <1> pop cx 9721 0000BBF4 58 <1> pop ax 9722 0000BBF5 C3 <1> retn 9723 <1> 9724 <1> .div: 9725 0000BBF6 30E4 <1> xor ah, ah 9726 0000BBF8 F6F1 <1> div cl 9727 0000BBFA 08C5 <1> or ch, al 9728 0000BBFC 7403 <1> jz .leadingzero 9729 0000BBFE 0430 <1> add al, '0' 9730 0000BC00 AA <1> stosb 9731 <1> .leadingzero: 9732 0000BC01 86C4 <1> xchg al, ah 9733 0000BC03 C3 <1> retn 9734 <1> 9735 <1> 9736 <1> decword: 9737 0000BC04 52 <1> push dx 9738 0000BC05 31D2 <1> xor dx, dx 9739 0000BC07 E80200 <1> call decdword 9740 0000BC0A 5A <1> pop dx 9741 0000BC0B C3 <1> retn 9742 <1> 9743 <1> 9744 <1> decdword: 9745 0000BC0C 51 <1> push cx 9746 0000BC0D 31C9 <1> xor cx, cx 9747 0000BC0F E80200 <1> call dec_dword_minwidth 9748 0000BC12 59 <1> pop cx 9749 0000BC13 C3 <1> retn 9750 <1> 9751 <1> 9752 <1> ; Dump dword as decimal number string 9753 <1> ; 9754 <1> ; INP: dx:ax = dword 9755 <1> ; cx = minimum width (<= 1 for none, must be < 128) 9756 <1> ; di -> where to store 9757 <1> ; OUT: - 9758 <1> ; CHG: di -> behind variable-length string 9759 <1> ; STT: UP 9760 <1> dec_dword_minwidth: 9761 <1> lframe near 9762 <1> lequ 10, bufferlen 9763 <1> lvar ?bufferlen,buffer 9764 0000BC14 5589E58D66F6 <1> lenter 9765 <1> lvar dword, dividend 9766 0000BC1A 52 <1> push dx 9767 0000BC1B 50 <1> push ax 9768 0000BC1C 49 <1> dec cx 9769 <1> lvar word, minwidth 9770 0000BC1D 51 <1> push cx 9771 0000BC1E 41 <1> inc cx 9772 <1> 9773 0000BC1F 50 <1> push ax 9774 0000BC20 53 <1> push bx 9775 0000BC21 51 <1> push cx 9776 0000BC22 52 <1> push dx 9777 0000BC23 56 <1> push si 9778 0000BC24 57 <1> push di 9779 0000BC25 06 <1> push es 9780 <1> 9781 0000BC26 16 <1> push ss 9782 0000BC27 07 <1> pop es 9783 <1> 9784 0000BC28 8D7EFF <1> lea di, [bp + ?buffer + ?bufferlen - 1] 9785 0000BC2B 89FB <1> mov bx, di 9786 0000BC2D FD <1> std ; _AMD_ERRATUM_109_WORKAROUND does not apply 9787 <1> 9788 <1> ; dword [bp + ?dividend] = number to display 9789 0000BC2E B90A00 <1> mov cx, 10 ; divisor 9790 <1> .loop_write: 9791 <1> 9792 0000BC31 31D2 <1> xor dx, dx 9793 0000BC33 57 <1> push di 9794 0000BC34 BF0400 <1> mov di, 4 9795 <1> .loop_divide: 9796 0000BC37 8B43F0 <1> mov ax, [bp + ?dividend - 2 + di] 9797 0000BC3A F7F1 <1> div cx 9798 0000BC3C 8943F0 <1> mov word [bp + ?dividend - 2 + di], ax 9799 0000BC3F 4F <1> dec di 9800 0000BC40 4F <1> dec di 9801 0000BC41 75F4 <1> jnz .loop_divide 9802 <1> ; dx = last remainder 9803 0000BC43 5F <1> pop di 9804 0000BC44 92 <1> xchg ax, dx ; ax = remainder (next digit) 9805 <1> ; dword [bp + ?dividend] = result of div 9806 0000BC45 0430 <1> add al, '0' 9807 0000BC47 AA <1> stosb 9808 0000BC48 FF4EF0 <1> dec word [bp + ?minwidth] 9809 0000BC4B 79E4 <1> jns .loop_write 9810 <1> 9811 0000BC4D 837EF400 <1> cmp word [bp + ?dividend + 2], 0 9812 0000BC51 75DE <1> jnz .loop_write 9813 0000BC53 837EF200 <1> cmp word [bp + ?dividend], 0 9814 <1> ; any more ? 9815 0000BC57 75D8 <1> jnz .loop_write ; loop --> 9816 <1> 9817 0000BC59 FC <1> cld 9818 <1> 9819 0000BC5A 29FB <1> sub bx, di 9820 0000BC5C 89D9 <1> mov cx, bx 9821 0000BC5E 89FE <1> mov si, di 9822 0000BC60 46 <1> inc si 9823 <1> 9824 0000BC61 07 <1> pop es 9825 0000BC62 5F <1> pop di 9826 <1> 9827 <1> @@: 9828 0000BC63 36A4 <1> ss movsb ; do not replace by rep ss movsb, because 9829 <1> ; some 8086 don't like two-prefix opcodes 9830 0000BC65 E2FC <1> loop @B 9831 <1> 9832 0000BC67 5E <1> pop si 9833 0000BC68 5A <1> pop dx 9834 0000BC69 59 <1> pop cx 9835 0000BC6A 5B <1> pop bx 9836 0000BC6B 58 <1> pop ax 9837 <1> 9838 0000BC6C 89EC5D <1> lleave 9839 0000BC6F C3 <1> retn 9840 <1> 9841 <1> 9842 <1> ; dump high word of eax - assumes 386 9843 <1> hexword_high: 9844 <1> [cpu 386] 9845 0000BC70 66C1C010 <1> rol eax, 16 9846 0000BC74 E80500 <1> call hexword 9847 0000BC77 66C1C010 <1> rol eax, 16 9848 <1> __CPU__ 9849 0000BC7B C3 <1> retn 9850 <1> 9851 <1> 9852 <1> ; hexdword - dump dword (in eax) to hex ASCII - assumes 386 9853 <1> ; HEXWORD - Print hex word (in AX). 9854 <1> ; HEXBYTE - Print hex byte (in AL). 9855 <1> ; HEXNYB - Print hex digit. 9856 <1> ; Uses none. 9857 <1> %if 0 ; currently disabled because only one call made to here (ID command) 9858 <1> hexdword: 9859 <1> call hexword_high 9860 <1> %endif 9861 <1> hexword: 9862 0000BC7C 86C4 <1> xchg al, ah 9863 0000BC7E E80200 <1> call hexbyte 9864 0000BC81 86C4 <1> xchg al, ah 9865 <1> 9866 <1> hexbyte: 9867 0000BC83 51 <1> push cx 9868 0000BC84 B104 <1> mov cl, 4 9869 0000BC86 D2C0 <1> rol al, cl 9870 0000BC88 E80300 <1> call hexnyb 9871 0000BC8B D2C0 <1> rol al, cl 9872 0000BC8D 59 <1> pop cx 9873 <1> 9874 <1> hexnyb: 9875 0000BC8E 50 <1> push ax 9876 0000BC8F 240F <1> and al, 0Fh 9877 <1> .common: 9878 <1> ; These three instructions change to ASCII hex. 9879 <1> ; Refer to https://codegolf.stackexchange.com/questions/193793/little-endian-number-to-string-conversion/193842#193842 9880 0000BC91 3C0A <1> cmp al, 10 ; set CF according to digit <= 9 9881 0000BC93 1C69 <1> sbb al, 69h ; read CF, set CF and conditionally set AF 9882 0000BC95 2F <1> das ; magic, which happens to work 9883 0000BC96 AA <1> stosb 9884 0000BC97 58 <1> pop ax 9885 0000BC98 C3 <1> retn 9886 <1> 9887 <1> ; TAB_TO - Space fill until reaching the column indicated by AX. 9888 <1> ; (Print a new line if necessary.) 9889 <1> 9890 <1> tab_to: 9891 0000BC99 50 <1> push ax 9892 0000BC9A 29F8 <1> sub ax, di 9893 0000BC9C 7706 <1> ja tabto1 ; if there's room on this line 9894 0000BC9E E80B00 <1> call trimputs 9895 0000BCA1 BF[0E08] <1> mov di, line_out 9896 <1> tabto1: 9897 0000BCA4 59 <1> pop cx 9898 0000BCA5 29F9 <1> sub cx, di 9899 0000BCA7 B020 <1> mov al, 32 9900 0000BCA9 F3AA <1> rep stosb ; space fill to the right end 9901 <1> puts.retn: 9902 0000BCAB C3 <1> retn 9903 <1> 9904 <1> ; Trim excess blanks, append linebreak and display line_out. 9905 <1> ; 9906 <1> ; INP: es:di -> behind last character to display, or blank 9907 <1> ; 9908 <1> ; Note: May overflow if line_out only contains blanks. The byte at 9909 <1> ; trim_overflow is used to avoid overflows. 9910 <1> trimputs: 9911 0000BCAC 4F <1> dec di 9912 0000BCAD 26803D20 <1> cmp byte [es:di], 32 9913 0000BCB1 74F9 <1> je trimputs 9914 0000BCB3 47 <1> inc di 9915 <1> 9916 <1> ; Append linebreak and display line_out 9917 <1> ; 9918 <1> ; INP: es:di -> behind last character to display 9919 <1> ; STT: all segment registers same 9920 <1> ; CHG: ax, bx, cx, dx 9921 <1> putsline_crlf: 9922 0000BCB4 B80D0A <1> mov ax, 10<<8| 13 9923 0000BCB7 AB <1> stosw 9924 <1> 9925 <1> ; Display line_out 9926 <1> ; 9927 <1> ; INP: es:di -> behind last character to display 9928 <1> ; es:line_out -> first character to display 9929 <1> ; STT: all segment registers same 9930 <1> ; CHG: ax, bx, cx, dx 9931 <1> putsline: 9932 0000BCB8 89F9 <1> mov cx, di 9933 0000BCBA BA[0E08] <1> mov dx, line_out 9934 0000BCBD 29D1 <1> sub cx, dx 9935 <1> 9936 <1> ; Display message 9937 <1> ; 9938 <1> ; INP: es:dx -> message to display 9939 <1> ; cx = length of message 9940 <1> ; STT: ds = ss = debugger data selector 9941 <1> ; CHG: ax, bx, cx, dx 9942 <1> puts: 9943 <1> ;d4 call d4message 9944 <1> ;d4 asciz "In puts first",13,10 9945 <1> 9946 0000BCBF F606[9F00]20 <1> testopt [internalflags], tt_silence 9947 0000BCC4 7403E93502 <1> jnz puts_silence 9948 <1> 9949 0000BCC9 F606[A500]60 <1> testopt [internalflags3], dif3_unquiet 9950 0000BCCE 7507 <1> jnz @F 9951 0000BCD0 F606[A500]10 <1> testopt [internalflags3], dif3_quiet_output 9952 0000BCD5 75D4 <1> jnz .retn 9953 <1> @@: 9954 <1> 9955 <1> ; The following code contains most of the paging support. 9956 <1> ; Based on the number of LF characters in the string it 9957 <1> ; displays only parts of the string, then interrupts it by 9958 <1> ; the "[more]" prompt which waits for any key before 9959 <1> ; proceeding. This is ensured to work proper in InDOS mode. 9960 <1> ; 9961 <1> ; Paging is deactivated if the command's output mustn't be 9962 <1> ; paged (clears pagedcommand, which is set by cmd3). It is 9963 <1> ; also not used when we output to a file. 9964 0000BCD7 F606[7C00]10 <1> testopt [options], nonpagingdevice 9965 0000BCDC 7403E9FE00 <1> jnz .display ; deactivated by user --> 9966 0000BCE1 F606[A700]01 <1> testopt [internalflags3], dif3_input_re 9967 0000BCE6 7403E9F400 <1> jnz .display 9968 0000BCEB F606[A500]01 <1> testopt [internalflags3], dif3_input_cmdline 9969 0000BCF0 7403E9EA00 <1> jnz .display 9970 <1> %if _INPUT_FILE_BOOT 9971 0000BCF5 F606[A300]02 <1> testopt [internalflags2], dif2_input_file_boot 9972 0000BCFA 7403E9E000 <1> jnz .display 9973 <1> %endif 9974 0000BCFF E817EC <1> call InDos ; InDOS mode ? 9975 0000BD02 752C <1> jnz .dontcheckredirection ; yes, then we display with Int10 anyway --> 9976 <1> %if _INPUT_FILE_HANDLES 9977 0000BD04 F606[A200]10 <1> testopt [internalflags2], dif2_input_file 9978 0000BD09 7403E9D100 <1> jnz .display 9979 <1> %endif 9980 0000BD0E F606[7D00]40 <1> testopt [options], enable_serial ; I/O done using serial port ? 9981 0000BD13 751B <1> jnz .dontcheckredirection ; yes, is paged --> 9982 0000BD15 F606[9C00]80 <1> testopt [internalflags], outputfile 9983 0000BD1A 7403E9C000 <1> jnz .display ; output redirected to file. never page --> 9984 0000BD1F F606[7D00]01 <1> testopt [options], nondospaging 9985 0000BD24 750A <1> jnz .dontcheckredirection 9986 0000BD26 F606[9C00]20 <1> testopt [internalflags], inputfile 9987 0000BD2B 7403E9AF00 <1> jnz .display ; input redirected from a file. never page --> 9988 <1> .dontcheckredirection: 9989 0000BD30 57 <1> push di 9990 0000BD31 51 <1> push cx ; used as variable: remaining (not yet displayed) line length 9991 0000BD32 89D7 <1> mov di, dx ; es:di-> string, cx = length 9992 <1> .looplf: 9993 0000BD34 85C9 <1> test cx, cx 9994 0000BD36 7503E9A200 <1> jz .display_pop ; end of string (or ended in LF) --> 9995 <1> ; Important: We only ever jump back to .looplf when cx 9996 <1> ; zero means it's okay to ignore the waiting prompt as 9997 <1> ; flagged below. This is (A) at the start of a string, 9998 <1> ; where cx is the whole string's length, (B) after 9999 <1> ; determining that prompting is not yet necessary, in 10000 <1> ; which case the flag was checked earlier already, (C) 10001 <1> ; after the flag has been set and a substring was already 10002 <1> ; displayed (so cx is again the whole substring's length) 10003 <1> ; or (D) just after the prompt was displayed, in which 10004 <1> ; case the flag cannot be set. 10005 <1> ; In case A and C, when the (sub)string is empty (ie. cx 10006 <1> ; is zero) it's crucial to ignore the waiting prompt as 10007 <1> ; this is the exact behaviour we want: If nothing is 10008 <1> ; displayed anymore before the getline code prompts 10009 <1> ; anyway, do not display our prompt. 10010 0000BD3B F606[9E00]10 <1> testopt [internalflags], promptwaiting ; do we have a prompt to display ? 10011 0000BD40 7550 <1> jnz .promptnow ; yes, display it before the string --> 10012 <1> 10013 0000BD42 31C0 <1> xor ax, ax 10014 0000BD44 F606[7D00]40 <1> testopt [options], enable_serial ; serial ? 10015 0000BD49 7409 <1> jz @F ; no --> 10016 0000BD4B 0A06[F30B] <1> or al, byte [serial_rows] ; ax = number of rows if serial 10017 0000BD4F 7419 <1> jz .display_pop_ZR ; if zero, do not page --> 10018 0000BD51 48 <1> dec ax ; was 1 ? (adjust to rows minus one) 10019 0000BD52 7516 <1> jnz @FF ; no, use as rows minus one --> (NZ) 10020 <1> ; ax = 0 if it was 1 10021 <1> @@: 10022 0000BD54 0A06[020C] <1> or al, [io_rows] 10023 0000BD58 7410 <1> jz .display_pop_ZR 10024 0000BD5A 48 <1> dec ax ; was 1 ? (adjust to rows minus one) 10025 0000BD5B 750D <1> jnz @F ; no, use as rows minus one --> (NZ) 10026 <1> ; yes, automatic (use BDA) 10027 0000BD5D 06 <1> push es 10028 0000BD5E B84000 <1> mov ax, 40h ; 0040h is a bimodal segment/selector 10029 0000BD61 8EC0 <1> mov es, ax 10030 0000BD63 26A08400 <1> mov al, byte [ es:84h ] ; rows on screen 10031 0000BD67 07 <1> pop es 10032 0000BD68 85C0 <1> test ax, ax 10033 <1> @@: 10034 <1> .display_pop_ZR: 10035 0000BD6A 7471 <1> jz .display_pop 10036 <1> 10037 0000BD6C 3806[9B0A] <1> cmp byte [ linecounter ], al 10038 0000BD70 725E <1> jb .notyet ; not yet reached --> 10039 0000BD72 F606[9C00]08 <1> testopt [internalflags], pagedcommand ; active ? 10040 0000BD77 7506 <1> jnz .prompt ; yes, prompt --> 10041 0000BD79 FE0E[9B0A] <1> dec byte [ linecounter ] ; keep count, but don't prompt til next LF 10042 0000BD7D EB51 <1> jmp short .notyet 10043 <1> 10044 <1> .prompt: 10045 0000BD7F 58 <1> pop ax ; ax = length of string, cx = length of string remaining 10046 0000BD80 29C8 <1> sub ax, cx ; ax = length of string til LF 10047 0000BD82 91 <1> xchg ax, cx ; cx = til LF incl., ax = behind LF 10048 0000BD83 50 <1> push ax ; new count 10049 <1> ; cx = length til LF 10050 <1> ; es:dx-> start of part til LF 10051 0000BD84 E85800 <1> call .display ; display part of message which fits on screen 10052 0000BD87 59 <1> pop cx 10053 0000BD88 51 <1> push cx ; update cx from variable 10054 0000BD89 89FA <1> mov dx, di ; dx-> start of next part 10055 0000BD8B 800E[9E00]10 <1> setopt [internalflags], promptwaiting ; mark as prompting necessary 10056 0000BD90 EBA2 <1> jmp short .looplf ; now check whether anything follows at all 10057 <1> ; This is the magic to suppress unnecessary prompts as 10058 <1> ; were displayed previously. Now, we'll set this flag 10059 <1> ; which effectively displays the prompt before (!) any 10060 <1> ; other output is done. Previously, the prompt would be 10061 <1> ; displayed right here. The only case where behaviour 10062 <1> ; changed is when no more output occurs until the flag 10063 <1> ; is reset elsewhere - ie. if getline prompts anyway. 10064 <1> 10065 <1> .promptnow: 10066 0000BD92 52 <1> push dx 10067 0000BD93 51 <1> push cx 10068 0000BD94 C606[9B0A]00 <1> mov byte [ linecounter ], 0 ; prompting, so reset the line counter 10069 0000BD99 8026[9E00]EF <1> clropt [internalflags], promptwaiting 10070 0000BD9E 06 <1> push es 10071 0000BD9F 16 <1> push ss 10072 0000BDA0 07 <1> pop es 10073 0000BDA1 BA[B55D] <1> mov dx, msg.more ; es:dx -> message 10074 0000BDA4 B90600 <1> mov cx, msg.more_size 10075 0000BDA7 E83500 <1> call .display ; print string (avoiding a recursion) 10076 0000BDAA 07 <1> pop es 10077 <1> 10078 <1> ; This option is a hack for the sole use of 10079 <1> ; demo scripts that only want the user to press 10080 <1> ; a key for paging. 10081 0000BDAB F606[7D00]01 <1> testopt [options], nondospaging 10082 0000BDB0 7405 <1> jz .getc 10083 0000BDB2 E8F602 <1> call getc.rawnext ; get a character from BIOS 10084 0000BDB5 EB03 <1> jmp short .dispover 10085 <1> .getc: 10086 0000BDB7 E8DE02 <1> call getc ; get a character 10087 <1> .dispover: 10088 0000BDBA 3C03 <1> cmp al, 3 ; is it Ctrl+C ? 10089 0000BDBC 743F <1> je .ctrlc ; yes, handle that --> 10090 0000BDBE E8B183 <1> call handle_serial_flags_ctrl_c 10091 0000BDC1 06 <1> push es 10092 0000BDC2 16 <1> push ss 10093 0000BDC3 07 <1> pop es 10094 0000BDC4 BA[BB5D] <1> mov dx, msg.more_over ; es:dx -> message 10095 0000BDC7 B90800 <1> mov cx, msg.more_over_size 10096 0000BDCA E81200 <1> call .display ; overwrite the prompt (avoiding a recursion) 10097 0000BDCD 07 <1> pop es 10098 0000BDCE 59 <1> pop cx 10099 0000BDCF 5A <1> pop dx 10100 <1> 10101 <1> .notyet: 10102 0000BDD0 B00A <1> mov al, 10 10103 0000BDD2 F2AE <1> repne scasb ; search LF 10104 0000BDD4 7507 <1> jne .display_pop ; none --> 10105 <1> 10106 0000BDD6 FE06[9B0A] <1> inc byte [ linecounter ] ; record how many LFs will be displayed 10107 0000BDDA E957FF <1> jmp .looplf ; search for next LF --> 10108 <1> 10109 <1> .display_pop: 10110 0000BDDD 59 <1> pop cx 10111 0000BDDE 5F <1> pop di 10112 <1> .display: 10113 <1> ; Non-paged output code follows. 10114 <1> ;d4 call d4message 10115 <1> ;d4 asciz "In puts.display first",13,10 10116 <1> 10117 0000BDDF F606[7D00]40 <1> testopt [options], enable_serial 10118 0000BDE4 7524 <1> jnz .notdos 10119 0000BDE6 E830EB <1> call InDos 10120 0000BDE9 751F <1> jnz .notdos 10121 <1> ; es:dx -> message 10122 0000BDEB BB0100 <1> mov bx, 1 ; standard output 10123 0000BDEE B440 <1> mov ah, 40h ; write to file 10124 0000BDF0 E30A <1> jcxz @F 10125 <1> %if _PM 10126 <1> d5 push di 10127 0000BDF2 06 <1> push es ; point ds of _doscall* to msg segment 10128 <1> d5 call d4message 10129 <1> d5 asciz 13,10,"In puts.display, es=" 10130 <1> d5 push es 10131 <1> d5 call d4disp_stack_hex 10132 <1> d5 call d4message 10133 <1> d5 asciz "h",13,10 10134 0000BDF3 E892A1 <1> call selector_to_segment ; make sure we give it as a segment 10135 <1> ; This assumes that non-access-slice pointers into the 10136 <1> ; symbol tables (SYMSTR particularly) can be converted 10137 <1> ; into 86M segmented addresses, ie that the selector 10138 <1> ; points into 86M-accessible memory. 10139 <1> d5 call d4message 10140 <1> d5 asciz "In puts.display, on stack =" 10141 <1> d5 pop di 10142 <1> d5 push di 10143 <1> d5 push di 10144 <1> d5 call d4disp_stack_hex 10145 <1> d5 call d4message 10146 <1> d5 asciz "h",13,10 10147 0000BDF6 E861D6 <1> call _doscall_return_es_parameter_es_ds 10148 0000BDF9 83C402 <1> add sp, 2 ; discard es returned from call 10149 <1> d5 pop di 10150 <1> %else 10151 <1> push ds 10152 <1> push es 10153 <1> pop ds ; ds:dx -> message 10154 <1> int 21h ; simply call into DOS 10155 <1> pop ds 10156 <1> %endif 10157 <1> @@: 10158 0000BDFC C3 <1> retn 10159 <1> 10160 <1> .ctrlc: 10161 0000BDFD F606[A300]10 <1> testopt [internalflags2], dif2_in_silence_dump 10162 0000BE02 7403 <1> jz @F 10163 0000BE04 E81B02 <1> call reset_silent_mode 10164 <1> @@: 10165 0000BE07 E9DF83 <1> jmp handle_ctrl_c ; abort currently running command --> 10166 <1> ; If handled by DOS, Ctrl+C causes our process to be terminated. 10167 <1> ; Because we are self-owned, we re-enter our code at debug22 then. 10168 <1> ; debug22 only does some re-initialization of registers before 10169 <1> ; entering cmd3. Therefore, instead of aborting we can directly jump 10170 <1> ; to cmd3 here. This has the additional benefit of not requiring DOS 10171 <1> ; at all, so that no workarounds for InDOS mode and boot loader 10172 <1> ; operation are necessary. 10173 <1> 10174 <1> ; No command should fail spectacularly when being aborted this way, 10175 <1> ; because in fact every command calling puts can already be aborted by 10176 <1> ; DOS's Ctrl+C checking if DOS is used. This check is really only an 10177 <1> ; _additional_ way the commands can be aborted. 10178 <1> 10179 <1> ; Note that a more complete way to support command abortion would be 10180 <1> ; to hook Int1B, and to keep a flag of whether Ctrl+C or Ctrl+Break 10181 <1> ; were requested, and to additionally check before or after every I/O 10182 <1> ; operation whether Ctrl+C was pressed using non-destructive reads. 10183 <1> ; In short, exactly what DOS does. 10184 <1> 10185 <1> .notdos: 10186 0000BE0A 56 <1> push si 10187 0000BE0B F606[9E00]01 <1> testopt [internalflags], usecharcounter 10188 0000BE10 7505 <1> jnz .dontresetcharcounter 10189 0000BE12 C606[9A0A]01 <1> mov byte [ charcounter ], 1 10190 <1> ; This assumes we always start at the beginning of a line. 10191 <1> ; Therefore any call to puts must display at the beginning 10192 <1> ; of a line or tab parsing will not work. Only calls to puts 10193 <1> ; not containing tab characters may display partial lines. 10194 <1> ; (Calls to puts with partial lines and tab characters have 10195 <1> ; to set the flag usecharcounter in internalflags.) 10196 <1> .dontresetcharcounter: 10197 0000BE17 E358 <1> jcxz .return 10198 0000BE19 89D6 <1> mov si, dx 10199 <1> .loop: 10200 0000BE1B 26AC <1> es lodsb 10201 0000BE1D 3C09 <1> cmp al, 9 10202 0000BE1F 750B <1> jne .nottab ; is no tab --> 10203 0000BE21 A0[9A0A] <1> mov al, byte [ charcounter ] 10204 0000BE24 2407 <1> and al, 7 ; at 8 character boundary ? 10205 0000BE26 B020 <1> mov al, 32 ; (always replaced by blank) 10206 0000BE28 7402 <1> jz .nottab ; yes, don't use hack --> 10207 0000BE2A 41 <1> inc cx 10208 0000BE2B 4E <1> dec si ; find tab again next lodsb 10209 <1> .nottab: 10210 0000BE2C 3C0D <1> cmp al, 13 ; (exact match for CR) 10211 0000BE2E 750A <1> jne .notcr 10212 0000BE30 8026[A600]FD <1> clropt [internalflags3], dif3_int10_highlight 10213 0000BE35 C606[9A0A]00 <1> mov byte [ charcounter ], 0 ; increased to one before displaying 10214 <1> .notcr: 10215 <1> %if 0 ; currently we never receive BS here 10216 <1> cmp al, 8 10217 <1> jne .notbs 10218 <1> mov ah, 0Fh 10219 <1> int 10h ; get page 10220 <1> mov bl, al ; save number of characters per column 10221 <1> push cx 10222 <1> mov ah, 03h 10223 <1> int 10h ; get cursor position dx 10224 <1> pop cx 10225 <1> dec byte [ charcounter ] ; assume not at start of line 10226 <1> mov al, 8 ; changed by Int10 10227 <1> or dl, dl 10228 <1> jnz .dontcount ; not first column, so display normal --> 10229 <1> mov byte [ charcounter ], 1 ; assume at start of screen 10230 <1> or dh, dh 10231 <1> jz .next ; at start of screen, don't display --> 10232 <1> dec dh ; previous line 10233 <1> mov dl, bl 10234 <1> mov byte [ charcounter ], dl ; really at end of line (one-based counter) 10235 <1> dec dl ; last column 10236 <1> mov ah, 02h 10237 <1> int 10h ; set new cursor position 10238 <1> jmp short .next 10239 <1> .notbs: 10240 <1> %endif 10241 0000BE3A 3C0A <1> cmp al, 10 10242 0000BE3C 7404 <1> je .dontcount ; must not count line feeds! 10243 0000BE3E FE06[9A0A] <1> inc byte [ charcounter ] 10244 <1> .dontcount: 10245 0000BE42 F606[7D00]40 <1> testopt [options], enable_serial 10246 0000BE47 7405 <1> jz @F 10247 <1> 10248 0000BE49 E88F14 <1> call serial_send_char 10249 <1> 10250 0000BE4C EB21 <1> jmp .next 10251 <1> @@: 10252 <1> 10253 0000BE4E 3C1B <1> cmp al, 27 10254 0000BE50 7421 <1> je .try_highlight 10255 <1> 10256 <1> .nohighlight: 10257 0000BE52 F606[A600]02 <1> testopt [internalflags3], dif3_int10_highlight 10258 0000BE57 740F <1> jz @F 10259 0000BE59 B409 <1> mov ah, 09h 10260 0000BE5B B700 <1> mov bh, 0 10261 0000BE5D 8A1E[AA98] <1> mov bl, byte [.attribute] 10262 0000BE61 51 <1> push cx 10263 0000BE62 B90100 <1> mov cx, 1 10264 0000BE65 CD10 <1> int 10h 10265 0000BE67 59 <1> pop cx 10266 <1> 10267 <1> @@: 10268 0000BE68 BB0700 <1> mov bx, 0007 10269 0000BE6B B40E <1> mov ah, 0Eh 10270 0000BE6D CD10 <1> int 10h 10271 <1> .next: 10272 0000BE6F E2AA <1> loop .loop 10273 <1> .return: 10274 0000BE71 5E <1> pop si 10275 0000BE72 C3 <1> retn 10276 <1> 10277 <1> .try_highlight: 10278 0000BE73 F606[8600]02 <1> testopt [options3], opt3_r_highlight_dumb 10279 0000BE78 75D8 <1> jnz .nohighlight 10280 0000BE7A 83F902 <1> cmp cx, 2 10281 0000BE7D 76D3 <1> jbe .nohighlight 10282 0000BE7F 26803C5B <1> cmp byte [es:si], '[' 10283 0000BE83 75CD <1> jne .nohighlight 10284 0000BE85 26807C016D <1> cmp byte [es:si + 1], 'm' 10285 0000BE8A 742C <1> je .highlight_reset 10286 0000BE8C 83F903 <1> cmp cx, 3 10287 0000BE8F 74C1 <1> je .nohighlight 10288 0000BE91 26807C0137 <1> cmp byte [es:si + 1], '7' 10289 0000BE96 75BA <1> jne .nohighlight 10290 0000BE98 26807C026D <1> cmp byte [es:si + 2], 'm' 10291 0000BE9D 75B3 <1> jne .nohighlight 10292 <1> .highlight_set: 10293 0000BE9F 50 <1> push ax 10294 0000BEA0 51 <1> push cx 10295 0000BEA1 B403 <1> mov ah, 3 10296 0000BEA3 B700 <1> mov bh, 0 10297 0000BEA5 31D2 <1> xor dx, dx ; pre-initialise to zero 10298 0000BEA7 CD10 <1> int 10h ; dl = column, dh = row 10299 0000BEA9 84D2 <1> test dl, dl 10300 0000BEAB 59 <1> pop cx 10301 0000BEAC 58 <1> pop ax 10302 0000BEAD 74A3 <1> jz .nohighlight 10303 <1> ; This test fails if we are at the very left of 10304 <1> ; the screen or in dosemu -dumb mode. So don't 10305 <1> ; use highlighting at the beginning of a line! 10306 0000BEAF 800E[A600]02 <1> setopt [internalflags3], dif3_int10_highlight 10307 0000BEB4 49 <1> dec cx 10308 0000BEB5 46 <1> inc si 10309 0000BEB6 EB10 <1> jmp @F 10310 <1> 10311 <1> .highlight_reset: 10312 0000BEB8 50 <1> push ax 10313 0000BEB9 51 <1> push cx 10314 0000BEBA B403 <1> mov ah, 3 10315 0000BEBC B700 <1> mov bh, 0 10316 0000BEBE 31D2 <1> xor dx, dx ; pre-initialise to zero 10317 0000BEC0 CD10 <1> int 10h ; dl = column, dh = row 10318 0000BEC2 84D2 <1> test dl, dl 10319 0000BEC4 59 <1> pop cx 10320 0000BEC5 58 <1> pop ax 10321 0000BEC6 748A <1> jz .nohighlight 10322 <1> ; Refer to above comment. 10323 <1> @@: 10324 0000BEC8 800E[A600]02 <1> setopt [internalflags3], dif3_int10_highlight 10325 0000BECD FECA <1> dec dl 10326 0000BECF B402 <1> mov ah, 02h 10327 0000BED1 B700 <1> mov bh, 0 10328 0000BED3 CD10 <1> int 10h ; set cursor position 10329 0000BED5 B408 <1> mov ah, 08h 10330 0000BED7 B700 <1> mov bh, 0 10331 0000BED9 CD10 <1> int 10h ; read attribute to ah 10332 0000BEDB 50 <1> push ax 10333 0000BEDC FEC2 <1> inc dl 10334 0000BEDE B402 <1> mov ah, 02h 10335 0000BEE0 B700 <1> mov bh, 0 10336 0000BEE2 CD10 <1> int 10h ; set cursor position 10337 0000BEE4 58 <1> pop ax 10338 0000BEE5 88E0 <1> mov al, ah 10339 0000BEE7 257788 <1> and ax, 8877h 10340 0000BEEA D0C0 <1> rol al, 1 10341 0000BEEC D0C0 <1> rol al, 1 10342 0000BEEE D0C0 <1> rol al, 1 10343 0000BEF0 D0C0 <1> rol al, 1 10344 0000BEF2 08E0 <1> or al, ah 10345 0000BEF4 A2[AA98] <1> mov byte [.attribute], al 10346 <1> 10347 0000BEF7 49 <1> dec cx 10348 0000BEF8 49 <1> dec cx 10349 0000BEF9 46 <1> inc si 10350 0000BEFA 46 <1> inc si 10351 0000BEFB E971FF <1> jmp .next 10352 <1> 10353 <1> 10354 <1> usesection lDEBUG_DATA_ENTRY 10355 000098AA 00 <1> .attribute: db 0 10356 <1> usesection lDEBUG_CODE 10357 <1> 10358 <1> 10359 <1> ; INP: es:dx -> message to display 10360 <1> ; cx = length of message 10361 <1> ; STT: ds = ss = debugger data selector 10362 <1> ; CHG: ax, bx, cx, dx 10363 <1> puts_silence: 10364 0000BEFE 56 <1> push si 10365 0000BEFF 57 <1> push di 10366 <1> 10367 <1> .try_again: 10368 0000BF00 89D6 <1> mov si, dx ; es:si -> message 10369 0000BF02 8B3E[020A] <1> mov di, word [auxbuff_behind_last_silent] 10370 <1> ; (auxbuff):di -> next buffer (if it fits) 10371 0000BF06 B80F20 <1> mov ax, _AUXBUFFSIZE - 1 10372 0000BF09 29F8 <1> sub ax, di ; number of bytes left free 10373 <1> ; (+ 1 byte terminator) 10374 0000BF0B 7204 <1> jc .delete 10375 0000BF0D 39C8 <1> cmp ax, cx ; fits ? 10376 0000BF0F 730B <1> jae .simple ; yes --> 10377 <1> 10378 <1> .delete: 10379 0000BF11 06 <1> push es 10380 0000BF12 8E06[FA09] <1> mov es, word [auxbuff_segorsel] 10381 0000BF16 E81600 <1> call silence_delete_one_string 10382 0000BF19 07 <1> pop es 10383 0000BF1A EBE4 <1> jmp .try_again 10384 <1> 10385 <1> .simple: 10386 0000BF1C 1E <1> push ds 10387 0000BF1D 06 <1> push es 10388 0000BF1E 06 <1> push es 10389 0000BF1F 8E06[FA09] <1> mov es, word [auxbuff_segorsel] 10390 <1> ; es:di -> next buffer 10391 0000BF23 1F <1> pop ds ; ds:si -> message 10392 0000BF24 F3A4 <1> rep movsb ; copy over 10393 0000BF26 07 <1> pop es 10394 0000BF27 1F <1> pop ds 10395 0000BF28 893E[020A] <1> mov word [auxbuff_behind_last_silent], di 10396 <1> ; update pointer 10397 0000BF2C 5F <1> pop di 10398 0000BF2D 5E <1> pop si 10399 0000BF2E C3 <1> retn 10400 <1> 10401 <1> 10402 <1> ; INP: es => auxbuff 10403 <1> ; ds = ss 10404 <1> ; [auxbuff_behind_last_silent] -> behind last silent 10405 <1> ; [auxbuff_behind_while_condition] 10406 <1> ; OUT: [auxbuff_behind_last_silent] updated 10407 <1> ; auxbuff updated (deleted one of the dump strings, 10408 <1> ; moved forwards in the buffer the remainder) 10409 <1> ; if error, aborts command by jumping to cmd3 10410 <1> ; CHG: ax, di, si 10411 <1> silence_delete_one_string: 10412 0000BF2F E81400 <1> call .internal ; call internal implementation 10413 0000BF32 733E <1> jnc .retn ; no error ? --> 10414 <1> .error: ; else: error, abort command 10415 0000BF34 16 <1> push ss 10416 0000BF35 1F <1> pop ds 10417 0000BF36 16 <1> push ss 10418 0000BF37 07 <1> pop es 10419 0000BF38 8026[9F00]DF <1> clropt [internalflags], tt_silence 10420 0000BF3D BA[756A] <1> mov dx, msg.silent_error 10421 0000BF40 E8F000 <1> call putsz 10422 0000BF43 E9BA40 <1> jmp cmd3 10423 <1> 10424 <1> 10425 <1> ; INP: as for silence_delete_one_string 10426 <1> ; OUT: as for silence_delete_one_string, but: 10427 <1> ; CY if error (no more space) 10428 <1> ; NC if success 10429 <1> ; CHG: ax, di, si 10430 <1> ; STT: ds = ss 10431 <1> .internal: 10432 0000BF46 51 <1> push cx 10433 0000BF47 8B0E[020A] <1> mov cx, [auxbuff_behind_last_silent] 10434 <1> ; -> next buffer position 10435 0000BF4B 8B3E[000A] <1> mov di, word [auxbuff_behind_while_condition] 10436 0000BF4F 29F9 <1> sub cx, di 10437 0000BF51 B000 <1> mov al, 0 10438 0000BF53 3C01 <1> cmp al, 1 ; initialise to NZ (if cx is zero) 10439 0000BF55 F2AE <1> repne scasb 10440 0000BF57 F9 <1> stc 10441 0000BF58 7518 <1> jne .retn ; error, no NUL found in data (CY) 10442 <1> ; es:di -> behind first NUL 10443 <1> 10444 0000BF5A 89FE <1> mov si, di ; es:si -> next message 10445 0000BF5C 8B3E[000A] <1> mov di, word [auxbuff_behind_while_condition] 10446 0000BF60 8B0E[020A] <1> mov cx, word [auxbuff_behind_last_silent] 10447 0000BF64 06 <1> push es 10448 0000BF65 1F <1> pop ds ; ds:si -> next message 10449 0000BF66 29F1 <1> sub cx, si ; remaining buffer 10450 0000BF68 F3A4 <1> rep movsb ; move to start of silent buffer 10451 0000BF6A 16 <1> push ss 10452 0000BF6B 1F <1> pop ds 10453 0000BF6C 893E[020A] <1> mov word [auxbuff_behind_last_silent], di 10454 0000BF70 59 <1> pop cx 10455 0000BF71 F8 <1> clc ; (NC) 10456 <1> .retn: 10457 0000BF72 C3 <1> retn 10458 <1> 10459 <1> 10460 <1> ; After having used puts_silence, this dumps all data 10461 <1> ; remaining in the silent buffer in auxbuff. 10462 <1> ; If word [tt_silent_mode_number] is set, only that many 10463 <1> ; data strings (zero-terminated) are dumped, from the end 10464 <1> ; of the buffer. 10465 <1> ; 10466 <1> ; CHG: ax, bx, cx, dx, si, di, es 10467 <1> ; STT: ds = ss = debugger data selector 10468 <1> ; sets es to ss 10469 <1> silence_dump: 10470 0000BF73 F606[9F00]10 <1> testopt [internalflags], tt_silent_mode ; is in use ? 10471 0000BF78 7501 <1> jnz @F ; yes --> 10472 0000BF7A C3 <1> retn ; no. simple 10473 <1> 10474 <1> @@: 10475 0000BF7B 8026[9F00]DF <1> clropt [internalflags], tt_silence 10476 0000BF80 800E[A300]10 <1> setopt [internalflags2], dif2_in_silence_dump 10477 <1> 10478 0000BF85 F606[8500]01 <1> testopt [options3], opt3_silence_paging_set 10479 0000BF8A 7413 <1> jz @F 10480 0000BF8C F606[8500]02 <1> testopt [options3], opt3_silence_paging_on 10481 0000BF91 7407 <1> jz .turn_paging_off 10482 <1> 10483 <1> .turn_paging_on: 10484 0000BF93 800E[9C00]08 <1> setopt [internalflags], pagedcommand 10485 0000BF98 EB05 <1> jmp @F 10486 <1> 10487 <1> .turn_paging_off: 10488 0000BF9A 8026[9C00]F7 <1> clropt [internalflags], pagedcommand 10489 <1> @@: 10490 <1> 10491 0000BF9F 8B16[040A] <1> mov dx, word [tt_silent_mode_number] 10492 0000BFA3 85D2 <1> test dx, dx 10493 0000BFA5 7428 <1> jz .no_number_given 10494 <1> 10495 0000BFA7 8E06[FA09] <1> mov es, word [auxbuff_segorsel] 10496 0000BFAB 8B3E[000A] <1> mov di, word [auxbuff_behind_while_condition] 10497 0000BFAF 8B0E[020A] <1> mov cx, word [auxbuff_behind_last_silent] 10498 0000BFB3 29F9 <1> sub cx, di 10499 0000BFB5 7418 <1> jz .no_number_given 10500 <1> 10501 0000BFB7 31DB <1> xor bx, bx ; counter of zeros 10502 <1> @@: 10503 0000BFB9 B000 <1> mov al, 0 10504 0000BFBB E307 <1> jcxz @F ; no more data --> 10505 0000BFBD F2AE <1> repne scasb ; another zero ? 10506 0000BFBF 7503 <1> jne @F ; no, done --> 10507 0000BFC1 43 <1> inc bx ; count zeros 10508 0000BFC2 EBF5 <1> jmp @B ; search for next --> 10509 <1> 10510 <1> @@: 10511 0000BFC4 29D3 <1> sub bx, dx ; number of dumps - requested number 10512 <1> ; = excess number of dumps 10513 0000BFC6 7607 <1> jbe .no_number_given 10514 <1> 10515 0000BFC8 89D9 <1> mov cx, bx ; use excess number as loop counter 10516 <1> @@: 10517 0000BFCA E862FF <1> call silence_delete_one_string 10518 <1> ; delete one string 10519 0000BFCD E2FB <1> loop @B ; loop for however many to delete --> 10520 <1> 10521 <1> .no_number_given: 10522 0000BFCF 8B3E[000A] <1> mov di, word [auxbuff_behind_while_condition] 10523 <1> ; es:di -> silent buffer 10524 <1> .loop_line: 10525 0000BFD3 8E06[FA09] <1> mov es, word [auxbuff_segorsel] 10526 0000BFD7 8B0E[020A] <1> mov cx, word [auxbuff_behind_last_silent] 10527 0000BFDB 29F9 <1> sub cx, di ; any more data ? 10528 0000BFDD 7439 <1> jz .return ; no, return --> 10529 0000BFDF B000 <1> mov al, 0 10530 0000BFE1 49 <1> dec cx ; (in case of branching for next conditional) 10531 0000BFE2 AE <1> scasb ; starts with a NUL byte ? 10532 0000BFE3 7402 <1> je @F ; yes, skipped --> 10533 0000BFE5 41 <1> inc cx ; (restore cx to original value) 10534 0000BFE6 4F <1> dec di ; no, decrement 10535 <1> @@: 10536 0000BFE7 89FE <1> mov si, di ; es:si -> start of string 10537 <1> 10538 0000BFE9 81F90001 <1> cmp cx, 256 ; cx > 256 ? 10539 0000BFED 7603 <1> jbe @F ; no --> 10540 0000BFEF B90001 <1> mov cx, 256 ; limit to 256 bytes per string 10541 <1> ; (line_out is 264 bytes) 10542 <1> @@: 10543 0000BFF2 E324 <1> jcxz .return ; (if single byte that was NUL remaining -->) 10544 0000BFF4 89CB <1> mov bx, cx ; search string length 10545 0000BFF6 B000 <1> mov al, 0 10546 0000BFF8 F2AE <1> repne scasb ; scan for NUL bytes 10547 0000BFFA 7501 <1> jne @F ; (if none found: cx = 0) 10548 <1> ; (if any found: cx = remaining length) 10549 0000BFFC 41 <1> inc cx ; cx = remaining length + 1 (do not output NUL) 10550 <1> @@: 10551 0000BFFD 29CB <1> sub bx, cx ; search length - remaining = found length 10552 0000BFFF 89D9 <1> mov cx, bx ; how much to show 10553 0000C001 06 <1> push es 10554 0000C002 1F <1> pop ds ; ds => auxbuff (ds:si -> start of string) 10555 0000C003 16 <1> push ss 10556 0000C004 07 <1> pop es ; es => line_out 10557 0000C005 BF[0E08] <1> mov di, line_out ; es:di -> line_out 10558 0000C008 51 <1> push cx 10559 0000C009 F3A4 <1> rep movsb ; copy over to line_out 10560 0000C00B 59 <1> pop cx ; cx = message length 10561 <1> 10562 0000C00C 16 <1> push ss 10563 0000C00D 1F <1> pop ds ; reset seg regs to ss 10564 0000C00E BA[0E08] <1> mov dx, line_out ; dx -> message, cx = length 10565 0000C011 56 <1> push si 10566 0000C012 E8AAFC <1> call puts ; print out 10567 0000C015 5F <1> pop di ; -> next silent message 10568 0000C016 EBBB <1> jmp .loop_line 10569 <1> 10570 <1> .return: 10571 0000C018 16 <1> push ss 10572 0000C019 07 <1> pop es 10573 0000C01A FF36[000A] <1> push word [auxbuff_behind_while_condition] 10574 0000C01E 8F06[020A] <1> pop word [auxbuff_behind_last_silent] 10575 <1> reset_silent_mode: 10576 0000C022 8026[9F00]CF <1> clropt [internalflags], tt_silent_mode | tt_silence 10577 0000C027 8026[A300]EF <1> clropt [internalflags2], dif2_in_silence_dump 10578 0000C02C C3 <1> retn 10579 <1> 10580 <1> 10581 <1> putsz_error: 10582 0000C02D 36800E[A500]20 <1> setopt [ss:internalflags3], dif3_unquiet_error 10583 <1> 10584 <1> ; Display ASCIZ message 10585 <1> ; 10586 <1> ; INP: ds:dx -> ASCIZ message to display 10587 <1> ; CHG: - 10588 <1> ; STT: ds, es don't care 10589 <1> putsz: 10590 0000C033 50 <1> push ax 10591 0000C034 53 <1> push bx 10592 0000C035 51 <1> push cx 10593 0000C036 52 <1> push dx 10594 0000C037 06 <1> push es 10595 0000C038 1E <1> push ds 10596 0000C039 1E <1> push ds 10597 0000C03A 07 <1> pop es 10598 0000C03B 57 <1> push di 10599 0000C03C 89D7 <1> mov di, dx ; es:di-> string 10600 0000C03E 30C0 <1> xor al, al 10601 0000C040 B9FFFF <1> mov cx, -1 10602 0000C043 F2AE <1> repne scasb ; search zero 10603 0000C045 F7D9 <1> neg cx 10604 0000C047 49 <1> dec cx 10605 0000C048 49 <1> dec cx ; cx = length of message 10606 0000C049 5F <1> pop di 10607 0000C04A 16 <1> push ss 10608 0000C04B 1F <1> pop ds ; ds = ss 10609 0000C04C E870FC <1> call puts 10610 0000C04F 1F <1> pop ds 10611 0000C050 07 <1> pop es 10612 0000C051 5A <1> pop dx 10613 0000C052 59 <1> pop cx 10614 0000C053 5B <1> pop bx 10615 0000C054 58 <1> pop ax 10616 0000C055 C3 <1> retn 10617 <1> 10618 <1> ; Display character 10619 <1> ; 10620 <1> ; INP: al = character to display 10621 <1> ; CHG: - 10622 <1> ; STT: ds, es don't care 10623 <1> putc: 10624 0000C056 53 <1> push bx 10625 0000C057 51 <1> push cx 10626 0000C058 52 <1> push dx 10627 0000C059 06 <1> push es 10628 0000C05A 1E <1> push ds 10629 0000C05B 16 <1> push ss 10630 0000C05C 07 <1> pop es ; es:dx -> message 10631 0000C05D 16 <1> push ss 10632 0000C05E 1F <1> pop ds ; ds = ss 10633 0000C05F 50 <1> push ax 10634 0000C060 B90100 <1> mov cx, 1 ; one character 10635 0000C063 89E2 <1> mov dx, sp ; ds:dx-> ax on stack 10636 0000C065 E857FC <1> call puts 10637 0000C068 58 <1> pop ax 10638 0000C069 1F <1> pop ds 10639 0000C06A 07 <1> pop es 10640 0000C06B 5A <1> pop dx 10641 0000C06C 59 <1> pop cx 10642 0000C06D 5B <1> pop bx 10643 0000C06E C3 <1> retn 10644 <1> 10645 <1> 10646 <1> ; OUT: ax = 0 if no input available 10647 <1> ; ax = 0FFFFh if DOS stdin input available 10648 <1> ; ah = scancode, al = ASCII if int 16h input available 10649 <1> ; ax = al = ASCII if serial input available 10650 <1> ; REM: This is always a nondestructive read. 10651 <1> peekc: 10652 0000C06F F606[7D00]40 <1> testopt [options], enable_serial 10653 0000C074 750C <1> jnz .serial 10654 0000C076 E8A0E8 <1> call InDos 10655 0000C079 740E <1> jz .dos 10656 <1> .bios: 10657 0000C07B B401 <1> mov ah, 01h 10658 0000C07D CD16 <1> int 16h ; key available ? 10659 <1> @@: 10660 0000C07F 7413 <1> jz .return_ax_0 10661 0000C081 C3 <1> retn 10662 <1> 10663 <1> .serial: 10664 0000C082 E8C110 <1> call serial_check_receive_char 10665 <1> ; do serial getc (check rx buffer) 10666 0000C085 B400 <1> mov ah, 0 10667 0000C087 EBF6 <1> jmp @B 10668 <1> 10669 <1> .dos: 10670 0000C089 B40B <1> mov ah, 0Bh 10671 <1> doscall 2160 0000C08B E8E49E <2> call _doscall 10672 0000C08E B4FF <1> mov ah, -1 10673 0000C090 84C0 <1> test al, al 10674 0000C092 EBEB <1> jmp @B 10675 <1> 10676 <1> .return_ax_0: 10677 0000C094 B80000 <1> mov ax, 0 10678 <1> .return: 10679 0000C097 C3 <1> retn 10680 <1> 10681 <1> 10682 <1> ; Get character/key 10683 <1> ; 10684 <1> ; OUT: al = character (if zero, look for ah) 10685 <1> ; ah = scan code or zero 10686 <1> ; CHG: ax 10687 <1> ; STT: ds = ss = debugger segment/selector 10688 <1> ; 10689 <1> ; Idles system when in InDOS mode. When not in InDOS mode, Int21.08 10690 <1> ; is used which is assumed to idle the system itself. 10691 <1> getc: 10692 0000C098 F606[A400]20 <1> testopt [internalflags3], dif3_input_serial_override 10693 0000C09D 750C <1> jnz @F 10694 0000C09F F606[7D00]40 <1> testopt [options], enable_serial 10695 0000C0A4 7505 <1> jnz @F 10696 0000C0A6 E870E8 <1> call InDos 10697 0000C0A9 7440 <1> jz getc_dos 10698 <1> @@: 10699 <1> .rawnext: 10700 0000C0AB FF16[100C] <1> call near word [getline_timer_func] 10701 <1> 10702 0000C0AF F606[A400]20 <1> testopt [internalflags3], dif3_input_serial_override 10703 0000C0B4 7523 <1> jnz @F 10704 0000C0B6 F606[A700]01 <1> testopt [internalflags3], dif3_input_re 10705 0000C0BB 751C <1> jnz @F 10706 <1> %if _INPUT_FILE_BOOT 10707 0000C0BD F606[A300]02 <1> testopt [internalflags2], dif2_input_file_boot 10708 0000C0C2 7515 <1> jnz @F 10709 <1> %endif 10710 0000C0C4 F606[A500]01 <1> testopt [internalflags3], dif3_input_cmdline 10711 0000C0C9 750E <1> jnz @F 10712 0000C0CB F606[7D00]40 <1> testopt [options], enable_serial 10713 0000C0D0 7507 <1> jnz @F 10714 0000C0D2 F606[7D00]04 <1> testopt [options], biosidles 10715 <1> ; idling disabled? 10716 0000C0D7 750D <1> jnz .rawkey ; yes, just request a key --> 10717 <1> 10718 <1> @@: 10719 0000C0D9 E8A801 <1> call getc_if_any ; got a key ? 10720 0000C0DC 750C <1> jnz .return ; yes --> 10721 <1> .idle: ; common idling for BIOS keyboard and serial 10722 0000C0DE E89180 <1> call handle_serial_flags_ctrl_c 10723 0000C0E1 E87A02 <1> call idle 10724 0000C0E4 EBC5 <1> jmp .rawnext ; check again --> 10725 <1> 10726 <1> .rawkey: 10727 0000C0E6 31C0 <1> xor ax, ax 10728 0000C0E8 CD16 <1> int 16h ; get the key and scancode 10729 <1> .return: 10730 0000C0EA C3 <1> retn 10731 <1> 10732 <1> 10733 <1> getc_dos: 10734 <1> %if _PM 10735 0000C0EB E8E7D2 <1> call ispm 10736 0000C0EE 7507 <1> jnz @F ; if 86 Mode --> 10737 0000C0F0 F606[8100]40 <1> testopt [options2], opt2_getc_idle_dpmi 10738 0000C0F5 7507 <1> jnz @FF 10739 <1> @@: 10740 <1> %endif 10741 0000C0F7 F606[8100]20 <1> testopt [options2], opt2_getc_idle 10742 0000C0FC 7410 <1> jz getc_dos_internal 10743 <1> @@: 10744 <1> .with_idle: 10745 0000C0FE E88301 <1> call getc_if_any 10746 0000C101 7403E9B500 <1> jnz .return 10747 0000C106 E86980 <1> call handle_serial_flags_ctrl_c 10748 0000C109 E85202 <1> call idle 10749 0000C10C EBF0 <1> jmp .with_idle 10750 <1> 10751 <1> .return equ getc_dos_internal_get_extended.return 10752 <1> 10753 <1> 10754 <1> getc_dos_internal: ; DOS character devices handle one-byte characters. Therefore 10755 <1> ; non-ASCII keys cannot be returned with scancode in the high 10756 <1> ; byte of the same call. A non-ASCII key will be split into 10757 <1> ; two characters by CON: one NUL byte followed by the scancode. 10758 0000C10E F606[A700]01 <1> testopt [internalflags3], dif3_input_re 10759 0000C113 741B <1> jz @F 10760 0000C115 56 <1> push si 10761 0000C116 8B36[E409] <1> mov si, word [re_buffer.position] 10762 0000C11A 31C0 <1> xor ax, ax 10763 0000C11C AC <1> lodsb 10764 0000C11D 84C0 <1> test al, al 10765 0000C11F 8936[E409] <1> mov word [re_buffer.position], si 10766 0000C123 5E <1> pop si 10767 0000C124 7403E99200 <1> jnz .return 10768 0000C129 FF0E[E409] <1> dec word [re_buffer.position] 10769 0000C12D E98B00 <1> jmp .return 10770 <1> 10771 <1> .return equ getc_dos_internal_get_extended.return 10772 <1> 10773 <1> 10774 <1> @@: 10775 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 10776 <1> %if _INPUT_FILE_BOOT 10777 0000C130 F606[A300]02 <1> testopt [internalflags2], dif2_input_file_boot 10778 0000C135 750E <1> jnz .file 10779 <1> %endif 10780 <1> %if _INPUT_FILE_HANDLES 10781 0000C137 E8DFE7 <1> call InDos 10782 0000C13A 7546 <1> jnz .file_not 10783 0000C13C F606[A200]10 <1> testopt [internalflags2], dif2_input_file 10784 0000C141 7502 <1> jnz .file 10785 <1> %endif 10786 0000C143 EB3D <1> jmp .file_not 10787 <1> 10788 <1> .file: 10789 0000C145 52 <1> push dx 10790 0000C146 51 <1> push cx 10791 0000C147 53 <1> push bx 10792 0000C148 57 <1> push di 10793 0000C149 31C0 <1> xor ax, ax ; initialise ah to zero 10794 0000C14B 50 <1> push ax 10795 0000C14C 89E2 <1> mov dx, sp ; ds:dx -> al byte on stack 10796 0000C14E B90100 <1> mov cx, 1 10797 <1> %if _INPUT_FILE_BOOT 10798 <1> %if _INPUT_FILE_HANDLES 10799 0000C151 F606[A300]02 <1> testopt [internalflags2], dif2_input_file_boot 10800 0000C156 7408 <1> jz @F 10801 <1> %endif 10802 0000C158 E8960E <1> call yy_boot_remember_seek 10803 0000C15B E810BF <1> call yy_boot_read 10804 <1> %if _INPUT_FILE_HANDLES 10805 0000C15E EB0B <1> jmp @FF 10806 <1> @@: 10807 <1> %endif 10808 <1> %endif 10809 <1> %if _INPUT_FILE_HANDLES 10810 0000C160 B43F <1> mov ah, 3Fh 10811 0000C162 E81001 <1> call yy_get_handle 10812 0000C165 E8520E <1> call yy_remember_seek 10813 <1> doscall ; (depends on ds = ss) 2160 0000C168 E8079E <2> call _doscall 10814 <1> %endif 10815 <1> @@: 10816 0000C16B 7204 <1> jc @F 10817 0000C16D 85C0 <1> test ax, ax 10818 0000C16F 750B <1> jnz .file_got 10819 <1> 10820 <1> @@: 10821 0000C171 E85100 <1> call yy_close_file 10822 0000C174 58 <1> pop ax 10823 0000C175 5F <1> pop di 10824 0000C176 5B <1> pop bx 10825 0000C177 59 <1> pop cx 10826 0000C178 5A <1> pop dx 10827 0000C179 E91CFF <1> jmp getc 10828 <1> 10829 <1> 10830 <1> .file_got: 10831 0000C17C 58 <1> pop ax ; ah = 0, al = character read 10832 0000C17D 5F <1> pop di 10833 0000C17E 5B <1> pop bx 10834 0000C17F 59 <1> pop cx 10835 0000C180 5A <1> pop dx 10836 0000C181 C3 <1> retn 10837 <1> 10838 <1> .file_not: 10839 <1> %endif 10840 0000C182 F606[A500]01 <1> testopt [internalflags3], dif3_input_cmdline 10841 0000C187 7419 <1> jz @F 10842 0000C189 56 <1> push si 10843 0000C18A 8B36[E001] <1> mov si, word [cmdline_buffer.position] 10844 0000C18E 31C0 <1> xor ax, ax 10845 0000C190 AC <1> lodsb 10846 0000C191 84C0 <1> test al, al 10847 0000C193 8936[E001] <1> mov word [cmdline_buffer.position], si 10848 0000C197 5E <1> pop si 10849 0000C198 7521 <1> jnz .return 10850 0000C19A 8026[A500]FE <1> clropt [internalflags3], dif3_input_cmdline 10851 0000C19F E9F6FE <1> jmp getc 10852 <1> 10853 <1> @@: 10854 0000C1A2 B408 <1> mov ah, 8 10855 <1> doscall ; wait for a key 2160 0000C1A4 E8CB9D <2> call _doscall 10856 <1> 10857 <1> getc_dos_internal_get_extended: 10858 <1> ; FreeDOS kernel 2036 returns with ax=4C00h upon Control C. 10859 <1> ; This is due to setting ax internally to terminate the 10860 <1> ; process, paired with the termination service just 10861 <1> ; returning for self-owned processes. This was eventually 10862 <1> ; fixed in https://sourceforge.net/p/freedos/svn/1469/ 10863 <1> ; This is a work around to restart our command line then. 10864 <1> ; Usually ah stays 08h when this call returns. 10865 <1> ; (06h if calling from getc_if_any to here.) 10866 0000C1A7 80FC4C <1> cmp ah, 4Ch 10867 0000C1AA 7410 <1> je .freedos_ctrlc_workaround 10868 0000C1AC B400 <1> mov ah, 0 ; assume it is ASCII 10869 0000C1AE 08C0 <1> or al, al 10870 0000C1B0 7509 <1> jne .return ; ASCII, return with ah zero --> 10871 0000C1B2 B408 <1> mov ah, 8 10872 <1> doscall ; scancode of non-ASCII key to al 2160 0000C1B4 E8BB9D <2> call _doscall 10873 0000C1B7 86C4 <1> xchg al, ah ; to ah 10874 0000C1B9 B000 <1> mov al, 0 ; return zero for non-ASCII key 10875 <1> .return: 10876 0000C1BB C3 <1> retn 10877 <1> 10878 <1> .freedos_ctrlc_workaround: 10879 0000C1BC BA[C85D] <1> mov dx, msg.freedos_ctrlc_workaround 10880 0000C1BF E871FE <1> call putsz 10881 0000C1C2 E938FC <1> jmp puts.ctrlc ; use common handler 10882 <1> 10883 <1> 10884 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT || 1 10885 <1> ; INP: [input_file_handles], dif2_input_file 10886 <1> ; OUT: most recent file closed, flag cleared if no longer file 10887 <1> ; CHG: di, bx, ax 10888 <1> yy_close_file: 10889 0000C1C5 F606[A700]01 <1> testopt [internalflags3], dif3_input_re 10890 0000C1CA 740B <1> jz @F 10891 0000C1CC 8026[A700]FE <1> clropt [internalflags3], dif3_input_re 10892 0000C1D1 800E[A700]02 <1> setopt [internalflags3], dif3_input_re_closed 10893 0000C1D6 C3 <1> retn 10894 <1> 10895 <1> @@: 10896 <1> %if _INPUT_FILE_BOOT 10897 0000C1D7 F606[A300]02 <1> testopt [internalflags2], dif2_input_file_boot 10898 0000C1DC 7406 <1> jz @F 10899 0000C1DE E8F50D <1> call yy_boot_clear_remember_seek 10900 0000C1E1 E941BE <1> jmp yy_boot_close_file 10901 <1> 10902 <1> @@: 10903 <1> %endif 10904 <1> %if _INPUT_FILE_HANDLES 10905 0000C1E4 F606[A200]10 <1> testopt [internalflags2], dif2_input_file 10906 0000C1E9 7455 <1> jz .notfile 10907 0000C1EB 8B3E[880A] <1> mov di, word [input_file_handles.active] 10908 0000C1EF 57 <1> push di 10909 0000C1F0 D1E7 <1> shl di, 1 10910 0000C1F2 D1E7 <1> shl di, 1 10911 0000C1F4 D1E7 <1> shl di, 1 10912 <1> %if INPUTFILEHANDLE_size != 8 10913 <1> %error Unexpected structure size 10914 <1> %endif 10915 0000C1F6 8B9D[080A] <1> mov bx, word [input_file_handles + di + ifhHandle] 10916 0000C1FA E8A10D <1> call yy_clear_remember_seek 10917 <1> 10918 0000C1FD F685[0B0A]01 <1> testopt [input_file_handles + di + ifhFlags], ifhfIsDup 10919 0000C202 7416 <1> jz @F 10920 <1> 10921 0000C204 51 <1> push cx 10922 0000C205 52 <1> push dx 10923 <1> 10924 0000C206 8B9D[000A] <1> mov bx, word [input_file_handles + di - INPUTFILEHANDLE_size + ifhHandle] 10925 0000C20A 8B95[0C0A] <1> mov dx, word [input_file_handles + di + ifhParentSeek] 10926 0000C20E 8B8D[0E0A] <1> mov cx, word [input_file_handles + di + ifhParentSeek + 2] 10927 0000C212 B80042 <1> mov ax, 4200h ; seek from start 10928 0000C215 E8100D <1> call handle_seek_or_remember 10929 <1> 10930 0000C218 5A <1> pop dx 10931 0000C219 59 <1> pop cx 10932 <1> 10933 <1> @@: 10934 <1> 10935 0000C21A E8FCE6 <1> call InDos 10936 0000C21D 7406 <1> jz .closefile 10937 <1> 10938 0000C21F FF06[8A0A] <1> inc word [input_file_handles.to_close] 10939 0000C223 EB06 <1> jmp @F 10940 <1> 10941 <1> .closefile: 10942 0000C225 B80100 <1> mov ax, 1 10943 0000C228 E82C00 <1> call yy_close_file_handles 10944 <1> 10945 <1> @@: 10946 0000C22B 5F <1> pop di 10947 0000C22C 4F <1> dec di 10948 0000C22D 790C <1> jns .next 10949 0000C22F 8026[A200]EF <1> clropt [internalflags2], dif2_input_file 10950 0000C234 800E[A200]20 <1> setopt [internalflags2], dif2_closed_input_file 10951 0000C239 EB04 <1> jmp .done 10952 <1> .next: 10953 0000C23B 893E[880A] <1> mov word [input_file_handles.active], di 10954 <1> .done: 10955 0000C23F C3 <1> retn 10956 <1> 10957 <1> .notfile: 10958 0000C240 F606[A500]01 <1> testopt [internalflags3], dif3_input_cmdline 10959 0000C245 740B <1> jz @F 10960 0000C247 8026[A500]FE <1> clropt [internalflags3], dif3_input_cmdline 10961 0000C24C 800E[A500]02 <1> setopt [internalflags3], dif3_input_cmdline_closed 10962 0000C251 C3 <1> retn 10963 <1> 10964 <1> @@: 10965 0000C252 31F6 <1> xor si, si 10966 0000C254 E9F3E4 <1> jmp error 10967 <1> 10968 <1> 10969 <1> ; INP: word [input_file_handles.to_close] = how many 10970 <1> ; ax = additionally how many (0 or 1) 10971 <1> ; input_file_handles + di -> first to close 10972 <1> ; OUT: word [input_file_handles.to_close] = 0 10973 <1> ; closed handle fields = -1 10974 <1> ; CHG: ax, bx, di 10975 <1> ; STT: DOS must be accessible 10976 <1> yy_close_file_handles: 10977 0000C257 51 <1> push cx 10978 0000C258 31C9 <1> xor cx, cx 10979 0000C25A 870E[8A0A] <1> xchg cx, word [input_file_handles.to_close] 10980 0000C25E 01C1 <1> add cx, ax 10981 0000C260 7411 <1> jz @FF 10982 <1> @@: 10983 0000C262 BBFFFF <1> mov bx, -1 10984 0000C265 879D[080A] <1> xchg bx, word [input_file_handles + di + ifhHandle] 10985 0000C269 B43E <1> mov ah, 3Eh 10986 <1> doscall 2160 0000C26B E8049D <2> call _doscall 10987 0000C26E 83C708 <1> add di, INPUTFILEHANDLE_size 10988 0000C271 E2EF <1> loop @B 10989 <1> @@: 10990 0000C273 59 <1> pop cx 10991 0000C274 C3 <1> retn 10992 <1> 10993 <1> 10994 <1> ; INP: - 10995 <1> ; OUT: di = active handle offset 10996 <1> ; bx = active handle 10997 <1> ; CHG: - 10998 <1> yy_get_handle: 10999 0000C275 8B3E[880A] <1> mov di, word [input_file_handles.active] 11000 0000C279 D1E7 <1> shl di, 1 11001 0000C27B D1E7 <1> shl di, 1 11002 0000C27D D1E7 <1> shl di, 1 11003 <1> %if INPUTFILEHANDLE_size != 8 11004 <1> %error Unexpected structure size 11005 <1> %endif 11006 0000C27F 8B9D[080A] <1> mov bx, word [input_file_handles + di + ifhHandle] 11007 <1> %endif 11008 0000C283 C3 <1> retn 11009 <1> %endif 11010 <1> 11011 <1> 11012 <1> ; INP: - 11013 <1> ; OUT: NZ if received any, 11014 <1> ; al = character 11015 <1> ; ah = scan code or zero 11016 <1> ; ZR if none received 11017 <1> ; CHG: ax 11018 <1> ; STT: ds = ss = debugger segment/selector 11019 <1> getc_if_any: 11020 0000C284 F606[A400]20 <1> testopt [internalflags3], dif3_input_serial_override 11021 0000C289 755B <1> jnz .serial 11022 0000C28B F606[A400]10 <1> testopt [internalflags3], dif3_input_terminal_override 11023 0000C290 754D <1> jnz .terminal 11024 <1> 11025 0000C292 F606[A700]01 <1> testopt [internalflags3], dif3_input_re 11026 0000C297 741D <1> jz @F 11027 0000C299 56 <1> push si 11028 0000C29A 8B36[E409] <1> mov si, word [re_buffer.position] 11029 0000C29E 31C0 <1> xor ax, ax 11030 0000C2A0 AC <1> lodsb 11031 0000C2A1 84C0 <1> test al, al 11032 0000C2A3 8936[E409] <1> mov word [re_buffer.position], si 11033 0000C2A7 5E <1> pop si 11034 0000C2A8 7403E9B000 <1> jnz .return 11035 0000C2AD FF0E[E409] <1> dec word [re_buffer.position] 11036 0000C2B1 38C0 <1> cmp al, al ; ZR 11037 0000C2B3 E9A700 <1> jmp .return 11038 <1> 11039 <1> @@: 11040 <1> %if _INPUT_FILE_BOOT 11041 0000C2B6 F606[A300]02 <1> testopt [internalflags2], dif2_input_file_boot 11042 0000C2BB 7552 <1> jnz .file 11043 <1> %endif 11044 <1> 11045 0000C2BD F606[A500]01 <1> testopt [internalflags3], dif3_input_cmdline 11046 0000C2C2 741B <1> jz @F 11047 0000C2C4 56 <1> push si 11048 0000C2C5 8B36[E001] <1> mov si, word [cmdline_buffer.position] 11049 0000C2C9 31C0 <1> xor ax, ax 11050 0000C2CB AC <1> lodsb 11051 0000C2CC 84C0 <1> test al, al 11052 0000C2CE 8936[E001] <1> mov word [cmdline_buffer.position], si 11053 0000C2D2 5E <1> pop si 11054 0000C2D3 7403E98500 <1> jnz .return 11055 0000C2D8 8026[A500]FE <1> clropt [internalflags3], dif3_input_cmdline 11056 0000C2DD EBA5 <1> jmp getc_if_any 11057 <1> 11058 <1> @@: 11059 <1> .terminal: 11060 0000C2DF F606[7D00]40 <1> testopt [options], enable_serial 11061 0000C2E4 7408 <1> jz @F ; do BIOS keyboard or DOS getc --> 11062 <1> 11063 <1> .serial: 11064 0000C2E6 E83C0E <1> call serial_receive_char ; do serial getc (check rx buffer) 11065 0000C2E9 7472 <1> jz .return ; no data, go and idle --> 11066 0000C2EB B400 <1> mov ah, 0 11067 0000C2ED C3 <1> retn 11068 <1> 11069 <1> @@: 11070 0000C2EE E828E6 <1> call InDos 11071 0000C2F1 755C <1> jnz .bios 11072 <1> 11073 0000C2F3 F606[A400]10 <1> testopt [internalflags3], dif3_input_terminal_override 11074 0000C2F8 7547 <1> jnz .dos_terminal 11075 <1> 11076 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 11077 <1> %if _INPUT_FILE_BOOT 11078 0000C2FA F606[A300]02 <1> testopt [internalflags2], dif2_input_file_boot 11079 0000C2FF 750E <1> jnz .file 11080 <1> %endif 11081 <1> %if _INPUT_FILE_HANDLES 11082 0000C301 E815E6 <1> call InDos 11083 0000C304 753B <1> jnz .file_not 11084 0000C306 F606[A200]10 <1> testopt [internalflags2], dif2_input_file 11085 0000C30B 7502 <1> jnz .file 11086 <1> %endif 11087 0000C30D EB32 <1> jmp .file_not 11088 <1> 11089 <1> .file: 11090 0000C30F 57 <1> push di 11091 0000C310 53 <1> push bx 11092 0000C311 51 <1> push cx 11093 0000C312 52 <1> push dx 11094 0000C313 31C0 <1> xor ax, ax 11095 0000C315 50 <1> push ax 11096 <1> 11097 0000C316 89E2 <1> mov dx, sp ; ds:dx -> al byte on stack 11098 0000C318 B90100 <1> mov cx, 1 ; buffer length = 1 11099 <1> %if _INPUT_FILE_BOOT 11100 <1> %if _INPUT_FILE_HANDLES 11101 0000C31B F606[A300]02 <1> testopt [internalflags2], dif2_input_file_boot 11102 0000C320 7408 <1> jz @F 11103 <1> %endif 11104 0000C322 E8CC0C <1> call yy_boot_remember_seek 11105 0000C325 E846BD <1> call yy_boot_read 11106 0000C328 EB0B <1> jmp @FF 11107 <1> @@: 11108 <1> %endif 11109 <1> %if _INPUT_FILE_HANDLES 11110 0000C32A B43F <1> mov ah, 3Fh 11111 0000C32C E846FF <1> call yy_get_handle 11112 0000C32F E8880C <1> call yy_remember_seek 11113 <1> doscall ; DOS read file (depends on ds = ss) 2160 0000C332 E83D9C <2> call _doscall 11114 <1> %endif 11115 <1> @@: 11116 0000C335 7302 <1> jnc @F 11117 0000C337 31C0 <1> xor ax, ax 11118 <1> @@: 11119 0000C339 85C0 <1> test ax, ax 11120 0000C33B 58 <1> pop ax 11121 0000C33C 5A <1> pop dx 11122 0000C33D 59 <1> pop cx 11123 0000C33E 5B <1> pop bx 11124 0000C33F 5F <1> pop di 11125 0000C340 C3 <1> retn ; ZR if no character read 11126 <1> 11127 <1> .file_not: 11128 <1> %endif 11129 <1> .dos_terminal: 11130 <1> %if 0 11131 <1> push dx 11132 <1> mov ah, 06h 11133 <1> mov dl, -1 11134 <1> doscall 11135 <1> jz .return_dx ; none available 11136 <1> ; bugfix: the 06h call is a *destructive* read. 11137 <1> ; so do not call getc again, just handle the 11138 <1> ; possible second byte returned. 11139 <1> call getc_dos_internal_get_extended 11140 <1> pop dx 11141 <1> jmp .return_NZ 11142 <1> .return_dx: 11143 <1> pop dx 11144 <1> retn 11145 <1> %else 11146 0000C341 B40B <1> mov ah, 0Bh 11147 <1> doscall 2160 0000C343 E82C9C <2> call _doscall 11148 0000C346 84C0 <1> test al, al 11149 0000C348 7413 <1> jz .return 11150 0000C34A E8C1FD <1> call getc_dos_internal 11151 0000C34D EB0A <1> jmp .return_NZ 11152 <1> %endif 11153 <1> 11154 <1> .bios: 11155 0000C34F B401 <1> mov ah, 01h 11156 0000C351 CD16 <1> int 16h ; key available ? 11157 0000C353 7408 <1> jz .return 11158 0000C355 31C0 <1> xor ax, ax 11159 0000C357 CD16 <1> int 16h 11160 <1> .return_NZ: 11161 0000C359 50 <1> push ax 11162 0000C35A 0C01 <1> or al, 1 ; (NZ) 11163 0000C35C 58 <1> pop ax 11164 <1> .return: 11165 0000C35D C3 <1> retn 11166 <1> 11167 <1> 11168 <1> ; INP: - 11169 <1> ; OUT: - 11170 <1> ; CHG: ax 11171 <1> ; STT: ds = ss = debugger segment/selector 11172 <1> ; 11173 <1> ; Idle system, using 2F.1680 (in given mode), or 2F.1680 11174 <1> ; (calling down to 86 Mode), or sti \ hlt. 11175 <1> idle: 11176 <1> %if _BOOTLDR 11177 0000C35E F606[9D00]40 <1> testopt [internalflags], nodosloaded 11178 0000C363 7568 <1> jnz .hlt ; can't call 2F --> 11179 <1> %endif 11180 0000C365 F606[8700]02 <1> testopt [options3], opt3_no_idle_2F 11181 0000C36A 7561 <1> jnz .hlt 11182 <1> %if _GUARD_86M_INT2F 11183 <1> %if _PM 11184 0000C36C E866D0 <1> call ispm 11185 0000C36F 7416 <1> jz @FF ; --> (NZ) 11186 <1> %endif 11187 0000C371 06 <1> push es 11188 0000C372 31C0 <1> xor ax, ax 11189 0000C374 8EC0 <1> mov es, ax ; (only used in 86 Mode) 11190 0000C376 26A1BC00 <1> mov ax, [es:2Fh * 4] 11191 0000C37A 83F8FF <1> cmp ax, -1 11192 0000C37D 7405 <1> je @F ; --> (ZR) 11193 0000C37F 260B06BE00 <1> or ax, [es:2Fh * 4 + 2] 11194 <1> @@: 11195 0000C384 07 <1> pop es 11196 0000C385 7409 <1> jz @FF 11197 <1> @@: 11198 <1> %endif 11199 0000C387 B88016 <1> mov ax, 1680h 11200 0000C38A CD2F <1> int 2Fh ; release timeslice in multitasker 11201 0000C38C 84C0 <1> test al, al 11202 0000C38E 7450 <1> jz .return ; done idling --> 11203 <1> @@: 11204 <1> %if _PM 11205 0000C390 E842D0 <1> call ispm 11206 0000C393 7538 <1> jnz .hlt 11207 <1> 11208 0000C395 53 <1> push bx 11209 0000C396 51 <1> push cx 11210 0000C397 06 <1> push es 11211 0000C398 66 <1> _386_PM_o32 ; push edi 11212 0000C399 57 <1> push di 11213 0000C39A 6631FF <1> _386 xor edi, edi ; clear EDIH 11214 0000C39D 31C9 <1> xor cx, cx ; (copy no words from stack) 11215 <1> 11216 <1> [cpu 286] 11217 0000C39F 51 <1> push cx ; ss 11218 0000C3A0 51 <1> push cx ; sp (0:0 = host should allocate a stack) 11219 0000C3A1 83EC0C <1> sub sp, byte 12 ; cs:ip (ignored), segments (uninitialized) 11220 0000C3A4 9C <1> pushf 11221 0000C3A5 51 <1> push cx ; EAXH (uninitialized) 11222 0000C3A6 688016 <1> push 1680h ; AX 11223 0000C3A9 83EC0C <1> sub sp, byte 12 ; ecx, edx, ebx (uninitialized) 11224 0000C3AC 51 <1> push cx 11225 0000C3AD 51 <1> push cx ; reserved (zero) 11226 0000C3AE 83EC0C <1> sub sp, byte 12 ; ebp, esi, edi (uninitialized) 11227 0000C3B1 16 <1> push ss 11228 0000C3B2 07 <1> pop es 11229 0000C3B3 89E7 <1> mov di, sp ; es:(e)di -> 86 Mode call structure 11230 0000C3B5 B80003 <1> mov ax, 0300h 11231 0000C3B8 BB2F00 <1> mov bx, 2Fh ; bl = interrupt, bh = reserved (zero) 11232 0000C3BB CD31 <1> int 31h ; call real mode 2F.1680 11233 <1> __CPU__ 11234 <1> 11235 0000C3BD 83C41C <1> add sp, byte 28 ; discard RM call structure 11236 0000C3C0 58 <1> pop ax ; get AX 11237 0000C3C1 83C414 <1> add sp, byte 20 ; discard RM call structure 11238 <1> 11239 0000C3C4 66 <1> _386_PM_o32 ; pop edi 11240 0000C3C5 5F <1> pop di 11241 0000C3C6 07 <1> pop es 11242 0000C3C7 59 <1> pop cx 11243 0000C3C8 5B <1> pop bx 11244 <1> 11245 0000C3C9 84C0 <1> test al, al 11246 0000C3CB 7413 <1> jz .return ; done idling --> 11247 <1> %endif 11248 <1> .hlt: 11249 0000C3CD F606[7D00]02 <1> testopt [options], nohlt 11250 0000C3D2 750C <1> jnz .return 11251 <1> %if _PM 11252 <1> %if (protectedmode|dpminohlt)&~0FF00h 11253 <1> %error Option bits re-ordered, adjust code here 11254 <1> %endif 11255 0000C3D4 A0[9D00] <1> mov al, byte [internalflags+1] 11256 0000C3D7 240C <1> and al, (protectedmode|dpminohlt)>>8 11257 0000C3D9 340C <1> xor al, (protectedmode|dpminohlt)>>8 11258 0000C3DB 7403 <1> jz .return ; DPMI host throws GPF when we execute hlt --> 11259 <1> %endif 11260 0000C3DD FB <1> sti 11261 0000C3DE F4 <1> hlt ; else idle by hlt 11262 0000C3DF 90 <1> nop 11263 <1> .return: 11264 0000C3E0 C3 <1> retn 11265 <1> 11266 <1> 11267 <1> ; GETLINE - Print a prompt (address in DX, length in CX) and read a line 11268 <1> ; of input. 11269 <1> ; GETLINE0 - Same as above, but use the output line (so far), plus two 11270 <1> ; spaces and a colon, as a prompt. 11271 <1> ; GETLINE00 - Same as above, but use the output line (so far) as a prompt. 11272 <1> ; Entry CX Length of prompt (getline only) 11273 <1> ; DX Address of prompt string (getline only) 11274 <1> ; 11275 <1> ; DI Address + 1 of last character in prompt (getline0 and 11276 <1> ; getline00 only) 11277 <1> ; 11278 <1> ; Exit AL First nonwhite character in input line 11279 <1> ; SI Address of the next character after that 11280 <1> ; Uses AH,BX,CX,DX,DI 11281 <1> 11282 <1> getline0: 11283 0000C3E1 B82020 <1> mov ax, 32<<8|32 ; add two spaces and a colon 11284 0000C3E4 AB <1> stosw 11285 0000C3E5 B03A <1> mov al, ':' 11286 0000C3E7 AA <1> stosb 11287 <1> getline00: 11288 0000C3E8 BA[0E08] <1> mov dx, line_out 11289 0000C3EB 89F9 <1> mov cx, di 11290 0000C3ED 29D1 <1> sub cx, dx 11291 <1> 11292 <1> getline: ; note: this entry is no longer used 11293 0000C3EF 8026[A500]77 <1> clropt [internalflags3], dif3_quiet_input_single | dif3_return_eof 11294 <1> .use_dif3_flags: 11295 <1> %if _DEBUG 11296 <1> d0bp 11297 <1> %endif 11298 0000C3F4 890E[F80A] <1> mov word [promptlen], cx ; save length of prompt 11299 0000C3F8 C606[9B0A]00 <1> mov byte [linecounter], 0 ; reset counter 11300 0000C3FD 8326[1A0C]00 <1> and word [terminator_in_line_in.offset], 0 11301 <1> ; reset this when reading new line 11302 0000C402 8026[9E00]EF <1> clropt [internalflags], promptwaiting 11303 <1> 11304 0000C407 E87102 <1> call getline_is_input_file? 11305 0000C40A 7303E9FE00 <1> jc getline_nofile 11306 <1> 11307 <1> getline_file: 11308 0000C40F F606[A700]01 <1> testopt [internalflags3], dif3_input_re 11309 0000C414 7549 <1> jnz .notquiet 11310 <1> 11311 <1> %if _INPUT_FILE_BOOT 11312 0000C416 F606[A300]02 <1> testopt [internalflags2], dif2_input_file_boot 11313 0000C41B 7412 <1> jz @F 11314 0000C41D B8A000 <1> mov ax, LOAD_INPUT_FILE_SIZE 11315 0000C420 52 <1> push dx 11316 0000C421 F726[0092] <1> mul word [load_input_file.active] 11317 0000C425 5A <1> pop dx 11318 0000C426 89C7 <1> mov di, ax 11319 0000C428 F685[A78F]40 <1> testopt [load_input_file + di - LOADDATA3 + ldFATType], ifhfQuietInput 11320 0000C42D EB29 <1> jmp .quiet_if_nz 11321 <1> 11322 <1> @@: 11323 <1> %endif 11324 <1> %if _INPUT_FILE_HANDLES 11325 0000C42F E8E7E4 <1> call InDos 11326 0000C432 7518 <1> jnz @F 11327 0000C434 F606[A200]10 <1> testopt [internalflags2], dif2_input_file 11328 0000C439 7411 <1> jz @F 11329 0000C43B 8B3E[880A] <1> mov di, word [input_file_handles.active] 11330 0000C43F D1E7 <1> shl di, 1 11331 0000C441 D1E7 <1> shl di, 1 11332 0000C443 D1E7 <1> shl di, 1 ; to qword array index 11333 <1> %if INPUTFILEHANDLE_size != 8 11334 <1> %error Unexpected structure size 11335 <1> %endif 11336 0000C445 F685[0B0A]40 <1> testopt [input_file_handles + di + ifhFlags], ifhfQuietInput 11337 0000C44A EB0C <1> jmp .quiet_if_nz 11338 <1> 11339 <1> @@: 11340 <1> %endif 11341 0000C44C F606[A500]01 <1> testopt [internalflags3], dif3_input_cmdline 11342 0000C451 740C <1> jz @F 11343 0000C453 F606[7F00]40 <1> testopt [options], opt_cmdline_quiet_input 11344 <1> ; jmp .quiet_if_nz 11345 <1> 11346 <1> .quiet_if_nz: 11347 0000C458 7405 <1> jz @F 11348 <1> .quiet: 11349 0000C45A 800E[A500]08 <1> setopt [internalflags3], dif3_quiet_input_single 11350 <1> .notquiet: 11351 <1> @@: 11352 <1> 11353 0000C45F 800E[A200]40 <1> setopt [internalflags2], dif2_did_getline_file 11354 <1> 11355 <1> 11356 <1> ; This part reads the input line from a file (in the case of 11357 <1> ; `debug < file'). It is necessary to do this by hand because DOS 11358 <1> ; function 0Ah does not handle EOF correctly otherwise. This is 11359 <1> ; especially important for DEBUG because it traps Control-C. 11360 0000C464 C706[E60B][5C04] <1> mov word [lastcmd], dmycmd ; disable auto-repeat while reading from a file 11361 <1> 11362 <1> %if _NEWFULLHANDLING 11363 0000C46A BF[0300] <1> mov di, line_in+3 ; read max 11364 <1> %else 11365 <1> mov di, line_in+2 11366 <1> %endif 11367 0000C46D 8B36[FA0A] <1> mov si, word [bufnext] 11368 0000C471 3B36[FC0A] <1> cmp si, word [bufend] 11369 0000C475 7216 <1> jb .char_buffered ; if there's a character already 11370 0000C477 E82407 <1> call fillbuf 11371 0000C47A 7311 <1> jnc .fillbuf_had_data 11372 0000C47C F606[A500]80 <1> testopt [internalflags3], dif3_return_eof 11373 0000C481 7402 <1> jz @F 11374 0000C483 F9 <1> stc 11375 0000C484 C3 <1> retn 11376 <1> @@: 11377 0000C485 E82C02 <1> call getline_close_file 11378 0000C488 7403E962FF <1> jnz getline 11379 <1> 11380 <1> .fillbuf_had_data: 11381 <1> .char_buffered: 11382 <1> %if _NEWFULLHANDLING 11383 0000C48D 4F <1> dec di 11384 <1> %endif 11385 <1> 11386 <1> ; Discard an LF if the last character read was CR. 11387 0000C48E 803E[F40A]0D <1> cmp byte [notatty], 13 ; last parsed character was CR ? 11388 0000C493 750A <1> jne .no_lf_skip ; no, nothing more to do --> 11389 0000C495 803C0A <1> cmp byte [si], 10 ; first read character is LF ? 11390 0000C498 7505 <1> jne .no_lf_skip ; no --> 11391 0000C49A 46 <1> inc si ; skip the LF 11392 0000C49B FE06[F40A] <1> inc byte [notatty] ; avoid repeating this 11393 <1> .no_lf_skip: 11394 <1> 11395 0000C49F 3B36[FC0A] <1> cmp si, word [bufend] 11396 0000C4A3 740B <1> je @F 11397 0000C4A5 803C40 <1> cmp byte [si], '@' ; no display ? 11398 0000C4A8 7506 <1> jne @F 11399 <1> 11400 0000C4AA 46 <1> inc si ; increment past @ 11401 0000C4AB 800E[A500]08 <1> setopt [internalflags3], dif3_quiet_input_single 11402 <1> @@: 11403 0000C4B0 F606[A500]08 <1> testopt [internalflags3], dif3_quiet_input_single 11404 0000C4B5 7503 <1> jnz gl1 11405 <1> 11406 0000C4B7 E805F8 <1> call puts ; display prompt (having checked it wasn't EOF) 11407 <1> 11408 <1> ; si-> next character in buffer 11409 <1> ; w[bufend]-> behind last valid character of buffer 11410 <1> gl1: 11411 0000C4BA 8B0E[FC0A] <1> mov cx, word [bufend] 11412 0000C4BE 29F1 <1> sub cx, si ; cx = number of valid characters in buffer 11413 0000C4C0 740C <1> jz gl3 ; if none --> 11414 <1> gl2: 11415 0000C4C2 AC <1> lodsb 11416 0000C4C3 3C0D <1> cmp al, 13 ; (exact match for CR) 11417 0000C4C5 7410 <1> je gl4 11418 0000C4C7 3C0A <1> cmp al, 10 11419 0000C4C9 740C <1> je gl4 ; if EOL --> 11420 0000C4CB AA <1> stosb 11421 0000C4CC E2F4 <1> loop gl2 ; if more valid characters --> 11422 <1> 11423 <1> ; The buffer is empty. Fill it again. 11424 <1> gl3: 11425 <1> %if _NEWFULLHANDLING 11426 0000C4CE 47 <1> inc di 11427 <1> %endif 11428 0000C4CF E8CC06 <1> call fillbuf 11429 <1> %if _NEWFULLHANDLING 11430 0000C4D2 4F <1> dec di 11431 <1> %endif 11432 0000C4D3 73E5 <1> jnc gl1 ; if we have more characters --> 11433 0000C4D5 B00A <1> mov al, 10 ; make jump after gl4 always branch 11434 <1> %ifn _NEWFULLHANDLING ; should now always have at least one byte free 11435 <1> cmp di, line_in+LINE_IN_LEN 11436 <1> jb @F 11437 <1> dec si 11438 <1> dec di 11439 <1> @@: 11440 <1> %endif 11441 <1> 11442 <1> gl4: 11443 0000C4D7 3C0D <1> cmp al, 13 ; terminator was CR ? 11444 0000C4D9 7508 <1> jne @F ; no --> 11445 0000C4DB E306 <1> jcxz @F ; if no other byte buffered --> 11446 0000C4DD 803C0A <1> cmp byte [si], 10 ; next byte is an LF ? 11447 0000C4E0 7501 <1> jne @F ; no --> 11448 0000C4E2 AC <1> lodsb ; increment si past the LF and set al = 10 11449 <1> ; dec cx ; (not used in subsequent code) 11450 <1> @@: 11451 0000C4E3 8936[FA0A] <1> mov word [bufnext], si 11452 0000C4E7 A2[F40A] <1> mov byte [notatty], al ; store 10 or 13 (depending on the kind of EOL) 11453 <1> 11454 0000C4EA 800E[A500]04 <1> setopt [internalflags3], dif3_at_line_end 11455 0000C4EF E83006 <1> call getline_reset_notatty 11456 <1> 11457 0000C4F2 89F9 <1> mov cx, di ; (counter is for input without CR) 11458 0000C4F4 B00D <1> mov al, 13 11459 0000C4F6 AA <1> stosb ; terminate line for our usage 11460 0000C4F7 BA[0200] <1> mov dx, line_in + 2 11461 0000C4FA 29D1 <1> sub cx, dx ; = length of input (no CR) 11462 0000C4FC F606[A500]08 <1> testopt [internalflags3], dif3_quiet_input_single 11463 0000C501 7503 <1> jnz @F 11464 0000C503 E8B9F7 <1> call puts ; print out the received line 11465 <1> @@: 11466 0000C506 880E[0100] <1> mov byte [line_in+1], cl 11467 0000C50A E92201 <1> jmp getline_eol ; done 11468 <1> 11469 <1> getline_nofile: 11470 0000C50D E89209 <1> call yy_reset_buf 11471 0000C510 51 <1> push cx 11472 0000C511 52 <1> push dx 11473 0000C512 E8AAF7 <1> call puts ; display prompt 11474 0000C515 5A <1> pop dx 11475 0000C516 59 <1> pop cx 11476 0000C517 F606[7D00]40 <1> testopt [options], enable_serial 11477 0000C51C 7516 <1> jnz .rawinput_NZ 11478 0000C51E E8F8E3 <1> call InDos 11479 0000C521 7511 <1> jnz .rawinput_NZ 11480 <1> %if _PM 11481 0000C523 E8AFCE <1> call ispm 11482 0000C526 7507 <1> jnz @F ; if 86 Mode --> 11483 0000C528 F606[8100]08 <1> testopt [options2], opt2_rawinput_dpmi 11484 0000C52D 7505 <1> jnz .rawinput_NZ 11485 <1> @@: 11486 <1> %endif 11487 0000C52F F606[7D00]08 <1> testopt [options], opt_userawinput 11488 <1> .rawinput_NZ: 11489 0000C534 7403E9F801 <1> jnz rawinput 11490 <1> 11491 <1> %if _PM 11492 0000C539 E899CE <1> call ispm 11493 0000C53C 7537 <1> jnz @F ; if 86 Mode --> 11494 0000C53E F606[9E00]04 <1> testopt [internalflags], canswitchmode 11495 0000C543 7430 <1> jz @F ; can't switch to 86M --> 11496 0000C545 800E[9E00]08 <1> setopt [internalflags], modeswitched 11497 <1> ; set flag for resetmode 11498 0000C54A B000 <1> mov al, 0 11499 0000C54C E86074 <1> call sr_state ; save state 11500 0000C54F E82874 <1> call switchmode ; switch to 86M 11501 0000C552 E8AB80 <1> call handle_mode_changed ; ! called with flag set 11502 <1> 11503 0000C555 BE[AC98] <1> mov si, getline_extra_int23 11504 0000C558 B023 <1> mov al, 23h 11505 0000C55A E8450E <1> call install_86m_interrupt_handler 11506 <1> ; override DPMI host's int 23h vector 11507 0000C55D BA[C098] <1> mov dx, getline_extra_int22 11508 0000C560 B82225 <1> mov ax, 2522h 11509 0000C563 CD21 <1> int 21h 11510 0000C565 89160A00 <1> mov word [TPIV], dx ; override our PRI 11511 <1> 11512 0000C569 BA[0000] <1> mov dx, line_in 11513 0000C56C B40A <1> mov ah, 0Ah 11514 0000C56E CD21 <1> int 21h ; call DOS 11515 <1> 11516 0000C570 E8D300 <1> call getline_extra_uninstall 11517 <1> ; undo patches 11518 0000C573 EB08 <1> jmp getline_eol_enter_history 11519 <1> ; go to common trail 11520 <1> 11521 <1> @@: 11522 <1> %endif 11523 0000C575 BA[0000] <1> mov dx, line_in 11524 0000C578 B40A <1> mov ah, 0Ah ; buffered keyboard input 11525 <1> doscall 2160 0000C57A E8F599 <2> call _doscall 11526 <1> 11527 <1> getline_eol_enter_history: 11528 <1> %if _HISTORY 11529 <1> .loop: 11530 0000C57D BE[0200] <1> mov si, line_in + 2 11531 0000C580 31C9 <1> xor cx, cx 11532 0000C582 0A4CFF <1> or cl, byte [si - 1] 11533 0000C585 7503E9A300 <1> jz .dontenter 11534 <1> gethistorysegment es 299 0000C58A 368E06[040B] <2> mov %1, word [ss:history.segorsel] 11535 <1> gethistoryoffset bx 302 0000C58F BB0000 <2> mov %1, 0 11536 0000C592 A1[0C0B] <1> mov ax, word [history.last] 11537 0000C595 3B06[0A0B] <1> cmp ax, word [history.first] 11538 0000C599 7419 <1> je @F 11539 0000C59B 89C7 <1> mov di, ax 11540 0000C59D 268B15 <1> mov dx, [es:di] 11541 0000C5A0 268B7D02 <1> mov di, [es:di + 2] 11542 0000C5A4 29FA <1> sub dx, di 11543 0000C5A6 39D1 <1> cmp cx, dx 11544 0000C5A8 750A <1> jne @F 11545 0000C5AA 8D39 <1> lea di, [di + bx] 11546 0000C5AC 51 <1> push cx 11547 0000C5AD 56 <1> push si 11548 0000C5AE F3A6 <1> repe cmpsb 11549 0000C5B0 5E <1> pop si 11550 0000C5B1 59 <1> pop cx 11551 0000C5B2 7479 <1> je .dontenter 11552 <1> @@: 11553 0000C5B4 89C7 <1> mov di, ax 11554 0000C5B6 268B15 <1> mov dx, [es:di] 11555 0000C5B9 01DA <1> add dx, bx ; -> free space 11556 0000C5BB F7DA <1> neg dx ; - free space start 11557 0000C5BD 7502 <1> jnz @F 11558 0000C5BF 4A <1> dec dx 11559 0000C5C0 47 <1> inc di 11560 <1> @@: 11561 0000C5C1 01FA <1> add dx, di ; free space end - free space start 11562 0000C5C3 730C <1> jnc .delete 11563 0000C5C5 740A <1> je .delete 11564 0000C5C7 4A <1> dec dx 11565 0000C5C8 7407 <1> jz .delete 11566 0000C5CA 4A <1> dec dx 11567 0000C5CB 7404 <1> jz .delete 11568 0000C5CD 39D1 <1> cmp cx, dx 11569 0000C5CF 7646 <1> jbe .insert 11570 <1> .delete: 11571 0000C5D1 3B06[0A0B] <1> cmp ax, word [history.first] 11572 0000C5D5 7508 <1> jne @F 11573 <1> 11574 <1> .error: 11575 0000C5D7 BA[C668] <1> mov dx, msg.history_internal_error 11576 0000C5DA E856FA <1> call putsz 11577 0000C5DD EB4E <1> jmp .dontenter 11578 <1> 11579 <1> @@: 11580 0000C5DF 89C7 <1> mov di, ax 11581 0000C5E1 268B3D <1> mov di, [es:di] ; + bx -> after last 11582 0000C5E4 8B36[0A0B] <1> mov si, word [history.first] 11583 0000C5E8 268B74FE <1> mov si, [es:si - 2] ; + bx -> at second 11584 0000C5EC 29F7 <1> sub di, si ; = after last - after first 11585 <1> ; = length excluding first 11586 0000C5EE 89F9 <1> mov cx, di ; length to move 11587 0000C5F0 56 <1> push si 11588 0000C5F1 01DE <1> add si, bx ; -> after first 11589 0000C5F3 89DF <1> mov di, bx ; -> start of buffer 11590 0000C5F5 06 <1> push es 11591 0000C5F6 1F <1> pop ds 11592 0000C5F7 F3A4 <1> rep movsb ; move stuff 11593 0000C5F9 59 <1> pop cx ; = how far we moved 11594 0000C5FA 89C7 <1> mov di, ax 11595 0000C5FC 8B15 <1> mov dx, word [di] 11596 <1> @@: 11597 0000C5FE 47 <1> inc di 11598 0000C5FF 47 <1> inc di 11599 0000C600 363B3E[0A0B] <1> cmp di, word [ss:history.first] 11600 0000C605 7406 <1> je @F 11601 0000C607 29CA <1> sub dx, cx 11602 0000C609 8715 <1> xchg word [di], dx 11603 0000C60B EBF1 <1> jmp @B 11604 <1> 11605 <1> @@: 11606 0000C60D 16 <1> push ss 11607 0000C60E 1F <1> pop ds 11608 0000C60F 8306[0C0B]02 <1> add word [history.last], 2 11609 0000C614 E966FF <1> jmp .loop 11610 <1> 11611 <1> .insert: 11612 0000C617 48 <1> dec ax 11613 0000C618 48 <1> dec ax 11614 0000C619 A3[0C0B] <1> mov word [history.last], ax 11615 0000C61C 89C7 <1> mov di, ax 11616 0000C61E 57 <1> push di 11617 0000C61F 268B7D02 <1> mov di, word [es:di + 2] 11618 0000C623 01DF <1> add di, bx 11619 0000C625 F3A4 <1> rep movsb 11620 0000C627 5E <1> pop si 11621 0000C628 29DF <1> sub di, bx 11622 0000C62A 26893C <1> mov word [es:si], di 11623 <1> 11624 <1> .dontenter: 11625 0000C62D 16 <1> push ss 11626 0000C62E 07 <1> pop es 11627 <1> %endif 11628 <1> 11629 <1> getline_eol: 11630 0000C62F F606[A500]08 <1> testopt [internalflags3], dif3_quiet_input_single 11631 0000C634 750A <1> jnz @F 11632 0000C636 B00D <1> mov al, 13 11633 0000C638 E81BFA <1> call putc ; fix ZDOS Int21.0A display bug 11634 0000C63B B00A <1> mov al, 10 11635 0000C63D E816FA <1> call putc 11636 <1> @@: 11637 0000C640 BE[0200] <1> mov si, line_in+2 11638 0000C643 E98BF5 <1> jmp skipwhite ; NC 11639 <1> 11640 <1> 11641 <1> %if _PM 11642 <1> getline_extra_uninstall: 11643 0000C646 BA[2783] <1> mov dx, debug22 11644 0000C649 B82225 <1> mov ax, 2522h 11645 0000C64C CD21 <1> int 21h 11646 0000C64E 89160A00 <1> mov word [TPIV], dx ; restore default int 22h (PRI) 11647 0000C652 BE[AC98] <1> mov si, getline_extra_int23 11648 0000C655 B023 <1> mov al, 23h 11649 0000C657 BAFFFF <1> mov dx, -1 11650 0000C65A E8BF0E <1> call UnhookInterruptForce 11651 <1> ; restore DPMI host's int 23h handler 11652 0000C65D E97473 <1> jmp resetmode ; return to PM 11653 <1> 11654 <1> usesection lDEBUG_DATA_ENTRY 11655 <1> 11656 000098AB CBEB10000000004B42- <1> iispentry getline_extra_int23 11656 000098B4 00EBF400 <1> 11657 000098BE F9 <1> stc 11658 000098BF CB <1> retf ; indicate to abort syscall and process 11659 <1> 11660 <1> align 2 11661 <1> getline_extra_int22: 11662 000098C0 FA <1> cli 11663 <1> .cleartraceflag: 11664 000098C1 FC <1> cld ; reestablish things 11665 000098C2 8CC8 <1> mov ax, cs 11666 000098C4 8ED8 <1> mov ds, ax 11667 000098C6 8ED0 <1> mov ss, ax 11668 000098C8 8B26[9C0A] <1> mov sp, word [ savesp ] ; restore stack 11669 000098CC 90 <1> times 1 - (($ - $$) & 1) nop ; align in-code parameter 11670 000098CD E837EA <1> call entry_to_code_seg 11671 000098D0 [60C6] <1> dw .code 11672 <1> 11673 <1> usesection lDEBUG_CODE 11674 <1> 11675 <1> .code: 11676 <1> 11677 0000C660 66 <1> _386_o32 ; mov esp 11678 0000C661 8B26[9C0A] <1> mov sp, word [ savesp ] ; restore stack 11679 0000C665 83E4FC <1> _386 and sp, ~3 ; align stack 11680 0000C668 66 <1> _386_o32 11681 0000C669 31C0 <1> xor ax, ax 11682 0000C66B 66 <1> _386_o32 11683 0000C66C 50 <1> push ax 11684 0000C66D 66 <1> _386_o32 11685 0000C66E 9D <1> popf 11686 0000C66F 8B26[9C0A] <1> _386 mov sp, word [ savesp ] ; restore stack 11687 0000C673 FC <1> cld 11688 0000C674 FB <1> sti 11689 <1> 11690 0000C675 E8CEFF <1> call getline_extra_uninstall 11691 <1> ; undo patches and return to PM 11692 0000C678 E96E7B <1> jmp handle_ctrl_c ; go to common handler --> 11693 <1> %endif 11694 <1> 11695 <1> 11696 <1> getline_is_input_file?: 11697 0000C67B F606[A400]20 <1> testopt [internalflags3], dif3_input_serial_override 11698 0000C680 7530 <1> jnz .nofile 11699 0000C682 F606[A700]01 <1> testopt [internalflags3], dif3_input_re 11700 0000C687 7528 <1> jnz .file 11701 0000C689 F606[A500]01 <1> testopt [internalflags3], dif3_input_cmdline 11702 0000C68E 7521 <1> jnz .file 11703 <1> %if _INPUT_FILE_BOOT 11704 0000C690 F606[A300]02 <1> testopt [internalflags2], dif2_input_file_boot 11705 0000C695 751A <1> jnz .file 11706 <1> %endif 11707 0000C697 E87FE2 <1> call InDos 11708 0000C69A 7516 <1> jnz .nofile ; InDOS, not reading from a file --> 11709 <1> %if _INPUT_FILE_HANDLES 11710 0000C69C F606[A200]10 <1> testopt [internalflags2], dif2_input_file 11711 0000C6A1 750E <1> jnz .file 11712 <1> %endif 11713 0000C6A3 F606[7D00]40 <1> testopt [options], enable_serial 11714 0000C6A8 7508 <1> jnz .nofile 11715 0000C6AA 803E[F40A]00 <1> cmp byte [notatty], 0 ; check this weird flag 11716 0000C6AF 7401 <1> je .nofile ; not reading from a file --> 11717 <1> 11718 <1> .file: 11719 0000C6B1 A8 <1> db __TEST_IMM8 ; (skip stc, NC) 11720 <1> .nofile: 11721 0000C6B2 F9 <1> stc 11722 0000C6B3 C3 <1> retn 11723 <1> 11724 <1> 11725 <1> getline_close_file: 11726 0000C6B4 51 <1> push cx 11727 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT || 1 11728 <1> ; EOF reached. if not input file, quit. else, close input file. 11729 0000C6B5 F606[A700]01 <1> testopt [internalflags3], dif3_input_re 11730 0000C6BA 7518 <1> jnz .re 11731 <1> %if _INPUT_FILE_HANDLES && _INPUT_FILE_BOOT 11732 0000C6BC F706[A200]1002 <1> testopt [internalflags2], dif2_input_file | dif2_input_file_boot, 1 11733 0000C6C2 750D <1> jnz @F 11734 <1> %elif _INPUT_FILE_HANDLES 11735 <1> testopt [internalflags2], dif2_input_file 11736 <1> jnz @F 11737 <1> %elif _INPUT_FILE_BOOT 11738 <1> testopt [internalflags2], dif2_input_file_boot 11739 <1> jnz @F 11740 <1> %endif 11741 0000C6C4 F606[A500]01 <1> testopt [internalflags3], dif3_input_cmdline 11742 0000C6C9 7503E9DCD4 <1> jz qq ; if EOF, quit --> 11743 <1> 11744 0000C6CE B1FE <1> mov cl, -2 11745 0000C6D0 A9 <1> db __TEST_IMM16 11746 <1> @@: 11747 0000C6D1 31C9 <1> xor cx, cx 11748 0000C6D3 A9 <1> db __TEST_IMM16 11749 <1> .re: 11750 0000C6D4 B1FF <1> mov cl, -1 11751 <1> 11752 0000C6D6 51 <1> push cx 11753 0000C6D7 E84000 <1> call .resetstuff 11754 0000C6DA 59 <1> pop cx 11755 <1> 11756 0000C6DB E302 <1> jcxz .notre 11757 0000C6DD EB15 <1> jmp @F 11758 <1> 11759 <1> .notre: 11760 0000C6DF 59 <1> pop cx 11761 0000C6E0 F606[A500]04 <1> testopt [internalflags3], dif3_at_line_end 11762 0000C6E5 750C <1> jnz .return ; (NZ) 11763 <1> 11764 0000C6E7 B80D0A <1> mov ax, 13 | 10 << 8 ; pretend we read a CR LF sequence 11765 0000C6EA AB <1> stosw 11766 0000C6EB 893E[FC0A] <1> mov word [bufend], di 11767 0000C6EF 4F <1> dec di 11768 0000C6F0 4F <1> dec di 11769 0000C6F1 38C0 <1> cmp al, al ; ZR 11770 <1> .return: 11771 0000C6F3 C3 <1> retn 11772 <1> 11773 <1> @@: 11774 0000C6F4 80F9FE <1> cmp cl, -2 11775 0000C6F7 59 <1> pop cx 11776 0000C6F8 7410 <1> je .finish_cmdline 11777 <1> 11778 <1> .finish_re: 11779 0000C6FA F606[A500]04 <1> testopt [internalflags3], dif3_at_line_end 11780 0000C6FF 7506 <1> jnz @F 11781 0000C701 BA[D667] <1> mov dx, msg.unexpected_noneol_re 11782 0000C704 E826F9 <1> call putsz_error 11783 <1> @@: 11784 0000C707 E9FE60 <1> jmp dumpregs_extended.exit 11785 <1> 11786 <1> .finish_cmdline: 11787 0000C70A F606[A500]04 <1> testopt [internalflags3], dif3_at_line_end 11788 0000C70F 7506 <1> jnz @F 11789 0000C711 BA[0468] <1> mov dx, msg.unexpected_noneol_rc 11790 0000C714 E816F9 <1> call putsz_error 11791 <1> @@: 11792 0000C717 E9E638 <1> jmp cmd3 11793 <1> %else 11794 <1> jmp qq ; if EOF, quit --> 11795 <1> %endif 11796 <1> 11797 <1> .resetstuff: 11798 0000C71A 57 <1> push di 11799 0000C71B E8A7FA <1> call yy_close_file ; close file 11800 0000C71E 5F <1> pop di 11801 <1> 11802 <1> %if _NEWFULLHANDLING 11803 0000C71F C706[FA0A][0300] <1> mov word [bufnext], line_in + 3 11804 0000C725 C706[FC0A][0300] <1> mov word [bufend], line_in + 3 11805 <1> %else 11806 <1> mov word [bufnext], line_in + 2 11807 <1> mov word [bufend], line_in + 2 11808 <1> %endif 11809 <1> 11810 0000C72B E8F403 <1> call getline_reset_notatty 11811 <1> 11812 0000C72E E9D03D <1> jmp determine_quiet_output 11813 <1> 11814 <1> 11815 <1> rawinput: 11816 <1> lframe 11817 <1> lequ 254, limit 11818 <1> lvar word, columns 11819 <1> lvar word, maxpercol 11820 <1> lvar word, maxpercolhalf 11821 0000C731 5589E58D66FA <1> lenter 11822 0000C737 06 <1> push es 11823 0000C738 52 <1> push dx 11824 <1> lvar dword, prompt ; (in line_out buffer) 11825 0000C739 31C0 <1> xor ax, ax 11826 <1> %if _HISTORY 11827 0000C73B 50 <1> push ax 11828 <1> lvar word, historyentry 11829 <1> %endif 11830 0000C73C 50 <1> push ax 11831 <1> lvar word, length_displayed 11832 0000C73D 50 <1> push ax 11833 <1> lvar word, length_input 11834 0000C73E 50 <1> push ax 11835 <1> lvar word, offset 11836 0000C73F 50 <1> push ax 11837 <1> lvar word, lastskip 11838 0000C740 50 <1> push ax 11839 <1> lvar word, low_redraw_and_high_beep 11840 <1> lequ ?low_redraw_and_high_beep, redraw 11841 <1> lequ ?low_redraw_and_high_beep + 1, beep 11842 0000C741 50 <1> push ax 11843 <1> lvar word, edited 11844 0000C742 51 <1> push cx 11845 <1> lvar word, column 11846 0000C743 51 <1> push cx 11847 <1> lvar word, promptlength 11848 <1> 11849 0000C744 57 <1> push di 11850 0000C745 1E <1> push ds 11851 0000C746 07 <1> pop es 11852 <1> 11853 0000C747 BF[0200] <1> mov di, line_in+2 11854 <1> .next: 11855 0000C74A E8257A <1> call handle_serial_flags_ctrl_c 11856 <1> 11857 0000C74D 807EEA00 <1> cmp byte [bp + ?redraw], 0 11858 0000C751 7503E9AF00 <1> je .no_do_redraw 11859 <1> .do_redraw: 11860 <1> 11861 0000C756 E89903 <1> call get_columns 11862 <1> 11863 0000C759 8946FE <1> mov word [bp + ?columns], ax 11864 0000C75C 48 <1> dec ax ; $COLS - 1 11865 0000C75D 2B46E4 <1> sub ax, word [bp + ?promptlength]; - $promptlength 11866 0000C760 8946FC <1> mov word [bp + ?maxpercol], ax 11867 0000C763 D1E8 <1> shr ax, 1 ; int($maxpercol / 2) 11868 0000C765 8946FA <1> mov word [bp + ?maxpercolhalf], ax 11869 <1> 11870 0000C768 B00D <1> mov al, 13 11871 0000C76A E8E9F8 <1> call putc 11872 <1> 11873 0000C76D C456F6 <1> les dx, [bp + ?prompt] 11874 0000C770 8B4EE4 <1> mov cx, [bp + ?promptlength] 11875 0000C773 E849F5 <1> call puts 11876 0000C776 8B46F0 <1> mov ax, [bp + ?length_input] 11877 0000C779 89C1 <1> mov cx, ax 11878 0000C77B 31FF <1> xor di, di ; skip 11879 <1> ; + line_in + 2 -> to display 11880 0000C77D 3B46FC <1> cmp ax, word [bp + ?maxpercol] 11881 0000C780 8B46E6 <1> mov ax, word [bp + ?column] ; col 11882 0000C783 7626 <1> jna .not_show_a_maxpercol 11883 <1> .show_a_maxpercol: 11884 0000C785 8B5EEC <1> mov bx, word [bp + ?lastskip] 11885 0000C788 395EEE <1> cmp word [bp + ?offset], bx 11886 0000C78B 7206 <1> jnae .not_offset_ae_lastskip 11887 <1> .offset_ae_lastskip: 11888 0000C78D 29D8 <1> sub ax, bx ; col -= lastskip 11889 0000C78F 01DF <1> add di, bx ; skip += lastskip 11890 0000C791 29D9 <1> sub cx, bx ; lessen length of part to display 11891 <1> .not_offset_ae_lastskip: 11892 <1> 11893 <1> @@: 11894 0000C793 3B46FC <1> cmp ax, word [bp + ?maxpercol] 11895 0000C796 760B <1> jna .not_col_a_maxpercol 11896 <1> .col_a_maxpercol: 11897 0000C798 2B46FA <1> sub ax, word [bp + ?maxpercolhalf] 11898 <1> ; lessen col 11899 0000C79B 037EFA <1> add di, word [bp + ?maxpercolhalf] 11900 <1> ; heighten offset of part to display 11901 0000C79E 2B4EFA <1> sub cx, word [bp + ?maxpercolhalf] 11902 <1> ; lessen length of part to display 11903 0000C7A1 EBF0 <1> jmp @B 11904 <1> 11905 <1> .not_col_a_maxpercol: 11906 0000C7A3 3B4EFC <1> cmp cx, word [bp + ?maxpercol] 11907 0000C7A6 7603 <1> jbe @F 11908 0000C7A8 8B4EFC <1> mov cx, word [bp + ?maxpercol] 11909 <1> @@: 11910 <1> .not_show_a_maxpercol: 11911 0000C7AB 897EEC <1> mov word [bp + ?lastskip], di 11912 0000C7AE 8D95[0200] <1> lea dx, [di + line_in + 2] 11913 0000C7B2 16 <1> push ss 11914 0000C7B3 07 <1> pop es 11915 <1> 11916 0000C7B4 FF76F2 <1> push word [bp + ?length_displayed] 11917 0000C7B7 894EF2 <1> mov word [bp + ?length_displayed], cx 11918 0000C7BA 50 <1> push ax 11919 0000C7BB 51 <1> push cx 11920 0000C7BC 52 <1> push dx 11921 0000C7BD E8FFF4 <1> call puts ; redraw 11922 0000C7C0 5A <1> pop dx 11923 0000C7C1 59 <1> pop cx 11924 0000C7C2 58 <1> pop ax 11925 0000C7C3 5B <1> pop bx 11926 <1> 11927 0000C7C4 87D9 <1> xchg bx, cx ; cx = prior length displayed, 11928 <1> ; bx = new length displayed 11929 0000C7C6 29D9 <1> sub cx, bx ; = how many blanks needed to overwrite 11930 0000C7C8 760B <1> jbe @FF 11931 0000C7CA 01CB <1> add bx, cx ; = length displayed 11932 0000C7CC 50 <1> push ax 11933 0000C7CD B020 <1> mov al, 32 11934 <1> @@: 11935 0000C7CF E884F8 <1> call putc 11936 0000C7D2 E2FB <1> loop @B 11937 0000C7D4 58 <1> pop ax 11938 <1> @@: 11939 <1> 11940 0000C7D5 52 <1> push dx 11941 0000C7D6 01DA <1> add dx, bx 11942 0000C7D8 81EA[0200] <1> sub dx, line_in + 2 ; offset into line (with length displayed) 11943 0000C7DC 0356E4 <1> add dx, word [bp + ?promptlength]; offset into display 11944 0000C7DF 3B56E6 <1> cmp dx, word [bp + ?column] ; same as column ? 11945 0000C7E2 5A <1> pop dx 11946 0000C7E3 741C <1> je .do_redraw_done ; yes, skip cursor movement stuff --> 11947 <1> 11948 0000C7E5 50 <1> push ax 11949 0000C7E6 52 <1> push dx 11950 0000C7E7 B00D <1> mov al, 13 11951 0000C7E9 E86AF8 <1> call putc ; reset cursor 11952 0000C7EC C456F6 <1> les dx, [bp + ?prompt] 11953 0000C7EF 8B4EE4 <1> mov cx, [bp + ?promptlength] 11954 0000C7F2 E8CAF4 <1> call puts ; redraw prompt 11955 0000C7F5 16 <1> push ss 11956 0000C7F6 07 <1> pop es 11957 0000C7F7 5A <1> pop dx ; -> current input text 11958 0000C7F8 58 <1> pop ax ; = col 11959 0000C7F9 2B46E4 <1> sub ax, word [bp + ?promptlength] 11960 <1> ; = offset into input text 11961 0000C7FC 89C1 <1> mov cx, ax ; draw that much 11962 0000C7FE E8BEF4 <1> call puts ; draw (to move cursor) 11963 <1> 11964 <1> .do_redraw_done: 11965 0000C801 C646EA00 <1> mov byte [bp + ?redraw], 0 11966 <1> 11967 <1> .no_do_redraw: 11968 <1> 11969 0000C805 807EEB00 <1> cmp byte [bp + ?beep], 0 11970 0000C809 7409 <1> je .no_do_beep 11971 <1> .do_beep: 11972 0000C80B B007 <1> mov al, 7 11973 0000C80D E846F8 <1> call putc 11974 <1> 11975 0000C810 C646EB00 <1> mov byte [bp + ?beep], 0 11976 <1> .no_do_beep: 11977 <1> 11978 0000C814 E881F8 <1> call getc 11979 <1> 11980 <1> ; check scancode for int 16h in non-dumb dosemu first 11981 0000C817 86C4 <1> xchg al, ah 11982 0000C819 3C48 <1> cmp al, 48h 11983 0000C81B 7503E9F901 <1> je .up 11984 0000C820 3C4B <1> cmp al, 4Bh 11985 0000C822 7503E9CA01 <1> je .left 11986 0000C827 3C50 <1> cmp al, 50h 11987 0000C829 7503E90702 <1> je .down 11988 0000C82E 3C4D <1> cmp al, 4Dh 11989 0000C830 7503E9CF01 <1> je .right 11990 0000C835 3C52 <1> cmp al, 52h 11991 0000C837 7503E95502 <1> je .insert 11992 0000C83C 3C53 <1> cmp al, 53h 11993 0000C83E 7503E96101 <1> je .del 11994 0000C843 3C47 <1> cmp al, 47h 11995 0000C845 7503E98301 <1> je .home 11996 0000C84A 3C4F <1> cmp al, 4Fh 11997 0000C84C 7503E98D01 <1> je .end 11998 0000C851 3C49 <1> cmp al, 49h 11999 0000C853 7503E93902 <1> je .pageup 12000 0000C858 3C51 <1> cmp al, 51h 12001 0000C85A 7503E93202 <1> je .pagedown 12002 <1> 12003 <1> ; not a special scancode, check character returned 12004 0000C85F 86C4 <1> xchg al, ah 12005 0000C861 3C1B <1> cmp al, 1Bh 12006 0000C863 7403E98B00 <1> jne .not_esc 12007 <1> 12008 <1> ; check escape opcodes for int 16h in -dumb dosemu 12009 <1> ; or input from serial I/O (picocom/screen/ssh/mate-terminal) 12010 <1> .esc: 12011 0000C868 E82DF8 <1> call getc 12012 0000C86B 3C5B <1> cmp al, '[' 12013 0000C86D 7403E91F02 <1> jne .beep 12014 0000C872 E823F8 <1> call getc 12015 0000C875 3C41 <1> cmp al, 41h 12016 0000C877 7503E99D01 <1> je .up 12017 0000C87C 3C44 <1> cmp al, 44h 12018 0000C87E 7503E96E01 <1> je .left 12019 0000C883 3C42 <1> cmp al, 42h 12020 0000C885 7503E9AB01 <1> je .down 12021 0000C88A 3C43 <1> cmp al, 43h 12022 0000C88C 7503E97301 <1> je .right 12023 0000C891 3C32 <1> cmp al, 32h 12024 0000C893 7425 <1> je .check_insert 12025 0000C895 3C33 <1> cmp al, 33h 12026 0000C897 7421 <1> je .check_del 12027 0000C899 3C31 <1> cmp al, 31h 12028 0000C89B 741D <1> je .check_home 12029 0000C89D 3C34 <1> cmp al, 34h 12030 0000C89F 7419 <1> je .check_end 12031 0000C8A1 3C48 <1> cmp al, 48h 12032 0000C8A3 7503E92501 <1> je .home 12033 0000C8A8 3C46 <1> cmp al, 46h 12034 0000C8AA 7503E92F01 <1> je .end 12035 0000C8AF 3C35 <1> cmp al, 35h 12036 0000C8B1 7407 <1> je .check_pageup 12037 0000C8B3 3C36 <1> cmp al, 36h 12038 0000C8B5 7403 <1> je .check_pagedown 12039 0000C8B7 E9D701 <1> jmp .beep 12040 <1> 12041 <1> 12042 <1> .check_insert: 12043 <1> .check_del: 12044 <1> .check_home: 12045 <1> .check_end: 12046 <1> .check_pageup: 12047 <1> .check_pagedown: 12048 0000C8BA 50 <1> push ax 12049 0000C8BB E8DAF7 <1> call getc 12050 0000C8BE 3C7E <1> cmp al, 7Eh 12051 0000C8C0 58 <1> pop ax 12052 0000C8C1 7403E9CB01 <1> jne .beep 12053 <1> 12054 0000C8C6 3C32 <1> cmp al, 32h 12055 0000C8C8 7503E9C401 <1> je .insert 12056 0000C8CD 3C33 <1> cmp al, 33h 12057 0000C8CF 7503E9D000 <1> je .del 12058 0000C8D4 3C31 <1> cmp al, 31h 12059 0000C8D6 7503E9F200 <1> je .home 12060 0000C8DB 3C34 <1> cmp al, 34h 12061 0000C8DD 7503E9FC00 <1> je .end 12062 0000C8E2 3C35 <1> cmp al, 35h 12063 0000C8E4 7503E9A801 <1> je .pageup 12064 0000C8E9 3C36 <1> cmp al, 36h 12065 0000C8EB 7503E9A101 <1> je .pagedown 12066 <1> 12067 0000C8F0 E99E01 <1> jmp .beep 12068 <1> 12069 <1> 12070 <1> .not_esc: 12071 <1> ; check regular characters 12072 0000C8F3 84C0 <1> test al, al ; waste? 12073 0000C8F5 7503E950FE <1> je .next 12074 0000C8FA 3CE0 <1> cmp al, 0E0h 12075 0000C8FC 7503E949FE <1> je .next ; waste --> 12076 <1> 12077 0000C901 3C03 <1> cmp al, 03h 12078 0000C903 7503E99001 <1> je .ctrlc 12079 0000C908 3C09 <1> cmp al, 09h 12080 0000C90A 7503E98201 <1> je .beep ; tab 12081 0000C90F 3C08 <1> cmp al, 08h 12082 0000C911 745D <1> je .backspace 12083 0000C913 3C7F <1> cmp al, 7Fh 12084 <1> ; On the server in int 16h of -dumb dosemu, as well as on 12085 <1> ; both systems across serial I/O this code is used. 12086 0000C915 7459 <1> je .backspace 12087 0000C917 3C0A <1> cmp al, 10 ; (allow Linux style linebreak) 12088 0000C919 7503E97D01 <1> je .done 12089 0000C91E 3C0D <1> cmp al, 13 ; (match for CR keypress) 12090 0000C920 7503E97601 <1> je .done 12091 <1> 12092 <1> .textcodepoint: 12093 0000C925 8B5EF0 <1> mov bx, word [bp + ?length_input] 12094 0000C928 81FBFE00 <1> cmp bx, ?limit 12095 0000C92C 720B <1> jb @F 12096 0000C92E C646EA01 <1> mov byte [bp + ?redraw], 1 12097 0000C932 C646EB01 <1> mov byte [bp + ?beep], 1 12098 0000C936 E911FE <1> jmp .next 12099 <1> @@: 12100 <1> 12101 0000C939 C646E801 <1> mov byte [bp + ?edited], 1 12102 0000C93D 8B56F0 <1> mov dx, word [bp + ?length_input] 12103 0000C940 89D1 <1> mov cx, dx 12104 0000C942 89D7 <1> mov di, dx 12105 0000C944 16 <1> push ss 12106 0000C945 07 <1> pop es 12107 0000C946 81C7[0200] <1> add di, line_in + 2 ; di -> behind end of input 12108 0000C94A 89FE <1> mov si, di 12109 0000C94C 4E <1> dec si ; si -> at last entry of input 12110 0000C94D 2B4EEE <1> sub cx, word [bp + ?offset] 12111 0000C950 FD <1> std ; AMD erratum 109 workaround done 12112 <1> numdef AMD_ERRATUM_109_WORKAROUND, 1 12113 <1> %if _AMD_ERRATUM_109_WORKAROUND 12114 0000C951 E308 <1> jcxz @FF 12115 0000C953 83F914 <1> cmp cx, 20 12116 0000C956 7703 <1> ja @FF 12117 <1> @@: 12118 0000C958 A4 <1> movsb 12119 0000C959 E2FD <1> loop @B 12120 <1> @@: 12121 <1> %endif 12122 0000C95B F3A4 <1> rep movsb 12123 0000C95D FC <1> cld 12124 0000C95E 8805 <1> mov byte [di], al 12125 0000C960 FF46E6 <1> inc word [bp + ?column] 12126 0000C963 FF46EE <1> inc word [bp + ?offset] 12127 0000C966 FF46F0 <1> inc word [bp + ?length_input] 12128 0000C969 C646EA01 <1> mov byte [bp + ?redraw], 1 12129 0000C96D E9DAFD <1> jmp .next 12130 <1> 12131 <1> .backspace: 12132 0000C970 837EEE00 <1> cmp word [bp + ?offset], 0 12133 0000C974 7427 <1> je .backspace_offset_0 12134 <1> 12135 0000C976 C646E801 <1> mov byte [bp + ?edited], 1 12136 0000C97A 16 <1> push ss 12137 0000C97B 07 <1> pop es 12138 0000C97C 8B7EEE <1> mov di, word [bp + ?offset] 12139 0000C97F 8B4EF0 <1> mov cx, word [bp + ?length_input] 12140 0000C982 29F9 <1> sub cx, di ; length after offset 12141 0000C984 81C7[0200] <1> add di, line_in + 2 ; -> at offset in line 12142 0000C988 89FE <1> mov si, di ; -> at offset in line 12143 0000C98A 4F <1> dec di ; -> at offset - 1 in line 12144 0000C98B F3A4 <1> rep movsb ; move down additional content 12145 0000C98D FF4EE6 <1> dec word [bp + ?column] 12146 0000C990 FF4EEE <1> dec word [bp + ?offset] 12147 0000C993 FF4EF0 <1> dec word [bp + ?length_input] 12148 0000C996 C646EA01 <1> mov byte [bp + ?redraw], 1 12149 0000C99A E9ADFD <1> jmp .next 12150 <1> 12151 <1> .backspace_offset_0: 12152 <1> .del_offset_ae_length_input: 12153 <1> .left_offset_0: 12154 <1> .right_offset_too_high: 12155 0000C99D C646EB01 <1> mov byte [bp + ?beep], 1 12156 0000C9A1 E9A6FD <1> jmp .next 12157 <1> 12158 <1> .del: 12159 0000C9A4 8B46EE <1> mov ax, word [bp + ?offset] 12160 0000C9A7 3B46F0 <1> cmp ax, word [bp + ?length_input] 12161 0000C9AA 73F1 <1> jae .del_offset_ae_length_input 12162 0000C9AC C646E801 <1> mov byte [bp + ?edited], 1 12163 0000C9B0 89C7 <1> mov di, ax 12164 0000C9B2 81C7[0200] <1> add di, line_in + 2 ; -> at current offset 12165 0000C9B6 89FE <1> mov si, di 12166 0000C9B8 46 <1> inc si ; -> after current offset 12167 0000C9B9 40 <1> inc ax ; offset + 1 12168 0000C9BA F7D8 <1> neg ax ; - (offset + 1) 12169 0000C9BC 0346F0 <1> add ax, word [bp + ?length_input]; length input - (offset + 1) 12170 0000C9BF 89C1 <1> mov cx, ax 12171 0000C9C1 F3A4 <1> rep movsb ; move down part after deleted point 12172 0000C9C3 FF4EF0 <1> dec word [bp + ?length_input] 12173 0000C9C6 C646EA01 <1> mov byte [bp + ?redraw], 1 12174 0000C9CA E97DFD <1> jmp .next 12175 <1> 12176 <1> .home: 12177 0000C9CD 8366EE00 <1> and word [bp + ?offset], 0 12178 0000C9D1 FF76E4 <1> push word [bp + ?promptlength] 12179 0000C9D4 8F46E6 <1> pop word [bp + ?column] 12180 0000C9D7 C646EA01 <1> mov byte [bp + ?redraw], 1 12181 0000C9DB E96CFD <1> jmp .next 12182 <1> 12183 <1> .end: 12184 0000C9DE 8B46F0 <1> mov ax, word [bp + ?length_input] 12185 0000C9E1 8946EE <1> mov word [bp + ?offset], ax 12186 0000C9E4 0346E4 <1> add ax, word [bp + ?promptlength] 12187 0000C9E7 8946E6 <1> mov word [bp + ?column], ax 12188 0000C9EA C646EA01 <1> mov byte [bp + ?redraw], 1 12189 0000C9EE E959FD <1> jmp .next 12190 <1> 12191 <1> .left: 12192 0000C9F1 837EEE00 <1> cmp word [bp + ?offset], 0 12193 0000C9F5 74A6 <1> je .left_offset_0 12194 0000C9F7 FF4EEE <1> dec word [bp + ?offset] 12195 0000C9FA FF4EE6 <1> dec word [bp + ?column] 12196 0000C9FD C646EA01 <1> mov byte [bp + ?redraw], 1 12197 0000CA01 E946FD <1> jmp .next 12198 <1> 12199 <1> .right: 12200 0000CA04 8B46EE <1> mov ax, word [bp + ?offset] 12201 0000CA07 3B46F0 <1> cmp ax, word [bp + ?length_input] 12202 0000CA0A 7391 <1> jnb .right_offset_too_high 12203 0000CA0C FF46EE <1> inc word [bp + ?offset] 12204 0000CA0F FF46E6 <1> inc word [bp + ?column] 12205 0000CA12 C646EA01 <1> mov byte [bp + ?redraw], 1 12206 0000CA16 E931FD <1> jmp .next 12207 <1> 12208 <1> .up: 12209 0000CA19 807EE800 <1> cmp byte [bp + ?edited], 0 12210 0000CA1D 7572 <1> jne .beep 12211 <1> %if _HISTORY 12212 0000CA1F 8B76F4 <1> mov si, word [bp + ?historyentry] 12213 0000CA22 85F6 <1> test si, si 12214 0000CA24 8D7402 <1> lea si, [si + 2] 12215 0000CA27 7504 <1> jnz @F 12216 0000CA29 8B36[0C0B] <1> mov si, word [history.last] 12217 <1> @@: 12218 0000CA2D 3B36[0A0B] <1> cmp si, word [history.first] 12219 0000CA31 745E <1> je .beep 12220 0000CA33 EB1B <1> jmp .copyline 12221 <1> 12222 <1> .down: 12223 0000CA35 807EE800 <1> cmp byte [bp + ?edited], 0 12224 0000CA39 7556 <1> jne .beep 12225 0000CA3B 8B76F4 <1> mov si, word [bp + ?historyentry] 12226 0000CA3E 85F6 <1> test si, si 12227 0000CA40 744F <1> jz .beep 12228 0000CA42 3B36[0C0B] <1> cmp si, word [history.last] 12229 0000CA46 7506 <1> jne @F 12230 0000CA48 31C0 <1> xor ax, ax 12231 0000CA4A 31C9 <1> xor cx, cx 12232 0000CA4C EB10 <1> jmp .setline 12233 <1> 12234 <1> @@: 12235 0000CA4E 4E <1> dec si 12236 0000CA4F 4E <1> dec si 12237 <1> 12238 <1> .copyline: 12239 0000CA50 89F0 <1> mov ax, si 12240 <1> gethistorysegment ds 299 0000CA52 368E1E[040B] <2> mov %1, word [ss:history.segorsel] 12241 0000CA57 8B0C <1> mov cx, [si] 12242 0000CA59 8B7402 <1> mov si, [si + 2] 12243 0000CA5C 29F1 <1> sub cx, si 12244 <1> 12245 <1> .setline: 12246 0000CA5E 8946F4 <1> mov word [bp + ?historyentry], ax 12247 <1> gethistoryoffset bx 302 0000CA61 BB0000 <2> mov %1, 0 12248 0000CA64 8D30 <1> lea si, [si + bx] 12249 0000CA66 16 <1> push ss 12250 0000CA67 07 <1> pop es 12251 0000CA68 BF[0100] <1> mov di, line_in + 1 12252 0000CA6B 88C8 <1> mov al, cl 12253 0000CA6D AA <1> stosb 12254 0000CA6E F3A4 <1> rep movsb 12255 0000CA70 B00D <1> mov al, 13 12256 0000CA72 AA <1> stosb 12257 0000CA73 16 <1> push ss 12258 0000CA74 1F <1> pop ds 12259 <1> %else 12260 <1> .down: equ .beep 12261 <1> 12262 <1> mov byte [bp + ?edited], 1 12263 <1> %endif 12264 0000CA75 31C0 <1> xor ax, ax 12265 0000CA77 A0[0100] <1> mov al, byte [line_in + 1] 12266 0000CA7A 8946EE <1> mov word [bp + ?offset], ax 12267 0000CA7D 8946F0 <1> mov word [bp + ?length_input], ax 12268 0000CA80 0346E4 <1> add ax, word [bp + ?promptlength] 12269 0000CA83 8946E6 <1> mov word [bp + ?column], ax 12270 0000CA86 8366EC00 <1> and word [bp + ?lastskip], 0 12271 0000CA8A C646EA01 <1> mov byte [bp + ?redraw], 1 12272 0000CA8E E9B9FC <1> jmp .next 12273 <1> 12274 <1> .insert: 12275 <1> .pageup: 12276 <1> .pagedown: 12277 <1> .beep: 12278 0000CA91 C646EB01 <1> mov byte [bp + ?beep], 1 12279 0000CA95 E9B2FC <1> jmp .next 12280 <1> 12281 <1> .ctrlc: 12282 0000CA98 E94E77 <1> jmp handle_ctrl_c 12283 <1> 12284 <1> .done: 12285 0000CA9B 8B7EF0 <1> mov di, word [bp + ?length_input] 12286 <1> 12287 0000CA9E 8B56EC <1> mov dx, word [bp + ?lastskip] 12288 0000CAA1 0356F2 <1> add dx, word [bp + ?length_displayed] 12289 <1> ; offset into line (with length displayed) 12290 0000CAA4 0356E4 <1> add dx, word [bp + ?promptlength]; offset into display 12291 0000CAA7 3B56E6 <1> cmp dx, word [bp + ?column] ; same as column ? 12292 0000CAAA 750A <1> jne @F ; no, always redraw --> 12293 <1> 12294 0000CAAC 89F8 <1> mov ax, di 12295 0000CAAE 0346E4 <1> add ax, word [bp + ?promptlength] 12296 0000CAB1 3946FE <1> cmp word [bp + ?columns], ax 12297 0000CAB4 7719 <1> ja .done_no_redraw 12298 <1> 12299 <1> @@: 12300 0000CAB6 B00D <1> mov al, 13 12301 0000CAB8 E89BF5 <1> call putc ; reset cursor 12302 0000CABB C456F6 <1> les dx, [bp + ?prompt] 12303 0000CABE 8B4EE4 <1> mov cx, [bp + ?promptlength] 12304 0000CAC1 E8FBF1 <1> call puts ; redraw prompt 12305 0000CAC4 16 <1> push ss 12306 0000CAC5 07 <1> pop es 12307 0000CAC6 BA[0200] <1> mov dx, line_in + 2 12308 0000CAC9 8B4EF0 <1> mov cx, word [bp + ?length_input] 12309 0000CACC E8F0F1 <1> call puts ; draw 12310 <1> 12311 <1> .done_no_redraw: 12312 0000CACF 81C7[0200] <1> add di, line_in + 2 12313 0000CAD3 B00D <1> mov al, 13 12314 0000CAD5 AA <1> stosb ; store the CR (there always is room) 12315 0000CAD6 97 <1> xchg ax, di ; -> behind CR 12316 0000CAD7 2C43 <1> sub al, ((-section.DATASTACK.vstart+100h+ldebug_data_entry_size +asmtable1_size+asmtable2_size) +line_in+3) & 0FFh ; length of string, excluding CR 12319 <1> ; (This instruction disregards the unnecessary higher byte.) 12320 0000CAD9 5F <1> pop di ; restore di 12321 0000CADA A2[0100] <1> mov byte [line_in+1], al ; store the length byte 12322 0000CADD 89EC5D <1> lleave code 12323 0000CAE0 E99AFA <1> jmp getline_eol_enter_history 12324 <1> 12325 <1> lleave ctx 12326 <1> 12327 <1> 12328 <1> fullbsout: 12329 0000CAE3 B008 <1> mov al, 8 12330 0000CAE5 E86EF5 <1> call putc 12331 0000CAE8 B020 <1> mov al, 32 12332 0000CAEA E869F5 <1> call putc 12333 0000CAED B008 <1> mov al, 8 12334 0000CAEF E964F5 <1> jmp putc 12335 <1> 12336 <1> 12337 <1> ; INP: - 12338 <1> ; OUT: ax = number of columns to use 12339 <1> ; STT: ds = ss = debugger data selector 12340 <1> get_columns: 12341 0000CAF2 31C0 <1> xor ax, ax 12342 0000CAF4 F606[7D00]40 <1> testopt [options], enable_serial ; serial ? 12343 0000CAF9 7411 <1> jz @F ; no --> 12344 0000CAFB 0A06[F40B] <1> or al, byte [serial_columns] ; ax = number of columns if serial 12345 0000CAFF 7407 <1> jz .default_columns 12346 0000CB01 3C01 <1> cmp al, 1 12347 0000CB03 751C <1> jne @FF 12348 0000CB05 48 <1> dec ax ; = 0 12349 0000CB06 EB04 <1> jmp @F ; use IOC / BDA selection 12350 <1> .default_columns: 12351 0000CB08 B050 <1> mov al, 80 12352 0000CB0A EB15 <1> jmp @FF 12353 <1> @@: 12354 0000CB0C 0A06[030C] <1> or al, [io_columns] 12355 0000CB10 74F6 <1> jz .default_columns 12356 0000CB12 3C01 <1> cmp al, 1 ; is 1 ? 12357 0000CB14 750B <1> jne @F ; no, use as columns --> 12358 <1> ; yes, automatic (use BDA) 12359 0000CB16 06 <1> push es 12360 0000CB17 B84000 <1> mov ax, 40h ; 0040h is a bimodal segment/selector 12361 0000CB1A 8EC0 <1> mov es, ax 12362 0000CB1C 26A14A00 <1> mov ax, word [ es:4Ah ] ; columns on screen 12363 0000CB20 07 <1> pop es 12364 <1> @@: 12365 0000CB21 C3 <1> retn 12366 <1> 12367 <1> 12368 <1> getline_reset_notatty: 12369 0000CB22 F606[A700]02 <1> testopt [internalflags3], dif3_input_re_closed 12370 0000CB27 7421 <1> jz @F 12371 0000CB29 8026[A700]FD <1> clropt [internalflags3], dif3_input_re_closed 12372 0000CB2E F606[A500]01 <1> testopt [internalflags3], dif3_input_cmdline 12373 0000CB33 7515 <1> jnz @F 12374 <1> %if _INPUT_FILE_HANDLES 12375 0000CB35 E8E1DD <1> call InDos 12376 0000CB38 7507 <1> jnz .notfile1 12377 0000CB3A F606[A200]10 <1> testopt [internalflags2], dif2_input_file 12378 0000CB3F 7509 <1> jnz @F 12379 <1> .notfile1: 12380 <1> %endif 12381 <1> %if _INPUT_FILE_BOOT 12382 0000CB41 F606[A300]02 <1> testopt [internalflags2], dif2_input_file_boot 12383 0000CB46 7502 <1> jnz @F 12384 <1> %endif 12385 0000CB48 EB47 <1> jmp .clear_notatty 12386 <1> 12387 <1> @@: 12388 0000CB4A F606[A500]02 <1> testopt [internalflags3], dif3_input_cmdline_closed 12389 0000CB4F 741A <1> jz @F 12390 0000CB51 8026[A500]FD <1> clropt [internalflags3], dif3_input_cmdline_closed 12391 <1> %if _INPUT_FILE_HANDLES 12392 0000CB56 E8C0DD <1> call InDos 12393 0000CB59 7507 <1> jnz .notfile2 12394 0000CB5B F606[A200]10 <1> testopt [internalflags2], dif2_input_file 12395 0000CB60 7509 <1> jnz @F 12396 <1> .notfile2: 12397 <1> %endif 12398 <1> %if _INPUT_FILE_BOOT 12399 0000CB62 F606[A300]02 <1> testopt [internalflags2], dif2_input_file_boot 12400 0000CB67 7502 <1> jnz @F 12401 <1> %endif 12402 0000CB69 EB26 <1> jmp .clear_notatty 12403 <1> 12404 <1> @@: 12405 <1> %if _INPUT_FILE_BOOT 12406 0000CB6B F606[A300]04 <1> testopt [internalflags2], dif2_closed_input_file_boot 12407 0000CB70 7413 <1> jz @F 12408 0000CB72 8026[A300]FB <1> clropt [internalflags2], dif2_closed_input_file_boot 12409 <1> %if _INPUT_FILE_HANDLES 12410 0000CB77 E89FDD <1> call InDos 12411 0000CB7A 7507 <1> jnz .notfile3 12412 0000CB7C F606[A200]10 <1> testopt [internalflags2], dif2_input_file 12413 0000CB81 7502 <1> jnz @F 12414 <1> .notfile3: 12415 <1> %endif 12416 0000CB83 EB0C <1> jmp .clear_notatty 12417 <1> @@: 12418 <1> %endif 12419 <1> %if _INPUT_FILE_HANDLES 12420 0000CB85 F606[A200]20 <1> testopt [internalflags2], dif2_closed_input_file 12421 0000CB8A 7411 <1> jz @F 12422 0000CB8C 8026[A200]DF <1> clropt [internalflags2], dif2_closed_input_file 12423 <1> %else 12424 <1> jmp @F 12425 <1> %endif 12426 <1> .clear_notatty: 12427 0000CB91 F606[9C00]30 <1> testopt [internalflags], inputfile | notstdinput 12428 0000CB96 7505 <1> jnz @F 12429 0000CB98 C606[F40A]00 <1> mov byte [notatty], 0 ; it _is_ a tty 12430 <1> @@: 12431 0000CB9D C3 <1> retn 12432 <1> 12433 <1> 12434 <1> ; Fill input buffer from file. 12435 <1> ; 12436 <1> ; INP: di-> first available byte in input buffer 12437 <1> ; OUT: CY if DOS returned an error or EOF occured 12438 <1> ; NC if no error 12439 <1> ; si = di 12440 <1> ; CHG: - 12441 <1> fillbuf: 12442 0000CB9E E8D175 <1> call handle_serial_flags_ctrl_c 12443 0000CBA1 50 <1> push ax 12444 0000CBA2 53 <1> push bx 12445 0000CBA3 51 <1> push cx 12446 0000CBA4 52 <1> push dx 12447 0000CBA5 89FE <1> mov si, di ; we know this already 12448 0000CBA7 B9[0101] <1> mov cx, line_in+LINE_IN_LEN 12449 0000CBAA 89FA <1> mov dx, di 12450 0000CBAC 29F9 <1> sub cx, di 12451 0000CBAE 7703E99F00 <1> jbe .ret_cy ; if no more room --> 12452 <1> 12453 0000CBB3 F606[A700]01 <1> testopt [internalflags3], dif3_input_re 12454 0000CBB8 7429 <1> jz .not_re 12455 0000CBBA 56 <1> push si 12456 0000CBBB 57 <1> push di 12457 0000CBBC 89CB <1> mov bx, cx 12458 0000CBBE 8B36[E409] <1> mov si, word [re_buffer.position] 12459 0000CBC2 89F7 <1> mov di, si 12460 0000CBC4 B9FFFF <1> mov cx, -1 12461 0000CBC7 31C0 <1> xor ax, ax 12462 0000CBC9 F2AE <1> repne scasb 12463 0000CBCB F7D1 <1> not cx 12464 0000CBCD 49 <1> dec cx 12465 0000CBCE 39CB <1> cmp bx, cx 12466 0000CBD0 7702 <1> ja @F 12467 0000CBD2 89D9 <1> mov cx, bx 12468 <1> @@: 12469 0000CBD4 89C8 <1> mov ax, cx 12470 0000CBD6 89D7 <1> mov di, dx 12471 0000CBD8 F3A4 <1> rep movsb 12472 0000CBDA 8936[E409] <1> mov word [re_buffer.position], si 12473 0000CBDE 5F <1> pop di 12474 0000CBDF 5E <1> pop si 12475 0000CBE0 F8 <1> clc 12476 0000CBE1 EB61 <1> jmp .after 12477 <1> 12478 <1> .not_re: 12479 <1> 12480 <1> %if _INPUT_FILE_BOOT 12481 0000CBE3 F606[A300]02 <1> testopt [internalflags2], dif2_input_file_boot 12482 0000CBE8 7408 <1> jz @F 12483 0000CBEA E80404 <1> call yy_boot_remember_seek 12484 0000CBED E87EB4 <1> call yy_boot_read 12485 0000CBF0 EB52 <1> jmp .after 12486 <1> @@: 12487 <1> %endif 12488 <1> 12489 <1> %if _INPUT_FILE_HANDLES 12490 0000CBF2 E824DD <1> call InDos 12491 0000CBF5 750E <1> jnz @F 12492 0000CBF7 F606[A200]10 <1> testopt [internalflags2], dif2_input_file 12493 0000CBFC 7407 <1> jz @F ; if not input file --> 12494 0000CBFE 57 <1> push di 12495 0000CBFF E873F6 <1> call yy_get_handle ; bx = handle 12496 0000CC02 5F <1> pop di 12497 0000CC03 EB37 <1> jmp .file_handle 12498 <1> %endif 12499 <1> 12500 <1> @@: 12501 0000CC05 F606[A500]01 <1> testopt [internalflags3], dif3_input_cmdline 12502 0000CC0A 7429 <1> jz .not_cmdline 12503 0000CC0C 56 <1> push si 12504 0000CC0D 57 <1> push di 12505 0000CC0E 89CB <1> mov bx, cx 12506 0000CC10 8B36[E001] <1> mov si, word [cmdline_buffer.position] 12507 0000CC14 89F7 <1> mov di, si 12508 0000CC16 B9FFFF <1> mov cx, -1 12509 0000CC19 31C0 <1> xor ax, ax 12510 0000CC1B F2AE <1> repne scasb 12511 0000CC1D F7D1 <1> not cx 12512 0000CC1F 49 <1> dec cx 12513 0000CC20 39CB <1> cmp bx, cx 12514 0000CC22 7702 <1> ja @F 12515 0000CC24 89D9 <1> mov cx, bx 12516 <1> @@: 12517 0000CC26 89C8 <1> mov ax, cx 12518 0000CC28 89D7 <1> mov di, dx 12519 0000CC2A F3A4 <1> rep movsb 12520 0000CC2C 8936[E001] <1> mov word [cmdline_buffer.position], si 12521 0000CC30 5F <1> pop di 12522 0000CC31 5E <1> pop si 12523 0000CC32 F8 <1> clc 12524 0000CC33 EB0F <1> jmp .after 12525 <1> 12526 <1> .not_cmdline: 12527 <1> 12528 <1> @@: 12529 0000CC35 31DB <1> xor bx, bx ; bx = handle (0 is STDIN) 12530 0000CC37 E8DFDC <1> call InDos 12531 0000CC3A 7516 <1> jnz .ret_cy 12532 <1> 12533 <1> .file_handle: 12534 0000CC3C B43F <1> mov ah, 3Fh ; read from file 12535 0000CC3E E87903 <1> call yy_remember_seek 12536 <1> doscall 2160 0000CC41 E82E93 <2> call _doscall 12537 <1> .after: 12538 0000CC44 720C <1> jc .ret_cy ; if error --> 12539 0000CC46 85C0 <1> test ax, ax 12540 0000CC48 7408 <1> jz .ret_cy ; if EOF --> 12541 0000CC4A 01C2 <1> add dx, ax ; -> behind last valid byte 12542 <1> 12543 0000CC4C 8026[A500]FB <1> clropt [internalflags3], dif3_at_line_end 12544 <1> 12545 0000CC51 A8 <1> db __TEST_IMM8 ; (NC) 12546 <1> .ret_cy: 12547 0000CC52 F9 <1> stc 12548 0000CC53 8916[FC0A] <1> mov word [bufend], dx ; -> behind last valid byte 12549 0000CC57 5A <1> pop dx 12550 0000CC58 59 <1> pop cx 12551 0000CC59 5B <1> pop bx 12552 0000CC5A 58 <1> pop ax 12553 0000CC5B C3 <1> retn 12554 <1> 12555 <1> 12556 <1> %ifn _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 12557 <1> yy equ error 12558 <1> %else 12559 <1> yy: 12560 0000CC5C E81839 <1> call guard_re 12561 <1> %if _INPUT_FILE_BOOT 12562 0000CC5F F606[9D00]40 <1> testopt [internalflags], nodosloaded 12563 0000CC64 7403E99CB0 <1> jnz yy_boot 12564 <1> %endif 12565 <1> %ifn _INPUT_FILE_HANDLES 12566 <1> jmp error 12567 <1> %else 12568 0000CC69 E8ADDC <1> call InDos 12569 0000CC6C 740B <1> jz @F 12570 0000CC6E B80503 <1> mov ax, 0305h 12571 0000CC71 E81DDB <1> call setrc 12572 0000CC74 BA[506F] <1> mov dx, msg.yy_no_dos 12573 0000CC77 EB2F <1> jmp .disp_error_1 12574 <1> 12575 <1> @@: 12576 <1> ; If input_file_handles.to_close is set, 12577 <1> ; close all left over open files. (This 12578 <1> ; may only be done when DOS is available.) 12579 0000CC79 31DB <1> xor bx, bx ; if none left open, -> first structure 12580 0000CC7B F606[A200]10 <1> testopt [internalflags2], dif2_input_file 12581 0000CC80 740B <1> jz @F 12582 0000CC82 8B1E[880A] <1> mov bx, word [input_file_handles.active] 12583 0000CC86 43 <1> inc bx ; point to first unused structure 12584 0000CC87 D1E3 <1> shl bx, 1 12585 0000CC89 D1E3 <1> shl bx, 1 12586 0000CC8B D1E3 <1> shl bx, 1 ; to qword array index 12587 <1> %if INPUTFILEHANDLE_size != 8 12588 <1> %error Unexpected structure size 12589 <1> %endif 12590 <1> @@: 12591 0000CC8D 89DF <1> mov di, bx ; + input_file_handles -> to close 12592 0000CC8F 31C0 <1> xor ax, ax ; zero base amount to close 12593 0000CC91 E8C3F5 <1> call yy_close_file_handles 12594 <1> ; CHG: ax, bx, di 12595 <1> ; if we remembered to close any, do it now 12596 <1> 12597 0000CC94 4E <1> dec si 12598 0000CC95 89F3 <1> mov bx, si ; -> start of name 12599 0000CC97 89F7 <1> mov di, si ; -> start of name 12600 0000CC99 AC <1> lodsb ; load character 12601 0000CC9A E8DFEE <1> call iseol? 12602 0000CC9D 7515 <1> jne @F 12603 0000CC9F BA[926E] <1> mov dx, msg.yy_requires_filename 12604 0000CCA2 B80403 <1> mov ax, 0304h 12605 0000CCA5 E8E9DA <1> call setrc 12606 <1> .disp_error_1: 12607 0000CCA8 B8FF03 <1> mov ax, 03FFh 12608 0000CCAB E8E3DA <1> call setrc 12609 0000CCAE E87CF3 <1> call putsz_error 12610 0000CCB1 E94C33 <1> jmp cmd3 12611 <1> 12612 <1> @@: 12613 <1> .unquoted_loop: 12614 0000CCB4 3C20 <1> cmp al, 32 ; blank or EOL outside quoted part ? 12615 0000CCB6 7434 <1> je .blank 12616 0000CCB8 3C09 <1> cmp al, 9 12617 0000CCBA 7430 <1> je .blank 12618 0000CCBC E8BDEE <1> call iseol? ; (includes semicolon in lDebug) 12619 0000CCBF 742B <1> je .blank ; yes --> 12620 0000CCC1 3C22 <1> cmp al, '"' ; starting quote mark ? 12621 0000CCC3 740E <1> je .quoted ; yes --> 12622 0000CCC5 AA <1> stosb ; store character 12623 <1> .unquote: 12624 0000CCC6 AC <1> lodsb ; load character 12625 0000CCC7 EBEB <1> jmp .unquoted_loop ; continue in not-quoted loop --> 12626 <1> 12627 <1> .quoted_loop: 12628 0000CCC9 E8B4EE <1> call iseol?.notsemicolon; EOL inside quoted part ? 12629 0000CCCC 7413 <1> je .quoted_eol ; if yes, error --> 12630 0000CCCE 3C22 <1> cmp al, '"' ; ending quote mark ? 12631 0000CCD0 74F4 <1> je .unquote ; yes --> 12632 0000CCD2 AA <1> stosb ; store character 12633 <1> .quoted: 12634 0000CCD3 AC <1> lodsb ; load character 12635 0000CCD4 EBF3 <1> jmp .quoted_loop ; continue in quoted loop --> 12636 <1> 12637 <1> .empty: 12638 0000CCD6 B80603 <1> mov ax, 0306h 12639 0000CCD9 E8B5DA <1> call setrc 12640 0000CCDC BA[B36E] <1> mov dx, msg.yy_filename_empty 12641 0000CCDF EBC7 <1> jmp .disp_error_1 12642 <1> 12643 <1> .quoted_eol: 12644 0000CCE1 B80703 <1> mov ax, 0307h 12645 0000CCE4 E8AADA <1> call setrc 12646 0000CCE7 BA[7A6F] <1> mov dx, msg.yy_filename_missing_unquote 12647 0000CCEA EBBC <1> jmp .disp_error_1 12648 <1> 12649 <1> .blank: 12650 <1> ; mov byte [si - 1], 0 ; terminate (shouldn't be needed) 12651 <1> 12652 0000CCEC B000 <1> mov al, 0 12653 0000CCEE 8605 <1> xchg al, byte [di] ; terminate after filename 12654 0000CCF0 893E[1A0C] <1> mov word [terminator_in_line_in.offset], di 12655 0000CCF4 A2[1C0C] <1> mov byte [terminator_in_line_in.value], al 12656 0000CCF7 39FB <1> cmp bx, di ; empty ? 12657 0000CCF9 74DB <1> je .empty ; yes --> 12658 <1> ; done 12659 <1> 12660 0000CCFB F606[A200]10 <1> testopt [internalflags2], dif2_input_file 12661 0000CD00 7412 <1> jz @F 12662 <1> ; IFH = 1 12663 <1> ; IFH - 1 = 0 12664 <1> ; cmp active, 0 12665 <1> ; active >= 0 --> error 12666 <1> 12667 <1> ; IFH = 2 12668 <1> ; IFH - 1 = 1 12669 <1> ; cmp active, 1 12670 <1> ; active >= 1 --> error 12671 0000CD02 833E[880A]0F <1> cmp word [input_file_handles.active], _INPUT_FILE_HANDLES - 1 12672 0000CD07 720B <1> jb @F 12673 <1> 12674 0000CD09 B80803 <1> mov ax, 0308h 12675 0000CD0C E882DA <1> call setrc 12676 0000CD0F BA[D26E] <1> mov dx, msg.yy_too_many_handles 12677 0000CD12 EB94 <1> jmp .disp_error_1 12678 <1> @@: 12679 <1> 12680 0000CD14 803F3A <1> cmp byte [bx], ':' 12681 0000CD17 7552 <1> jne .not_yy_goto_subfunction 12682 <1> 12683 0000CD19 F606[A200]10 <1> testopt [internalflags2], dif2_input_file 12684 0000CD1E 750C <1> jnz @F 12685 <1> 12686 0000CD20 E858F9 <1> call getline_is_input_file? 12687 0000CD23 723A <1> jc .no_file 12688 0000CD25 F606[A500]01 <1> testopt [internalflags3], dif3_input_cmdline 12689 0000CD2A 7533 <1> jnz .no_file 12690 <1> @@: 12691 0000CD2C 43 <1> inc bx 12692 0000CD2D 89DD <1> mov bp, bx 12693 <1> 12694 0000CD2F E87001 <1> call yy_reset_buf 12695 <1> 12696 0000CD32 31DB <1> xor bx, bx ; bx = handle (0 is STDIN) 12697 <1> %if _INPUT_FILE_HANDLES 12698 0000CD34 F606[A200]10 <1> testopt [internalflags2], dif2_input_file 12699 0000CD39 7405 <1> jz @F ; if not input file --> 12700 0000CD3B 57 <1> push di 12701 0000CD3C E836F5 <1> call yy_get_handle ; bx = handle 12702 0000CD3F 5F <1> pop di 12703 <1> @@: 12704 <1> %endif 12705 0000CD40 B445 <1> mov ah, 45h 12706 <1> doscall ; duplicate file handle 2160 0000CD42 E82D92 <2> call _doscall 12707 0000CD45 7303E9DD00 <1> jc yy_open_file.error 12708 0000CD4A 93 <1> xchg ax, bx 12709 <1> 12710 0000CD4B 31C9 <1> xor cx, cx 12711 0000CD4D 31D2 <1> xor dx, dx 12712 0000CD4F B80142 <1> mov ax, 4201h ; lseek, from current file position 12713 <1> doscall ; call DOS 2160 0000CD52 E81D92 <2> call _doscall 12714 0000CD55 91 <1> xchg ax, cx ; dx:cx = current seek 12715 0000CD56 87D1 <1> xchg dx, cx ; cx:dx = current seek 12716 0000CD58 BE0001 <1> mov si, ifhfIsDup 12717 0000CD5B 93 <1> xchg ax, bx 12718 0000CD5C E9F200 <1> jmp yy_finish 12719 <1> 12720 <1> 12721 <1> .no_file: 12722 0000CD5F B80903 <1> mov ax, 0309h 12723 0000CD62 E82CDA <1> call setrc 12724 0000CD65 BA[186F] <1> mov dx, msg.yy_no_file 12725 0000CD68 E93DFF <1> jmp .disp_error_1 12726 <1> 12727 <1> .not_yy_goto_subfunction: 12728 0000CD6B 31ED <1> xor bp, bp 12729 0000CD6D E862EE <1> call skipwh0 12730 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 12731 0000CD70 8936[120C] <1> mov word [if_exists_then_address], si 12732 <1> %endif 12733 0000CD74 E8F4ED <1> call iseol?_or_then 12734 0000CD77 7425 <1> je .not_yy_goto 12735 <1> 12736 0000CD79 3C3A <1> cmp al, ':' 12737 0000CD7B 7403E9CAD9 <1> jne error 12738 <1> 12739 0000CD80 E84EEE <1> call skipwhite 12740 0000CD83 4E <1> dec si 12741 0000CD84 89F5 <1> mov bp, si 12742 <1> 12743 <1> @@: 12744 0000CD86 AC <1> lodsb 12745 0000CD87 3C20 <1> cmp al, 32 12746 0000CD89 7409 <1> je @F 12747 0000CD8B 3C09 <1> cmp al, 9 12748 0000CD8D 7405 <1> je @F 12749 0000CD8F E8EAED <1> call iseol? 12750 0000CD92 75F2 <1> jne @B 12751 <1> @@: 12752 0000CD94 E83BEE <1> call skipwh0 12753 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 12754 0000CD97 8936[120C] <1> mov word [if_exists_then_address], si 12755 <1> %endif 12756 0000CD9B E8E9ED <1> call chkeol_or_then 12757 <1> 12758 <1> .not_yy_goto: 12759 0000CD9E 89DF <1> mov di, bx 12760 <1> 12761 <1> ; INP: ds:di -> filename 12762 <1> ; OUT: File opened, 12763 <1> ; bx = file handle 12764 <1> ; STT: ds = es = ss = debugger data selector/segment 12765 <1> yy_open_file: 12766 0000CDA0 E89A00 <1> call .setup_opencreate ; ds:si -> pathname 12767 0000CDA3 B86C71 <1> mov ax, 716Ch ; LFN open-create 12768 0000CDA6 57 <1> push di 12769 0000CDA7 31FF <1> xor di, di ; alias hint 12770 0000CDA9 F9 <1> stc 12771 <1> doscall 2160 0000CDAA E8C591 <2> call _doscall 12772 0000CDAD 5F <1> pop di 12773 0000CDAE 7203E99500 <1> jnc .got ; LFN call succeeded --> 12774 <1> 12775 <1> ; Early case for no-LFN-interface available. 12776 <1> ; cmp ax, 1 12777 <1> ; je .try_sfn 12778 0000CDB3 3D0071 <1> cmp ax, 7100h 12779 0000CDB6 744D <1> je .try_sfn 12780 <1> 12781 <1> ; Only now, we check whether the used drive supports LFNs. 12782 <1> ; If it does, then we treat the error received as an 12783 <1> ; actual error and cancel here. If not, the SFN function 12784 <1> ; is called next as a fallback. 12785 <1> ; 12786 <1> ; We cannot rely on specific error returns like the 12787 <1> ; expected 7100h CY (or 7100h CF-unchanged) or the similar 12788 <1> ; 0001h CY (Invalid function) because no one agrees on what 12789 <1> ; error code to use. 12790 <1> ; 12791 <1> ; dosemu returns 0003h (Path not found) on FATFS and 12792 <1> ; redirected-non-dosemu drives. But may be changed so as to 12793 <1> ; return 0059h (Function not supported on network). 12794 <1> ; MSWindows 98SE returns 0002h (File not found) on 12795 <1> ; DOS-redirected drives. 12796 <1> ; DOSLFN with Fallback mode enabled supports the call (albeit 12797 <1> ; limited to SFNs). 12798 <1> ; 12799 <1> ; To suss out what the error means, check LFN availability. 12800 <1> ; 12801 <1> ; Refer to https://github.com/stsp/dosemu2/issues/770 12802 0000CDB8 1E <1> push ds 12803 0000CDB9 06 <1> push es 12804 0000CDBA 57 <1> push di 12805 0000CDBB 50 <1> push ax 12806 <1> lframe 12807 <1> lvar 34, fstype_buffer 12808 <1> lvar 4, pathname_buffer 12809 0000CDBC 5589E58D66DA <1> lenter 12810 <1> 12811 0000CDC2 AD <1> lodsw ; load first two bytes of pathname 12812 <1> 12813 0000CDC3 16 <1> push ss 12814 0000CDC4 1F <1> pop ds 12815 0000CDC5 89E2 <1> mov dx, sp ; ds:dx -> ?pathname_buffer 12816 0000CDC7 16 <1> push ss 12817 0000CDC8 07 <1> pop es 12818 0000CDC9 89E7 <1> mov di, sp ; es:di -> ?pathname_buffer 12819 <1> 12820 0000CDCB 80FC3A <1> cmp ah, ':' ; starts with drive specifier ? 12821 0000CDCE 7409 <1> je @F ; yes --> 12822 <1> 12823 0000CDD0 B419 <1> mov ah, 19h 12824 <1> doscall ; get current default drive 2160 0000CDD2 E89D91 <2> call _doscall 12825 0000CDD5 0441 <1> add al, 'A' ; A: = 0, convert to drive letter 12826 0000CDD7 B43A <1> mov ah, ':' ; drive specifier 12827 <1> @@: 12828 0000CDD9 AB <1> stosw 12829 0000CDDA B85C00 <1> mov ax, '\' ; backslash and zero terminator 12830 0000CDDD AB <1> stosw ; es:di -> ?fstype_buffer 12831 <1> 12832 0000CDDE 31C0 <1> xor ax, ax 12833 0000CDE0 B91100 <1> mov cx, 34 >> 1 12834 0000CDE3 57 <1> push di 12835 0000CDE4 F3AB <1> rep stosw ; initialise ?fstype_buffer to all zeros 12836 0000CDE6 5F <1> pop di ; -> ?fstype_buffer 12837 <1> 12838 0000CDE7 B92000 <1> mov cx, 32 ; size of ?fstype_buffer 12839 0000CDEA 31DB <1> xor bx, bx ; harden, initialise this 12840 0000CDEC B8A071 <1> mov ax, 71A0h ; get volume information 12841 0000CDEF F9 <1> stc 12842 <1> doscall ; (depends on ds = es = ss) 2160 0000CDF0 E87F91 <2> call _doscall 12843 <1> 12844 0000CDF3 7207 <1> jc @F ; if call not supported --> 12845 <1> ; bx = FS flags 12846 0000CDF5 F6C740 <1> test bh, 0100_0000b ; LFN interface available ? 12847 0000CDF8 F9 <1> stc ; if no 12848 0000CDF9 7401 <1> jz @F ; no --> 12849 <1> 12850 0000CDFB F8 <1> clc ; is available 12851 <1> @@: 12852 <1> 12853 0000CDFC 89EC5D <1> lleave 12854 0000CDFF 58 <1> pop ax ; (restore error code) 12855 0000CE00 5F <1> pop di 12856 0000CE01 07 <1> pop es 12857 0000CE02 1F <1> pop ds 12858 0000CE03 7322 <1> jnc .error ; if LFN interface is available, actual error 12859 <1> ; if LFN interface is not available, try SFN 12860 <1> 12861 <1> .try_sfn: 12862 0000CE05 E83500 <1> call .setup_opencreate 12863 0000CE08 B8006C <1> mov ax, 6C00h ; Open-create 12864 0000CE0B F9 <1> stc 12865 <1> doscall 2160 0000CE0C E86391 <2> call _doscall 12866 0000CE0F 7337 <1> jnc .got 12867 <1> 12868 0000CE11 83F801 <1> cmp ax, 1 12869 0000CE14 7405 <1> je .try_old_open 12870 0000CE16 3D006C <1> cmp ax, 6C00h 12871 0000CE19 750C <1> jne .error 12872 <1> 12873 <1> .try_old_open: 12874 0000CE1B 88D8 <1> mov al, bl ; access and sharing modes 12875 0000CE1D B43D <1> mov ah, 3Dh ; Open 12876 0000CE1F 89F2 <1> mov dx, si ; -> filename 12877 0000CE21 F9 <1> stc 12878 <1> doscall 2160 0000CE22 E84D91 <2> call _doscall 12879 0000CE25 7321 <1> jnc .got 12880 <1> 12881 <1> .error: 12882 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 12883 0000CE27 F606[A700]08 <1> testopt [internalflags3], dif3_in_if 12884 0000CE2C 7403E956C4 <1> jnz if_exists_not_found 12885 <1> %endif 12886 0000CE31 B80A03 <1> mov ax, 030Ah 12887 0000CE34 E85AD9 <1> call setrc 12888 0000CE37 BA[F76E] <1> mov dx, msg.yy_error_file_open 12889 0000CE3A E96BFE <1> jmp yy.disp_error_1 12890 <1> 12891 <1> .setup_opencreate: 12892 0000CE3D 89FE <1> mov si, di ; -> filename 12893 0000CE3F BB2060 <1> mov bx, 0110_0000_0010_0000b ; Auto-commit, no int 24h 12894 <1> ; DENY WRITE, Read-only 12895 0000CE42 31C9 <1> xor cx, cx ; create attribute 12896 0000CE44 BA0100 <1> mov dx, 0000_0000_0000_0001b ; no create / open, no truncate 12897 0000CE47 C3 <1> retn 12898 <1> 12899 <1> .got: 12900 <1> ; ax = file handle 12901 0000CE48 E85700 <1> call yy_reset_buf 12902 <1> 12903 0000CE4B 31C9 <1> xor cx, cx 12904 0000CE4D 31D2 <1> xor dx, dx 12905 0000CE4F 31F6 <1> xor si, si 12906 <1> yy_finish: 12907 0000CE51 F606[A200]10 <1> testopt [internalflags2], dif2_input_file 12908 0000CE56 7509 <1> jnz @F 12909 0000CE58 800E[A200]10 <1> setopt [internalflags2], dif2_input_file 12910 0000CE5D 31DB <1> xor bx, bx 12911 0000CE5F EB18 <1> jmp @FF 12912 <1> 12913 <1> @@: 12914 0000CE61 FF06[880A] <1> inc word [input_file_handles.active] 12915 0000CE65 8B1E[880A] <1> mov bx, word [input_file_handles.active] 12916 0000CE69 D1E3 <1> shl bx, 1 12917 0000CE6B D1E3 <1> shl bx, 1 12918 0000CE6D D1E3 <1> shl bx, 1 ; to qword array index 12919 <1> %if INPUTFILEHANDLE_size != 8 12920 <1> %error Unexpected structure size 12921 <1> %endif 12922 0000CE6F 8BBF[020A] <1> mov di, word [input_file_handles + bx - INPUTFILEHANDLE_size + ifhFlags] 12923 0000CE73 81E700F0 <1> and di, ifhfTestReserved1 | ifhfTestReserved2 | ifhfQuietInput | ifhfQuietOutput 12925 0000CE77 09FE <1> or si, di 12926 <1> @@: 12927 <1> 12928 0000CE79 8987[080A] <1> mov word [input_file_handles + bx + ifhHandle], ax 12929 0000CE7D 89B7[0A0A] <1> mov word [input_file_handles + bx + ifhFlags], si 12930 0000CE81 8997[0C0A] <1> mov word [input_file_handles + bx + ifhParentSeek], dx 12931 0000CE85 898F[0E0A] <1> mov word [input_file_handles + bx + ifhParentSeek + 2], cx 12932 <1> 12933 0000CE89 8026[A700]EF <1> clropt [internalflags3], dif3_auxbuff_guarded_1 12934 0000CE8E 89EE <1> mov si, bp 12935 0000CE90 85F6 <1> test si, si 12936 0000CE92 7403E99901 <1> jnz cmd_goto.yy_entry 12937 <1> 12938 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 12939 0000CE97 F606[A700]08 <1> testopt [internalflags3], dif3_in_if 12940 0000CE9C 7403E9F3C3 <1> jnz if_exists_found_open 12941 <1> %endif 12942 0000CEA1 C3 <1> retn 12943 <1> %endif 12944 <1> %endif 12945 <1> 12946 <1> 12947 <1> ; INP: word [bufnext], word [bufend] 12948 <1> ; CHG: - 12949 <1> ; 12950 <1> ; Note: When reading from a file, we buffer some of the input 12951 <1> ; in line_in. When switching to a non-file, or starting 12952 <1> ; to read from another file, we have to reset the seek 12953 <1> ; position of the (prior) file to avoid losing the data. 12954 <1> ; This cropped up during yy development, but actually 12955 <1> ; affects serial and InDOS input, too. Therefore, 12956 <1> ; this function is not below the conditional for yy. 12957 <1> yy_reset_buf: 12958 0000CEA2 51 <1> push cx 12959 <1> %if _NEWFULLHANDLING 12960 0000CEA3 B9[0300] <1> mov cx, line_in + 3 12961 <1> %else 12962 <1> mov cx, line_in + 2 12963 <1> %endif 12964 0000CEA6 870E[FA0A] <1> xchg cx, word [bufnext] 12965 0000CEAA F7D9 <1> neg cx 12966 0000CEAC 030E[FC0A] <1> add cx, word [bufend] ; cx = how much remaining in buffer 12967 <1> %if _NEWFULLHANDLING 12968 0000CEB0 C706[FC0A][0300] <1> mov word [bufend], line_in + 3 12969 <1> %else 12970 <1> mov word [bufend], line_in + 2 12971 <1> %endif 12972 <1> 12973 0000CEB6 F606[A200]40 <1> testopt [internalflags2], dif2_did_getline_file 12974 0000CEBB 7469 <1> jz .not_used 12975 <1> 12976 0000CEBD 50 <1> push ax 12977 0000CEBE 52 <1> push dx 12978 0000CEBF 53 <1> push bx 12979 0000CEC0 89CA <1> mov dx, cx 12980 0000CEC2 31C9 <1> xor cx, cx 12981 0000CEC4 F7DA <1> neg dx ; dx = minus how much remaining 12982 0000CEC6 7456 <1> jz .done ; if zero, do not seek at all --> 12983 0000CEC8 49 <1> dec cx ; sign extension into cx:dx 12984 <1> 12985 0000CEC9 F606[A700]01 <1> testopt [internalflags3], dif3_input_re 12986 0000CECE 7406 <1> jz @F 12987 0000CED0 0116[E409] <1> add word [re_buffer.position], dx 12988 0000CED4 EB48 <1> jmp .done 12989 <1> @@: 12990 <1> 12991 <1> %if _INPUT_FILE_BOOT 12992 0000CED6 F606[A300]02 <1> testopt [internalflags2], dif2_input_file_boot 12993 0000CEDB 741E <1> jz @F 12994 0000CEDD F606[A700]30 <1> testopt [internalflags3], dif3_auxbuff_guarded_1 | dif3_auxbuff_guarded_2 12995 0000CEE2 7412 <1> jz .do_boot_seek 12996 <1> 12997 0000CEE4 FF36[0092] <1> push word [load_input_file.active] 12998 0000CEE8 8F06[980A] <1> pop word [boot_remember_seek_handle] 12999 0000CEEC 890E[960A] <1> mov word [boot_remember_seek_offset + 2], cx 13000 0000CEF0 8916[940A] <1> mov word [boot_remember_seek_offset], dx 13001 0000CEF4 EB28 <1> jmp .done 13002 <1> 13003 <1> .do_boot_seek: 13004 0000CEF6 E8FFB2 <1> call yy_boot_seek_current 13005 0000CEF9 EB23 <1> jmp .done 13006 <1> @@: 13007 <1> %endif 13008 <1> 13009 <1> %if _INPUT_FILE_HANDLES 13010 0000CEFB F606[A200]10 <1> testopt [internalflags2], dif2_input_file 13011 0000CF00 7407 <1> jz @F ; if not input file --> 13012 0000CF02 57 <1> push di 13013 0000CF03 E86FF3 <1> call yy_get_handle ; bx = handle 13014 0000CF06 5F <1> pop di 13015 0000CF07 EB0F <1> jmp .filehandle 13016 <1> @@: 13017 <1> %endif 13018 <1> 13019 0000CF09 F606[A500]01 <1> testopt [internalflags3], dif3_input_cmdline 13020 0000CF0E 7406 <1> jz @F 13021 0000CF10 0116[E001] <1> add word [cmdline_buffer.position], dx 13022 0000CF14 EB08 <1> jmp .done 13023 <1> @@: 13024 <1> 13025 0000CF16 31DB <1> xor bx, bx ; bx = handle (0 is STDIN) 13026 <1> .filehandle: 13027 0000CF18 B80142 <1> mov ax, 4201h ; lseek, from current file position 13028 0000CF1B E80A00 <1> call handle_seek_or_remember 13029 <1> 13030 <1> .done: 13031 0000CF1E 5B <1> pop bx 13032 0000CF1F 5A <1> pop dx 13033 0000CF20 58 <1> pop ax 13034 <1> 13035 0000CF21 8026[A200]BF <1> clropt [internalflags2], dif2_did_getline_file 13036 <1> 13037 <1> .not_used: 13038 0000CF26 59 <1> pop cx 13039 0000CF27 C3 <1> retn 13040 <1> 13041 <1> 13042 <1> handle_seek_or_remember: 13043 0000CF28 E8EED9 <1> call InDos 13044 0000CF2B 7411 <1> jz @F 13045 <1> 13046 0000CF2D A3[8C0A] <1> mov word [indos_remember_seek_function], ax 13047 0000CF30 891E[8E0A] <1> mov word [indos_remember_seek_handle], bx 13048 0000CF34 890E[920A] <1> mov word [indos_remember_seek_offset + 2], cx 13049 0000CF38 8916[900A] <1> mov word [indos_remember_seek_offset], dx 13050 0000CF3C EB03 <1> jmp .done 13051 <1> 13052 <1> @@: 13053 <1> doscall ; call DOS 2160 0000CF3E E83190 <2> call _doscall 13054 <1> .done: 13055 0000CF41 C3 <1> retn 13056 <1> 13057 <1> 13058 <1> yy_reset_buf_and_seek_start: 13059 0000CF42 51 <1> push cx 13060 0000CF43 50 <1> push ax 13061 0000CF44 52 <1> push dx 13062 0000CF45 53 <1> push bx 13063 <1> %if _NEWFULLHANDLING 13064 0000CF46 B8[0300] <1> mov ax, line_in + 3 13065 <1> %else 13066 <1> mov ax, line_in + 2 13067 <1> %endif 13068 0000CF49 A3[FA0A] <1> mov word [bufnext], ax 13069 0000CF4C A3[FC0A] <1> mov word [bufend], ax 13070 <1> 13071 0000CF4F 31D2 <1> xor dx, dx 13072 0000CF51 31C9 <1> xor cx, cx 13073 <1> 13074 0000CF53 F606[A700]01 <1> testopt [internalflags3], dif3_input_re 13075 0000CF58 7408 <1> jz @F 13076 0000CF5A C706[E409][E401] <1> mov word [re_buffer.position], re_buffer 13077 0000CF60 EB37 <1> jmp .done 13078 <1> @@: 13079 <1> 13080 <1> %if _INPUT_FILE_BOOT 13081 0000CF62 F606[A300]02 <1> testopt [internalflags2], dif2_input_file_boot 13082 0000CF67 7408 <1> jz @F 13083 0000CF69 E86A00 <1> call yy_boot_clear_remember_seek 13084 0000CF6C E8D3B4 <1> call yy_boot_seek_start 13085 0000CF6F EB28 <1> jmp .done 13086 <1> @@: 13087 <1> %endif 13088 <1> 13089 <1> %if _INPUT_FILE_HANDLES 13090 0000CF71 F606[A200]10 <1> testopt [internalflags2], dif2_input_file 13091 0000CF76 7407 <1> jz @F ; if not input file --> 13092 0000CF78 57 <1> push di 13093 0000CF79 E8F9F2 <1> call yy_get_handle ; bx = handle 13094 0000CF7C 5F <1> pop di 13095 0000CF7D EB11 <1> jmp .filehandle 13096 <1> @@: 13097 <1> %endif 13098 <1> 13099 0000CF7F F606[A500]01 <1> testopt [internalflags3], dif3_input_cmdline 13100 0000CF84 7408 <1> jz @F 13101 0000CF86 C706[E001][E000] <1> mov word [cmdline_buffer.position], cmdline_buffer 13102 0000CF8C EB0B <1> jmp .done 13103 <1> @@: 13104 <1> 13105 0000CF8E 31DB <1> xor bx, bx ; bx = handle (0 is STDIN) 13106 <1> 13107 <1> .filehandle: 13108 0000CF90 E80B00 <1> call yy_clear_remember_seek 13109 0000CF93 B80042 <1> mov ax, 4200h ; seek from start 13110 0000CF96 E88FFF <1> call handle_seek_or_remember 13111 <1> .done: 13112 0000CF99 5B <1> pop bx 13113 0000CF9A 5A <1> pop dx 13114 0000CF9B 58 <1> pop ax 13115 0000CF9C 59 <1> pop cx 13116 0000CF9D C3 <1> retn 13117 <1> 13118 <1> 13119 <1> yy_clear_remember_seek: 13120 0000CF9E 391E[8E0A] <1> cmp word [indos_remember_seek_handle], bx 13121 0000CFA2 7515 <1> jne .ret 13122 <1> .clear: 13123 0000CFA4 C706[8C0A]0142 <1> mov word [indos_remember_seek_function], 4201h 13124 0000CFAA 830E[8E0A]FF <1> or word [indos_remember_seek_handle], -1 13125 0000CFAF 8326[920A]00 <1> and word [indos_remember_seek_offset + 2], 0 13126 0000CFB4 8326[900A]00 <1> and word [indos_remember_seek_offset], 0 13127 <1> .ret: 13128 0000CFB9 C3 <1> retn 13129 <1> 13130 <1> 13131 <1> yy_remember_seek: 13132 0000CFBA 391E[8E0A] <1> cmp word [indos_remember_seek_handle], bx 13133 0000CFBE 75F9 <1> jne yy_clear_remember_seek.ret 13134 <1> 13135 0000CFC0 50 <1> push ax 13136 0000CFC1 51 <1> push cx 13137 0000CFC2 52 <1> push dx 13138 0000CFC3 8B0E[920A] <1> mov cx, word [indos_remember_seek_offset + 2] 13139 0000CFC7 8B16[900A] <1> mov dx, word [indos_remember_seek_offset] 13140 0000CFCB A1[8C0A] <1> mov ax, word [indos_remember_seek_function] 13141 <1> doscall ; call DOS 2160 0000CFCE E8A18F <2> call _doscall 13142 0000CFD1 5A <1> pop dx 13143 0000CFD2 59 <1> pop cx 13144 0000CFD3 58 <1> pop ax 13145 0000CFD4 EBCE <1> jmp yy_clear_remember_seek.clear 13146 <1> 13147 <1> 13148 <1> %if _INPUT_FILE_BOOT 13149 <1> yy_boot_clear_remember_seek: 13150 0000CFD6 50 <1> push ax 13151 0000CFD7 A1[0092] <1> mov ax, word [load_input_file.active] 13152 0000CFDA 3906[980A] <1> cmp word [boot_remember_seek_handle], ax 13153 0000CFDE 750F <1> jne .ret_pop_ax 13154 <1> .clear: 13155 0000CFE0 830E[980A]FF <1> or word [boot_remember_seek_handle], -1 13156 0000CFE5 8326[960A]00 <1> and word [boot_remember_seek_offset + 2], 0 13157 0000CFEA 8326[940A]00 <1> and word [boot_remember_seek_offset], 0 13158 <1> .ret_pop_ax: 13159 0000CFEF 58 <1> pop ax 13160 0000CFF0 C3 <1> retn 13161 <1> 13162 <1> 13163 <1> yy_boot_remember_seek: 13164 0000CFF1 50 <1> push ax 13165 0000CFF2 A1[0092] <1> mov ax, word [load_input_file.active] 13166 0000CFF5 3906[980A] <1> cmp word [boot_remember_seek_handle], ax 13167 0000CFF9 75F4 <1> jne yy_boot_clear_remember_seek.ret_pop_ax 13168 <1> 13169 0000CFFB 53 <1> push bx 13170 0000CFFC 51 <1> push cx 13171 0000CFFD 52 <1> push dx 13172 0000CFFE 8B0E[960A] <1> mov cx, word [boot_remember_seek_offset + 2] 13173 0000D002 8B16[940A] <1> mov dx, word [boot_remember_seek_offset] 13174 0000D006 E8EFB1 <1> call yy_boot_seek_current 13175 0000D009 5A <1> pop dx 13176 0000D00A 59 <1> pop cx 13177 0000D00B 5B <1> pop bx 13178 0000D00C EBD2 <1> jmp yy_boot_clear_remember_seek.clear 13179 <1> %endif 13180 <1> 13181 <1> 13182 <1> cmd_goto: 13183 0000D00E E8C0EB <1> call skipwhite 13184 0000D011 3C3A <1> cmp al, ':' 13185 0000D013 7503 <1> jne @F 13186 0000D015 E8B9EB <1> call skipwhite 13187 <1> @@: 13188 <1> 13189 0000D018 E860F6 <1> call getline_is_input_file? 13190 0000D01B 7312 <1> jnc @F 13191 0000D01D BA[8066] <1> mov dx, msg.goto_not_file 13192 0000D020 B80003 <1> mov ax, 0300h 13193 0000D023 E86BD7 <1> call setrc 13194 <1> .error: 13195 0000D026 B8FF03 <1> mov ax, 03FFh 13196 0000D029 E865D7 <1> call setrc 13197 0000D02C E9FEEF <1> jmp putsz_error 13198 <1> 13199 <1> @@: 13200 0000D02F 4E <1> dec si 13201 <1> .yy_entry: ; si -> destination label 13202 0000D030 BA[7866] <1> mov dx, msg.sof 13203 0000D033 E8E7EA <1> call isstring? 13204 0000D036 751B <1> jne @F 13205 0000D038 E896EB <1> call skipwhite 13206 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 13207 0000D03B 8936[120C] <1> mov word [if_exists_then_address], si 13208 <1> %endif 13209 0000D03F E845EB <1> call chkeol_or_then 13210 0000D042 E8D700 <1> call resetrc 13211 0000D045 E8FAFE <1> call yy_reset_buf_and_seek_start 13212 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 13213 0000D048 F606[A700]08 <1> testopt [internalflags3], dif3_in_if 13214 0000D04D 7403E942C2 <1> jnz if_exists_found_open 13215 <1> %endif 13216 0000D052 C3 <1> retn 13217 <1> 13218 <1> @@: 13219 0000D053 BA[7C66] <1> mov dx, msg.eof 13220 0000D056 E8C4EA <1> call isstring? 13221 0000D059 751B <1> jne @F 13222 0000D05B E873EB <1> call skipwhite 13223 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 13224 0000D05E 8936[120C] <1> mov word [if_exists_then_address], si 13225 <1> %endif 13226 0000D062 E822EB <1> call chkeol_or_then 13227 0000D065 E8B400 <1> call resetrc 13228 0000D068 E849F6 <1> call getline_close_file 13229 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 13230 0000D06B F606[A700]08 <1> testopt [internalflags3], dif3_in_if 13231 0000D070 7403E924C2 <1> jnz if_exists_found_closed 13232 <1> %endif 13233 0000D075 C3 <1> retn 13234 <1> 13235 <1> @@: 13236 0000D076 89F3 <1> mov bx, si 13237 0000D078 B9FFFF <1> mov cx, -1 13238 <1> .loop: 13239 0000D07B 41 <1> inc cx 13240 0000D07C AC <1> lodsb 13241 0000D07D 3C20 <1> cmp al, 32 13242 0000D07F 7409 <1> je .end 13243 0000D081 3C09 <1> cmp al, 9 13244 0000D083 7405 <1> je .end 13245 0000D085 E8F4EA <1> call iseol? 13246 0000D088 75F1 <1> jne .loop 13247 <1> .end: 13248 0000D08A C644FF00 <1> mov byte [si - 1], 0 ; terminate 13249 0000D08E E841EB <1> call skipwh0 13250 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 13251 0000D091 8936[120C] <1> mov word [if_exists_then_address], si 13252 <1> %endif 13253 0000D095 E8EFEA <1> call chkeol_or_then 13254 0000D098 E376 <1> jcxz .empty 13255 0000D09A 41 <1> inc cx ; space for zero terminator 13256 0000D09B 41 <1> inc cx ; round up 13257 0000D09C 80E1FE <1> and cl, ~1 ; align to word 13258 0000D09F 89E5 <1> mov bp, sp 13259 0000D0A1 29CC <1> sub sp, cx ; allocate stack space 13260 0000D0A3 89DE <1> mov si, bx ; -> label in line_in 13261 0000D0A5 89E7 <1> mov di, sp ; -> buffer on stack 13262 0000D0A7 57 <1> push di 13263 <1> @@: 13264 0000D0A8 AC <1> lodsb 13265 0000D0A9 E86FBD <1> call uppercase ; normalise the name in buffer 13266 0000D0AC AA <1> stosb 13267 0000D0AD E2F9 <1> loop @B ; copy all or all+1 13268 <1> 13269 0000D0AF E890FE <1> call yy_reset_buf_and_seek_start 13270 <1> 13271 <1> .next_line: 13272 0000D0B2 800E[A500]88 <1> setopt [internalflags3], dif3_quiet_input_single | dif3_return_eof 13273 0000D0B7 31C9 <1> xor cx, cx 13274 0000D0B9 E838F3 <1> call getline.use_dif3_flags 13275 0000D0BC 7228 <1> jc .notfound 13276 0000D0BE 89F3 <1> mov bx, si 13277 0000D0C0 3C3A <1> cmp al, ':' 13278 0000D0C2 75EE <1> jne .next_line 13279 0000D0C4 E80AEB <1> call skipwhite 13280 0000D0C7 5A <1> pop dx 13281 0000D0C8 52 <1> push dx 13282 0000D0C9 4E <1> dec si 13283 0000D0CA E850EA <1> call isstring? 13284 0000D0CD 75E3 <1> jne .next_line 13285 0000D0CF 8D77FF <1> lea si, [bx - 1] 13286 0000D0D2 AC <1> lodsb 13287 0000D0D3 89EC <1> mov sp, bp 13288 0000D0D5 E84400 <1> call resetrc 13289 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 13290 0000D0D8 F606[A700]08 <1> testopt [internalflags3], dif3_in_if 13291 0000D0DD 7403E9B2C1 <1> jnz if_exists_found_open 13292 <1> %endif 13293 0000D0E2 5A <1> pop dx ; return address to cmd3 13294 0000D0E3 E9D732 <1> jmp cmd3_notblank 13295 <1> 13296 <1> .notfound: 13297 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 13298 0000D0E6 F606[A700]08 <1> testopt [internalflags3], dif3_in_if 13299 0000D0EB 751B <1> jnz @F 13300 <1> %endif 13301 0000D0ED B80103 <1> mov ax, 0301h 13302 0000D0F0 E89ED6 <1> call setrc 13303 0000D0F3 BA[E866] <1> mov dx, msg.goto_not_found.1 13304 0000D0F6 E834EF <1> call putsz_error 13305 0000D0F9 5A <1> pop dx 13306 0000D0FA E830EF <1> call putsz_error 13307 0000D0FD BA[0867] <1> mov dx, msg.goto_not_found.2 13308 0000D100 E82AEF <1> call putsz_error 13309 0000D103 89EC <1> mov sp, bp 13310 0000D105 E9ACF5 <1> jmp getline_close_file 13311 <1> 13312 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 13313 <1> @@: 13314 0000D108 89EC <1> mov sp, bp 13315 0000D10A E8A7F5 <1> call getline_close_file 13316 0000D10D E977C1 <1> jmp if_exists_not_found 13317 <1> %endif 13318 <1> 13319 <1> .empty: 13320 0000D110 B80203 <1> mov ax, 0302h 13321 0000D113 E87BD6 <1> call setrc 13322 0000D116 BA[BF66] <1> mov dx, msg.goto_empty 13323 0000D119 E90AFF <1> jmp .error 13324 <1> 13325 <1> 13326 <1> resetrc: 13327 0000D11C FF36[000B] <1> push word [priorrc] 13328 0000D120 8F06[FE0A] <1> pop word [rc] 13329 0000D124 C3 <1> retn 13330 <1> 13331 <1> 13332 <1> %include "serialp.asm" 13333 <2> 13334 <2> %if 0 13335 <2> 13336 <2> Serial port handling code 13337 <2> 13338 <2> 2019 by C. Masloch 13339 <2> based on http://www.sci.muni.cz/docs/pc/serport.txt The Serial Port rel. 14 13340 <2> 13341 <2> Usage of the works is permitted provided that this 13342 <2> instrument is retained with the works, so that any entity 13343 <2> that uses the works is notified of this instrument. 13344 <2> 13345 <2> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 13346 <2> 13347 <2> %endif 13348 <2> 13349 <2> 13350 <2> usesection lDEBUG_DATA_ENTRY 13351 <2> 13352 000098D2 CB <2> iisphwreset serial_interrupt_handler 13353 <2> 13354 000098D3 00 <2> align 2, db 0 13355 000098D4 EB10000000004B4280- <2> iispentry serial_interrupt_handler, 80h, serial_interrupt_handler 13355 000098DD EBF300 <2> 13356 000098E6 2EF606[F70B]01 <2> testopt [cs:serial_flags], sf_init_done 13357 000098EC 7505 <2> jnz @F 13358 000098EE 2EFF2E[D698] <2> jmp far [cs:.next] 13359 <2> @@: 13360 000098F3 50 <2> push ax 13361 000098F4 51 <2> push cx 13362 000098F5 52 <2> push dx ; first save the regs we need to change 13363 000098F6 1E <2> push ds 13364 000098F7 56 <2> push si 13365 <2> 13366 000098F8 0E <2> push cs 13367 000098F9 1F <2> pop ds 13368 000098FA B020 <2> mov al, 20h ; acknowledge interrupt 13369 000098FC 803E[2B09]00 <2> cmp byte [serial_use_irqmask + 1], 0 13370 00009901 7402 <2> je @F 13371 00009903 E6A0 <2> out 0A0h, al ; to secondary PIC 13372 <2> @@: 13373 00009905 E620 <2> out 20h, al ; to primary PIC 13374 00009907 FC <2> cld 13375 <2> ih_continue: 13376 00009908 8B16[2609] <2> mov dx, [baseport] 13377 0000990C 42 <2> inc dx 13378 0000990D 42 <2> inc dx ; (base + 2) write FCR, read IIR 13379 <2> %if _USE_TX_FIFO 13380 0000990E A0[2109] <2> mov al, byte [serial_fcr_setting] 13381 00009911 24F9 <2> and al, ~ 0000_0110b 13382 00009913 EE <2> out dx, al ; (write FCR) configure FIFOs 13383 00009914 31C0 <2> xor ax, ax 13384 <2> %else 13385 <2> xor ax, ax 13386 <2> out dx, al ; (write FCR) configure FIFOs 13387 <2> nop 13388 <2> %endif 13389 00009916 EC <2> in al, dx ; (read IIR) get interrupt cause 13390 00009917 A801 <2> test al, 1 ; did the UART generate the int? 13391 00009919 750C <2> jnz ih_sep ; no, then it's somebody else's problem 13392 0000991B 2406 <2> and al, 6 ; mask bits not needed 13393 0000991D 89C6 <2> mov si, ax ; make a pointer out of it 13394 0000991F 4A <2> dec dx 13395 00009920 4A <2> dec dx ; = base 13396 00009921 FF94[2E99] <2> call near word [serial_interrupt_table + si] ; serve this int 13397 00009925 EBE1 <2> jmp ih_continue ; and look for more things to be done 13398 <2> ih_sep: 13399 00009927 5E <2> pop si 13400 00009928 1F <2> pop ds 13401 00009929 5A <2> pop dx ; restore regs 13402 0000992A 59 <2> pop cx 13403 0000992B 58 <2> pop ax 13404 0000992C CF <2> iret 13405 <2> 13406 0000992D 00 <2> align 2, db 0 13407 0000992E [3699][3B99][8399]- <2> serial_interrupt_table: dw int_modem,int_tx,int_rx,int_status 13407 00009934 [D699] <2> 13408 <2> 13409 <2> 13410 <2> int_modem: 13411 <2> ; just clear modem status, we are not interested in it 13412 00009936 83C206 <2> add dx, 6 13413 00009939 EC <2> in al, dx ; read MSR 13414 0000993A C3 <2> retn 13415 <2> 13416 <2> 13417 <2> int_tx: 13418 0000993B 8B16[2609] <2> mov dx, [baseport] 13419 0000993F 8B36[3209] <2> mov si, word [txtail] 13420 <2> 13421 00009943 52 <2> push dx 13422 00009944 83C205 <2> add dx, 5 13423 00009947 EC <2> in al, dx ; (base + 5) read LSR 13424 00009948 5A <2> pop dx 13425 00009949 A820 <2> test al, 20h ; Transmitter Holding Register Empty ? 13426 0000994B 7421 <2> jz itx_setup_int ; no, it was a spurious interrupt --> 13427 <2> ; This conditional detects the condition specified in 13428 <2> ; the section "Known problems with several chips": 13429 <2> ; When a 1 is written to the bit 1 (Tx int enab) in the 13430 <2> ; IER, a Tx interrupt is generated. This is an erroneous 13431 <2> ; interrupt if the THRE bit is not set. [So don't set 13432 <2> ; this bit as long as the THRE bit isn't set. CB] 13433 <2> 13434 <2> ; check if there's something to be sent 13435 <2> %if _USE_TX_FIFO 13436 0000994D B90100 <2> mov cx, 1 13437 00009950 F606[F70B]08 <2> test byte [serial_flags], sf_built_in_fifo 13438 00009955 7404 <2> jz @F 13439 00009957 8A0E[F60B] <2> mov cl, byte [serial_fifo_size] 13440 <2> @@: 13441 <2> %endif 13442 <2> itx_more: 13443 0000995B 3B36[3009] <2> cmp si, word [txhead] 13444 0000995F 7419 <2> je itx_nothing 13445 00009961 AC <2> lodsb 13446 00009962 EE <2> out dx, al ; write it to the THR 13447 <2> ; check for wrap-around in our fifo 13448 <2> tx_checkwrap 181 00009963 81FE[400A] <3> cmp si, txfifo+_TXFIFOSIZE 182 00009967 7203 <3> jb %%tx_nowrap 183 00009969 BE[C009] <3> mov si, txfifo 184 <3> %%tx_nowrap: 13449 <2> %if _USE_TX_FIFO 13450 <2> ; send as much bytes as the chip can take when available 13451 0000996C E2ED <2> loop itx_more 13452 <2> %endif 13453 <2> itx_setup_int: 13454 0000996E 3B36[3009] <2> cmp si, word [txhead] 13455 00009972 7406 <2> je itx_nothing 13456 00009974 42 <2> inc dx 13457 00009975 B003 <2> mov al, 0000_0011b 13458 00009977 EE <2> out dx, al ; write to IER 13459 00009978 EB04 <2> jmp itx_dontstop 13460 <2> itx_nothing: 13461 <2> ; no more data in the fifo, so inhibit TX interrupts 13462 0000997A 42 <2> inc dx 13463 0000997B B001 <2> mov al, 0000_0001b 13464 0000997D EE <2> out dx, al ; write to IER 13465 <2> itx_dontstop: 13466 0000997E 8936[3209] <2> mov word [txtail], si 13467 00009982 C3 <2> retn 13468 <2> 13469 <2> 13470 <2> int_rx: 13471 00009983 8B36[2C09] <2> mov si, word [rxhead] 13472 <2> irx_more: 13473 00009987 8B16[2609] <2> mov dx, [baseport] 13474 0000998B EC <2> in al, dx ; read from RBR 13475 0000998C 3C03 <2> cmp al, 3 13476 0000998E 7511 <2> jne @FF 13477 00009990 F606[F70B]02 <2> testopt [serial_flags], sf_ctrl_c 13478 00009995 7405 <2> jz @F 13479 00009997 800E[F70B]04 <2> setopt [serial_flags], sf_double_ctrl_c 13480 <2> @@: 13481 0000999C 800E[F70B]02 <2> setopt [serial_flags], sf_ctrl_c 13482 <2> @@: 13483 000099A1 8804 <2> mov byte [si], al 13484 000099A3 89F0 <2> mov ax, si 13485 000099A5 46 <2> inc si 13486 <2> ; check for wrap-around 13487 <2> rx_checkwrap 174 000099A6 81FE[C009] <3> cmp si, rxfifo+_RXFIFOSIZE 175 000099AA 7203 <3> jb %%rx_nowrap 176 000099AC BE[4009] <3> mov si, rxfifo 177 <3> %%rx_nowrap: 13488 000099AF 3936[2E09] <2> cmp word [rxtail], si 13489 000099B3 7415 <2> je @FF 13490 <2> ; see if there are more bytes to be read 13491 000099B5 83C205 <2> add dx, 5 13492 000099B8 EC <2> in al, dx ; read LSR 13493 000099B9 A801 <2> test al, 1 ; Data Available ? 13494 000099BB 75CA <2> jnz irx_more 13495 <2> .end: 13496 000099BD 8936[2C09] <2> mov word [rxhead], si 13497 <2> ; test al, 20h ; Transmitter Holding Register Empty ? 13498 <2> ; jnz int_tx ; yes, do transmit next --> 13499 <2> ; Sometimes when sending and receiving at the 13500 <2> ; same time, TX ints get lost. This is a cure. 13501 <2> ; retn 13502 000099C1 E977FF <2> jmp int_tx ; (this checks for THRE) 13503 <2> 13504 <2> @@: 13505 000099C4 8B16[2609] <2> mov dx, [baseport] 13506 000099C8 EC <2> in al, dx ; read RBR (discard) 13507 000099C9 A9 <2> db __TEST_IMM16 ; (skip mov) 13508 <2> @@: 13509 000099CA 89C6 <2> mov si, ax 13510 000099CC 83C205 <2> add dx, 5 13511 000099CF EC <2> in al, dx ; read LSR 13512 000099D0 A801 <2> test al, 1 ; Data Available ? 13513 000099D2 75F0 <2> jnz @BB 13514 000099D4 EBE7 <2> jmp .end 13515 <2> 13516 <2> 13517 <2> int_status: 13518 <2> ; just clear the status ("this trivial task is left as an exercise 13519 <2> ; to the student") 13520 000099D6 83C205 <2> add dx, 5 13521 000099D9 EC <2> in al, dx ; read LSR 13522 000099DA C3 <2> retn 13523 <2> 13524 <2> 13525 <2> usesection lDEBUG_CODE 13526 <2> 13527 <2> ; OUT: ZR if no new character in buffer 13528 <2> ; NZ if new character read, 13529 <2> ; al = character 13530 <2> ; STT: ds = debugger segment 13531 <2> serial_receive_char: 13532 0000D125 56 <2> push si 13533 <2> ; see if there are bytes to be read from the fifo 13534 0000D126 8B36[2E09] <2> mov si, word [rxtail] 13535 <2> 13536 0000D12A 3B36[2C09] <2> cmp si, word [rxhead] 13537 0000D12E 7412 <2> je .nodata 13538 0000D130 AC <2> lodsb 13539 <2> %if _ECHO_RX_TO_TX 13540 <2> %if _RX_TO_TX_ADD_LF 13541 <2> call serial_send_char_add_lf 13542 <2> %else 13543 <2> call serial_send_char 13544 <2> %endif 13545 <2> %endif 13546 <2> ; check for wrap-around 13547 <2> rx_checkwrap 174 0000D131 81FE[C009] <3> cmp si, rxfifo+_RXFIFOSIZE 175 0000D135 7203 <3> jb %%rx_nowrap 176 0000D137 BE[4009] <3> mov si, rxfifo 177 <3> %%rx_nowrap: 13548 0000D13A 8936[2E09] <2> mov word [rxtail], si 13549 0000D13E 85F6 <2> test si, si ; (NZ) 13550 0000D140 EB02 <2> jmp .return 13551 <2> 13552 <2> .nodata: 13553 0000D142 31C0 <2> xor ax, ax ; (ZR) 13554 <2> .return: 13555 0000D144 5E <2> pop si 13556 0000D145 C3 <2> retn 13557 <2> 13558 <2> 13559 <2> ; OUT: ZR if no new character in buffer 13560 <2> ; NZ if new character available, 13561 <2> ; al = character 13562 <2> ; STT: ds = debugger segment 13563 <2> serial_check_receive_char: 13564 0000D146 56 <2> push si 13565 <2> ; see if there are bytes to be read from the fifo 13566 0000D147 8B36[2E09] <2> mov si, word [rxtail] 13567 <2> 13568 0000D14B 3B36[2C09] <2> cmp si, word [rxhead] 13569 0000D14F 7405 <2> je .nodata 13570 0000D151 AC <2> lodsb 13571 0000D152 85F6 <2> test si, si ; (NZ) 13572 0000D154 EB02 <2> jmp .return 13573 <2> 13574 <2> .nodata: 13575 0000D156 31C0 <2> xor ax, ax ; (ZR) 13576 <2> .return: 13577 0000D158 5E <2> pop si 13578 0000D159 C3 <2> retn 13579 <2> 13580 <2> 13581 <2> ; OUT: NC if successful 13582 <2> ; CY if handler hooked in different interrrupt 13583 <2> ; and couldn't unhook 13584 <2> serial_install_interrupt_handler: 13585 <2> ; install interrupt handler first 13586 0000D15A A0[2209] <2> mov al, byte [serial_use_intnum] 13587 0000D15D F606[A800]01 <2> testopt [internalflags4], dif4_int_serial_hooked 13588 0000D162 740D <2> jz @F 13589 0000D164 3A06[1E0C] <2> cmp al, byte [serial_installed_intnum] 13590 0000D168 7418 <2> je .ret ; --> (NC) 13591 0000D16A 50 <2> push ax 13592 0000D16B E84A01 <2> call serial_uninstall_interrupt_handler 13593 0000D16E 58 <2> pop ax 13594 0000D16F 7211 <2> jc .ret ; --> (CY) 13595 <2> @@: 13596 0000D171 A2[1E0C] <2> mov byte [serial_installed_intnum], al 13597 0000D174 BE[D498] <2> mov si, serial_interrupt_handler 13598 0000D177 E82802 <2> call install_86m_interrupt_handler 13599 0000D17A 800E[A800]01 <2> setopt [internalflags4], dif4_int_serial_hooked 13600 0000D17F E8A704 <2> call update_inttab_optional 13601 <2> ; (NC) 13602 <2> .ret: 13603 0000D182 C3 <2> retn 13604 <2> 13605 <2> 13606 <2> %if 0 13607 <2> 13608 <2> If you do the following: 13609 <2> 13610 <2> r dspvi FF 13611 <2> r dco or= 4000 13612 <2> (wait for KEEP prompt to fail) 13613 <2> r dspvi 0B 13614 <2> r dco or= 4000 13615 <2> (try to reply to the KEEP prompt) 13616 <2> 13617 <2> In dosemu2 the default interrupt handler apparently 13618 <2> doesn't send an EOI to the PIC and thus the interrupts 13619 <2> get stuck when prompting with the correct handler. 13620 <2> Therefore, we should send an EOI to the PIC just in case. 13621 <2> 13622 <2> %endif 13623 <2> 13624 <2> ; INP: word [serial_use_irqmask] 13625 <2> ; CHG: ax 13626 <2> serial_eoi: 13627 0000D183 B020 <2> mov al, 20h ; acknowledge interrupt 13628 0000D185 803E[2B09]00 <2> cmp byte [serial_use_irqmask + 1], 0 13629 0000D18A 7402 <2> je @F 13630 0000D18C E6A0 <2> out 0A0h, al ; to secondary PIC 13631 <2> @@: 13632 0000D18E E620 <2> out 20h, al ; to primary PIC 13633 0000D190 C3 <2> retn 13634 <2> 13635 <2> 13636 <2> serial_clear_fifos: 13637 <2> ; clear fifos (not those in the 16550A, but ours) 13638 0000D191 B8[4009] <2> mov ax, rxfifo 13639 0000D194 A3[2C09] <2> mov word [rxhead], ax 13640 0000D197 A3[2E09] <2> mov word [rxtail], ax 13641 0000D19A B8[C009] <2> mov ax, txfifo 13642 0000D19D A3[3009] <2> mov word [txhead], ax 13643 0000D1A0 A3[3209] <2> mov word [txtail], ax 13644 0000D1A3 C3 <2> retn 13645 <2> 13646 <2> 13647 <2> numdef SERIAL_DL_WORD, 0 13648 <2> 13649 <2> serial_init_UART: 13650 0000D1A4 E8DCFF <2> call serial_eoi 13651 <2> ; initialize the UART 13652 0000D1A7 8B16[2609] <2> mov dx, [baseport] 13653 0000D1AB 83C203 <2> add dx, 3 ; (base + 3) read/write LCR 13654 0000D1AE EC <2> in al, dx ; read LCR 13655 0000D1AF A2[1F09] <2> mov byte [serial_save_lcr], al 13656 0000D1B2 B080 <2> mov al, 80h ; DLAB = 1 13657 0000D1B4 EE <2> out dx, al ; write LCR, make DL register accessible 13658 0000D1B5 52 <2> push dx 13659 0000D1B6 8B16[2609] <2> mov dx, [baseport] ; (base) 13660 <2> %if _SERIAL_DL_WORD 13661 <2> in ax, dx ; read bps rate divisor (DL) 13662 <2> mov word [serial_save_dl], ax 13663 <2> mov ax, word [serial_use_dl] 13664 <2> out dx, ax ; write bps rate divisor (DL) 13665 <2> %else 13666 0000D1BA EC <2> in al, dx ; read bps rate divisor low byte (DL) 13667 0000D1BB 42 <2> inc dx 13668 0000D1BC A2[1C09] <2> mov byte [serial_save_dl], al 13669 0000D1BF EC <2> in al, dx ; read bps rate divisor high byte (DL) 13670 0000D1C0 A2[1D09] <2> mov byte [serial_save_dl + 1], al 13671 0000D1C3 A0[2909] <2> mov al, byte [serial_use_dl + 1] 13672 0000D1C6 EE <2> out dx, al ; write bps rate divisor high byte (DL) 13673 0000D1C7 4A <2> dec dx 13674 0000D1C8 A0[2809] <2> mov al, byte [serial_use_dl] 13675 0000D1CB EE <2> out dx, al ; write bps rate divisor low byte (DL) 13676 <2> %endif 13677 0000D1CC 5A <2> pop dx ; (base + 3) write LCR 13678 0000D1CD A0[2309] <2> mov al, byte [serial_use_params] 13679 <2> ; DLAB = 0 and control parameters 13680 0000D1D0 EE <2> out dx, al ; write parameters 13681 <2> 13682 <2> ; is it a 16550A? 13683 0000D1D1 4A <2> dec dx ; (base + 2) write FCR, read IIR 13684 <2> %if _USE_TX_FIFO 13685 0000D1D2 B007 <2> mov al, 0000_0111b 13686 0000D1D4 0A06[2409] <2> or al, byte [serial_use_fifo] 13687 0000D1D8 A2[2109] <2> mov byte [serial_fcr_setting], al 13688 0000D1DB EE <2> out dx, al ; (write FCR) try to clear and enable FIFOs 13689 0000D1DC 90 <2> nop 13690 0000D1DD EC <2> in al, dx ; read IIR 13691 0000D1DE 800E[F70B]08 <2> or byte [serial_flags], sf_built_in_fifo 13692 <2> ; in case of built-in tx FIFO 13693 0000D1E3 24C0 <2> and al, 1100_0000b ; mask of FIFO functional bits 13694 0000D1E5 3CC0 <2> cmp al, 1100_0000b ; both bits set ? 13695 0000D1E7 740B <2> je @F ; yes --> 13696 0000D1E9 8026[F70B]F7 <2> and byte [serial_flags], ~ sf_built_in_fifo 13697 <2> ; no built-in tx FIFO 13698 0000D1EE 31C0 <2> xor ax, ax 13699 0000D1F0 A2[2109] <2> mov byte [serial_fcr_setting], al 13700 0000D1F3 EE <2> out dx, al ; (write FCR) disable the FIFOs 13701 <2> @@: 13702 <2> %else 13703 <2> xor ax, ax 13704 <2> out dx, al ; (write FCR) disable the FIFOs 13705 <2> %endif 13706 0000D1F4 4A <2> dec dx ; (base + 1) 13707 0000D1F5 EC <2> in al, dx ; read IER 13708 0000D1F6 A2[1E09] <2> mov byte [serial_save_ier], al 13709 0000D1F9 B001 <2> mov al, 0000_0001b ; allow RX interrupts 13710 0000D1FB EE <2> out dx, al ; write to IER 13711 0000D1FC 4A <2> dec dx ; (base + 0) read RBR 13712 0000D1FD EC <2> in al, dx ; clear receiver 13713 0000D1FE 83C205 <2> add dx, 5 ; (base + 5) read LSR 13714 0000D201 EC <2> in al, dx ; clear line status 13715 0000D202 42 <2> inc dx ; (base + 6) read MSR 13716 0000D203 EC <2> in al, dx ; clear modem status 13717 <2> ; free interrupt in the ICU 13718 0000D204 8B0E[2A09] <2> mov cx, word [serial_use_irqmask] 13719 0000D208 F7D1 <2> not cx ; negated mask of bits to change 13720 0000D20A 31DB <2> xor bx, bx ; all bits clear (= IRQ ON) 13721 0000D20C E81200 <2> call set_irq 13722 0000D20F 891E[1A09] <2> mov word [serial_save_irq_off], bx 13723 0000D213 890E[1809] <2> mov word [serial_save_irq_mask], cx 13724 <2> ; and enable ints from the UART 13725 0000D217 4A <2> dec dx 13726 0000D218 4A <2> dec dx ; (base + 4) 13727 0000D219 EC <2> in al, dx ; read MCR 13728 0000D21A A2[2009] <2> mov byte [serial_save_mcr], al 13729 0000D21D B008 <2> mov al, 0000_1000b 13730 0000D21F EE <2> out dx, al ; write MCR 13731 0000D220 C3 <2> retn 13732 <2> 13733 <2> ; INP: cx = negated mask of bits to change 13734 <2> ; (if bit is clear, modify corresponding IRQ) 13735 <2> ; bx = mask of what to set bits to (0 = IRQ ON, 1 = IRQ OFF) 13736 <2> ; OUT: bx = mask of bits previously set 13737 <2> ; CHG: ax 13738 <2> set_irq: 13739 0000D221 52 <2> push dx 13740 0000D222 BA0100 <2> mov dx, 1 13741 <2> .loop: 13742 0000D225 85CA <2> test dx, cx 13743 0000D227 753E <2> jnz .next 13744 0000D229 84D2 <2> test dl, dl 13745 0000D22B 741E <2> jz .high 13746 <2> 13747 <2> .low: 13748 0000D22D E421 <2> in al, 21h ; get PIC configuration 13749 0000D22F 50 <2> push ax 13750 0000D230 F7D2 <2> not dx ; dx = mask of bits to keep 13751 0000D232 20D0 <2> and al, dl ; mask to 0 the bit to set 13752 0000D234 53 <2> push bx 13753 0000D235 F7D2 <2> not dx ; dx = mask of bits to change 13754 0000D237 20D3 <2> and bl, dl ; get bit state to change to 13755 0000D239 08D8 <2> or al, bl ; set this bit state 13756 0000D23B E621 <2> out 21h, al ; configure the PIC 13757 0000D23D 5B <2> pop bx ; = saved states / still to set states 13758 0000D23E F7D2 <2> not dx ; dx = mask of bits to keep 13759 0000D240 58 <2> pop ax ; = prior config 13760 0000D241 20D3 <2> and bl, dl ; clear bits to change 13761 0000D243 F7D2 <2> not dx ; dx = mask of bits to change 13762 0000D245 20D0 <2> and al, dl ; separate out only bits to change 13763 0000D247 08C3 <2> or bl, al ; set in bx 13764 0000D249 EB1C <2> jmp .next 13765 <2> 13766 <2> .high: 13767 0000D24B E4A1 <2> in al, 0A1h ; get PIC configuration 13768 0000D24D 50 <2> push ax 13769 0000D24E F7D2 <2> not dx ; dx = mask of bits to keep 13770 0000D250 20F0 <2> and al, dh ; mask to 0 the bit to set 13771 0000D252 53 <2> push bx 13772 0000D253 F7D2 <2> not dx ; dx = mask of bits to change 13773 0000D255 20F7 <2> and bh, dh ; get bit state to change to 13774 0000D257 08F8 <2> or al, bh ; set this bit state 13775 0000D259 E6A1 <2> out 0A1h, al ; configure the PIC 13776 0000D25B 5B <2> pop bx ; = saved states / still to set states 13777 0000D25C F7D2 <2> not dx ; dx = mask of bits to keep 13778 0000D25E 58 <2> pop ax ; = prior config 13779 0000D25F 20F7 <2> and bh, dh ; clear bits to change 13780 0000D261 F7D2 <2> not dx ; dx = mask of bits to change 13781 0000D263 20F0 <2> and al, dh ; separate out only bits to change 13782 0000D265 08C7 <2> or bh, al ; set in bx 13783 <2> 13784 <2> .next: 13785 0000D267 01D2 <2> add dx, dx 13786 0000D269 75BA <2> jnz .loop 13787 0000D26B 5A <2> pop dx 13788 0000D26C C3 <2> retn 13789 <2> 13790 <2> 13791 <2> ; OUT: NC if successful 13792 <2> ; CY if couldn't unhook 13793 <2> serial_clean_up: 13794 0000D26D E813FF <2> call serial_eoi 13795 0000D270 31C0 <2> xor ax, ax 13796 0000D272 8B16[2609] <2> mov dx, [baseport] 13797 0000D276 83C204 <2> add dx, 4 ; (base + 4) 13798 <2> ; disconnect the UART from the int line 13799 0000D279 EE <2> out dx, al ; write MCR 13800 0000D27A 4A <2> dec dx 13801 0000D27B 4A <2> dec dx 13802 0000D27C 4A <2> dec dx ; (base + 1) disable UART ints 13803 0000D27D EE <2> out dx, al ; write IER 13804 0000D27E 42 <2> inc dx ; (base + 2) 13805 <2> ; disable the FIFOs (old software relies on it) 13806 0000D27F EE <2> out dx, al ; write FCR 13807 <2> 13808 <2> ; reset the UART 13809 0000D280 8B16[2609] <2> mov dx, [baseport] 13810 0000D284 83C203 <2> add dx, 3 ; (base + 3) read/write LCR 13811 0000D287 B080 <2> mov al, 80h ; DLAB = 1 13812 0000D289 EE <2> out dx, al ; write LCR, make DL register accessible 13813 0000D28A 52 <2> push dx 13814 0000D28B 8B16[2609] <2> mov dx, [baseport] ; (base) 13815 <2> %if _SERIAL_DL_WORD 13816 <2> mov ax, word [serial_save_dl] 13817 <2> out dx, ax ; write bps rate divisor (DL) 13818 <2> %else 13819 0000D28F A0[1C09] <2> mov al, byte [serial_save_dl] 13820 0000D292 EE <2> out dx, al ; write bps rate divisor low byte (DL) 13821 0000D293 42 <2> inc dx 13822 0000D294 A0[1D09] <2> mov al, byte [serial_save_dl + 1] 13823 0000D297 EE <2> out dx, al ; write bps rate divisor high byte (DL) 13824 <2> %endif 13825 0000D298 5A <2> pop dx ; (base + 3) write LCR 13826 0000D299 A0[1F09] <2> mov al, byte [serial_save_lcr] 13827 0000D29C EE <2> out dx, al ; write parameters 13828 <2> 13829 0000D29D 4A <2> dec dx ; (base + 2) write FCR, read IIR 13830 0000D29E 31C0 <2> xor ax, ax 13831 0000D2A0 EE <2> out dx, al ; (write FCR) disable the FIFOs 13832 0000D2A1 4A <2> dec dx ; (base + 1) 13833 0000D2A2 A0[1E09] <2> mov al, byte [serial_save_ier] 13834 0000D2A5 EE <2> out dx, al ; write to IER 13835 0000D2A6 8B1E[1A09] <2> mov bx, [serial_save_irq_off] 13836 <2> ; bits clear for IRQ ON 13837 0000D2AA 8B0E[1809] <2> mov cx, [serial_save_irq_mask] 13838 <2> ; negated mask of bits to change 13839 0000D2AE E870FF <2> call set_irq 13840 0000D2B1 42 <2> inc dx 13841 0000D2B2 42 <2> inc dx 13842 0000D2B3 42 <2> inc dx ; (base + 4) 13843 0000D2B4 A0[2009] <2> mov al, byte [serial_save_mcr] 13844 0000D2B7 EE <2> out dx, al ; write MCR 13845 <2> 13846 <2> ; restore int vector 13847 <2> ; OUT: NC if successful 13848 <2> ; CY if couldn't unhook 13849 <2> serial_uninstall_interrupt_handler: 13850 0000D2B8 BE[D498] <2> mov si, serial_interrupt_handler 13851 0000D2BB A0[1E0C] <2> mov al, byte [serial_installed_intnum] 13852 0000D2BE BA0100 <2> mov dx, opt4_int_serial_force >> 16 13853 0000D2C1 E85802 <2> call UnhookInterruptForce 13854 0000D2C4 7208 <2> jc @F 13855 0000D2C6 8026[A800]FE <2> clropt [internalflags4], dif4_int_serial_hooked 13856 0000D2CB E85B03 <2> call update_inttab_optional 13857 <2> ; (NC) 13858 <2> @@: 13859 0000D2CE C3 <2> retn 13860 <2> 13861 <2> 13862 <2> serial_send_char_add_lf: 13863 0000D2CF 50 <2> push ax 13864 <2> .loop: 13865 0000D2D0 E80800 <2> call serial_send_char 13866 0000D2D3 3C0D <2> cmp al, 13 ; add LF after CR; change it if you don't like it 13867 0000D2D5 B00A <2> mov al, 10 13868 0000D2D7 74F7 <2> je .loop 13869 0000D2D9 58 <2> pop ax 13870 0000D2DA C3 <2> retn 13871 <2> 13872 <2> serial_send_char: 13873 0000D2DB 56 <2> push si 13874 0000D2DC 51 <2> push cx 13875 0000D2DD 52 <2> push dx 13876 0000D2DE 06 <2> push es 13877 <2> 13878 0000D2DF 8B36[3009] <2> mov si, word [txhead] 13879 0000D2E3 8804 <2> mov byte [si],al 13880 0000D2E5 46 <2> inc si 13881 <2> ; check for wrap-around 13882 <2> tx_checkwrap 181 0000D2E6 81FE[400A] <3> cmp si, txfifo+_TXFIFOSIZE 182 0000D2EA 7203 <3> jb %%tx_nowrap 183 0000D2EC BE[C009] <3> mov si, txfifo 184 <3> %%tx_nowrap: 13883 <2> 13884 0000D2EF 50 <2> push ax 13885 <2> %if _PM 13886 0000D2F0 50 <2> push ax 13887 0000D2F1 E84F00 <2> call push_if 13888 <2> %else 13889 <2> pushf 13890 <2> %endif 13891 0000D2F4 3936[3209] <2> cmp word [txtail], si 13892 0000D2F8 7537 <2> jne .no_wait 13893 <2> 13894 <2> ; Because we enable the tx empty interrupt 13895 <2> ; when putting data into the buffer, it 13896 <2> ; should still be enabled here when the 13897 <2> ; buffer is currently full. So we only 13898 <2> ; need to wait for the interrupt to 13899 <2> ; occur and be processed by our handler. 13900 <2> 13901 0000D2FA 31C9 <2> xor cx, cx 13902 0000D2FC BA4000 <2> mov dx, 40h ; 0040h is a bimodal segment/selector 13903 0000D2FF 8EC2 <2> mov es, dx 13904 <2> .wait_reset_dx: 13905 0000D301 268B166C00 <2> mov dx, word [es:6Ch] 13906 <2> 13907 <2> .wait: 13908 0000D306 E855F0 <2> call idle 13909 <2> %if _PM 13910 0000D309 E85A00 <2> call pop_if 13911 0000D30C 50 <2> push ax 13912 0000D30D E83300 <2> call push_if 13913 <2> %else 13914 <2> popf 13915 <2> pushf 13916 <2> %endif 13917 <2> 13918 0000D310 3B36[3209] <2> cmp si, word [txtail] 13919 0000D314 751B <2> jne .no_wait 13920 <2> 13921 0000D316 263B166C00 <2> cmp dx, word [es:6Ch] 13922 0000D31B 74E9 <2> je .wait 13923 0000D31D 41 <2> inc cx 13924 0000D31E 83F95A <2> cmp cx, 5 * 18 13925 0000D321 72DE <2> jb .wait_reset_dx 13926 <2> 13927 0000D323 8026[7D00]BF <2> clropt [options], enable_serial 13928 0000D328 BA[F56A] <2> mov dx, msg.no_progress 13929 0000D32B E805ED <2> call putsz 13930 0000D32E E9CF2C <2> jmp cmd3 13931 <2> 13932 <2> .no_wait: 13933 0000D331 8936[3009] <2> mov word [txhead], si 13934 0000D335 FA <2> cli ; try to avoid interrupt while emptying buffer 13935 <2> ; test if we can send a byte right away 13936 <2> %if 0 ; int_tx checks for THRE ...- 13937 <2> mov dx, [baseport] 13938 <2> add dx, 5 ; (base + 5) 13939 <2> in al, dx ; read LSR 13940 <2> test al, 20h ; Transmitter Holding Register Empty ? 13941 <2> jz .crank ; no, just enable the interrupt --> 13942 <2> %endif 13943 <2> 13944 <2> ; call int_tx ; send bytes, enables or disables the tx interrupt 13945 0000D336 0E <2> push cs 13946 0000D337 E84C00 <2> call code_to_int_tx 13947 <2> 13948 <2> %if 0 ; -... and sets up the interrupt accordingly 13949 <2> jmp .dontcrank 13950 <2> .crank: 13951 <2> ; crank it up 13952 <2> ; note that this might not work with some very old 8250s 13953 <2> add dx, 1 - 5 ; (base + 1) write IER 13954 <2> mov al, 0000_0011b 13955 <2> out dx, al ; enable tx empty interrupt 13956 <2> .dontcrank: 13957 <2> %endif 13958 <2> %if _PM 13959 0000D33A E82900 <2> call pop_if 13960 <2> %else 13961 <2> popf 13962 <2> %endif 13963 0000D33D 58 <2> pop ax 13964 0000D33E 07 <2> pop es 13965 0000D33F 5A <2> pop dx 13966 0000D340 59 <2> pop cx 13967 0000D341 5E <2> pop si 13968 0000D342 C3 <2> retn 13969 <2> 13970 <2> %if _PM 13971 <2> push_if: 13972 <2> lframe near 13973 <2> lpar word, flags 13974 <2> lpar_return 13975 0000D343 5589E5 <2> lenter 13976 0000D346 E88CC0 <2> call ispm 13977 0000D349 7515 <2> jnz .86m 13978 <2> .pm: 13979 0000D34B 50 <2> push ax 13980 0000D34C B80209 <2> mov ax, 0902h 13981 0000D34F CD31 <2> int 31h 13982 0000D351 84C0 <2> test al, al ; 0 = disabled ? 13983 0000D353 B80000 <2> mov ax, 0 ; initialise to IF=0 13984 0000D356 7402 <2> jz @F 13985 0000D358 B402 <2> mov ah, 2 ; else, IF=1 13986 <2> @@: 13987 0000D35A 894604 <2> mov word [bp + ?flags], ax 13988 0000D35D 58 <2> pop ax 13989 0000D35E EB04 <2> jmp .end 13990 <2> .86m: 13991 0000D360 9C <2> pushf 13992 0000D361 8F4604 <2> pop word [bp + ?flags] 13993 <2> .end: 13994 0000D364 5D <2> lleave 13995 0000D365 C3 <2> lret 13996 <2> 13997 <2> pop_if: 13998 <2> lframe near 13999 <2> lpar word, flags 14000 0000D366 5589E5 <2> lenter 14001 0000D369 E869C0 <2> call ispm 14002 0000D36C 7510 <2> jnz .86m 14003 0000D36E 50 <2> push ax 14004 0000D36F B80009 <2> mov ax, 0900h ; initialise to disable VIF = 0900h 14005 0000D372 F6460502 <2> test byte [bp + ?flags + 1], 2 14006 0000D376 7401 <2> jz @F ; if to disable --> 14007 0000D378 40 <2> inc ax ; else enable VIF = 0901h 14008 <2> @@: 14009 0000D379 CD31 <2> int 31h 14010 0000D37B 58 <2> pop ax 14011 0000D37C EB04 <2> jmp .end 14012 <2> .86m: 14013 0000D37E FF7604 <2> push word [bp + ?flags] 14014 0000D381 9D <2> popf 14015 <2> .end: 14016 0000D382 5D <2> lleave 14017 0000D383 C20200 <2> lret 14018 <2> %endif 14019 <2> 14020 <2> code_to_int_tx: 14021 0000D386 2EFF36[A0D3] <2> push word [cs:.entry_retf_word] 14022 <2> %if _PM 14023 <2> ; near return address 14024 0000D38B E847C0 <2> call ispm 14025 0000D38E 7506 <2> jnz .rm 14026 <2> 14027 0000D390 FF36[068B] <2> push word [cssel] 14028 0000D394 EB01 <2> jmp @F 14029 <2> 14030 <2> %endif 14031 <2> .rm: 14032 0000D396 16 <2> push ss 14033 <2> @@: 14034 0000D397 2EFF36[9ED3] <2> push word [cs:.int_tx_word] 14035 0000D39C CB <2> retf ; jump to lDEBUG_DATA_ENTRY:int_tx 14036 <2> 14037 0000D39D 00 <2> align 2, db 0 14038 <2> .int_tx_word: 14039 0000D39E [3B99] <2> dw int_tx 14040 <2> .entry_retf_word: 14041 0000D3A0 [DB99] <2> dw entry_retf 14042 <2> 14043 <2> 14044 <2> usesection lDEBUG_DATA_ENTRY 14045 <2> 14046 <2> entry_retf: 14047 000099DB CB <2> retf 9484 9485 9486 %include "ints.asm" 9487 <1> 9488 <1> %if 0 9489 <1> 9490 <1> Interrupt hooking and unhooking 9491 <1> 9492 <1> 2021 by C. Masloch 9493 <1> 9494 <1> Usage of the works is permitted provided that this 9495 <1> instrument is retained with the works, so that any entity 9496 <1> that uses the works is notified of this instrument. 9497 <1> 9498 <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 9499 <1> 9500 <1> %endif 9501 <1> 9502 <1> usesection lDEBUG_CODE 9503 <1> 9504 <1> 9505 <1> ; INP: 86 Mode ss = word [pspdbg] = cs for handler 9506 <1> ; si -> handler entrypoint 9507 <1> ; dword [si + ieNext] = storage for next vector 9508 <1> ; al = interrupt number 9509 <1> ; CHG: ax, bx, cx, dx 9510 <1> ; STT: ss = ds (= word [pspdbg] if in 86 Mode) 9511 <1> install_86m_interrupt_handler: 9512 <1> %if _PM 9513 0000D3A2 E830C0 <1> call ispm 9514 0000D3A5 7518 <1> jnz .rm 9515 <1> 9516 0000D3A7 93 <1> xchg ax, bx ; bl = interrupt number 9517 0000D3A8 B80002 <1> mov ax, 0200h 9518 0000D3AB CD31 <1> int 31h ; cx:dx = interrupt vector 9519 0000D3AD 895402 <1> mov word [si + ieNext], dx 9520 0000D3B0 894C04 <1> mov word [si + ieNext + 2], cx 9521 <1> 9522 0000D3B3 B80102 <1> mov ax, 0201h 9523 <1> ; bl still = interrupt number 9524 0000D3B6 8B0E[B00A] <1> mov cx, word [pspdbg] ; cx => lDEBUG_DATA_ENTRY 9525 0000D3BA 89F2 <1> mov dx, si ; cx:dx -> our entrypoint 9526 0000D3BC CD31 <1> int 31h ; change vector to our handler 9527 0000D3BE C3 <1> retn 9528 <1> 9529 <1> .rm: 9530 <1> %endif 9531 <1> 9532 0000D3BF E857D5 <1> call InDos 9533 0000D3C2 741E <1> jz .notindos 9534 0000D3C4 06 <1> push es 9535 0000D3C5 1E <1> push ds 9536 0000D3C6 31DB <1> xor bx, bx 9537 0000D3C8 8EDB <1> mov ds, bx 9538 0000D3CA 88C3 <1> mov bl, al 9539 0000D3CC 01DB <1> add bx, bx 9540 0000D3CE 01DB <1> add bx, bx ; ds:bx -> interrupt vector 9541 0000D3D0 C417 <1> les dx, [bx] ; es:dx = vector 9542 0000D3D2 36895402 <1> mov word [ss:si + ieNext], dx 9543 0000D3D6 368C4404 <1> mov word [ss:si + ieNext + 2], es 9544 <1> ; save prior vector 9545 0000D3DA 8937 <1> mov word [bx], si 9546 0000D3DC 8C5702 <1> mov word [bx + 2], ss ; ss => lDEBUG_DATA_ENTRY 9547 <1> ; change vector to our handler 9548 0000D3DF 1F <1> pop ds 9549 0000D3E0 07 <1> pop es 9550 0000D3E1 C3 <1> retn 9551 <1> 9552 <1> .notindos: 9553 0000D3E2 06 <1> push es 9554 0000D3E3 B435 <1> mov ah, 35h 9555 0000D3E5 CD21 <1> int 21h 9556 0000D3E7 895C02 <1> mov word [si + ieNext], bx 9557 0000D3EA 8C4404 <1> mov word [si + ieNext + 2], es 9558 0000D3ED 07 <1> pop es 9559 0000D3EE B425 <1> mov ah, 25h 9560 0000D3F0 89F2 <1> mov dx, si ; ds => lDEBUG_DATA_ENTRY 9561 0000D3F2 CD21 <1> int 21h ; change vector to our handler 9562 0000D3F4 C3 <1> retn 9563 <1> 9564 <1> 9565 <1> %if _PM 9566 <1> get_86m_interrupt_handler_no_dos: 9567 0000D3F5 E8DDBF <1> call ispm 9568 0000D3F8 7519 <1> jnz get_86m_interrupt_handler.rm_indos 9569 <1> %endif 9570 <1> 9571 <1> ; INP: al = interrupt number 9572 <1> ; OUT: dx:bx = 86 Mode far pointer 9573 <1> ; CHG: ah 9574 <1> get_86m_interrupt_handler: 9575 <1> %if _PM 9576 0000D3FA E8D8BF <1> call ispm 9577 0000D3FD 750F <1> jnz .rm 9578 <1> 9579 0000D3FF 50 <1> push ax 9580 0000D400 51 <1> push cx 9581 0000D401 93 <1> xchg ax, bx ; bl = interrupt number 9582 0000D402 B80002 <1> mov ax, 0200h 9583 0000D405 CD31 <1> int 31h ; cx:dx = interrupt vector 9584 0000D407 87CB <1> xchg cx, bx ; bx:dx 9585 0000D409 87DA <1> xchg bx, dx ; dx:bx 9586 0000D40B 59 <1> pop cx 9587 0000D40C 58 <1> pop ax 9588 0000D40D C3 <1> retn 9589 <1> 9590 <1> .rm: 9591 <1> %endif 9592 <1> 9593 0000D40E E808D5 <1> call InDos 9594 0000D411 7412 <1> jz .notindos 9595 <1> %ifn _PM 9596 <1> get_86m_interrupt_handler_no_dos: equ $ 9597 <1> %endif 9598 <1> .rm_indos: 9599 0000D413 1E <1> push ds 9600 0000D414 31DB <1> xor bx, bx 9601 0000D416 8EDB <1> mov ds, bx 9602 0000D418 88C3 <1> mov bl, al 9603 0000D41A 01DB <1> add bx, bx 9604 0000D41C 01DB <1> add bx, bx ; ds:bx -> interrupt vector 9605 0000D41E 8B5702 <1> mov dx, word [bx + 2] 9606 0000D421 8B1F <1> mov bx, word [bx] 9607 0000D423 1F <1> pop ds 9608 0000D424 C3 <1> retn 9609 <1> 9610 <1> .notindos: 9611 0000D425 06 <1> push es 9612 0000D426 B435 <1> mov ah, 35h 9613 0000D428 CD21 <1> int 21h 9614 0000D42A 8CC2 <1> mov dx, es 9615 0000D42C 07 <1> pop es 9616 0000D42D C3 <1> retn 9617 <1> 9618 <1> 9619 <1> ; INP: al = interrupt number 9620 <1> ; OUT: ZR if offset = -1 or segment = 0 9621 <1> ; NZ else 9622 <1> ; CHG: ah, dx, bx 9623 <1> intchk: 9624 0000D42E E8C9FF <1> call get_86m_interrupt_handler 9625 0000D431 43 <1> inc bx 9626 0000D432 7402 <1> jz @F ; was 0FFFFh --> 9627 0000D434 85D2 <1> test dx, dx 9628 <1> ; jz @F ; was 0000h --> 9629 <1> @@: 9630 0000D436 C3 <1> retn 9631 <1> 9632 <1> 9633 <1> ; INP: al = interrupt number 9634 <1> ; dx:bx = 86 Mode far pointer 9635 <1> ; CHG: ah 9636 <1> set_86m_interrupt_handler: 9637 0000D437 50 <1> push ax 9638 0000D438 53 <1> push bx 9639 0000D439 51 <1> push cx 9640 0000D43A 52 <1> push dx 9641 <1> %if _PM 9642 0000D43B E897BF <1> call ispm 9643 0000D43E 750A <1> jnz .rm 9644 <1> 9645 0000D440 93 <1> xchg ax, bx ; bl = interrupt number, 9646 <1> ; dx:ax = vector 9647 0000D441 92 <1> xchg ax, dx ; ax:dx 9648 0000D442 91 <1> xchg cx, ax ; cx:dx 9649 0000D443 B80102 <1> mov ax, 0201h 9650 0000D446 CD31 <1> int 31h ; cx:dx = interrupt vector 9651 0000D448 EB21 <1> jmp .ret 9652 <1> 9653 <1> .rm: 9654 <1> %endif 9655 <1> 9656 0000D44A 1E <1> push ds 9657 0000D44B E8CBD4 <1> call InDos 9658 0000D44E 7412 <1> jz .notindos 9659 0000D450 53 <1> push bx 9660 0000D451 31DB <1> xor bx, bx 9661 0000D453 8EDB <1> mov ds, bx 9662 0000D455 88C3 <1> mov bl, al 9663 0000D457 01DB <1> add bx, bx 9664 0000D459 01DB <1> add bx, bx ; ds:bx -> interrupt vector 9665 0000D45B 895702 <1> mov word [bx + 2], dx 9666 0000D45E 8F07 <1> pop word [bx] 9667 0000D460 EB08 <1> jmp .ret_ds 9668 <1> 9669 <1> .notindos: 9670 0000D462 87DA <1> xchg bx, dx 9671 0000D464 8EDB <1> mov ds, bx ; ds:dx = vector 9672 0000D466 B425 <1> mov ah, 25h 9673 0000D468 CD21 <1> int 21h 9674 <1> .ret_ds: 9675 0000D46A 1F <1> pop ds 9676 <1> .ret: 9677 0000D46B 5A <1> pop dx 9678 0000D46C 59 <1> pop cx 9679 0000D46D 5B <1> pop bx 9680 0000D46E 58 <1> pop ax 9681 0000D46F C3 <1> retn 9682 <1> 9683 <1> 9684 <1> ; INP: dx = 86 Mode segment to access 9685 <1> ; OUT: es => segment 9686 <1> ; CHG: - 9687 <1> %if _PM 9688 <1> setes2dx: 9689 0000D470 E862BF <1> call ispm 9690 0000D473 7508 <1> jnz @F 9691 0000D475 53 <1> push bx 9692 0000D476 E876C6 <1> call setrmsegm 9693 0000D479 8EC3 <1> mov es, bx 9694 0000D47B 5B <1> pop bx 9695 0000D47C C3 <1> retn 9696 <1> 9697 <1> @@: 9698 0000D47D 8EC2 <1> mov es, dx 9699 0000D47F C3 <1> retn 9700 <1> %endif ; _PM 9701 <1> 9702 <1> 9703 <1> ; INP: ds:si -> source IISP header (or pseudo header) 9704 <1> ; es:di -> destination IISP header 9705 <1> ; OUT: EI 9706 <1> ; si and di both incremented by 6 9707 <1> ; CHG: - 9708 <1> ; STT: UP 9709 <1> update_iisp_header: 9710 0000D480 50 <1> push ax 9711 0000D481 51 <1> push cx 9712 0000D482 52 <1> push dx 9713 0000D483 57 <1> push di 9714 0000D484 56 <1> push si 9715 0000D485 06 <1> push es 9716 <1> %if _PM 9717 0000D486 E8FF8A <1> call selector_to_segment 9718 <1> %endif 9719 0000D489 1E <1> push ds 9720 0000D48A 16 <1> push ss 9721 0000D48B 1F <1> pop ds 9722 <1> 9723 <1> findinstalleddebugger: 9724 0000D48C B02D <1> mov al, 2Dh 9725 0000D48E 53 <1> push bx 9726 0000D48F E89CFF <1> call intchk 9727 0000D492 5B <1> pop bx 9728 0000D493 741E <1> jz .zero 9729 <1> 9730 0000D495 F606[8700]08 <1> testopt [options3], opt3_no_call_update 9731 0000D49A 7517 <1> jnz .zero 9732 <1> 9733 0000D49C 8A26[7183] <1> mov ah, byte [try_debugger_amis_multiplex_number] 9734 0000D4A0 E81400 <1> call .check 9735 0000D4A3 7305 <1> jnc @F 9736 <1> 9737 0000D4A5 B4FF <1> mov ah, 0FFh ; start with multiplex number 0FFh 9738 <1> .loop: 9739 0000D4A7 E80D00 <1> call .check 9740 <1> @@: 9741 0000D4AA B030 <1> mov al, 30h ; al = 30h to indicate found, ah = multiplex number 9742 0000D4AC 732E <1> jnc .end 9743 0000D4AE 80EC01 <1> sub ah, 1 ; search is backward (to find latest installed first), from 0FFh to 00h including 9744 0000D4B1 73F4 <1> jnc .loop ; try next if we didn't check all yet --> 9745 <1> 9746 <1> .zero: 9747 0000D4B3 31C0 <1> xor ax, ax ; al = 0 to indicate none found 9748 0000D4B5 EB25 <1> jmp .end ; If not found, continue --> 9749 <1> 9750 <1> 9751 <1> ; INP: ah = multiplex number to check 9752 <1> ; ds = ss = cs 9753 <1> ; OUT: CY if multiplex number unused or no signature match, 9754 <1> ; bp, ah, ds unmodified 9755 <1> ; NC if match found, 9756 <1> ; ah = multiplex number (unmodified) 9757 <1> ; CHG: si, di, es, cx, dx 9758 <1> .check: 9759 0000D4B7 F606[A800]08 <1> testopt [internalflags4], dif4_int_2D_hooked 9760 0000D4BC 7406 <1> jz @F 9761 0000D4BE 3A26[8883] <1> cmp ah, byte [amis_multiplex_number] 9762 0000D4C2 7416 <1> je .notfound ; do not use our own multiplexer --> 9763 <1> @@: 9764 0000D4C4 B000 <1> mov al, 00h ; AMIS installation check 9765 <1> %if _PM 9766 0000D4C6 E873C0 <1> call call_int2D 9767 <1> %else 9768 <1> int 2Dh ; AMIS (or "DOS reserved" = iret if no AMIS present) 9769 <1> %endif 9770 0000D4C9 3CFF <1> cmp al, 0FFh 9771 0000D4CB 750D <1> jne .notfound 9772 0000D4CD BE[4083] <1> mov si, debuggeramissig ; ds:si -> our AMIS name strings 9773 <1> %if _PM 9774 0000D4D0 E89DFF <1> call setes2dx 9775 <1> %else 9776 <1> mov es, dx ; es:di -> name strings of AMIS multiplexer that just answered 9777 <1> %endif 9778 0000D4D3 B90800 <1> mov cx, 8 ; Ignore description, only compare vendor and program name 9779 0000D4D6 F3A7 <1> repe cmpsw 9780 0000D4D8 7401 <1> je .checkret ; ZR, NC = match --> 9781 <1> .notfound: 9782 0000D4DA F9 <1> stc ; NZ, CY no match 9783 <1> .checkret: 9784 0000D4DB C3 <1> retn 9785 <1> 9786 <1> .end: 9787 0000D4DC A3[3E83] <1> mov word [debuggerfunction], ax 9788 <1> 9789 0000D4DF 1F <1> pop ds ; must be not using scratchsel ! 9790 <1> %if _PM 9791 0000D4E0 5A <1> pop dx 9792 0000D4E1 E88CFF <1> call setes2dx ; this one uses scratchsel 9793 <1> %else 9794 <1> pop es 9795 <1> %endif 9796 0000D4E4 5E <1> pop si 9797 0000D4E5 5F <1> pop di 9798 0000D4E6 5A <1> pop dx 9799 0000D4E7 59 <1> pop cx 9800 <1> ; push ax 9801 0000D4E8 36A1[3E83] <1> mov ax, word [ss:debuggerfunction] 9802 0000D4EC 85C0 <1> test ax, ax ; found the debugger ? 9803 0000D4EE 741F <1> jz @F ; no --> 9804 <1> %if _PM 9805 0000D4F0 E8E2BE <1> call ispm 9806 0000D4F3 7512 <1> jnz .86m 9807 <1> [cpu 286] 9808 0000D4F5 06 <1> push es ; es 9809 0000D4F6 E88F8A <1> call selector_to_segment ; convert to segment 9810 0000D4F9 1E <1> push ds ; ds 9811 0000D4FA E88B8A <1> call selector_to_segment ; convert to segment 9812 0000D4FD 6A2D <1> push word 2Dh ; int 2Dh 9813 0000D4FF 55 <1> push bp ; bp 9814 0000D500 E8A4BF <1> call intcall_return_parameter_es_parameter_ds 9815 0000D503 83C404 <1> add sp, 4 ; discard returned ds, es 9816 <1> __CPU__ 9817 0000D506 A9 <1> db __TEST_IMM16 ; (skip int) 9818 <1> %endif 9819 <1> .86m: 9820 0000D507 CD2D <1> int 2Dh ; call its Update IISP Header function 9821 0000D509 3CFF <1> cmp al, 0FFh ; supported ? 9822 0000D50B 58 <1> pop ax 9823 0000D50C 740D <1> je .ret ; yes. done --> 9824 0000D50E A8 <1> db __TEST_IMM8 ; (skip pop) 9825 <1> @@: 9826 0000D50F 58 <1> pop ax ; restore ax, then do manual update 9827 <1> %if _PM 9828 0000D510 50 <1> push ax 9829 0000D511 E82FFE <1> call push_if 9830 <1> %else 9831 <1> pushf 9832 <1> %endif 9833 0000D514 FA <1> cli ; try to rest while updating chain 9834 0000D515 A7 <1> cmpsw ; skip over first word (entrypoint) 9835 <1> ; (generally xxEBh or 0EA90h) 9836 0000D516 A5 <1> movsw 9837 0000D517 A5 <1> movsw ; transfer source ieNext to dest ieNext 9838 <1> %if _PM 9839 0000D518 E84BFE <1> call pop_if 9840 <1> %else 9841 <1> popf 9842 <1> %endif 9843 <1> .ret: 9844 0000D51B C3 <1> retn 9845 <1> 9846 <1> 9847 <1> ; INP: al = interrupt number 9848 <1> ; ds:si-> interrupt entry 9849 <1> ; dx = flag in word [options4 + 2] to force 9850 <1> ; dx = -1 to force unconditionally 9851 <1> ; OUT: es = ss 9852 <1> ; CY if unhooking failed, 9853 <1> ; ds:si preserved 9854 <1> ; NC if unhooking successful 9855 <1> ; CHG: ah, di, si 9856 <1> ; STT: ds = ss => data entry segment/selector 9857 <1> ; word [pspdbg] = data entry 86 Mode segment 9858 <1> UnhookInterruptForce: 9859 0000D51C E80F00 <1> call UnhookInterrupt 9860 0000D51F 730C <1> jnc .ret 9861 0000D521 83FAFF <1> cmp dx, -1 9862 0000D524 7414 <1> je UnhookInterrupt.easy 9863 0000D526 8516[8A00] <1> test word [options4 + 2], dx 9864 0000D52A 750E <1> jnz UnhookInterrupt.easy 9865 0000D52C F9 <1> stc 9866 <1> .ret: 9867 0000D52D C3 <1> retn 9868 <1> 9869 <1> 9870 <1> ; INP: al = interrupt number 9871 <1> ; ds:si-> interrupt entry 9872 <1> ; OUT: es = ss 9873 <1> ; CY if unhooking failed, 9874 <1> ; ds:si preserved 9875 <1> ; NC if unhooking successful 9876 <1> ; CHG: ah, di, si 9877 <1> ; STT: ds = ss => data entry segment/selector 9878 <1> ; word [pspdbg] = data entry 86 Mode segment 9879 <1> UnhookInterrupt: 9880 <1> ; UnhookInterruptSim (below) only checks if it's possible to unhook this interrupt. 9881 <1> ; This function really unhooks the interrupt if possible. 9882 <1> ; 9883 <1> ; This is to cover the situation when some of the hooked interrupts can unhook, 9884 <1> ; but some can't. If the uninstaller would start to unhook the interrupts and then 9885 <1> ; catch the interrupt that can't be unhooked the user would end up with a dead TSR 9886 <1> ; that's uninstalled halfway. Very bad. 9887 <1> ; 9888 <1> ; "Simulating" the unhooking first and checking if all interrupts can unhook 9889 <1> ; usually will not return such a state. 9890 0000D52E E82000 <1> call UnhookInterruptSim 9891 0000D531 7215 <1> jc .ret ; bad. --> (CY) 9892 0000D533 7405 <1> jz .easy 9893 <1> .hard: 9894 <1> ; "hard" case: UnhookInterruptSim has however already done the work, 9895 <1> ; so the hard case is here indeed easier than the easy case. 9896 0000D535 E848FF <1> call update_iisp_header ; copies our stored pointer into the other's entry 9897 0000D538 EB0D <1> jmp .ret_NC 9898 <1> .easy: 9899 0000D53A 52 <1> push dx 9900 0000D53B 53 <1> push bx 9901 0000D53C 8B5404 <1> mov dx, word [si + ieNext + 2] 9902 0000D53F 8B5C02 <1> mov bx, word [si + ieNext] ; get what we stored in the entry 9903 0000D542 E8F2FE <1> call set_86m_interrupt_handler ; easy case - just reset to the value stored 9904 0000D545 5B <1> pop bx 9905 0000D546 5A <1> pop dx 9906 <1> .ret_NC: 9907 0000D547 F8 <1> clc 9908 <1> .ret: 9909 0000D548 16 <1> push ss 9910 0000D549 07 <1> pop es 9911 0000D54A C3 <1> retn 9912 <1> 9913 <1> 9914 <1> ; INP: al = interrupt number 9915 <1> ; ds:si-> interrupt entry 9916 <1> ; dx = flag in word [options4 + 2] to force 9917 <1> ; OUT: NC if no error (hard, easy, or forced case) 9918 <1> ; CY if error 9919 <1> ; CHG: ah, es, di 9920 <1> ; STT: ds = ss => data entry segment/selector 9921 <1> ; word [pspdbg] = data entry 86 Mode segment 9922 <1> UnhookInterruptForceSim: 9923 0000D54B 8516[8A00] <1> test word [options4 + 2], dx 9924 0000D54F 751D <1> jnz UnhookInterruptSim.retn ; --> (NC) 9925 <1> 9926 <1> 9927 <1> ; INP: ds:si-> IISP entry 9928 <1> ; al = interrupt number 9929 <1> ; OUT: NC if no error (either hard or easy case), 9930 <1> ; ZR if easy case, 9931 <1> ; ds:si-> our IISP entry, containing stored interrupt 9932 <1> ; NZ if hard case, 9933 <1> ; ds:si-> our IISP entry 9934 <1> ; es:di-> IISP entry to modify 9935 <1> ; implies dword [es:di + 2] = far pointer to ours 9936 <1> ; CY if error (not first handler and no IISP chain to this handler) 9937 <1> ; CHG: ah, es, di 9938 <1> ; STT: ds = ss => data entry segment/selector 9939 <1> ; word [pspdbg] = data entry 86 Mode segment 9940 <1> UnhookInterruptSim: 9941 0000D551 52 <1> push dx 9942 0000D552 53 <1> push bx 9943 <1> 9944 <1> ; harden this, check we are an IISP entry 9945 0000D553 1E <1> push ds 9946 0000D554 07 <1> pop es ; es => our handler segment 9947 0000D555 89F3 <1> mov bx, si ; es:bx -> our handler 9948 0000D557 E8A100 <1> call IsIISPEntry? ; does it have an IISP header ? 9949 0000D55A 753D <1> jne .fail ; fail if not 9950 <1> 9951 0000D55C E89BFE <1> call get_86m_interrupt_handler ; get current vector 9952 0000D55F 39DE <1> cmp si, bx ; our pointer ? 9953 0000D561 750C <1> jne .hard 9954 0000D563 3916[B00A] <1> cmp word [pspdbg], dx ; our segment ? 9955 0000D567 7506 <1> jne .hard 9956 <1> 9957 0000D569 80E400 <1> and ah, 00h ; NC, ZR 9958 0000D56C 5B <1> pop bx 9959 0000D56D 5A <1> pop dx 9960 <1> .retn: 9961 0000D56E C3 <1> retn 9962 <1> 9963 <1> .hard: 9964 <1> %if _PM 9965 0000D56F E8FEFE <1> call setes2dx 9966 <1> %else 9967 <1> mov es, dx 9968 <1> %endif 9969 <1> 9970 <1> ; INP: ds:si-> IISP entry 9971 <1> ; es:bx-> current interrupt entry 9972 <1> ; OUT: CY if error 9973 <1> ; NC, NZ if no error, 9974 <1> ; ds:si-> our IISP entry 9975 <1> ; es:di-> IISP entry to modify 9976 <1> ; implies dword [es:di + 2] = far pointer to ours 9977 <1> ; CHG: ah, es, di, (bx, dx) 9978 <1> ; STT: ds = ss => data entry segment/selector 9979 <1> ; word [pspdbg] = data entry 86 Mode segment 9980 0000D572 E87000 <1> call SearchIISPChain 9981 0000D575 7508 <1> jne .harder 9982 <1> .found: ; found reference to our interrupt handler 9983 0000D577 89DF <1> mov di, bx ; es:di-> IISP entry that references our's 9984 0000D579 80CCFF <1> or ah, 0FFh ; NC, NZ 9985 0000D57C 5B <1> pop bx 9986 0000D57D 5A <1> pop dx 9987 0000D57E C3 <1> retn 9988 <1> 9989 <1> .harder: ; Desperate attempt to find IISP entry that references ours by 9990 <1> ; searching through the interrupts hooked by other AMIS TSRs. Note 9991 <1> ; that the plexer loop will find and search through the list of 9992 <1> ; hooked interrupts of the uninstalling TSR itself, but this causes 9993 <1> ; no trouble. 9994 <1> ; INP: ds:si-> IISP entry 9995 <1> ; OUT: CY if error 9996 <1> ; NC, NZ if no error, 9997 <1> ; ds:si-> our IISP entry 9998 <1> ; es:di-> IISP entry to modify 9999 <1> ; implies dword [es:di + 2] = far pointer to ours 10000 <1> ; CHG: ah, es, di, (bx, dx) 10001 <1> ; STT: ds = ss => data entry segment/selector 10002 <1> ; word [pspdbg] = data entry 86 Mode segment 10003 0000D57F 50 <1> push ax ; register with interrupt number last 10004 <1> 10005 0000D580 B02D <1> mov al, 2Dh 10006 0000D582 E8A9FE <1> call intchk ; ZR if offset = -1 or segment = 0 10007 <1> ; CHG: ax, dx, bx 10008 0000D585 7411 <1> jz .fail_ax 10009 <1> 10010 0000D587 31C0 <1> xor ax, ax 10011 <1> .loopplex: 10012 0000D589 B000 <1> mov al, 00h ; AMIS installation check 10013 0000D58B 51 <1> push cx 10014 <1> ; function 0 changes dx, di, cx, al 10015 <1> %if _PM 10016 0000D58C E8ADBF <1> call call_int2D 10017 <1> %else 10018 <1> int 2Dh ; enquire whether there's anyone 10019 <1> %endif 10020 0000D58F 59 <1> pop cx ; but we don't care who it might be 10021 0000D590 FEC0 <1> inc al ; = FFh ? 10022 0000D592 7409 <1> jz .search ; yes, it is in use --> 10023 <1> .nextplex: 10024 0000D594 FEC4 <1> inc ah 10025 0000D596 75F1 <1> jnz .loopplex ; try next multiplexer --> 10026 <1> .fail_ax: 10027 0000D598 58 <1> pop ax 10028 <1> .fail: ; IISP incompatible TSR between current interrupt entry and our entry 10029 <1> ; and no AMIS compatible TSR installed on top of our entry 10030 0000D599 F9 <1> stc 10031 0000D59A 5B <1> pop bx 10032 0000D59B 5A <1> pop dx 10033 0000D59C C3 <1> retn 10034 <1> 10035 <1> ; INP: ah = multiplex number of AMIS TSR to search through 10036 <1> ; ss:sp-> interrupt number (byte), must be preserved 10037 <1> ; CHG: es, di, dx, bx 10038 <1> .search: 10039 0000D59D B004 <1> mov al, 04h 10040 0000D59F 5B <1> pop bx 10041 0000D5A0 53 <1> push bx ; low byte is the interrupt number 10042 <1> ; function 4 changes dx, bx, al 10043 <1> %if _PM 10044 0000D5A1 E898BF <1> call call_int2D 10045 <1> %else 10046 <1> int 2Dh 10047 <1> %endif 10048 0000D5A4 3C03 <1> cmp al, 03h ; returned its interrupt entry ? 10049 <1> ; RBIL doesn't explicitly state that this interrupt entry has to 10050 <1> ; be IISP compatible. But I'm too lazy to look up the older AMIS, 10051 <1> ; and SearchIISPChain checks the interrupt entry anyway. 10052 0000D5A6 742B <1> je .search_dxbx 10053 0000D5A8 3C04 <1> cmp al, 04h ; returned list of hooked interrupts ? 10054 0000D5AA 75E8 <1> jne .nextplex ; no, try next multiplexer --> 10055 0000D5AC 89DF <1> mov di, bx 10056 0000D5AE 5B <1> pop bx 10057 0000D5AF 53 <1> push bx ; bl = interrupt number 10058 0000D5B0 88D8 <1> mov al, bl 10059 <1> .search_intlist_seg: 10060 <1> %if _PM 10061 0000D5B2 E8BBFE <1> call setes2dx 10062 <1> %else 10063 <1> mov es, dx ; es:di-> list 10064 <1> %endif 10065 <1> .search_intlist: ; Search the returned list for the required interrupt number. 10066 0000D5B5 AE <1> scasb ; our interrupt number ? 10067 0000D5B6 740A <1> je .search_found_intlist 10068 0000D5B8 26807DFF2D <1> cmp byte [es:di-1], 2Dh ; was last in list ? 10069 0000D5BD 74D5 <1> je .nextplex 10070 0000D5BF AF <1> scasw ; skip pointer 10071 0000D5C0 EBF3 <1> jmp short .search_intlist ; try next entry --> 10072 <1> 10073 <1> .search_found_intlist: 10074 0000D5C2 268B1D <1> mov bx, word [es:di] ; dx:bx = es:bx -> IISP entry 10075 0000D5C5 AF <1> scasw ; skip pointer 10076 0000D5C6 52 <1> push dx ; preserve dx for .search_intlist_seg 10077 0000D5C7 E81B00 <1> call SearchIISPChain 10078 0000D5CA 5A <1> pop dx 10079 0000D5CB 740E <1> je .search_found ; found entry --> 10080 <1> ; This specific jump supports TSRs that hook the same 10081 <1> ; interrupt more than once; jumping to .nextplex instead 10082 <1> ; (as previously) aborts the search after the first match 10083 <1> ; in the interrupt list. This support might become useful. 10084 0000D5CD 3C2D <1> cmp al, 2Dh ; was last in list ? 10085 0000D5CF 74C3 <1> je .nextplex 10086 0000D5D1 EBDF <1> jmp short .search_intlist_seg 10087 <1> 10088 <1> .search_dxbx: 10089 <1> %if _PM 10090 0000D5D3 E89AFE <1> call setes2dx 10091 <1> %else 10092 <1> mov es, dx ; es:bx-> (IISP) interrupt entry 10093 <1> %endif 10094 <1> ; The entry we found now is possibly behind the non-IISP entry that 10095 <1> ; terminated our first SearchIISPChain call (at .hard). We then 10096 <1> ; possibly might find our entry in this hidden part of the chain. 10097 0000D5D6 E80C00 <1> call SearchIISPChain 10098 0000D5D9 75B9 <1> jne .nextplex ; didn't find our entry in the chain --> 10099 <1> .search_found: 10100 0000D5DB 58 <1> pop ax 10101 0000D5DC EB99 <1> jmp short .found 10102 <1> 10103 <1> 10104 <1> SearchIISPChain.next: 10105 <1> %if _PM 10106 <1> ; dx already next segment 10107 0000D5DE 268B5F02 <1> mov bx, word [es:bx + ieNext] ; get next offset 10108 0000D5E2 E88BFE <1> call setes2dx ; point es:bx -> next handler 10109 <1> %else 10110 <1> les bx, [es:bx + ieNext] ; get next interrupt entry 10111 <1> %endif 10112 <1> 10113 <1> ; INP: ds:si-> IISP entry 10114 <1> ; es:bx-> current interrupt entry 10115 <1> ; OUT: NZ if reference to ds:si not found in IISP chain es:bx-> 10116 <1> ; ZR if reference found, 10117 <1> ; es:bx-> IISP (or uninstalled iHPFS) interrupt entry with reference 10118 <1> ; CHG: es, bx, dx 10119 <1> SearchIISPChain: 10120 0000D5E5 E81300 <1> call IsIISPEntry? ; that an IISP entry ? 10121 0000D5E8 7510 <1> jnz .return ; nope --> (NZ) 10122 0000D5EA 268B5704 <1> mov dx, word [es:bx + ieNext + 2] ; (for _PM: dx = next segment) 10123 0000D5EE 263B7702 <1> cmp si, word [es:bx + ieNext] ; our offset ? 10124 0000D5F2 75EA <1> jne .next ; no, try next --> 10125 0000D5F4 3B16[B00A] <1> cmp dx, word [pspdbg] ; our segment ? 10126 0000D5F8 75E4 <1> jne .next ; no, try next --> 10127 <1> .return: ; yes, found (ZR) 10128 0000D5FA C3 <1> retn 10129 <1> 10130 <1> 10131 <1> ; INP: es:bx-> interrupt entry 10132 <1> ; OUT: NZ if non-IISP entry 10133 <1> ; ZR if IISP entry 10134 <1> IsIISPEntry?: 10135 0000D5FB 83FBF8 <1> cmp bx, - (ieSignature + 2) ; may access word at offset FFFFh ? 10136 0000D5FE 7728 <1> ja .return ; yes, avoid --> (NZ) 10137 0000D600 26817F064B42 <1> cmp word [ es:bx + ieSignature ], "KB" ; "KB"/424Bh ? ("BK" in MASM) 10138 0000D606 7520 <1> jne .return 10139 0000D608 26813F90EA <1> cmp word [ es:bx + ieEntry ], 0EA90h ; nop\jmp far imm16:imm16 ? 10140 0000D60D 7419 <1> je .return ; unused IISP entry (created by iHPFS) --> 10141 0000D60F 26803FEB <1> cmp byte [ es:bx + ieEntry ], 0EBh ; jmp short ... ? 10142 <1> ; (This opcode should strictly be jmp short $+18 but there's programs 10143 <1> ; that save an additional jmp opcode by jumping directly into their 10144 <1> ; code even though it's not right behind the header.) 10145 0000D613 7513 <1> jne .return 10146 0000D615 26807F09EB <1> cmp byte [ es:bx + ieJmphwreset ], 0EBh ; jmp short ... ? 10147 0000D61A 740C <1> je .return ; usual IISP entry --> 10148 0000D61C 26807F09CB <1> cmp byte [ es:bx + ieJmphwreset ], 0CBh ; retf ? 10149 0000D621 7405 <1> je .return ; a shorter variant --> 10150 0000D623 26807F09CF <1> cmp byte [ es:bx + ieJmphwreset ], 0CFh ; iret ? 10151 <1> .return: 10152 0000D628 C3 <1> retn 10153 <1> 10154 <1> 10155 <1> update_inttab_optional: 10156 0000D629 50 <1> push ax 10157 0000D62A 53 <1> push bx 10158 0000D62B 51 <1> push cx 10159 0000D62C 52 <1> push dx 10160 0000D62D 56 <1> push si 10161 0000D62E BE[1E0C] <1> mov si, inttab_optional 10162 0000D631 BB[3D0C] <1> mov bx, inttab 10163 <1> .loop: 10164 0000D634 AD <1> lodsw 10165 0000D635 83F8FF <1> cmp ax, -1 10166 0000D638 7415 <1> je .end 10167 0000D63A 91 <1> xchg ax, cx 10168 0000D63B AD <1> lodsw 10169 0000D63C 91 <1> xchg ax, cx 10170 0000D63D 92 <1> xchg ax, dx 10171 0000D63E AD <1> lodsw 10172 0000D63F 92 <1> xchg ax, dx 10173 0000D640 8516[A800] <1> test word [internalflags4], dx 10174 0000D644 7407 <1> jz .next 10175 0000D646 4B <1> dec bx 10176 0000D647 4B <1> dec bx 10177 0000D648 890F <1> mov word [bx], cx 10178 0000D64A 4B <1> dec bx 10179 0000D64B 8807 <1> mov byte [bx], al 10180 <1> .next: 10181 0000D64D EBE5 <1> jmp .loop 10182 <1> 10183 <1> .end: 10184 0000D64F 891E[320C] <1> mov word [amisintr_offset], bx 10185 0000D653 5E <1> pop si 10186 0000D654 5A <1> pop dx 10187 0000D655 59 <1> pop cx 10188 0000D656 5B <1> pop bx 10189 0000D657 58 <1> pop ax 10190 0000D658 C3 <1> retn 9487 9488 9489 usesection lDEBUG_CODE 9490 9491 %if _BOOTLDR 9492 ; Determine the amount of actual memory 9493 ; 9494 ; This is important to call at the time we need the size, 9495 ; not just save the size initially. Loading other pre-boot 9496 ; installers or RPLs will change the size. 9497 ; 9498 ; INP: - 9499 ; OUT: dx = segment behind usable memory (taking EBDAs & RPLs into account) 9500 ; ds = ss 9501 ; CHG: ax, cx, di, si, ds 9502 bootgetmemorysize: 9503 0000D659 06 push es 9504 0000D65A 31C0 xor ax, ax 9505 0000D65C 8ED8 mov ds, ax 9506 0000D65E CD12 int 12h ; get memory size in KiB 9507 0000D660 B106 mov cl, 6 9508 0000D662 D3E0 shl ax, cl ; *64, convert to paragraphs 9509 0000D664 50 push ax 9510 0000D665 C536BC00 lds si, [ 2Fh *4 ] ; get current Int2F 9511 0000D669 46 inc si ; pointer valid (not 0FFFFh) ? (left increased!) 9512 0000D66A 741B jz .norpl ; no --> 9513 0000D66C 8CD8 mov ax, ds 9514 0000D66E 85C0 test ax, ax ; segment valid (not zero) ? 9515 0000D670 7415 jz .norpl ; no --> 9516 0000D672 46 times 2 inc si ; +3 with above inc 9517 0000D674 0E push cs 9518 0000D675 07 pop es 9519 0000D676 BF[8CD6] mov di, .rpl 9520 0000D679 B90300 mov cx, .rpl_size 9521 0000D67C F3A6 repe cmpsb ; "RPL" signature ? 9522 0000D67E 7507 jne .norpl ; no --> 9523 0000D680 5A pop dx 9524 0000D681 B8064A mov ax, 4A06h 9525 0000D684 CD2F int 2Fh ; adjust usable memory size for RPL 9526 0000D686 A8 db __TEST_IMM8 ; (skip pop) 9527 .norpl: 9528 0000D687 5A pop dx 9529 ; dx = segment behind last available memory 9530 0000D688 16 push ss 9531 0000D689 1F pop ds 9532 0000D68A 07 pop es 9533 0000D68B C3 retn 9534 9535 0000D68C 52504C .rpl: db "RPL" 9536 endarea .rpl 9537 %endif 9538 9539 9540 ; Ensure a debuggee process is loaded 9541 ; 9542 ; INP: si:di = to preserve if have a process already 9543 ; OUT: NZ if have no process and unable to create process 9544 ; ZR if have a process or created empty process 9545 ; NC if had no process yet, created one or not 9546 ; CY if had a process already, 9547 ; si:di = preserved input 9548 ; NC, ZR if had no process, created empty one, 9549 ; si:di = debuggee cs:ip 9550 ; NC, NZ if int19 occurred (or bootloaded) 9551 ; CHG: si, di, cx 9552 ensuredebuggeeloaded: 9553 0000D68F 50 push ax 9554 0000D690 53 push bx 9555 0000D691 52 push dx 9556 9557 0000D692 F606[A600]20 testopt [internalflags3], dif3_gotint19 9558 0000D697 746F jz .notint19 9559 9560 0000D699 8026[A600]DF clropt [internalflags3], dif3_gotint19 9561 %if _BOOTLDR 9562 0000D69E F606[9D00]40 testopt [internalflags], nodosloaded 9563 0000D6A3 743B jz .dosint19 9564 9565 .bootint19: 9566 0000D6A5 E83701 call .zeroregs 9567 9568 0000D6A8 B86000 mov ax, 60h 9569 0000D6AB 50 push ax 9570 0000D6AC BF[900C] mov di, reg_ds 9571 0000D6AF AB stosw 9572 0000D6B0 AF scasw ; (skip dummy high word) 9573 0000D6B1 AB stosw 9574 0000D6B2 AF scasw 9575 0000D6B3 AB stosw 9576 0000D6B4 AF scasw 9577 0000D6B5 AB stosw 9578 0000D6B6 E8CEC0 call adusetup 9579 0000D6B9 E89DFF call bootgetmemorysize 9580 0000D6BC 83EA60 sub dx, 60h 9581 0000D6BF 81FA0010 cmp dx, 1000h 9582 0000D6C3 7602 jbe .bootbelow64kib ; if memory left <= 64 KiB 9583 0000D6C5 31D2 xor dx, dx ; dx = 1000h (same thing, after shifting) 9584 .bootbelow64kib: 9585 0000D6C7 B104 mov cl, 4 9586 0000D6C9 D3E2 shl dx, cl 9587 0000D6CB 4A dec dx 9588 0000D6CC 4A dec dx 9589 0000D6CD 8916[800C] mov word [reg_esp], dx 9590 0000D6D1 07 pop es 9591 0000D6D2 87D7 xchg dx, di ; es:di = child stack pointer 9592 0000D6D4 31C0 xor ax, ax 9593 0000D6D6 AB stosw ; push 0 on client's stack 9594 9595 0000D6D7 26C7060000CD19 mov word [es:0], 019CDh ; place opcode for int 19h at cs:ip 9596 0000D6DE EB1B jmp @F 9597 %endif 9598 9599 .dosint19: 9600 0000D6E0 8B16[800C] mov dx, word [reg_esp] 9601 0000D6E4 8B1E[980C] mov bx, word [reg_ss] 9602 9603 0000D6E8 E8F400 call .zeroregs 9604 9605 ; Upon receiving an int 19h in DOS 9606 ; just set up some shim that will 9607 ; lead to process termination. 9608 ; Unlike before we do not longer try 9609 ; to create a new process then. 9610 0000D6EB 8916[800C] mov word [reg_esp], dx 9611 0000D6EF 891E[980C] mov word [reg_ss], bx ; preserve our stack 9612 0000D6F3 FF36[AE0A] push word [pspdbe] 9613 0000D6F7 8F06[9C0C] pop word [reg_cs] ; cs = PSP, ip = 0, 9614 ; cs:ip -> int 20h instruction 9615 9616 @@: 9617 0000D6FB F606[9E00]80 testopt [internalflags], attachedterm 9618 0000D700 7511 jnz .noprocess ; if also process not loaded 9619 9620 0000D702 80CA01 or dl, 1 ; flags return NC, NZ 9621 0000D705 E9C700 jmp .return 9622 9623 .notint19: 9624 0000D708 F606[9E00]80 testopt [internalflags], attachedterm 9625 0000D70D 7504 jnz .noprocess ; not loaded, create --> 9626 ; flags return ZR 9627 0000D70F F9 stc ; flags return CY 9628 0000D710 E9BC00 jmp .return 9629 9630 .noprocess: 9631 %if _BOOTLDR 9632 0000D713 F606[9D00]40 testopt [internalflags], nodosloaded 9633 0000D718 7403E9B200 jnz .return ; flags return NC, NZ 9634 %endif 9635 9636 .dosnoprocess: 9637 0000D71D E8BF00 call .zeroregs 9638 0000D720 C606[A90C]01 mov byte [reg_eip+1], 100h>>8 9639 0000D725 B448 mov ah, 48h ; get size of largest free block 9640 0000D727 BBFFFF mov bx, -1 9641 0000D72A CD21 int 21h 9642 0000D72C 83FB11 cmp bx, 11h ; enough for PSP + one paragraph for code/stack ? 9643 0000D72F 7303E9A100 jb .return_no_clr ; no --> 9644 0000D734 B448 mov ah, 48h ; allocate it 9645 0000D736 CD21 int 21h 9646 0000D738 7303E99800 jc .return_no_clr ; (memory taken between the calls) 9647 9648 0000D73D 53 push bx 9649 0000D73E BF[900C] mov di, reg_ds ; fill segment registers ds,es,ss,cs 9650 0000D741 AB stosw 9651 0000D742 AF scasw ; (skip dummy high word) 9652 0000D743 AB stosw 9653 0000D744 AF scasw 9654 0000D745 AB stosw 9655 0000D746 AF scasw 9656 0000D747 AB stosw 9657 0000D748 E83CC0 call adusetup 9658 0000D74B 8B1E[9C0C] mov bx, word [reg_cs] ; bx:dx = where to load program 9659 0000D74F 8EC3 mov es, bx 9660 0000D751 58 pop ax ; get size of memory block 9661 0000D752 89C2 mov dx, ax 9662 0000D754 01DA add dx, bx 9663 0000D756 2689160200 mov word [es:ALASAP], dx 9664 0000D75B 3D0010 cmp ax, 1000h 9665 0000D75E 7602 jbe .below64kib ; if memory left <= 64 KiB 9666 0000D760 31C0 xor ax, ax ; ax = 1000h (same thing, after shifting) 9667 .below64kib: 9668 0000D762 B104 mov cl, 4 9669 0000D764 D3E0 shl ax, cl 9670 0000D766 48 dec ax 9671 0000D767 48 dec ax 9672 0000D768 A3[800C] mov word [reg_esp], ax 9673 0000D76B 97 xchg ax, di ; es:di = child stack pointer 9674 0000D76C 31C0 xor ax, ax 9675 0000D76E AB stosw ; push 0 on client's stack 9676 9677 ; Create a PSP 9678 0000D76F B455 mov ah, 55h ; create child PSP 9679 0000D771 8CC2 mov dx, es 9680 0000D773 268B360200 mov si, word [es:ALASAP] 9681 0000D778 F8 clc ; works around OS/2 bug 9682 0000D779 CD21 int 21h 9683 0000D77B E862BC call setpspdbg ; reset PSP to ours 9684 9685 ; Finish up. Set termination address. 9686 0000D77E B82225 mov ax, 2522h ; set interrupt vector 22h 9687 0000D781 BA[FA87] mov dx, int22 9688 0000D784 CD21 int 21h 9689 0000D786 2689160A00 mov word [es:TPIV], dx 9690 0000D78B 268C1E0C00 mov word [es:TPIV+2], ds 9691 9692 0000D790 26C6060001C3 mov byte [es:100h], 0C3h ; place opcode for retn at cs:ip 9693 9694 0000D796 8C06[AE0A] mov word [pspdbe], es 9695 0000D79A 8CC0 mov ax, es 9696 0000D79C 48 dec ax 9697 0000D79D 8EC0 mov es, ax 9698 0000D79F 40 inc ax 9699 0000D7A0 26C70608004445 mov word [es:8+0], "DE" 9700 0000D7A7 26C7060A004255 mov word [es:8+2], "BU" 9701 0000D7AE 26C7060C004747 mov word [es:8+4], "GG" 9702 0000D7B5 26C7060E004545 mov word [es:8+6], "EE" ; set MCB name 9703 0000D7BC 26A30100 mov word [es:1], ax ; set MCB owner 9704 9705 0000D7C0 8B36[9C0C] mov si, word [reg_cs] 9706 0000D7C4 8B3E[A80C] mov di, word [reg_eip] ; ? is this ever used ? 9707 9708 0000D7C8 8026[9E00]7F clropt [internalflags], attachedterm 9709 0000D7CD 38C0 cmp al, al ; flags return ZR, NC 9710 9711 .return: 9712 @@: 9713 0000D7CF 16 push ss 9714 0000D7D0 07 pop es 9715 9716 0000D7D1 5A pop dx 9717 0000D7D2 5B pop bx 9718 0000D7D3 58 pop ax 9719 0000D7D4 C3 retn 9720 9721 .return_no_clr: 9722 0000D7D5 BA[4F6E] mov dx, msg.ensure_no_memory 9723 0000D7D8 E858E8 call putsz 9724 0000D7DB 85D2 test dx, dx ; flags return NZ, NC 9725 0000D7DD EBF0 jmp .return 9726 9727 9728 .zeroregs: 9729 0000D7DF E80900 call set_efl_to_fl ; initialize EFL, and ax = 0 9730 0000D7E2 BF[700C] mov di, regs 9731 0000D7E5 B91E00 mov cx, 15*2 ; (8 standard + 6 seg + eip) * 2 9732 0000D7E8 F3AB rep stosw ; initialize all regs 9733 0000D7EA C3 retn 9734 9735 9736 set_efl_to_fl: 9737 0000D7EB 31C0 xor ax, ax ; initialize ax = 0 and FL = ZR NC etc 9738 0000D7ED 50 _no386 push ax ; dummy high word 9739 0000D7EE 66 _386_o32 ; pushfd 9740 0000D7EF 9C pushf 9741 0000D7F0 8F06[AC0C] pop word [reg_efl] ; set to FL 9742 0000D7F4 8F06[AE0C] pop word [reg_efl+2] ; set to high word of EFL, or zero 9743 0000D7F8 C3 retn 9744 9745 9746 %if _PM 9747 ; Hook Int2F if a DPMI host is found. However for Win9x and DosEmu 9748 ; Int2F.1687 is not hooked because it doesn't work. Debugging in 9749 ; protected mode may still work, but the initial switch must be 9750 ; single-stepped. 9751 ; 9752 ; CHG: ax, bx, cx, dx, di, es 9753 ; STT: V86/RM 9754 ; ss = ds = debugger data segment 9755 hook2F: 9756 0000D7F9 E81DD1 call InDos 9757 0000D7FC 7403E99A00 jnz .return 9758 0000D801 F606[9D00]01 testopt [internalflags], hooked2F 9759 0000D806 7403E99000 jnz .return ; don't hook now --> 9760 .loop: 9761 %if _GUARD_86M_INT2F 9762 0000D80B 06 push es 9763 0000D80C 31C0 xor ax, ax 9764 0000D80E 8EC0 mov es, ax ; (only used in 86 Mode) 9765 0000D810 26A1BC00 mov ax, [es:2Fh * 4] 9766 0000D814 83F8FF cmp ax, -1 9767 0000D817 7405 je @F ; --> (ZR) 9768 0000D819 260B06BE00 or ax, [es:2Fh * 4 + 2] 9769 @@: 9770 0000D81E 07 pop es 9771 0000D81F 747A jz .return 9772 %endif 9773 0000D821 B88716 mov ax, 1687h ; DPMI host installed? 9774 0000D824 CD2F int 2Fh 9775 0000D826 85C0 test ax, ax 9776 0000D828 7571 jnz .return 9777 0000D82A 893E[E88A] mov word [dpmientry+0], di ; true host DPMI entry 9778 0000D82E 8C06[EA8A] mov word [dpmientry+2], es 9779 0000D832 893E[EC8A] mov word [dpmiwatch+0], di 9780 0000D836 8C06[EE8A] mov word [dpmiwatch+2], es 9781 0000D83A F606[9D00]02 testopt [internalflags], nohook2F 9782 0000D83F 755A jnz .return ; can't hook Int2F --> 9783 0000D841 F606[8800]02 testopt [options4], opt4_int_2F_hook 9784 0000D846 7453 jz .return ; requested to not hook --> 9785 0000D848 B82F35 mov ax, 352Fh 9786 0000D84B CD21 int 21h 9787 0000D84D 891E[728B] mov word [oldi2F+0], bx 9788 0000D851 8C06[748B] mov word [oldi2F+2], es 9789 0000D855 BA[708B] mov dx, debug2F ; ds => lDEBUG_DATA_ENTRY 9790 0000D858 B82F25 mov ax, 252Fh 9791 0000D85B CD21 int 21h 9792 9793 ; Test whether we can hook the DPMI entrypoint call. 9794 0000D85D B88716 mov ax, 1687h 9795 0000D860 CD2F int 2Fh 9796 0000D862 85C0 test ax, ax 9797 0000D864 7538 jnz .nohost 9798 0000D866 81FF[A68B] cmp di, mydpmientry ; our entrypoint returned ? 9799 0000D86A 7532 jne .nohook 9800 0000D86C 8CC0 mov ax, es 9801 0000D86E 8CDB mov bx, ds ; bx => lDEBUG_DATA_ENTRY 9802 0000D870 39D8 cmp ax, bx 9803 0000D872 752A jne .nohook ; no --> 9804 9805 0000D874 C706[EC8A][A68B] mov word [dpmiwatch+0], mydpmientry 9806 0000D87A 8C1E[EE8A] mov word [dpmiwatch+2], ds ; => lDEBUG_DATA_ENTRY 9807 9808 0000D87E 800E[9D00]01 setopt [internalflags], hooked2F 9809 0000D883 800E[A800]02 setopt [internalflags4], dif4_int_2F_hooked 9810 0000D888 E89EFD call update_inttab_optional 9811 %if _DISPHOOK 9812 0000D88B 8CD8 mov ax, ds ; ax => lDEBUG_DATA_ENTRY 9813 0000D88D 1E push ds 9814 0000D88E 07 pop es 9815 0000D88F BF[867E] mov di, dpmihookcs 9816 0000D892 E8E7E3 call hexword 9817 0000D895 BA[697E] mov dx, dpmihook 9818 0000D898 E898E7 call putsz 9819 %endif 9820 .return: 9821 0000D89B 1E push ds 9822 0000D89C 07 pop es 9823 0000D89D C3 retn 9824 9825 .nohost: 9826 .nohook: 9827 0000D89E C516[728B] lds dx, [oldi2F] 9828 0000D8A2 B82F25 mov ax, 252Fh 9829 0000D8A5 CD21 int 21h ; unhook 9830 0000D8A7 16 push ss 9831 0000D8A8 1F pop ds 9832 0000D8A9 16 push ss 9833 0000D8AA 07 pop es ; restore segregs 9834 0000D8AB 800E[9D00]02 setopt [internalflags], nohook2F 9835 ; note that we cannot hook 9836 0000D8B0 BA[927E] mov dx, msg.dpmi_no_hook 9837 0000D8B3 E87DE7 call putsz ; display message about it 9838 0000D8B6 E952FF jmp .loop 9839 %endif 9840 9841 9842 usesection lDEBUG_DATA_ENTRY 9843 000099DC 00 align 16, db 0 9844 ldebug_data_entry_size equ $-section.lDEBUG_DATA_ENTRY.vstart 9845 endarea ldebug_data_entry, 1 9846 9847 usesection ASMTABLE1 9848 000016BA 00 align 16, db 0 9849 asmtable1_size equ $-section.ASMTABLE1.vstart 9850 endarea asmtable1, 1 9851 9852 usesection ASMTABLE2 9853 00000897 00 align 16, db 0 9854 asmtable2_size equ $-section.ASMTABLE2.vstart 9855 endarea asmtable2, 1 9856 9857 9858 numdef SHOWASMTABLESIZE, 0 9859 %if _SHOWASMTABLESIZE 9860 %assign ASMTABLESIZE asmtable1_size + asmtable2_size 9861 %warning asmtables hold ASMTABLESIZE bytes 9862 %endif 9863 9864 9865 usesection DATASTACK 9866 %define SECTIONFIXUP -$$+100h+ldebug_data_entry_size +asmtable1_size+asmtable2_size 9868 9869 ; I/O buffers 9870 alignb 2 9871 00000000 ?? line_in: resb 1 ; maximal length of input line 9872 00000001 ?? resb 1 ; actual length (must be one less than previous byte) 9873 00000002 resb 255 ; buffer for 13-terminated input line 9874 .end: 9875 ; zero-initialisation starts here 9876 ..@init_first: 9877 ; b_bplist and g_bplist are expected in that order by initcont 9878 %if _BREAKPOINTS 9879 00000101 ?? alignb 2 9880 b_bplist: 9881 00000102 ???? .used_mask: resb (_NUM_B_BP+7)>>3 ; bitmask of used points 9882 00000104 ???? .disabled_mask: resb (_NUM_B_BP+7)>>3 ; bitmask of disabled points 9883 %if _BREAKPOINTS_STICKY 9884 .sticky_mask: resb (_NUM_B_BP+7)>>3 ; bitmask of sticky points 9885 ; desc: stay around during DEBUG's operation unless 9886 ; explicitly removed/un-stickified. This allows 9887 ; to keep breakpoints around while changing from PM. 9888 ; Hits while in DEBUG are ignored though, use DDEBUG. 9889 ; Disabling won't remove them, just ignores hits. 9890 %endif 9891 alignb 2 9892 00000106 .bp: resb _NUM_B_BP*BPSIZE 9893 alignb 2 9894 00000196 .counter: resw _NUM_B_BP 9895 alignb 2 9896 000001B6 .id: resw _NUM_B_BP ; array of lengths/offsets, 0 = unused 9897 ; low 10 bits = offset into .idbuffer (0..1023) 9898 ; high 6 bits = length (0..63, 0 if unused) 9899 alignb 2 9900 000001D6 .when: resw _NUM_B_BP ; array of pointers, 0 = unused 9901 9902 .idbuffer.length: equ _NUM_B_ID_BYTES 9903 .idbuffer.free: 9904 000001F6 ???? resw 1 ; offset into .idbuffer of free space 9905 ; (0..1024) 9906 9907 .whenbuffer.length: equ _NUM_B_WHEN_BYTES 9908 .whenbuffer.free: 9909 000001F8 ???? resw 1 ; *offset* into .whenbuffer 9910 ; (not a pointer) 9911 9912 .idbuffer: 9913 000001FA resb .idbuffer.length ; buffer holding ID strings 9914 .whenbuffer: 9915 0000037A resb .whenbuffer.length ; buffer holding condition strings 9916 %endif 9917 %if _NUM_G_BP 9918 0000077A ?? resb 1 - (($-$$) % 2) ; make g_bplist.bp aligned 9919 g_bplist: 9920 0000077B ?? .used_count: resb 1 ; for the byte counter of saved breakpoints 9921 0000077C .bp: resb _NUM_G_BP*BPSIZE 9922 .end: 9923 %endif 9924 %if _HISTORY && ! _HISTORY_SEPARATE_FIXED 9925 historybuffer: resb _HISTORY_SIZE 9926 .end: 9927 %endif 9928 9929 ; $ - $$ = offset into section 9930 ; % 2 = 1 if odd offset, 0 if even 9931 ; 2 - = 1 if odd, 2 if even 9932 ; % 2 = 1 if odd, 0 if even 9933 ; resb (2 - (($-$$) % 2)) % 2 9934 ; $ - $$ = offset into section 9935 ; % 2 = 1 if odd offset, 0 if even 9936 ; 1 - = 0 if odd, 1 if even 9937 0000080C ?? resb 1 - (($-$$) % 2) ; make line_out aligned 9938 0000080D ?? trim_overflow: resb 1 ; actually part of line_out to avoid overflow of trimputs loop 9939 0000080E line_out: resb 263 9940 00000915 ?? resb 1 ; reserved for terminating zero 9941 line_out_end: 9942 alignb 2 9943 00000916 ???? line_out_overflow: resw 1 ; 2642h if line_out didn't overflow 9944 9945 alignb 2 9946 00000918 ???? serial_save_irq_mask: resw 1 9947 0000091A ???? serial_save_irq_off: resw 1 9948 0000091C ???? serial_save_dl: resw 1 9949 0000091E ?? serial_save_ier: resb 1 9950 0000091F ?? serial_save_lcr: resb 1 9951 00000920 ?? serial_save_mcr: resb 1 9952 %if _USE_TX_FIFO 9953 00000921 ?? serial_fcr_setting: resb 1 9954 %endif 9955 00000922 ?? serial_use_intnum: resb 1 9956 00000923 ?? serial_use_params: resb 1 9957 00000924 ?? serial_use_fifo: resb 1 9958 00000925 ?? alignb 2 9959 baseport: 9960 00000926 ???? serial_use_baseport: resw 1 9961 00000928 ???? serial_use_dl: resw 1 9962 0000092A ???? serial_use_irqmask: resw 1 9963 9964 alignb 2 9965 0000092C ???? rxhead: resw 1 9966 0000092E ???? rxtail: resw 1 9967 00000930 ???? txhead: resw 1 9968 00000932 ???? txtail: resw 1 9969 00000934 alignb 16 9970 00000940 rxfifo: resb _RXFIFOSIZE 9971 alignb 16 9972 000009C0 txfifo: resb _TXFIFOSIZE 9973 9974 ; zero-initialisation ends here 9975 ..@init_behind: 9976 9977 alignb 16 ; stack might be re-used as GDT, so align it on a paragraph 9978 00000A40 stack: resb _STACKSIZE 9979 alignb 2 ; ensure stack aligned 9980 stack_end: 9981 9982 datastack_size equ $-section.DATASTACK.vstart 9983 endarea datastack, 1 9984 9985 9986 usesection INIT 9987 initstart: 9988 9989 %include "init.asm" 9990 <1> 9991 <1> %if 0 9992 <1> 9993 <1> lDebug initialisation 9994 <1> 9995 <1> Copyright (C) 1995-2003 Paul Vojta 9996 <1> Copyright (C) 2008-2012 C. Masloch 9997 <1> 9998 <1> Usage of the works is permitted provided that this 9999 <1> instrument is retained with the works, so that any entity 10000 <1> that uses the works is notified of this instrument. 10001 <1> 10002 <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 10003 <1> 10004 <1> %endif 10005 <1> 10006 <1> 10007 <1> usesection INIT 10008 <1> 10009 <1> initcode: 10010 <1> %if ($ - $$) != 0 10011 <1> %fatal initcode expected at start of section 10012 <1> %endif 10013 <1> 10014 00000000 8CD0 <1> mov ax, ss 10015 00000002 8CDA <1> mov dx, ds 10016 00000004 29D0 <1> sub ax, dx 10017 00000006 31D2 <1> xor dx, dx 10018 00000008 B90400 <1> mov cx, 4 10019 <1> @@: 10020 0000000B D1E0 <1> shl ax, 1 10021 0000000D D1D2 <1> rcl dx, 1 10022 0000000F E2FA <1> loop @B 10023 <1> 10024 00000011 50 <1> push ax ; (if sp was zero) 10025 <1> 10026 00000012 01E0 <1> add ax, sp 10027 00000014 83D200 <1> adc dx, 0 10028 00000017 83C00F <1> add ax, 15 10029 0000001A 83D200 <1> adc dx, 0 10030 <1> 10031 0000001D 24F0 <1> and al, ~15 10032 <1> 10033 0000001F 83FA02 <1> cmp dx, NONBOOTINITSTACK_END >> 16 10034 00000022 771B <1> ja .stackdownfirst 10035 00000024 7205 <1> jb .memupfirst 10036 00000026 3DB014 <1> cmp ax, NONBOOTINITSTACK_END & 0FFFFh 10037 00000029 7314 <1> jae .stackdownfirst 10038 <1> .memupfirst: 10039 0000002B BB4B21 <1> mov bx, paras(NONBOOTINITSTACK_END) 10040 0000002E B44A <1> mov ah, 4Ah 10041 00000030 CD21 <1> int 21h 10042 00000032 730B <1> jnc @F 10043 <1> .memfail: 10044 00000034 BA[2D08] <1> mov dx, imsg.early_mem_fail 10045 <1> .earlyfail: 10046 00000037 E8F60C <1> call init_putsz_cs 10047 0000003A B8FF4C <1> mov ax, 4CFFh 10048 0000003D CD21 <1> int 21h 10049 <1> 10050 <1> @@: 10051 <1> .stackdownfirst: 10052 0000003F 8CD8 <1> mov ax, ds 10053 00000041 052B21 <1> add ax, paras(NONBOOTINITSTACK_START) 10054 00000044 FA <1> cli 10055 00000045 8ED0 <1> mov ss, ax 10056 00000047 BC0002 <1> mov sp, NONBOOTINITSTACK_SIZE 10057 0000004A FB <1> sti 10058 <1> 10059 <1> ; if jumped to .stackdownfirst: now, shrink our memory block 10060 <1> ; else: no-op (already grew or shrunk block) 10061 0000004B BB4B21 <1> mov bx, paras(NONBOOTINITSTACK_END) 10062 0000004E B44A <1> mov ah, 4Ah 10063 00000050 CD21 <1> int 21h 10064 00000052 72E0 <1> jc .memfail 10065 <1> 10066 <1> 10067 00000054 8CD8 <1> mov ax, ds 10068 00000056 053219 <1> add ax, paras(INITSECTIONOFFSET) 10069 00000059 8CDA <1> mov dx, ds 10070 0000005B 81C2F81F <1> add dx, paras(NONBOOTINITTARGET) 10071 0000005F B93301 <1> mov cx, init_size_p 10072 00000062 E83A0C <1> call init_movp 10073 <1> 10074 00000065 52 <1> push dx 10075 00000066 E89100 <1> call init_retf 10076 <1> 10077 00000069 8CDB <1> mov bx, ds 10078 0000006B 89DA <1> mov dx, bx 10079 0000006D 81C3F619 <1> add bx, paras(AUXTARGET1) 10080 00000071 81C2680C <1> add dx, paras(CODETARGET1) 10081 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 10082 00000075 89D8 <1> mov ax, bx 10083 00000077 050102 <1> add ax, paras(auxbuff_size) 10084 <1> CODETARGET1_equ equ CODETARGET1 10085 <1> CODETARGET2_equ equ CODETARGET2 10086 <1> AUXTARGET1_equ equ AUXTARGET1 10087 <1> AUXTARGET2_equ equ AUXTARGET2 10088 <1> %if AUXTARGET1_equ <= CODETARGET1_equ 10089 <1> %assign nn AUXTARGET1_equ 10090 <1> %assign mm CODETARGET1_equ 10091 <1> %error Unexpected layout aux = nn code = mm 10092 <1> %endif 10093 <1> %endif 10094 0000007A 89D1 <1> mov cx, dx 10095 0000007C E87C00 <1> call init_check_auxbuff 10096 0000007F 742F <1> jz @F 10097 <1> 10098 00000081 8CDB <1> mov bx, ds 10099 00000083 89DA <1> mov dx, bx 10100 00000085 81C3680C <1> add bx, paras(AUXTARGET2) 10101 00000089 81C2690E <1> add dx, paras(CODETARGET2) 10102 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 10103 <1> ldebug_code_size_equ equ ldebug_code_size 10104 <1> auxbuff_size_equ equ auxbuff_size 10105 <1> %if (paras(AUXTARGET1_equ) + paras(auxbuff_size_equ)) != (paras(CODETARGET2_equ) + paras(ldebug_code_size_equ)) 10107 <1> %error Unexpected layout 10108 <1> %endif 10109 <1> %endif 10110 0000008D E86B00 <1> call init_check_auxbuff 10111 00000090 741E <1> jz @F 10112 <1> 10113 <1> ; If both prior attempts failed, we allocate 10114 <1> ; an additional 8 KiB and move the buffer to 10115 <1> ; that. This should always succeed. 10116 00000092 2EC706[2008]F81F <1> mov word [cs:memsize], paras(AUXTARGET3 + auxbuff_size + historysegment_size) 10119 <1> ; enlarge the final memory block size 10120 <1> 10121 00000099 8CDB <1> mov bx, ds 10122 0000009B 81C3F71B <1> add bx, paras(AUXTARGET3) 10123 0000009F 89CA <1> mov dx, cx 10124 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 10125 000000A1 89D8 <1> mov ax, bx 10126 000000A3 050102 <1> add ax, paras(auxbuff_size) 10127 <1> %endif 10128 000000A6 E85200 <1> call init_check_auxbuff 10129 000000A9 7405 <1> jz @F 10130 <1> 10131 <1> ; Because this shouldn't happen, this is 10132 <1> ; considered an internal error. 10133 000000AB BA[5308] <1> mov dx, imsg.early_reloc_fail 10134 000000AE EB87 <1> jmp .earlyfail 10135 <1> 10136 <1> @@: 10137 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 10138 000000B0 50 <1> push ax 10139 <1> %endif 10140 000000B1 8CD8 <1> mov ax, ds 10141 000000B3 05A40B <1> add ax, paras(CODESECTIONOFFSET) 10142 000000B6 B98E0D <1> mov cx, ldebug_code_size_p 10143 000000B9 E8E30B <1> call init_movp 10144 <1> 10145 000000BC 8916[D400] <1> mov word [code_seg], dx ; initialise code segment reference 10146 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 10147 000000C0 58 <1> pop ax 10148 000000C1 A3[040B] <1> mov word [history.segorsel + soaSegSel], ax 10149 <1> %if _PM 10150 000000C4 A3[060B] <1> mov word [history.segorsel + soaSegment], ax 10151 <1> %endif 10152 000000C7 8EC0 <1> mov es, ax 10153 000000C9 31FF <1> xor di, di 10154 000000CB B90010 <1> mov cx, historysegment_size >> 1 10155 000000CE 31C0 <1> xor ax, ax 10156 000000D0 F3AB <1> rep stosw 10157 <1> %endif 10158 <1> 10159 000000D2 89D8 <1> mov ax, bx 10160 <1> 10161 000000D4 A3[FA09] <1> mov word [auxbuff_segorsel + soaSegSel], ax 10162 <1> %if _PM 10163 000000D7 A3[FC09] <1> mov word [auxbuff_segorsel + soaSegment], ax 10164 <1> ; initialise auxbuff references 10165 <1> %endif 10166 000000DA 8EC0 <1> mov es, ax 10167 000000DC 31FF <1> xor di, di 10168 000000DE B90810 <1> mov cx, _AUXBUFFSIZE >> 1 10169 000000E1 31C0 <1> xor ax, ax 10170 000000E3 F3AB <1> rep stosw ; initialise auxbuff 10171 <1> 10172 000000E5 FA <1> cli 10173 000000E6 8CD8 <1> mov ax, ds 10174 000000E8 8EC0 <1> mov es, ax 10175 000000EA 8ED0 <1> mov ss, ax 10176 000000EC BC[400C] <1> mov sp, stack_end 10177 000000EF FB <1> sti 10178 <1> 10179 000000F0 B44A <1> mov ah, 4Ah 10180 000000F2 BB2B21 <1> mov bx, paras(NONBOOTINITSTACK_START) 10181 000000F5 CD21 <1> int 21h ; shrink to drop init stack 10182 <1> 10183 000000F7 E9B20C <1> jmp old_initcode 10184 <1> 10185 <1> 10186 <1> init_retf: 10187 000000FA CB <1> retf 10188 <1> 10189 <1> 10190 <1> ; INP: bx => destination for auxbuff 10191 <1> ; (The following are not actually used by this function, 10192 <1> ; they're just what is passed in and preserved to 10193 <1> ; be used by the caller after returning.) 10194 <1> ; dx => destination for code image 10195 <1> ; (if boot-loaded:) cx => destination for pseudo-PSP 10196 <1> ; (implies cx+10h => destination for data_entry) 10197 <1> ; ax => segment for history buffer 10198 <1> ; OUT: ZR if this destination for auxbuff doesn't cross 10199 <1> ; a 64 KiB boundary 10200 <1> ; NZ else 10201 <1> ; CHG: si, di 10202 <1> init_check_auxbuff: 10203 000000FB 89DE <1> mov si, bx ; => auxbuff 10204 <1> %if _AUXBUFFSIZE < 8192 10205 <1> %error Expected full sector length auxbuff 10206 <1> %endif 10207 000000FD 8DBC0002 <1> lea di, [si + (8192 >> 4)]; => behind auxbuff (at additional paragraph) 10208 00000101 81E600F0 <1> and si, 0F000h ; => 64 KiB chunk of first paragraph of auxbuff 10209 00000105 81E700F0 <1> and di, 0F000h ; => 64 KiB chunk of additional paragraph 10210 00000109 39F7 <1> cmp di, si ; same ? 10211 <1> ; ZR if they are the same 10212 0000010B C3 <1> retn 10213 <1> 10214 <1> 10215 <1> %if _BOOTLDR 10216 <1> ; Our loader transfers control to us with these registers: 10217 <1> ; INP: ss:bp -> BPB 10218 <1> ; ss:bp - 16 -> loadstackvars 10219 <1> ; ss:bp - 32 -> loaddata 10220 <1> ; cs:0 -> loaded payload 10221 <1> ; cs:32 -> entry point 10222 <1> ; STT: EI, UP 10223 <1> ; all interrupts left from BIOS 10224 <1> boot_initcode: 10225 0000010C FC <1> cld 10226 <1> 10227 <1> d4 call init_d4message 10228 <1> d4 asciz "In boot_initcode",13,10 10229 <1> 10230 0000010D 8B56E0 <1> mov dx, word [bp + ldMemoryTop] 10231 <1> 10232 <1> ; initialise sdp 10233 00000110 8B461E <1> mov ax, word [bp + bsBPB + bpbHiddenSectors + 2] 10234 00000113 A3[FE8E] <1> mov word [load_data - LOADDATA2 + bsBPB + bpbHiddenSectors + 2], ax 10235 00000116 8B461C <1> mov ax, word [bp + bsBPB + bpbHiddenSectors] 10236 00000119 A3[FC8E] <1> mov word [load_data - LOADDATA2 + bsBPB + bpbHiddenSectors], ax 10237 0000011C 8A4640 <1> mov al, byte [bp + bsBPB + ebpbNew + bpbnBootUnit] 10238 0000011F A2[208F] <1> mov byte [load_data - LOADDATA2 + bsBPB + ebpbNew + bpbnBootUnit], al 10239 <1> 10240 00000122 8CDB <1> mov bx, ds 10241 00000124 8EC3 <1> mov es, bx ; => data entry image 10242 00000126 BF[208E] <1> mov di, loaddata_loadedfrom ; -> loaded from data (ldp) 10243 <1> 10244 <1> ; initialise LOADDATA, LOADSTACKVARS, and BPB 10245 00000129 16 <1> push ss 10246 0000012A 1F <1> pop ds 10247 0000012B 8D76E0 <1> lea si, [bp + LOADDATA] ; -> LOADDATA on stack 10248 0000012E B97A00 <1> mov cx, (-LOADDATA + bsBPB + ebpbNew + BPBN_size) 10249 00000131 F3A4 <1> rep movsb 10250 <1> 10251 <1> ; initialise cmdline_buffer from below LOADDATA 10252 00000133 8DB6E0FE <1> lea si, [bp + ldCommandLine.start] 10253 00000137 BF[E000] <1> mov di, cmdline_buffer ; -> our buffer in data entry 10254 <1> 10255 0000013A 813C00FF <1> cmp word [si], 0FF00h 10256 0000013E 7505 <1> jne @F 10257 <1> 10258 00000140 0E <1> push cs 10259 00000141 1F <1> pop ds 10260 00000142 BE[410A] <1> mov si, imsg.default_cmdline 10261 <1> 10262 <1> @@: 10263 00000145 AC <1> lodsb 10264 00000146 84C0 <1> test al, al 10265 00000148 741F <1> jz @FF 10266 <1> 10267 0000014A 26800E[A500]01 <1> setopt [es:internalflags3], dif3_input_cmdline 10268 00000150 A9 <1> db __TEST_IMM16 10269 <1> .switch_c_loop: 10270 00000151 AA <1> stosb 10271 00000152 AC <1> lodsb 10272 00000153 3C00 <1> cmp al, 0 10273 00000155 7411 <1> je @F 10274 00000157 3C3B <1> cmp al, ';' 10275 00000159 7504 <1> jne .switch_c_not_semicolon 10276 0000015B B00D <1> mov al, 13 10277 0000015D EBF2 <1> jmp .switch_c_loop 10278 <1> 10279 <1> .switch_c_not_semicolon: 10280 0000015F 3C5C <1> cmp al, '\' 10281 00000161 75EE <1> jne .switch_c_loop 10282 00000163 AC <1> lodsb 10283 00000164 3C00 <1> cmp al, 0 10284 00000166 75E9 <1> jne .switch_c_loop 10285 <1> 10286 <1> @@: 10287 00000168 AA <1> stosb 10288 <1> @@: 10289 <1> 10290 00000169 89D0 <1> mov ax, dx 10291 0000016B 2D0020 <1> sub ax, paras(BOOTDELTA) 10292 0000016E 7303E9E900 <1> jc .error_out_of_memory 10293 <1> ; We exaggerate the target size (BOOTDELTA) for the 10294 <1> ; worst case, thus we do not need to check for narrower 10295 <1> ; fits later on. BOOTDELTA includes the pseudo-PSP size, 10296 <1> ; data_entry size, asmtable1_size, asmtable2_size, 10297 <1> ; datastack_size, code_size, 2 times auxbuff_size, 10298 <1> ; historysegment_size, 10299 <1> ; plus 16 bytes for the image ident prefix paragraph, 10300 <1> ; and all of that rounded to a kibibyte boundary. 10301 <1> 10302 00000173 8CC9 <1> mov cx, cs 10303 00000175 81C15301 <1> add cx, paras(init_size + BOOTINITSTACK_SIZE) 10304 00000179 7303E9DE00 <1> jc .error_out_of_memory 10305 0000017E 39D1 <1> cmp cx, dx 10306 00000180 7603E9D700 <1> ja .error_out_of_memory 10307 <1> 10308 00000185 8CCF <1> mov di, cs 10309 00000187 FA <1> cli 10310 00000188 8ED7 <1> mov ss, di 10311 0000018A BC3015 <1> mov sp, init_size + BOOTINITSTACK_SIZE 10312 0000018D FB <1> sti 10313 <1> 10314 <1> d4 call init_d4message 10315 <1> d4 asciz "Switched to init stack",13,10 10316 <1> 10317 <1> lframe none 10318 <1> lvar word, relocatedparas 10319 <1> lvar word, target 10320 0000018E 5589E55050 <1> lenter 10321 <1> lvar word, targetstart 10322 00000193 50 <1> push ax 10323 <1> lvar word, memtop 10324 00000194 52 <1> push dx 10325 00000195 8D7F10 <1> lea di, [bx + 10h] 10326 <1> lvar word, data 10327 00000198 57 <1> push di 10328 00000199 8DBFA40B <1> lea di, [bx + paras(CODESECTIONOFFSET)] 10329 <1> lvar word, code 10330 0000019D 57 <1> push di 10331 <1> 10332 0000019E 39C1 <1> cmp cx, ax ; does init end below-or-equal target ? 10333 000001A0 7703E9C500 <1> jbe .no_relocation ; yes, no relocation needed --> 10334 <1> 10335 <1> d4 call init_d4message 10336 <1> d4 asciz "Needs relocation of init segment",13,10 10337 <1> 10338 000001A5 8B46F6 <1> mov ax, word [bp + ?data] 10339 000001A8 2D5301 <1> sub ax, paras(init_size + BOOTINITSTACK_SIZE) 10340 000001AB 7303E9AC00 <1> jc .error_out_of_memory ; already at start of memory --> 10341 000001B0 83F860 <1> cmp ax, 60h 10342 000001B3 7303E9A400 <1> jb .error_out_of_memory ; already at start of memory --> 10343 <1> 10344 000001B8 0E <1> push cs 10345 000001B9 1F <1> pop ds 10346 000001BA 31F6 <1> xor si, si ; -> init source 10347 000001BC 8EC0 <1> mov es, ax 10348 000001BE 31FF <1> xor di, di ; -> init destination 10349 000001C0 B9980A <1> mov cx, words(init_size + BOOTINITSTACK_SIZE) 10350 000001C3 F3A5 <1> rep movsw ; relocate only init 10351 <1> ; Must not modify the data already on the stack here, 10352 <1> ; until after .done_relocation (which relocates ss). 10353 <1> 10354 000001C5 50 <1> push ax 10355 000001C6 E831FF <1> call init_retf ; jump to new init 10356 <1> 10357 000001C9 8ED0 <1> mov ss, ax 10358 000001CB 8B4EF4 <1> mov cx, word [bp + ?code] 10359 000001CE 81C18E0D <1> add cx, paras(ldebug_code_size) 10360 000001D2 3B4EFA <1> cmp cx, word [bp + ?targetstart] 10361 <1> ; does code end below-or-equal target ? 10362 000001D5 7703E99000 <1> jbe .done_relocation ; yes, relocated enough --> 10363 <1> 10364 <1> d4 call init_d4message 10365 <1> d4 asciz "Needs relocation of entire load image",13,10 10366 <1> 10367 000001DA BA6000 <1> mov dx, 60h 10368 000001DD 8EC2 <1> mov es, dx 10369 000001DF 8CC8 <1> mov ax, cs 10370 000001E1 39C2 <1> cmp dx, ax ; already at start of memory ? 10371 000001E3 7377 <1> jae .error_out_of_memory ; then error --> 10372 <1> 10373 000001E5 42 <1> inc dx 10374 <1> ; cmp dx, ax 10375 <1> ; ja .error_out_of_memory 10376 000001E6 52 <1> push dx 10377 000001E7 2EFF36[1202] <1> push word [cs:.word_relocated] ; on stack: far address of .relocated 10378 <1> 10379 000001EC 89C1 <1> mov cx, ax ; source 10380 000001EE 29D1 <1> sub cx, dx ; source - target = how far to relocate 10381 000001F0 894EFE <1> mov word [bp + ?relocatedparas], cx 10382 <1> ; save away this value 10383 <1> 10384 000001F3 31FF <1> xor di, di ; es:di -> where to put relocator 10385 000001F5 06 <1> push es 10386 000001F6 57 <1> push di ; on stack: relocator destination 10387 000001F7 0E <1> push cs 10388 000001F8 1F <1> pop ds 10389 000001F9 BE[1402] <1> mov si, .relocator ; -> relocator source 10390 000001FC B90800 <1> mov cx, 8 10391 000001FF F3A5 <1> rep movsw ; put relocator stub 10392 <1> 10393 00000201 8EC2 <1> mov es, dx 10394 00000203 31FF <1> xor di, di ; -> where to relocate to 10395 00000205 31F6 <1> xor si, si ; -> relocate start 10396 <1> 10397 <1> BOOTRELOC1 equ paras( init_size + BOOTINITSTACK_SIZE + ldebug_data_entry_size + asmtable1_size + asmtable2_size + ldebug_code_size) 10400 <1> 10401 <1> %if 0 10402 <1> mov cx, BOOTRELOC1 ; how much to relocate 10403 <1> mov bx, 1000h 10404 <1> mov ax, cx 10405 <1> cmp ax, bx ; > 64 KiB? 10406 <1> jbe @F 10407 <1> mov cx, bx ; first relocate the first 64 KiB 10408 <1> @@: 10409 <1> sub ax, cx ; how much to relocate later 10410 <1> shl cx, 1 10411 <1> shl cx, 1 10412 <1> shl cx, 1 ; how much to relocate first, 10413 <1> ; << 3 == convert paragraphs to words 10414 <1> %else 10415 00000207 BB0010 <1> mov bx, 1000h 10416 <1> %if BOOTRELOC1 > 1000h 10417 0000020A B90080 <1> mov cx, 8000h 10418 0000020D B8750A <1> mov ax, BOOTRELOC1 - 1000h 10419 <1> %else 10420 <1> mov cx, BOOTRELOC1 << 3 10421 <1> xor ax, ax 10422 <1> %endif 10423 <1> %endif 10424 00000210 CB <1> retf ; jump to relocator 10425 <1> 10426 00000211 00 <1> align 2, db 0 10427 <1> .word_relocated: 10428 00000212 [1702] <1> dw .relocated 10429 <1> 10430 <1> ; ds:si -> first chunk of to be relocated data 10431 <1> ; es:di -> first chunk of relocation destination 10432 <1> ; cx = number of words in first chunk 10433 <1> .relocator: 10434 00000214 F3A5 <1> rep movsw 10435 00000216 CB <1> retf ; jump to relocated cs : .relocated 10436 <1> 10437 <1> .relocated: 10438 <1> @@: 10439 00000217 8CC2 <1> mov dx, es 10440 00000219 01DA <1> add dx, bx 10441 0000021B 8EC2 <1> mov es, dx ; next segment 10442 <1> 10443 0000021D 8CDA <1> mov dx, ds 10444 0000021F 01DA <1> add dx, bx 10445 00000221 8EDA <1> mov ds, dx ; next segment 10446 <1> 10447 00000223 29D8 <1> sub ax, bx ; = how much to relocate after this round 10448 00000225 B90080 <1> mov cx, 1000h << 3 ; in case another full 64 KiB to relocate 10449 00000228 730B <1> jae @F ; another full 64 KiB to relocate --> 10450 0000022A 01D8 <1> add ax, bx ; restore 10451 0000022C D1E0 <1> shl ax, 1 10452 0000022E D1E0 <1> shl ax, 1 10453 00000230 D1E0 <1> shl ax, 1 ; convert paragraphs to words 10454 00000232 91 <1> xchg cx, ax ; cx = that many words 10455 00000233 31C0 <1> xor ax, ax ; no more to relocate after this round 10456 <1> 10457 <1> @@: 10458 00000235 31F6 <1> xor si, si 10459 00000237 31FF <1> xor di, di 10460 00000239 F3A5 <1> rep movsw ; relocate next chunk 10461 0000023B 85C0 <1> test ax, ax ; another round needed? 10462 0000023D 75D8 <1> jnz @BB ; yes --> 10463 <1> 10464 0000023F 8CC8 <1> mov ax, cs 10465 00000241 8ED0 <1> mov ss, ax ; relocate the stack 10466 <1> ; The stack frame variables have been relocated here 10467 <1> ; along with the INIT segment data. 10468 <1> 10469 00000243 8B46FE <1> mov ax, word [bp + ?relocatedparas] 10470 00000246 2946F6 <1> sub word [bp + ?data], ax 10471 00000249 721A <1> jc .error_internal 10472 0000024B 2946F4 <1> sub word [bp + ?code], ax 10473 0000024E 7215 <1> jc .error_internal 10474 <1> 10475 00000250 8B4EF4 <1> mov cx, word [bp + ?code] 10476 00000253 81C18E0D <1> add cx, paras(ldebug_code_size) 10477 00000257 3B4EFA <1> cmp cx, word [bp + ?targetstart] 10478 <1> ; does code end below-or-equal target ? 10479 0000025A 760E <1> jbe .done_relocation ; yes --> 10480 <1> 10481 <1> .error_out_of_memory: 10482 0000025C BA[070B] <1> mov dx, imsg.boot_error_out_of_memory 10483 <1> .putsz_error: 10484 0000025F E8F10A <1> call init_putsz_cs_bootldr 10485 00000262 E91102 <1> jmp init_booterror.soft 10486 <1> 10487 <1> .error_internal: 10488 00000265 BA[180B] <1> mov dx, imsg.boot_error_internal 10489 00000268 EBF5 <1> jmp .putsz_error 10490 <1> 10491 <1> 10492 <1> .done_relocation: 10493 <1> .no_relocation: 10494 0000026A 8CC8 <1> mov ax, cs 10495 0000026C 8ED0 <1> mov ss, ax ; relocate the stack 10496 <1> ; The stack frame variables have been relocated here 10497 <1> ; along with the INIT segment data. 10498 <1> 10499 0000026E 2EC606[7B04]A8 <1> mov byte [cs:init_booterror.patch_switch_stack], __TEST_IMM8 10500 <1> ; SMC in section INIT 10501 <1> 10502 <1> d4 call init_d4message 10503 <1> d4 asciz "Relocated enough",13,10 10504 <1> 10505 <1> 10506 00000274 CD12 <1> int 12h 10507 00000276 B106 <1> mov cl, 6 10508 00000278 D3E0 <1> shl ax, cl 10509 <1> 10510 0000027A 50 <1> push ax 10511 0000027B 1E <1> push ds 10512 0000027C 31F6 <1> xor si, si 10513 0000027E 92 <1> xchg dx, ax 10514 0000027F 8EDE <1> mov ds, si 10515 00000281 C536BC00 <1> lds si, [4 * 2Fh] 10516 00000285 83C603 <1> add si, 3 10517 00000288 AC <1> lodsb 10518 00000289 3C52 <1> cmp al, 'R' 10519 0000028B 750F <1> jne .no_rpl 10520 0000028D AC <1> lodsb 10521 0000028E 3C50 <1> cmp al, 'P' 10522 00000290 750A <1> jne .no_rpl 10523 00000292 AC <1> lodsb 10524 00000293 3C4C <1> cmp al, 'L' 10525 00000295 7505 <1> jne .no_rpl 10526 00000297 B8064A <1> mov ax, 4A06h 10527 0000029A CD2F <1> int 2Fh 10528 <1> .no_rpl: 10529 0000029C 92 <1> xchg ax, dx 10530 0000029D 1F <1> pop ds 10531 0000029E 5A <1> pop dx 10532 <1> 10533 0000029F 39D0 <1> cmp ax, dx 10534 000002A1 7405 <1> je .no_error_rpl 10535 <1> ; in case RPL is present, error out (for now) 10536 <1> 10537 <1> ; notes for +RPL installation: 10538 <1> ; 1. Allocate enough memory for our MCB + an PSP + our image + the last and the RPL MCB 10539 <1> ; 2. Create the RPL's MCB + a last MCB 10540 <1> ; 3. Relocate, initialise PSP 10541 <1> ; 4. Hook Int2F as RPLOADER to report DOS our new size 10542 <1> 10543 000002A3 BA[8D0A] <1> mov dx, imsg.rpl_detected 10544 000002A6 EBB7 <1> jmp .putsz_error 10545 <1> 10546 <1> .no_error_rpl: 10547 <1> d4 call init_d4message 10548 <1> d4 asciz "Loader past RPL detection",13,10 10549 <1> 10550 000002A8 8B5EF8 <1> mov bx, word [bp + ?memtop] 10551 000002AB 39C3 <1> cmp bx, ax 10552 000002AD 7405 <1> je @F 10553 <1> 10554 000002AF BA[B40A] <1> mov dx, imsg.mismatch_detected 10555 000002B2 EBAB <1> jmp .putsz_error 10556 <1> 10557 <1> @@: ; bx => behind usable memory 10558 <1> %if 0 10559 <1> mov ah, 0C1h 10560 <1> stc 10561 <1> int 15h ; BIOS, do you have an EBDA? 10562 <1> mov ax, es 10563 <1> jnc .ebda ; segment in ax --> 10564 <1> ; I don't believe you, let's check 10565 <1> %endif ; Enabling this would enable the BIOS to return an EBDA even if it isn't 10566 <1> ; noted at 40h:0Eh, which would be useless because we have to relocate it. 10567 <1> 10568 000002B4 31D2 <1> xor dx, dx ; initialise dx to zero if no EBDA 10569 000002B6 B84000 <1> mov ax, 40h 10570 000002B9 8EC0 <1> mov es, ax 10571 000002BB 26A10E00 <1> mov ax, word [ es:0Eh ] ; EBDA segment (unless zero) or LPT4 base I/O address (200h..3FCh) 10572 000002BF 3D0004 <1> cmp ax, 400h 10573 000002C2 7223 <1> jb .noebda ; --> 10574 <1> .ebda: 10575 <1> d4 call init_d4message 10576 <1> d4 asciz "EBDA detected",13,10 10577 <1> 10578 000002C4 2EFE06[2C08] <1> inc byte [cs:init_boot_ebdaflag] 10579 000002C9 39D8 <1> cmp ax, bx 10580 <1> ;jb init_booterror.soft ; uhh, the EBDA is inside our memory? 10581 <1> ;ja init_booterror.soft ; EBDA higher than top of memory. This is just as unexpected. 10582 000002CB 7405 <1> je @F 10583 000002CD BA[E80A] <1> mov dx, imsg.boot_ebda_unexpected 10584 000002D0 EB8D <1> jmp .putsz_error 10585 <1> 10586 <1> @@: 10587 000002D2 8ED8 <1> mov ds, ax 10588 000002D4 31D2 <1> xor dx, dx 10589 000002D6 8A160000 <1> mov dl, byte [ 0 ] ; EBDA size in KiB 10590 000002DA B106 <1> mov cl, 6 10591 000002DC D3E2 <1> shl dx, cl ; *64, to paragraphs 10592 000002DE 2E8916[2608] <1> mov word [cs:init_boot_ebdasize], dx 10593 000002E3 2EA3[2808] <1> mov word [cs:init_boot_ebdasource], ax 10594 <1> d4 jmp @F 10595 <1> .noebda: 10596 <1> d4 call init_d4message 10597 <1> d4 asciz "No EBDA detected",13,10 10598 <1> @@: 10599 <1> 10600 <1> 10601 000002E7 8B4EF8 <1> mov cx, word [bp + ?memtop] 10602 000002EA 2E030E[2608] <1> add cx, [cs:init_boot_ebdasize] 10603 000002EF 81E9F71D <1> sub cx, paras(INITSECTIONOFFSET + datastack_size + auxbuff_size + historysegment_size) 10604 <1> ; cx = paragraph of pseudo-PSP if here 10605 000002F3 49 <1> dec cx ; => paragraph of image ident 10606 000002F4 83E1C0 <1> and cx, ~ (paras(1024) - 1) ; round down to kibibyte boundary 10607 000002F7 41 <1> inc cx ; => paragraph of pseudo-PSP if here 10608 <1> 10609 000002F8 89CB <1> mov bx, cx 10610 000002FA 89DA <1> mov dx, bx 10611 000002FC 81C3F619 <1> add bx, paras(AUXTARGET1) ; => auxbuff target if here 10612 00000300 81C2680C <1> add dx, paras(CODETARGET1) ; => code target if here 10613 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 10614 00000304 89D8 <1> mov ax, bx 10615 00000306 050102 <1> add ax, paras(auxbuff_size) 10616 <1> %if AUXTARGET1_equ <= CODETARGET1_equ 10617 <1> %error Unexpected layout 10618 <1> %endif 10619 <1> %endif 10620 00000309 E8EFFD <1> call init_check_auxbuff 10621 0000030C 743E <1> jz @F 10622 <1> 10623 <1> d4 call init_d4message 10624 <1> d4 asciz "First layout rejected",13,10 10625 <1> 10626 0000030E 89CB <1> mov bx, cx ; attempt same target again 10627 00000310 89DA <1> mov dx, bx 10628 00000312 81C3680C <1> add bx, paras(AUXTARGET2) ; => auxbuff target if here 10629 00000316 81C2690E <1> add dx, paras(CODETARGET2) ; => code target if here 10630 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 10631 <1> %if (paras(AUXTARGET1_equ) + paras(auxbuff_size_equ)) != (paras(CODETARGET2_equ) + paras(ldebug_code_size_equ)) 10633 <1> %error Unexpected layout 10634 <1> %endif 10635 <1> %endif 10636 0000031A E8DEFD <1> call init_check_auxbuff 10637 0000031D 742D <1> jz @F 10638 <1> 10639 <1> d4 call init_d4message 10640 <1> d4 asciz "Second layout rejected",13,10 10641 <1> 10642 <1> ; If both prior attempts failed, we allocate 10643 <1> ; an additional 8 KiB and move the buffer to 10644 <1> ; that. This should always succeed. 10645 0000031F 8B4EF8 <1> mov cx, word [bp + ?memtop] 10646 00000322 2E030E[2608] <1> add cx, [cs:init_boot_ebdasize] 10647 00000327 81E9F81F <1> sub cx, paras(INITSECTIONOFFSET + datastack_size + auxbuff_size*2 + historysegment_size) 10648 <1> ; cx = paragraph of pseudo-PSP if here 10649 0000032B 49 <1> dec cx ; => paragraph of image ident 10650 0000032C 83E1C0 <1> and cx, ~ (paras(1024) - 1) ; round down to kibibyte boundary 10651 0000032F 41 <1> inc cx ; => paragraph of pseudo-PSP if here 10652 <1> 10653 00000330 89CB <1> mov bx, cx 10654 00000332 89DA <1> mov dx, bx 10655 00000334 81C3F619 <1> add bx, paras(AUXTARGET1) ; => auxbuff target if here 10656 <1> ; Note that we use AUXTARGET1 here, not AUXTARGET3, because 10657 <1> ; we move where the debugger starts rather than where it ends. 10658 00000338 81C2680C <1> add dx, paras(CODETARGET1) ; => code target if here 10659 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 10660 0000033C 89D8 <1> mov ax, bx 10661 0000033E 050102 <1> add ax, paras(auxbuff_size) 10662 <1> %endif 10663 00000341 E8B7FD <1> call init_check_auxbuff 10664 00000344 7406 <1> jz @F 10665 <1> 10666 <1> ; Because this shouldn't happen, this is 10667 <1> ; considered an internal error. 10668 00000346 BA[5308] <1> mov dx, imsg.early_reloc_fail 10669 00000349 E913FF <1> jmp .putsz_error 10670 <1> 10671 <1> 10672 <1> ; cx => data_entry target 10673 <1> ; dx => code target 10674 <1> ; bx => auxbuff target 10675 <1> ; ax => history segment 10676 <1> @@: 10677 <1> d4 call init_d4message 10678 <1> d4 asciz "Layout found" 10679 <1> d4 call init_d4dumpregs 10680 <1> d4 call init_d4message 10681 <1> d4 asciz 13,10 10682 <1> 10683 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 10684 0000034C 50 <1> push ax 10685 <1> %endif 10686 0000034D 894EFC <1> mov word [bp + ?target], cx 10687 00000350 52 <1> push dx 10688 00000351 2E803E[2C08]00 <1> cmp byte [cs:init_boot_ebdaflag], 0 10689 00000357 742E <1> jz .reloc_memtop_no_ebda 10690 00000359 49 <1> dec cx 10691 0000035A 2E2B0E[2608] <1> sub cx, word [cs:init_boot_ebdasize] 10692 0000035F 2EA1[2808] <1> mov ax, word [cs:init_boot_ebdasource] 10693 00000363 89CA <1> mov dx, cx 10694 00000365 2E890E[2A08] <1> mov word [cs:init_boot_ebdadest], cx 10695 0000036A 2E8B0E[2608] <1> mov cx, word [cs:init_boot_ebdasize] 10696 0000036F E82D09 <1> call init_movp 10697 00000372 014EF8 <1> add word [bp + ?memtop], cx 10698 00000375 2E800E[2C08]02 <1> or byte [cs:init_boot_ebdaflag], 2 10699 0000037B B84000 <1> mov ax, 40h 10700 0000037E 8EC0 <1> mov es, ax 10701 00000380 2689160E00 <1> mov word [es:0Eh], dx ; relocate EBDA 10702 <1> 10703 <1> d4 call init_d4message 10704 <1> d4 asciz "EBDA relocated",13,10 10705 <1> 10706 00000385 EB02 <1> jmp @F 10707 <1> 10708 <1> .reloc_memtop_no_ebda: 10709 00000387 89CA <1> mov dx, cx 10710 <1> @@: 10711 00000389 B106 <1> mov cl, 6 10712 0000038B D3EA <1> shr dx, cl 10713 0000038D B84000 <1> mov ax, 40h 10714 00000390 8EC0 <1> mov es, ax 10715 00000392 2E8916[2208] <1> mov word [ cs:init_boot_new_memsizekib ], dx 10716 00000397 2687161300 <1> xchg word [es:13h], dx 10717 0000039C 2E8916[2408] <1> mov word [ cs:init_boot_old_memsizekib ], dx 10718 000003A1 5A <1> pop dx 10719 <1> d4 call init_d4message 10720 <1> d4 asciz "Memory top relocated",13,10 10721 <1> 10722 000003A2 8B4EFC <1> mov cx, word [bp + ?target] 10723 000003A5 8ED9 <1> mov ds, cx 10724 000003A7 8B7EF8 <1> mov di, word [bp + ?memtop] ; => memory top 10725 000003AA 81EF4002 <1> sub di, paras(1024+8192) 10726 000003AE 8EC7 <1> mov es, di 10727 000003B0 39CF <1> cmp di, cx ; max padding starts below target PSP ? 10728 000003B2 7209 <1> jb @F ; yes, do not initialise padding 10729 000003B4 31FF <1> xor di, di ; -> padding 10730 000003B6 B90012 <1> mov cx, words(1024+8192) 10731 000003B9 31C0 <1> xor ax, ax 10732 000003BB F3AB <1> rep stosw ; initialise padding 10733 <1> @@: 10734 <1> 10735 000003BD 8B46F4 <1> mov ax, word [bp + ?code] ; => code source 10736 <1> ; dx => code target 10737 000003C0 B98E0D <1> mov cx, ldebug_code_size_p ; = size 10738 000003C3 E8D908 <1> call init_movp ; relocate code to target 10739 <1> d4 call init_d4message 10740 <1> d4 asciz "Code segment relocated",13,10 10741 <1> 10742 000003C6 52 <1> push dx ; (code segment) 10743 000003C7 8B46F6 <1> mov ax, word [bp + ?data] ; => data_entry source 10744 000003CA 8CDA <1> mov dx, ds 10745 000003CC 83C210 <1> add dx, paras(100h) ; => data_entry target 10746 000003CF B9940B <1> mov cx, paras(ldebug_data_entry_size + asmtable1_size + asmtable2_size) 10747 000003D2 E8CA08 <1> call init_movp ; relocate data_entry to target 10748 000003D5 8F06[D400] <1> pop word [code_seg] ; initialise code reference 10749 <1> d4 call init_d4message 10750 <1> d4 asciz "Data segment relocated",13,10 10751 <1> 10752 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 10753 000003D9 58 <1> pop ax 10754 000003DA A3[040B] <1> mov word [history.segorsel + soaSegSel], ax 10755 <1> %if _PM 10756 000003DD A3[060B] <1> mov word [history.segorsel + soaSegment], ax 10757 <1> %endif 10758 000003E0 8EC0 <1> mov es, ax 10759 000003E2 31FF <1> xor di, di 10760 000003E4 B90010 <1> mov cx, historysegment_size >> 1 10761 000003E7 31C0 <1> xor ax, ax 10762 000003E9 F3AB <1> rep stosw 10763 <1> %endif 10764 <1> 10765 000003EB 89D8 <1> mov ax, bx 10766 000003ED A3[FA09] <1> mov word [auxbuff_segorsel + soaSegSel], ax 10767 <1> %if _PM 10768 000003F0 A3[FC09] <1> mov word [auxbuff_segorsel + soaSegment], ax 10769 <1> ; initialise auxbuff references 10770 <1> %endif 10771 000003F3 8EC0 <1> mov es, ax 10772 000003F5 31FF <1> xor di, di 10773 000003F7 B90810 <1> mov cx, _AUXBUFFSIZE >> 1 10774 000003FA 31C0 <1> xor ax, ax 10775 000003FC F3AB <1> rep stosw ; initialise auxbuff 10776 <1> d4 call init_d4message 10777 <1> d4 asciz "auxbuff initialised",13,10 10778 <1> 10779 000003FE 1E <1> push ds 10780 000003FF 07 <1> pop es 10781 00000400 31FF <1> xor di, di 10782 00000402 B98000 <1> mov cx, words(100h) 10783 00000405 F3AB <1> rep stosw ; initialise pseudo-PSP 10784 <1> 10785 <1> init_boot_imageident: 10786 00000407 8CD8 <1> mov ax, ds 10787 00000409 48 <1> dec ax 10788 0000040A 8EC0 <1> mov es, ax ; => paragraph for imageident 10789 0000040C 31FF <1> xor di, di ; -> imageident target 10790 0000040E 8B5EF8 <1> mov bx, word [bp + ?memtop] 10791 00000411 29C3 <1> sub bx, ax ; = how many paragraphs do we use ? 10792 <1> 10793 00000413 0E <1> push cs 10794 00000414 1F <1> pop ds 10795 00000415 891E[1808] <1> mov word [imageident.size], bx ; set image ident size 10796 <1> 10797 00000419 BE[1008] <1> mov si, imageident 10798 0000041C 56 <1> push si 10799 0000041D B90800 <1> mov cx, 8 10800 00000420 31D2 <1> xor dx, dx 10801 <1> .loop: 10802 00000422 AD <1> lodsw 10803 00000423 01C2 <1> add dx, ax 10804 00000425 E2FB <1> loop .loop 10805 00000427 5E <1> pop si 10806 <1> 10807 00000428 F7DA <1> neg dx 10808 0000042A 8916[1608] <1> mov word [imageident.check], dx ; set image ident checksum 10809 <1> 10810 0000042E B108 <1> mov cl, 8 10811 00000430 F3A5 <1> rep movsw ; write image ident paragraph 10812 <1> 10813 00000432 8B46FC <1> mov ax, word [bp + ?target] 10814 <1> 10815 <1> lleave ctx ; dropping this frame for stack switch 10816 <1> 10817 00000435 FA <1> cli 10818 00000436 8ED8 <1> mov ds, ax 10819 00000438 8ED0 <1> mov ss, ax 10820 0000043A BC[400C] <1> mov sp, stack_end ; switch stacks 10821 0000043D FB <1> sti 10822 <1> 10823 0000043E 2EFF36[2408] <1> push word [cs:init_boot_old_memsizekib] 10824 00000443 8F06[3492] <1> pop word [boot_old_memsizekib] 10825 00000447 2EFF36[2208] <1> push word [cs:init_boot_new_memsizekib] 10826 0000044C 8F06[3292] <1> pop word [boot_new_memsizekib] 10827 00000450 2EA0[2C08] <1> mov al, byte [cs:init_boot_ebdaflag] 10828 00000454 2401 <1> and al, 1 10829 00000456 A2[3692] <1> mov byte [boot_ebdaflag], al 10830 <1> 10831 00000459 800E[9D00]40 <1> setopt [internalflags], nodosloaded 10832 0000045E 8026[9C00]0F <1> clropt [internalflags], notstdinput|inputfile|notstdoutput|outputfile 10833 00000463 C606[F40A]00 <1> mov byte [notatty], 0 ; it _is_ a tty 10834 00000468 800E[A600]20 <1> setopt [internalflags3], dif3_gotint19 10835 <1> 10836 0000046D BA[5008] <1> mov dx, imsg.crlf 10837 00000470 E8BD08 <1> call init_putsz_cs 10838 <1> 10839 <1> d4 call init_d4message 10840 <1> d4 asciz "New boot_initcode done",13,10 10841 <1> 10842 00000473 E92509 <1> jmp boot_old_initcode 10843 <1> 10844 <1> 10845 <1> init_booterror: 10846 <1> .soft: 10847 00000476 31C0 <1> xor ax, ax 10848 00000478 A9 <1> db __TEST_IMM16 ; (skip mov) 10849 <1> .hard: 10850 00000479 B001 <1> mov al, 1 10851 <1> 10852 <1> ;d4 call init_d4pocketdosmemdump 10853 <1> d4 call init_d4dumpregs 10854 <1> 10855 <1> .patch_switch_stack: 10856 0000047B EB09 <1> jmp strict short .no_switch_stack 10857 <1> 10858 0000047D 8CCB <1> mov bx, cs 10859 0000047F FA <1> cli 10860 00000480 8ED3 <1> mov ss, bx 10861 00000482 BC3015 <1> mov sp, init_size + BOOTINITSTACK_SIZE 10862 00000485 FB <1> sti 10863 <1> 10864 <1> .no_switch_stack: 10865 00000486 50 <1> push ax 10866 <1> 10867 00000487 B84000 <1> mov ax, 40h 10868 0000048A 8EC0 <1> mov es, ax 10869 <1> 10870 0000048C 2EF606[2C08]02 <1> test byte [cs:init_boot_ebdaflag], 2 10871 00000492 7416 <1> jz @F 10872 <1> 10873 00000494 2E8B16[2808] <1> mov dx, [cs:init_boot_ebdasource] 10874 00000499 2EA1[2A08] <1> mov ax, [cs:init_boot_ebdadest] 10875 0000049D 2E8B0E[2608] <1> mov cx, [cs:init_boot_ebdasize] 10876 000004A2 E8FA07 <1> call init_movp 10877 <1> 10878 000004A5 2689160E00 <1> mov word [es:0Eh], dx 10879 <1> @@: 10880 <1> 10881 000004AA 2E8B16[2408] <1> mov dx, [cs:init_boot_old_memsizekib] 10882 000004AF 85D2 <1> test dx, dx 10883 000004B1 7405 <1> jz @F 10884 000004B3 2689161300 <1> mov word [es:13h], dx 10885 <1> @@: 10886 <1> 10887 000004B8 BA[460B] <1> mov dx, imsg.booterror 10888 000004BB E89508 <1> call init_putsz_cs_bootldr 10889 000004BE E86A08 <1> call init_getc_bootldr 10890 000004C1 58 <1> pop ax 10891 000004C2 85C0 <1> test ax, ax 10892 000004C4 7502 <1> jnz @F 10893 000004C6 CD19 <1> int 19h 10894 <1> @@: 10895 000004C8 EA0000FFFF <1> jmp 0FFFFh:0 10896 <1> %endif ; _BOOTLDR 10897 <1> 10898 <1> 10899 <1> %if _DEBUG4 || _DEBUG5 10900 <1> %define _DEB_ASM_PREFIX init_ 10901 <1> %include "deb.asm" 10902 <1> %endif 10903 <1> 10904 <1> 10905 <1> %macro __writepatchtable2 0-*.nolist 10906 <1> %if %0 & 1 10907 <1> %fatal Expected even number of arguments 10908 <1> %endif 10909 <1> %rep %0 >> 1 10910 <1> %1 %2 10911 <1> %rotate 2 10912 <1> %endrep 10913 <1> %endmacro 10914 <1> 10915 <1> %macro __patchtable2_entry 0.nolist 10916 <1> ; only if this isn't the first (pseudo-)entry 10917 <1> %if %$lastcount != 0 10918 <1> %assign %$runscount %[%$runscount]+1 10919 <1> ; if the offset from %$previous is less than 255 10920 <1> %if (%$last-%$previous) < 255 10921 <1> %assign %$$method2tablesize %$$method2tablesize+1 10922 <1> ; then write a single byte (number of bytes not to patch between) 10923 <1> %xdefine %$$method2list %$$method2list,db,%$last-%$previous 10924 <1> %else 10925 <1> ; otherwise write a 255 ("reposition") and write the 16-bit address afterwards 10926 <1> %assign %$$method2tablesize %$$method2tablesize+3 10927 <1> %xdefine %$$method2list %$$method2list,db,255,dw,%$last 10928 <1> %assign %$reposcount %[%$reposcount]+1 10929 <1> %endif 10930 <1> %if %$lastcount == 1 10931 <1> %assign %$onecount %[%$onecount]+1 10932 <1> %endif 10933 <1> %assign %$$method2tablesize %$$method2tablesize+1 10934 <1> ; and write the number of bytes to be patched 10935 <1> %xdefine %$$method2list %$$method2list,db,%$lastcount 10936 <1> ; define %$previous for the next entry: it points to the next non-patched byte 10937 <1> %define %$previous (%[%$last]+%[%$lastcount]) 10938 <1> %endif 10939 <1> %endmacro 10940 <1> 10941 <1> %macro writepatchtable 2-*.nolist 10942 <1> 10943 <1> numdef %{1}_FORCE_METHOD, 0 10944 <1> %push 10945 <1> ; Determine length of simple table: 10946 <1> %assign %$method1tablesize (%0 - 2)*2 10947 <1> 10948 <1> %if !_%{1}_FORCE_METHOD || _%{1}_FORCE_METHOD == 2 10949 <1> ; Determine length of complicated table: 10950 <1> %assign %$method2tablesize 0 10951 <1> %define %$method2list db,"" 10952 <1> %push 10953 <1> %if _WPT_LABELS 10954 <1> %define %$previous code_start ; if list contains labels 10955 <1> %else 10956 <1> %define %$previous 0 10957 <1> %endif 10958 <1> %define %$last %[%$previous] 10959 <1> %assign %$lastcount 0 10960 <1> %assign %$onecount 0 10961 <1> %assign %$reposcount 0 10962 <1> %assign %$bytescount %0 - 2 10963 <1> %assign %$runscount 0 10964 <1> %rotate 1 10965 <1> %rep %0 - 2 10966 <1> %rotate 1 10967 <1> ;if it continues the previous patch and not too long and this isn't the first 10968 <1> %if ((%$last+%$lastcount) == %1) && (%$lastcount < 255) && (%$lastcount != 0) 10969 <1> ; then do not write an entry, just increase the patch's size 10970 <1> %assign %$lastcount %[%$lastcount]+1 10971 <1> %else 10972 <1> ; otherwise write the last entry 10973 <1> __patchtable2_entry 10974 <1> ; define new %$last to this parameter, %$lastcount to one 10975 <1> %define %$last %1 10976 <1> %assign %$lastcount 1 10977 <1> %endif 10978 <1> %endrep 10979 <1> __patchtable2_entry 10980 <1> 10981 <1> ; at the end, there's a patch with offset 0, size 0 10982 <1> %assign %$$method2tablesize %$$method2tablesize+2 10983 <1> %xdefine %$$method2list %$$method2list,db,0,db,0 10984 <1> 10985 <1> %assign %$$onecount %$onecount 10986 <1> %assign %$$reposcount %$reposcount 10987 <1> %assign %$$bytescount %$bytescount 10988 <1> %assign %$$runscount %$runscount 10989 <1> %pop 10990 <1> %rotate 1 10991 <1> %endif 10992 <1> 10993 <1> %if _%{1}_FORCE_METHOD == 2 10994 <1> %define __%{1}_method 2 10995 <1> %elif _%{1}_FORCE_METHOD == 1 10996 <1> %define __%{1}_method 1 10997 <1> %else 10998 <1> %if _%{1}_FORCE_METHOD 10999 <1> %fatal Invalid forced method selected: _%{1}_FORCE_METHOD 11000 <1> %endif 11001 <1> %if %$method1tablesize > (%$method2tablesize+20) 11002 <1> %define __%{1}_method 2 11003 <1> %else 11004 <1> %define __%{1}_method 1 11005 <1> %endif 11006 <1> %endif 11007 <1> 11008 <1> 11009 <1> %1: 11010 <1> %if __%{1}_method == 2 11011 <1> __writepatchtable2 %$method2list 11012 <1> endarea %1 11013 <1> %assign %$size %1_size 11014 <1> %warning %1: %$size bytes (Method 2) 11015 <1> %warning 1B=%$onecount repo=%$reposcount run=%$runscount byte=%$bytescount 11016 <1> %else 11017 <1> %rotate 1 11018 <1> %rep %0 - 2 11019 <1> %rotate 1 11020 <1> dw %1 11021 <1> %endrep 11022 <1> %rotate 1 11023 <1> endarea %1 11024 <1> %assign %$size %1_size 11025 <1> %warning %1: %$size bytes (Method 1) 11026 <1> %endif 11027 <1> %pop 11028 <1> %endmacro 11029 <1> 11030 000004CD 00 <1> align 2, db 0 ; align on word boundary 11031 <1> ; Table of patches that are to be set NOP if not running on a 386. 11032 000004CE 020104040201010101- <1> writepatchtable patch_no386_table, PATCH_NO386_TABLE 11032 000004D7 04FFF1030104040201- <1> 11032 000004E0 01010104FFB60501FF- <1> 11032 000004E9 62080104090201FF33- <1> 11032 000004F2 0D011101080116011D- <1> 11032 000004FB 0108014A0106010B01- <1> 11032 00000504 0A010901050103010A- <1> 11032 0000050D 01060103010A010301- <1> 11032 00000516 030101010401FF8C0F- <1> 11032 0000051F 01030101012F010504- <1> 11032 00000528 FF7513042F01040106- <1> 11032 00000531 053B010201FF1A1501- <1> 11032 0000053A 020105013D01160104- <1> 11032 00000543 012101040123010101- <1> 11032 0000054C 0201060A010110010C- <1> 11032 00000555 120C010401FF2D1701- <1> 11032 0000055E 2D011B010801050124- <1> 11032 00000567 010F01FF1B1901FF20- <1> 11032 00000570 21049C0137016101FF- <1> 11032 00000579 322401FF6D2510FFE4- <1> 11032 00000582 2801FF6C2A01120124- <1> 11032 0000058B 011D01010102011401- <1> 11032 00000594 020503010208B701EB- <1> 11032 0000059D 0AFF4130010B01FFA4- <1> 11032 000005A6 320126030709F80A28- <1> 11032 000005AF 01FFAB380107010401- <1> 11032 000005B8 150B31013F012F0302- <1> 11032 000005C1 032201110115010F01- <1> 11032 000005CA 110718011101010101- <1> 11032 000005D3 010101180101010101- <1> 11032 000005DC 01012B04B301260307- <1> 11032 000005E5 09FF7D3E013F04040A- <1> 11032 000005EE 340104019F012A0410- <1> 11032 000005F7 050403510101010101- <1> 11032 00000600 01010101080104030A- <1> 11032 00000609 02051823010309FF53- <1> 11032 00000612 4301FF96440827023A- <1> 11032 0000061B 01040104011B061802- <1> 11032 00000624 4E01FFE54602090101- <1> 11032 0000062D 0120010101FF744801- <1> 11032 00000636 0B01A1010401020105- <1> 11032 0000063F 012501040104010101- <1> 11032 00000648 090101010101030102- <1> 11032 00000651 01020102011F010201- <1> 11032 0000065A E709FFC74B0DFFDB4C- <1> 11032 00000663 01FFC84E01FF3C5001- <1> 11032 0000066C 040104011A01140B9B- <1> 11032 00000675 012E02030103010302- <1> 11032 0000067E 030103010302030103- <1> 11032 00000687 01030203010301FF78- <1> 11032 00000690 560105011A01FF5D58- <1> 11032 00000699 0EE10102012301FF2D- <1> 11032 000006A2 5B0101010401080101- <1> 11032 000006AB 010201060101010401- <1> 11032 000006B4 080101010201060108- <1> 11032 000006BD 0109012D0404010A01- <1> 11032 000006C6 1901160105013A0507- <1> 11032 000006CF 027F01090314010904- <1> 11032 000006D8 09030601060101010A- <1> 11032 000006E1 011C03050101010B03- <1> 11032 000006EA 1102580107043D0106- <1> 11032 000006F3 0102010A0125010801- <1> 11032 000006FC FF3F5F051505FF8360- <1> 11032 00000705 010D0102012D010201- <1> 11032 0000070E 2901FFB6620B140BFF- <1> 11032 00000717 848E01A6065C062501- <1> 11032 00000720 0201020101011A0102- <1> 11032 00000729 011604020303010101- <1> 11032 00000732 FFA29304FFED940466- <1> 11032 0000073B 04FF7B980110010201- <1> 11032 00000744 030102010501010102- <1> 11032 0000074D 010201FFBC9A010904- <1> 11032 00000756 2101FF98A001080101- <1> 11032 0000075F 012901020122010504- <1> 11032 00000768 1D03FF07A80147010C- <1> 11032 00000771 010F01070312014701- <1> 11032 0000077A 040113019501020101- <1> 11032 00000783 010E01010102010901- <1> 11032 0000078C 0A03AD032D040C050B- <1> 11032 00000795 050E010A0104200D03- <1> 11032 0000079E 0A01070102011A042F- <1> 11032 000007A7 030B0101011C034609- <1> 11032 000007B0 FF9FAE02FFF5B00112- <1> 11032 000007B9 0105018C028501051E- <1> 11032 000007C2 FFDCB60707070201BA- <1> 11032 000007CB 0730010A07FF98C301- <1> 11032 000007D4 01032701FF60C60104- <1> 11032 000007DD 04020101010104FFEE- <1> 11032 000007E6 D7010000 <1> 11032 ****************** <1> warning: patch_no386_table: 796 (Method 2) [-w+user] 11032 ****************** <1> warning: 1B=259 repo=45 run=352 byte=826 [-w+user] 11033 <1> %undef PATCH_NO386_TABLE 11034 <1> 11035 <1> align 2, db 0 11036 <1> ; Table of patches that are to be set NOP if running on a 386. 11037 000007EA FFAD1602FF972A05FF- <1> writepatchtable patch_386_table, PATCH_386_TABLE 11037 000007F3 453905FF2E3F02FF86- <1> 11037 000007FC 4D0E4D0EFF905007FF- <1> 11037 00000805 23B204FFEDD7010000 <1> 11037 ****************** <1> warning: patch_386_table: 36 (Method 2) [-w+user] 11037 ****************** <1> warning: 1B=1 repo=8 run=9 byte=54 [-w+user] 11038 <1> %undef PATCH_386_TABLE 11039 <1> 11040 <1> %unmacro __writepatchtable2 0-*.nolist 11041 <1> %unmacro __patchtable2_entry 0.nolist 11042 <1> %unmacro writepatchtable 2-*.nolist 11043 <1> 11044 <1> 11045 <1> %if _BOOTLDR 11046 0000080E 00 <1> align 16, db 0 11047 <1> ; Image identification 11048 <1> ; First dword: signature 11049 <1> ; Next word: version, two ASCII digits 11050 <1> ; Next word: checksum. adding up all words of the paragraph gives zero 11051 <1> ; Next word: size of image (including this paragraph) 11052 <1> ; Three words reserved, zero. 11053 <1> imageident: 11054 00000810 4E4445423030 <1> db "NDEB00" 11055 00000816 0000 <1> .check: dw 0 11056 00000818 0000 <1> .size: dw 0 11057 0000081A 0000 <1> times 3 dw 0 11058 <1> %endif 11059 <1> align 2, db 0 11060 00000820 F71D <1> memsize: dw paras(CODETARGET2 + ldebug_code_size + historysegment_size) 11063 <1> ; same as paras(AUXTARGET1 + auxbuff_size + historysegment_size) 11064 <1> 11065 <1> %if _BOOTLDR 11066 00000822 0000 <1> init_boot_new_memsizekib: dw 0 11067 00000824 0000 <1> init_boot_old_memsizekib: dw 0 11068 <1> 11069 00000826 0000 <1> init_boot_ebdasize: dw 0 11070 00000828 0000 <1> init_boot_ebdasource: dw 0 11071 0000082A 0000 <1> init_boot_ebdadest: dw 0 11072 0000082C 00 <1> init_boot_ebdaflag: db 0 11073 <1> %endif 11074 <1> 11075 <1> 11076 <1> imsg: 11077 <1> .early_mem_fail: 11078 0000082D 6C4465627567583A20- <1> db _PROGNAME,": Failed to allocate memory!" 11078 00000836 4661696C656420746F- <1> 11078 0000083F 20616C6C6F63617465- <1> 11078 00000848 206D656D6F727921 <1> 11079 <1> .crlf: 11080 00000850 0D0A00 <1> asciz 13,10 11081 <1> .early_reloc_fail: 11082 00000853 6C4465627567583A20- <1> asciz _PROGNAME,": Failed to relocate, internal error!",13,10 11082 0000085C 4661696C656420746F- <1> 11082 00000865 2072656C6F63617465- <1> 11082 0000086E 2C20696E7465726E61- <1> 11082 00000877 6C206572726F72210D- <1> 11082 00000880 0A00 <1> 11083 <1> .help.defaultfilename: 11084 00000882 444542554758 <1> db _FILENAME 11085 <1> .help.defaultfilename.length equ $ - .help.defaultfilename 11086 <1> .help.1: 11087 00000888 6C4465627567582028- <1> db _PROGNAME,_VERSION,", debugger.",13,10 11087 00000891 323032322D30352D30- <1> 11087 0000089A 33292C206465627567- <1> 11087 000008A3 6765722E0D0A <1> 11088 000008A9 0D0A <1> db 13,10 11089 000008AB 55736167653A20 <1> db "Usage: " 11090 000008B2 00 <1> asciz 11091 <1> .help.2: 11092 000008B3 5B2E434F4D5D205B2F- <1> db "[.COM] [/C=commands] [[drive:][path]progname.ext [parameters]]",13,10 11092 000008BC 433D636F6D6D616E64- <1> 11092 000008C5 735D205B5B64726976- <1> 11092 000008CE 653A5D5B706174685D- <1> 11092 000008D7 70726F676E616D652E- <1> 11092 000008E0 657874205B70617261- <1> 11092 000008E9 6D65746572735D5D0D- <1> 11092 000008F2 0A <1> 11093 000008F3 0D0A <1> db 13,10 11094 000008F5 20202F433D636F6D6D- <1> db " /C=commands",9,9, "semicolon-separated list of commands (quote spaces)",13,10 11094 000008FE 616E6473090973656D- <1> 11094 00000907 69636F6C6F6E2D7365- <1> 11094 00000910 70617261746564206C- <1> 11094 00000919 697374206F6620636F- <1> 11094 00000922 6D6D616E6473202871- <1> 11094 0000092B 756F74652073706163- <1> 11094 00000934 6573290D0A <1> 11095 00000939 20202F420909097275- <1> db " /B",9,9,9, "run a breakpoint within initialisation",13,10 11095 00000942 6E206120627265616B- <1> 11095 0000094B 706F696E7420776974- <1> 11095 00000954 68696E20696E697469- <1> 11095 0000095D 616C69736174696F6E- <1> 11095 00000966 0D0A <1> 11096 00000968 202070726F676E616D- <1> db " progname.ext",9,9,"(executable) file to debug or examine",13,10 11096 00000971 652E65787409092865- <1> 11096 0000097A 786563757461626C65- <1> 11096 00000983 292066696C6520746F- <1> 11096 0000098C 206465627567206F72- <1> 11096 00000995 206578616D696E650D- <1> 11096 0000099E 0A <1> 11097 0000099F 2020706172616D6574- <1> db " parameters",9,9, "parameters given to program",13,10 11097 000009A8 657273090970617261- <1> 11097 000009B1 6D6574657273206769- <1> 11097 000009BA 76656E20746F207072- <1> 11097 000009C3 6F6772616D0D0A <1> 11098 000009CA 0D0A <1> db 13,10 11099 000009CC 466F722061206C6973- <1> db "For a list of debugging commands, run " 11099 000009D5 74206F662064656275- <1> 11099 000009DE 6767696E6720636F6D- <1> 11099 000009E7 6D616E64732C207275- <1> 11099 000009F0 6E20 <1> 11100 000009F2 00 <1> asciz 11101 <1> .help.3: 11102 000009F3 20616E642074797065- <1> db " and type ? at the prompt.",13,10 11102 000009FC 203F20617420746865- <1> 11102 00000A05 2070726F6D70742E0D- <1> 11102 00000A0E 0A <1> 11103 00000A0F 00 <1> asciz 11104 <1> %if _ONLY386 11105 <1> .no386: ascizline "Error: This ",_PROGNAME," build requires a 386 CPU or higher." 11106 <1> %elif _ONLYNON386 11107 <1> .386: asciiline "Warning: This ",_PROGNAME," build is ignorant of 386 CPU specifics." 11108 <1> ascizline 9," It does not allow access to the available 386-specific registers!" 11109 <1> %endif 11110 <1> 11111 <1> .invalidswitch: 11112 00000A10 496E76616C69642073- <1> db "Invalid switch - " 11112 00000A19 7769746368202D20 <1> 11113 <1> .invalidswitch_a: 11114 00000A21 780D0A00 <1> asciz "x",13,10 11115 <1> .switch_c_error: 11116 00000A25 537769746368202F43- <1> asciz "Switch /C invalid content",13,10 11116 00000A2E 20696E76616C696420- <1> 11116 00000A37 636F6E74656E740D0A- <1> 11116 00000A40 00 <1> 11117 <1> %if _BOOTLDR 11118 <1> .default_cmdline: 11119 <1> db _BOOTSCRIPTPREFIX 11120 00000A41 406966206578697374- <1> db "@if exists y ldp/",_BOOTSCRIPTNAME," :",_BOOTSCRIPTLABEL 11120 00000A4A 732079206C64702F4C- <1> 11120 00000A53 44454255472E534C44- <1> 11120 00000A5C 203A626F6F74737461- <1> 11120 00000A65 72747570 <1> 11121 00000A69 207468656E2079206C- <1> db " then y ldp/",_BOOTSCRIPTNAME," :",_BOOTSCRIPTLABEL 11121 00000A72 64702F4C4445425547- <1> 11121 00000A7B 2E534C44203A626F6F- <1> 11121 00000A84 7473746172747570 <1> 11122 00000A8C 00 <1> asciz 11123 <1> .rpl_detected: 11124 00000A8D 52504C206465746563- <1> asciz "RPL detected! Currently unsupported.",13,10 11124 00000A96 746564212043757272- <1> 11124 00000A9F 656E746C7920756E73- <1> 11124 00000AA8 7570706F727465642E- <1> 11124 00000AB1 0D0A00 <1> 11125 <1> .mismatch_detected: 11126 00000AB4 4D69736D6174636820- <1> asciz "Mismatch in memory size detected! Internal error!",13,10 11126 00000ABD 696E206D656D6F7279- <1> 11126 00000AC6 2073697A6520646574- <1> 11126 00000ACF 65637465642120496E- <1> 11126 00000AD8 7465726E616C206572- <1> 11126 00000AE1 726F72210D0A00 <1> 11127 <1> .boot_ebda_unexpected: 11128 00000AE8 454244412061742075- <1> asciz "EBDA at unexpected position.",13,10 11128 00000AF1 6E6578706563746564- <1> 11128 00000AFA 20706F736974696F6E- <1> 11128 00000B03 2E0D0A00 <1> 11129 <1> .boot_error_out_of_memory: 11130 00000B07 4F7574206F66206D65- <1> asciz "Out of memory!",13,10 11130 00000B10 6D6F7279210D0A00 <1> 11131 <1> .boot_error_internal: 11132 00000B18 496E7465726E616C20- <1> asciz "Internal error while relocating load image!",13,10 11132 00000B21 6572726F7220776869- <1> 11132 00000B2A 6C652072656C6F6361- <1> 11132 00000B33 74696E67206C6F6164- <1> 11132 00000B3C 20696D616765210D0A- <1> 11132 00000B45 00 <1> 11133 <1> .booterror: 11134 00000B46 0D0A6C446562756758- <1> asciz 13,10,_PROGNAME," boot error. Press any key to reboot.",13,10 11134 00000B4F 20626F6F7420657272- <1> 11134 00000B58 6F722E205072657373- <1> 11134 00000B61 20616E79206B657920- <1> 11134 00000B6A 746F207265626F6F74- <1> 11134 00000B73 2E0D0A00 <1> 11135 <1> %endif 11136 <1> %if _DOSEMU 11137 00000B77 30322F32352F3933 <1> .dosemudate: db "02/25/93" 11138 <1> %endif 11139 <1> %if _VDD 11140 00000B7F 44454258585644442E- <1> .vdd: asciz "DEBXXVDD.DLL" 11140 00000B88 444C4C00 <1> 11141 00000B8C 446973706174636800 <1> .dispatch: asciz "Dispatch" 11142 00000B95 496E697400 <1> .init: asciz "Init" 11143 00000B9A 4D4F555345202020 <1> .mouse: db "MOUSE",32,32,32 ; Looks like a device name 11144 00000BA2 416E64792057617473- <1> .andy: db "Andy Watson" ; I don't know him and why he's inside the NTVDM mouse driver 11144 00000BAB 6F6E <1> 11145 <1> endarea .andy 11146 00000BAD 57696E646F7773204E- <1> .ntdos: db "Windows NT MS-DOS subsystem Mouse Driver" ; Int33.004D mouse driver copyright string (not ASCIZ) 11146 00000BB6 54204D532D444F5320- <1> 11146 00000BBF 73756273797374656D- <1> 11146 00000BC8 204D6F757365204472- <1> 11146 00000BD1 69766572 <1> 11147 <1> endarea .ntdos 11148 <1> 11149 <1> ; INP: - 11150 <1> ; OUT: CY if not NTVDM 11151 <1> ; NC if NTVDM 11152 <1> ; ds = es = cs 11153 <1> ; CHG: ax, bx, cx, dx, di, si, bp, es, ds 11154 <1> isnt: 11155 00000BD5 B80258 <1> mov ax, 5802h ; Get UMB link state 11156 00000BD8 CD21 <1> int 21h 11157 00000BDA 30E4 <1> xor ah, ah 11158 00000BDC 50 <1> push ax ; Save UMB link state 11159 00000BDD B80358 <1> mov ax, 5803h ; Set UMB link state: 11160 00000BE0 BB0100 <1> mov bx, 1 ; Add UMBs to memory chain 11161 00000BE3 CD21 <1> int 21h 11162 00000BE5 B452 <1> mov ah, 52h 11163 00000BE7 BBFFFF <1> mov bx, -1 11164 00000BEA CD21 <1> int 21h ; Get list of lists 11165 00000BEC 43 <1> inc bx ; 0FFFFh ? 11166 00000BED 7503E98600 <1> jz .notnt ; invalid --> 11167 00000BF2 268B47FD <1> mov ax, word [es:bx-3] ; First MCB 11168 00000BF6 0E <1> push cs 11169 00000BF7 07 <1> pop es ; reset es 11170 <1> .loop: 11171 00000BF8 8ED8 <1> mov ds, ax ; ds = MCB 11172 00000BFA 40 <1> inc ax ; Now segment of memory block itself 11173 00000BFB 31D2 <1> xor dx, dx 11174 00000BFD 31DB <1> xor bx, bx 11175 00000BFF 803F5A <1> cmp byte [bx], 'Z' ; End of MCB chain? 11176 00000C02 7503 <1> jne .notlast 11177 00000C04 42 <1> inc dx 11178 00000C05 EB05 <1> jmp short .notchain 11179 <1> .notlast: 11180 00000C07 803F4D <1> cmp byte [bx], 'M' ; Valid MCB chain? 11181 00000C0A 756C <1> jne .error 11182 <1> .notchain: 11183 00000C0C 8B4F03 <1> mov cx, [bx+3] ; MCB size in paragraphs 11184 <1> ; ax = current memory block 11185 <1> ; cx = size of current memory block in paragraphs 11186 <1> ; dx = flag whether this is the last MCB 11187 <1> ; ds = current MCB (before memory block) 11188 00000C0F 837F0108 <1> cmp word [bx+1], 8 ; MCB owner DOS? 11189 00000C13 755D <1> jne .notfound_1 11190 00000C15 817F085344 <1> cmp word [bx+8], "SD" ; MCB name "SD"? 11191 00000C1A 7556 <1> jne .notfound_1 11192 <1> .loopsub: 11193 00000C1C 8ED8 <1> mov ds, ax ; SD sub-segment inside memory block 11194 00000C1E 40 <1> inc ax 11195 00000C1F 49 <1> dec cx 11196 00000C20 8B6F03 <1> mov bp, word [bx+3] ; Paragraphs 'til end of SD sub-segment 11197 <1> ; ax = current SD sub-segment 11198 <1> ; cx = paragraphs from SD sub-segment start (ax) to current memory block end 11199 <1> ; ds = current SD sub-MCB (like MCB, but for SD sub-segment) 11200 <1> ; bp = current SD sub-segment size in paragraphs 11201 00000C23 39E9 <1> cmp cx, bp 11202 00000C25 724B <1> jb .notfound_1 ; Goes beyond memory block, invalid --> 11203 00000C27 803F51 <1> cmp byte [bx], 'Q' ; NTVDM type 51h sub-segment ? 11204 00000C2A 753C <1> jne .notfound_2 ; no --> 11205 00000C2C BE0800 <1> mov si, 8 ; Offset of device name (if SD device driver sub-segment) 11206 00000C2F BF[9A0B] <1> mov di, imsg.mouse 11207 00000C32 51 <1> push cx 11208 00000C33 89F1 <1> mov cx, si ; length of name 11209 00000C35 F3A6 <1> repe cmpsb ; blank-padded device name "MOUSE" ? 11210 00000C37 59 <1> pop cx 11211 00000C38 752E <1> jne .notfound_2 ; Device name doesn't match, try next SD sub-segment 11212 00000C3A 8CD8 <1> mov ax, ds 11213 00000C3C 40 <1> inc ax 11214 00000C3D 8ED8 <1> mov ds, ax ; Segment of SD sub-segment 11215 <1> ; ds = current SD sub-segment 11216 00000C3F 89E8 <1> mov ax, bp ; Leave paragraph value in bp 11217 00000C41 A900F0 <1> test ax, 0F000h ; Would *16 cause an overflow? 11218 00000C44 7520 <1> jnz .notfound_3 ; Then too large --> 11219 00000C46 51 <1> push cx 11220 00000C47 B104 <1> mov cl, 4 11221 00000C49 D3E0 <1> shl ax, cl ; *16 11222 00000C4B 59 <1> pop cx 11223 <1> ; ax = current SD sub-segment size in byte 11224 <1> .andy: 11225 00000C4C BF[A20B] <1> mov di, imsg.andy 11226 00000C4F 51 <1> push cx 11227 00000C50 B90B00 <1> mov cx, imsg.andy_size 11228 00000C53 E82E00 <1> call findstring ; String "Andy Watson"? 11229 00000C56 59 <1> pop cx 11230 00000C57 720D <1> jc .notfound_3 11231 <1> .ntdos: 11232 00000C59 BF[AD0B] <1> mov di, imsg.ntdos 11233 00000C5C 51 <1> push cx 11234 00000C5D B92800 <1> mov cx, imsg.ntdos_size 11235 00000C60 E82100 <1> call findstring ; String "Windows NT MS-DOS subsystem Mouse Driver"? 11236 00000C63 59 <1> pop cx 11237 00000C64 7313 <1> jnc .found ; (NC) 11238 <1> .notfound_3: 11239 00000C66 8CD8 <1> mov ax, ds 11240 <1> .notfound_2: 11241 00000C68 39E9 <1> cmp cx, bp 11242 00000C6A 7406 <1> je .notfound_1 ; End of SD memory block, get next MCB 11243 00000C6C 01E8 <1> add ax, bp ; Address next SD sub-MCB 11244 00000C6E 29E9 <1> sub cx, bp 11245 00000C70 EBAA <1> jmp short .loopsub ; Try next SD sub-segment 11246 <1> .notfound_1: 11247 00000C72 01C8 <1> add ax, cx ; Address next MCB 11248 00000C74 85D2 <1> test dx, dx ; Non-zero if 'Z' MCB 11249 00000C76 7480 <1> jz .loop ; If not at end of MCB chain, try next 11250 <1> ; jmp short .notnt ; Otherwise, not found 11251 <1> .error: 11252 <1> .notnt: 11253 00000C78 F9 <1> stc 11254 <1> .found: 11255 00000C79 0E <1> push cs 11256 00000C7A 1F <1> pop ds ; restore ds 11257 <1> 11258 00000C7B 5B <1> pop bx ; saved UMB link state 11259 00000C7C B80358 <1> mov ax, 5803h 11260 00000C7F 9C <1> pushf 11261 00000C80 CD21 <1> int 21h ; Set UMB link state 11262 00000C82 9D <1> popf 11263 00000C83 C3 <1> retn 11264 <1> 11265 <1> findstring: 11266 00000C84 31F6 <1> xor si, si 11267 <1> .loop: 11268 00000C86 56 <1> push si 11269 00000C87 01CE <1> add si, cx 11270 00000C89 7203 <1> jc .notfound_c 11271 00000C8B 4E <1> dec si ; The largest offset we need for this compare 11272 00000C8C 39F0 <1> cmp ax, si 11273 <1> .notfound_c: 11274 00000C8E 5E <1> pop si 11275 00000C8F 720D <1> jb .return ; Not found if at top of memory block --> 11276 00000C91 57 <1> push di 11277 00000C92 56 <1> push si 11278 00000C93 51 <1> push cx 11279 00000C94 F3A6 <1> repe cmpsb ; String somewhere inside program? 11280 00000C96 59 <1> pop cx 11281 00000C97 5E <1> pop si 11282 00000C98 5F <1> pop di 11283 00000C99 7403 <1> je .return ; Yes, proceed --> (if ZR, NC) 11284 00000C9B 46 <1> inc si ; Increase pointer by one 11285 00000C9C EBE8 <1> jmp short .loop ; Try next address 11286 <1> .return: 11287 00000C9E C3 <1> retn 11288 <1> %endif 11289 <1> 11290 <1> 11291 <1> ; Move paragraphs 11292 <1> ; 11293 <1> ; INP: ax:0-> source 11294 <1> ; dx:0-> destination 11295 <1> ; cx = number of paragraphs 11296 <1> ; CHG: - 11297 <1> ; Note: Doesn't work correctly on HMA; doesn't always wrap to LMA either. 11298 <1> ; Do not provide a wrapped/HMA source or destination! 11299 <1> init_movp: 11300 00000C9F 51 <1> push cx 11301 00000CA0 1E <1> push ds 11302 00000CA1 56 <1> push si 11303 00000CA2 06 <1> push es 11304 00000CA3 57 <1> push di 11305 <1> 11306 00000CA4 39D0 <1> cmp ax, dx ; source above destination ? 11307 00000CA6 770A <1> ja .up ; yes, move up (forwards) --> 11308 00000CA8 747B <1> je .return ; same, no need to move --> 11309 00000CAA 50 <1> push ax 11310 00000CAB 01C8 <1> add ax, cx ; (expected not to carry) 11311 00000CAD 39D0 <1> cmp ax, dx ; end of source is above destination ? 11312 00000CAF 58 <1> pop ax 11313 00000CB0 7730 <1> ja .down ; yes, move from top down --> 11314 <1> ; Here, the end of source is below-or-equal the destination, 11315 <1> ; so they do not overlap. In this case we prefer moving up. 11316 <1> 11317 <1> .up: 11318 00000CB2 50 <1> push ax 11319 00000CB3 52 <1> push dx 11320 <1> .uploop: 11321 00000CB4 8ED8 <1> mov ds, ax 11322 00000CB6 8EC2 <1> mov es, dx 11323 00000CB8 31FF <1> xor di, di 11324 00000CBA 31F6 <1> xor si, si ; -> start of segment 11325 00000CBC 81E90010 <1> sub cx, 1000h ; 64 KiB left ? 11326 00000CC0 7610 <1> jbe .uplast ; no --> 11327 00000CC2 51 <1> push cx 11328 00000CC3 B90080 <1> mov cx, 10000h /2 11329 00000CC6 F3A5 <1> rep movsw ; move 64 KiB 11330 00000CC8 59 <1> pop cx 11331 00000CC9 050010 <1> add ax, 1000h 11332 00000CCC 81C20010 <1> add dx, 1000h ; -> next segment 11333 00000CD0 EBE2 <1> jmp short .uploop ; proceed for more --> 11334 <1> .uplast: 11335 00000CD2 81C10010 <1> add cx, 1000h ; restore counter 11336 00000CD6 D1E1 <1> shl cx, 1 11337 00000CD8 D1E1 <1> shl cx, 1 11338 00000CDA D1E1 <1> shl cx, 1 ; *8, paragraphs to words 11339 00000CDC F3A5 <1> rep movsw ; move last part 11340 00000CDE 5A <1> pop dx 11341 00000CDF 58 <1> pop ax 11342 00000CE0 EB43 <1> jmp short .return 11343 <1> 11344 <1> .down: 11345 00000CE2 FD <1> std ; _AMD_ERRATUM_109_WORKAROUND as below 11346 <1> .dnloop: 11347 00000CE3 81E90010 <1> sub cx, 1000h ; 64 KiB left ? 11348 00000CE7 761A <1> jbe .dnlast ; no --> 11349 00000CE9 50 <1> push ax 11350 00000CEA 52 <1> push dx 11351 00000CEB 01C8 <1> add ax, cx 11352 00000CED 01CA <1> add dx, cx 11353 00000CEF 8ED8 <1> mov ds, ax ; -> 64 KiB not yet moved 11354 00000CF1 8EC2 <1> mov es, dx 11355 00000CF3 5A <1> pop dx 11356 00000CF4 58 <1> pop ax 11357 00000CF5 BFFEFF <1> mov di, -2 11358 00000CF8 89FE <1> mov si, di ; moved from last word down 11359 00000CFA 51 <1> push cx 11360 00000CFB B90080 <1> mov cx, 10000h /2 11361 00000CFE F3A5 <1> rep movsw ; move 64 KiB 11362 00000D00 59 <1> pop cx 11363 00000D01 EBE0 <1> jmp short .dnloop ; proceed for more --> 11364 <1> .dnlast: 11365 00000D03 81C10010 <1> add cx, 1000h ; restore counter 11366 00000D07 D1E1 <1> shl cx, 1 11367 00000D09 D1E1 <1> shl cx, 1 11368 00000D0B D1E1 <1> shl cx, 1 ; *8, paragraphs to words 11369 00000D0D 89CF <1> mov di, cx 11370 00000D0F 4F <1> dec di 11371 00000D10 D1E7 <1> shl di, 1 ; words to offset, -> last word 11372 00000D12 89FE <1> mov si, di 11373 00000D14 8ED8 <1> mov ds, ax 11374 00000D16 8EC2 <1> mov es, dx ; first segment correct 11375 <1> 11376 <1> 11377 <1> numdef AMD_ERRATUM_109_WORKAROUND, 1 11378 <1> %if 0 11379 <1> 11380 <1> Jack R. Ellis pointed out this erratum: 11381 <1> 11382 <1> Quoting from https://www.amd.com/system/files/TechDocs/25759.pdf page 69: 11383 <1> 11384 <1> 109 Certain Reverse REP MOVS May Produce Unpredictable Behavior 11385 <1> 11386 <1> Description 11387 <1> 11388 <1> In certain situations a REP MOVS instruction may lead to 11389 <1> incorrect results. An incorrect address size, data size 11390 <1> or source operand segment may be used or a succeeding 11391 <1> instruction may be skipped. This may occur under the 11392 <1> following conditions: 11393 <1> 11394 <1> * EFLAGS.DF=1 (the string is being moved in the reverse direction). 11395 <1> 11396 <1> * The number of items being moved (RCX) is between 1 and 20. 11397 <1> 11398 <1> * The REP MOVS instruction is preceded by some microcoded instruction 11399 <1> that has not completely retired by the time the REP MOVS begins 11400 <1> execution. The set of such instructions includes BOUND, CLI, LDS, 11401 <1> LES, LFS, LGS, LSS, IDIV, and most microcoded x87 instructions. 11402 <1> 11403 <1> Potential Effect on System 11404 <1> 11405 <1> Incorrect results may be produced or the system may hang. 11406 <1> 11407 <1> Suggested Workaround 11408 <1> 11409 <1> Contact your AMD representative for information on a BIOS update. 11410 <1> 11411 <1> %endif 11412 <1> 11413 <1> %if _AMD_ERRATUM_109_WORKAROUND 11414 00000D18 E308 <1> jcxz @FF 11415 00000D1A 83F914 <1> cmp cx, 20 11416 00000D1D 7703 <1> ja @FF 11417 <1> @@: 11418 00000D1F A5 <1> movsw 11419 00000D20 E2FD <1> loop @B 11420 <1> @@: 11421 <1> %endif 11422 00000D22 F3A5 <1> rep movsw ; move first part 11423 00000D24 FC <1> cld 11424 <1> .return: 11425 00000D25 5F <1> pop di 11426 00000D26 07 <1> pop es 11427 00000D27 5E <1> pop si 11428 00000D28 1F <1> pop ds 11429 00000D29 59 <1> pop cx 11430 00000D2A C3 <1> retn 11431 <1> 11432 <1> 11433 <1> %if _BOOTLDR 11434 <1> ; only called for boot-loaded mode 11435 <1> init_getc_bootldr: 11436 00000D2B 31C0 <1> xor ax, ax 11437 00000D2D CD16 <1> int 16h 11438 00000D2F C3 <1> retn 11439 <1> %endif 11440 <1> 11441 <1> init_putsz_cs: 11442 00000D30 50 <1> push ax 11443 00000D31 53 <1> push bx 11444 00000D32 51 <1> push cx 11445 00000D33 52 <1> push dx 11446 00000D34 1E <1> push ds 11447 00000D35 06 <1> push es 11448 00000D36 57 <1> push di 11449 00000D37 0E <1> push cs 11450 00000D38 07 <1> pop es 11451 00000D39 0E <1> push cs 11452 00000D3A 1F <1> pop ds 11453 00000D3B 89D7 <1> mov di, dx ; es:di-> string 11454 00000D3D 30C0 <1> xor al, al 11455 00000D3F B9FFFF <1> mov cx, -1 11456 00000D42 F2AE <1> repne scasb ; search zero 11457 00000D44 F7D9 <1> neg cx 11458 00000D46 49 <1> dec cx 11459 00000D47 49 <1> dec cx ; cx = length of message 11460 00000D48 5F <1> pop di 11461 00000D49 E82A00 <1> call init_puts_ds 11462 00000D4C 07 <1> pop es 11463 00000D4D 1F <1> pop ds 11464 00000D4E 5A <1> pop dx 11465 00000D4F 59 <1> pop cx 11466 00000D50 5B <1> pop bx 11467 00000D51 58 <1> pop ax 11468 00000D52 C3 <1> retn 11469 <1> 11470 <1> %if _BOOTLDR 11471 <1> init_putsz_cs_bootldr: 11472 00000D53 50 <1> push ax 11473 00000D54 53 <1> push bx 11474 00000D55 51 <1> push cx 11475 00000D56 52 <1> push dx 11476 00000D57 1E <1> push ds 11477 00000D58 06 <1> push es 11478 00000D59 57 <1> push di 11479 00000D5A 0E <1> push cs 11480 00000D5B 07 <1> pop es 11481 00000D5C 0E <1> push cs 11482 00000D5D 1F <1> pop ds 11483 00000D5E 89D7 <1> mov di, dx ; es:di-> string 11484 00000D60 30C0 <1> xor al, al 11485 00000D62 B9FFFF <1> mov cx, -1 11486 00000D65 F2AE <1> repne scasb ; search zero 11487 00000D67 F7D9 <1> neg cx 11488 00000D69 49 <1> dec cx 11489 00000D6A 49 <1> dec cx ; cx = length of message 11490 00000D6B 5F <1> pop di 11491 00000D6C E80F00 <1> call init_puts_ds_bootldr 11492 00000D6F 07 <1> pop es 11493 00000D70 1F <1> pop ds 11494 00000D71 5A <1> pop dx 11495 00000D72 59 <1> pop cx 11496 00000D73 5B <1> pop bx 11497 00000D74 58 <1> pop ax 11498 00000D75 C3 <1> retn 11499 <1> %endif 11500 <1> 11501 <1> init_puts_ds: 11502 <1> %if _BOOTLDR 11503 00000D76 36F606[9D00]40 <1> testopt [ss:internalflags], nodosloaded 11504 00000D7C 7413 <1> jz @F 11505 <1> 11506 <1> init_puts_ds_bootldr: 11507 00000D7E 56 <1> push si 11508 00000D7F 55 <1> push bp 11509 00000D80 89D6 <1> mov si, dx 11510 00000D82 E30A <1> jcxz .return 11511 <1> .loop: 11512 00000D84 AC <1> lodsb 11513 00000D85 BB0700 <1> mov bx, 0007 11514 00000D88 B40E <1> mov ah, 0Eh 11515 00000D8A CD10 <1> int 10h 11516 00000D8C E2F6 <1> loop .loop 11517 <1> .return: 11518 00000D8E 5D <1> pop bp 11519 00000D8F 5E <1> pop si 11520 00000D90 C3 <1> retn 11521 <1> 11522 <1> @@: 11523 <1> %endif 11524 00000D91 BB0100 <1> mov bx, 1 ; standard output 11525 00000D94 B440 <1> mov ah, 40h ; write to file 11526 00000D96 E302 <1> jcxz @F 11527 00000D98 CD21 <1> int 21h 11528 <1> @@: 11529 00000D9A C3 <1> retn 11530 <1> 11531 <1> 11532 <1> 11533 <1> %if _BOOTLDR 11534 <1> ; Initial entry when boot loading. 11535 <1> 11536 <1> ; ds = ss = debugger data segment 11537 <1> ; (ds - 1) = image ident prefix paragraph 11538 <1> boot_old_initcode: 11539 00000D9B FC <1> cld 11540 <1> 11541 <1> d4 call init_d4message 11542 <1> d4 asciz "In boot loader; press any key",13,10 11543 <1> d4 call init_d4pauseforkey 11544 <1> 11545 00000D9C C706[5A0C]8000 <1> mov word [execblk+2], 80h 11546 00000DA2 C60681000D <1> mov byte [81h], 0Dh 11547 00000DA7 C606[E80B]01 <1> mov byte [fileext], EXT_OTHER ; empty file name and command line as per N 11548 <1> %endif ; _BOOTLDR 11549 <1> 11550 <1> old_initcode: 11551 00000DAC FC <1> cld 11552 <1> d0bp 11553 00000DAD 8CD8 <1> mov ax, ds 11554 00000DAF A3[5C0C] <1> mov word [ execblk+4 ], ax 11555 00000DB2 A3[600C] <1> mov word [ execblk+8 ], ax 11556 00000DB5 A3[640C] <1> mov word [ execblk+12 ], ax ; set up parameter block for exec command 11557 00000DB8 A3[B00A] <1> mov word [ pspdbg ], ax 11558 <1> 11559 00000DBB 1E <1> push ds 11560 00000DBC B84000 <1> mov ax, 40h 11561 00000DBF 8ED8 <1> mov ds, ax 11562 00000DC1 A18200 <1> mov ax, word [82h] ; end of circular keypress buffer 11563 00000DC4 8B168000 <1> mov dx, word [80h] ; start of circular buffer 11564 00000DC8 85C0 <1> test ax, ax 11565 00000DCA 7431 <1> jz .forcekeybuffer 11566 00000DCC 85D2 <1> test dx, dx 11567 00000DCE 742D <1> jz .forcekeybuffer 11568 00000DD0 89C3 <1> mov bx, ax 11569 00000DD2 29D3 <1> sub bx, dx ; cmp end, start 11570 00000DD4 7627 <1> jbe .forcekeybuffer ; below or equal is invalid --> 11571 00000DD6 F6C301 <1> test bl, 1 ; even amount of bytes ? 11572 00000DD9 7522 <1> jnz .forcekeybuffer ; no, invalid --> 11573 00000DDB 8B1E1A00 <1> mov bx, word [1Ah] ; current head of circular buffer 11574 00000DDF 39C3 <1> cmp bx, ax 11575 00000DE1 731A <1> jae .forcekeybuffer 11576 00000DE3 29D3 <1> sub bx, dx 11577 00000DE5 7216 <1> jb .forcekeybuffer 11578 00000DE7 F6C301 <1> test bl, 1 11579 00000DEA 7511 <1> jnz .forcekeybuffer ; invalid --> 11580 00000DEC 8B1E1C00 <1> mov bx, word [1Ch] ; current tail of circular buffer 11581 00000DF0 39C3 <1> cmp bx, ax 11582 00000DF2 7309 <1> jae .forcekeybuffer 11583 00000DF4 29D3 <1> sub bx, dx 11584 00000DF6 7205 <1> jb .forcekeybuffer 11585 00000DF8 F6C301 <1> test bl, 1 11586 00000DFB 740E <1> jz @F ; valid --> 11587 <1> .forcekeybuffer: 11588 00000DFD 1F <1> pop ds 11589 00000DFE C706[060C]3E00 <1> mov word [io_end_buffer], 3Eh 11590 00000E04 C706[040C]1E00 <1> mov word [io_start_buffer], 1Eh 11591 00000E0A A8 <1> db __TEST_IMM8 ; (skip pop) 11592 <1> @@: 11593 00000E0B 1F <1> pop ds 11594 <1> 11595 <1> %if _BOOTLDR 11596 00000E0C F606[9D00]40 <1> testopt [internalflags], nodosloaded 11597 00000E11 7403 <1> jz .checkio 11598 <1> d4 call init_d4message 11599 <1> d4 asciz "Common initialisation, determining processor type now",13,10 11600 00000E13 E9A700 <1> jmp .determineprocessor 11601 <1> .checkio: 11602 <1> %endif 11603 <1> ; Check for console input vs. input from a file or other device. 11604 <1> ; This has to be done early because MS-DOS seems to switch CON 11605 <1> ; to cooked I/O mode only then. 11606 00000E16 B80044 <1> mov ax, 4400h ; IOCTL get device information 11607 00000E19 31DB <1> xor bx, bx ; StdIn 11608 00000E1B B283 <1> mov dl, 83h ; default if 21.4400 fails 11609 00000E1D CD21 <1> int 21h 11610 00000E1F F6C280 <1> test dl, 80h 11611 00000E22 7414 <1> jz .inputfile 11612 00000E24 8026[9C00]DF <1> clropt [internalflags], inputfile 11613 00000E29 F6C203 <1> test dl, 3 11614 00000E2C 740A <1> jz .inputdevice ; if not the console input 11615 00000E2E 8026[9C00]EF <1> clropt [internalflags], notstdinput 11616 00000E33 C606[F40A]00 <1> mov byte [notatty], 0 ; it _is_ a tty 11617 <1> .inputdevice: 11618 <1> .inputfile: 11619 00000E38 B80044 <1> mov ax, 4400h ; IOCTL get device information 11620 00000E3B 43 <1> inc bx ; StdOut 11621 00000E3C B283 <1> mov dl, 83h ; default if 21.4400 fails 11622 00000E3E CD21 <1> int 21h 11623 00000E40 F6C280 <1> test dl, 80h 11624 00000E43 740F <1> jz .outputfile 11625 00000E45 8026[9C00]7F <1> clropt [internalflags], outputfile 11626 00000E4A F6C203 <1> test dl, 3 11627 00000E4D 7405 <1> jz .outputdevice ; if not the console output 11628 00000E4F 8026[9C00]BF <1> clropt [internalflags], notstdoutput 11629 <1> .outputdevice: 11630 <1> .outputfile: 11631 <1> 11632 <1> ; Check DOS version 11633 <1> %if _VDD 11634 00000E54 1E <1> push ds 11635 00000E55 0E <1> push cs 11636 00000E56 1F <1> pop ds 11637 00000E57 0E <1> push cs 11638 00000E58 07 <1> pop es 11639 00000E59 E879FD <1> call isnt ; NTVDM ? 11640 00000E5C 1F <1> pop ds 11641 00000E5D 7205 <1> jc .isnotnt ; no --> 11642 00000E5F 800E[9E00]02 <1> setopt [internalflags], runningnt 11643 <1> .isnotnt: 11644 <1> %endif 11645 <1> 11646 00000E64 B80030 <1> mov ax, 3000h ; check DOS version 11647 00000E67 CD21 <1> int 21h 11648 00000E69 86C4 <1> xchg al, ah 11649 00000E6B 3D1F03 <1> cmp ax, ver(3,31) ; MS-DOS version > 3.30 ? 11650 00000E6E 7205 <1> jb .notoldpacket ; no --> 11651 00000E70 800E[9C00]01 <1> setopt [internalflags], oldpacket ; assume Int25/Int26 packet method available 11652 <1> .notoldpacket: 11653 00000E75 50 <1> push ax 11654 00000E76 31DB <1> xor bx, bx ; preset to invalid value 11655 00000E78 B80633 <1> mov ax, 3306h 11656 00000E7B CD21 <1> int 21h 11657 00000E7D 08C0 <1> or al, al ; invalid, DOS 1.x error --> 11658 00000E7F 7402 <1> jz .213306invalid 11659 00000E81 3CFF <1> cmp al, -1 ; invalid 11660 <1> .213306invalid: 11661 00000E83 58 <1> pop ax 11662 00000E84 7407 <1> je .useoldver 11663 00000E86 85DB <1> test bx, bx ; 0.0 ? 11664 00000E88 7403 <1> jz .useoldver ; assume invalid --> 11665 00000E8A 93 <1> xchg ax, bx ; get version to ax 11666 00000E8B 86C4 <1> xchg al, ah ; strange Microsoft version format 11667 <1> .useoldver: 11668 00000E8D 3D0107 <1> cmp ax, ver(7,01) ; MS-DOS version > 7.00 ? 11669 00000E90 7205 <1> jb .notnewpacket ; no --> 11670 00000E92 800E[9C00]03 <1> setopt [internalflags], newpacket| oldpacket ; assume both packet methods available 11671 <1> .notnewpacket: 11672 <1> %if _VDD 11673 00000E97 F606[9E00]02 <1> testopt [internalflags], runningnt 11674 00000E9C 741F <1> jz .novdd 11675 00000E9E 1E <1> push ds 11676 00000E9F 0E <1> push cs 11677 00000EA0 1F <1> pop ds 11678 00000EA1 0E <1> push cs 11679 00000EA2 07 <1> pop es 11680 00000EA3 BE[7F0B] <1> mov si, imsg.vdd ; ds:si-> ASCIZ VDD filename 11681 00000EA6 BB[8C0B] <1> mov bx, imsg.dispatch ; ds:bx-> ASCIZ dispatching entry 11682 00000EA9 BF[950B] <1> mov di, imsg.init ; es:di-> ASCIZ init entry 11683 00000EAC F8 <1> clc ; ! 11684 00000EAD C4C4580090 <1> RegisterModule ; register VDD 11685 00000EB2 1F <1> pop ds 11686 00000EB3 7208 <1> jc .novdd ; error ? --> 11687 00000EB5 A3[C40A] <1> mov word [hVdd], ax 11688 00000EB8 800E[9C00]05 <1> setopt [internalflags], ntpacket| oldpacket ; assume old packet method also available 11689 <1> .novdd: 11690 <1> %endif 11691 <1> .determineprocessor: 11692 <1> d4 call init_d4message 11693 <1> d4 asciz "Determining processor type",13,10 11694 <1> 11695 00000EBD B92101 <1> mov cx, 0121h 11696 00000EC0 D2E5 <1> shl ch, cl 11697 00000EC2 7510 <1> jnz .found_186_plus ; normal 186 masks shift count with 31 --> 11698 <1> 11699 <1> ; The NEC V20/V30 processors do support the 186 extensions 11700 <1> ; to the instruction set but do not mask the shift count. 11701 <1> ; Therefore, specifically detect them here. Based on the 11702 <1> ; text in http://www.textfiles.com/hamradio/v20_bug.txt 11703 00000EC4 89E0 <1> mov ax, sp 11704 00000EC6 B90100 <1> mov cx, 1 ; = 1 if on actual 8088/8086 11705 00000EC9 51 <1> push cx 11706 00000ECA 49 <1> dec cx ; = 0 if on NEC V20/V30 11707 00000ECB 8FC1 <1> db 8Fh, 0C1h ; pop r/m16 with cx as operand 11708 <1> ; (reportedly a nop on the NECs) 11709 00000ECD 89C4 <1> mov sp, ax ; reset stack to known state 11710 00000ECF E303 <1> jcxz .found_186_plus ; if it was a nop --> 11711 00000ED1 E9A400 <1> jmp .cpudone ; is an actual 8088/8086 --> 11712 <1> 11713 <1> .found_186_plus: 11714 <1> d4 call init_d4message 11715 <1> d4 asciz "Found 186+ processor",13,10 11716 00000ED4 FE06[EE0A] <1> inc byte [ machine ] ; 1 11717 00000ED8 54 <1> push sp 11718 00000ED9 58 <1> pop ax 11719 00000EDA 39E0 <1> cmp ax, sp 11720 00000EDC 7403E99700 <1> jne .cpudone ; 80186 pushes the adjusted value of sp --> 11721 <1> 11722 <1> d4 call init_d4message 11723 <1> d4 asciz "Found 286+ processor",13,10 11724 <1> ; Determine the processor type. This is adapted from code in the 11725 <1> ; Pentium Family User's Manual, Volume 3: Architecture and 11726 <1> ; Programming Manual, Intel Corp., 1994, Chapter 5. That code contains 11727 <1> ; the following comment: 11728 <1> ; 11729 <1> ; This program has been developed by Intel Corporation. 11730 <1> ; Software developers have Intel's permission to incorporate 11731 <1> ; this source code into your software royalty free. 11732 <1> ; 11733 <1> ; Intel 286 CPU check. 11734 <1> ; Bits 12-15 of the flags register are always clear on the 11735 <1> ; 286 processor in real-address mode. 11736 <1> ; Bits 12-15 of the FLAGS register are always set on the 11737 <1> ; 8086 and 186 processor. 11738 00000EE1 FE06[EE0A] <1> inc byte [ machine ] ; 2 11739 00000EE5 9C <1> pushf ; save IF 11740 00000EE6 9C <1> pushf ; get original flags into ax 11741 00000EE7 58 <1> pop ax 11742 00000EE8 0D00F0 <1> or ax, 0F000h ; try to set bits 12-15 11743 00000EEB 25FFFD <1> and ax, ~0200h ; clear IF 11744 00000EEE 50 <1> push ax ; save new flags value on stack 11745 00000EEF 9D <1> popf ; replace current flags value; DI 11746 00000EF0 9C <1> pushf ; get new flags 11747 00000EF1 58 <1> pop ax ; store new flags in ax 11748 00000EF2 9D <1> popf ; restore IF (in 86 Mode) 11749 00000EF3 A900F0 <1> test ax, 0F000h ; if bits 12-15 clear, CPU = 80286 11750 00000EF6 7503E97D00 <1> jz .cpudone ; if 80286 --> 11751 <1> 11752 <1> d4 call init_d4message 11753 <1> d4 asciz "Found 386+ processor",13,10 11754 <1> ; Intel 386 CPU check. 11755 <1> ; The AC bit, bit #18, is a new bit introduced in the EFLAGS 11756 <1> ; register on the Intel486 DX cpu to generate alignment faults. 11757 <1> ; This bit cannot be set on the Intel386 CPU. 11758 <1> ; 11759 <1> ; It is now safe to use 32-bit opcode/operands. 11760 <1> subcpu 386 11761 00000EFB 800E[9D00]80 <1> setopt [internalflags], has386 11762 00000F00 FE06[EE0A] <1> inc byte [ machine ] ; 3 11763 <1> 11764 00000F04 89E3 <1> mov bx, sp ; save current stack pointer to align 11765 00000F06 83E4FC <1> and sp, ~3 ; align stack to avoid AC fault 11766 00000F09 669C <1> pushfd ; push original EFLAGS 11767 00000F0B 6658 <1> pop eax ; get original EFLAGS 11768 00000F0D 6689C1 <1> mov ecx, eax ; save original EFLAGS in ECX (including IF) 11769 <1> 11770 00000F10 663500000400 <1> xor eax, 40000h ; flip AC bit in EFLAGS 11771 00000F16 25FFFD <1> and ax, ~0200h ; clear IF 11772 00000F19 6650 <1> push eax ; put new EFLAGS value on stack 11773 00000F1B 669D <1> popfd ; replace EFLAGS value; DI 11774 00000F1D 669C <1> pushfd ; get new EFLAGS 11775 00000F1F 6658 <1> pop eax ; store new EFLAGS value in EAX 11776 00000F21 89C8 <1> mov ax, cx ; ignore low bits (including IF) 11777 00000F23 6639C8 <1> cmp eax, ecx 11778 00000F26 741A <1> je .cpudone_stack_eax_equals_ecx ; if 80386 --> 11779 <1> 11780 <1> d4 call init_d4message 11781 <1> d4 asciz "Found 486+ processor",13,10 11782 <1> ; Intel486 DX CPU, Intel487 SX NDP, and Intel486 SX CPU check. 11783 <1> ; Checking for ability to set/clear ID flag (bit 21) in EFLAGS 11784 <1> ; which indicates the presence of a processor with the ability 11785 <1> ; to use the CPUID instruction. 11786 00000F28 FE06[EE0A] <1> inc byte [ machine ] ; 4 11787 00000F2C 6689C8 <1> mov eax, ecx ; get original EFLAGS 11788 00000F2F 663500002000 <1> xor eax, 200000h ; flip ID bit in EFLAGS 11789 00000F35 25FFFD <1> and ax, ~0200h ; clear IF 11790 00000F38 6650 <1> push eax ; save new EFLAGS value on stack 11791 00000F3A 669D <1> popfd ; replace current EFLAGS value; DI 11792 00000F3C 669C <1> pushfd ; get new EFLAGS 11793 00000F3E 6658 <1> pop eax ; store new EFLAGS in EAX 11794 00000F40 89C8 <1> mov ax, cx ; ignore low bits (including IF) 11795 <1> 11796 <1> .cpudone_stack_eax_equals_ecx: 11797 00000F42 6651 <1> push ecx 11798 00000F44 669D <1> popfd ; restore AC,ID bits and IF in EFLAGS (86 Mode) 11799 00000F46 89DC <1> mov sp, bx ; restore sp 11800 <1> 11801 00000F48 6639C8 <1> cmp eax, ecx ; check if it's changed 11802 00000F4B 742B <1> je .cpudone ; if it's a 486 (can't toggle ID bit) --> 11803 <1> 11804 <1> d4 call init_d4message 11805 <1> d4 asciz "Found processor with CPUID support",13,10 11806 <1> ; Execute CPUID instruction. 11807 <1> subcpu 486 ; NASM (at least 2.10rc1) handles cpuid itself as a 11808 <1> ; 586+ instruction, but we know better. So this 11809 <1> ; part is declared for 486 compatibility, and only 11810 <1> ; the cpuid instructions are emitted with 586 11811 <1> ; compatibility to appease NASM. 11812 <1> %if 0 11813 <1> d4 call init_d4message 11814 <1> d4 asciz "CPUID will NOT be executed, to work around official DOSBox releases",13,10 11815 <1> d4 jmp .cpudone 11816 <1> %endif 11817 00000F4D 6631C0 <1> xor eax, eax ; set up input for CPUID instruction 11818 <1> d4 call init_d4message 11819 <1> d4 asciz "Executing CPUID 0",13,10 11820 <1> [cpu 586] 11821 00000F50 0FA2 <1> cpuid 11822 <1> __CPU__ 11823 <1> d4 call init_d4message 11824 <1> d4 asciz "CPUID 0 executed",13,10 11825 00000F52 6683F801 <1> cmp eax, byte 1 11826 00000F56 7220 <1> jb .cpudone ; if 1 is not a valid input value for CPUID 11827 00000F58 6631C0 <1> xor eax, eax ; otherwise, run CPUID with eax = 1 11828 00000F5B 6640 <1> inc eax 11829 <1> d4 call init_d4message 11830 <1> d4 asciz "Executing CPUID 1",13,10 11831 <1> [cpu 586] 11832 00000F5D 0FA2 <1> cpuid 11833 <1> __CPU__ 11834 <1> d4 call init_d4message 11835 <1> d4 asciz "CPUID 1 executed",13,10 11836 <1> %if _MMXSUPP 11837 00000F5F 66F7C200008000 <1> test edx, 80_0000h 11838 00000F66 0F9506[F20A] <1> setnz byte [has_mmx] 11839 <1> %endif 11840 <1> 11841 00000F6B 88E0 <1> mov al, ah 11842 00000F6D 240F <1> and al, 0Fh ; bits 8..11 are the model number 11843 00000F6F 3C06 <1> cmp al, 6 11844 00000F71 7202 <1> jb .below686 ; if < 6 11845 00000F73 B006 <1> mov al, 6 ; if >= 6, set it to 6 11846 <1> .below686: 11847 00000F75 A2[EE0A] <1> mov byte [ machine ], al; save machine type (486, 586, 686+) 11848 <1> 11849 <1> .cpudone: 11850 <1> subcpureset ; subcpu 486 11851 <1> subcpureset ; subcpu 386 11852 <1> d4 call init_d4message 11853 <1> d4 asciz "Determining floating-point unit",13,10 11854 <1> 11855 <1> ; Next determine the type of FPU in a system and set the mach_87 11856 <1> ; variable with the appropriate value. All registers are used by 11857 <1> ; this code; none are preserved. 11858 <1> ; 11859 <1> ; Coprocessor check. 11860 <1> ; The algorithm is to determine whether the floating-point 11861 <1> ; status and control words can be written to. If not, no 11862 <1> ; coprocessor exists. If the status and control words can be 11863 <1> ; written to, the correct coprocessor is then determined 11864 <1> ; depending on the processor ID. The Intel 386 CPU can 11865 <1> ; work with either an Intel 287 NDP or an Intel 387 NDP. 11866 <1> ; The infinity of the coprocessor must be checked 11867 <1> ; to determine the correct coprocessor ID. 11868 00000F78 A0[EE0A] <1> mov al, byte [ machine ] 11869 00000F7B A2[F00A] <1> mov byte [ mach_87 ], al ; by default, set mach_87 to machine 11870 00000F7E FE06[EF0A] <1> inc byte [ has_87 ] 11871 00000F82 C606[F10A]0C <1> mov byte [encodedmach87], 0Ch 11872 00000F87 3C05 <1> cmp al, 5 ; a Pentium or above always will have a FPU 11873 00000F89 7350 <1> jae .fpudone 11874 00000F8B FE0E[EF0A] <1> dec byte [ has_87 ] ; assume no FPU 11875 00000F8F C606[F10A]C0 <1> mov byte [encodedmach87], 0C0h 11876 <1> 11877 00000F94 DBE3 <1> fninit ; reset FPU 11878 00000F96 B0FF <1> mov al, -1 ; initialise with a non-zero value 11879 00000F98 50 <1> push ax 11880 00000F99 89E3 <1> mov bx, sp 11881 00000F9B 36DD3F <1> fnstsw word [ss:bx] ; save FP status word 11882 00000F9E 58 <1> pop ax ; retrieve it 11883 00000F9F 84C0 <1> test al, al 11884 00000FA1 7538 <1> jnz .fpudone ; if no FPU present 11885 <1> 11886 <1> ; al = 0 here 11887 00000FA3 50 <1> push ax 11888 00000FA4 36D93F <1> fnstcw word [ss:bx] ; save FP control word 11889 00000FA7 58 <1> pop ax ; retrieve it 11890 00000FA8 253F10 <1> and ax, 103Fh ; see if selected parts look OK 11891 00000FAB 83F83F <1> cmp ax, byte 3Fh 11892 00000FAE 752B <1> jne .fpudone ; if no FPU present 11893 00000FB0 FE06[EF0A] <1> inc byte [ has_87 ] ; there's an FPU 11894 00000FB4 C606[F10A]0C <1> mov byte [encodedmach87], 0Ch 11895 <1> 11896 <1> ; If we're using a 386, check for 287 vs. 387 by checking whether 11897 <1> ; +infinity = -infinity. 11898 00000FB9 803E[EE0A]03 <1> cmp byte [ machine ], 3 11899 00000FBE 751B <1> jne .fpudone ; if not a 386 11900 <1> [cpu 386] 11901 00000FC0 D9E8 <1> fld1 ; must use default control from FNINIT 11902 00000FC2 D9EE <1> fldz ; form infinity 11903 00000FC4 DEF9 <1> fdivp ST1 ; 1 / 0 = infinity 11904 00000FC6 D9C0 <1> fld ST0 11905 00000FC8 D9E0 <1> fchs ; form negative infinity 11906 00000FCA DED9 <1> fcompp ; see if they are the same and remove them 11907 00000FCC 9BDFE0 <1> fstsw ax 11908 00000FCF 9E <1> sahf ; look at status from FCOMPP 11909 00000FD0 7509 <1> jne .fpudone ; if they are different, then it's a 387 11910 00000FD2 FE0E[F00A] <1> dec byte [ mach_87 ] ; otherwise, it's a 287 11911 00000FD6 C606[F10A]C2 <1> mov byte [encodedmach87], 0C2h 11912 <1> __CPU__ 11913 <1> .fpudone: 11914 <1> 11915 <1> %if _ONLY386 11916 <1> testopt [internalflags], has386 11917 <1> jnz @F ; okay --> 11918 <1> %if _BOOTLDR 11919 <1> testopt [internalflags], nodosloaded 11920 <1> lahf ; remember status 11921 <1> %endif 11922 <1> mov dx, imsg.no386 11923 <1> call init_putsz_cs ; display the error 11924 <1> %if _BOOTLDR 11925 <1> sahf 11926 <1> jnz init_booterror.soft ; abort for loader --> 11927 <1> %endif 11928 <1> mov ax, 4C01h 11929 <1> int 21h ; abort our process 11930 <1> 11931 <1> @@: 11932 <1> %elif _ONLYNON386 11933 <1> testopt [internalflags], has386 11934 <1> jz @F ; okay --> 11935 <1> mov dx, imsg.386 11936 <1> call init_putsz_cs ; display the warning 11937 <1> @@: 11938 <1> %endif 11939 <1> 11940 <1> ; Determine which patch table to use, then patch 11941 <1> ; out either the 386+ or non-386 code as appropriate. 11942 00000FDB 8E06[D400] <1> mov es, [code_seg] 11943 00000FDF BE[EA07] <1> mov si, patch_386_table ; table of patches to set for 386+ 11944 <1> %if __patch_386_table_method == 1 11945 <1> mov cx, patch_386_table_size_w 11946 <1> %endif 11947 00000FE2 F606[9D00]80 <1> testopt [internalflags], has386 11948 <1> %if __patch_386_table_method == 1 11949 <1> jnz .patch1 ; set these patches (CPU is 386+) --> 11950 <1> %else 11951 00000FE7 752D <1> jnz .patch2 ; set these patches (CPU is 386+) --> 11952 <1> %endif 11953 <1> %ifn _ONLYNON386 11954 00000FE9 26C606[F744]3E <1> mov byte [es:..@patch_no386_ds], 3Eh ; write a ds prefix 11955 00000FEF 26C606[1C45]CF <1> mov byte [es:..@patch_no386_iret], 0CFh ; write an iret instruction 11956 <1> %if _PM && _CATCHPMINT214C 11957 00000FF5 26C606[085E]3E <1> mov byte [es:..@patch_no386_ds_2], 3Eh 11958 00000FFB 26C606[375E]3E <1> mov byte [es:..@patch_no386_ds_3], 3Eh 11959 00001001 36C606[7C8C]90 <1> mov byte [ss:..@patch_no386_nop_DATA_ENTRY], 90h 11960 <1> ; write a nop (note the segment!) 11961 <1> %endif 11962 <1> %if _PM 11963 00001007 26C606[B35B]3E <1> mov byte [es:..@patch_no386_ds_4], 3Eh 11964 0000100D 26C606[B35D]3E <1> mov byte [es:..@patch_no386_ds_5], 3Eh ; write some more ds prefixes 11965 <1> %endif 11966 <1> %endif 11967 00001013 BE[CE04] <1> mov si, patch_no386_table ; table of patches to set for 16-bit CPU 11968 <1> %if __patch_no386_table_method == 1 11969 <1> mov cx, patch_no386_table_size_w 11970 <1> %if __patch_386_table_method == 2 11971 <1> jmp short .patch1 ; skip .patch2 code --> 11972 <1> %endif 11973 <1> %endif 11974 <1> 11975 <1> ; Complicated table patch code. 11976 <1> %if __patch_no386_table_method == 2 || __patch_386_table_method == 2 11977 <1> .patch2: 11978 00001016 BF[0000] <1> mov di, code_start ; initialise offset 11979 00001019 31C0 <1> xor ax, ax ; initialise ah 11980 <1> .looppatch2: 11981 0000101B 2EAC <1> cs lodsb 11982 0000101D 01C7 <1> add di, ax ; skip number of bytes to skip 11983 0000101F 3CFF <1> cmp al, 255 ; really repositioning? 11984 00001021 7504 <1> jne .l2patch ; no --> 11985 00001023 97 <1> xchg ax, di ; (to preserve ah) 11986 00001024 2EAD <1> cs lodsw ; ax = new address 11987 00001026 97 <1> xchg ax, di ; di = new address 11988 <1> .l2patch: 11989 00001027 2EAC <1> cs lodsb 11990 00001029 89C1 <1> mov cx, ax ; cx = number of bytes to patch 11991 0000102B E306 <1> jcxz .patchesdone ; end of table --> 11992 0000102D B090 <1> mov al, 90h ; patch to NOP 11993 0000102F F3AA <1> rep stosb ; patch as many bytes as specified 11994 00001031 EBE8 <1> jmp short .looppatch2 11995 <1> %endif 11996 <1> 11997 <1> ; Simple table patch code. 11998 <1> %if __patch_386_table_method == 1 || __patch_no386_table_method == 1 11999 <1> .patch1: 12000 <1> jcxz .patchesdone 12001 <1> .looppatch1: 12002 <1> cs lodsw ; load address of patch 12003 <1> xchg bx, ax ; (set bx = ax, CHG ax) 12004 <1> mov byte [es:bx], 90h ; patch 12005 <1> loop .looppatch1 12006 <1> %endif 12007 <1> .patchesdone: 12008 <1> 12009 <1> ; Check for dosemu. This is done for the boot loaded instance 12010 <1> ; too, as we might be running as DOS inside dosemu. 12011 <1> %if _DOSEMU 12012 00001033 B800F0 <1> mov ax, 0F000h 12013 00001036 8EC0 <1> mov es, ax 12014 00001038 1E <1> push ds 12015 00001039 0E <1> push cs 12016 0000103A 1F <1> pop ds ; avoid "repe cs cmpsw" (8086 bug) 12017 0000103B BFF5FF <1> mov di, 0FFF5h 12018 0000103E BE[770B] <1> mov si, imsg.dosemudate 12019 00001041 B90400 <1> mov cx, 4 12020 00001044 F3A7 <1> repe cmpsw ; running in DosEmu? 12021 00001046 1F <1> pop ds 12022 00001047 7505 <1> jne .dosemuchecked 12023 00001049 800E[9F00]01 <1> setopt [internalflags], runningdosemu 12024 <1> .dosemuchecked: 12025 <1> %endif 12026 <1> 12027 0000104E 1E <1> push ds 12028 0000104F 07 <1> pop es ; => lDEBUG_DATA_ENTRY 12029 <1> 12030 00001050 BF[0000] <1> mov di, line_in 12031 00001053 B0FF <1> mov al, 255 12032 00001055 AA <1> stosb 12033 00001056 B000 <1> mov al, 0 12034 00001058 AA <1> stosb 12035 00001059 B00D <1> mov al, 13 12036 0000105B AA <1> stosb ; overwrite line_in beginning 12037 <1> 12038 0000105C BC[400C] <1> mov sp, stack_end ; stack pointer (paragraph aligned) 12039 0000105F C706[9C0A][3E0C] <1> mov word [ savesp ], stack_end-2; save new SP minus two (for the word we'll push) 12040 00001065 BF[0101] <1> mov di, ..@init_first 12041 00001068 B93F09 <1> mov cx, ..@init_behind - ..@init_first 12042 0000106B 31C0 <1> xor ax, ax 12043 0000106D F3AA <1> rep stosb ; initialise breakpoint lists, line_out 12044 <1> %if 1 12045 <1> %if ..@init_behind != stack 12046 <1> mov di, stack 12047 <1> %endif 12048 0000106F B90002 <1> mov cx, stack_end - stack 12049 00001072 B05E <1> mov al, 5Eh 12050 00001074 F3AA <1> rep stosb ; initialise the stack 12051 <1> %endif 12052 <1> 12053 00001076 C606[0D08]30 <1> mov byte [ trim_overflow ], '0' ; initialise line_out so the trimputs loop doesn't overflow 12054 0000107B C706[1609]4226 <1> mov word [line_out_overflow], 2642h 12055 <1> 12056 <1> 12057 <1> %if _BOOTLDR 12058 00001081 F606[9D00]40 <1> testopt [internalflags], nodosloaded 12059 00001086 743A <1> jz initdos 12060 <1> d4 call init_d4message 12061 <1> d4 asciz "386-related patches applied, boot initialisation proceeding",13,10 12062 <1> 12063 <1> 12064 <1> %if CATCHINTAMOUNT 12065 <1> ; Set up interrupt vectors. 12066 00001088 B90600 <1> mov cx, inttab_number 12067 0000108B BE[3D0C] <1> mov si, inttab 12068 <1> .bootintloop: 12069 <1> 12070 <1> ; assumes ss = lDEBUG_DATA_ENTRY 12071 0000108E 36AC <1> ss lodsb 12072 00001090 31DB <1> xor bx, bx 12073 00001092 8EDB <1> mov ds, bx 12074 00001094 88C3 <1> mov bl, al 12075 00001096 01DB <1> add bx, bx 12076 00001098 01DB <1> add bx, bx 12077 0000109A FF7702 <1> push word [ bx+2 ] 12078 0000109D FF37 <1> push word [ bx ] ; get vector 12079 0000109F 97 <1> xchg ax, di 12080 000010A0 36AD <1> ss lodsw ; get address of IISP header 12081 000010A2 97 <1> xchg ax, di 12082 000010A3 368F4502 <1> pop word [ ss:di + ieNext ] 12083 000010A7 368F4504 <1> pop word [ ss:di + ieNext + 2 ] 12084 <1> ; store it 12085 <1> %ifn _DEBUG ; vectors are set only when debuggee runs 12086 000010AB 8C5702 <1> mov word [ bx+2 ], ss 12087 000010AE 893F <1> mov word [ bx ], di ; set interrupt vector 12088 <1> %endif 12089 000010B0 E2DC <1> loop .bootintloop 12090 <1> %endif 12091 <1> 12092 <1> 12093 000010B2 16 <1> push ss 12094 000010B3 1F <1> pop ds 12095 000010B4 16 <1> push ss 12096 000010B5 07 <1> pop es 12097 <1> 12098 <1> d4 call init_d4message 12099 <1> d4 asciz "Jumping to final boot initialisation code",13,10 12100 000010B6 FF36[D400] <1> push word [code_seg] 12101 000010BA 2EFF36[C010] <1> push word [cs:.word_initcont.boot_entry] 12102 000010BF CB <1> retf 12103 <1> 12104 <1> align 2, db 0 12105 <1> .word_initcont.boot_entry: 12106 000010C0 [C7D8] <1> dw initcont.boot_entry 12107 <1> %endif 12108 <1> 12109 <1> initdos: 12110 <1> %if _MCB || _INT 12111 000010C2 B80258 <1> mov ax, 5802h 12112 000010C5 CD21 <1> int 21h 12113 000010C7 30E4 <1> xor ah, ah ; some "DOS" only return al 12114 000010C9 50 <1> push ax ; save UMB link 12115 <1> 12116 <1> getfirstmcb: 12117 000010CA B452 <1> mov ah, 52h ; get list of lists 12118 000010CC CD21 <1> int 21h 12119 000010CE 268B47FE <1> mov ax, word [ es:bx-2 ]; start of MCBs 12120 000010D2 A3[DA0A] <1> mov word [firstmcb], ax 12121 <1> 12122 <1> getfirstumcb: 12123 <1> ; We try to get the first UMCB for gateout 12124 <1> ; for now. To harden our code it should 12125 <1> ; not be assumed that the address is of 12126 <1> ; a valid MCB. However, it is fine to 12127 <1> ; compare an actual MCB address with it. 12128 000010D5 B86112 <1> mov ax, 1261h ; PTS-DOS: Get first UMCB 12129 000010D8 F9 <1> stc 12130 000010D9 CD2F <1> int 2Fh 12131 000010DB 720C <1> jc .determine ; not supported --> 12132 000010DD 40 <1> inc ax 12133 000010DE 83F802 <1> cmp ax, byte 2 ; -1, 0, 1 ? 12134 000010E1 7606 <1> jbe .determine ; not supported (or none) --> 12135 000010E3 48 <1> dec ax 12136 000010E4 A3[DC0A] <1> mov word [ firstumcb ], ax ; set UMB 12137 000010E7 EB4D <1> jmp short .got ; got it --> 12138 <1> 12139 <1> .determine: 12140 000010E9 B80358 <1> mov ax, 5803h 12141 000010EC 31DB <1> xor bx, bx 12142 000010EE CD21 <1> int 21h ; disable UMB link, leave only LMA chain 12143 000010F0 7244 <1> jc .none ; that isn't supported either --> 12144 <1> 12145 000010F2 A1[DA0A] <1> mov ax, word [firstmcb] 12146 000010F5 1E <1> push ds 12147 000010F6 89C2 <1> mov dx, ax ; first MCB 12148 000010F8 31DB <1> xor bx, bx ; use offsets from bx, not addresses 12149 <1> .looplmb: 12150 000010FA 8ED8 <1> mov ds, ax 12151 000010FC 40 <1> inc ax 12152 000010FD 034703 <1> add ax, word [ bx + 3 ] ; next MCB's address 12153 00001100 803F4D <1> cmp byte [ bx ], 'M' 12154 00001103 74F5 <1> je .looplmb ; not last --> 12155 00001105 803F5A <1> cmp byte [ bx ], 'Z' 12156 00001108 752C <1> jne .none ; corrupted --> 12157 0000110A 92 <1> xchg ax, dx ; dx = what we assume to be the first UMA chain MCB 12158 <1> ; ax = first MCB 12159 <1> 12160 0000110B 50 <1> push ax 12161 0000110C 43 <1> inc bx ; = 1 12162 0000110D B80358 <1> mov ax, 5803h 12163 00001110 CD21 <1> int 21h ; enable UMB link, include UMA chain 12164 00001112 58 <1> pop ax 12165 00001113 7221 <1> jc .none ; so we can disable it but not enable? --> 12166 <1> 12167 00001115 4B <1> dec bx ; = 0 12168 00001116 31C9 <1> xor cx, cx ; flag if assumed first UMCB found 12169 <1> .loopumb: 12170 00001118 39D0 <1> cmp ax, dx 12171 0000111A 7501 <1> jne .notlastlmb 12172 0000111C 41 <1> inc cx ; there it is 12173 <1> .notlastlmb: 12174 0000111D 8ED8 <1> mov ds, ax 12175 0000111F 803F4D <1> cmp byte [ bx ], 'M' 12176 00001122 7506 <1> jne .islastumb? ; last or corrupted --> 12177 00001124 40 <1> inc ax 12178 00001125 034703 <1> add ax, word [ bx + 3 ] 12179 00001128 EBEE <1> jmp short .loopumb ; process next --> 12180 <1> .islastumb?: 12181 0000112A 803F5A <1> cmp byte [ bx ], 'Z' 12182 0000112D 7507 <1> jne .none ; corrupted --> 12183 0000112F E305 <1> jcxz .none ; didn't find that UMCB --> 12184 <1> ; The MCB at dx which was behind the one that contained the 'Z' 12185 <1> ; signature when we disabled the UMB link is now a valid MCB in 12186 <1> ; the MCB chain after we enabled the UMB link. All previous MCBs 12187 <1> ; are now 'M'. 12188 00001131 1F <1> pop ds 12189 00001132 8916[DC0A] <1> mov word [ firstumcb ], dx 12190 <1> .none: 12191 <1> .got: 12192 00001136 5B <1> pop bx 12193 00001137 B80358 <1> mov ax, 5803h 12194 0000113A CD21 <1> int 21h ; restore UMB link 12195 <1> %endif 12196 <1> 12197 0000113C B434 <1> mov ah, 34h 12198 0000113E CD21 <1> int 21h 12199 00001140 891E[DE0A] <1> mov word [pInDOS + so16aOffset], bx 12200 00001144 8C06[E00A] <1> mov word [pInDOS + so16aSegSel], es 12201 <1> %if _PM 12202 00001148 8C06[E20A] <1> mov word [pInDOS + so16aSegment], es 12203 <1> %endif 12204 <1> 12205 <1> ; get address of DOS swappable DATA area 12206 <1> ; to be used to get/set PSP and thus avoid DOS calls 12207 <1> ; will not work for DOS < 3 12208 <1> %if _USESDA 12209 0000114C 1E <1> push ds 12210 0000114D B8065D <1> mov ax, 5D06h 12211 00001150 F9 <1> stc ; initialise to CY 12212 00001151 CD21 <1> int 21h 12213 00001153 8CD8 <1> mov ax, ds 12214 00001155 1F <1> pop ds 12215 00001156 7214 <1> jc .noSDA ; if CY returned, not supported --> 12216 00001158 8EC0 <1> mov es, ax ; es:si -> SDA 12217 0000115A 8CDB <1> mov bx, ds ; bx = our PSP 12218 0000115C 26395C10 <1> cmp word [es:si + 10h], bx ; does this seem like the current PSP field ? 12219 00001160 750A <1> jne .noSDA ; no --> 12220 00001162 8936[E60A] <1> mov word [pSDA + so16aOffset], si 12221 00001166 A3[E80A] <1> mov word [pSDA + so16aSegSel], ax 12222 <1> %if _PM 12223 00001169 A3[EA0A] <1> mov word [pSDA + so16aSegment], ax 12224 <1> %endif 12225 <1> .noSDA: 12226 <1> %endif 12227 <1> 12228 0000116C B83135 <1> mov ax, 3531h 12229 0000116F CD21 <1> int 21h 12230 00001171 8CC3 <1> mov bx, es 12231 <1> %if _USESDA 12232 00001173 3B1E[E80A] <1> cmp bx, word [pSDA + so16aSegSel] 12233 00001177 750B <1> jne @F 12234 <1> %endif 12235 00001179 3B1E[E00A] <1> cmp bx, word [pInDOS + so16aSegSel] 12236 0000117D 7505 <1> jne @F 12237 <1> 12238 0000117F 800E[A300]20 <1> setopt [internalflags2], dif2_int31_segment 12239 <1> @@: 12240 <1> 12241 <1> 12242 <1> commandline: 12243 00001184 16 <1> push ss 12244 00001185 07 <1> pop es 12245 <1> 12246 <1> ; Interpret switches and erase them from the command line. 12247 00001186 B80037 <1> mov ax, 3700h ; get switch character 12248 00001189 B22F <1> mov dl, '/' ; preset with default value 12249 0000118B CD21 <1> int 21h 12250 0000118D 8816[F50A] <1> mov byte [ switchar ], dl 12251 00001191 80FA2F <1> cmp dl, '/' 12252 00001194 7504 <1> jne .notslash 12253 00001196 8816[F60A] <1> mov byte [ swch1 ], dl 12254 <1> .notslash: 12255 0000119A BE8100 <1> mov si, DTA+1 12256 <1> .blankloop: 12257 0000119D AC <1> lodsb 12258 0000119E 3C20 <1> cmp al, 32 12259 000011A0 74FB <1> je .blankloop 12260 000011A2 3C09 <1> cmp al, 9 12261 000011A4 74F7 <1> je .blankloop 12262 <1> 12263 <1> ; Process the /? switch (or the [switchar]? switch). 12264 <1> ; If switchar != / and /? occurs, make sure nothing follows. 12265 000011A6 38D0 <1> cmp al, dl 12266 000011A8 7503E99800 <1> je .switch ; if switch character --> 12267 000011AD 3C2F <1> cmp al, '/' 12268 000011AF 7403E91D01 <1> jne .noswitches ; if not the help switch --> 12269 000011B4 8A04 <1> mov al, byte [ si ] 12270 000011B6 3C3F <1> cmp al, '?' 12271 000011B8 7403E91401 <1> jne .noswitches ; if not /? 12272 000011BD 8A4401 <1> mov al, byte [ si+1 ] 12273 000011C0 3C20 <1> cmp al, 32 12274 000011C2 740B <1> je .help ; if nothing after /? 12275 000011C4 3C09 <1> cmp al, 9 12276 000011C6 7407 <1> je .help ; ditto 12277 000011C8 3C0D <1> cmp al, 13 12278 000011CA 7403E90201 <1> jne .noswitches ; if something after /? --> 12279 <1> 12280 <1> ; Print a help message 12281 <1> .help: 12282 000011CF A12C00 <1> mov ax, word [2Ch] ; => environment 12283 000011D2 85C0 <1> test ax, ax 12284 000011D4 7465 <1> jz .help.no_name 12285 000011D6 8ED8 <1> mov ds, ax 12286 000011D8 31F6 <1> xor si, si 12287 <1> @@: 12288 000011DA AC <1> lodsb 12289 000011DB 84C0 <1> test al, al 12290 000011DD 75FB <1> jnz @B 12291 000011DF AC <1> lodsb 12292 000011E0 84C0 <1> test al, al 12293 000011E2 75F6 <1> jnz @B 12294 000011E4 AD <1> lodsw 12295 000011E5 83F801 <1> cmp ax, 1 12296 000011E8 7551 <1> jne .help.no_name 12297 <1> @@: 12298 000011EA 89F3 <1> mov bx, si 12299 <1> @@: 12300 000011EC AC <1> lodsb 12301 000011ED 3C61 <1> cmp al, 'a' 12302 000011EF 7208 <1> jb @F 12303 000011F1 3C7A <1> cmp al, 'z' 12304 000011F3 7704 <1> ja @F 12305 000011F5 806CFF20 <1> sub byte [si - 1], 'a' - 'A' 12306 <1> @@: 12307 000011F9 3C5C <1> cmp al, '\' 12308 000011FB 74ED <1> je @BBB 12309 000011FD 3C2F <1> cmp al, '/' 12310 000011FF 74E9 <1> je @BBB 12311 00001201 84C0 <1> test al, al 12312 00001203 75E7 <1> jnz @BB 12313 <1> 12314 00001205 89F1 <1> mov cx, si 12315 00001207 49 <1> dec cx 12316 00001208 29D9 <1> sub cx, bx 12317 <1> 12318 <1> @@: 12319 0000120A 4E <1> dec si 12320 0000120B 39DE <1> cmp si, bx 12321 0000120D 7209 <1> jb @F 12322 0000120F 803C2E <1> cmp byte [si], '.' 12323 00001212 75F6 <1> jne @B 12324 <1> 12325 00001214 89F1 <1> mov cx, si 12326 00001216 29D9 <1> sub cx, bx 12327 <1> @@: 12328 00001218 E321 <1> jcxz .help.no_name 12329 <1> @@: 12330 0000121A BA[8808] <1> mov dx, imsg.help.1 ; command-line help message 12331 0000121D E810FB <1> call init_putsz_cs 12332 00001220 53 <1> push bx 12333 00001221 89DA <1> mov dx, bx 12334 00001223 E850FB <1> call init_puts_ds 12335 00001226 BA[B308] <1> mov dx, imsg.help.2 12336 00001229 E804FB <1> call init_putsz_cs 12337 0000122C 5A <1> pop dx 12338 0000122D E846FB <1> call init_puts_ds 12339 00001230 BA[F309] <1> mov dx, imsg.help.3 12340 00001233 E8FAFA <1> call init_putsz_cs 12341 00001236 B8004C <1> mov ax, 4C00h 12342 00001239 CD21 <1> int 21h ; done 12343 <1> 12344 <1> .help.no_name: 12345 0000123B 0E <1> push cs 12346 0000123C 1F <1> pop ds 12347 0000123D BB[8208] <1> mov bx, imsg.help.defaultfilename 12348 00001240 B90600 <1> mov cx, imsg.help.defaultfilename.length 12349 00001243 EBD5 <1> jmp @B 12350 <1> 12351 <1> 12352 <1> ; Do the (proper) switches. 12353 00001245 AC <1> .switch:lodsb 12354 00001246 3C3F <1> cmp al,'?' 12355 00001248 7485 <1> je .help ; if -? 12356 0000124A 3C63 <1> cmp al, 'c' 12357 0000124C 741B <1> je .switch_c 12358 0000124E 3C43 <1> cmp al, 'C' 12359 00001250 7417 <1> je .switch_c 12360 00001252 3C62 <1> cmp al, 'b' 12361 00001254 7472 <1> je .switch_b 12362 00001256 3C42 <1> cmp al, 'B' 12363 00001258 746E <1> je .switch_b 12364 <1> 12365 <1> ; Other switches may go here. 12366 0000125A 2EA2[210A] <1> mov [ cs:imsg.invalidswitch_a ], al 12367 0000125E BA[100A] <1> mov dx, imsg.invalidswitch ; Invalid switch 12368 <1> ..@init_cmdline_error: 12369 00001261 E8CCFA <1> call init_putsz_cs ; print string 12370 00001264 B8014C <1> mov ax, 4C01h ; Quit and return error status 12371 00001267 CD21 <1> int 21h 12372 <1> 12373 <1> .switch_c: 12374 <1> @@: 12375 00001269 AC <1> lodsb 12376 0000126A 3C3D <1> cmp al, '=' 12377 0000126C 74FB <1> je @B 12378 0000126E 3C3A <1> cmp al, ':' 12379 00001270 74F7 <1> je @B 12380 <1> 12381 00001272 BF[E000] <1> mov di, cmdline_buffer 12382 00001275 B400 <1> mov ah, 0 ; initialise to 0 = unquoted 12383 00001277 A9 <1> db __TEST_IMM16 12384 <1> .switch_c_loop: 12385 00001278 AA <1> stosb 12386 <1> .switch_c_quoted: 12387 00001279 AC <1> lodsb 12388 <1> 12389 0000127A 3C0D <1> cmp al, 13 12390 0000127C 743A <1> je .switch_c_eol 12391 0000127E 38E0 <1> cmp al, ah ; close quote mark ? 12392 00001280 7508 <1> jne @F ; no --> 12393 00001282 3C00 <1> cmp al, 0 12394 00001284 7432 <1> je .switch_c_eol 12395 00001286 B400 <1> mov ah, 0 ; continue unquoted 12396 00001288 EBEF <1> jmp .switch_c_quoted ; and load next character --> 12397 <1> 12398 <1> @@: 12399 0000128A 84E4 <1> test ah, ah ; currently quoted ? 12400 0000128C 7514 <1> jnz .switch_c_not_blank ; yes --> 12401 <1> 12402 0000128E 3C22 <1> cmp al, '"' ; open quote mark ? 12403 00001290 7404 <1> je @F 12404 00001292 3C27 <1> cmp al, "'" 12405 00001294 7504 <1> jne @FF ; no --> 12406 <1> @@: 12407 00001296 88C4 <1> mov ah, al ; remember quoted state 12408 00001298 EBDF <1> jmp .switch_c_quoted ; and load next character --> 12409 <1> 12410 <1> @@: 12411 0000129A 3C20 <1> cmp al, 32 ; blank while unquoted ? 12412 0000129C 741E <1> je .unquoted_blank 12413 0000129E 3C09 <1> cmp al, 9 12414 000012A0 741A <1> je .unquoted_blank ; yes --> 12415 <1> .switch_c_not_blank: 12416 000012A2 3C3B <1> cmp al, ';' ; unescaped semicolon ? 12417 000012A4 7504 <1> jne .switch_c_not_semicolon 12418 000012A6 B00D <1> mov al, 13 ; yes, replace by CR 12419 000012A8 EBCE <1> jmp .switch_c_loop 12420 <1> 12421 <1> .switch_c_not_semicolon: 12422 000012AA 3C5C <1> cmp al, '\' ; escape ? 12423 000012AC 75CA <1> jne .switch_c_loop ; no, store literal --> 12424 000012AE AC <1> lodsb ; load escaped character 12425 <1> ; (may be backslash, semicolon, quote) 12426 000012AF 3C0D <1> cmp al, 13 ; guard against EOL 12427 000012B1 75C5 <1> jne .switch_c_loop 12428 <1> .switch_c_error: 12429 000012B3 BA[250A] <1> mov dx, imsg.switch_c_error 12430 000012B6 EBA9 <1> jmp ..@init_cmdline_error 12431 <1> 12432 <1> .switch_c_eol: 12433 000012B8 84E4 <1> test ah, ah ; in quoted state ? 12434 000012BA 75F7 <1> jnz .switch_c_error ; yes, error --> 12435 <1> .unquoted_blank: 12436 000012BC B000 <1> mov al, 0 12437 000012BE AA <1> stosb ; terminate command line buffer 12438 000012BF 800E[A500]01 <1> setopt [internalflags3], dif3_input_cmdline 12439 000012C4 4E <1> dec si 12440 000012C5 E9D5FE <1> jmp .blankloop 12441 <1> 12442 <1> .switch_b: 12443 000012C8 2EC606[D112]CC <1> mov byte [cs:.breakpoint], 0CCh ; SMC in section init, set point 12444 000012CE E9CCFE <1> jmp .blankloop 12445 <1> 12446 <1> 12447 <1> .noswitches: 12448 <1> .breakpoint: 12449 000012D1 90 <1> nop ; SMC in section init 12450 <1> ; Feed the remaining command line to the 'n' command. 12451 000012D2 4E <1> dec si 12452 000012D3 56 <1> push si 12453 <1> 12454 <1> 12455 <1> %if CATCHINTAMOUNT 12456 <1> ; Set up interrupt vectors. 12457 000012D4 B90600 <1> mov cx, inttab_number 12458 000012D7 BE[3D0C] <1> mov si, inttab 12459 <1> .intloop: 12460 000012DA AC <1> lodsb 12461 000012DB B435 <1> mov ah, 35h 12462 000012DD CD21 <1> int 21h ; get vector 12463 000012DF 97 <1> xchg ax, di 12464 000012E0 AD <1> lodsw 12465 000012E1 97 <1> xchg ax, di 12466 000012E2 895D02 <1> mov word [ di + ieNext ], bx 12467 000012E5 8C4504 <1> mov word [ di + ieNext + 2 ], es 12468 <1> ; store it 12469 <1> %ifn _DEBUG ; vectors are set only when debuggee runs 12470 000012E8 89FA <1> mov dx, di 12471 000012EA B425 <1> mov ah, 25h ; set interrupt vector 12472 000012EC CD21 <1> int 21h ; ds => lDEBUG_DATA_ENTRY 12473 <1> %endif 12474 000012EE E2EA <1> loop .intloop 12475 <1> %endif 12476 <1> 12477 <1> 12478 <1> ; Disabled this. hook2F (debug.asm) now detects this condition. 12479 <1> %if _PM && 0 12480 <1> ; Windows 9x and DosEmu are among those hosts which handle some 12481 <1> ; V86 Ints internally without first calling the interrupt chain. 12482 <1> ; This causes various sorts of troubles and incompatibilities; 12483 <1> ; in our case, hooking interrupt 2Fh would not intercept calls 12484 <1> ; made to the DPMI interface because the host sees them first. 12485 <1> %if _WIN9XSUPP 12486 <1> %if _GUARD_86M_INT2F 12487 <1> push es 12488 <1> xor ax, ax 12489 <1> mov es, ax ; (only used in 86 Mode) 12490 <1> mov ax, [es:2Fh * 4] 12491 <1> cmp ax, -1 12492 <1> je @F ; --> (ZR) 12493 <1> or ax, [es:2Fh * 4 + 2] 12494 <1> @@: 12495 <1> pop es 12496 <1> jz @F 12497 <1> %endif 12498 <1> mov ax, 1600h ; running in a Win9x DOS box? 12499 <1> int 2Fh 12500 <1> cmp al, 4 12501 <1> jge .no2Fhook ; this is intentionally a signed comparison! 12502 <1> @@: 12503 <1> %endif 12504 <1> %if _DOSEMU 12505 <1> testopt [internalflags], runningdosemu 12506 <1> jnz .no2Fhook 12507 <1> %endif 12508 <1> %if _WIN9XSUPP || _DOSEMU 12509 <1> jmp short .dpmihostchecked 12510 <1> .no2Fhook: 12511 <1> setopt [internalflags], nohook2F 12512 <1> .dpmihostchecked: 12513 <1> %endif 12514 <1> %endif 12515 000012F0 1E <1> push ds 12516 000012F1 07 <1> pop es 12517 <1> 12518 <1> ; Save, then modify termination address and parent PSP. 12519 000012F2 BE0A00 <1> mov si, TPIV 12520 000012F5 BF[D40A] <1> mov di, psp22 12521 000012F8 A5 <1> movsw 12522 000012F9 A5 <1> movsw ; save Int22 12523 000012FA BA[2783] <1> mov dx, debug22 12524 000012FD 8954FC <1> mov word [ si-4 ], dx 12525 00001300 8C5CFE <1> mov word [ si-2 ], ds ; set pspInt22 (required) 12526 00001303 BE1600 <1> mov si, 16h 12527 00001306 A5 <1> movsw ; save parent 12528 00001307 8C5CFE <1> mov word [ si-2 ], ds ; set pspParent 12529 0000130A B82225 <1> mov ax, 2522h ; set Int22 12530 0000130D CD21 <1> int 21h ; (not really required) 12531 <1> 12532 <1> ; shrink to required resident size 12533 0000130F 1E <1> push ds 12534 00001310 07 <1> pop es 12535 00001311 B44A <1> mov ah, 4Ah 12536 00001313 2E8B1E[2008] <1> mov bx, word [cs:memsize] 12537 <1> 12538 00001318 FF36[D400] <1> push word [code_seg] 12539 0000131C 2EFF36[2213] <1> push word [cs:.word_initcont] 12540 00001321 CB <1> retf 12541 <1> 12542 <1> align 2, db 0 12543 <1> .word_initcont: 12544 00001322 [B9D8] <1> dw initcont 12545 <1> 12546 <1> 12547 <1> usesection lDEBUG_CODE 12548 <1> initcont: 12549 0000D8B9 CD21 <1> int 21h ; resize to required 12550 <1> ; jc ... ; (expected to work since it had to be larger. also we hooked ints) 12551 <1> 12552 0000D8BB 1E <1> push ds 12553 0000D8BC 07 <1> pop es 12554 0000D8BD E85DCF <1> call getint2324 ; init run2324 to avoid using or displaying NUL vectors 12555 <1> 12556 0000D8C0 1E <1> push ds 12557 0000D8C1 07 <1> pop es 12558 0000D8C2 5E <1> pop si 12559 0000D8C3 AC <1> lodsb 12560 0000D8C4 E882C0 <1> call nn ; process the rest of the command line 12561 <1> 12562 <1> .boot_entry: 12563 0000D8C7 1E <1> push ds 12564 0000D8C8 07 <1> pop es ; => lDEBUG_DATA_ENTRY 12565 <1> 12566 0000D8C9 BE[0000] <1> mov si, cmd3 12567 <1> %if _BOOTLDR 12568 0000D8CC F606[9D00]40 <1> testopt [internalflags], nodosloaded 12569 0000D8D1 7402 <1> jz @F 12570 0000D8D3 FFE6 <1> jmp si ; directly jump to cmd3 of the installed image 12571 <1> @@: 12572 <1> %endif 12573 0000D8D5 56 <1> push si 12574 0000D8D6 E913BD <1> jmp ll3 ; load a program if one has been given at the command line 9990 9991 usesection INIT 9992 00001324 00 align 16, db 0 9993 init_size equ $-section.INIT.vstart 9994 endarea init, 1 9995 9996 9997 numdef SHOWINITSIZE, 0 9998 %if _SHOWINITSIZE 9999 %assign INITSIZE init_size 10000 %warning init holds INITSIZE bytes 10001 %endif 10002 10003 10004 usesection lDEBUG_CODE 10005 0000D8D9 00 align 16, db 0 10006 ldebug_code_size equ $-section.lDEBUG_CODE.vstart 10007 endarea ldebug_code, 1 10008 10009 10010 auxbuff_size: equ (_AUXBUFFSIZE+15) & ~15 10011 endarea auxbuff, 1 10012 10013 transimagepsp_size: equ 100h+ldebug_data_entry_size +asmtable1_size+asmtable2_size +datastack_size+ldebug_code_size+init_size 10016 endarea transimagepsp, 1 ; size of PSP and image during installation 10017 10018 pspsegment_size: equ 100h+ldebug_data_entry_size +asmtable1_size+asmtable2_size +datastack_size 10021 endarea pspsegment, 1 ; size of PSP and image when installed 10022 10023 resimagepsp_size: equ pspsegment_size+ldebug_code_size+auxbuff_size 10024 endarea resimagepsp, 1 ; size of PSP and image when installed 10025 10026 10027 %if transimagepsp_size > resimagepsp_size 10028 %fatal "resimagepsp_size assumed larger" 10029 %endif 10030 10031 %assign __CHECK_RESIDENTSIZE pspsegment_size 10032 %if __CHECK_RESIDENTSIZE > (64 * 1024) 10033 %error resident size of PSP segment too large (%[__CHECK_RESIDENTSIZE]) 10034 %endif 10035 10036 %if CODE_INSURE_COUNT 10037 %warning code_insure_low_byte_not_0CCh needed CODE_INSURE_COUNT times 10038 %endif