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 05D518 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 [1505][CF83][295E]- cmdlist: dw aa,bb,cc,ddd,ee,ff,gg,hh,ii,error,error,ll,mm,nn,oo 195 00000050 [9712][1D8C][A38D]- 195 00000056 [892E][7D8E][A990]- 195 0000005C [DEA4][DEA4][6693]- 195 00000062 [B195][1D97][1790] 196 00000068 [2E3E][7E99][0820]- dw pp,qq,rr,sss,tt,uu,error,ww,xx,yy 196 0000006E [149E][1839][3F47]- 196 00000074 [DEA4][3DA1][BFA2]- 196 0000007A [CEC9] 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 opt3_no_idle_2F: equ 200_0000h 259 %if _DELAY_BEFORE_BP 260 opt3_delay_before_bp: equ 400_0000h 261 %endif 262 opt3_no_call_update: equ 800_0000h 263 opt3_disable_autorepeat:equ 1000_0000h 264 opt3_check_ctrlc_keyb: equ 2000_0000h 265 opt3_check_ctrlc_0bh: equ 4000_0000h 266 opt3_tsr_quit_leave_tf: equ 8000_0000h 267 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 270 271 00000088 02000000 options4: dd DEFAULTOPTIONS4 272 opt4_int_2F_hook: equ 2 273 opt4_int_08_hook: equ 4 274 opt4_int_2D_hook: equ 8 275 opt4_int_serial_force: equ 1_0000h 276 opt4_int_2F_force: equ 2_0000h 277 opt4_int_08_force: equ 4_0000h 278 opt4_int_2D_force: equ 8_0000h 279 opt4_int_00_force: equ 100_0000h 280 opt4_int_01_force: equ 200_0000h 281 opt4_int_03_force: equ 400_0000h 282 opt4_int_06_force: equ 800_0000h 283 opt4_int_18_force: equ 1000_0000h 284 opt4_int_19_force: equ 2000_0000h 285 DEFAULTOPTIONS4 equ opt4_int_2F_hook 286 ; options, options2, options3, options4 287 ; are each assumed to be dwords 288 ; and all consecutive in expr.asm isvariable? 289 290 0000008C 00000000 startoptions: dd DEFAULTOPTIONS ; options as determined during startup; read-only for user 291 00000090 10410000 startoptions2: dd DEFAULTOPTIONS2 292 00000094 0F000060 startoptions3: dd DEFAULTOPTIONS3 293 00000098 02000000 startoptions4: dd DEFAULTOPTIONS4 294 ; startoptions, startoptions2, startoptions3, startoptions4 295 ; are each assumed 296 ; to be dwords and all consecutive in expr.asm isvariable? 297 298 0000009C F8348000 internalflags: dd attachedterm|pagedcommand|notstdinput|inputfile|notstdoutput|outputfile|(!!_PM*dpminohlt)|debuggeeA20|debuggerA20 299 ; flags only modified by DEBUG itself 300 oldpacket equ 1 ; Int25/Int26 packet method available (L, W) 301 newpacket equ 2 ; Int21.7305 packet method available (L, W) 302 ntpacket equ 4 ; VDD registered and usable (L, W) 303 pagedcommand equ 8 ; allows paging in puts 304 notstdinput equ 10h ; DEBUG's StdIn isn't a device with StdIn bit (is file or other device) 305 inputfile equ 20h ; DEBUG's StdIn is a file, notstdinput also set 306 notstdoutput equ 40h ; DEBUG's StdOut isn't a device with StdOut bit (is file or other device) 307 outputfile equ 80h ; DEBUG's StdOut is a file, notstdoutput also set 308 hooked2F equ 100h ; Int2F hooked 309 nohook2F equ 200h ; don't hook Int2F.1687 (required for Win9x, DosEmu?) 310 dpminohlt equ 400h ; DPMI doesn't like hlt 311 protectedmode equ 800h ; in (DPMI) protected mode 312 debuggeeA20 equ 1000h ; state of debuggee's A20 313 debuggerA20 equ 2000h ; state of debugger's A20 (will be on if possible) 314 nodosloaded equ 4000h ; No DOS loaded currently (Boot loader mode) 315 has386 equ 8000h ; CPU is a 386 316 usecharcounter equ 1_0000h ; don't reset charcounter between calls to puts 317 runningnt equ 2_0000h ; running in NTVDM 318 canswitchmode equ 4_0000h ; can switch modes (auxbuff large enough, DPMI mode switch set up) 319 modeswitched equ 8_0000h ; switched mode (now in the mode that we weren't entered in) 320 promptwaiting equ 10_0000h ; puts: any more output needs to display a prompt first 321 switchbuffer equ 20_0000h ; mode switch needs a buffer (auxbuff) 322 tsrmode equ 40_0000h ; in TSR mode; DPI and DPP not valid 323 attachedterm equ 80_0000h ; the attached process terminated 324 runningdosemu equ 100_0000h ; running in dosemu 325 ; load_is_ldp equ 200_0000h ; boot load: partition specified as "ldp" 326 tt_while: equ 400_0000h ; tt: while condition specified 327 tt_p: equ 800_0000h ; tt: proceed past repeated string instructions 328 tt_silent_mode: equ 1000_0000h ; tt: run should be silent (dump at end) 329 tt_silence: equ 2000_0000h ; tt: silent writing (write to auxbuff instead) 330 tt_no_bb: equ 4000_0000h ; tt: do not use bb breakpoints 331 tt_no_bb_first: equ 8000_0000h ; tt: do not use bb breakpoints at first 332 333 000000A0 00000000 internalflags2: dd 0 334 dif2_gg_is_first: equ 1 335 dif2_gg_skip_non_cseip: equ 2 336 dif2_gg_skip_cseip: equ 4 337 dif2_gg_is_gg: equ 8 338 dif2_gg_first_detected: equ 10h 339 dif2_gg_again: equ 20h 340 dif2_tpg_proceed_bp_set:equ 40h 341 dif2_tpg_keep_proceed_bp: equ 80h 342 dif2_tpg_have_bp: equ 100h 343 dif2_tpg_adjusted_cseip:equ 200h 344 dif2_tpg_do_not_adjust: equ 400h 345 dif2_bp_failure: equ 800h 346 dif2_is_pp: equ 1000h 347 %if _INPUT_FILE_HANDLES 348 dif2_input_file: equ 10_0000h 349 dif2_closed_input_file: equ 20_0000h 350 %endif 351 dif2_did_getline_file: equ 40_0000h 352 dif2_boot_loaded_kernel:equ 100_0000h 353 %if _INPUT_FILE_BOOT 354 dif2_input_file_boot: equ 200_0000h 355 dif2_closed_input_file_boot: equ 400_0000h 356 %endif 357 dif2_in_silence_dump: equ 1000_0000h 358 dif2_int31_segment: equ 2000_0000h 359 360 000000A4 80000000 internalflags3: dd dif3_partition_changed 361 dif3_load_is_ldp: equ 1 ; boot load: partition specified as "ldp" 362 dif3_load_is_sdp: equ 2 ; boot load: partition specified as "sdp" 363 dif3_load_is_ydp: equ 4 ; boot load: partition specified as "ydp" 364 dif3_load_is_dp: equ dif3_load_is_ldp | dif3_load_is_sdp | dif3_load_is_ydp 367 dif3_load_dir_dir: equ 8 368 dif3_input_terminal_override: equ 10h 369 dif3_input_serial_override: equ 20h 370 dif3_if_not: equ 40h 371 dif3_partition_changed: equ 80h 372 ; 373 dif3_input_cmdline: equ 100h; input reading from cmdline_buffer 374 dif3_input_cmdline_closed: equ 200h 375 dif3_at_line_end: equ 400h 376 dif3_quiet_input_single:equ 800h 377 dif3_quiet_output: equ 1000h 378 dif3_unquiet_error: equ 2000h 379 dif3_unquiet_prompt: equ 4000h 380 dif3_unquiet: equ dif3_unquiet_error | dif3_unquiet_prompt 381 dif3_return_eof: equ 8000h 382 dif3_highlighting: equ 1_0000h 383 dif3_do_not_highlight: equ 2_0000h 384 dif3_int10_highlight: equ 2_0000h 385 %if _DELAY_BEFORE_BP 386 dif3_delayed equ 80_0000h 387 %endif 388 dif3_input_re: equ 100_0000h ; input reading from re_buffer 389 dif3_input_re_closed: equ 200_0000h 390 dif3_accept_getrange_0: equ 400_0000h 391 %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 392 dif3_in_if: equ 800_0000h 393 %endif 394 dif3_auxbuff_guarded_1: equ 1000_0000h 395 dif3_auxbuff_guarded_2: equ 2000_0000h 396 dif3_prior_pm: equ 4000_0000h 397 dif3_sss_is_reverse: equ 8000_0000h 398 399 000000A8 00000000 internalflags4: dd 0 400 dif4_int_serial_hooked: equ 1 401 dif4_int_2F_hooked: equ 2 402 dif4_int_08_hooked: equ 4 403 dif4_int_2D_hooked: equ 8 404 ; internalflags, internalflags2, internalflags3, internalflags4 405 ; are each assumed 406 ; to be dwords and all consecutive in expr.asm isvariable? 407 408 000000AC 07000000 asm_options: dd DEFAULTASMOPTIONS 409 disasm_lowercase equ 1 410 disasm_commablank equ 2 411 disasm_nasm equ 4 412 disasm_lowercase_refmem:equ 8 413 disasm_show_short: equ 10h 414 disasm_show_near: equ 20h 415 disasm_show_far: equ 40h 416 DEFAULTASMOPTIONS equ disasm_lowercase|disasm_commablank|disasm_nasm 417 418 asm_startoptions: 419 000000B0 07000000 dd DEFAULTASMOPTIONS 420 421 000000B4 00000000 gg_first_cseip_linear: dd 0 422 000000B8 00000000 gg_next_cseip_linear: dd 0 423 000000BC 00000000 tpg_possible_breakpoint:dd 0 424 000000C0 [6370] gg_deferred_message: dw msg.empty_message 425 bb_deferred_message_in_lineout_behind: 426 000000C2 0000 dw 0 427 align 4, db 0 428 000000C4 00 tpg_proceed_bp: times BPSIZE db 0 429 %if _DEBUG1 430 align 2, db 0 431 test_records_Readmem: times 6 * 16 db 0 432 test_records_Writemem: times 6 * 16 db 0 433 test_records_getLinear: times 6 * 16 db 0 434 test_records_getSegmented: times 6 * 16 db 0 435 436 test_readmem_value: db 0 437 %endif 438 000000CD 00 align 2, db 0 439 000000CE 0000 code_seg: dw 0 440 %if _PM 441 000000D0 0000 code_sel: dw 0 442 %endif 443 444 000000D2 00 align 16, db 0 445 000000E0 00 cmdline_buffer: times 256 db 0 446 000001E0 [E000] .position: dw cmdline_buffer 447 448 000001E2 0D db 13 449 000001E3 0D align 2, db 13 ; insure the re_buffer is prefixed by CR 450 re_buffer: 451 .size: equ _RE_BUFFER_SIZE 452 000001E4 405200 fill .size,0,db "@R" 453 .end: 454 000009E4 [E401] .position: dw re_buffer 455 456 000009E6 00 align 4, db 0 457 000009E8 00000000 re_count: dd 0 458 000009EC 00010000 re_limit: dd 256 459 460 align 2, db 0 461 %if _PM 462 000009F0 0000 auxbuff_switchbuffer_size: dw 0 463 %endif 464 000009F2 00 auxbuff_segorsel:segonlyaddress 465 auxbuff_behind_while_condition: 466 000009F8 0000 dw 0 ; -> behind while condition stored in auxbuff 467 ; (this is also the first silent buffer entry) 468 auxbuff_behind_last_silent: 469 000009FA 0000 dw 0 ; -> behind last silent buffer entry 470 tt_silent_mode_number: 471 000009FC 0000 dw 0 ; if non-zero: maximum amount of dumps 472 ; displayed after T/TP/P while silent 473 %if _INPUT_FILE_HANDLES 474 000009FE 90 align INPUTFILEHANDLE_size 475 input_file_handles: 476 00000A00 FF times _INPUT_FILE_HANDLES * INPUTFILEHANDLE_size db -1 477 00000A80 0000 .active: dw 0 478 00000A82 0000 .to_close: dw 0 479 %endif 480 align 2, db 0 481 00000A84 0142 indos_remember_seek_function: dw 4201h 482 00000A86 FFFF indos_remember_seek_handle: dw -1 483 align 4, db 0 484 00000A88 00000000 indos_remember_seek_offset: dd 0 485 %if _INPUT_FILE_BOOT 486 align 4, db 0 487 00000A8C 00000000 boot_remember_seek_offset: dd 0 488 align 2, db 0 489 00000A90 FFFF boot_remember_seek_handle: dw -1 490 %endif 491 492 00000A92 00 charcounter: db 0 ; used by raw output to handle tab 493 00000A93 00 linecounter: db 0 ; used by paging in puts 494 align 4, db 0 495 00000A94 0000 savesp: dw 0 ; saved stack pointer 496 00000A96 0000 dw 0 ; 0 to set high word of esp 497 00000A98 0000 re_sp: dw 0 498 00000A9A [0000] errret: dw cmd3 ; return here if error 499 00000A9C [FDA4] throwret: dw errhandler ; return here if error - priority, no display 500 00000A9E [3E0C] throwsp: dw stack_end - 2; stack pointer set before jumping to throwret 501 00000AA0 0000 run_sp: dw 0 ; stack pointer when running 502 00000AA2 4000 spadjust: dw 40h ; adjust sp by this amount for save 503 00000AA4 0000 pspdbe: dw 0 ; debuggee's PSP (unless DIF&attachedterm) 504 00000AA6 0000 pspdbg: dw 0 ; debugger's PSP (RM segment) 505 align 4, db 0 506 00000AA8 0000000000000000 run2324: dd 0,0 ; debuggee's interrupt vectors 23h and 24h (both modes) 507 %if _PM 508 00000AB0 00000000 dd 0 509 00000AB4 [5C8A][778A] dbg2324: dw i23pm, i24pm 510 %endif 511 %if _VDD 512 00000AB8 FFFF hVdd: dw -1 ; NTVDM VDD handle 513 %endif 514 00000ABA 00 align 4, db 0 515 00000ABC 0000000000000000 sav2324: dd 0,0 ; debugger's interrupt vectors 23h and 24h (real-mode only) 516 00000AC4 00 hakstat: db 0 ; whether we have hacked the vectors or not 517 00000AC5 00 align 4, db 0 518 00000AC8 00000000 psp22: dd 0 ; original terminate address from our PSP 519 00000ACC 0000 parent: dw 0 ; original parent process from our PSP (must follow psp22) 520 %if _MCB || _INT 521 00000ACE FFFF firstmcb: dw -1 ; start of MCB chain (always segment) 522 00000AD0 FFFF firstumcb: dw -1 523 %endif 524 00000AD2 00 pInDOS: segofs16address ; far16 address of InDOS flag (bimodal) 525 %if _USESDA 526 00000ADA FFFFFFFFFFFFFFFF pSDA: segofs16address minusone 527 ; far16 address of SDA (bimodal) 528 %endif 529 00000AE2 00 machine: db 0 ; type of processor for assembler and disassembler (1..6) 530 00000AE3 00 has_87: db 0 ; if there is a math coprocessor present 531 00000AE4 00 mach_87: db 0 ; type of coprocessor present 532 %if _MMXSUPP 533 00000AE5 00 has_mmx: db 0 534 %endif 535 00000AE6 01 bInDbg: db 1 ; 1=debugger is running 536 00000AE7 0A notatty: db 10 ; if standard input is from a file 537 ; this is also used for a linebreak processing hack 538 00000AE8 00 switchar: db 0 ; switch character 539 00000AE9 20 swch1: db ' ' ; switch character if it's a slash 540 align 2, db 0 541 00000AEA 0000 promptlen: dw 0 ; length of prompt 542 00000AEC [0200] bufnext: dw line_in+2 ; address of next available character 543 00000AEE [0200] bufend: dw line_in+2 ; address + 1 of last valid character 544 00000AF0 0000 rc: dw 0 545 00000AF2 0000 priorrc: dw 0 546 00000AF4 0000 erc: dw 0 547 %if _HISTORY 548 history: 549 %if _HISTORY_SEPARATE_FIXED 550 00000AF6 00 .segorsel: segonlyaddress 551 00000AFC FE1F .first: dw _HISTORY_SIZE - 2 552 00000AFE FE1F .last: dw _HISTORY_SIZE - 2 553 %else 554 .first: dw historybuffer.end - 2 555 .last: dw historybuffer.end - 2 556 %endif 557 %endif 558 559 var_addr_entries: 560 00000B00 00 a_addr: segmentedaddress; address for next A command 561 00000B0A 00 d_addr: segmentedaddress; address for next D command; must follow a_addr 562 00000B14 00 behind_r_u_addr:segmentedaddress; address behind R's disassembly 563 00000B1E 00 u_addr: segmentedaddress; address for next U command; must follow d_addr 564 00000B28 00 e_addr: segmentedaddress; address for current/next E command 565 %if _DSTRINGS 566 00000B32 00 dz_addr: segmentedaddress; address for next ASCIZ string 567 00000B3C 00 dcpm_addr: segmentedaddress; address for next $-terminated string 568 00000B46 00 dcount_addr: segmentedaddress; address for next byte-counted string 569 00000B50 00 dwcount_addr: segmentedaddress; address for next word-counted string 570 %endif 571 var_addr_entries.amount equ ($ - var_addr_entries) / SEGADR_size 572 %if _PM 573 00000B5A 00000000 x_addr: dd 0 ; (phys) address for next DX command 574 %endif 575 %if _DSTRINGS 576 00000B5E 00 dstringtype: db 0 ; FFh byte-counted, FEh word-counted, else terminator byte 577 00000B5F 00 align 2, db 0 578 00000B60 [320B] dstringaddr: dw dz_addr ; -> address of last string 579 %endif 580 %if _INT 581 00000B62 00 align 4, db 0 582 00000B64 00000000 intaddress: dd 0 583 lastint_is_86m_and_mcb: 584 00000B68 0000 dw 0 585 00000B6A 00 lastint: db 0 586 %endif 587 00000B6B 00 align 4, db 0 588 search_results: 589 %if _PM 590 00000B6C 00 times 6 * 16 db 0 591 %else 592 times 4 * 16 db 0 593 %endif 594 align 4, db 0 595 00000BCC 00000000 sscounter: dd 0 596 00000BD0 00 eqflag: db 0 ; flag indicating presence of `=' operand 597 00000BD1 00 align 2, db 0 598 00000BD2 000000000000 eqladdr: dw 0,0,0 ; address of `=' operand in G, P and T command 599 align 2, db 0 600 00000BD8 0000 run_int: dw 0 ; interrupt type that stopped the running 601 00000BDA [E003] lastcmd: dw dmycmd 602 00000BDC 00 bInit: db 0 ; 0=ensure a valid opcode is at debuggee's CS:IP 603 00000BDD 00 fileext: db 0 ; file extension (0 if no file name) 604 EXT_OTHER equ 1 605 EXT_COM equ 2 606 EXT_EXE equ 4 607 EXT_HEX equ 8 608 609 00000BDE 00 align 4, db 0 610 00000BE0 00000000 mmxbuff: dd 0 ; buffer with a (read-only) part of MMX register 611 ; for access from within expressions 612 %if _CATCHINT08 613 00000BE4 0000 intr8_counter: dw 0 614 %endif 615 00000BE6 00 maxmachinetype: db 0 616 serial_rows: 617 00000BE7 18 db 24 618 serial_columns: 619 00000BE8 50 db 80 620 serial_keep_timeout: 621 00000BE9 0F db 15 622 %if _USE_TX_FIFO 623 serial_fifo_size: 624 00000BEA 10 db _BI_TX_FIFO_SIZE 625 ; size of built-in TX fifo (1 is as if no FIFO) 626 %endif 627 serial_flags: 628 00000BEB 00 db 0 629 sf_init_done: equ 1 630 sf_ctrl_c: equ 2 631 sf_double_ctrl_c: equ 4 632 sf_built_in_fifo: equ 8 633 634 00000BEC 0B serial_var_intnum: db _INTNUM 635 00000BED 03 serial_var_params: db _UART_PARAMS 636 00000BEE 00 serial_var_fifo: db _UART_FIFO 637 00000BEF 00 align 2, db 0 638 00000BF0 F802 serial_var_baseport: dw _UART_BASE 639 00000BF2 0C00 serial_var_dl: dw _UART_RATE 640 00000BF4 0800 serial_var_irqmask: dw _OFFMASK 641 642 00000BF6 01 io_rows: db 1 643 00000BF7 01 io_columns: db 1 644 align 2, db 0 645 00000BF8 0000 io_start_buffer: dw 0 646 00000BFA 0000 io_end_buffer: dw 0 647 00000BFC FF00 io_levels: dw 255 648 00000BFE 0100 io_flags: dw DEFAULTIOFLAGS 649 iof_extra_iol_for_tpg_re: equ 1 650 DEFAULTIOFLAGS equ iof_extra_iol_for_tpg_re 651 652 align 2, db 0 653 00000C00 0000 getline_timer_count: dw 0 654 00000C02 0000 getline_timer_last: dw 0 655 00000C04 [E003] getline_timer_func: dw dmycmd 656 657 %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 658 align 2, db 0 659 00000C06 0000 if_exists_then_address: dw 0 660 00000C08 0000 if_exists_si: dw 0 661 00000C0A 0000 if_exists_sp: dw 0 662 00000C0C 0000 if_exists_length: dw 0 663 %endif 664 665 align 2, db 0 666 terminator_in_line_in: 667 00000C0E 0000 .offset: dw 0 668 00000C10 00 .value: db 0 669 670 00000C11 00 termcode: db 0 671 672 align 2, db 0 673 inttab_optional: 674 .: 675 serial_installed_intnum: equ $ 676 00000C12 0000 dw 0 677 00000C14 [D895] dw serial_interrupt_handler 678 00000C16 0100 dw dif4_int_serial_hooked 679 %if _PM 680 00000C18 2F00 dw 2Fh 681 00000C1A [4089] dw debug2F 682 00000C1C 0200 dw dif4_int_2F_hooked 683 %endif 684 %if _CATCHINT08 685 00000C1E 0800 dw 8 686 00000C20 [5685] dw intr8 687 00000C22 0400 dw dif4_int_08_hooked 688 %endif 689 .amount: equ ($ - .) / 6 690 00000C24 FFFF dw -1 691 692 693 amisintr_offset: 694 00000C26 [310C] dw inttab 695 696 inttab_pre: 697 00000C28 00 times 3 * inttab_optional.amount db 0 698 699 inttab: 700 %if _CATCHINT00 701 00000C31 00 db 0 702 00000C32 [3686] dw intr0 ; table of interrupt initialization stuff 703 %endif 704 %if _CATCHINT01 705 00000C34 01 db 1 706 00000C35 [F285] dw intr1 707 %endif 708 %if _CATCHINT03 709 00000C37 03 db 3 710 00000C38 [5286] dw intr3 711 %endif 712 %if _CATCHINT06 713 00000C3A 06 db 6 714 00000C3B [6E86] dw intr6 715 %endif 716 %if _CATCHINT18 717 00000C3D 18 db 18h 718 00000C3E [8A86] dw intr18 719 %endif 720 %if _CATCHINT19 721 00000C40 19 db 19h 722 00000C41 [A686] dw intr19 723 %endif 724 endarea inttab 725 inttab_number equ inttab_size / 3 726 %if _CATCHINT2D 727 00000C43 2D .i2D: db 2Dh 728 00000C44 [4C81] dw int2D 729 %endif 730 731 732 intforcetab: 733 %if _CATCHINT00 734 00000C46 01 db opt4_int_00_force >> 24 735 %endif 736 %if _CATCHINT01 737 00000C47 02 db opt4_int_01_force >> 24 738 %endif 739 %if _CATCHINT03 740 00000C48 04 db opt4_int_03_force >> 24 741 %endif 742 %if _CATCHINT06 743 00000C49 08 db opt4_int_06_force >> 24 744 %endif 745 %if _CATCHINT18 746 00000C4A 10 db opt4_int_18_force >> 24 747 %endif 748 %if _CATCHINT19 749 00000C4B 20 db opt4_int_19_force >> 24 750 %endif 751 752 753 align 2, db 0 754 ; Parameter block for EXEC call 755 00000C4C 0000 execblk:dw 0 ;(00) zero: copy the parent's environment 756 00000C4E 00000000 dw 0,0 ;(02) address of command tail to copy 757 00000C52 5C000000 dw 5Ch,0 ;(06) address of first FCB to copy 758 00000C56 6C000000 dw 6Ch,0 ;(10) address of second FCB to copy 759 00000C5A 00000000 dw 0,0 ;(14) initial SS:SP 760 00000C5E 00000000 dw 0,0 ;(18) initial CS:IP 761 762 763 ; Register save area (32 words). 764 ; must be DWORD aligned, used as stack 765 00000C62 00 align 4, db 0 766 regs: 767 00000C64 00000000 reg_eax: dd 0 ;+00 eax 768 00000C68 00000000 reg_ebx: dd 0 ;+04 ebx 769 00000C6C 00000000 reg_ecx: dd 0 ;+08 ecx 770 00000C70 00000000 reg_edx: dd 0 ;+12 edx 771 00000C74 00000000 reg_esp: dd 0 ;+16 esp 772 00000C78 00000000 reg_ebp: dd 0 ;+20 ebp 773 00000C7C 00000000 reg_esi: dd 0 ;+24 esi 774 00000C80 00000000 reg_edi: dd 0 ;+28 edi 775 00000C84 00000000 reg_ds: dd 0 ;+32 ds (high word unused) 776 00000C88 00000000 reg_es: dd 0 ;+36 es (high word unused) 777 00000C8C 00000000 reg_ss: dd 0 ;+40 ss (high word unused) 778 00000C90 00000000 reg_cs: dd 0 ;+44 cs (high word unused) 779 00000C94 00000000 reg_fs: dd 0 ;+48 fs (high word unused) 780 00000C98 00000000 reg_gs: dd 0 ;+52 gs (high word unused) 781 00000C9C 00000000 reg_eip: dd 0 ;+56 eip 782 00000CA0 00000000 reg_efl: dd 0 ;+60 efl(ags) 783 regs.end: 784 regs.size: equ regs.end - regs 785 786 regs_prior: 787 .: 788 00000CA4 00000000 times 16 dd 0 789 .end: 790 .size: equ .end - . 791 792 %if .size != regs.size 793 %error regs prior save area size mismatch 794 %endif 795 796 %if _VARIABLES 797 00000CE4 00000000 vregs: times 256 dd 0 ; internal v0..vff 798 %endif 799 800 ; possible byte encoding of lDebug variables for dynamic computations: 801 ; xxxxyyyy 802 ; 10: register 803 ; xx: size (0 = 1, 1 = 2, 2 = 4) 804 ; yyyy: 0..15: register as stored in the register save area 805 ; as SIL, DIL, BPL, SPL aren't supported these map to xH 806 ; xSL, IPL and FLL are invalid, ExS are invalid 807 ; 1011: variable 808 ; yyyy: which variable. variables are always dword-sized 809 ; 11000000: 32-bit compound, next byte stores: xxxxyyyy first, second 16-bit reg 810 ; 11000001..11111111: available for encoding other compound regs, vars, indirection, 811 ; symbols, types etc 812 ; 0xxxxxxx: operators 813 814 815 ; Instruction set information needed for the 'p' command. 816 ; ppbytes and ppinfo needs to be consecutive. 817 000010E4 6667262E363E6465F2- ppbytes:db 66h,67h,26h,2Eh,36h,3Eh,64h,65h,0F2h,0F3h ; prefixes 817 000010ED F3 818 .string: 819 000010EE ACADAAABA4A5 db 0ACh,0ADh,0AAh,0ABh,0A4h,0A5h ; lods,stos,movs 820 000010F4 6C6D6E6F db 6Ch,6Dh,6Eh,6Fh ; ins,outs 821 000010F8 A6A7AEAF db 0A6h,0A7h,0AEh,0AFh ; cmps,scas 822 PPLEN_ONLY_STRING equ $-ppbytes 823 .string_amount: equ $ - .string 824 000010FC CCCD db 0CCh,0CDh ; int instructions 825 000010FE E0E1E2 db 0E0h,0E1h,0E2h ; loop instructions 826 00001101 E8 db 0E8h ; call rel16/32 827 00001102 9A db 09Ah ; call far seg16:16/32 828 ; (This last one is done explicitly by the code.) 829 ; db 0FFh ; FF/2 or FF/3: indirect call 830 831 PPLEN equ $-ppbytes ; size of the above table 832 833 ; Info for the above, respectively. This MUST follow 834 ; immediately after ppbytes, as we add + PPLEN - 1 to 835 ; di after repne scasb to index into this (ppinfo). 836 ; 80h = prefix; 82h = operand size prefix; 81h = address size prefix. 837 ; If the high bit is not set, the next highest bit (40h) indicates 838 ; that the instruction size depends on whether there is an operand 839 ; size prefix; if set, under o32 two bytes are added to the size. 840 ; (This is only used for direct near and far call.) 841 ; If both the two highest bits are clear, then PP_STRDEST, 842 ; PP_STRSRC, or PP_STRSRC2 may be set. This only happens for 843 ; string instructions, which always are neither prefixes nor 844 ; use additional bytes. 845 ; The remaining bits tell the number of additional bytes in the 846 ; instruction. This is at most 4. It must be below-or-equal to 847 ; 7, or if PP_VARSIZ is used, 5 (so the sum stays below 8). 848 849 PP_ADRSIZ equ 01h 850 PP_OPSIZ equ 02h 851 PP_PREFIX equ 80h 852 PP_VARSIZ equ 40h 853 PP_STRDEST equ 20h 854 PP_STRSRC equ 10h 855 PP_STRSRC2 equ 08h 856 PP_SIZ_MASK equ 07h 857 858 00001103 8281 ppinfo: db PP_PREFIX | PP_OPSIZ, PP_PREFIX | PP_ADRSIZ 859 00001105 80 times 8 db PP_PREFIX ; prefixes 860 0000110D 1010 db PP_STRSRC, PP_STRSRC ; lods 861 0000110F 2020 db PP_STRDEST, PP_STRDEST ; stos 862 00001111 3030 db PP_STRDEST | PP_STRSRC, PP_STRDEST | PP_STRSRC 863 ; movs 864 00001113 2020 db PP_STRDEST, PP_STRDEST ; ins 865 00001115 1010 db PP_STRSRC, PP_STRSRC ; outs 866 00001117 1818 db PP_STRSRC2 | PP_STRSRC, PP_STRSRC2 | PP_STRSRC 867 ; cmps 868 00001119 0808 db PP_STRSRC2, PP_STRSRC2 ; scas 869 0000111B 0001 db 0,1 ; int 870 0000111D 010101 db 1,1,1 ; loop 871 00001120 42 db PP_VARSIZ | 2 ; call rel16/32 with displacement 872 00001121 44 db PP_VARSIZ | 4 ; call far 16:16 or 16:32 immediate 873 874 %if PPLEN != $-ppinfo 875 %error "ppinfo table has wrong size" 876 %endif 877 878 879 ; Equates for instruction operands. 880 ; First the sizes. 881 882 OP_ALL equ 40h ; byte/word/dword operand (could be 30h but ...) 883 OP_1632 equ 50h ; word or dword operand 884 OP_8 equ 60h ; byte operand 885 OP_16 equ 70h ; word operand 886 OP_32 equ 80h ; dword operand 887 OP_64 equ 90h ; qword operand 888 OP_1632_DEFAULT equ 0A0h ; word or dword or default opsize 889 890 OP_SIZE equ OP_ALL ; the lowest of these 891 892 ; These operand types need to be combined with a size. 893 ; Bits 0 to 3 give one of these types (maximum 15), 894 ; and bits 4 to 7 specify the size. Table entries 895 ; for these are identified by detecting that they 896 ; are above-or-equal OP_SIZE. 897 ; The first parameter to the opsizeditem macro is the 898 ; name of the item. It has to match the names used in 899 ; the instr.key and debugtbl.inc files. 900 ; The second parameter is the entry for bittab that 901 ; is used by aa.asm (the assembler). 902 ; The third parameter is the suffix used to create the 903 ; entry for asmjmp (prefix aop_) and disjmp2 (dop_). 904 905 %macro opsizeditem 3.nolist 906 %1 equ nextindex 907 %xdefine BITTAB_OPSIZEDITEMS BITTAB_OPSIZEDITEMS,%2 908 %xdefine ASMJMP_OPSIZEDITEMS ASMJMP_OPSIZEDITEMS,aop_%3 909 %xdefine DISJMP2_OPSIZEDITEMS DISJMP2_OPSIZEDITEMS,dop_%3 910 %assign nextindex nextindex + 1 911 %endmacro 912 %assign nextindex 0 913 %define BITTAB_OPSIZEDITEMS "" 914 %define ASMJMP_OPSIZEDITEMS "" 915 %define DISJMP2_OPSIZEDITEMS "" 916 opsizeditem OP_IMM, ARG_IMMED, imm ; immediate 917 opsizeditem OP_RM,ARG_DEREF+ARG_JUSTREG,rm ; reg/mem 918 opsizeditem OP_M, ARG_DEREF, m ; mem (but not reg) 919 opsizeditem OP_R_MOD, ARG_JUSTREG, r_mod ; register, determined from MOD R/M part 920 opsizeditem OP_MOFFS, ARG_DEREF, moffs ; memory offset; e.g., [1234] 921 opsizeditem OP_R, ARG_JUSTREG, r ; reg part of reg/mem byte 922 opsizeditem OP_R_ADD, ARG_JUSTREG, r_add ; register, determined from instruction byte 923 opsizeditem OP_AX, ARG_JUSTREG, ax ; al or ax or eax 924 %if nextindex > 16 925 %error Too many op sized items 926 %endif 927 928 ; These don't need a size. 929 ; Because the size needs to be clear to indicate 930 ; that one of these is to be used, the maximum 931 ; value for these is 63 (as 64 is OP_SIZE). 932 ; The minimum value for these is 1 because a 0 933 ; without size means the end of an op list (OP_END). 934 ; The first parameter to the opitem macro is the name 935 ; of the item. It has to match the names used in the 936 ; instr.key and debugtbl.inc files. 937 ; The second parameter is the entry for bittab that 938 ; is used by aa.asm (the assembler). The third 939 ; parameter is the entry for asmjmp. 940 ; The fourth parameter is the entry for optab as used 941 ; by uu.asm (the disassembler). 942 ; 943 ; asm_siznum contains entries for OP_M64 to OP_MXX. 944 ; (The order has to match their opitem order.) 945 ; asm_regnum contains entries for OP_DX to OP_GS. 946 ; (The order has to match their opitem order.) 947 948 %macro opitem 4.nolist 949 %1 equ nextindex 950 %xdefine BITTAB_OPITEMS BITTAB_OPITEMS,%2 951 %xdefine ASMJMP_OPITEMS ASMJMP_OPITEMS,%3 952 %xdefine OPTAB_OPITEMS OPTAB_OPITEMS,%4 953 %assign nextindex nextindex + 1 954 %endmacro 955 OP_END equ 0 956 %assign nextindex 1 957 %define BITTAB_OPITEMS "" 958 %define ASMJMP_OPITEMS "" 959 %define OPTAB_OPITEMS "" 960 ; order of the following (ao17 entries) must match asm_siznum in aa.asm 961 OP_FIRST_ASM_SIZNUM equ nextindex ; corresponding to asm_siznum start 962 opitem OP_M64, ARG_DEREF, ao17,dop_m64 ; qword memory (obsolete?) 963 opitem OP_MFLOAT, ARG_DEREF, ao17,dop_mfloat ; float memory 964 opitem OP_MDOUBLE, ARG_DEREF, ao17,dop_mdouble; double-precision floating memory 965 opitem OP_M80, ARG_DEREF, ao17,dop_m80 ; tbyte memory 966 opitem OP_MXX, ARG_DEREF, ao17,dop_mxx ; memory (size unknown) 967 opitem OP_FARIMM, ARG_FARADDR, ao21,dop_farimm ; far16/far32 immediate 968 opitem OP_REL8, ARG_IMMED, ao23,dop_rel8 ; byte address relative to IP 969 opitem OP_REL1632, ARG_IMMED, ao25,dop_rel1632; word or dword address relative to IP 970 opitem OP_1CHK, ARG_WEIRDREG, ao29,dop49 ; check for ST(1) 971 opitem OP_STI, ARG_WEIRDREG, aop_sti,dop_sti ; ST(I) 972 opitem OP_CR, ARG_WEIRDREG, aop_cr,dop_cr ; CRx 973 opitem OP_DR, ARG_WEIRDREG, ao34,dop_dr ; DRx 974 opitem OP_TR, ARG_WEIRDREG, ao35,dop_tr ; TRx 975 opitem OP_SEGREG, ARG_WEIRDREG, ao39,dop_segreg ; segment register 976 opitem OP_IMMS8, ARG_IMMED, ao41,dop_imms8 ; sign extended immediate byte 977 opitem OP_IMMS8_EXTEND, ARG_IMMED, ao41_extend,dop_imms8 ; add etc word/dword r/m, imms8 978 opitem OP_IMM8, ARG_IMMED, ao42,dop_imm8 ; immediate byte (other args may be (d)word) 979 opitem OP_IMM8_INT, ARG_IMMED, ao42,dop_imm8_int ; immediate byte for int 980 opitem OP_MMX, ARG_WEIRDREG, aop_mmx,dop_mmx ; MMx 981 opitem OP_MMX_MOD, ARG_WEIRDREG, aop_mmx_mod,dop_mmx_mod ; MMx, but in ModR/M part 982 opitem OP_SHOSIZ, 0FFh, ao44, dop_shosiz ; set flag to always show the size 983 opitem OP_SHORT, 0FFh, ao_short,dop_short ; allow short keyword 984 opitem OP_NEAR, 0FFh, ao_near,dop_near ; allow near keyword 985 opitem OP_FAR, 0FFh, ao_far, dop_far ; allow far keyword 986 opitem OP_FAR_REQUIRED, 0FFh, ao_far_required,dop_far_required ; require far keyword 987 opitem OP_FAR_M, 0FFh, ao_modifier_continue,dop_far_m ; les, lds, lss, lfs, lgs, or jmp/call far mem 988 opitem OP_DOUBLE_M, 0FFh, ao_modifier_continue,dop_double_m ; bound 989 opitem OP_M_SRC, 0FFh, ao_modifier_continue,dop_m_src 990 opitem OP_M_DST, 0FFh, ao_modifier_continue,dop_m_dst 991 opitem OP_M_SRC_DST, 0FFh, ao_modifier_continue,dop_m_src_dst 992 opitem OP_STACK_PUSH, 0FFh, ac09_internal_error,dop_stack_push 993 opitem OP_STACK_POP, 0FFh, ac09_internal_error,dop_stack_pop 994 opitem OP_STACK_SPECIAL,0FFh, ac09_internal_error,dop_stack_special 995 opitem OP_E_CX, ARG_JUSTREG, aop_e_cx, da_internal_error ; (E)CX 996 OP_FIRST_STRING equ nextindex 997 opitem OP_1, ARG_IMMED, ao46, "1" ; 1 (simple "string" ops from here on) 998 opitem OP_3, ARG_IMMED, ao47, "3" ; 3 999 ; order of the following (ao48 entries) must match asm_regnum in aa.asm 1000 OP_FIRST_ASM_REGNUM equ nextindex ; corresponding to asm_regnum start 1001 opitem OP_DX, ARG_JUSTREG, ao48, "DX" ; DX 1002 opitem OP_CL, ARG_JUSTREG, ao48, "CL" ; CL 1003 opitem OP_ST, ARG_WEIRDREG, ao48, "ST" ; ST (top of coprocessor stack) 1004 opitem OP_CS, ARG_WEIRDREG, ao48, "CS" ; CS 1005 opitem OP_DS, ARG_WEIRDREG, ao48, "DS" ; DS 1006 opitem OP_ES, ARG_WEIRDREG, ao48, "ES" ; ES 1007 opitem OP_FS, ARG_WEIRDREG, ao48, "FS" ; FS 1008 opitem OP_GS, ARG_WEIRDREG, ao48, "GS" ; GS 1009 opitem OP_SS, ARG_WEIRDREG, ao48, "SS" ; SS 1010 OP_AFTER_LAST equ nextindex 1011 %if nextindex > OP_SIZE 1012 %error Too many op items 1013 %endif 1014 OP_AMOUNT_TABLE equ nextindex + 16 - 1 1015 ; nextindex: amount sizeless types 1016 ; 16: OP_SIZE combined types 1017 ; -1: OP_END does not occur in tables 1018 1019 ; Instructions that have an implicit operand subject to a segment prefix. 1020 ; This means a prefixed segment is allowed by the strict assembler, and 1021 ; the disassembler treats a segment prefix as part of the instruction and 1022 ; displays it in front of the instruction's mnemonic. 1023 ; (outs, movs, cmps, lods, xlat). 1024 segprfxtab: 1025 00001122 6E6FA4A5A6A7ACAD db 06Eh,06Fh,0A4h,0A5h,0A6h,0A7h,0ACh,0ADh 1026 a32prfxtab: 1027 0000112A D7 db 0D7h ; xlat, last in segprfxtab, first in a32prfxtab 1028 SEGP_LEN equ $-segprfxtab 1029 1030 ; Instructions that can be used with REPE/REPNE. 1031 ; (ins, outs, movs, stos, lods; cmps, scas) 1032 0000112B 6C6EA4AAAC replist:db 06Ch,06Eh,0A4h,0AAh,0ACh ; REP (no difference) 1033 REP_SAME_LEN equ $-replist ; number of indifferent replist entries 1034 00001130 A6AE db 0A6h,0AEh ; REPE/REPNE 1035 REP_LEN equ $-replist 1036 REP_DIFF_LEN equ REP_LEN-REP_SAME_LEN ; number of replist entries with difference 1037 1038 A32P_LEN equ $-a32prfxtab 1039 1040 ; prfxtab P_LEN REP_LEN REPE_REPNE_LEN 1041 1042 ; All the instructions in replist also have an implicit operand 1043 ; subject to ASIZE (similar to segprfxtab). Additionally, the 1044 ; xlat instruction (0D7h) has such an implicit operand too. 1045 ; maskmovq too. 1046 1047 1048 %include "asmtabs.asm" 1049 <1> [list -] 1404 <1> usesection ASMTABLE2 1405 <1> asmtab: 1406 <1> usesection ASMTABLE1 1407 <1> %include "debugtbl.inc" 1408 <2> 1409 <2> ;--- This file was generated by mktables.exe. 1410 <2> 1411 <2> OPTYPES_BASE EQU 0Ch 1412 <2> 1413 <2> ;--- Operand type lists. 1414 <2> ;--- They were read from file INSTR.KEY. 1415 <2> 1416 <2> oplists label byte 1417 00000000 00 <2> opl OP_END ; idx=0, ofs=Ch, used=99 1418 00000001 474000 <2> opl OP_ALL+OP_AX, OP_ALL+OP_IMM, OP_END ; idx=1, ofs=Dh, used=18 1419 00000004 1E414000 <2> opl OP_M_SRC_DST, OP_ALL+OP_RM, OP_ALL+OP_IMM, OP_END ; idx=2, ofs=10h, used=7 1420 00000008 1C414000 <2> opl OP_M_SRC, OP_ALL+OP_RM, OP_ALL+OP_IMM, OP_END ; idx=3, ofs=14h, used=3 1421 0000000C 1D414000 <2> opl OP_M_DST, OP_ALL+OP_RM, OP_ALL+OP_IMM, OP_END ; idx=4, ofs=18h, used=1 1422 00000010 1E511000 <2> opl OP_M_SRC_DST, OP_1632+OP_RM, OP_IMMS8_EXTEND, OP_END ; idx=5, ofs=1Ch, used=7 1423 00000014 1C511000 <2> opl OP_M_SRC, OP_1632+OP_RM, OP_IMMS8_EXTEND, OP_END ; idx=6, ofs=20h, used=1 1424 00000018 1E414500 <2> opl OP_M_SRC_DST, OP_ALL+OP_RM, OP_ALL+OP_R, OP_END ; idx=7, ofs=24h, used=19 1425 0000001C 1C414500 <2> opl OP_M_SRC, OP_ALL+OP_RM, OP_ALL+OP_R, OP_END ; idx=8, ofs=28h, used=4 1426 00000020 1D414500 <2> opl OP_M_DST, OP_ALL+OP_RM, OP_ALL+OP_R, OP_END ; idx=9, ofs=2Ch, used=2 1427 00000024 45 <2> opl OP_ALL+OP_R ; idx=10, ofs=30h, used=19 1428 00000025 1C4100 <2> opl OP_M_SRC, OP_ALL+OP_RM, OP_END ; idx=11, ofs=31h, used=4 + 19 1429 00000028 45 <2> opl OP_ALL+OP_R ; idx=12, ofs=34h, used=2 1430 00000029 1E4100 <2> opl OP_M_SRC_DST, OP_ALL+OP_RM, OP_END ; idx=13, ofs=35h, used=6 + 2 1431 0000002C 1E717500 <2> opl OP_M_SRC_DST, OP_16+OP_RM, OP_16+OP_R, OP_END ; idx=14, ofs=38h, used=1 1432 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 1433 00000035 551C5100 <2> opl OP_1632+OP_R, OP_M_SRC, OP_1632+OP_RM, OP_END ; idx=16, ofs=41h, used=35 1434 00000039 8600 <2> opl OP_32+OP_R_ADD, OP_END ; idx=17, ofs=45h, used=8 1435 0000003B 1E515500 <2> opl OP_M_SRC_DST, OP_1632+OP_RM, OP_1632+OP_R, OP_END ; idx=18, ofs=47h, used=3 1436 0000003F 1C515500 <2> opl OP_M_SRC, OP_1632+OP_RM, OP_1632+OP_R, OP_END ; idx=19, ofs=4Bh, used=1 1437 00000043 1E51 <2> opl OP_M_SRC_DST, OP_1632+OP_RM ; idx=20, ofs=4Fh, used=3 1438 00000045 1100 <2> opl OP_IMM8, OP_END ; idx=21, ofs=51h, used=2 + 3 1439 00000047 1C511100 <2> opl OP_M_SRC, OP_1632+OP_RM, OP_IMM8, OP_END ; idx=22, ofs=53h, used=1 1440 0000004B 1F <2> opl OP_STACK_PUSH ; idx=23, ofs=57h, used=1 1441 0000004C 170800 <2> opl OP_NEAR, OP_REL1632, OP_END ; idx=24, ofs=58h, used=31 + 1 1442 0000004F 21 <2> opl OP_STACK_SPECIAL ; idx=25, ofs=5Bh, used=1 1443 00000050 180600 <2> opl OP_FAR, OP_FARIMM, OP_END ; idx=26, ofs=5Ch, used=1 + 1 1444 00000053 21 <2> opl OP_STACK_SPECIAL ; idx=27, ofs=5Fh, used=1 1445 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 1446 00000059 1E0100 <2> opl OP_M_SRC_DST, OP_M64, OP_END ; idx=29, ofs=65h, used=1 1447 0000005C 1C0100 <2> opl OP_M_SRC, OP_M64, OP_END ; idx=30, ofs=68h, used=1 1448 0000005F 1D0100 <2> opl OP_M_DST, OP_M64, OP_END ; idx=31, ofs=6Bh, used=1 1449 00000062 1F <2> opl OP_STACK_PUSH ; idx=32, ofs=6Eh, used=8 1450 00000063 5600 <2> opl OP_1632+OP_R_ADD, OP_END ; idx=33, ofs=6Fh, used=16 + 8 1451 00000065 205600 <2> opl OP_STACK_POP, OP_1632+OP_R_ADD, OP_END ; idx=34, ofs=71h, used=8 1452 00000068 1F701100 <2> opl OP_STACK_PUSH, OP_16+OP_IMM, OP_IMM8, OP_END ; idx=35, ofs=74h, used=1 1453 0000006C 1C0200 <2> opl OP_M_SRC, OP_MFLOAT, OP_END ; idx=36, ofs=78h, used=9 1454 0000006F 1D0200 <2> opl OP_M_DST, OP_MFLOAT, OP_END ; idx=37, ofs=7Bh, used=2 1455 00000072 1C0300 <2> opl OP_M_SRC, OP_MDOUBLE, OP_END ; idx=38, ofs=7Eh, used=9 1456 00000075 1D0300 <2> opl OP_M_DST, OP_MDOUBLE, OP_END ; idx=39, ofs=81h, used=2 1457 00000078 27 <2> opl OP_ST ; idx=40, ofs=84h, used=20 1458 00000079 0A00 <2> opl OP_STI, OP_END ; idx=41, ofs=85h, used=4 + 20 1459 0000007B 09 <2> opl OP_1CHK ; idx=42, ofs=87h, used=6 1460 0000007C 0A2700 <2> opl OP_STI, OP_ST, OP_END ; idx=43, ofs=88h, used=6 + 6 1461 0000007F 1C8200 <2> opl OP_M_SRC, OP_32+OP_M, OP_END ; idx=44, ofs=8Bh, used=9 1462 00000082 1D8200 <2> opl OP_M_DST, OP_32+OP_M, OP_END ; idx=45, ofs=8Eh, used=2 1463 00000085 1C7200 <2> opl OP_M_SRC, OP_16+OP_M, OP_END ; idx=46, ofs=91h, used=10 1464 00000088 1D7200 <2> opl OP_M_DST, OP_16+OP_M, OP_END ; idx=47, ofs=94h, used=4 1465 0000008B 1C0400 <2> opl OP_M_SRC, OP_M80, OP_END ; idx=48, ofs=97h, used=2 1466 0000008E 1D0400 <2> opl OP_M_DST, OP_M80, OP_END ; idx=49, ofs=9Ah, used=2 1467 00000091 090A00 <2> opl OP_1CHK, OP_STI, OP_END ; idx=50, ofs=9Dh, used=9 1468 00000094 1C <2> opl OP_M_SRC ; idx=51, ofs=A0h, used=4 1469 00000095 0500 <2> opl OP_MXX, OP_END ; idx=52, ofs=A1h, used=1 + 4 1470 00000097 1D0500 <2> opl OP_M_DST, OP_MXX, OP_END ; idx=53, ofs=A3h, used=4 1471 0000009A 7700 <2> opl OP_16+OP_AX, OP_END ; idx=54, ofs=A6h, used=1 1472 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 1473 000000A1 53550F00 <2> opl OP_1632+OP_R_MOD, OP_1632+OP_R, OP_IMMS8, OP_END ; idx=56, ofs=ADh, used=1 1474 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 1475 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 1476 000000AE 471100 <2> opl OP_ALL+OP_AX, OP_IMM8, OP_END ; idx=59, ofs=BAh, used=2 1477 000000B1 472500 <2> opl OP_ALL+OP_AX, OP_DX, OP_END ; idx=60, ofs=BDh, used=2 1478 000000B4 212400 <2> opl OP_STACK_SPECIAL, OP_3, OP_END ; idx=61, ofs=C0h, used=1 1479 000000B7 160700 <2> opl OP_SHORT, OP_REL8, OP_END ; idx=62, ofs=C3h, used=42 1480 000000BA 1F1C5100 <2> opl OP_STACK_PUSH, OP_M_SRC, OP_1632+OP_RM, OP_END ; idx=63, ofs=C6h, used=1 1481 000000BE 1D7100 <2> opl OP_M_DST, OP_16+OP_RM, OP_END ; idx=64, ofs=CAh, used=1 1482 000000C1 1D510E00 <2> opl OP_M_DST, OP_1632+OP_RM, OP_SEGREG, OP_END ; idx=65, ofs=CDh, used=1 1483 000000C5 0E1C5100 <2> opl OP_SEGREG, OP_M_SRC, OP_1632+OP_RM, OP_END ; idx=66, ofs=D1h, used=1 1484 000000C9 471C4400 <2> opl OP_ALL+OP_AX, OP_M_SRC, OP_ALL+OP_MOFFS, OP_END ; idx=67, ofs=D5h, used=2 1485 000000CD 1D444700 <2> opl OP_M_DST, OP_ALL+OP_MOFFS, OP_ALL+OP_AX, OP_END ; idx=68, ofs=D9h, used=2 1486 000000D1 666000 <2> opl OP_8+OP_R_ADD, OP_8+OP_IMM, OP_END ; idx=69, ofs=DDh, used=8 1487 000000D4 565000 <2> opl OP_1632+OP_R_ADD, OP_1632+OP_IMM, OP_END ; idx=70, ofs=E0h, used=8 1488 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 1489 000000DC 5515 <2> opl OP_1632+OP_R, OP_SHOSIZ ; idx=72, ofs=E8h, used=2 1490 000000DE 1C7100 <2> opl OP_M_SRC, OP_16+OP_RM, OP_END ; idx=73, ofs=EAh, used=5 + 2 1491 000000E1 114700 <2> opl OP_IMM8, OP_ALL+OP_AX, OP_END ; idx=74, ofs=EDh, used=2 1492 000000E4 254700 <2> opl OP_DX, OP_ALL+OP_AX, OP_END ; idx=75, ofs=F0h, used=2 1493 000000E7 20 <2> opl OP_STACK_POP ; idx=76, ofs=F3h, used=1 1494 000000E8 1D5100 <2> opl OP_M_DST, OP_1632+OP_RM, OP_END ; idx=77, ofs=F4h, used=2 + 1 1495 000000EB 1F15A000 <2> opl OP_STACK_PUSH, OP_SHOSIZ, OP_1632_DEFAULT+OP_IMM, OP_END ; idx=78, ofs=F7h, used=2 1496 000000EF 1F150F00 <2> opl OP_STACK_PUSH, OP_SHOSIZ, OP_IMMS8, OP_END ; idx=79, ofs=FBh, used=2 1497 000000F3 1E412300 <2> opl OP_M_SRC_DST, OP_ALL+OP_RM, OP_1, OP_END ; idx=80, ofs=FFh, used=9 1498 000000F7 1E412600 <2> opl OP_M_SRC_DST, OP_ALL+OP_RM, OP_CL, OP_END ; idx=81, ofs=103h, used=9 1499 000000FB 1E411100 <2> opl OP_M_SRC_DST, OP_ALL+OP_RM, OP_IMM8, OP_END ; idx=82, ofs=107h, used=9 1500 000000FF 20 <2> opl OP_STACK_POP ; idx=83, ofs=10Bh, used=2 1501 00000100 7000 <2> opl OP_16+OP_IMM, OP_END ; idx=84, ofs=10Ch, used=1 + 2 1502 00000102 217000 <2> opl OP_STACK_SPECIAL, OP_16+OP_IMM, OP_END ; idx=85, ofs=10Eh, used=1 1503 00000105 1D6100 <2> opl OP_M_DST, OP_8+OP_RM, OP_END ; idx=86, ofs=111h, used=30 1504 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 1505 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 1506 00000112 575600 <2> opl OP_1632+OP_AX, OP_1632+OP_R_ADD, OP_END ; idx=89, ofs=11Eh, used=7 1507 00000115 565700 <2> opl OP_1632+OP_R_ADD, OP_1632+OP_AX, OP_END ; idx=90, ofs=121h, used=1 1508 00000118 1F <2> opl OP_STACK_PUSH ; idx=91, ofs=124h, used=1 1509 00000119 2A00 <2> opl OP_ES, OP_END ; idx=92, ofs=125h, used=1 + 1 1510 0000011B 1F <2> opl OP_STACK_PUSH ; idx=93, ofs=127h, used=1 1511 0000011C 2800 <2> opl OP_CS, OP_END ; idx=94, ofs=128h, used=1 + 1 1512 0000011E 1F <2> opl OP_STACK_PUSH ; idx=95, ofs=12Ah, used=1 1513 0000011F 2D00 <2> opl OP_SS, OP_END ; idx=96, ofs=12Bh, used=1 + 1 1514 00000121 1F <2> opl OP_STACK_PUSH ; idx=97, ofs=12Dh, used=1 1515 00000122 2900 <2> opl OP_DS, OP_END ; idx=98, ofs=12Eh, used=1 + 1 1516 00000124 1F <2> opl OP_STACK_PUSH ; idx=99, ofs=130h, used=1 1517 00000125 2B00 <2> opl OP_FS, OP_END ; idx=100, ofs=131h, used=1 + 1 1518 00000127 1F <2> opl OP_STACK_PUSH ; idx=101, ofs=133h, used=1 1519 00000128 2C00 <2> opl OP_GS, OP_END ; idx=102, ofs=134h, used=1 + 1 1520 0000012A 202A00 <2> opl OP_STACK_POP, OP_ES, OP_END ; idx=103, ofs=136h, used=1 1521 0000012D 202D00 <2> opl OP_STACK_POP, OP_SS, OP_END ; idx=104, ofs=139h, used=1 1522 00000130 202900 <2> opl OP_STACK_POP, OP_DS, OP_END ; idx=105, ofs=13Ch, used=1 1523 00000133 202B00 <2> opl OP_STACK_POP, OP_FS, OP_END ; idx=106, ofs=13Fh, used=1 1524 00000136 202C00 <2> opl OP_STACK_POP, OP_GS, OP_END ; idx=107, ofs=142h, used=1 1525 00000139 830B00 <2> opl OP_32+OP_R_MOD, OP_CR, OP_END ; idx=108, ofs=145h, used=1 1526 0000013C 0B8300 <2> opl OP_CR, OP_32+OP_R_MOD, OP_END ; idx=109, ofs=148h, used=1 1527 0000013F 830C00 <2> opl OP_32+OP_R_MOD, OP_DR, OP_END ; idx=110, ofs=14Bh, used=1 1528 00000142 0C8300 <2> opl OP_DR, OP_32+OP_R_MOD, OP_END ; idx=111, ofs=14Eh, used=1 1529 00000145 830D00 <2> opl OP_32+OP_R_MOD, OP_TR, OP_END ; idx=112, ofs=151h, used=1 1530 00000148 0D8300 <2> opl OP_TR, OP_32+OP_R_MOD, OP_END ; idx=113, ofs=154h, used=1 1531 0000014B 131C8100 <2> opl OP_MMX, OP_M_SRC, OP_32+OP_RM, OP_END ; idx=114, ofs=157h, used=1 1532 0000014F 1D811300 <2> opl OP_M_DST, OP_32+OP_RM, OP_MMX, OP_END ; idx=115, ofs=15Bh, used=1 1533 00000153 131C9100 <2> opl OP_MMX, OP_M_SRC, OP_64+OP_RM, OP_END ; idx=116, ofs=15Fh, used=45 1534 00000157 1D911300 <2> opl OP_M_DST, OP_64+OP_RM, OP_MMX, OP_END ; idx=117, ofs=163h, used=1 1535 0000015B 141100 <2> opl OP_MMX_MOD, OP_IMM8, OP_END ; idx=118, ofs=167h, used=8 1536 0000015E 550500 <2> opl OP_1632+OP_R, OP_MXX, OP_END ; idx=119, ofs=16Ah, used=1 1537 00000161 1F <2> opl OP_STACK_PUSH ; idx=120, ofs=16Dh, used=1 1538 00000162 171CA100 <2> opl OP_NEAR, OP_M_SRC, OP_1632_DEFAULT+OP_RM, OP_END ; idx=121, ofs=16Eh, used=1 + 1 1539 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 1540 0000016B 211200 <2> opl OP_STACK_SPECIAL, OP_IMM8_INT, OP_END ; idx=123, ofs=177h, used=1 1541 0000016E 16072200 <2> opl OP_SHORT, OP_REL8, OP_E_CX, OP_END ; idx=124, ofs=17Ah, used=5 1542 00000172 2000 <2> opl OP_STACK_POP, OP_END ; idx=125, ofs=17Eh, used=3 1543 00000174 1F00 <2> opl OP_STACK_PUSH, OP_END ; idx=126, ofs=180h, used=1 1544 00000176 2100 <2> opl OP_STACK_SPECIAL, OP_END ; idx=127, ofs=182h, used=11 1545 <2> 1546 <2> ASMMOD EQU opidx 1547 <2> 1548 <2> ;--- Assembler: data on groups. 1549 <2> ;--- If > 100h, it's a "0F-prefix" group. 1550 <2> 1551 <2> align 2, db 0 1552 <2> agroups label word 1553 00000178 FE00 <2> dw 0FEh ; 0 1554 0000017A 8300 <2> dw 083h ; 1 1555 0000017C 8000 <2> dw 080h ; 2 1556 0000017E BA01 <2> dw 1BAh ; 3 1557 00000180 FF00 <2> dw 0FFh ; 4 1558 00000182 C701 <2> dw 1C7h ; 5 1559 00000184 F600 <2> dw 0F6h ; 6 1560 00000186 0101 <2> dw 101h ; 7 1561 00000188 0001 <2> dw 100h ; 8 1562 0000018A C600 <2> dw 0C6h ; 9 1563 0000018C 7101 <2> dw 171h ; 10 1564 0000018E 7201 <2> dw 172h ; 11 1565 00000190 7301 <2> dw 173h ; 12 1566 00000192 8F00 <2> dw 08Fh ; 13 1567 00000194 D000 <2> dw 0D0h ; 14 1568 00000196 D200 <2> dw 0D2h ; 15 1569 00000198 C000 <2> dw 0C0h ; 16 1570 <2> 1571 <2> ;--- List of assembler mnemonics and data. 1572 <2> ;--- variant's 1. argument (=a): 1573 <2> ;--- if a < 0x100: one byte opcode. 1574 <2> ;--- if a >= 0x100 && a < 0x200: two byte "0F"-opcode. 1575 <2> ;--- if a >= 0x200 && a < 0x240: fp instruction. 1576 <2> ;--- if a >= 0x240: refers to agroups [macro AGRP() is used]. 1577 <2> ;--- variant's 2. argument is index into array opindex. 1578 <2> 1579 <2> mnlist label near 1580 <2> mnsuffix 1581 <2> 1582 <2> mne A32, ASM_SPECIAL ; ofs=0h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 00000000 FF <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 0000019A 0300 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 0000019C 413332 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1583 <2> mne A16, ASM_SPECIAL ; ofs=2h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 00000001 FF <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 0000019F 1300 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000001A1 413136 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1584 <2> mne O32, ASM_SPECIAL ; ofs=4h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 00000002 FF <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000001A4 2300 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000001A6 4F3332 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1585 <2> mne O16, ASM_SPECIAL ; ofs=6h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 00000003 FF <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000001A9 3300 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000001AB 4F3136 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1586 <2> mne BOXCB ; ofs=8h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000001AE 4500 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000001B0 424F584342 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1587 00000004 F42FD4 <2> variant AGRP(0,7), 84 1588 00000007 FF <2> endvariant 1589 <2> mne AAA ; ofs=Ch 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000001B5 8300 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000001B7 414141 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1590 00000008 1B80 <2> variant 037h, 0 1591 0000000A FF <2> endvariant 1592 <2> mne AAD, ASM_SPECIAL ; ofs=Fh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 0000000B FF <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000001BA B300 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000001BC 414144 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1593 0000000C 6A95 <2> variant 0D5h, 21 1594 0000000E FF <2> endvariant 1595 <2> mne AAM, ASM_SPECIAL ; ofs=13h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 0000000F FF <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000001BF F300 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000001C1 41414D <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1596 00000010 6A15 <2> variant 0D4h, 21 1597 00000012 FF <2> endvariant 1598 <2> mne AAS ; ofs=17h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000001C4 3301 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000001C6 414153 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1599 00000013 1F80 <2> variant 03Fh, 0 1600 00000015 FF <2> endvariant 1601 <2> mne ADC ; ofs=1Ah 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000001C9 6301 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000001CB 414443 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1602 00000016 FBF43105 <2> variant AGRP(1,2), 5, ASM_LOCKABLE 1603 0000001A 0A01 <2> variant 014h, 1 1604 0000001C FBF43502 <2> variant AGRP(2,2), 2, ASM_LOCKABLE 1605 00000020 FB0807 <2> variant 010h, 7, ASM_LOCKABLE 1606 00000023 090A <2> variant 012h, 10 1607 00000025 FF <2> endvariant 1608 <2> mne ADD ; ofs=2Ah 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000001CE 6302 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000001D0 414444 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1609 00000026 FBF43005 <2> variant AGRP(1,0), 5, ASM_LOCKABLE 1610 0000002A 0201 <2> variant 004h, 1 1611 0000002C FBF43402 <2> variant AGRP(2,0), 2, ASM_LOCKABLE 1612 00000030 FB0007 <2> variant 000h, 7, ASM_LOCKABLE 1613 00000033 010A <2> variant 002h, 10 1614 00000035 FF <2> endvariant 1615 <2> mne AND ; ofs=3Ah 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000001D3 6303 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000001D5 414E44 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1616 00000036 FBF43205 <2> variant AGRP(1,4), 5, ASM_LOCKABLE 1617 0000003A 1201 <2> variant 024h, 1 1618 0000003C FBF43602 <2> variant AGRP(2,4), 2, ASM_LOCKABLE 1619 00000040 FB1007 <2> variant 020h, 7, ASM_LOCKABLE 1620 00000043 110A <2> variant 022h, 10 1621 00000045 FF <2> endvariant 1622 <2> mne ARPL ; ofs=4Ah 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000001D8 6404 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000001DA 4152504C <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1623 00000046 F6318E <2> variant 063h, 14, ASM_MACH2 1624 00000049 FF <2> endvariant 1625 <2> mne BOUND ; ofs=4Eh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000001DE A504 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000001E0 424F554E44 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1626 0000004A F5317A <2> variant 062h, 122, ASM_MACH1 1627 0000004D FF <2> endvariant 1628 <2> mne BSF ; ofs=52h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000001E5 E304 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000001E7 425346 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1629 0000004E F7DE10 <2> variant 1BCh, 16, ASM_MACH3 1630 00000051 FF <2> endvariant 1631 <2> mne BSR ; ofs=56h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000001EA 2305 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000001EC 425352 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1632 00000052 F7DE90 <2> variant 1BDh, 16, ASM_MACH3 1633 00000055 FF <2> endvariant 1634 <2> mne BSWAP, ASM_D32 ; ofs=5Ah 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 00000056 FD <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000001EF 6505 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000001F1 4253574150 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1635 00000057 F8E411 <2> variant 1C8h, 17, ASM_MACH4 1636 0000005A FF <2> endvariant 1637 <2> mne BT ; ofs=5Fh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000001F6 B205 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000001F8 4254 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1638 0000005B F7D193 <2> variant 1A3h, 19, ASM_MACH3 1639 0000005E F7F43A16 <2> variant AGRP(3,4), 22, ASM_MACH3 1640 00000062 FF <2> endvariant 1641 <2> mne BTC ; ofs=67h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000001FA 3306 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000001FC 425443 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1642 00000063 FBF7DD92 <2> variant 1BBh, 18, ASM_LOCKABLE, ASM_MACH3 1643 00000067 FBF7F43B94 <2> variant AGRP(3,7), 20, ASM_LOCKABLE, ASM_MACH3 1644 0000006C FF <2> endvariant 1645 <2> mne BTR ; ofs=71h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000001FF D306 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000201 425452 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1646 0000006D FBF7D992 <2> variant 1B3h, 18, ASM_LOCKABLE, ASM_MACH3 1647 00000071 FBF7F43B14 <2> variant AGRP(3,6), 20, ASM_LOCKABLE, ASM_MACH3 1648 00000076 FF <2> endvariant 1649 <2> mne BTS ; ofs=7Bh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000204 7307 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000206 425453 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1650 00000077 FBF7D592 <2> variant 1ABh, 18, ASM_LOCKABLE, ASM_MACH3 1651 0000007B FBF7F43A94 <2> variant AGRP(3,5), 20, ASM_LOCKABLE, ASM_MACH3 1652 00000080 FF <2> endvariant 1653 <2> mne CALL ; ofs=85h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000209 1408 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 0000020B 43414C4C <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1654 00000081 7417 <2> variant 0E8h, 23 1655 00000083 F43D78 <2> variant AGRP(4,2), 120 1656 00000086 F43D9B <2> variant AGRP(4,3), 27 1657 00000089 4D19 <2> variant 09Ah, 25 1658 0000008B FF <2> endvariant 1659 <2> mne CBW, ASM_D16 ; ofs=90h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 0000008C FC <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 0000020F C308 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000211 434257 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1660 <2> mne CWDE, ASM_D32 ; ofs=91h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 0000008D FD <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000214 D408 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000216 43574445 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1661 0000008E 4C00 <2> variant 098h, 0 1662 00000090 FF <2> endvariant 1663 <2> mne CLC ; ofs=95h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 0000021A 1309 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 0000021C 434C43 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1664 00000091 7C00 <2> variant 0F8h, 0 1665 00000093 FF <2> endvariant 1666 <2> mne CLD ; ofs=98h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 0000021F 4309 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000221 434C44 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1667 00000094 7E00 <2> variant 0FCh, 0 1668 00000096 FF <2> endvariant 1669 <2> mne CLI ; ofs=9Bh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000224 7309 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000226 434C49 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1670 00000097 7D00 <2> variant 0FAh, 0 1671 00000099 FF <2> endvariant 1672 <2> mne CLTS ; ofs=9Eh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000229 A409 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 0000022B 434C5453 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1673 0000009A F68300 <2> variant 106h, 0, ASM_MACH2 1674 0000009D FF <2> endvariant 1675 <2> mne CMC ; ofs=A2h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 0000022F E309 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000231 434D43 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1676 0000009E 7A80 <2> variant 0F5h, 0 1677 000000A0 FF <2> endvariant 1678 <2> mne CMOVA ; ofs=A5h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000234 150A <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000236 434D4F5641 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1679 000000A1 FAA390 <2> variant 147h, 16, ASM_MACH6 1680 000000A4 FF <2> endvariant 1681 <2> mne CMOVAE ; ofs=A9h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 0000023B 560A <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 0000023D 434D4F564145 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1682 000000A5 FAA190 <2> variant 143h, 16, ASM_MACH6 1683 000000A8 FF <2> endvariant 1684 <2> mne CMOVB ; ofs=ADh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000243 950A <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000245 434D4F5642 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1685 000000A9 FAA110 <2> variant 142h, 16, ASM_MACH6 1686 000000AC FF <2> endvariant 1687 <2> mne CMOVBE ; ofs=B1h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 0000024A D60A <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 0000024C 434D4F564245 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1688 000000AD FAA310 <2> variant 146h, 16, ASM_MACH6 1689 000000B0 FF <2> endvariant 1690 <2> mne CMOVC ; ofs=B5h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000252 150B <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000254 434D4F5643 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1691 000000B1 FAA110 <2> variant 142h, 16, ASM_MACH6 1692 000000B4 FF <2> endvariant 1693 <2> mne CMOVE ; ofs=B9h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000259 550B <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 0000025B 434D4F5645 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1694 000000B5 FAA210 <2> variant 144h, 16, ASM_MACH6 1695 000000B8 FF <2> endvariant 1696 <2> mne CMOVG ; ofs=BDh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000260 950B <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000262 434D4F5647 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1697 000000B9 FAA790 <2> variant 14Fh, 16, ASM_MACH6 1698 000000BC FF <2> endvariant 1699 <2> mne CMOVGE ; ofs=C1h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000267 D60B <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000269 434D4F564745 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1700 000000BD FAA690 <2> variant 14Dh, 16, ASM_MACH6 1701 000000C0 FF <2> endvariant 1702 <2> mne CMOVL ; ofs=C5h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 0000026F 150C <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000271 434D4F564C <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1703 000000C1 FAA610 <2> variant 14Ch, 16, ASM_MACH6 1704 000000C4 FF <2> endvariant 1705 <2> mne CMOVLE ; ofs=C9h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000276 560C <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000278 434D4F564C45 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1706 000000C5 FAA710 <2> variant 14Eh, 16, ASM_MACH6 1707 000000C8 FF <2> endvariant 1708 <2> mne CMOVNA ; ofs=CDh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 0000027E 960C <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000280 434D4F564E41 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1709 000000C9 FAA310 <2> variant 146h, 16, ASM_MACH6 1710 000000CC FF <2> endvariant 1711 <2> mne CMOVNAE ; ofs=D1h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000286 D70C <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000288 434D4F564E4145 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1712 000000CD FAA110 <2> variant 142h, 16, ASM_MACH6 1713 000000D0 FF <2> endvariant 1714 <2> mne CMOVNB ; ofs=D5h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 0000028F 160D <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000291 434D4F564E42 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1715 000000D1 FAA190 <2> variant 143h, 16, ASM_MACH6 1716 000000D4 FF <2> endvariant 1717 <2> mne CMOVNBE ; ofs=D9h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000297 570D <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000299 434D4F564E4245 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1718 000000D5 FAA390 <2> variant 147h, 16, ASM_MACH6 1719 000000D8 FF <2> endvariant 1720 <2> mne CMOVNC ; ofs=DDh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000002A0 960D <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000002A2 434D4F564E43 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1721 000000D9 FAA190 <2> variant 143h, 16, ASM_MACH6 1722 000000DC FF <2> endvariant 1723 <2> mne CMOVNE ; ofs=E1h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000002A8 D60D <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000002AA 434D4F564E45 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1724 000000DD FAA290 <2> variant 145h, 16, ASM_MACH6 1725 000000E0 FF <2> endvariant 1726 <2> mne CMOVNG ; ofs=E5h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000002B0 160E <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000002B2 434D4F564E47 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1727 000000E1 FAA710 <2> variant 14Eh, 16, ASM_MACH6 1728 000000E4 FF <2> endvariant 1729 <2> mne CMOVNGE ; ofs=E9h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000002B8 570E <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000002BA 434D4F564E4745 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1730 000000E5 FAA610 <2> variant 14Ch, 16, ASM_MACH6 1731 000000E8 FF <2> endvariant 1732 <2> mne CMOVNL ; ofs=EDh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000002C1 960E <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000002C3 434D4F564E4C <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1733 000000E9 FAA690 <2> variant 14Dh, 16, ASM_MACH6 1734 000000EC FF <2> endvariant 1735 <2> mne CMOVNLE ; ofs=F1h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000002C9 D70E <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000002CB 434D4F564E4C45 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1736 000000ED FAA790 <2> variant 14Fh, 16, ASM_MACH6 1737 000000F0 FF <2> endvariant 1738 <2> mne CMOVNO ; ofs=F5h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000002D2 160F <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000002D4 434D4F564E4F <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1739 000000F1 FAA090 <2> variant 141h, 16, ASM_MACH6 1740 000000F4 FF <2> endvariant 1741 <2> mne CMOVNP ; ofs=F9h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000002DA 560F <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000002DC 434D4F564E50 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1742 000000F5 FAA590 <2> variant 14Bh, 16, ASM_MACH6 1743 000000F8 FF <2> endvariant 1744 <2> mne CMOVNS ; ofs=FDh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000002E2 960F <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000002E4 434D4F564E53 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1745 000000F9 FAA490 <2> variant 149h, 16, ASM_MACH6 1746 000000FC FF <2> endvariant 1747 <2> mne CMOVNZ ; ofs=101h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000002EA D60F <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000002EC 434D4F564E5A <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1748 000000FD FAA290 <2> variant 145h, 16, ASM_MACH6 1749 00000100 FF <2> endvariant 1750 <2> mne CMOVO ; ofs=105h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000002F2 1510 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000002F4 434D4F564F <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1751 00000101 FAA010 <2> variant 140h, 16, ASM_MACH6 1752 00000104 FF <2> endvariant 1753 <2> mne CMOVP ; ofs=109h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000002F9 5510 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000002FB 434D4F5650 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1754 00000105 FAA510 <2> variant 14Ah, 16, ASM_MACH6 1755 00000108 FF <2> endvariant 1756 <2> mne CMOVPE ; ofs=10Dh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000300 9610 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000302 434D4F565045 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1757 00000109 FAA510 <2> variant 14Ah, 16, ASM_MACH6 1758 0000010C FF <2> endvariant 1759 <2> mne CMOVPO ; ofs=111h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000308 D610 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 0000030A 434D4F56504F <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1760 0000010D FAA590 <2> variant 14Bh, 16, ASM_MACH6 1761 00000110 FF <2> endvariant 1762 <2> mne CMOVS ; ofs=115h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000310 1511 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000312 434D4F5653 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1763 00000111 FAA410 <2> variant 148h, 16, ASM_MACH6 1764 00000114 FF <2> endvariant 1765 <2> mne CMOVZ ; ofs=119h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000317 5511 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000319 434D4F565A <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1766 00000115 FAA210 <2> variant 144h, 16, ASM_MACH6 1767 00000118 FF <2> endvariant 1768 <2> mne CMP ; ofs=11Dh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 0000031E 9311 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000320 434D50 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1769 00000119 F43386 <2> variant AGRP(1,7), 6 1770 0000011C 1E01 <2> variant 03Ch, 1 1771 0000011E F43783 <2> variant AGRP(2,7), 3 1772 00000121 1C08 <2> variant 038h, 8 1773 00000123 1D0A <2> variant 03Ah, 10 1774 00000125 FF <2> endvariant 1775 <2> mne CMPSB ; ofs=12Ah 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000323 6512 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000325 434D505342 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1776 00000126 5300 <2> variant 0A6h, 0 1777 00000128 FF <2> endvariant 1778 <2> mne CMPXCHG ; ofs=130h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 0000032A 9712 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 0000032C 434D5058434847 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1779 00000129 FBF8D807 <2> variant 1B0h, 7, ASM_LOCKABLE, ASM_MACH4 1780 0000012D FF <2> endvariant 1781 <2> mne CMPXCHG8B ; ofs=135h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000333 E912 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000335 434D50584348473842 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1782 0000012E F9F4409D <2> variant AGRP(5,1), 29, ASM_MACH5 1783 00000132 FF <2> endvariant 1784 <2> mne CPUID ; ofs=13Ah 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 0000033E 3513 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000340 4350554944 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1785 00000133 F9D100 <2> variant 1A2h, 0, ASM_MACH5 1786 00000136 FF <2> endvariant 1787 <2> mne CWD, ASM_D16 ; ofs=13Eh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 00000137 FC <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000345 7313 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000347 435744 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1788 <2> mne CDQ, ASM_D32 ; ofs=13Fh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 00000138 FD <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 0000034A 8313 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 0000034C 434451 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1789 00000139 4C80 <2> variant 099h, 0 1790 0000013B FF <2> endvariant 1791 <2> mne DAA ; ofs=143h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 0000034F C313 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000351 444141 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1792 0000013C 1380 <2> variant 027h, 0 1793 0000013E FF <2> endvariant 1794 <2> mne DAS ; ofs=146h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000354 F313 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000356 444153 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1795 0000013F 1780 <2> variant 02Fh, 0 1796 00000141 FF <2> endvariant 1797 <2> mne DB, ASM_SPECIAL ; ofs=149h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 00000142 FF <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000359 2214 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 0000035B 4442 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1798 <2> mne DD, ASM_SPECIAL ; ofs=14Bh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 00000143 FF <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 0000035D 3214 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 0000035F 4444 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1799 <2> mne DEC ; ofs=14Dh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000361 4314 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000363 444543 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1800 00000144 2421 <2> variant 048h, 33 1801 00000146 FBF42C8D <2> variant AGRP(0,1), 13, ASM_LOCKABLE 1802 0000014A FF <2> endvariant 1803 <2> mne DIV ; ofs=154h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000366 B314 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000368 444956 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1804 0000014B F4470B <2> variant AGRP(6,6), 11 1805 0000014E FF <2> endvariant 1806 <2> mne DW, ASM_SPECIAL ; ofs=158h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 0000014F FF <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 0000036B F214 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 0000036D 4457 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1807 <2> mne EMMS ; ofs=15Ah 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 0000036F 0415 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000371 454D4D53 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1808 00000150 F9BB80 <2> variant 177h, 0, ASM_MACH5 1809 00000153 FF <2> endvariant 1810 <2> mne F2XM1 ; ofs=162h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000375 4515 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000377 4632584D31 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1811 00000154 6C80F0 <2> fpvariant 0D9h, 0, 0F0h 1812 00000157 FF <2> endvariant 1813 <2> mne FABS ; ofs=166h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 0000037C 8415 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 0000037E 46414253 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1814 00000158 6C80E1 <2> fpvariant 0D9h, 0, 0E1h 1815 0000015B FF <2> endvariant 1816 <2> mne FADD ; ofs=16Ah 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000382 C415 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000384 46414444 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1817 0000015C F40C24 <2> variant 200h, 36 1818 0000015F F40E26 <2> variant 204h, 38 1819 00000162 6C28C0 <2> fpvariant 0D8h, 40, 0C0h 1820 00000165 6E2BC0 <2> fpvariant 0DCh, 43, 0C0h 1821 00000168 FF <2> endvariant 1822 <2> mne FADDP ; ofs=177h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000388 9516 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 0000038A 4641444450 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1823 00000169 6F2AC0 <2> fpvariant 0DEh, 42, 0C0h 1824 0000016C 6F00C1 <2> fpvariant 0DEh, 0, 0C1h 1825 0000016F FF <2> endvariant 1826 <2> mne FIADD ; ofs=17Eh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 0000038F 0517 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000391 4649414444 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1827 00000170 F40D2C <2> variant 202h, 44 1828 00000173 F40F2E <2> variant 206h, 46 1829 00000176 FF <2> endvariant 1830 <2> mne FBLD ; ofs=185h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000396 7417 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000398 46424C44 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1831 00000177 F41FB0 <2> variant 227h, 48 1832 0000017A FF <2> endvariant 1833 <2> mne FBSTP ; ofs=189h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 0000039C B517 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 0000039E 4642535450 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1834 0000017B F427B1 <2> variant 237h, 49 1835 0000017E FF <2> endvariant 1836 <2> mne FCHS ; ofs=18Dh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000003A3 F417 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000003A5 46434853 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1837 0000017F 6C80E0 <2> fpvariant 0D9h, 0, 0E0h 1838 00000182 FF <2> endvariant 1839 <2> mne FCLEX, ASM_WAIT ; ofs=191h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 00000183 FE <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000003A9 3518 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000003AB 46434C4558 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1840 <2> mne FNCLEX ; ofs=192h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000003B0 4618 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000003B2 464E434C4558 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1841 00000184 6D80E2 <2> fpvariant 0DBh, 0, 0E2h 1842 00000187 FF <2> endvariant 1843 <2> mne FCMOVA ; ofs=196h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000003B8 8618 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000003BA 46434D4F5641 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1844 00000188 FA6DA8D0 <2> fpvariant 0DBh, 40, 0D0h, ASM_MACH6 1845 0000018C FF <2> endvariant 1846 <2> mne FCMOVAE ; ofs=19Bh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000003C0 D718 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000003C2 46434D4F564145 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1847 0000018D FA6DA8C0 <2> fpvariant 0DBh, 40, 0C0h, ASM_MACH6 1848 00000191 FF <2> endvariant 1849 <2> mne FCMOVB ; ofs=1A0h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000003C9 2619 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000003CB 46434D4F5642 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1850 00000192 FA6D28C0 <2> fpvariant 0DAh, 40, 0C0h, ASM_MACH6 1851 00000196 FF <2> endvariant 1852 <2> mne FCMOVBE ; ofs=1A5h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000003D1 7719 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000003D3 46434D4F564245 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1853 00000197 FA6D28D0 <2> fpvariant 0DAh, 40, 0D0h, ASM_MACH6 1854 0000019B FF <2> endvariant 1855 <2> mne FCMOVE ; ofs=1AAh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000003DA C619 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000003DC 46434D4F5645 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1856 0000019C FA6D28C8 <2> fpvariant 0DAh, 40, 0C8h, ASM_MACH6 1857 000001A0 FF <2> endvariant 1858 <2> mne FCMOVNA ; ofs=1AFh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000003E2 171A <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000003E4 46434D4F564E41 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1859 000001A1 FA6D28D0 <2> fpvariant 0DAh, 40, 0D0h, ASM_MACH6 1860 000001A5 FF <2> endvariant 1861 <2> mne FCMOVNAE ; ofs=1B4h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000003EB 681A <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000003ED 46434D4F564E4145 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1862 000001A6 FA6D28C0 <2> fpvariant 0DAh, 40, 0C0h, ASM_MACH6 1863 000001AA FF <2> endvariant 1864 <2> mne FCMOVNB ; ofs=1B9h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000003F5 B71A <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000003F7 46434D4F564E42 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1865 000001AB FA6DA8C0 <2> fpvariant 0DBh, 40, 0C0h, ASM_MACH6 1866 000001AF FF <2> endvariant 1867 <2> mne FCMOVNBE ; ofs=1BEh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000003FE 081B <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000400 46434D4F564E4245 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1868 000001B0 FA6DA8D0 <2> fpvariant 0DBh, 40, 0D0h, ASM_MACH6 1869 000001B4 FF <2> endvariant 1870 <2> mne FCMOVNE ; ofs=1C3h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000408 571B <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 0000040A 46434D4F564E45 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1871 000001B5 FA6DA8C8 <2> fpvariant 0DBh, 40, 0C8h, ASM_MACH6 1872 000001B9 FF <2> endvariant 1873 <2> mne FCMOVNU ; ofs=1C8h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000411 A71B <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000413 46434D4F564E55 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1874 000001BA FA6DA8D8 <2> fpvariant 0DBh, 40, 0D8h, ASM_MACH6 1875 000001BE FF <2> endvariant 1876 <2> mne FCMOVNZ ; ofs=1CDh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 0000041A F71B <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 0000041C 46434D4F564E5A <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1877 000001BF FA6DA8C8 <2> fpvariant 0DBh, 40, 0C8h, ASM_MACH6 1878 000001C3 FF <2> endvariant 1879 <2> mne FCMOVU ; ofs=1D2h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000423 461C <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000425 46434D4F5655 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1880 000001C4 FA6D28D8 <2> fpvariant 0DAh, 40, 0D8h, ASM_MACH6 1881 000001C8 FF <2> endvariant 1882 <2> mne FCMOVZ ; ofs=1D7h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 0000042B 961C <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 0000042D 46434D4F565A <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1883 000001C9 FA6D28C8 <2> fpvariant 0DAh, 40, 0C8h, ASM_MACH6 1884 000001CD FF <2> endvariant 1885 <2> mne FCOM ; ofs=1DCh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000433 E41C <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000435 46434F4D <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1886 000001CE F41424 <2> variant 210h, 36 1887 000001D1 F41626 <2> variant 214h, 38 1888 000001D4 6C32D0 <2> fpvariant 0D8h, 50, 0D0h 1889 000001D7 6C00D1 <2> fpvariant 0D8h, 0, 0D1h 1890 000001DA FF <2> endvariant 1891 <2> mne FCOMI ; ofs=1E9h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000439 B51D <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 0000043B 46434F4D49 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1892 000001DB FA6DB2F0 <2> fpvariant 0DBh, 50, 0F0h, ASM_MACH6 1893 000001DF FA6D80F1 <2> fpvariant 0DBh, 0, 0F1h, ASM_MACH6 1894 000001E3 FF <2> endvariant 1895 <2> mne FCOMIP ; ofs=1F2h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000440 461E <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000442 46434F4D4950 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1896 000001E4 FA6FB2F0 <2> fpvariant 0DFh, 50, 0F0h, ASM_MACH6 1897 000001E8 FA6F80F1 <2> fpvariant 0DFh, 0, 0F1h, ASM_MACH6 1898 000001EC FF <2> endvariant 1899 <2> mne FCOMP ; ofs=1FBh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000448 D51E <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 0000044A 46434F4D50 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1900 000001ED F41824 <2> variant 218h, 36 1901 000001F0 F41A26 <2> variant 21Ch, 38 1902 000001F3 6C32D8 <2> fpvariant 0D8h, 50, 0D8h 1903 000001F6 6C00D9 <2> fpvariant 0D8h, 0, 0D9h 1904 000001F9 FF <2> endvariant 1905 <2> mne FCOMPP ; ofs=208h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 0000044F A61F <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000451 46434F4D5050 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1906 000001FA 6F00D9 <2> fpvariant 0DEh, 0, 0D9h 1907 000001FD FF <2> endvariant 1908 <2> mne FCOS ; ofs=20Ch 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000457 E41F <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000459 46434F53 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1909 000001FE F76C80FF <2> fpvariant 0D9h, 0, 0FFh, ASM_MACH3 1910 00000202 FF <2> endvariant 1911 <2> mne FDECSTP ; ofs=211h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 0000045D 3720 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 0000045F 46444543535450 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1912 00000203 6C80F6 <2> fpvariant 0D9h, 0, 0F6h 1913 00000206 FF <2> endvariant 1914 <2> mne FDISI, ASM_WAIT ; ofs=215h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 00000207 FE <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000466 7520 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000468 4644495349 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1915 <2> mne FNDISI ; ofs=216h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 0000046D 8620 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 0000046F 464E44495349 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1916 00000208 6D80E1 <2> fpvariant 0DBh, 0, 0E1h 1917 0000020B FF <2> endvariant 1918 <2> mne FDIV ; ofs=21Ah 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000475 C420 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000477 46444956 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1919 0000020C F42424 <2> variant 230h, 36 1920 0000020F F42626 <2> variant 234h, 38 1921 00000212 6C28F0 <2> fpvariant 0D8h, 40, 0F0h 1922 00000215 6E2BF8 <2> fpvariant 0DCh, 43, 0F8h 1923 00000218 FF <2> endvariant 1924 <2> mne FDIVP ; ofs=227h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 0000047B 9521 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 0000047D 4644495650 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1925 00000219 6F2AF8 <2> fpvariant 0DEh, 42, 0F8h 1926 0000021C 6F00F9 <2> fpvariant 0DEh, 0, 0F9h 1927 0000021F FF <2> endvariant 1928 <2> mne FIDIV ; ofs=22Eh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000482 0522 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000484 4649444956 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1929 00000220 F4252C <2> variant 232h, 44 1930 00000223 F4272E <2> variant 236h, 46 1931 00000226 FF <2> endvariant 1932 <2> mne FDIVR ; ofs=235h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000489 7522 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 0000048B 4644495652 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1933 00000227 F42824 <2> variant 238h, 36 1934 0000022A F42A26 <2> variant 23Ch, 38 1935 0000022D 6C28F8 <2> fpvariant 0D8h, 40, 0F8h 1936 00000230 6E2BF0 <2> fpvariant 0DCh, 43, 0F0h 1937 00000233 FF <2> endvariant 1938 <2> mne FDIVRP ; ofs=242h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000490 4623 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000492 464449565250 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1939 00000234 6F2AF0 <2> fpvariant 0DEh, 42, 0F0h 1940 00000237 6F00F1 <2> fpvariant 0DEh, 0, 0F1h 1941 0000023A FF <2> endvariant 1942 <2> mne FIDIVR ; ofs=249h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000498 B623 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 0000049A 464944495652 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1943 0000023B F4292C <2> variant 23Ah, 44 1944 0000023E F42B2E <2> variant 23Eh, 46 1945 00000241 FF <2> endvariant 1946 <2> mne FENI, ASM_WAIT ; ofs=250h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 00000242 FE <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000004A0 2424 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000004A2 46454E49 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1947 <2> mne FNENI ; ofs=251h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000004A6 3524 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000004A8 464E454E49 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1948 00000243 6D80E0 <2> fpvariant 0DBh, 0, 0E0h 1949 00000246 FF <2> endvariant 1950 <2> mne FFREE ; ofs=255h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000004AD 7524 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000004AF 4646524545 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1951 00000247 6EA9C0 <2> fpvariant 0DDh, 41, 0C0h 1952 0000024A FF <2> endvariant 1953 <2> mne FICOM ; ofs=259h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000004B4 B524 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000004B6 4649434F4D <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1954 0000024B F4152C <2> variant 212h, 44 1955 0000024E F4172E <2> variant 216h, 46 1956 00000251 FF <2> endvariant 1957 <2> mne FICOMP ; ofs=260h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000004BB 2625 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000004BD 4649434F4D50 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1958 00000252 F4192C <2> variant 21Ah, 44 1959 00000255 F41B2E <2> variant 21Eh, 46 1960 00000258 FF <2> endvariant 1961 <2> mne FILD ; ofs=267h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000004C3 9425 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000004C5 46494C44 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1962 00000259 F40DAC <2> variant 203h, 44 1963 0000025C F40FAE <2> variant 207h, 46 1964 0000025F F4239E <2> variant 22Fh, 30 1965 00000262 FF <2> endvariant 1966 <2> mne FINCSTP ; ofs=271h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000004C9 3726 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000004CB 46494E43535450 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1967 00000263 6C80F7 <2> fpvariant 0D9h, 0, 0F7h 1968 00000266 FF <2> endvariant 1969 <2> mne FINIT, ASM_WAIT ; ofs=275h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 00000267 FE <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000004D2 7526 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000004D4 46494E4954 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1970 <2> mne FNINIT ; ofs=276h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000004D9 8626 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000004DB 464E494E4954 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1971 00000268 6D80E3 <2> fpvariant 0DBh, 0, 0E3h 1972 0000026B FF <2> endvariant 1973 <2> mne FIST ; ofs=27Ah 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000004E1 C426 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000004E3 46495354 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1974 0000026C F415AD <2> variant 213h, 45 1975 0000026F F417AF <2> variant 217h, 47 1976 00000272 FF <2> endvariant 1977 <2> mne FISTP ; ofs=281h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000004E7 3527 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000004E9 4649535450 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1978 00000273 F419AD <2> variant 21Bh, 45 1979 00000276 F41BAF <2> variant 21Fh, 47 1980 00000279 F42B9F <2> variant 23Fh, 31 1981 0000027C FF <2> endvariant 1982 <2> mne FLD ; ofs=28Bh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000004EE D327 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000004F0 464C44 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1983 0000027D F40CA4 <2> variant 201h, 36 1984 00000280 F40EA6 <2> variant 205h, 38 1985 00000283 F421B0 <2> variant 22Bh, 48 1986 00000286 6CA9C0 <2> fpvariant 0D9h, 41, 0C0h 1987 00000289 FF <2> endvariant 1988 <2> mne FLD1 ; ofs=298h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000004F3 A428 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000004F5 464C4431 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1989 0000028A 6C80E8 <2> fpvariant 0D9h, 0, 0E8h 1990 0000028D FF <2> endvariant 1991 <2> mne FLDL2T ; ofs=29Ch 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000004F9 E628 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000004FB 464C444C3254 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1992 0000028E 6C80E9 <2> fpvariant 0D9h, 0, 0E9h 1993 00000291 FF <2> endvariant 1994 <2> mne FLDL2E ; ofs=2A0h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000501 2629 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000503 464C444C3245 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1995 00000292 6C80EA <2> fpvariant 0D9h, 0, 0EAh 1996 00000295 FF <2> endvariant 1997 <2> mne FLDPI ; ofs=2A4h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000509 6529 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 0000050B 464C445049 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 1998 00000296 6C80EB <2> fpvariant 0D9h, 0, 0EBh 1999 00000299 FF <2> endvariant 2000 <2> mne FLDLG2 ; ofs=2A8h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000510 A629 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000512 464C444C4732 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2001 0000029A 6C80EC <2> fpvariant 0D9h, 0, 0ECh 2002 0000029D FF <2> endvariant 2003 <2> mne FLDLN2 ; ofs=2ACh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000518 E629 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 0000051A 464C444C4E32 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2004 0000029E 6C80ED <2> fpvariant 0D9h, 0, 0EDh 2005 000002A1 FF <2> endvariant 2006 <2> mne FLDZ ; ofs=2B0h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000520 242A <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000522 464C445A <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2007 000002A2 6C80EE <2> fpvariant 0D9h, 0, 0EEh 2008 000002A5 FF <2> endvariant 2009 <2> mne FLDCW, ASM_WAIT ; ofs=2B4h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 000002A6 FE <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000526 652A <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000528 464C444357 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2010 <2> mne FNLDCW ; ofs=2B5h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 0000052D 762A <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 0000052F 464E4C444357 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2011 000002A7 F420AE <2> variant 229h, 46 2012 000002AA FF <2> endvariant 2013 <2> mne FMUL ; ofs=2BDh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000535 B42A <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000537 464D554C <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2014 000002AB F41024 <2> variant 208h, 36 2015 000002AE F41226 <2> variant 20Ch, 38 2016 000002B1 6C28C8 <2> fpvariant 0D8h, 40, 0C8h 2017 000002B4 6E2BC8 <2> fpvariant 0DCh, 43, 0C8h 2018 000002B7 FF <2> endvariant 2019 <2> mne FMULP ; ofs=2CAh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 0000053B 852B <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 0000053D 464D554C50 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2020 000002B8 6F2AC8 <2> fpvariant 0DEh, 42, 0C8h 2021 000002BB 6F00C9 <2> fpvariant 0DEh, 0, 0C9h 2022 000002BE FF <2> endvariant 2023 <2> mne FIMUL ; ofs=2D1h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000542 F52B <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000544 46494D554C <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2024 000002BF F4112C <2> variant 20Ah, 44 2025 000002C2 F4132E <2> variant 20Eh, 46 2026 000002C5 FF <2> endvariant 2027 <2> mne FNOP ; ofs=2D8h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000549 642C <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 0000054B 464E4F50 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2028 000002C6 6C80D0 <2> fpvariant 0D9h, 0, 0D0h 2029 000002C9 FF <2> endvariant 2030 <2> mne FPATAN ; ofs=2DCh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 0000054F A62C <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000551 46504154414E <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2031 000002CA 6C80F3 <2> fpvariant 0D9h, 0, 0F3h 2032 000002CD FF <2> endvariant 2033 <2> mne FPREM ; ofs=2E0h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000557 E52C <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000559 465052454D <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2034 000002CE 6C80F8 <2> fpvariant 0D9h, 0, 0F8h 2035 000002D1 FF <2> endvariant 2036 <2> mne FPREM1 ; ofs=2E4h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 0000055E 262D <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000560 465052454D31 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2037 000002D2 F76C80F5 <2> fpvariant 0D9h, 0, 0F5h, ASM_MACH3 2038 000002D6 FF <2> endvariant 2039 <2> mne FPTAN ; ofs=2E9h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000566 752D <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000568 465054414E <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2040 000002D7 6C80F2 <2> fpvariant 0D9h, 0, 0F2h 2041 000002DA FF <2> endvariant 2042 <2> mne FRNDINT ; ofs=2EDh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 0000056D B72D <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 0000056F 46524E44494E54 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2043 000002DB 6C80FC <2> fpvariant 0D9h, 0, 0FCh 2044 000002DE FF <2> endvariant 2045 <2> mne FSCALE ; ofs=2FAh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000576 F62D <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000578 465343414C45 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2046 000002DF 6C80FD <2> fpvariant 0D9h, 0, 0FDh 2047 000002E2 FF <2> endvariant 2048 <2> mne FSETPM, ASM_WAIT ; ofs=2FEh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 000002E3 FE <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 0000057E 362E <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000580 46534554504D <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2049 <2> mne FNSETPM ; ofs=2FFh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000586 472E <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000588 464E534554504D <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2050 000002E4 F66D80E4 <2> fpvariant 0DBh, 0, 0E4h, ASM_MACH2 2051 000002E8 FF <2> endvariant 2052 <2> mne FSIN ; ofs=304h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 0000058F 942E <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000591 4653494E <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2053 000002E9 F76C80FE <2> fpvariant 0D9h, 0, 0FEh, ASM_MACH3 2054 000002ED FF <2> endvariant 2055 <2> mne FSINCOS ; ofs=309h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000595 E72E <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000597 4653494E434F53 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2056 000002EE F76C80FB <2> fpvariant 0D9h, 0, 0FBh, ASM_MACH3 2057 000002F2 FF <2> endvariant 2058 <2> mne FSQRT ; ofs=30Eh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 0000059E 352F <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000005A0 4653515254 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2059 000002F3 6C80FA <2> fpvariant 0D9h, 0, 0FAh 2060 000002F6 FF <2> endvariant 2061 <2> mne FST ; ofs=312h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000005A5 732F <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000005A7 465354 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2062 000002F7 F414A5 <2> variant 211h, 37 2063 000002FA F416A7 <2> variant 215h, 39 2064 000002FD 6EA9D0 <2> fpvariant 0DDh, 41, 0D0h 2065 00000300 FF <2> endvariant 2066 <2> mne FSTP ; ofs=31Ch 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000005AA 1430 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000005AC 46535450 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2067 00000301 F418A5 <2> variant 219h, 37 2068 00000304 F41AA7 <2> variant 21Dh, 39 2069 00000307 F429B1 <2> variant 23Bh, 49 2070 0000030A 6EA9D8 <2> fpvariant 0DDh, 41, 0D8h 2071 0000030D FF <2> endvariant 2072 <2> mne FSTCW, ASM_WAIT ; ofs=329h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 0000030E FE <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000005B0 E530 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000005B2 4653544357 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2073 <2> mne FNSTCW ; ofs=32Ah 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000005B7 F630 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000005B9 464E53544357 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2074 0000030F F428AF <2> variant 239h, 47 2075 00000312 FF <2> endvariant 2076 <2> mne FSTSW, ASM_WAIT ; ofs=333h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 00000313 FE <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000005BF 3531 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000005C1 4653545357 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2077 <2> mne FNSTSW ; ofs=334h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000005C6 4631 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000005C8 464E53545357 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2078 00000314 6FB6E0 <2> fpvariant 0DFh, 54, 0E0h 2079 00000317 F42AAF <2> variant 23Dh, 47 2080 0000031A FF <2> endvariant 2081 <2> mne FSUB ; ofs=33Bh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000005CE B431 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000005D0 46535542 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2082 0000031B F41C24 <2> variant 220h, 36 2083 0000031E F41E26 <2> variant 224h, 38 2084 00000321 6C28E0 <2> fpvariant 0D8h, 40, 0E0h 2085 00000324 6E2BE8 <2> fpvariant 0DCh, 43, 0E8h 2086 00000327 FF <2> endvariant 2087 <2> mne FSUBP ; ofs=348h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000005D4 8532 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000005D6 4653554250 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2088 00000328 6F2AE8 <2> fpvariant 0DEh, 42, 0E8h 2089 0000032B 6F00E9 <2> fpvariant 0DEh, 0, 0E9h 2090 0000032E FF <2> endvariant 2091 <2> mne FISUB ; ofs=34Fh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000005DB F532 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000005DD 4649535542 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2092 0000032F F41D2C <2> variant 222h, 44 2093 00000332 F41F2E <2> variant 226h, 46 2094 00000335 FF <2> endvariant 2095 <2> mne FSUBR ; ofs=356h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000005E2 6533 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000005E4 4653554252 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2096 00000336 F42024 <2> variant 228h, 36 2097 00000339 F42226 <2> variant 22Ch, 38 2098 0000033C 6C28E8 <2> fpvariant 0D8h, 40, 0E8h 2099 0000033F 6E2BE0 <2> fpvariant 0DCh, 43, 0E0h 2100 00000342 FF <2> endvariant 2101 <2> mne FSUBRP ; ofs=363h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000005E9 3634 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000005EB 465355425250 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2102 00000343 6F2AE0 <2> fpvariant 0DEh, 42, 0E0h 2103 00000346 6F00E1 <2> fpvariant 0DEh, 0, 0E1h 2104 00000349 FF <2> endvariant 2105 <2> mne FISUBR ; ofs=36Ah 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000005F1 A634 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000005F3 464953554252 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2106 0000034A F4212C <2> variant 22Ah, 44 2107 0000034D F4232E <2> variant 22Eh, 46 2108 00000350 FF <2> endvariant 2109 <2> mne FTST ; ofs=371h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000005F9 1435 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000005FB 46545354 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2110 00000351 6C80E4 <2> fpvariant 0D9h, 0, 0E4h 2111 00000354 FF <2> endvariant 2112 <2> mne FUCOM ; ofs=375h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000005FF 5535 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000601 4655434F4D <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2113 00000355 F76EB2E0 <2> fpvariant 0DDh, 50, 0E0h, ASM_MACH3 2114 00000359 F76E80E1 <2> fpvariant 0DDh, 0, 0E1h, ASM_MACH3 2115 0000035D FF <2> endvariant 2116 <2> mne FUCOMI ; ofs=37Eh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000606 E635 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000608 4655434F4D49 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2117 0000035E FA6DB2E8 <2> fpvariant 0DBh, 50, 0E8h, ASM_MACH6 2118 00000362 FA6D80E9 <2> fpvariant 0DBh, 0, 0E9h, ASM_MACH6 2119 00000366 FF <2> endvariant 2120 <2> mne FUCOMIP ; ofs=387h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 0000060E 7736 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000610 4655434F4D4950 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2121 00000367 FA6FB2E8 <2> fpvariant 0DFh, 50, 0E8h, ASM_MACH6 2122 0000036B FA6F80E9 <2> fpvariant 0DFh, 0, 0E9h, ASM_MACH6 2123 0000036F FF <2> endvariant 2124 <2> mne FUCOMP ; ofs=390h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000617 0637 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000619 4655434F4D50 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2125 00000370 F76EB2E8 <2> fpvariant 0DDh, 50, 0E8h, ASM_MACH3 2126 00000374 F76E80E9 <2> fpvariant 0DDh, 0, 0E9h, ASM_MACH3 2127 00000378 FF <2> endvariant 2128 <2> mne FUCOMPP ; ofs=399h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 0000061F 9737 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000621 4655434F4D5050 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2129 00000379 F76D00E9 <2> fpvariant 0DAh, 0, 0E9h, ASM_MACH3 2130 0000037D FF <2> endvariant 2131 <2> mne FWAIT ; ofs=39Eh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000628 E537 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 0000062A 4657414954 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2132 0000037E 4D80 <2> variant 09Bh, 0 2133 00000380 FF <2> endvariant 2134 <2> mne FXAM ; ofs=3A1h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 0000062F 1438 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000631 4658414D <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2135 00000381 6C80E5 <2> fpvariant 0D9h, 0, 0E5h 2136 00000384 FF <2> endvariant 2137 <2> mne FXCH ; ofs=3A5h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000635 5438 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000637 46584348 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2138 00000385 6CB2C8 <2> fpvariant 0D9h, 50, 0C8h 2139 00000388 6C80C9 <2> fpvariant 0D9h, 0, 0C9h 2140 0000038B FF <2> endvariant 2141 <2> mne FXTRACT ; ofs=3ACh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 0000063B C738 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 0000063D 46585452414354 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2142 0000038C 6C80F4 <2> fpvariant 0D9h, 0, 0F4h 2143 0000038F FF <2> endvariant 2144 <2> mne FYL2X ; ofs=3B0h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000644 0539 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000646 46594C3258 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2145 00000390 6C80F1 <2> fpvariant 0D9h, 0, 0F1h 2146 00000393 FF <2> endvariant 2147 <2> mne FYL2XP1 ; ofs=3B4h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 0000064B 4739 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 0000064D 46594C32585031 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2148 00000394 6C80F9 <2> fpvariant 0D9h, 0, 0F9h 2149 00000397 FF <2> endvariant 2150 <2> mne HLT ; ofs=3B8h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000654 8339 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000656 484C54 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2151 00000398 7A00 <2> variant 0F4h, 0 2152 0000039A FF <2> endvariant 2153 <2> mne IDIV ; ofs=3BBh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000659 B439 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 0000065B 49444956 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2154 0000039B F4478B <2> variant AGRP(6,7), 11 2155 0000039E FF <2> endvariant 2156 <2> mne IMUL ; ofs=3BFh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 0000065F F439 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000661 494D554C <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2157 0000039F F4468B <2> variant AGRP(6,5), 11 2158 000003A2 F7D790 <2> variant 1AFh, 16, ASM_MACH3 2159 000003A5 F535B7 <2> variant 06Bh, 55, ASM_MACH1 2160 000003A8 F535B8 <2> variant 06Bh, 56, ASM_MACH1 2161 000003AB F534B9 <2> variant 069h, 57, ASM_MACH1 2162 000003AE F534BA <2> variant 069h, 58, ASM_MACH1 2163 000003B1 FF <2> endvariant 2164 <2> mne IN ; ofs=3D2h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000665 223B <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000667 494E <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2165 000003B2 723B <2> variant 0E4h, 59 2166 000003B4 763C <2> variant 0ECh, 60 2167 000003B6 FF <2> endvariant 2168 <2> mne INC ; ofs=3D7h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000669 733B <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 0000066B 494E43 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2169 000003B7 2021 <2> variant 040h, 33 2170 000003B9 FBF42C0D <2> variant AGRP(0,0), 13, ASM_LOCKABLE 2171 000003BD FF <2> endvariant 2172 <2> mne INSB ; ofs=3DEh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 0000066E E43B <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000670 494E5342 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2173 000003BE F53600 <2> variant 06Ch, 0, ASM_MACH1 2174 000003C1 FF <2> endvariant 2175 <2> mne INT ; ofs=3E6h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000674 233C <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000676 494E54 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2176 000003C2 663D <2> variant 0CCh, 61 2177 000003C4 66FB <2> variant 0CDh, 123 2178 000003C6 FF <2> endvariant 2179 <2> mne INT1 ; ofs=3EBh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000679 743C <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 0000067B 494E5431 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2180 000003C7 FA78FF <2> variant 0F1h, 127, ASM_MACH6 2181 000003CA FF <2> endvariant 2182 <2> mne INT01 ; ofs=3EFh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 0000067F B53C <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000681 494E543031 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2183 000003CB FA78FF <2> variant 0F1h, 127, ASM_MACH6 2184 000003CE FF <2> endvariant 2185 <2> mne ICEBP ; ofs=3F3h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000686 F53C <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000688 4943454250 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2186 000003CF FA78FF <2> variant 0F1h, 127, ASM_MACH6 2187 000003D2 FF <2> endvariant 2188 <2> mne INT3 ; ofs=3F7h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 0000068D 343D <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 0000068F 494E5433 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2189 000003D3 667F <2> variant 0CCh, 127 2190 000003D5 FF <2> endvariant 2191 <2> mne INT03 ; ofs=3FAh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000693 653D <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000695 494E543033 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2192 000003D6 667F <2> variant 0CCh, 127 2193 000003D8 FF <2> endvariant 2194 <2> mne INTO ; ofs=3FDh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 0000069A 943D <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 0000069C 494E544F <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2195 000003D9 677F <2> variant 0CEh, 127 2196 000003DB FF <2> endvariant 2197 <2> mne INVD ; ofs=400h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000006A0 C43D <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000006A2 494E5644 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2198 000003DC F88400 <2> variant 108h, 0, ASM_MACH4 2199 000003DF FF <2> endvariant 2200 <2> mne INVLPG ; ofs=404h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000006A6 063E <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000006A8 494E564C5047 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2201 000003E0 F8F44BB4 <2> variant AGRP(7,7), 52, ASM_MACH4 2202 000003E4 FF <2> endvariant 2203 <2> mne JA ; ofs=40Ch 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000006AE 523E <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000006B0 4A41 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2204 000003E5 3BBE <2> variant 077h, 62 2205 000003E7 F7C398 <2> variant 187h, 24, ASM_MACH3 2206 000003EA FF <2> endvariant 2207 <2> mne JAE ; ofs=412h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000006B2 B33E <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000006B4 4A4145 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2208 000003EB 39BE <2> variant 073h, 62 2209 000003ED F7C198 <2> variant 183h, 24, ASM_MACH3 2210 000003F0 FF <2> endvariant 2211 <2> mne JB ; ofs=418h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000006B7 123F <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000006B9 4A42 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2212 000003F1 393E <2> variant 072h, 62 2213 000003F3 F7C118 <2> variant 182h, 24, ASM_MACH3 2214 000003F6 FF <2> endvariant 2215 <2> mne JBE ; ofs=41Eh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000006BB 733F <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000006BD 4A4245 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2216 000003F7 3B3E <2> variant 076h, 62 2217 000003F9 F7C318 <2> variant 186h, 24, ASM_MACH3 2218 000003FC FF <2> endvariant 2219 <2> mne JC ; ofs=424h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000006C0 D23F <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000006C2 4A43 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2220 000003FD 393E <2> variant 072h, 62 2221 000003FF F7C118 <2> variant 182h, 24, ASM_MACH3 2222 00000402 FF <2> endvariant 2223 <2> mne JCXZ, ASM_D16 ; ofs=42Ah 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 00000403 FC <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000006C4 3440 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000006C6 4A43585A <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2224 <2> mne JECXZ, ASM_D32 ; ofs=42Bh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 00000404 FD <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000006CA 4540 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000006CC 4A4543585A <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2225 00000405 71BE <2> variant 0E3h, 62 2226 00000407 FF <2> endvariant 2227 <2> mne JE ; ofs=42Fh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000006D1 8240 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000006D3 4A45 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2228 00000408 3A3E <2> variant 074h, 62 2229 0000040A F7C218 <2> variant 184h, 24, ASM_MACH3 2230 0000040D FF <2> endvariant 2231 <2> mne JG ; ofs=435h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000006D5 E240 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000006D7 4A47 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2232 0000040E 3FBE <2> variant 07Fh, 62 2233 00000410 F7C798 <2> variant 18Fh, 24, ASM_MACH3 2234 00000413 FF <2> endvariant 2235 <2> mne JGE ; ofs=43Bh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000006D9 4341 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000006DB 4A4745 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2236 00000414 3EBE <2> variant 07Dh, 62 2237 00000416 F7C698 <2> variant 18Dh, 24, ASM_MACH3 2238 00000419 FF <2> endvariant 2239 <2> mne JL ; ofs=441h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000006DE A241 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000006E0 4A4C <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2240 0000041A 3E3E <2> variant 07Ch, 62 2241 0000041C F7C618 <2> variant 18Ch, 24, ASM_MACH3 2242 0000041F FF <2> endvariant 2243 <2> mne JLE ; ofs=447h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000006E2 0342 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000006E4 4A4C45 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2244 00000420 3F3E <2> variant 07Eh, 62 2245 00000422 F7C718 <2> variant 18Eh, 24, ASM_MACH3 2246 00000425 FF <2> endvariant 2247 <2> mne JNA ; ofs=44Dh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000006E7 6342 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000006E9 4A4E41 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2248 00000426 3B3E <2> variant 076h, 62 2249 00000428 F7C318 <2> variant 186h, 24, ASM_MACH3 2250 0000042B FF <2> endvariant 2251 <2> mne JNAE ; ofs=453h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000006EC C442 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000006EE 4A4E4145 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2252 0000042C 393E <2> variant 072h, 62 2253 0000042E F7C118 <2> variant 182h, 24, ASM_MACH3 2254 00000431 FF <2> endvariant 2255 <2> mne JNB ; ofs=459h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000006F2 2343 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000006F4 4A4E42 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2256 00000432 39BE <2> variant 073h, 62 2257 00000434 F7C198 <2> variant 183h, 24, ASM_MACH3 2258 00000437 FF <2> endvariant 2259 <2> mne JNBE ; ofs=45Fh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000006F7 8443 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000006F9 4A4E4245 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2260 00000438 3BBE <2> variant 077h, 62 2261 0000043A F7C398 <2> variant 187h, 24, ASM_MACH3 2262 0000043D FF <2> endvariant 2263 <2> mne JNC ; ofs=465h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000006FD E343 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000006FF 4A4E43 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2264 0000043E 39BE <2> variant 073h, 62 2265 00000440 F7C198 <2> variant 183h, 24, ASM_MACH3 2266 00000443 FF <2> endvariant 2267 <2> mne JNE ; ofs=46Bh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000702 4344 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000704 4A4E45 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2268 00000444 3ABE <2> variant 075h, 62 2269 00000446 F7C298 <2> variant 185h, 24, ASM_MACH3 2270 00000449 FF <2> endvariant 2271 <2> mne JNG ; ofs=471h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000707 A344 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000709 4A4E47 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2272 0000044A 3F3E <2> variant 07Eh, 62 2273 0000044C F7C718 <2> variant 18Eh, 24, ASM_MACH3 2274 0000044F FF <2> endvariant 2275 <2> mne JNGE ; ofs=477h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 0000070C 0445 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 0000070E 4A4E4745 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2276 00000450 3E3E <2> variant 07Ch, 62 2277 00000452 F7C618 <2> variant 18Ch, 24, ASM_MACH3 2278 00000455 FF <2> endvariant 2279 <2> mne JNL ; ofs=47Dh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000712 6345 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000714 4A4E4C <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2280 00000456 3EBE <2> variant 07Dh, 62 2281 00000458 F7C698 <2> variant 18Dh, 24, ASM_MACH3 2282 0000045B FF <2> endvariant 2283 <2> mne JNLE ; ofs=483h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000717 C445 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000719 4A4E4C45 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2284 0000045C 3FBE <2> variant 07Fh, 62 2285 0000045E F7C798 <2> variant 18Fh, 24, ASM_MACH3 2286 00000461 FF <2> endvariant 2287 <2> mne JNO ; ofs=489h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 0000071D 2346 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 0000071F 4A4E4F <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2288 00000462 38BE <2> variant 071h, 62 2289 00000464 F7C098 <2> variant 181h, 24, ASM_MACH3 2290 00000467 FF <2> endvariant 2291 <2> mne JNP ; ofs=48Fh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000722 8346 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000724 4A4E50 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2292 00000468 3DBE <2> variant 07Bh, 62 2293 0000046A F7C598 <2> variant 18Bh, 24, ASM_MACH3 2294 0000046D FF <2> endvariant 2295 <2> mne JNS ; ofs=495h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000727 E346 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000729 4A4E53 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2296 0000046E 3CBE <2> variant 079h, 62 2297 00000470 F7C498 <2> variant 189h, 24, ASM_MACH3 2298 00000473 FF <2> endvariant 2299 <2> mne JNZ ; ofs=49Bh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 0000072C 4347 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 0000072E 4A4E5A <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2300 00000474 3ABE <2> variant 075h, 62 2301 00000476 F7C298 <2> variant 185h, 24, ASM_MACH3 2302 00000479 FF <2> endvariant 2303 <2> mne JO ; ofs=4A1h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000731 A247 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000733 4A4F <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2304 0000047A 383E <2> variant 070h, 62 2305 0000047C F7C018 <2> variant 180h, 24, ASM_MACH3 2306 0000047F FF <2> endvariant 2307 <2> mne JP ; ofs=4A7h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000735 0248 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000737 4A50 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2308 00000480 3D3E <2> variant 07Ah, 62 2309 00000482 F7C518 <2> variant 18Ah, 24, ASM_MACH3 2310 00000485 FF <2> endvariant 2311 <2> mne JPE ; ofs=4ADh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000739 6348 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 0000073B 4A5045 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2312 00000486 3D3E <2> variant 07Ah, 62 2313 00000488 F7C518 <2> variant 18Ah, 24, ASM_MACH3 2314 0000048B FF <2> endvariant 2315 <2> mne JPO ; ofs=4B3h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 0000073E C348 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000740 4A504F <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2316 0000048C 3DBE <2> variant 07Bh, 62 2317 0000048E F7C598 <2> variant 18Bh, 24, ASM_MACH3 2318 00000491 FF <2> endvariant 2319 <2> mne JS ; ofs=4B9h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000743 2249 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000745 4A53 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2320 00000492 3C3E <2> variant 078h, 62 2321 00000494 F7C418 <2> variant 188h, 24, ASM_MACH3 2322 00000497 FF <2> endvariant 2323 <2> mne JZ ; ofs=4BFh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000747 8249 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000749 4A5A <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2324 00000498 3A3E <2> variant 074h, 62 2325 0000049A F7C218 <2> variant 184h, 24, ASM_MACH3 2326 0000049D FF <2> endvariant 2327 <2> mne JMP ; ofs=4C5h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 0000074B E349 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 0000074D 4A4D50 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2328 0000049E 75BE <2> variant 0EBh, 62 2329 000004A0 7498 <2> variant 0E9h, 24 2330 000004A2 F43E79 <2> variant AGRP(4,4), 121 2331 000004A5 F43E9C <2> variant AGRP(4,5), 28 2332 000004A8 751A <2> variant 0EAh, 26 2333 000004AA FF <2> endvariant 2334 <2> mne LAHF ; ofs=4D2h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000750 B44A <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000752 4C414846 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2335 000004AB 4F80 <2> variant 09Fh, 0 2336 000004AD FF <2> endvariant 2337 <2> mne LAR ; ofs=4D5h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000756 E34A <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000758 4C4152 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2338 000004AE F68110 <2> variant 102h, 16, ASM_MACH2 2339 000004B1 FF <2> endvariant 2340 <2> mne LDS ; ofs=4D9h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 0000075B 234B <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 0000075D 4C4453 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2341 000004B2 628F <2> variant 0C5h, 15 2342 000004B4 FF <2> endvariant 2343 <2> mne LSS ; ofs=4DCh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000760 534B <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000762 4C5353 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2344 000004B5 F7D90F <2> variant 1B2h, 15, ASM_MACH3 2345 000004B8 FF <2> endvariant 2346 <2> mne LES ; ofs=4E0h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000765 934B <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000767 4C4553 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2347 000004B9 620F <2> variant 0C4h, 15 2348 000004BB FF <2> endvariant 2349 <2> mne LFS ; ofs=4E3h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 0000076A C34B <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 0000076C 4C4653 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2350 000004BC F7DA0F <2> variant 1B4h, 15, ASM_MACH3 2351 000004BF FF <2> endvariant 2352 <2> mne LGS ; ofs=4E7h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 0000076F 034C <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000771 4C4753 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2353 000004C0 F7DA8F <2> variant 1B5h, 15, ASM_MACH3 2354 000004C3 FF <2> endvariant 2355 <2> mne LEA ; ofs=4EBh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000774 434C <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000776 4C4541 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2356 000004C4 46F7 <2> variant 08Dh, 119 2357 000004C6 FF <2> endvariant 2358 <2> mne LGDT ; ofs=4F2h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000779 744C <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 0000077B 4C474454 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2359 000004C7 F6F44933 <2> variant AGRP(7,2), 51, ASM_MACH2 2360 000004CB FF <2> endvariant 2361 <2> mne LIDT ; ofs=4F7h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 0000077F C44C <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000781 4C494454 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2362 000004CC F6F449B3 <2> variant AGRP(7,3), 51, ASM_MACH2 2363 000004D0 FF <2> endvariant 2364 <2> mne LLDT ; ofs=4FCh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000785 144D <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000787 4C4C4454 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2365 000004D1 F6F44D49 <2> variant AGRP(8,2), 73, ASM_MACH2 2366 000004D5 FF <2> endvariant 2367 <2> mne LMSW ; ofs=501h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 0000078B 644D <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 0000078D 4C4D5357 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2368 000004D6 F6F44B49 <2> variant AGRP(7,6), 73, ASM_MACH2 2369 000004DA FF <2> endvariant 2370 <2> mne LOCK, ASM_SPECIAL, 0F0h ; ofs=506h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 000004DB FFF0 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000791 B44D <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000793 4C4F434B <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2371 <2> mne LODSB ; ofs=508h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000797 D54D <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000799 4C4F445342 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2372 000004DD 5600 <2> variant 0ACh, 0 2373 000004DF FF <2> endvariant 2374 <2> mne LOOP ; ofs=51Dh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 0000079E 044E <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000007A0 4C4F4F50 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2375 000004E0 717C <2> variant 0E2h, 124 2376 000004E2 713E <2> variant 0E2h, 62 2377 000004E4 FF <2> endvariant 2378 <2> mne LOOPZ ; ofs=522h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000007A4 554E <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000007A6 4C4F4F505A <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2379 000004E5 70FC <2> variant 0E1h, 124 2380 000004E7 70BE <2> variant 0E1h, 62 2381 000004E9 FF <2> endvariant 2382 <2> mne LOOPE ; ofs=527h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000007AB A54E <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000007AD 4C4F4F5045 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2383 000004EA 70FC <2> variant 0E1h, 124 2384 000004EC 70BE <2> variant 0E1h, 62 2385 000004EE FF <2> endvariant 2386 <2> mne LOOPNZ ; ofs=52Ch 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000007B2 F64E <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000007B4 4C4F4F504E5A <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2387 000004EF 707C <2> variant 0E0h, 124 2388 000004F1 703E <2> variant 0E0h, 62 2389 000004F3 FF <2> endvariant 2390 <2> mne LOOPNE ; ofs=531h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000007BA 464F <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000007BC 4C4F4F504E45 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2391 000004F4 707C <2> variant 0E0h, 124 2392 000004F6 703E <2> variant 0E0h, 62 2393 000004F8 FF <2> endvariant 2394 <2> mne LSL ; ofs=536h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000007C2 934F <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000007C4 4C534C <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2395 000004F9 F68190 <2> variant 103h, 16, ASM_MACH2 2396 000004FC FF <2> endvariant 2397 <2> mne LTR ; ofs=53Ah 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000007C7 D34F <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000007C9 4C5452 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2398 000004FD F6F44DC9 <2> variant AGRP(8,3), 73, ASM_MACH2 2399 00000501 FF <2> endvariant 2400 <2> mne MOV ; ofs=53Fh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000007CC 2350 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000007CE 4D4F56 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2401 00000502 5043 <2> variant 0A0h, 67 2402 00000504 5144 <2> variant 0A2h, 68 2403 00000506 4409 <2> variant 088h, 9 2404 00000508 450A <2> variant 08Ah, 10 2405 0000050A 4641 <2> variant 08Ch, 65 2406 0000050C 4742 <2> variant 08Eh, 66 2407 0000050E 5845 <2> variant 0B0h, 69 2408 00000510 5C46 <2> variant 0B8h, 70 2409 00000512 F45004 <2> variant AGRP(9,0), 4 2410 00000515 F7906C <2> variant 120h, 108, ASM_MACH3 2411 00000518 F7916D <2> variant 122h, 109, ASM_MACH3 2412 0000051B F790EE <2> variant 121h, 110, ASM_MACH3 2413 0000051E F791EF <2> variant 123h, 111, ASM_MACH3 2414 00000521 F79270 <2> variant 124h, 112, ASM_MACH3 2415 00000524 F79371 <2> variant 126h, 113, ASM_MACH3 2416 00000527 FF <2> endvariant 2417 <2> mne MOVD ; ofs=565h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000007D1 8452 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000007D3 4D4F5644 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2418 00000528 F9B772 <2> variant 16Eh, 114, ASM_MACH5 2419 0000052B F9BF73 <2> variant 17Eh, 115, ASM_MACH5 2420 0000052E FF <2> endvariant 2421 <2> mne MOVQ ; ofs=56Ch 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000007D7 F452 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000007D9 4D4F5651 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2422 0000052F F9B7F4 <2> variant 16Fh, 116, ASM_MACH5 2423 00000532 F9BFF5 <2> variant 17Fh, 117, ASM_MACH5 2424 00000535 FF <2> endvariant 2425 <2> mne PACKSSDW ; ofs=573h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000007DD 6853 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000007DF 5041434B53534457 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2426 00000536 F9B5F4 <2> variant 16Bh, 116, ASM_MACH5 2427 00000539 FF <2> endvariant 2428 <2> mne PACKSSWB ; ofs=577h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000007E7 A853 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000007E9 5041434B53535742 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2429 0000053A F9B1F4 <2> variant 163h, 116, ASM_MACH5 2430 0000053D FF <2> endvariant 2431 <2> mne PACKUSWB ; ofs=57Bh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000007F1 E853 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000007F3 5041434B55535742 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2432 0000053E F9B3F4 <2> variant 167h, 116, ASM_MACH5 2433 00000541 FF <2> endvariant 2434 <2> mne PADDB ; ofs=57Fh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000007FB 2554 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000007FD 5041444442 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2435 00000542 F9F40A74 <2> variant 1FCh, 116, ASM_MACH5 2436 00000546 FF <2> endvariant 2437 <2> mne PADDW ; ofs=584h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000802 7554 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000804 5041444457 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2438 00000547 F9F40AF4 <2> variant 1FDh, 116, ASM_MACH5 2439 0000054B FF <2> endvariant 2440 <2> mne PADDD ; ofs=589h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000809 C554 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 0000080B 5041444444 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2441 0000054C F9F40B74 <2> variant 1FEh, 116, ASM_MACH5 2442 00000550 FF <2> endvariant 2443 <2> mne PADDSB ; ofs=58Eh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000810 1655 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000812 504144445342 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2444 00000551 F9F40274 <2> variant 1ECh, 116, ASM_MACH5 2445 00000555 FF <2> endvariant 2446 <2> mne PADDSW ; ofs=593h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000818 6655 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 0000081A 504144445357 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2447 00000556 F9F402F4 <2> variant 1EDh, 116, ASM_MACH5 2448 0000055A FF <2> endvariant 2449 <2> mne PADDUSB ; ofs=598h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000820 B755 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000822 50414444555342 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2450 0000055B F9EE74 <2> variant 1DCh, 116, ASM_MACH5 2451 0000055E FF <2> endvariant 2452 <2> mne PADDUSW ; ofs=59Ch 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000829 F755 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 0000082B 50414444555357 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2453 0000055F F9EEF4 <2> variant 1DDh, 116, ASM_MACH5 2454 00000562 FF <2> endvariant 2455 <2> mne PAND ; ofs=5A0h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000832 3456 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000834 50414E44 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2456 00000563 F9EDF4 <2> variant 1DBh, 116, ASM_MACH5 2457 00000566 FF <2> endvariant 2458 <2> mne PANDN ; ofs=5A4h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000838 7556 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 0000083A 50414E444E <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2459 00000567 F9EFF4 <2> variant 1DFh, 116, ASM_MACH5 2460 0000056A FF <2> endvariant 2461 <2> mne PCMPEQB ; ofs=5A8h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 0000083F B756 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000841 50434D50455142 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2462 0000056B F9BA74 <2> variant 174h, 116, ASM_MACH5 2463 0000056E FF <2> endvariant 2464 <2> mne PCMPEQW ; ofs=5ACh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000848 F756 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 0000084A 50434D50455157 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2465 0000056F F9BAF4 <2> variant 175h, 116, ASM_MACH5 2466 00000572 FF <2> endvariant 2467 <2> mne PCMPEQD ; ofs=5B0h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000851 3757 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000853 50434D50455144 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2468 00000573 F9BB74 <2> variant 176h, 116, ASM_MACH5 2469 00000576 FF <2> endvariant 2470 <2> mne PCMPGTB ; ofs=5B4h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 0000085A 7757 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 0000085C 50434D50475442 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2471 00000577 F9B274 <2> variant 164h, 116, ASM_MACH5 2472 0000057A FF <2> endvariant 2473 <2> mne PCMPGTW ; ofs=5B8h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000863 B757 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000865 50434D50475457 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2474 0000057B F9B2F4 <2> variant 165h, 116, ASM_MACH5 2475 0000057E FF <2> endvariant 2476 <2> mne PCMPGTD ; ofs=5BCh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 0000086C F757 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 0000086E 50434D50475444 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2477 0000057F F9B374 <2> variant 166h, 116, ASM_MACH5 2478 00000582 FF <2> endvariant 2479 <2> mne PMADDWD ; ofs=5C0h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000875 3758 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000877 504D4144445744 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2480 00000583 F9F406F4 <2> variant 1F5h, 116, ASM_MACH5 2481 00000587 FF <2> endvariant 2482 <2> mne PMULHW ; ofs=5C5h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 0000087E 8658 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000880 504D554C4857 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2483 00000588 F9F2F4 <2> variant 1E5h, 116, ASM_MACH5 2484 0000058B FF <2> endvariant 2485 <2> mne PMULLW ; ofs=5C9h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000886 C658 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000888 504D554C4C57 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2486 0000058C F9EAF4 <2> variant 1D5h, 116, ASM_MACH5 2487 0000058F FF <2> endvariant 2488 <2> mne POR ; ofs=5CDh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 0000088E 0359 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000890 504F52 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2489 00000590 F9F401F4 <2> variant 1EBh, 116, ASM_MACH5 2490 00000594 FF <2> endvariant 2491 <2> mne PSLLW ; ofs=5D2h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000893 5559 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000895 50534C4C57 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2492 00000595 F9F404F4 <2> variant 1F1h, 116, ASM_MACH5 2493 00000599 F9F45776 <2> variant AGRP(10,6), 118, ASM_MACH5 2494 0000059D FF <2> endvariant 2495 <2> mne PSLLD ; ofs=5DBh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 0000089A E559 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 0000089C 50534C4C44 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2496 0000059E F9F40574 <2> variant 1F2h, 116, ASM_MACH5 2497 000005A2 F9F45B76 <2> variant AGRP(11,6), 118, ASM_MACH5 2498 000005A6 FF <2> endvariant 2499 <2> mne PSLLQ ; ofs=5E4h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000008A1 755A <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000008A3 50534C4C51 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2500 000005A7 F9F405F4 <2> variant 1F3h, 116, ASM_MACH5 2501 000005AB F9F45F76 <2> variant AGRP(12,6), 118, ASM_MACH5 2502 000005AF FF <2> endvariant 2503 <2> mne PSRAW ; ofs=5EDh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000008A8 055B <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000008AA 5053524157 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2504 000005B0 F9F0F4 <2> variant 1E1h, 116, ASM_MACH5 2505 000005B3 F9F45676 <2> variant AGRP(10,4), 118, ASM_MACH5 2506 000005B7 FF <2> endvariant 2507 <2> mne PSRAD ; ofs=5F5h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000008AF 855B <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000008B1 5053524144 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2508 000005B8 F9F174 <2> variant 1E2h, 116, ASM_MACH5 2509 000005BB F9F45A76 <2> variant AGRP(11,4), 118, ASM_MACH5 2510 000005BF FF <2> endvariant 2511 <2> mne PSRLW ; ofs=5FDh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000008B6 055C <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000008B8 5053524C57 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2512 000005C0 F9E8F4 <2> variant 1D1h, 116, ASM_MACH5 2513 000005C3 F9F45576 <2> variant AGRP(10,2), 118, ASM_MACH5 2514 000005C7 FF <2> endvariant 2515 <2> mne PSRLD ; ofs=605h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000008BD 855C <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000008BF 5053524C44 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2516 000005C8 F9E974 <2> variant 1D2h, 116, ASM_MACH5 2517 000005CB F9F45976 <2> variant AGRP(11,2), 118, ASM_MACH5 2518 000005CF FF <2> endvariant 2519 <2> mne PSRLQ ; ofs=60Dh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000008C4 055D <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000008C6 5053524C51 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2520 000005D0 F9E9F4 <2> variant 1D3h, 116, ASM_MACH5 2521 000005D3 F9F45D76 <2> variant AGRP(12,2), 118, ASM_MACH5 2522 000005D7 FF <2> endvariant 2523 <2> mne PSUBB ; ofs=615h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000008CB 855D <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000008CD 5053554242 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2524 000005D8 F9F40874 <2> variant 1F8h, 116, ASM_MACH5 2525 000005DC FF <2> endvariant 2526 <2> mne PSUBW ; ofs=61Ah 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000008D2 D55D <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000008D4 5053554257 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2527 000005DD F9F408F4 <2> variant 1F9h, 116, ASM_MACH5 2528 000005E1 FF <2> endvariant 2529 <2> mne PSUBD ; ofs=61Fh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000008D9 255E <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000008DB 5053554244 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2530 000005E2 F9F40974 <2> variant 1FAh, 116, ASM_MACH5 2531 000005E6 FF <2> endvariant 2532 <2> mne PSUBSB ; ofs=624h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000008E0 765E <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000008E2 505355425342 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2533 000005E7 F9F40074 <2> variant 1E8h, 116, ASM_MACH5 2534 000005EB FF <2> endvariant 2535 <2> mne PSUBSW ; ofs=629h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000008E8 C65E <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000008EA 505355425357 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2536 000005EC F9F400F4 <2> variant 1E9h, 116, ASM_MACH5 2537 000005F0 FF <2> endvariant 2538 <2> mne PSUBUSB ; ofs=62Eh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000008F0 175F <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000008F2 50535542555342 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2539 000005F1 F9EC74 <2> variant 1D8h, 116, ASM_MACH5 2540 000005F4 FF <2> endvariant 2541 <2> mne PSUBUSW ; ofs=632h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000008F9 575F <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000008FB 50535542555357 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2542 000005F5 F9ECF4 <2> variant 1D9h, 116, ASM_MACH5 2543 000005F8 FF <2> endvariant 2544 <2> mne PUNPCKHBW ; ofs=636h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000902 995F <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000904 50554E50434B484257 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2545 000005F9 F9B474 <2> variant 168h, 116, ASM_MACH5 2546 000005FC FF <2> endvariant 2547 <2> mne PUNPCKHWD ; ofs=63Ah 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 0000090D D95F <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 0000090F 50554E50434B485744 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2548 000005FD F9B4F4 <2> variant 169h, 116, ASM_MACH5 2549 00000600 FF <2> endvariant 2550 <2> mne PUNPCKHDQ ; ofs=63Eh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000918 1960 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 0000091A 50554E50434B484451 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2551 00000601 F9B574 <2> variant 16Ah, 116, ASM_MACH5 2552 00000604 FF <2> endvariant 2553 <2> mne PUNPCKLBW ; ofs=642h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000923 5960 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000925 50554E50434B4C4257 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2554 00000605 F9B074 <2> variant 160h, 116, ASM_MACH5 2555 00000608 FF <2> endvariant 2556 <2> mne PUNPCKLWD ; ofs=646h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 0000092E 9960 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000930 50554E50434B4C5744 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2557 00000609 F9B0F4 <2> variant 161h, 116, ASM_MACH5 2558 0000060C FF <2> endvariant 2559 <2> mne PUNPCKLDQ ; ofs=64Ah 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000939 D960 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 0000093B 50554E50434B4C4451 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2560 0000060D F9B174 <2> variant 162h, 116, ASM_MACH5 2561 00000610 FF <2> endvariant 2562 <2> mne PXOR ; ofs=64Eh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000944 1461 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000946 50584F52 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2563 00000611 F9F403F4 <2> variant 1EFh, 116, ASM_MACH5 2564 00000615 FF <2> endvariant 2565 <2> mne MOVSB ; ofs=653h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 0000094A 6561 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 0000094C 4D4F565342 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2566 00000616 5200 <2> variant 0A4h, 0 2567 00000618 FF <2> endvariant 2568 <2> mne MOVSX ; ofs=659h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000951 9561 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000953 4D4F565358 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2569 00000619 F7DF47 <2> variant 1BEh, 71, ASM_MACH3 2570 0000061C F7DFC8 <2> variant 1BFh, 72, ASM_MACH3 2571 0000061F FF <2> endvariant 2572 <2> mne MOVZX ; ofs=660h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000958 0562 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 0000095A 4D4F565A58 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2573 00000620 F7DB47 <2> variant 1B6h, 71, ASM_MACH3 2574 00000623 F7DBC8 <2> variant 1B7h, 72, ASM_MACH3 2575 00000626 FF <2> endvariant 2576 <2> mne MUL ; ofs=667h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 0000095F 7362 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000961 4D554C <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2577 00000627 F4460B <2> variant AGRP(6,4), 11 2578 0000062A FF <2> endvariant 2579 <2> mne NEG ; ofs=66Bh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000964 B362 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000966 4E4547 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2580 0000062B FBF4458D <2> variant AGRP(6,3), 13, ASM_LOCKABLE 2581 0000062F FF <2> endvariant 2582 <2> mne NOP ; ofs=670h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000969 0363 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 0000096B 4E4F50 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2583 00000630 4800 <2> variant 090h, 0 2584 00000632 FF <2> endvariant 2585 <2> mne NOT ; ofs=673h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 0000096E 3363 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000970 4E4F54 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2586 00000633 FBF4450D <2> variant AGRP(6,2), 13, ASM_LOCKABLE 2587 00000637 FF <2> endvariant 2588 <2> mne OR ; ofs=678h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000973 8263 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000975 4F52 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2589 00000638 FBF43085 <2> variant AGRP(1,1), 5, ASM_LOCKABLE 2590 0000063C 0601 <2> variant 00Ch, 1 2591 0000063E FBF43482 <2> variant AGRP(2,1), 2, ASM_LOCKABLE 2592 00000642 FB0407 <2> variant 008h, 7, ASM_LOCKABLE 2593 00000645 050A <2> variant 00Ah, 10 2594 00000647 FF <2> endvariant 2595 <2> mne ORG, ASM_SPECIAL ; ofs=688h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 00000648 FF <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000977 8364 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000979 4F5247 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2596 <2> mne OUT ; ofs=68Ah 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 0000097C 9364 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 0000097E 4F5554 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2597 00000649 734A <2> variant 0E6h, 74 2598 0000064B 774B <2> variant 0EEh, 75 2599 0000064D FF <2> endvariant 2600 <2> mne OUTSB ; ofs=68Fh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000981 E564 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000983 4F55545342 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2601 0000064E F53700 <2> variant 06Eh, 0, ASM_MACH1 2602 00000651 FF <2> endvariant 2603 <2> mne POP ; ofs=697h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000988 2365 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 0000098A 504F50 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2604 00000652 2C22 <2> variant 058h, 34 2605 00000654 F4604C <2> variant AGRP(13,0), 76 2606 00000657 0FE9 <2> variant 01Fh, 105 2607 00000659 03E7 <2> variant 007h, 103 2608 0000065B 0BE8 <2> variant 017h, 104 2609 0000065D F7D0EA <2> variant 1A1h, 106, ASM_MACH3 2610 00000660 F7D4EB <2> variant 1A9h, 107, ASM_MACH3 2611 00000663 FF <2> endvariant 2612 <2> mne PUSH ; ofs=6B0h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 0000098D 4466 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 0000098F 50555348 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2613 00000664 2820 <2> variant 050h, 32 2614 00000666 F43F3F <2> variant AGRP(4,6), 63 2615 00000669 F5354F <2> variant 06Ah, 79, ASM_MACH1 2616 0000066C F5344E <2> variant 068h, 78, ASM_MACH1 2617 0000066F 075D <2> variant 00Eh, 93 2618 00000671 0B5F <2> variant 016h, 95 2619 00000673 0F61 <2> variant 01Eh, 97 2620 00000675 035B <2> variant 006h, 91 2621 00000677 F7D063 <2> variant 1A0h, 99, ASM_MACH3 2622 0000067A F7D465 <2> variant 1A8h, 101, ASM_MACH3 2623 0000067D FF <2> endvariant 2624 <2> mne RCL ; ofs=6D8h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000993 E367 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000995 52434C <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2625 0000067E F46550 <2> variant AGRP(14,2), 80 2626 00000681 F46951 <2> variant AGRP(15,2), 81 2627 00000684 F5F46D52 <2> variant AGRP(16,2), 82, ASM_MACH1 2628 00000688 FF <2> endvariant 2629 <2> mne RCR ; ofs=6E3h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000998 9368 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 0000099A 524352 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2630 00000689 F465D0 <2> variant AGRP(14,3), 80 2631 0000068C F469D1 <2> variant AGRP(15,3), 81 2632 0000068F F5F46DD2 <2> variant AGRP(16,3), 82, ASM_MACH1 2633 00000693 FF <2> endvariant 2634 <2> mne ROL ; ofs=6EEh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 0000099D 4369 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 0000099F 524F4C <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2635 00000694 F46450 <2> variant AGRP(14,0), 80 2636 00000697 F46851 <2> variant AGRP(15,0), 81 2637 0000069A F5F46C52 <2> variant AGRP(16,0), 82, ASM_MACH1 2638 0000069E FF <2> endvariant 2639 <2> mne ROR ; ofs=6F9h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000009A2 F369 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000009A4 524F52 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2640 0000069F F464D0 <2> variant AGRP(14,1), 80 2641 000006A2 F468D1 <2> variant AGRP(15,1), 81 2642 000006A5 F5F46CD2 <2> variant AGRP(16,1), 82, ASM_MACH1 2643 000006A9 FF <2> endvariant 2644 <2> mne RDMSR ; ofs=704h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000009A7 A56A <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000009A9 52444D5352 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2645 000006AA F99900 <2> variant 132h, 0, ASM_MACH5 2646 000006AD FF <2> endvariant 2647 <2> mne RDTSC ; ofs=708h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000009AE E56A <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000009B0 5244545343 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2648 000006AE F99880 <2> variant 131h, 0, ASM_MACH5 2649 000006B1 FF <2> endvariant 2650 <2> mne REP, ASM_SPECIAL, 0F3h ; ofs=70Ch 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 000006B2 FFF3 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000009B5 236B <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000009B7 524550 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2651 <2> mne REPZ, ASM_SPECIAL, 0F3h ; ofs=70Eh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 000006B4 FFF3 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000009BA 446B <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000009BC 5245505A <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2652 <2> mne REPNZ, ASM_SPECIAL, 0F2h ; ofs=710h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 000006B6 FFF2 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000009C0 656B <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000009C2 5245504E5A <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2653 <2> mne REPE, ASM_SPECIAL, 0F3h ; ofs=712h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 000006B8 FFF3 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000009C7 846B <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000009C9 52455045 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2654 <2> mne REPNE, ASM_SPECIAL, 0F2h ; ofs=714h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 000006BA FFF2 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000009CD A56B <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000009CF 5245504E45 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2655 <2> mne RSM ; ofs=725h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000009D4 C36B <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000009D6 52534D <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2656 000006BC F9D500 <2> variant 1AAh, 0, ASM_MACH5 2657 000006BF FF <2> endvariant 2658 <2> mne SAHF ; ofs=729h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000009D9 046C <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000009DB 53414846 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2659 000006C0 4F00 <2> variant 09Eh, 0 2660 000006C2 FF <2> endvariant 2661 <2> mne SAL ; ofs=72Ch 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000009DF 336C <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000009E1 53414C <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2662 000006C3 F46650 <2> variant AGRP(14,4), 80 2663 000006C6 F46A51 <2> variant AGRP(15,4), 81 2664 000006C9 F5F46E52 <2> variant AGRP(16,4), 82, ASM_MACH1 2665 000006CD FF <2> endvariant 2666 <2> mne SAR ; ofs=737h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000009E4 E36C <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000009E6 534152 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2667 000006CE F467D0 <2> variant AGRP(14,7), 80 2668 000006D1 F46BD1 <2> variant AGRP(15,7), 81 2669 000006D4 F5F46FD2 <2> variant AGRP(16,7), 82, ASM_MACH1 2670 000006D8 FF <2> endvariant 2671 <2> mne SEG ; ofs=742h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000009E9 936D <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000009EB 534547 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2672 000006D9 135C <2> variant 026h, 92 2673 000006DB 175E <2> variant 02Eh, 94 2674 000006DD 1B60 <2> variant 036h, 96 2675 000006DF 1F62 <2> variant 03Eh, 98 2676 000006E1 3264 <2> variant 064h, 100 2677 000006E3 32E6 <2> variant 065h, 102 2678 000006E5 FF <2> endvariant 2679 <2> mne ES, ASM_SPECIAL, 026h ; ofs=74Fh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 000006E6 FF26 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000009EE 626E <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000009F0 4553 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2680 <2> mne CS, ASM_SPECIAL, 02Eh ; ofs=751h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 000006E8 FF2E <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000009F2 826E <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000009F4 4353 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2681 <2> mne SS, ASM_SPECIAL, 036h ; ofs=753h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 000006EA FF36 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000009F6 A26E <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000009F8 5353 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2682 <2> mne DS, ASM_SPECIAL, 03Eh ; ofs=755h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 000006EC FF3E <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000009FA C26E <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 000009FC 4453 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2683 <2> mne FS, ASM_SPECIAL, 064h ; ofs=757h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 000006EE FF64 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 000009FE E26E <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000A00 4653 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2684 <2> mne GS, ASM_SPECIAL, 065h ; ofs=759h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 000006F0 FF65 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000A02 026F <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000A04 4753 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2685 <2> mne SHL ; ofs=75Bh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000A06 236F <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000A08 53484C <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2686 000006F2 F46650 <2> variant AGRP(14,4), 80 2687 000006F5 F46A51 <2> variant AGRP(15,4), 81 2688 000006F8 F5F46E52 <2> variant AGRP(16,4), 82, ASM_MACH1 2689 000006FC FF <2> endvariant 2690 <2> mne SHR ; ofs=766h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000A0B D36F <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000A0D 534852 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2691 000006FD F466D0 <2> variant AGRP(14,5), 80 2692 00000700 F46AD1 <2> variant AGRP(15,5), 81 2693 00000703 F5F46ED2 <2> variant AGRP(16,5), 82, ASM_MACH1 2694 00000707 FF <2> endvariant 2695 <2> mne SBB ; ofs=771h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000A10 8370 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000A12 534242 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2696 00000708 FBF43185 <2> variant AGRP(1,3), 5, ASM_LOCKABLE 2697 0000070C 0E01 <2> variant 01Ch, 1 2698 0000070E FBF43582 <2> variant AGRP(2,3), 2, ASM_LOCKABLE 2699 00000712 FB0C07 <2> variant 018h, 7, ASM_LOCKABLE 2700 00000715 0D0A <2> variant 01Ah, 10 2701 00000717 FF <2> endvariant 2702 <2> mne SCASB ; ofs=781h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000A15 8571 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000A17 5343415342 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2703 00000718 5700 <2> variant 0AEh, 0 2704 0000071A FF <2> endvariant 2705 <2> mne SETA ; ofs=787h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000A1C B471 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000A1E 53455441 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2706 0000071B F7CBD6 <2> variant 197h, 86, ASM_MACH3 2707 0000071E FF <2> endvariant 2708 <2> mne SETAE ; ofs=78Bh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000A22 F571 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000A24 5345544145 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2709 0000071F F7C9D6 <2> variant 193h, 86, ASM_MACH3 2710 00000722 FF <2> endvariant 2711 <2> mne SETB ; ofs=78Fh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000A29 3472 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000A2B 53455442 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2712 00000723 F7C956 <2> variant 192h, 86, ASM_MACH3 2713 00000726 FF <2> endvariant 2714 <2> mne SETBE ; ofs=793h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000A2F 7572 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000A31 5345544245 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2715 00000727 F7CB56 <2> variant 196h, 86, ASM_MACH3 2716 0000072A FF <2> endvariant 2717 <2> mne SETC ; ofs=797h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000A36 B472 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000A38 53455443 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2718 0000072B F7C956 <2> variant 192h, 86, ASM_MACH3 2719 0000072E FF <2> endvariant 2720 <2> mne SETE ; ofs=79Bh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000A3C F472 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000A3E 53455445 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2721 0000072F F7CA56 <2> variant 194h, 86, ASM_MACH3 2722 00000732 FF <2> endvariant 2723 <2> mne SETG ; ofs=79Fh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000A42 3473 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000A44 53455447 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2724 00000733 F7CFD6 <2> variant 19Fh, 86, ASM_MACH3 2725 00000736 FF <2> endvariant 2726 <2> mne SETGE ; ofs=7A3h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000A48 7573 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000A4A 5345544745 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2727 00000737 F7CED6 <2> variant 19Dh, 86, ASM_MACH3 2728 0000073A FF <2> endvariant 2729 <2> mne SETL ; ofs=7A7h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000A4F B473 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000A51 5345544C <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2730 0000073B F7CE56 <2> variant 19Ch, 86, ASM_MACH3 2731 0000073E FF <2> endvariant 2732 <2> mne SETLE ; ofs=7ABh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000A55 F573 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000A57 5345544C45 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2733 0000073F F7CF56 <2> variant 19Eh, 86, ASM_MACH3 2734 00000742 FF <2> endvariant 2735 <2> mne SETNA ; ofs=7AFh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000A5C 3574 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000A5E 5345544E41 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2736 00000743 F7CB56 <2> variant 196h, 86, ASM_MACH3 2737 00000746 FF <2> endvariant 2738 <2> mne SETNAE ; ofs=7B3h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000A63 7674 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000A65 5345544E4145 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2739 00000747 F7C956 <2> variant 192h, 86, ASM_MACH3 2740 0000074A FF <2> endvariant 2741 <2> mne SETNB ; ofs=7B7h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000A6B B574 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000A6D 5345544E42 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2742 0000074B F7C9D6 <2> variant 193h, 86, ASM_MACH3 2743 0000074E FF <2> endvariant 2744 <2> mne SETNBE ; ofs=7BBh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000A72 F674 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000A74 5345544E4245 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2745 0000074F F7CBD6 <2> variant 197h, 86, ASM_MACH3 2746 00000752 FF <2> endvariant 2747 <2> mne SETNC ; ofs=7BFh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000A7A 3575 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000A7C 5345544E43 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2748 00000753 F7C9D6 <2> variant 193h, 86, ASM_MACH3 2749 00000756 FF <2> endvariant 2750 <2> mne SETNE ; ofs=7C3h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000A81 7575 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000A83 5345544E45 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2751 00000757 F7CAD6 <2> variant 195h, 86, ASM_MACH3 2752 0000075A FF <2> endvariant 2753 <2> mne SETNG ; ofs=7C7h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000A88 B575 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000A8A 5345544E47 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2754 0000075B F7CF56 <2> variant 19Eh, 86, ASM_MACH3 2755 0000075E FF <2> endvariant 2756 <2> mne SETNGE ; ofs=7CBh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000A8F F675 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000A91 5345544E4745 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2757 0000075F F7CE56 <2> variant 19Ch, 86, ASM_MACH3 2758 00000762 FF <2> endvariant 2759 <2> mne SETNL ; ofs=7CFh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000A97 3576 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000A99 5345544E4C <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2760 00000763 F7CED6 <2> variant 19Dh, 86, ASM_MACH3 2761 00000766 FF <2> endvariant 2762 <2> mne SETNLE ; ofs=7D3h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000A9E 7676 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000AA0 5345544E4C45 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2763 00000767 F7CFD6 <2> variant 19Fh, 86, ASM_MACH3 2764 0000076A FF <2> endvariant 2765 <2> mne SETNO ; ofs=7D7h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000AA6 B576 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000AA8 5345544E4F <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2766 0000076B F7C8D6 <2> variant 191h, 86, ASM_MACH3 2767 0000076E FF <2> endvariant 2768 <2> mne SETNP ; ofs=7DBh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000AAD F576 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000AAF 5345544E50 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2769 0000076F F7CDD6 <2> variant 19Bh, 86, ASM_MACH3 2770 00000772 FF <2> endvariant 2771 <2> mne SETNS ; ofs=7DFh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000AB4 3577 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000AB6 5345544E53 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2772 00000773 F7CCD6 <2> variant 199h, 86, ASM_MACH3 2773 00000776 FF <2> endvariant 2774 <2> mne SETNZ ; ofs=7E3h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000ABB 7577 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000ABD 5345544E5A <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2775 00000777 F7CAD6 <2> variant 195h, 86, ASM_MACH3 2776 0000077A FF <2> endvariant 2777 <2> mne SETO ; ofs=7E7h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000AC2 B477 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000AC4 5345544F <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2778 0000077B F7C856 <2> variant 190h, 86, ASM_MACH3 2779 0000077E FF <2> endvariant 2780 <2> mne SETP ; ofs=7EBh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000AC8 F477 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000ACA 53455450 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2781 0000077F F7CD56 <2> variant 19Ah, 86, ASM_MACH3 2782 00000782 FF <2> endvariant 2783 <2> mne SETPE ; ofs=7EFh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000ACE 3578 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000AD0 5345545045 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2784 00000783 F7CD56 <2> variant 19Ah, 86, ASM_MACH3 2785 00000786 FF <2> endvariant 2786 <2> mne SETPO ; ofs=7F3h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000AD5 7578 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000AD7 534554504F <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2787 00000787 F7CDD6 <2> variant 19Bh, 86, ASM_MACH3 2788 0000078A FF <2> endvariant 2789 <2> mne SETS ; ofs=7F7h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000ADC B478 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000ADE 53455453 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2790 0000078B F7CC56 <2> variant 198h, 86, ASM_MACH3 2791 0000078E FF <2> endvariant 2792 <2> mne SETZ ; ofs=7FBh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000AE2 F478 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000AE4 5345545A <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2793 0000078F F7CA56 <2> variant 194h, 86, ASM_MACH3 2794 00000792 FF <2> endvariant 2795 <2> mne SGDT ; ofs=7FFh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000AE8 3479 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000AEA 53474454 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2796 00000793 F6F44835 <2> variant AGRP(7,0), 53, ASM_MACH2 2797 00000797 FF <2> endvariant 2798 <2> mne SIDT ; ofs=804h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000AEE 8479 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000AF0 53494454 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2799 00000798 F6F448B5 <2> variant AGRP(7,1), 53, ASM_MACH2 2800 0000079C FF <2> endvariant 2801 <2> mne SHLD ; ofs=809h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000AF4 D479 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000AF6 53484C44 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2802 0000079D F7D257 <2> variant 1A4h, 87, ASM_MACH3 2803 000007A0 F7D2D8 <2> variant 1A5h, 88, ASM_MACH3 2804 000007A3 FF <2> endvariant 2805 <2> mne SHRD ; ofs=810h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000AFA 447A <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000AFC 53485244 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2806 000007A4 F7D657 <2> variant 1ACh, 87, ASM_MACH3 2807 000007A7 F7D6D8 <2> variant 1ADh, 88, ASM_MACH3 2808 000007AA FF <2> endvariant 2809 <2> mne SLDT ; ofs=817h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000B00 B47A <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000B02 534C4454 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2810 000007AB F6F44C4D <2> variant AGRP(8,0), 77, ASM_MACH2 2811 000007AF FF <2> endvariant 2812 <2> mne SMSW ; ofs=81Ch 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000B06 047B <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000B08 534D5357 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2813 000007B0 F6F44A4D <2> variant AGRP(7,4), 77, ASM_MACH2 2814 000007B4 FF <2> endvariant 2815 <2> mne STC ; ofs=821h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000B0C 537B <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000B0E 535443 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2816 000007B5 7C80 <2> variant 0F9h, 0 2817 000007B7 FF <2> endvariant 2818 <2> mne STD ; ofs=824h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000B11 837B <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000B13 535444 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2819 000007B8 7E80 <2> variant 0FDh, 0 2820 000007BA FF <2> endvariant 2821 <2> mne STI ; ofs=827h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000B16 B37B <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000B18 535449 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2822 000007BB 7D80 <2> variant 0FBh, 0 2823 000007BD FF <2> endvariant 2824 <2> mne STOSB ; ofs=82Ah 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000B1B E57B <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000B1D 53544F5342 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2825 000007BE 5500 <2> variant 0AAh, 0 2826 000007C0 FF <2> endvariant 2827 <2> mne STR ; ofs=830h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000B22 137C <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000B24 535452 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2828 000007C1 F6F44CC0 <2> variant AGRP(8,1), 64, ASM_MACH2 2829 000007C5 FF <2> endvariant 2830 <2> mne SUB ; ofs=835h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000B27 637C <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000B29 535542 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2831 000007C6 FBF43285 <2> variant AGRP(1,5), 5, ASM_LOCKABLE 2832 000007CA 1601 <2> variant 02Ch, 1 2833 000007CC FBF43682 <2> variant AGRP(2,5), 2, ASM_LOCKABLE 2834 000007D0 FB1407 <2> variant 028h, 7, ASM_LOCKABLE 2835 000007D3 150A <2> variant 02Ah, 10 2836 000007D5 FF <2> endvariant 2837 <2> mne SALC ; ofs=845h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000B2C 647D <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000B2E 53414C43 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2838 000007D6 F66B00 <2> variant 0D6h, 0, ASM_MACH2 2839 000007D9 FF <2> endvariant 2840 <2> mne SETALC ; ofs=849h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000B32 A67D <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000B34 534554414C43 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2841 000007DA F66B00 <2> variant 0D6h, 0, ASM_MACH2 2842 000007DD FF <2> endvariant 2843 <2> mne TEST ; ofs=84Dh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000B3A E47D <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000B3C 54455354 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2844 000007DE 5401 <2> variant 0A8h, 1 2845 000007E0 F44403 <2> variant AGRP(6,0), 3 2846 000007E3 4208 <2> variant 084h, 8 2847 000007E5 420A <2> variant 084h, 10 2848 000007E7 FF <2> endvariant 2849 <2> mne UD0 ; ofs=857h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000B40 837E <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000B42 554430 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2850 000007E8 F5F40B80 <2> variant 1FFh, 0, ASM_MACH1 2851 000007EC FF <2> endvariant 2852 <2> mne UD1 ; ofs=85Ch 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000B45 D37E <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000B47 554431 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2853 000007ED F5DC80 <2> variant 1B9h, 0, ASM_MACH1 2854 000007F0 FF <2> endvariant 2855 <2> mne UD2 ; ofs=860h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000B4A 137F <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000B4C 554432 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2856 000007F1 F58580 <2> variant 10Bh, 0, ASM_MACH1 2857 000007F4 FF <2> endvariant 2858 <2> mne VERR ; ofs=864h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000B4F 547F <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000B51 56455252 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2859 000007F5 F6F44E49 <2> variant AGRP(8,4), 73, ASM_MACH2 2860 000007F9 FF <2> endvariant 2861 <2> mne VERW ; ofs=869h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000B55 A47F <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000B57 56455257 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2862 000007FA F6F44EC9 <2> variant AGRP(8,5), 73, ASM_MACH2 2863 000007FE FF <2> endvariant 2864 <2> mne WAIT ; ofs=86Eh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000B5B F47F <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000B5D 57414954 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2865 000007FF 4D80 <2> variant 09Bh, 0 2866 00000801 FF <2> endvariant 2867 <2> mne WBINVD ; ofs=871h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000B61 2680 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000B63 5742494E5644 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2868 00000802 F88480 <2> variant 109h, 0, ASM_MACH4 2869 00000805 FF <2> endvariant 2870 <2> mne WRMSR ; ofs=875h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000B69 6580 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000B6B 57524D5352 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2871 00000806 F99800 <2> variant 130h, 0, ASM_MACH5 2872 00000809 FF <2> endvariant 2873 <2> mne XADD ; ofs=879h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000B70 A480 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000B72 58414444 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2874 0000080A FBF8E007 <2> variant 1C0h, 7, ASM_LOCKABLE, ASM_MACH4 2875 0000080E FF <2> endvariant 2876 <2> mne XCHG ; ofs=87Eh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000B76 F480 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000B78 58434847 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2877 0000080F 4859 <2> variant 090h, 89 2878 00000811 485A <2> variant 090h, 90 2879 00000813 FB4307 <2> variant 086h, 7, ASM_LOCKABLE 2880 00000816 FB430C <2> variant 086h, 12, ASM_LOCKABLE 2881 00000819 FF <2> endvariant 2882 <2> mne XLAT ; ofs=889h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000B7C A481 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000B7E 584C4154 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2883 0000081A 6B80 <2> variant 0D7h, 0 2884 0000081C FF <2> endvariant 2885 <2> mne XLATB ; ofs=88Ch 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000B82 D581 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000B84 584C415442 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2886 0000081D 6B80 <2> variant 0D7h, 0 2887 0000081F FF <2> endvariant 2888 <2> mne XOR ; ofs=88Fh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000B89 0382 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000B8B 584F52 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2889 00000820 FBF43305 <2> variant AGRP(1,6), 5, ASM_LOCKABLE 2890 00000824 1A01 <2> variant 034h, 1 2891 00000826 FBF43702 <2> variant AGRP(2,6), 2, ASM_LOCKABLE 2892 0000082A FB1807 <2> variant 030h, 7, ASM_LOCKABLE 2893 0000082D 190A <2> variant 032h, 10 2894 0000082F FF <2> endvariant 2895 <2> 2896 <2> ; The following mnemonics allow an address size suffix 2897 <2> ; but do not require it. 2898 <2> 2899 <2> mnlist_a_suffix_allowed label near 2900 <2> mnsuffix _ASA 2901 <2> 2902 <2> mne LOOP ; ofs=50Eh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000B8E 0483 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000B90 4C4F4F50 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2903 00000830 713E <2> variant 0E2h, 62 2904 00000832 FF <2> endvariant 2905 <2> mne LOOPZ ; ofs=511h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000B94 3583 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000B96 4C4F4F505A <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2906 00000833 70BE <2> variant 0E1h, 62 2907 00000835 FF <2> endvariant 2908 <2> mne LOOPE ; ofs=514h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000B9B 6583 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000B9D 4C4F4F5045 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2909 00000836 70BE <2> variant 0E1h, 62 2910 00000838 FF <2> endvariant 2911 <2> mne LOOPNZ ; ofs=517h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000BA2 9683 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000BA4 4C4F4F504E5A <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2912 00000839 703E <2> variant 0E0h, 62 2913 0000083B FF <2> endvariant 2914 <2> mne LOOPNE ; ofs=51Ah 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000BAA C683 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000BAC 4C4F4F504E45 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2915 0000083C 703E <2> variant 0E0h, 62 2916 0000083E FF <2> endvariant 2917 <2> 2918 <2> ; The following mnemonics allow an operand size suffix 2919 <2> ; but do not require it. 2920 <2> 2921 <2> mnlist_o_suffix_allowed label near 2922 <2> mnsuffix _OSA 2923 <2> 2924 <2> mne ENTER ; ofs=15Eh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000BB2 F583 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000BB4 454E544552 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2925 0000083F F56423 <2> variant 0C8h, 35, ASM_MACH1 2926 00000842 FF <2> endvariant 2927 <2> mne FLDENV ; ofs=2B9h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000BB9 3684 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000BBB 464C44454E56 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2928 00000843 F41CB3 <2> variant 221h, 51 2929 00000846 FF <2> endvariant 2930 <2> mne FRSTOR ; ofs=2F1h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000BC1 7684 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000BC3 465253544F52 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2931 00000847 F41EB3 <2> variant 225h, 51 2932 0000084A FF <2> endvariant 2933 <2> mne FSAVE, ASM_WAIT ; ofs=2F5h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 0000084B FE <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000BC9 B584 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000BCB 4653415645 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2934 <2> mne FNSAVE ; ofs=2F6h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000BD0 C684 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000BD2 464E53415645 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2935 0000084C F426B5 <2> variant 235h, 53 2936 0000084F FF <2> endvariant 2937 <2> mne FSTENV, ASM_WAIT ; ofs=32Eh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 00000850 FE <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000BD8 0685 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000BDA 465354454E56 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2938 <2> mne FNSTENV ; ofs=32Fh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000BE0 1785 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000BE2 464E5354454E56 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2939 00000851 F424B5 <2> variant 231h, 53 2940 00000854 FF <2> endvariant 2941 <2> mne IRET ; ofs=409h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000BE9 5485 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000BEB 49524554 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2942 00000855 67FF <2> variant 0CFh, 127 2943 00000857 FF <2> endvariant 2944 <2> mne LEAVE ; ofs=4EEh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000BEF 8585 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000BF1 4C45415645 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2945 00000858 F564FF <2> variant 0C9h, 127, ASM_MACH1 2946 0000085B FF <2> endvariant 2947 <2> mne POPA ; ofs=6A9h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000BF6 C485 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000BF8 504F5041 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2948 0000085C F530FF <2> variant 061h, 127, ASM_MACH1 2949 0000085F FF <2> endvariant 2950 <2> mne POPF ; ofs=6ADh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000BFC 0486 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000BFE 504F5046 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2951 00000860 4EFD <2> variant 09Dh, 125 2952 00000862 FF <2> endvariant 2953 <2> mne PUSH ; ofs=6CAh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000C02 3486 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000C04 50555348 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2954 00000863 F5354F <2> variant 06Ah, 79, ASM_MACH1 2955 00000866 F5344E <2> variant 068h, 78, ASM_MACH1 2956 00000869 FF <2> endvariant 2957 <2> mne PUSHA ; ofs=6D1h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000C08 A586 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000C0A 5055534841 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2958 0000086A F5307F <2> variant 060h, 127, ASM_MACH1 2959 0000086D FF <2> endvariant 2960 <2> mne PUSHF ; ofs=6D5h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000C0F E586 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000C11 5055534846 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2961 0000086E 4E7E <2> variant 09Ch, 126 2962 00000870 FF <2> endvariant 2963 <2> mne RETN ; ofs=716h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000C16 1487 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000C18 5245544E <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2964 00000871 61FD <2> variant 0C3h, 125 2965 00000873 6153 <2> variant 0C2h, 83 2966 00000875 FF <2> endvariant 2967 <2> mne RET ; ofs=71Bh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000C1C 6387 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000C1E 524554 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2968 00000876 61FD <2> variant 0C3h, 125 2969 00000878 6153 <2> variant 0C2h, 83 2970 0000087A FF <2> endvariant 2971 <2> mne RETF ; ofs=720h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000C21 B487 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000C23 52455446 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2972 0000087B 65FF <2> variant 0CBh, 127 2973 0000087D 6555 <2> variant 0CAh, 85 2974 0000087F FF <2> endvariant 2975 <2> 2976 <2> ; The following mnemonics require an operand size suffix. 2977 <2> 2978 <2> mnlist_o_suffix_required label near 2979 <2> mnsuffix _OSR 2980 <2> 2981 <2> mne CMPS ; ofs=12Dh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000C27 0488 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000C29 434D5053 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2982 00000880 5380 <2> variant 0A7h, 0 2983 00000882 FF <2> endvariant 2984 <2> mne INS ; ofs=3E2h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000C2D 3388 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000C2F 494E53 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2985 00000883 F53680 <2> variant 06Dh, 0, ASM_MACH1 2986 00000886 FF <2> endvariant 2987 <2> mne LODS ; ofs=50Bh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000C32 7488 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000C34 4C4F4453 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2988 00000887 5680 <2> variant 0ADh, 0 2989 00000889 FF <2> endvariant 2990 <2> mne MOVS ; ofs=656h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000C38 A488 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000C3A 4D4F5653 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2991 0000088A 5280 <2> variant 0A5h, 0 2992 0000088C FF <2> endvariant 2993 <2> mne OUTS ; ofs=693h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000C3E D488 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000C40 4F555453 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2994 0000088D F53780 <2> variant 06Fh, 0, ASM_MACH1 2995 00000890 FF <2> endvariant 2996 <2> mne SCAS ; ofs=784h 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000C44 1489 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000C46 53434153 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 2997 00000891 5780 <2> variant 0AFh, 0 2998 00000893 FF <2> endvariant 2999 <2> mne STOS ; ofs=82Dh 1134 <3> %push 1135 <3> usesection ASMTABLE2, 1 1136 <3> %assign %$currofs $ - asmtab 1137 <3> %ifnempty %2 1138 <3> db %2 1139 <3> %endif 1140 <3> __SECT__ 1141 <3> %defstr %$string %1 1142 <3> %strlen %$string_size %$string 1143 <3> %if %$string_size > 15 1144 <3> %error Mnemonic %1 is too long! 1145 <3> %endif 1146 00000C4A 4489 <3> dw (%$currofs)<<4|%$string_size 1147 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1148 00000C4C 53544F53 <3> db %$string 1149 <3> %pop 1150 <3> %define MNCURRENT %1%[MNSUFFIX] 3000 00000894 5580 <2> variant 0ABh, 0 3001 00000896 FF <2> endvariant 3002 <2> 3003 <2> end_mnlist label near 3004 <2> 3005 <2> ;--- Disassembler: compressed table of the opcode types. 3006 <2> ;--- If the item has the format OT(xx), it refers to table 'oplists'. 3007 <2> ;--- Otherwise it's an offset for internal table 'disjmp'. 3008 <2> 3009 <2> align 8, db 0 3010 <2> optypes label byte 3011 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) 3012 00000C58 131316160D0D6902 <2> db OT(07),OT(07),OT(0A),OT(0A),OT(01),OT(01),OT(5D), 002h ; 08 - 0F 3013 00000C60 131316160D0D6B74 <2> db OT(07),OT(07),OT(0A),OT(0A),OT(01),OT(01),OT(5F),OT(68) ; 10 - 17 3014 00000C68 131316160D0D6D75 <2> db OT(07),OT(07),OT(0A),OT(0A),OT(01),OT(01),OT(61),OT(69) ; 18 - 1F 3015 00000C70 131316160D0D0A0C <2> db OT(07),OT(07),OT(0A),OT(0A),OT(01),OT(01), 00Ah,OT(00) ; 20 - 27 3016 00000C78 131316160D0D0A0C <2> db OT(07),OT(07),OT(0A),OT(0A),OT(01),OT(01), 00Ah,OT(00) ; 28 - 2F 3017 00000C80 131316160D0D0A0C <2> db OT(07),OT(07),OT(0A),OT(0A),OT(01),OT(01), 00Ah,OT(00) ; 30 - 37 3018 00000C88 141416160D0D0A0C <2> db OT(08),OT(08),OT(0A),OT(0A),OT(01),OT(01), 00Ah,OT(00) ; 38 - 3F 3019 00000C90 2D2D2D2D2D2D2D2D <2> db OT(21),OT(21),OT(21),OT(21),OT(21),OT(21),OT(21),OT(21) ; 40 - 47 3020 00000C98 2D2D2D2D2D2D2D2D <2> db OT(21),OT(21),OT(21),OT(21),OT(21),OT(21),OT(21),OT(21) ; 48 - 4F 3021 00000CA0 2C2C2C2C2C2C2C2C <2> db OT(20),OT(20),OT(20),OT(20),OT(20),OT(20),OT(20),OT(20) ; 50 - 57 3022 00000CA8 2E2E2E2E2E2E2E2E <2> db OT(22),OT(22),OT(22),OT(22),OT(22),OT(22),OT(22),OT(22) ; 58 - 5F 3023 00000CB0 8B8B861A0A0A0A0A <2> db OT(7F),OT(7F),OT(7A),OT(0E), 00Ah, 00Ah, 00Ah, 00Ah ; 60 - 67 3024 00000CB8 5A455B430C0C0C0C <2> db OT(4E),OT(39),OT(4F),OT(37),OT(00),OT(00),OT(00),OT(00) ; 68 - 6F 3025 00000CC0 4A4A4A4A4A4A4A4A <2> db OT(3E),OT(3E),OT(3E),OT(3E),OT(3E),OT(3E),OT(3E),OT(3E) ; 70 - 77 3026 00000CC8 4A4A4A4A4A4A4A4A <2> db OT(3E),OT(3E),OT(3E),OT(3E),OT(3E),OT(3E),OT(3E),OT(3E) ; 78 - 7F 3027 00000CD0 0404040414141818 <2> db 004h, 004h, 004h, 004h,OT(08),OT(08),OT(0C),OT(0C) ; 80 - 87 3028 00000CD8 151516164D834E04 <2> db OT(09),OT(09),OT(0A),OT(0A),OT(41),OT(77),OT(42), 004h ; 88 - 8F 3029 00000CE0 0C65656565656565 <2> db OT(00),OT(59),OT(59),OT(59),OT(59),OT(59),OT(59),OT(59) ; 90 - 97 3030 00000CE8 0C0C250C8A890C0C <2> db OT(00),OT(00),OT(19),OT(00),OT(7E),OT(7D),OT(00),OT(00) ; 98 - 9F 3031 00000CF0 4F4F50500C0C0C0C <2> db OT(43),OT(43),OT(44),OT(44),OT(00),OT(00),OT(00),OT(00) ; A0 - A7 3032 00000CF8 0D0D0C0C0C0C0C0C <2> db OT(01),OT(01),OT(00),OT(00),OT(00),OT(00),OT(00),OT(00) ; A8 - AF 3033 00000D00 5151515151515151 <2> db OT(45),OT(45),OT(45),OT(45),OT(45),OT(45),OT(45),OT(45) ; B0 - B7 3034 00000D08 5252525252525252 <2> db OT(46),OT(46),OT(46),OT(46),OT(46),OT(46),OT(46),OT(46) ; B8 - BF 3035 00000D10 04045F891B1B0404 <2> db 004h, 004h,OT(53),OT(7D),OT(0F),OT(0F), 004h, 004h ; C0 - C7 3036 00000D18 2F8B618B8B878B8B <2> db OT(23),OT(7F),OT(55),OT(7F),OT(7F),OT(7B),OT(7F),OT(7F) ; C8 - CF 3037 00000D20 0404040421210C0C <2> db 004h, 004h, 004h, 004h,OT(15),OT(15),OT(00),OT(00) ; D0 - D7 3038 00000D28 0606060606060606 <2> db 006h, 006h, 006h, 006h, 006h, 006h, 006h, 006h ; D8 - DF 3039 00000D30 4A4A4A4A47475656 <2> db OT(3E),OT(3E),OT(3E),OT(3E),OT(3B),OT(3B),OT(4A),OT(4A) ; E0 - E7 3040 00000D38 2324264A48485757 <2> db OT(17),OT(18),OT(1A),OT(3E),OT(3C),OT(3C),OT(4B),OT(4B) ; E8 - EF 3041 00000D40 0A8B0A0A0C0C0404 <2> db 00Ah,OT(7F), 00Ah, 00Ah,OT(00),OT(00), 004h, 004h ; F0 - F7 3042 00000D48 0C0C0C0C0C0C0404 <2> db OT(00),OT(00),OT(00),OT(00),OT(00),OT(00), 004h, 004h ; F8 - FF 3043 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) 3044 00000D58 1111111111111112 <2> db OT(05),OT(05),OT(05),OT(05),OT(05),OT(05),OT(05),OT(06) ; 108 - 10F 3045 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) 3046 00000D68 5D5D5D5D5D5D5D5D <2> db OT(51),OT(51),OT(51),OT(51),OT(51),OT(51),OT(51),OT(51) ; 118 - 11F 3047 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) 3048 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) 3049 00000D80 1919842785284B00 <2> db OT(0D),OT(0D),OT(78),OT(1B),OT(79),OT(1C),OT(3F), 000h ; 130 - 137 (Intel group 5) 3050 00000D88 594C555555550000 <2> db OT(4D),OT(40),OT(49),OT(49),OT(49),OT(49), 000h, 000h ; 138 - 13F (Intel group 6) 3051 00000D90 41413F3F59005540 <2> db OT(35),OT(35),OT(33),OT(33),OT(4D), 000h,OT(49),OT(34) ; 140 - 147 (Intel group 7) 3052 00000D98 3030303030303030 <2> db OT(24),OT(24),OT(24),OT(24),OT(24),OT(24),OT(24),OT(24) ; 148 - 14F (Coprocessor d8) 3053 00000DA0 34343E3E34343434 <2> db OT(28),OT(28),OT(32),OT(32),OT(28),OT(28),OT(28),OT(28) ; 150 - 157 3054 00000DA8 300031313F3A413B <2> db OT(24), 000h,OT(25),OT(25),OT(33),OT(2E),OT(35),OT(2F) ; 158 - 15F (Coprocessor d9) 3055 00000DB0 353E080008080808 <2> db OT(29),OT(32), 008h, 000h, 008h, 008h, 008h, 008h ; 160 - 167 3056 00000DB8 3838383838383838 <2> db OT(2C),OT(2C),OT(2C),OT(2C),OT(2C),OT(2C),OT(2C),OT(2C) ; 168 - 16F (Coprocessor da) 3057 00000DC0 3434343400080000 <2> db OT(28),OT(28),OT(28),OT(28), 000h, 008h, 000h, 000h ; 170 - 177 3058 00000DC8 38003939003C003D <2> db OT(2C), 000h,OT(2D),OT(2D), 000h,OT(30), 000h,OT(31) ; 178 - 17F (Coprocessor db) 3059 00000DD0 34343434083E3E00 <2> db OT(28),OT(28),OT(28),OT(28), 008h,OT(32),OT(32), 000h ; 180 - 187 3060 00000DD8 3232323232323232 <2> db OT(26),OT(26),OT(26),OT(26),OT(26),OT(26),OT(26),OT(26) ; 188 - 18F (Coprocessor dc) 3061 00000DE0 3737000037373737 <2> db OT(2B),OT(2B), 000h, 000h,OT(2B),OT(2B),OT(2B),OT(2B) ; 190 - 197 3062 00000DE8 320033333F00413B <2> db OT(26), 000h,OT(27),OT(27),OT(33), 000h,OT(35),OT(2F) ; 198 - 19F (Coprocessor dd) 3063 00000DF0 350035353E3E0000 <2> db OT(29), 000h,OT(29),OT(29),OT(32),OT(32), 000h, 000h ; 1A0 - 1A7 3064 00000DF8 3A3A3A3A3A3A3A3A <2> db OT(2E),OT(2E),OT(2E),OT(2E),OT(2E),OT(2E),OT(2E),OT(2E) ; 1A8 - 1AF (Coprocessor de) 3065 00000E00 3636000836363636 <2> db OT(2A),OT(2A), 000h, 008h,OT(2A),OT(2A),OT(2A),OT(2A) ; 1B0 - 1B7 3066 00000E08 3A003B3B3C2A3D2B <2> db OT(2E), 000h,OT(2F),OT(2F),OT(30),OT(1E),OT(31),OT(1F) ; 1B8 - 1BF (Coprocessor df) 3067 00000E10 00000000083E3E00 <2> db 000h, 000h, 000h, 000h, 008h,OT(32),OT(32), 000h ; 1C0 - 1C7 3068 00000E18 0C0C0C0C0C0C0C00 <2> db OT(00),OT(00),OT(00),OT(00),OT(00),OT(00),OT(00), 000h ; 1C8 - 1CF (Coprocessor groups) 3069 00000E20 0C0C0C0C0C0C0C0C <2> db OT(00),OT(00),OT(00),OT(00),OT(00),OT(00),OT(00),OT(00) ; 1D0 - 1D7 3070 00000E28 0C0C0C0C0C0C0C0C <2> db OT(00),OT(00),OT(00),OT(00),OT(00),OT(00),OT(00),OT(00) ; 1D8 - 1DF 3071 <2> ;--- The rest of these are squeezed. 3072 00000E30 0004041C1C0C0C0C <2> db 0, 004h, 004h,OT(10),OT(10),OT(00),OT(00),OT(00) ; 00 3073 00000E38 0C787A797B7C7D0C <2> db OT(00),OT(6C),OT(6E),OT(6D),OT(6F),OT(70),OT(71),OT(00) ; 08 3074 00000E40 0C0C1C1C1C1C1C1C <2> db OT(00),OT(00),OT(10),OT(10),OT(10),OT(10),OT(10),OT(10) ; 10 3075 00000E48 1C1C1C1C1C1C1C1C <2> db OT(10),OT(10),OT(10),OT(10),OT(10),OT(10),OT(10),OT(10) ; 18 3076 00000E50 1C1C808080808080 <2> db OT(10),OT(10),OT(74),OT(74),OT(74),OT(74),OT(74),OT(74) ; 20 3077 00000E58 8080808080807E80 <2> db OT(74),OT(74),OT(74),OT(74),OT(74),OT(74),OT(72),OT(74) ; 28 3078 00000E60 0404048080800C7F <2> db 004h, 004h, 004h,OT(74),OT(74),OT(74),OT(00),OT(73) ; 30 3079 00000E68 8124242424242424 <2> db OT(75),OT(18),OT(18),OT(18),OT(18),OT(18),OT(18),OT(18) ; 38 3080 00000E70 2424242424242424 <2> db OT(18),OT(18),OT(18),OT(18),OT(18),OT(18),OT(18),OT(18) ; 40 3081 00000E78 2462626262626262 <2> db OT(18),OT(56),OT(56),OT(56),OT(56),OT(56),OT(56),OT(56) ; 48 3082 00000E80 6262626262626262 <2> db OT(56),OT(56),OT(56),OT(56),OT(56),OT(56),OT(56),OT(56) ; 50 3083 00000E88 626F760C1F636471 <2> db OT(56),OT(63),OT(6A),OT(00),OT(13),OT(57),OT(58),OT(65) ; 58 3084 00000E90 770C1E63641C1313 <2> db OT(6B),OT(00),OT(12),OT(57),OT(58),OT(10),OT(07),OT(07) ; 60 3085 00000E98 1B1E1B1B53540C04 <2> db OT(0F),OT(12),OT(0F),OT(0F),OT(47),OT(48),OT(00), 004h ; 68 3086 00000EA0 1E1C1C5354131304 <2> db OT(12),OT(10),OT(10),OT(47),OT(48),OT(07),OT(07), 004h ; 70 3087 00000EA8 1D1D1D1D1D1D1D1D <2> db OT(11),OT(11),OT(11),OT(11),OT(11),OT(11),OT(11),OT(11) ; 78 3088 00000EB0 8080808080808080 <2> db OT(74),OT(74),OT(74),OT(74),OT(74),OT(74),OT(74),OT(74) ; 80 3089 00000EB8 8080808080808080 <2> db OT(74),OT(74),OT(74),OT(74),OT(74),OT(74),OT(74),OT(74) ; 88 3090 00000EC0 8080808080808080 <2> db OT(74),OT(74),OT(74),OT(74),OT(74),OT(74),OT(74),OT(74) ; 90 3091 00000EC8 80808080800C1919 <2> db OT(74),OT(74),OT(74),OT(74),OT(74),OT(00),OT(0D),OT(0D) ; 98 3092 00000ED0 6022202020295810 <2> db OT(54),OT(16),OT(14),OT(14),OT(14),OT(1D),OT(4C),OT(04) ; A0 3093 00000ED8 8282828282828282 <2> db OT(76),OT(76),OT(76),OT(76),OT(76),OT(76),OT(76),OT(76) ; A8 3094 00000EE0 0C0C0C0C0C0C0C0C <2> db OT(00),OT(00),OT(00),OT(00),OT(00),OT(00),OT(00),OT(00) ; B0 3095 00000EE8 0C0C0C0C42 <2> db OT(00),OT(00),OT(00),OT(00),OT(36) 3096 <2> 3097 <2> P186 equ 1000h 3098 <2> P286 equ 2000h 3099 <2> P386 equ 3000h 3100 <2> P486 equ 4000h 3101 <2> P586 equ 5000h 3102 <2> P686 equ 6000h 3103 <2> 3104 <2> ;--- Disassembler: compressed table of additional information. 3105 <2> ;--- Bits 0-11 usually are the offset of the mnemonics table. 3106 <2> ;--- Bits 12-15 are the CPU which introduced this opcode. 3107 <2> 3108 00000EED 00 <2> align 2, db 0 3109 <2> opinfo label word 3110 00000EEE 3600360036003600 <2> dw MN_ADD, MN_ADD, MN_ADD, MN_ADD ; 00 3111 00000EF6 36003600F507F007 <2> dw MN_ADD, MN_ADD, MN_PUSH, MN_POP ; 04 3112 00000EFE DB07DB07DB07DB07 <2> dw MN_OR, MN_OR, MN_OR, MN_OR ; 08 3113 00000F06 DB07DB07F507E001 <2> dw MN_OR, MN_OR, MN_PUSH, 01E0h ; 0C 3114 00000F0E 3100310031003100 <2> dw MN_ADC, MN_ADC, MN_ADC, MN_ADC ; 10 3115 00000F16 31003100F507F007 <2> dw MN_ADC, MN_ADC, MN_PUSH, MN_POP ; 14 3116 00000F1E 7808780878087808 <2> dw MN_SBB, MN_SBB, MN_SBB, MN_SBB ; 18 3117 00000F26 78087808F507F007 <2> dw MN_SBB, MN_SBB, MN_PUSH, MN_POP ; 1C 3118 00000F2E 3B003B003B003B00 <2> dw MN_AND, MN_AND, MN_AND, MN_AND ; 20 3119 00000F36 3B003B000100B701 <2> dw MN_AND, MN_AND, 0001h, MN_DAA ; 24 3120 00000F3E 8F098F098F098F09 <2> dw MN_SUB, MN_SUB, MN_SUB, MN_SUB ; 28 3121 00000F46 8F098F090101BC01 <2> dw MN_SUB, MN_SUB, 0101h, MN_DAS ; 2C 3122 00000F4E F109F109F109F109 <2> dw MN_XOR, MN_XOR, MN_XOR, MN_XOR ; 30 3123 00000F56 F109F10901021D00 <2> dw MN_XOR, MN_XOR, 0201h, MN_AAA ; 34 3124 00000F5E 8601860186018601 <2> dw MN_CMP, MN_CMP, MN_CMP, MN_CMP ; 38 3125 00000F66 8601860101032C00 <2> dw MN_CMP, MN_CMP, 0301h, MN_AAS ; 3C 3126 00000F6E D104D104D104D104 <2> dw MN_INC, MN_INC, MN_INC, MN_INC ; 40 3127 00000F76 D104D104D104D104 <2> dw MN_INC, MN_INC, MN_INC, MN_INC ; 44 3128 00000F7E C901C901C901C901 <2> dw MN_DEC, MN_DEC, MN_DEC, MN_DEC ; 48 3129 00000F86 C901C901C901C901 <2> dw MN_DEC, MN_DEC, MN_DEC, MN_DEC ; 4C 3130 00000F8E F507F507F507F507 <2> dw MN_PUSH, MN_PUSH, MN_PUSH, MN_PUSH ; 50 3131 00000F96 F507F507F507F507 <2> dw MN_PUSH, MN_PUSH, MN_PUSH, MN_PUSH ; 54 3132 00000F9E F007F007F007F007 <2> dw MN_POP, MN_POP, MN_POP, MN_POP ; 58 3133 00000FA6 F007F007F007F007 <2> dw MN_POP, MN_POP, MN_POP, MN_POP ; 5C 3134 00000FAE 701A5E1A46104020 <2> dw P186 + MN_PUSHA_OSA, P186 + MN_POPA_OSA, P186 + MN_BOUND, P286 + MN_ARPL ; 60 3135 00000FB6 0134013510302030 <2> dw P386 + 0401h, P386 + 0501h, P386 + 0010h, P386 + 0020h ; 64 3136 00000FBE 6A1AC7146A1AC714 <2> dw P186 + MN_PUSH_OSA, P186 + MN_IMUL, P186 + MN_PUSH_OSA, P186 + MN_IMUL ; 68 3137 00000FC6 D614951AE917A61A <2> dw P186 + MN_INSB, P186 + MN_INS_OSR, P186 + MN_OUTSB, P186 + MN_OUTS_OSR ; 6C 3138 00000FCE 990585051F051A05 <2> dw MN_JO, MN_JNO, MN_JB, MN_JAE ; 70 3139 00000FD6 AF05940523051605 <2> dw MN_JZ, MN_JNZ, MN_JBE, MN_JA ; 74 3140 00000FDE AB058F05A105A605 <2> dw MN_JS, MN_JNS, MN_JPE, MN_JPO ; 78 3141 00000FE6 460541054A053D05 <2> dw MN_JL, MN_JGE, MN_JLE, MN_JG ; 7C 3142 00000FEE 0001000100010801 <2> dw 0100h, 0100h, 0100h, 0108h ; 80 3143 00000FF6 A209A209DE09DE09 <2> dw MN_TEST, MN_TEST, MN_XCHG, MN_XCHG ; 84 3144 00000FFE 3406340634063406 <2> dw MN_MOV, MN_MOV, MN_MOV, MN_MOV ; 88 3145 00001006 3406DC053406F802 <2> dw MN_MOV, MN_LEA, MN_MOV, 02F8h ; 8C 3146 0000100E D107DE09DE09DE09 <2> dw MN_NOP, MN_XCHG, MN_XCHG, MN_XCHG ; 90 3147 00001016 DE09DE09DE09DE09 <2> dw MN_XCHG, MN_XCHG, MN_XCHG, MN_XCHG ; 94 3148 0000101E 7700AD017100C309 <2> dw MN_CBW, MN_CWD, MN_CALL, MN_WAIT ; 98 3149 00001026 770A640A4108B805 <2> dw MN_PUSHF_OSA, MN_POPF_OSA, MN_SAHF, MN_LAHF ; 9C 3150 0000102E 3406340634063406 <2> dw MN_MOV, MN_MOV, MN_MOV, MN_MOV ; A0 3151 00001036 B207A00A8B018F0A <2> dw MN_MOVSB, MN_MOVS_OSR, MN_CMPSB, MN_CMPS_OSR ; A4 3152 0000103E A209A2098309B20A <2> dw MN_TEST, MN_TEST, MN_STOSB, MN_STOS_OSR ; A8 3153 00001046 FF059A0A7D08AC0A <2> dw MN_LODSB, MN_LODS_OSR, MN_SCASB, MN_SCAS_OSR ; AC 3154 0000104E 3406340634063406 <2> dw MN_MOV, MN_MOV, MN_MOV, MN_MOV ; B0 3155 00001056 3406340634063406 <2> dw MN_MOV, MN_MOV, MN_MOV, MN_MOV ; B4 3156 0000105E 3406340634063406 <2> dw MN_MOV, MN_MOV, MN_MOV, MN_MOV ; B8 3157 00001066 3406340634063406 <2> dw MN_MOV, MN_MOV, MN_MOV, MN_MOV ; BC 3158 0000106E 200120017E0A7E0A <2> dw 0120h, 0120h, MN_RETN_OSA, MN_RETN_OSA ; C0 3159 00001076 CD05C30500030003 <2> dw MN_LES, MN_LDS, 0300h, 0300h ; C4 3160 0000107E 1A1A571A890A890A <2> dw P186 + MN_ENTER_OSA, P186 + MN_LEAVE_OSA, MN_RETF_OSA, MN_RETF_OSA ; C8 3161 00001086 F504DC040205510A <2> dw MN_INT3, MN_INT, MN_INTO, MN_IRET_OSA ; CC 3162 0000108E 1001100118011801 <2> dw 0110h, 0110h, 0118h, 0118h ; D0 3163 00001096 270022009A29EA09 <2> dw MN_AAM, MN_AAD, P286 + MN_SETALC, MN_XLATB ; D4 3164 0000109E 4801580168017801 <2> dw 0148h, 0158h, 0168h, 0178h ; D8 3165 000010A6 88019801A801B801 <2> dw 0188h, 0198h, 01A8h, 01B8h ; DC 3166 000010AE 0A0AFC09F6092C05 <2> dw MN_LOOPNZ_ASA, MN_LOOPZ_ASA, MN_LOOP_ASA, MN_JCXZ ; E0 3167 000010B6 CD04CD04E407E407 <2> dw MN_IN, MN_IN, MN_OUT, MN_OUT ; E4 3168 000010BE 7100B305B305B305 <2> dw MN_CALL, MN_JMP, MN_JMP, MN_JMP ; E8 3169 000010C6 CD04CD04E407E407 <2> dw MN_IN, MN_IN, MN_OUT, MN_OUT ; EC 3170 000010CE 0800E16402000600 <2> dw 0008h, P686 + MN_INT1, 0002h, 0006h ; F0 3171 000010D6 BC04970028012801 <2> dw MN_HLT, MN_CMC, 0128h, 0128h ; F4 3172 000010DE 820074098C007E09 <2> dw MN_CLC, MN_STC, MN_CLI, MN_STI ; F8 3173 000010E6 87007909E0023001 <2> dw MN_CLD, MN_STD, 02E0h, 0130h ; FC 3174 000010EE 3600DB0731007808 <2> dw MN_ADD, MN_OR, MN_ADC, MN_SBB ; 100 3175 000010F6 3B008F09F1098601 <2> dw MN_AND, MN_SUB, MN_XOR, MN_CMP ; 104 3176 000010FE 3600DB0731007808 <2> dw MN_ADD, MN_OR, MN_ADC, MN_SBB ; 108 3177 00001106 3B008F09F1098601 <2> dw MN_AND, MN_SUB, MN_XOR, MN_CMP ; 10C 3178 0000110E 05080A08FB070008 <2> dw MN_ROL, MN_ROR, MN_RCL, MN_RCR ; 110 3179 00001116 6E0873086E084C08 <2> dw MN_SHL, MN_SHR, MN_SHL, MN_SAR ; 114 3180 0000111E 05080A08FB070008 <2> dw MN_ROL, MN_ROR, MN_RCL, MN_RCR ; 118 3181 00001126 6E0873086E084C08 <2> dw MN_SHL, MN_SHR, MN_SHL, MN_SAR ; 11C 3182 0000112E 05180A18FB170018 <2> dw P186 + MN_ROL, P186 + MN_ROR, P186 + MN_RCL, P186 + MN_RCR ; 120 3183 00001136 6E1873186E184C18 <2> dw P186 + MN_SHL, P186 + MN_SHR, P186 + MN_SHL, P186 + MN_SAR ; 124 3184 0000113E A209A209D607CC07 <2> dw MN_TEST, MN_TEST, MN_NOT, MN_NEG ; 128 3185 00001146 C707C704CE01C104 <2> dw MN_MUL, MN_IMUL, MN_DIV, MN_IDIV ; 12C 3186 0000114E D104C90171007100 <2> dw MN_INC, MN_DEC, MN_CALL, MN_CALL ; 130 3187 00001156 B305B305F5070000 <2> dw MN_JMP, MN_JMP, MN_PUSH, 0000h ; 134 3188 0000115E 68298A29ED252F26 <2> dw P286 + MN_SLDT, P286 + MN_STR, P286 + MN_LLDT, P286 + MN_LTR ; 138 3189 00001166 B729BD2900000000 <2> dw P286 + MN_VERR, P286 + MN_VERW, 0000h, 0000h ; 13C 3190 0000116E 50295629E125E725 <2> dw P286 + MN_SGDT, P286 + MN_SIDT, P286 + MN_LGDT, P286 + MN_LIDT ; 140 3191 00001176 6E290000F3250E45 <2> dw P286 + MN_SMSW, 0000h, P286 + MN_LMSW, P486 + MN_INVLPG ; 144 3192 0000117E EA019D039B02B002 <2> dw MN_FADD, MN_FMUL, MN_FCOM, MN_FCOMP ; 148 3193 00001186 36044A04DD02F102 <2> dw MN_FSUB, MN_FSUBR, MN_FDIV, MN_FDIVR ; 14C 3194 0000118E EA019D039B02B002 <2> dw MN_FADD, MN_FMUL, MN_FCOM, MN_FCOMP ; 150 3195 00001196 36044A04DD02F102 <2> dw MN_FSUB, MN_FSUBR, MN_FDIV, MN_FDIVR ; 154 3196 0000119E 560300000D041204 <2> dw MN_FLD, 0000h, MN_FST, MN_FSTP ; 158 3197 000011A6 210A9503480A1F04 <2> dw MN_FLDENV_OSA, MN_FNLDCW, MN_FNSTENV_OSA, MN_FNSTCW ; 15C 3198 000011AE 56039D0420030000 <2> dw MN_FLD, MN_FXCH, 0320h, 0000h ; 160 3199 000011B6 2803C801D001D801 <2> dw 0328h, 01C8h, 01D0h, 01D8h ; 164 3200 000011BE F701AA031C032303 <2> dw MN_FIADD, MN_FIMUL, MN_FICOM, MN_FICOMP ; 168 3201 000011C6 43045904EA020003 <2> dw MN_FISUB, MN_FISUBR, MN_FIDIV, MN_FIDIVR ; 16C 3202 000011CE 3162426239628B62 <2> dw P686 + MN_FCMOVB, P686 + MN_FCMOVE, P686 + MN_FCMOVBE, P686 + MN_FCMOVU ; 170 3203 000011D6 0000300300000000 <2> dw 0000h, 0330h, 0000h, 0000h ; 174 3204 000011DE 2B03000049034F03 <2> dw MN_FILD, 0000h, MN_FIST, MN_FISTP ; 178 3205 000011E6 0000560300001204 <2> dw 0000h, MN_FLD, 0000h, MN_FSTP ; 17C 3206 000011EE 5D62706266627962 <2> dw P686 + MN_FCMOVNB, P686 + MN_FCMOVNE, P686 + MN_FCMOVNBE, P686 + MN_FCMOVNU ; 180 3207 000011F6 38036E64A1620000 <2> dw 0338h, P686 + MN_FUCOMI, P686 + MN_FCOMI, 0000h ; 184 3208 000011FE EA019D039B02B002 <2> dw MN_FADD, MN_FMUL, MN_FCOM, MN_FCOMP ; 188 3209 00001206 36044A04DD02F102 <2> dw MN_FSUB, MN_FSUBR, MN_FDIV, MN_FDIVR ; 18C 3210 0000120E EA019D0300000000 <2> dw MN_FADD, MN_FMUL, 0000h, 0000h ; 190 3211 00001216 4A043604F102DD02 <2> dw MN_FSUBR, MN_FSUB, MN_FDIVR, MN_FDIV ; 194 3212 0000121E 560300000D041204 <2> dw MN_FLD, 0000h, MN_FST, MN_FSTP ; 198 3213 00001226 290A0000380A2E04 <2> dw MN_FRSTOR_OSA, 0000h, MN_FNSAVE_OSA, MN_FNSTSW ; 19C 3214 0000122E 150300000D041204 <2> dw MN_FFREE, 0000h, MN_FST, MN_FSTP ; 1A0 3215 00001236 67347F3400000000 <2> dw P386 + MN_FUCOM, P386 + MN_FUCOMP, 0000h, 0000h ; 1A4 3216 0000123E F701AA031C032303 <2> dw MN_FIADD, MN_FIMUL, MN_FICOM, MN_FICOMP ; 1A8 3217 00001246 43045904EA020003 <2> dw MN_FISUB, MN_FISUBR, MN_FIDIV, MN_FIDIVR ; 1AC 3218 0000124E F001A30300004003 <2> dw MN_FADDP, MN_FMULP, 0000h, 0340h ; 1B0 3219 00001256 51043C04F802E302 <2> dw MN_FSUBRP, MN_FSUBP, MN_FDIVRP, MN_FDIVP ; 1B4 3220 0000125E 2B03000049034F03 <2> dw MN_FILD, 0000h, MN_FIST, MN_FISTP ; 1B8 3221 00001266 FE012B0304024F03 <2> dw MN_FBLD, MN_FILD, MN_FBSTP, MN_FISTP ; 1BC 3222 0000126E 0000000000000000 <2> dw 0000h, 0000h, 0000h, 0000h ; 1C0 3223 00001276 48037664A8620000 <2> dw 0348h, P686 + MN_FUCOMIP, P686 + MN_FCOMIP, 0000h ; 1C4 3224 0000127E 5B03610369037103 <2> dw MN_FLD1, MN_FLDL2T, MN_FLDL2E, MN_FLDPI ; 1C8 3225 00001286 7803800388030000 <2> dw MN_FLDLG2, MN_FLDLN2, MN_FLDZ, 0000h ; 1CC 3226 0000128E DD01AC04CE03B703 <2> dw MN_F2XM1, MN_FYL2X, MN_FPTAN, MN_FPATAN ; 1D0 3227 00001296 A304C633C5023103 <2> dw MN_FXTRACT, P386 + MN_FPREM1, MN_FDECSTP, MN_FINCSTP ; 1D4 3228 0000129E BF03B3040604FD33 <2> dw MN_FPREM, MN_FYL2XP1, MN_FSQRT, P386 + MN_FSINCOS ; 1D8 3229 000012A6 D503DE03F733BF32 <2> dw MN_FRNDINT, MN_FSCALE, P386 + MN_FSIN, P386 + MN_FCOS ; 1DC 3230 <2> ;--- The rest of these are squeezed. 3231 000012AE 000038014001BE25 <2> dw 0, 0138h, 0140h, P286 + MN_LAR ; 00 3232 000012B6 2A2691200845C949 <2> dw P286 + MN_LSL, P286 + MN_CLTS, P486 + MN_INVD, P486 + MN_WBINVD ; 04 3233 000012BE B219343634363436 <2> dw P186 + MN_UD2, P386 + MN_MOV, P386 + MN_MOV, P386 + MN_MOV ; 08 3234 000012C6 343634363436D159 <2> dw P386 + MN_MOV, P386 + MN_MOV, P386 + MN_MOV, P586 + MN_WRMSR ; 0C 3235 000012CE 16580F585A613A61 <2> dw P586 + MN_RDTSC, P586 + MN_RDMSR, P686 + MN_CMOVO, P686 + MN_CMOVNO ; 10 3236 000012D6 AB60A3607F615261 <2> dw P686 + MN_CMOVB, P686 + MN_CMOVAE, P686 + MN_CMOVZ, P686 + MN_CMOVNZ ; 14 3237 000012DE B2609C6078614A61 <2> dw P686 + MN_CMOVBE, P686 + MN_CMOVA, P686 + MN_CMOVS, P686 + MN_CMOVNS ; 18 3238 000012E6 68617061D760CF60 <2> dw P686 + MN_CMOVPE, P686 + MN_CMOVPO, P686 + MN_CMOVL, P686 + MN_CMOVGE ; 1C 3239 000012EE DE60C8608B579657 <2> dw P686 + MN_CMOVLE, P686 + MN_CMOVG, P586 + MN_PUNPCKLBW, P586 + MN_PUNPCKLWD ; 20 3240 000012F6 A1574F56C256CB56 <2> dw P586 + MN_PUNPCKLDQ, P586 + MN_PACKSSWB, P586 + MN_PCMPGTB, P586 + MN_PCMPGTW ; 24 3241 000012FE D45659566A577557 <2> dw P586 + MN_PCMPGTD, P586 + MN_PACKUSWB, P586 + MN_PUNPCKHBW, P586 + MN_PUNPCKHWD ; 28 3242 00001306 8057455639563F56 <2> dw P586 + MN_PUNPCKHDQ, P586 + MN_PACKSSDW, P586 + MN_MOVD, P586 + MN_MOVQ ; 2C 3243 0000130E 080310031803A756 <2> dw 0308h, 0310h, 0318h, P586 + MN_PCMPEQB ; 30 3244 00001316 B056B956D7513956 <2> dw P586 + MN_PCMPEQW, P586 + MN_PCMPEQD, P586 + MN_EMMS, P586 + MN_MOVD ; 34 3245 0000131E 3F56993585351F35 <2> dw P586 + MN_MOVQ, P386 + MN_JO, P386 + MN_JNO, P386 + MN_JB ; 38 3246 00001326 1A35AF3594352335 <2> dw P386 + MN_JAE, P386 + MN_JZ, P386 + MN_JNZ, P386 + MN_JBE ; 3C 3247 0000132E 1635AB358F35A135 <2> dw P386 + MN_JA, P386 + MN_JS, P386 + MN_JNS, P386 + MN_JPE ; 40 3248 00001336 A635463541354A35 <2> dw P386 + MN_JPO, P386 + MN_JL, P386 + MN_JGE, P386 + MN_JLE ; 44 3249 0000133E 3D352A390E399138 <2> dw P386 + MN_JG, P386 + MN_SETO, P386 + MN_SETNO, P386 + MN_SETB ; 48 3250 00001346 8A384A3923399738 <2> dw P386 + MN_SETAE, P386 + MN_SETZ, P386 + MN_SETNZ, P386 + MN_SETBE ; 4C 3251 0000134E 843844391C393639 <2> dw P386 + MN_SETA, P386 + MN_SETS, P386 + MN_SETNS, P386 + MN_SETPE ; 50 3252 00001356 3D39B738B038BD38 <2> dw P386 + MN_SETPO, P386 + MN_SETL, P386 + MN_SETGE, P386 + MN_SETLE ; 54 3253 0000135E AA38F537F037A651 <2> dw P386 + MN_SETG, P386 + MN_PUSH, P386 + MN_POP, P586 + MN_CPUID ; 58 3254 00001366 5E305C395C39F537 <2> dw P386 + MN_BT, P386 + MN_SHLD, P386 + MN_SHLD, P386 + MN_PUSH ; 5C 3255 0000136E F0373C586C306239 <2> dw P386 + MN_POP, P586 + MN_RSM, P386 + MN_BTS, P386 + MN_SHRD ; 60 3256 00001376 6239C73492419241 <2> dw P386 + MN_SHRD, P386 + MN_IMUL, P486 + MN_CMPXCHG, P486 + MN_CMPXCHG ; 64 3257 0000137E C8356730D235D735 <2> dw P386 + MN_LSS, P386 + MN_BTR, P386 + MN_LFS, P386 + MN_LGS ; 68 3258 00001386 C037C037AD19E802 <2> dw P386 + MN_MOVZX, P386 + MN_MOVZX, P186 + MN_UD1, 02E8h ; 6C 3259 0000138E 62304D305230B937 <2> dw P386 + MN_BTC, P386 + MN_BSF, P386 + MN_BSR, P386 + MN_MOVSX ; 70 3260 00001396 B937D849D849F002 <2> dw P386 + MN_MOVSX, P486 + MN_XADD, P486 + MN_XADD, 02F0h ; 74 3261 0000139E 5740574057405740 <2> dw P486 + MN_BSWAP, P486 + MN_BSWAP, P486 + MN_BSWAP, P486 + MN_BSWAP ; 78 3262 000013A6 5740574057405740 <2> dw P486 + MN_BSWAP, P486 + MN_BSWAP, P486 + MN_BSWAP, P486 + MN_BSWAP ; 7C 3263 000013AE 1E5725572C57EE56 <2> dw P586 + MN_PSRLW, P586 + MN_PSRLD, P586 + MN_PSRLQ, P586 + MN_PMULLW ; 80 3264 000013B6 585761579A568856 <2> dw P586 + MN_PSUBUSB, P586 + MN_PSUBUSW, P586 + MN_PAND, P586 + MN_PADDUSB ; 84 3265 000013BE 9156A05610571757 <2> dw P586 + MN_PADDUSW, P586 + MN_PANDN, P586 + MN_PSRAW, P586 + MN_PSRAD ; 88 3266 000013C6 E65648575057F656 <2> dw P586 + MN_PMULHW, P586 + MN_PSUBSB, P586 + MN_PSUBSW, P586 + MN_POR ; 8C 3267 000013CE 78568056AC57FB56 <2> dw P586 + MN_PADDSB, P586 + MN_PADDSW, P586 + MN_PXOR, P586 + MN_PSLLW ; 90 3268 000013D6 02570957DD563357 <2> dw P586 + MN_PSLLD, P586 + MN_PSLLQ, P586 + MN_PMADDWD, P586 + MN_PSUBB ; 94 3269 000013DE 3A57415763566A56 <2> dw P586 + MN_PSUBW, P586 + MN_PSUBD, P586 + MN_PADDB, P586 + MN_PADDW ; 98 3270 000013E6 7156A819D104C901 <2> dw P586 + MN_PADDD, P186 + MN_UD0, MN_INC, MN_DEC ; 9C 3271 000013EE 16005E306C306730 <2> dw MN_BOXCB, P386 + MN_BT, P386 + MN_BTS, P386 + MN_BTR ; A0 3272 000013F6 62309B51F0073406 <2> dw P386 + MN_BTC, P586 + MN_CMPXCHG8B, MN_POP, MN_MOV ; A4 3273 000013FE 1E571057FB562557 <2> dw P586 + MN_PSRLW, P586 + MN_PSRAW, P586 + MN_PSLLW, P586 + MN_PSRLD ; A8 3274 00001406 175702572C570957 <2> dw P586 + MN_PSRAD, P586 + MN_PSLLD, P586 + MN_PSRLQ, P586 + MN_PSLLQ ; AC 3275 0000140E B1030B02E4016104 <2> dw MN_FNOP, MN_FCHS, MN_FABS, MN_FTST ; B0 3276 00001416 970487340E03D502 <2> dw MN_FXAM, P386 + MN_FUCOMPP, MN_FNENI, MN_FNDISI ; B4 3277 0000141E 18024103EE23B702 <2> dw MN_FNCLEX, MN_FNINIT, P286 + MN_FNSETPM, MN_FCOMPP ; B8 3278 00001426 2E04 <2> dw MN_FNSTSW 3279 <2> 3280 <2> ;--- Disassembler: table converts unsqueezed numbers to squeezed. 3281 <2> 3282 <2> align 8, db 0 3283 <2> sqztab label byte 3284 00001428 0102030400000500 <2> db 1, 2, 3, 4, 0, 0, 5, 0 ; 1E0 3285 00001430 0607000800000000 <2> db 6, 7, 0, 8, 0, 0, 0, 0 ; 1E8 3286 00001438 0000000000000000 <2> db 0, 0, 0, 0, 0, 0, 0, 0 ; 1F0 3287 00001440 0000000000000000 <2> db 0, 0, 0, 0, 0, 0, 0, 0 ; 1F8 3288 00001448 090A0B0C0D000E00 <2> db 9, 10, 11, 12, 13, 0, 14, 0 ; 200 3289 00001450 0000000000000000 <2> db 0, 0, 0, 0, 0, 0, 0, 0 ; 208 3290 00001458 0F10110000000000 <2> db 15, 16, 17, 0, 0, 0, 0, 0 ; 210 3291 00001460 0000000000000000 <2> db 0, 0, 0, 0, 0, 0, 0, 0 ; 218 3292 00001468 1213141516171819 <2> db 18, 19, 20, 21, 22, 23, 24, 25 ; 220 3293 00001470 1A1B1C1D1E1F2021 <2> db 26, 27, 28, 29, 30, 31, 32, 33 ; 228 3294 00001478 0000000000000000 <2> db 0, 0, 0, 0, 0, 0, 0, 0 ; 230 3295 00001480 0000000000000000 <2> db 0, 0, 0, 0, 0, 0, 0, 0 ; 238 3296 00001488 2223242526272829 <2> db 34, 35, 36, 37, 38, 39, 40, 41 ; 240 3297 00001490 2A2B2C2D00002E2F <2> db 42, 43, 44, 45, 0, 0, 46, 47 ; 248 3298 00001498 0030313233343536 <2> db 0, 48, 49, 50, 51, 52, 53, 54 ; 250 3299 000014A0 0000000000003738 <2> db 0, 0, 0, 0, 0, 0, 55, 56 ; 258 3300 000014A8 393A3B3C3D3E3F40 <2> db 57, 58, 59, 60, 61, 62, 63, 64 ; 260 3301 000014B0 4142434445464748 <2> db 65, 66, 67, 68, 69, 70, 71, 72 ; 268 3302 000014B8 494A4B4C4D4E4F50 <2> db 73, 74, 75, 76, 77, 78, 79, 80 ; 270 3303 000014C0 5152535455565758 <2> db 81, 82, 83, 84, 85, 86, 87, 88 ; 278 3304 000014C8 595A5B5C5D5E0000 <2> db 89, 90, 91, 92, 93, 94, 0, 0 ; 280 3305 000014D0 5F60616263640065 <2> db 95, 96, 97, 98, 99,100, 0,101 ; 288 3306 000014D8 666768696A6B6C6D <2> db 102,103,104,105,106,107,108,109 ; 290 3307 000014E0 006E6F7071727374 <2> db 0,110,111,112,113,114,115,116 ; 298 3308 000014E8 7576000000000077 <2> db 117,118, 0, 0, 0, 0, 0,119 ; 2A0 3309 000014F0 78797A7B7C7D7E7F <2> db 120,121,122,123,124,125,126,127 ; 2A8 3310 000014F8 0080818200830000 <2> db 0,128,129,130, 0,131, 0, 0 ; 2B0 3311 00001500 8485008687880089 <2> db 132,133, 0,134,135,136, 0,137 ; 2B8 3312 00001508 008A8B00008C0000 <2> db 0,138,139, 0, 0,140, 0, 0 ; 2C0 3313 00001510 8D8E008F90910092 <2> db 141,142, 0,143,144,145, 0,146 ; 2C8 3314 00001518 0093949500960000 <2> db 0,147,148,149, 0,150, 0, 0 ; 2D0 3315 00001520 979899009A9B9C9D <2> db 151,152,153, 0,154,155,156,157 ; 2D8 3316 00001528 9E9F0000000000A0 <2> db 158,159, 0, 0, 0, 0, 0,160 ; 2E0 3317 00001530 00000000A1A2A3A4 <2> db 0, 0, 0, 0,161,162,163,164 ; 2E8 3318 00001538 00A5000000000000 <2> db 0,165, 0, 0, 0, 0, 0, 0 ; 2F0 3319 00001540 A600000000000000 <2> db 166, 0, 0, 0, 0, 0, 0, 0 ; 2F8 3320 00001548 A700000000000000 <2> db 167, 0, 0, 0, 0, 0, 0, 0 ; 300 3321 00001550 0000A800A900AA00 <2> db 0, 0,168, 0,169, 0,170, 0 ; 308 3322 00001558 0000AB00AC00AD00 <2> db 0, 0,171, 0,172, 0,173, 0 ; 310 3323 00001560 0000AE000000AF00 <2> db 0, 0,174, 0, 0, 0,175, 0 ; 318 3324 00001568 B000000000000000 <2> db 176, 0, 0, 0, 0, 0, 0, 0 ; 320 3325 00001570 B1B20000B3B40000 <2> db 177,178, 0, 0,179,180, 0, 0 ; 328 3326 00001578 00B5000000000000 <2> db 0,181, 0, 0, 0, 0, 0, 0 ; 330 3327 00001580 B6B7B8B9BA000000 <2> db 182,183,184,185,186, 0, 0, 0 ; 338 3328 00001588 00BB000000000000 <2> db 0,187, 0, 0, 0, 0, 0, 0 ; 340 3329 00001590 BC00000000000000 <2> db 188, 0, 0, 0, 0, 0, 0, 0 ; 348 3330 <2> 3331 <2> ;--- Disassembler: table of mnemonics that change in the presence of a WAIT 3332 <2> ;--- instruction. 3333 <2> 3334 <2> align 2, db 0 3335 <2> wtab1 label word 3336 00001598 3A03390338033B035D- <2> dw 033Ah,0339h,0338h,033Bh,015Dh,019Eh,033Ch,015Fh 3336 000015A1 019E013C035F01 <2> 3337 000015A8 5E0148039F01 <2> dw 015Eh,0348h,019Fh 3338 <2> wtab2 label word 3339 000015AE 1102 <2> dw MN_FCLEX 3340 000015B0 CE02 <2> dw MN_FDISI 3341 000015B2 0803 <2> dw MN_FENI 3342 000015B4 3A03 <2> dw MN_FINIT 3343 000015B6 8E03 <2> dw MN_FLDCW 3344 000015B8 310A <2> dw MN_FSAVE_OSA 3345 000015BA E603 <2> dw MN_FSETPM 3346 000015BC 1804 <2> dw MN_FSTCW 3347 000015BE 400A <2> dw MN_FSTENV_OSA 3348 000015C0 2704 <2> dw MN_FSTSW 3349 000015C2 2704 <2> dw MN_FSTSW 3350 <2> N_WTAB equ ($ - wtab2) / 2 3351 <2> 3352 <2> ;--- Disassembler: table for operands which have a different mnemonic for 3353 <2> ;--- their 32 bit versions (66h prefix). 3354 <2> 3355 <2> align 2, db 0 3356 <2> ltabo1 label word 3357 000015C4 98009900 <2> dw 098h,099h 3358 <2> ltabo2 label word 3359 000015C8 7C00 <2> dw MN_CWDE 3360 000015CA B201 <2> dw MN_CDQ 3361 <2> N_LTABO equ ($ - ltabo2) / 2 3362 <2> 3363 <2> ;--- Disassembler: table for operands which have a different mnemonic for 3364 <2> ;--- their 32 bit versions (67h prefix). 3365 <2> 3366 <2> align 2, db 0 3367 <2> ltaba1 label word 3368 000015CC E300 <2> dw 0E3h 3369 <2> ltaba2 label word 3370 000015CE 3205 <2> dw MN_JECXZ 3371 <2> N_LTABA equ ($ - ltaba2) / 2 3372 <2> 3373 <2> ;--- Disassembler: table of lockable instructions 3374 <2> 3375 <2> align 2, db 0 3376 <2> locktab label word 3377 000015D0 0A0102011000110008- <2> dw 010Ah,0102h,010h,011h,0108h,0100h,00h,01h 3377 000015D9 01000100000100 <2> 3378 000015E0 0C010401200021009B- <2> dw 010Ch,0104h,020h,021h,029Bh,02EFh,0293h,02EEh 3378 000015E9 02EF029302EE02 <2> 3379 000015F0 8B02ED0290029102E1- <2> dw 028Bh,02EDh,0290h,0291h,02E1h,0131h,02E0h,0130h 3379 000015F9 023101E0023001 <2> 3380 00001600 2B012A010901010108- <2> dw 012Bh,012Ah,0109h,0101h,08h,09h,010Bh,0103h 3380 00001609 0009000B010301 <2> 3381 00001610 180019000D01050128- <2> dw 018h,019h,010Dh,0105h,028h,029h,02A0h,02A1h 3381 00001619 002900A002A102 <2> 3382 00001620 860087000E01060130- <2> dw 086h,087h,010Eh,0106h,030h,031h 3382 00001629 003100 <2> 3383 <2> N_LOCK equ ($ - locktab) / 2 3384 <2> 3385 <2> ;--- Equates used in the assembly-language code. 3386 <2> 3387 <2> SPARSE_BASE equ 01E0h 3388 <2> SFPGROUP3 equ 0338h 3389 <2> GROUP7 equ 0130h 1408 <1> [list +] 1409 <1> opindex: 1410 <1> [list -] 1427 0000162C 01 <2> db %$index 1428 <2> [list -] 1427 0000162D 00 <2> db %$index 1428 <2> [list -] 1427 0000162E 01 <2> db %$index 1428 <2> [list -] 1427 0000162F 03 <2> db %$index 1428 <2> [list -] 1427 00001630 05 <2> db %$index 1428 <2> [list -] 1427 00001631 07 <2> db %$index 1428 <2> [list -] 1427 00001632 09 <2> db %$index 1428 <2> [list -] 1427 00001633 0B <2> db %$index 1428 <2> [list -] 1427 00001634 0D <2> db %$index 1428 <2> [list -] 1427 00001635 0F <2> db %$index 1428 <2> [list -] 1427 00001636 11 <2> db %$index 1428 <2> [list -] 1427 00001637 10 <2> db %$index 1428 <2> [list -] 1427 00001638 11 <2> db %$index 1428 <2> [list -] 1427 00001639 10 <2> db %$index 1428 <2> [list -] 1427 0000163A 11 <2> db %$index 1428 <2> [list -] 1427 0000163B 13 <2> db %$index 1428 <2> [list -] 1427 0000163C 16 <2> db %$index 1428 <2> [list -] 1427 0000163D 18 <2> db %$index 1428 <2> [list -] 1427 0000163E 18 <2> db %$index 1428 <2> [list -] 1427 0000163F 1A <2> db %$index 1428 <2> [list -] 1427 00001640 1C <2> db %$index 1428 <2> [list -] 1427 00001641 1C <2> db %$index 1428 <2> [list -] 1427 00001642 1C <2> db %$index 1428 <2> [list -] 1427 00001643 1E <2> db %$index 1428 <2> [list -] 1427 00001644 1D <2> db %$index 1428 <2> [list -] 1427 00001645 1E <2> db %$index 1428 <2> [list -] 1427 00001646 1D <2> db %$index 1428 <2> [list -] 1427 00001647 1E <2> db %$index 1428 <2> [list -] 1427 00001648 1D <2> db %$index 1428 <2> [list -] 1427 00001649 20 <2> db %$index 1428 <2> [list -] 1427 0000164A 21 <2> db %$index 1428 <2> [list -] 1427 0000164B 22 <2> db %$index 1428 <2> [list -] 1427 0000164C 23 <2> db %$index 1428 <2> [list -] 1427 0000164D 22 <2> db %$index 1428 <2> [list -] 1427 0000164E 22 <2> db %$index 1428 <2> [list -] 1427 0000164F 23 <2> db %$index 1428 <2> [list -] 1427 00001650 25 <2> db %$index 1428 <2> [list -] 1427 00001651 26 <2> db %$index 1428 <2> [list -] 1427 00001652 27 <2> db %$index 1428 <2> [list -] 1427 00001653 28 <2> db %$index 1428 <2> [list -] 1427 00001654 29 <2> db %$index 1428 <2> [list -] 1427 00001655 28 <2> db %$index 1428 <2> [list -] 1427 00001656 28 <2> db %$index 1428 <2> [list -] 1427 00001657 27 <2> db %$index 1428 <2> [list -] 1427 00001658 28 <2> db %$index 1428 <2> [list -] 1427 00001659 29 <2> db %$index 1428 <2> [list -] 1427 0000165A 2A <2> db %$index 1428 <2> [list -] 1427 0000165B 2B <2> db %$index 1428 <2> [list -] 1427 0000165C 2C <2> db %$index 1428 <2> [list -] 1427 0000165D 2D <2> db %$index 1428 <2> [list -] 1427 0000165E 2E <2> db %$index 1428 <2> [list -] 1427 0000165F 2F <2> db %$index 1428 <2> [list -] 1427 00001660 2E <2> db %$index 1428 <2> [list -] 1427 00001661 2E <2> db %$index 1428 <2> [list -] 1427 00001662 2F <2> db %$index 1428 <2> [list -] 1427 00001663 2F <2> db %$index 1428 <2> [list -] 1427 00001664 32 <2> db %$index 1428 <2> [list -] 1427 00001665 34 <2> db %$index 1428 <2> [list -] 1427 00001666 37 <2> db %$index 1428 <2> [list -] 1427 00001667 39 <2> db %$index 1428 <2> [list -] 1427 00001668 3A <2> db %$index 1428 <2> [list -] 1427 00001669 3B <2> db %$index 1428 <2> [list -] 1427 0000166A 3C <2> db %$index 1428 <2> [list -] 1427 0000166B 3D <2> db %$index 1428 <2> [list -] 1427 0000166C 3F <2> db %$index 1428 <2> [list -] 1427 0000166D 40 <2> db %$index 1428 <2> [list -] 1427 0000166E 42 <2> db %$index 1428 <2> [list -] 1427 0000166F 44 <2> db %$index 1428 <2> [list -] 1427 00001670 46 <2> db %$index 1428 <2> [list -] 1427 00001671 48 <2> db %$index 1428 <2> [list -] 1427 00001672 49 <2> db %$index 1428 <2> [list -] 1427 00001673 4A <2> db %$index 1428 <2> [list -] 1427 00001674 4D <2> db %$index 1428 <2> [list -] 1427 00001675 4D <2> db %$index 1428 <2> [list -] 1427 00001676 4E <2> db %$index 1428 <2> [list -] 1427 00001677 4F <2> db %$index 1428 <2> [list -] 1427 00001678 50 <2> db %$index 1428 <2> [list -] 1427 00001679 4F <2> db %$index 1428 <2> [list -] 1427 0000167A 50 <2> db %$index 1428 <2> [list -] 1427 0000167B 52 <2> db %$index 1428 <2> [list -] 1427 0000167C 54 <2> db %$index 1428 <2> [list -] 1427 0000167D 56 <2> db %$index 1428 <2> [list -] 1427 0000167E 58 <2> db %$index 1428 <2> [list -] 1427 0000167F 5A <2> db %$index 1428 <2> [list -] 1427 00001680 59 <2> db %$index 1428 <2> [list -] 1427 00001681 59 <2> db %$index 1428 <2> [list -] 1427 00001682 5A <2> db %$index 1428 <2> [list -] 1427 00001683 5B <2> db %$index 1428 <2> [list -] 1427 00001684 5E <2> db %$index 1428 <2> [list -] 1427 00001685 61 <2> db %$index 1428 <2> [list -] 1427 00001686 62 <2> db %$index 1428 <2> [list -] 1427 00001687 63 <2> db %$index 1428 <2> [list -] 1427 00001688 62 <2> db %$index 1428 <2> [list -] 1427 00001689 62 <2> db %$index 1428 <2> [list -] 1427 0000168A 61 <2> db %$index 1428 <2> [list -] 1427 0000168B 61 <2> db %$index 1428 <2> [list -] 1427 0000168C 60 <2> db %$index 1428 <2> [list -] 1427 0000168D 60 <2> db %$index 1428 <2> [list -] 1427 0000168E 5F <2> db %$index 1428 <2> [list -] 1427 0000168F 5F <2> db %$index 1428 <2> [list -] 1427 00001690 5E <2> db %$index 1428 <2> [list -] 1427 00001691 5E <2> db %$index 1428 <2> [list -] 1427 00001692 5D <2> db %$index 1428 <2> [list -] 1427 00001693 5D <2> db %$index 1428 <2> [list -] 1427 00001694 5E <2> db %$index 1428 <2> [list -] 1427 00001695 5F <2> db %$index 1428 <2> [list -] 1427 00001696 60 <2> db %$index 1428 <2> [list -] 1427 00001697 61 <2> db %$index 1428 <2> [list -] 1427 00001698 62 <2> db %$index 1428 <2> [list -] 1427 00001699 63 <2> db %$index 1428 <2> [list -] 1427 0000169A 64 <2> db %$index 1428 <2> [list -] 1427 0000169B 65 <2> db %$index 1428 <2> [list -] 1427 0000169C 66 <2> db %$index 1428 <2> [list -] 1427 0000169D 67 <2> db %$index 1428 <2> [list -] 1427 0000169E 68 <2> db %$index 1428 <2> [list -] 1427 0000169F 6A <2> db %$index 1428 <2> [list -] 1427 000016A0 6C <2> db %$index 1428 <2> [list -] 1427 000016A1 6E <2> db %$index 1428 <2> [list -] 1427 000016A2 70 <2> db %$index 1428 <2> [list -] 1427 000016A3 71 <2> db %$index 1428 <2> [list -] 1427 000016A4 72 <2> db %$index 1428 <2> [list -] 1427 000016A5 71 <2> db %$index 1428 <2> [list -] 1427 000016A6 73 <2> db %$index 1428 <2> [list -] 1427 000016A7 76 <2> db %$index 1428 <2> [list -] 1427 000016A8 77 <2> db %$index 1428 <2> [list -] 1427 000016A9 79 <2> db %$index 1428 <2> [list -] 1427 000016AA 79 <2> db %$index 1428 <2> [list -] 1427 000016AB 79 <2> db %$index 1428 <2> [list -] 1428 ****************** <2> warning: Most assembler table prefix bytes: 1 (ofs 4h) mne BOXCB variant (240h + 0*8 + 7),84,, [-w+user] 1492 <1> 1493 <1> usesection lDEBUG_DATA_ENTRY 1049 1050 1051 usesection lDEBUG_DATA_ENTRY 1052 1053 msg_start: 1054 %include "msg.asm" 1055 <1> 1056 <1> %if 0 1057 <1> 1058 <1> lDebug messages 1059 <1> 1060 <1> Copyright (C) 1995-2003 Paul Vojta 1061 <1> Copyright (C) 2008-2012 C. Masloch 1062 <1> 1063 <1> Usage of the works is permitted provided that this 1064 <1> instrument is retained with the works, so that any entity 1065 <1> that uses the works is notified of this instrument. 1066 <1> 1067 <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 1068 <1> 1069 <1> %endif 1070 <1> 1071 <1> 1072 <1> usesection lDEBUG_DATA_ENTRY 1073 <1> 1074 <1> msg: 1075 <1> .help: 1076 00001132 6C4465627567582028- <1> db _PROGNAME,_VERSION," help screen",13,10 1076 0000113B 323032322D30342D32- <1> 1076 00001144 31292068656C702073- <1> 1076 0000114D 637265656E0D0A <1> 1077 00001154 617373656D626C6509- <1> db "assemble",9, "A [address]",13,10 1077 0000115D 41205B616464726573- <1> 1077 00001166 735D0D0A <1> 1078 <1> %if 0 1079 <1> db "set option bits",9, "BS value",13,10 1080 <1> db "unset opt bits",9, "BU value",13,10 1081 <1> db "reset opt bits",9, "BR value",13,10 1082 <1> %endif 1083 <1> %if _BREAKPOINTS 1084 0000116A 73657420627265616B- <1> db "set breakpoint",9, "BP index|AT|NEW address [[NUMBER=]number] [WHEN=cond] [ID=id]",13,10 1084 00001173 706F696E7409425020- <1> 1084 0000117C 696E6465787C41547C- <1> 1084 00001185 4E4557206164647265- <1> 1084 0000118E 7373205B5B4E554D42- <1> 1084 00001197 45523D5D6E756D6265- <1> 1084 000011A0 725D205B5748454E3D- <1> 1084 000011A9 636F6E645D205B4944- <1> 1084 000011B2 3D69645D0D0A <1> 1085 000011B8 207365742049440909- <1> db " set ID",9,9, "BI index|AT address [ID=]id",13,10 1085 000011C1 424920696E6465787C- <1> 1085 000011CA 415420616464726573- <1> 1085 000011D3 73205B49443D5D6964- <1> 1085 000011DC 0D0A <1> 1086 000011DE 2073657420636F6E64- <1> db " set condition",9, "BW index|AT address [WHEN=]cond",13,10 1086 000011E7 6974696F6E09425720- <1> 1086 000011F0 696E6465787C415420- <1> 1086 000011F9 61646472657373205B- <1> 1086 00001202 5748454E3D5D636F6E- <1> 1086 0000120B 640D0A <1> 1087 0000120E 20736574206F666673- <1> db " set offset",9, "BO index|AT address [OFFSET=]number",13,10 1087 00001217 657409424F20696E64- <1> 1087 00001220 65787C415420616464- <1> 1087 00001229 72657373205B4F4646- <1> 1087 00001232 5345543D5D6E756D62- <1> 1087 0000123B 65720D0A <1> 1088 0000123F 20736574206E756D62- <1> db " set number",9, "BN index|AT address|ALL number",13,10 1088 00001248 657209424E20696E64- <1> 1088 00001251 65787C415420616464- <1> 1088 0000125A 726573737C414C4C20- <1> 1088 00001263 6E756D6265720D0A <1> 1089 0000126B 20636C656172090942- <1> db " clear",9,9, "BC index|AT address|ALL",13,10 1089 00001274 4320696E6465787C41- <1> 1089 0000127D 542061646472657373- <1> 1089 00001286 7C414C4C0D0A <1> 1090 0000128C 2064697361626C6509- <1> db " disable",9, "BD index|AT address|ALL",13,10 1090 00001295 424420696E6465787C- <1> 1090 0000129E 415420616464726573- <1> 1090 000012A7 737C414C4C0D0A <1> 1091 000012AE 20656E61626C650909- <1> db " enable",9,9, "BE index|AT address|ALL",13,10 1091 000012B7 424520696E6465787C- <1> 1091 000012C0 415420616464726573- <1> 1091 000012C9 737C414C4C0D0A <1> 1092 000012D0 20746F67676C650909- <1> db " toggle",9,9, "BT index|AT address|ALL",13,10 1092 000012D9 425420696E6465787C- <1> 1092 000012E2 415420616464726573- <1> 1092 000012EB 737C414C4C0D0A <1> 1093 000012F2 206C6973740909424C- <1> db " list",9,9, "BL [index|AT address|ALL]",13,10 1093 000012FB 205B696E6465787C41- <1> 1093 00001304 542061646472657373- <1> 1093 0000130D 7C414C4C5D0D0A <1> 1094 <1> %endif 1095 <1> %if _DEBUG 1096 <1> db "break upwards",9, "BU",13,10 1097 <1> %endif 1098 00001314 636F6D706172650909- <1> db "compare",9,9, "C range address",13,10 1098 0000131D 432072616E67652061- <1> 1098 00001326 6464726573730D0A <1> 1099 0000132E 64756D70090944205B- <1> db "dump",9,9, "D [range]",13,10 1099 00001337 72616E67655D0D0A <1> 1100 0000133F 64756D702062797465- <1> db "dump bytes",9, "DB [range]",13,10 1100 00001348 73094442205B72616E- <1> 1100 00001351 67655D0D0A <1> 1101 00001356 64756D7020776F7264- <1> db "dump words",9, "DW [range]",13,10 1101 0000135F 73094457205B72616E- <1> 1101 00001368 67655D0D0A <1> 1102 0000136D 64756D702064776F72- <1> db "dump dwords",9, "DD [range]",13,10 1102 00001376 6473094444205B7261- <1> 1102 0000137F 6E67655D0D0A <1> 1103 <1> %if _INT 1104 00001385 64756D7020696E7465- <1> db "dump interrupts",9, "DI[R][M][L] interrupt [count]",13,10 1104 0000138E 727275707473094449- <1> 1104 00001397 5B525D5B4D5D5B4C5D- <1> 1104 000013A0 20696E746572727570- <1> 1104 000013A9 74205B636F756E745D- <1> 1104 000013B2 0D0A <1> 1105 <1> %endif 1106 <1> %if _PM 1107 000013B4 64756D70204C445409- <1> db "dump LDT",9, "DL selector [count]",13,10 1107 000013BD 444C2073656C656374- <1> 1107 000013C6 6F72205B636F756E74- <1> 1107 000013CF 5D0D0A <1> 1108 <1> %endif 1109 <1> %if _MCB 1110 000013D2 64756D70204D434220- <1> db "dump MCB chain",9, "DM [segment]",13,10 1110 000013DB 636861696E09444D20- <1> 1110 000013E4 5B7365676D656E745D- <1> 1110 000013ED 0D0A <1> 1111 <1> ;db "dump S/SD MCBs",9, "DS",13,10 1112 <1> %endif 1113 <1> %if _DSTRINGS 1114 000013EF 646973706C61792073- <1> db "display strings",9, "DZ/D$/D[W]# [address]",13,10 1114 000013F8 7472696E677309445A- <1> 1114 00001401 2F44242F445B575D23- <1> 1114 0000140A 205B61646472657373- <1> 1114 00001413 5D0D0A <1> 1115 <1> %endif 1116 <1> %if _PM 1117 00001416 64756D702065787420- <1> db "dump ext memory",9, "DX physical_address",13,10 1117 0000141F 6D656D6F7279094458- <1> 1117 00001428 20706879736963616C- <1> 1117 00001431 5F616464726573730D- <1> 1117 0000143A 0A <1> 1118 <1> %endif 1119 0000143B 656E74657209094520- <1> db "enter",9,9, "E address [list]",13,10 1119 00001444 61646472657373205B- <1> 1119 0000144D 6C6973745D0D0A <1> 1120 00001454 66696C6C0909462072- <1> db "fill",9,9, "F range [RANGE range|list]",13,10 1120 0000145D 616E6765205B52414E- <1> 1120 00001466 47452072616E67657C- <1> 1120 0000146F 6C6973745D0D0A <1> 1121 00001476 676F090947205B3D61- <1> db "go",9,9, "G [=address] [breakpts]",13,10 1121 0000147F 6464726573735D205B- <1> 1121 00001488 627265616B7074735D- <1> 1121 00001491 0D0A <1> 1122 00001493 676F746F0909474F54- <1> db "goto",9,9, "GOTO :label",13,10 1122 0000149C 4F203A6C6162656C0D- <1> 1122 000014A5 0A <1> 1123 000014A6 686578206164642F73- <1> db "hex add/sub",9, "H value1 [value2 [...]]",13,10 1123 000014AF 756209482076616C75- <1> 1123 000014B8 6531205B76616C7565- <1> 1123 000014C1 32205B2E2E2E5D5D0D- <1> 1123 000014CA 0A <1> 1124 000014CB 626173652064697370- <1> db "base display",9, "H BASE=number [GROUP=number] [WIDTH=number] value",13,10 1124 000014D4 6C6179094820424153- <1> 1124 000014DD 453D6E756D62657220- <1> 1124 000014E6 5B47524F55503D6E75- <1> 1124 000014EF 6D6265725D205B5749- <1> 1124 000014F8 4454483D6E756D6265- <1> 1124 00001501 725D2076616C75650D- <1> 1124 0000150A 0A <1> 1125 0000150B 696E7075740909495B- <1> db "input",9,9, "I[W|D] port",13,10 1125 00001514 577C445D20706F7274- <1> 1125 0000151D 0D0A <1> 1126 0000151F 6966206E756D657269- <1> db "if numeric",9, "IF [NOT] (cond) THEN cmd",13,10 1126 00001528 63094946205B4E4F54- <1> 1126 00001531 5D2028636F6E642920- <1> 1126 0000153A 5448454E20636D640D- <1> 1126 00001543 0A <1> 1127 00001544 696620736372697074- <1> db "if script file",9, "IF [NOT] EXISTS Y file [:label] THEN cmd",13,10 1127 0000154D 2066696C6509494620- <1> 1127 00001556 5B4E4F545D20455849- <1> 1127 0000155F 53545320592066696C- <1> 1127 00001568 65205B3A6C6162656C- <1> 1127 00001571 5D205448454E20636D- <1> 1127 0000157A 640D0A <1> 1128 0000157D 6C6F61642070726F67- <1> db "load program",9, "L [address]",13,10 1128 00001586 72616D094C205B6164- <1> 1128 0000158F 64726573735D0D0A <1> 1129 00001597 6C6F61642073656374- <1> db "load sectors",9, "L address drive sector count",13,10 1129 000015A0 6F7273094C20616464- <1> 1129 000015A9 726573732064726976- <1> 1129 000015B2 6520736563746F7220- <1> 1129 000015BB 636F756E740D0A <1> 1130 000015C2 6D6F766509094D2072- <1> db "move",9,9, "M range address",13,10 1130 000015CB 616E67652061646472- <1> 1130 000015D4 6573730D0A <1> 1131 000015D9 38307838362F783837- <1> db "80x86/x87 mode",9, "M [0..6|C|NC|C2|?]",13,10 1131 000015E2 206D6F6465094D205B- <1> 1131 000015EB 302E2E367C437C4E43- <1> 1131 000015F4 7C43327C3F5D0D0A <1> 1132 000015FC 736574206E616D6509- <1> db "set name",9, "N [[drive:][path]progname.ext [parameters]]",13,10 1132 00001605 4E205B5B6472697665- <1> 1132 0000160E 3A5D5B706174685D70- <1> 1132 00001617 726F676E616D652E65- <1> 1132 00001620 7874205B706172616D- <1> 1132 00001629 65746572735D5D0D0A <1> 1133 00001632 6F757470757409094F- <1> db "output",9,9, "O[W|D] port value",13,10 1133 0000163B 5B577C445D20706F72- <1> 1133 00001644 742076616C75650D0A <1> 1134 0000164D 70726F636565640909- <1> db "proceed",9,9, "P [=address] [count [WHILE cond] [SILENT [count]]]",13,10 1134 00001656 50205B3D6164647265- <1> 1134 0000165F 73735D205B636F756E- <1> 1134 00001668 74205B5748494C4520- <1> 1134 00001671 636F6E645D205B5349- <1> 1134 0000167A 4C454E54205B636F75- <1> 1134 00001683 6E745D5D5D0D0A <1> 1135 0000168A 717569740909510D0A <1> db "quit",9,9, "Q",13,10 1136 00001693 726567697374657209- <1> db "register",9, "R [register [value]]",13,10 1136 0000169C 52205B726567697374- <1> 1136 000016A5 6572205B76616C7565- <1> 1136 000016AE 5D5D0D0A <1> 1137 000016B2 5220657874656E6465- <1> db "R extended",9, "RE",13,10 1137 000016BB 640952450D0A <1> 1138 000016C1 524520636F6D6D616E- <1> db "RE commands",9, "RE.LIST|APPEND|REPLACE [commands]",13,10 1138 000016CA 64730952452E4C4953- <1> 1138 000016D3 547C415050454E447C- <1> 1138 000016DC 5245504C414345205B- <1> 1138 000016E5 636F6D6D616E64735D- <1> 1138 000016EE 0D0A <1> 1139 <1> %if _MMXSUPP 1140 000016F0 4D4D58207265676973- <1> db "MMX register",9, "RM",13,10 1140 000016F9 74657209524D0D0A <1> 1141 <1> %endif 1142 <1> %if _RN 1143 00001701 465055207265676973- <1> db "FPU register",9, "RN",13,10 1143 0000170A 74657209524E0D0A <1> 1144 <1> %endif 1145 00001712 746F67676C65203338- <1> db "toggle 386 regs",9, "RX",13,10 1145 0000171B 362072656773095258- <1> 1145 00001724 0D0A <1> 1146 00001726 736561726368090953- <1> db "search",9,9, "S range [REVERSE] [RANGE range|list]",13,10 1146 0000172F 2072616E6765205B52- <1> 1146 00001738 4556455253455D205B- <1> 1146 00001741 52414E47452072616E- <1> 1146 0000174A 67657C6C6973745D0D- <1> 1146 00001753 0A <1> 1147 00001754 736C6565700909534C- <1> db "sleep",9,9, "SLEEP count [SECONDS|TICKS]",13,10 1147 0000175D 45455020636F756E74- <1> 1147 00001766 205B5345434F4E4453- <1> 1147 0000176F 7C5449434B535D0D0A <1> 1148 00001778 747261636509095420- <1> db "trace",9,9, "T [=address] [count [WHILE cond] [SILENT [count]]]",13,10 1148 00001781 5B3D61646472657373- <1> 1148 0000178A 5D205B636F756E7420- <1> 1148 00001793 5B5748494C4520636F- <1> 1148 0000179C 6E645D205B53494C45- <1> 1148 000017A5 4E54205B636F756E74- <1> 1148 000017AE 5D5D5D0D0A <1> 1149 000017B3 747261636520286578- <1> db "trace (exc str)",9 1149 000017BC 63207374722909 <1> 1150 000017C3 5450205B3D61646472- <1> db "TP [=address] [count [WHILE cond] [SILENT [count]]]",13,10 1150 000017CC 6573735D205B636F75- <1> 1150 000017D5 6E74205B5748494C45- <1> 1150 000017DE 20636F6E645D205B53- <1> 1150 000017E7 494C454E54205B636F- <1> 1150 000017F0 756E745D5D5D0D0A <1> 1151 000017F8 7472616365206D6F64- <1> db "trace mode",9, "TM [0|1]",13,10 1151 00001801 6509544D205B307C31- <1> 1151 0000180A 5D0D0A <1> 1152 <1> %if _TSR 1153 0000180D 656E74657220545352- <1> db "enter TSR mode",9, "TSR",13,10 1153 00001816 206D6F646509545352- <1> 1153 0000181F 0D0A <1> 1154 <1> %endif 1155 00001821 756E617373656D626C- <1> db "unassemble",9, "U [range]",13,10 1155 0000182A 650955205B72616E67- <1> 1155 00001833 655D0D0A <1> 1156 00001837 77726974652070726F- <1> db "write program",9, "W [address]",13,10 1156 00001840 6772616D0957205B61- <1> 1156 00001849 6464726573735D0D0A <1> 1157 00001852 777269746520736563- <1> db "write sectors",9, "W address drive sector count",13,10 1157 0000185B 746F72730957206164- <1> 1157 00001864 647265737320647269- <1> 1157 0000186D 766520736563746F72- <1> 1157 00001876 20636F756E740D0A <1> 1158 <1> %if _EMS 1159 0000187E 657870616E64656420- <1> db "expanded mem",9, "XA/XD/XM/XR/XS, X? for help",13,10 1159 00001887 6D656D0958412F5844- <1> 1159 00001890 2F584D2F58522F5853- <1> 1159 00001899 2C20583F20666F7220- <1> 1159 000018A2 68656C700D0A <1> 1160 <1> %endif 1161 000018A8 72756E207363726970- <1> db "run script",9, "Y [partition/][scriptfile] [:label]",13,10 1161 000018B1 740959205B70617274- <1> 1161 000018BA 6974696F6E2F5D5B73- <1> 1161 000018C3 637269707466696C65- <1> 1161 000018CC 5D205B3A6C6162656C- <1> 1161 000018D5 5D0D0A <1> 1162 000018D8 0D0A <1> db 13,10 1163 000018DA 4164646974696F6E61- <1> db "Additional help topics:",13,10 1163 000018E3 6C2068656C7020746F- <1> 1163 000018EC 706963733A0D0A <1> 1164 <1> %if _EXTHELP 1165 000018F3 205265676973746572- <1> db " Registers",9, "?R",13,10 1165 000018FC 73093F520D0A <1> 1166 00001902 20466C61677309093F- <1> db " Flags",9,9, "?F",13,10 1166 0000190B 460D0A <1> 1167 <1> %if _COND 1168 0000190E 20436F6E646974696F- <1> db " Conditionals",9, "?C",13,10 1168 00001917 6E616C73093F430D0A <1> 1169 <1> %endif 1170 <1> %if _EXPRESSIONS 1171 00001920 204578707265737369- <1> db " Expressions",9, "?E",13,10 1171 00001929 6F6E73093F450D0A <1> 1172 <1> %endif 1173 <1> %if _VARIABLES || _OPTIONS || _PSPVARIABLES 1174 00001931 205661726961626C65- <1> db " Variables",9, "?V",13,10 1174 0000193A 73093F560D0A <1> 1175 <1> %endif 1176 00001940 205220457874656E64- <1> db " R Extended",9, "?RE",13,10 1176 00001949 6564093F52450D0A <1> 1177 00001951 2052756E206B657977- <1> db " Run keywords",9, "?RUN",13,10 1177 0000195A 6F726473093F52554E- <1> 1177 00001963 0D0A <1> 1178 <1> %if _OPTIONS 1179 00001965 204F7074696F6E7309- <1> db " Options",9, "?O",13,10 1179 0000196E 3F4F0D0A <1> 1180 <1> %endif 1181 <1> %if _BOOTLDR 1182 00001972 20426F6F74206C6F61- <1> db " Boot loading",9, "?BOOT",13,10 1182 0000197B 64696E67093F424F4F- <1> 1182 00001984 540D0A <1> 1183 <1> %endif 1184 <1> %endif 1185 00001987 206C44656275672062- <1> db " lDebug build",9, "?BUILD",13,10 1185 00001990 75696C64093F425549- <1> 1185 00001999 4C440D0A <1> 1186 0000199D 206C44656275672062- <1> db " lDebug build",9, "?B",13,10 1186 000019A6 75696C64093F420D0A <1> 1187 <1> %if _EXTHELP 1188 000019AF 206C44656275672073- <1> db " lDebug sources",9, "?SOURCE",13,10 1188 000019B8 6F7572636573093F53- <1> 1188 000019C1 4F555243450D0A <1> 1189 000019C8 206C4465627567206C- <1> db " lDebug license",9, "?L",13,10 1189 000019D1 6963656E7365093F4C- <1> 1189 000019DA 0D0A <1> 1190 <1> %endif 1191 <1> %if _PM 1192 000019DC 0D0A <1> db 13,10 1193 000019DE 50726F6D7074733A20- <1> db "Prompts: '-' = real or V86 mode; '#' = protected mode",13,10 1193 000019E7 272D27203D20726561- <1> 1193 000019F0 6C206F722056383620- <1> 1193 000019F9 6D6F64653B20272327- <1> 1193 00001A02 203D2070726F746563- <1> 1193 00001A0B 746564206D6F64650D- <1> 1193 00001A14 0A <1> 1194 <1> %endif 1195 00001A15 00 <1> asciz 1196 <1> 1197 <1> %if _EXTHELP 1198 00001A16 534F5552434500 <1> .source:asciz "SOURCE" 1199 <1> .help_source: 1200 00001A1D 546865206F72696769- <1> db "The original lDebug sources can be obtained from the repo located at",13,10 1200 00001A26 6E616C206C44656275- <1> 1200 00001A2F 6720736F7572636573- <1> 1200 00001A38 2063616E206265206F- <1> 1200 00001A41 627461696E65642066- <1> 1200 00001A4A 726F6D207468652072- <1> 1200 00001A53 65706F206C6F636174- <1> 1200 00001A5C 65642061740D0A <1> 1201 00001A63 68747470733A2F2F68- <1> db "https://hg.pushbx.org/ecm/ldebug (E. C. Masloch's repo)",13,10 1201 00001A6C 672E7075736862782E- <1> 1201 00001A75 6F72672F65636D2F6C- <1> 1201 00001A7E 64656275672028452E- <1> 1201 00001A87 20432E204D61736C6F- <1> 1201 00001A90 63682773207265706F- <1> 1201 00001A99 290D0A <1> 1202 00001A9C 0D0A <1> db 13,10 1203 00001A9E 52656C656173657320- <1> db "Releases of lDebug are available via the website at",13,10 1203 00001AA7 6F66206C4465627567- <1> 1203 00001AB0 206172652061766169- <1> 1203 00001AB9 6C61626C6520766961- <1> 1203 00001AC2 207468652077656273- <1> 1203 00001ACB 6974652061740D0A <1> 1204 00001AD3 68747470733A2F2F70- <1> db "https://pushbx.org/ecm/web/#projects-ldebug",13,10 1204 00001ADC 75736862782E6F7267- <1> 1204 00001AE5 2F65636D2F7765622F- <1> 1204 00001AEE 2370726F6A65637473- <1> 1204 00001AF7 2D6C64656275670D0A <1> 1205 00001B00 0D0A <1> db 13,10 1206 00001B02 546865206D6F737420- <1> db "The most recent manual is hosted at https://pushbx.org/ecm/doc/ in the",13,10 1206 00001B0B 726563656E74206D61- <1> 1206 00001B14 6E75616C2069732068- <1> 1206 00001B1D 6F7374656420617420- <1> 1206 00001B26 68747470733A2F2F70- <1> 1206 00001B2F 75736862782E6F7267- <1> 1206 00001B38 2F65636D2F646F632F- <1> 1206 00001B41 20696E207468650D0A <1> 1207 00001B4A 66696C6573206C6465- <1> db "files ldebug.htm, ldebug.txt, and ldebug.pdf",13,10 1207 00001B53 6275672E68746D2C20- <1> 1207 00001B5C 6C64656275672E7478- <1> 1207 00001B65 742C20616E64206C64- <1> 1207 00001B6E 656275672E7064660D- <1> 1207 00001B77 0A <1> 1208 00001B78 00 <1> asciz 1209 <1> %endif 1210 <1> 1211 <1> .re: 1212 00001B79 524500 <1> asciz "RE" 1213 <1> .help_re: 1214 00001B7C 5468652052554E2063- <1> db "The RUN commands (T, TP, P, G) and the RE command use the RE command",13,10 1214 00001B85 6F6D6D616E64732028- <1> 1214 00001B8E 542C2054502C20502C- <1> 1214 00001B97 20472920616E642074- <1> 1214 00001BA0 686520524520636F6D- <1> 1214 00001BA9 6D616E642075736520- <1> 1214 00001BB2 74686520524520636F- <1> 1214 00001BBB 6D6D616E640D0A <1> 1215 00001BC2 62756666657220746F- <1> db "buffer to run commands. Most commands are allowed to be run from the",13,10 1215 00001BCB 2072756E20636F6D6D- <1> 1215 00001BD4 616E64732E204D6F73- <1> 1215 00001BDD 7420636F6D6D616E64- <1> 1215 00001BE6 732061726520616C6C- <1> 1215 00001BEF 6F77656420746F2062- <1> 1215 00001BF8 652072756E2066726F- <1> 1215 00001C01 6D207468650D0A <1> 1216 00001C08 524520627566666572- <1> db "RE buffer. Disallowed commands include program-loading L, A, E that",13,10 1216 00001C11 2E20446973616C6C6F- <1> 1216 00001C1A 77656420636F6D6D61- <1> 1216 00001C23 6E647320696E636C75- <1> 1216 00001C2C 64652070726F677261- <1> 1216 00001C35 6D2D6C6F6164696E67- <1> 1216 00001C3E 204C2C20412C204520- <1> 1216 00001C47 746861740D0A <1> 1217 00001C4D 737769746368657320- <1> db "switches the line input mode, TSR, Q, Y, RE, and further RUN commands.",13,10 1217 00001C56 746865206C696E6520- <1> 1217 00001C5F 696E707574206D6F64- <1> 1217 00001C68 652C205453522C2051- <1> 1217 00001C71 2C20592C2052452C20- <1> 1217 00001C7A 616E64206675727468- <1> 1217 00001C83 65722052554E20636F- <1> 1217 00001C8C 6D6D616E64732E0D0A <1> 1218 00001C95 5768656E2074686520- <1> db "When the RE buffer is used as input during T, TP, or P with either",13,10 1218 00001C9E 524520627566666572- <1> 1218 00001CA7 206973207573656420- <1> 1218 00001CB0 617320696E70757420- <1> 1218 00001CB9 647572696E6720542C- <1> 1218 00001CC2 2054502C206F722050- <1> 1218 00001CCB 207769746820656974- <1> 1218 00001CD4 6865720D0A <1> 1219 00001CD9 6F6620746865205748- <1> db "of the WHILE or SILENT keywords, commands that use the auxbuff are",13,10 1219 00001CE2 494C45206F72205349- <1> 1219 00001CEB 4C454E54206B657977- <1> 1219 00001CF4 6F7264732C20636F6D- <1> 1219 00001CFD 6D616E647320746861- <1> 1219 00001D06 742075736520746865- <1> 1219 00001D0F 206175786275666620- <1> 1219 00001D18 6172650D0A <1> 1220 00001D1D 616C736F2064697361- <1> db "also disallowed and will emit an error noting the conflict.",13,10 1220 00001D26 6C6C6F77656420616E- <1> 1220 00001D2F 642077696C6C20656D- <1> 1220 00001D38 697420616E20657272- <1> 1220 00001D41 6F72206E6F74696E67- <1> 1220 00001D4A 2074686520636F6E66- <1> 1220 00001D53 6C6963742E0D0A <1> 1221 00001D5A 0D0A <1> db 13,10 1222 00001D5C 52452E4C4953542073- <1> db "RE.LIST shows the current RE buffer contents in a format usable by",13,10 1222 00001D65 686F77732074686520- <1> 1222 00001D6E 63757272656E742052- <1> 1222 00001D77 452062756666657220- <1> 1222 00001D80 636F6E74656E747320- <1> 1222 00001D89 696E206120666F726D- <1> 1222 00001D92 617420757361626C65- <1> 1222 00001D9B 2062790D0A <1> 1223 00001DA0 746865206F74686572- <1> db "the other RE commands. RE.APPEND appends the following commands to",13,10 1223 00001DA9 20524520636F6D6D61- <1> 1223 00001DB2 6E64732E2052452E41- <1> 1223 00001DBB 5050454E4420617070- <1> 1223 00001DC4 656E64732074686520- <1> 1223 00001DCD 666F6C6C6F77696E67- <1> 1223 00001DD6 20636F6D6D616E6473- <1> 1223 00001DDF 20746F0D0A <1> 1224 00001DE4 746865206275666665- <1> db "the buffer, if they fit. RE.REPLACE appends to the start of the",13,10 1224 00001DED 722C20696620746865- <1> 1224 00001DF6 79206669742E205245- <1> 1224 00001DFF 2E5245504C41434520- <1> 1224 00001E08 617070656E64732074- <1> 1224 00001E11 6F2074686520737461- <1> 1224 00001E1A 7274206F6620746865- <1> 1224 00001E23 0D0A <1> 1225 00001E25 6275666665722E2057- <1> db "buffer. When specifying commands, an unescaped semicolon is parsed",13,10 1225 00001E2E 68656E207370656369- <1> 1225 00001E37 6679696E6720636F6D- <1> 1225 00001E40 6D616E64732C20616E- <1> 1225 00001E49 20756E657363617065- <1> 1225 00001E52 642073656D69636F6C- <1> 1225 00001E5B 6F6E20697320706172- <1> 1225 00001E64 7365640D0A <1> 1226 00001E69 61732061206C696E65- <1> db "as a linebreak to break apart individual commands. Backslashes can",13,10 1226 00001E72 627265616B20746F20- <1> 1226 00001E7B 627265616B20617061- <1> 1226 00001E84 727420696E64697669- <1> 1226 00001E8D 6475616C20636F6D6D- <1> 1226 00001E96 616E64732E20426163- <1> 1226 00001E9F 6B736C617368657320- <1> 1226 00001EA8 63616E0D0A <1> 1227 00001EAD 626520757365642074- <1> db "be used to escape semicolons and backslashes themselves.",13,10 1227 00001EB6 6F2065736361706520- <1> 1227 00001EBF 73656D69636F6C6F6E- <1> 1227 00001EC8 7320616E6420626163- <1> 1227 00001ED1 6B736C617368657320- <1> 1227 00001EDA 7468656D73656C7665- <1> 1227 00001EE3 732E0D0A <1> 1228 00001EE7 0D0A <1> db 13,10 1229 00001EE9 507265666978696E67- <1> db "Prefixing a line with an @ (AT sign) causes the command not to be",13,10 1229 00001EF2 2061206C696E652077- <1> 1229 00001EFB 69746820616E204020- <1> 1229 00001F04 284154207369676E29- <1> 1229 00001F0D 206361757365732074- <1> 1229 00001F16 686520636F6D6D616E- <1> 1229 00001F1F 64206E6F7420746F20- <1> 1229 00001F28 62650D0A <1> 1230 00001F2C 73686F776E20746F20- <1> db "shown to the standard output of the debugger when run. Otherwise,",13,10 1230 00001F35 746865207374616E64- <1> 1230 00001F3E 617264206F75747075- <1> 1230 00001F47 74206F662074686520- <1> 1230 00001F50 646562756767657220- <1> 1230 00001F59 7768656E2072756E2E- <1> 1230 00001F62 204F74686572776973- <1> 1230 00001F6B 652C0D0A <1> 1231 00001F6F 74686520636F6D6D61- <1> db "the command will be shown with a percent sign % or ~% prompt.",13,10 1231 00001F78 6E642077696C6C2062- <1> 1231 00001F81 652073686F776E2077- <1> 1231 00001F8A 697468206120706572- <1> 1231 00001F93 63656E74207369676E- <1> 1231 00001F9C 2025206F72207E2520- <1> 1231 00001FA5 70726F6D70742E0D0A <1> 1232 00001FAE 0D0A <1> db 13,10 1233 00001FB0 546865206465666175- <1> db "The default RE buffer content is @R. This content is also",13,10 1233 00001FB9 6C7420524520627566- <1> 1233 00001FC2 66657220636F6E7465- <1> 1233 00001FCB 6E742069732040522E- <1> 1233 00001FD4 205468697320636F6E- <1> 1233 00001FDD 74656E742069732061- <1> 1233 00001FE6 6C736F0D0A <1> 1234 00001FEB 646574656374656420- <1> db "detected and handled specifically; if found as the only command",13,10 1234 00001FF4 616E642068616E646C- <1> 1234 00001FFD 656420737065636966- <1> 1234 00002006 6963616C6C793B2069- <1> 1234 0000200F 6620666F756E642061- <1> 1234 00002018 7320746865206F6E6C- <1> 1234 00002021 7920636F6D6D616E64- <1> 1234 0000202A 0D0A <1> 1235 0000202C 7468652068616E646C- <1> db "the handler directly calls the register dump implementation",13,10 1235 00002035 657220646972656374- <1> 1235 0000203E 6C792063616C6C7320- <1> 1235 00002047 746865207265676973- <1> 1235 00002050 7465722064756D7020- <1> 1235 00002059 696D706C656D656E74- <1> 1235 00002062 6174696F6E0D0A <1> 1236 00002069 776974686F75742073- <1> db "without setting up and tearing down the special execution",13,10 1236 00002072 657474696E67207570- <1> 1236 0000207B 20616E642074656172- <1> 1236 00002084 696E6720646F776E20- <1> 1236 0000208D 746865207370656369- <1> 1236 00002096 616C20657865637574- <1> 1236 0000209F 696F6E0D0A <1> 1237 000020A4 656E7669726F6E6D65- <1> db "environment used to run arbitrary commands from the RE buffer.",13,10 1237 000020AD 6E7420757365642074- <1> 1237 000020B6 6F2072756E20617262- <1> 1237 000020BF 69747261727920636F- <1> 1237 000020C8 6D6D616E6473206672- <1> 1237 000020D1 6F6D20746865205245- <1> 1237 000020DA 206275666665722E0D- <1> 1237 000020E3 0A <1> 1238 000020E4 00 <1> asciz 1239 <1> 1240 <1> .run: 1241 000020E5 52554E00 <1> asciz "RUN" 1242 <1> .help_run: 1243 000020E9 542028747261636529- <1> db "T (trace), TP (trace except proceed past string operations), and P (proceed)",13,10 1243 000020F2 2C2054502028747261- <1> 1243 000020FB 636520657863657074- <1> 1243 00002104 2070726F6365656420- <1> 1243 0000210D 706173742073747269- <1> 1243 00002116 6E67206F7065726174- <1> 1243 0000211F 696F6E73292C20616E- <1> 1243 00002128 642050202870726F63- <1> 1243 00002131 656564290D0A <1> 1244 00002137 63616E20626520666F- <1> db "can be followed by a number of repetitions and then the keyword WHILE,",13,10 1244 00002140 6C6C6F776564206279- <1> 1244 00002149 2061206E756D626572- <1> 1244 00002152 206F66207265706574- <1> 1244 0000215B 6974696F6E7320616E- <1> 1244 00002164 64207468656E207468- <1> 1244 0000216D 65206B6579776F7264- <1> 1244 00002176 205748494C452C0D0A <1> 1245 0000217F 7768696368206D7573- <1> db "which must be followed by a conditional expression.",13,10 1245 00002188 7420626520666F6C6C- <1> 1245 00002191 6F7765642062792061- <1> 1245 0000219A 20636F6E646974696F- <1> 1245 000021A3 6E616C206578707265- <1> 1245 000021AC 7373696F6E2E0D0A <1> 1246 000021B4 0D0A <1> db 13,10 1247 000021B6 5468652073656C6563- <1> db "The selected run command is repeated as many times as specified by the",13,10 1247 000021BF 7465642072756E2063- <1> 1247 000021C8 6F6D6D616E64206973- <1> 1247 000021D1 207265706561746564- <1> 1247 000021DA 206173206D616E7920- <1> 1247 000021E3 74696D657320617320- <1> 1247 000021EC 737065636966696564- <1> 1247 000021F5 206279207468650D0A <1> 1248 000021FE 6E756D6265722C206F- <1> db "number, or until the WHILE condition evaluates no longer to true.",13,10 1248 00002207 7220756E74696C2074- <1> 1248 00002210 6865205748494C4520- <1> 1248 00002219 636F6E646974696F6E- <1> 1248 00002222 206576616C75617465- <1> 1248 0000222B 73206E6F206C6F6E67- <1> 1248 00002234 657220746F20747275- <1> 1248 0000223D 652E0D0A <1> 1249 00002241 0D0A <1> db 13,10 1250 00002243 416674657220746865- <1> db "After the number of repetitions or (if present) after the WHILE condition",13,10 1250 0000224C 206E756D626572206F- <1> 1250 00002255 662072657065746974- <1> 1250 0000225E 696F6E73206F722028- <1> 1250 00002267 69662070726573656E- <1> 1250 00002270 742920616674657220- <1> 1250 00002279 746865205748494C45- <1> 1250 00002282 20636F6E646974696F- <1> 1250 0000228B 6E0D0A <1> 1251 0000228E 746865206B6579776F- <1> db "the keyword SILENT may follow. If that is the case, all register dumps",13,10 1251 00002297 72642053494C454E54- <1> 1251 000022A0 206D617920666F6C6C- <1> 1251 000022A9 6F772E204966207468- <1> 1251 000022B2 617420697320746865- <1> 1251 000022BB 20636173652C20616C- <1> 1251 000022C4 6C2072656769737465- <1> 1251 000022CD 722064756D70730D0A <1> 1252 000022D6 646F6E652064757269- <1> db "done during the run are buffered by the debugger and the run remains",13,10 1252 000022DF 6E6720746865207275- <1> 1252 000022E8 6E2061726520627566- <1> 1252 000022F1 666572656420627920- <1> 1252 000022FA 746865206465627567- <1> 1252 00002303 67657220616E642074- <1> 1252 0000230C 68652072756E207265- <1> 1252 00002315 6D61696E730D0A <1> 1253 0000231C 73696C656E742E2041- <1> db "silent. After the run, the last dumps are replayed from the buffer",13,10 1253 00002325 667465722074686520- <1> 1253 0000232E 72756E2C2074686520- <1> 1253 00002337 6C6173742064756D70- <1> 1253 00002340 732061726520726570- <1> 1253 00002349 6C617965642066726F- <1> 1253 00002352 6D2074686520627566- <1> 1253 0000235B 6665720D0A <1> 1254 00002360 616E6420646973706C- <1> db "and displayed. At most as many dumps as fit into the buffer are",13,10 1254 00002369 617965642E20417420- <1> 1254 00002372 6D6F7374206173206D- <1> 1254 0000237B 616E792064756D7073- <1> 1254 00002384 206173206669742069- <1> 1254 0000238D 6E746F207468652062- <1> 1254 00002396 756666657220617265- <1> 1254 0000239F 0D0A <1> 1255 000023A1 646973706C61796564- <1> db "displayed. (The buffer is currently up to 8 KiB sized.)",13,10 1255 000023AA 2E2028546865206275- <1> 1255 000023B3 666665722069732063- <1> 1255 000023BC 757272656E746C7920- <1> 1255 000023C5 757020746F2038204B- <1> 1255 000023CE 69422073697A65642E- <1> 1255 000023D7 290D0A <1> 1256 000023DA 0D0A <1> db 13,10 1257 000023DC 49662061206E756D62- <1> db "If a number follows behind the SILENT keyword, only at most that many",13,10 1257 000023E5 657220666F6C6C6F77- <1> 1257 000023EE 7320626568696E6420- <1> 1257 000023F7 7468652053494C454E- <1> 1257 00002400 54206B6579776F7264- <1> 1257 00002409 2C206F6E6C79206174- <1> 1257 00002412 206D6F737420746861- <1> 1257 0000241B 74206D616E790D0A <1> 1258 00002423 64756D707320617265- <1> db "dumps are displayed from the buffer. The dumps that are displayed",13,10 1258 0000242C 20646973706C617965- <1> 1258 00002435 642066726F6D207468- <1> 1258 0000243E 65206275666665722E- <1> 1258 00002447 205468652064756D70- <1> 1258 00002450 732074686174206172- <1> 1258 00002459 6520646973706C6179- <1> 1258 00002462 65640D0A <1> 1259 00002466 61726520616C776179- <1> db "are always those last written into the buffer, thus last occurred.",13,10 1259 0000246F 732074686F7365206C- <1> 1259 00002478 617374207772697474- <1> 1259 00002481 656E20696E746F2074- <1> 1259 0000248A 686520627566666572- <1> 1259 00002493 2C2074687573206C61- <1> 1259 0000249C 7374206F6363757272- <1> 1259 000024A5 65642E0D0A <1> 1260 000024AA 00 <1> asciz 1261 <1> 1262 000024AB 00 <1> align 2, db 0 1263 <1> .build_array: 1264 000024AC [BE24] <1> dw .build_nameversion 1265 000024AE [3E25] <1> dw .build_lmacros 1266 000024B0 [7E25] <1> dw .build_scanptab 1267 000024B2 [BE25] <1> dw .build_inicomp 1268 <1> %if _CHECKSUM 1269 <1> dw .build_inicheck 1270 <1> %endif 1271 000024B4 [FE25] <1> dw .build_ldosboot 1272 <1> .build_short_amount: equ ($ - .build_array) / 2 1273 000024B6 [3E26] <1> dw .build_long 1274 <1> .build_long_amount: equ ($ - .build_array) / 2 1275 <1> 1276 <1> .string_build: 1277 000024B8 4255494C4400 <1> asciz "BUILD" 1278 <1> 1279 <1> .build_nameversion: 1280 000024BE 6C4465627567582028- <1> db _PROGNAME,_VERSION,13,10 1280 000024C7 323032322D30342D32- <1> 1280 000024D0 31290D0A <1> 1281 <1> %ifnidn _REVISIONID,"" 1282 000024D4 536F7572636520436F- <1> db "Source Control Revision ID: ",_REVISIONID,13,10 1282 000024DD 6E74726F6C20526576- <1> 1282 000024E6 6973696F6E2049443A- <1> 1282 000024EF 206867206338383061- <1> 1282 000024F8 643964336366632B20- <1> 1282 00002501 283236393620616E63- <1> 1282 0000250A 6573746F7273290D0A <1> 1283 <1> %endif 1284 00002513 00 <1> asciz 1285 00002514 00 <1> _fill 128, 0, .build_nameversion 1286 <1> .build_lmacros: 1287 0000253E 55736573206C6D6163- <1> fill 64, 0, asciz _REVISIONID_LMACROS 1287 00002547 726F733A2020526576- <1> 1287 00002550 6973696F6E20494420- <1> 1287 00002559 686720396661306536- <1> 1287 00002562 343033346364202831- <1> 1287 0000256B 353020616E63657374- <1> 1287 00002574 6F7273290D0A0000- <1> 1287 00002574 <1> 1288 <1> .build_scanptab: 1289 0000257E 55736573207363616E- <1> fill 64, 0, asciz _REVISIONID_SCANPTAB 1289 00002587 707461623A20526576- <1> 1289 00002590 6973696F6E20494420- <1> 1289 00002599 686720306535333038- <1> 1289 000025A2 316331353331202831- <1> 1289 000025AB 3020616E636573746F- <1> 1289 000025B4 7273290D0A0000- <1> 1289 000025B4 <1> 1290 <1> .build_inicomp: 1291 000025BE 5573657320696E6963- <1> fill 64, 0, asciz _REVISIONID_INICOMP 1291 000025C7 6F6D703A2020526576- <1> 1291 000025D0 6973696F6E20494420- <1> 1291 000025D9 686720363433313030- <1> 1291 000025E2 646533363934202835- <1> 1291 000025EB 333220616E63657374- <1> 1291 000025F4 6F7273290D0A0000- <1> 1291 000025F4 <1> 1292 <1> %if _CHECKSUM 1293 <1> .build_inicheck: 1294 <1> fill 64, 0, asciz _REVISIONID_INICHECK 1295 <1> %endif 1296 <1> .build_ldosboot: 1297 000025FE 55736573206C646F73- <1> fill 64, 0, asciz _REVISIONID_LDOSBOOT 1297 00002607 626F6F743A20526576- <1> 1297 00002610 6973696F6E20494420- <1> 1297 00002619 686720306435346665- <1> 1297 00002622 346161613036202835- <1> 1297 0000262B 373120616E63657374- <1> 1297 00002634 6F7273290D0A0000- <1> 1297 00002634 <1> 1298 <1> 1299 <1> .build_long: 1300 <1> %if _EXTHELP 1301 0000263E 0D0A <1> db 13,10 1302 <1> %if _PM 1303 00002640 44504D492D63617061- <1> db "DPMI-capable",13,10 1303 00002649 626C650D0A <1> 1304 <1> %if _NOEXTENDER 1305 0000264E 2044504D4920686F73- <1> db " DPMI host without extender",13,10 1305 00002657 7420776974686F7574- <1> 1305 00002660 20657874656E646572- <1> 1305 00002669 0D0A <1> 1306 <1> %endif 1307 <1> %if 0 1308 <1> %if _WIN9XSUPP 1309 <1> db " No Windows 4 DPMI hook",13,10 1310 <1> %endif 1311 <1> %if _PM && _DOSEMU 1312 <1> db " No DOSEMU DPMI hook",13,10 1313 <1> %endif 1314 <1> %else 1315 0000266B 204175746F6D617469- <1> db " Automatic DPMI entrypoint hook detection",13,10 1315 00002674 632044504D4920656E- <1> 1315 0000267D 747279706F696E7420- <1> 1315 00002686 686F6F6B2064657465- <1> 1315 0000268F 6374696F6E0D0A <1> 1316 <1> %endif 1317 <1> %if _EXCCSIP 1318 00002696 20446973706C617920- <1> db " Display exception address",13,10 1318 0000269F 657863657074696F6E- <1> 1318 000026A8 20616464726573730D- <1> 1318 000026B1 0A <1> 1319 <1> %endif 1320 <1> %if _DISPHOOK 1321 000026B2 20446973706C617920- <1> db " Display hooking DPMI entry",13,10 1321 000026BB 686F6F6B696E672044- <1> 1321 000026C4 504D4920656E747279- <1> 1321 000026CD 0D0A <1> 1322 <1> %endif 1323 <1> %endif 1324 <1> %if _DEBUG 1325 <1> db "Debuggable",13,10 1326 <1> %endif 1327 <1> %if _INT 1328 000026CF 444920636F6D6D616E- <1> db "DI command",13,10 1328 000026D8 640D0A <1> 1329 <1> %endif 1330 <1> %if _MCB 1331 000026DB 444D20636F6D6D616E- <1> db "DM command",13,10 1331 000026E4 640D0A <1> 1332 <1> %endif 1333 <1> %if _DSTRINGS 1334 000026E7 4420737472696E6720- <1> db "D string commands",13,10 1334 000026F0 636F6D6D616E64730D- <1> 1334 000026F9 0A <1> 1335 <1> %endif 1336 <1> %if _SDUMP 1337 000026FA 53206D617463682064- <1> db "S match dumps line of following data",13,10 1337 00002703 756D7073206C696E65- <1> 1337 0000270C 206F6620666F6C6C6F- <1> 1337 00002715 77696E672064617461- <1> 1337 0000271E 0D0A <1> 1338 <1> %endif 1339 <1> %if _RN 1340 00002720 524E20636F6D6D616E- <1> db "RN command",13,10 1340 00002729 640D0A <1> 1341 <1> %endif 1342 <1> %if _USESDA 1343 0000272C 416363657373205344- <1> db "Access SDA current PSP field",13,10 1343 00002735 412063757272656E74- <1> 1343 0000273E 20505350206669656C- <1> 1343 00002747 640D0A <1> 1344 <1> %endif 1345 <1> %if _VDD 1346 0000274A 4C6F6164204E545644- <1> db "Load NTVDM VDD for sector access",13,10 1346 00002753 4D2056444420666F72- <1> 1346 0000275C 20736563746F722061- <1> 1346 00002765 63636573730D0A <1> 1347 <1> %endif 1348 <1> %if _EMS 1349 0000276C 5820636F6D6D616E64- <1> db "X commands for EMS access",13,10 1349 00002775 7320666F7220454D53- <1> 1349 0000277E 206163636573730D0A <1> 1350 <1> %endif 1351 <1> %if _MMXSUPP 1352 00002787 524D20636F6D6D616E- <1> db "RM command and reading MMX registers as variables",13,10 1352 00002790 6420616E6420726561- <1> 1352 00002799 64696E67204D4D5820- <1> 1352 000027A2 726567697374657273- <1> 1352 000027AB 206173207661726961- <1> 1352 000027B4 626C65730D0A <1> 1353 <1> %endif 1354 <1> %if _EXPRESSIONS 1355 000027BA 45787072657373696F- <1> db "Expression evaluator",13,10 1355 000027C3 6E206576616C756174- <1> 1355 000027CC 6F720D0A <1> 1356 <1> %endif 1357 <1> %if _INDIRECTION 1358 000027D0 20496E646972656374- <1> db " Indirection in expressions",13,10 1358 000027D9 696F6E20696E206578- <1> 1358 000027E2 7072657373696F6E73- <1> 1358 000027EB 0D0A <1> 1359 <1> %endif 1360 <1> %if _VARIABLES 1361 000027ED 5661726961626C6573- <1> db "Variables with user-defined purpose",13,10 1361 000027F6 207769746820757365- <1> 1361 000027FF 722D646566696E6564- <1> 1361 00002808 20707572706F73650D- <1> 1361 00002811 0A <1> 1362 <1> %endif 1363 <1> %if _OPTIONS 1364 00002812 446562756767657220- <1> db "Debugger option and status variables",13,10 1364 0000281B 6F7074696F6E20616E- <1> 1364 00002824 642073746174757320- <1> 1364 0000282D 7661726961626C6573- <1> 1364 00002836 0D0A <1> 1365 <1> %endif 1366 <1> %if _PSPVARIABLES 1367 00002838 505350207661726961- <1> db "PSP variables",13,10 1367 00002841 626C65730D0A <1> 1368 <1> %endif 1369 <1> %if _COND 1370 00002847 436F6E646974696F6E- <1> db "Conditional jump notice in register dump",13,10 1370 00002850 616C206A756D70206E- <1> 1370 00002859 6F7469636520696E20- <1> 1370 00002862 726567697374657220- <1> 1370 0000286B 64756D700D0A <1> 1371 <1> %endif 1372 <1> %if _TSR 1373 00002871 545352206D6F646520- <1> db "TSR mode (Process detachment)",13,10 1373 0000287A 2850726F6365737320- <1> 1373 00002883 6465746163686D656E- <1> 1373 0000288C 74290D0A <1> 1374 <1> %endif 1375 <1> %if _DEVICE 1376 <1> db "Loadable device driver",13,10 1377 <1> %endif 1378 <1> %if _BOOTLDR 1379 00002890 426F6F74206C6F6164- <1> db "Boot loader",13,10 1379 00002899 65720D0A <1> 1380 <1> %endif 1381 <1> %if _BREAKPOINTS 1382 0000289D 5065726D616E656E74- <1> db "Permanent breakpoints",13,10 1382 000028A6 20627265616B706F69- <1> 1382 000028AF 6E74730D0A <1> 1383 <1> %endif 1384 <1> %push 1385 000028B4 496E74657263657074- <1> db "Intercepted" 1385 000028BD 6564 <1> 1386 <1> %if _PM 1387 000028BF 2038364D <1> db " 86M" 1388 <1> %endif 1389 000028C3 20696E746572727570- <1> db " interrupts:" 1389 000028CC 74733A <1> 1390 <1> %define %$pref " " 1391 <1> %macro dispint 2.nolist 1392 <1> %if %1 1393 <1> db %$pref, %2 1394 <1> %define %$pref ", " 1395 <1> %endif 1396 <1> %endmacro 1397 000028CF 203030 <1> dispint _CATCHINT00, "00" 1398 000028D2 2C203031 <1> dispint _CATCHINT01, "01" 1399 000028D6 2C203033 <1> dispint _CATCHINT03, "03" 1400 000028DA 2C203036 <1> dispint _CATCHINT06, "06" 1401 000028DE 2C203138 <1> dispint _CATCHINT18, "18" 1402 000028E2 2C203139 <1> dispint _CATCHINT19, "19" 1403 <1> %ifidn %$pref," " 1404 <1> db " none" 1405 <1> %endif 1406 000028E6 0D0A <1> db 13,10 1407 <1> %if _PM || _CATCHINT08 1408 000028E8 50726F636573736564 <1> db "Processed" 1409 <1> %if _PM 1410 000028F1 2038364D <1> db " 86M" 1411 <1> %endif 1412 000028F5 20696E746572727570- <1> db " interrupts:" 1412 000028FE 74733A <1> 1413 <1> %define %$pref " " 1414 00002901 203038 <1> dispint _CATCHINT08, "08" 1415 00002904 2C2032462E31363837 <1> dispint _PM, "2F.1687" 1416 <1> %ifidn %$pref," " 1417 <1> db " none" 1418 <1> %endif 1419 0000290D 0D0A <1> db 13,10 1420 <1> %endif 1421 <1> %if _PM 1422 0000290F 496E74657263657074- <1> db "Intercepted DPMI exceptions:" 1422 00002918 65642044504D492065- <1> 1422 00002921 7863657074696F6E73- <1> 1422 0000292A 3A <1> 1423 <1> %define %$pref " " 1424 0000292B 203030 <1> dispint _CATCHEXC00, "00" 1425 0000292E 2C203031 <1> dispint _CATCHEXC01, "01" 1426 00002932 2C203033 <1> dispint _CATCHEXC03, "03" 1427 00002936 2C203036 <1> dispint _CATCHEXC06, "06" 1428 0000293A 2C203043 <1> dispint _CATCHEXC0C, "0C" 1429 0000293E 2C203044 <1> dispint _CATCHEXC0D, "0D" 1430 00002942 2C203045 <1> dispint _CATCHEXC0E, "0E" 1431 <1> %ifidn %$pref," " 1432 <1> db " none" 1433 <1> %endif 1434 00002946 0D0A <1> db 13,10 1435 <1> %endif 1436 <1> %unmacro dispint 2.nolist 1437 <1> %pop 1438 <1> %if _PM && _CATCHPMINT214C 1439 00002948 50726F636573736564- <1> db "Processed DPMI interrupts: 21.4C",13,10 1439 00002951 2044504D4920696E74- <1> 1439 0000295A 657272757074733A20- <1> 1439 00002963 32312E34430D0A <1> 1440 <1> %endif 1441 <1> %if _EXTHELP 1442 0000296A 457874656E64656420- <1> db "Extended built-in help pages",13,10 1442 00002973 6275696C742D696E20- <1> 1442 0000297C 68656C702070616765- <1> 1442 00002985 730D0A <1> 1443 <1> %endif 1444 <1> %if _ONLYNON386 1445 <1> db "Only supports non-386 operation",13,10 1446 <1> %endif 1447 <1> %if _ONLY386 1448 <1> db "Only supports 386+ operation",13,10 1449 <1> %endif 1450 <1> %else 1451 <1> %if _BOOTLDR 1452 <1> asciz 1453 <1> ; This message is used by mak.sh to detect that we 1454 <1> ; are building with boot load support. 1455 <1> db 13,10,"Boot loader",13,10 1456 <1> %endif 1457 <1> %endif 1458 00002988 00 <1> asciz 1459 <1> 1460 <1> %if _EXTHELP 1461 <1> .license: 1462 00002989 6C4465627567202D20- <1> db "lDebug - libre 86-DOS debugger",13,10 1462 00002992 6C696272652038362D- <1> 1462 0000299B 444F53206465627567- <1> 1462 000029A4 6765720D0A <1> 1463 000029A9 0D0A <1> db 13,10 1464 000029AB 436F70797269676874- <1> db "Copyright (C) 1995-2003 Paul Vojta",13,10 1464 000029B4 202843292031393935- <1> 1464 000029BD 2D3230303320506175- <1> 1464 000029C6 6C20566F6A74610D0A <1> 1465 000029CF 436F70797269676874- <1> db "Copyright (C) 2008-2021 C. Masloch",13,10 1465 000029D8 202843292032303038- <1> 1465 000029E1 2D3230323120432E20- <1> 1465 000029EA 4D61736C6F63680D0A <1> 1466 000029F3 0D0A <1> db 13,10 1467 000029F5 5573616765206F6620- <1> db "Usage of the works is permitted provided that this",13,10 1467 000029FE 74686520776F726B73- <1> 1467 00002A07 206973207065726D69- <1> 1467 00002A10 747465642070726F76- <1> 1467 00002A19 696465642074686174- <1> 1467 00002A22 20746869730D0A <1> 1468 00002A29 696E737472756D656E- <1> db "instrument is retained with the works, so that any entity",13,10 1468 00002A32 742069732072657461- <1> 1468 00002A3B 696E65642077697468- <1> 1468 00002A44 2074686520776F726B- <1> 1468 00002A4D 732C20736F20746861- <1> 1468 00002A56 7420616E7920656E74- <1> 1468 00002A5F 6974790D0A <1> 1469 00002A64 746861742075736573- <1> db "that uses the works is notified of this instrument.",13,10 1469 00002A6D 2074686520776F726B- <1> 1469 00002A76 73206973206E6F7469- <1> 1469 00002A7F 66696564206F662074- <1> 1469 00002A88 68697320696E737472- <1> 1469 00002A91 756D656E742E0D0A <1> 1470 00002A99 0D0A <1> db 13,10 1471 00002A9B 444953434C41494D45- <1> db "DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY.",13,10 1471 00002AA4 523A2054484520574F- <1> 1471 00002AAD 524B53204152452057- <1> 1471 00002AB6 4954484F5554205741- <1> 1471 00002ABF 5252414E54592E0D0A <1> 1472 00002AC8 0D0A <1> db 13,10 1473 00002ACA 0D0A <1> db 13,10 1474 00002ACC 416C6C20636F6E7472- <1> db "All contributions by Paul Vojta or C. Masloch to the debugger are available",13,10 1474 00002AD5 69627574696F6E7320- <1> 1474 00002ADE 6279205061756C2056- <1> 1474 00002AE7 6F6A7461206F722043- <1> 1474 00002AF0 2E204D61736C6F6368- <1> 1474 00002AF9 20746F207468652064- <1> 1474 00002B02 656275676765722061- <1> 1474 00002B0B 726520617661696C61- <1> 1474 00002B14 626C650D0A <1> 1475 00002B19 756E64657220612063- <1> db "under a choice of three different licenses. These are the Fair License, the",13,10 1475 00002B22 686F696365206F6620- <1> 1475 00002B2B 746872656520646966- <1> 1475 00002B34 666572656E74206C69- <1> 1475 00002B3D 63656E7365732E2054- <1> 1475 00002B46 686573652061726520- <1> 1475 00002B4F 746865204661697220- <1> 1475 00002B58 4C6963656E73652C20- <1> 1475 00002B61 7468650D0A <1> 1476 00002B66 53696D706C69666965- <1> db "Simplified 2-Clause BSD License, or the MIT License.",13,10 1476 00002B6F 6420322D436C617573- <1> 1476 00002B78 6520425344204C6963- <1> 1476 00002B81 656E73652C206F7220- <1> 1476 00002B8A 746865204D4954204C- <1> 1476 00002B93 6963656E73652E0D0A <1> 1477 00002B9C 0D0A <1> db 13,10 1478 00002B9E 546869732069732074- <1> db "This is the license and copyright information that applies to lDebug; but note",13,10 1478 00002BA7 6865206C6963656E73- <1> 1478 00002BB0 6520616E6420636F70- <1> 1478 00002BB9 79726967687420696E- <1> 1478 00002BC2 666F726D6174696F6E- <1> 1478 00002BCB 207468617420617070- <1> 1478 00002BD4 6C69657320746F206C- <1> 1478 00002BDD 44656275673B206275- <1> 1478 00002BE6 74206E6F74650D0A <1> 1479 00002BEE 746861742074686572- <1> db "that there have been substantial contributions to the code base that are not",13,10 1479 00002BF7 652068617665206265- <1> 1479 00002C00 656E20737562737461- <1> 1479 00002C09 6E7469616C20636F6E- <1> 1479 00002C12 747269627574696F6E- <1> 1479 00002C1B 7320746F2074686520- <1> 1479 00002C24 636F64652062617365- <1> 1479 00002C2D 207468617420617265- <1> 1479 00002C36 206E6F740D0A <1> 1480 00002C3C 636F70797269676874- <1> db "copyrighted (public domain).",13,10 1480 00002C45 656420287075626C69- <1> 1480 00002C4E 6320646F6D61696E29- <1> 1480 00002C57 2E0D0A <1> 1481 00002C5A 00 <1> asciz 1482 <1> 1483 <1> .reghelp: 1484 00002C5B 417661696C61626C65- <1> db "Available 16-bit registers:",9,9,"Available 32-bit registers: (386+)",13,10 1484 00002C64 2031362D6269742072- <1> 1484 00002C6D 65676973746572733A- <1> 1484 00002C76 0909417661696C6162- <1> 1484 00002C7F 6C652033322D626974- <1> 1484 00002C88 207265676973746572- <1> 1484 00002C91 733A20283338362B29- <1> 1484 00002C9A 0D0A <1> 1485 00002C9C 415809416363756D75- <1> db "AX",9,"Accumulator",9,9,9,"EAX",13,10 1485 00002CA5 6C61746F7209090945- <1> 1485 00002CAE 41580D0A <1> 1486 00002CB2 425809426173652072- <1> db "BX",9,"Base register",9,9,9,"EBX",13,10 1486 00002CBB 656769737465720909- <1> 1486 00002CC4 094542580D0A <1> 1487 00002CCA 435809436F756E7465- <1> db "CX",9,"Counter",9,9,9,9,"ECX",13,10 1487 00002CD3 72090909094543580D- <1> 1487 00002CDC 0A <1> 1488 00002CDD 445809446174612072- <1> db "DX",9,"Data register",9,9,9,"EDX",13,10 1488 00002CE6 656769737465720909- <1> 1488 00002CEF 094544580D0A <1> 1489 00002CF5 535009537461636B20- <1> db "SP",9,"Stack pointer",9,9,9,"ESP",13,10 1489 00002CFE 706F696E7465720909- <1> 1489 00002D07 094553500D0A <1> 1490 00002D0D 425009426173652070- <1> db "BP",9,"Base pointer",9,9,9,"EBP",13,10 1490 00002D16 6F696E746572090909- <1> 1490 00002D1F 4542500D0A <1> 1491 00002D24 534909536F75726365- <1> db "SI",9,"Source index",9,9,9,"ESI",13,10 1491 00002D2D 20696E646578090909- <1> 1491 00002D36 4553490D0A <1> 1492 00002D3B 44490944657374696E- <1> db "DI",9,"Destination index",9,9,"EDI",13,10 1492 00002D44 6174696F6E20696E64- <1> 1492 00002D4D 657809094544490D0A <1> 1493 00002D56 445309446174612073- <1> db "DS",9,"Data segment",13,10 1493 00002D5F 65676D656E740D0A <1> 1494 00002D67 455309457874726120- <1> db "ES",9,"Extra segment",13,10 1494 00002D70 7365676D656E740D0A <1> 1495 00002D79 535309537461636B20- <1> db "SS",9,"Stack segment",13,10 1495 00002D82 7365676D656E740D0A <1> 1496 00002D8B 435309436F64652073- <1> db "CS",9,"Code segment",13,10 1496 00002D94 65676D656E740D0A <1> 1497 00002D9C 465309457874726120- <1> db "FS",9,"Extra segment 2 (386+)",13,10 1497 00002DA5 7365676D656E742032- <1> 1497 00002DAE 20283338362B290D0A <1> 1498 00002DB7 475309457874726120- <1> db "GS",9,"Extra segment 3 (386+)",13,10 1498 00002DC0 7365676D656E742033- <1> 1498 00002DC9 20283338362B290D0A <1> 1499 00002DD2 495009496E73747275- <1> db "IP",9,"Instruction pointer",9,9,"EIP",13,10 1499 00002DDB 6374696F6E20706F69- <1> 1499 00002DE4 6E7465720909454950- <1> 1499 00002DED 0D0A <1> 1500 00002DEF 464C09466C61677309- <1> db "FL",9,"Flags",9,9,9,9,"EFL",13,10 1500 00002DF8 09090945464C0D0A <1> 1501 00002E00 0D0A <1> db 13,10 1502 <1> %if _MMXSUPP && 0 1503 <1> db "Available 64-bit Matrix Math Extension (MMX) registers: (if supported)",13,10 1504 <1> db "MMx",9,"MM(x)",9,"MMX register x, where x is 0 to 7",13,10 1505 <1> db 13,10 1506 <1> %endif 1507 00002E02 456E746572203F4620- <1> db "Enter ?F to display the recognized flags.",13,10 1507 00002E0B 746F20646973706C61- <1> 1507 00002E14 792074686520726563- <1> 1507 00002E1D 6F676E697A65642066- <1> 1507 00002E26 6C6167732E0D0A <1> 1508 00002E2D 00 <1> asciz 1509 <1> 1510 <1> .flaghelp: 1511 00002E2E 5265636F676E697A65- <1> db "Recognized flags:",13,10 1511 00002E37 6420666C6167733A0D- <1> 1511 00002E40 0A <1> 1512 00002E41 56616C7565094E616D- <1> db "Value",9,"Name",9,9,9, " Set",9,9,9, " Clear",13,10 1512 00002E4A 650909092020536574- <1> 1512 00002E53 0909092020436C6561- <1> 1512 00002E5C 720D0A <1> 1513 00002E5F 3038303020204F4620- <1> db "0800 OF Overflow Flag",9,9,"OV Overflow",9,9, "NV No overflow",13,10 1513 00002E68 204F766572666C6F77- <1> 1513 00002E71 20466C616709094F56- <1> 1513 00002E7A 20204F766572666C6F- <1> 1513 00002E83 7709094E5620204E6F- <1> 1513 00002E8C 206F766572666C6F77- <1> 1513 00002E95 0D0A <1> 1514 00002E97 303430302020444620- <1> db "0400 DF Direction Flag",9,"DN Down",9,9, "UP Up",13,10 1514 00002EA0 20446972656374696F- <1> 1514 00002EA9 6E20466C616709444E- <1> 1514 00002EB2 2020446F776E090955- <1> 1514 00002EBB 50202055700D0A <1> 1515 00002EC2 303230302020494620- <1> db "0200 IF Interrupt Flag",9,"EI Enable interrupts",9,"DI Disable interrupts",13,10 1515 00002ECB 20496E746572727570- <1> 1515 00002ED4 7420466C6167094549- <1> 1515 00002EDD 2020456E61626C6520- <1> 1515 00002EE6 696E74657272757074- <1> 1515 00002EEF 730944492020446973- <1> 1515 00002EF8 61626C6520696E7465- <1> 1515 00002F01 7272757074730D0A <1> 1516 00002F09 303038302020534620- <1> db "0080 SF Sign Flag",9,9, "NG Negative",9,9, "PL Plus",13,10 1516 00002F12 205369676E20466C61- <1> 1516 00002F1B 6709094E4720204E65- <1> 1516 00002F24 676174697665090950- <1> 1516 00002F2D 4C2020506C75730D0A <1> 1517 00002F36 3030343020205A4620- <1> db "0040 ZF Zero Flag",9,9, "ZR Zero",9,9, "NZ Not zero",13,10 1517 00002F3F 205A65726F20466C61- <1> 1517 00002F48 6709095A5220205A65- <1> 1517 00002F51 726F09094E5A20204E- <1> 1517 00002F5A 6F74207A65726F0D0A <1> 1518 00002F63 303031302020414620- <1> db "0010 AF Auxiliary Flag",9,"AC Auxiliary carry",9,"NA No auxiliary carry",13,10 1518 00002F6C 20417578696C696172- <1> 1518 00002F75 7920466C6167094143- <1> 1518 00002F7E 2020417578696C6961- <1> 1518 00002F87 727920636172727909- <1> 1518 00002F90 4E4120204E6F206175- <1> 1518 00002F99 78696C696172792063- <1> 1518 00002FA2 617272790D0A <1> 1519 00002FA8 303030342020504620- <1> db "0004 PF Parity Flag",9,9, "PE Parity even",9,9, "PO Parity odd",13,10 1519 00002FB1 205061726974792046- <1> 1519 00002FBA 6C6167090950452020- <1> 1519 00002FC3 506172697479206576- <1> 1519 00002FCC 656E0909504F202050- <1> 1519 00002FD5 6172697479206F6464- <1> 1519 00002FDE 0D0A <1> 1520 00002FE0 303030312020434620- <1> db "0001 CF Carry Flag",9,9, "CY Carry",9,9, "NC No carry",13,10 1520 00002FE9 20436172727920466C- <1> 1520 00002FF2 616709094359202043- <1> 1520 00002FFB 6172727909094E4320- <1> 1520 00003004 204E6F206361727279- <1> 1520 0000300D 0D0A <1> 1521 0000300F 0D0A <1> db 13,10 1522 00003011 5468652073686F7274- <1> db "The short names of the flag states are displayed when dumping registers",13,10 1522 0000301A 206E616D6573206F66- <1> 1522 00003023 2074686520666C6167- <1> 1522 0000302C 207374617465732061- <1> 1522 00003035 726520646973706C61- <1> 1522 0000303E 796564207768656E20- <1> 1522 00003047 64756D70696E672072- <1> 1522 00003050 65676973746572730D- <1> 1522 00003059 0A <1> 1523 0000305A 616E642063616E2062- <1> db "and can be entered to modify the symbolic F register with R. The short",13,10 1523 00003063 6520656E7465726564- <1> 1523 0000306C 20746F206D6F646966- <1> 1523 00003075 79207468652073796D- <1> 1523 0000307E 626F6C696320462072- <1> 1523 00003087 656769737465722077- <1> 1523 00003090 69746820522E205468- <1> 1523 00003099 652073686F72740D0A <1> 1524 000030A2 6E616D6573206F6620- <1> db "names of the flags can be modified by R.",13,10 1524 000030AB 74686520666C616773- <1> 1524 000030B4 2063616E206265206D- <1> 1524 000030BD 6F6469666965642062- <1> 1524 000030C6 7920522E0D0A <1> 1525 000030CC 00 <1> asciz 1526 <1> 1527 <1> %if _COND 1528 <1> .condhelp: 1529 000030CD 496E20746865207265- <1> db "In the register dump displayed by the R, T, P and G commands, conditional",13,10 1529 000030D6 676973746572206475- <1> 1529 000030DF 6D7020646973706C61- <1> 1529 000030E8 796564206279207468- <1> 1529 000030F1 6520522C20542C2050- <1> 1529 000030FA 20616E64204720636F- <1> 1529 00003103 6D6D616E64732C2063- <1> 1529 0000310C 6F6E646974696F6E61- <1> 1529 00003115 6C0D0A <1> 1530 00003118 6A756D707320617265- <1> db "jumps are displayed with a notice that shows whether the instruction will",13,10 1530 00003121 20646973706C617965- <1> 1530 0000312A 642077697468206120- <1> 1530 00003133 6E6F74696365207468- <1> 1530 0000313C 61742073686F777320- <1> 1530 00003145 776865746865722074- <1> 1530 0000314E 686520696E73747275- <1> 1530 00003157 6374696F6E2077696C- <1> 1530 00003160 6C0D0A <1> 1531 00003163 63617573652061206A- <1> db "cause a jump depending on its condition and the current register and flag",13,10 1531 0000316C 756D7020646570656E- <1> 1531 00003175 64696E67206F6E2069- <1> 1531 0000317E 747320636F6E646974- <1> 1531 00003187 696F6E20616E642074- <1> 1531 00003190 68652063757272656E- <1> 1531 00003199 742072656769737465- <1> 1531 000031A2 7220616E6420666C61- <1> 1531 000031AB 670D0A <1> 1532 000031AE 636F6E74656E74732E- <1> db 'contents. This notice shows either "jumping" or "not jumping" as appropriate.',13,10 1532 000031B7 2054686973206E6F74- <1> 1532 000031C0 6963652073686F7773- <1> 1532 000031C9 206569746865722022- <1> 1532 000031D2 6A756D70696E672220- <1> 1532 000031DB 6F7220226E6F74206A- <1> 1532 000031E4 756D70696E67222061- <1> 1532 000031ED 7320617070726F7072- <1> 1532 000031F6 696174652E0D0A <1> 1533 000031FD 0D0A <1> db 13,10 1534 000031FF 54686520636F6E6469- <1> db "The conditional jumps use these conditions: (second column negates)",13,10 1534 00003208 74696F6E616C206A75- <1> 1534 00003211 6D7073207573652074- <1> 1534 0000321A 6865736520636F6E64- <1> 1534 00003223 6974696F6E733A2028- <1> 1534 0000322C 7365636F6E6420636F- <1> 1534 00003235 6C756D6E206E656761- <1> 1534 0000323E 746573290D0A <1> 1535 00003244 206A6F09096A6E6F09- <1> db " jo",9,9,"jno",9,9,"OF",13,10 1535 0000324D 094F460D0A <1> 1536 00003252 206A63206A62206A6E- <1> db " jc jb jnae",9,"jnc jnb jae",9,"CF",13,10 1536 0000325B 6165096A6E63206A6E- <1> 1536 00003264 62206A61650943460D- <1> 1536 0000326D 0A <1> 1537 0000326E 206A7A206A6509096A- <1> db " jz je",9,9,"jnz jne",9,9,"ZF",13,10 1537 00003277 6E7A206A6E6509095A- <1> 1537 00003280 460D0A <1> 1538 00003283 206A6265206A6E6109- <1> db " jbe jna",9,"jnbe ja",9,9,"ZF||CF",13,10 1538 0000328C 6A6E6265206A610909- <1> 1538 00003295 5A467C7C43460D0A <1> 1539 0000329D 206A7309096A6E7309- <1> db " js",9,9,"jns",9,9,"SF",13,10 1539 000032A6 0953460D0A <1> 1540 000032AB 206A70206A70650909- <1> db " jp jpe",9,9,"jnp jpo",9,9,"PF",13,10 1540 000032B4 6A6E70206A706F0909- <1> 1540 000032BD 50460D0A <1> 1541 000032C1 206A6C206A6E676509- <1> db " jl jnge",9,"jnl jge",9,9,"OF^^SF",13,10 1541 000032CA 6A6E6C206A67650909- <1> 1541 000032D3 4F465E5E53460D0A <1> 1542 000032DB 206A6C65206A6E6709- <1> db " jle jng",9,"jnle jg",9,9,"OF^^SF || ZF",13,10 1542 000032E4 6A6E6C65206A670909- <1> 1542 000032ED 4F465E5E5346207C7C- <1> 1542 000032F6 205A460D0A <1> 1543 000032FB 206A28652963787A09- <1> db " j(e)cxz",9,9,9,"(e)cx==0",13,10 1543 00003304 090928652963783D3D- <1> 1543 0000330D 300D0A <1> 1544 00003310 206C6F6F7009090909- <1> db " loop",9,9,9,9,"(e)cx!=1",13,10 1544 00003319 2865296378213D310D- <1> 1544 00003322 0A <1> 1545 00003323 206C6F6F707A206C6F- <1> db " loopz loope",9,9,9,"(e)cx!=1 && ZF",13,10 1545 0000332C 6F7065090909286529- <1> 1545 00003335 6378213D3120262620- <1> 1545 0000333E 5A460D0A <1> 1546 00003342 206C6F6F706E7A206C- <1> db " loopnz loopne",9,9,9,"(e)cx!=1 && !ZF",13,10 1546 0000334B 6F6F706E6509090928- <1> 1546 00003354 65296378213D312026- <1> 1546 0000335D 2620215A460D0A <1> 1547 00003364 0D0A <1> db 13,10 1548 00003366 456E746572203F4620- <1> db "Enter ?F to display a description of the flag names.",13,10 1548 0000336F 746F20646973706C61- <1> 1548 00003378 792061206465736372- <1> 1548 00003381 697074696F6E206F66- <1> 1548 0000338A 2074686520666C6167- <1> 1548 00003393 206E616D65732E0D0A <1> 1549 0000339C 00 <1> asciz 1550 <1> %endif 1551 <1> 1552 <1> %if _EXPRESSIONS 1553 <1> .expressionhelp: 1554 0000339D 5265636F676E697A65- <1> db "Recognized operators in expressions:",13,10 1554 000033A6 64206F70657261746F- <1> 1554 000033AF 727320696E20657870- <1> 1554 000033B8 72657373696F6E733A- <1> 1554 000033C1 0D0A <1> 1555 000033C3 7C0962697477697365- <1> db "|",9, "bitwise OR",9,9, "||",9, "boolean OR",13,10 1555 000033CC 204F5209097C7C0962- <1> 1555 000033D5 6F6F6C65616E204F52- <1> 1555 000033DE 0D0A <1> 1556 000033E0 5E0962697477697365- <1> db "^",9, "bitwise XOR",9,9, "^^",9, "boolean XOR",13,10 1556 000033E9 20584F5209095E5E09- <1> 1556 000033F2 626F6F6C65616E2058- <1> 1556 000033FB 4F520D0A <1> 1557 000033FF 260962697477697365- <1> db "&",9, "bitwise AND",9,9, "&&",9, "boolean AND",13,10 1557 00003408 20414E440909262609- <1> 1557 00003411 626F6F6C65616E2041- <1> 1557 0000341A 4E440D0A <1> 1558 0000341E 3E3E096269742D7368- <1> db ">>",9, "bit-shift right",9,9, ">",9,"test if above",13,10 1558 00003427 696674207269676874- <1> 1558 00003430 09093E097465737420- <1> 1558 00003439 69662061626F76650D- <1> 1558 00003442 0A <1> 1559 00003443 3E3E3E097369676E65- <1> db ">>>",9, "signed bit-shift right",9, "<",9,"test if below",13,10 1559 0000344C 64206269742D736869- <1> 1559 00003455 667420726967687409- <1> 1559 0000345E 3C0974657374206966- <1> 1559 00003467 2062656C6F770D0A <1> 1560 0000346F 3C3C096269742D7368- <1> db "<<",9, "bit-shift left",9,9, ">=",9,"test if above-or-equal",13,10 1560 00003478 696674206C65667409- <1> 1560 00003481 093E3D097465737420- <1> 1560 0000348A 69662061626F76652D- <1> 1560 00003493 6F722D657175616C0D- <1> 1560 0000349C 0A <1> 1561 0000349D 3E3C096269742D6D69- <1> db "><",9, "bit-mirror",9,9, "<=",9,"test if below-or-equal",13,10 1561 000034A6 72726F7209093C3D09- <1> 1561 000034AF 746573742069662062- <1> 1561 000034B8 656C6F772D6F722D65- <1> 1561 000034C1 7175616C0D0A <1> 1562 000034C7 2B096164646974696F- <1> db "+",9, "addition",9,9, "==",9,"test if equal",13,10 1562 000034D0 6E09093D3D09746573- <1> 1562 000034D9 742069662065717561- <1> 1562 000034E2 6C0D0A <1> 1563 000034E5 2D0973756274726163- <1> db "-",9, "subtraction",9,9, "!=",9,"test if not equal",13,10 1563 000034EE 74696F6E0909213D09- <1> 1563 000034F7 74657374206966206E- <1> 1563 00003500 6F7420657175616C0D- <1> 1563 00003509 0A <1> 1564 0000350A 2A096D756C7469706C- <1> db "*",9, "multiplication",9,9, "=>",9,"same as >=",13,10 1564 00003513 69636174696F6E0909- <1> 1564 0000351C 3D3E0973616D652061- <1> 1564 00003525 73203E3D0D0A <1> 1565 0000352B 2F096469766973696F- <1> db "/",9, "division",9,9, "=<",9,"same as <=",13,10 1565 00003534 6E09093D3C0973616D- <1> 1565 0000353D 65206173203C3D0D0A <1> 1566 00003546 25096D6F64756C6F20- <1> db "%",9, "modulo (A-(A/B*B))",9, "<>",9,"same as !=",13,10 1566 0000354F 28412D28412F422A42- <1> 1566 00003558 2929093C3E0973616D- <1> 1566 00003561 6520617320213D0D0A <1> 1567 0000356A 2A2A09706F7765720D- <1> db "**",9, "power",13,10 1567 00003573 0A <1> 1568 00003574 0D0A <1> db 13,10 1569 00003576 496D706C6963697420- <1> db "Implicit operater precedence is handled in the listed order, with increasing",13,10 1569 0000357F 6F7065726174657220- <1> 1569 00003588 707265636564656E63- <1> 1569 00003591 652069732068616E64- <1> 1569 0000359A 6C656420696E207468- <1> 1569 000035A3 65206C697374656420- <1> 1569 000035AC 6F726465722C207769- <1> 1569 000035B5 746820696E63726561- <1> 1569 000035BE 73696E670D0A <1> 1570 000035C4 707265636564656E63- <1> db "precedence: (Brackets specify explicit precedence of an expression.)",13,10 1570 000035CD 653A2028427261636B- <1> 1570 000035D6 657473207370656369- <1> 1570 000035DF 6679206578706C6963- <1> 1570 000035E8 697420707265636564- <1> 1570 000035F1 656E6365206F662061- <1> 1570 000035FA 6E2065787072657373- <1> 1570 00003603 696F6E2E290D0A <1> 1571 0000360A 20626F6F6C65616E20- <1> db " boolean operators OR, XOR, AND (each has a different precedence)",13,10 1571 00003613 6F70657261746F7273- <1> 1571 0000361C 204F522C20584F522C- <1> 1571 00003625 20414E442028656163- <1> 1571 0000362E 682068617320612064- <1> 1571 00003637 6966666572656E7420- <1> 1571 00003640 707265636564656E63- <1> 1571 00003649 65290D0A <1> 1572 0000364D 20636F6D7061726973- <1> db " comparison operators",13,10 1572 00003656 6F6E206F7065726174- <1> 1572 0000365F 6F72730D0A <1> 1573 00003664 206269747769736520- <1> db " bitwise operators OR, XOR, AND (each has a different precedence)",13,10 1573 0000366D 6F70657261746F7273- <1> 1573 00003676 204F522C20584F522C- <1> 1573 0000367F 20414E442028656163- <1> 1573 00003688 682068617320612064- <1> 1573 00003691 6966666572656E7420- <1> 1573 0000369A 707265636564656E63- <1> 1573 000036A3 65290D0A <1> 1574 000036A7 20736869667420616E- <1> db " shift and bit-mirror operators",13,10 1574 000036B0 64206269742D6D6972- <1> 1574 000036B9 726F72206F70657261- <1> 1574 000036C2 746F72730D0A <1> 1575 000036C8 206164646974696F6E- <1> db " addition and subtraction operators",13,10 1575 000036D1 20616E642073756274- <1> 1575 000036DA 72616374696F6E206F- <1> 1575 000036E3 70657261746F72730D- <1> 1575 000036EC 0A <1> 1576 000036ED 206D756C7469706C69- <1> db " multiplication, division and modulo operators",13,10 1576 000036F6 636174696F6E2C2064- <1> 1576 000036FF 69766973696F6E2061- <1> 1576 00003708 6E64206D6F64756C6F- <1> 1576 00003711 206F70657261746F72- <1> 1576 0000371A 730D0A <1> 1577 0000371D 20706F776572206F70- <1> db " power operator",13,10 1577 00003726 657261746F720D0A <1> 1578 0000372E 0D0A <1> db 13,10 1579 00003730 5265636F676E697A65- <1> db "Recognized unary operators: (modifying the next number)",13,10 1579 00003739 6420756E617279206F- <1> 1579 00003742 70657261746F72733A- <1> 1579 0000374B 20286D6F6469667969- <1> 1579 00003754 6E6720746865206E65- <1> 1579 0000375D 7874206E756D626572- <1> 1579 00003766 290D0A <1> 1580 00003769 2B09706F7369746976- <1> db "+",9, "positive (does nothing)",13,10 1580 00003772 652028646F6573206E- <1> 1580 0000377B 6F7468696E67290D0A <1> 1581 00003784 2D096E656761746976- <1> db "-",9, "negative",13,10 1581 0000378D 650D0A <1> 1582 00003790 7E0962697477697365- <1> db "~",9, "bitwise NOT",13,10 1582 00003799 204E4F540D0A <1> 1583 0000379F 2109626F6F6C65616E- <1> db "!",9, "boolean NOT",13,10 1583 000037A8 204E4F540D0A <1> 1584 000037AE 3F096162736F6C7574- <1> db "?",9, "absolute value",13,10 1584 000037B7 652076616C75650D0A <1> 1585 000037C0 212109636F6E766572- <1> db "!!",9, "convert to boolean",13,10 1585 000037C9 7420746F20626F6F6C- <1> 1585 000037D2 65616E0D0A <1> 1586 000037D7 0D0A <1> db 13,10 1587 000037D9 4E6F74652074686174- <1> db "Note that the power operator does not affect unary operator handling.",13,10 1587 000037E2 2074686520706F7765- <1> 1587 000037EB 72206F70657261746F- <1> 1587 000037F4 7220646F6573206E6F- <1> 1587 000037FD 742061666665637420- <1> 1587 00003806 756E617279206F7065- <1> 1587 0000380F 7261746F722068616E- <1> 1587 00003818 646C696E672E0D0A <1> 1588 00003820 466F7220696E737461- <1> db 'For instance, "- 2 ** 2" is parsed as "(-2) ** 2" and evaluates to 4.',13,10 1588 00003829 6E63652C20222D2032- <1> 1588 00003832 202A2A203222206973- <1> 1588 0000383B 207061727365642061- <1> 1588 00003844 732022282D3229202A- <1> 1588 0000384D 2A20322220616E6420- <1> 1588 00003856 6576616C7561746573- <1> 1588 0000385F 20746F20342E0D0A <1> 1589 00003867 0D0A <1> db 13,10 1590 00003869 416C74686F75676820- <1> db "Although a negative unary and signed bit-shift right operator are provided",13,10 1590 00003872 61206E656761746976- <1> 1590 0000387B 6520756E6172792061- <1> 1590 00003884 6E64207369676E6564- <1> 1590 0000388D 206269742D73686966- <1> 1590 00003896 74207269676874206F- <1> 1590 0000389F 70657261746F722061- <1> 1590 000038A8 72652070726F766964- <1> 1590 000038B1 65640D0A <1> 1591 000038B5 746865206578707265- <1> db "the expression evaluator is intrinsically unsigned. Particularly the division,",13,10 1591 000038BE 7373696F6E20657661- <1> 1591 000038C7 6C7561746F72206973- <1> 1591 000038D0 20696E7472696E7369- <1> 1591 000038D9 63616C6C7920756E73- <1> 1591 000038E2 69676E65642E205061- <1> 1591 000038EB 72746963756C61726C- <1> 1591 000038F4 792074686520646976- <1> 1591 000038FD 6973696F6E2C0D0A <1> 1592 00003905 6D756C7469706C6963- <1> db "multiplication, modulo and all comparison operators operate unsigned. Due to",13,10 1592 0000390E 6174696F6E2C206D6F- <1> 1592 00003917 64756C6F20616E6420- <1> 1592 00003920 616C6C20636F6D7061- <1> 1592 00003929 7269736F6E206F7065- <1> 1592 00003932 7261746F7273206F70- <1> 1592 0000393B 657261746520756E73- <1> 1592 00003944 69676E65642E204475- <1> 1592 0000394D 6520746F0D0A <1> 1593 00003953 746869732C20746865- <1> db 'this, the expression "-1 < 0" evaluates to zero.',13,10 1593 0000395C 206578707265737369- <1> 1593 00003965 6F6E20222D31203C20- <1> 1593 0000396E 3022206576616C7561- <1> 1593 00003977 74657320746F207A65- <1> 1593 00003980 726F2E0D0A <1> 1594 00003985 0D0A <1> db 13,10 1595 00003987 5265636F676E697A65- <1> db "Recognized terms in an expression:",13,10 1595 00003990 64207465726D732069- <1> 1595 00003999 6E20616E2065787072- <1> 1595 000039A2 657373696F6E3A0D0A <1> 1596 000039AB 2033322D6269742069- <1> db " 32-bit immediates",13,10 1596 000039B4 6D6D65646961746573- <1> 1596 000039BD 0D0A <1> 1597 000039BF 20382D626974207265- <1> db " 8-bit registers",13,10 1597 000039C8 676973746572730D0A <1> 1598 000039D1 2031362D6269742072- <1> db " 16-bit registers including segment registers (except FS, GS)",13,10 1598 000039DA 656769737465727320- <1> 1598 000039E3 696E636C7564696E67- <1> 1598 000039EC 207365676D656E7420- <1> 1598 000039F5 726567697374657273- <1> 1598 000039FE 202865786365707420- <1> 1598 00003A07 46532C204753290D0A <1> 1599 00003A10 2033322D6269742063- <1> db " 32-bit compound registers made of two 16-bit registers (eg DXAX)",13,10 1599 00003A19 6F6D706F756E642072- <1> 1599 00003A22 656769737465727320- <1> 1599 00003A2B 6D616465206F662074- <1> 1599 00003A34 776F2031362D626974- <1> 1599 00003A3D 207265676973746572- <1> 1599 00003A46 732028656720445841- <1> 1599 00003A4F 58290D0A <1> 1600 00003A53 2033322D6269742072- <1> db " 32-bit registers and FS, GS only if running on a 386+",13,10 1600 00003A5C 656769737465727320- <1> 1600 00003A65 616E642046532C2047- <1> 1600 00003A6E 53206F6E6C79206966- <1> 1600 00003A77 2072756E6E696E6720- <1> 1600 00003A80 6F6E2061203338362B- <1> 1600 00003A89 0D0A <1> 1601 <1> %if 0 && _MMXSUPP 1602 <1> db " 64-bit MMX registers only if running on a CPU with MMX (r/o for now)",13,10 1603 <1> db " MM0L, MM(0)L accesses the low 32 bits of the register",13,10 1604 <1> db " MM0H, MM(0)H accesses the high 32 bits of the register",13,10 1605 <1> db " MM0Z, MM(0)Z reads the low 32 bits; writes the full register (zero-extend)",13,10 1606 <1> db " MM0S, MM(0)S reads the low 32 bits; writes the full register (sign-extend)",13,10 1607 <1> db " MM0, MM(0) is an alias for the MM0Z syntax",13,10 1608 <1> %endif 1609 <1> %if _VARIABLES 1610 00003A8B 2033322D6269742076- <1> db " 32-bit variables V00..VFF",13,10 1610 00003A94 61726961626C657320- <1> 1610 00003A9D 5630302E2E5646460D- <1> 1610 00003AA6 0A <1> 1611 <1> %endif 1612 <1> %if _OPTIONS || _PSPVARIABLES 1613 00003AA7 2033322D6269742073- <1> db " 32-bit special variable" 1613 00003AB0 70656369616C207661- <1> 1613 00003AB9 726961626C65 <1> 1614 <1> %if _OPTIONS 1615 00003ABF 732044434F2C204443- <1> db "s DCO, DCS, DAO, DAS, DIF, DPI" 1615 00003AC8 532C2044414F2C2044- <1> 1615 00003AD1 41532C204449462C20- <1> 1615 00003ADA 445049 <1> 1616 <1> %if _PSPVARIABLES 1617 00003ADD 2C <1> db "," 1618 <1> %endif 1619 <1> %endif 1620 <1> %if _PSPVARIABLES 1621 00003ADE 20505049 <1> db " PPI" 1622 <1> %endif 1623 00003AE2 0D0A <1> db 13,10 1624 00003AE4 2031362D6269742073- <1> db " 16-bit special variables" 1624 00003AED 70656369616C207661- <1> 1624 00003AF6 726961626C6573 <1> 1625 <1> %if _OPTIONS 1626 00003AFD 204450522C20445050 <1> db " DPR, DPP" 1627 <1> %if _PM 1628 00003B06 2C20445053 <1> db ", DPS" 1629 <1> %endif 1630 <1> %if _PSPVARIABLES 1631 00003B0B 2C <1> db "," 1632 <1> %endif 1633 <1> %endif 1634 <1> %if _PSPVARIABLES 1635 00003B0C 205053502C20505052 <1> db " PSP, PPR" 1636 <1> %endif 1637 00003B15 0D0A <1> db 13,10 1638 00003B17 20202866756C6C6572- <1> db " (fuller variable reference in the manual)",13,10 1638 00003B20 207661726961626C65- <1> 1638 00003B29 207265666572656E63- <1> 1638 00003B32 6520696E2074686520- <1> 1638 00003B3B 6D616E75616C290D0A <1> 1639 <1> %endif 1640 <1> %if _INDIRECTION 1641 00003B44 20627974652F776F72- <1> db " byte/word/3byte/dword memory content (eg byte [seg:ofs], where both the",13,10 1641 00003B4D 642F33627974652F64- <1> 1641 00003B56 776F7264206D656D6F- <1> 1641 00003B5F 727920636F6E74656E- <1> 1641 00003B68 742028656720627974- <1> 1641 00003B71 65205B7365673A6F66- <1> 1641 00003B7A 735D2C207768657265- <1> 1641 00003B83 20626F746820746865- <1> 1641 00003B8C 0D0A <1> 1642 00003B8E 20206F7074696F6E61- <1> db " optional segment as well as the offset are expressions too)",13,10 1642 00003B97 6C207365676D656E74- <1> 1642 00003BA0 2061732077656C6C20- <1> 1642 00003BA9 617320746865206F66- <1> 1642 00003BB2 667365742061726520- <1> 1642 00003BBB 65787072657373696F- <1> 1642 00003BC4 6E7320746F6F290D0A <1> 1643 <1> %endif 1644 00003BCD 546865206578707265- <1> db "The expression evaluator case-insensitively checks for names of variables",13,10 1644 00003BD6 7373696F6E20657661- <1> 1644 00003BDF 6C7561746F72206361- <1> 1644 00003BE8 73652D696E73656E73- <1> 1644 00003BF1 69746976656C792063- <1> 1644 00003BFA 6865636B7320666F72- <1> 1644 00003C03 206E616D6573206F66- <1> 1644 00003C0C 207661726961626C65- <1> 1644 00003C15 730D0A <1> 1645 00003C18 616E64207265676973- <1> db "and registers" 1645 00003C21 74657273 <1> 1646 <1> %if _INDIRECTION 1647 00003C25 2061732077656C6C20- <1> db " as well as size specifiers" 1647 00003C2E 61732073697A652073- <1> 1647 00003C37 706563696669657273 <1> 1648 <1> %endif 1649 00003C40 2E0D0A <1> db '.',13,10 1650 00003C43 0D0A <1> db 13,10 1651 00003C45 456E746572203F5220- <1> db "Enter ?R to display the recognized register names.",13,10 1651 00003C4E 746F20646973706C61- <1> 1651 00003C57 792074686520726563- <1> 1651 00003C60 6F676E697A65642072- <1> 1651 00003C69 65676973746572206E- <1> 1651 00003C72 616D65732E0D0A <1> 1652 <1> %if _VARIABLES || _OPTIONS || _PSPVARIABLES 1653 00003C79 456E746572203F5620- <1> db "Enter ?V to display the recognized variables.",13,10 1653 00003C82 746F20646973706C61- <1> 1653 00003C8B 792074686520726563- <1> 1653 00003C94 6F676E697A65642076- <1> 1653 00003C9D 61726961626C65732E- <1> 1653 00003CA6 0D0A <1> 1654 <1> %endif 1655 00003CA8 00 <1> asciz 1656 <1> %endif 1657 <1> 1658 <1> %if _OPTIONS 1659 <1> .ophelp: 1660 00003CA9 417661696C61626C65- <1> db "Available options: (read/write DCO, read DCS)",13,10 1660 00003CB2 206F7074696F6E733A- <1> 1660 00003CBB 2028726561642F7772- <1> 1660 00003CC4 6974652044434F2C20- <1> 1660 00003CCD 726561642044435329- <1> 1660 00003CD6 0D0A <1> 1661 00003CD8 303030312052583A20- <1> db _4digitshex(dispregs32), " RX: 32-bit register display",13,10 1661 00003CE1 33322D626974207265- <1> 1661 00003CEA 676973746572206469- <1> 1661 00003CF3 73706C61790D0A <1> 1662 00003CFA 3030303220544D3A20- <1> db _4digitshex(traceints), " TM: trace into interrupts",13,10 1662 00003D03 747261636520696E74- <1> 1662 00003D0C 6F20696E7465727275- <1> 1662 00003D15 7074730D0A <1> 1663 00003D1A 3030303420616C6C6F- <1> db _4digitshex(cpdepchars), " allow dumping of CP-dependant characters",13,10 1663 00003D23 772064756D70696E67- <1> 1663 00003D2C 206F662043502D6465- <1> 1663 00003D35 70656E64616E742063- <1> 1663 00003D3E 686172616374657273- <1> 1663 00003D47 0D0A <1> 1664 00003D49 3030303820616C7761- <1> db _4digitshex(fakeindos), " always assume InDOS flag non-zero, to debug DOS or TSRs",13,10 1664 00003D52 797320617373756D65- <1> 1664 00003D5B 20496E444F5320666C- <1> 1664 00003D64 6167206E6F6E2D7A65- <1> 1664 00003D6D 726F2C20746F206465- <1> 1664 00003D76 62756720444F53206F- <1> 1664 00003D7F 7220545352730D0A <1> 1665 00003D87 303031302064697361- <1> db _4digitshex(nonpagingdevice)," disallow paged output to StdOut",13,10 1665 00003D90 6C6C6F772070616765- <1> 1665 00003D99 64206F757470757420- <1> 1665 00003DA2 746F205374644F7574- <1> 1665 00003DAB 0D0A <1> 1666 00003DAD 3030323020616C6C6F- <1> db _4digitshex(pagingdevice), " allow paged output to non-StdOut",13,10 1666 00003DB6 77207061676564206F- <1> 1666 00003DBF 757470757420746F20- <1> 1666 00003DC8 6E6F6E2D5374644F75- <1> 1666 00003DD1 740D0A <1> 1667 00003DD4 303034302064697370- <1> db _4digitshex(hexrn), " display raw hexadecimal content of FPU registers",13,10 1667 00003DDD 6C6179207261772068- <1> 1667 00003DE6 657861646563696D61- <1> 1667 00003DEF 6C20636F6E74656E74- <1> 1667 00003DF8 206F66204650552072- <1> 1667 00003E01 65676973746572730D- <1> 1667 00003E0A 0A <1> 1668 00003E0B 30313030207768656E- <1> db _4digitshex(nondospaging), " when prompting during paging, do not use DOS for input",13,10 1668 00003E14 2070726F6D7074696E- <1> 1668 00003E1D 6720647572696E6720- <1> 1668 00003E26 706167696E672C2064- <1> 1668 00003E2F 6F206E6F7420757365- <1> 1668 00003E38 20444F5320666F7220- <1> 1668 00003E41 696E7075740D0A <1> 1669 00003E48 3032303020646F206E- <1> db _4digitshex(nohlt), " do not execute HLT instruction to idle",13,10 1669 00003E51 6F7420657865637574- <1> 1669 00003E5A 6520484C5420696E73- <1> 1669 00003E63 7472756374696F6E20- <1> 1669 00003E6C 746F2069646C650D0A <1> 1670 00003E75 3034303020646F206E- <1> db _4digitshex(biosidles), " do not idle, the keyboard BIOS idles itself",13,10 1670 00003E7E 6F742069646C652C20- <1> 1670 00003E87 746865206B6579626F- <1> 1670 00003E90 6172642042494F5320- <1> 1670 00003E99 69646C657320697473- <1> 1670 00003EA2 656C660D0A <1> 1671 00003EA7 303830302075736520- <1> db _4digitshex(opt_userawinput)," use rawinput for int 21h interactive input",13,10 1671 00003EB0 726177696E70757420- <1> 1671 00003EB9 666F7220696E742032- <1> 1671 00003EC2 316820696E74657261- <1> 1671 00003ECB 637469766520696E70- <1> 1671 00003ED4 75740D0A <1> 1672 00003ED8 3130303020696E2064- <1> db _4digitshex(use_si_units), " in disp_*_size use SI units (kB = 1000, etc)." 1672 00003EE1 6973705F2A5F73697A- <1> 1672 00003EEA 652075736520534920- <1> 1672 00003EF3 756E69747320286B42- <1> 1672 00003EFC 203D20313030302C20- <1> 1672 00003F05 657463292E <1> 1673 00003F0A 206F76657272696465- <1> db " overrides ",_4digitshex(use_jedec_units),"!",13,10 1673 00003F13 732032303030210D0A <1> 1674 00003F1C 3230303020696E2064- <1> db _4digitshex(use_jedec_units)," in disp_*_size use JEDEC units (KB = 1024)",13,10 1674 00003F25 6973705F2A5F73697A- <1> 1674 00003F2E 6520757365204A4544- <1> 1674 00003F37 454320756E69747320- <1> 1674 00003F40 284B42203D20313032- <1> 1674 00003F49 34290D0A <1> 1675 00003F4D 3430303020656E6162- <1> db _4digitshex(enable_serial), " enable serial I/O (port ",_4digitshex(_UART_BASE),"h interrupt ",_2digitshex(_INTNUM),"h)",13,10 1675 00003F56 6C652073657269616C- <1> 1675 00003F5F 20492F4F2028706F72- <1> 1675 00003F68 742030324638682069- <1> 1675 00003F71 6E7465727275707420- <1> 1675 00003F7A 304268290D0A <1> 1676 00003F80 383030302064697361- <1> db _4digitshex(int8_disable_serial), " disable serial I/O when breaking after 5 seconds Ctrl pressed",13,10 1676 00003F89 626C65207365726961- <1> 1676 00003F92 6C20492F4F20776865- <1> 1676 00003F9B 6E20627265616B696E- <1> 1676 00003FA4 672061667465722035- <1> 1676 00003FAD 207365636F6E647320- <1> 1676 00003FB6 4374726C2070726573- <1> 1676 00003FBF 7365640D0A <1> 1677 00003FC4 303030313030303020- <1> db _8digitshex(gg_do_not_skip_bp), " gg: do not skip a breakpoint (bb or gg)",13,10 1677 00003FCD 67673A20646F206E6F- <1> 1677 00003FD6 7420736B6970206120- <1> 1677 00003FDF 627265616B706F696E- <1> 1677 00003FE8 7420286262206F7220- <1> 1677 00003FF1 6767290D0A <1> 1678 00003FF6 303030323030303020- <1> db _8digitshex(gg_no_autorepeat), " gg: do not auto-repeat",13,10 1678 00003FFF 67673A20646F206E6F- <1> 1678 00004008 74206175746F2D7265- <1> 1678 00004011 706561740D0A <1> 1679 00004017 303030343030303020- <1> db _8digitshex(tp_do_not_skip_bp), " T/TP/P: do not skip a (bb) breakpoint",13,10 1679 00004020 542F54502F503A2064- <1> 1679 00004029 6F206E6F7420736B69- <1> 1679 00004032 702061202862622920- <1> 1679 0000403B 627265616B706F696E- <1> 1679 00004044 740D0A <1> 1680 00004047 303030383030303020- <1> db _8digitshex(gg_bb_hit_no_repeat), " gg: do not auto-repeat after bb hit",13,10 1680 00004050 67673A20646F206E6F- <1> 1680 00004059 74206175746F2D7265- <1> 1680 00004062 706561742061667465- <1> 1680 0000406B 72206262206869740D- <1> 1680 00004074 0A <1> 1681 00004075 303031303030303020- <1> db _8digitshex(tp_bb_hit_no_repeat), " T/TP/P: do not auto-repeat after bb hit",13,10 1681 0000407E 542F54502F503A2064- <1> 1681 00004087 6F206E6F7420617574- <1> 1681 00004090 6F2D72657065617420- <1> 1681 00004099 616674657220626220- <1> 1681 000040A2 6869740D0A <1> 1682 000040A7 303032303030303020- <1> db _8digitshex(gg_unexpected_no_repeat)," gg: do not auto-repeat after unexpectedinterrupt",13,10 1682 000040B0 67673A20646F206E6F- <1> 1682 000040B9 74206175746F2D7265- <1> 1682 000040C2 706561742061667465- <1> 1682 000040CB 7220756E6578706563- <1> 1682 000040D4 746564696E74657272- <1> 1682 000040DD 7570740D0A <1> 1683 000040E2 303034303030303020- <1> db _8digitshex(tp_unexpected_no_repeat)," T/TP/P: do not auto-repeat after unexpectedinterrupt",13,10 1683 000040EB 542F54502F503A2064- <1> 1683 000040F4 6F206E6F7420617574- <1> 1683 000040FD 6F2D72657065617420- <1> 1683 00004106 616674657220756E65- <1> 1683 0000410F 78706563746564696E- <1> 1683 00004118 746572727570740D0A <1> 1684 00004121 303038303030303020- <1> db _8digitshex(ss_no_dump), " S: do not dump data after matches",13,10 1684 0000412A 533A20646F206E6F74- <1> 1684 00004133 2064756D7020646174- <1> 1684 0000413C 61206166746572206D- <1> 1684 00004145 6174636865730D0A <1> 1685 0000414D 313030303030303020- <1> db _8digitshex(rr_disasm_no_rept), " R: do not repeat disassembly",13,10 1685 00004156 523A20646F206E6F74- <1> 1685 0000415F 207265706561742064- <1> 1685 00004168 6973617373656D626C- <1> 1685 00004171 790D0A <1> 1686 00004174 323030303030303020- <1> db _8digitshex(rr_disasm_no_show), " R: do not show memory reference in disassembly",13,10 1686 0000417D 523A20646F206E6F74- <1> 1686 00004186 2073686F77206D656D- <1> 1686 0000418F 6F7279207265666572- <1> 1686 00004198 656E636520696E2064- <1> 1686 000041A1 6973617373656D626C- <1> 1686 000041AA 790D0A <1> 1687 000041AD 343030303030303020- <1> db _8digitshex(opt_cmdline_quiet_input)," quiet command line buffer input",13,10 1687 000041B6 717569657420636F6D- <1> 1687 000041BF 6D616E64206C696E65- <1> 1687 000041C8 206275666665722069- <1> 1687 000041D1 6E7075740D0A <1> 1688 000041D7 383030303030303020- <1> db _8digitshex(opt_cmdline_quiet_output)," quiet command line buffer output",13,10 1688 000041E0 717569657420636F6D- <1> 1688 000041E9 6D616E64206C696E65- <1> 1688 000041F2 20627566666572206F- <1> 1688 000041FB 75747075740D0A <1> 1689 00004202 0D0A <1> db 13,10 1690 00004204 4D6F7265206F707469- <1> db "More options: (read/write DCO2, read DCS2)",13,10 1690 0000420D 6F6E733A2028726561- <1> 1690 00004216 642F77726974652044- <1> 1690 0000421F 434F322C2072656164- <1> 1690 00004228 2044435332290D0A <1> 1691 00004230 303030312044423A20- <1> db _4digitshex(opt2_db_header), " DB: show header",13,10 1691 00004239 73686F772068656164- <1> 1691 00004242 65720D0A <1> 1692 00004246 303030322044423A20- <1> db _4digitshex(opt2_db_trailer)," DB: show trailer",13,10 1692 0000424F 73686F772074726169- <1> 1692 00004258 6C65720D0A <1> 1693 0000425D 303031302044573A20- <1> db _4digitshex(opt2_dw_header), " DW: show header",13,10 1693 00004266 73686F772068656164- <1> 1693 0000426F 65720D0A <1> 1694 00004273 303032302044573A20- <1> db _4digitshex(opt2_dw_trailer)," DW: show trailer",13,10 1694 0000427C 73686F772074726169- <1> 1694 00004285 6C65720D0A <1> 1695 0000428A 303130302044443A20- <1> db _4digitshex(opt2_dd_header), " DD: show header",13,10 1695 00004293 73686F772068656164- <1> 1695 0000429C 65720D0A <1> 1696 000042A0 303230302044443A20- <1> db _4digitshex(opt2_dd_trailer)," DD: show trailer",13,10 1696 000042A9 73686F772074726169- <1> 1696 000042B2 6C65720D0A <1> 1697 000042B7 303830302075736520- <1> db _4digitshex(opt2_rawinput_dpmi)," use rawinput for int 21h interactive input in DPMI",13,10 1697 000042C0 726177696E70757420- <1> 1697 000042C9 666F7220696E742032- <1> 1697 000042D2 316820696E74657261- <1> 1697 000042DB 637469766520696E70- <1> 1697 000042E4 757420696E2044504D- <1> 1697 000042ED 490D0A <1> 1698 000042F0 3130303020483A2073- <1> db _4digitshex(opt2_hh_compat), " H: stay compatible to MS-DOS Debug",13,10 1698 000042F9 74617920636F6D7061- <1> 1698 00004302 7469626C6520746F20- <1> 1698 0000430B 4D532D444F53204465- <1> 1698 00004314 6275670D0A <1> 1699 00004319 323030302069646C65- <1> db _4digitshex(opt2_getc_idle), " idle and check for Ctrl-C in getc",13,10 1699 00004322 20616E642063686563- <1> 1699 0000432B 6B20666F7220437472- <1> 1699 00004334 6C2D4320696E206765- <1> 1699 0000433D 74630D0A <1> 1700 00004341 343030302069646C65- <1> db _4digitshex(opt2_getc_idle_dpmi)," idle and check for Ctrl-C in getc in DPMI",13,10 1700 0000434A 20616E642063686563- <1> 1700 00004353 6B20666F7220437472- <1> 1700 0000435C 6C2D4320696E206765- <1> 1700 00004365 746320696E2044504D- <1> 1700 0000436E 490D0A <1> 1701 00004371 3830303020542F5450- <1> db _4digitshex(opt2_re_cancel_tpg)," T/TP/P/G: cancel run after RE command buffer execution",13,10 1701 0000437A 2F502F473A2063616E- <1> 1701 00004383 63656C2072756E2061- <1> 1701 0000438C 667465722052452063- <1> 1701 00004395 6F6D6D616E64206275- <1> 1701 0000439E 666665722065786563- <1> 1701 000043A7 7574696F6E0D0A <1> 1702 000043AE 0D0A <1> db 13,10 1703 000043B0 4D6F7265206F707469- <1> db "More options: (read/write DCO3, read DCS3)",13,10 1703 000043B9 6F6E733A2028726561- <1> 1703 000043C2 642F77726974652044- <1> 1703 000043CB 434F332C2072656164- <1> 1703 000043D4 2044435333290D0A <1> 1704 000043DC 3030303120543A2064- <1> db _4digitshex(opt3_tt_no_paging)," T: do not page output",13,10 1704 000043E5 6F206E6F7420706167- <1> 1704 000043EE 65206F75747075740D- <1> 1704 000043F7 0A <1> 1705 000043F8 303030322054503A20- <1> db _4digitshex(opt3_tp_no_paging)," TP: do not page output",13,10 1705 00004401 646F206E6F74207061- <1> 1705 0000440A 6765206F7574707574- <1> 1705 00004413 0D0A <1> 1706 00004415 3030303420503A2064- <1> db _4digitshex(opt3_pp_no_paging)," P: do not page output",13,10 1706 0000441E 6F206E6F7420706167- <1> 1706 00004427 65206F75747075740D- <1> 1706 00004430 0A <1> 1707 00004431 3030303820473A2064- <1> db _4digitshex(opt3_gg_no_paging)," G: do not page output",13,10 1707 0000443A 6F206E6F7420706167- <1> 1707 00004443 65206F75747075740D- <1> 1707 0000444C 0A <1> 1708 0000444D 3031303020542F5450- <1> db _4digitshex(opt3_silence_paging_set), " T/TP/P: modify paging for silent dump",13,10 1708 00004456 2F503A206D6F646966- <1> 1708 0000445F 7920706167696E6720- <1> 1708 00004468 666F722073696C656E- <1> 1708 00004471 742064756D700D0A <1> 1709 00004479 3032303020542F5450- <1> db _4digitshex(opt3_silence_paging_on), " T/TP/P: if ",_4digitshex(opt3_silence_paging_set)," set: turn paging on, else off",13,10 1709 00004482 2F503A206966203031- <1> 1709 0000448B 3030207365743A2074- <1> 1709 00004494 75726E20706167696E- <1> 1709 0000449D 67206F6E2C20656C73- <1> 1709 000044A6 65206F66660D0A <1> 1710 000044AD 30313030303020523A- <1> db _6digitshex(opt3_r_highlight_diff), " R: highlight changed digits (needs ANSI for DOS output)",13,10 1710 000044B6 20686967686C696768- <1> 1710 000044BF 74206368616E676564- <1> 1710 000044C8 206469676974732028- <1> 1710 000044D1 6E6565647320414E53- <1> 1710 000044DA 4920666F7220444F53- <1> 1710 000044E3 206F7574707574290D- <1> 1710 000044EC 0A <1> 1711 000044ED 30323030303020523A- <1> db _6digitshex(opt3_r_highlight_dumb), " R: highlight escape sequences to int 10h, else video attributes",13,10 1711 000044F6 20686967686C696768- <1> 1711 000044FF 742065736361706520- <1> 1711 00004508 73657175656E636573- <1> 1711 00004511 20746F20696E742031- <1> 1711 0000451A 30682C20656C736520- <1> 1711 00004523 766964656F20617474- <1> 1711 0000452C 726962757465730D0A <1> 1712 00004535 30343030303020523A- <1> db _6digitshex(opt3_r_highlight_full), " R: highlight changed registers (overrides ",_6digitshex(opt3_r_highlight_diff),")",13,10 1712 0000453E 20686967686C696768- <1> 1712 00004547 74206368616E676564- <1> 1712 00004550 207265676973746572- <1> 1712 00004559 7320286F7665727269- <1> 1712 00004562 646573203031303030- <1> 1712 0000456B 30290D0A <1> 1713 0000456F 30383030303020523A- <1> db _6digitshex(opt3_r_highlight_eip), " R: include highlighting of EIP",13,10 1713 00004578 20696E636C75646520- <1> 1713 00004581 686967686C69676874- <1> 1713 0000458A 696E67206F66204549- <1> 1713 00004593 500D0A <1> 1714 00004596 303230303030303020- <1> db _8digitshex(opt3_no_idle_2F), " do not call int 2F.1680 for idling",13,10 1714 0000459F 646F206E6F74206361- <1> 1714 000045A8 6C6C20696E74203246- <1> 1714 000045B1 2E3136383020666F72- <1> 1714 000045BA 2069646C696E670D0A <1> 1715 <1> %if _DELAY_BEFORE_BP 1716 000045C3 303430303030303020- <1> db _8digitshex(opt3_delay_before_bp), " delay for a tick before writing breakpoints",13,10 1716 000045CC 64656C617920666F72- <1> 1716 000045D5 2061207469636B2062- <1> 1716 000045DE 65666F726520777269- <1> 1716 000045E7 74696E672062726561- <1> 1716 000045F0 6B706F696E74730D0A <1> 1717 <1> %endif 1718 000045F9 303830303030303020- <1> db _8digitshex(opt3_no_call_update), " do not call other lDebug instance's Update IISP Header call",13,10 1718 00004602 646F206E6F74206361- <1> 1718 0000460B 6C6C206F7468657220- <1> 1718 00004614 6C446562756720696E- <1> 1718 0000461D 7374616E6365277320- <1> 1718 00004626 557064617465204949- <1> 1718 0000462F 535020486561646572- <1> 1718 00004638 2063616C6C0D0A <1> 1719 0000463F 313030303030303020- <1> db _8digitshex(opt3_disable_autorepeat), " disable auto-repeat",13,10 1719 00004648 64697361626C652061- <1> 1719 00004651 75746F2D7265706561- <1> 1719 0000465A 740D0A <1> 1720 0000465D 323030303030303020- <1> db _8digitshex(opt3_check_ctrlc_keyb), " check int 16h buffer for Control-C if inputting from int 16h",13,10 1720 00004666 636865636B20696E74- <1> 1720 0000466F 203136682062756666- <1> 1720 00004678 657220666F7220436F- <1> 1720 00004681 6E74726F6C2D432069- <1> 1720 0000468A 6620696E7075747469- <1> 1720 00004693 6E672066726F6D2069- <1> 1720 0000469C 6E74203136680D0A <1> 1721 000046A4 343030303030303020- <1> db _8digitshex(opt3_check_ctrlc_0bh), " call DOS service 0Bh to check for Control-C",13,10 1721 000046AD 63616C6C20444F5320- <1> 1721 000046B6 736572766963652030- <1> 1721 000046BF 426820746F20636865- <1> 1721 000046C8 636B20666F7220436F- <1> 1721 000046D1 6E74726F6C2D430D0A <1> 1722 000046DA 383030303030303020- <1> db _8digitshex(opt3_tsr_quit_leave_tf), " when Q command is used while TSR, leave TF as is",13,10 1722 000046E3 7768656E205120636F- <1> 1722 000046EC 6D6D616E6420697320- <1> 1722 000046F5 75736564207768696C- <1> 1722 000046FE 65205453522C206C65- <1> 1722 00004707 617665205446206173- <1> 1722 00004710 2069730D0A <1> 1723 00004715 0D0A <1> db 13,10 1724 00004717 4D6F7265206F707469- <1> db "More options: (read/write DCO4, read DCS4)",13,10 1724 00004720 6F6E733A2028726561- <1> 1724 00004729 642F77726974652044- <1> 1724 00004732 434F342C2072656164- <1> 1724 0000473B 2044435334290D0A <1> 1725 <1> %if _PM 1726 00004743 3030303220656E6162- <1> db _4digitshex(opt4_int_2F_hook)," enable interrupt 2Fh hook while in 86 Mode",13,10 1726 0000474C 6C6520696E74657272- <1> 1726 00004755 757074203246682068- <1> 1726 0000475E 6F6F6B207768696C65- <1> 1726 00004767 20696E203836204D6F- <1> 1726 00004770 64650D0A <1> 1727 <1> %endif 1728 00004774 3030303420656E6162- <1> db _4digitshex(opt4_int_08_hook)," enable interrupt 8 hook",13,10 1728 0000477D 6C6520696E74657272- <1> 1728 00004786 757074203820686F6F- <1> 1728 0000478F 6B0D0A <1> 1729 00004792 3030303820656E6162- <1> db _4digitshex(opt4_int_2D_hook)," enable interrupt 2Dh hook",13,10 1729 0000479B 6C6520696E74657272- <1> 1729 000047A4 757074203244682068- <1> 1729 000047AD 6F6F6B0D0A <1> 1730 000047B2 303030313030303020- <1> db _8digitshex(opt4_int_serial_force)," force serial interrupt unhooking",13,10 1730 000047BB 666F72636520736572- <1> 1730 000047C4 69616C20696E746572- <1> 1730 000047CD 7275707420756E686F- <1> 1730 000047D6 6F6B696E670D0A <1> 1731 <1> %if _PM 1732 000047DD 303030323030303020- <1> db _8digitshex(opt4_int_2F_force)," force interrupt 2Fh unhooking",13,10 1732 000047E6 666F72636520696E74- <1> 1732 000047EF 657272757074203246- <1> 1732 000047F8 6820756E686F6F6B69- <1> 1732 00004801 6E670D0A <1> 1733 <1> %endif 1734 00004805 303030343030303020- <1> db _8digitshex(opt4_int_08_force)," force interrupt 8 unhooking",13,10 1734 0000480E 666F72636520696E74- <1> 1734 00004817 657272757074203820- <1> 1734 00004820 756E686F6F6B696E67- <1> 1734 00004829 0D0A <1> 1735 0000482B 303030383030303020- <1> db _8digitshex(opt4_int_2D_force)," force interrupt 2Dh unhooking",13,10 1735 00004834 666F72636520696E74- <1> 1735 0000483D 657272757074203244- <1> 1735 00004846 6820756E686F6F6B69- <1> 1735 0000484F 6E670D0A <1> 1736 00004853 303130303030303020- <1> db _8digitshex(opt4_int_00_force)," force interrupt 0 unhooking",13,10 1736 0000485C 666F72636520696E74- <1> 1736 00004865 657272757074203020- <1> 1736 0000486E 756E686F6F6B696E67- <1> 1736 00004877 0D0A <1> 1737 00004879 303230303030303020- <1> db _8digitshex(opt4_int_01_force)," force interrupt 1 unhooking",13,10 1737 00004882 666F72636520696E74- <1> 1737 0000488B 657272757074203120- <1> 1737 00004894 756E686F6F6B696E67- <1> 1737 0000489D 0D0A <1> 1738 0000489F 303430303030303020- <1> db _8digitshex(opt4_int_03_force)," force interrupt 3 unhooking",13,10 1738 000048A8 666F72636520696E74- <1> 1738 000048B1 657272757074203320- <1> 1738 000048BA 756E686F6F6B696E67- <1> 1738 000048C3 0D0A <1> 1739 000048C5 303830303030303020- <1> db _8digitshex(opt4_int_06_force)," force interrupt 6 unhooking",13,10 1739 000048CE 666F72636520696E74- <1> 1739 000048D7 657272757074203620- <1> 1739 000048E0 756E686F6F6B696E67- <1> 1739 000048E9 0D0A <1> 1740 000048EB 313030303030303020- <1> db _8digitshex(opt4_int_18_force)," force interrupt 18h unhooking",13,10 1740 000048F4 666F72636520696E74- <1> 1740 000048FD 657272757074203138- <1> 1740 00004906 6820756E686F6F6B69- <1> 1740 0000490F 6E670D0A <1> 1741 00004913 323030303030303020- <1> db _8digitshex(opt4_int_19_force)," force interrupt 19h unhooking",13,10 1741 0000491C 666F72636520696E74- <1> 1741 00004925 657272757074203139- <1> 1741 0000492E 6820756E686F6F6B69- <1> 1741 00004937 6E670D0A <1> 1742 0000493B 0D0A <1> db 13,10 1743 0000493D 496E7465726E616C20- <1> db "Internal flags: (read DIF)",13,10 1743 00004946 666C6167733A202872- <1> 1743 0000494F 65616420444946290D- <1> 1743 00004958 0A <1> 1744 00004959 30303030303120496E- <1> db _6digitshex(oldpacket), " Int25/Int26 packet method available",13,10 1744 00004962 7432352F496E743236- <1> 1744 0000496B 207061636B6574206D- <1> 1744 00004974 6574686F6420617661- <1> 1744 0000497D 696C61626C650D0A <1> 1745 00004985 30303030303220496E- <1> db _6digitshex(newpacket), " Int21.7305 packet method available",13,10 1745 0000498E 7432312E3733303520- <1> 1745 00004997 7061636B6574206D65- <1> 1745 000049A0 74686F642061766169- <1> 1745 000049A9 6C61626C650D0A <1> 1746 <1> %if _VDD 1747 000049B0 303030303034205644- <1> db _6digitshex(ntpacket), " VDD registered and usable",13,10 1747 000049B9 442072656769737465- <1> 1747 000049C2 72656420616E642075- <1> 1747 000049CB 7361626C650D0A <1> 1748 <1> %endif 1749 000049D2 30303030303820696E- <1> db _6digitshex(pagedcommand), " internal flag for paged output",13,10 1749 000049DB 7465726E616C20666C- <1> 1749 000049E4 616720666F72207061- <1> 1749 000049ED 676564206F75747075- <1> 1749 000049F6 740D0A <1> 1750 000049F9 303030303130204445- <1> db _6digitshex(notstdinput), " DEBUG's input isn't StdIn",13,10 1750 00004A02 425547277320696E70- <1> 1750 00004A0B 75742069736E277420- <1> 1750 00004A14 537464496E0D0A <1> 1751 00004A1B 303030303230204445- <1> db _6digitshex(inputfile), " DEBUG's input is a file",13,10 1751 00004A24 425547277320696E70- <1> 1751 00004A2D 757420697320612066- <1> 1751 00004A36 696C650D0A <1> 1752 00004A3B 303030303430204445- <1> db _6digitshex(notstdoutput), " DEBUG's output isn't StdOut",13,10 1752 00004A44 4255472773206F7574- <1> 1752 00004A4D 7075742069736E2774- <1> 1752 00004A56 205374644F75740D0A <1> 1753 00004A5F 303030303830204445- <1> db _6digitshex(outputfile), " DEBUG's output is a file",13,10 1753 00004A68 4255472773206F7574- <1> 1753 00004A71 707574206973206120- <1> 1753 00004A7A 66696C650D0A <1> 1754 <1> %if _PM 1755 00004A80 30303031303020496E- <1> db _6digitshex(hooked2F), " Int2F.1687 hooked",13,10 1755 00004A89 7432462E3136383720- <1> 1755 00004A92 686F6F6B65640D0A <1> 1756 00004A9A 30303032303020496E- <1> db _6digitshex(nohook2F), " Int2F.1687 won't be hooked",13,10 1756 00004AA3 7432462E3136383720- <1> 1756 00004AAC 776F6E277420626520- <1> 1756 00004AB5 686F6F6B65640D0A <1> 1757 00004ABD 30303034303020646F- <1> db _6digitshex(dpminohlt), " do not execute HLT to idle in PM",13,10 1757 00004AC6 206E6F742065786563- <1> 1757 00004ACF 75746520484C542074- <1> 1757 00004AD8 6F2069646C6520696E- <1> 1757 00004AE1 20504D0D0A <1> 1758 00004AE6 30303038303020696E- <1> db _6digitshex(protectedmode), " in protected mode",13,10 1758 00004AEF 2070726F7465637465- <1> 1758 00004AF8 64206D6F64650D0A <1> 1759 <1> %endif 1760 00004B00 303031303030207374- <1> db _6digitshex(debuggeeA20), " state of debuggee's A20",13,10 1760 00004B09 617465206F66206465- <1> 1760 00004B12 627567676565277320- <1> 1760 00004B1B 4132300D0A <1> 1761 00004B20 303032303030207374- <1> db _6digitshex(debuggerA20), " state of debugger's A20 (not implemented: same as previous)",13,10 1761 00004B29 617465206F66206465- <1> 1761 00004B32 627567676572277320- <1> 1761 00004B3B 41323020286E6F7420- <1> 1761 00004B44 696D706C656D656E74- <1> 1761 00004B4D 65643A2073616D6520- <1> 1761 00004B56 61732070726576696F- <1> 1761 00004B5F 7573290D0A <1> 1762 <1> %if _BOOTLDR 1763 00004B64 303034303030206465- <1> db _6digitshex(nodosloaded), " debugger booted independent of a DOS",13,10 1763 00004B6D 62756767657220626F- <1> 1763 00004B76 6F74656420696E6465- <1> 1763 00004B7F 70656E64656E74206F- <1> 1763 00004B88 66206120444F530D0A <1> 1764 <1> %endif 1765 00004B91 303038303030204350- <1> db _6digitshex(has386), " CPU is at least a 386 (32-bit CPU)",13,10 1765 00004B9A 55206973206174206C- <1> 1765 00004BA3 656173742061203338- <1> 1765 00004BAC 36202833322D626974- <1> 1765 00004BB5 20435055290D0A <1> 1766 00004BBC 30313030303020696E- <1> db _6digitshex(usecharcounter), " internal flag for tab output processing",13,10 1766 00004BC5 7465726E616C20666C- <1> 1766 00004BCE 616720666F72207461- <1> 1766 00004BD7 62206F757470757420- <1> 1766 00004BE0 70726F63657373696E- <1> 1766 00004BE9 670D0A <1> 1767 <1> %if _VDD 1768 00004BEC 303230303030207275- <1> db _6digitshex(runningnt), " running inside NTVDM",13,10 1768 00004BF5 6E6E696E6720696E73- <1> 1768 00004BFE 696465204E5456444D- <1> 1768 00004C07 0D0A <1> 1769 <1> %endif 1770 <1> %if _PM 1771 00004C09 303430303030204450- <1> db _6digitshex(canswitchmode), " DPMI raw mode switch usable to set breakpoints",13,10 1771 00004C12 4D4920726177206D6F- <1> 1771 00004C1B 646520737769746368- <1> 1771 00004C24 20757361626C652074- <1> 1771 00004C2D 6F2073657420627265- <1> 1771 00004C36 616B706F696E74730D- <1> 1771 00004C3F 0A <1> 1772 00004C40 30383030303020696E- <1> db _6digitshex(modeswitched), " internal flag for mode switching",13,10 1772 00004C49 7465726E616C20666C- <1> 1772 00004C52 616720666F72206D6F- <1> 1772 00004C5B 646520737769746368- <1> 1772 00004C64 696E670D0A <1> 1773 <1> %endif 1774 00004C69 31303030303020696E- <1> db _6digitshex(promptwaiting), " internal flag for paged output",13,10 1774 00004C72 7465726E616C20666C- <1> 1774 00004C7B 616720666F72207061- <1> 1774 00004C84 676564206F75747075- <1> 1774 00004C8D 740D0A <1> 1775 <1> %if _PM 1776 00004C90 32303030303020696E- <1> db _6digitshex(switchbuffer), " internal flag for mode switching",13,10 1776 00004C99 7465726E616C20666C- <1> 1776 00004CA2 616720666F72206D6F- <1> 1776 00004CAB 646520737769746368- <1> 1776 00004CB4 696E670D0A <1> 1777 <1> %endif 1778 <1> %if _TSR 1779 00004CB9 34303030303020696E- <1> db _6digitshex(tsrmode), " in TSR mode (detached debugger process)",13,10 1779 00004CC2 20545352206D6F6465- <1> 1779 00004CCB 202864657461636865- <1> 1779 00004CD4 642064656275676765- <1> 1779 00004CDD 722070726F63657373- <1> 1779 00004CE6 290D0A <1> 1780 <1> %endif 1781 <1> %if _DOSEMU 1782 00004CE9 303130303030303020- <1> db _8digitshex(runningdosemu), " running inside dosemu",13,10 1782 00004CF2 72756E6E696E672069- <1> 1782 00004CFB 6E7369646520646F73- <1> 1782 00004D04 656D750D0A <1> 1783 <1> %endif 1784 00004D09 3034303030303030 <1> db _8digitshex(tt_while) 1785 00004D11 20542F54502F503A20- <1> db " T/TP/P: while condition specified",13,10 1785 00004D1A 7768696C6520636F6E- <1> 1785 00004D23 646974696F6E207370- <1> 1785 00004D2C 656369666965640D0A <1> 1786 00004D35 3038303030303030 <1> db _8digitshex(tt_p) 1787 00004D3D 2054503A2050207370- <1> db " TP: P specified (proceed past string ops)",13,10 1787 00004D46 656369666965642028- <1> 1787 00004D4F 70726F636565642070- <1> 1787 00004D58 61737420737472696E- <1> 1787 00004D61 67206F7073290D0A <1> 1788 00004D69 3130303030303030 <1> db _8digitshex(tt_silent_mode) 1789 00004D71 20542F54502F503A20- <1> db " T/TP/P: silent mode (SILENT specified)",13,10 1789 00004D7A 73696C656E74206D6F- <1> 1789 00004D83 6465202853494C454E- <1> 1789 00004D8C 542073706563696669- <1> 1789 00004D95 6564290D0A <1> 1790 00004D9A 3230303030303030 <1> db _8digitshex(tt_silence) 1791 00004DA2 20542F54502F503A20- <1> db " T/TP/P: silent mode is active, writing to silent buffer",13,10 1791 00004DAB 73696C656E74206D6F- <1> 1791 00004DB4 646520697320616374- <1> 1791 00004DBD 6976652C2077726974- <1> 1791 00004DC6 696E6720746F207369- <1> 1791 00004DCF 6C656E742062756666- <1> 1791 00004DD8 65720D0A <1> 1792 00004DDC 0D0A <1> db 13,10 1793 00004DDE 417661696C61626C65- <1> db "Available assembler/disassembler options: (read/write DAO, read DAS)",13,10 1793 00004DE7 20617373656D626C65- <1> 1793 00004DF0 722F64697361737365- <1> 1793 00004DF9 6D626C6572206F7074- <1> 1793 00004E02 696F6E733A20287265- <1> 1793 00004E0B 61642F777269746520- <1> 1793 00004E14 44414F2C2072656164- <1> 1793 00004E1D 20444153290D0A <1> 1794 00004E24 303120446973617373- <1> db _2digitshex(disasm_lowercase), " Disassembler: lowercase output",13,10 1794 00004E2D 656D626C65723A206C- <1> 1794 00004E36 6F7765726361736520- <1> 1794 00004E3F 6F75747075740D0A <1> 1795 00004E47 303220446973617373- <1> db _2digitshex(disasm_commablank)," Disassembler: output blank behind comma",13,10 1795 00004E50 656D626C65723A206F- <1> 1795 00004E59 757470757420626C61- <1> 1795 00004E62 6E6B20626568696E64- <1> 1795 00004E6B 20636F6D6D610D0A <1> 1796 00004E73 303420446973617373- <1> db _2digitshex(disasm_nasm), " Disassembler: output addresses in NASM syntax",13,10 1796 00004E7C 656D626C65723A206F- <1> 1796 00004E85 757470757420616464- <1> 1796 00004E8E 72657373657320696E- <1> 1796 00004E97 204E41534D2073796E- <1> 1796 00004EA0 7461780D0A <1> 1797 00004EA5 3038 <1> db _2digitshex(disasm_lowercase_refmem) 1798 00004EA7 20446973617373656D- <1> db " Disassembler: lowercase referenced memory location segreg",13,10 1798 00004EB0 626C65723A206C6F77- <1> 1798 00004EB9 657263617365207265- <1> 1798 00004EC2 666572656E63656420- <1> 1798 00004ECB 6D656D6F7279206C6F- <1> 1798 00004ED4 636174696F6E207365- <1> 1798 00004EDD 677265670D0A <1> 1799 00004EE3 313020446973617373- <1> db _2digitshex(disasm_show_short)," Disassembler: always show SHORT keyword",13,10 1799 00004EEC 656D626C65723A2061- <1> 1799 00004EF5 6C776179732073686F- <1> 1799 00004EFE 772053484F5254206B- <1> 1799 00004F07 6579776F72640D0A <1> 1800 00004F0F 323020446973617373- <1> db _2digitshex(disasm_show_near), " Disassembler: always show NEAR keyword",13,10 1800 00004F18 656D626C65723A2061- <1> 1800 00004F21 6C776179732073686F- <1> 1800 00004F2A 77204E454152206B65- <1> 1800 00004F33 79776F72640D0A <1> 1801 00004F3A 343020446973617373- <1> db _2digitshex(disasm_show_far), " Disassembler: always show FAR keyword",13,10 1801 00004F43 656D626C65723A2061- <1> 1801 00004F4C 6C776179732073686F- <1> 1801 00004F55 7720464152206B6579- <1> 1801 00004F5E 776F72640D0A <1> 1802 00004F64 00 <1> asciz 1803 <1> %endif 1804 <1> 1805 <1> %if _VARIABLES || _OPTIONS || _PSPVARIABLES 1806 <1> .varhelp: 1807 00004F65 417661696C61626C65- <1> db "Available " 1807 00004F6E 20 <1> 1808 <1> %if _PSPVARIABLES && !(_VARIABLES || _OPTIONS) 1809 <1> db "read-only " 1810 <1> %endif 1811 00004F6F 6C4465627567207661- <1> db "lDebug variables:",13,10 1811 00004F78 726961626C65733A0D- <1> 1811 00004F81 0A <1> 1812 <1> %if _VARIABLES 1813 00004F82 56302E2E5646095573- <1> db "V0..VF",9,"User-specified usage",13,10 1813 00004F8B 65722D737065636966- <1> 1813 00004F94 696564207573616765- <1> 1813 00004F9D 0D0A <1> 1814 <1> %endif 1815 <1> %if _OPTIONS 1816 00004F9F 44434F094465627567- <1> db "DCO",9,"Debugger Common Options",13,10 1816 00004FA8 67657220436F6D6D6F- <1> 1816 00004FB1 6E204F7074696F6E73- <1> 1816 00004FBA 0D0A <1> 1817 00004FBC 44414F094465627567- <1> db "DAO",9,"Debugger Assembler/disassembler Options",13,10 1817 00004FC5 67657220417373656D- <1> 1817 00004FCE 626C65722F64697361- <1> 1817 00004FD7 7373656D626C657220- <1> 1817 00004FE0 4F7074696F6E730D0A <1> 1818 <1> %endif 1819 <1> %if _OPTIONS || _PSPVARIABLES && (_OPTIONS || _VARIABLES) 1820 00004FE9 2054686520666F6C6C- <1> db " The following variables cannot be written:",13,10 1820 00004FF2 6F77696E6720766172- <1> 1820 00004FFB 6961626C6573206361- <1> 1820 00005004 6E6E6F742062652077- <1> 1820 0000500D 72697474656E3A0D0A <1> 1821 <1> %endif 1822 <1> %if _PSPVARIABLES 1823 00005016 505350094465627567- <1> db "PSP",9,"Debuggee Process" 1823 0000501F 6765652050726F6365- <1> 1823 00005028 7373 <1> 1824 <1> %if _PM 1825 0000502A 20286173207265616C- <1> db " (as real mode segment)" 1825 00005033 206D6F646520736567- <1> 1825 0000503C 6D656E7429 <1> 1826 <1> %endif 1827 00005041 0D0A <1> db 13,10 1828 00005043 505052094465627567- <1> db "PPR",9,"Debuggee's Parent Process",13,10 1828 0000504C 676565277320506172- <1> 1828 00005055 656E742050726F6365- <1> 1828 0000505E 73730D0A <1> 1829 00005062 505049094465627567- <1> db "PPI",9,"Debuggee's Parent Process Interrupt 22h",13,10 1829 0000506B 676565277320506172- <1> 1829 00005074 656E742050726F6365- <1> 1829 0000507D 737320496E74657272- <1> 1829 00005086 757074203232680D0A <1> 1830 <1> %endif 1831 <1> %if _OPTIONS 1832 0000508F 444946094465627567- <1> db "DIF",9,"Debugger Internal Flags",13,10 1832 00005098 67657220496E746572- <1> 1832 000050A1 6E616C20466C616773- <1> 1832 000050AA 0D0A <1> 1833 000050AC 444353094465627567- <1> db "DCS",9,"Debugger Common Startup options",13,10 1833 000050B5 67657220436F6D6D6F- <1> 1833 000050BE 6E2053746172747570- <1> 1833 000050C7 206F7074696F6E730D- <1> 1833 000050D0 0A <1> 1834 000050D1 444153094465627567- <1> db "DAS",9,"Debugger Assembler/disassembler Startup options",13,10 1834 000050DA 67657220417373656D- <1> 1834 000050E3 626C65722F64697361- <1> 1834 000050EC 7373656D626C657220- <1> 1834 000050F5 53746172747570206F- <1> 1834 000050FE 7074696F6E730D0A <1> 1835 00005106 445052094465627567- <1> db "DPR",9,"Debugger Process" 1835 0000510F 6765722050726F6365- <1> 1835 00005118 7373 <1> 1836 <1> %if _PM 1837 0000511A 20286173205265616C- <1> db " (as Real mode segment)",13,10 1837 00005123 206D6F646520736567- <1> 1837 0000512C 6D656E74290D0A <1> 1838 00005133 445053094465627567- <1> db "DPS",9,"Debugger Process Selector (zero in real mode)" 1838 0000513C 6765722050726F6365- <1> 1838 00005145 73732053656C656374- <1> 1838 0000514E 6F7220287A65726F20- <1> 1838 00005157 696E207265616C206D- <1> 1838 00005160 6F646529 <1> 1839 <1> %endif 1840 00005164 0D0A <1> db 13,10 1841 00005166 445050094465627567- <1> db "DPP",9,"Debugger's Parent Process" 1841 0000516F 676572277320506172- <1> 1841 00005178 656E742050726F6365- <1> 1841 00005181 7373 <1> 1842 <1> %if _TSR 1843 00005183 20287A65726F20696E- <1> db " (zero in TSR mode)" 1843 0000518C 20545352206D6F6465- <1> 1843 00005195 29 <1> 1844 <1> %endif 1845 00005196 0D0A <1> db 13,10 1846 00005198 445049094465627567- <1> db "DPI",9,"Debugger's Parent process Interrupt 22h" 1846 000051A1 676572277320506172- <1> 1846 000051AA 656E742070726F6365- <1> 1846 000051B3 737320496E74657272- <1> 1846 000051BC 75707420323268 <1> 1847 <1> %if _TSR 1848 000051C3 20287A65726F20696E- <1> db " (zero in TSR mode)" 1848 000051CC 20545352206D6F6465- <1> 1848 000051D5 29 <1> 1849 <1> %endif 1850 000051D6 0D0A <1> db 13,10 1851 000051D8 0D0A <1> db 13,10 1852 000051DA 456E746572203F4F20- <1> db "Enter ?O to display the options and internal flags.",13,10 1852 000051E3 746F20646973706C61- <1> 1852 000051EC 7920746865206F7074- <1> 1852 000051F5 696F6E7320616E6420- <1> 1852 000051FE 696E7465726E616C20- <1> 1852 00005207 666C6167732E0D0A <1> 1853 <1> %endif 1854 0000520F 00 <1> asciz 1855 <1> %endif 1856 <1> %if _BOOTLDR 1857 <1> .boothelp: 1858 00005210 426F6F74206C6F6164- <1> db "Boot loading commands:",13,10 1858 00005219 696E6720636F6D6D61- <1> 1858 00005222 6E64733A0D0A <1> 1859 00005228 424F4F54204C495354- <1> db "BOOT LIST HDA",13,10 1859 00005231 204844410D0A <1> 1860 00005237 424F4F542044495220- <1> db "BOOT DIR [partition] [dirname]",13,10 1860 00005240 5B706172746974696F- <1> 1860 00005249 6E5D205B6469726E61- <1> 1860 00005252 6D655D0D0A <1> 1861 00005257 424F4F542052454144- <1> db "BOOT READ|WRITE [partition] segment [[HIDDEN=sector] sector] [count]",13,10 1861 00005260 7C5752495445205B70- <1> 1861 00005269 6172746974696F6E5D- <1> 1861 00005272 207365676D656E7420- <1> 1861 0000527B 5B5B48494444454E3D- <1> 1861 00005284 736563746F725D2073- <1> 1861 0000528D 6563746F725D205B63- <1> 1861 00005296 6F756E745D0D0A <1> 1862 <1> %if _DOSEMU 1863 0000529D 424F4F542051554954- <1> db "BOOT QUIT",9,"[exits dosemu or shuts down using APM]",13,10 1863 000052A6 095B65786974732064- <1> 1863 000052AF 6F73656D75206F7220- <1> 1863 000052B8 736875747320646F77- <1> 1863 000052C1 6E207573696E672041- <1> 1863 000052CA 504D5D0D0A <1> 1864 <1> %else 1865 <1> db "BOOT QUIT",9,"[shuts down using APM]",13,10 1866 <1> %endif 1867 000052CF 424F4F54205B50524F- <1> db "BOOT [PROTOCOL=SECTOR] partition",13,10 1867 000052D8 544F434F4C3D534543- <1> 1867 000052E1 544F525D2070617274- <1> 1867 000052EA 6974696F6E0D0A <1> 1868 000052F1 424F4F542050524F54- <1> db "BOOT PROTOCOL=proto [opt] [partition] [filename1] [filename2] [cmdline]",13,10 1868 000052FA 4F434F4C3D70726F74- <1> 1868 00005303 6F205B6F70745D205B- <1> 1868 0000530C 706172746974696F6E- <1> 1868 00005315 5D205B66696C656E61- <1> 1868 0000531E 6D65315D205B66696C- <1> 1868 00005327 656E616D65325D205B- <1> 1868 00005330 636D646C696E655D0D- <1> 1868 00005339 0A <1> 1869 0000533A 0974686520666F6C6C- <1> db 9,"the following partitions may be specified:",13,10 1869 00005343 6F77696E6720706172- <1> 1869 0000534C 746974696F6E73206D- <1> 1869 00005355 617920626520737065- <1> 1869 0000535E 6369666965643A0D0A <1> 1870 00005367 09204844416E756D09- <1> db 9," HDAnum",9,"first hard disk, num = partition (1-4 primary, 5+ logical)",13,10 1870 00005370 666972737420686172- <1> 1870 00005379 64206469736B2C206E- <1> 1870 00005382 756D203D2070617274- <1> 1870 0000538B 6974696F6E2028312D- <1> 1870 00005394 34207072696D617279- <1> 1870 0000539D 2C20352B206C6F6769- <1> 1870 000053A6 63616C290D0A <1> 1871 000053AC 09204844426E756D09- <1> db 9," HDBnum",9,"second hard disk (etc), num = partition",13,10 1871 000053B5 7365636F6E64206861- <1> 1871 000053BE 7264206469736B2028- <1> 1871 000053C7 657463292C206E756D- <1> 1871 000053D0 203D20706172746974- <1> 1871 000053D9 696F6E0D0A <1> 1872 000053DE 092048444109666972- <1> db 9," HDA",9,"first hard disk (only valid for READ|WRITE|PROTOCOL=SECTOR)",13,10 1872 000053E7 737420686172642064- <1> 1872 000053F0 69736B20286F6E6C79- <1> 1872 000053F9 2076616C696420666F- <1> 1872 00005402 7220524541447C5752- <1> 1872 0000540B 4954457C50524F544F- <1> 1872 00005414 434F4C3D534543544F- <1> 1872 0000541D 52290D0A <1> 1873 00005421 092046444109666972- <1> db 9," FDA",9,"first floppy disk",13,10 1873 0000542A 737420666C6F707079- <1> 1873 00005433 206469736B0D0A <1> 1874 0000543A 092046444209736563- <1> db 9," FDB",9,"second floppy disk (etc)",13,10 1874 00005443 6F6E6420666C6F7070- <1> 1874 0000544C 79206469736B202865- <1> 1874 00005455 7463290D0A <1> 1875 0000545A 09204C445009706172- <1> db 9," LDP",9,"partition the debugger loaded from",13,10 1875 00005463 746974696F6E207468- <1> 1875 0000546C 652064656275676765- <1> 1875 00005475 72206C6F6164656420- <1> 1875 0000547E 66726F6D0D0A <1> 1876 00005484 092059445009706172- <1> db 9," YDP",9,"partition the most recent Y command loaded from",13,10 1876 0000548D 746974696F6E207468- <1> 1876 00005496 65206D6F7374207265- <1> 1876 0000549F 63656E74205920636F- <1> 1876 000054A8 6D6D616E64206C6F61- <1> 1876 000054B1 6465642066726F6D0D- <1> 1876 000054BA 0A <1> 1877 000054BB 0920534450096C6173- <1> db 9," SDP",9,"last used partition (default if no partition specified)",13,10 1877 000054C4 742075736564207061- <1> 1877 000054CD 72746974696F6E2028- <1> 1877 000054D6 64656661756C742069- <1> 1877 000054DF 66206E6F2070617274- <1> 1877 000054E8 6974696F6E20737065- <1> 1877 000054F1 636966696564290D0A <1> 1878 000054FA 0966696C656E616D65- <1> db 9,"filename2 may be double-slash // for none",13,10 1878 00005503 32206D617920626520- <1> 1878 0000550C 646F75626C652D736C- <1> 1878 00005515 617368202F2F20666F- <1> 1878 0000551E 72206E6F6E650D0A <1> 1879 00005526 09636D646C696E6520- <1> db 9,"cmdline is only valid for lDOS, RxDOS.2, RxDOS.3 protocols",13,10 1879 0000552F 6973206F6E6C792076- <1> 1879 00005538 616C696420666F7220- <1> 1879 00005541 6C444F532C20527844- <1> 1879 0000554A 4F532E322C20527844- <1> 1879 00005553 4F532E332070726F74- <1> 1879 0000555C 6F636F6C730D0A <1> 1880 00005563 0966696C6573272064- <1> db 9,"files' directory entries are loaded to 500h and 520h",13,10 1880 0000556C 69726563746F727920- <1> 1880 00005575 656E74726965732061- <1> 1880 0000557E 7265206C6F61646564- <1> 1880 00005587 20746F203530306820- <1> 1880 00005590 616E6420353230680D- <1> 1880 00005599 0A <1> 1881 0000559A 0D0A <1> db 13,10 1882 0000559C 417661696C61626C65- <1> db "Available protocols: (default filenames, load segment, then entrypoint)",13,10 1882 000055A5 2070726F746F636F6C- <1> 1882 000055AE 733A20286465666175- <1> 1882 000055B7 6C742066696C656E61- <1> 1882 000055C0 6D65732C206C6F6164- <1> 1882 000055C9 207365676D656E742C- <1> 1882 000055D2 207468656E20656E74- <1> 1882 000055DB 7279706F696E74290D- <1> 1882 000055E4 0A <1> 1883 000055E5 204C444F5309094C44- <1> db " LDOS",9,9, "LDOS.COM or L[D]DEBUG.COM at 200h, 0:400h",13,10 1883 000055EE 4F532E434F4D206F72- <1> 1883 000055F7 204C5B445D44454255- <1> 1883 00005600 472E434F4D20617420- <1> 1883 00005609 323030682C20303A34- <1> 1883 00005612 3030680D0A <1> 1884 00005617 2046524545444F5309- <1> db " FREEDOS",9,"KERNEL.SYS or METAKERN.SYS at 60h, 0:0",13,10 1884 00005620 4B45524E454C2E5359- <1> 1884 00005629 53206F72204D455441- <1> 1884 00005632 4B45524E2E53595320- <1> 1884 0000563B 6174203630682C2030- <1> 1884 00005644 3A300D0A <1> 1885 00005648 20444F534309094950- <1> db " DOSC",9,9, "IPL.SYS at 2000h, 0:0",13,10 1885 00005651 4C2E53595320617420- <1> 1885 0000565A 32303030682C20303A- <1> 1885 00005663 300D0A <1> 1886 00005666 20454452444F530909- <1> db " EDRDOS",9,9,"DRBIO.SYS at 70h, 0:0",13,10 1886 0000566F 445242494F2E535953- <1> 1886 00005678 206174203730682C20- <1> 1886 00005681 303A300D0A <1> 1887 00005686 204D53444F53360909- <1> db " MSDOS6",9,9, "IO.SYS + MSDOS.SYS at 70h, 0:0",13,10 1887 0000568F 494F2E535953202B20- <1> 1887 00005698 4D53444F532E535953- <1> 1887 000056A1 206174203730682C20- <1> 1887 000056AA 303A300D0A <1> 1888 000056AF 204D53444F53370909- <1> db " MSDOS7",9,9, "IO.SYS at 70h, 0:200h",13,10 1888 000056B8 494F2E535953206174- <1> 1888 000056C1 203730682C20303A32- <1> 1888 000056CA 3030680D0A <1> 1889 000056CF 2049424D444F530909- <1> db " IBMDOS",9,9, "IBMBIO.COM + IBMDOS.COM at 70h, 0:0",13,10 1889 000056D8 49424D42494F2E434F- <1> 1889 000056E1 4D202B2049424D444F- <1> 1889 000056EA 532E434F4D20617420- <1> 1889 000056F3 3730682C20303A300D- <1> 1889 000056FC 0A <1> 1890 000056FD 204E544C445209094E- <1> db " NTLDR",9,9, "NTLDR at 2000h, 0:0",13,10 1890 00005706 544C44522061742032- <1> 1890 0000570F 303030682C20303A30- <1> 1890 00005718 0D0A <1> 1891 0000571A 20424F4F544D475209- <1> db " BOOTMGR",9, "BOOTMGR at 2000h, 0:0",13,10 1891 00005723 424F4F544D47522061- <1> 1891 0000572C 742032303030682C20- <1> 1891 00005735 303A300D0A <1> 1892 0000573A 205258444F532E3009- <1> db " RXDOS.0",9,"RXDOSBIO.SYS + RXDOS.SYS at 70h, 0:0",13,10 1892 00005743 5258444F5342494F2E- <1> 1892 0000574C 535953202B20525844- <1> 1892 00005755 4F532E535953206174- <1> 1892 0000575E 203730682C20303A30- <1> 1892 00005767 0D0A <1> 1893 00005769 205258444F532E3109- <1> db " RXDOS.1",9,"RXBIO.SYS + RXDOS.SYS at 70h, 0:0",13,10 1893 00005772 525842494F2E535953- <1> 1893 0000577B 202B205258444F532E- <1> 1893 00005784 535953206174203730- <1> 1893 0000578D 682C20303A300D0A <1> 1894 00005795 205258444F532E3209- <1> db " RXDOS.2",9,"RXDOS.COM at 70h, 0:400h",13,10 1894 0000579E 5258444F532E434F4D- <1> 1894 000057A7 206174203730682C20- <1> 1894 000057B0 303A343030680D0A <1> 1895 000057B8 205258444F532E3309- <1> db " RXDOS.3",9,"RXDOS.COM at 200h, 0:400h",13,10 1895 000057C1 5258444F532E434F4D- <1> 1895 000057CA 20617420323030682C- <1> 1895 000057D3 20303A343030680D0A <1> 1896 000057DC 20434841494E090942- <1> db " CHAIN",9,9,"BOOTSECT.DOS at 7C0h, -7C0h:7C00h",13,10 1896 000057E5 4F4F54534543542E44- <1> 1896 000057EE 4F5320617420374330- <1> 1896 000057F7 682C202D374330683A- <1> 1896 00005800 37433030680D0A <1> 1897 00005807 20534543544F520909- <1> db " SECTOR",9,9,"(default) load partition boot sector or MBR",13,10 1897 00005810 2864656661756C7429- <1> 1897 00005819 206C6F616420706172- <1> 1897 00005822 746974696F6E20626F- <1> 1897 0000582B 6F7420736563746F72- <1> 1897 00005834 206F72204D42520D0A <1> 1898 0000583D 20534543544F52414C- <1> db " SECTORALT",9,"as SECTOR, but entry at 07C0h:0",13,10 1898 00005846 540961732053454354- <1> 1898 0000584F 4F522C206275742065- <1> 1898 00005858 6E7472792061742030- <1> 1898 00005861 374330683A300D0A <1> 1899 00005869 0D0A <1> db 13,10 1900 0000586B 417661696C61626C65- <1> db "Available options:",13,10 1900 00005874 206F7074696F6E733A- <1> 1900 0000587D 0D0A <1> 1901 0000587F 204D494E504152413D- <1> db " MINPARA=num",9,9, "load at least that many paragraphs",13,10 1901 00005888 6E756D09096C6F6164- <1> 1901 00005891 206174206C65617374- <1> 1901 0000589A 2074686174206D616E- <1> 1901 000058A3 792070617261677261- <1> 1901 000058AC 7068730D0A <1> 1902 000058B1 204D4158504152413D- <1> db " MAXPARA=num",9,9, "load at most that many paragraphs (0 = as many as fit)",13,10 1902 000058BA 6E756D09096C6F6164- <1> 1902 000058C3 206174206D6F737420- <1> 1902 000058CC 74686174206D616E79- <1> 1902 000058D5 207061726167726170- <1> 1902 000058DE 6873202830203D2061- <1> 1902 000058E7 73206D616E79206173- <1> 1902 000058F0 20666974290D0A <1> 1903 000058F7 205345474D454E543D- <1> db " SEGMENT=num",9,9, "change segment at that the kernel loads",13,10 1903 00005900 6E756D09096368616E- <1> 1903 00005909 6765207365676D656E- <1> 1903 00005912 742061742074686174- <1> 1903 0000591B 20746865206B65726E- <1> 1903 00005924 656C206C6F6164730D- <1> 1903 0000592D 0A <1> 1904 0000592E 20454E5452593D5B6E- <1> db " ENTRY=[num:]num",9,"change entrypoint (CS (relative) : IP)",13,10 1904 00005937 756D3A5D6E756D0963- <1> 1904 00005940 68616E676520656E74- <1> 1904 00005949 7279706F696E742028- <1> 1904 00005952 4353202872656C6174- <1> 1904 0000595B 69766529203A204950- <1> 1904 00005964 290D0A <1> 1905 00005967 204250423D5B6E756D- <1> db " BPB=[num:]num",9,9, "change BPB load address (segment -1 = auto-BPB)",13,10 1905 00005970 3A5D6E756D09096368- <1> 1905 00005979 616E67652042504220- <1> 1905 00005982 6C6F61642061646472- <1> 1905 0000598B 65737320287365676D- <1> 1905 00005994 656E74202D31203D20- <1> 1905 0000599D 6175746F2D42504229- <1> 1905 000059A6 0D0A <1> 1907 000059A8 20434845434B4F4646- <1> db " CHECKOFFSET=num",9,"set address of word to check, must be even",13,10 1907 000059B1 5345543D6E756D0973- <1> 1907 000059BA 657420616464726573- <1> 1907 000059C3 73206F6620776F7264- <1> 1907 000059CC 20746F20636865636B- <1> 1907 000059D5 2C206D757374206265- <1> 1907 000059DE 206576656E0D0A <1> 1908 000059E5 20434845434B56414C- <1> db " CHECKVALUE=num",9,9,"set value of word to check (0 = no check)",13,10 1908 000059EE 55453D6E756D090973- <1> 1908 000059F7 65742076616C756520- <1> 1908 00005A00 6F6620776F72642074- <1> 1908 00005A09 6F20636865636B2028- <1> 1908 00005A12 30203D206E6F206368- <1> 1908 00005A1B 65636B290D0A <1> 1909 00005A21 426F6F6C65616E206F- <1> db "Boolean options: [opt=bool]",13,10 1909 00005A2A 7074696F6E733A205B- <1> 1909 00005A33 6F70743D626F6F6C5D- <1> 1909 00005A3C 0D0A <1> 1910 00005A3E 205345545F444C5F55- <1> db " SET_DL_UNIT",9,9,"set dl to load unit",13,10 1910 00005A47 4E4954090973657420- <1> 1910 00005A50 646C20746F206C6F61- <1> 1910 00005A59 6420756E69740D0A <1> 1911 00005A61 205345545F424C5F55- <1> db " SET_BL_UNIT",9,9,"set bl to load unit",13,10 1911 00005A6A 4E4954090973657420- <1> 1911 00005A73 626C20746F206C6F61- <1> 1911 00005A7C 6420756E69740D0A <1> 1912 00005A84 205345545F53494449- <1> db " SET_SIDI_CLUSTER",9,"set si:di to first cluster",13,10 1912 00005A8D 5F434C555354455209- <1> 1912 00005A96 7365742073693A6469- <1> 1912 00005A9F 20746F206669727374- <1> 1912 00005AA8 20636C75737465720D- <1> 1912 00005AB1 0A <1> 1913 00005AB2 205345545F44535349- <1> db " SET_DSSI_DPT",9,9,"set ds:si to DPT address",13,10 1913 00005ABB 5F4450540909736574- <1> 1913 00005AC4 2064733A736920746F- <1> 1913 00005ACD 204450542061646472- <1> 1913 00005AD6 6573730D0A <1> 1914 00005ADB 20505553485F445054- <1> db " PUSH_DPT",9,9,"push DPT address and DPT entry address",13,10 1914 00005AE4 090970757368204450- <1> 1914 00005AED 542061646472657373- <1> 1914 00005AF6 20616E642044505420- <1> 1914 00005AFF 656E74727920616464- <1> 1914 00005B08 726573730D0A <1> 1915 00005B0E 204441544153544152- <1> db " DATASTART_HIDDEN",9,"add hidden sectors to datastart var",13,10 1915 00005B17 545F48494444454E09- <1> 1915 00005B20 616464206869646465- <1> 1915 00005B29 6E20736563746F7273- <1> 1915 00005B32 20746F206461746173- <1> 1915 00005B3B 74617274207661720D- <1> 1915 00005B44 0A <1> 1916 00005B45 205345545F41584258- <1> db " SET_AXBX_DATASTART",9,"set ax:bx to datastart var",13,10 1916 00005B4E 5F4441544153544152- <1> 1916 00005B57 54097365742061783A- <1> 1916 00005B60 627820746F20646174- <1> 1916 00005B69 617374617274207661- <1> 1916 00005B72 720D0A <1> 1917 00005B75 205345545F44534250- <1> db " SET_DSBP_BPB",9,9,"set ds:bp to BPB address",13,10 1917 00005B7E 5F4250420909736574- <1> 1917 00005B87 2064733A627020746F- <1> 1917 00005B90 204250422061646472- <1> 1917 00005B99 6573730D0A <1> 1918 00005B9E 204C42415F5345545F- <1> db " LBA_SET_TYPE",9,9,"set LBA partition type in BPB",13,10 1918 00005BA7 545950450909736574- <1> 1918 00005BB0 204C42412070617274- <1> 1918 00005BB9 6974696F6E20747970- <1> 1918 00005BC2 6520696E204250420D- <1> 1918 00005BCB 0A <1> 1919 00005BCC 204D4553534147455F- <1> db " MESSAGE_TABLE",9,9, "provide message table pointed to at 1EEh",13,10 1919 00005BD5 5441424C4509097072- <1> 1919 00005BDE 6F76696465206D6573- <1> 1919 00005BE7 73616765207461626C- <1> 1919 00005BF0 6520706F696E746564- <1> 1919 00005BF9 20746F206174203145- <1> 1919 00005C02 45680D0A <1> 1921 00005C06 205345545F41584258- <1> db " SET_AXBX_ROOT_HIDDEN",9, "set ax:bx to root start with hidden sectors",13,10 1921 00005C0F 5F524F4F545F484944- <1> 1921 00005C18 44454E097365742061- <1> 1921 00005C21 783A627820746F2072- <1> 1921 00005C2A 6F6F74207374617274- <1> 1921 00005C33 207769746820686964- <1> 1921 00005C3C 64656E20736563746F- <1> 1921 00005C45 72730D0A <1> 1923 00005C49 204E4F5F4250420909- <1> db " NO_BPB",9,9,9, "do not load BPB",13,10 1923 00005C52 09646F206E6F74206C- <1> 1923 00005C5B 6F6164204250420D0A <1> 1924 00005C64 205345545F44535349- <1> db " SET_DSSI_PARTINFO",9, "load part table to 600h, point ds:si + ds:bp to it",13,10 1924 00005C6D 5F50415254494E464F- <1> 1924 00005C76 096C6F616420706172- <1> 1924 00005C7F 74207461626C652074- <1> 1924 00005C88 6F20363030682C2070- <1> 1924 00005C91 6F696E742064733A73- <1> 1924 00005C9A 69202B2064733A6270- <1> 1924 00005CA3 20746F2069740D0A <1> 1925 00005CAB 00 <1> asciz 1926 <1> %endif 1927 <1> %endif 1928 <1> 1929 00005CAC 54686973206C446562- <1> .readonly: asciz "This lDebug variable cannot be written to. See ?V.",13,10 1929 00005CB5 756720766172696162- <1> 1929 00005CBE 6C652063616E6E6F74- <1> 1929 00005CC7 206265207772697474- <1> 1929 00005CD0 656E20746F2E205365- <1> 1929 00005CD9 65203F562E0D0A00 <1> 1930 00005CE1 54686973206D656D6F- <1> .readonly_mem: asciz "This memory variable cannot be written to.",13,10 1930 00005CEA 727920766172696162- <1> 1930 00005CF3 6C652063616E6E6F74- <1> 1930 00005CFC 206265207772697474- <1> 1930 00005D05 656E20746F2E0D0A00 <1> 1931 00005D0E 5B6D6F72655D <1> .more: db "[more]" 1932 <1> .more_size equ $-.more 1933 00005D14 0D2020202020200D <1> .more_over: db 13," ",13 ; to overwrite previous prompt 1934 <1> .more_over_size equ $-.more_over 1935 00005D1C 5E430D0A <1> .ctrlc: db "^C",13,10 1936 <1> .ctrlc_size equ $-.ctrlc 1937 00005D20 00 <1> asciz 1938 <1> .freedos_ctrlc_workaround: 1939 00005D21 20284F6C6420467265- <1> asciz " (Old FreeDOS kernel Ctrl-C work around happened)",13,10 1939 00005D2A 65444F53206B65726E- <1> 1939 00005D33 656C204374726C2D43- <1> 1939 00005D3C 20776F726B2061726F- <1> 1939 00005D45 756E64206861707065- <1> 1939 00005D4E 6E6564290D0A00 <1> 1940 <1> .not_while_indos: 1941 00005D55 436F6D6D616E64206E- <1> asciz "Command not supported while in InDOS mode.",13,10 1941 00005D5E 6F7420737570706F72- <1> 1941 00005D67 746564207768696C65- <1> 1941 00005D70 20696E20496E444F53- <1> 1941 00005D79 206D6F64652E0D0A00 <1> 1942 00005D82 43757272656E74206D- <1> .rv_mode.before: asciz "Current mode: " 1942 00005D8B 6F64653A2000 <1> 1943 <1> %if _PM 1944 00005D91 44504D492031362D62- <1> .rv_mode_dpmi_16: asciz "DPMI 16-bit CS",13,10 1944 00005D9A 69742043530D0A00 <1> 1945 00005DA2 44504D492033322D62- <1> .rv_mode_dpmi_32: asciz "DPMI 32-bit CS",13,10 1945 00005DAB 69742043530D0A00 <1> 1946 <1> %endif 1947 00005DB3 5265616C203836204D- <1> .rv_mode_r86m: asciz "Real 86 Mode",13,10 1947 00005DBC 6F64650D0A00 <1> 1948 00005DC2 5669727475616C2038- <1> .rv_mode_v86m: asciz "Virtual 86 Mode",13,10 1948 00005DCB 36204D6F64650D0A00 <1> 1949 <1> 1950 00005DD4 333836207265676973- <1> .regs386: asciz "386 registers are " 1950 00005DDD 746572732061726520- <1> 1950 00005DE6 00 <1> 1951 00005DE7 6E6F7420 <1> .regs386_off:db "not " 1952 00005DEB 646973706C61796564- <1> .regs386_on: asciz "displayed",13,10 1952 00005DF4 0D0A00 <1> 1953 <1> 1954 <1> %if _EMS 1955 <1> .xhelp: 1956 00005DF7 457870616E64656420- <1> db "Expanded memory (EMS) commands:",13,10 1956 00005E00 6D656D6F7279202845- <1> 1956 00005E09 4D532920636F6D6D61- <1> 1956 00005E12 6E64733A0D0A <1> 1957 00005E18 2020416C6C6F636174- <1> db " Allocate",9, "XA count",13,10 1957 00005E21 6509584120636F756E- <1> 1957 00005E2A 740D0A <1> 1958 00005E2D 20204465616C6C6F63- <1> db " Deallocate",9, "XD handle",13,10 1958 00005E36 617465095844206861- <1> 1958 00005E3F 6E646C650D0A <1> 1959 00005E45 20204D6170206D656D- <1> db " Map memory",9, "XM logical-page physical-page handle",13,10 1959 00005E4E 6F727909584D206C6F- <1> 1959 00005E57 676963616C2D706167- <1> 1959 00005E60 652070687973696361- <1> 1959 00005E69 6C2D70616765206861- <1> 1959 00005E72 6E646C650D0A <1> 1960 00005E78 20205265616C6C6F63- <1> db " Reallocate",9, "XR handle count",13,10 1960 00005E81 617465095852206861- <1> 1960 00005E8A 6E646C6520636F756E- <1> 1960 00005E93 740D0A <1> 1961 00005E96 202053686F77207374- <1> db " Show status",9, "XS",13,10 1961 00005E9F 617475730958530D0A <1> 1962 00005EA8 00 <1> asciz 1963 <1> %endif 1964 <1> 1965 <1> %if _MCB 1966 00005EA9 456E64206F66206368- <1> .invmcbadr: asciz "End of chain: invalid MCB address.",13,10 1966 00005EB2 61696E3A20696E7661- <1> 1966 00005EBB 6C6964204D43422061- <1> 1966 00005EC4 6464726573732E0D0A- <1> 1966 00005ECD 00 <1> 1967 <1> %endif 1968 <1> 1969 <1> %if _TSR 1970 00005ECE 43616E6E6F7420676F- <1> .pspnotfound: asciz "Cannot go resident, child PSP not found.",13,10 1970 00005ED7 207265736964656E74- <1> 1970 00005EE0 2C206368696C642050- <1> 1970 00005EE9 5350206E6F7420666F- <1> 1970 00005EF2 756E642E0D0A00 <1> 1971 00005EF9 43616E6E6F7420676F- <1> .psphooked: asciz "Cannot go resident, child PSP parent return address hooked.",13,10 1971 00005F02 207265736964656E74- <1> 1971 00005F0B 2C206368696C642050- <1> 1971 00005F14 535020706172656E74- <1> 1971 00005F1D 2072657475726E2061- <1> 1971 00005F26 64647265737320686F- <1> 1971 00005F2F 6F6B65642E0D0A00 <1> 1972 00005F37 506174636865642050- <1> .nowtsr1: asciz "Patched PSP at " 1972 00005F40 53502061742000 <1> 1973 00005F47 2C206E6F7720726573- <1> .nowtsr2: asciz ", now resident.",13,10 1973 00005F50 6964656E742E0D0A00 <1> 1974 00005F59 416C72656164792072- <1> .alreadytsr: asciz "Already resident.",13,10 1974 00005F62 65736964656E742E0D- <1> 1974 00005F6B 0A00 <1> 1975 <1> %endif 1976 <1> %if _PM && (_TSR || _BOOTLDR) 1977 00005F6D 43616E6E6F74207175- <1> .cannotpmquit: asciz "Cannot quit, still in protected mode.",13,10 1977 00005F76 69742C207374696C6C- <1> 1977 00005F7F 20696E2070726F7465- <1> 1977 00005F88 63746564206D6F6465- <1> 1977 00005F91 2E0D0A00 <1> 1978 <1> %endif 1979 <1> %if _BOOTLDR 1980 00005F95 436F6D6D616E64206E- <1> .nobootsupp: asciz "Command not supported in boot loaded mode.",13,10 1980 00005F9E 6F7420737570706F72- <1> 1980 00005FA7 74656420696E20626F- <1> 1980 00005FB0 6F74206C6F61646564- <1> 1980 00005FB9 206D6F64652E0D0A00 <1> 1981 00005FC2 53687574646F776E20- <1> .boot_quit_fail:asciz "Shutdown not supported.",13,10 1981 00005FCB 6E6F7420737570706F- <1> 1981 00005FD4 727465642E0D0A00 <1> 1982 00005FDC 426F6F74206661696C- <1> .bootfail: asciz "Boot failure: " 1982 00005FE5 7572653A2000 <1> 1983 00005FEB 52656164696E672073- <1> .bootfail_read: db "Reading sector failed (error " 1983 00005FF4 6563746F7220666169- <1> 1983 00005FFD 6C656420286572726F- <1> 1983 00006006 7220 <1> 1984 00006008 5F5F68292E0D0A00 <1> .bootfail_read_errorcode: asciz "__h).",13,10 1985 00006010 426F6F742073656374- <1> .bootfail_sig: asciz "Boot sector signature missing (is not AA55h).",13,10 1985 00006019 6F72207369676E6174- <1> 1985 00006022 757265206D69737369- <1> 1985 0000602B 6E6720286973206E6F- <1> 1985 00006034 74204141353568292E- <1> 1985 0000603D 0D0A00 <1> 1986 00006040 506172746974696F6E- <1> .bootfail_sig_parttable: ascii "Partition table signature missing" 1986 00006049 207461626C65207369- <1> 1986 00006052 676E6174757265206D- <1> 1986 0000605B 697373696E67 <1> 1987 00006061 20286973206E6F7420- <1> asciz " (is not AA55h).",13,10 1987 0000606A 4141353568292E0D0A- <1> 1987 00006073 00 <1> 1988 00006074 426F6F742073656374- <1> .bootfail_code: asciz "Boot sector code invalid (is 0000h).",13,10 1988 0000607D 6F7220636F64652069- <1> 1988 00006086 6E76616C6964202869- <1> 1988 0000608F 73203030303068292E- <1> 1988 00006098 0D0A00 <1> 1989 <1> .bootfail_secsizediffer: 1990 0000609B 425042204270532064- <1> asciz "BPB BpS differs from actual sector size.",13,10 1990 000060A4 696666657273206672- <1> 1990 000060AD 6F6D2061637475616C- <1> 1990 000060B6 20736563746F722073- <1> 1990 000060BF 697A652E0D0A00 <1> 1991 <1> .bootfail_stack_underflow: 1992 000060C6 426F6F742073746163- <1> asciz "Boot stack underflowed.",13,10 1992 000060CF 6B20756E646572666C- <1> 1992 000060D8 6F7765642E0D0A00 <1> 1993 <1> .bootfail_check_mismatch: 1994 000060E0 436865636B206D6973- <1> db "Check mismatch, expected " 1994 000060E9 6D617463682C206578- <1> 1994 000060F2 70656374656420 <1> 1995 <1> .bootfail_check_mismatch.check_value: 1996 000060F9 5F5F5F5F6820617420- <1> db "____h at offset " 1996 00006102 6F666673657420 <1> 1997 <1> .bootfail_check_mismatch.check_offset: 1998 00006109 5F5F5F5F6820627574- <1> db "____h but has " 1998 00006112 2068617320 <1> 1999 <1> .bootfail_check_mismatch.check_got: 2000 00006117 5F5F5F5F682E0D0A00 <1> asciz "____h.",13,10 2001 00006120 4F7574206F66206D65- <1> .boot_out_of_memory_error: asciz "Out of memory.", 13,10 2001 00006129 6D6F72792E0D0A00 <1> 2002 00006131 546F6F206D616E7920- <1> .boot_too_many_partitions_error:asciz "Too many partitions (or a loop).",13,10 2002 0000613A 706172746974696F6E- <1> 2002 00006143 7320286F722061206C- <1> 2002 0000614C 6F6F70292E0D0A00 <1> 2003 00006154 506172746974696F6E- <1> .boot_partition_cycle_error: asciz "Partition table cycle detected.",13,10 2003 0000615D 207461626C65206379- <1> 2003 00006166 636C65206465746563- <1> 2003 0000616F 7465642E0D0A00 <1> 2004 00006176 506172746974696F6E- <1> .boot_partition_not_found: asciz "Partition not found.",13,10 2004 0000617F 206E6F7420666F756E- <1> 2004 00006188 642E0D0A00 <1> 2005 0000618D 52656164206572726F- <1> .boot_access_error: asciz "Read error.", 13,10 2005 00006196 722E0D0A00 <1> 2006 0000619B 536563746F72207369- <1> .boot_sector_too_large: asciz "Sector size too small (< 32 bytes).", 13,10 2006 000061A4 7A6520746F6F20736D- <1> 2006 000061AD 616C6C20283C203332- <1> 2006 000061B6 206279746573292E0D- <1> 2006 000061BF 0A00 <1> 2007 000061C1 536563746F72207369- <1> .boot_sector_too_small: asciz "Sector size too large (> 8192 bytes).", 13,10 2007 000061CA 7A6520746F6F206C61- <1> 2007 000061D3 72676520283E203831- <1> 2007 000061DC 393220627974657329- <1> 2007 000061E5 2E0D0A00 <1> 2008 000061E9 536563746F72207369- <1> .boot_sector_not_power: asciz "Sector size not a power of two.", 13,10 2008 000061F2 7A65206E6F74206120- <1> 2008 000061FB 706F776572206F6620- <1> 2008 00006204 74776F2E0D0A00 <1> 2009 0000620B 496E76616C69642067- <1> .boot_invalid_sectors: asciz "Invalid geometry sectors.", 13,10 2009 00006214 656F6D657472792073- <1> 2009 0000621D 6563746F72732E0D0A- <1> 2009 00006226 00 <1> 2010 00006227 496E76616C69642067- <1> .boot_invalid_heads: asciz "Invalid geometry heads.", 13,10 2010 00006230 656F6D657472792068- <1> 2010 00006239 656164732E0D0A00 <1> 2011 00006241 46696C65206E6F7420- <1> .boot_file_not_found: asciz "File not found.",13,10 2011 0000624A 666F756E642E0D0A00 <1> 2012 00006253 46696C6520746F6F20- <1> .boot_file_too_big_error: asciz "File too big.",13,10 2012 0000625C 6269672E0D0A00 <1> 2013 00006263 46696C6520746F6F20- <1> .boot_file_too_small_error: asciz "File too small.",13,10 2013 0000626C 736D616C6C2E0D0A00 <1> 2014 00006275 42616420616D6F756E- <1> .boot_badclusters: asciz "Bad amount of clusters.",13,10 2014 0000627E 74206F6620636C7573- <1> 2014 00006287 746572732E0D0A00 <1> 2015 0000628F 42616420636C757374- <1> .boot_badchain: asciz "Bad cluster chain.",13,10 2015 00006298 657220636861696E2E- <1> 2015 000062A1 0D0A00 <1> 2016 000062A4 4261642046696C6520- <1> .boot_badfat: asciz "Bad File Allocation Table.",13,10 2016 000062AD 416C6C6F636174696F- <1> 2016 000062B6 6E205461626C652E0D- <1> 2016 000062BF 0A00 <1> 2017 000062C1 496E76616C69642066- <1> .boot_invalid_filename: asciz "Invalid filename.",13,10 2017 000062CA 696C656E616D652E0D- <1> 2017 000062D3 0A00 <1> 2018 000062D5 43616E6E6F74207365- <1> .boot_cannot_set_both: asciz "Cannot set both " 2018 000062DE 7420626F74682000 <1> 2019 000062E6 20616E642000 <1> .boot_and: asciz " and " 2020 000062EC 2E0D0A00 <1> .boot_dot_crlf: asciz ".",13,10 2021 000062F0 2120496E7465726E61- <1> .boot_internal_error: asciz "! Internal error !",13,10 2021 000062F9 6C206572726F722021- <1> 2021 00006302 0D0A00 <1> 2022 00006305 42504220616E64206C- <1> .boot_bpb_load_overlap: asciz "BPB and load area overlap.",13,10 2022 0000630E 6F6164206172656120- <1> 2022 00006317 6F7665726C61702E0D- <1> 2022 00006320 0A00 <1> 2023 00006322 5365676D656E742074- <1> .boot_segment_too_low: asciz "Segment too low.",13,10 2023 0000632B 6F6F206C6F772E0D0A- <1> 2023 00006334 00 <1> 2024 00006335 42504220746F6F206C- <1> .boot_bpb_too_low: asciz "BPB too low.",13,10 2024 0000633E 6F772E0D0A00 <1> 2025 00006344 2120496E7465726E61- <1> .boot_auxbuff_crossing: db "! Internal error !, " 2025 0000634D 6C206572726F722021- <1> 2025 00006356 2C20 <1> 2026 00006358 617578627566662063- <1> asciz "auxbuff crosses 64 KiB boundary.",13,10 2026 00006361 726F73736573203634- <1> 2026 0000636A 204B694220626F756E- <1> 2026 00006373 646172792E0D0A00 <1> 2027 0000637B 5245414400 <1> .read: asciz "READ" 2028 00006380 575249544500 <1> .write: asciz "WRITE" 2029 00006386 48494444454E00 <1> .hidden: asciz "HIDDEN" 2030 0000638D 44495200 <1> .dir: asciz "DIR" 2031 00006391 082020205B4449525D <1> .dirinsteadsize:countedb " [DIR]" 2032 0000639A 2F00 <1> .emptydirname: asciz "/" 2033 0000639C 424F4F5400 <1> .boot: asciz "BOOT" 2034 000063A1 5155495400 <1> .quit: asciz "QUIT" 2035 000063A6 50524F544F434F4C00 <1> .protocol: asciz "PROTOCOL" 2036 000063AF 5345474D454E5400 <1> .segment: asciz "SEGMENT" 2037 000063B7 454E54525900 <1> .entry: asciz "ENTRY" 2038 000063BD 42504200 <1> .bpb: asciz "BPB" 2039 000063C1 4D494E5041524100 <1> .minpara: asciz "MINPARA" 2040 000063C9 4D41585041524100 <1> .maxpara: asciz "MAXPARA" 2041 000063D1 434845434B4F464653- <1> .checkoffset: asciz "CHECKOFFSET" 2041 000063DA 455400 <1> 2042 000063DD 434845434B56414C55- <1> .checkvalue: asciz "CHECKVALUE" 2042 000063E6 4500 <1> 2043 000063E8 534543544F5200 <1> .sector: asciz "SECTOR" 2044 000063EF 534543544F52414C54- <1> .sector_alt: asciz "SECTORALT" 2044 000063F8 00 <1> 2045 000063F9 4B45524E454C2E5359- <1> .freedos_kernel_name: asciz "KERNEL.SYS" 2045 00006402 5300 <1> 2046 00006404 49504C2E53595300 <1> .dosc_kernel_name: asciz "IPL.SYS" 2047 0000640C 445242494F2E535953- <1> .edrdos_kernel_name: asciz "DRBIO.SYS" 2047 00006415 00 <1> 2048 00006416 4C444F532E434F4D00 <1> .ldos_kernel_name: asciz "LDOS.COM" 2049 <1> .msdos7_kernel_name: 2050 0000641F 494F2E53595300 <1> .msdos6_kernel_name: asciz "IO.SYS" 2051 00006426 4D53444F532E535953- <1> .msdos6_add_name: asciz "MSDOS.SYS" 2051 0000642F 00 <1> 2052 00006430 49424D42494F2E434F- <1> .ibmdos_kernel_name: asciz "IBMBIO.COM" 2052 00006439 4D00 <1> 2053 0000643B 49424D444F532E434F- <1> .ibmdos_add_name: asciz "IBMDOS.COM" 2053 00006444 4D00 <1> 2054 00006446 4E544C445200 <1> .ntldr_kernel_name: asciz "NTLDR" 2055 0000644C 424F4F544D475200 <1> .bootmgr_kernel_name: asciz "BOOTMGR" 2056 00006454 424F4F54534543542E- <1> .chain_kernel_name: asciz "BOOTSECT.DOS" 2056 0000645D 444F5300 <1> 2057 00006461 5258444F5342494F2E- <1> .rxdos.0_kernel_name: asciz "RXDOSBIO.SYS" 2057 0000646A 53595300 <1> 2058 0000646E 525842494F2E535953- <1> .rxdos.1_kernel_name: asciz "RXBIO.SYS" 2058 00006477 00 <1> 2059 <1> .rxdos.0_add_name: 2060 00006478 5258444F532E535953- <1> .rxdos.1_add_name: asciz "RXDOS.SYS" 2060 00006481 00 <1> 2061 00006482 5258444F532E434F4D- <1> .rxdos.2_kernel_name: asciz "RXDOS.COM" 2061 0000648B 00 <1> 2062 0000648C 00 <1> .addname_empty: asciz 2063 0000648D 43616E6E6F74207175- <1> .cannotbootquit_memsizes: asciz "Cannot quit, memory size changed.",13,10 2063 00006496 69742C206D656D6F72- <1> 2063 0000649F 792073697A65206368- <1> 2063 000064A8 616E6765642E0D0A00 <1> 2064 <1> %endif 2065 000064B1 5448454E00 <1> .then: asciz "THEN" 2066 000064B6 4E4F5400 <1> .not: asciz "NOT" 2067 000064BA 565600 <1> .vv: asciz "VV" 2068 000064BD 564D00 <1> .vm: asciz "VM" 2069 000064C0 0D436F646520736567- <1> .vm_codeseg: counted "Code segment=" 2069 000064C9 6D656E743D <1> 2070 000064CE 0D4461746120736567- <1> .vm_dataseg: counted "Data segment=" 2070 000064D7 6D656E743D <1> 2071 000064DC 0E456E747279207365- <1> .vm_entryseg: counted "Entry segment=" 2071 000064E5 676D656E743D <1> 2072 000064EB 104175786275666620- <1> .vm_auxseg: counted "Auxbuff segment=" 2072 000064F4 7365676D656E743D <1> 2073 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 2074 000064FC 10486973746F727920- <1> .vm_hisseg: counted "History segment=" 2074 00006505 7365676D656E743D <1> 2075 <1> %endif 2076 <1> %if _PM 2077 0000650D 0A2073656C6563746F- <1> .vm_selector: counted " selector=" 2077 00006516 723D <1> 2078 <1> %endif 2079 00006518 546F6F206C6F6E6720- <1> .n_toolongtail: asciz "Too long N command tail!",13,10 2079 00006521 4E20636F6D6D616E64- <1> 2079 0000652A 207461696C210D0A00 <1> 2080 00006533 546F6F206C6F6E6720- <1> .n_toolongname: asciz "Too long N command name!",13,10 2080 0000653C 4E20636F6D6D616E64- <1> 2080 00006545 206E616D65210D0A00 <1> 2081 0000654E 4E554D42455200 <1> .number: asciz "NUMBER" 2082 00006555 434F554E54455200 <1> .counter: asciz "COUNTER" 2083 0000655D 494400 <1> .id: asciz "ID" 2084 00006560 5748454E00 <1> .when: asciz "WHEN" 2085 00006565 4F464653455400 <1> .offset: asciz "OFFSET" 2086 0000656C 3F00 <1> .questionmark: asciz "?" 2087 0000656E 4F <1> .or: db "O" 2088 0000656F 5200 <1> .r: asciz "R" 2089 00006571 4E4400 <1> .nd: asciz "ND" 2090 00006574 52454D454D42455200 <1> .remember: asciz "REMEMBER" 2091 0000657D 474F544F00 <1> .goto: asciz "GOTO" 2092 00006582 534F4600 <1> .sof: asciz "SOF" 2093 00006586 454F4600 <1> .eof: asciz "EOF" 2094 0000658A 4572726F723A20474F- <1> .goto_not_file: asciz "Error: GOTO command not supported when not reading a script.",13,10 2094 00006593 544F20636F6D6D616E- <1> 2094 0000659C 64206E6F7420737570- <1> 2094 000065A5 706F72746564207768- <1> 2094 000065AE 656E206E6F74207265- <1> 2094 000065B7 6164696E6720612073- <1> 2094 000065C0 63726970742E0D0A00 <1> 2095 000065C9 4572726F723A20474F- <1> .goto_empty: asciz "Error: GOTO needs a destination label.",13,10 2095 000065D2 544F206E6565647320- <1> 2095 000065DB 612064657374696E61- <1> 2095 000065E4 74696F6E206C616265- <1> 2095 000065ED 6C2E0D0A00 <1> 2096 000065F2 4572726F723A20474F- <1> .goto_not_found.1: asciz "Error: GOTO destination label ",'"' 2096 000065FB 544F2064657374696E- <1> 2096 00006604 6174696F6E206C6162- <1> 2096 0000660D 656C202200 <1> 2097 00006612 22206E6F7420666F75- <1> .goto_not_found.2: asciz '"'," not found.",13,10 2097 0000661B 6E642E0D0A00 <1> 2098 00006621 4572726F723A206175- <1> .guard_auxbuff_error: asciz "Error: auxbuff already guarded!",13,10 2098 0000662A 786275666620616C72- <1> 2098 00006633 656164792067756172- <1> 2098 0000663C 646564210D0A00 <1> 2099 00006643 4572726F723A20436F- <1> .guard_re_error: asciz "Error: Command not supported while reading from RE buffer.",13,10 2099 0000664C 6D6D616E64206E6F74- <1> 2099 00006655 20737570706F727465- <1> 2099 0000665E 64207768696C652072- <1> 2099 00006667 656164696E67206672- <1> 2099 00006670 6F6D20524520627566- <1> 2099 00006679 6665722E0D0A00 <1> 2100 00006680 4572726F723A20556E- <1> .unexpected_auxbuff_guard: asciz "Error: Unexpected auxbuff guard!",13,10 2100 00006689 657870656374656420- <1> 2100 00006692 617578627566662067- <1> 2100 0000669B 75617264210D0A00 <1> 2101 000066A3 4572726F723A20556E- <1> .unexpected_noneol_re: asciz "Error: Unexpected non-EOL in RE processing!",13,10 2101 000066AC 657870656374656420- <1> 2101 000066B5 6E6F6E2D454F4C2069- <1> 2101 000066BE 6E2052452070726F63- <1> 2101 000066C7 657373696E67210D0A- <1> 2101 000066D0 00 <1> 2102 000066D1 5245504C41434500 <1> .replace: asciz "REPLACE" 2103 000066D9 415050454E4400 <1> .append: asciz "APPEND" 2104 000066E0 44 <1> .dword: db "D" 2105 000066E1 574F524400 <1> .word: asciz "WORD" 2106 000066E6 33 <1> .3byte: db "3" 2107 000066E7 4259544500 <1> .byte: asciz "BYTE" 2108 000066EC 44 <1> .dwords: db "D" 2109 000066ED 574F52445300 <1> .words: asciz "WORDS" 2110 000066F3 425954455300 <1> .bytes: asciz "BYTES" 2111 000066F9 4C454E47544800 <1> .length: asciz "LENGTH" 2112 00006700 52414E474500 <1> .range: asciz "RANGE" 2113 00006706 5245564552534500 <1> .reverse: asciz "REVERSE" 2114 0000670E 56414C554500 <1> .value: asciz "VALUE" 2115 00006714 494E00 <1> .in: asciz "IN" 2116 00006717 46524F4D00 <1> .from: asciz "FROM" 2117 0000671C 544F00 <1> .to: asciz "TO" 2118 0000671F 455845435554494E47- <1> .executing: asciz "EXECUTING" 2118 00006728 00 <1> 2119 00006729 46524F4D204C494E45- <1> .executing_value_range: asciz "FROM LINEAR cs:eip LENGTH abo - eip" 2119 00006732 41522063733A656970- <1> 2119 0000673B 204C454E4754482061- <1> 2119 00006744 626F202D2065697000 <1> 2120 0000674D 4C494E45415200 <1> .linear: asciz "LINEAR" 2121 00006754 4241534500 <1> .base: asciz "BASE" 2122 00006759 47524F555000 <1> .group: asciz "GROUP" 2123 0000675F 574944544800 <1> .width: asciz "WIDTH" 2124 <1> %if _HISTORY 2125 <1> .history_internal_error: 2126 00006765 0D0A496E7465726E61- <1> asciz 13,10,"Internal error in history handling!",13,10 2126 0000676E 6C206572726F722069- <1> 2126 00006777 6E20686973746F7279- <1> 2126 00006780 2068616E646C696E67- <1> 2126 00006789 210D0A00 <1> 2127 <1> %endif 2128 0000678D 07204572726F7221 <1> .di_error: counted " Error!" 2129 00006795 0768696464656E20 <1> .di_hidden: counted "hidden " 2130 0000679D 0720284949535029 <1> .di_iisp: counted " (IISP)" 2131 000067A5 1320286E6F6E737461- <1> .di_nonstd_iisp:counted " (nonstandard IISP)" 2131 000067AE 6E6461726420494953- <1> 2131 000067B7 5029 <1> 2132 000067B9 132028756E696E7374- <1> .di_uninst_iisp:counted " (uninstalled IISP)" 2132 000067C2 616C6C656420494953- <1> 2132 000067CB 5029 <1> 2133 <1> .di_freedos_reloc: 2134 000067CD 1220284644206B6572- <1> counted " (FD kernel reloc)" 2134 000067D6 6E656C2072656C6F63- <1> 2134 000067DF 29 <1> 2135 000067E0 0E2028666172206A6D- <1> .di_jmpfar: counted " (far jmp imm)" 2135 000067E9 7020696D6D29 <1> 2136 <1> .di_jmpfarindirect: 2137 000067EF 132028666172206A6D- <1> counted " (far jmp indirect)" 2137 000067F8 7020696E6469726563- <1> 2137 00006801 7429 <1> 2138 00006803 0C2028746573742068- <1> .di_testhook: counted " (test hook)" 2138 0000680C 6F6F6B29 <1> 2139 00006810 1C2028746F6F206D61- <1> .di_toomany: counted " (too many chained handlers)" 2139 00006819 6E7920636861696E65- <1> 2139 00006822 642068616E646C6572- <1> 2139 0000682B 7329 <1> 2140 0000682D 0F20656D707479204D- <1> .di_empty: counted " empty MCB name" 2140 00006836 4342206E616D65 <1> 2141 0000683D 0B2073797374656D20- <1> .di_system_mcb: counted " system MCB" 2141 00006846 4D4342 <1> 2142 <1> .di_system_upper: 2143 00006849 0E2073797374656D20- <1> counted " system in UMA" 2143 00006852 696E20554D41 <1> 2144 00006858 0E2073797374656D20- <1> .di_system_low: counted " system in LMA" 2144 00006861 696E204C4D41 <1> 2145 00006867 112068696768206D65- <1> .di_hma: counted " high memory area" 2145 00006870 6D6F72792061726561 <1> 2146 00006879 06205B6D70783A <1> .di_multiplex.1:counted " [mpx:" 2147 00006880 0768206C6973743A <1> .di_multiplex.2:counted "h list:" 2148 00006888 02685D <1> .di_multiplex.3:counted "h]" 2149 0000688B 68656164657200 <1> .header: asciz "header" 2150 <1> .header.length: equ $ - 1 - .header 2151 00006892 747261696C657200 <1> .trailer: asciz "trailer" 2152 <1> .trailer.length:equ $ - 1 - .trailer 2153 0000689A 415400 <1> .at: asciz "AT" 2154 0000689D 5748494C4500 <1> .while: asciz "WHILE" 2155 000068A3 53494C454E5400 <1> .silent: asciz "SILENT" 2156 000068AA 534C45455000 <1> .sleep: asciz "SLEEP" 2157 000068B0 5345434F4E445300 <1> .seconds: asciz "SECONDS" 2158 000068B8 5449434B5300 <1> .ticks: asciz "TICKS" 2159 000068BE 52452070726F636573- <1> .re_limit_reached: asciz "RE processing reached RELIMIT, aborting.",13,10 2159 000068C7 73696E672072656163- <1> 2159 000068D0 6865642052454C494D- <1> 2159 000068D9 49542C2061626F7274- <1> 2159 000068E2 696E672E0D0A00 <1> 2160 000068E9 2120496E7465726E61- <1> .silent_error: asciz "! Internal error during silent buffer handling !",13,10 2160 000068F2 6C206572726F722064- <1> 2160 000068FB 7572696E672073696C- <1> 2160 00006904 656E74206275666665- <1> 2160 0000690D 722068616E646C696E- <1> 2160 00006916 6720210D0A00 <1> 2161 0000691C 5768696C6520636F6E- <1> .while_not_true:asciz "While condition not true, returning.",13,10 2161 00006925 646974696F6E206E6F- <1> 2161 0000692E 7420747275652C2072- <1> 2161 00006937 657475726E696E672E- <1> 2161 00006940 0D0A00 <1> 2162 00006943 5768696C6520636F6E- <1> .while_terminated_before: asciz "While condition ",'"' 2162 0000694C 646974696F6E202200 <1> 2163 00006955 22206E6F206C6F6E67- <1> .while_terminated_after: asciz '"'," no longer true.",13,10 2163 0000695E 657220747275652E0D- <1> 2163 00006967 0A00 <1> 2164 00006969 4E6F2073657269616C- <1> .no_progress: asciz "No serial comm progress after 5 seconds, giving up. (Keyboard enabled.)",13,10 2164 00006972 20636F6D6D2070726F- <1> 2164 0000697B 677265737320616674- <1> 2164 00006984 65722035207365636F- <1> 2164 0000698D 6E64732C2067697669- <1> 2164 00006996 6E672075702E20284B- <1> 2164 0000699F 6579626F6172642065- <1> 2164 000069A8 6E61626C65642E290D- <1> 2164 000069B1 0A00 <1> 2165 000069B3 0D0A6C446562756758- <1> .serial_request_keep: asciz 13,10,_PROGNAME," connected to serial port. Enter KEEP to confirm.",13,10 2165 000069BC 20636F6E6E65637465- <1> 2165 000069C5 6420746F2073657269- <1> 2165 000069CE 616C20706F72742E20- <1> 2165 000069D7 456E746572204B4545- <1> 2165 000069E0 5020746F20636F6E66- <1> 2165 000069E9 69726D2E0D0A00 <1> 2166 000069F0 4E6F204B454550206B- <1> .serial_no_keep_timer: asciz "No KEEP keyword confirmation after timeout, giving up. (Keyboard enabled.)",13,10 2166 000069F9 6579776F726420636F- <1> 2166 00006A02 6E6669726D6174696F- <1> 2166 00006A0B 6E2061667465722074- <1> 2166 00006A14 696D656F75742C2067- <1> 2166 00006A1D 6976696E672075702E- <1> 2166 00006A26 20284B6579626F6172- <1> 2166 00006A2F 6420656E61626C6564- <1> 2166 00006A38 2E290D0A00 <1> 2167 00006A3D 4E6F204B454550206B- <1> .serial_no_keep_enter: asciz "No KEEP keyword confirmation, enabling keyboard.",13,10 2167 00006A46 6579776F726420636F- <1> 2167 00006A4F 6E6669726D6174696F- <1> 2167 00006A58 6E2C20656E61626C69- <1> 2167 00006A61 6E67206B6579626F61- <1> 2167 00006A6A 72642E0D0A00 <1> 2168 00006A70 4B45455000 <1> .keep: asciz "KEEP" 2169 00006A75 4572726F723A20556E- <1> .cannot_hook_2D.invalid: asciz "Error: Unable to hook interrupt 2Dh due to invalid handler.",13,10 2169 00006A7E 61626C6520746F2068- <1> 2169 00006A87 6F6F6B20696E746572- <1> 2169 00006A90 727570742032446820- <1> 2169 00006A99 64756520746F20696E- <1> 2169 00006AA2 76616C69642068616E- <1> 2169 00006AAB 646C65722E0D0A00 <1> 2170 00006AB3 4572726F723A20556E- <1> .cannot_hook_2D.nofree: asciz "Error: Unable to hook interrupt 2Dh, no free multiplex number.",13,10 2170 00006ABC 61626C6520746F2068- <1> 2170 00006AC5 6F6F6B20696E746572- <1> 2170 00006ACE 72757074203244682C- <1> 2170 00006AD7 206E6F206672656520- <1> 2170 00006AE0 6D756C7469706C6578- <1> 2170 00006AE9 206E756D6265722E0D- <1> 2170 00006AF2 0A00 <1> 2171 00006AF4 5761726E696E673A20 <1> .serial_cannot_unhook: db "Warning: " 2172 00006AFD 556E61626C6520746F- <1> .serial_cannot_unhook.nowarn: db "Unable to unhook interrupt " 2172 00006B06 20756E686F6F6B2069- <1> 2172 00006B0F 6E7465727275707420 <1> 2173 00006B18 2D2D682E0D0A00 <1> .serial_cannot_unhook.int: asciz "--h.",13,10 2174 00006B1F 4572726F723A20556E- <1> .serial_cannot_hook: db "Error: Unable to hook interrupt " 2174 00006B28 61626C6520746F2068- <1> 2174 00006B31 6F6F6B20696E746572- <1> 2174 00006B3A 7275707420 <1> 2175 00006B3F 2D2D68206265636175- <1> .serial_cannot_hook.new_int: db "--h because interrupt " 2175 00006B48 736520696E74657272- <1> 2175 00006B51 75707420 <1> 2176 00006B55 2D2D68207374696C6C- <1> .serial_cannot_hook.old_int: asciz "--h still hooked.",13,10 2176 00006B5E 20686F6F6B65642E0D- <1> 2176 00006B67 0A00 <1> 2177 00006B69 537563636565646564- <1> .serial_late_unhook: db "Succeeded in unhooking interrupt " 2177 00006B72 20696E20756E686F6F- <1> 2177 00006B7B 6B696E6720696E7465- <1> 2177 00006B84 727275707420 <1> 2178 00006B8A 2D2D682E0D0A00 <1> .serial_late_unhook.int: asciz "--h.",13,10 2179 00006B91 496E7465726E616C20- <1> .line_out_overflow: asciz "Internal error, line_out buffer overflowed!",13,10 2179 00006B9A 6572726F722C206C69- <1> 2179 00006BA3 6E655F6F7574206275- <1> 2179 00006BAC 66666572206F766572- <1> 2179 00006BB5 666C6F776564210D0A- <1> 2179 00006BBE 00 <1> 2180 00006BBF 041B5B376D <1> .highlight: counted 27,"[7m" 2181 00006BC4 031B5B6D <1> .unhighlight: counted 27,"[m" 2182 00006BC8 206B4D475400 <1> .prefixes: asciz " kMGT" 2183 00006BCE 50726F63657373206C- <1> .ll_unterm: ascizline "Process loading aborted: Attached process didn't terminate!" 2183 00006BD7 6F6164696E67206162- <1> 2183 00006BE0 6F727465643A204174- <1> 2183 00006BE9 746163686564207072- <1> 2183 00006BF2 6F6365737320646964- <1> 2183 00006BFB 6E2774207465726D69- <1> 2183 00006C04 6E617465210D0A00 <1> 2184 00006C0C 43616E6E6F74207175- <1> .qq_unterm: ascizline "Cannot quit, attached process didn't terminate!" 2184 00006C15 69742C206174746163- <1> 2184 00006C1E 6865642070726F6365- <1> 2184 00006C27 7373206469646E2774- <1> 2184 00006C30 207465726D696E6174- <1> 2184 00006C39 65210D0A00 <1> 2185 00006C3E 43616E6E6F74207175- <1> .qq_still_pm: ascizline "Cannot quit, still in PM after attached process terminated!" 2185 00006C47 69742C207374696C6C- <1> 2185 00006C50 20696E20504D206166- <1> 2185 00006C59 746572206174746163- <1> 2185 00006C62 6865642070726F6365- <1> 2185 00006C6B 7373207465726D696E- <1> 2185 00006C74 61746564210D0A00 <1> 2186 <1> 2187 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 2188 00006C7C 45584953545300 <1> .exists: asciz "EXISTS" 2189 00006C83 5900 <1> .y: asciz "Y" 2190 00006C85 5920636F6D6D616E64- <1> .yy_requires_filename: asciz "Y command requires a filename.",13,10 2190 00006C8E 207265717569726573- <1> 2190 00006C97 20612066696C656E61- <1> 2190 00006CA0 6D652E0D0A00 <1> 2191 00006CA6 5920636F6D6D616E64- <1> .yy_filename_empty: asciz "Y command filename is empty.",13,10 2191 00006CAF 2066696C656E616D65- <1> 2191 00006CB8 20697320656D707479- <1> 2191 00006CC1 2E0D0A00 <1> 2192 00006CC5 5920636F6D6D616E64- <1> .yy_too_many_handles: asciz "Y command has too many open files.",13,10 2192 00006CCE 2068617320746F6F20- <1> 2192 00006CD7 6D616E79206F70656E- <1> 2192 00006CE0 2066696C65732E0D0A- <1> 2192 00006CE9 00 <1> 2193 00006CEA 5920636F6D6D616E64- <1> .yy_error_file_open: asciz "Y command failed to open file.",13,10 2193 00006CF3 206661696C65642074- <1> 2193 00006CFC 6F206F70656E206669- <1> 2193 00006D05 6C652E0D0A00 <1> 2194 00006D0B 5920636F6D6D616E64- <1> .yy_no_file: asciz "Y command limited to label only valid in script file.",13,10 2194 00006D14 206C696D6974656420- <1> 2194 00006D1D 746F206C6162656C20- <1> 2194 00006D26 6F6E6C792076616C69- <1> 2194 00006D2F 6420696E2073637269- <1> 2194 00006D38 70742066696C652E0D- <1> 2194 00006D41 0A00 <1> 2195 <1> %endif 2196 <1> %if _INPUT_FILE_HANDLES 2197 00006D43 5920636F6D6D616E64- <1> .yy_no_dos: asciz "Y command requires DOS to be available.",13,10 2197 00006D4C 207265717569726573- <1> 2197 00006D55 20444F5320746F2062- <1> 2197 00006D5E 6520617661696C6162- <1> 2197 00006D67 6C652E0D0A00 <1> 2198 <1> .yy_filename_missing_unquote: 2199 00006D6D 5920636F6D6D616E64- <1> asciz "Y command filename missing ending quote.",13,10 2199 00006D76 2066696C656E616D65- <1> 2199 00006D7F 206D697373696E6720- <1> 2199 00006D88 656E64696E67207175- <1> 2199 00006D91 6F74652E0D0A00 <1> 2200 <1> %endif 2201 <1> %if _INPUT_FILE_BOOT 2202 00006D98 5920636F6D6D616E64- <1> .yy_too_large: asciz "Y command file too large.",13,10 2202 00006DA1 2066696C6520746F6F- <1> 2202 00006DAA 206C617267652E0D0A- <1> 2202 00006DB3 00 <1> 2203 00006DB4 5920636F6D6D616E64- <1> .yy_empty: asciz "Y command file empty.",13,10 2203 00006DBD 2066696C6520656D70- <1> 2203 00006DC6 74792E0D0A00 <1> 2204 <1> %endif 2205 <1> 2206 <1> %if _BREAKPOINTS 2207 00006DCC 414C4C00 <1> .all: asciz "ALL" 2208 00006DD0 4E455700 <1> .new: asciz "NEW" 2209 00006DD4 4E6F20756E75736564- <1> .bb_no_new: asciz "No unused breakpoint left!",13,10 2209 00006DDD 20627265616B706F69- <1> 2209 00006DE6 6E74206C656674210D- <1> 2209 00006DEF 0A00 <1> 2210 00006DF1 19486974207065726D- <1> .bb_hit.1: counted "Hit permanent breakpoint " 2210 00006DFA 616E656E7420627265- <1> 2210 00006E03 616B706F696E7420 <1> 2211 <1> .bb_hit.2.nocounter: 2212 00006E0B 020D0A <1> counted 13,10 2213 00006E0E 1C5061737365642070- <1> .bb_pass.1: counted "Passed permanent breakpoint " 2213 00006E17 65726D616E656E7420- <1> 2213 00006E20 627265616B706F696E- <1> 2213 00006E29 7420 <1> 2214 <1> .bb_hit.2.counter: 2215 00006E2B 0A2C20636F756E7465- <1> .bb_pass.2: counted ", counter=" 2215 00006E34 723D <1> 2216 <1> .bb_hit.3.counter.no_id: 2217 <1> .bb_pass.3.no_id: 2218 <1> .bb_hitpass_id.after: 2219 00006E36 020D0A <1> counted 13,10 2220 <1> .bb_hitpass_id.long: 2221 00006E39 070D0A2049443A20 <1> counted 13,10," ID: " 2222 <1> .bb_hitpass_id.short: 2223 00006E41 062C2049443A20 <1> counted ", ID: " 2224 00006E48 205748454E2000 <1> .bb_when: asciz " WHEN " 2225 <1> 2226 00006E4F 42502000 <1> .bp: asciz "BP " 2227 00006E53 202B00 <1> .bpenabled: asciz " +" 2228 00006E56 202D00 <1> .bpdisabled: asciz " -" 2229 00006E59 20556E7573656400 <1> .bpunused: asciz " Unused" 2230 00006E61 204C696E3D00 <1> .bpaddress: asciz " Lin=" 2231 00006E67 202800 <1> .bpcontent: asciz " (" 2232 00006E6A 2920436F756E746572- <1> .bpcounter: asciz ") Counter=" 2232 00006E73 3D00 <1> 2233 <1> %if 0 2234 <1> BP 00 Unused 2235 <1> BP 00 + Lin=12345678 (CC) Counter=8000 2236 <1> 1234567890123456789012345678901234567890 2237 <1> %endif 2238 00006E75 4E6F20627265616B70- <1> .bpnone: asciz "No breakpoints set currently.",13,10 2238 00006E7E 6F696E747320736574- <1> 2238 00006E87 2063757272656E746C- <1> 2238 00006E90 792E0D0A00 <1> 2239 00006E95 4E6F20627265616B70- <1> .bpnone_at: asciz "No breakpoint set at given address currently.",13,10 2239 00006E9E 6F696E742073657420- <1> 2239 00006EA7 617420676976656E20- <1> 2239 00006EB0 616464726573732063- <1> 2239 00006EB9 757272656E746C792E- <1> 2239 00006EC2 0D0A00 <1> 2240 <1> %endif 2241 00006EC5 5468652000 <1> .cant_bp_the: asciz "The " 2242 00006ECA 70726F636565642062- <1> .cant_bp_type_proceed: asciz "proceed breakpoint" 2242 00006ED3 7265616B706F696E74- <1> 2242 00006EDC 00 <1> 2243 00006EDD 7065726D616E656E74- <1> .cant_bp_type_permanent: db "permanent breakpoint " 2243 00006EE6 20627265616B706F69- <1> 2243 00006EEF 6E7420 <1> 2244 00006EF2 5F5F00 <1> .cant_bp_type_permanent.index: asciz "__" 2245 00006EF5 204720627265616B70- <1> .cant_bp_type_gg: asciz " G breakpoint" 2245 00006EFE 6F696E7400 <1> 2246 00006F03 20286C696E65617220 <1> .cant_bp_linear: db " (linear " 2247 00006F0C 2D2D2D2D5F <1> .cant_bp_linear.address1: db "----_" 2248 00006F11 2D2D2D2D292000 <1> .cant_bp_linear.address2: asciz "----) " 2249 00006F18 63616E6E6F74206265- <1> .cant_bp_write: asciz "cannot be written." 2249 00006F21 207772697474656E2E- <1> 2249 00006F2A 00 <1> 2250 00006F2B 63616E6E6F74206265- <1> .cant_bp_restore: db "cannot be restored to " 2250 00006F34 20726573746F726564- <1> 2250 00006F3D 20746F20 <1> 2251 00006F41 5F5F2E00 <1> .cant_bp_restore.value: asciz "__." 2252 <1> %if 0 2253 <1> The 15th G breakpoint (linear 0010_FFFF) cannot be written. 2254 <1> The proceed breakpoint (linear 0010_FFFF) cannot be written. 2255 <1> The permanent breakpoint 0F (linear 0010_FFFF) cannot be written. 2256 <1> The permanent breakpoint 0F (linear 0010_FFFF) cannot be restored to __. 2257 <1> 12345678901234567890123456789012345678901234567890123456789012345678901234567890 2258 <1> %endif 2259 00006F45 0D0A20526561736F6E- <1> .cant_bp_reason: asciz 13,10," Reason: " 2259 00006F4E 3A2000 <1> 2260 00006F51 4E6F206572726F722E- <1> .cant_bp_reason0: asciz "No error. (Internal error, report!)",13,10 2260 00006F5A 2028496E7465726E61- <1> 2260 00006F63 6C206572726F722C20- <1> 2260 00006F6C 7265706F727421290D- <1> 2260 00006F75 0A00 <1> 2261 00006F77 497420697320726561- <1> .cant_bp_reason1: asciz "It is read-only.",13,10 2261 00006F80 642D6F6E6C792E0D0A- <1> 2261 00006F89 00 <1> 2262 00006F8A 497420697320756E72- <1> .cant_bp_reason2: asciz "It is unreachable.",13,10 2262 00006F93 6561636861626C652E- <1> 2262 00006F9C 0D0A00 <1> 2263 00006F9F 497420686173206265- <1> .cant_bp_reason3: db "It has been overwritten with " 2263 00006FA8 656E206F7665727772- <1> 2263 00006FB1 697474656E20776974- <1> 2263 00006FBA 6820 <1> 2264 00006FBC 5F5F2E0D0A00 <1> .cant_bp_reason3.value: asciz "__.",13,10 2265 00006FC2 556E6B6E6F776E2065- <1> .cant_bp_reasonu: asciz "Unknown error. (Internal error, report!)",13,10 2265 00006FCB 72726F722E2028496E- <1> 2265 00006FD4 7465726E616C206572- <1> 2265 00006FDD 726F722C207265706F- <1> 2265 00006FE6 727421290D0A00 <1> 2266 <1> 2267 00006FED 20202000 <1> .list_bp.first: asciz " " 2268 00006FF1 204720627265616B70- <1> .list_bp.second:db " G breakpoint, linear " 2268 00006FFA 6F696E742C206C696E- <1> 2268 00007003 65617220 <1> 2269 <1> .list_bp.address1: 2270 00007007 2D2D2D2D5F <1> db "----_" 2271 <1> .list_bp.address2: 2272 0000700C 2D2D2D2D00 <1> asciz "----" 2273 00007011 2C20636F6E74656E74- <1> .list_bp.third: db ", content " 2273 0000701A 20 <1> 2274 <1> .list_bp.value: 2275 0000701B 5F5F00 <1> asciz "__" 2276 <1> .list_bp_not_cseip: equ crlf 2277 <1> %if _PM 2278 <1> .list_bp_cseip_32: 2279 0000701E 202869732061742043- <1> asciz " (is at CS:EIP)",13,10 2279 00007027 533A454950290D0A00 <1> 2280 <1> %endif 2281 <1> .list_bp_csip_16: 2282 00007030 202869732061742043- <1> asciz " (is at CS:IP)",13,10 2282 00007039 533A4950290D0A00 <1> 2283 <1> .list_bp_none: 2284 00007041 546865204720627265- <1> asciz "The G breakpoint list is empty.",13,10 2284 0000704A 616B706F696E74206C- <1> 2284 00007053 69737420697320656D- <1> 2284 0000705C 7074792E0D0A00 <1> 2285 <1> %if 0 2286 <1> 2nd G breakpoint, linear 0003_28D3 $3600:12345678, content CC (is at CS:EIP) 2287 <1> 12345678901234567890123456789012345678901234567890123456789012345678901234567890 2288 <1> %endif 2289 00007063 00 <1> .empty_message: asciz 2290 00007064 4C49535400 <1> .list: asciz "LIST" 2291 00007069 414741494E00 <1> .again: asciz "AGAIN" 2292 0000706F 52656163686564206C- <1> .uu_too_many_repeat: asciz "Reached limit of repeating disassembly.",13,10 2292 00007078 696D6974206F662072- <1> 2292 00007081 6570656174696E6720- <1> 2292 0000708A 646973617373656D62- <1> 2292 00007093 6C792E0D0A00 <1> 2293 00007099 496E7465726E616C20- <1> .uu_internal_error: asciz "Internal error in disassembler!",13,10 2293 000070A2 6572726F7220696E20- <1> 2293 000070AB 646973617373656D62- <1> 2293 000070B4 6C6572210D0A00 <1> 2294 000070BB 496E7465726E616C20- <1> .aa_internal_error: asciz "Internal error in assembler!",13,10 2294 000070C4 6572726F7220696E20- <1> 2294 000070CD 617373656D626C6572- <1> 2294 000070D6 210D0A00 <1> 2295 000070DA 537461636B206F7665- <1> .stack_overflow: db "Stack overflow occurred, IP=" 2295 000070E3 72666C6F77206F6363- <1> 2295 000070EC 75727265642C204950- <1> 2295 000070F5 3D <1> 2296 000070F6 5F5F5F5F682C206475- <1> .stack_overflow.caller: asciz "____h, due to " 2296 000070FF 6520746F2000 <1> 2297 00007105 65787072657373696F- <1> .stack_overflow.indirection: asciz "expression indirection.",13,10 2297 0000710E 6E20696E6469726563- <1> 2297 00007117 74696F6E2E0D0A00 <1> 2298 0000711F 65787072657373696F- <1> .stack_overflow.parens: asciz "expression parentheses.",13,10 2298 00007128 6E20706172656E7468- <1> 2298 00007131 657365732E0D0A00 <1> 2299 00007139 65787072657373696F- <1> .stack_overflow.precedence: asciz "expression precedence.",13,10 2299 00007142 6E2070726563656465- <1> 2299 0000714B 6E63652E0D0A00 <1> 2300 00007152 65787072657373696F- <1> .stack_overflow.value_in: asciz "expression VALUE x IN y.",13,10 2300 0000715B 6E2056414C55452078- <1> 2300 00007164 20494E20792E0D0A00 <1> 2301 0000716D 65787072657373696F- <1> .stack_overflow.linear: asciz "expression LINEAR.",13,10 2301 00007176 6E204C494E4541522E- <1> 2301 0000717F 0D0A00 <1> 2302 00007182 65787072657373696F- <1> .stack_overflow.cond: asciz "expression conditional ?? x :: y.",13,10 2302 0000718B 6E20636F6E64697469- <1> 2302 00007194 6F6E616C203F3F2078- <1> 2302 0000719D 203A3A20792E0D0A00 <1> 2303 <1> %if _MEMREF_AMOUNT 2304 <1> %if _DEBUG2 2305 <1> .memrefs_branchdirect: asciz 9, "direct branch target = " 2306 <1> .memrefs_stringsource: asciz 9, "string source = " 2307 <1> .memrefs_stringdest: asciz 9, "string destination = " 2308 <1> .memrefs_memsource: asciz 9, "memory source = " 2309 <1> .memrefs_memdest: asciz 9, "memory destination = " 2310 <1> .memrefs_memsourcedest: asciz 9, "memory source/dest = " 2311 <1> .memrefs_mem_unknown: asciz 9, "memory (unknown) = " 2312 <1> .memrefs_unknown: asciz 9, "unknown mem ref type = " 2313 <1> .memrefs_length: counted " length=" 2314 <1> %endif 2315 <1> .memrefs_invalid_internal: 2316 000071A6 496E7465726E616C20- <1> asciz "Internal error, invalid use of too many memrefs!",13,10 2316 000071AF 6572726F722C20696E- <1> 2316 000071B8 76616C696420757365- <1> 2316 000071C1 206F6620746F6F206D- <1> 2316 000071CA 616E79206D656D7265- <1> 2316 000071D3 6673210D0A00 <1> 2317 <1> %endif 2318 <1> 2319 <1> %if 0 2320 <1> align 2, db 0 2321 <1> .optiontable: dw dispregs32, .r32off, .r32on 2322 <1> dw traceints, .traceoff, .traceon 2323 <1> dw cpdepchars, .cpoff, .cpon 2324 <1> dw fakeindos, .dosoff, .doson 2325 <1> dw nonpagingdevice, .nonpageoff, .nonpageon 2326 <1> dw pagingdevice, .pageoff, .pageon 2327 <1> dw hexrn, .readrnoff, .readrnon 2328 <1> dw 0 2329 <1> 2330 <1> .r32off: asciz "Dump 16-bit register set" 2331 <1> .r32on: asciz "Dump 32-bit register set" 2332 <1> .traceoff: asciz "Interrupts are traced" 2333 <1> .traceon: asciz "Interrupts are processed" 2334 <1> .cpoff: asciz "Extended ASCII characters replaced" 2335 <1> .cpon: asciz "Extended ASCII characters displayed" 2336 <1> .dosoff: asciz "InDOS is checked" 2337 <1> .doson: asciz "InDOS assumed on" 2338 <1> ;asciz "InDOS assumed off" 2339 <1> .nonpageoff: asciz 2340 <1> .nonpageon: asciz "Paging disabled" 2341 <1> .pageoff: asciz 2342 <1> .pageon: asciz "Paging enabled" 2343 <1> .readrnoff: asciz "Readable RN enabled" 2344 <1> .readrnon: asciz "Readable RN disabled" 2345 <1> %endif 2346 <1> 2347 000071D9 5761726E696E673A20- <1> .warnprefix: asciz "Warning: Prefixes in excess of 14, using trace flag.",13,10 2347 000071E2 507265666978657320- <1> 2347 000071EB 696E20657863657373- <1> 2347 000071F4 206F662031342C2075- <1> 2347 000071FD 73696E672074726163- <1> 2347 00007206 6520666C61672E0D0A- <1> 2347 0000720F 00 <1> 2348 <1> 2349 <1> %if _DEBUG 2350 <1> .bu: asciz "Breaking to next instance.",13,10 2351 <1> %else 2352 00007210 416C72656164792069- <1> .notbu: asciz "Already in topmost instance. (This is no debugging build of lDebug.)",13,10 2352 00007219 6E20746F706D6F7374- <1> 2352 00007222 20696E7374616E6365- <1> 2352 0000722B 2E2028546869732069- <1> 2352 00007234 73206E6F2064656275- <1> 2352 0000723D 6767696E6720627569- <1> 2352 00007246 6C64206F66206C4465- <1> 2352 0000724F 6275672E290D0A00 <1> 2353 <1> %endif 2354 <1> 2355 <1> %if _PM 2356 00007257 43616E6E6F74206163- <1> .ofs32: asciz "Cannot access 16-bit segment with 32-bit offset.",13,10 2356 00007260 636573732031362D62- <1> 2356 00007269 6974207365676D656E- <1> 2356 00007272 742077697468203332- <1> 2356 0000727B 2D626974206F666673- <1> 2356 00007284 65742E0D0A00 <1> 2357 <1> %endif 2358 <1> 2359 <1> 2360 <1> %define smcb_messages ..@notype,"" 2361 <1> 2362 <1> %imacro smcbtype 2.nolist 2363 <1> dw %2, %%label 2364 <1> %defstr %%str %1 2365 <1> %xdefine smcb_messages smcb_messages,%%label,%%str 2366 <1> %endmacro 2367 <1> 2368 <1> %imacro smcbmsg 2-*.nolist 2369 <1> %if %0 & 1 2370 <1> %error Expected even number of parameters 2371 <1> %endif 2372 <1> %rotate 2 2373 <1> %rep (%0 - 2) / 2 2374 <1> %1: asciz %2 2375 <1> %rotate 2 2376 <1> %endrep 2377 <1> %endmacro 2378 <1> 2379 0000728A 00 <1> align 4, db 0 2380 <1> smcbtypes: 2381 0000728C 0000[0873] <1> smcbtype S_OTHER, 00h 2382 00007290 0100[1073] <1> smcbtype S_DOSENTRY, 01h 2383 00007294 0200[1B73] <1> smcbtype S_DOSCODE, 02h 2384 00007298 0300[2573] <1> smcbtype S_DOSDATA, 03h 2385 0000729C 0400[2F73] <1> smcbtype S_IRQSCODE, 04h 2386 000072A0 0500[3A73] <1> smcbtype S_IRQSDATA, 05h 2387 000072A4 0600[4573] <1> smcbtype S_CDS, 06h 2388 000072A8 0700[4B73] <1> smcbtype S_LFNCDS, 07h 2389 000072AC 0800[5473] <1> smcbtype S_DPB, 08h 2390 000072B0 0900[5A73] <1> smcbtype S_UPB, 09h 2391 000072B4 0A00[6073] <1> smcbtype S_SFT, 0Ah 2392 000072B8 0B00[6673] <1> smcbtype S_FCBSFT, 0Bh 2393 000072BC 0C00[6F73] <1> smcbtype S_CCB, 0Ch 2394 000072C0 0D00[7573] <1> smcbtype S_IRT, 0Dh 2395 000072C4 0E00[7B73] <1> smcbtype S_SECTOR, 0Eh 2396 000072C8 0F00[8473] <1> smcbtype S_NLS, 0Fh 2397 000072CC 1000[8A73] <1> smcbtype S_EBDA, 10h 2398 000072D0 1900[9173] <1> smcbtype S_INITCONFIG, 19h 2399 000072D4 1A00[9E73] <1> smcbtype S_INITFATSEG, 1Ah 2400 000072D8 1B00[AB73] <1> smcbtype S_INITSECTORSEG, 1Bh 2401 000072DC 1C00[BB73] <1> smcbtype S_INITSTACKBPB,1Ch 2402 000072E0 1D00[CA73] <1> smcbtype S_INITPSP, 1Dh 2403 000072E4 1E00[D473] <1> smcbtype S_ENVIRONMENT, 1Eh 2404 000072E8 1F00[E273] <1> smcbtype S_INITIALIZE, 1Fh 2405 000072EC 2000[EF73] <1> smcbtype S_DEVICE, 20h ; Device 2406 000072F0 2100[F873] <1> smcbtype S_DEVICEMEMORY,21h ; Allocated by device 2407 000072F4 3000[0774] <1> smcbtype S_EXCLDUMA, 30h ; Excluded UMA 2408 000072F8 3100[1274] <1> smcbtype S_EXCLDUMASUB, 31h ; Excluded UMA with sub-chain of used MCBs 2409 000072FC 3200[2074] <1> smcbtype S_EXCLDLH, 32h ; Excluded by LH 2410 00007300 3300[2A74] <1> smcbtype S_EXCLDDOS, 33h 2411 00007304 FFFFFFFF <1> dw -1, -1 2412 <1> 2413 00007308 535F4F544845520053- <1> smcbmsg smcb_messages 2413 00007311 5F444F53454E545259- <1> 2413 0000731A 00535F444F53434F44- <1> 2413 00007323 4500535F444F534441- <1> 2413 0000732C 544100535F49525153- <1> 2413 00007335 434F444500535F4952- <1> 2413 0000733E 51534441544100535F- <1> 2413 00007347 43445300535F4C464E- <1> 2413 00007350 43445300535F445042- <1> 2413 00007359 00535F55504200535F- <1> 2413 00007362 53465400535F464342- <1> 2413 0000736B 53465400535F434342- <1> 2413 00007374 00535F49525400535F- <1> 2413 0000737D 534543544F5200535F- <1> 2413 00007386 4E4C5300535F454244- <1> 2413 0000738F 4100535F494E495443- <1> 2413 00007398 4F4E46494700535F49- <1> 2413 000073A1 4E4954464154534547- <1> 2413 000073AA 00535F494E49545345- <1> 2413 000073B3 43544F525345470053- <1> 2413 000073BC 5F494E495453544143- <1> 2413 000073C5 4B42504200535F494E- <1> 2413 000073CE 495450535000535F45- <1> 2413 000073D7 4E5649524F4E4D454E- <1> 2413 000073E0 5400535F494E495449- <1> 2413 000073E9 414C495A4500535F44- <1> 2413 000073F2 455649434500535F44- <1> 2413 000073FB 45564943454D454D4F- <1> 2413 00007404 525900535F4558434C- <1> 2413 0000740D 44554D4100535F4558- <1> 2413 00007416 434C44554D41535542- <1> 2413 0000741F 00535F4558434C444C- <1> 2413 00007428 4800535F4558434C44- <1> 2413 00007431 444F5300 <1> 2414 <1> 2415 00007435 756E6B6E6F776E00 <1> smcbmsg_unknown: asciz "unknown" 2416 <1> 2417 <1> %undef smcb_messages 2418 <1> %unimacro smcbtype 2.nolist 2419 <1> %unimacro smcbmsg 2-*.nolist 2420 <1> 2421 0000743D 5E204572726F7207 <1> errcarat: db "^ Error",7 2422 00007445 0D0A00 <1> crlf: asciz 13,10 2423 <1> 2424 <1> 2425 <1> align 4, db 0 2426 <1> msgtable_value_range: 2427 00007448 [1F67][2967] <1> dw msg.executing, msg.executing_value_range 2428 <1> %if _ACCESS_VARIABLES_AMOUNT 2429 0000744C [5E74][6674] <1> dw .reading, .reading_range 2430 00007450 [E174][E974] <1> dw .writing, .writing_range 2431 00007454 [6475][6F75] <1> dw .memoperand, .memoperand_range 2432 00007458 [8075][8A75] <1> dw .accessing, .accessing_range 2433 <1> %endif 2434 0000745C 0000 <1> dw 0 2435 <1> 2436 <1> %if _ACCESS_VARIABLES_AMOUNT 2437 0000745E 52454144494E4700 <1> .reading: asciz "READING" 2438 <1> .reading_range: 2439 <1> %assign iicounter 0 2440 <1> %define iiprefix "" 2441 <1> %rep _ACCESS_VARIABLES_AMOUNT 2442 <1> _autohexitsstrdef IIDEF, iicounter 2443 <1> db iiprefix,"FROM readadr",_IIDEF," LENGTH readlen",_IIDEF 2444 <1> %assign iicounter iicounter + 1 2445 <1> %define iiprefix ", " 2446 <1> %endrep 2442 <2> _autohexitsstrdef IIDEF, iicounter 2443 00007466 46524F4D2072656164- <2> db iiprefix,"FROM readadr",_IIDEF," LENGTH readlen",_IIDEF 2443 0000746F 61647230204C454E47- <2> 2443 00007478 544820726561646C65- <2> 2443 00007481 6E30 <2> 2444 <2> %assign iicounter iicounter + 1 2445 <2> %define iiprefix ", " 2442 <2> _autohexitsstrdef IIDEF, iicounter 2443 00007483 2C2046524F4D207265- <2> db iiprefix,"FROM readadr",_IIDEF," LENGTH readlen",_IIDEF 2443 0000748C 616461647231204C45- <2> 2443 00007495 4E4754482072656164- <2> 2443 0000749E 6C656E31 <2> 2444 <2> %assign iicounter iicounter + 1 2445 <2> %define iiprefix ", " 2442 <2> _autohexitsstrdef IIDEF, iicounter 2443 000074A2 2C2046524F4D207265- <2> db iiprefix,"FROM readadr",_IIDEF," LENGTH readlen",_IIDEF 2443 000074AB 616461647232204C45- <2> 2443 000074B4 4E4754482072656164- <2> 2443 000074BD 6C656E32 <2> 2444 <2> %assign iicounter iicounter + 1 2445 <2> %define iiprefix ", " 2442 <2> _autohexitsstrdef IIDEF, iicounter 2443 000074C1 2C2046524F4D207265- <2> db iiprefix,"FROM readadr",_IIDEF," LENGTH readlen",_IIDEF 2443 000074CA 616461647233204C45- <2> 2443 000074D3 4E4754482072656164- <2> 2443 000074DC 6C656E33 <2> 2444 <2> %assign iicounter iicounter + 1 2445 <2> %define iiprefix ", " 2447 000074E0 00 <1> asciz 2448 000074E1 57524954494E4700 <1> .writing: asciz "WRITING" 2449 <1> .writing_range: 2450 <1> %assign iicounter 0 2451 <1> %define iiprefix "" 2452 <1> %rep _ACCESS_VARIABLES_AMOUNT 2453 <1> _autohexitsstrdef IIDEF, iicounter 2454 <1> db iiprefix,"FROM writadr",_IIDEF," LENGTH writlen",_IIDEF 2455 <1> %assign iicounter iicounter + 1 2456 <1> %define iiprefix ", " 2457 <1> %endrep 2453 <2> _autohexitsstrdef IIDEF, iicounter 2454 000074E9 46524F4D2077726974- <2> db iiprefix,"FROM writadr",_IIDEF," LENGTH writlen",_IIDEF 2454 000074F2 61647230204C454E47- <2> 2454 000074FB 544820777269746C65- <2> 2454 00007504 6E30 <2> 2455 <2> %assign iicounter iicounter + 1 2456 <2> %define iiprefix ", " 2453 <2> _autohexitsstrdef IIDEF, iicounter 2454 00007506 2C2046524F4D207772- <2> db iiprefix,"FROM writadr",_IIDEF," LENGTH writlen",_IIDEF 2454 0000750F 697461647231204C45- <2> 2454 00007518 4E4754482077726974- <2> 2454 00007521 6C656E31 <2> 2455 <2> %assign iicounter iicounter + 1 2456 <2> %define iiprefix ", " 2453 <2> _autohexitsstrdef IIDEF, iicounter 2454 00007525 2C2046524F4D207772- <2> db iiprefix,"FROM writadr",_IIDEF," LENGTH writlen",_IIDEF 2454 0000752E 697461647232204C45- <2> 2454 00007537 4E4754482077726974- <2> 2454 00007540 6C656E32 <2> 2455 <2> %assign iicounter iicounter + 1 2456 <2> %define iiprefix ", " 2453 <2> _autohexitsstrdef IIDEF, iicounter 2454 00007544 2C2046524F4D207772- <2> db iiprefix,"FROM writadr",_IIDEF," LENGTH writlen",_IIDEF 2454 0000754D 697461647233204C45- <2> 2454 00007556 4E4754482077726974- <2> 2454 0000755F 6C656E33 <2> 2455 <2> %assign iicounter iicounter + 1 2456 <2> %define iiprefix ", " 2458 00007563 00 <1> asciz 2459 <1> 2460 00007564 4D454D4F504552414E- <1> .memoperand: asciz "MEMOPERAND" 2460 0000756D 4400 <1> 2461 0000756F 52454144494E472C20- <1> .memoperand_range: asciz "READING, WRITING" 2461 00007578 57524954494E4700 <1> 2462 00007580 414343455353494E47- <1> .accessing: asciz "ACCESSING" 2462 00007589 00 <1> 2463 0000758A 52454144494E472C20- <1> .accessing_range: asciz "READING, WRITING, EXECUTING" 2463 00007593 57524954494E472C20- <1> 2463 0000759C 455845435554494E47- <1> 2463 000075A5 00 <1> 2464 <1> %endif 2465 <1> 2466 <1> 2467 <1> %if _BOOTLDR 2468 <1> %define lot_list 2469 <1> %define lot_comma 2470 <1> %macro lot_entry 2.nolist 2471 <1> LOAD_%2 equ %1 2472 <1> dw LOAD_%2, .%2 2473 <1> %defstr %%string %2 2474 <1> %xdefine lot_list lot_list lot_comma .%2:, db %%string, db 0 2475 <1> %define lot_comma , 2476 <1> %endmacro 2477 <1> 2478 <1> %macro lot_messages 0-*.nolist 2479 <1> %rep (%0 / 3) 2480 <1> %1 2481 <1> %2 2482 <1> %3 2483 <1> %rotate 3 2484 <1> %endrep 2485 <1> %endmacro 2486 <1> 2487 000075A6 00 <1> align 4, db 0 2488 <1> loadoptiontable: 2489 000075A8 0100[1476] <1> lot_entry 1, SET_DL_UNIT 2490 000075AC 0200[2076] <1> lot_entry 2, SET_BL_UNIT 2491 000075B0 0400[2C76] <1> lot_entry 4, SET_SIDI_CLUSTER 2492 000075B4 1000[3D76] <1> lot_entry 10h, SET_DSSI_DPT 2493 000075B8 2000[4A76] <1> lot_entry 20h, PUSH_DPT 2494 000075BC 4000[5376] <1> lot_entry 40h, DATASTART_HIDDEN 2495 000075C0 8000[6476] <1> lot_entry 80h, SET_AXBX_DATASTART 2496 000075C4 0001[7776] <1> lot_entry 100h, SET_DSBP_BPB 2497 000075C8 0002[8476] <1> lot_entry 200h, LBA_SET_TYPE 2498 000075CC 0004[9176] <1> lot_entry 400h, MESSAGE_TABLE 2499 000075D0 0008[9F76] <1> lot_entry 800h, SET_AXBX_ROOT_HIDDEN 2500 000075D4 0010[B476] <1> lot_entry 1000h, CMDLINE 2501 000075D8 0020[BC76] <1> lot_entry 2000h, NO_BPB 2502 000075DC 0040[C376] <1> lot_entry 4000h, SET_DSSI_PARTINFO 2503 000075E0 00000000 <1> dw 0, 0 2504 <1> 2505 <1> .incompatible: 2506 000075E4 02008000 <1> dw LOAD_SET_BL_UNIT, LOAD_SET_AXBX_DATASTART 2507 000075E8 02000008 <1> dw LOAD_SET_BL_UNIT, LOAD_SET_AXBX_ROOT_HIDDEN 2508 000075EC 80000008 <1> dw LOAD_SET_AXBX_DATASTART, LOAD_SET_AXBX_ROOT_HIDDEN 2509 000075F0 04001000 <1> dw LOAD_SET_SIDI_CLUSTER, LOAD_SET_DSSI_DPT 2510 000075F4 00011000 <1> dw LOAD_SET_DSBP_BPB, LOAD_SET_DSSI_DPT 2511 000075F8 00200001 <1> dw LOAD_NO_BPB, LOAD_SET_DSBP_BPB 2512 000075FC 00200002 <1> dw LOAD_NO_BPB, LOAD_LBA_SET_TYPE 2513 00007600 00200004 <1> dw LOAD_NO_BPB, LOAD_MESSAGE_TABLE 2514 00007604 00400400 <1> dw LOAD_SET_DSSI_PARTINFO, LOAD_SET_SIDI_CLUSTER 2515 00007608 00401000 <1> dw LOAD_SET_DSSI_PARTINFO, LOAD_SET_DSSI_DPT 2516 0000760C 00400001 <1> dw LOAD_SET_DSSI_PARTINFO, LOAD_SET_DSBP_BPB 2517 00007610 00000000 <1> dw 0, 0 2518 <1> 2519 00007614 5345545F444C5F554E- <1> lot_messages lot_list 2519 0000761D 4954005345545F424C- <1> 2519 00007626 5F554E495400534554- <1> 2519 0000762F 5F534944495F434C55- <1> 2519 00007638 53544552005345545F- <1> 2519 00007641 445353495F44505400- <1> 2519 0000764A 505553485F44505400- <1> 2519 00007653 444154415354415254- <1> 2519 0000765C 5F48494444454E0053- <1> 2519 00007665 45545F415842585F44- <1> 2519 0000766E 415441535441525400- <1> 2519 00007677 5345545F445342505F- <1> 2519 00007680 425042004C42415F53- <1> 2519 00007689 45545F54595045004D- <1> 2519 00007692 4553534147455F5441- <1> 2519 0000769B 424C45005345545F41- <1> 2519 000076A4 5842585F524F4F545F- <1> 2519 000076AD 48494444454E00434D- <1> 2519 000076B6 444C494E45004E4F5F- <1> 2519 000076BF 425042005345545F44- <1> 2519 000076C8 5353495F5041525449- <1> 2519 000076D1 4E464F00 <1> 2520 <1> 2521 <1> %unmacro lot_entry 2.nolist 2522 <1> %unmacro lot_messages 0-*.nolist 2523 <1> 2524 <1> 2525 <1> msdos7_message_table: 2526 <1> ; the first four bytes give displacements to the various 2527 <1> ; messages. an ASCIZ message indicates that this was the 2528 <1> ; last message. a message terminated by 0FFh indicates 2529 <1> ; that the last message (displacement at table + 3) is 2530 <1> ; to follow after this message. 2531 <1> ; the maximum allowed displacement is 7Fh. the minimum 2532 <1> ; allowed displacement is 1, to avoid a zero displacement. 2533 <1> ; only the last message is terminated by a zero byte, 2534 <1> ; as that zero byte indicates the end of the message table. 2535 <1> ; (the entire table is treated as one ASCIZ string.) 2536 <1> ; MS-DOS 7.10 from MSW 98 SE seems to have at least 167h (359) 2537 <1> ; bytes allocated to its buffer for these. 2538 <1> ; 2539 <1> ; this message table was discussed in a dosemu2 repo at 2540 <1> ; https://github.com/stsp/dosemu2/issues/681 2541 000076D5 03 <1> .: db .msg_invalid_system - ($ + 1) 2542 000076D6 13 <1> db .msg_io_error - ($ + 1) 2543 000076D7 01 <1> db .msg_invalid_system - ($ + 1) 2544 000076D8 1D <1> db .msg_press_any_key - ($ + 1) 2545 <1> 2546 <1> .msg_invalid_system: 2547 000076D9 0D0A496E76616C6964- <1> db 13,10,"Invalid system", -1 2547 000076E2 2073797374656DFF <1> 2548 <1> 2549 <1> .msg_io_error: 2550 000076EA 0D0A492F4F20657272- <1> db 13,10,"I/O error", -1 2550 000076F3 6F72FF <1> 2551 <1> 2552 <1> .msg_press_any_key: 2553 000076F6 0D0A4368616E676520- <1> db 13,10,"Change disk and press any key",13,10,0 2553 000076FF 6469736B20616E6420- <1> 2553 00007708 707265737320616E79- <1> 2553 00007711 206B65790D0A00 <1> 2554 <1> .end: 2555 <1> .size: equ .end - . 2556 <1> 2557 <1> %if .size > 150h 2558 <1> %error Message table too large! 2559 <1> %endif 2560 <1> 2561 <1> 2562 <1> 2563 <1> align 4, db 0 2564 <1> loadsettings: 2565 <1> istruc LOADSETTINGS 2566 00007718 [1664] <1> at lsKernelName, dw msg.ldos_kernel_name 2567 0000771A [8C64] <1> at lsAddName, dw msg.addname_empty 2568 0000771C 6000 <1> at lsMinPara, dw 60h 2569 0000771E 0000 <1> at lsMaxPara, dw 0 2570 00007720 0010 <1> at lsOptions, dw LOAD_CMDLINE 2571 00007722 0002 <1> at lsSegment, dw 200h 2572 00007724 00040000 <1> at lsEntry, dd 400h 2573 00007728 007CFFFF <1> at lsBPB, dw 7C00h, -1 2574 0000772C FC03 <1> at lsCheckOffset, dw 1020 2575 0000772E 6C44 <1> at lsCheckValue, db "lD" 2576 00007730 4C444F5300 <1> at lsName, asciz "LDOS" 2577 00007735 00 <1> iend 2578 <1> istruc LOADSETTINGS 2579 00007738 [F963] <1> at lsKernelName, dw msg.freedos_kernel_name 2580 0000773A [8C64] <1> at lsAddName, dw msg.addname_empty 2581 0000773C 2000 <1> at lsMinPara, dw 20h 2582 0000773E FFFF <1> at lsMaxPara, dw -1 2583 00007740 0300 <1> at lsOptions, dw LOAD_SET_DL_UNIT | LOAD_SET_BL_UNIT 2584 00007742 6000 <1> at lsSegment, dw 60h 2585 00007744 00000000 <1> at lsEntry, dd 0 2586 00007748 007CFFFF <1> at lsBPB, dw 7C00h, -1 2587 0000774C 0046524545- <1> at lsName, asciz "FREEDOS" 2587 00007754 444F5300 <1> 2588 <1> iend 2589 <1> istruc LOADSETTINGS 2590 00007758 [0464] <1> at lsKernelName, dw msg.dosc_kernel_name 2591 0000775A [8C64] <1> at lsAddName, dw msg.addname_empty 2592 0000775C 2000 <1> at lsMinPara, dw 20h 2593 0000775E FFFF <1> at lsMaxPara, dw -1 2594 00007760 0300 <1> at lsOptions, dw LOAD_SET_DL_UNIT | LOAD_SET_BL_UNIT 2595 00007762 0020 <1> at lsSegment, dw 2000h 2596 00007764 00000000 <1> at lsEntry, dd 0 2597 00007768 007C0000 <1> at lsBPB, dw 7C00h, 0 2598 0000776C 00444F5343- <1> at lsName, asciz "DOSC" 2598 00007774 00 <1> 2599 00007775 00 <1> iend 2600 <1> istruc LOADSETTINGS 2601 00007778 [0C64] <1> at lsKernelName, dw msg.edrdos_kernel_name 2602 0000777A [8C64] <1> at lsAddName, dw msg.addname_empty 2603 0000777C 2000 <1> at lsMinPara, dw 20h 2604 0000777E FFFF <1> at lsMaxPara, dw -1 2605 00007780 0301 <1> at lsOptions, dw LOAD_SET_DL_UNIT | LOAD_SET_BL_UNIT | LOAD_SET_DSBP_BPB 2607 00007782 7000 <1> at lsSegment, dw 70h 2608 00007784 00000000 <1> at lsEntry, dd 0 2609 00007788 007CFFFF <1> at lsBPB, dw 7C00h, -1 2610 0000778C 0045445244- <1> at lsName, asciz "EDRDOS" 2610 00007794 4F5300 <1> 2611 00007797 00 <1> iend 2612 <1> istruc LOADSETTINGS 2613 00007798 [1F64] <1> at lsKernelName, dw msg.msdos6_kernel_name 2614 0000779A [2664] <1> at lsAddName, dw msg.msdos6_add_name 2615 0000779C 2000 <1> at lsMinPara, dw 20h 2616 0000779E 6000 <1> at lsMaxPara, dw 60h 2617 000077A0 F100 <1> at lsOptions, dw LOAD_SET_DL_UNIT | LOAD_SET_AXBX_DATASTART | LOAD_DATASTART_HIDDEN | LOAD_SET_DSSI_DPT | LOAD_PUSH_DPT 2620 000077A2 7000 <1> at lsSegment, dw 70h 2621 000077A4 00000000 <1> at lsEntry, dd 0 2622 000077A8 007C0000 <1> at lsBPB, dw 7C00h, 0 2623 000077AC 004D53444F- <1> at lsName, asciz "MSDOS6" 2623 000077B4 533600 <1> 2624 000077B7 00 <1> iend 2625 <1> istruc LOADSETTINGS 2626 000077B8 [6164] <1> at lsKernelName, dw msg.rxdos.0_kernel_name 2627 000077BA [7864] <1> at lsAddName, dw msg.rxdos.0_add_name 2628 000077BC 2000 <1> at lsMinPara, dw 20h 2629 000077BE 6000 <1> at lsMaxPara, dw 60h 2630 000077C0 3108 <1> at lsOptions, dw LOAD_SET_DL_UNIT | LOAD_SET_AXBX_ROOT_HIDDEN | LOAD_SET_DSSI_DPT | LOAD_PUSH_DPT 2632 000077C2 7000 <1> at lsSegment, dw 70h 2633 000077C4 00000000 <1> at lsEntry, dd 0 2634 000077C8 007C0000 <1> at lsBPB, dw 7C00h, 0 2635 000077CC 005258444F- <1> at lsName, asciz "RXDOS.0" 2635 000077D4 532E3000 <1> 2636 <1> iend 2637 <1> istruc LOADSETTINGS 2638 000077D8 [6E64] <1> at lsKernelName, dw msg.rxdos.1_kernel_name 2639 000077DA [7864] <1> at lsAddName, dw msg.rxdos.1_add_name 2640 000077DC 2000 <1> at lsMinPara, dw 20h 2641 000077DE 6000 <1> at lsMaxPara, dw 60h 2642 000077E0 3108 <1> at lsOptions, dw LOAD_SET_DL_UNIT | LOAD_SET_AXBX_ROOT_HIDDEN | LOAD_SET_DSSI_DPT | LOAD_PUSH_DPT 2644 000077E2 7000 <1> at lsSegment, dw 70h 2645 000077E4 00000000 <1> at lsEntry, dd 0 2646 000077E8 007C0000 <1> at lsBPB, dw 7C00h, 0 2647 000077EC 005258444F- <1> at lsName, asciz "RXDOS.1" 2647 000077F4 532E3100 <1> 2648 <1> iend 2649 <1> istruc LOADSETTINGS 2650 000077F8 [8264] <1> at lsKernelName, dw msg.rxdos.2_kernel_name 2651 000077FA [8C64] <1> at lsAddName, dw msg.addname_empty 2652 000077FC 6000 <1> at lsMinPara, dw 60h 2653 000077FE 0000 <1> at lsMaxPara, dw 0 2654 00007800 0010 <1> at lsOptions, dw LOAD_CMDLINE 2655 00007802 7000 <1> at lsSegment, dw 70h 2656 00007804 00040000 <1> at lsEntry, dd 400h 2657 00007808 007CFFFF <1> at lsBPB, dw 7C00h, -1 2658 0000780C 005258444F- <1> at lsName, asciz "RXDOS.2" 2658 00007814 532E3200 <1> 2659 <1> iend 2660 <1> istruc LOADSETTINGS 2661 00007818 [8264] <1> at lsKernelName, dw msg.rxdos.2_kernel_name 2662 0000781A [8C64] <1> at lsAddName, dw msg.addname_empty 2663 0000781C 6000 <1> at lsMinPara, dw 60h 2664 0000781E 0000 <1> at lsMaxPara, dw 0 2665 00007820 0010 <1> at lsOptions, dw LOAD_CMDLINE 2666 00007822 0002 <1> at lsSegment, dw 200h 2667 00007824 00040000 <1> at lsEntry, dd 400h 2668 00007828 007CFFFF <1> at lsBPB, dw 7C00h, -1 2669 0000782C FC03 <1> at lsCheckOffset, dw 1020 2670 0000782E 6C44 <1> at lsCheckValue, db "lD" 2671 00007830 5258444F532E3300 <1> at lsName, asciz "RXDOS.3" 2672 <1> iend 2673 <1> istruc LOADSETTINGS 2674 00007838 [3064] <1> at lsKernelName, dw msg.ibmdos_kernel_name 2675 0000783A [3B64] <1> at lsAddName, dw msg.ibmdos_add_name 2676 0000783C 2000 <1> at lsMinPara, dw 20h 2677 0000783E 8000 <1> at lsMaxPara, dw 80h 2678 00007840 F100 <1> at lsOptions, dw LOAD_SET_DL_UNIT | LOAD_SET_AXBX_DATASTART | LOAD_DATASTART_HIDDEN | LOAD_SET_DSSI_DPT | LOAD_PUSH_DPT 2681 00007842 7000 <1> at lsSegment, dw 70h 2682 00007844 00000000 <1> at lsEntry, dd 0 2683 00007848 007C0000 <1> at lsBPB, dw 7C00h, 0 2684 0000784C 0049424D44- <1> at lsName, asciz "IBMDOS" 2684 00007854 4F5300 <1> 2685 00007857 00 <1> iend 2686 <1> istruc LOADSETTINGS 2687 00007858 [1F64] <1> at lsKernelName, dw msg.msdos7_kernel_name 2688 0000785A [8C64] <1> at lsAddName, dw msg.addname_empty 2689 0000785C 4000 <1> at lsMinPara, dw 40h 2690 0000785E 8000 <1> at lsMaxPara, dw 80h 2691 00007860 6506 <1> at lsOptions, dw LOAD_SET_DL_UNIT | LOAD_SET_SIDI_CLUSTER | LOAD_DATASTART_HIDDEN | LOAD_PUSH_DPT | LOAD_LBA_SET_TYPE | LOAD_MESSAGE_TABLE 2694 00007862 7000 <1> at lsSegment, dw 70h 2695 00007864 00020000 <1> at lsEntry, dd 200h 2696 00007868 007CFFFF <1> at lsBPB, dw 7C00h, -1 2697 0000786C 0002 <1> at lsCheckOffset, dw 200h 2698 0000786E 424A <1> at lsCheckValue, db "BJ" 2699 00007870 4D53444F533700 <1> at lsName, asciz "MSDOS7" 2700 00007877 00 <1> iend 2701 <1> istruc LOADSETTINGS 2702 00007878 [4664] <1> at lsKernelName, dw msg.ntldr_kernel_name 2703 0000787A [8C64] <1> at lsAddName, dw msg.addname_empty 2704 0000787C 2000 <1> at lsMinPara, dw 20h 2705 0000787E FFFF <1> at lsMaxPara, dw -1 2706 00007880 4100 <1> at lsOptions, dw LOAD_SET_DL_UNIT | LOAD_DATASTART_HIDDEN 2708 00007882 0020 <1> at lsSegment, dw 2000h 2709 00007884 00000000 <1> at lsEntry, dd 0 2710 00007888 007C0000 <1> at lsBPB, dw 7C00h, 0 2711 0000788C 004E544C44- <1> at lsName, asciz "NTLDR" 2711 00007894 5200 <1> 2712 00007896 00 <1> iend 2713 <1> istruc LOADSETTINGS 2714 00007898 [4C64] <1> at lsKernelName, dw msg.bootmgr_kernel_name 2715 0000789A [8C64] <1> at lsAddName, dw msg.addname_empty 2716 0000789C 2000 <1> at lsMinPara, dw 20h 2717 0000789E FFFF <1> at lsMaxPara, dw -1 2718 000078A0 4100 <1> at lsOptions, dw LOAD_SET_DL_UNIT | LOAD_DATASTART_HIDDEN 2720 000078A2 0020 <1> at lsSegment, dw 2000h 2721 000078A4 00000000 <1> at lsEntry, dd 0 2722 000078A8 007C0000 <1> at lsBPB, dw 7C00h, 0 2723 000078AC 00424F4F54- <1> at lsName, asciz "BOOTMGR" 2723 000078B4 4D475200 <1> 2724 <1> iend 2725 <1> istruc LOADSETTINGS 2726 000078B8 [5464] <1> at lsKernelName, dw msg.chain_kernel_name 2727 000078BA [8C64] <1> at lsAddName, dw msg.addname_empty 2728 000078BC 2000 <1> at lsMinPara, dw paras(512) 2729 000078BE 0002 <1> at lsMaxPara, dw paras(8192) 2730 000078C0 0160 <1> at lsOptions, dw LOAD_SET_DL_UNIT | LOAD_SET_DSSI_PARTINFO | LOAD_NO_BPB 2732 000078C2 C007 <1> at lsSegment, dw 7C0h 2733 000078C4 007C40F8 <1> at lsEntry, dw 7C00h, -7C0h 2734 000078C8 007C0000 <1> at lsBPB, dw 7C00h, 0 2735 000078CC FE01 <1> at lsCheckOffset, dw 510 2736 000078CE 55AA <1> at lsCheckValue, dw 0AA55h 2737 000078D0 434841494E00 <1> at lsName, asciz "CHAIN" 2738 000078D6 00 <1> iend 2739 000078D8 0000 <1> dw 0 2740 <1> %endif 2741 <1> 2742 <1> 2743 000078DA 0D21 <1> dskerrs: db dskerr0-dskerrs,dskerr1-dskerrs 2744 000078DC 3444 <1> db dskerr2-dskerrs,dskerr3-dskerrs 2745 000078DE 5494 <1> db dskerr4-dskerrs,dskerr9-dskerrs 2746 000078E0 6570 <1> db dskerr6-dskerrs,dskerr7-dskerrs 2747 000078E2 8394 <1> db dskerr8-dskerrs,dskerr9-dskerrs 2748 000078E4 A2AE <1> db dskerra-dskerrs,dskerrb-dskerrs 2749 000078E6 B9 <1> db dskerrc-dskerrs 2750 000078E7 57726974652070726F- <1> dskerr0: asciz "Write protect error" 2750 000078F0 74656374206572726F- <1> 2750 000078F9 7200 <1> 2751 000078FB 556E6B6E6F776E2075- <1> dskerr1: asciz "Unknown unit error" 2751 00007904 6E6974206572726F72- <1> 2751 0000790D 00 <1> 2752 0000790E 4472697665206E6F74- <1> dskerr2: asciz "Drive not ready" 2752 00007917 20726561647900 <1> 2753 0000791E 556E6B6E6F776E2063- <1> dskerr3: asciz "Unknown command" 2753 00007927 6F6D6D616E6400 <1> 2754 0000792E 44617461206572726F- <1> dskerr4: asciz "Data error (CRC)" 2754 00007937 7220284352432900 <1> 2755 0000793F 5365656B206572726F- <1> dskerr6: asciz "Seek error" 2755 00007948 7200 <1> 2756 0000794A 556E6B6E6F776E206D- <1> dskerr7: asciz "Unknown media type" 2756 00007953 656469612074797065- <1> 2756 0000795C 00 <1> 2757 0000795D 536563746F72206E6F- <1> dskerr8: asciz "Sector not found" 2757 00007966 7420666F756E6400 <1> 2758 0000796E 556E6B6E6F776E2065- <1> dskerr9: asciz "Unknown error" 2758 00007977 72726F7200 <1> 2759 0000797C 577269746520666175- <1> dskerra: asciz "Write fault" 2759 00007985 6C7400 <1> 2760 00007988 52656164206661756C- <1> dskerrb: asciz "Read fault" 2760 00007991 7400 <1> 2761 00007993 47656E6572616C2066- <1> dskerrc: asciz "General failure" 2761 0000799C 61696C75726500 <1> 2762 000079A3 207265616400 <1> reading: asciz " read" 2763 000079A9 207772697400 <1> writing: asciz " writ" 2764 000079AF 696E67206472697665- <1> drive: db "ing drive " 2764 000079B8 20 <1> 2765 000079B9 5F00 <1> driveno: asciz "_" 2766 000079BB 383038362F383800 <1> msg8088: asciz "8086/88" 2767 000079C3 78383600 <1> msgx86: asciz "x86" 2768 000079C7 20776974686F757420- <1> no_copr: asciz " without coprocessor" 2768 000079D0 636F70726F63657373- <1> 2768 000079D9 6F7200 <1> 2769 000079DC 207769746820636F70- <1> has_copr: asciz " with coprocessor" 2769 000079E5 726F636573736F7200 <1> 2770 000079EE 207769746820323837- <1> has_287: asciz " with 287" 2770 000079F7 00 <1> 2771 000079F8 7472616365206D6F64- <1> tmodes: db "trace mode is " 2771 00007A01 6520697320 <1> 2772 00007A06 5F202D20696E746572- <1> tmodev: asciz "_ - interrupts are " 2772 00007A0F 727570747320617265- <1> 2772 00007A18 2000 <1> 2773 00007A1A 74726163656400 <1> tmode1: asciz "traced" 2774 00007A21 70726F636573736564- <1> tmode0: asciz "processed" 2774 00007A2A 00 <1> 2775 00007A2B 2028756E7573656429- <1> unused: asciz " (unused)" 2775 00007A34 00 <1> 2776 <1> needsmsg: 2777 00007A35 5B6E6565647320 <1> .: db "[needs " 2778 <1> .digit_x_ofs: equ $ - . 2779 00007A3C 7838 <1> db "x8" 2780 <1> .digit_6_ofs: equ $ - . 2781 00007A3E 365D <1> db "6]" 2782 <1> needsmsg_L: equ $-needsmsg 2783 00007A40 5B6E65656473206D61- <1> needsmath: db "[needs math coprocessor]" 2783 00007A49 746820636F70726F63- <1> 2783 00007A52 6573736F725D <1> 2784 <1> needsmath_L: equ $-needsmath 2785 00007A58 5B6F62736F6C657465- <1> obsolete: db "[obsolete]" 2785 00007A61 5D <1> 2786 <1> obsolete_L: equ $-obsolete 2787 00007A62 446976696465206572- <1> int0msg: asciz "Divide error",13,10 2787 00007A6B 726F720D0A00 <1> 2788 00007A71 556E65787065637465- <1> int1msg: asciz "Unexpected single-step interrupt",13,10 2788 00007A7A 642073696E676C652D- <1> 2788 00007A83 7374657020696E7465- <1> 2788 00007A8C 72727570740D0A00 <1> 2789 00007A94 556E65787065637465- <1> int3msg: asciz "Unexpected breakpoint interrupt",13,10 2789 00007A9D 6420627265616B706F- <1> 2789 00007AA6 696E7420696E746572- <1> 2789 00007AAF 727570740D0A00 <1> 2790 <1> %if _CATCHINT06 2791 00007AB6 496E76616C6964206F- <1> int6msg: asciz "Invalid opcode",13,10 2791 00007ABF 70636F64650D0A00 <1> 2792 <1> %endif 2793 <1> %if _CATCHINT08 2794 00007AC7 446574656374656420- <1> int8msg: asciz "Detected Control pressed 5 seconds",13,10 2794 00007AD0 436F6E74726F6C2070- <1> 2794 00007AD9 726573736564203520- <1> 2794 00007AE2 7365636F6E64730D0A- <1> 2794 00007AEB 00 <1> 2795 00007AEC 446574656374656420- <1> int8_kbd_msg: asciz "Detected Control pressed 5 seconds (Keyboard enabled)",13,10 2795 00007AF5 436F6E74726F6C2070- <1> 2795 00007AFE 726573736564203520- <1> 2795 00007B07 7365636F6E64732028- <1> 2795 00007B10 4B6579626F61726420- <1> 2795 00007B19 656E61626C6564290D- <1> 2795 00007B22 0A00 <1> 2796 <1> runint_ctrlc_msg: 2797 00007B24 446574656374656420- <1> asciz "Detected double Control-C via serial",13,10 2797 00007B2D 646F75626C6520436F- <1> 2797 00007B36 6E74726F6C2D432076- <1> 2797 00007B3F 69612073657269616C- <1> 2797 00007B48 0D0A00 <1> 2798 <1> %endif 2799 <1> %if _CATCHINT18 2800 00007B4B 4469736B6C65737320- <1> int18msg: asciz "Diskless boot hook called",13,10 2800 00007B54 626F6F7420686F6F6B- <1> 2800 00007B5D 2063616C6C65640D0A- <1> 2800 00007B66 00 <1> 2801 <1> %endif 2802 <1> %if _CATCHINT19 2803 00007B67 426F6F74206C6F6164- <1> int19msg: asciz "Boot load called",13,10 2803 00007B70 2063616C6C65640D0A- <1> 2803 00007B79 00 <1> 2804 <1> %endif 2805 <1> %if _PM 2806 <1> %if _CATCHEXC06 2807 00007B7A 496E76616C6964206F- <1> exc6msg: asciz "Invalid opcode fault",13,10 2807 00007B83 70636F646520666175- <1> 2807 00007B8C 6C740D0A00 <1> 2808 <1> %endif 2809 <1> %if _CATCHEXC0C 2810 00007B91 537461636B20666175- <1> excCmsg: asciz "Stack fault",13,10 2810 00007B9A 6C740D0A00 <1> 2811 <1> %endif 2812 00007B9F 47656E6572616C2070- <1> excDmsg: asciz "General protection fault",13,10 2812 00007BA8 726F74656374696F6E- <1> 2812 00007BB1 206661756C740D0A00 <1> 2813 <1> %if _EXCCSIP 2814 00007BBA 43533A49503D <1> excloc: db "CS:IP=" 2815 00007BC0 202020203A20202020- <1> exccsip: asciz " : ",13,10 2815 00007BC9 0D0A00 <1> 2816 <1> %endif 2817 00007BCC 50616765206661756C- <1> excEmsg: asciz "Page fault",13,10 2817 00007BD5 740D0A00 <1> 2818 00007BD9 436F6D6D616E64206E- <1> nodosext: asciz "Command not supported in protected mode without a DOS extender",13,10 2818 00007BE2 6F7420737570706F72- <1> 2818 00007BEB 74656420696E207072- <1> 2818 00007BF4 6F746563746564206D- <1> 2818 00007BFD 6F646520776974686F- <1> 2818 00007C06 7574206120444F5320- <1> 2818 00007C0F 657874656E6465720D- <1> 2818 00007C18 0A00 <1> 2819 00007C1A 436F6D6D616E64206E- <1> nopmsupp: asciz "Command not supported in protected mode",13,10 2819 00007C23 6F7420737570706F72- <1> 2819 00007C2C 74656420696E207072- <1> 2819 00007C35 6F746563746564206D- <1> 2819 00007C3E 6F64650D0A00 <1> 2820 <1> %if _DISPHOOK 2821 00007C44 44504D4920656E7472- <1> dpmihook: db "DPMI entry hooked, new entry=" 2821 00007C4D 7920686F6F6B65642C- <1> 2821 00007C56 206E657720656E7472- <1> 2821 00007C5F 793D <1> 2822 00007C61 5F5F5F5F3A38413736- <1> dpmihookcs: asciz "____:",_4digitshex(mydpmientry+DATASECTIONFIXUP),13,10 2822 00007C6A 0D0A00 <1> 2823 <1> %endif 2824 00007C6D 44504D4920656E7472- <1> msg.dpmi_no_hook: asciz "DPMI entry cannot be hooked!",13,10 2824 00007C76 792063616E6E6F7420- <1> 2824 00007C7F 626520686F6F6B6564- <1> 2824 00007C88 210D0A00 <1> 2825 00007C8C 7265736F7572636520- <1> nodesc: asciz "resource not accessible in real mode",13,10 2825 00007C95 6E6F74206163636573- <1> 2825 00007C9E 7369626C6520696E20- <1> 2825 00007CA7 7265616C206D6F6465- <1> 2825 00007CB0 0D0A00 <1> 2826 <1> ;descwrong: asciz "descriptor not accessible",13,10 2827 00007CB3 67617465206E6F7420- <1> gatewrong: asciz "gate not accessible",13,10 2827 00007CBC 61636365737369626C- <1> 2827 00007CC5 650D0A00 <1> 2828 00007CC9 4D532D444F5300 <1> msg.msdos: asciz "MS-DOS" 2829 00007CD0 5F5F5F5F2062617365- <1> descr: db "____ base=" 2829 00007CD9 3D <1> 2830 00007CDA 5F5F5F5F5F5F5F5F20- <1> descbase: db "________ limit=" 2830 00007CE3 6C696D69743D <1> 2831 00007CE9 5F5F5F5F5F5F5F5F20- <1> desclim: db "________ attr=" 2831 00007CF2 617474723D <1> 2832 00007CF7 5F5F5F5F0D0A <1> descattr: db "____",13,10 2833 00007CFD 00 <1> asciz 2834 <1> %endif ; _PM 2835 00007CFE 4572726F7220696E20- <1> ph_msg: asciz "Error in sequence of calls to hack.",13,10 2835 00007D07 73657175656E636520- <1> 2835 00007D10 6F662063616C6C7320- <1> 2835 00007D19 746F206861636B2E0D- <1> 2835 00007D22 0A00 <1> 2836 <1> 2837 00007D24 0D0A50726F6772616D- <1> progtrm: db 13,10,"Program terminated normally (" 2837 00007D2D 207465726D696E6174- <1> 2837 00007D36 6564206E6F726D616C- <1> 2837 00007D3F 6C792028 <1> 2838 00007D43 5F5F5F5F290D0A00 <1> progexit: asciz "____)",13,10 2839 00007D4B 45584520616E642048- <1> nowhexe: asciz "EXE and HEX files cannot be written",13,10 2839 00007D54 45582066696C657320- <1> 2839 00007D5D 63616E6E6F74206265- <1> 2839 00007D66 207772697474656E0D- <1> 2839 00007D6F 0A00 <1> 2840 00007D71 43616E6E6F74207772- <1> nownull: asciz "Cannot write: no file name given",13,10 2840 00007D7A 6974653A206E6F2066- <1> 2840 00007D83 696C65206E616D6520- <1> 2840 00007D8C 676976656E0D0A00 <1> 2841 00007D94 57726974696E672000 <1> wwmsg1: asciz "Writing " 2842 00007D9D 2062797465730D0A00 <1> wwmsg2: asciz " bytes",13,10 2843 00007DA6 4469736B2066756C6C- <1> diskful: asciz "Disk full",13,10 2843 00007DAF 0D0A00 <1> 2844 00007DB2 4572726F7220 <1> openerr: db "Error " 2845 00007DB8 5F5F5F5F206F70656E- <1> openerr1: asciz "____ opening file",13,10 2845 00007DC1 696E672066696C650D- <1> 2845 00007DCA 0A00 <1> 2846 00007DCC 46696C65206E6F7420- <1> doserr2: asciz "File not found",13,10 2846 00007DD5 666F756E640D0A00 <1> 2847 00007DDD 50617468206E6F7420- <1> doserr3: asciz "Path not found",13,10 2847 00007DE6 666F756E640D0A00 <1> 2848 00007DEE 416363657373206465- <1> doserr5: asciz "Access denied",13,10 2848 00007DF7 6E6965640D0A00 <1> 2849 00007DFE 496E73756666696369- <1> doserr8: asciz "Insufficient memory",13,10 2849 00007E07 656E74206D656D6F72- <1> 2849 00007E10 790D0A00 <1> 2850 <1> 2851 <1> %if _EMS 2852 <1> ;emmname: db "EMMXXXX0" 2853 00007E14 454D53206E6F742069- <1> emsnot: asciz "EMS not installed",13,10 2853 00007E1D 6E7374616C6C65640D- <1> 2853 00007E26 0A00 <1> 2854 00007E28 454D5320696E746572- <1> emserr1: asciz "EMS internal error",13,10 2854 00007E31 6E616C206572726F72- <1> 2854 00007E3A 0D0A00 <1> 2855 00007E3D 48616E646C65206E6F- <1> emserr3: asciz "Handle not found",13,10 2855 00007E46 7420666F756E640D0A- <1> 2855 00007E4F 00 <1> 2856 00007E50 4E6F20667265652068- <1> emserr5: asciz "No free handles",13,10 2856 00007E59 616E646C65730D0A00 <1> 2857 00007E62 546F74616C20706167- <1> emserr7: asciz "Total pages exceeded",13,10 2857 00007E6B 657320657863656564- <1> 2857 00007E74 65640D0A00 <1> 2858 00007E79 467265652070616765- <1> emserr8: asciz "Free pages exceeded",13,10 2858 00007E82 732065786365656465- <1> 2858 00007E8B 640D0A00 <1> 2859 00007E8F 506172616D65746572- <1> emserr9: asciz "Parameter error",13,10 2859 00007E98 206572726F720D0A00 <1> 2860 00007EA1 4C6F676963616C2070- <1> emserra: asciz "Logical page out of range",13,10 2860 00007EAA 616765206F7574206F- <1> 2860 00007EB3 662072616E67650D0A- <1> 2860 00007EBC 00 <1> 2861 00007EBD 506879736963616C20- <1> emserrb: asciz "Physical page out of range",13,10 2861 00007EC6 70616765206F757420- <1> 2861 00007ECF 6F662072616E67650D- <1> 2861 00007ED8 0A00 <1> 2862 <1> align 2, db 0 2863 00007EDA [287E][287E]0000- <1> emserrs: dw emserr1,emserr1,0,emserr3,0,emserr5,0,emserr7 2863 00007EE0 [3D7E]0000[507E]00- <1> 2863 00007EE7 00[627E] <1> 2864 00007EEA [797E][8F7E][A17E]- <1> dw emserr8,emserr9,emserra,emserrb 2864 00007EF0 [BD7E] <1> 2865 00007EF2 454D53206572726F72- <1> emserrx: asciz "EMS error " 2865 00007EFB 2000 <1> 2866 00007EFD 48616E646C65206372- <1> xaans: db "Handle created = " 2866 00007F06 6561746564203D20 <1> 2867 00007F0E 5F5F5F5F0D0A00 <1> xaans1: asciz "____",13,10 2868 00007F15 48616E646C6520 <1> xdans: db "Handle " 2869 00007F1C 5F5F5F5F206465616C- <1> xdans1: asciz "____ deallocated",13,10 2869 00007F25 6C6F63617465640D0A- <1> 2869 00007F2E 00 <1> 2870 00007F2F 48616E646C65207265- <1> xrans: asciz "Handle reallocated",13,10 2870 00007F38 616C6C6F6361746564- <1> 2870 00007F41 0D0A00 <1> 2871 00007F44 4C6F676963616C2070- <1> xmans: db "Logical page " 2871 00007F4D 61676520 <1> 2872 00007F51 5F5F5F5F206D617070- <1> xmans1: db "____ mapped to physical page " 2872 00007F5A 656420746F20706879- <1> 2872 00007F63 736963616C20706167- <1> 2872 00007F6C 6520 <1> 2873 00007F6E 5F5F0D0A00 <1> xmans2: asciz "__",13,10 2874 00007F73 48616E646C6520 <1> xsstr1: db "Handle " 2875 00007F7A 5F5F5F5F2068617320 <1> xsstr1a: db "____ has " 2876 00007F83 5F5F5F5F2070616765- <1> xsstr1b: asciz "____ pages allocated",13,10 2876 00007F8C 7320616C6C6F636174- <1> 2876 00007F95 65640D0A00 <1> 2877 00007F9A 706879732E20706167- <1> xsstr2: db "phys. page " 2877 00007FA3 6520 <1> 2878 00007FA5 5F5F203D207365676D- <1> xsstr2a: db "__ = segment " 2878 00007FAE 656E7420 <1> 2879 00007FB2 5F5F5F5F202000 <1> xsstr2b: asciz "____ " 2880 00007FB9 5F5F5F5F206F662061- <1> xsstr3: db "____ of a total " 2880 00007FC2 20746F74616C20 <1> 2881 00007FC9 5F5F5F5F20454D5320- <1> xsstr3a: asciz "____ EMS " 2881 00007FD2 00 <1> 2882 00007FD3 657320686176652062- <1> xsstr4: asciz "es have been allocated",13,10 2882 00007FDC 65656E20616C6C6F63- <1> 2882 00007FE5 617465640D0A00 <1> 2883 00007FEC 70616700 <1> xsstrpg: asciz "pag" 2884 00007FF0 68616E646C00 <1> xsstrhd: asciz "handl" 2885 00007FF6 6E6F206D6170706162- <1> xsnopgs: asciz "no mappable pages",13,10,13,10 2885 00007FFF 6C652070616765730D- <1> 2885 00008008 0A0D0A00 <1> 2886 <1> %endif 2887 <1> 2888 <1> align 4, db 0 2889 0000800C 000800040002800040- <1> flagbits: dw 800h,400h,200h, 80h,040h,010h,004h,001h 2889 00008015 00100004000100 <1> 2890 0000801C 4F56444E45494E475A- <1> flagson: dw "OV","DN","EI","NG","ZR","AC","PE","CY" 2890 00008025 52414350454359 <1> 2891 0000802C 4E5655504449504C4E- <1> flagsoff: dw "NV","UP","DI","PL","NZ","NA","PO","NC" 2891 00008035 5A4E41504F4E43 <1> 2892 0000803C 4F464446494653465A- <1> flagnames: dw "OF","DF","IF","SF","ZF","AF","PF","CF" 2892 00008045 46414650464346 <1> 2893 <1> 2894 <1> %if _COND 2895 0000804C 6E6F7420 <1> msg.condnotjump:db "not " 2896 00008050 6A756D70696E6700 <1> msg.condjump: asciz "jumping" 2897 <1> %endif 2898 <1> 2899 00008058 206D6174636865730D- <1> msg.matches: asciz " matches",13,10 2899 00008061 0A00 <1> 2900 <1> 2901 00008063 00 <1> align 4, db 0 2902 00008064 414C4148424C424843- <1> reg8names: dw "AL","AH","BL","BH","CL","CH","DL","DH" 2902 0000806D 4C4348444C4448 <1> 2903 <1> ; Even entries are xL registers, odd ones the xH ones. 2904 <1> ; Order matches that of the first four regs entries. 2905 <1> 2906 00008074 415842584358445853- <1> reg16names: dw "AX","BX","CX","DX","SP","BP","SI","DI" 2906 0000807D 50425053494449 <1> 2907 00008084 445345535353435346- <1> dw "DS","ES","SS","CS","FS","GS","IP","FL" 2907 0000808D 5347534950464C <1> 2908 <1> ; 32-bit registers are the first eight and last two entries of 2909 <1> ; reg16names with 'E', which are all non-segment registers. 2910 <1> ; Segment registers can be detected by the 'S' as second letter. 2911 <1> ; FS and GS are the fourth- and third-to-last entries. 2912 <1> ; Order matches that of the sixteen regs entries. 2913 <1> 2914 <1> 2915 <1> ; Table of recognised default (unsigned) types. 2916 <1> ; 2917 <1> ; If any number of characters match, use the type. 2918 <1> ; If an additional "S" is found in front of a valid 2919 <1> ; type, the type is set to signed. (Word and byte 2920 <1> ; types are sign-extended to a dword value.) 2921 <1> ; 2922 <1> ; Each odd entry is an alternative name for the even 2923 <1> ; entry preceding it. 2924 <1> types: 2925 00008094 0442595445 <1> countedb "BYTE" ; ("B" is hexadecimal) 2926 00008099 0443484152 <1> countedb "CHAR" ; ("C" is hexadecimal) 2927 0000809E 04574F5244 <1> countedb "WORD" 2928 000080A3 0553484F5254 <1> countedb "SHORT" 2929 000080A9 053342595445 <1> countedb "3BYTE" ; ("3" and "3B" are numeric) 2930 000080AF 053342595445 <1> countedb "3BYTE" 2931 000080B5 0544574F5244 <1> countedb "DWORD" ; ("D" is hexadecimal) 2932 000080BB 044C4F4E47 <1> countedb "LONG" 2933 <1> .addresses: 2934 000080C0 07504F494E544552 <1> countedb "POINTER" 2935 000080C8 03505452 <1> countedb "PTR" 2936 000080CC 064F4646534554 <1> countedb "OFFSET" 2937 000080D3 034F4653 <1> countedb "OFS" 2938 000080D7 075345474D454E54 <1> countedb "SEGMENT" 2939 <1> .end: 2940 <1> 2941 <1> maxtypesize equ 7 ; size of "SEGMENT" and "POINTER" 1055 1056 msg_end: 1057 1058 numdef SHOWMSGSIZE, 0 1059 %if _SHOWMSGSIZE 1060 %assign MSGSIZE msg_end - msg_start 1061 %warning msg holds MSGSIZE bytes 1062 %endif 1063 1064 1065 usesection lDEBUG_DATA_ENTRY 1066 ; INP: word [cs:ip] = near address to jump to in other segment 1067 ..@symhint_trace_caller_entry_to_code_seg: 1068 entry_to_code_seg: 1069 000080DF 50 push ax ; word space for ?jumpaddress_ip, is ax 1070 000080E0 2EA1[CE00] mov ax, word [cs:code_seg] 1071 %if _PM 1072 000080E4 EB05 jmp entry_to_code_common 1073 1074 ..@symhint_trace_caller_entry_to_code_sel: 1075 entry_to_code_sel: 1076 000080E6 50 push ax 1077 000080E7 2EA1[D000] mov ax, word [cs:code_sel] 1078 %endif 1079 1080 entry_to_code_common: 1081 lframe 0 1082 lpar word, jumpaddress_cs_and_orig_ip 1083 lpar word, jumpaddress_ip 1084 000080EB 5589E5 lenter 1085 1086 000080EE 56 push si 1087 000080EF 9C pushf 1088 000080F0 FC cld 1089 1090 000080F1 874604 xchg word [bp + ?jumpaddress_cs_and_orig_ip], ax ; fill function segment 1091 000080F4 89C6 mov si, ax 1092 000080F6 2EAD cs lodsw 1093 %if _DEBUG 1094 cmp al, 0CCh ; debugger breakpoint ? 1095 jne @F ; no --> 1096 int3 ; break to make it remove the breakpoint 1097 dec si 1098 dec si 1099 cs lodsw ; reload the word 1100 cmp al, 0CCh 1101 jne @F 1102 1103 .l: 1104 int3 1105 jmp .l 1106 1107 @@: 1108 %endif 1109 000080F8 874602 xchg word [bp + ?jumpaddress_ip], ax ; fill function offset 1110 ; (and restore ax) 1111 1112 000080FB 9D popf 1113 000080FC 5E pop si 1114 1115 000080FD 5D lleave 1116 000080FE CB retf ; jump to dword [bp + ?jumpaddress] 1117 1118 1119 1120 ; debug22 - Interrupt 22h handler 1121 ; 1122 ; This is for DEBUG itself: it's a catch-all for the various Int23 1123 ; and Int24 calls that may occur unpredictably at any time. What we 1124 ; do is pretend to be a command interpreter (which we are, in a sense, 1125 ; just with different sort of commands) by setting our parent PSP 1126 ; value equal to our own PSP so that DOS does not free our memory when 1127 ; we quit. Therefore control ends up here when DOS detects Control-C 1128 ; or an Abort in the critical error prompt is selected. 1129 debug22: 1130 000080FF FA cli 1131 .cleartraceflag: 1132 00008100 FC cld ; reestablish things 1133 00008101 8CC8 mov ax, cs 1134 00008103 8ED8 mov ds, ax 1135 00008105 8ED0 mov ss, ax 1136 00008107 8B26[940A] mov sp, word [ savesp ] ; restore stack 1137 %if _PM 1138 0000810B 8026[9D00]F7 clropt [internalflags], protectedmode ; reset PM flag 1139 %endif 1140 00008110 90 times 1 - (($ - $$) & 1) nop ; align in-code parameter 1141 00008111 E8CBFF call entry_to_code_seg 1142 00008114 [7503] dw cmd2_reset_re_maybe_pm 1143 1144 1145 usesection lDEBUG_CODE 1146 1147 %if $ - $$ 1148 %error cmd3 is not at offset 0 in lDEBUG_CODE 1149 %endif 1150 1151 code_insure_low_byte_not_0CCh 1152 ; Begin main command loop. 1153 cmd3: 1154 00000000 16 push ss 1155 00000001 1F pop ds 1156 00000002 66 _386_o32 ; mov esp 1157 00000003 8B26[940A] mov sp, word [ savesp ] ; restore stack 1158 00000007 83E4FC _386 and sp, ~3 ; align stack 1159 0000000A 66 _386_o32 1160 0000000B 31C0 xor ax, ax 1161 0000000D 66 _386_o32 1162 0000000E 50 push ax 1163 0000000F 66 _386_o32 1164 00000010 9D popf 1165 00000011 8B26[940A] _386 mov sp, word [ savesp ] ; restore stack 1166 00000015 FC cld 1167 00000016 FB sti 1168 00000017 C706[9A0A][0000] mov word [ errret ], cmd3 1169 0000001D C706[9C0A][FDA4] mov word [ throwret ], errhandler 1170 00000023 8926[9E0A] mov word [ throwsp ], sp 1171 00000027 1E push ds 1172 00000028 07 pop es 1173 1174 00000029 31FF xor di, di 1175 0000002B 873E[0E0C] xchg di, word [terminator_in_line_in.offset] 1176 0000002F 85FF test di, di 1177 00000031 7409 jz @F 1178 00000033 803D00 cmp byte [di], 0 1179 00000036 7504 jne @F 1180 00000038 A0[100C] mov al, byte [terminator_in_line_in.value] 1181 0000003B AA stosb 1182 @@: 1183 1184 0000003C 8026[A500]DF clropt [internalflags3], dif3_unquiet_error 1185 00000041 8026[A600]FD clropt [internalflags3], dif3_do_not_highlight 1186 %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 1187 00000046 8026[A700]E7 clropt [internalflags3], dif3_auxbuff_guarded_1 | dif3_in_if 1188 %else 1189 clropt [internalflags3], dif3_auxbuff_guarded_1 1190 %endif 1191 0000004B 8026[A400]CF clropt [internalflags3], dif3_input_serial_override | dif3_input_terminal_override 1193 00000050 8026[A300]EF clropt [internalflags2], dif2_in_silence_dump 1194 %if _PM 1195 00000055 E81F38 call resetmode 1196 %endif 1197 1198 1199 %if _PM 1200 cmd3_int2F_init: 1201 00000058 B02F mov al, 2Fh ; interrupt number 1202 0000005A BE[4089] mov si, debug2F ; -> IISP entry header 1203 1204 0000005D F606[8800]02 testopt [options4], opt4_int_2F_hook 1205 00000062 751C jnz .done 1206 .check_disable: 1207 00000064 F606[A800]02 testopt [internalflags4], dif4_int_2F_hooked 1208 00000069 7415 jz .done 1209 1210 0000006B BA0200 mov dx, opt4_int_2F_force >> 16 1211 0000006E E81DD2 call UnhookInterruptForce 1212 00000071 720D jc .done 1213 1214 00000073 8026[9D00]FE clropt [internalflags], hooked2F 1215 00000078 8026[A800]FD clropt [internalflags4], dif4_int_2F_hooked 1216 0000007D E81BD3 call update_inttab_optional 1217 1218 .done: 1219 %endif 1220 1221 1222 %if _CATCHINT08 1223 cmd3_int08_init: 1224 00000080 B008 mov al, 08h ; interrupt number 1225 00000082 BE[5685] mov si, intr8 ; -> IISP entry header 1226 1227 00000085 F606[8800]04 testopt [options4], opt4_int_08_hook 1228 0000008A 7414 jz .check_disable 1229 .check_enable: 1230 0000008C F606[A800]04 testopt [internalflags4], dif4_int_08_hooked 1231 00000091 7524 jnz .done 1232 1233 00000093 E87ED0 call install_86m_interrupt_handler 1234 00000096 800E[A800]04 setopt [internalflags4], dif4_int_08_hooked 1235 0000009B E8FDD2 call update_inttab_optional 1236 0000009E EB17 jmp .done 1237 1238 .check_disable: 1239 000000A0 F606[A800]04 testopt [internalflags4], dif4_int_08_hooked 1240 000000A5 7410 jz .done 1241 1242 000000A7 BA0400 mov dx, opt4_int_08_force >> 16 1243 000000AA E8E1D1 call UnhookInterruptForce 1244 000000AD 7208 jc .done 1245 1246 000000AF 8026[A800]FB clropt [internalflags4], dif4_int_08_hooked 1247 000000B4 E8E4D2 call update_inttab_optional 1248 1249 .done: 1250 %endif 1251 1252 1253 %if _CATCHINT2D 1254 cmd3_int2D_init: 1255 000000B7 B02D mov al, 2Dh ; interrupt number 1256 000000B9 BE[4C81] mov si, int2D ; -> IISP entry header 1257 1258 000000BC F606[8800]08 testopt [options4], opt4_int_2D_hook 1259 000000C1 744A jz .check_disable 1260 .check_enable: 1261 000000C3 F606[A800]08 testopt [internalflags4], dif4_int_2D_hooked 1262 000000C8 7557 jnz .done 1263 1264 000000CA E8D3D0 call intchk ; ZR if offset = -1 or segment = 0 1265 ; CHG: ax, dx, bx 1266 000000CD 7431 jz .fail 1267 1268 000000CF 8A26[4881] mov ah, byte [try_amis_multiplex_number] 1269 000000D3 B000 mov al, 00h 1270 ; function 0 changes dx, di, cx, al 1271 %if _PM 1272 000000D5 E85B92 call call_int2D 1273 %else 1274 int 2Dh ; enquire whether there's anyone 1275 %endif 1276 000000D8 84C0 test al, al 1277 000000DA 7414 jz .got 1278 1279 000000DC 31C0 xor ax, ax ; start with multiplex number 0 1280 .loopplex: 1281 000000DE B000 mov al, 00h ; AMIS installation check 1282 ; function 0 changes dx, di, cx, al 1283 %if _PM 1284 000000E0 E85092 call call_int2D 1285 %else 1286 int 2Dh ; enquire whether there's anyone 1287 %endif 1288 000000E3 84C0 test al, al ; free ? 1289 000000E5 7409 jz .got ; yes, put it to use --> 1290 000000E7 FEC4 inc ah 1291 000000E9 75F3 jnz .loopplex ; try next multiplexer --> 1292 1293 000000EB BA[B36A] mov dx, msg.cannot_hook_2D.nofree 1294 000000EE EB13 jmp .fail_putsz 1295 1296 .got: 1297 000000F0 8826[6081] mov byte [amis_multiplex_number], ah 1298 1299 000000F4 B02D mov al, 2Dh ; interrupt number 1300 000000F6 E81BD0 call install_86m_interrupt_handler 1301 000000F9 800E[A800]08 setopt [internalflags4], dif4_int_2D_hooked 1302 000000FE EB21 jmp .done 1303 1304 .fail: 1305 00000100 BA[756A] mov dx, msg.cannot_hook_2D.invalid 1306 .fail_putsz: 1307 00000103 E8B6BC call putsz 1308 00000106 8026[8800]F7 clropt [options4], opt4_int_2D_hook 1309 0000010B EB14 jmp .done 1310 1311 .check_disable: 1312 0000010D F606[A800]08 testopt [internalflags4], dif4_int_2D_hooked 1313 00000112 740D jz .done 1314 1315 00000114 BA0800 mov dx, opt4_int_2D_force >> 16 1316 00000117 E874D1 call UnhookInterruptForce 1317 0000011A 7205 jc .done 1318 1319 0000011C 8026[A800]F7 clropt [internalflags4], dif4_int_2D_hooked 1320 1321 .done: 1322 %endif 1323 1324 1325 00000121 F606[A700]01 testopt [internalflags3], dif3_input_re 1326 00000126 7403E93701 jnz cmd3_continue_1_re 1327 0000012B 8026[8100]7F clropt [options2], opt2_re_cancel_tpg 1328 00000130 E8C9BB call silence_dump 1329 1330 1331 cmd3_serial_init: 1332 00000133 F606[7D00]40 testopt [options], enable_serial 1333 00000138 7503E9E000 jz .check_disable_serial 1334 .check_enable_serial: 1335 0000013D F606[EB0B]01 testopt [serial_flags], sf_init_done 1336 00000142 7403E91801 jnz .done_serial 1337 .enable_serial: 1338 1339 00000147 A0[EC0B] mov al, byte [serial_var_intnum] 1340 0000014A A2[2209] mov byte [serial_use_intnum], al 1341 0000014D A0[ED0B] mov al, byte [serial_var_params] 1342 00000150 A2[2309] mov byte [serial_use_params], al 1343 00000153 A0[EE0B] mov al, byte [serial_var_fifo] 1344 00000156 A2[2409] mov byte [serial_use_fifo], al 1345 00000159 A1[F00B] mov ax, word [serial_var_baseport] 1346 0000015C A3[2609] mov word [serial_use_baseport], ax 1347 0000015F A1[F20B] mov ax, word [serial_var_dl] 1348 00000162 A3[2809] mov word [serial_use_dl], ax 1349 00000165 A1[F40B] mov ax, word [serial_var_irqmask] 1350 00000168 A3[2A09] mov word [serial_use_irqmask], ax 1351 0000016B E895CD call serial_clear_fifos 1352 0000016E E85BCD call serial_install_interrupt_handler 1353 00000171 7317 jnc @F 1354 00000173 BF[556B] mov di, msg.serial_cannot_hook.old_int 1355 00000176 A0[120C] mov al, byte [serial_installed_intnum] 1356 00000179 E891B8 call hexbyte 1357 0000017C BF[3F6B] mov di, msg.serial_cannot_hook.new_int 1358 0000017F A0[2209] mov al, byte [serial_use_intnum] 1359 00000182 E888B8 call hexbyte 1360 00000185 BA[1F6B] mov dx, msg.serial_cannot_hook 1361 00000188 EB49 jmp .no_keep 1362 1363 @@: 1364 0000018A C606[E095]80 mov byte [serial_interrupt_handler + ieEOI], 80h 1365 0000018F E884CD call serial_init_UART 1366 1367 00000192 800E[EB0B]01 setopt [serial_flags], sf_init_done 1368 1369 00000197 BA[B369] mov dx, msg.serial_request_keep 1370 0000019A E81FBC call putsz 1371 1372 0000019D BF[0E08] mov di, line_out 1373 %if _DEBUG 1374 mov al, '~' ; indicate instance is to be debugged 1375 stosb 1376 %endif 1377 000001A0 B03D mov al, '=' 1378 000001A2 AA stosb 1379 000001A3 B020 mov al, 32 1380 000001A5 AA stosb 1381 1382 000001A6 31C0 xor ax, ax 1383 000001A8 A3[000C] mov word [getline_timer_count], ax 1384 000001AB A3[020C] mov word [getline_timer_last], ax 1385 000001AE C706[040C][DE01] mov word [getline_timer_func], .timer 1386 1387 ; if we're executing from the command line 1388 ; buffer or a Y file then we want to 1389 ; override input to be from serial for the 1390 ; KEEP confirmation prompt. 1391 ; output is always to serial if we're here. 1392 000001B4 800E[A400]20 setopt [internalflags3], dif3_input_serial_override 1393 000001B9 E8B5BF call getline00 1394 000001BC 8026[A400]DF clropt [internalflags3], dif3_input_serial_override 1395 1396 000001C1 E869B7 call skipcomm0 1397 000001C4 4E dec si 1398 000001C5 BA[706A] mov dx, msg.keep 1399 000001C8 E8DCB6 call isstring? 1400 000001CB 7503E98F00 je .done_serial 1401 1402 000001D0 BA[3D6A] mov dx, msg.serial_no_keep_enter 1403 .no_keep: 1404 000001D3 8026[7D00]BF clropt [options], enable_serial 1405 000001D8 E8E1BB call putsz 1406 000001DB E922FE jmp cmd3 1407 1408 1409 .timer: 1410 000001DE 50 push ax 1411 000001DF 52 push dx 1412 000001E0 51 push cx 1413 000001E1 06 push es 1414 1415 000001E2 BA4000 mov dx, 40h 1416 000001E5 8EC2 mov es, dx 1417 1418 000001E7 8B0E[000C] mov cx, word [getline_timer_count] 1419 000001EB 8B16[020C] mov dx, word [getline_timer_last] 1420 1421 000001EF 263B166C00 cmp dx, word [es:6Ch] 1422 000001F4 741A je .timer_next 1423 000001F6 268B166C00 mov dx, word [es:6Ch] 1424 000001FB 41 inc cx 1425 000001FC B012 mov al, 18 1426 000001FE F626[E90B] mul byte [serial_keep_timeout] 1427 00000202 85C0 test ax, ax 1428 00000204 740A jz .timer_next 1429 00000206 39C1 cmp cx, ax 1430 00000208 7206 jb .timer_next 1431 1432 0000020A 07 pop es 1433 0000020B BA[F069] mov dx, msg.serial_no_keep_timer 1434 0000020E EBC3 jmp .no_keep 1435 1436 .timer_next: 1437 00000210 890E[000C] mov word [getline_timer_count], cx 1438 00000214 8916[020C] mov word [getline_timer_last], dx 1439 00000218 07 pop es 1440 00000219 59 pop cx 1441 0000021A 5A pop dx 1442 0000021B 58 pop ax 1443 0000021C C3 retn 1444 1445 1446 .check_disable_serial: 1447 ; If serial is initialised, uninstall it. 1448 0000021D F606[EB0B]01 testopt [serial_flags], sf_init_done 1449 00000222 751D jnz .disable_serial 1450 ; Not initialised. Is the interrupt still hooked? 1451 00000224 F606[A800]01 testopt [internalflags4], dif4_int_serial_hooked 1452 00000229 7434 jz .done_serial 1453 ; Try unhooking the interrupt handler. 1454 0000022B E8FCCD call serial_uninstall_interrupt_handler 1455 0000022E 722F jc .done_serial ; if it failed again --> 1456 00000230 BF[8A6B] mov di, msg.serial_late_unhook.int 1457 00000233 A0[120C] mov al, byte [serial_installed_intnum] 1458 00000236 E8D4B7 call hexbyte 1459 00000239 BA[696B] mov dx, msg.serial_late_unhook 1460 0000023C E87DBB call putsz 1461 0000023F EB1E jmp .done_serial 1462 1463 .disable_serial: 1464 1465 00000241 E89BCD call serial_clean_up 1466 00000244 7314 jnc @F 1467 00000246 BF[186B] mov di, msg.serial_cannot_unhook.int 1468 00000249 A0[120C] mov al, byte [serial_installed_intnum] 1469 0000024C E8BEB7 call hexbyte 1470 0000024F BA[F46A] mov dx, msg.serial_cannot_unhook 1471 00000252 E867BB call putsz 1472 00000255 C606[E095]00 mov byte [serial_interrupt_handler + ieEOI], 0 1473 ; we do not issue EOI any longer 1474 @@: 1475 0000025A 8026[EB0B]FE clropt [serial_flags], sf_init_done 1476 .done_serial: 1477 1478 0000025F E89FD1 call ensuredebuggeeloaded ; if no task is active, create a dummy one 1479 1480 cmd3_continue_1_re: 1481 00000262 BF[0E08] mov di, line_out ; build prompt 1482 %if _DEBUG 1483 mov al, '~' ; indicate instance is to be debugged 1484 stosb 1485 %endif 1486 %if _INDOS_PROMPT 1487 00000265 E842A4 call InDos 1488 00000268 740F jz @F 1489 %if _BOOTLDR 1490 0000026A F606[9D00]40 testopt [internalflags], nodosloaded 1491 ; boot mode ? 1492 %if _INDOS_PROMPT_NOBOOT 1493 0000026F 7508 jnz @F ; yes, do not show special prompt --> 1494 %elif _INDOS_PROMPT_NOFLAG 1495 jnz .indos_prompt ; yes, show special prompt --> 1496 ; (do not call .real_indos check) 1497 %endif 1498 %endif 1499 %if _INDOS_PROMPT_NOFLAG 1500 00000271 E844A4 call InDos.real_indos ; real InDOS set ? 1501 00000274 7403 jz @F ; no, do not show special prompt --> 1502 %endif 1503 .indos_prompt: 1504 00000276 B021 mov al, '!' 1505 00000278 AA stosb 1506 @@: 1507 %endif 1508 00000279 B02D mov al, '-' ; main prompt 1509 %if _PM 1510 0000027B E84B8F call ispm 1511 0000027E 7502 jnz .realmode 1512 00000280 B023 mov al, '#' ; PM main prompt 1513 .realmode: 1514 %endif 1515 00000282 F606[A700]01 testopt [internalflags3], dif3_input_re 1516 00000287 7402 jz @F 1517 00000289 B025 mov al, '%' 1518 @@: 1519 0000028B AA stosb 1520 1521 0000028C C606[AC95]00 mov byte [hhflag], 0 1522 00000291 8326[A895]00 and word [hh_depth], 0 1523 00000296 8326[AA95]00 and word [hh_depth_of_single_term], 0 1524 0000029B C706[040C][E003] mov word [getline_timer_func], dmycmd 1525 000002A1 8026[9E00]FE clropt [internalflags], usecharcounter ; reset this automatically 1526 1527 000002A6 F606[A700]01 testopt [internalflags3], dif3_input_re 1528 000002AB 7515 jnz cmd3_continue_2_re 1529 1530 000002AD 800E[9C00]08 setopt [internalflags], pagedcommand ; 2009-02-21: default to page all commands 1531 000002B2 8026[9F00]CF clropt [internalflags], tt_silence | tt_silent_mode 1532 ; reset, in case it's still set 1533 000002B7 8126[A000]3FF7 clropt [internalflags2], dif2_tpg_proceed_bp_set | dif2_bp_failure | dif2_tpg_keep_proceed_bp, 1 1535 %if _INPUT_FILE_HANDLES 1536 000002BD 8026[A200]DF clropt [internalflags2], dif2_closed_input_file 1537 %endif 1538 1539 cmd3_continue_2_re: 1540 000002C2 E8C001 call determine_quiet_output 1541 1542 000002C5 31C9 xor cx, cx 1543 000002C7 870E[F00A] xchg cx, word [rc] ; reset rc 1544 000002CB 890E[F20A] mov word [priorrc], cx ; make prior value available 1545 000002CF E304 jcxz @F 1546 000002D1 890E[F40A] mov word [erc], cx ; update to last non-zero value 1547 @@: 1548 1549 000002D5 F606[A700]01 testopt [internalflags3], dif3_input_re 1550 000002DA 7431 jz cmd3_continue_not_re 1551 1552 000002DC 8306[E809]01 add word [re_count], 1 1553 000002E1 8316[EA09]00 adc word [re_count + 2], 0 1554 000002E6 8B16[EE09] mov dx, word [re_limit + 2] 1555 000002EA A1[EC09] mov ax, word [re_limit] 1556 000002ED 3916[EA09] cmp word [re_count + 2], dx 1557 000002F1 7504 jne @F 1558 000002F3 3906[E809] cmp word [re_count], ax 1559 @@: 1560 000002F7 7614 jbe cmd3_continue_not_re 1561 1562 000002F9 BA[BE68] mov dx, msg.re_limit_reached 1563 000002FC E8B7BA call putsz_error 1564 000002FF B80401 mov ax, 0104h 1565 00000302 E820A2 call setrc 1566 00000305 800E[A500]04 setopt [internalflags3], dif3_at_line_end 1567 0000030A E931C1 jmp getline_close_file 1568 1569 cmd3_continue_not_re: 1570 1571 cmd3_check_line_out_overflow: 1572 0000030D 813E[1609]4226 cmp word [line_out_overflow], 2642h 1573 00000313 740C je @F 1574 00000315 C706[1609]4226 mov word [line_out_overflow], 2642h 1575 0000031B BA[916B] mov dx, msg.line_out_overflow 1576 0000031E E895BA call putsz_error 1577 @@: 1578 1579 cmd3_getline: 1580 00000321 E84DBE call getline00 ; prompted input, also resets linecounter 1581 1582 00000324 E8E3B5 call iseol?.notsemicolon 1583 00000327 7518 jne cmd3_notblank 1584 00000329 F606[8700]10 testopt [options3], opt3_disable_autorepeat 1585 0000032E 7508 jnz @F 1586 00000330 8B16[DA0B] mov dx, word [lastcmd] 1587 00000334 8804 mov byte [si], al 1588 00000336 EB35 jmp short cmd4 1589 1590 @@: 1591 00000338 C706[DA0B][E003] mov word [lastcmd], dmycmd 1592 0000033E E9BFFC jmp cmd3 1593 1594 cmd3_notblank: 1595 00000341 C706[DA0B][E003] mov word [lastcmd], dmycmd 1596 00000347 3C3B cmp al, ';' 1597 00000349 7427 je cmd3_j1 ; if comment --> 1598 0000034B 3C3A cmp al, ':' 1599 0000034D 7423 je cmd3_j1 ; if jump label --> 1600 0000034F 3C3F cmp al, '?' 1601 00000351 7503E98B00 je help ; if request for help --> 1602 00000356 E8B688 call uppercase 1603 00000359 2C41 sub al, 'A' 1604 0000035B 3C18 cmp al, 'Y'-'A' 1605 0000035D 7603E97CA1 ja error ; if not recognized 1606 00000362 98 cbw 1607 00000363 93 xchg bx, ax 1608 00000364 E8C5B5 call skipcomma 1609 00000367 D1E3 shl bx, 1 1610 00000369 8B97[4A00] mov dx, word [ cmdlist+bx ] 1611 cmd4: 1612 0000036D BF[0E08] mov di, line_out 1613 00000370 FFD2 call dx 1614 cmd3_j1: 1615 00000372 E98BFC jmp cmd3 ; back to the top 1616 1617 1618 code_insure_low_byte_not_0CCh 1619 cmd2_reset_re_maybe_pm: 1620 1621 00000375 66 _386_o32 ; mov esp 1622 00000376 8B26[940A] mov sp, word [ savesp ] ; restore stack 1623 0000037A 83E4FC _386 and sp, ~3 ; align stack 1624 0000037D 66 _386_o32 1625 0000037E 31C0 xor ax, ax 1626 00000380 66 _386_o32 1627 00000381 50 push ax 1628 00000382 66 _386_o32 1629 00000383 9D popf 1630 00000384 8B26[940A] _386 mov sp, word [ savesp ] ; restore stack 1631 00000388 FC cld 1632 00000389 FB sti 1633 1634 %if _PM 1635 0000038A E89B40 call handle_mode_changed 1636 %endif 1637 1638 code_insure_low_byte_not_0CCh 1639 cmd2_reset_re: 1640 0000038D 8B1E[FC0B] mov bx, word [io_levels] 1641 .entry_bx_levels: 1642 00000391 31C9 xor cx, cx 1643 .entry_bx_levels_cx_cmdline: 1644 00000393 31D2 xor dx, dx 1645 %if _INPUT_FILE_HANDLES 1646 00000395 F606[A200]10 testopt [internalflags2], dif2_input_file 1647 0000039A 7405 jz @F 1648 0000039C 030E[800A] add cx, word [input_file_handles.active] 1649 000003A0 41 inc cx 1650 @@: 1651 %endif 1652 %if _INPUT_FILE_BOOT 1653 000003A1 F606[A300]02 testopt [internalflags2], dif2_input_file_boot 1654 000003A6 7405 jz @F 1655 000003A8 030E[B08F] add cx, word [load_input_file.active] 1656 000003AC 41 inc cx 1657 @@: 1658 %endif 1659 000003AD F606[A700]01 testopt [internalflags3], dif3_input_re 1660 000003B2 740D jz @F 1661 000003B4 41 inc cx 1662 000003B5 42 inc dx 1663 000003B6 F606[FE0B]01 testopt [io_flags], iof_extra_iol_for_tpg_re 1664 000003BB 7404 jz @F 1665 000003BD 43 inc bx 1666 000003BE 7501 jnz @F 1667 000003C0 4B dec bx 1668 @@: 1669 000003C1 39D9 cmp cx, bx 1670 000003C3 7602 jbe @F 1671 000003C5 89D9 mov cx, bx 1672 @@: 1673 000003C7 E3A9 jcxz cmd3_j1 1674 000003C9 1E push ds 1675 000003CA 07 pop es 1676 @@: 1677 000003CB 51 push cx 1678 000003CC 52 push dx 1679 000003CD E8BCC0 call getline_close_file.resetstuff 1680 000003D0 5A pop dx 1681 000003D1 59 pop cx 1682 000003D2 E2F7 loop @B 1683 000003D4 85D2 test dx, dx 1684 000003D6 749A jz cmd3_j1 1685 000003D8 800E[8100]80 setopt [options2], opt2_re_cancel_tpg 1686 000003DD E94323 jmp dumpregs_extended.exit 1687 1688 1689 dmycmd: 1690 000003E0 C3 retn 1691 1692 help: 1693 000003E1 E848B5 call skipcomma 1694 000003E4 E82888 call uppercase 1695 %if _EXTHELP 1696 %if _COND 1697 000003E7 BA[CD30] mov dx, msg.condhelp 1698 000003EA 3C43 cmp al, 'C' 1699 000003EC 747B je .spec 1700 %endif 1701 %if _OPTIONS 1702 000003EE BA[A93C] mov dx, msg.ophelp 1703 000003F1 3C4F cmp al, 'O' 1704 000003F3 7474 je .spec ; option help --> 1705 %endif 1706 %if _EXPRESSIONS 1707 000003F5 BA[9D33] mov dx, msg.expressionhelp 1708 000003F8 3C45 cmp al, 'E' 1709 000003FA 746D je .spec 1710 %endif 1711 %endif 1712 %if _EMS 1713 000003FC BA[F75D] mov dx, msg.xhelp 1714 000003FF 3C58 cmp al, 'X' 1715 00000401 7466 je .spec 1716 %endif 1717 00000403 4E dec si 1718 %if _BOOTLDR && _EXTHELP 1719 00000404 BA[9C63] mov dx, msg.boot 1720 00000407 E89DB4 call isstring? 1721 0000040A BA[1052] mov dx, msg.boothelp 1722 0000040D 745A je .spec 1723 %endif 1724 %if _EXTHELP 1725 0000040F BA[161A] mov dx, msg.source 1726 00000412 E892B4 call isstring? 1727 00000415 BA[1D1A] mov dx, msg.help_source 1728 00000418 744F je .spec 1729 %endif 1730 0000041A BA[791B] mov dx, msg.re 1731 0000041D E887B4 call isstring? 1732 00000420 BA[7C1B] mov dx, msg.help_re 1733 00000423 7444 je .spec 1734 00000425 BA[E520] mov dx, msg.run 1735 00000428 E87CB4 call isstring? 1736 0000042B BA[E920] mov dx, msg.help_run 1737 0000042E 7439 je .spec 1738 00000430 BA[B824] mov dx, msg.string_build 1739 00000433 E871B4 call isstring? 1740 00000436 BB[AC24] mov bx, msg.build_array 1741 00000439 B90500 mov cx, msg.build_short_amount 1742 0000043C 7438 je .spec_multi 1743 0000043E AC lodsb 1744 0000043F E8CD87 call uppercase 1745 00000442 B90600 mov cx, msg.build_long_amount 1746 00000445 3C42 cmp al, 'B' 1747 00000447 742D je .spec_multi ; build info --> 1748 %if _EXTHELP 1749 00000449 BA[8929] mov dx, msg.license 1750 0000044C 3C4C cmp al, 'L' 1751 0000044E 7419 je .spec ; licence --> 1752 00000450 BA[2E2E] mov dx, msg.flaghelp 1753 00000453 3C46 cmp al, 'F' 1754 00000455 7412 je .spec ; flag help --> 1755 00000457 BA[5B2C] mov dx, msg.reghelp 1756 0000045A 3C52 cmp al, 'R' 1757 0000045C 740B je .spec ; register help --> 1758 %if _VARIABLES || _OPTIONS || _PSPVARIABLES 1759 0000045E BA[654F] mov dx, msg.varhelp 1760 00000461 3C56 cmp al, 'V' 1761 00000463 7404 je .spec ; variable help --> 1762 %endif 1763 %endif 1764 00000465 BA[3211] mov dx, msg.help ; default help 1765 00000468 A8 db __TEST_IMM8 ; (skip lodsb) 1766 .spec: 1767 00000469 AC lodsb 1768 0000046A E8AEB4 call chkeol 1769 prnquit: 1770 0000046D E84CB9 call putsz ; print string 1771 cmd3_j1a: 1772 00000470 E9FFFE jmp cmd3_j1 ; done 1773 1774 00000473 E968A0 errorj1:jmp error 1775 1776 help.spec_multi: 1777 00000476 AC lodsb 1778 00000477 E8A1B4 call chkeol 1779 .loop: 1780 0000047A 8B17 mov dx, word [bx] 1781 0000047C E83DB9 call putsz 1782 0000047F 43 inc bx 1783 00000480 43 inc bx 1784 00000481 E2F7 loop .loop 1785 00000483 EBEB jmp short cmd3_j1a 1786 1787 1788 determine_quiet_output: 1789 00000485 8026[A500]EF clropt [internalflags3], dif3_quiet_output 1790 1791 0000048A 57 push di 1792 0000048B 50 push ax 1793 0000048C F606[A700]01 testopt [internalflags3], dif3_input_re 1794 00000491 7549 jnz .notquiet 1795 1796 %if _INPUT_FILE_BOOT 1797 00000493 F606[A300]02 testopt [internalflags2], dif2_input_file_boot 1798 00000498 7412 jz @F 1799 0000049A B8A000 mov ax, LOAD_INPUT_FILE_SIZE 1800 0000049D 52 push dx 1801 0000049E F726[B08F] mul word [load_input_file.active] 1802 000004A2 5A pop dx 1803 000004A3 89C7 mov di, ax 1804 000004A5 F685[578D]80 testopt [load_input_file + di - LOADDATA3 + ldFATType], ifhfQuietOutput 1805 000004AA EB29 jmp .quiet_if_nz 1806 1807 @@: 1808 %endif 1809 %if _INPUT_FILE_HANDLES 1810 000004AC E8FBA1 call InDos 1811 000004AF 7518 jnz @F 1812 1813 000004B1 F606[A200]10 testopt [internalflags2], dif2_input_file 1814 000004B6 7411 jz @F 1815 000004B8 8B3E[800A] mov di, word [input_file_handles.active] 1816 000004BC D1E7 shl di, 1 1817 000004BE D1E7 shl di, 1 1818 000004C0 D1E7 shl di, 1 ; to qword array index 1819 %if INPUTFILEHANDLE_size != 8 1820 %error Unexpected structure size 1821 %endif 1822 000004C2 F685[030A]80 testopt [input_file_handles + di + ifhFlags], ifhfQuietOutput 1823 000004C7 EB0C jmp .quiet_if_nz 1824 1825 @@: 1826 %endif 1827 000004C9 F606[A500]01 testopt [internalflags3], dif3_input_cmdline 1828 000004CE 740C jz @F 1829 000004D0 F606[7F00]80 testopt [options], opt_cmdline_quiet_output 1830 ; jmp .quiet_if_nz 1831 1832 .quiet_if_nz: 1833 000004D5 7405 jz @F 1834 .quiet: 1835 000004D7 800E[A500]10 setopt [internalflags3], dif3_quiet_output 1836 .notquiet: 1837 @@: 1838 000004DC 58 pop ax 1839 000004DD 5F pop di 1840 000004DE C3 retn 1841 1842 1843 guard_auxbuff: 1844 000004DF F606[A700]30 testopt [internalflags3], dif3_auxbuff_guarded_1 | dif3_auxbuff_guarded_2 1845 000004E4 7506 jnz @F 1846 000004E6 800E[A700]10 setopt [internalflags3], dif3_auxbuff_guarded_1 1847 000004EB C3 retn 1848 1849 @@: 1850 000004EC B80101 mov ax, 0101h 1851 000004EF E833A0 call setrc 1852 000004F2 BA[2166] mov dx, msg.guard_auxbuff_error 1853 .putsz_error: 1854 000004F5 E8C4B8 call putsz 1855 000004F8 E905FB jmp cmd3 1856 1857 1858 ; This is used to disallow commands 1859 ; while reading from the RE buffer. 1860 guard_re: 1861 000004FB F606[A700]01 testopt [internalflags3], dif3_input_re 1862 00000500 7501 jnz @F 1863 00000502 C3 retn 1864 1865 @@: 1866 00000503 B80201 mov ax, 0102h 1867 00000506 E81CA0 call setrc 1868 00000509 BA[4366] mov dx, msg.guard_re_error 1869 0000050C EBE7 jmp guard_auxbuff.putsz_error 1870 1871 1872 usesection lDEBUG_DATA_ENTRY 1873 1874 align 2, db 0 1875 00008116 0000 debuggerfunction: dw 0 1876 1877 %if ! _CATCHINT2D 1878 align 2, db 0 1879 debuggeramissig: 1880 .ven: fill 8,32,db "ecm" ; vendor 1881 .prod: fill 8,32,db "lDebug" ; product 1882 db 0, 0 1883 1884 try_debugger_amis_multiplex_number: 1885 db -1 1886 %else 1887 %if 0 1888 1889 Supported Int2D functions: 1890 1891 AMIS - Installation check 1892 INP: al = 00h 1893 OUT: al = 0FFh 1894 cx = Private version number (currently 0100h) 1895 dx:di-> signature: "ecm ", "lDebug " 1896 1897 AMIS - Get private entry point - NOP: no private entry point 1898 INP: al = 01h 1899 OUT: al = 00h 1900 1901 AMIS - Uninstall - NOP: can't uninstall 1902 INP: al = 02h 1903 OUT: al = 00h (not implemented) 1904 1905 AMIS - Request pop-up - NOP: no pop-up 1906 INP: al = 03h 1907 OUT: al = 00h 1908 1909 AMIS - Determine chained interrupts 1910 INP: al = 04h 1911 OUT: al = 04h 1912 dx:bx -> interrupt hook list (Int2D always.) 1913 1914 AMIS - Get hotkeys - NOP: no hotkeys 1915 INP: al = 05h 1916 OUT: al = 00h 1917 1918 AMIS - Get device driver information - NOP: no device 1919 INP: al = 06h 1920 OUT: al = 00h 1921 1922 AMIS - Reserved for AMIS 1923 INP: al = 07h..0Fh 1924 OUT: al = 00h 1925 1926 TSR - Reserved for TSR 1927 INP: al = 10h..2Fh 1928 OUT: al = 00h 1929 1930 lDebug - Update IISP Header 1931 INP: al = 30h 1932 ds:si -> source IISP header (or pseudo header) 1933 es:di -> destination IISP header 1934 OUT: al = FFh to indicate suppported, 1935 si and di both incremented by 6 1936 destination's ieNext field updated from source 1937 al != FFh if not supported, 1938 si and di unchanged 1939 CHG: - 1940 REM: This function is intended to aid in debugging 1941 handler re-ordering, removal, or insertion. 1942 The 32-bit far pointer needs to be updated 1943 as atomically as possible to avoid using 1944 an incorrect pointer. 1945 Test case: Run a program such as our TSRs' 1946 uninstaller or SHUFHOOK and step through it 1947 with "tp fffff" when operating on something 1948 crucial such as interrupt 21h. Without this 1949 function the machine will crash! 1950 To enable this function to be called, enter 1951 the command "r dco4 or= 8" first (install our 1952 AMIS multiplexer handler). 1953 Other workaround: Use SILENT for TP and disable 1954 DCO3 flag 4000_0000 (do not call int 21.0B to 1955 check for Ctrl-C status). 1956 Yet another workaround: Set flag DCO 8 (enable 1957 fake InDOS mode, avoid calling int 21h). 1958 REM: The source may be a pseudo IISP header. In this 1959 case the ieEntry field should hold 0FEEBh 1960 (jmp short $) and the ieSignature field 1961 should indicate the source, eg "VT" for the IVT 1962 or "NH" for inserting a New Handler. 1963 1964 TSR - Reserved for TSR 1965 INP: al = 31h..FFh 1966 OUT: al = 00h 1967 1968 %endif 1969 1970 align 2, db 0 1971 debuggeramissig: 1972 amissig: 1973 00008118 65636D20 .ven: fill 8,32,db "ecm" ; vendor 1974 00008120 6C446562756720- .prod: fill 8,32,db "lDebug" ; product 1974 00008120 1975 00008128 6C4465627567582028- .desc: asciz _PROGNAME,_VERSION,", debugger." 1975 00008131 323032322D30342D32- 1975 0000813A 31292C206465627567- 1975 00008143 6765722E00 1976 ; description 1977 %if $ - .desc > 64 1978 %error AMIS description too long 1979 %endif 1980 1981 try_amis_multiplex_number: 1982 00008148 00 db 0 1983 try_debugger_amis_multiplex_number: 1984 00008149 FF db -1 1985 1986 1987 0000814A CB90EB10000000004B- iispentry int2D 1987 00008153 4200EBF300 1988 0000815E 80FC00 cmp ah, 0 1989 amis_multiplex_number equ $-1 ; AMIS multiplex number (data for cmp opcode) 1990 00008161 7405 je .handle ; our multiplex number --> 1991 00008163 2EFF2E[4E81] jmp far [cs:.next] ; else go to next handler --> 1992 1993 .handle: 1994 00008168 84C0 test al, al 1995 0000816A 740B jz .installationcheck ; installation check --> 1996 ; cmp al, 02h 1997 ; je .uninstall ; uninstallation --> 1998 0000816C 3C04 cmp al, 04h 1999 0000816E 7412 je .determineinterrupts ; determine hooked interrupts --> 2000 00008170 3C30 cmp al, 30h 2001 00008172 7415 je .updateiispheader 2002 ; all other functions are reserved or not supported by TSR 2003 .uninstall: 2004 .nop: 2005 00008174 B000 mov al, 0 ; show not implemented 2006 00008176 CF iret 2007 2008 .installationcheck: 2009 00008177 FEC8 dec al ; (= FFh) show we're here 2010 00008179 B90001 mov cx, 0100h ; = version 2011 0000817C BF[1881] mov di, amissig ; dx:di -> AMIS signature strings of this program 2012 .iret_dx_cs: 2013 0000817F 8CCA mov dx, cs 2014 .iret: 2015 00008181 CF iret 2016 2017 .determineinterrupts: ; al = 04h, always returns list 2018 00008182 2E8B1E[260C] mov bx, word [cs:amisintr_offset] 2019 ; dx:bx -> hooked interrupts list 2020 00008187 EBF6 jmp short .iret_dx_cs 2021 2022 .updateiispheader: 2023 00008189 B0FF mov al, 0FFh ; show supported 2024 0000818B FC cld 2025 0000818C FA cli ; try to rest while updating chain 2026 0000818D A7 cmpsw ; skip over first word (entrypoint) 2027 ; (generally xxEBh or 0EA90h) 2028 0000818E A5 movsw 2029 0000818F A5 movsw ; transfer source ieNext to dest ieNext 2030 00008190 CF iret 2031 %endif 2032 2033 2034 ; doscall is used by symbols.asm and run.asm, so define it prior 2035 %if _PM && _NOEXTENDER 2036 %macro doscall 0 2037 call _doscall 2038 %endmacro 2039 %else 2040 ; When we don't support non-extended DPMI all Int21 calls 2041 ; are either in Real Mode or extended (all are real Int21 2042 ; instructions). 2043 %macro doscall 0 2044 int 21h 2045 %endmacro 2046 %endif 2047 2048 2049 usesection lDEBUG_CODE 2050 2051 %if _DEBUG4 || _DEBUG5 2052 %define _DEB_ASM_PREFIX 2053 %include "deb.asm" 2054 %endif 2055 2056 2057 %include "aa.asm" 2058 <1> 2059 <1> %if 0 2060 <1> 2061 <1> lDebug A command - Assembler 2062 <1> 2063 <1> Copyright (C) 1995-2003 Paul Vojta 2064 <1> Copyright (C) 2008-2012 C. Masloch 2065 <1> 2066 <1> Usage of the works is permitted provided that this 2067 <1> instrument is retained with the works, so that any entity 2068 <1> that uses the works is notified of this instrument. 2069 <1> 2070 <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 2071 <1> 2072 <1> %endif 2073 <1> 2074 <1> 2075 <1> usesection lDEBUG_DATA_ENTRY 2076 <1> 2077 00008191 00 <1> align 2, db 0 2078 00008192 0000 <1> aa13a_mnemposition: dw 0 ; -> mnemonic, to display error 2079 00008194 00 <1> aa_mnemsuffix: db 0 ; 0 = normal, 1 = 'W' suffix, 2 = 'D' suffix 2080 <1> 2081 00008195 00 <1> asm_mn_flags: db 0 ; flags for the mnemonic 2082 <1> AMF_D32 equ 1 ; 32-bit opcode/data operand 2083 <1> AMF_WAIT equ 2 2084 <1> AMF_A32 equ 4 ; address operand is 32-bit 2085 <1> AMF_SIB equ 8 ; there's a SIB in the arguments 2086 <1> AMF_MSEG equ 10h ; if a seg prefix was given before mnemonic 2087 <1> AMF_FSGS equ 20h ; if FS or GS was encountered 2088 <1> AMF_D16 equ 40h ; 16-bit opcode/data operand 2089 <1> AMF_ADDR equ 80h ; address operand is given (write address size prefix) 2090 <1> 2091 00008196 00 <1> aa_saved_prefix:db 0 ; WAIT or REP... prefix 2092 <1> ; aa_saved_prefix and aa_seg_pre must be consecutive. 2093 00008197 00 <1> aa_seg_pre: db 0 ; segment prefix 2094 <1> 2095 <1> align 2, db 0 2096 00008198 0000 <1> mneminfo: dw 0 ; address associated with the mnemonic 2097 <1> 2098 <1> ; The following 7 words (including alloweddist) must all be consecutive. 2099 0000819A 0000 <1> rmaddr: dw 0 ; address of operand giving the R/M byte 2100 <1> ; regmem and sibbyte must be consecutive 2101 0000819C 00 <1> regmem: db 0 ; mod reg r/m part of instruction 2102 0000819D 00 <1> sibbyte: db 0 ; SIB byte 2103 0000819E 0000 <1> immaddr: dw 0 ; address of operand giving the immed stf 2104 000081A0 0000 <1> xxaddr: dw 0 ; address of additional stuff 2105 <1> ; dismach and dmflags must be consecutive 2106 000081A2 00 <1> dismach: db 0 ; type of processor needed 2107 000081A3 00 <1> dmflags: db 0 ; flags for extra processor features 2108 <1> 2109 <1> DM_COPR equ 1 ; math coprocessor 2110 <1> DM_MMX equ 2 ; MMX extensions 2111 <1> 2112 000081A4 00 <1> opcode_or: db 0 ; extra bits in the op code 2113 000081A5 00 <1> opsize: db 0 ; size of this operation (2 or 4) 2114 000081A6 00 <1> varflags: db 0 ; flags for this variant 2115 <1> 2116 <1> VAR_LOCKABLE equ 1 ; variant is lockable 2117 <1> VAR_MODRM equ 2 ; if there's a MOD R/M here 2118 <1> VAR_SIZ_GIVN equ 4 ; if a size was given 2119 <1> VAR_SIZ_FORCD equ 8 ; if only one size is permitted 2120 <1> VAR_SIZ_NEED equ 10h ; if we need the size 2121 <1> VAR_D16 equ 20h ; if operand size is WORD 2122 <1> VAR_D32 equ 40h ; if operand size is DWORD 2123 000081A7 00 <1> alloweddist: db 0 2124 <1> 2125 000081A8 00 <1> a_reqsize: db 0 ; size that this arg should be 2126 000081A9 00 <1> align 2, db 0 2127 000081AA 0000 <1> a_opcode: dw 0 ; op code info for this variant 2128 <1> 2129 <1> align 2, db 0 2130 000081AC 0000 <1> a_opcode2: dw 0 ; copy of a_opcode for obs-instruction 2131 000081AE E0DBE1DBE4DB240126- <1> a_obstab: dw 0DBE0h,0DBE1h,0DBE4h,124h,126h ; obs. instruction codes 2131 000081B7 01 <1> 2132 000081B8 0101020404 <1> obsmach: db 1,1,2,4,4 ; max permissible machine for the above 2133 <1> ; This is used to search for obsolete instructions: 2134 <1> ; DBE0h: feni 2135 <1> ; DBE1h: fdisi 2136 <1> ; DBE4h: fsetpm 2137 <1> ; 124h: mov trX, reg 2138 <1> ; 126h: mov reg, trX 2139 <1> 2140 000081BD 00040201 <1> aadbsiz: db 0,4,2,1 ; table for max size of db operand 2141 000081C1 00 <1> align 2, db 0 2142 000081C2 0000[EB07][ED07]- <1> aadbsto: dw 0,aa28,aa29,aa30 ; table for routine to store a number 2142 000081C8 [EF07] <1> 2143 <1> 2144 <1> align 2, db 0 ; (modrmtab really is an array of words) 2145 000081CA 0B000D00 <1> modrmtab: db REG_BX,0,REG_BP,0 ; [bx], [bp] 2146 000081CE 0F000E00 <1> db REG_DI,0,REG_SI,0 ; [di], [si] 2147 000081D2 0F0D0E0D <1> db REG_DI,REG_BP,REG_SI,REG_BP ; [bp+di],[bp+si] 2148 000081D6 0F0B0E0B <1> db REG_DI,REG_BX,REG_SI,REG_BX ; [bx+di],[bx+si] 2149 <1> 2150 000081DA 610D <1> aam_args: db 'a',13 2151 <1> 2152 <1> ; Equates for parsed arguments, stored in OPRND.flags 2153 <1> ARG_DEREF equ 1 ; non-immediate memory reference 2154 <1> ARG_MODRM equ 2 ; if we've computed the MOD R/M byte 2155 <1> ARG_JUSTREG equ 4 ; a solo register 2156 <1> ARG_WEIRDREG equ 8 ; if it's a segment register or CR, etc. 2157 <1> ARG_IMMED equ 10h ; if it's just a number 2158 <1> ARG_FARADDR equ 20h ; if it's of the form xxxx:yyyyyyyy 2159 <1> ARG_ECX_SPECIAL equ 80h ; have to overflow loop displacement 2160 <1> 2161 <1> ; For each operand type in the following table, the value 2162 <1> ; is the bits at least one of which must be present. 2163 <1> ; For each entry in bittab, there's an entry in asmjmp. 2164 <1> ; Entries are defined in the debug.asm opsizeditem list. 2165 <1> bittab: 2166 000081DC 1005010401040404 <1> db BITTAB_OPSIZEDITEMS 2167 000081E4 00 <1> times 16 - ($ - bittab) db 0 ; unused OP_SIZE combined types 2168 <1> 2169 <1> ; OP_END does not have a table entry. Subsequent 2170 <1> ; entries are defined in the debug.asm opitem list. 2171 000081EC 010101010120101008- <1> db BITTAB_OPITEMS 2171 000081F5 080808080810101010- <1> 2171 000081FE 0808FFFFFFFFFFFFFF- <1> 2171 00008207 FFFFFFFFFFFF041010- <1> 2171 00008210 040408080808080808 <1> 2172 <1> %if ($ - bittab) != OP_AMOUNT_TABLE 2173 <1> %error bittab has wrong size 2174 <1> %endif 2175 <1> 2176 <1> ; Jump table for operand types. 2177 <1> ; Entries are defined in the debug.asm opsizeditem list. 2178 00008219 00 <1> align 2, db 0 2179 <1> asmjmp: 2180 0000821A [FE0D][E00D][E00D]- <1> dw ASMJMP_OPSIZEDITEMS 2180 00008220 [E00D][040E][E50D]- <1> 2180 00008226 [F40D][0F0E] <1> 2181 0000822A [3911] <1> times 16 - (($ - asmjmp) / 2) dw ao50 ; unused size-combined types (reject) 2182 <1> 2183 <1> ; OP_END does not have a table entry. Subsequent 2184 <1> ; entries are defined in the debug.asm opitem list. 2185 0000823A [A90E][A90E][A90E]- <1> dw ASMJMP_OPITEMS 2185 00008240 [A90E][A90E][B30E]- <1> 2185 00008246 [F70E][6F0F][DD0F]- <1> 2185 0000824C [E10F][F60F][1210]- <1> 2185 00008252 [1610][4010][5710]- <1> 2185 00008258 [5C10][6510][6510]- <1> 2185 0000825E [E80F][EC0F][CD10]- <1> 2185 00008264 [0511][0D11][1711]- <1> 2185 0000826A [1111][0111][0111]- <1> 2185 00008270 [0111][0111][0111]- <1> 2185 00008276 [260C][260C][260C]- <1> 2185 0000827C [8910][1B11][2211]- <1> 2185 00008282 [2F11][2F11][2F11]- <1> 2185 00008288 [2F11][2F11][2F11]- <1> 2185 0000828E [2F11][2F11][2F11] <1> 2186 <1> %if ($ - asmjmp) / 2 != OP_AMOUNT_TABLE 2187 <1> %error asmjmp has wrong size 2188 <1> %endif 2189 <1> 2190 <1> ; special ops DX, CL, ST, CS, DS, ES, FS, GS, SS 2191 <1> ; entry required if ao48 is used in the opitem list 2192 <1> ; order has to match opitem order 2193 <1> ; refer to aagetreg comment for the number assignments 2194 00008294 0A011E <1> asm_regnum: db REG_DX, REG_CL, REG_ST 2195 00008297 191B181C1D1A <1> db REG_CS, REG_DS, REG_ES, REG_FS, REG_GS, REG_SS 2196 <1> 2197 <1> ; sizes for OP_M64, OP_MFLOAT, OP_MDOUBLE, OP_M80, OP_MXX 2198 <1> ; entry required if ao17 is used in the opitem list 2199 <1> ; order has to match opitem order 2200 0000829D 05060708 <1> asm_siznum: db SIZ_QWORD, SIZ_FLOAT, SIZ_DOUBLE, SIZ_TBYTE 2201 000082A1 FF <1> db -1 ; none 2202 <1> 2203 <1> ; size qualifier 2204 <1> ; 1 BY = BYTE 2205 <1> ; 2 WO = WORD 2206 <1> ; 3 unused 2207 <1> ; 4 DW = DWORD 2208 <1> ; 5 QW = QWORD 2209 <1> ; 6 FL = FLOAT (REAL4) 2210 <1> ; 7 DO = DOUBLE (REAL8) 2211 <1> ; 8 TB = TBYTE (REAL10) 2212 <1> 2213 <1> SIZ_NONE equ 0 2214 <1> SIZ_BYTE equ 1 2215 <1> SIZ_WORD equ 2 2216 <1> SIZ_DWORD equ 4 2217 <1> SIZ_QWORD equ 5 2218 <1> SIZ_FLOAT equ 6 2219 <1> SIZ_DOUBLE equ 7 2220 <1> SIZ_TBYTE equ 8 2221 <1> 2222 <1> align 2, db 0 2223 000082A2 4259574F574F445751- <1> sizetcnam: db "BY","WO","WO","DW","QW","FL","DO","TB" 2223 000082AB 57464C444F5442 <1> 2224 <1> endarea sizetcnam 2225 <1> 2226 <1> align 2, db 0 2227 000082B2 53484E454641 <1> distnam: db "SH","NE","FA" 2228 <1> endarea distnam 2229 <1> 2230 <1> 2231 <1> usesection lDEBUG_CODE 2232 <1> 2233 <1> %if 0 2234 <1> ; write byte in al to bx:(e)dx, then increment (e)dx 2235 <1> writeasm: 2236 <1> call writemem 2237 <1> _386_PM_o32 ; inc edx 2238 <1> inc dx 2239 <1> retn 2240 <1> 2241 <1> ; write cx bytes from ds:si to bx:(e)dx 2242 <1> writeasmn: 2243 <1> jcxz .nowrite 2244 <1> .loop: 2245 <1> lodsb 2246 <1> call writeasm 2247 <1> loop .loop 2248 <1> .nowrite: 2249 <1> retn 2250 <1> %endif 2251 <1> 2252 <1> 2253 <1> aa_cmd3_check: 2254 0000050E AC <1> lodsb 2255 0000050F E809B4 <1> call chkeol 2256 <1> aa_cmd3: 2257 00000512 E9EBFA <1> jmp cmd3 ; exit assembler mode --> 2258 <1> 2259 <1> 2260 <1> aa: 2261 00000515 E8E3FF <1> call guard_re 2262 00000518 8B1E[900C] <1> mov bx, word [ reg_cs ] ; default segment to use 2263 <1> aa00a: 2264 0000051C E8E7B3 <1> call iseol? 2265 0000051F 741E <1> je aa01 ; if end of line --> 2266 00000521 E8EEA3 <1> call getaddr ; get address into bx:(e)dx 2267 00000524 E8F4B3 <1> call chkeol ; expect end of line here 2268 00000527 66 <1> _386_PM_o32 ; mov dword [ a_addr ], edx 2269 00000528 8916[000B] <1> mov word [ a_addr ], dx ; save the address 2270 0000052C 891E[040B] <1> mov word [a_addr + saSegSel], bx 2271 <1> %if _PM 2272 00000530 E8968C <1> call ispm 2273 00000533 7506 <1> jnz .86m 2274 <1> .pm: 2275 00000535 891E[080B] <1> mov word [a_addr + saSelector], bx 2276 00000539 EB04 <1> jmp @F 2277 <1> .86m: 2278 0000053B 891E[060B] <1> mov word [a_addr + saSegment], bx 2279 <1> @@: 2280 <1> %endif 2281 <1> 2282 <1> ; Begin loop over input lines. 2283 <1> aa01: 2284 0000053F C706[9A0A][3F05] <1> mov word [ errret ], aa01 2285 00000545 8B26[940A] <1> mov sp, word [ savesp ] ; restore the stack (this implies no "retn") 2286 00000549 BF[0E08] <1> mov di, line_out 2287 0000054C A1[040B] <1> mov ax, word [a_addr + saSegSel] 2288 <1> %if _PM 2289 0000054F 89C3 <1> mov bx, ax 2290 <1> %endif 2291 00000551 E8B2B4 <1> call hexword 2292 00000554 B03A <1> mov al, ':' 2293 00000556 AA <1> stosb 2294 00000557 C606[9581]00 <1> mov byte [ asm_mn_flags ], 0 2295 <1> %if _PM 2296 0000055C C606[DB88]00 <1> mov byte [ bCSAttr ], 0 2297 00000561 E8D057 <1> call test_d_b_bit 2298 00000564 740B <1> jz .16 2299 00000566 C606[DB88]40 <1> mov byte [ bCSAttr ], 40h ; set 32-bit attrib for later checks here 2300 0000056B A1[020B] <1> mov ax, word [ a_addr+2 ] 2301 0000056E E895B4 <1> call hexword 2302 <1> .16: 2303 <1> %endif 2304 00000571 A1[000B] <1> mov ax, word [ a_addr+0 ] 2305 00000574 E88FB4 <1> call hexword 2306 00000577 B020 <1> mov al, 32 2307 00000579 AA <1> stosb 2308 0000057A E8F4BB <1> call getline00 2309 0000057D 3C2E <1> cmp al, '.' 2310 0000057F 748D <1> je aa_cmd3_check 2311 00000581 3C3B <1> cmp al, ';' 2312 00000583 74BA <1> je aa01 ; if comment 2313 00000585 E882B3 <1> call iseol?.notsemicolon 2314 00000588 7488 <1> je aa_cmd3 ; if done, return to command line --> 2315 0000058A C706[9681]0000 <1> mov word [ aa_saved_prefix ], 0 ; clear aa_saved_prefix and aa_seg_pre 2316 <1> 2317 <1> ; Get mnemonic and look it up. 2318 <1> ; (At this point, it has been determined that it is not empty.) 2319 <1> ; 2320 <1> ; INP: al = first character 2321 <1> ; si-> remaining string (al isn't EOL) 2322 <1> aa02: 2323 00000590 BF[0E08] <1> mov di, line_out ; -> buffer 2324 00000593 31C9 <1> xor cx, cx ; = 0 2325 00000595 8936[9281] <1> mov [ aa13a_mnemposition ], si 2326 <1> 2327 00000599 A9 <1> db __TEST_IMM16 ; skip stosb,lodsb initially 2328 <1> @@: 2329 0000059A AA <1> stosb 2330 0000059B AC <1> lodsb 2331 0000059C 41 <1> inc cx ; count length 2332 0000059D E86F86 <1> call uppercase 2333 000005A0 E863B3 <1> call iseol? ; end of mnemonic ? 2334 000005A3 740C <1> je @F 2335 000005A5 3C3A <1> cmp al, ':' 2336 000005A7 7408 <1> je @F ; (for prefixes, else will be an error later) 2337 000005A9 3C20 <1> cmp al, 32 2338 000005AB 7404 <1> je @F 2339 000005AD 3C09 <1> cmp al, 9 2340 000005AF 75E9 <1> jne @B ; not yet --> 2341 <1> @@: 2342 <1> 2343 000005B1 49 <1> dec cx ; = length of input 2344 000005B2 E8A7B3 <1> call skipwh0 ; skip to next field 2345 000005B5 4E <1> dec si 2346 <1> 2347 000005B6 8A45FF <1> mov al, [di-1] ; get last stored character 2348 000005B9 3C57 <1> cmp al, 'W' ; possible suffix? 2349 000005BB 7406 <1> je @F 2350 000005BD 3C44 <1> cmp al, 'D' 2351 000005BF 7402 <1> je @F ; yes --> 2352 000005C1 30C0 <1> xor al, al 2353 <1> @@: 2354 000005C3 A2[9481] <1> mov [aa_mnemsuffix], al ; store 'D', 'W', or 0 2355 <1> 2356 000005C6 56 <1> push si ; save position in input line 2357 <1> 2358 000005C7 BE[9A01] <1> mov si, mnlist ; -> first area: no or optional suffix 2359 000005CA BA[270C] <1> mov dx, mnlist_o_suffix_required; -> end of first area 2360 <1> 2361 <1> ; [line_out] = name to search 2362 <1> ; cx = length of name to search 2363 <1> ; si-> next mnlist entry 2364 <1> ; dx-> behind last mnlist entry of this area 2365 <1> ; w[ss:sp]-> next field in input line (operand or EOL) 2366 <1> aa_mnemlistloop: 2367 000005CD AD <1> lodsw ; load combined word, si-> name 2368 000005CE 83E00F <1> and ax, 0Fh ; separate mnemonic length 2369 000005D1 39C8 <1> cmp ax, cx ; length matches ? 2370 000005D3 741D <1> je .length_match ; yes, check name --> 2371 <1> .cmps_mismatch: 2372 000005D5 01C6 <1> add si, ax ; -> behind entry 2373 000005D7 39D6 <1> cmp si, dx ; at end of this list area ? 2374 000005D9 72F2 <1> jb aa_mnemlistloop ; not yet, check next entry --> 2375 <1> 2376 000005DB 81FA[270C] <1> cmp dx, mnlist_o_suffix_required; was first or second area ? 2377 000005DF 750D <1> jne .mnem_invalid ; second, not found --> 2378 <1> 2379 000005E1 BE[8E0B] <1> mov si, mnlist_a_suffix_allowed ; -> second area: optional or required suffix 2380 000005E4 BA[500C] <1> mov dx, end_mnlist ; -> end of second area 2381 <1> 2382 000005E7 49 <1> dec cx ; prepare for second look-up 2383 000005E8 3826[9481] <1> cmp [aa_mnemsuffix], ah ; is there a valid suffix ? (ah still 0) 2384 000005EC 75DF <1> jne aa_mnemlistloop ; yes, check for suffixed instruction --> 2385 <1> 2386 <1> .mnem_invalid: 2387 000005EE 58 <1> pop ax ; (discard) 2388 000005EF E96901 <1> jmp aa13a ; complain --> 2389 <1> 2390 <1> .length_match: ; found a name of correct length 2391 000005F2 BF[0E08] <1> mov di, line_out ; -> all-capitals input 2392 000005F5 89F3 <1> mov bx, si ; -> name 2393 000005F7 F3A6 <1> repe cmpsb ; compare names 2394 000005F9 89DE <1> mov si, bx 2395 000005FB 89C1 <1> mov cx, ax ; restore length 2396 000005FD 75D6 <1> jne .cmps_mismatch ; not this, continue --> 2397 <1> 2398 <1> ; We found the mnemonic. 2399 <1> ; (bx=si)-> entry's mnemonic 2400 <1> ; dx-> behind last mnlist entry of this area 2401 <1> ; w[ss:sp]-> next field in input line (operand or EOL) 2402 000005FF 89F0 <1> mov ax, si ; -> mnemonic's name 2403 <1> 2404 00000601 81FA[500C] <1> cmp dx, end_mnlist ; was first or second area ? 2405 00000605 740B <1> je .handlesuffix ; second, there's a suffix to handle --> 2406 <1> 2407 00000607 3D[8E0B] <1> cmp ax, mnlist_a_suffix_allowed ; optional suffix that was not specified? 2408 0000060A 7234 <1> jb aa_mnemonic_found ; no, done with the suffixes already --> 2409 <1> 2410 <1> %if _PM 2411 0000060C 8A16[DB88] <1> mov dl, byte [ bCSAttr ] ; dl = whether a 32-bit CS 2412 <1> %else 2413 <1> xor dl, dl ; 86 Mode is always 16-bit 2414 <1> %endif 2415 00000610 EB09 <1> jmp sho .suffix_decide 2416 <1> 2417 <1> .handlesuffix: 2418 <1> 2419 00000612 8A16[9481] <1> mov dl, byte [ aa_mnemsuffix ] ; dl = 'W' or 'D'. 'W' is odd, 'D' is even 2420 00000616 F6D2 <1> not dl ; make 'W' an even value, 'D' an odd one 2421 00000618 80E201 <1> and dl, 1 ; 'W' results in 0, 'D' in 1 2422 <1> 2423 <1> .suffix_decide: 2424 0000061B 3D[B20B] <1> cmp ax, mnlist_o_suffix_allowed ; address size suffix ? 2425 0000061E 7212 <1> jb .a_suffix ; yes --> 2426 <1> 2427 <1> ; Operand size suffix. 2428 00000620 84D2 <1> test dl, dl ; which ? 2429 00000622 7407 <1> jz .o_suffix_w 2430 00000624 800E[9581]01 <1> or byte [asm_mn_flags], AMF_D32 ; o32 2431 00000629 EB15 <1> jmp sho aa_mnemonic_found 2432 <1> 2433 <1> .o_suffix_w: 2434 0000062B 800E[9581]40 <1> or byte [asm_mn_flags], AMF_D16 ; o16 2435 00000630 EB0E <1> jmp sho aa_mnemonic_found 2436 <1> 2437 <1> ; Address size suffix. 2438 <1> .a_suffix: 2439 00000632 84D2 <1> test dl, dl ; which ? 2440 00000634 7405 <1> jz .a_suffix_w 2441 00000636 800E[9581]84 <1> or byte [asm_mn_flags], AMF_ADDR|AMF_A32; a32 2442 <1> .a_suffix_w: 2443 0000063B 800E[9581]80 <1> or byte [asm_mn_flags], AMF_ADDR ; a16 (AMF_A32 still clear) 2444 <1> 2445 <1> aa_mnemonic_found: 2446 00000640 B104 <1> mov cl, 4 2447 00000642 8B74FE <1> mov si, [si-2] ; get the combined word 2448 00000645 D3EE <1> shr si, cl ; extract offset into asmtab 2449 00000647 81C6[0000] <1> add si, asmtab ; -> asmtab sequence 2450 <1> 2451 <1> ; bx-> name of matching mnlist entry 2452 <1> ; If this mnemonic is suffixable/suffixed, 2453 <1> ; AMF_D32,AMF_D16,AMF_ADDR,AMF_A32 show suffix status 2454 <1> ; si-> associated asmtab sequence 2455 <1> ; w[ss:sp]-> next field in input line (operand or EOL) 2456 <1> 2457 <1> %if 0 2458 <1> 2459 <1> Now si points to the spot in asmtab corresponding to this mnemonic. 2460 <1> The format of the assembler table is as follows. 2461 <1> First, there is optionally one of the following bytes: 2462 <1> 2463 <1> ASM_SPECIAL This is a special mnemonic (directive or AAx). 2464 <1> ASM_WAIT The instruction is prefixed by a WAIT. 2465 <1> ASM_D32 This is a 32-bit instruction variant. 2466 <1> ASM_D16 This is a 16-bit instruction variant. 2467 <1> 2468 <1> Then, except for non-AAx ASM_SPECIAL, this is followed by one or 2469 <1> more of the following sequences, indicating an instruction variant. 2470 <1> 2471 <1> ASM_LOCKABLE Indicates that this instruction can follow a LOCK prefix. 2472 <1> ASM_MACHx Indicates the CPU this instruction requires, 1..6 (186..686). 2473 <1> ASM_ESCAPE Escapes a large following word. The assembler table contains 2474 <1> as many escapes as necessary; each escape means to add the 2475 <1> value of ASM_ESCAPE to the following high byte of the info 2476 <1> word. This will easily overflow the word, so a dword is 2477 <1> required to process the info word. ASM_ESCAPE currently 2478 <1> needs to be equal to ASM_FIRST (ie. the lowest assembler 2479 <1> table prefix byte) because otherwise some values would have 2480 <1> no valid encoding. _ASM_ESCAPE_USED is a preprocessor 2481 <1> variable which will be 0 in case there are no ASM_ESCAPE 2482 <1> bytes to be found in the table. 2483 <1> [word] This is a 16-bit integer, most significant byte first, giving 2484 <1> ASMMOD * a + b, where b is an index into the array opindex 2485 <1> (indicating the operand list), and a is as follows (hex): 2486 <1> 0..FF The (one-byte) instruction. 2487 <1> 100..1FF The lower 8 bits give the second byte of 2488 <1> a two-byte instruction beginning with 0Fh. 2489 <1> 200..23F Bits 2-0 say which floating point instruction 2490 <1> this is (D8h-DFh), and 5-3 give the /r field. 2491 <1> 240..1247 (a-240h)/8 is the index in the array agroups 2492 <1> (which gives the real value of a), and the 2493 <1> low-order 3 bits gives the /r field. 2494 <1> [byte] This gives the second byte of a floating point 2495 <1> instruction if 0D8h <= a <= 0DFh. 2496 <1> 2497 <1> Following these is an ASM_END byte. (ASM_SPECIAL has the same value as 2498 <1> ASM_END, but the context allows to decide which one is meant.) 2499 <1> 2500 <1> Exceptions: 2501 <1> ASM_SPECIAL are not followed by this opcode information (except AAx). 2502 <1> ASM_SPECIAL segment, LOCK and REP prefixes are followed by the literal 2503 <1> prefix byte. 2504 <1> ASM_SPECIAL for all mnemonics except AAx and the prefixes are not 2505 <1> followed by anything at all. 2506 <1> 2507 <1> The ASM_ symbols are defined where debugtbl.inc is included in debug.asm. 2508 <1> 2509 <1> %endif 2510 <1> 2511 <1> ; To do: BITS, USE16, USE32, USEAUTO, CPU 2512 0000064B AC <1> lodsb ; get a possible prefix 2513 <1> .checkprefix: 2514 <1> %if 1 2515 0000064C 3CFF <1> cmp al, ASM_SPECIAL ; a special mnemonic ? 2516 0000064E 7403E99900 <1> jne .notspecial ; no --> 2517 <1> 2518 <1> ; Dispatch based on mnemonic. 2519 00000653 31C0 <1> xor ax, ax 2520 00000655 81FB[AB01] <1> cmp bx, mnlist+MN_O16 2521 00000659 7503E9A500 <1> je aa_sizeprefix ; o16 (ax = 0) --> 2522 0000065E 40 <1> inc ax 2523 0000065F 81FB[A101] <1> cmp bx, mnlist+MN_A16 2524 00000663 7503E99B00 <1> je aa_sizeprefix ; a16 (ax = 1) --> 2525 00000668 B402 <1> mov ah, 2 2526 0000066A 81FB[9C01] <1> cmp bx, mnlist+MN_A32 2527 0000066E 7503E99000 <1> je aa_sizeprefix ; a32 (ax = 201h) --> 2528 00000673 48 <1> dec ax 2529 00000674 81FB[A601] <1> cmp bx, mnlist+MN_O32 2530 00000678 7503E98600 <1> je aa_sizeprefix ; o32 (ax = 200h) --> 2531 0000067D 81FB[9307] <1> cmp bx, mnlist+MN_LOCK 2532 00000681 7503E9CC00 <1> je aa18 ; lock --> 2533 00000686 81FB[B709] <1> cmp bx, mnlist+MN_REP 2534 0000068A 7209 <1> jb .notreplock 2535 0000068C 81FB[CF09] <1> cmp bx, mnlist+MN_REPNE 2536 00000690 7703E9BD00 <1> jbe aa18 ; rep, repe, repne --> 2537 <1> .notreplock: 2538 00000695 81FB[F009] <1> cmp bx, mnlist+MN_ES 2539 00000699 7209 <1> jb .notseg 2540 0000069B 81FB[040A] <1> cmp bx, mnlist+MN_GS 2541 0000069F 7703E9A300 <1> jbe aa17 ; single segment prefix --> 2542 <1> .notseg: 2543 000006A4 81FB[BC01] <1> cmp bx, mnlist+MN_AAD 2544 000006A8 7503E94401 <1> je aa_aax ; aad --> 2545 000006AD 81FB[C101] <1> cmp bx, mnlist+MN_AAM 2546 000006B1 7503E93B01 <1> je aa_aax ; aam --> 2547 000006B6 833E[9681]00 <1> cmp word [ aa_saved_prefix ], byte 0 2548 000006BB 7403E99B00 <1> jne aa13a ; if there was a prefix or a segment, error --> 2549 000006C0 5E <1> pop si ; get position in input line 2550 <1> ;cmp bx, mnlist+MN_SEG 2551 <1> ;je aa_seg ; SEG mnemonic, process --> 2552 000006C1 81FB[7909] <1> cmp bx, mnlist+MN_ORG 2553 000006C5 7503E99800 <1> je aa_org 2554 000006CA B80100 <1> mov ax, 1 2555 000006CD 81FB[5F03] <1> cmp bx, mnlist+MN_DD 2556 000006D1 7503E99400 <1> je aa20m ; dd (ax = 1) --> 2557 000006D6 40 <1> inc ax 2558 000006D7 81FB[6D03] <1> cmp bx, mnlist+MN_DW 2559 000006DB 7503E98A00 <1> je aa20m ; dw (ax = 2) --> 2560 000006E0 40 <1> inc ax 2561 000006E1 81FB[5B03] <1> cmp bx, mnlist+MN_DB 2562 000006E5 7503E98000 <1> je aa20m ; db (ax = 3) --> 2563 000006EA EB6F <1> jmp short aa13a ; unhandled special mnemonic --> 2564 <1> 2565 <1> .notspecial: 2566 000006EC 2CFC <1> sub al, ASM_D16 ; mnemonic has a prefix ? 2567 000006EE 7207 <1> jb .normal ; no --> 2568 000006F0 7409 <1> je .d16 ; it is a 16-bit mnemonic form --> 2569 <1> %else 2570 <1> cmp al, ASM_O16PREF 2571 <1> jb .normal ; no special mnemonic --> 2572 <1> cmp al, ASM_A32PREF 2573 <1> jbe aa_sizeprefix ; 386 address/operand size prefix --> 2574 <1> 2575 <1> sub al, ASM_LOCKREP ; check for mnemonic flag byte, 2576 <1> ; and convert it to 0..9 if one 2577 <1> jb .normal ; if none --> 2578 <1> je aa18 ; if LOCK/REP --> 2579 <1> cbw 2580 <1> dec ax 2581 <1> jz aa17 ; if segment prefix (ASM_SEG) --> 2582 <1> dec ax 2583 <1> jz aa_aax ; if aad or aam (ASM_AAX) --> 2584 <1> dec ax 2585 <1> jz .d16 ; if ASM_D16 --> 2586 <1> cmp al, 3 2587 <1> jae aa20 ; if ASM_ORG or ASM_DD or ASM_DW or ASM_DB --> 2588 <1> %endif 2589 000006F2 0806[9581] <1> or [ asm_mn_flags ], al ; save AMF_D32 or AMF_WAIT (1 or 2) 2590 000006F6 A8 <1> db __TEST_IMM8 ; (skip dec) 2591 <1> .normal: 2592 000006F7 4E <1> dec si ; -> first byte of mnemonic info 2593 <1> .ab01: 2594 000006F8 E90601 <1> jmp ab01 ; now process the arguments 2595 <1> .d16: 2596 000006FB 800E[9581]40 <1> or byte [ asm_mn_flags ], AMF_D16 2597 00000700 46 <1> inc si ; skip the ASM_D32 byte 2598 00000701 EBF5 <1> jmp short .ab01 ; now process the arguments 2599 <1> 2600 <1> aa_sizeprefix: 2601 <1> %if 0 2602 <1> sub al, ASM_O16PREF ; 0 = o16, 1 = a16, 2 = o32, 3 = a32 2603 <1> mov ah, al 2604 <1> and ax, (2<<8)|1 ; ah = 2 if 32-bit prefix, al = 1 if ASIZE 2605 <1> %endif 2606 <1> %if _PM 2607 00000703 0A26[DB88] <1> or ah, byte [ bCSAttr ] 2608 00000707 740E <1> jz .nobyte ; 16-bit CS and 16-bit prefix, no output --> 2609 00000709 80FC42 <1> cmp ah, 40h| 2 2610 0000070C 7409 <1> je .nobyte ; 32-bit CS and 32-bit prefix, no output --> 2611 <1> %else 2612 <1> test ah, ah 2613 <1> jz .nobyte ; 16-bit CS and 16-bit prefix --> 2614 <1> %endif 2615 <1> 2616 <1> ; CS differs from the prefix's type. 2617 <1> ; Output a prefix byte. 2618 0000070E 0466 <1> add al, 66h ; 66h if OSIZE, 67h if ASIZE 2619 00000710 BF[0E08] <1> mov di, line_out 2620 00000713 AA <1> stosb 2621 00000714 E8B100 <1> call aa_copymem 2622 <1> .nobyte: 2623 <1> aa_handleprefixes: 2624 00000717 5E <1> pop si 2625 00000718 AC <1> lodsb ; get character 2626 00000719 3C3A <1> cmp al, ':' 2627 0000071B 7503 <1> jne .nocolon 2628 0000071D E83BB2 <1> call skipwhite ; skip a colon 2629 <1> .nocolon: 2630 00000720 E8E3B1 <1> call iseol? ; end of line? 2631 00000723 7403E968FE <1> jne aa02 ; no, process instruction --> 2632 <1> 2633 <1> ; No instruction follows. 2634 <1> ; Write out saved LOCK/REP and/or segment prefix. 2635 00000728 A0[9781] <1> mov al, byte [ aa_seg_pre ] 2636 0000072B 84C0 <1> test al, al 2637 0000072D 7407 <1> jz .noseg 2638 0000072F BF[0E08] <1> mov di, line_out 2639 00000732 AA <1> stosb 2640 00000733 E89200 <1> call aa_copymem 2641 <1> .noseg: 2642 00000736 A0[9681] <1> mov al, byte [ aa_saved_prefix ] 2643 00000739 84C0 <1> test al, al 2644 0000073B 7407 <1> jz .noreplock 2645 0000073D BF[0E08] <1> mov di, line_out 2646 00000740 AA <1> stosb 2647 00000741 E88400 <1> call aa_copymem 2648 <1> .noreplock: 2649 <1> aa01_j1: 2650 00000744 E9F8FD <1> jmp aa01 ; return to prompt 2651 <1> 2652 <1> %if 0 2653 <1> ; SEG directive (segment prefix follows) 2654 <1> aa_seg: 2655 <1> call skipwhite 2656 <1> mov ah, byte [si] 2657 <1> and ax, ~2020h 2658 <1> mov di, segrgnam 2659 <1> mov cx, 6 2660 <1> repne scasw 2661 <1> jne aa24 ; if not found 2662 <1> push si ; save si in case there's no colon 2663 <1> inc si ; skip "?s" 2664 <1> call skipwhite 2665 <1> pop si 2666 <1> call chkeol 2667 <1> mov bx, prefixlist + 5 2668 <1> sub bx, cx 2669 <1> mov al, byte [ bx ] ; look up the prefix byte 2670 <1> mov di, line_out 2671 <1> stosb 2672 <1> call aa_copymem 2673 <1> jmp short aa01_j1 2674 <1> %endif 2675 <1> 2676 <1> ; segment prefix 2677 <1> aa17: 2678 00000747 AC <1> lodsb ; get prefix value 2679 00000748 A2[9781] <1> mov byte [ aa_seg_pre ], al 2680 0000074B 800E[9581]10 <1> or byte [ asm_mn_flags ], AMF_MSEG 2681 00000750 EBC5 <1> jmp short aa_handleprefixes 2682 <1> 2683 <1> ; LOCK or REP prefix 2684 <1> aa18: 2685 00000752 AC <1> lodsb ; get prefix value 2686 00000753 8606[9681] <1> xchg al, byte [ aa_saved_prefix ] 2687 00000757 84C0 <1> test al, al 2688 00000759 74BC <1> jz aa_handleprefixes 2689 <1> ; if there already was a saved prefix: 2690 <1> aa13a: 2691 0000075B 8B36[9281] <1> mov si, [ aa13a_mnemposition ] 2692 0000075F E97C9D <1> jmp error 2693 <1> 2694 <1> %if 0 2695 <1> ; Pseudo ops (org or db/dw/dd). 2696 <1> aa20: 2697 <1> cmp word [ aa_saved_prefix ], byte 0 2698 <1> jne aa13a ; if there was a prefix or a segment, error --> 2699 <1> pop si ; get position in input line 2700 <1> sub al, 3 ; AX=0 if org, 1 if dd, 2 if dw, 3 if db. 2701 <1> jne aa20m ; if not ORG 2702 <1> %endif 2703 <1> 2704 <1> aa_org: 2705 <1> ; Process ORG pseudo op. 2706 00000762 AC <1> lodsb 2707 00000763 8B1E[040B] <1> mov bx, word [a_addr + saSegSel]; default segment 2708 00000767 E9B2FD <1> jmp aa00a ; go to top, set address if any given 2709 <1> 2710 <1> ; Data instructions (DB/DW/DD). 2711 <1> aa20m: 2712 0000076A BF[0E08] <1> mov di, line_out ; put the bytes here when we get them 2713 0000076D 93 <1> xchg ax, bx ; mov bx,ax 2714 0000076E 8A87[BD81] <1> mov al, byte [ aadbsiz+bx ] ; move maximum size 2715 00000772 A2[BD81] <1> mov byte [ aadbsiz ], al 2716 00000775 D1E3 <1> shl bx, 1 2717 00000777 8B87[C281] <1> mov ax, word [ aadbsto+bx ] ; move address of storage routine 2718 0000077B A3[C281] <1> mov word [ aadbsto ],ax 2719 0000077E E8DAB1 <1> call skipwhite 2720 00000781 E882B1 <1> call iseol? 2721 00000784 743E <1> je aa27 ; if end of line 2722 <1> 2723 <1> aa21: 2724 00000786 3C22 <1> cmp al, '"' 2725 00000788 741B <1> je aa22 ; if string 2726 0000078A 3C27 <1> cmp al, "'" 2727 0000078C 7417 <1> je aa22 ; if string 2728 0000078E E8160A <1> call aageti ; get a numerical value into dx:bx, size into cl 2729 00000791 3A0E[BD81] <1> cmp cl, byte [ aadbsiz ] 2730 00000795 7721 <1> ja aa24 ; if overflow 2731 00000797 93 <1> xchg ax, bx 2732 00000798 FF16[C281] <1> call near [ aadbsto ] ; store the value 2733 0000079C 81FF[1609] <1> cmp di, line_out_end 2734 000007A0 7716 <1> ja aa24 ; if output line overflow 2735 000007A2 93 <1> xchg ax, bx 2736 000007A3 EB17 <1> jmp short aa26 ; done with this one 2737 <1> 2738 <1> aa22: 2739 000007A5 88C4 <1> mov ah, al 2740 <1> aa23: 2741 000007A7 AC <1> lodsb 2742 000007A8 E85FB1 <1> call iseol?.notsemicolon 2743 000007AB 740B <1> je aa24 ; if end of line (closing quote missing) --> 2744 000007AD 38E0 <1> cmp al, ah 2745 000007AF 740A <1> je aa25 ; if end of string 2746 000007B1 AA <1> stosb 2747 000007B2 81FF[1609] <1> cmp di, line_out_end 2748 000007B6 76EF <1> jbe aa23 ; if output line not overflowing 2749 <1> aa24: 2750 000007B8 E9239D <1> jmp error ; error 2751 <1> aa25: 2752 000007BB AC <1> lodsb 2753 <1> aa26: 2754 000007BC E86EB1 <1> call skipcomm0 2755 000007BF E844B1 <1> call iseol? 2756 000007C2 75C2 <1> jne aa21 ; if not end of line 2757 <1> 2758 <1> ; End of line. Copy it to debuggee's memory. 2759 <1> aa27: 2760 000007C4 B8[3F05] <1> mov ax, aa01 2761 000007C7 50 <1> push ax 2762 <1> 2763 <1> ; INP: di-> behind memory to copy (starts at line_out) 2764 <1> ; [a_addr]-> destination 2765 <1> ; OUT: memory copied 2766 <1> ; a_addr offset updated 2767 <1> ; es set to ss 2768 <1> ; CHG: (e)si, (e)cx, (e)di 2769 <1> aa_copymem: 2770 000007C8 BE[0E08] <1> mov si, line_out ; ds:si-> data 2771 000007CB 89F9 <1> mov cx, di ; -> behind data 2772 000007CD 29F1 <1> sub cx, si ; = size of data 2773 000007CF 8E06[040B] <1> mov es, word [a_addr + saSegSel] 2774 000007D3 66 <1> _386_PM_o32 ; mov edi, dword [ a_addr+0 ] 2775 000007D4 8B3E[000B] <1> mov di, word [ a_addr+0 ] ; es:(e)di-> destination 2776 000007D8 660FB7C9 <1> _386_PM movzx ecx, cx 2777 000007DC 660FB7F6 <1> _386_PM movzx esi, si ; fix high words 2778 000007E0 67 <1> _386_PM_a32 2779 000007E1 F3A4 <1> rep movsb ; copy it 2780 000007E3 66 <1> _386_PM_o32 ; mov dword [ a_addr+0 ], edi 2781 000007E4 893E[000B] <1> mov word [ a_addr+0 ], di ; save new address 2782 000007E8 16 <1> push ss 2783 000007E9 07 <1> pop es 2784 000007EA C3 <1> retn 2785 <1> 2786 <1> ; Routines to store a byte/word/dword, 2787 <1> ; into a buffer in our memory. 2788 <1> aa28: 2789 000007EB AB <1> stosw ; store a dword value 2790 000007EC 92 <1> xchg ax, dx 2791 <1> aa29: 2792 000007ED AB <1> stosw ; store a word value 2793 000007EE C3 <1> retn 2794 <1> 2795 <1> aa30: 2796 000007EF AA <1> stosb ; store a byte value 2797 000007F0 C3 <1> retn 2798 <1> 2799 <1> %if _PM && 0 2800 <1> aa_use16: 2801 <1> cmp word [ aa_saved_prefix ], byte 0 2802 <1> jne aa13a 2803 <1> pop si 2804 <1> lodsb 2805 <1> call chkeol 2806 <1> mov dl, 16 2807 <1> jmp short aa_bits.parse 2808 <1> 2809 <1> aa_use32: 2810 <1> cmp word [ aa_saved_prefix ], byte 0 2811 <1> jne aa13a 2812 <1> pop si 2813 <1> lodsb 2814 <1> call chkeol 2815 <1> mov dl, 32 2816 <1> jmp short aa_bits.parse 2817 <1> 2818 <1> aa_useauto: 2819 <1> cmp word [ aa_saved_prefix ], byte 0 2820 <1> jne aa13a 2821 <1> pop si 2822 <1> lodsb 2823 <1> call chkeol 2824 <1> jmp short aa_bits.auto 2825 <1> 2826 <1> aa_bits: 2827 <1> cmp word [ aa_saved_prefix ], byte 0 2828 <1> jne aa13a ; if there was a prefix or a segment, error --> 2829 <1> pop si ; get position in input line 2830 <1> 2831 <1> ; Check whether "AUTO" requested. 2832 <1> push si 2833 <1> lodsw 2834 <1> and ax, ~2020h 2835 <1> cmp ax, "AU" 2836 <1> jne .notauto 2837 <1> lodsw 2838 <1> and ax, ~2020h 2839 <1> cmp ax, "TO" 2840 <1> jne .notauto 2841 <1> lodsb 2842 <1> call iseol? 2843 <1> jne .notauto 2844 <1> pop ax 2845 <1> .auto: 2846 <1> xor ax, ax 2847 <1> mov al, byte [ bCSAttr+1 ] 2848 <1> test al, al ; any saved ? 2849 <1> jz aa01_j1 ; no --> 2850 <1> mov word [ bCSAttr ], ax ; restore 2851 <1> jmp short aa01_j1 2852 <1> 2853 <1> .notauto: 2854 <1> pop si 2855 <1> lodsb 2856 <1> push si 2857 <1> call getbyte 2858 <1> call chkeol 2859 <1> pop si 2860 <1> .parse: 2861 <1> mov ax, word [ bCSAttr ] 2862 <1> or al, 1 2863 <1> cmp dl, 16 2864 <1> je .16 2865 <1> cmp dl, 16h 2866 <1> je .16 2867 <1> cmp dl, 32 2868 <1> je .32 2869 <1> cmp dl, 32h 2870 <1> jne aa24 2871 <1> .32: 2872 <1> _no386 jmp aa24 2873 <1> test ah, ah 2874 <1> mov ah, al 2875 <1> mov al, 40h 2876 <1> jmp short .save 2877 <1> 2878 <1> .16: 2879 <1> test ah, ah 2880 <1> mov ah, al 2881 <1> mov al, 0 2882 <1> .save: 2883 <1> jnz .saved 2884 <1> mov byte [ bCSAttr+1 ], ah 2885 <1> .saved: 2886 <1> mov byte [ bCSAttr ], al 2887 <1> jmp short aa01_j1 2888 <1> %endif 2889 <1> 2890 <1> ; Here we process the AAD and AAM instructions. They are special 2891 <1> ; in that they may take a one-byte argument, or none (in which case 2892 <1> ; the argument defaults to 0Ah = ten). 2893 <1> aa_aax: 2894 000007F1 8936[9881] <1> mov word [ mneminfo ], si ; save this address 2895 000007F5 5E <1> pop si 2896 000007F6 AC <1> lodsb 2897 000007F7 E80CB1 <1> call iseol? 2898 000007FA 750B <1> jne ab01b ; if not end of line --> 2899 000007FC BE[DA81] <1> mov si, aam_args ; fake a 0Ah argument if none given 2900 000007FF EB05 <1> jmp short ab01a 2901 <1> 2902 <1> 2903 <1> ; Process normal instructions. 2904 <1> 2905 <1> ; First we parse each argument into the following structure, 2906 <1> ; stored consecutively at line_out, line_out+OPRND_size, etc. 2907 <1> ; 2908 <1> ; For arguments of the form xxxx:yyyyyyyy, xxxx is stored in 2909 <1> ; OPRND.num2, and yyyyyyyy in OPRND.num. The number of bytes 2910 <1> ; in yyyyyyyy is stored in opaddr, 2 is stored in OPRND.numadd, 2911 <1> ; and di is stored in xxaddr. 2912 <1> struc OPRND 2913 00000000 ?? <1> .flags: resb 1 ; 0 flags (ARG_DEREF, etc) 2914 00000001 ?? <1> .distflags: resb 1 ; 1 distance flags 2915 <1> ; (short = 1, near = 2, far = 4) 2916 00000002 ?? <1> .sizearg: resb 1 ; 2 size argument, if any 2917 <1> ; (1=byte, 2=word, 4=dword, 5=qword, 6=float, 7=double, 8=tbyte) 2918 <1> ; (refer to SIZ_ equs, sizetcnam, and asm_siznum) 2919 00000003 ?? <1> .sizedis: resb 1 ; 3 size of ModR/M displacement 2920 <1> .reg1: ; 4 ModR/M byte or first register (byte) 2921 00000004 ?? <1> .numadd: resb 1 ; 4 number of additional bytes at num2 (up to 4) 2922 <1> .num2: ; 5 second number (word) 2923 00000005 ?? <1> .reg2: resb 1 ; 5 index register, second register or SIB byte 2924 <1> ; reg2 needs to follow reg1 immediately 2925 00000006 ?? <1> .index: resb 1 ; 6 index factor 2926 00000007 ?? <1> .orednum: resb 1 ; 7 sizes of numbers are ORed here 2927 00000008 ???????? <1> .num: resd 1 ; 8 number 2928 <1> endstruc 1 2929 <1> 2930 <1> odfShort: equ 1 2931 <1> odfNear: equ 2 2932 <1> odfFar: equ 4 2933 <1> 2934 <1> 2935 <1> ab01: 2936 00000801 8936[9881] <1> mov word [ mneminfo ], si ; save this address 2937 00000805 5E <1> pop si ; get position in line 2938 <1> ab01a: 2939 00000806 AC <1> lodsb 2940 <1> ab01b: 2941 00000807 BF[0E08] <1> mov di, line_out 2942 <1> 2943 <1> ; Loop over operands. 2944 <1> ab02: 2945 0000080A E8F9B0 <1> call iseol? 2946 0000080D 7503 <1> jne ab04 ; if not end of line 2947 <1> ab99_j1: 2948 0000080F E93503 <1> jmp ab99 ; to next phase 2949 <1> 2950 <1> ab04: 2951 00000812 57 <1> push di ; clear out the next storage area 2952 00000813 B90600 <1> mov cx, OPRND_size_w 2953 00000816 31C0 <1> xor ax, ax 2954 00000818 F3AB <1> rep stosw 2955 0000081A 5F <1> pop di 2956 <1> 2957 <1> ; Small loop over "BYTE PTR" and segment prefixes. 2958 <1> ab05: 2959 0000081B 4E <1> dec si 2960 0000081C 8B04 <1> mov ax, word [ si ] 2961 0000081E 25DFDF <1> and ax, TOUPPER_W 2962 <1> .checksize: 2963 00000821 807D0200 <1> cmp byte [ di+OPRND.sizearg ], SIZ_NONE 2964 00000825 750C <1> jne .notsize ; if already have a size qualifier ("BYTE PTR",...) 2965 00000827 57 <1> push di 2966 00000828 BF[A282] <1> mov di, sizetcnam 2967 0000082B B90800 <1> mov cx, sizetcnam_size_w 2968 0000082E F2AF <1> repne scasw 2969 00000830 5F <1> pop di 2970 00000831 742D <1> je .size ; if found --> 2971 <1> .notsize: 2972 <1> .checkdist: 2973 00000833 F64501FF <1> test byte [ di + OPRND.distflags ], -1 2974 00000837 7541 <1> jnz .notdist 2975 00000839 57 <1> push di 2976 0000083A BF[B282] <1> mov di, distnam 2977 0000083D B90300 <1> mov cx, distnam_size_w 2978 00000840 F2AF <1> repne scasw 2979 00000842 5F <1> pop di 2980 00000843 7535 <1> jne .notdist 2981 00000845 85C9 <1> test cx, cx 2982 00000847 7509 <1> jnz .dist ; if not "FA" 2983 00000849 8A4402 <1> mov al, byte [ si+2 ] 2984 0000084C 24DF <1> and al, TOUPPER 2985 0000084E 3C52 <1> cmp al, 'R' 2986 00000850 7528 <1> jne .notdist ; if not "FAR" (could be hexadecimal) --> 2987 <1> .dist: 2988 <1> ; 0 = far, 1 = near, 2 = short 2989 00000852 80E902 <1> sub cl, distnam_size_w - 1 2990 <1> ; -2 = far, -1 = near, -0 = short 2991 00000855 F6D9 <1> neg cl 2992 <1> ; 2 = far, 1 = near, 0 = short 2993 00000857 B501 <1> mov ch, 1 2994 00000859 D2E5 <1> shl ch, cl 2995 <1> ; 4 = far, 2 = near, 1 = short 2996 <1> ; 2997 <1> ; This matches odfFar = 4, odfNear = 2, odfShort = 1 2998 0000085B 886D01 <1> mov byte [ di + OPRND.distflags ], ch 2999 0000085E EB08 <1> jmp .skipptr 3000 <1> 3001 <1> .size: 3002 00000860 80E908 <1> sub cl, sizetcnam_size_w 3003 00000863 F6D9 <1> neg cl ; convert to 1..8 3004 00000865 884D02 <1> mov byte [ di+OPRND.sizearg ], cl 3005 <1> .skipptr: 3006 00000868 E8E6B0 <1> call skipalpha ; go to next token 3007 0000086B 8A24 <1> mov ah, byte [si] 3008 0000086D 25DFDF <1> and ax, TOUPPER_W 3009 00000870 3D5054 <1> cmp ax, "PT" 3010 00000873 7503 <1> jne ab05_j1 ; if not "PTR" 3011 00000875 E8D9B0 <1> call skipalpha ; go to next token (ignore "PTR") 3012 <1> ab05_j1: equ $ 3013 00000878 EBA1 <1> jmp ab05 3014 <1> 3015 <1> .notdist: 3016 <1> ab07: 3017 0000087A E80400 <1> call ab08 3018 0000087D 7531 <1> jne ab09 ; not a segment prefix --> 3019 0000087F EBF7 <1> jmp short ab05_j1 ; if it was a segment prefix --> 3020 <1> 3021 <1> ; Test for and process segment prefix 3022 <1> ; 3023 <1> ; INP: b[aa_seg_pre] 3024 <1> ; si-> string 3025 <1> ; ax = w[si] (uppercased) 3026 <1> ; OUT: NZ if no segment prefix, 3027 <1> ; si unchanged 3028 <1> ; ZR if segment prefix, 3029 <1> ; si-> behind prefix + 1 3030 <1> ; al = character behind prefix 3031 <1> ; CHG: ax, bx, cx 3032 <1> ab08: 3033 00000881 803E[9781]00 <1> cmp byte [ aa_seg_pre ], 0 3034 00000886 7525 <1> jne .ret ; if we already have a segment prefix 3035 00000888 57 <1> push di 3036 00000889 BF[1288] <1> mov di, segrgnam 3037 0000088C B90600 <1> mov cx, N_SEGREGS 3038 0000088F F2AF <1> repne scasw 3039 00000891 5F <1> pop di 3040 00000892 7519 <1> jne .ret ; if not found 3041 00000894 56 <1> push si ; save si in case there's no colon 3042 00000895 AD <1> lodsw ; skip "?s" 3043 00000896 E8C2B0 <1> call skipwhite 3044 00000899 3C3A <1> cmp al, ':' 3045 0000089B 7511 <1> jne .retpopsi ; if not followed by ':' 3046 0000089D 58 <1> pop ax ; discard saved si 3047 0000089E E8BAB0 <1> call skipwhite ; skip it 3048 000008A1 BB[4988] <1> mov bx, prefixlist + 5 3049 000008A4 29CB <1> sub bx, cx 3050 000008A6 8A07 <1> mov al, byte [ bx ] ; look up the prefix byte 3051 000008A8 A2[9781] <1> mov byte [ aa_seg_pre ], al ; save it away 3052 000008AB 38C0 <1> cmp al, al ; ZR, valid segment prefix 3053 <1> .ret: 3054 000008AD C3 <1> retn 3055 <1> 3056 <1> .retpopsi: 3057 000008AE 5E <1> pop si 3058 000008AF C3 <1> retn 3059 <1> 3060 <1> ; Begin parsing main part of argument. 3061 <1> 3062 <1> ; First check registers. 3063 <1> ab09: 3064 000008B0 57 <1> push di ; check for solo registers 3065 000008B1 BF[F287] <1> mov di, rgnam816 3066 000008B4 B91B00 <1> mov cx, N_ALLREGS ; 27 3067 000008B7 E89B09 <1> call aagetreg 3068 000008BA 5F <1> pop di 3069 000008BB 727F <1> jc ab14 ; if not a register 3070 000008BD 800D04 <1> or byte [di+OPRND.flags], ARG_JUSTREG 3071 000008C0 885D04 <1> mov byte [di+OPRND.reg1], bl ; save register number 3072 000008C3 80FB18 <1> cmp bl, 24 ; 0..23 = AL..DH, AX..DI, EAX..EDI 3073 000008C6 730B <1> jae ab09a ; if it's not a normal register 3074 000008C8 93 <1> xchg ax, bx ; mov al, bl 3075 000008C9 B103 <1> mov cl, 3 3076 000008CB D2E8 <1> shr al, cl ; al = size: 0 -> byte, 1 -> word, 2 -> dword 3077 000008CD 04FE <1> add al, -2 3078 000008CF 1403 <1> adc al, 3 ; convert to 1, 2, 4 (respectively) 3079 <1> ; matching SIZ_BYTE, SIZ_WORD, SIZ_DWORD 3080 000008D1 EB5A <1> jmp short ab13 3081 <1> 3082 <1> ab09a: 3083 000008D3 80350C <1> xor byte [di+OPRND.flags], ARG_JUSTREG|ARG_WEIRDREG 3084 000008D6 B002 <1> mov al, SIZ_WORD ; register size 3085 000008D8 80FB1E <1> cmp bl, REG_ST ; 24..29 = segment registers 3086 000008DB 7737 <1> ja ab11 ; if it's MM, CR, DR, or TR --> 3087 000008DD 740C <1> je ab09b ; if it's ST --> 3088 000008DF 80FB1C <1> cmp bl, 28 3089 000008E2 7249 <1> jb ab13 ; if it's a non-386 segment register --> 3090 000008E4 800E[9581]20 <1> or byte [asm_mn_flags], AMF_FSGS ; else flag it 3091 000008E9 EB42 <1> jmp short ab13 3092 <1> 3093 <1> ; ST registers 3094 <1> ab09b: 3095 000008EB AC <1> lodsb 3096 <1> ; Check for NASM FPU register notation: ST0..ST7 3097 000008EC 3C30 <1> cmp al, '0' ; digit following ? 3098 000008EE 720B <1> jb .par 3099 000008F0 3C37 <1> cmp al, '7' 3100 000008F2 7707 <1> ja .par ; no --> 3101 000008F4 2C30 <1> sub al, '0' 3102 000008F6 884505 <1> mov byte [di+OPRND.reg2], al ; save number 3103 000008F9 EB30 <1> jmp short ab12 ; --> 3104 <1> 3105 <1> .par: 3106 <1> ; Check for MASM FPU register notation: ST(0)..ST(7) 3107 000008FB 3C28 <1> cmp al, '(' ; parenthesis following ? 3108 000008FD 7403 <1> je .ispar ; yes --> 3109 <1> ; Plain ST (= ST0) 3110 000008FF 4E <1> dec si 3111 00000900 EB29 <1> jmp short ab12 3112 <1> 3113 <1> .ispar: 3114 00000902 AC <1> lodsb ; get digit 3115 00000903 2C30 <1> sub al, '0' 3116 00000905 3C07 <1> cmp al, 7 3117 00000907 7708 <1> ja ab10 ; if not 0..7 3118 00000909 884505 <1> mov byte [di+OPRND.reg2], al ; save the number 3119 0000090C AC <1> lodsb 3120 0000090D 3C29 <1> cmp al, ')' ; validate that there's a closing parenthesis 3121 0000090F 741A <1> je ab12 ; okay --> 3122 <1> ab10: 3123 <1> aa24_j2: 3124 00000911 E9A4FE <1> jmp aa24 ; error 3125 <1> 3126 <1> ; other registers: 31..34 (MM, CR, DR, TR) 3127 <1> ab11: 3128 00000914 AC <1> lodsb 3129 00000915 2C30 <1> sub al, '0' ; get digit 3130 00000917 3C07 <1> cmp al, 7 3131 00000919 77F6 <1> ja ab10 ; if error --> 3132 0000091B 884505 <1> mov byte [di+OPRND.reg2], al ; save the number 3133 0000091E B004 <1> mov al, SIZ_DWORD ; register size 3134 00000920 80FB1F <1> cmp bl, REG_MM 3135 00000923 7508 <1> jne ab13 ; if not MM register 3136 00000925 800D04 <1> or byte [di+OPRND.flags], ARG_JUSTREG 3137 00000928 B005 <1> mov al, SIZ_QWORD 3138 0000092A A9 <1> db __TEST_IMM16 ; (skip mov) 3139 <1> ab12: 3140 0000092B B000 <1> mov al, 0 ; size for ST registers 3141 <1> ab13: 3142 0000092D 3A4502 <1> cmp al, byte [di+OPRND.sizearg] ; compare with stated size 3143 00000930 7407 <1> je ab13a ; if same 3144 00000932 864502 <1> xchg al, byte [di+OPRND.sizearg] 3145 00000935 84C0 <1> test al, al ; SIZ_NONE ? 3146 00000937 75D8 <1> jnz ab10 ; if wrong size given, error --> 3147 <1> ab13a: 3148 00000939 E9ED01 <1> jmp ab44 ; done with this operand 3149 <1> 3150 <1> ; It's not a register reference. Try for a number. 3151 <1> ab14: 3152 0000093C AC <1> lodsb 3153 0000093D E84308 <1> call aaifnum 3154 00000940 7236 <1> jc ab17 ; it's not a number 3155 <1> ab14a: 3156 00000942 E86208 <1> call aageti ; get the number 3157 00000945 884D07 <1> mov byte [di+OPRND.orednum], cl 3158 00000948 895D08 <1> mov word [di+OPRND.num+0], bx 3159 0000094B 89550A <1> mov word [di+OPRND.num+2], dx 3160 0000094E E80BB0 <1> call skipwh0 3161 00000951 80F902 <1> cmp cl, 2 3162 00000954 7F22 <1> jg ab17 ; if we can't have a colon here 3163 00000956 3C3A <1> cmp al, ':' 3164 00000958 751E <1> jne ab17 ; if not xxxx:yyyy 3165 0000095A E8FEAF <1> call skipwhite 3166 0000095D E84708 <1> call aageti 3167 00000960 8B4D08 <1> mov cx, word [di+OPRND.num+0] 3168 00000963 894D05 <1> mov word [di+OPRND.num2], cx 3169 00000966 895D08 <1> mov word [di+OPRND.num+0], bx 3170 00000969 89550A <1> mov word [di+OPRND.num+2], dx 3171 0000096C 800D20 <1> or byte [di+OPRND.flags], ARG_FARADDR 3172 0000096F E9B601 <1> jmp ab43 ; done with this operand 3173 <1> 3174 <1> ab15: 3175 00000972 E9B300 <1> jmp ab30 ; do post-processing 3176 <1> 3177 <1> ; Check for [...]. 3178 <1> ab16: 3179 00000975 E8E3AF <1> call skipwhite 3180 <1> ab17: 3181 00000978 3C5B <1> cmp al, '[' ; begin loop over sets of [] 3182 0000097A 75F6 <1> jne ab15 ; if not [ 3183 0000097C 800D01 <1> or byte [di+OPRND.flags], ARG_DEREF ; set the flag 3184 <1> 3185 <1> ; Process NASM segment prefix inside brackets if any 3186 0000097F E8D9AF <1> call skipwhite 3187 00000982 8A24 <1> mov ah, byte [si] 3188 00000984 25DFDF <1> and ax, TOUPPER_W 3189 00000987 4E <1> dec si ; set up for ab08 3190 00000988 E8F6FE <1> call ab08 3191 0000098B 7403 <1> jz ab19 ; if segment prefix (called skipwhite) 3192 <1> ab18: 3193 0000098D E8CBAF <1> call skipwhite 3194 <1> ab19: 3195 00000990 3C5D <1> cmp al, ']' ; begin loop within [] 3196 00000992 74E1 <1> je ab16 ; if done 3197 <1> 3198 <1> ; Check for a register (within []). 3199 00000994 4E <1> dec si 3200 00000995 57 <1> push di 3201 00000996 BF[0288] <1> mov di, rgnam16 3202 00000999 B90800 <1> mov cx, N_REGS16 3203 0000099C E8B608 <1> call aagetreg 3204 0000099F 5F <1> pop di 3205 000009A0 7243 <1> jc ab25 ; if not a register 3206 000009A2 80FB10 <1> cmp bl, 16 3207 000009A5 7305 <1> jae ab20 ; if 32-bit register 3208 000009A7 80C308 <1> add bl, 8 ; adjust 0..7 to 8..15 3209 000009AA EB1D <1> jmp short ab21 3210 <1> ab20: 3211 000009AC 807D0500 <1> cmp byte [di+OPRND.reg2], 0 3212 000009B0 7517 <1> jnz ab21 ; if we already have an index 3213 000009B2 E8A6AF <1> call skipwhite 3214 000009B5 4E <1> dec si 3215 000009B6 3C2A <1> cmp al, '*' 3216 000009B8 750F <1> jne ab21 ; if not followed by '*' 3217 000009BA 46 <1> inc si 3218 000009BB 885D05 <1> mov byte [di+OPRND.reg2], bl ; save index register 3219 000009BE E89AAF <1> call skipwhite 3220 000009C1 E8E307 <1> call aageti 3221 000009C4 E86C08 <1> call aaconvindex 3222 000009C7 EB51 <1> jmp short ab28 ; ready for next part 3223 <1> 3224 <1> ab21: 3225 000009C9 807D0400 <1> cmp byte [di+OPRND.reg1], 0 3226 000009CD 7505 <1> jne ab22 ; if there's already a register 3227 000009CF 885D04 <1> mov byte [di+OPRND.reg1], bl 3228 000009D2 EB09 <1> jmp ab23 3229 <1> ab22: 3230 000009D4 807D0500 <1> cmp byte [di+OPRND.reg2], 0 3231 000009D8 7508 <1> jne ab24 ; if too many registers 3232 000009DA 885D05 <1> mov byte [di+OPRND.reg2], bl 3233 <1> ab23: 3234 000009DD E87BAF <1> call skipwhite 3235 000009E0 EB38 <1> jmp short ab28 ; ready for next part 3236 <1> 3237 <1> ab24: 3238 <1> aa24_j3: 3239 000009E2 E9D3FD <1> jmp aa24 ; error 3240 <1> 3241 <1> ; Try for a number (within []). 3242 <1> ab25: 3243 000009E5 AC <1> lodsb 3244 <1> ab26: 3245 000009E6 E8BE07 <1> call aageti ; get a number (or flag an error) 3246 000009E9 E870AF <1> call skipwh0 3247 000009EC 3C2A <1> cmp al, '*' 3248 000009EE 740B <1> je ab27 ; if it's an index factor 3249 000009F0 084D07 <1> or byte [di+OPRND.orednum], cl 3250 000009F3 015D08 <1> add word [di+OPRND.num+0], bx 3251 000009F6 11550A <1> adc word [di+OPRND.num+2], dx 3252 000009F9 EB1F <1> jmp short ab28 ; next part ... 3253 <1> 3254 <1> ab27: 3255 000009FB E83508 <1> call aaconvindex 3256 000009FE E85AAF <1> call skipwhite 3257 00000A01 4E <1> dec si 3258 00000A02 57 <1> push di 3259 00000A03 BF[0288] <1> mov di, rgnam16 3260 00000A06 31C9 <1> xor cx, cx 3261 00000A08 E84A08 <1> call aagetreg 3262 00000A0B 5F <1> pop di 3263 00000A0C 72D4 <1> jc ab24 ; if error 3264 00000A0E 807D0500 <1> cmp byte [di+OPRND.reg2], 0 3265 00000A12 75CE <1> jne ab24 ; if there is already a register 3266 00000A14 885D05 <1> mov byte [di+OPRND.reg2], bl 3267 00000A17 E841AF <1> call skipwhite 3268 <1> 3269 <1> ; Ready for the next term within []. 3270 <1> ab28: 3271 00000A1A 3C2D <1> cmp al, '-' 3272 00000A1C 74C8 <1> je ab26 ; if a (negative) number is next 3273 00000A1E 3C2B <1> cmp al, '+' 3274 00000A20 7503 <1> jne ab29 ; if no next term (presumably) 3275 00000A22 E968FF <1> jmp ab18 3276 <1> ab29: 3277 00000A25 E968FF <1> jmp ab19 ; back for more 3278 <1> 3279 <1> ; Post-processing for complicated arguments. 3280 <1> ab30: 3281 00000A28 837D0400 <1> cmp word [di+OPRND.reg1], 0 3282 00000A2C 752C <1> jne ab32 ; if registers were given ( ==> create MOD R/M) 3283 00000A2E 807D0700 <1> cmp byte [di+OPRND.orednum], 0 3284 00000A32 7424 <1> je ab31 ; if nothing was given ( ==> error) 3285 00000A34 803D00 <1> cmp byte [di+OPRND.flags], 0 3286 00000A37 7506 <1> jne ab30b ; if it was not immediate 3287 00000A39 800D10 <1> or byte [di+OPRND.flags], ARG_IMMED 3288 <1> ab30a: 3289 00000A3C E9E900 <1> jmp ab43 ; done with this argument 3290 <1> ab30b: 3291 00000A3F 800E[9581]80 <1> or byte [asm_mn_flags], AMF_ADDR 3292 00000A44 B002 <1> mov al, 2 ; size of the displacement 3293 00000A46 F6450704 <1> test byte [di+OPRND.orednum], 4 3294 00000A4A 7407 <1> jz ab30c ; if no 32-bit displacement --> 3295 00000A4C 40 <1> inc ax 3296 00000A4D 40 <1> inc ax ; al = 4 3297 00000A4E 800E[9581]04 <1> or byte [asm_mn_flags], AMF_A32 ; 32-bit addressing 3298 <1> ab30c: 3299 00000A53 884503 <1> mov byte [di+OPRND.sizedis], al ; save displacement size 3300 00000A56 EBE4 <1> jmp short ab30a ; done with this argument 3301 <1> ab31: 3302 00000A58 EB88 <1> jmp short aa24_j3 ; flag an error 3303 <1> 3304 <1> ; Create the MOD R/M byte. 3305 <1> ; (For disp-only or register, this will be done later as needed.) 3306 <1> ab32: 3307 00000A5A 800D02 <1> or byte [di+OPRND.flags], ARG_MODRM 3308 00000A5D 8A4504 <1> mov al, byte [di+OPRND.reg1] 3309 00000A60 0A4505 <1> or al, byte [di+OPRND.reg2] 3310 00000A63 A810 <1> test al, 10h 3311 00000A65 7525 <1> jnz ab34 ; if 32-bit addressing 3312 00000A67 F6450704 <1> test byte [di+OPRND.orednum], 4 3313 00000A6B 751F <1> jnz ab34 ; if 32-bit addressing 3314 00000A6D 800E[9581]80 <1> or byte [asm_mn_flags], AMF_ADDR 3315 00000A72 8B4504 <1> mov ax, word [di+OPRND.reg1] ; get reg1 and reg2 3316 00000A75 38E0 <1> cmp al, ah 3317 00000A77 7702 <1> ja ab33 ; make sure al >= ah 3318 00000A79 86C4 <1> xchg al, ah 3319 <1> ab33: 3320 00000A7B 57 <1> push di 3321 00000A7C BF[CA81] <1> mov di, modrmtab 3322 00000A7F B90800 <1> mov cx, 8 3323 00000A82 F2AF <1> repne scasw 3324 00000A84 5F <1> pop di 3325 00000A85 75D1 <1> jne ab31 ; if not among the possibilities (error) 3326 00000A87 BB0602 <1> mov bx, 206h ; max disp = 2 bytes; 6 ==> (non-existent) [bp] 3327 00000A8A EB6A <1> jmp short ab39 ; done (just about) 3328 <1> 3329 <1> ; 32-bit addressing 3330 <1> ab34: 3331 00000A8C 800E[9581]84 <1> or byte [asm_mn_flags], AMF_A32 | AMF_ADDR ; 32-bit addressing 3332 00000A91 8A4504 <1> mov al, byte [di+OPRND.reg1] 3333 00000A94 0A4506 <1> or al, byte [di+OPRND.index] 3334 00000A97 7508 <1> jnz ab35 ; if we can't optimize [Exx*1] to [Exx] 3335 00000A99 8B4504 <1> mov ax, word [di+OPRND.reg1] 3336 00000A9C 86C4 <1> xchg al, ah 3337 00000A9E 894504 <1> mov word [di+OPRND.reg1], ax 3338 <1> ab35: 3339 00000AA1 BB0504 <1> mov bx, 405h ; max disp = 4 bytes; 5 ==> (non-existent) [bp] 3340 00000AA4 807D0500 <1> cmp byte [di+OPRND.reg2], 0 3341 00000AA8 7510 <1> jne ab36 ; if there's a SIB 3342 00000AAA 8A4D04 <1> mov cl, byte [di+OPRND.reg1] 3343 00000AAD 80F910 <1> cmp cl, 16 3344 00000AB0 7CA6 <1> jl ab31 ; if wrong register type 3345 00000AB2 80E107 <1> and cl, 7 3346 00000AB5 80F904 <1> cmp cl, 4 ; check for ESP 3347 00000AB8 753C <1> jne ab39 ; if not, then we're done (otherwise do SIB) 3348 <1> 3349 <1> ab36: 3350 00000ABA 800E[9581]08 <1> or byte [asm_mn_flags], AMF_SIB ; form SIB 3351 00000ABF 8A6D06 <1> mov ch, byte [di+OPRND.index] ; get SS bits 3352 00000AC2 B103 <1> mov cl, 3 3353 00000AC4 D2E5 <1> shl ch, cl ; shift them halfway into place 3354 00000AC6 8A4505 <1> mov al, byte [di+OPRND.reg2] ; index register 3355 00000AC9 3C14 <1> cmp al, 20 3356 00000ACB 748B <1> je ab31 ; if ESP ( ==> error) 3357 00000ACD 3C00 <1> cmp al, 0 3358 00000ACF 7502 <1> jne ab37 ; if not zero 3359 00000AD1 B014 <1> mov al, 20 ; set it for index byte 4 3360 <1> ab37: 3361 00000AD3 3C10 <1> cmp al, 16 3362 00000AD5 7C81 <1> jl ab31 ; if wrong register type 3363 00000AD7 2407 <1> and al, 7 3364 00000AD9 08C5 <1> or ch, al ; put it into the SIB 3365 00000ADB D2E5 <1> shl ch, cl ; shift it into place 3366 00000ADD 41 <1> inc cx ; R/M for SIB = 4 3367 00000ADE 8A4504 <1> mov al, byte [di+OPRND.reg1] ; now get the low 3 bits 3368 00000AE1 84C0 <1> test al, al 3369 00000AE3 7505 <1> jnz ab38 ; if there was a first register 3370 00000AE5 80CD05 <1> or ch, 5 3371 00000AE8 EB38 <1> jmp short ab42 ; MOD = 0, disp is 4 bytes 3372 <1> 3373 <1> ab38: 3374 00000AEA 3C10 <1> cmp al, 16 3375 00000AEC 7C56 <1> jl ab45 ; if wrong register type 3376 00000AEE 2407 <1> and al, 7 ; first register 3377 00000AF0 08C5 <1> or ch, al ; put it into the SIB 3378 00000AF2 3C05 <1> cmp al, 5 3379 00000AF4 7406 <1> je ab40 ; if it's EBP, then we don't recognize disp=0 3380 <1> ; otherwise bl will be set to 0 3381 <1> 3382 <1> ; Find the size of the displacement. 3383 <1> ab39: 3384 00000AF6 38D9 <1> cmp cl, bl 3385 00000AF8 7402 <1> je ab40 ; if it's [(E)BP], then disp=0 is still 1 byte 3386 00000AFA B300 <1> mov bl, 0 ; allow 0-byte disp 3387 <1> 3388 <1> ab40: 3389 00000AFC 51 <1> push cx 3390 00000AFD 8A4508 <1> mov al, byte [di+OPRND.num+0] 3391 00000B00 B107 <1> mov cl, 7 3392 00000B02 D2F8 <1> sar al, cl 3393 00000B04 59 <1> pop cx 3394 00000B05 8A6509 <1> mov ah, byte [di+OPRND.num+1] 3395 00000B08 38E0 <1> cmp al, ah 3396 00000B0A 7513 <1> jne ab41 ; if it's bigger than 1 byte 3397 00000B0C 3B450A <1> cmp ax, word [di+OPRND.num+2] 3398 00000B0F 750E <1> jne ab41 ; ditto 3399 00000B11 B700 <1> mov bh, 0 ; no displacement 3400 00000B13 0A5D08 <1> or bl, byte [di+OPRND.num+0] 3401 00000B16 740A <1> jz ab42 ; if disp = 0 and it's not (E)BP 3402 00000B18 FEC7 <1> inc bh ; disp = 1 byte 3403 00000B1A 80C940 <1> or cl, 40h ; set MOD = 1 3404 00000B1D EB03 <1> jmp short ab42 ; done 3405 <1> 3406 <1> ab41: 3407 00000B1F 80C980 <1> or cl, 80h ; set MOD = 2 3408 <1> 3409 <1> ab42: 3410 00000B22 887D03 <1> mov byte [di+OPRND.sizedis], bh ; store displacement size 3411 00000B25 894D04 <1> mov word [di+OPRND.reg1], cx ; store MOD R/M and maybe SIB 3412 <1> 3413 <1> ; Finish up with the operand. 3414 <1> ab43: 3415 00000B28 4E <1> dec si 3416 <1> ab44: 3417 00000B29 E82FAE <1> call skipwhite 3418 00000B2C 83C70C <1> add di, byte OPRND_size 3419 00000B2F E8D4AD <1> call iseol? 3420 00000B32 7413 <1> je ab99 ; if end of line --> 3421 00000B34 3C2C <1> cmp al, ',' 3422 00000B36 750C <1> jne ab45 ; if not comma ( ==> error) 3423 00000B38 81FF[3208] <1> cmp di, line_out+3*OPRND_size 3424 00000B3C 7306 <1> jae ab45 ; if too many operands 3425 00000B3E E81AAE <1> call skipwhite 3426 00000B41 E9C6FC <1> jmp ab02 3427 <1> 3428 <1> ab45: 3429 00000B44 E971FC <1> jmp aa24 ; error jump 3430 <1> 3431 <1> ab99: 3432 00000B47 C605FF <1> mov byte [di+OPRND.flags], -1 ; end of parsing phase 3433 <1> 3434 <1> %if 0 3435 <1> For the next phase, we match the parsed arguments with the set of 3436 <1> permissible argument lists for the opcode. The first match wins. 3437 <1> Therefore the argument lists should be ordered such that the 3438 <1> cheaper ones come first. 3439 <1> 3440 <1> There is a tricky issue regarding sizes of memory references. 3441 <1> Here are the rules: 3442 <1> 1. If a memory reference is given with a size, then it's OK. 3443 <1> 2. If a memory reference is given without a size, but some 3444 <1> other argument is a register (which implies a size), 3445 <1> then the memory reference inherits that size. 3446 <1> Exceptions: OP_CL does not imply a size (it's the shift counter) 3447 <1> OP_SHOSIZ 3448 <1> 3. If 1 and 2 do not apply, but this is the last possible argument 3449 <1> list, and if the argument list requires a particular size, then 3450 <1> that size is used. 3451 <1> 4. In all other cases, flag an error. 3452 <1> %endif 3453 <1> 3454 <1> ac01: 3455 00000B4A 31C0 <1> xor ax, ax 3456 00000B4C BF[9A81] <1> mov di, rmaddr 3457 00000B4F B90700 <1> mov cx, 7 3458 00000B52 F3AB <1> rep stosw ; clear variant-specific variables 3459 <1> ; cx = 0 3460 00000B54 8B36[9881] <1> mov si, word [mneminfo] 3461 <1> ; -> the next argument variant 3462 <1> %if _ASM_ESCAPE_USED 3463 00000B58 31DB <1> xor bx, bx ; cx:bx = counter of ASM_ESCAPEs 3464 <1> %endif 3465 <1> ; Parse the variant's assembler table entry 3466 <1> ; si-> next argument variant 3467 <1> ; variant-specific variables cleared 3468 <1> ; cx:bx = 0 3469 <1> 3470 <1> ac02: 3471 00000B5A AC <1> lodsb 3472 <1> %if _ASM_ESCAPE_USED 3473 00000B5B 3CF4 <1> cmp al, ASM_ESCAPE 3474 00000B5D 750B <1> jne .notescape 3475 00000B5F 81C300F4 <1> add bx, ASM_ESCAPE << 8 3476 00000B63 83D100 <1> adc cx, byte 0 3477 00000B66 7219 <1> jc ac04 ; if this branches, too many escapes --> 3478 00000B68 EBF0 <1> jmp short ac02 3479 <1> .notescape: 3480 <1> %endif 3481 00000B6A 2CF5 <1> sub al, ASM_MACH1 3482 00000B6C 7216 <1> jb ac05 ; if no more special bytes 3483 00000B6E 3C06 <1> cmp al, ASM_LOCKABLE-ASM_MACH1 3484 00000B70 7408 <1> je ac03 ; if ASM_LOCKABLE 3485 00000B72 770D <1> ja ac04 ; if ASM_END or another (--> error) 3486 00000B74 40 <1> inc ax 3487 00000B75 A2[A281] <1> mov byte [dismach], al ; save machine type 3488 00000B78 EBE0 <1> jmp short ac02 ; back for next byte 3489 <1> ac03: 3490 00000B7A 800E[A681]01 <1> or byte [varflags], VAR_LOCKABLE 3491 00000B7F EBD9 <1> jmp short ac02 ; back for next byte 3492 <1> 3493 <1> ac04: 3494 00000B81 E9D7FB <1> jmp aa13a ; error 3495 <1> 3496 <1> ; Get and unpack the word. 3497 <1> ac05: 3498 00000B84 4E <1> dec si 3499 00000B85 AD <1> lodsw 3500 00000B86 86C4 <1> xchg al, ah ; put into little-endian order 3501 00000B88 31D2 <1> xor dx, dx 3502 <1> %if _ASM_ESCAPE_USED 3503 00000B8A 01D8 <1> add ax, bx ; add in the ASM_ESCAPE adjustment 3504 00000B8C 11CA <1> adc dx, cx ; account for overflow (cx = 0) 3505 <1> %endif 3506 00000B8E BB8000 <1> mov bx, ASMMOD 3507 00000B91 F7F3 <1> div bx ; ax = a_opcode; dx = index into opindex 3508 00000B93 A3[AA81] <1> mov word [a_opcode], ax ; save ax 3509 00000B96 A3[AC81] <1> mov word [a_opcode2], ax ; save the second copy 3510 00000B99 3DDF00 <1> cmp ax, 0DFh ; a coprocessor instruction ? 3511 00000B9C 7717 <1> ja ac05a 3512 00000B9E 3CD8 <1> cmp al, 0D8h 3513 00000BA0 7213 <1> jb ac05a ; if no coprocessor instruction --> 3514 00000BA2 800E[A381]01 <1> or byte [dmflags], DM_COPR ; flag it as an x87 instruction 3515 00000BA7 88C4 <1> mov ah, al ; ah = low order byte of opcode 3516 00000BA9 AC <1> lodsb ; get extra byte 3517 00000BAA A2[9C81] <1> mov byte [regmem], al ; save it in regmem 3518 00000BAD A3[AC81] <1> mov word [a_opcode2], ax ; save this for obsolete-instruction detection 3519 00000BB0 800E[A681]02 <1> or byte [varflags], VAR_MODRM ; flag its presence 3520 <1> ac05a: 3521 00000BB5 8936[9881] <1> mov [mneminfo], si ; save si back again 3522 00000BB9 89D6 <1> mov si, dx 3523 <1> %if ASMMOD > 0FFh 3524 <1> xor bx, bx 3525 <1> %endif 3526 00000BBB 8A9C[2C16] <1> mov bl, byte [opindex+si] 3527 00000BBF 01D2 <1> add dx, dx 3528 00000BC1 4A <1> dec dx 3529 00000BC2 01D3 <1> add bx, dx ; adjust to get correct index into oplists 3530 00000BC4 8DB7[0000] <1> lea si, [oplists+bx] ; si = the address of our operand list 3531 00000BC8 BF[0E08] <1> mov di, line_out 3532 <1> 3533 <1> ; Begin loop over operands. 3534 <1> ; [a_opcode] etc set for opcode 3535 <1> ; si-> operand list 3536 <1> ; di-> next parsed operand 3537 <1> ; [mneminfo]-> mnemonic's next variant in assembler table 3538 <1> ac06: 3539 00000BCB AC <1> lodsb ; get next operand byte 3540 00000BCC 3C00 <1> cmp al, OP_END 3541 00000BCE 745F <1> je ac10 ; if end of list 3542 <1> 3543 <1> ; The OP_STACK_* operand types don't really need another 3544 <1> ; operand structure. So handle them before checking for 3545 <1> ; a valid operand structure. This is required for the 3546 <1> ; cases with no regular operands following the stack hint. 3547 <1> ; Because they aren't needed by the assembler anyway we 3548 <1> ; just loop back to ac06 to load the next operand type. 3549 00000BD0 3C1F <1> cmp al, OP_STACK_PUSH 3550 00000BD2 74F7 <1> je ac06 3551 00000BD4 3C20 <1> cmp al, OP_STACK_POP 3552 00000BD6 74F3 <1> je ac06 3553 00000BD8 3C21 <1> cmp al, OP_STACK_SPECIAL 3554 00000BDA 74EF <1> je ac06 3555 <1> 3556 <1> ; Actual operand, or one of these always followed by one 3557 <1> ; or more actual operands (OP_M_*, OP_SHORT|NEAR|FAR), 3558 <1> ; so check for another valid operand structure. 3559 00000BDC 803DFF <1> cmp byte [di+OPRND.flags], -1 3560 00000BDF 744B <1> je ac01_j1 ; if too few operands were given 3561 00000BE1 3C40 <1> cmp al, OP_SIZE 3562 00000BE3 720E <1> jb ac07 ; if no size needed 3563 <1> %if 1 3564 00000BE5 B400 <1> mov ah, 0 3565 00000BE7 B104 <1> mov cl, 4 3566 00000BE9 D3E0 <1> shl ax, cl ; move bits 4..7 (size) to ah (OP_1632=5, OP_8=6, OP_16=7, ...) 3567 00000BEB D2E8 <1> shr al, cl ; move bits 0..3 back 3568 <1> %else 3569 <1> aam 16 ; ax=00XY -> ax=0X0Y 3570 <1> %endif 3571 00000BED 8826[A881] <1> mov byte [a_reqsize], ah ; save it away 3572 00000BF1 EB02 <1> jmp short ac08 3573 <1> 3574 <1> ac07: ; al = OP_M64.. 3575 <1> ; have al = 1..x 3576 <1> ; want al = 16..y 3577 00000BF3 040F <1> add al, 16-1 ; adjust for the 16 start entries in asmjmp 3578 <1> 3579 <1> ac08: 3580 00000BF5 98 <1> cbw ; al = 0..7 or 16..y, 3581 <1> ; al < 128, thus ax = al 3582 00000BF6 93 <1> xchg ax, bx ; now bx contains the index 3583 00000BF7 8A87[DC81] <1> mov al, byte [bittab+bx] 3584 00000BFB D1E3 <1> shl bx, 1 ; = offset into word array 3585 00000BFD 8B8F[1A82] <1> mov cx, word [asmjmp + bx] 3586 <1> ; subroutine address 3587 00000C01 D1EB <1> shr bx, 1 ; return to index 3588 00000C03 83FB3D <1> cmp bx, OP_AMOUNT_TABLE 3589 00000C06 731E <1> jae ac09_internal_error ; internal error 3590 00000C08 8405 <1> test al, byte [di+OPRND.flags] 3591 00000C0A 7420 <1> jz ac09 ; if no required bits are present 3592 00000C0C B400 <1> mov ah, 0 ; (insure ah = 0 for ao90) 3593 00000C0E FFD1 <1> call cx ; call its specific routine 3594 00000C10 A0[A781] <1> mov al, [alloweddist] 3595 00000C13 F6D0 <1> not al 3596 00000C15 844501 <1> test byte [di + OPRND.distflags], al 3597 00000C18 7512 <1> jnz ac09 ; if invalid distance specified --> 3598 00000C1A 817CFF5355 <1> cmp word [si-1], (OP_1632|OP_R)<<8|(OP_1632|OP_R_MOD) 3599 00000C1F 7403 <1> je ac06_j1 ; (hack) for IMUL instruction 3600 00000C21 83C70C <1> add di, byte OPRND_size 3601 <1> ; -> next operand 3602 <1> ac06_j1: 3603 00000C24 EBA5 <1> jmp ac06 ; back for more 3604 <1> 3605 <1> ac09_internal_error: 3606 00000C26 BA[BB70] <1> mov dx, msg.aa_internal_error 3607 00000C29 E890B1 <1> call putsz 3608 <1> ac09: 3609 <1> ac01_j1: 3610 00000C2C E91BFF <1> jmp ac01 ; back to next possibility 3611 <1> 3612 <1> ; End of operand list. 3613 <1> ac10: 3614 00000C2F 803DFF <1> cmp byte [di+OPRND.flags], -1 3615 00000C32 75F8 <1> jne ac09 ; if too many operands were given 3616 <1> 3617 <1> ; Final check on sizes 3618 00000C34 A0[A681] <1> mov al, byte [varflags] 3619 00000C37 A810 <1> test al, VAR_SIZ_NEED 3620 00000C39 7414 <1> jz ac12 ; if no size needed 3621 00000C3B A804 <1> test al, VAR_SIZ_GIVN 3622 00000C3D 7510 <1> jnz ac12 ; if a size was given 3623 00000C3F A808 <1> test al, VAR_SIZ_FORCD 3624 00000C41 74E9 <1> jz ac09 ; if the size was not forced ( ==> reject) 3625 00000C43 8B36[9881] <1> mov si, word [mneminfo] 3626 00000C47 803CFF <1> cmp byte [si], ASM_END 3627 00000C4A 7403 <1> je ac12 ; if this is the last one 3628 <1> ac11: 3629 00000C4C E90CFB <1> jmp aa13a ; it was not, error --> (not a retry) 3630 <1> 3631 <1> ; Check other prefixes. 3632 <1> ac12: 3633 00000C4F A0[9681] <1> mov al, byte [aa_saved_prefix] 3634 00000C52 3C00 <1> cmp al, 0 3635 00000C54 7421 <1> je ac14 ; if no saved prefixes to check 3636 00000C56 3CF0 <1> cmp al, 0F0h 3637 00000C58 7509 <1> jne ac13 ; if it's a rep prefix 3638 00000C5A F606[A681]01 <1> test byte [varflags], VAR_LOCKABLE 3639 00000C5F 74EB <1> jz ac11 ; if this variant is not lockable, error --> 3640 00000C61 EB14 <1> jmp short ac14 ; done 3641 <1> 3642 <1> ac13: 3643 00000C63 A1[AA81] <1> mov ax, word [a_opcode] ; check if opcode is OK for rep{,z,nz} 3644 00000C66 24FE <1> and al, ~1 ; clear low order bit (MOVSW -> MOVSB) 3645 <1> 3646 00000C68 3DFF00 <1> cmp ax, 0FFh 3647 00000C6B 77DF <1> ja ac11 ; if it's not a 1-byte instruction, error --> 3648 00000C6D BF[2B11] <1> mov di, replist ; list of instructions that go with rep 3649 00000C70 B90700 <1> mov cx, REP_LEN ; scan all (REP + REPxx) 3650 00000C73 F2AE <1> repne scasb 3651 00000C75 75D5 <1> jne ac11 ; if it's not among them, error --> 3652 <1> 3653 <1> ac14: 3654 00000C77 F606[9581]10 <1> test byte [asm_mn_flags], AMF_MSEG 3655 00000C7C 7412 <1> jz ac15 ; if no segment prefix before mnemonic --> 3656 00000C7E A1[AA81] <1> mov ax, word [a_opcode] ; check if opcode allows this 3657 00000C81 3DFF00 <1> cmp ax, 0FFh 3658 00000C84 77C6 <1> ja ac11 ; if it's not a 1-byte instruction, error --> 3659 00000C86 BF[2211] <1> mov di, segprfxtab 3660 00000C89 B90900 <1> mov cx, SEGP_LEN 3661 00000C8C F2AE <1> repne scasb 3662 00000C8E 75BC <1> jne ac11 ; if it's not in the list, error --> 3663 <1> 3664 <1> ac15: 3665 00000C90 8B1E[9E81] <1> mov bx, word [immaddr] 3666 00000C94 09DB <1> or bx, bx 3667 00000C96 740C <1> jz ac16 ; if no immediate data 3668 00000C98 A0[A581] <1> mov al, byte [opsize] 3669 00000C9B F6D8 <1> neg al 3670 00000C9D D0E0 <1> shl al, 1 3671 00000C9F 844707 <1> test al, byte [bx+7] 3672 00000CA2 75A8 <1> jnz ac11 ; if the immediate data was too big, error --> 3673 <1> 3674 <1> ; Put the instruction together 3675 <1> ; (maybe is this why they call it an assembler) 3676 <1> 3677 <1> ; First, the prefixes (including preceding WAIT instruction) 3678 <1> ac16: 3679 00000CA4 66 <1> _386_PM_o32 ; mov edi, dword [a_addr] 3680 00000CA5 8B3E[000B] <1> mov di, word [a_addr] 3681 00000CA9 8E06[040B] <1> mov es, word [a_addr + saSegSel] 3682 00000CAD F606[9581]02 <1> test byte [asm_mn_flags], AMF_WAIT 3683 00000CB2 7404 <1> jz .nowaitprefix ; if no wait instruction beforehand 3684 00000CB4 B09B <1> mov al, 9Bh 3685 00000CB6 67 <1> _386_PM_a32 3686 00000CB7 AA <1> stosb 3687 <1> .nowaitprefix: 3688 <1> 3689 00000CB8 A0[9681] <1> mov al,[aa_saved_prefix] 3690 00000CBB 84C0 <1> test al, al 3691 00000CBD 7402 <1> jz .noprefix ; if no LOCK or REP prefix 3692 00000CBF 67 <1> _386_PM_a32 3693 00000CC0 AA <1> stosb 3694 <1> .noprefix: 3695 <1> 3696 <1> ;--- a 67h address size prefix is needed 3697 <1> ;--- 1. for CS16: if AMF_ADDR=1 and AMF_A32=1 3698 <1> ;--- 2. for CS32: if AMF_ADDR=1 and AMF_A32=0 3699 <1> 3700 00000CC1 A0[9581] <1> mov al, byte [asm_mn_flags] 3701 00000CC4 A880 <1> test al, AMF_ADDR 3702 00000CC6 7410 <1> jz .noaddressprefix 3703 00000CC8 2404 <1> and al, AMF_A32 3704 <1> %if _PM 3705 00000CCA 0A06[DB88] <1> or al, byte [bCSAttr] 3706 00000CCE 7408 <1> jz .noaddressprefix ; if 16-bit CS and 16-bit addressing --> 3707 00000CD0 3C44 <1> cmp al, AMF_A32| 40h 3708 00000CD2 7404 <1> jz .noaddressprefix ; if 32-bit CS and 32-bit addressing --> 3709 <1> %else 3710 <1> jz .noaddressprefix ; 16-bit addressing in RM --> 3711 <1> %endif 3712 <1> ; Otherwise, the CS and addressing bitness mismatch. Write a prefix. 3713 00000CD4 B067 <1> mov al, 67h 3714 00000CD6 67 <1> _386_PM_a32 3715 00000CD7 AA <1> stosb ; store address size prefix 3716 <1> .noaddressprefix: 3717 <1> 3718 <1> ;--- a 66h data size prefix is needed 3719 <1> ;--- for CS16: if VAR_D32 == 1 or AMF_D32 == 1 3720 <1> ;--- for CS32: if VAR_D16 == 1 or AMF_D16 == 1 3721 <1> 3722 00000CD8 8A26[9581] <1> mov ah, byte [asm_mn_flags] 3723 00000CDC A0[A681] <1> mov al, byte [varflags] 3724 <1> %if _PM 3725 00000CDF F606[DB88]40 <1> test byte [bCSAttr], 40h 3726 00000CE4 7407 <1> jz .dataprefix_rm 3727 00000CE6 A92040 <1> test ax, VAR_D16|(AMF_D16<<8) 3728 00000CE9 7507 <1> jnz .dataprefix 3729 00000CEB EB09 <1> jmp short .nodataprefix 3730 <1> .dataprefix_rm: 3731 <1> %endif 3732 00000CED A94001 <1> test ax, VAR_D32|(AMF_D32<<8) 3733 00000CF0 7404 <1> jz .nodataprefix 3734 <1> .dataprefix: 3735 00000CF2 B066 <1> mov al, 66h 3736 00000CF4 67 <1> _386_PM_a32 3737 00000CF5 AA <1> stosb ; store operand size prefix 3738 <1> .nodataprefix: 3739 <1> 3740 00000CF6 A0[9781] <1> mov al, [aa_seg_pre] 3741 00000CF9 3C00 <1> cmp al, 0 3742 00000CFB 740B <1> je ac22 ; if no segment prefix 3743 00000CFD 67 <1> _386_PM_a32 3744 00000CFE AA <1> stosb 3745 00000CFF 3C64 <1> cmp al, 64h 3746 00000D01 7205 <1> jb ac22 ; if not 64 or 65 (FS or GS) --> 3747 00000D03 800E[9581]20 <1> or byte [asm_mn_flags], AMF_FSGS ; flag it 3748 <1> ac22: 3749 <1> 3750 <1> ; Now emit the instruction itself. 3751 00000D08 A1[AA81] <1> mov ax, word [a_opcode] 3752 00000D0B 89C3 <1> mov bx, ax 3753 00000D0D 81EB4002 <1> sub bx, 240h 3754 00000D11 7317 <1> jae ac23 ; if 576.. (AGRP) --> 3755 00000D13 3D0002 <1> cmp ax, 200h 3756 00000D16 7229 <1> jb ac24 ; if regular instruction --> 3757 00000D18 800E[A381]01 <1> or byte [dmflags], DM_COPR ; flag it as an x87 instruction 3758 00000D1D 2438 <1> and al, 38h ; get register part 3759 00000D1F 0806[9C81] <1> or byte [regmem], al 3760 00000D23 93 <1> xchg ax, bx ; mov ax, bx (the low bits of bx are good) 3761 00000D24 2407 <1> and al, 7 3762 00000D26 0CD8 <1> or al, 0D8h 3763 00000D28 EB21 <1> jmp short ac25 ; on to decoding the instruction 3764 <1> 3765 <1> ac23: 3766 00000D2A 800E[A681]02 <1> or byte [varflags], VAR_MODRM ; flag presence of ModR/M byte 3767 00000D2F B103 <1> mov cl, 3 ; one instruction of a group 3768 00000D31 D3EB <1> shr bx, cl ; separate AGRP()'s num part 3769 00000D33 2407 <1> and al, 7 ; separate ModR/M register value 3770 00000D35 D2E0 <1> shl al, cl 3771 00000D37 0806[9C81] <1> or byte [regmem], al ; fix ModR/M byte 3772 00000D3B D1E3 <1> shl bx, 1 3773 00000D3D 8B87[7801] <1> mov ax, word [agroups+bx] ; get actual opcode 3774 <1> 3775 <1> ac24: 3776 00000D41 84E4 <1> test ah, ah 3777 00000D43 7406 <1> jz ac25 ; if no 0Fh first --> 3778 00000D45 50 <1> push ax ; store a 0Fh 3779 00000D46 B00F <1> mov al, 0Fh 3780 00000D48 67 <1> _386_PM_a32 3781 00000D49 AA <1> stosb 3782 00000D4A 58 <1> pop ax 3783 <1> ac25: 3784 00000D4B 0A06[A481] <1> or al, byte [opcode_or] ; put additional bits into the opcode 3785 00000D4F 67 <1> _386_PM_a32 3786 00000D50 AA <1> stosb ; store the op code itself 3787 <1> 3788 <1> ; Now store the extra stuff that comes with the instruction. 3789 00000D51 A1[9C81] <1> mov ax, word [regmem] 3790 00000D54 F606[A681]02 <1> test byte [varflags], VAR_MODRM 3791 00000D59 740D <1> jz ac26 ; if no ModR/M --> 3792 00000D5B 67 <1> _386_PM_a32 3793 00000D5C AA <1> stosb ; store the ModR/M byte 3794 00000D5D F606[9581]08 <1> test byte [asm_mn_flags], AMF_SIB 3795 00000D62 7404 <1> jz ac26 ; if no SIB --> 3796 00000D64 88E0 <1> mov al, ah 3797 00000D66 67 <1> _386_PM_a32 3798 00000D67 AA <1> stosb ; store the SIB byte, too 3799 <1> ac26: 3800 <1> 3801 00000D68 8B1E[9A81] <1> mov bx, word [rmaddr] 3802 00000D6C 85DB <1> test bx, bx 3803 00000D6E 740D <1> jz ac27 ; if no offset associated with the R/M --> 3804 00000D70 66 <1> _386_PM_o32 ; xor ecx, ecx 3805 00000D71 31C9 <1> xor cx, cx 3806 00000D73 8A4F03 <1> mov cl, byte [bx+OPRND.sizedis] 3807 00000D76 66 <1> _386_PM_o32 ; lea esi, [bx+OPRND.num] 3808 00000D77 8D7708 <1> lea si, [bx+OPRND.num] 3809 00000D7A 67 <1> _386_PM_a32 3810 00000D7B F3A4 <1> rep movsb ; store the R/M offset (or memory offset) 3811 <1> ac27: 3812 <1> 3813 <1> ; Now store immediate data 3814 00000D7D 8B1E[9E81] <1> mov bx, word [immaddr] 3815 00000D81 85DB <1> test bx, bx 3816 00000D83 740E <1> jz ac28 ; if no immediate data --> 3817 00000D85 66 <1> _386_PM_o32 ; xor ecx, ecx 3818 00000D86 31C9 <1> xor cx, cx 3819 00000D88 8A0E[A581] <1> mov cl, byte [opsize] 3820 00000D8C 66 <1> _386_PM_o32 ; lea esi, [bx+OPRND.num] 3821 00000D8D 8D7708 <1> lea si, [bx+OPRND.num] 3822 00000D90 67 <1> _386_PM_a32 3823 00000D91 F3A4 <1> rep movsb 3824 <1> ac28: 3825 <1> 3826 <1> ; Now store additional bytes (needed for, e.g., enter instruction 3827 <1> ; and far memory address) 3828 00000D93 8B1E[A081] <1> mov bx, word [xxaddr] 3829 00000D97 85DB <1> test bx, bx 3830 00000D99 740D <1> jz ac29 ; if no additional data --> 3831 00000D9B 66 <1> _386_PM_o32 ; lea esi, [bx+OPRND.numadd] 3832 00000D9C 8D7704 <1> lea si, [bx+OPRND.numadd] 3833 00000D9F 66 <1> _386_PM_o32 ; xor eax, eax 3834 00000DA0 31C0 <1> xor ax, ax 3835 00000DA2 AC <1> lodsb 3836 00000DA3 66 <1> _386_PM_o32 ; xchg eax, ecx 3837 00000DA4 91 <1> xchg ax, cx ; (mov cx, ax) 3838 00000DA5 67 <1> _386_PM_a32 3839 00000DA6 F3A4 <1> rep movsb 3840 <1> ac29: 3841 <1> 3842 <1> ; Done emitting. Update assembler address offset. 3843 00000DA8 16 <1> push ss 3844 00000DA9 07 <1> pop es ; restore es 3845 00000DAA 66 <1> _386_PM_o32 ; mov dword [a_addr], edi 3846 00000DAB 893E[000B] <1> mov word [a_addr], di 3847 <1> 3848 <1> ; Compute machine type. 3849 00000DAF 803E[A281]03 <1> cmp byte [dismach], 3 3850 00000DB4 7313 <1> jae ac31 ; if we already know a 386 is needed 3851 00000DB6 F606[9581]25 <1> test byte [asm_mn_flags], AMF_D32 | AMF_A32 | AMF_FSGS 3852 00000DBB 7507 <1> jnz ac30 ; if 386 --> 3853 00000DBD F606[A681]40 <1> test byte [varflags], VAR_D32 3854 00000DC2 7405 <1> jz ac31 ; if not 386 --> 3855 <1> ac30: 3856 00000DC4 C606[A281]03 <1> mov byte [dismach], 3 3857 <1> ac31: 3858 00000DC9 BF[AE81] <1> mov di, a_obstab ; info on this instruction 3859 00000DCC 8B0E[AC81] <1> mov cx, word [a_opcode2] 3860 00000DD0 E8224B <1> call showmach ; get machine message into si, length into cx 3861 00000DD3 E308 <1> jcxz ac33 ; if no message 3862 <1> 3863 <1> ac32: 3864 00000DD5 BF[0E08] <1> mov di, line_out 3865 00000DD8 F3A4 <1> rep movsb ; copy the line to line_out 3866 00000DDA E861AC <1> call putsline_crlf 3867 <1> 3868 <1> ac33: 3869 00000DDD E95FF7 <1> jmp aa01 ; back for the next input line 3870 <1> 3871 <1> %if 0 3872 <1> ; This is debugging code. It assumes that the original value 3873 <1> ; of a_addr is on the top of the stack. 3874 <1> pop si ; get orig. a_addr 3875 <1> mov ax, word [a_addr + saSegSel] 3876 <1> mov word [u_addr], si 3877 <1> mov word [u_addr + saSegSel], ax ; (doesn't work with 32-bit CS) 3878 <1> %if _PM 3879 <1> mov ax, word [a_addr + saSegment] 3880 <1> mov word [u_addr + saSegment], ax 3881 <1> mov ax, word [a_addr + saSelector] 3882 <1> mov word [u_addr + saSelector], ax 3883 <1> %endif 3884 <1> mov bx, word [a_addr] 3885 <1> sub bx, si 3886 <1> mov di, line_out 3887 <1> mov cx, 10 3888 <1> mov al, ' ' 3889 <1> rep stosb 3890 <1> mov ds, word [a_addr + saSegSel] 3891 <1> 3892 <1> ax1: lodsb 3893 <1> call hexbyte ; display the generated bytes 3894 <1> dec bx 3895 <1> jnz ax1 3896 <1> push ss 3897 <1> pop ds 3898 <1> call putsline_crlf 3899 <1> and word [disflags], 0 3900 <1> call disasm ; disassemble the new instruction 3901 <1> jmp aa01 ; back to next input line 3902 <1> %endif 3903 <1> 3904 <1> ; Routines to check for specific operand types. 3905 <1> ; Upon success, the routine returns. 3906 <1> ; Upon failure, it pops the return address and jumps to ac01. 3907 <1> ; The routines must preserve si and di. 3908 <1> 3909 <1> ; OP_RM, OP_M, OP_R_MOD: form MOD R/M byte. 3910 <1> aop_rm: 3911 <1> aop_m: 3912 <1> aop_r_mod: 3913 00000DE0 E86903 <1> call ao90 ; form reg/mem byte 3914 00000DE3 EB30 <1> jmp short ao07 ; go to the size check 3915 <1> 3916 <1> ; OP_R: register. 3917 <1> aop_r: 3918 00000DE5 8A4504 <1> mov al, byte [di+OPRND.reg1] ; register number 3919 00000DE8 2407 <1> and al, 7 3920 00000DEA B103 <1> mov cl, 3 3921 00000DEC D2E0 <1> shl al, cl ; shift it into place 3922 00000DEE 0806[9C81] <1> or byte [regmem], al ; put it into the reg/mem byte 3923 00000DF2 EB21 <1> jmp short ao07 ; go to the size check 3924 <1> 3925 <1> ; OP_R_ADD: register, added to the instruction. 3926 <1> aop_r_add: 3927 00000DF4 8A4504 <1> mov al, byte [di+OPRND.reg1] 3928 00000DF7 2407 <1> and al, 7 3929 00000DF9 A2[A481] <1> mov byte [opcode_or], al ; put it there 3930 00000DFC EB17 <1> jmp short ao07 ; go to the size check 3931 <1> 3932 <1> ; OP_IMM: immediate data. 3933 <1> aop_imm: 3934 00000DFE 893E[9E81] <1> mov word [immaddr], di ; save the location of this 3935 00000E02 EB11 <1> jmp short ao07 ; go to the size check 3936 <1> 3937 <1> ; OP_MOFFS: just the memory offset 3938 <1> aop_moffs: 3939 00000E04 F60502 <1> test byte [di+OPRND.flags], ARG_MODRM 3940 00000E07 754F <1> jnz ao11 ; if MOD R/M byte ( ==> reject) 3941 00000E09 893E[9A81] <1> mov word [rmaddr], di ; save the operand pointer 3942 00000E0D EB06 <1> jmp short ao07 ; go to the size check 3943 <1> 3944 <1> ; OP_AX: check for AL/AX/EAX 3945 <1> aop_ax: 3946 00000E0F F6450407 <1> test byte [di+OPRND.reg1], 7 3947 00000E13 7543 <1> jnz ao11 ; if wrong register, reject --> 3948 <1> ; jmp short ao07 ; go to the size check 3949 <1> 3950 <1> ; Size check 3951 <1> ao07: 3952 00000E15 800E[A681]10 <1> or byte [varflags], VAR_SIZ_NEED 3953 00000E1A A0[A881] <1> mov al, byte [a_reqsize] 3954 00000E1D 2C05 <1> sub al, 5 ; OP_1632 >> 4 3955 00000E1F 7C3A <1> jl ao12 ; if OP_ALL 3956 00000E21 7463 <1> je ao13 ; if OP_1632 3957 00000E23 3C05 <1> cmp al, 5 ; OP_1632_DEFAULT ? 3958 00000E25 7444 <1> je ao_1632_default 3959 <1> ; OP_8 = 1, OP_16 = 2, OP_32 = 3, OP_64 = 4 3960 00000E27 04FD <1> add al, -3 3961 00000E29 1403 <1> adc al, 3 ; convert 3 --> 4 and 4 --> 5 3962 <1> ao08: 3963 00000E2B 800E[A681]18 <1> or byte [varflags], VAR_SIZ_FORCD| VAR_SIZ_NEED 3964 <1> ao08_1: 3965 00000E30 8A5D02 <1> mov bl, byte [di+OPRND.sizearg] 3966 00000E33 84DB <1> test bl, bl ; SIZ_NONE ? 3967 00000E35 7409 <1> jz ao09 ; yes, if no size given --> 3968 00000E37 800E[A681]04 <1> or byte [varflags], VAR_SIZ_GIVN 3969 00000E3C 38D8 <1> cmp al, bl 3970 00000E3E 7518 <1> jne ao11 ; if sizes conflict, reject --> 3971 <1> ao09: 3972 00000E40 3A06[A581] <1> cmp al, byte [opsize] 3973 00000E44 7411 <1> je ao10 ; if sizes agree --> 3974 00000E46 3CFF <1> cmp al, -1 ; is it OP_MXX (for lea) ? 3975 00000E48 740D <1> je ao10 3976 00000E4A 8606[A581] <1> xchg al, byte [opsize] 3977 00000E4E 3C00 <1> cmp al, SIZ_NONE 3978 00000E50 7506 <1> jne ao11 ; if sizes disagree, reject --> 3979 00000E52 800E[A681]04 <1> or byte [varflags], VAR_SIZ_GIVN ; added in DEBUG/X 1.18 3980 <1> ao10: 3981 00000E57 C3 <1> retn 3982 <1> 3983 <1> ao11: 3984 <1> ao50_j1: 3985 00000E58 E9DE02 <1> jmp ao50 ; reject 3986 <1> 3987 <1> ; OP_ALL - Allow all sizes. 3988 <1> ao12: 3989 00000E5B 8A4502 <1> mov al, byte [di+OPRND.sizearg] 3990 00000E5E 3C01 <1> cmp al, SIZ_BYTE 3991 00000E60 743F <1> je ao15 ; if byte 3992 00000E62 7225 <1> jb ao14 ; if unknown (SIZ_NONE) --> 3993 00000E64 800E[A481]01 <1> or byte [opcode_or], 1 ; set bit in instruction 3994 00000E69 EB1E <1> jmp short ao14 ; if size is 16 or 32 3995 <1> 3996 <1> ; OP_1632_DEFAULT 3997 <1> ao_1632_default: 3998 00000E6B 8A4502 <1> mov al, byte [di+OPRND.sizearg] 3999 00000E6E 84C0 <1> test al, al ; SIZ_NONE ? 4000 00000E70 751B <1> jnz @F ; no --> 4001 00000E72 A0[A581] <1> mov al, byte [opsize] ; (for push imm16/32) 4002 00000E75 84C0 <1> test al, al ; SIZ_NONE ? 4003 00000E77 7514 <1> jnz @F ; no --> 4004 00000E79 B002 <1> mov al, SIZ_WORD 4005 <1> %if _PM 4006 00000E7B F606[DB88]40 <1> test byte [bCSAttr], 40h 4007 00000E80 740B <1> jz @F 4008 00000E82 B004 <1> mov al, SIZ_DWORD 4009 <1> %endif 4010 00000E84 EB07 <1> jmp @F 4011 <1> 4012 <1> ; OP_1632 - word or dword. 4013 <1> ao13: 4014 00000E86 8A4502 <1> mov al, byte [di+OPRND.sizearg] 4015 <1> ao14: 4016 00000E89 84C0 <1> test al, al ; SIZ_NONE ? 4017 00000E8B 741B <1> jz ao16 ; yes, if still unknown --> 4018 <1> @@: 4019 00000E8D 3C02 <1> cmp al, SIZ_WORD 4020 00000E8F 7507 <1> jne ao15_1 ; if word 4021 00000E91 800E[A681]20 <1> or byte [varflags], VAR_D16 4022 00000E96 EB09 <1> jmp short ao15 4023 <1> ao15_1: 4024 00000E98 3C04 <1> cmp al, SIZ_DWORD 4025 00000E9A 75BC <1> jne ao11 ; if not dword 4026 00000E9C 800E[A681]40 <1> or byte [varflags], VAR_D32 ; set flag 4027 <1> ao15: 4028 00000EA1 800E[A681]04 <1> or byte [varflags], VAR_SIZ_GIVN 4029 <1> ; hack for pushd/pushw imm: check for match 4030 00000EA6 EB98 <1> jmp ao09 4031 <1> ao16: 4032 00000EA8 C3 <1> retn 4033 <1> 4034 <1> ; OP_M64 - 64-bit memory reference. 4035 <1> ; OP_MFLOAT - single-precision floating point memory reference. 4036 <1> ; OP_MDOUBLE - double-precision floating point memory reference. 4037 <1> ; OP_M80 - 80-bit memory reference. 4038 <1> ; OP_MXX - memory reference, size unknown. 4039 <1> ; INP: (from ac08 calling this:) 4040 <1> ; bx = index into bittab 4041 <1> ao17: 4042 00000EA9 E8A002 <1> call ao90 ; form reg/mem byte 4043 00000EAC 8A87[8D82] <1> mov al, byte [asm_siznum + bx - (OP_FIRST_ASM_SIZNUM + 16 - 1)] 4044 00000EB0 E978FF <1> jmp ao08 ; check size 4045 <1> 4046 <1> ; OP_FARIMM - far address contained in instruction 4047 <1> ao21: 4048 00000EB3 8A4502 <1> mov al, byte [di+OPRND.sizearg] 4049 00000EB6 84C0 <1> test al, al ; have a size ? (check for not SIZ_NONE) 4050 00000EB8 750B <1> jnz @F ; yes --> 4051 00000EBA B002 <1> mov al, SIZ_WORD ; default to word, assuming 16-bit CS 4052 <1> %if _PM 4053 00000EBC F606[DB88]40 <1> test byte [bCSAttr], 40h; is it a 32-bit CS ? 4054 00000EC1 7402 <1> jz @F ; no --> 4055 00000EC3 B004 <1> mov al, SIZ_DWORD ; yes, default to dword 4056 <1> %endif 4057 <1> 4058 <1> @@: 4059 00000EC5 3C02 <1> cmp al, SIZ_WORD ; is it word ? 4060 00000EC7 750D <1> jne .o32_check ; no, check for dword size --> 4061 <1> .o16: 4062 00000EC9 800E[A681]20 <1> or byte [varflags], VAR_D16 4063 <1> ; mark flag for o16 prefix if needed 4064 <1> 4065 00000ECE 837D0A00 <1> cmp word [di+OPRND.num+2], byte 0 4066 00000ED2 7504 <1> jne ..@ao50_j_NZ ; if not a 16-bit offset --> 4067 <1> 4068 00000ED4 EB0C <1> jmp short .common 4069 <1> 4070 <1> .o32_check: 4071 00000ED6 3C04 <1> cmp al, SIZ_DWORD ; is it dword ? 4072 <1> ..@ao50_j_NZ: 4073 00000ED8 7403E95C02 <1> jne ao50 ; no, invalid --> 4074 <1> .o32: 4075 00000EDD 800E[A681]40 <1> or byte [varflags], VAR_D32 4076 <1> ; mark flag for o32 prefix if needed 4077 <1> 4078 <1> .common: 4079 00000EE2 800E[A681]04 <1> or byte [varflags], VAR_SIZ_GIVN 4080 <1> 4081 00000EE7 C6450402 <1> mov byte [di+OPRND.numadd], 2 ; 2 additional bytes (segment part) 4082 00000EEB 893E[9E81] <1> mov word [immaddr], di 4083 00000EEF A2[A581] <1> mov byte [opsize], al ; size of offset, 2 or 4 4084 <1> ao22a: 4085 00000EF2 893E[A081] <1> mov word [xxaddr], di 4086 00000EF6 C3 <1> retn 4087 <1> 4088 <1> ; OP_REL8 - relative address 4089 <1> ao23: 4090 00000EF7 807D0200 <1> cmp byte [di+OPRND.sizearg], SIZ_NONE 4091 00000EFB 75DB <1> jne ..@ao50_j_NZ 4092 <1> 4093 00000EFD 66 <1> _386_PM_o32 4094 00000EFE A1[000B] <1> mov ax, word [a_addr] ; offset 4095 00000F01 66 <1> _386_PM_o32 4096 00000F02 40 <1> inc ax 4097 00000F03 66 <1> _386_PM_o32 4098 00000F04 40 <1> inc ax ; $ 4099 00000F05 8A0E[9581] <1> mov cl, byte [asm_mn_flags] 4100 <1> 4101 00000F09 F6C180 <1> test cl, AMF_ADDR 4102 00000F0C 7517 <1> jnz ao23aa 4103 <1> ; JxCXZ, LOOPx, LOOPZx and LOOPNZx need a 67h, not a 66h prefix 4104 00000F0E F6C141 <1> test cl, AMF_D32 | AMF_D16 4105 00000F11 7422 <1> jz ao23b ; if not JxCXZ, LOOPx 4106 00000F13 F6C101 <1> test cl, AMF_D32 4107 00000F16 7403 <1> jz ao23a 4108 00000F18 80C904 <1> or cl, AMF_A32 4109 <1> ao23a: 4110 00000F1B 80E1BE <1> and cl, ~(AMF_D32 | AMF_D16) 4111 00000F1E 80C980 <1> or cl, AMF_ADDR 4112 00000F21 880E[9581] <1> mov byte [asm_mn_flags], cl 4113 <1> ao23aa: 4114 00000F25 80E104 <1> and cl, AMF_A32 4115 <1> %if _PM 4116 00000F28 0A0E[DB88] <1> or cl, byte [bCSAttr] 4117 00000F2C 7407 <1> jz ao23b ; 16-bit CS and addressing --> 4118 00000F2E 80F944 <1> cmp cl, AMF_A32| 40h 4119 00000F31 7402 <1> je ao23b ; 32-bit CS and addressing --> 4120 <1> %else 4121 <1> jz ao23b ; RM CS and 16-bit addressing --> 4122 <1> %endif 4123 00000F33 66 <1> _386_PM_o32 4124 00000F34 40 <1> inc ax ; adjust $ for the prefix that will be used 4125 <1> ao23b: 4126 00000F35 89C3 <1> mov bx, ax 4127 00000F37 31C9 <1> xor cx, cx 4128 00000F39 6650 <1> _386_PM push eax 4129 00000F3B 58 <1> _386_PM pop ax 4130 00000F3C 59 <1> _386_PM pop cx 4131 00000F3D 8B4508 <1> mov ax, word [di+OPRND.num+0] 4132 00000F40 8B550A <1> mov dx, word [di+OPRND.num+2] 4133 00000F43 29D8 <1> sub ax, bx 4134 00000F45 19CA <1> sbb dx, cx 4135 <1> 4136 00000F47 884505 <1> mov byte [di+OPRND.num2], al 4137 00000F4A 3D8000 <1> cmp ax, 80h ; just one byte beyond range ? 4138 00000F4D 750E <1> jne @F 4139 00000F4F 85D2 <1> test dx, dx 4140 00000F51 750A <1> jnz @F ; no --> 4141 00000F53 803C22 <1> cmp byte [si], OP_E_CX ; we're trying for loop with (e)cx explicit ? 4142 00000F56 7505 <1> jne @F ; no --> 4143 00000F58 800D80 <1> setopt [di + OPRND.flags], ARG_ECX_SPECIAL 4144 <1> ; remember that we have to overflow 4145 00000F5B EB0C <1> jmp @FF 4146 <1> @@: 4147 00000F5D B107 <1> mov cl, 7 4148 00000F5F D2F8 <1> sar al, cl 4149 00000F61 38E0 <1> cmp al, ah 4150 00000F63 7575 <1> jne ao24 ; if too big, reject --> 4151 00000F65 39D0 <1> cmp ax, dx 4152 00000F67 7571 <1> jne ao24 ; if too big, reject --> 4153 <1> @@: 4154 00000F69 C6450401 <1> mov byte [di+OPRND.numadd], 1 ; save the length 4155 00000F6D EB83 <1> jmp short ao22a ; save it away 4156 <1> 4157 <1> 4158 <1> ; OP_REL1632: relative jump/call to a longer address. 4159 <1> ; 4160 <1> ; size of instruction is 4161 <1> ; a) CS 16-bit: 4162 <1> ; 3 (xx xxxx, near jmp/call E9/E8) or 4163 <1> ; 4 (0F xx xxxx, near jcc 0F 80+cc) 4164 <1> ; 6 (66 xx xxxxxxxx, near 32-bit jmp/call E9/E8) 4165 <1> ; 7 (66 0F xx xxxxxxxx, near 32-bit jcc 0F 80+cc) 4166 <1> ; 4167 <1> ; b) CS 32-bit: 4168 <1> ; 5 (xx xxxxxxxx, near jmp/call E9/E8) or 4169 <1> ; 6 (0F xx xxxxxxxx, near jcc 0F 80+cc) 4170 <1> ; 4 (66 xx xxxx, near 16-bit jmp/call E9/E8) 4171 <1> ; 5 (66 0F xx xxxx, near 16-bit jcc 0F 80+cc) 4172 <1> ao25: 4173 00000F6F 8B1E[000B] <1> mov bx, word [a_addr+0] 4174 <1> %if _PM 4175 00000F73 8B0E[020B] <1> mov cx, word [a_addr+2] 4176 <1> %else 4177 <1> xor cx, cx 4178 <1> %endif 4179 <1> 4180 00000F77 31C0 <1> xor ax, ax 4181 00000F79 8A4502 <1> mov al, byte [di+OPRND.sizearg] 4182 00000F7C 84C0 <1> test al, al ; SIZ_NONE ? 4183 00000F7E 750B <1> jnz @F ; no --> 4184 00000F80 B002 <1> mov al, SIZ_WORD ; in 16-bit CS default to word (2) 4185 <1> %if _PM 4186 00000F82 F606[DB88]40 <1> test byte [bCSAttr], 40h 4187 00000F87 7402 <1> jz @F 4188 00000F89 B004 <1> mov al, SIZ_DWORD ; in 32-bit CS default to dword (4) 4189 <1> %endif 4190 <1> @@: 4191 00000F8B 50 <1> push ax ; preserve size 4192 <1> 4193 <1> %if _PM 4194 00000F8C F606[DB88]40 <1> test byte [bCSAttr], 40h 4195 00000F91 7404 <1> jz .adjust_16bitcs 4196 <1> .adjust_32bitcs: 4197 00000F93 3C04 <1> cmp al, SIZ_DWORD ; default size ? 4198 00000F95 EB02 <1> jmp .adjust_common 4199 <1> %endif 4200 <1> 4201 <1> .adjust_16bitcs: 4202 00000F97 3C02 <1> cmp al, SIZ_WORD ; default size ? 4203 <1> .adjust_common: 4204 00000F99 7401 <1> je .adjust_done 4205 00000F9B 40 <1> inc ax ; no, increment for 66h prefix (osize) 4206 <1> .adjust_done: 4207 <1> 4208 00000F9C 40 <1> inc ax ; add size of opcode (E8h/E9h/80h+cc) 4209 <1> 4210 00000F9D 813E[AA81]0001 <1> cmp word [a_opcode], 100h 4211 <1> ; is it a 0Fh-prefixed opcode ? 4212 <1> ; (that is, a 0Fh 80h+cc conditional jump) 4213 00000FA3 7201 <1> jb @F 4214 00000FA5 40 <1> inc ax ; add size of 0Fh prefix opcode 4215 <1> @@: 4216 00000FA6 01C3 <1> add bx, ax 4217 00000FA8 83D100 <1> adc cx, byte 0 4218 00000FAB 58 <1> pop ax ; restore size (2 or 4) 4219 00000FAC 8B550A <1> mov dx, word [di+OPRND.num+2] 4220 <1> 4221 00000FAF 3C04 <1> cmp al, SIZ_DWORD 4222 00000FB1 740B <1> je ao27_1 ; if the size given was "dword" --> 4223 <1> 4224 <1> ao27: 4225 00000FB3 85D2 <1> test dx, dx 4226 00000FB5 7523 <1> jnz ao24 ; if operand is too big, reject --> 4227 00000FB7 800E[A681]20 <1> or byte [varflags], VAR_D16 4228 00000FBC EB05 <1> jmp short ao28 4229 <1> 4230 <1> ao27_1: 4231 00000FBE 800E[A681]40 <1> or byte [varflags], VAR_D32 4232 <1> 4233 <1> ao28: 4234 00000FC3 884504 <1> mov byte [di+OPRND.numadd], al ; store the size 4235 00000FC6 8B4508 <1> mov ax, word [di+OPRND.num+0] 4236 00000FC9 31C9 <1> xor cx, cx 4237 00000FCB 29D8 <1> sub ax, bx 4238 00000FCD 19CA <1> sbb dx, cx ; compute DX:AX - CX:BX 4239 00000FCF 894505 <1> mov word [di+OPRND.num2+0], ax 4240 00000FD2 895507 <1> mov word [di+OPRND.num2+2], dx 4241 00000FD5 893E[A081] <1> mov word [xxaddr], di 4242 00000FD9 C3 <1> retn 4243 <1> 4244 <1> ao24: 4245 <1> ao50_j2: 4246 00000FDA E95C01 <1> jmp ao50 ; reject 4247 <1> 4248 <1> ; OP_1CHK - The assembler can ignore this one. 4249 <1> ao29: 4250 00000FDD 58 <1> pop ax ; discard return address 4251 <1> ac06_j2: 4252 00000FDE E943FC <1> jmp ac06_j1 ; next operand 4253 <1> 4254 <1> ; OP_STI - ST(I). 4255 <1> aop_sti: 4256 00000FE1 B01E <1> mov al, REG_ST ; code for ST 4257 00000FE3 8A5D05 <1> mov bl, byte [di+OPRND.reg2] 4258 00000FE6 EB47 <1> jmp short ao38 ; to common code --> 4259 <1> 4260 <1> ; OP_MMX (previously was OP_ECX (used for LOOPx)) 4261 <1> aop_mmx: 4262 00000FE8 B01F <1> mov al, REG_MM 4263 00000FEA EB3C <1> jmp short ao37 ; to common code --> 4264 <1> 4265 <1> ; OP_MMX_MOD 4266 <1> aop_mmx_mod: 4267 00000FEC B01F <1> mov al, REG_MM 4268 00000FEE 8A5D05 <1> mov bl, byte [di+OPRND.reg2] 4269 00000FF1 80CBC0 <1> or bl, 0C0h 4270 00000FF4 EB39 <1> jmp short ao38 4271 <1> 4272 <1> ; OP_CR 4273 <1> aop_cr: 4274 00000FF6 8A4505 <1> mov al, byte [di+OPRND.reg2] ; get the index 4275 00000FF9 3C04 <1> cmp al, 4 4276 00000FFB 77DD <1> ja ao24 ; if too big, reject --> 4277 00000FFD 7505 <1> jne ao32 ; if not CR4 4278 00000FFF C606[A281]05 <1> mov byte [dismach], 5 ; CR4 is new to the 586 4279 <1> ao32: 4280 00001004 3C01 <1> cmp al, 1 4281 00001006 7506 <1> jne ao33 4282 00001008 807D0CFF <1> cmp byte [di+OPRND_size+OPRND.flags], -1 4283 0000100C 75CC <1> jne ao24 ; reject if no other arg (can't mov CR1,xx) 4284 <1> ao33: 4285 0000100E B020 <1> mov al, REG_CR ; code for CR 4286 00001010 EB16 <1> jmp short ao37 ; to common code 4287 <1> 4288 <1> ; OP_DR 4289 <1> ao34: 4290 00001012 B021 <1> mov al, REG_DR ; code for DR 4291 00001014 EB12 <1> jmp short ao37 ; to common code 4292 <1> 4293 <1> ; OP_TR 4294 <1> ao35: 4295 00001016 8A4505 <1> mov al, byte [di+OPRND.reg2] ; get the index 4296 00001019 3C03 <1> cmp al, 3 4297 0000101B 72BD <1> jb ao24 ; if too small, reject --> 4298 0000101D 3C06 <1> cmp al, 6 4299 0000101F 7305 <1> jae ao36 4300 00001021 C606[A281]04 <1> mov byte [dismach], 4 ; TR3-5 are new to the 486 4301 <1> ao36: 4302 00001026 B022 <1> mov al, REG_TR ; code for TR 4303 <1> 4304 <1> ; Common code for these weird registers. 4305 <1> ao37: 4306 00001028 8A5D05 <1> mov bl, byte [di+OPRND.reg2] 4307 0000102B B103 <1> mov cl, 3 4308 0000102D D2E3 <1> shl bl, cl 4309 <1> ao38: 4310 0000102F 081E[9C81] <1> or byte [regmem], bl 4311 00001033 800E[A681]02 <1> or byte [varflags], VAR_MODRM 4312 00001038 3A4504 <1> cmp al, byte [di+OPRND.reg1] ; check for the right numbered register 4313 0000103B 7419 <1> je ao40 ; if yes, then return 4314 <1> ao38a: 4315 0000103D E9F900 <1> jmp ao50 ; reject --> 4316 <1> 4317 <1> ; OP_SEGREG 4318 <1> ao39: 4319 00001040 8A4504 <1> mov al, byte [di+OPRND.reg1] 4320 00001043 2C18 <1> sub al, 24 4321 00001045 3C06 <1> cmp al, 6 4322 00001047 73F4 <1> jae ao38a ; if not a segment register, reject --> 4323 00001049 B103 <1> mov cl, 3 4324 0000104B D2E0 <1> shl al, cl 4325 0000104D 0806[9C81] <1> or byte [regmem], al 4326 <1> ;--- v1.26: don't force size for MOV sreg, mxx / MOV mxx, sreg 4327 00001051 800E[A681]04 <1> or byte [varflags], VAR_SIZ_GIVN 4328 <1> ao40: 4329 00001056 C3 <1> retn 4330 <1> 4331 <1> ; OP_IMMS8 - Sign-extended immediate byte (PUSH xx) 4332 <1> ao41: 4333 00001057 8026[A681]EF <1> and byte [varflags], ~VAR_SIZ_NEED ; added for v1.09. Ok? 4334 <1> ao41_extend: 4335 0000105C 8B4508 <1> mov ax, word [di+OPRND.num+0] 4336 0000105F B107 <1> mov cl, 7 4337 00001061 D2F8 <1> sar al, cl 4338 00001063 EB05 <1> jmp short ao43 ; common code 4339 <1> 4340 <1> ; OP_IMM8 - Immediate byte 4341 <1> ao42: 4342 00001065 8B4508 <1> mov ax, word [di+OPRND.num+0] 4343 00001068 B000 <1> mov al, 0 4344 <1> ao43: 4345 0000106A 38E0 <1> cmp al, ah 4346 0000106C 7403E9C800 <1> jne ao50 ; if too big, reject --> 4347 00001071 3B450A <1> cmp ax, word [di+OPRND.num+2] 4348 00001074 7403E9C000 <1> jne ao50 ; if too big, reject --> 4349 00001079 B001 <1> mov al, SIZ_BYTE 4350 0000107B E8C000 <1> call aasizchk ; check that size == 0 or 1 4351 0000107E 8A6508 <1> mov ah, byte [di+OPRND.num+0] ; store the byte, length 1 4352 00001081 894504 <1> mov word [di+OPRND.numadd], ax ; store length (0/1) + the byte 4353 00001084 893E[A081] <1> mov word [xxaddr], di 4354 <1> ao43r: 4355 00001088 C3 <1> retn 4356 <1> 4357 <1> 4358 <1> aop_e_cx: 4359 00001089 B980FB <1> mov cx, AMF_ADDR | 0 | (~AMF_A32 << 8) 4360 0000108C 837D0409 <1> cmp word [di + OPRND.reg1], REG_CX 4361 00001090 740B <1> je .a16 4362 <1> .a32: 4363 00001092 B984FF <1> mov cx, AMF_ADDR | AMF_A32 | (~0 << 8) 4364 00001095 E80500 <1> call .common 4365 00001098 B011 <1> mov al, REG_CX + 8 4366 0000109A E99600 <1> jmp ao48a 4367 <1> 4368 <1> .a16: 4369 <1> .common: 4370 0000109D 202E[9581] <1> and byte [asm_mn_flags], ch 4371 000010A1 080E[9581] <1> or byte [asm_mn_flags], cl 4372 <1> 4373 000010A5 8B1E[A081] <1> mov bx, word [xxaddr] 4374 000010A9 8A0E[9581] <1> mov cl, byte [asm_mn_flags] 4375 000010AD 80E104 <1> and cl, AMF_A32 4376 <1> %if _PM 4377 000010B0 0A0E[DB88] <1> or cl, byte [bCSAttr] 4378 000010B4 7410 <1> jz .noprefix ; 16-bit CS and addressing --> 4379 000010B6 80F944 <1> cmp cl, AMF_A32| 40h 4380 000010B9 740B <1> je .noprefix ; 32-bit CS and addressing --> 4381 <1> %else 4382 <1> jz .noprefix ; 86 Mode CS and 16-bit addressing --> 4383 <1> %endif 4384 000010BB FE4F05 <1> dec byte [bx + OPRND.num2] 4385 000010BE 7105 <1> jno .ret ; (no need to check special flag) 4386 <1> .prefix_overflow: 4387 000010C0 F60780 <1> testopt [bx + OPRND.flags], ARG_ECX_SPECIAL 4388 000010C3 7406 <1> jz .ao50 ; not special, overflow -128 to +127 4389 <1> ; special, accept +128 to +127 4390 <1> .ret: 4391 000010C5 C3 <1> retn 4392 <1> 4393 <1> .noprefix: 4394 000010C6 F60780 <1> testopt [bx + OPRND.flags], ARG_ECX_SPECIAL 4395 000010C9 74FA <1> jz .ret ; not special, no prefix 4396 <1> ; special and no prefix: reject 4397 <1> .ao50: 4398 000010CB EB6C <1> jmp ao50 4399 <1> 4400 <1> 4401 <1> ; OP_SHOSIZ - force the user to declare the size of the next operand 4402 <1> ao44: 4403 000010CD F606[A681]10 <1> test byte [varflags], VAR_SIZ_NEED 4404 000010D2 7407 <1> jz ao45 ; if no testing needs to be done 4405 000010D4 F606[A681]04 <1> test byte [varflags], VAR_SIZ_GIVN 4406 000010D9 745E <1> jz ao50 ; if size was given ( ==> reject) 4407 <1> ao45: 4408 000010DB 8026[A681]FB <1> and byte [varflags], ~VAR_SIZ_GIVN ; clear the flag 4409 000010E0 803C11 <1> cmp byte [si], OP_IMM8 4410 000010E3 7405 <1> je ao45a ; if OP_IMM8 is next, then don't set VAR_SIZ_NEED 4411 000010E5 800E[A681]10 <1> or byte [varflags], VAR_SIZ_NEED 4412 <1> ao45a: 4413 <1> 4414 <1> ; hack for pushd/pushw imm (the only OP_SHOSIZ with suffix), 4415 <1> ; set operand size to 2 for pushw, 4 for pushd. 4416 <1> ; this is checked by ao15 later so as to match. 4417 000010EA B002 <1> mov al, 2 4418 000010EC 8A26[9481] <1> mov ah, byte [aa_mnemsuffix] 4419 <1> ; 0 = normal, 'W' suffix, or 'D' suffix 4420 000010F0 80FC44 <1> cmp ah, 'D' 4421 000010F3 7407 <1> je @F ; if D, al = 2 --> 4422 000010F5 48 <1> dec ax ; al = 1 4423 000010F6 80FC57 <1> cmp ah, 'W' 4424 000010F9 7401 <1> je @F ; if W, al = 1 --> 4425 000010FB 48 <1> dec ax ; al = 0 4426 <1> @@: 4427 000010FC 00C0 <1> add al, al ; 0 = no suffix, 2 = 'W' suffix, 4 = 'D' suffix 4428 <1> ; as 0 = SIZ_NONE, 2 = SIZ_WORD, 4 = SIZ_DWORD 4429 000010FE A2[A581] <1> mov byte [opsize], al 4430 <1> ao_modifier_continue: 4431 00001101 58 <1> pop ax ; discard return address 4432 00001102 E9D9FE <1> jmp ac06_j2 ; next operand 4433 <1> 4434 <1> 4435 <1> ao_short: 4436 00001105 B001 <1> mov al, odfShort 4437 <1> ao_distance: 4438 00001107 0806[A781] <1> or byte [alloweddist], al 4439 0000110B EBF4 <1> jmp ao_modifier_continue 4440 <1> 4441 <1> ao_near: 4442 0000110D B002 <1> mov al, odfNear 4443 0000110F EBF6 <1> jmp ao_distance 4444 <1> 4445 <1> ao_far_required: 4446 00001111 F6450104 <1> test byte [di + OPRND.distflags], odfFar 4447 00001115 7422 <1> jz ao50 ; if not far, reject --> 4448 <1> ao_far: 4449 00001117 B004 <1> mov al, odfFar 4450 00001119 EBEC <1> jmp ao_distance 4451 <1> 4452 <1> 4453 <1> ; OP_1 4454 <1> ao46: 4455 0000111B 817D070101 <1> cmp word [di+OPRND.orednum], 101h 4456 <1> ; check both size and value (OPRND.num) 4457 00001120 EB15 <1> jmp short ao49 ; test it later 4458 <1> 4459 <1> ; OP_3 4460 <1> ao47: 4461 00001122 807D0200 <1> cmp byte [di + OPRND.sizearg], SIZ_NONE 4462 00001126 7511 <1> jne ao50 ; if BYTE is specified, reject this --> 4463 00001128 817D070103 <1> cmp word [di+OPRND.orednum], 301h 4464 <1> ; check both size and value (OPRND.num) 4465 0000112D EB08 <1> jmp short ao49 ; test it later 4466 <1> 4467 <1> ; OP_DX, OP_CL, OP_ST, OP_ES, ..., OP_GS 4468 <1> ; INP: (from ac08 calling this:) 4469 <1> ; bx = index into bittab 4470 <1> ao48: 4471 0000112F 8A87[6082] <1> mov al, [asm_regnum + bx - (OP_FIRST_ASM_REGNUM + 16 - 1)] 4472 <1> ao48a: 4473 00001133 98 <1> cbw 4474 00001134 3B4504 <1> cmp ax, word [di+OPRND.reg1] 4475 <1> 4476 <1> ao49: 4477 00001137 7404 <1> je ao51 4478 <1> 4479 <1> ; Reject this operand list. 4480 <1> ao50: 4481 00001139 58 <1> pop ax ; discard return address 4482 0000113A E90DFA <1> jmp ac01 ; go back to try the next alternative 4483 <1> 4484 <1> ao51: 4485 0000113D C3 <1> retn 4486 <1> 4487 <1> ; AASIZCHK - Check that the size given is 0 or AL. 4488 <1> aasizchk: 4489 0000113E 807D0200 <1> cmp byte [di+OPRND.sizearg], SIZ_NONE 4490 00001142 74F9 <1> je ao51 4491 00001144 384502 <1> cmp byte [di+OPRND.sizearg], al 4492 00001147 74F4 <1> je ao51 4493 00001149 58 <1> pop ax ; discard return address 4494 0000114A EBED <1> jmp short ao50 ; reject this list --> 4495 <1> 4496 <1> ; Do reg/mem processing. 4497 <1> ; 4498 <1> ; INP: di-> OPRND structure 4499 <1> ; CHG: ax 4500 <1> ao90: 4501 0000114C F60504 <1> test byte [di+OPRND.flags], ARG_JUSTREG 4502 0000114F 7516 <1> jnz ao92 ; if just register 4503 00001151 F60502 <1> test byte [di+OPRND.flags], ARG_MODRM 4504 00001154 7405 <1> jz ao91 ; if no precomputed MOD R/M byte 4505 00001156 8B4504 <1> mov ax, word [di+OPRND.reg1] ; get the precomputed bytes 4506 00001159 EB1A <1> jmp short ao93 ; done 4507 <1> 4508 <1> ao91: 4509 0000115B B006 <1> mov al, 6 ; convert plain displacement to MOD R/M 4510 0000115D F606[9581]04 <1> test byte [asm_mn_flags], AMF_A32 4511 00001162 7411 <1> jz ao93 ; if 16-bit addressing 4512 00001164 48 <1> dec ax 4513 00001165 EB0E <1> jmp short ao93 ; done 4514 <1> 4515 <1> ao92: 4516 00001167 8A4504 <1> mov al, byte [di+OPRND.reg1] ; convert register to MOD R/M 4517 <1> %if 1 4518 0000116A 3C1F <1> cmp al, REG_MM 4519 0000116C 7503 <1> jne .notmm 4520 0000116E 8A4505 <1> mov al, byte [di+OPRND.reg2] 4521 <1> .notmm: 4522 <1> %endif 4523 00001171 2407 <1> and al, 7 ; get low 3 bits 4524 00001173 0CC0 <1> or al, 0C0h 4525 <1> 4526 <1> ao93: 4527 00001175 0906[9C81] <1> or word [regmem], ax ; store the MOD R/M and SIB 4528 00001179 800E[A681]02 <1> or byte [varflags], VAR_MODRM ; flag its presence 4529 0000117E 893E[9A81] <1> mov word [rmaddr], di ; save a pointer 4530 00001182 C3 <1> retn ; done 4531 <1> 4532 <1> ; AAIFNUM - Determine if a number starts here 4533 <1> ; 4534 <1> ; INP: al = first character 4535 <1> ; si-> next character 4536 <1> ; OUT: CY if no number starts there 4537 <1> ; NC if a number starts there 4538 <1> ; CHG: - 4539 <1> ; 4540 <1> ; Note: Actually checks for a plus or minus sign that 4541 <1> ; is followed by a valid (hexadecimal) digit, 4542 <1> ; or just a digit without specified sign. 4543 <1> aaifnum: 4544 00001183 56 <1> push si 4545 00001184 50 <1> push ax 4546 00001185 3C2D <1> cmp al, '-' ; minus or plus sign ? 4547 00001187 7404 <1> je @F 4548 00001189 3C2B <1> cmp al, '+' 4549 0000118B 7503 <1> jne @FF ; no --> 4550 <1> @@: 4551 0000118D E8CBA7 <1> call skipwhite ; skip sign, and (if any) blanks 4552 <1> @@: 4553 00001190 3C28 <1> cmp al, '(' 4554 00001192 F9 <1> stc 4555 00001193 7404 <1> je @F 4556 00001195 2C30 <1> sub al, '0' 4557 00001197 3C0A <1> cmp al, 10 4558 <1> @@: 4559 00001199 58 <1> pop ax 4560 0000119A 7208 <1> jb @F ; if a decimal digit --> 4561 <1> 4562 0000119C 50 <1> push ax 4563 0000119D 24DF <1> and al, TOUPPER 4564 0000119F 2C41 <1> sub al, 'A' 4565 000011A1 3C06 <1> cmp al, 6 4566 000011A3 58 <1> pop ax 4567 <1> @@: 4568 000011A4 F5 <1> cmc ; carry clear <==> it's a number 4569 000011A5 5E <1> pop si 4570 000011A6 C3 <1> retn 4571 <1> 4572 <1> 4573 <1> ; AAGETI - Get a number from the input line. 4574 <1> ; 4575 <1> ; Entry AL First character of number 4576 <1> ; SI Address of next character of number 4577 <1> ; Exit DX:BX Resulting number 4578 <1> ; CL 1 if it's a byte, 2 if a word, 4 if a dword 4579 <1> ; AL Next character not in number 4580 <1> ; SI Address of next character after that 4581 <1> ; Uses AH, CH 4582 <1> aageti: 4583 <1> ; Incorporate expression evaluator here. 4584 000011A7 3C2D <1> cmp al, '-' 4585 000011A9 7416 <1> je aag1 ; if negative number --> 4586 000011AB 3C2B <1> cmp al, '+' ; (unnecessary) plus sign ? 4587 000011AD 7503 <1> jne @F ; no --> 4588 000011AF E8A9A7 <1> call skipwhite ; skip it, plus blanks 4589 <1> @@: 4590 000011B2 E84100 <1> call aag4 ; get the bare number 4591 000011B5 B90100 <1> mov cx, 1 ; set up cx 4592 000011B8 09D2 <1> or dx, dx 4593 000011BA 7536 <1> jnz aag2 ; if dword 4594 000011BC 08FF <1> or bh, bh 4595 000011BE 7534 <1> jnz aag3 ; if word 4596 000011C0 C3 <1> retn ; it's a byte 4597 <1> 4598 <1> aag1: 4599 000011C1 E897A7 <1> call skipwhite 4600 000011C4 E82F00 <1> call aag4 ; get the bare number 4601 000011C7 89D9 <1> mov cx, bx 4602 000011C9 09D1 <1> or cx, dx 4603 000011CB B90100 <1> mov cx, 1 4604 000011CE 7421 <1> jz aag1a ; if -0 4605 000011D0 F7D2 <1> not dx ; negate the answer 4606 000011D2 F7DB <1> neg bx 4607 000011D4 F5 <1> cmc 4608 000011D5 83D200 <1> adc dx, byte 0 4609 000011D8 F6C680 <1> test dh, 80h 4610 000011DB 7453 <1> jz aag7 ; if error 4611 000011DD 83FAFF <1> cmp dx, byte -1 4612 000011E0 7510 <1> jne aag2 ; if dword 4613 000011E2 F6C780 <1> test bh, 80h 4614 000011E5 740B <1> jz aag2 ; if dword 4615 000011E7 80FFFF <1> cmp bh, -1 4616 000011EA 7508 <1> jne aag3 ; if word 4617 000011EC F6C380 <1> test bl, 80h 4618 000011EF 7403 <1> jz aag3 ; if word 4619 <1> aag1a: 4620 <1> aag4.got_expr: 4621 000011F1 C3 <1> retn ; it's a byte 4622 <1> 4623 <1> aag2: 4624 000011F2 41 <1> inc cx ;return: it's a dword 4625 000011F3 41 <1> inc cx 4626 <1> aag3: 4627 000011F4 41 <1> inc cx ;return: it's a word 4628 000011F5 C3 <1> retn 4629 <1> 4630 <1> aag4: 4631 000011F6 3C28 <1> cmp al, '(' 4632 000011F8 7511 <1> jne .not_expr 4633 000011FA AC <1> lodsb ; skip opening paren 4634 000011FB E801A1 <1> call getexpression ; returns bx:dx = numerical value 4635 000011FE 87DA <1> xchg bx, dx ; dx:bx = number 4636 00001200 E859A7 <1> call skipwh0 4637 00001203 3C29 <1> cmp al, ')' 4638 00001205 AC <1> lodsb 4639 00001206 74E9 <1> je .got_expr 4640 00001208 4E <1> dec si 4641 00001209 EB25 <1> jmp aag7 4642 <1> 4643 <1> .not_expr: 4644 0000120B 31DB <1> xor bx, bx ; get the basic integer 4645 0000120D 31D2 <1> xor dx, dx 4646 0000120F E8F8A5 <1> call getnyb 4647 00001212 721C <1> jc aag7 ; if not a hex digit 4648 <1> aag5: 4649 00001214 08C3 <1> or bl, al ; add it to the number 4650 <1> @@: 4651 00001216 AC <1> lodsb 4652 00001217 3C5F <1> cmp al, '_' 4653 00001219 74FB <1> je @B 4654 0000121B E8ECA5 <1> call getnyb 4655 0000121E 72D1 <1> jc aag1a ; if done 4656 00001220 F6C6F0 <1> test dh, 0F0h 4657 00001223 750B <1> jnz aag7 ; if overflow 4658 00001225 B90400 <1> mov cx, 4 4659 <1> aag6: 4660 00001228 D1E3 <1> shl bx, 1 ; shift it by 4 4661 0000122A D1D2 <1> rcl dx, 1 4662 0000122C E2FA <1> loop aag6 4663 0000122E EBE4 <1> jmp short aag5 4664 <1> 4665 <1> aag7: 4666 00001230 E9AB92 <1> jmp error 4667 <1> 4668 <1> ; AACONVINDEX - Convert results from AAGETI and store index value 4669 <1> ; 4670 <1> ; Entry DX:BX,CL As in exit from AAGETI 4671 <1> ; DI Points to information record for this arg 4672 <1> ; Exit SS bits stored in [di+OPRND.index] 4673 <1> ; Uses DL 4674 <1> aaconvindex: 4675 00001233 80F901 <1> cmp cl, 1 4676 00001236 7517 <1> jne aacv1 ; if the number is too large 4677 00001238 80FB01 <1> cmp bl, 1 4678 0000123B 7414 <1> je aacv2 ; if 1 4679 0000123D 42 <1> inc dx 4680 0000123E 80FB02 <1> cmp bl, 2 4681 00001241 740E <1> je aacv2 ; if 2 4682 00001243 42 <1> inc dx 4683 00001244 80FB04 <1> cmp bl, 4 4684 00001247 7408 <1> je aacv2 ; if 4 4685 00001249 42 <1> inc dx 4686 0000124A 80FB08 <1> cmp bl, 8 4687 0000124D 7402 <1> je aacv2 ; if 8 4688 <1> aacv1: 4689 0000124F EBDF <1> jmp short aag7 ; error 4690 <1> 4691 <1> aacv2: 4692 00001251 885506 <1> mov byte [di+OPRND.index], dl ; save the value 4693 00001254 C3 <1> retn 4694 <1> 4695 <1> ; AAGETREG - Get register for the assembler. 4696 <1> ; 4697 <1> ; Entry DI Start of register table 4698 <1> ; CX Length of register table (or 0) 4699 <1> ; SI Address of first character in register name 4700 <1> ; Exit NC if a register was found, 4701 <1> ; SI Updated if a register was found 4702 <1> ; BX Register number, defined as in the table below 4703 <1> ; Uses AX, CX, DI 4704 <1> ; 4705 <1> ; Exit value of BX: 4706 <1> ; DI = rgnam816, CX = 27 DI = rgnam16, CX = 8 4707 <1> ; ---------------------- -------------------- 4708 <1> ; 0 .. 7: AL .. BH 0 .. 7: AX .. DI 4709 <1> ; 8 .. 15: AX .. DI 4710 <1> ; 16 .. 23: EAX..EDI 16 .. 23: EAX..EDI 4711 <1> ; 24 .. 29: ES .. GS 4712 <1> ; 30 .. 34: ST .. TR 4713 <1> ; (This has to match the REG_ equs defined in uu.asm 4714 <1> ; around rgnam816 and following.) 4715 <1> aagetreg: 4716 00001255 8B04 <1> mov ax, word [si] 4717 00001257 25DFDF <1> and ax, TOUPPER_W ; convert to upper case 4718 0000125A 3C45 <1> cmp al, 'E' ; check for EAX, etc. 4719 0000125C 7522 <1> jne aagr1 ; if not 'E' --> (NZ) 4720 0000125E 50 <1> push ax 4721 0000125F 88E0 <1> mov al, ah 4722 00001261 8A6402 <1> mov ah, byte [si+2] 4723 00001264 80E4DF <1> and ah, TOUPPER 4724 00001267 57 <1> push di 4725 00001268 BF[0288] <1> mov di, rgnam16 4726 0000126B 51 <1> push cx 4727 0000126C B90800 <1> mov cx, N_REGS16 4728 0000126F F2AF <1> repne scasw 4729 00001271 89CB <1> mov bx, cx 4730 00001273 59 <1> pop cx 4731 00001274 5F <1> pop di 4732 00001275 58 <1> pop ax 4733 00001276 7508 <1> jne aagr1 ; if no match --> (NZ) 4734 00001278 46 <1> inc si 4735 00001279 F7D3 <1> not bx 4736 0000127B 80C318 <1> add bl, 8+16 ; adjust BX 4737 0000127E EB11 <1> jmp short aagr2 ; finish up 4738 <1> 4739 <1> aagr1: ; (entered with NZ) 4740 00001280 89CB <1> mov bx, cx ; (if cx = 0, this is always reached with 4741 00001282 F2AF <1> repne scasw ; ZF clear, that is, NZ) 4742 00001284 750F <1> jne aagr3 ; if no match 4743 00001286 29CB <1> sub bx, cx 4744 00001288 4B <1> dec bx 4745 00001289 80FB10 <1> cmp bl, 16 4746 0000128C 7203 <1> jb aagr2 ; if AL .. BH or AX .. DI 4747 0000128E 80C308 <1> add bl, 8 4748 <1> aagr2: 4749 00001291 46 <1> inc si ; skip the register name 4750 00001292 46 <1> inc si 4751 00001293 F8 <1> clc 4752 00001294 C3 <1> retn 4753 <1> aagr3: 4754 00001295 F9 <1> stc ; not found 4755 00001296 C3 <1> retn 2058 %include "dd.asm" 2059 <1> 2060 <1> %if 0 2061 <1> 2062 <1> lDebug D commands - Dump data 2063 <1> 2064 <1> Copyright (C) 1995-2003 Paul Vojta 2065 <1> Copyright (C) 2008-2012 C. Masloch 2066 <1> 2067 <1> Usage of the works is permitted provided that this 2068 <1> instrument is retained with the works, so that any entity 2069 <1> that uses the works is notified of this instrument. 2070 <1> 2071 <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 2072 <1> 2073 <1> %endif 2074 <1> 2075 <1> 2076 <1> usesection lDEBUG_DATA_ENTRY 2077 <1> align 4, db 0 2078 000082B8 0000 <1> ddoffset: dw 0 ; offset word for dd 2079 <1> ; (number of skipped bytes at start of line) 2080 <1> %if _PM 2081 000082BA 0000 <1> dw 0 ; high word initialised to and fixed at zero 2082 <1> %endif 2083 000082BC 0000 <1> ddskipped: dw 0 2084 <1> %if _PM 2085 000082BE 0000 <1> dw 0 ; high word initialised to and fixed at zero 2086 <1> %endif 2087 000082C0 0100 <1> ddsize: dw 1 ; size of dd item 2088 000082C2 00 <1> ddoffset2: db 0 2089 <1> 2090 <1> 2091 <1> usesection lDEBUG_CODE 2092 <1> 2093 <1> ; D command - hex/ASCII dump. 2094 <1> ddd: 2095 <1> %if _INT || _PM || _MCB || _DSTRINGS 2096 00001297 E87579 <1> call uppercase 2097 <1> %endif 2098 0000129A 86C4 <1> xchg al, ah 2099 0000129C 8A44FE <1> mov al, byte [si - 2] 2100 0000129F E86D79 <1> call uppercase 2101 000012A2 3C44 <1> cmp al, 'D' 2102 000012A4 86C4 <1> xchg al, ah 2103 000012A6 7569 <1> jne .not_d_suffix 2104 <1> %if _DSTRINGS 2105 000012A8 3C5A <1> cmp al, 'Z' ; DZ command ? 2106 000012AA 7503E9D803 <1> je dz ; yes --> 2107 000012AF 3C24 <1> cmp al, '$' ; D$ command ? 2108 000012B1 7503E9AA03 <1> je dcpm ; yes --> 2109 000012B6 3C23 <1> cmp al, '#' ; D# command ? 2110 000012B8 7503E9BD03 <1> je dcounted ; yes --> 2111 000012BD 3C57 <1> cmp al, 'W' 2112 000012BF 750B <1> jne .notstring 2113 000012C1 50 <1> push ax 2114 000012C2 AC <1> lodsb 2115 000012C3 3C23 <1> cmp al, '#' ; DW# command ? 2116 000012C5 58 <1> pop ax 2117 000012C6 7503E9A203 <1> je dwcounted ; yes --> 2118 000012CB 4E <1> dec si 2119 <1> .notstring: 2120 <1> %endif 2121 <1> %if _INT 2122 000012CC 3C49 <1> cmp al, 'I' ; DI command ? 2123 000012CE 750D <1> jne .notdi 2124 <1> %if 1 2125 000012D0 50 <1> push ax 2126 000012D1 AC <1> lodsb 2127 000012D2 4E <1> dec si 2128 000012D3 24DF <1> and al, TOUPPER 2129 000012D5 3C50 <1> cmp al, 'P' ; distinguish 'di ...' and 'd ip' 2130 000012D7 58 <1> pop ax 2131 000012D8 7403 <1> je .notdi 2132 <1> %endif 2133 000012DA E96004 <1> jmp gateout ; yes --> 2134 <1> .notdi: 2135 <1> %endif 2136 <1> %if _PM 2137 000012DD 3C4C <1> cmp al, 'L' ; DL command ? 2138 000012DF 7503 <1> jne .notdl 2139 000012E1 E9D102 <1> jmp descout ; yes --> 2140 <1> .notdl: 2141 000012E4 3C58 <1> cmp al, 'X' ; DX command ? 2142 000012E6 0F846F0B <1> _386 je extmem ; yes --> 2143 <1> .notdx: 2144 <1> %endif 2145 <1> %if _MCB 2146 000012EA 3C4D <1> cmp al, 'M' ; DM command ? 2147 000012EC 7503 <1> jne .notdm 2148 000012EE E93F0A <1> jmp mcbout ; yes --> 2149 <1> .notdm: 2150 <1> %endif 2151 000012F1 B90100 <1> mov cx, 1 2152 000012F4 3C42 <1> cmp al, 'B' 2153 000012F6 740B <1> je .d_suffix_size 2154 000012F8 41 <1> inc cx ; = 2 2155 000012F9 3C57 <1> cmp al, 'W' 2156 000012FB 7406 <1> je .d_suffix_size 2157 000012FD 41 <1> inc cx 2158 000012FE 41 <1> inc cx ; = 4 2159 000012FF 3C44 <1> cmp al, 'D' 2160 00001301 750E <1> jne .not_d_suffix 2161 <1> .d_suffix_size: 2162 00001303 880E[C082] <1> mov byte [ddsize], cl 2163 00001307 E851A6 <1> call skipwhite 2164 0000130A E8F9A5 <1> call iseol? 2165 0000130D 7536 <1> jne dd1 ; jump to getting range --> (with new size) 2166 0000130F EB08 <1> jmp lastddd ; default range (ADS:ADO length 128), 2167 <1> ; but with new size --> 2168 <1> 2169 <1> .not_d_suffix: 2170 00001311 E848A6 <1> call skipwh0 2171 00001314 E8EFA5 <1> call iseol? 2172 00001317 7527 <1> jne dd1_bytes ; if an address was given --> (set byte size) 2173 <1> 2174 <1> lastddd: 2175 <1> ; byte [ddsize] = size already set 2176 00001319 66 <1> _386_PM_o32 ; mov edx, dword [d_addr] 2177 0000131A 8B16[0A0B] <1> mov dx, word [d_addr] ; compute range of 80h or until end of segment 2178 0000131E 66 <1> _386_PM_o32 ; mov esi, edx 2179 0000131F 89D6 <1> mov si, dx 2180 00001321 8B1E[0E0B] <1> mov bx, [d_addr + saSegSel] 2181 00001325 E80C4A <1> _386_PM call test_d_b_bit 2182 00001328 750A <1> _386_PM jnz .32 2183 0000132A 83C27F <1> add dx, byte 7Fh 2184 0000132D 733C <1> jnc dd2_0 2185 0000132F 83CAFF <1> or dx, byte -1 2186 00001332 EB37 <1> jmp short dd2_0 2187 <1> 2188 <1> %if _PM 2189 <1> [cpu 386] 2190 <1> .32: 2191 00001334 6683C27F <1> add edx, byte 7Fh 2192 00001338 7331 <1> jnc dd2_0 ; if no overflow 2193 0000133A 6683CAFF <1> or edx, byte -1 2194 0000133E EB2B <1> jmp short dd2_0 2195 <1> __CPU__ 2196 <1> %endif 2197 <1> 2198 <1> dd1_bytes: 2199 00001340 C606[C082]01 <1> mov byte [ddsize], 1 2200 <1> dd1: 2201 00001345 B98000 <1> mov cx, 80h ; default length (128 bytes) 2202 00001348 8B1E[840C] <1> mov bx, word [reg_ds] 2203 0000134C E8DB94 <1> call getrangeX ; get address range into bx:(e)dx 2204 0000134F E8C9A5 <1> call chkeol ; expect end of line here 2205 <1> 2206 00001352 891E[0E0B] <1> mov word [d_addr + saSegSel], bx 2207 <1> ; save segment (offset is saved later) 2208 <1> %if _PM 2209 00001356 E8707E <1> call ispm 2210 00001359 7506 <1> jnz .86m 2211 <1> .pm: 2212 0000135B 891E[120B] <1> mov word [d_addr + saSelector], bx 2213 0000135F EB04 <1> jmp @F 2214 <1> .86m: 2215 00001361 891E[100B] <1> mov word [d_addr + saSegment], bx 2216 <1> @@: 2217 <1> %endif 2218 00001365 66 <1> _386_PM_o32 ; mov esi, edx 2219 00001366 89D6 <1> mov si, dx ; bx:(e)si = start 2220 00001368 66 <1> _386_PM_o32 ; mov edx, ecx 2221 00001369 89CA <1> mov dx, cx ; bx:(e)dx = last 2222 <1> %if _PM && 0 2223 <1> jmp short dd2_1 2224 <1> %endif 2225 <1> 2226 <1> ; Parsing is done. Print first line. 2227 <1> dd2_0: 2228 <1> %if _PM 2229 0000136B E85B7E <1> call ispm 2230 0000136E 750B <1> jnz dd2_1 2231 <1> [cpu 286] 2232 00001370 0F00E3 <1> verr bx ; readable ? 2233 <1> __CPU__ 2234 00001373 7406 <1> jz dd2_1 2235 <1> %if 1 2236 00001375 BA[C382] <1> mov dx, .errmsg 2237 00001378 E93BAA <1> jmp putsz_error 2238 <1> usesection lDEBUG_DATA_ENTRY 2239 000082C3 5365676D656E742069- <1> .errmsg:asciz "Segment is not readable.",13,10 2239 000082CC 73206E6F7420726561- <1> 2239 000082D5 6461626C652E0D0A00 <1> 2240 <1> usesection lDEBUG_CODE 2241 <1> %else 2242 <1> mov bx, word [reg_ds] 2243 <1> mov word [d_addr + saSegSel], bx 2244 <1> %if _PM 2245 <1> call ispm 2246 <1> jnz .86m 2247 <1> .pm: 2248 <1> mov word [d_addr + saSelector], bx 2249 <1> jmp @F 2250 <1> .86m: 2251 <1> mov word [d_addr + saSegment], bx 2252 <1> @@: 2253 <1> %endif 2254 <1> %endif 2255 <1> dd2_1: 2256 <1> %endif 2257 <1> 2258 0000137B A1[C082] <1> mov ax, word [ddsize] 2259 0000137E 48 <1> dec ax ; 0 = byte, 1 = word, 3 = dword 2260 0000137F 21F0 <1> and ax, si ; how many bytes to skip at the beginning 2261 00001381 A2[C282] <1> mov byte [ddoffset2], al 2262 <1> 2263 00001384 B80100 <1> mov ax, opt2_db_header 2264 00001387 803E[C082]02 <1> cmp byte [ddsize], 2 2265 0000138C 7207 <1> jb @F 2266 0000138E B010 <1> mov al, opt2_dw_header 2267 00001390 7403 <1> je @F 2268 00001392 B80001 <1> mov ax, opt2_dd_header 2269 <1> @@: 2270 00001395 E81400 <1> call dd_header_or_trailer 2271 <1> 2272 00001398 E88700 <1> call dd_display 2273 <1> 2274 0000139B B80200 <1> mov ax, opt2_db_trailer 2275 0000139E 803E[C082]02 <1> cmp byte [ddsize], 2 2276 000013A3 7207 <1> jb @F 2277 000013A5 B020 <1> mov al, opt2_dw_trailer 2278 000013A7 7403 <1> je @F 2279 000013A9 B80002 <1> mov ax, opt2_dd_trailer 2280 <1> @@: 2281 <1> ; fall through 2282 <1> 2283 <1> 2284 <1> ; INP: ax = flag value to check 2285 <1> ; (determines whether "header" or "trailer" is written, 2286 <1> ; and which flag must be set in word [options2]) 2287 <1> ; byte [ddoffset2] = how many bytes to skip at the start 2288 <1> ; CHG: ax, cx, di 2289 <1> ; STT: ds = es = ss 2290 <1> dd_header_or_trailer: 2291 000013AC 8506[8000] <1> test word [options2], ax 2292 000013B0 746F <1> jz .ret 2293 000013B2 53 <1> push bx 2294 000013B3 56 <1> push si 2295 000013B4 52 <1> push dx 2296 <1> 2297 000013B5 B90600 <1> mov cx, msg.header.length 2298 000013B8 BA[8B68] <1> mov dx, msg.header 2299 000013BB A91101 <1> test ax, opt2_db_header | opt2_dw_header | opt2_dd_header 2300 000013BE 7506 <1> jnz @F 2301 000013C0 B90700 <1> mov cx, msg.trailer.length 2302 000013C3 BA[9268] <1> mov dx, msg.trailer 2303 <1> @@: 2304 000013C6 E8F3A9 <1> call putsz ; put initial word 2305 000013C9 F7D9 <1> neg cx ; minus length of initial word 2306 000013CB B80B00 <1> mov ax, 4 + 1 + 4 + 2 ; length of address with 16-bit offset 2307 <1> %if _PM 2308 000013CE 8B1E[0E0B] <1> mov bx, word [d_addr + saSegSel] 2309 000013D2 E85F49 <1> call test_d_b_bit ; 32-bit segment ? 2310 000013D5 7403 <1> jz .16 ; no --> 2311 000013D7 B80F00 <1> mov ax, 4 + 1 + 8 + 2 ; length of address with 32-bit offset 2312 <1> .16: 2313 <1> %endif 2314 000013DA 01C1 <1> add cx, ax ; length of address minus length of word 2315 <1> ; = length to pad 2316 000013DC B020 <1> mov al, 32 2317 000013DE BF[0E08] <1> mov di, line_out 2318 000013E1 F3AA <1> rep stosb ; pad 2319 <1> ; ch = 0 2320 <1> 2321 000013E3 B83020 <1> mov ax, '0 ' ; al = '0', ah = blank 2322 000013E6 8A0E[C282] <1> mov cl, byte [ddoffset2]; cx = ddoffset2 2323 000013EA E304 <1> jcxz @FF ; if none to skip --> 2324 <1> @@: 2325 000013EC AB <1> stosw 2326 000013ED 40 <1> inc ax ; increment the number (up to '3') 2327 000013EE E2FC <1> loop @B ; loop for skipping --> 2328 <1> @@: 2329 000013F0 2C30 <1> sub al, '0' ; = back to numerical (0 .. 3) 2330 000013F2 89C2 <1> mov dx, ax ; dl = numerical offset 2331 <1> 2332 000013F4 52 <1> push dx 2333 000013F5 BE1000 <1> mov si, 16 ; loop counter 2334 000013F8 8B1E[C082] <1> mov bx, [ddsize] ; ddsize 2335 <1> @@: 2336 000013FC 88D0 <1> mov al, dl ; next numerical offset 2337 000013FE E817A6 <1> call hexnyb ; display it 2338 00001401 89D9 <1> mov cx, bx 2339 00001403 01C9 <1> add cx, cx ; cx = 2 * ddsize 2340 00001405 B020 <1> mov al, 32 2341 00001407 F3AA <1> rep stosb ; pad to next position 2342 00001409 01DA <1> add dx, bx ; increment dl by how many positions we use 2343 0000140B 29DE <1> sub si, bx ; decrement loop counter 2344 0000140D 77ED <1> ja @B ; don't jump if si was below-or-equal-to bx 2345 0000140F 5A <1> pop dx 2346 <1> 2347 00001410 B91000 <1> mov cx, 16 ; loop counter 2348 <1> @@: 2349 00001413 88D0 <1> mov al, dl 2350 00001415 E800A6 <1> call hexnyb ; display an offset 2351 <1> ; Note that this will wrap around for the last 1, 2, or 3 2352 <1> ; characters if byte [ddoffset2] is non-zero. 2353 00001418 42 <1> inc dx ; increment offset 2354 00001419 E2F8 <1> loop @B ; loop 2355 <1> 2356 0000141B E820A6 <1> call putsline_crlf 2357 <1> 2358 0000141E 5A <1> pop dx 2359 0000141F 5E <1> pop si 2360 00001420 5B <1> pop bx 2361 <1> .ret: 2362 00001421 C3 <1> retn 2363 <1> 2364 <1> 2365 <1> ; INP: word [d_addr + saSegSel] = segment/selector to dump 2366 <1> ; (e)si = start offset 2367 <1> ; (e)dx = end offset 2368 <1> ; byte [ddsize] = 1, 2, or 4 (for byte, word, or dword) 2369 <1> ; OUT: (d)word [d_addr] updated 2370 <1> ; (e)dx = (d)word [d_addr] 2371 <1> ; displayed 2372 <1> dd_display: 2373 00001422 16 <1> push ss 2374 00001423 07 <1> pop es 2375 <1> dd2_loop: 2376 00001424 E87C2B <1> call handle_serial_flags_ctrl_c 2377 <1> 2378 00001427 C706[DA0B][1913] <1> mov word [lastcmd], lastddd 2379 <1> 2380 0000142D BF[0E08] <1> mov di, line_out ; reset di for next line 2381 00001430 E85501 <1> call dd_display_offset.masklownybble 2382 <1> ; ax = offset & ~ 0Fh 2383 <1> 2384 00001433 8B0E[C082] <1> mov cx, word [ddsize] 2385 00001437 51 <1> push cx 2386 00001438 49 <1> dec cx ; 0 = byte, 1 = word, 3 = dword 2387 00001439 21F1 <1> and cx, si ; how many bytes to skip at the beginning 2388 <1> ; eg: si = 101h, cx = 1, skip 1 byte, ax = 101h 2389 <1> ; si = 102h, cx = 3, skip 2 bytes, ax = 102h 2390 <1> ; si = 103h, cx = 3, skip 3 bytes, ax = 103h 2391 <1> ; si = 103h, cx = 1, skip 1 byte, ax = 101h 2392 <1> ; si = 10Fh, cx = 1, skip 1 byte, ax = 101h 2393 <1> ; si = 10Fh, cx = 3, skip 3 bytes, ax = 103h 2394 0000143B 01C8 <1> add ax, cx ; = where to start 2395 0000143D 890E[B882] <1> mov word [ddoffset], cx 2396 00001441 50 <1> push ax 2397 00001442 B82020 <1> mov ax, 32 << 8 | 32 2398 00001445 F3AB <1> rep stosw 2399 00001447 58 <1> pop ax 2400 00001448 59 <1> pop cx 2401 <1> 2402 00001449 BB3000 <1> mov bx, (2+1)*16 ; 16 bytes (2 digits each) 2403 0000144C 80F902 <1> cmp cl, 2 2404 0000144F 7206 <1> jb @F ; if it is 1 --> 2405 00001451 B328 <1> mov bl, (4+1)*8 ; 8 words (4 digits each) 2406 00001453 7402 <1> je @F ; if it is 2 --> 2407 <1> ; it is 4 2408 00001455 B324 <1> mov bl, (8+1)*4 ; 4 dwords (8 digits each) 2409 <1> @@: 2410 00001457 01FB <1> add bx, di 2411 00001459 E8C191 <1> call prephack ; set up for faking int vectors 23 and 24 2412 <1> 2413 0000145C 50 <1> push ax 2414 <1> ; blank the start of the line if offset isn't paragraph aligned 2415 <1> dd3: 2416 0000145D 39F0 <1> cmp ax, si ; skip to position in line 2417 0000145F 7429 <1> je dd4 ; if we're there yet 2418 00001461 7718 <1> ja .error 2419 00001463 50 <1> push ax 2420 00001464 B82020 <1> mov ax, 32 << 8| 32 2421 00001467 51 <1> push cx 2422 00001468 F3AB <1> rep stosw ; store two blanks (2 * 1) if byte, 2423 <1> ; four blanks (2 * 2) if word, 2424 <1> ; eight blanks (2 * 4) if dword 2425 0000146A 59 <1> pop cx 2426 0000146B AA <1> stosb ; store additional blank as separator 2427 0000146C 51 <1> push cx 2428 <1> @@: 2429 0000146D 268807 <1> mov byte [es:bx], al 2430 00001470 43 <1> inc bx 2431 00001471 E2FA <1> loop @B ; store as many blanks in text dump as bytes 2432 00001473 59 <1> pop cx 2433 00001474 58 <1> pop ax 2434 00001475 0306[C082] <1> add ax, word [ddsize] ; -> behind the byte/word/dword just written 2435 00001479 EBE2 <1> jmp short dd3 2436 <1> 2437 <1> 2438 <1> .error: 2439 0000147B BA[DE82] <1> mov dx, .msg_internal_error 2440 0000147E E835A9 <1> call putsz_error 2441 00001481 B80106 <1> mov ax, 0601h 2442 00001484 E89E90 <1> call setrc 2443 00001487 E976EB <1> jmp cmd3 2444 <1> 2445 <1> usesection lDEBUG_DATA_ENTRY 2446 <1> .msg_internal_error: 2447 000082DE 496E7465726E616C20- <1> asciz "Internal error in dd3.",13,10 2447 000082E7 6572726F7220696E20- <1> 2447 000082F0 6464332E0D0A00 <1> 2448 <1> usesection lDEBUG_CODE 2449 <1> 2450 <1> 2451 <1> ; Begin main loop over lines of output. 2452 <1> dd4: 2453 0000148A 58 <1> pop ax 2454 0000148B 66 <1> _386_PM_o32 ; mov ecx, eax 2455 0000148C 89C1 <1> mov cx, ax 2456 0000148E 66 <1> _386_PM_o32 2457 0000148F 83C10F <1> add cx, strict byte 0Fh 2458 00001492 7205 <1> jc @F 2459 00001494 66 <1> _386_PM_o32 ; cmp ecx, edx 2460 00001495 39D1 <1> cmp cx, dx ; compare with end address 2461 00001497 7202 <1> jb dd5 ; if we write to the end of the line --> 2462 <1> @@: 2463 <1> ;_386_PM_o32 ; mov ecx, edx 2464 00001499 89D1 <1> mov cx, dx ; only write until (e)dx, inclusive 2465 <1> dd5: 2466 <1> ;_386_PM_o32 ; sub ecx, esi 2467 0000149B 29F1 <1> sub cx, si 2468 <1> ;_386_PM_o32 ; inc ecx 2469 0000149D 41 <1> inc cx ; cx = number of bytes to print this line 2470 <1> ; up to 16. no 32-bit register required 2471 0000149E 8326[BC82]00 <1> and word [ddskipped], 0 2472 <1> 2473 000014A3 E8A591 <1> call dohack ; substitute interrupt vectors 2474 000014A6 8E1E[0E0B] <1> mov ds, word [d_addr + saSegSel] 2475 <1> 2476 <1> dd6: 2477 000014AA 36A1[C082] <1> mov ax, word [ss:ddsize] 2478 000014AE 39C8 <1> cmp ax, cx ; ddsize <= left bytes ? 2479 000014B0 7617 <1> jbe dd6_simple ; yes, display ddsize bytes --> 2480 <1> 2481 000014B2 50 <1> push ax 2482 000014B3 51 <1> push cx 2483 000014B4 57 <1> push di 2484 000014B5 F7D9 <1> neg cx ; - left bytes 2485 000014B7 01C1 <1> add cx, ax ; ddsize - left bytes = how many skipped 2486 000014B9 36890E[BC82] <1> mov word [ss:ddskipped], cx 2487 <1> 2488 000014BE 89C1 <1> mov cx, ax ; 1 = bytes, 2 = words, 4 = dwords 2489 000014C0 49 <1> dec cx ; 0 = bytes, 1 = words, 3 = dwords 2490 000014C1 B85858 <1> mov ax, 'XX' 2491 000014C4 F3AB <1> rep stosw ; fill filler digits not to be written 2492 000014C6 5F <1> pop di 2493 000014C7 59 <1> pop cx 2494 000014C8 58 <1> pop ax 2495 <1> 2496 <1> dd6_simple: 2497 000014C9 01C0 <1> add ax, ax ; 2 = bytes, 4 = words, 8 = dwords 2498 000014CB 50 <1> push ax 2499 <1> @@: 2500 000014CC 48 <1> dec ax 2501 000014CD 48 <1> dec ax 2502 <1> ; first iteration: 0 = bytes, 2 = words, 6 = dwords 2503 <1> ; second iteration: 0 = words, 4 = dwords 2504 <1> ; third iteration: (0 = 3byte,) 2 = dwords 2505 <1> ; fourth iteration: 0 = dwords 2506 000014CE 57 <1> push di 2507 000014CF 01C7 <1> add di, ax ; -> where to write next 2 hex digits 2508 000014D1 50 <1> push ax 2509 000014D2 67 <1> _386_PM_a32 2510 000014D3 AC <1> lodsb ; al = data 2511 000014D4 E8BE00 <1> call dd_store ; stores number at es:di->, char at es:bx-> 2512 000014D7 58 <1> pop ax 2513 000014D8 5F <1> pop di ; -> start of hex digits space 2514 000014D9 85C0 <1> test ax, ax ; did we write the left-most digits? 2515 000014DB E0EF <1> loopnz @B ; not yet --> (or no more bytes to display) 2516 000014DD 58 <1> pop ax ; = how many digits we wrote 2517 000014DE 01C7 <1> add di, ax ; -> after right-most digit 2518 000014E0 B020 <1> mov al, 32 2519 000014E2 AA <1> stosb ; store a blank 2520 000014E3 85C9 <1> test cx, cx 2521 000014E5 75C3 <1> jnz dd6 ; (16-bit. cx <= 16) 2522 <1> 2523 000014E7 16 <1> push ss ; restore ds 2524 000014E8 1F <1> pop ds 2525 000014E9 66 <1> _386_PM_o32 2526 000014EA 2B36[B882] <1> sub si, word [ddoffset] 2527 000014EE 66 <1> _386_PM_o32 2528 000014EF 0336[BC82] <1> add si, word [ddskipped] 2529 <1> 2530 <1> dd9: 2531 000014F3 F7C60F00 <1> test si, 0Fh ; space out till end of line 2532 000014F7 7417 <1> jz dd10 2533 000014F9 B82020 <1> mov ax, 32 << 8 | 32 2534 000014FC 8B0E[C082] <1> mov cx, word [ddsize] 2535 00001500 51 <1> push cx 2536 00001501 F3AB <1> rep stosw ; store blanks for the number 2537 00001503 AA <1> stosb ; store additional blank as separator 2538 00001504 59 <1> pop cx 2539 <1> @@: 2540 00001505 46 <1> inc si ; skip as many bytes 2541 00001506 F7C60F00 <1> test si, 0Fh 2542 0000150A 7404 <1> jz dd10 2543 0000150C E2F7 <1> loop @B 2544 0000150E EBE3 <1> jmp short dd9 2545 <1> 2546 <1> dd10: 2547 00001510 66 <1> _386_PM_o32 2548 00001511 0336[B882] <1> add si, word [ddoffset] 2549 00001515 66 <1> _386_PM_o32 2550 00001516 2B36[BC82] <1> sub si, word [ddskipped] 2551 <1> 2552 0000151A B91900 <1> mov cx, (1 + 8 * (2 + 1)) ; go back 8 bytes (2 digits each) 2553 0000151D 803E[C082]02 <1> cmp byte [ddsize], 2 2554 00001522 7206 <1> jb @F ; if it is 1 --> 2555 00001524 B115 <1> mov cl, (1 + 4 * (4 + 1)) ; go back 4 words (4 digits each) 2556 00001526 7402 <1> je @F ; if it is 2 --> 2557 <1> ; it is 4 2558 00001528 B113 <1> mov cl, (1 + 2 * (8 + 1)) ; go back 2 dwords (8 digits each) 2559 <1> @@: 2560 0000152A 29CF <1> sub di, cx 2561 0000152C C6052D <1> mov byte [di], '-' 2562 0000152F E84D91 <1> call unhack 2563 00001532 89DF <1> mov di, bx 2564 00001534 52 <1> push dx 2565 00001535 E806A5 <1> call putsline_crlf 2566 00001538 5A <1> pop dx 2567 00001539 66 <1> _386_PM_o32 ; dec esi 2568 0000153A 4E <1> dec si 2569 0000153B 66 <1> _386_PM_o32 ; cmp esi, edx 2570 0000153C 39D6 <1> cmp si, dx 2571 0000153E 66 <1> _386_PM_o32 ; inc esi 2572 0000153F 46 <1> inc si 2573 00001540 7303E9DFFE <1> jb dd2_loop ; display next line --> 2574 <1> dd11: 2575 <1> ; This check is necessary to wrap around at FFFFh (64 KiB) 2576 <1> ; for 16-bit segments instead of at FFFFFFFFh (4 GiB). 2577 00001545 8B1E[0E0B] <1> _386_PM mov bx, word [d_addr + saSegSel] 2578 <1> ; reset bx 2579 00001549 E8E847 <1> _386_PM call test_d_b_bit ; 32-bit segment ? 2580 0000154C 7401 <1> _386_PM jz .16 ; no --> 2581 0000154E 66 <1> _386_PM_o32 ; inc edx 2582 <1> .16: 2583 0000154F 42 <1> inc dx ; set up the address for the next 'D' command. 2584 00001550 66 <1> _386_PM_o32 ; mov dword [d_addr], edx 2585 00001551 8916[0A0B] <1> mov word [d_addr], dx 2586 00001555 C3 <1> retn 2587 <1> 2588 <1> 2589 <1> ; INP: (e)si = offset (to display) 2590 <1> ; (e)dx = end offset (for range check of 16-bit segment) 2591 <1> ; word [d_addr + saSegSel] = segment/selector 2592 <1> ; es:di -> where to write to 2593 <1> ; OUT: bx = segment/selector 2594 <1> dd_display_offset: 2595 <1> .: 2596 00001556 A1[0E0B] <1> mov ax, word [d_addr + saSegSel] 2597 00001559 89C3 <1> mov bx, ax 2598 0000155B E8A8A4 <1> call hexword 2599 0000155E B03A <1> mov al, ':' 2600 00001560 AA <1> stosb 2601 00001561 66 <1> _386_PM_o32 ; mov eax, esi 2602 00001562 89F0 <1> mov ax, si 2603 <1> %if _PM 2604 00001564 E8CD47 <1> call test_d_b_bit ; 32-bit segment ? 2605 00001567 7405 <1> jz .16 ; no --> (don't display zero high word) 2606 00001569 E88EA4 <1> call hexword_high ; yes, display high word of address 2607 0000156C EB12 <1> jmp short .common 2608 <1> 2609 <1> ; Insure that the high word is zero. 2610 <1> .16: 2611 <1> ;_386 test esi, ~0FFFFh 2612 <1> ;_386 jnz .error 2613 0000156E 66F7C20000FFFF <1> _386 test edx, ~0FFFFh 2614 00001575 7409 <1> _386 jz .common 2615 <1> ;.error: 2616 00001577 BA[5772] <1> _386 mov dx, msg.ofs32 2617 0000157A E839A8 <1> _386 call putsz_error 2618 0000157D E980EA <1> _386 jmp cmd3 2619 <1> .common: 2620 <1> %endif 2621 00001580 E883A4 <1> call hexword 2622 00001583 B82020 <1> mov ax, 32<<8|32 2623 00001586 AB <1> stosw 2624 00001587 C3 <1> retn 2625 <1> 2626 <1> ; INP: (e)si = offset (to display) 2627 <1> ; (e)dx = end offset (for range check of 16-bit segment) 2628 <1> ; word [d_addr + saSegSel] = segment/selector 2629 <1> ; es:di -> where to write to 2630 <1> ; OUT: bx = segment/selector 2631 <1> ; (e)ax = offset & ~0Fh 2632 <1> .masklownybble: 2633 00001588 56 <1> push si 2634 00001589 83E6F0 <1> and si, ~0Fh 2635 0000158C 66 <1> _386_PM_o32 2636 0000158D 56 <1> push si 2637 0000158E E8C5FF <1> call . 2638 00001591 66 <1> _386_PM_o32 2639 00001592 58 <1> pop ax 2640 00001593 5E <1> pop si 2641 00001594 C3 <1> retn 2642 <1> 2643 <1> 2644 <1> ; Store a character into the buffer. Characters that can't 2645 <1> ; be displayed are replaced by a dot. 2646 <1> ; 2647 <1> ; INP: al = character 2648 <1> ; es:bx-> buffer for displayed characters 2649 <1> ; es:di-> buffer for hexadecimal number 2650 <1> ; OUT: es:bx-> behind displayed character 2651 <1> ; es:di-> behind hexadecimal number and space 2652 <1> ; CHG: ax 2653 <1> ; STT: ds unknown 2654 <1> dd_store: 2655 00001595 88C4 <1> mov ah, al 2656 00001597 3C20 <1> cmp al, 32 ; below blank ? 2657 00001599 720E <1> jb .ctrl ; control char --> 2658 0000159B 3C7F <1> cmp al, 127 ; DEL ? 2659 0000159D 740A <1> je .ctrl ; yes, control char --> 2660 0000159F 720A <1> jb .noctrl ; below, not a control char --> 2661 000015A1 36F606[7C00]04 <1> testopt [ss:options], cpdepchars ; allow CP-dependant characters ? 2662 000015A7 7502 <1> jnz .noctrl ; yes --> 2663 <1> .ctrl: 2664 000015A9 B42E <1> mov ah, '.' 2665 <1> .noctrl: 2666 000015AB 268827 <1> mov byte [es:bx], ah 2667 000015AE 43 <1> inc bx 2668 000015AF 51 <1> push cx 2669 000015B0 E85AA4 <1> call hexbyte 2670 000015B3 59 <1> pop cx 2671 000015B4 C3 <1> retn 2672 <1> 2673 <1> 2674 <1> %if _PM 2675 <1> ; DL command 2676 <1> descout: 2677 000015B5 E8A3A3 <1> call skipwhite 2678 000015B8 E82AA2 <1> call getword ; get word into DX 2679 000015BB 89D3 <1> mov bx, dx 2680 000015BD E86DA3 <1> call skipcomm0 2681 000015C0 BA0100 <1> mov dx, 1 2682 000015C3 E840A3 <1> call iseol? 2683 000015C6 7410 <1> je .onlyone 2684 000015C8 E84476 <1> call uppercase 2685 000015CB 3C4C <1> cmp al, 'L' 2686 000015CD 7503 <1> jne .notlength 2687 000015CF E85AA3 <1> call skipcomma 2688 <1> .notlength: 2689 000015D2 E810A2 <1> call getword 2690 000015D5 E843A3 <1> call chkeol 2691 <1> .onlyone: 2692 000015D8 42 <1> inc dx ; (note js at nextdesc changed to jz) 2693 000015D9 89D6 <1> mov si, dx ; save count 2694 000015DB E8EB7B <1> call ispm 2695 000015DE 7407 <1> je nextdesc 2696 000015E0 BA[8C7C] <1> mov dx, nodesc 2697 000015E3 E9D6A7 <1> jmp putsz 2698 <1> desc_done: 2699 000015E6 C3 <1> retn 2700 <1> subcpu 286 2701 <1> nextdesc: 2702 000015E7 4E <1> dec si 2703 000015E8 74FC <1> jz desc_done 2704 000015EA BF[D07C] <1> mov di, descr 2705 000015ED 89D8 <1> mov ax, bx 2706 000015EF E814A4 <1> call hexword 2707 000015F2 BF[DA7C] <1> mov di, descbase 2708 000015F5 57 <1> push di 2709 000015F6 B83F3F <1> mov ax, "??" 2710 000015F9 AB <1> stosw 2711 000015FA AB <1> stosw 2712 000015FB AB <1> stosw 2713 000015FC AB <1> stosw 2714 000015FD 83C707 <1> add di, byte (desclim-(descbase+8)) 2715 00001600 AB <1> stosw 2716 00001601 AB <1> stosw 2717 00001602 AB <1> stosw 2718 00001603 AB <1> stosw 2719 00001604 83C706 <1> add di, byte (descattr-(desclim+8)) 2720 00001607 AB <1> stosw 2721 00001608 AB <1> stosw 2722 00001609 5F <1> pop di 2723 <1> ; lar ax, bx 2724 <1> ; jnz skipdesc ; tell that this descriptor is invalid 2725 0000160A B80600 <1> mov ax, 6 2726 0000160D CD31 <1> int 31h 2727 0000160F 720A <1> jc desc_o1 2728 00001611 89C8 <1> mov ax, cx 2729 00001613 E8F0A3 <1> call hexword 2730 00001616 89D0 <1> mov ax, dx 2731 00001618 E8EBA3 <1> call hexword 2732 <1> desc_o1: 2733 0000161B BF[E97C] <1> mov di, desclim 2734 0000161E EB2B <1> _no386_jmps use16desc 2735 <1> subcpu 386 2736 00001620 660F03C3 <1> lsl eax, ebx 2737 00001624 751A <1> jnz desc_out 2738 00001626 50 <1> push ax 2739 00001627 66C1E810 <1> shr eax, 16 2740 0000162B E8D8A3 <1> call hexword 2741 0000162E 58 <1> pop ax 2742 0000162F E8D4A3 <1> call hexword 2743 00001632 660F02C3 <1> lar eax, ebx 2744 00001636 66C1E808 <1> shr eax, 8 2745 <1> desc_o2: 2746 0000163A BF[F77C] <1> mov di, descattr 2747 0000163D E8C6A3 <1> call hexword 2748 <1> desc_out: 2749 00001640 BA[D07C] <1> mov dx, descr 2750 00001643 E876A7 <1> call putsz 2751 00001646 83C308 <1> add bx, byte 8 2752 00001649 EB9C <1> jmp short nextdesc 2753 <1> subcpureset ; subcpu 386 2754 <1> use16desc: 2755 0000164B 0F03C3 <1> lsl ax, bx 2756 0000164E 75F0 <1> jnz desc_out 2757 00001650 E8B3A3 <1> call hexword 2758 00001653 B82020 <1> mov ax, 32<<8|32 2759 00001656 AB <1> stosw 2760 00001657 AB <1> stosw 2761 00001658 0F02C3 <1> lar ax, bx 2762 0000165B C1E808 <1> shr ax, 8 2763 0000165E EBDA <1> jmp short desc_o2 2764 <1> subcpureset ; subcpu 286 2765 <1> %endif 2766 <1> 2767 <1> %if _DSTRINGS 2768 <1> ; D$ command 2769 <1> dcpm: 2770 00001660 C606[5E0B]24 <1> mov byte [dstringtype], 36 2771 00001665 C706[600B][3C0B] <1> mov word [dstringaddr], dcpm_addr 2772 0000166B EB25 <1> jmp short dstring 2773 <1> 2774 <1> ; DW# command 2775 <1> dwcounted: 2776 0000166D C606[5E0B]FE <1> mov byte [dstringtype], 0FEh 2777 00001672 C706[600B][500B] <1> mov word [dstringaddr], dwcount_addr 2778 00001678 EB18 <1> jmp short dstring 2779 <1> 2780 <1> ; D# command 2781 <1> dcounted: 2782 0000167A C606[5E0B]FF <1> mov byte [dstringtype], 0FFh 2783 0000167F C706[600B][460B] <1> mov word [dstringaddr], dcount_addr 2784 00001685 EB0B <1> jmp short dstring 2785 <1> 2786 <1> ; DZ command 2787 <1> dz: 2788 00001687 C606[5E0B]00 <1> mov byte [dstringtype], 0 2789 0000168C C706[600B][320B] <1> mov word [dstringaddr], dz_addr 2790 <1> 2791 <1> ; common code for all string commands 2792 <1> dstring: 2793 00001692 E8C6A2 <1> call skipwhite 2794 00001695 E86EA2 <1> call iseol? 2795 00001698 7509 <1> jne .getaddr ; if an address was given 2796 <1> .last: 2797 0000169A 8B1E[600B] <1> mov bx, word [dstringaddr] 2798 0000169E 66 <1> _386_PM_o32 ; mov edx, dword [bx] 2799 0000169F 8B17 <1> mov dx, word [bx] 2800 000016A1 EB20 <1> jmp short .haveaddr ; edx = offset, [bx + saSegSel] = segment 2801 <1> .getaddr: 2802 000016A3 8B1E[840C] <1> mov bx, word [reg_ds] 2803 000016A7 E86E92 <1> call getaddrX ; get address into bx:(e)dx 2804 000016AA E86EA2 <1> call chkeol ; expect end of line here 2805 <1> %if _PM 2806 000016AD 53 <1> push bx 2807 <1> %endif 2808 000016AE 53 <1> push bx 2809 000016AF 8B1E[600B] <1> mov bx, word [dstringaddr] 2810 000016B3 8F4704 <1> pop word [bx + saSegSel]; save segment (offset behind string is saved later) 2811 <1> %if _PM 2812 000016B6 E8107B <1> call ispm 2813 000016B9 7505 <1> jnz .86m 2814 <1> .pm: 2815 000016BB 8F4708 <1> pop word [bx + saSelector] 2816 000016BE EB03 <1> jmp @F 2817 <1> .86m: 2818 000016C0 8F4706 <1> pop word [bx + saSegment] 2819 <1> @@: 2820 <1> %endif 2821 <1> .haveaddr: 2822 000016C3 C706[DA0B][9A16] <1> mov word [lastcmd], dstring.last 2823 000016C9 E8518F <1> call prephack 2824 000016CC 66 <1> _386_PM_o32 ; mov esi, edx 2825 000016CD 89D6 <1> mov si, dx 2826 000016CF 800E[9E00]01 <1> setopt [internalflags], usecharcounter 2827 000016D4 C606[920A]01 <1> mov byte [ charcounter ], 1 2828 <1> ; initialize 2829 000016D9 E86F8F <1> call dohack 2830 000016DC 8E5F04 <1> mov ds, word [bx + saSegSel] 2831 <1> ; ds:(e)si-> string 2832 000016DF 36803E[5E0B]FE <1> cmp byte [ss:dstringtype], 0FEh 2833 000016E5 7235 <1> jb .terminated ; terminated string --> 2834 000016E7 9F <1> lahf 2835 000016E8 67 <1> _386_PM_a32 2836 000016E9 AC <1> lodsb ; load first byte 2837 000016EA 31C9 <1> xor cx, cx 2838 000016EC 88C1 <1> mov cl, al ; low byte of count 2839 000016EE 9E <1> sahf 2840 000016EF 7504 <1> jne .counted ; only byte count --> 2841 000016F1 67 <1> _386_PM_a32 2842 000016F2 AC <1> lodsb ; load second byte 2843 000016F3 88C5 <1> mov ch, al ; high byte of count 2844 <1> .counted: 2845 000016F5 E333 <1> jcxz .done ; length zero --> 2846 <1> .loop: 2847 000016F7 67 <1> _386_PM_a32 2848 000016F8 AC <1> lodsb ; get character 2849 000016F9 E80400 <1> call .char ; display 2850 000016FC E2F9 <1> loop .loop ; until done --> 2851 000016FE EB2A <1> jmp short .done 2852 <1> 2853 <1> .char: 2854 00001700 16 <1> push ss 2855 00001701 1F <1> pop ds 2856 00001702 50 <1> push ax 2857 00001703 E8798F <1> call unhack ; restore state 2858 00001706 58 <1> pop ax 2859 00001707 56 <1> push si 2860 00001708 51 <1> push cx 2861 00001709 E8D3A6 <1> call putc ; display 2862 0000170C 59 <1> pop cx 2863 0000170D 5E <1> pop si 2864 0000170E E89228 <1> call handle_serial_flags_ctrl_c 2865 00001711 E8378F <1> call dohack 2866 00001714 8B1E[600B] <1> mov bx, word [dstringaddr] 2867 00001718 8E5F04 <1> mov ds, word [bx + saSegSel] 2868 <1> ; go back to special state 2869 0000171B C3 <1> retn 2870 <1> 2871 <1> .terminated: 2872 0000171C 67 <1> _386_PM_a32 2873 0000171D AC <1> lodsb ; load character 2874 0000171E 363A06[5E0B] <1> cmp al, byte [ss:dstringtype] 2875 00001723 7405 <1> je .done ; it's the terminator --> 2876 00001725 E8D8FF <1> call .char ; display 2877 00001728 EBF2 <1> jmp short .terminated ; and get next --> 2878 <1> 2879 <1> .done: 2880 0000172A 16 <1> push ss 2881 0000172B 1F <1> pop ds ; restore ds 2882 0000172C 66 <1> _386_PM_o32 ; mov dword [bx], esi 2883 0000172D 8937 <1> mov word [bx], si 2884 0000172F E84D8F <1> call unhack 2885 00001732 B00D <1> mov al, 13 2886 00001734 E8A8A6 <1> call putc 2887 00001737 B00A <1> mov al, 10 2888 00001739 E8A3A6 <1> call putc 2889 0000173C C3 <1> retn 2890 <1> %endif 2891 <1> 2892 <1> %if _INT 2893 <1> ; DI command 2894 <1> gateout: 2895 0000173D 31C9 <1> xor cx, cx 2896 0000173F AC <1> lodsb 2897 00001740 E8CC74 <1> call uppercase 2898 00001743 3C52 <1> cmp al, 'R' 2899 00001745 7502 <1> jne @F 2900 00001747 41 <1> inc cx ; always 86 Mode 2901 00001748 AC <1> lodsb 2902 <1> @@: 2903 00001749 E8C374 <1> call uppercase 2904 0000174C 3C4D <1> cmp al, 'M' 2905 0000174E 7503 <1> jne @F 2906 00001750 FEC5 <1> inc ch ; show MCB names 2907 00001752 AC <1> lodsb 2908 <1> @@: 2909 00001753 E8B974 <1> call uppercase 2910 00001756 3C4C <1> cmp al, 'L' 2911 00001758 7504 <1> jne @F 2912 0000175A 80CD02 <1> or ch, 2 ; follow AMIS interrupt lists 2913 0000175D AC <1> lodsb 2914 <1> @@: 2915 0000175E E8FBA1 <1> call skipwh0 2916 <1> 2917 00001761 4E <1> dec si 2918 00001762 BA[1467] <1> mov dx, msg.in 2919 00001765 E83FA1 <1> call isstring? 2920 00001768 755C <1> jne .not_in 2921 <1> 2922 0000176A 56 <1> push si 2923 0000176B 51 <1> push cx 2924 <1> .in.loop: 2925 0000176C E8ECA1 <1> call skipwhite 2926 0000176F 4E <1> dec si 2927 <1> 2928 00001770 E8B2A0 <1> call get_value_range ; OUT: cx:di = from, bx:dx = to 2929 00001773 730D <1> jnc @F 2930 00001775 7508 <1> jnz .error 2931 00001777 81FFFF00 <1> cmp di, 255 2932 0000177B 7702 <1> ja .error 2933 0000177D E317 <1> jcxz .in.next 2934 <1> .error: 2935 0000177F E95C8D <1> jmp error 2936 <1> 2937 <1> @@: 2938 00001782 81FFFF00 <1> cmp di, 255 2939 00001786 77F7 <1> ja .error 2940 00001788 E302 <1> jcxz @F 2941 0000178A EBF3 <1> jmp .error 2942 <1> 2943 <1> @@: 2944 0000178C 85DB <1> test bx, bx 2945 0000178E 75EF <1> jnz .error 2946 00001790 81FAFF00 <1> cmp dx, 255 2947 00001794 77E9 <1> ja .error 2948 <1> 2949 <1> .in.next: 2950 <1> @@: 2951 00001796 E8C3A1 <1> call skipwh0 2952 00001799 3C2C <1> cmp al, ',' 2953 0000179B 74CF <1> je .in.loop 2954 0000179D E87BA1 <1> call chkeol 2955 000017A0 59 <1> pop cx 2956 000017A1 E89300 <1> call .prepare 2957 000017A4 5E <1> pop si 2958 <1> 2959 <1> .indo.loop: 2960 000017A5 E8B3A1 <1> call skipwhite 2961 000017A8 4E <1> dec si 2962 <1> 2963 000017A9 51 <1> push cx 2964 000017AA E878A0 <1> call get_value_range ; OUT: cx:di = from, bx:dx = to 2965 000017AD 59 <1> pop cx 2966 000017AE 720D <1> jc .indo.next 2967 <1> 2968 000017B0 89FB <1> mov bx, di 2969 000017B2 A8 <1> db __TEST_IMM8 ; (skip inc) 2970 <1> @@: 2971 000017B3 43 <1> inc bx 2972 000017B4 52 <1> push dx 2973 000017B5 E89400 <1> call .do 2974 000017B8 5A <1> pop dx 2975 000017B9 39D3 <1> cmp bx, dx 2976 000017BB 72F6 <1> jb @B 2977 <1> 2978 <1> .indo.next: 2979 000017BD 4E <1> dec si 2980 000017BE E89AA1 <1> call skipwhite 2981 000017C1 3C2C <1> cmp al, ',' 2982 000017C3 74E0 <1> je .indo.loop 2983 000017C5 C3 <1> retn 2984 <1> 2985 <1> 2986 <1> 2987 <1> .not_in: 2988 000017C6 AC <1> lodsb 2989 000017C7 E829A0 <1> call getbyte ; get byte into DL 2990 000017CA 30F6 <1> xor dh, dh 2991 000017CC 89D3 <1> mov bx, dx 2992 000017CE E85CA1 <1> call skipcomm0 2993 000017D1 BA0100 <1> mov dx, 1 2994 000017D4 E82FA1 <1> call iseol? 2995 000017D7 7451 <1> je .onlyone 2996 000017D9 E83374 <1> call uppercase 2997 000017DC 3C4C <1> cmp al, 'L' 2998 000017DE 753F <1> jne .notlength 2999 000017E0 E849A1 <1> call skipcomma 3000 000017E3 E8FF9F <1> call getword ; get byte into DL 3001 000017E6 85D2 <1> test dx, dx 3002 000017E8 741A <1> jz .err 3003 000017EA 81FA0001 <1> cmp dx, 100h 3004 000017EE 740A <1> je .checkrange 3005 000017F0 50 <1> push ax 3006 000017F1 80E41F <1> and ah, 1Fh 3007 000017F4 80FC08 <1> cmp ah, 8 3008 000017F7 58 <1> pop ax 3009 000017F8 770A <1> ja .err 3010 <1> .checkrange: 3011 000017FA 52 <1> push dx 3012 000017FB 01DA <1> add dx, bx 3013 000017FD 81FA0001 <1> cmp dx, 100h 3014 00001801 5A <1> pop dx 3015 00001802 7623 <1> jna .rangeok 3016 <1> .err: 3017 00001804 E9D78C <1> jmp error 3018 <1> 3019 <1> .last: 3020 00001807 31DB <1> xor bx, bx 3021 00001809 8A1E[6A0B] <1> mov bl, byte [lastint] 3022 0000180D 8B0E[680B] <1> mov cx, word [lastint_is_86m_and_mcb] 3023 00001811 BA0100 <1> mov dx, 1 3024 00001814 FEC3 <1> inc bl 3025 00001816 7512 <1> jnz .onlyone 3026 00001818 C706[DA0B][E003] <1> mov word [lastcmd], dmycmd 3027 0000181E C3 <1> retn 3028 <1> 3029 <1> .notlength: 3030 0000181F E8D19F <1> call getbyte 3031 00001822 30F6 <1> xor dh, dh 3032 00001824 28DA <1> sub dl, bl 3033 00001826 42 <1> inc dx 3034 <1> .rangeok: 3035 00001827 E8F1A0 <1> call chkeol 3036 <1> .onlyone: 3037 0000182A E80A00 <1> call .prepare 3038 0000182D 89D6 <1> mov si, dx ; save count 3039 <1> .next: 3040 0000182F E81A00 <1> call .do 3041 00001832 43 <1> inc bx 3042 00001833 4E <1> dec si 3043 00001834 75F9 <1> jnz .next 3044 00001836 C3 <1> retn 3045 <1> 3046 <1> 3047 <1> .prepare: 3048 00001837 F6C502 <1> test ch, 2 3049 0000183A 7403 <1> jz @F 3050 0000183C E8A0EC <1> call guard_auxbuff 3051 <1> @@: 3052 0000183F C706[DA0B][0718] <1> mov word [lastcmd], .last 3053 00001845 890E[680B] <1> mov word [lastint_is_86m_and_mcb], cx 3054 00001849 E9D18D <1> jmp prephack 3055 <1> 3056 <1> 3057 <1> ; INP: bx = interrupt number 3058 <1> ; cx = options 3059 <1> ; CHG: di, eax. edx, bp 3060 <1> ; STT: ds = es = ss 3061 <1> ; prephack called 3062 <1> .do: 3063 0000184C 881E[6A0B] <1> mov byte [lastint], bl 3064 00001850 E85027 <1> call handle_serial_flags_ctrl_c 3065 00001853 E8F58D <1> call dohack 3066 00001856 BF[0E08] <1> mov di, line_out 3067 00001859 B8696E <1> mov ax, "in" 3068 0000185C AB <1> stosw 3069 0000185D B87420 <1> mov ax, "t " 3070 00001860 AB <1> stosw 3071 00001861 88D8 <1> mov al, bl 3072 00001863 E8A7A1 <1> call hexbyte 3073 00001866 B020 <1> mov al, 32 3074 00001868 AA <1> stosb 3075 <1> %if _PM 3076 00001869 84C9 <1> test cl, cl 3077 0000186B 7545 <1> jnz .rm 3078 0000186D E85979 <1> call ispm 3079 00001870 7540 <1> jnz .rm 3080 <1> 3081 00001872 B80402 <1> mov ax, 0204h 3082 00001875 80FB20 <1> cmp bl, 20h 3083 00001878 80D701 <1> adc bh, 1 ; if below, bh = 2 3084 <1> .loopexception: 3085 0000187B 51 <1> push cx 3086 0000187C CD31 <1> int 31h 3087 0000187E 89C8 <1> mov ax, cx 3088 00001880 59 <1> pop cx 3089 00001881 7303E9B000 <1> jc .failed 3090 00001886 E87DA1 <1> call hexword 3091 00001889 B03A <1> mov al, ':' 3092 0000188B AA <1> stosb 3093 0000188C 66 <1> _386_PM_o32 ; mov eax, edx 3094 0000188D 89D0 <1> mov ax, dx 3095 0000188F 803E[DA88]00 <1> cmp byte [dpmi32], 0 3096 00001894 7403 <1> jz .gate16 3097 00001896 E861A1 <1> call hexword_high 3098 <1> .gate16: 3099 00001899 E86AA1 <1> call hexword 3100 0000189C B020 <1> mov al, 32 3101 0000189E AA <1> stosb 3102 0000189F B80202 <1> mov ax, 0202h 3103 000018A2 FECF <1> dec bh 3104 000018A4 75D5 <1> jnz .loopexception 3105 000018A6 4F <1> dec di 3106 000018A7 E8D58D <1> call unhack 3107 000018AA 53 <1> push bx 3108 000018AB 51 <1> push cx 3109 000018AC E88FA1 <1> call putsline_crlf 3110 000018AF 59 <1> pop cx 3111 000018B0 5B <1> pop bx 3112 000018B1 C3 <1> retn 3113 <1> 3114 <1> .rm: 3115 <1> %endif 3116 000018B2 53 <1> push bx 3117 000018B3 51 <1> push cx 3118 000018B4 56 <1> push si 3119 <1> 3120 000018B5 53 <1> push bx 3121 000018B6 31ED <1> xor bp, bp 3122 000018B8 D1E3 <1> shl bx, 1 3123 000018BA D1E3 <1> shl bx, 1 3124 000018BC 31D2 <1> xor dx, dx 3125 <1> %if _PM 3126 000018BE E821B9 <1> call setes2dx 3127 <1> %else 3128 <1> mov es, dx ; es => IVT 3129 <1> %endif 3130 000018C1 268B4702 <1> mov ax, word [es:bx + 2] ; ax = segment 3131 000018C5 268B17 <1> mov dx, word [es:bx] 3132 000018C8 5B <1> pop bx 3133 <1> 3134 000018C9 F6C502 <1> test ch, 2 3135 000018CC 7572 <1> jnz int_list 3136 <1> 3137 <1> .loop_chain: 3138 000018CE 50 <1> push ax ; segment 3139 000018CF 52 <1> push dx 3140 <1> 3141 000018D0 16 <1> push ss 3142 000018D1 07 <1> pop es 3143 000018D2 E831A1 <1> call hexword 3144 000018D5 B03A <1> mov al, ':' 3145 000018D7 AA <1> stosb 3146 000018D8 89D0 <1> mov ax, dx 3147 000018DA E829A1 <1> call hexword 3148 <1> 3149 000018DD 5B <1> pop bx 3150 000018DE 5A <1> pop dx ; segment 3151 <1> 3152 000018DF 8916[660B] <1> mov word [intaddress + 2], dx 3153 000018E3 891E[640B] <1> mov word [intaddress], bx 3154 <1> 3155 000018E7 45 <1> inc bp 3156 000018E8 81FD0001 <1> cmp bp, 256 3157 000018EC 7740 <1> ja .toomany 3158 <1> 3159 000018EE E80003 <1> call check_int_chain 3160 000018F1 722C <1> jc .end_chain 3161 <1> 3162 000018F3 52 <1> push dx ; segment 3163 000018F4 50 <1> push ax 3164 000018F5 16 <1> push ss 3165 000018F6 07 <1> pop es 3166 000018F7 E8858D <1> call unhack 3167 000018FA 51 <1> push cx 3168 000018FB E8041B <1> call copy_single_counted_string 3169 000018FE 59 <1> pop cx 3170 000018FF E88B03 <1> call .mcbname 3171 00001902 51 <1> push cx 3172 00001903 E838A1 <1> call putsline_crlf 3173 00001906 59 <1> pop cx 3174 00001907 E89926 <1> call handle_serial_flags_ctrl_c 3175 0000190A E83E8D <1> call dohack 3176 0000190D BF[0E08] <1> mov di, line_out 3177 00001910 B8202D <1> mov ax, " -" 3178 00001913 AB <1> stosw 3179 00001914 B82D3E <1> mov ax, "->" 3180 00001917 AB <1> stosw 3181 00001918 B020 <1> mov al, 32 3182 0000191A AA <1> stosb 3183 <1> 3184 0000191B 5A <1> pop dx 3185 0000191C 58 <1> pop ax ; (ax = segment) 3186 0000191D EBAF <1> jmp .loop_chain 3187 <1> 3188 <1> .end_chain: 3189 0000191F 16 <1> push ss 3190 00001920 07 <1> pop es 3191 00001921 E85B8D <1> call unhack 3192 00001924 E86603 <1> call .mcbname 3193 00001927 E814A1 <1> call putsline_crlf 3194 <1> .86next: 3195 0000192A 5E <1> pop si 3196 0000192B 59 <1> pop cx 3197 0000192C 5B <1> pop bx 3198 0000192D C3 <1> retn 3199 <1> 3200 <1> .toomany: 3201 0000192E BE[1068] <1> mov si, msg.di_toomany 3202 00001931 E8CE1A <1> call copy_single_counted_string 3203 00001934 EBE9 <1> jmp .end_chain 3204 <1> 3205 <1> %if _PM 3206 <1> .failed: 3207 00001936 E8468D <1> call unhack 3208 00001939 5A <1> pop dx ; discard a near return address 3209 0000193A BA[B37C] <1> mov dx, gatewrong 3210 0000193D E97CA4 <1> jmp putsz 3211 <1> %endif 3212 <1> 3213 <1> 3214 <1> int_list: 3215 00001940 57 <1> push di 3216 00001941 51 <1> push cx 3217 00001942 53 <1> push bx 3218 00001943 92 <1> xchg ax, dx ; dx = segment 3219 <1> 3220 00001944 368E06[F209] <1> mov es, word [ss:auxbuff_segorsel] 3221 00001949 31FF <1> xor di, di ; -> auxbuff 3222 0000194B AB <1> stosw ; store offset 3223 0000194C 92 <1> xchg ax, dx ; dx = offset 3224 0000194D AB <1> stosw ; store segment 3225 0000194E 92 <1> xchg ax, dx ; dx = segment 3226 0000194F 93 <1> xchg bx, ax ; bx = offset 3227 00001950 B80003 <1> mov ax, 300h ; flag for IVT | unused 3228 00001953 AB <1> stosw ; which multiplex number 3229 00001954 31C0 <1> xor ax, ax 3230 00001956 AB <1> stosw ; which int list entry = none = 0 3231 <1> 3232 <1> .loop_ivt_chain: 3233 00001957 E89702 <1> call check_int_chain 3234 0000195A 7219 <1> jc .end_ivt_chain 3235 <1> 3236 0000195C 81FFF81F <1> cmp di, _AUXBUFFSIZE - 3 * 8 3237 00001960 7735 <1> ja .error 3238 00001962 368E06[F209] <1> mov es, word [ss:auxbuff_segorsel] 3239 00001967 AB <1> stosw ; store offset 3240 00001968 92 <1> xchg ax, dx 3241 00001969 AB <1> stosw ; store segment 3242 0000196A 92 <1> xchg ax, dx 3243 0000196B 93 <1> xchg bx, ax 3244 0000196C B80002 <1> mov ax, 200h ; flag for unused 3245 0000196F AB <1> stosw ; found in chain = 200h 3246 00001970 31C0 <1> xor ax, ax 3247 00001972 AB <1> stosw 3248 00001973 EBE2 <1> jmp .loop_ivt_chain 3249 <1> 3250 <1> .end_ivt_chain: 3251 00001975 83C8FF <1> or ax, -1 3252 00001978 368E06[F209] <1> mov es, word [ss:auxbuff_segorsel] 3253 0000197D B90800 <1> mov cx, 8 3254 00001980 F3AB <1> rep stosw ; terminator is all-ones 3255 <1> ; (two terminators actually) 3256 <1> 3257 00001982 31C0 <1> xor ax, ax 3258 <1> .loopplex: 3259 00001984 B000 <1> mov al, 00h ; AMIS installation check 3260 00001986 51 <1> push cx 3261 <1> ; function 0 changes dx, di, cx, al 3262 <1> %if _PM 3263 00001987 E8A979 <1> call call_int2D 3264 <1> %else 3265 <1> int 2Dh ; enquire whether there's anyone 3266 <1> %endif 3267 0000198A 59 <1> pop cx ; but we don't care who it might be 3268 0000198B FEC0 <1> inc al ; = FFh ? 3269 0000198D 7503E90201 <1> jz .search ; yes, it is in use --> 3270 <1> .nextplex: 3271 00001992 FEC4 <1> inc ah 3272 00001994 75EE <1> jnz .loopplex ; try next multiplexer --> 3273 <1> 3274 <1> .done: 3275 00001996 A8 <1> db __TEST_IMM8 ; (NC) 3276 <1> .error: 3277 00001997 F9 <1> stc 3278 <1> 3279 00001998 5B <1> pop bx 3280 00001999 59 <1> pop cx 3281 0000199A 5F <1> pop di 3282 0000199B 16 <1> push ss 3283 0000199C 1F <1> pop ds 3284 0000199D 16 <1> push ss 3285 0000199E 07 <1> pop es 3286 <1> 3287 0000199F BE[8D67] <1> mov si, msg.di_error 3288 000019A2 7303E9B000 <1> jc .error_string 3289 <1> 3290 000019A7 31F6 <1> xor si, si 3291 <1> 3292 <1> .loop_chain: 3293 000019A9 8E1E[F209] <1> mov ds, word [auxbuff_segorsel] 3294 000019AD AD <1> lodsw 3295 000019AE 92 <1> xchg ax, dx 3296 000019AF AD <1> lodsw 3297 000019B0 83C604 <1> add si, 4 3298 <1> 3299 000019B3 89C3 <1> mov bx, ax 3300 000019B5 21D3 <1> and bx, dx 3301 000019B7 43 <1> inc bx 3302 000019B8 746D <1> jz .next_seq 3303 <1> 3304 <1> .next_chain: 3305 000019BA 16 <1> push ss 3306 000019BB 1F <1> pop ds 3307 <1> 3308 000019BC 50 <1> push ax ; segment 3309 000019BD 52 <1> push dx 3310 <1> 3311 000019BE 16 <1> push ss 3312 000019BF 07 <1> pop es 3313 000019C0 E843A0 <1> call hexword 3314 000019C3 B03A <1> mov al, ':' 3315 000019C5 AA <1> stosb 3316 000019C6 89D0 <1> mov ax, dx 3317 000019C8 E83BA0 <1> call hexword 3318 <1> 3319 000019CB 5B <1> pop bx 3320 000019CC 5A <1> pop dx ; segment 3321 <1> 3322 000019CD 8916[660B] <1> mov word [intaddress + 2], dx 3323 000019D1 891E[640B] <1> mov word [intaddress], bx 3324 <1> 3325 000019D5 56 <1> push si 3326 000019D6 E81802 <1> call check_int_chain 3327 000019D9 722E <1> jc .end_chain 3328 <1> 3329 000019DB 16 <1> push ss 3330 000019DC 07 <1> pop es 3331 000019DD E89F8C <1> call unhack 3332 000019E0 51 <1> push cx 3333 000019E1 E81E1A <1> call copy_single_counted_string 3334 000019E4 59 <1> pop cx 3335 000019E5 5E <1> pop si 3336 000019E6 E87A00 <1> call .mpx 3337 000019E9 56 <1> push si 3338 000019EA E8A002 <1> call gateout.mcbname 3339 000019ED 51 <1> push cx 3340 000019EE E84DA0 <1> call putsline_crlf 3341 000019F1 59 <1> pop cx 3342 000019F2 E8AE25 <1> call handle_serial_flags_ctrl_c 3343 000019F5 E8538C <1> call dohack 3344 000019F8 BF[0E08] <1> mov di, line_out 3345 000019FB B8202D <1> mov ax, " -" 3346 000019FE AB <1> stosw 3347 000019FF B82D3E <1> mov ax, "->" 3348 00001A02 AB <1> stosw 3349 00001A03 B020 <1> mov al, 32 3350 00001A05 AA <1> stosb 3351 <1> 3352 00001A06 5E <1> pop si 3353 00001A07 EBA0 <1> jmp .loop_chain 3354 <1> 3355 <1> .end_chain: 3356 00001A09 16 <1> push ss 3357 00001A0A 07 <1> pop es 3358 00001A0B E8718C <1> call unhack 3359 00001A0E 5E <1> pop si 3360 00001A0F E85100 <1> call .mpx 3361 00001A12 56 <1> push si 3362 00001A13 E87702 <1> call gateout.mcbname 3363 00001A16 51 <1> push cx 3364 00001A17 E824A0 <1> call putsline_crlf 3365 00001A1A 59 <1> pop cx 3366 00001A1B BF[0E08] <1> mov di, line_out 3367 00001A1E E88225 <1> call handle_serial_flags_ctrl_c 3368 00001A21 E8278C <1> call dohack 3369 00001A24 5E <1> pop si 3370 00001A25 EB82 <1> jmp .loop_chain 3371 <1> 3372 <1> .next_seq: 3373 00001A27 AD <1> lodsw 3374 00001A28 92 <1> xchg ax, dx 3375 00001A29 AD <1> lodsw 3376 00001A2A 83C604 <1> add si, 4 3377 <1> 3378 00001A2D 89C3 <1> mov bx, ax 3379 00001A2F 21D3 <1> and bx, dx 3380 00001A31 43 <1> inc bx 3381 00001A32 741A <1> jz @F 3382 <1> 3383 00001A34 16 <1> push ss 3384 00001A35 1F <1> pop ds 3385 00001A36 16 <1> push ss 3386 00001A37 07 <1> pop es 3387 00001A38 E8448C <1> call unhack 3388 00001A3B 51 <1> push cx 3389 00001A3C 56 <1> push si 3390 00001A3D BE[9567] <1> mov si, msg.di_hidden 3391 00001A40 E8BF19 <1> call copy_single_counted_string 3392 00001A43 5E <1> pop si 3393 00001A44 59 <1> pop cx 3394 00001A45 E85B25 <1> call handle_serial_flags_ctrl_c 3395 00001A48 E8008C <1> call dohack 3396 <1> 3397 00001A4B E96CFF <1> jmp .next_chain 3398 <1> 3399 <1> @@: 3400 00001A4E 16 <1> push ss 3401 00001A4F 1F <1> pop ds 3402 00001A50 16 <1> push ss 3403 00001A51 07 <1> pop es 3404 00001A52 E82A8C <1> call unhack 3405 00001A55 EB09 <1> jmp @F 3406 <1> 3407 <1> 3408 <1> .error_string: 3409 00001A57 E8A819 <1> call copy_single_counted_string 3410 <1> 3411 00001A5A E8228C <1> call unhack 3412 00001A5D E8DE9F <1> call putsline_crlf 3413 <1> @@: 3414 <1> %if 0 ; _DEBUG 3415 <1> mov es, word [auxbuff_segorsel] 3416 <1> int3 3417 <1> push ss 3418 <1> pop es 3419 <1> %endif 3420 00001A60 E9C7FE <1> jmp gateout.86next 3421 <1> 3422 <1> 3423 <1> .mpx: 3424 00001A63 8E06[F209] <1> mov es, word [auxbuff_segorsel] 3425 00001A67 268B44FC <1> mov ax, word [es:si - 4] 3426 00001A6B 268B54FE <1> mov dx, word [es:si - 2] 3427 00001A6F 16 <1> push ss 3428 00001A70 07 <1> pop es 3429 00001A71 F6C402 <1> test ah, 2 3430 00001A74 751D <1> jnz @F 3431 00001A76 56 <1> push si 3432 00001A77 51 <1> push cx 3433 00001A78 BE[7968] <1> mov si, msg.di_multiplex.1 3434 00001A7B E88419 <1> call copy_single_counted_string 3435 00001A7E E88C9F <1> call hexbyte 3436 00001A81 BE[8068] <1> mov si, msg.di_multiplex.2 3437 00001A84 E87B19 <1> call copy_single_counted_string 3438 00001A87 92 <1> xchg ax, dx 3439 00001A88 E87B9F <1> call hexword 3440 00001A8B BE[8868] <1> mov si, msg.di_multiplex.3 3441 00001A8E E87119 <1> call copy_single_counted_string 3442 00001A91 59 <1> pop cx 3443 00001A92 5E <1> pop si 3444 <1> @@: 3445 00001A93 C3 <1> retn 3446 <1> 3447 <1> 3448 <1> ; INP: ah = multiplex number of AMIS TSR to search through 3449 <1> ; ss:sp-> interrupt number (byte), must be preserved 3450 <1> ; CHG: es, di, dx, bx 3451 <1> .search: 3452 00001A94 B004 <1> mov al, 04h 3453 00001A96 5B <1> pop bx 3454 00001A97 53 <1> push bx ; low byte is the interrupt number 3455 <1> ; function 4 changes dx, bx, al 3456 <1> %if _PM 3457 00001A98 E89878 <1> call call_int2D 3458 <1> %else 3459 <1> int 2Dh 3460 <1> %endif 3461 00001A9B 3C03 <1> cmp al, 03h ; returned its interrupt entry ? 3462 <1> ; RBIL doesn't explicitly state that this interrupt entry has to 3463 <1> ; be IISP compatible. But I'm too lazy to look up the older AMIS, 3464 <1> ; and SearchIISPChain checks the interrupt entry anyway. 3465 00001A9D 743D <1> je .search_dxbx 3466 00001A9F 3C04 <1> cmp al, 04h ; returned list of hooked interrupts ? 3467 00001AA1 7403E9ECFE <1> jne .nextplex ; no, try next multiplexer --> 3468 00001AA6 89DF <1> mov di, bx 3469 00001AA8 5B <1> pop bx 3470 00001AA9 53 <1> push bx ; bl = interrupt number 3471 00001AAA 31C9 <1> xor cx, cx ; = index into list 3472 00001AAC 88D8 <1> mov al, bl 3473 <1> .search_intlist_seg: 3474 <1> %if _PM 3475 00001AAE E831B7 <1> call setes2dx 3476 <1> %else 3477 <1> mov es, dx ; es:di-> list 3478 <1> %endif 3479 <1> .search_intlist: ; Search the returned list for the required interrupt number. 3480 00001AB1 AE <1> scasb ; our interrupt number ? 3481 00001AB2 740E <1> je .search_found_intlist 3482 00001AB4 26807DFF2D <1> cmp byte [es:di-1], 2Dh ; was last in list ? 3483 00001AB9 7503E9D4FE <1> je .nextplex 3484 00001ABE AF <1> scasw ; skip pointer 3485 00001ABF 41 <1> inc cx 3486 00001AC0 EBEF <1> jmp short .search_intlist ; try next entry --> 3487 <1> 3488 <1> .search_found_intlist: 3489 00001AC2 268B1D <1> mov bx, word [es:di] ; dx:bx = es:bx -> IISP entry 3490 00001AC5 AF <1> scasw ; skip pointer 3491 00001AC6 52 <1> push dx ; preserve dx for .search_intlist_seg 3492 00001AC7 57 <1> push di 3493 00001AC8 E82200 <1> call .add 3494 00001ACB 5F <1> pop di 3495 00001ACC 5A <1> pop dx 3496 00001ACD 7303E9C5FE <1> jc .error 3497 <1> ; je .search_found ; found entry --> 3498 <1> ; This specific jump supports TSRs that hook the same 3499 <1> ; interrupt more than once; jumping to .nextplex instead 3500 <1> ; (as previously) aborts the search after the first match 3501 <1> ; in the interrupt list. This support might become useful. 3502 00001AD2 3C2D <1> cmp al, 2Dh ; was last in list ? 3503 00001AD4 7503E9B9FE <1> je .nextplex 3504 00001AD9 41 <1> inc cx 3505 00001ADA EBD2 <1> jmp short .search_intlist_seg 3506 <1> 3507 <1> .search_dxbx: 3508 <1> %if _PM 3509 00001ADC E803B7 <1> call setes2dx 3510 <1> %else 3511 <1> mov es, dx ; es:bx-> (IISP) interrupt entry 3512 <1> %endif 3513 <1> ; The entry we found now is possibly behind the non-IISP entry that 3514 <1> ; terminated our first SearchIISPChain call (at .hard). We then 3515 <1> ; possibly might find our entry in this hidden part of the chain. 3516 00001ADF 83C9FF <1> or cx, -1 3517 00001AE2 E80800 <1> call .add 3518 00001AE5 7303E9ADFE <1> jc .error 3519 <1> ; jne .nextplex ; didn't find our entry in the chain --> 3520 00001AEA E9A5FE <1> jmp .nextplex 3521 <1> 3522 <1> 3523 <1> int_list.add: 3524 00001AED 31FF <1> xor di, di 3525 00001AEF 368E1E[F209] <1> mov ds, word [ss:auxbuff_segorsel] 3526 00001AF4 83CEFF <1> or si, -1 3527 00001AF7 E8D400 <1> call .check 3528 00001AFA 7516 <1> jne @F 3529 00001AFC F6450502 <1> testopt [di + 4], 200h 3530 00001B00 7503E9C700 <1> jz .error 3531 00001B05 886504 <1> mov byte [di + 4], ah 3532 00001B08 806505FD <1> clropt [di + 4], 200h 3533 00001B0C 894D06 <1> mov word [di + 6], cx 3534 00001B0F E9B900 <1> jmp .done 3535 <1> 3536 <1> @@: 3537 <1> ; ds:di -> second terminator 3538 00001B12 81FFF81F <1> cmp di, _AUXBUFFSIZE - 8 * 3 3539 00001B16 7603E9B100 <1> ja .error 3540 00001B1B 8D75F8 <1> lea si, [di - 8] 3541 <1> 3542 00001B1E 93 <1> xchg ax, bx 3543 00001B1F 368E06[F209] <1> mov es, word [ss:auxbuff_segorsel] 3544 <1> ; => auxbuff 3545 00001B24 AB <1> stosw ; store offset 3546 00001B25 92 <1> xchg ax, dx ; dx = offset 3547 00001B26 AB <1> stosw ; store segment 3548 00001B27 92 <1> xchg ax, dx ; dx = segment 3549 00001B28 93 <1> xchg ax, bx 3550 00001B29 50 <1> push ax 3551 00001B2A B000 <1> mov al, 0 3552 00001B2C 86C4 <1> xchg al, ah 3553 00001B2E AB <1> stosw ; which multiplex number 3554 00001B2F 89C8 <1> mov ax, cx 3555 00001B31 AB <1> stosw ; which int list entry = none = 0 3556 00001B32 58 <1> pop ax 3557 <1> 3558 <1> .loop_chain: 3559 00001B33 50 <1> push ax 3560 00001B34 56 <1> push si 3561 00001B35 E8B900 <1> call check_int_chain 3562 00001B38 5E <1> pop si 3563 00001B39 5B <1> pop bx 3564 00001B3A 727E <1> jc .end_chain 3565 <1> 3566 00001B3C 81FFF81F <1> cmp di, _AUXBUFFSIZE - 3 * 8 3567 00001B40 7603E98700 <1> ja .error 3568 00001B45 368E06[F209] <1> mov es, word [ss:auxbuff_segorsel] 3569 00001B4A AB <1> stosw ; store offset 3570 00001B4B 92 <1> xchg ax, dx 3571 00001B4C AB <1> stosw ; store segment 3572 00001B4D 92 <1> xchg ax, dx 3573 00001B4E 93 <1> xchg bx, ax ; ah = multiplex number, bx = offset 3574 00001B4F 50 <1> push ax 3575 00001B50 B80002 <1> mov ax, 200h 3576 00001B53 AB <1> stosw ; found in chain = 200h 3577 00001B54 31C0 <1> xor ax, ax 3578 00001B56 AB <1> stosw 3579 00001B57 58 <1> pop ax 3580 00001B58 57 <1> push di 3581 00001B59 31FF <1> xor di, di 3582 00001B5B E87000 <1> call .check 3583 00001B5E 7403 <1> je @F 3584 00001B60 5F <1> pop di 3585 00001B61 EBD0 <1> jmp .loop_chain 3586 <1> 3587 <1> @@: 3588 00001B63 5B <1> pop bx 3589 00001B64 F6450501 <1> testopt [di + 4], 100h 3590 00001B68 7562 <1> jnz .error 3591 00001B6A 837DFCFF <1> cmp word [di - 8 + 4], -1 3592 00001B6E 755C <1> jne .error 3593 <1> ; di -> match (insert to move here) 3594 <1> ; bx -> after repeat 3595 <1> ; bx - 8 -> repeat 3596 <1> ; bx - 16 -> last entry to move 3597 <1> ; si -> single terminator 3598 <1> ; si + 8 -> first entry to move 3599 <1> 3600 00001B70 83EB10 <1> sub bx, 16 ; -> last entry to move 3601 <1> 3602 <1> .insert: 3603 <1> ; di -> match (insert to move here) 3604 <1> ; bx + 8 -> repeat 3605 <1> ; bx -> last entry to move 3606 <1> ; si -> single terminator 3607 <1> ; si + 8 -> first entry to move 3608 <1> 3609 00001B73 FF7706 <1> push word [bx + 6] 3610 00001B76 FF7704 <1> push word [bx + 4] 3611 00001B79 FF7702 <1> push word [bx + 2] 3612 00001B7C FF37 <1> push word [bx] ; get the last entry 3613 00001B7E 57 <1> push di 3614 00001B7F 56 <1> push si 3615 00001B80 51 <1> push cx 3616 00001B81 368E06[F209] <1> mov es, word [ss:auxbuff_segorsel] 3617 00001B86 89F9 <1> mov cx, di ; = where to insert 3618 <1> ; -> first to displace 3619 00001B88 F7D9 <1> neg cx 3620 00001B8A 89DE <1> mov si, bx ; -> after end of source 3621 00001B8C 8D7F08 <1> lea di, [bx + 8] ; -> after end of dest 3622 00001B8F 01F1 <1> add cx, si ; after end of source - first to displace 3623 <1> ; = how many bytes to displace 3624 00001B91 D1E9 <1> shr cx, 1 3625 00001B93 FD <1> std ; _AMD_ERRATUM_109_WORKAROUND as below 3626 00001B94 A7 <1> cmpsw ; si -= 2, di -= 2 3627 <1> 3628 <1> numdef AMD_ERRATUM_109_WORKAROUND, 1 3629 <1> ; Refer to comment in init.asm init_movp. 3630 <1> 3631 <1> %if _AMD_ERRATUM_109_WORKAROUND 3632 00001B95 E308 <1> jcxz @FF 3633 00001B97 83F914 <1> cmp cx, 20 3634 00001B9A 7703 <1> ja @FF 3635 <1> @@: 3636 00001B9C A5 <1> movsw 3637 00001B9D E2FD <1> loop @B 3638 <1> @@: 3639 <1> %endif 3640 00001B9F F3A5 <1> rep movsw 3641 00001BA1 FC <1> cld 3642 00001BA2 59 <1> pop cx 3643 00001BA3 5E <1> pop si 3644 00001BA4 5F <1> pop di 3645 00001BA5 8F05 <1> pop word [di] 3646 00001BA7 8F4502 <1> pop word [di + 2] 3647 00001BAA 8F4504 <1> pop word [di + 4] 3648 00001BAD 8F4506 <1> pop word [di + 6] ; insert moved entry 3649 00001BB0 83C608 <1> add si, 8 3650 <1> 3651 <1> ; di -> match (inserted here, insert next here) 3652 <1> ; bx + 8 -> repeat 3653 <1> ; bx -> last entry to move 3654 <1> ; si -> single terminator 3655 <1> ; si + 8 -> first entry to move 3656 00001BB3 39DE <1> cmp si, bx ; if last to move != terminator 3657 00001BB5 75BC <1> jne .insert ; then move another -> 3658 00001BB7 89F7 <1> mov di, si ; where to put double terminator 3659 <1> 3660 00001BB9 93 <1> xchg ax, bx 3661 <1> .end_chain: 3662 00001BBA 53 <1> push bx 3663 00001BBB 51 <1> push cx 3664 00001BBC 83C8FF <1> or ax, -1 3665 00001BBF 368E06[F209] <1> mov es, word [ss:auxbuff_segorsel] 3666 00001BC4 B90800 <1> mov cx, 8 3667 00001BC7 F3AB <1> rep stosw ; terminator is all-ones 3668 <1> ; (two terminators actually) 3669 00001BC9 59 <1> pop cx 3670 00001BCA 58 <1> pop ax 3671 <1> 3672 <1> .done: 3673 00001BCB A8 <1> db __TEST_IMM8 ; (NC) 3674 <1> .error: 3675 00001BCC F9 <1> stc 3676 <1> 3677 00001BCD C3 <1> retn 3678 <1> 3679 <1> 3680 <1> ; INP: dx:bx = 86 Mode far pointer to handler 3681 <1> ; di -> to check 3682 <1> ; si = end of area to check 3683 <1> 3684 <1> .check: 3685 00001BCE 391D <1> cmp word [di + 0], bx 3686 00001BD0 7506 <1> jne .mismatch 3687 00001BD2 395502 <1> cmp word [di + 2], dx 3688 00001BD5 7501 <1> jne .mismatch 3689 <1> .match: 3690 00001BD7 C3 <1> retn 3691 <1> 3692 <1> .mismatch: 3693 00001BD8 83C708 <1> add di, 8 3694 <1> 3695 00001BDB 39F7 <1> cmp di, si 3696 00001BDD 730F <1> jae .checkret 3697 <1> 3698 00001BDF 837D04FF <1> cmp word [di + 4], -1 3699 00001BE3 75E9 <1> jne .check 3700 <1> 3701 00001BE5 83C708 <1> add di, 8 3702 00001BE8 837D04FF <1> cmp word [di + 4], -1 3703 00001BEC 75E0 <1> jne .check 3704 <1> .checkret: 3705 00001BEE 85FF <1> test di, di 3706 00001BF0 C3 <1> retn 3707 <1> 3708 <1> 3709 <1> ; INP: dx:bx = 86 Mode far pointer to int handler 3710 <1> ; OUT: NC if chain found, 3711 <1> ; dx:ax = 86 Mode far pointer to next 3712 <1> ; ss:si -> type message (counted) 3713 <1> ; STT: es != ss, ds != ss 3714 <1> check_int_chain: 3715 <1> %if _PM 3716 00001BF1 E8EEB5 <1> call setes2dx 3717 <1> %else 3718 <1> mov es, dx ; es:bx -> entrypoint 3719 <1> %endif 3720 00001BF4 E876B7 <1> call IsIISPEntry? 3721 00001BF7 752A <1> jnz .not_iisp 3722 <1> 3723 00001BF9 26FF7704 <1> push word [es:bx + ieNext + 2] 3724 00001BFD 26FF7702 <1> push word [es:bx + ieNext] 3725 <1> 3726 00001C01 BE[B967] <1> mov si, msg.di_uninst_iisp 3727 00001C04 26813F90EA <1> cmp word [ es:bx + ieEntry ], 0EA90h ; nop\jmp far imm16:imm16 ? 3728 00001C09 7414 <1> je @F 3729 00001C0B BE[9D67] <1> mov si, msg.di_iisp 3730 00001C0E 26807F09EB <1> cmp byte [ es:bx + ieJmphwreset ], 0EBh ; jmp short ? 3731 00001C13 7507 <1> jne .nonstd 3732 00001C15 26813FEB10 <1> cmp word [ es:bx + ieEntry ], 010EBh ; jmp short $+18 ? 3733 00001C1A 7403 <1> je @F 3734 <1> .nonstd: 3735 00001C1C BE[A567] <1> mov si, msg.di_nonstd_iisp 3736 <1> @@: 3737 00001C1F 58 <1> pop ax 3738 00001C20 5A <1> pop dx ; segment 3739 00001C21 F8 <1> clc 3740 00001C22 C3 <1> retn 3741 <1> 3742 <1> 3743 <1> .not_iisp: 3744 00001C23 26803FE8 <1> cmp byte [es:bx], 0E8h 3745 00001C27 7514 <1> jne .not_fd 3746 00001C29 26807F03EA <1> cmp byte [es:bx + 3], 0EAh 3747 00001C2E 750D <1> jne .not_fd 3748 00001C30 26FF7706 <1> push word [es:bx + 4 + 2] 3749 00001C34 26FF7704 <1> push word [es:bx + 4] 3750 00001C38 BE[CD67] <1> mov si, msg.di_freedos_reloc 3751 00001C3B EBE2 <1> jmp @B 3752 <1> 3753 <1> .not_fd: 3754 00001C3D BE[E067] <1> mov si, msg.di_jmpfar 3755 00001C40 26803FEA <1> cmp byte [es:bx], 0EAh 3756 00001C44 750A <1> jne .not_jmpfar 3757 00001C46 26FF7703 <1> push word [es:bx + 1 + 2] 3758 00001C4A 26FF7701 <1> push word [es:bx + 1] 3759 00001C4E EBCF <1> jmp @B 3760 <1> 3761 <1> .not_jmpfar: 3762 00001C50 BE[EF67] <1> mov si, msg.di_jmpfarindirect 3763 00001C53 26803FEB <1> cmp byte [es:bx], 0EBh 3764 00001C57 750D <1> jne .not_testhook_try_jmpfarindirect 3765 00001C59 BE[0368] <1> mov si, msg.di_testhook 3766 00001C5C 268A4701 <1> mov al, byte [es:bx + 1] 3767 00001C60 98 <1> cbw 3768 00001C61 83C002 <1> add ax, 2 3769 00001C64 01C3 <1> add bx, ax 3770 <1> .not_testhook_try_jmpfarindirect: 3771 00001C66 83FBFA <1> cmp bx, -6 3772 00001C69 7720 <1> ja .not_testhook_or_jmpfarindirect 3773 00001C6B 26813F2EFF <1> cmp word [es:bx], 0FF2Eh 3774 00001C70 7519 <1> jne .not_testhook_or_jmpfarindirect 3775 00001C72 26807F022E <1> cmp byte [es:bx + 2], 2Eh 3776 00001C77 7512 <1> jne .not_testhook_or_jmpfarindirect 3777 00001C79 268B5F03 <1> mov bx, word [es:bx + 3] 3778 00001C7D 83FBFC <1> cmp bx, -4 3779 00001C80 7709 <1> ja .not_testhook_or_jmpfarindirect 3780 00001C82 26FF7702 <1> push word [es:bx + 2] 3781 00001C86 26FF37 <1> push word [es:bx] 3782 00001C89 EB94 <1> jmp @B 3783 <1> 3784 <1> .not_testhook_or_jmpfarindirect: 3785 00001C8B F9 <1> stc 3786 00001C8C C3 <1> retn 3787 <1> 3788 <1> 3789 <1> gateout.mcbname: 3790 00001C8D F6C501 <1> test ch, 1 3791 00001C90 7503E99A00 <1> jz .ret 3792 00001C95 8B16[CE0A] <1> mov dx, word [firstmcb] 3793 00001C99 83FAFF <1> cmp dx, -1 3794 00001C9C 7503E98E00 <1> je .ret 3795 00001CA1 51 <1> push cx 3796 00001CA2 A1[640B] <1> mov ax, word [intaddress] 3797 00001CA5 B104 <1> mov cl, 4 3798 00001CA7 D3E8 <1> shr ax, cl 3799 00001CA9 0306[660B] <1> add ax, word [intaddress + 2] ; => segment of handler 3800 00001CAD 7251 <1> jc .hma 3801 <1> .loop: 3802 <1> %if _PM 3803 00001CAF E830B5 <1> call setes2dx 3804 <1> %else 3805 <1> mov es, dx 3806 <1> %endif 3807 00001CB2 89D1 <1> mov cx, dx 3808 00001CB4 26030E0300 <1> add cx, word [es:3] 3809 00001CB9 41 <1> inc cx 3810 00001CBA 39D0 <1> cmp ax, dx 3811 00001CBC 7247 <1> jb .next 3812 00001CBE 39C8 <1> cmp ax, cx 3813 00001CC0 7343 <1> jae .next 3814 00001CC2 268B160100 <1> mov dx, word [es:1] 3815 00001CC7 BE[3D68] <1> mov si, msg.di_system_mcb 3816 00001CCA 83FA50 <1> cmp dx, 50h 3817 00001CCD 725A <1> jb .copy 3818 00001CCF 4A <1> dec dx 3819 <1> %if _PM 3820 00001CD0 E80FB5 <1> call setes2dx 3821 <1> %else 3822 <1> mov es, dx 3823 <1> %endif 3824 00001CD3 06 <1> push es 3825 00001CD4 1F <1> pop ds 3826 00001CD5 16 <1> push ss 3827 00001CD6 07 <1> pop es 3828 00001CD7 B020 <1> mov al, 32 3829 00001CD9 AA <1> stosb 3830 00001CDA 89F8 <1> mov ax, di 3831 00001CDC BE0800 <1> mov si, 8 3832 00001CDF 89F1 <1> mov cx, si 3833 00001CE1 57 <1> push di 3834 00001CE2 F3A4 <1> rep movsb 3835 00001CE4 B000 <1> mov al, 0 3836 00001CE6 AA <1> stosb ; append zero-value byte 3837 00001CE7 5F <1> pop di ; -> name in buffer 3838 00001CE8 16 <1> push ss 3839 00001CE9 1F <1> pop ds 3840 <1> @@: 3841 00001CEA AE <1> scasb ; is it zero ? 3842 00001CEB 75FD <1> jne @B ; no, continue --> 3843 <1> ; first dec makes it -> at the zero 3844 <1> @@: 3845 00001CED 4F <1> dec di 3846 00001CEE 39F8 <1> cmp ax, di 3847 00001CF0 7408 <1> je .empty 3848 00001CF2 807DFF20 <1> cmp byte [di - 1], 32 3849 00001CF6 74F5 <1> je @B 3850 00001CF8 EB34 <1> jmp .ret_cx 3851 <1> 3852 <1> .empty: 3853 00001CFA 4F <1> dec di 3854 00001CFB BE[2D68] <1> mov si, msg.di_empty 3855 00001CFE EB29 <1> jmp .copy 3856 <1> 3857 <1> .hma: 3858 00001D00 BE[6768] <1> mov si, msg.di_hma 3859 00001D03 EB24 <1> jmp .copy 3860 <1> 3861 <1> .next: 3862 00001D05 89CA <1> mov dx, cx 3863 00001D07 3B16[D00A] <1> cmp dx, word [firstumcb]; is next one the first UMCB ? 3864 00001D0B 74A2 <1> je .loop ; yes, ignore the "Z" (if any) --> 3865 00001D0D 26803E00004D <1> cmp byte [es:0], "M" ; check current signature 3866 00001D13 749A <1> je .loop ; if "M" then loop to next --> 3867 <1> 3868 00001D15 8B36[D00A] <1> mov si, word [firstumcb] 3869 00001D19 46 <1> inc si 3870 00001D1A 7503 <1> jnz @F 3871 00001D1C BE00A0 <1> mov si, 0A000h 3872 <1> @@: 3873 00001D1F 39F0 <1> cmp ax, si 3874 00001D21 BE[4968] <1> mov si, msg.di_system_upper 3875 00001D24 7303 <1> jae @F 3876 00001D26 BE[5868] <1> mov si, msg.di_system_low 3877 <1> @@: 3878 <1> .copy: 3879 00001D29 16 <1> push ss 3880 00001D2A 07 <1> pop es 3881 00001D2B E8D416 <1> call copy_single_counted_string 3882 <1> .ret_cx: 3883 00001D2E 59 <1> pop cx 3884 <1> .ret: 3885 00001D2F C3 <1> retn 3886 <1> 3887 <1> %endif 3888 <1> 3889 <1> %if _MCB 3890 <1> ; DM command 3891 <1> mcbout: 3892 00001D30 E8289C <1> call skipwhite 3893 00001D33 8B16[CE0A] <1> mov dx, word [firstmcb] 3894 00001D37 E8CC9B <1> call iseol? 3895 00001D3A 7406 <1> je .lolmcb 3896 00001D3C E8A69A <1> call getword 3897 00001D3F E8D99B <1> call chkeol 3898 <1> .lolmcb: 3899 00001D42 89D6 <1> mov si, dx 3900 00001D44 BF[0E08] <1> mov di, line_out 3901 00001D47 B85053 <1> mov ax, "PS" 3902 00001D4A AB <1> stosw 3903 00001D4B B8503A <1> mov ax, "P:" 3904 00001D4E AB <1> stosw 3905 00001D4F B020 <1> mov al, 32 3906 00001D51 AA <1> stosb 3907 00001D52 A1[A40A] <1> mov ax, word [pspdbe] 3908 00001D55 E8AE9C <1> call hexword 3909 00001D58 E8E39C <1> call putsline_crlf ; destroys cx,dx,bx 3910 00001D5B B14D <1> mov cl, 'M' 3911 <1> .next: 3912 00001D5D 83FEFF <1> cmp si, byte -1 3913 00001D60 7405 <1> je .invmcb 3914 00001D62 83FE50 <1> cmp si, byte 50h 3915 00001D65 7306 <1> jae .valmcb 3916 <1> .invmcb: 3917 00001D67 BA[A95E] <1> mov dx, msg.invmcbadr 3918 00001D6A E94FA0 <1> jmp putsz 3919 <1> .valmcb: 3920 00001D6D BF[0E08] <1> mov di, line_out 3921 00001D70 1E <1> push ds 3922 <1> %if _PM 3923 00001D71 E8D600 <1> call setds2si 3924 <1> %else 3925 <1> mov ds, si 3926 <1> %endif 3927 00001D74 8A2E0000 <1> mov ch, byte [0000] 3928 00001D78 8B1E0100 <1> mov bx, word [0001] 3929 00001D7C 8B160300 <1> mov dx, word [0003] 3930 <1> 3931 00001D80 89F0 <1> mov ax, si 3932 00001D82 E8819C <1> call hexword ; segment address of MCB 3933 00001D85 B020 <1> mov al, 32 3934 00001D87 AA <1> stosb 3935 00001D88 88E8 <1> mov al, ch 3936 00001D8A E8809C <1> call hexbyte ; 'M' or 'Z' 3937 00001D8D B020 <1> mov al, 32 3938 00001D8F AA <1> stosb 3939 00001D90 89D8 <1> mov ax, bx 3940 00001D92 E8719C <1> call hexword ; MCB owner 3941 00001D95 B020 <1> mov al, 32 3942 00001D97 AA <1> stosb 3943 00001D98 89D0 <1> mov ax, dx 3944 00001D9A E8699C <1> call hexword ; MCB size in paragraphs 3945 <1> 3946 00001D9D B020 <1> mov al, 32 3947 00001D9F AA <1> stosb 3948 00001DA0 89D0 <1> mov ax, dx ; ax = size in paragraphs 3949 00001DA2 53 <1> push bx 3950 00001DA3 50 <1> push ax 3951 00001DA4 52 <1> push dx 3952 00001DA5 51 <1> push cx 3953 00001DA6 31D2 <1> xor dx, dx ; dx:ax = size in paragraphs 3954 00001DA8 B91000 <1> mov cx, 16 ; cx = 16, multiplier (get size in bytes) 3955 00001DAB BB0800 <1> mov bx, 4+4 ; bx = 4+4, width 3956 <1> 3957 00001DAE E87801 <1> call disp_dxax_times_cx_width_bx_size.store 3958 00001DB1 59 <1> pop cx 3959 00001DB2 5A <1> pop dx 3960 00001DB3 58 <1> pop ax 3961 00001DB4 5B <1> pop bx 3962 <1> 3963 00001DB5 85DB <1> test bx, bx 3964 00001DB7 7472 <1> jz .freemcb ; free MCBs have no name --> 3965 00001DB9 B020 <1> mov al, 32 3966 00001DBB AA <1> stosb 3967 00001DBC 56 <1> push si 3968 00001DBD 51 <1> push cx 3969 00001DBE 52 <1> push dx 3970 <1> 3971 00001DBF 1E <1> push ds 3972 00001DC0 BE0800 <1> mov si, 8 3973 00001DC3 B90200 <1> mov cx, 2 3974 00001DC6 39F3 <1> cmp bx, si ; is it a "system" MCB? (owner 0008h or 0007h) 3975 00001DC8 7707 <1> ja @F 3976 00001DCA 803C53 <1> cmp byte [si], "S" ; "S", "SD", "SC" ? 3977 00001DCD 7408 <1> je .nextmcbchar ; yes, limit name to two characters --> 3978 00001DCF EB04 <1> jmp .nextmcbchar_cx_si ; no, assume full name given 3979 <1> @@: 3980 00001DD1 4B <1> dec bx ; => owner block's MCB 3981 <1> %if _PM 3982 00001DD2 E87700 <1> call setds2bx 3983 <1> %else 3984 <1> mov ds, bx 3985 <1> %endif 3986 <1> .nextmcbchar_cx_si: 3987 00001DD5 89F1 <1> mov cx, si ; = 8 3988 <1> .nextmcbchar: ; copy name of owner MCB 3989 00001DD7 AC <1> lodsb 3990 00001DD8 AA <1> stosb 3991 00001DD9 08C0 <1> or al, al 3992 00001DDB E0FA <1> loopnz .nextmcbchar ; was not NUL and more bytes left ? 3993 00001DDD 84C0 <1> test al, al 3994 00001DDF 7501 <1> jnz @F 3995 00001DE1 4F <1> dec di 3996 <1> @@: 3997 00001DE2 1F <1> pop ds 3998 <1> 3999 00001DE3 833E010008 <1> cmp word [1], 8 4000 00001DE8 753E <1> jne .not_s_mcb 4001 00001DEA 833E080053 <1> cmp word [8], "S" ; S MCB ? 4002 00001DEF 7537 <1> jne .not_s_mcb 4003 <1> 4004 00001DF1 B82074 <1> mov ax, " t" 4005 00001DF4 AB <1> stosw 4006 00001DF5 B87970 <1> mov ax, "yp" 4007 00001DF8 AB <1> stosw 4008 00001DF9 B86520 <1> mov ax, "e " 4009 00001DFC AB <1> stosw 4010 <1> 4011 00001DFD 31C0 <1> xor ax, ax 4012 00001DFF A00A00 <1> mov al, [10] 4013 00001E02 E8089C <1> call hexbyte 4014 <1> 4015 00001E05 16 <1> push ss 4016 00001E06 1F <1> pop ds 4017 00001E07 BE[8C72] <1> mov si, smcbtypes 4018 <1> .s_mcb_loop: 4019 00001E0A 833CFF <1> cmp word [si], -1 4020 00001E0D 740E <1> je .s_mcb_unknown 4021 00001E0F 3904 <1> cmp word [si], ax 4022 00001E11 7405 <1> je .s_mcb_known 4023 00001E13 83C604 <1> add si, 4 4024 00001E16 EBF2 <1> jmp .s_mcb_loop 4025 <1> 4026 <1> .s_mcb_known: 4027 00001E18 8B7402 <1> mov si, word [si + 2] 4028 00001E1B EB03 <1> jmp .s_mcb_common 4029 <1> 4030 <1> .s_mcb_unknown: 4031 00001E1D BE[3574] <1> mov si, smcbmsg_unknown 4032 <1> .s_mcb_common: 4033 00001E20 B020 <1> mov al, 32 4034 <1> @@: 4035 00001E22 AA <1> stosb 4036 00001E23 AC <1> lodsb 4037 00001E24 84C0 <1> test al, al 4038 00001E26 75FA <1> jnz @B 4039 <1> 4040 <1> .not_s_mcb: 4041 00001E28 5A <1> pop dx 4042 00001E29 59 <1> pop cx 4043 00001E2A 5E <1> pop si 4044 <1> .freemcb: 4045 <1> 4046 00001E2B 1F <1> pop ds 4047 00001E2C 80FD4D <1> cmp ch, 'M' 4048 00001E2F 7406 <1> je .disp 4049 00001E31 80FD5A <1> cmp ch, 'Z' 4050 00001E34 7401 <1> je .disp 4051 <1> .ret: 4052 00001E36 C3 <1> retn 4053 <1> 4054 <1> .disp: 4055 00001E37 88E9 <1> mov cl, ch 4056 00001E39 52 <1> push dx 4057 00001E3A 51 <1> push cx 4058 00001E3B E8009C <1> call putsline_crlf ; destroys cx,dx,bx 4059 00001E3E 59 <1> pop cx 4060 00001E3F 5A <1> pop dx 4061 00001E40 01D6 <1> add si, dx 4062 00001E42 72F2 <1> jc .ret ; over FFFFh, must be end of chain --> (hmm) 4063 00001E44 46 <1> inc si 4064 00001E45 74EF <1> jz .ret 4065 00001E47 E913FF <1> jmp .next 4066 <1> 4067 <1> %if _PM 4068 <1> setds2si: 4069 00001E4A 89F3 <1> mov bx, si 4070 <1> setds2bx: 4071 00001E4C E87A73 <1> call ispm 4072 00001E4F 7505 <1> jnz sd2s_ex 4073 00001E51 89DA <1> mov dx, bx 4074 00001E53 E86D7A <1> call setrmsegm 4075 <1> sd2s_ex: 4076 00001E56 8EDB <1> mov ds, bx 4077 00001E58 C3 <1> retn 4078 <1> %endif ; _PM 4079 <1> %endif ; _MCB 4080 <1> 4081 <1> ;--- DX command. Display extended memory 4082 <1> 4083 <1> %if _PM 4084 <1> [cpu 386] 4085 <1> extmem: 4086 00001E59 8B16[5A0B] <1> mov dx, word [x_addr+0] 4087 00001E5D 8B1E[5C0B] <1> mov bx, word [x_addr+2] 4088 00001E61 E8F79A <1> call skipwhite 4089 00001E64 E89F9A <1> call iseol? 4090 00001E67 7406 <1> je extmem_1 4091 00001E69 E89394 <1> call getdword ; get linear address into bx:dx 4092 00001E6C E8AC9A <1> call chkeol ; expect end of line here 4093 <1> extmem_1: 4094 00001E6F C706[DA0B][591E] <1> mov word [lastcmd], extmem 4095 00001E75 53 <1> push bx 4096 00001E76 52 <1> push dx 4097 00001E77 665D <1> pop ebp 4098 <1> 4099 00001E79 BF[400A] <1> mov di, stack ; create a GDT for Int15.87 4100 00001E7C 31C0 <1> xor ax, ax 4101 00001E7E B90800 <1> mov cx, 8 4102 00001E81 F3AB <1> rep stosw 4103 00001E83 B87F00 <1> mov ax, 007Fh 4104 00001E86 AB <1> stosw 4105 00001E87 89D0 <1> mov ax, dx 4106 00001E89 AB <1> stosw 4107 00001E8A 88D8 <1> mov al, bl 4108 00001E8C AA <1> stosb 4109 00001E8D B89300 <1> mov ax, 0093h 4110 00001E90 AB <1> stosw 4111 00001E91 88F8 <1> mov al, bh 4112 00001E93 AA <1> stosb 4113 00001E94 B87F00 <1> mov ax, 007Fh 4114 00001E97 AB <1> stosw 4115 00001E98 B8[8000] <1> mov ax, line_in+128 4116 00001E9B 8B1E[A60A] <1> mov bx, word [pspdbg] 4117 00001E9F 660FB7DB <1> movzx ebx, bx 4118 00001EA3 66C1E304 <1> shl ebx, 4 4119 00001EA7 660FB7C0 <1> movzx eax, ax 4120 00001EAB 6601D8 <1> add eax, ebx ; eax = flat address of line_in+128 4121 00001EAE AB <1> stosw 4122 00001EAF 66C1E810 <1> shr eax, 16 4123 00001EB3 AA <1> stosb 4124 00001EB4 88E3 <1> mov bl, ah 4125 00001EB6 B89300 <1> mov ax, 0093h 4126 00001EB9 AB <1> stosw 4127 00001EBA 88D8 <1> mov al, bl 4128 00001EBC AA <1> stosb 4129 00001EBD B90800 <1> mov cx, 8 4130 00001EC0 31C0 <1> xor ax, ax 4131 00001EC2 F3AB <1> rep stosw 4132 <1> 4133 00001EC4 E80273 <1> call ispm 4134 00001EC7 BE[400A] <1> mov si, stack 4135 00001ECA B94000 <1> mov cx, 0040h 4136 00001ECD B487 <1> mov ah, 87h 4137 00001ECF 750B <1> jnz extmem_rm 4138 00001ED1 FF36[A60A] <1> push word [pspdbg] 4139 00001ED5 6A15 <1> push 15h 4140 00001ED7 E84174 <1> call intcall 4141 00001EDA EB02 <1> jmp short i15ok 4142 <1> extmem_rm: 4143 00001EDC CD15 <1> int 15h 4144 <1> i15ok: 4145 00001EDE 7247 <1> jc extmem_exit 4146 00001EE0 BE[8000] <1> mov si, line_in+128 4147 00001EE3 B508 <1> mov ch, 8h 4148 <1> nexti15l: 4149 00001EE5 E8BB20 <1> call handle_serial_flags_ctrl_c 4150 00001EE8 BF[0E08] <1> mov di, line_out 4151 00001EEB 6689E8 <1> mov eax, ebp 4152 00001EEE 66C1E810 <1> shr eax, 16 4153 00001EF2 E8119B <1> call hexword 4154 00001EF5 89E8 <1> mov ax, bp 4155 00001EF7 E80C9B <1> call hexword 4156 00001EFA B82020 <1> mov ax, 32<<8|32 4157 00001EFD AB <1> stosw 4158 00001EFE BB[4808] <1> mov bx, line_out+10+3*16 4159 00001F01 B110 <1> mov cl, 10h 4160 <1> nexti15b: 4161 00001F03 AC <1> lodsb 4162 00001F04 E88EF6 <1> call dd_store 4163 00001F07 B020 <1> mov al, 32 4164 00001F09 AA <1> stosb 4165 00001F0A FEC9 <1> dec cl 4166 00001F0C 75F5 <1> jnz nexti15b 4167 00001F0E C645E72D <1> mov byte [di-(8*3+1)], '-' ; display a '-' after 8 bytes 4168 00001F12 83C710 <1> add di, 16 4169 00001F15 51 <1> push cx 4170 00001F16 E8259B <1> call putsline_crlf 4171 00001F19 59 <1> pop cx 4172 00001F1A 6683C510 <1> add ebp, byte 10h 4173 00001F1E FECD <1> dec ch 4174 00001F20 75C3 <1> jnz nexti15l 4175 00001F22 66892E[5A0B] <1> mov dword [x_addr], ebp 4176 <1> extmem_exit: 4177 00001F27 C3 <1> retn 4178 <1> __CPU__ 4179 <1> %endif 4180 <1> 4181 <1> ; INP: dx:ax = numerator 4182 <1> ; cx = multiplier (0 to take si:dx:ax as numerator) 4183 <1> ; bx = field width 4184 <1> ; es:di -> buffer where to store 4185 <1> ; STT: UP, ds = ss 4186 <1> ; OUT: written to buffer, es:di -> behind written string 4187 <1> disp_dxax_times_cx_width_bx_size: 4188 00001F28 A8 <1> db __TEST_IMM8 ; (skip stc, NC) 4189 <1> .store: 4190 00001F29 F9 <1> stc 4191 <1> 4192 <1> lframe near 4193 <1> lequ 4 + 4 + 2, buffer_size 4194 <1> ; 4: "2048" (maximum number) 4195 <1> ; 4: " ?iB" (IEC prefixed unit) 4196 <1> ; 2: ??? 4197 <1> lvar ?buffer_size, buffer 4198 <1> lvar 6, dividend 4199 00001F2A 5589E58D66F0 <1> lenter 4200 <1> lvar word, bit_0_is_store 4201 00001F30 9C <1> pushf 4202 <1> lvar word, width 4203 00001F31 53 <1> push bx 4204 00001F32 56 <1> push si 4205 00001F33 1E <1> push ds 4206 00001F34 51 <1> push cx 4207 00001F35 50 <1> push ax 4208 00001F36 52 <1> push dx 4209 00001F37 06 <1> push es 4210 00001F38 57 <1> push di 4211 <1> 4212 00001F39 16 <1> push ss ; push cs 4213 00001F3A 1F <1> pop ds 4214 00001F3B 16 <1> push ss 4215 00001F3C 07 <1> pop es 4216 <1> 4217 00001F3D E310 <1> jcxz .use_si 4218 <1> 4219 00001F3F 52 <1> push dx 4220 00001F40 F7E1 <1> mul cx 4221 00001F42 97 <1> xchg ax, di 4222 00001F43 87D6 <1> xchg dx, si ; si:di = first mul 4223 <1> 4224 00001F45 58 <1> pop ax 4225 00001F46 F7E1 <1> mul cx 4226 00001F48 01F0 <1> add ax, si 4227 00001F4A 83D200 <1> adc dx, 0 ; dx:ax = second mul + adj, dx:ax:di = mul 4228 <1> 4229 00001F4D EB05 <1> jmp @F 4230 <1> 4231 <1> .use_si: 4232 00001F4F 89C7 <1> mov di, ax 4233 00001F51 92 <1> xchg ax, dx 4234 00001F52 89F2 <1> mov dx, si 4235 <1> 4236 <1> @@: 4237 00001F54 897EF0 <1> mov word [bp + ?dividend], di 4238 00001F57 8946F2 <1> mov word [bp + ?dividend + 2], ax 4239 00001F5A 8956F4 <1> mov word [bp + ?dividend + 4], dx 4240 <1> 4241 <1> ; set up divisor for the unit prefixes 4242 00001F5D B90004 <1> mov cx, 1024 ; 1000 here if SI units 4243 00001F60 F606[7D00]10 <1> testopt [options], use_si_units ; SI units ? 4244 00001F65 7403 <1> jz @F ; no --> 4245 00001F67 B9E803 <1> mov cx, 1000 ; yes, use 1000 4246 <1> @@: 4247 <1> 4248 00001F6A BE[C86B] <1> mov si, msg.prefixes ; -> first prefix (blank) 4249 <1> .loop: 4250 00001F6D 837EF400 <1> cmp word [bp + ?dividend + 4], 0 4251 00001F71 750D <1> jnz .divide 4252 00001F73 837EF200 <1> cmp word [bp + ?dividend + 2], 0 4253 00001F77 7507 <1> jnz .divide 4254 00001F79 817EF00008 <1> cmp word [bp + ?dividend], 2048 4255 00001F7E 7614 <1> jbe .end 4256 <1> .divide: 4257 00001F80 46 <1> inc si ; -> next prefix 4258 <1> 4259 00001F81 31D2 <1> xor dx, dx 4260 00001F83 BF0600 <1> mov di, 6 4261 <1> .loop_divide: 4262 00001F86 8B43EE <1> mov ax, [bp + ?dividend - 2 + di] 4263 00001F89 F7F1 <1> div cx 4264 00001F8B 8943EE <1> mov word [bp + ?dividend - 2 + di], ax 4265 00001F8E 4F <1> dec di 4266 00001F8F 4F <1> dec di 4267 00001F90 75F4 <1> jnz .loop_divide 4268 <1> ; dx = last remainder 4269 00001F92 EBD9 <1> jmp .loop 4270 <1> 4271 <1> .end: 4272 00001F94 8D7EFF <1> lea di, [bp + ?buffer + ?buffer_size - 1] 4273 00001F97 FD <1> std ; _AMD_ERRATUM_109_WORKAROUND does not apply 4274 00001F98 B042 <1> mov al, "B" 4275 00001F9A AA <1> stosb 4276 00001F9B 8A04 <1> mov al, [si] 4277 00001F9D 3C20 <1> cmp al, 32 4278 00001F9F 7416 <1> je @FF 4279 <1> 4280 00001FA1 F606[7D00]10 <1> testopt [options], use_si_units 4281 <1> ; SI units ? 4282 00001FA6 750E <1> jnz @F ; yes --> 4283 00001FA8 24DF <1> and al, ~20h ; uppercase, don't do this if SI units 4284 00001FAA F606[7D00]20 <1> testopt [options], use_jedec_units 4285 <1> ; JEDEC units ? 4286 00001FAF 7505 <1> jnz @F ; yes --> 4287 00001FB1 50 <1> push ax 4288 00001FB2 B069 <1> mov al, "i" 4289 00001FB4 AA <1> stosb ; don't store this if SI or JEDEC units 4290 00001FB5 58 <1> pop ax 4291 <1> @@: 4292 00001FB6 AA <1> stosb 4293 <1> @@: 4294 00001FB7 B020 <1> mov al, 32 4295 00001FB9 AA <1> stosb 4296 <1> 4297 00001FBA 8B46F0 <1> mov ax, word [bp + ?dividend] 4298 00001FBD B90A00 <1> mov cx, 10 4299 <1> .loop_write: 4300 00001FC0 31D2 <1> xor dx, dx 4301 00001FC2 F7F1 <1> div cx 4302 00001FC4 92 <1> xchg ax, dx 4303 <1> ; ax = remainder (next digit) 4304 <1> ; dx = result of div 4305 00001FC5 0430 <1> add al, '0' 4306 00001FC7 AA <1> stosb 4307 00001FC8 92 <1> xchg ax, dx ; ax = result of div 4308 00001FC9 85C0 <1> test ax, ax ; any more ? 4309 00001FCB 75F3 <1> jnz .loop_write ; loop --> 4310 <1> 4311 00001FCD FC <1> cld 4312 <1> 4313 00001FCE 47 <1> inc di ; -> first digit 4314 00001FCF 8D5E00 <1> lea bx, [bp + ?buffer + ?buffer_size] 4315 <1> ; -> behind 'B' 4316 00001FD2 29FB <1> sub bx, di ; = length of string 4317 00001FD4 89FE <1> mov si, di 4318 <1> 4319 00001FD6 5F <1> pop di 4320 00001FD7 07 <1> pop es ; restore es:di 4321 <1> ; -> where to store (if storing) 4322 <1> 4323 00001FD8 8B4EEC <1> mov cx, [bp + ?width] 4324 00001FDB 29D9 <1> sub cx, bx 4325 00001FDD 760F <1> jbe .none_blank 4326 00001FDF B020 <1> mov al, 32 4327 00001FE1 F646EE01 <1> test byte [bp + ?bit_0_is_store], 1 4328 00001FE5 7505 <1> jnz @F 4329 <1> .loop_blank_disp: 4330 00001FE7 E8F59D <1> call disp_al 4331 00001FEA E2FB <1> loop .loop_blank_disp 4332 <1> ; now cx = 0 so the rep stosb is a nop 4333 <1> @@: 4334 00001FEC F3AA <1> rep stosb 4335 <1> .none_blank: 4336 <1> 4337 <1> 4338 00001FEE 89D9 <1> mov cx, bx 4339 00001FF0 F646EE01 <1> test byte [bp + ?bit_0_is_store], 1 4340 00001FF4 7506 <1> jnz @F 4341 <1> 4342 <1> ; ! note ss = ds 4343 00001FF6 89F2 <1> mov dx, si ; ds:dx -> string 4344 00001FF8 E8A73D <1> call disp_message_length_cx 4345 00001FFB A9 <1> db __TEST_IMM16 ; (skip rep movsb) 4346 <1> @@: 4347 <1> ; ! note ss = ds 4348 <1> ; ds:si -> string, cx = length 4349 00001FFC F3A4 <1> rep movsb 4350 <1> 4351 00001FFE 5A <1> pop dx 4352 00001FFF 58 <1> pop ax 4353 00002000 59 <1> pop cx 4354 00002001 1F <1> pop ds 4355 00002002 5E <1> pop si 4356 00002003 5B <1> pop bx 4357 00002004 89EC5D <1> lleave 4358 00002007 C3 <1> lret 4359 <1> 2059 %include "rr.asm" 2060 <1> 2061 <1> %if 0 2062 <1> 2063 <1> lDebug R commands - Register access 2064 <1> 2065 <1> Copyright (C) 1995-2003 Paul Vojta 2066 <1> Copyright (C) 2008-2012 C. Masloch 2067 <1> 2068 <1> Usage of the works is permitted provided that this 2069 <1> instrument is retained with the works, so that any entity 2070 <1> that uses the works is notified of this instrument. 2071 <1> 2072 <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 2073 <1> 2074 <1> %endif 2075 <1> 2076 <1> 2077 <1> usesection lDEBUG_CODE 2078 <1> 2079 <1> ; R command - dump and manipulate registers. 2080 <1> rr: 2081 00002008 E8FB98 <1> call iseol? 2082 0000200B 7503E94A07 <1> je dumpregs ; if no parameters --> 2083 <1> 2084 00002010 E8FC6B <1> call uppercase 2085 00002013 3C45 <1> cmp al, 'E' 2086 00002015 7514 <1> jne @F 2087 <1> 2088 00002017 50 <1> push ax 2089 00002018 56 <1> push si 2090 00002019 AC <1> lodsb 2091 0000201A 3C2E <1> cmp al, '.' 2092 0000201C 7503E99E05 <1> je re_cmd 2093 00002021 E8E298 <1> call iseol? 2094 00002024 5E <1> pop si 2095 00002025 58 <1> pop ax 2096 00002026 7503E98406 <1> je dumpregs_extended 2097 <1> @@: 2098 <1> 2099 <1> %if !_ONLYNON386 || (_OPTIONS || _VARIABLES) || _MMXSUPP || _RN 2100 0000202B 4E <1> dec si 2101 0000202C BA[BA64] <1> mov dx, msg.vv 2102 0000202F E87598 <1> call isstring? 2103 00002032 7503E9B90B <1> je dumpallvars 2104 00002037 BA[BD64] <1> mov dx, msg.vm 2105 0000203A E86A98 <1> call isstring? 2106 0000203D 7503E9F30B <1> je dumpmemory 2107 00002042 AC <1> lodsb 2108 00002043 E8C96B <1> call uppercase 2109 <1> 2110 00002046 50 <1> push ax 2111 00002047 56 <1> push si 2112 00002048 E81099 <1> call skipwhite 2113 0000204B E8B898 <1> call iseol? ; line ends after single character ? 2114 0000204E 5E <1> pop si 2115 0000204F 58 <1> pop ax 2116 00002050 7550 <1> jne short rr1 ; no, not other kinds of dumps --> 2117 <1> 2118 00002052 3C46 <1> cmp al, 'F' ; only valid input to a later check 2119 00002054 7503E9D703 <1> je rr2.writeprompt ; so go there --> 2120 <1> ; (note that byte [si-1] must != '.') 2121 <1> %if _OPTIONS || _VARIABLES 2122 00002059 3C56 <1> cmp al, 'V' 2123 0000205B 7503E9AC0A <1> je dumpvars 2124 <1> %endif 2125 <1> %if _MMXSUPP 2126 00002060 3C4D <1> cmp al, 'M' 2127 00002062 750A <1> jne .notrm 2128 00002064 803E[E50A]00 <1> cmp byte [has_mmx], 0 2129 00002069 7403 <1> je .notrm 2130 0000206B E9220C <1> jmp dumpregsMMX 2131 <1> .notrm: 2132 <1> %endif 2133 0000206E 3C58 <1> _386 cmp al, 'X' 2134 00002070 7411 <1> _386 je short rrx 2135 <1> %if _RN 2136 00002072 3C4E <1> cmp al, 'N' 2137 00002074 750A <1> jne .notrn 2138 00002076 803E[E30A]00 <1> cmp byte [has_87], 0 2139 0000207B 7403 <1> je .notrn 2140 0000207D E9EF08 <1> jmp dumpregsFPU 2141 <1> .notrn: 2142 <1> %endif 2143 00002080 E95B84 <1> jmp error ; all other single characters are invalid 2144 <1> %endif 2145 <1> 2146 <1> %ifn _ONLYNON386 2147 <1> rrx: 2148 00002083 AC <1> lodsb 2149 00002084 E89498 <1> call chkeol 2150 00002087 8036[7C00]01 <1> xoropt [options], dispregs32 2151 0000208C BA[D45D] <1> mov dx, msg.regs386 2152 0000208F E82A9D <1> call putsz 2153 00002092 BA[EB5D] <1> mov dx, msg.regs386_on 2154 00002095 F606[7C00]01 <1> testopt [options], dispregs32 2155 0000209A 7503 <1> jnz .on 2156 0000209C BA[E75D] <1> mov dx, msg.regs386_off 2157 <1> .on: 2158 0000209F E91A9D <1> jmp putsz 2159 <1> %endif 2160 <1> 2161 <1> rr1: 2162 <1> lframe 2163 <1> lvar dword, offset 2164 <1> lvar word, segsel 2165 <1> lvar word, memsizestring 2166 <1> lvar word, ismem_high_size_low 2167 <1> lequ ?ismem_high_size_low, size 2168 <1> lequ ?ismem_high_size_low + 1, ismem 2169 <1> lvar word, hhtype_high_rrtype_low 2170 <1> lequ ?hhtype_high_rrtype_low, replace_rrtype 2171 <1> %define rrtype bp + ?replace_rrtype 2172 <1> lequ ?hhtype_high_rrtype_low + 1, hhtype 2173 <1> lvar word, replace_rrmask 2174 <1> %define rrmask bp + ?replace_rrmask 2175 <1> lvar word, hhoffset 2176 <1> lequ 16, namebufferlength 2177 <1> lvar ?namebufferlength, namebuffer 2178 000020A2 5589E58D66E0 <1> lenter 2179 000020A8 89E7 <1> mov di, sp ; -> ?namebuffer 2180 000020AA E8578E <1> call isvariable?.return_name 2181 000020AD 7203E93501 <1> jnc rr1_variable 2182 <1> 2183 000020B2 4E <1> dec si 2184 000020B3 BA[E766] <1> mov dx, msg.byte 2185 000020B6 BB0101 <1> mov bx, 101h 2186 000020B9 52 <1> push dx 2187 000020BA E8EA97 <1> call isstring? 2188 000020BD 7428 <1> je rr1_memory 2189 000020BF 5A <1> pop dx 2190 000020C0 BA[E166] <1> mov dx, msg.word 2191 000020C3 43 <1> inc bx ; = 102h 2192 000020C4 52 <1> push dx 2193 000020C5 E8DF97 <1> call isstring? 2194 000020C8 741D <1> je rr1_memory 2195 000020CA 5A <1> pop dx 2196 000020CB BA[E666] <1> mov dx, msg.3byte 2197 000020CE 43 <1> inc bx ; = 103h 2198 000020CF 52 <1> push dx 2199 000020D0 E8D497 <1> call isstring? 2200 000020D3 7412 <1> je rr1_memory 2201 000020D5 5A <1> pop dx 2202 000020D6 BA[E066] <1> mov dx, msg.dword 2203 000020D9 43 <1> inc bx ; = 104h 2204 000020DA 52 <1> push dx 2205 000020DB E8C997 <1> call isstring? 2206 000020DE 7407 <1> je rr1_memory 2207 <1> ; pop dx 2208 000020E0 89EC5D <1> lleave code 2209 000020E3 AC <1> lodsb 2210 000020E4 E92703 <1> jmp rr2 2211 <1> 2212 <1> rr1_memory: 2213 000020E7 8F46F8 <1> pop word [bp + ?memsizestring] 2214 000020EA 895EF6 <1> mov word [bp + ?ismem_high_size_low], bx 2215 <1> 2216 000020ED 31C0 <1> xor ax, ax 2217 000020EF 88D8 <1> mov al, bl 2218 000020F1 F7D8 <1> neg ax 2219 000020F3 05[8895] <1> add ax, masks + 4 ; 4 - size = offset into masks 2220 000020F6 8946F2 <1> mov word [rrmask], ax ; -> mask 2221 000020F9 E83098 <1> call skipcomma 2222 000020FC 3C5B <1> cmp al, '[' 2223 000020FE 7403E9DB83 <1> jne error 2224 00002103 AC <1> lodsb 2225 00002104 8B1E[840C] <1> mov bx, word [reg_ds] 2226 00002108 E80D88 <1> call getaddrX 2227 0000210B 895EFA <1> mov word [bp + ?segsel], bx 2228 0000210E 66 <1> _386_PM_o32 2229 0000210F 8956FC <1> mov word [bp + ?offset], dx 2230 00002112 E81898 <1> call skipcomm0 2231 00002115 3C5D <1> cmp al, ']' 2232 00002117 7403E9C283 <1> jne error 2233 <1> 2234 0000211C E80D98 <1> call skipcomma 2235 0000211F 3C2E <1> cmp al, '.' ; special ? 2236 00002121 7405 <1> je short .writeprompt ; yes --> 2237 00002123 E8E097 <1> call iseol? 2238 00002126 7566 <1> jne short .noprompt 2239 <1> .writeprompt: 2240 <1> ; si -> behind dot if any 2241 00002128 BF[0E08] <1> mov di, line_out 2242 0000212B 56 <1> push si 2243 0000212C 8B76F8 <1> mov si, word [bp + ?memsizestring] 2244 <1> ; si -> size string (ASCIZ) 2245 0000212F A8 <1> db __TEST_IMM8 ; (skip stosb) 2246 <1> @@: 2247 00002130 AA <1> stosb ; store next byte 2248 00002131 AC <1> lodsb ; load next byte 2249 00002132 84C0 <1> test al, al ; is zero ? 2250 00002134 75FA <1> jnz @B ; not yet, loop --> 2251 00002136 5E <1> pop si ; (preserve si) 2252 00002137 B8205B <1> mov ax, " [" 2253 0000213A AB <1> stosw 2254 0000213B 8B46FA <1> mov ax, word [bp + ?segsel] 2255 0000213E 89C3 <1> mov bx, ax 2256 00002140 E8C398 <1> call hexword 2257 00002143 B03A <1> mov al, ':' 2258 00002145 AA <1> stosb 2259 00002146 66 <1> _386_PM_o32 2260 00002147 8B46FC <1> mov ax, word [bp + ?offset] 2261 <1> %if _PM 2262 0000214A E8E73B <1> call test_d_b_bit 2263 0000214D 7403 <1> jz .16 2264 0000214F E8A898 <1> call hexword_high 2265 <1> .16: 2266 <1> %endif 2267 00002152 E8B198 <1> call hexword 2268 00002155 B85D20 <1> mov ax, "] " 2269 00002158 AB <1> stosw 2270 <1> 2271 00002159 E8C184 <1> call prephack 2272 0000215C E83700 <1> call rr1_read_mem_dxax 2273 <1> 2274 0000215F 80F904 <1> cmp cl, 4 2275 00002162 7207 <1> jb .pnohigh 2276 00002164 92 <1> xchg ax, dx 2277 00002165 E89E98 <1> call hexword ; display high word 2278 00002168 92 <1> xchg ax, dx 2279 00002169 EB0C <1> jmp @F 2280 <1> .pnohigh: 2281 0000216B 80F903 <1> cmp cl, 3 2282 0000216E 7207 <1> jb @F 2283 00002170 86C2 <1> xchg al, dl 2284 00002172 E89898 <1> call hexbyte 2285 00002175 86C2 <1> xchg al, dl 2286 <1> @@: 2287 00002177 80F902 <1> cmp cl, 2 2288 0000217A 7207 <1> jb .pnobyte 2289 0000217C 86C4 <1> xchg al, ah 2290 0000217E E88C98 <1> call hexbyte ; display high byte 2291 00002181 86C4 <1> xchg al, ah 2292 <1> .pnobyte: 2293 00002183 E88798 <1> call hexbyte ; display low byte 2294 <1> 2295 00002186 E8FC03 <1> call dot_prompt 2296 00002189 7503E9CC01 <1> je .return 2297 <1> .noprompt: 2298 0000218E 31C9 <1> xor cx, cx 2299 00002190 8A4EF6 <1> mov cl, byte [bp + ?size] 2300 00002193 E9B900 <1> jmp rr1_common 2301 <1> 2302 <1> 2303 <1> ; OUT: cl = ?size 2304 <1> ; dx:ax = value read from memory 2305 <1> ; CHG: bx 2306 <1> rr1_read_mem_dxax: 2307 00002196 E8B284 <1> call dohack 2308 00002199 31C0 <1> xor ax, ax 2309 0000219B 31D2 <1> xor dx, dx 2310 0000219D 8A4EF6 <1> mov cl, byte [bp + ?size] 2311 <1> %if _PM 2312 000021A0 8B5EFA <1> mov bx, word [bp + ?segsel] 2313 000021A3 E88E3B <1> call test_d_b_bit 2314 000021A6 8EDB <1> mov ds, bx 2315 <1> %else 2316 <1> mov ds, word [bp + ?segsel] 2317 <1> %endif 2318 000021A8 66 <1> _386_PM_o32 2319 000021A9 8B5EFC <1> mov bx, word [bp + ?offset] 2320 <1> %if _PM 2321 000021AC 741D <1> jz .16 2322 <1> 2323 <1> [cpu 386] 2324 <1> .32: 2325 000021AE 80F902 <1> cmp cl, 2 2326 000021B1 7213 <1> jb .32_1 2327 000021B3 740D <1> je .32_2 2328 000021B5 80F904 <1> cmp cl, 4 2329 000021B8 7204 <1> jb .32_3 2330 <1> .32_4: 2331 000021BA 678A7303 <1> mov dh, byte [ebx + 3] 2332 <1> .32_3: 2333 000021BE 678A5302 <1> mov dl, byte [ebx + 2] 2334 <1> .32_2: 2335 000021C2 678A6301 <1> mov ah, byte [ebx + 1] 2336 <1> .32_1: 2337 000021C6 678A03 <1> mov al, byte [ebx] 2338 000021C9 EB17 <1> jmp .ret 2339 <1> __CPU__ 2340 <1> %endif 2341 <1> 2342 <1> .16: 2343 000021CB 80F902 <1> cmp cl, 2 2344 000021CE 7210 <1> jb .16_1 2345 000021D0 740B <1> je .16_2 2346 000021D2 80F904 <1> cmp cl, 4 2347 000021D5 7203 <1> jb .16_3 2348 <1> .16_4: 2349 000021D7 8A7703 <1> mov dh, byte [bx + 3] 2350 <1> .16_3: 2351 000021DA 8A5702 <1> mov dl, byte [bx + 2] 2352 <1> .16_2: 2353 000021DD 8A6701 <1> mov ah, byte [bx + 1] 2354 <1> .16_1: 2355 000021E0 8A07 <1> mov al, byte [bx] 2356 <1> .ret: 2357 000021E2 16 <1> push ss 2358 000021E3 1F <1> pop ds 2359 000021E4 E99884 <1> jmp unhack 2360 <1> 2361 <1> 2362 <1> rr1_variable: 2363 000021E7 897EF2 <1> mov word [rrmask], di ; -> mask of read-only bits 2364 000021EA 88C8 <1> mov al, cl 2365 000021EC B100 <1> mov cl, 0 2366 000021EE 4E <1> dec si ; (to reload al) 2367 000021EF 50 <1> push ax ; h = variable's field type, l = its size 2368 000021F0 B400 <1> mov ah, 0 2369 000021F2 8946F6 <1> mov word [bp + ?ismem_high_size_low], ax 2370 000021F5 86CD <1> xchg cl, ch ; cx = variable's name's length 2371 <1> 2372 000021F7 E83297 <1> call skipcomma 2373 000021FA 3C2E <1> cmp al, '.' ; special ? 2374 000021FC 7405 <1> je short .writeprompt ; yes --> 2375 000021FE E80597 <1> call iseol? 2376 00002201 7542 <1> jne short .noprompt 2377 <1> .writeprompt: 2378 00002203 56 <1> push si ; -> behind dot if any 2379 00002204 8D76E0 <1> lea si, [bp + ?namebuffer] 2380 <1> ; -> name 2381 00002207 BF[0E08] <1> mov di, line_out 2382 0000220A F3A4 <1> rep movsb 2383 0000220C 5E <1> pop si ; -> behind dot if any 2384 0000220D B020 <1> mov al, 32 2385 0000220F AA <1> stosb 2386 00002210 59 <1> pop cx ; h = variable's field type, l = its size 2387 00002211 87DA <1> xchg bx, dx 2388 00002213 8B07 <1> mov ax, word [bx] 2389 00002215 87DA <1> xchg bx, dx 2390 00002217 51 <1> push cx 2391 00002218 80F904 <1> cmp cl, 4 2392 0000221B 7205 <1> jb .pnohigh 2393 0000221D E8E697 <1> call hexword ; display high word 2394 00002220 EB08 <1> jmp @F 2395 <1> .pnohigh: 2396 00002222 80F903 <1> cmp cl, 3 2397 00002225 7203 <1> jb @F 2398 00002227 E8E397 <1> call hexbyte 2399 <1> @@: 2400 0000222A 8B07 <1> mov ax, word [bx] 2401 0000222C 80F902 <1> cmp cl, 2 2402 0000222F 7207 <1> jb .pnobyte 2403 00002231 86C4 <1> xchg al, ah 2404 00002233 E8D797 <1> call hexbyte ; display high byte 2405 00002236 86C4 <1> xchg al, ah 2406 <1> .pnobyte: 2407 00002238 E8D297 <1> call hexbyte ; display low byte 2408 0000223B E84703 <1> call dot_prompt 2409 0000223E 59 <1> pop cx ; h = variable's field type, l = its size 2410 0000223F 7503E91601 <1> je .return 2411 00002244 A8 <1> db __TEST_IMM8 ; (skip pop) 2412 <1> .noprompt: 2413 00002245 59 <1> pop cx ; h = variable's field type, l = its size 2414 00002246 84ED <1> test ch, ch 2415 00002248 7403E91101 <1> jnz rr1_readonly 2416 0000224D 53 <1> push bx 2417 0000224E 52 <1> push dx 2418 <1> rr1_common: 2419 0000224F 884EF4 <1> mov byte [rrtype], cl 2420 00002252 51 <1> push cx 2421 00002253 50 <1> push ax 2422 00002254 56 <1> push si 2423 00002255 E87387 <1> call isoperator? 2424 00002258 750E <1> jne .nooperator 2425 0000225A 89CB <1> mov bx, cx 2426 0000225C 01DB <1> add bx, bx ; bh = 0 ! 2427 0000225E 50 <1> push ax 2428 0000225F FF97[B090] <1> call near [operatordispatchers+bx] 2429 00002263 58 <1> pop ax 2430 00002264 85DB <1> test bx, bx 2431 00002266 7504 <1> jnz .gotoperator 2432 <1> .nooperator: 2433 00002268 BB1800 <1> mov bx, OPERATOR_RIGHTOP; set default computation function 2434 0000226B A8 <1> db __TEST_IMM8 2435 <1> .gotoperator: 2436 0000226C AC <1> lodsb 2437 <1> 2438 0000226D E83803 <1> call isassignmentoperator? 2439 00002270 7317 <1> jnc .assign_op_done ; found an assignment operator --> 2440 00002272 83FB18 <1> cmp bx, OPERATOR_RIGHTOP; dummy (no operator specified) ? 2441 00002275 7412 <1> je .assign_op_done ; yes, assignment operator not required --> 2442 00002277 59 <1> pop cx 2443 00002278 58 <1> pop ax ; restore al, si in front of operator 2444 00002279 50 <1> push ax 2445 0000227A 51 <1> push cx 2446 0000227B 87F1 <1> xchg si, cx 2447 0000227D 51 <1> push cx 2448 0000227E E84487 <1> call isunaryoperator? ; is this a valid unary operator too ? 2449 00002281 59 <1> pop cx 2450 00002282 74E4 <1> je .nooperator ; yes --> 2451 00002284 87F1 <1> xchg si, cx 2452 <1> errorj9: equ $ 2453 00002286 E95582 <1> jmp error ; error where the assignment operator needs to be 2454 <1> .assign_op_done: 2455 00002289 59 <1> pop cx 2456 0000228A 59 <1> pop cx 2457 0000228B 59 <1> pop cx 2458 0000228C 53 <1> push bx 2459 0000228D 80FB17 <1> cmp bl, OPERATOR_COND 2460 00002290 7503E94982 <1> je error 2461 00002295 E89596 <1> call skipcomm0 2462 <1> 2463 00002298 E86490 <1> call getexpression ; bx:dx = expression result 2464 0000229B 8866F5 <1> mov byte [bp + ?hhtype], ah 2465 0000229E 8976F0 <1> mov word [bp + ?hhoffset], si 2466 000022A1 E87796 <1> call chkeol 2467 000022A4 59 <1> pop cx ; operator computation function 2468 <1> 2469 000022A5 807EF700 <1> cmp byte [bp + ?ismem], 0 2470 000022A9 7419 <1> je .var_hhvar 2471 <1> 2472 <1> .mem_hhvar: 2473 000022AB 89C7 <1> mov di, ax 2474 000022AD 89D6 <1> mov si, dx 2475 000022AF 53 <1> push bx 2476 000022B0 51 <1> push cx 2477 000022B1 E8E2FE <1> call rr1_read_mem_dxax 2478 000022B4 59 <1> pop cx 2479 000022B5 5B <1> pop bx 2480 000022B6 52 <1> push dx 2481 000022B7 50 <1> push ax 2482 000022B8 89F8 <1> mov ax, di 2483 000022BA 89F2 <1> mov dx, si 2484 000022BC BF[8495] <1> mov di, mask_4byte ; di -> zero 2485 000022BF BE[8695] <1> mov si, mask_4byte + 2 ; si -> zero 2486 <1> 2487 000022C2 EB06 <1> jmp .common_hhvar 2488 <1> 2489 <1> .var_hhvar: 2490 000022C4 5E <1> pop si ; si-> high word 2491 000022C5 5F <1> pop di ; di-> low word 2492 000022C6 FF34 <1> push word [si] 2493 000022C8 FF35 <1> push word [di] 2494 <1> 2495 <1> .common_hhvar: 2496 000022CA 8F06[A495] <1> pop word [hhvar] 2497 000022CE 8F06[A695] <1> pop word [hhvar+2] ; save variable's current value (as left operand) 2498 <1> 2499 000022D2 C606[AD95]00 <1> mov byte [hhtype], 0 ; type info signed=0 pointer=0 2500 000022D7 807EF404 <1> cmp byte [rrtype], 4 2501 000022DB 7317 <1> jae .cleardword 2502 000022DD 807EF402 <1> cmp byte [rrtype], 2 2503 000022E1 770C <1> ja .clearthreebyte 2504 000022E3 7405 <1> je .clearword 2505 <1> .clearbyte: 2506 000022E5 C606[A595]00 <1> mov byte [hhvar + 1], 0 ; clear second byte 2507 <1> .clearword: 2508 000022EA C606[A695]00 <1> mov byte [hhvar + 2], 0 ; clear third byte 2509 <1> .clearthreebyte: 2510 000022EF C606[A795]00 <1> mov byte [hhvar + 3], 0 ; clear fourth byte 2511 <1> .cleardword: 2512 000022F4 87CB <1> xchg cx, bx 2513 000022F6 01DB <1> add bx, bx 2514 000022F8 8B9F[F090] <1> mov bx, word [bx + operatorfunctions] 2515 000022FC 87CB <1> xchg cx, bx ; cx = operator function 2516 000022FE 8A66F5 <1> mov ah, byte [bp + ?hhtype] 2517 00002301 FFD1 <1> call cx ; compute 2518 <1> 2519 00002303 E8FF93 <1> call getexpression.countsignificantbits 2520 00002306 53 <1> push bx 2521 00002307 56 <1> push si 2522 00002308 31DB <1> xor bx, bx 2523 0000230A 8A5EF4 <1> mov bl, byte [rrtype] 2524 0000230D 01DB <1> add bx, bx 2525 0000230F 8B76F0 <1> mov si, word [bp + ?hhoffset] 2526 00002312 FF97[F882] <1> call near word [checksignificantbits_table + bx] 2527 00002316 5E <1> pop si 2528 00002317 5B <1> pop bx 2529 <1> 2530 00002318 97 <1> xchg ax, di ; ax -> low word of variable 2531 00002319 8B7EF2 <1> mov di, word [rrmask] ; di -> mask dword 2532 0000231C 53 <1> push bx ; use bx as a scratch space 2533 0000231D 8B0D <1> mov cx, word [di] ; = low word of mask 2534 0000231F 51 <1> push cx ; preserve low word of mask 2535 00002320 97 <1> xchg ax, di ; di -> low word of variable 2536 00002321 230D <1> and cx, word [di] ; cx = low word value to preserve 2537 00002323 5B <1> pop bx ; = low word of mask 2538 00002324 F7D3 <1> not bx ; = bitmask of bits to use from result 2539 00002326 21DA <1> and dx, bx ; dx = bits to use from result low word 2540 00002328 09CA <1> or dx, cx ; dx = low word compound 2541 0000232A 5B <1> pop bx ; restore high word after scratch use 2542 0000232B 97 <1> xchg ax, di ; di -> mask dword 2543 0000232C 52 <1> push dx ; use dx as a scratch space 2544 0000232D 8B4D02 <1> mov cx, word [di + 2] ; = high word of mask 2545 00002330 51 <1> push cx ; preserve high word of mask 2546 00002331 230C <1> and cx, word [si] ; cx = high word value to preserve 2547 00002333 5A <1> pop dx ; = high word of mask 2548 00002334 F7D2 <1> not dx ; = bitmask of bits to use from result 2549 00002336 21D3 <1> and bx, dx ; bx = bits to use from result high word 2550 00002338 09CB <1> or bx, cx 2551 0000233A 5A <1> pop dx ; restore low word after scratch use 2552 0000233B 97 <1> xchg ax, di ; di -> low word of variable 2553 <1> 2554 0000233C 807EF700 <1> cmp byte [bp + ?ismem], 0 2555 00002340 7524 <1> jne rr1_mem_set 2556 <1> 2557 <1> .var_set: 2558 00002342 807EF402 <1> cmp byte [rrtype], 2 2559 00002346 7210 <1> jb .setbyte 2560 00002348 740B <1> je .setword 2561 0000234A 807EF404 <1> cmp byte [rrtype], 4 2562 0000234E 7203 <1> jb .setthreebyte 2563 <1> .setdword: 2564 00002350 887C01 <1> mov byte [si + 1], bh ; set fourth byte 2565 <1> .setthreebyte: 2566 00002353 881C <1> mov byte [si], bl ; set third byte 2567 <1> .setword: 2568 00002355 887501 <1> mov byte [di + 1], dh ; set second byte 2569 <1> .setbyte: 2570 00002358 8815 <1> mov byte [di], dl ; set first byte 2571 <1> .return: 2572 <1> rr1_memory.return: 2573 <1> rr1_variable.return: 2574 0000235A 89EC5D <1> lleave code 2575 <1> rr1b: 2576 0000235D C3 <1> retn 2577 <1> 2578 <1> 2579 <1> rr1_readonly: 2580 0000235E BA[AC5C] <1> mov dx, msg.readonly 2581 00002361 E8529A <1> call putsz_error 2582 00002364 EBF4 <1> jmp rr1_variable.return 2583 <1> 2584 <1> 2585 <1> rr1_mem_set: 2586 00002366 89D0 <1> mov ax, dx 2587 00002368 89DA <1> mov dx, bx 2588 <1> 2589 0000236A E8DE82 <1> call dohack 2590 0000236D 8A4EF6 <1> mov cl, byte [bp + ?size] 2591 <1> %if _PM 2592 00002370 8B5EFA <1> mov bx, word [bp + ?segsel] 2593 00002373 E81475 <1> call verifysegm 2594 00002376 7303E98700 <1> jc .ro 2595 0000237B E8B639 <1> call test_d_b_bit 2596 0000237E 8EDB <1> mov ds, bx 2597 <1> %else 2598 <1> mov ds, word [bp + ?segsel] 2599 <1> %endif 2600 00002380 66 <1> _386_PM_o32 2601 00002381 8B5EFC <1> mov bx, word [bp + ?offset] 2602 <1> %if _PM 2603 00002384 7440 <1> jz .16 2604 <1> 2605 <1> [cpu 386] 2606 <1> .32: 2607 00002386 80F902 <1> cmp cl, 2 2608 00002389 7213 <1> jb .32_1 2609 0000238B 740D <1> je .32_2 2610 0000238D 80F904 <1> cmp cl, 4 2611 00002390 7204 <1> jb .32_3 2612 <1> .32_4: 2613 00002392 67887303 <1> mov byte [ebx + 3], dh 2614 <1> .32_3: 2615 00002396 67885302 <1> mov byte [ebx + 2], dl 2616 <1> .32_2: 2617 0000239A 67886301 <1> mov byte [ebx + 1], ah 2618 <1> .32_1: 2619 0000239E 678803 <1> mov byte [ebx], al 2620 <1> 2621 <1> .32_check: 2622 000023A1 80F902 <1> cmp cl, 2 2623 000023A4 7219 <1> jb .32_check_1 2624 000023A6 7411 <1> je .32_check_2 2625 000023A8 80F904 <1> cmp cl, 4 2626 000023AB 7206 <1> jb .32_check_3 2627 <1> .32_check_4: 2628 000023AD 673A7303 <1> cmp dh, byte [ebx + 3] 2629 000023B1 754F <1> jne .ro 2630 <1> .32_check_3: 2631 000023B3 673A5302 <1> cmp dl, byte [ebx + 2] 2632 000023B7 7549 <1> jne .ro 2633 <1> .32_check_2: 2634 000023B9 673A6301 <1> cmp ah, byte [ebx + 1] 2635 000023BD 7543 <1> jne .ro 2636 <1> .32_check_1: 2637 000023BF 673A03 <1> cmp al, byte [ebx] 2638 000023C2 753E <1> jne .ro 2639 000023C4 EB36 <1> jmp .ret 2640 <1> __CPU__ 2641 <1> %endif 2642 <1> 2643 <1> .16: 2644 000023C6 80F902 <1> cmp cl, 2 2645 000023C9 7210 <1> jb .16_1 2646 000023CB 740B <1> je .16_2 2647 000023CD 80F904 <1> cmp cl, 4 2648 000023D0 7203 <1> jb .16_3 2649 <1> .16_4: 2650 000023D2 887703 <1> mov byte [bx + 3], dh 2651 <1> .16_3: 2652 000023D5 885702 <1> mov byte [bx + 2], dl 2653 <1> .16_2: 2654 000023D8 886701 <1> mov byte [bx + 1], ah 2655 <1> .16_1: 2656 000023DB 8807 <1> mov byte [bx], al 2657 <1> 2658 <1> .16_check: 2659 000023DD 80F902 <1> cmp cl, 2 2660 000023E0 7216 <1> jb .16_check_1 2661 000023E2 740F <1> je .16_check_2 2662 000023E4 80F904 <1> cmp cl, 4 2663 000023E7 7205 <1> jb .16_check_3 2664 <1> .16_check_4: 2665 000023E9 3A7703 <1> cmp dh, byte [bx + 3] 2666 000023EC 7514 <1> jne .ro 2667 <1> .16_check_3: 2668 000023EE 3A5702 <1> cmp dl, byte [bx + 2] 2669 000023F1 750F <1> jne .ro 2670 <1> .16_check_2: 2671 000023F3 3A6701 <1> cmp ah, byte [bx + 1] 2672 000023F6 750A <1> jne .ro 2673 <1> .16_check_1: 2674 000023F8 3A07 <1> cmp al, byte [bx] 2675 000023FA 7506 <1> jne .ro 2676 <1> .ret: 2677 000023FC E86168 <1> call ee0a 2678 000023FF E958FF <1> jmp rr1_memory.return 2679 <1> 2680 <1> .ro: 2681 00002402 E85B68 <1> call ee0a 2682 00002405 BA[E15C] <1> mov dx, msg.readonly_mem 2683 00002408 E8AB99 <1> call putsz_error 2684 0000240B E94CFF <1> jmp rr1_memory.return 2685 <1> 2686 <1> lleave ctx 2687 <1> 2688 <1> 2689 <1> usesection lDEBUG_DATA_ENTRY 2690 000082F7 00 <1> align 2, db 0 2691 <1> checksignificantbits_table: 2692 000082F8 [DEA4] <1> dw error 2693 000082FA [FCB7] <1> dw getbyte.checksignificantbits 2694 000082FC [EAB7] <1> dw getword.checksignificantbits 2695 000082FE [DCB7] <1> dw get3byte.checksignificantbits 2696 00008300 [E003] <1> dw dmycmd 2697 <1> 2698 <1> usesection lDEBUG_CODE 2699 <1> 2700 <1> 2701 <1> ; Change flag register with mnemonics - F 2702 <1> rr2: 2703 0000240E E8FE67 <1> call uppercase 2704 00002411 3C46 <1> cmp al, 'F' 2705 00002413 7403E99B00 <1> jne rr3 ; if not 'F' --> 2706 00002418 50 <1> push ax 2707 00002419 8A04 <1> mov al, byte [si] 2708 0000241B E8C385 <1> call isseparator? ; valid separator ? 2709 0000241E 58 <1> pop ax 2710 0000241F 7403E98F00 <1> jne rr3 ; no --> 2711 <1> .ef: 2712 00002424 E80595 <1> call skipcomma 2713 00002427 3C2E <1> cmp al, '.' ; special ? 2714 00002429 7405 <1> je .writeprompt ; yes --> 2715 0000242B E8D894 <1> call iseol? ; end of line ? 2716 0000242E 7512 <1> jne .noprompt ; no --> 2717 <1> .writeprompt: 2718 00002430 800E[A600]02 <1> setopt [internalflags3], dif3_do_not_highlight 2719 00002435 56 <1> push si 2720 00002436 E89206 <1> call dmpflags 2721 00002439 5E <1> pop si ; -> behind dot if any 2722 0000243A E84801 <1> call dot_prompt 2723 0000243D 7503E91BFF <1> je rr1b ; if no change 2724 <1> .noprompt: 2725 <1> 2726 00002442 E86301 <1> call isassignmentoperator? 2727 00002445 56 <1> push si 2728 00002446 7308 <1> jnc .noteol ; at least one value is required --> 2729 <1> .check_loop: 2730 00002448 E8E294 <1> call skipcomm0 2731 0000244B E8B894 <1> call iseol? 2732 0000244E 7420 <1> je .really ; return if done 2733 <1> .noteol: 2734 00002450 E8BC67 <1> call uppercase 2735 00002453 86C4 <1> xchg al, ah 2736 00002455 AC <1> lodsb 2737 00002456 E8B667 <1> call uppercase 2738 00002459 86C4 <1> xchg al, ah ; ax = mnemonic 2739 0000245B BF[1C80] <1> mov di, flagson 2740 0000245E B91000 <1> mov cx, 16 2741 00002461 F2AF <1> repne scasw 2742 00002463 7507 <1> jne short .errordec ; if no match 2743 00002465 AC <1> lodsb 2744 00002466 E87885 <1> call isseparator? 2745 00002469 74DD <1> je .check_loop 2746 <1> .errordec2: 2747 0000246B 4E <1> dec si 2748 <1> .errordec: 2749 <1> errordec: equ $ 2750 0000246C 4E <1> dec si ; back up one before flagging an error 2751 0000246D E96E80 <1> jmp error 2752 <1> 2753 <1> .really: 2754 00002470 5E <1> pop si 2755 00002471 4E <1> dec si 2756 00002472 AC <1> lodsb 2757 <1> .loop: 2758 00002473 E89094 <1> call iseol? 2759 00002476 7503E9E2FE <1> je rr1b ; return if done 2760 <1> 2761 0000247B E89167 <1> call uppercase 2762 0000247E 86C4 <1> xchg al, ah 2763 00002480 AC <1> lodsb 2764 00002481 E88B67 <1> call uppercase 2765 00002484 86C4 <1> xchg al, ah ; ax = mnemonic 2766 <1> 2767 00002486 BF[1C80] <1> mov di, flagson 2768 00002489 B91000 <1> mov cx, 16 2769 0000248C F2AF <1> repne scasw 2770 0000248E 75DC <1> jne short .errordec ; if no match 2771 00002490 81FF[2C80] <1> cmp di, flagsoff 2772 00002494 7709 <1> ja .clear ; if we're clearing 2773 00002496 8B45EE <1> mov ax, word [di-(flagson-flagbits)-2] 2774 00002499 0906[A00C] <1> or word [reg_efl], ax ; set the bit 2775 0000249D EB09 <1> jmp short .common 2776 <1> .clear: 2777 0000249F 8B45DE <1> mov ax, word [di-(flagsoff-flagbits)-2] 2778 000024A2 F7D0 <1> not ax 2779 000024A4 2106[A00C] <1> and word [reg_efl], ax ; clear the bit 2780 <1> .common: 2781 000024A8 AC <1> lodsb 2782 000024A9 E83585 <1> call isseparator? 2783 000024AC 75BD <1> jne short .errordec2 2784 000024AE E87C94 <1> call skipcomm0 2785 000024B1 EBC0 <1> jmp short .loop 2786 <1> 2787 <1> ; Change flag register with mnemonics - EF 2788 <1> rr3: 2789 000024B3 86C4 <1> xchg al, ah 2790 000024B5 AC <1> lodsb 2791 000024B6 E85667 <1> call uppercase 2792 000024B9 86C4 <1> xchg al, ah ; ax = next two characters 2793 000024BB 3D4546 <1> _386 cmp ax, "EF" 2794 000024BE 750B <1> _386 jne rr4 ; if not "EF" --> 2795 000024C0 50 <1> _386 push ax 2796 000024C1 8A04 <1> _386 mov al, byte [si] 2797 000024C3 E81B85 <1> _386 call isseparator? ; valid separator ? 2798 000024C6 58 <1> _386 pop ax 2799 000024C7 0F8459FF <1> _386 je rr2.ef 2800 <1> 2801 <1> ; Change a single flag with mnemonic 2802 <1> rr4: 2803 000024CB BF[3C80] <1> mov di, flagnames 2804 000024CE B90800 <1> mov cx, 8 2805 000024D1 F2AF <1> repne scasw 2806 000024D3 7597 <1> jne short rr2.errordec 2807 000024D5 89C2 <1> mov dx, ax 2808 000024D7 AC <1> lodsb 2809 000024D8 E80685 <1> call isseparator? 2810 000024DB 758E <1> jne short rr2.errordec2 2811 000024DD FF75CE <1> push word [di-(flagnames-flagbits)-2] 2812 000024E0 E84A94 <1> call skipcomm0 2813 000024E3 3C2E <1> cmp al, '.' ; special ? 2814 000024E5 7405 <1> je .writeprompt ; yes --> 2815 000024E7 E81C94 <1> call iseol? 2816 000024EA 7519 <1> jne .noprompt 2817 <1> .writeprompt: 2818 000024EC BF[0E08] <1> mov di, line_out 2819 000024EF 89D0 <1> mov ax, dx 2820 000024F1 AB <1> stosw 2821 000024F2 58 <1> pop ax 2822 000024F3 50 <1> push ax 2823 000024F4 8506[A00C] <1> test word [reg_efl], ax ; is it off ? 2824 000024F8 B82030 <1> mov ax, " 0" ; assume so 2825 000024FB 7402 <1> jz .off ; it is off --> 2826 000024FD FEC4 <1> inc ah ; is on, set to '1' 2827 <1> .off: 2828 000024FF AB <1> stosw 2829 00002500 E88200 <1> call dot_prompt 2830 00002503 747E <1> je .ret_pop ; if no change --> 2831 <1> .noprompt: 2832 00002505 E8FE93 <1> call iseol? ; end of line ? 2833 00002508 7479 <1> je .ret_pop ; yes, no change requested --> 2834 0000250A 51 <1> push cx 2835 0000250B 50 <1> push ax 2836 0000250C 56 <1> push si 2837 0000250D E8BB84 <1> call isoperator? 2838 00002510 7520 <1> jne .nooperator 2839 00002512 89CB <1> mov bx, cx 2840 00002514 01DB <1> add bx, bx ; bh = 0 ! 2841 00002516 50 <1> push ax 2842 00002517 FF97[B090] <1> call near [operatordispatchers+bx] 2843 0000251B 58 <1> pop ax 2844 0000251C 85DB <1> test bx, bx 2845 0000251E 7412 <1> jz .nooperator 2846 00002520 80FB16 <1> cmp bl, OPERATOR_BOOL_AND 2847 00002523 770D <1> ja .nooperator 2848 00002525 80FB14 <1> cmp bl, OPERATOR_BOOL_OR 2849 00002528 730C <1> jae .gotoperator 2850 0000252A 80C303 <1> add bl, OPERATOR_BOOL_OR - OPERATOR_BIT_OR 2851 0000252D 80FB14 <1> cmp bl, OPERATOR_BOOL_OR 2852 00002530 7304 <1> jae .gotoperator 2853 <1> .nooperator: 2854 00002532 BB1800 <1> mov bx, OPERATOR_RIGHTOP; set default computation function 2855 00002535 A8 <1> db __TEST_IMM8 2856 <1> .gotoperator: 2857 00002536 AC <1> lodsb 2858 <1> 2859 00002537 E86E00 <1> call isassignmentoperator? 2860 0000253A 7308 <1> jnc .assign_op_done ; found an assignment operator --> 2861 0000253C 83FB18 <1> cmp bx, OPERATOR_RIGHTOP; dummy (no operator specified) ? 2862 <1> %if 1 ; since | ^ & are never unary operators 2863 0000253F 7403E99A7F <1> jne error 2864 <1> %else 2865 <1> je .assign_op_done ; yes, assignment operator not required --> 2866 <1> pop cx 2867 <1> pop ax ; restore al, si in front of operator 2868 <1> push ax 2869 <1> push cx 2870 <1> xchg si, cx 2871 <1> push cx 2872 <1> call isunaryoperator? ; is this a valid unary operator too ? 2873 <1> pop cx 2874 <1> je .nooperator ; yes --> 2875 <1> xchg si, cx 2876 <1> jmp error ; error where the assignment operator needs to be 2877 <1> %endif 2878 <1> .assign_op_done: 2879 00002544 59 <1> pop cx 2880 00002545 59 <1> pop cx 2881 00002546 59 <1> pop cx 2882 00002547 53 <1> push bx 2883 00002548 E8B48D <1> call getexpression 2884 0000254B E8CD93 <1> call chkeol 2885 0000254E E8C087 <1> call toboolean 2886 00002551 59 <1> pop cx ; operator index 2887 00002552 31C0 <1> xor ax, ax 2888 00002554 A2[AD95] <1> mov byte [hhtype], al 2889 00002557 A3[A695] <1> mov word [hhvar+2], ax 2890 0000255A 5E <1> pop si 2891 0000255B 56 <1> push si ; flag 2892 0000255C 8536[A00C] <1> test word [reg_efl], si 2893 00002560 7401 <1> jz .notset 2894 00002562 40 <1> inc ax 2895 <1> .notset: 2896 00002563 A3[A495] <1> mov word [hhvar], ax 2897 00002566 87CB <1> xchg cx, bx 2898 00002568 01DB <1> add bx, bx 2899 0000256A 8B9F[F090] <1> mov bx, word [bx+operatorfunctions] 2900 0000256E 87CB <1> xchg cx, bx ; cx = operator function 2901 00002570 FFD1 <1> call cx ; compute 2902 00002572 58 <1> pop ax 2903 00002573 85D2 <1> test dx, dx 2904 00002575 7405 <1> jz .clear 2905 00002577 0906[A00C] <1> or word [reg_efl], ax ; set the bit 2906 0000257B C3 <1> retn 2907 <1> .clear: 2908 0000257C F7D0 <1> not ax 2909 0000257E 2106[A00C] <1> and word [reg_efl], ax ; clear the bit 2910 00002582 C3 <1> retn 2911 <1> 2912 <1> .ret_pop: 2913 00002583 58 <1> pop ax 2914 00002584 C3 <1> retn 2915 <1> 2916 <1> 2917 <1> ; INP: di-> behind prompt to display (in line_out) 2918 <1> ; Iff byte[si-1] == '.', 2919 <1> ; only display without actual prompting 2920 <1> ; si-> line to check for EOL 2921 <1> ; OUT: NZ iff actually prompted and got non-empty line, 2922 <1> ; al = first character 2923 <1> ; si-> next character 2924 <1> ; dx, bx preserved 2925 <1> ; CHG: ax, cx, si, di, dx, bx 2926 <1> dot_prompt: 2927 00002585 807CFF2E <1> cmp byte [si-1], '.' ; syntax for display without prompt ? 2928 00002589 7414 <1> je .onlydisplay ; yes --> 2929 0000258B 53 <1> push bx 2930 0000258C 52 <1> push dx 2931 0000258D E8DA9B <1> call getline0 2932 00002590 5A <1> pop dx 2933 00002591 5B <1> pop bx 2934 00002592 E87193 <1> call iseol? ; no change requested ? 2935 00002595 7410 <1> je .ret ; yes --> (ZR) 2936 00002597 3C2E <1> cmp al, '.' ; other syntax for no change ? 2937 00002599 750C <1> jne .ret ; no --> (NZ) 2938 <1> .chkeol1: 2939 0000259B AC <1> lodsb 2940 0000259C E97C93 <1> jmp chkeol ; (ZR) 2941 <1> 2942 <1> .onlydisplay: 2943 0000259F E8F9FF <1> call .chkeol1 2944 000025A2 E89994 <1> call putsline_crlf 2945 000025A5 38C0 <1> cmp al, al ; ZR 2946 <1> .ret: 2947 000025A7 C3 <1> retn 2948 <1> 2949 <1> 2950 <1> ; INP: al = first character 2951 <1> ; si-> remaining string 2952 <1> ; OUT: CY if no assignment operator was found 2953 <1> ; NC if an assignment operator was found, 2954 <1> ; al = first character behind it (skipcomma called) 2955 <1> ; si-> remaining string behind character al 2956 <1> isassignmentoperator?: 2957 000025A8 3C3A <1> cmp al, ':' 2958 000025AA 750A <1> jne .checksingleequality 2959 000025AC AC <1> lodsb 2960 000025AD 3C3D <1> cmp al, '=' 2961 000025AF 7409 <1> je .skip ; long form assignment operator --> 2962 <1> ; A single colon. Report "no assignment operator" here. 2963 000025B1 4E <1> dec si 2964 000025B2 B03A <1> mov al, ':' ; restore si, al 2965 <1> .return_cy: 2966 000025B4 F9 <1> stc 2967 000025B5 C3 <1> retn 2968 <1> 2969 <1> .checksingleequality: 2970 000025B6 3C3D <1> cmp al, '=' 2971 000025B8 75FA <1> jne .return_cy ; no assignment operator --> 2972 <1> .skip: 2973 000025BA E86F93 <1> call skipcomma 2974 000025BD F8 <1> clc 2975 000025BE C3 <1> retn 2976 <1> 2977 <1> 2978 <1> ; INP: al = '.' 2979 <1> ; si -> next character 2980 <1> re_cmd: 2981 000025BF 5B <1> pop bx 2982 000025C0 5B <1> pop bx ; discard si and ax on stack 2983 000025C1 BA[6470] <1> mov dx, msg.list 2984 000025C4 E8E092 <1> call isstring? 2985 000025C7 7503E98900 <1> je .list 2986 <1> 2987 000025CC E82CDF <1> call guard_re 2988 000025CF BF[E401] <1> mov di, re_buffer 2989 <1> 2990 000025D2 BA[D966] <1> mov dx, msg.append 2991 000025D5 E8CF92 <1> call isstring? 2992 000025D8 740D <1> je .append 2993 000025DA BA[D166] <1> mov dx, msg.replace 2994 000025DD E8C792 <1> call isstring? 2995 000025E0 740D <1> je .common ; di -> at first byte (where to append) 2996 000025E2 B80401 <1> mov ax, 0104h 2997 000025E5 EB68 <1> jmp .error_common 2998 <1> 2999 <1> .append: 3000 000025E7 30C0 <1> xor al, al 3001 000025E9 B9FFFF <1> mov cx, -1 3002 000025EC F2AE <1> repne scasb ; di -> after zero byte 3003 000025EE 4F <1> dec di ; -> at zero byte 3004 <1> 3005 <1> .common: 3006 000025EF E86993 <1> call skipwhite 3007 000025F2 E8EADE <1> call guard_auxbuff 3008 <1> 3009 000025F5 31DB <1> xor bx, bx 3010 <1> 3011 000025F7 50 <1> push ax 3012 000025F8 B00D <1> mov al, 13 3013 000025FA 3845FF <1> cmp byte [di - 1], al ; is there an EOL in front of us? 3014 000025FD 8E06[F209] <1> mov es, word [auxbuff_segorsel] 3015 00002601 87DF <1> xchg bx, di ; es:di -> auxbuff, bx -> at zero byte 3016 00002603 7401 <1> je @F ; yes --> 3017 <1> 3018 00002605 AA <1> stosb ; first store a CR 3019 <1> @@: 3020 00002606 58 <1> pop ax 3021 <1> .loop: 3022 00002607 3C5C <1> cmp al, '\' 3023 00002609 750A <1> jne .literal 3024 <1> 3025 0000260B AC <1> lodsb ; load escaped character 3026 0000260C E8FB92 <1> call iseol?.notsemicolon; EOL ? 3027 0000260F 7436 <1> je .error_escaped_cr ; yes, error --> 3028 00002611 AA <1> stosb ; store escaped literal 3029 00002612 AC <1> lodsb ; load next 3030 00002613 EBF2 <1> jmp .loop 3031 <1> 3032 <1> .literal: 3033 00002615 E8F292 <1> call iseol?.notsemicolon; EOL ? 3034 00002618 7410 <1> je .end ; got all --> 3035 0000261A 3C3B <1> cmp al, ';' ; semicolon ? 3036 0000261C 7508 <1> jne @F 3037 0000261E B00D <1> mov al, 13 3038 00002620 AA <1> stosb ; store linebreak 3039 00002621 E83793 <1> call skipwhite ; skip leading blanks 3040 00002624 EBE1 <1> jmp .loop 3041 <1> 3042 <1> @@: 3043 00002626 AA <1> stosb ; store character 3044 00002627 AC <1> lodsb 3045 00002628 EBDD <1> jmp .loop 3046 <1> 3047 <1> .end: 3048 <1> ; di -> behind last character 3049 0000262A 31C0 <1> xor ax, ax 3050 0000262C AA <1> stosb 3051 0000262D 89D8 <1> mov ax, bx 3052 0000262F 01F8 <1> add ax, di 3053 00002631 7219 <1> jc .error_too_much 3054 00002633 3D[E409] <1> cmp ax, re_buffer.end 3055 00002636 7714 <1> ja .error_too_much 3056 00002638 31F6 <1> xor si, si 3057 0000263A 06 <1> push es 3058 0000263B 1F <1> pop ds 3059 0000263C 16 <1> push ss 3060 0000263D 07 <1> pop es 3061 0000263E 89F9 <1> mov cx, di 3062 00002640 89DF <1> mov di, bx 3063 00002642 F3A4 <1> rep movsb 3064 00002644 16 <1> push ss 3065 00002645 1F <1> pop ds 3066 00002646 C3 <1> retn 3067 <1> 3068 <1> .error_escaped_cr: 3069 00002647 B80501 <1> mov ax, 0105h 3070 0000264A EB03 <1> jmp .error_common 3071 <1> 3072 <1> .error_too_much: 3073 0000264C B80601 <1> mov ax, 0106h 3074 <1> 3075 <1> .error_common: 3076 0000264F E8D37E <1> call setrc 3077 00002652 E9897E <1> jmp error 3078 <1> 3079 <1> re_cmd.list: 3080 00002655 AC <1> lodsb 3081 00002656 E8C292 <1> call chkeol 3082 <1> 3083 00002659 BE[E401] <1> mov si, re_buffer 3084 0000265C B400 <1> mov ah, 0 ; ah = 0 (flag to escape blanks) 3085 <1> .loop: 3086 0000265E AC <1> lodsb 3087 0000265F 84C0 <1> test al, al 3088 00002661 7442 <1> jz .end 3089 00002663 3C0D <1> cmp al, 13 ; (intentionally not iseol?) 3090 00002665 742E <1> je .cr 3091 00002667 3C20 <1> cmp al, 32 3092 00002669 741B <1> je .escapeif 3093 0000266B 3C09 <1> cmp al, 9 3094 0000266D 7417 <1> je .escapeif 3095 0000266F B401 <1> mov ah, 1 ; ah = 1 3096 00002671 3C3B <1> cmp al, ';' 3097 00002673 7417 <1> je .escape 3098 00002675 3C22 <1> cmp al, '"' 3099 00002677 7413 <1> je .escape 3100 00002679 3C27 <1> cmp al, "'" 3101 0000267B 740F <1> je .escape 3102 0000267D 3C5C <1> cmp al, '\' 3103 0000267F 740B <1> je .escape 3104 <1> .put: 3105 00002681 E85B97 <1> call putc 3106 00002684 EBD8 <1> jmp .loop 3107 <1> 3108 <1> .escapeif: 3109 00002686 84E4 <1> test ah, ah 3110 00002688 75F7 <1> jnz .put 3111 0000268A B401 <1> mov ah, 1 ; ah = 1 3112 <1> .escape: 3113 0000268C 50 <1> push ax 3114 0000268D B05C <1> mov al, '\' 3115 0000268F E84D97 <1> call putc 3116 00002692 58 <1> pop ax 3117 00002693 EBEC <1> jmp .put 3118 <1> 3119 <1> .cr: 3120 00002695 AC <1> lodsb 3121 00002696 84C0 <1> test al, al 3122 00002698 740B <1> jz .end 3123 0000269A 4E <1> dec si 3124 0000269B B03B <1> mov al, ';' 3125 0000269D E83F97 <1> call putc 3126 000026A0 B82000 <1> mov ax, 32 ; ah = 0 3127 000026A3 EBDC <1> jmp .put 3128 <1> 3129 <1> .end: 3130 000026A5 B00D <1> mov al, 13 3131 000026A7 E83597 <1> call putc 3132 000026AA B00A <1> mov al, 10 3133 000026AC E93097 <1> jmp putc 3134 <1> 3135 <1> 3136 <1> dumpregs_extended: 3137 000026AF E849DE <1> call guard_re 3138 000026B2 813E[E401]4052 <1> cmp word [re_buffer], "@R" 3139 000026B8 7408 <1> je @F 3140 000026BA 813E[E401]4072 <1> cmp word [re_buffer], "@r" 3141 000026C0 750A <1> jne .complex 3142 <1> @@: 3143 000026C2 803E[E601]00 <1> cmp byte [re_buffer + 2], 0 3144 000026C7 7503E98E00 <1> je .just_dumpregs 3145 <1> 3146 <1> .complex: 3147 000026CC F606[A700]20 <1> testopt [internalflags3], dif3_auxbuff_guarded_2 3148 000026D1 740C <1> jz @F 3149 <1> 3150 000026D3 B80301 <1> mov ax, 0103h 3151 000026D6 E84C7E <1> call setrc 3152 000026D9 BA[8066] <1> mov dx, msg.unexpected_auxbuff_guard 3153 000026DC E9DD96 <1> jmp putsz 3154 <1> 3155 <1> @@: 3156 000026DF E832A5 <1> call yy_reset_buf 3157 <1> 3158 000026E2 C706[E409][E401] <1> mov word [re_buffer.position], re_buffer 3159 000026E8 8326[E809]00 <1> and word [re_count], 0 3160 000026ED 8326[EA09]00 <1> and word [re_count + 2], 0 3161 <1> 3162 000026F2 FF36[F00A] <1> push word [rc] 3163 000026F6 FF36[940A] <1> push word [savesp] 3164 000026FA FF36[9E0A] <1> push word [throwsp] 3165 000026FE FF36[DA0B] <1> push word [lastcmd] 3166 00002702 55 <1> push bp 3167 00002703 8926[940A] <1> mov word [savesp], sp 3168 00002707 8926[9E0A] <1> mov word [throwsp], sp 3169 0000270B 8926[980A] <1> mov word [re_sp], sp 3170 <1> 3171 0000270F 800E[A700]01 <1> setopt [internalflags3], dif3_input_re 3172 <1> 3173 00002714 F606[A700]10 <1> testopt [internalflags3], dif3_auxbuff_guarded_1 3174 00002719 7405 <1> jz @F 3175 0000271B 8036[A700]30 <1> xoropt [internalflags3], dif3_auxbuff_guarded_1 | dif3_auxbuff_guarded_2 3176 <1> @@: 3177 <1> .cmd3: 3178 00002720 E9DDD8 <1> jmp cmd3 3179 <1> 3180 <1> .exit: 3181 00002723 8B26[980A] <1> mov sp, word [re_sp] 3182 00002727 5D <1> pop bp 3183 00002728 8F06[DA0B] <1> pop word [lastcmd] 3184 0000272C 8F06[9E0A] <1> pop word [throwsp] 3185 00002730 8F06[940A] <1> pop word [savesp] 3186 00002734 58 <1> pop ax 3187 00002735 85C0 <1> test ax, ax 3188 00002737 7403 <1> jz @F 3189 00002739 A3[F00A] <1> mov word [rc], ax 3190 <1> @@: 3191 0000273C 8026[A700]FE <1> clropt [internalflags3], dif3_input_re 3192 <1> 3193 00002741 F606[A700]20 <1> testopt [internalflags3], dif3_auxbuff_guarded_2 3194 00002746 7405 <1> jz @F 3195 00002748 8036[A700]30 <1> xoropt [internalflags3], dif3_auxbuff_guarded_1 | dif3_auxbuff_guarded_2 3196 <1> @@: 3197 <1> 3198 0000274D F606[8100]80 <1> testopt [options2], opt2_re_cancel_tpg 3199 00002752 7501 <1> jnz @F 3200 <1> 3201 00002754 C3 <1> retn 3202 <1> 3203 <1> @@: 3204 00002755 E8ED17 <1> call terminate_silent_dump.if_nonnull 3205 00002758 EBC6 <1> jmp .cmd3 3206 <1> 3207 <1> 3208 <1> .just_dumpregs: 3209 <1> ; DUMPREGS - Dump registers. 3210 <1> ; 3211 <1> ; 16 bit: 8 regs, line break, first 4 segment regs, IP, flags 3212 <1> ; 32 bit: 6 regs, line break, 2 regs, flags, line break, 6 segment regs, EIP 3213 <1> ; 3214 <1> ; CHG: ax, bx, cx, dx, di, si 3215 <1> dumpregs: 3216 0000275A F606[8600]08 <1> testopt [options3], opt3_r_highlight_eip 3217 0000275F 750C <1> jnz @F 3218 00002761 A1[9C0C] <1> mov ax, word [reg_eip] 3219 00002764 A3[DC0C] <1> mov word [reg_eip - regs + regs_prior], ax 3220 <1> %if _PM 3221 00002767 A1[9E0C] <1> mov ax, word [reg_eip + 2] 3222 0000276A A3[DE0C] <1> mov word [reg_eip + 2 - regs + regs_prior], ax 3223 <1> %endif 3224 <1> @@: 3225 <1> 3226 0000276D BE[7480] <1> mov si, reg16names 3227 00002770 BF[0E08] <1> mov di, line_out 3228 00002773 B90800 <1> mov cx, 8 ; display all 8 standard regs (16-bit) 3229 00002776 F606[7C00]01 <1> testopt [options], dispregs32 3230 0000277B 7402 <1> jz .firstrow16 3231 0000277D B106 <1> mov cl, 6 ; room for 6 standard regs (32-bit) only 3232 <1> .firstrow16: 3233 0000277F 9C <1> pushf 3234 00002780 57 <1> push di 3235 00002781 E81101 <1> call dmpr1 ; display first row 3236 00002784 E8AF92 <1> call trimputs 3237 00002787 5F <1> pop di ; (reset di) 3238 00002788 9D <1> popf ; (reset ZF) 3239 00002789 7511 <1> jnz .secondrow32 3240 0000278B B104 <1> mov cl, 4 ; display 4 segment regs 3241 0000278D E80501 <1> call dmpr1 3242 00002790 83C604 <1> add si, byte 2*2 ; skip FS+GS 3243 00002793 41 <1> inc cx ; (= 1) 3244 00002794 E8FE00 <1> call dmpr1 ; display IP 3245 00002797 E83103 <1> call dmpflags ; display flags in 16-bit display 3246 0000279A EB18 <1> jmp short .lastrowdone 3247 <1> .secondrow32: 3248 0000279C 57 <1> push di 3249 0000279D B102 <1> mov cl, 2 ; display rest of 32-bit standard regs 3250 0000279F E8F300 <1> call dmpr1 3251 000027A2 56 <1> push si 3252 000027A3 E82503 <1> call dmpflags ; display flags in 32-bit display 3253 000027A6 E89592 <1> call putsline_crlf 3254 000027A9 5E <1> pop si 3255 000027AA 5F <1> pop di ; (reset di) 3256 000027AB B106 <1> mov cl, 6 ; display all segment registers 3257 000027AD E8E500 <1> call dmpr1 3258 000027B0 41 <1> inc cx ; (= 1) 3259 000027B1 E8E100 <1> call dmpr1 ; display EIP 3260 <1> .lastrowdone: 3261 000027B4 E87F92 <1> call trimputs 3262 <1> 3263 000027B7 BE[640C] <1> mov si, regs 3264 000027BA BF[A40C] <1> mov di, regs_prior 3265 000027BD B92000 <1> mov cx, words(regs_prior.size) 3266 000027C0 F3A5 <1> rep movsw ; update prior regs save area 3267 <1> 3268 <1> ; Set U address to CS:(E)IP. 3269 000027C2 BE[9C0C] <1> mov si, reg_eip 3270 000027C5 BF[1E0B] <1> mov di, u_addr 3271 000027C8 A5 <1> movsw ; first word of saOffset 3272 <1> %if saSegSel == 4 3273 000027C9 A5 <1> movsw ; second word of saOffset 3274 <1> %endif 3275 000027CA A1[900C] <1> mov ax, word [reg_cs] 3276 000027CD AB <1> stosw ; saSegSel 3277 <1> %if _PM 3278 000027CE E8F869 <1> call ispm 3279 000027D1 7501 <1> jnz .86m 3280 <1> .pm: 3281 000027D3 AF <1> scasw ; skip saSegment, sto to saSelector 3282 <1> .86m: 3283 000027D4 AB <1> stosw ; (if jumped to .86m) saSegment 3284 <1> @@: 3285 <1> %endif 3286 <1> 3287 000027D5 B80300 <1> mov ax, DIS_F_REPT | DIS_F_SHOW 3288 000027D8 F606[7F00]10 <1> testopt [options], rr_disasm_no_rept 3289 000027DD 7402 <1> jz @F 3290 000027DF 24FE <1> and al, ~ DIS_F_REPT 3291 <1> @@: 3292 000027E1 F606[7F00]20 <1> testopt [options], rr_disasm_no_show 3293 000027E6 7402 <1> jz @F 3294 000027E8 24FD <1> and al, ~ DIS_F_SHOW 3295 <1> @@: 3296 000027EA A3[D687] <1> mov word [disflags], ax 3297 000027ED E8BB1F <1> call disasm 3298 <1> 3299 <1> ; Set ABO to address after the dumpregs disassembly. 3300 000027F0 BF[140B] <1> mov di, behind_r_u_addr 3301 000027F3 BE[1E0B] <1> mov si, u_addr 3302 000027F6 A5 <1> movsw ; first word of saOffset 3303 <1> %if saSegSel == 4 3304 000027F7 A5 <1> movsw ; second word of saOffset 3305 <1> %endif 3306 000027F8 A5 <1> movsw ; saSegSel 3307 <1> %if _PM 3308 000027F9 A5 <1> movsw ; saSegment 3309 000027FA A5 <1> movsw ; saSelector 3310 <1> %endif 3311 <1> %if (behind_r_u_addr + SEGADR_size) != u_addr 3312 <1> %error Expected u_addr behind behind_r_u_addr 3313 <1> ; mov di, u_addr 3314 <1> %endif 3315 <1> ; Reset U offset to (E)IP. 3316 000027FB BE[9C0C] <1> mov si, reg_eip 3317 000027FE A5 <1> movsw ; first word of saOffset 3318 000027FF A5 <1> _386_PM movsw ; second word of saOffset 3319 <1> 3320 <1> 3321 <1> %if _ACCESS_VARIABLES_AMOUNT 3322 <1> dumpregs_set_access_variables: 3323 00002800 31C0 <1> xor ax, ax 3324 00002802 BF[0483] <1> mov di, reading_access_variables 3325 00002805 B92000 <1> mov cx, words(_ACCESS_VARIABLES_AMOUNT * 8 * 2) 3326 00002808 F3AB <1> rep stosw 3327 <1> 3328 0000280A 8B0E[B087] <1> mov cx, [memrefs.free] 3329 0000280E 85C9 <1> test cx, cx 3330 00002810 744A <1> jz .none 3331 00002812 31F6 <1> xor si, si 3332 <1> .loop: 3333 00002814 89F3 <1> mov bx, si 3334 00002816 E86E2C <1> call get_memref_index_bx 3335 00002819 8B87[7A87] <1> mov ax, word [memrefs + bx + mrFlags] 3336 0000281D A801 <1> test al, mrfBranchDirect 3337 0000281F 7537 <1> jnz .next 3338 00002821 31D2 <1> xor dx, dx ; 0 = reading 3339 00002823 A840 <1> test al, mrfStringSource 3340 00002825 751C <1> jnz .gotmsg 3341 00002827 42 <1> inc dx ; 1 = writing 3342 00002828 A880 <1> test al, mrfStringDest 3343 0000282A 7517 <1> jnz .gotmsg 3344 0000282C 88C2 <1> mov dl, al 3345 0000282E 80E20C <1> and dl, mrfMemSource | mrfMemDest 3346 00002831 80FA0C <1> cmp dl, mrfMemSource | mrfMemDest 3347 00002834 B202 <1> mov dl, 2 ; 2 = r/w 3348 00002836 740B <1> je .gotmsg 3349 00002838 31D2 <1> xor dx, dx ; 0 = reading 3350 0000283A A804 <1> test al, mrfMemSource 3351 0000283C 7505 <1> jnz .gotmsg 3352 0000283E 42 <1> inc dx ; 1 = writing 3353 0000283F A808 <1> test al, mrfMemDest 3354 <1> ; jnz .gotmsg 3355 00002841 7415 <1> jz .next 3356 <1> .gotmsg: 3357 <1> 3358 00002843 84D2 <1> test dl, dl 3359 00002845 740B <1> jz .read 3360 <1> 3361 <1> .write: 3362 00002847 BF[2483] <1> mov di, writing_access_variables 3363 0000284A E81000 <1> call add_access_variable 3364 0000284D 80FA01 <1> cmp dl, 1 3365 00002850 7406 <1> je .next 3366 <1> 3367 <1> .read: 3368 00002852 BF[0483] <1> mov di, reading_access_variables 3369 00002855 E80500 <1> call add_access_variable 3370 <1> 3371 <1> .next: 3372 00002858 46 <1> inc si 3373 00002859 49 <1> dec cx 3374 0000285A 75B8 <1> jnz .loop 3375 <1> .none: 3376 <1> %endif 3377 0000285C C3 <1> retn 3378 <1> 3379 <1> 3380 <1> %if _ACCESS_VARIABLES_AMOUNT 3381 <1> add_access_variable: 3382 0000285D 93 <1> xchg ax, bx 3383 0000285E 31DB <1> xor bx, bx 3384 <1> .loop: 3385 00002860 83790400 <1> cmp word [di + bx + 4], 0 3386 00002864 7525 <1> jne .next 3387 00002866 83790600 <1> cmp word [di + bx + 4 + 2], 0 3388 0000286A 751F <1> jne .next 3389 0000286C 93 <1> xchg ax, bx 3390 0000286D FFB7[7287] <1> push word [memrefs + bx + mrLinear + 2] 3391 00002871 FFB7[7087] <1> push word [memrefs + bx + mrLinear] 3392 00002875 FFB7[7E87] <1> push word [memrefs + bx + mrLength + 2] 3393 00002879 FFB7[7C87] <1> push word [memrefs + bx + mrLength] 3394 0000287D 93 <1> xchg ax, bx 3395 0000287E 8F4104 <1> pop word [di + bx + 4] 3396 00002881 8F4106 <1> pop word [di + bx + 4 + 2] 3397 00002884 8F01 <1> pop word [di + bx] 3398 00002886 8F4102 <1> pop word [di + bx + 2] 3399 00002889 93 <1> xchg ax, bx 3400 0000288A C3 <1> retn 3401 <1> 3402 <1> .next: 3403 0000288B 83C308 <1> add bx, 8 3404 0000288E 83FB20 <1> cmp bx, _ACCESS_VARIABLES_AMOUNT * 8 3405 00002891 72CD <1> jb .loop 3406 00002893 93 <1> xchg ax, bx 3407 00002894 C3 <1> retn 3408 <1> 3409 <1> 3410 <1> usesection lDEBUG_DATA_ENTRY 3411 00008302 00 <1> align 4, db 0 3412 <1> reading_access_variables: 3413 00008304 00 <1> times _ACCESS_VARIABLES_AMOUNT * 8 db 0 3414 <1> 3415 <1> writing_access_variables: 3416 00008324 00 <1> times _ACCESS_VARIABLES_AMOUNT * 8 db 0 3417 <1> 3418 <1> usesection lDEBUG_CODE 3419 <1> %endif 3420 <1> 3421 <1> 3422 <1> ; Function to display multiple register entries. 3423 <1> ; 3424 <1> ; INP: [options]&dispregs32 = whether to display 32-bit registers, 3425 <1> ; except segment registers which are always 16-bit 3426 <1> ; si-> 2-byte register name in table 3427 <1> ; cx = number of registers to display 3428 <1> ; OUT: si-> register name in table after the last one displayed 3429 <1> ; cx = 0 3430 <1> ; CHG: bx, ax, dx 3431 <1> dmpr1: 3432 <1> .: 3433 00002895 8D9C8C7E <1> lea bx, [si-(reg16names+DATASECTIONFIXUP)] 3434 00002899 01DB <1> add bx, bx ; index * 4 3435 0000289B 807C0153 <1> cmp byte [si+1], 'S' ; segment register ? 3436 0000289F 740A <1> je .no_e ; always 16-bit --> (ZR) 3437 000028A1 F606[7C00]01 <1> testopt [options], dispregs32 ; display 32-bit register ? 3438 000028A6 7403 <1> jz .no_e ; no --> (ZR) 3439 000028A8 B045 <1> mov al, 'E' 3440 000028AA AA <1> stosb ; store E for Exx register name 3441 <1> .no_e: 3442 000028AB A5 <1> movsw ; store register name, increase pointer 3443 000028AC B03D <1> mov al, '=' 3444 000028AE AA <1> stosb ; store equality sign 3445 000028AF 742E <1> jz .no_high ; (ZF left from before) 3446 <1> 3447 000028B1 8026[A600]FE <1> clropt [internalflags3], dif3_highlighting 3448 000028B6 8B87[660C] <1> mov ax, word [regs + bx + 2] 3449 000028BA 8B97[A60C] <1> mov dx, word [regs_prior + bx + 2] 3450 000028BE F606[8600]04 <1> testopt [options3], opt3_r_highlight_full 3451 000028C3 7417 <1> jz @F 3452 000028C5 39C2 <1> cmp dx, ax 3453 000028C7 7510 <1> jne .highlighthigh 3454 000028C9 52 <1> push dx 3455 000028CA 50 <1> push ax 3456 000028CB 8B87[640C] <1> mov ax, word [regs + bx] 3457 000028CF 8B97[A40C] <1> mov dx, word [regs_prior + bx] 3458 000028D3 39C2 <1> cmp dx, ax 3459 000028D5 58 <1> pop ax 3460 000028D6 5A <1> pop dx 3461 000028D7 7403 <1> je @F 3462 <1> .highlighthigh: 3463 000028D9 E82500 <1> call highlight 3464 <1> @@: 3465 000028DC E85000 <1> call hexword_diff ; store high word (only if 32-bit register) 3466 <1> .no_high: 3467 000028DF 8B87[640C] <1> mov ax, word [regs + bx] 3468 000028E3 8B97[A40C] <1> mov dx, word [regs_prior + bx] 3469 000028E7 F606[8600]04 <1> testopt [options3], opt3_r_highlight_full 3470 000028EC 7407 <1> jz @F 3471 000028EE 39C2 <1> cmp dx, ax 3472 000028F0 7403 <1> je @F 3473 000028F2 E80C00 <1> call highlight 3474 <1> @@: 3475 000028F5 E83700 <1> call hexword_diff ; store low word 3476 <1> 3477 000028F8 E81D00 <1> call unhighlight 3478 <1> 3479 000028FB B020 <1> mov al, 32 3480 000028FD AA <1> stosb ; store space 3481 000028FE E295 <1> loop . 3482 00002900 C3 <1> retn 3483 <1> ; Note: This code doesn't use 386+ registers to display our internal 3484 <1> ; variables for these. Currently, setting the RX bit of options 3485 <1> ; will display the 32-bit variables even on non-386 machines. 3486 <1> ; Changing this code to require EAX would require changes to our 3487 <1> ; check too. 3488 <1> ; 32-bit code probably wouldn't be much shorter than the current 3489 <1> ; implementation as well. 3490 <1> 3491 <1> highlight: 3492 00002901 F606[A600]01 <1> testopt [internalflags3], dif3_highlighting 3493 00002906 750F <1> jnz @F 3494 00002908 800E[A600]01 <1> setopt [internalflags3], dif3_highlighting 3495 0000290D 56 <1> push si 3496 0000290E 51 <1> push cx 3497 0000290F BE[BF6B] <1> mov si, msg.highlight 3498 00002912 E8ED0A <1> call copy_single_counted_string 3499 00002915 59 <1> pop cx 3500 00002916 5E <1> pop si 3501 <1> @@: 3502 00002917 C3 <1> retn 3503 <1> 3504 <1> unhighlight: 3505 00002918 F606[A600]01 <1> testopt [internalflags3], dif3_highlighting 3506 0000291D 740F <1> jz @F 3507 0000291F 8026[A600]FE <1> clropt [internalflags3], dif3_highlighting 3508 00002924 56 <1> push si 3509 00002925 51 <1> push cx 3510 00002926 BE[C46B] <1> mov si, msg.unhighlight 3511 00002929 E8D60A <1> call copy_single_counted_string 3512 0000292C 59 <1> pop cx 3513 0000292D 5E <1> pop si 3514 <1> @@: 3515 0000292E C3 <1> retn 3516 <1> 3517 <1> hexword_diff: 3518 0000292F F606[8600]01 <1> testopt [options3], opt3_r_highlight_diff 3519 00002934 7407 <1> jz @F 3520 00002936 F606[8600]04 <1> testopt [options3], opt3_r_highlight_full 3521 0000293B 7403 <1> jz @FF 3522 <1> @@: 3523 0000293D E9C690 <1> jmp hexword 3524 <1> 3525 <1> @@: 3526 <1> .hexword: 3527 00002940 86C4 <1> xchg al, ah 3528 00002942 86D6 <1> xchg dl, dh 3529 00002944 E80400 <1> call .hexbyte 3530 00002947 86C4 <1> xchg al, ah 3531 00002949 86D6 <1> xchg dl, dh 3532 <1> 3533 <1> .hexbyte: 3534 0000294B 51 <1> push cx 3535 0000294C B104 <1> mov cl, 4 3536 0000294E D2C0 <1> rol al, cl 3537 00002950 D2C2 <1> rol dl, cl 3538 00002952 E80500 <1> call .hexnyb 3539 00002955 D2C0 <1> rol al, cl 3540 00002957 D2C2 <1> rol dl, cl 3541 00002959 59 <1> pop cx 3542 <1> 3543 <1> .hexnyb: 3544 0000295A 50 <1> push ax 3545 0000295B 88D4 <1> mov ah, dl 3546 0000295D 250F0F <1> and ax, 0F0Fh 3547 00002960 38E0 <1> cmp al, ah 3548 00002962 7405 <1> je .unhighlight 3549 <1> .highlight: 3550 00002964 E89AFF <1> call highlight 3551 00002967 EB03 <1> jmp .common 3552 <1> 3553 <1> .unhighlight: 3554 00002969 E8ACFF <1> call unhighlight 3555 <1> .common: 3556 <1> ; INP: original ax on stack, then return near address 3557 <1> ; al = nybble value to display, 0..15 3558 <1> ; es:di -> where to store 3559 <1> ; OUT: es:di incremented 3560 <1> ; ax restored 3561 <1> ; return to near address that was on stack 3562 0000296C E9AC90 <1> jmp hexnyb.common 3563 <1> 3564 <1> 3565 <1> %if _RN 3566 <1> ; The layout for FSAVE/FRSTOR depends on mode and 16-/32-bit. 3567 <1> 3568 <1> %if 0 3569 <1> struc FPENV16 3570 <1> .cw: resw 1 ; 00h 3571 <1> .sw: resw 1 ; 02h 3572 <1> .tw: resw 1 ; 04h 3573 <1> .fip: resw 1 ; 06h IP offset 3574 <1> .opc: ; 08h RM: opcode (0-10), IP 16-19 in high bits 3575 <1> .fcs: resw 1 ; 08h PM: IP selector 3576 <1> .fop: resw 1 ; 0Ah operand pointer offset 3577 <1> .foph: ; 0Ch RM: operand pointer 16-19 in high bits 3578 <1> .fos: resw 1 ; 0Ch PM: operand pointer selector 3579 <1> endstruc; 0Eh 3580 <1> 3581 <1> struc FPENV32 3582 <1> .cw: resd 1 ; 00h 3583 <1> .sw: resd 1 ; 04h 3584 <1> .tw: resd 1 ; 08h 3585 <1> .fip: resd 1 ; 0Ch ip offset (RM: bits 0-15 only) 3586 <1> .fopcr: ; 10h (dword) RM: opcode (0-10), ip (12-27) 3587 <1> .fcs: resw 1 ; 10h PM: ip selector 3588 <1> .fopcp: resw 1 ; 12h PM: opcode (bits 0-10) 3589 <1> .foo: resd 1 ; 14h operand pointer offset (RM: bits 0-15 only) 3590 <1> .fooh: ; 18h (dword) RM: operand pointer (12-27) 3591 <1> .fos: resw 1 ; 18h PM: operand pointer selector 3592 <1> resw 1 ; 1Ah PM: not used 3593 <1> endstruc; 1Ch 3594 <1> %endif 3595 <1> 3596 <1> 3597 <1> usesection lDEBUG_DATA_ENTRY 3598 <1> 3599 <1> ; dumpregsFPU - Dump Floating Point Registers 3600 <1> fregnames: 3601 00008344 435753575457 <1> db "CW", "SW", "TW" 3602 0000834A 4F50433D49503D4450- <1> db "OPC=", "IP=", "DP=" 3602 00008353 3D <1> 3603 00008354 656D707479 <1> msg.empty: db "empty" 3604 <1> endarea msg.empty 3605 00008359 4E614E <1> msg.nan: db "NaN" 3606 <1> endarea msg.nan 3607 <1> 3608 <1> 3609 <1> usesection lDEBUG_CODE 3610 <1> 3611 <1> dumpregsFPU: 3612 0000296F E86DDB <1> call guard_auxbuff 3613 00002972 8E06[F209] <1> mov es, word [auxbuff_segorsel] 3614 <1> ; => auxbuff 3615 00002976 31FF <1> xor di, di ; -> auxbuff 3616 00002978 B98000 <1> mov cx, 128 3617 0000297B 31C0 <1> xor ax, ax 3618 0000297D F3AB <1> rep stosw ; initialise auxbuff 3619 <1> %if _AUXBUFFSIZE < (128 * 2) 3620 <1> %error auxbuff not large enough for dumpregsFPU 3621 <1> %endif 3622 0000297F BF[0E08] <1> mov di, line_out 3623 00002982 BE[4483] <1> mov si, fregnames 3624 00002985 31DB <1> xor bx, bx ; es:bx -> auxbuff 3625 00002987 66 <1> _386_o32 3626 00002988 26DD37 <1> fnsave [es:bx] 3627 <1> 3628 <1> ; display CW, SW and TW 3629 0000298B 16 <1> push ss 3630 0000298C 07 <1> pop es ; es:di -> line_out 3631 0000298D B90300 <1> mov cx, 3 3632 <1> .nextfpr: 3633 00002990 A5 <1> movsw 3634 00002991 B03D <1> mov al, '=' 3635 00002993 AA <1> stosb 3636 00002994 87F3 <1> xchg si, bx 3637 00002996 8E1E[F209] <1> mov ds, word [auxbuff_segorsel] 3638 <1> ; ds:si -> auxbuff entry 3639 0000299A 66 <1> _386_o32 ; lodsd 3640 0000299B AD <1> lodsw 3641 0000299C 16 <1> push ss 3642 0000299D 1F <1> pop ds ; ds:si -> fregnames entry 3643 0000299E 87F3 <1> xchg si, bx 3644 000029A0 50 <1> push ax 3645 000029A1 E86290 <1> call hexword 3646 000029A4 B020 <1> mov al, 32 3647 000029A6 AA <1> stosb 3648 000029A7 E2E7 <1> loop .nextfpr 3649 <1> 3650 <1> ; display OPC 3651 <1> ; in 16-bit PM, there's no OPC 3652 <1> ; in 32-bit PM, there's one, but the location differs from RM 3653 000029A9 53 <1> push bx 3654 <1> %if _PM 3655 000029AA E81C68 <1> call ispm 3656 000029AD 7408 <1> jz .notpm_opc 3657 000029AF 83C302 <1> add bx, byte 2 ; location of OPC in PM differs from RM 3658 000029B2 83C604 <1> _no386 add si, byte 4 ; no OPC in 16-bit PM 3659 000029B5 EB18 <1> _no386 jmp short .no_opc 3660 <1> .notpm_opc: 3661 <1> %endif 3662 000029B7 A5 <1> movsw 3663 000029B8 A5 <1> movsw 3664 000029B9 87F3 <1> xchg si, bx 3665 000029BB 8E1E[F209] <1> mov ds, word [auxbuff_segorsel] 3666 <1> ; ds:si -> auxbuff entry 3667 000029BF 66 <1> _386_o32 ; lodsd 3668 000029C0 AD <1> lodsw ; skip word/dword 3669 000029C1 AD <1> lodsw 3670 000029C2 16 <1> push ss 3671 000029C3 1F <1> pop ds ; ds:si -> fregnames entry 3672 000029C4 87F3 <1> xchg si, bx 3673 000029C6 25FF07 <1> and ax, 07FFh ; bits 0-10 only 3674 000029C9 E83A90 <1> call hexword 3675 000029CC B020 <1> mov al, 32 3676 000029CE AA <1> stosb 3677 <1> .no_opc: 3678 000029CF 5B <1> pop bx 3679 <1> 3680 <1> ; display IP and DP 3681 000029D0 B102 <1> mov cl, 2 3682 <1> .nextfp: 3683 000029D2 51 <1> push cx 3684 000029D3 16 <1> push ss 3685 000029D4 1F <1> pop ds ; ds:si -> fregnames entry 3686 000029D5 A5 <1> movsw 3687 000029D6 A4 <1> movsb 3688 000029D7 87F3 <1> xchg si, bx 3689 000029D9 8E1E[F209] <1> mov ds, word [auxbuff_segorsel] 3690 <1> ; ds:si -> auxbuff entry 3691 000029DD 66 <1> _386_o32 ; lodsd 3692 000029DE AD <1> lodsw 3693 000029DF 66 <1> _386_o32 ; mov edx, eax 3694 000029E0 89C2 <1> mov dx, ax 3695 000029E2 66 <1> _386_o32 ; lodsd 3696 000029E3 AD <1> lodsw 3697 000029E4 87F3 <1> xchg si, bx 3698 000029E6 16 <1> push ss 3699 000029E7 1F <1> pop ds ; ds:si -> fregnames entry 3700 <1> %if _PM 3701 000029E8 E8DE67 <1> call ispm 3702 000029EB 7408 <1> jz .notpm_ipdp 3703 000029ED E81690 <1> call hexword 3704 000029F0 B03A <1> mov al, ':' 3705 000029F2 AA <1> stosb 3706 000029F3 EB0D <1> jmp short .fppm 3707 <1> .notpm_ipdp: 3708 <1> %endif 3709 000029F5 B10C <1> mov cl, 12 3710 000029F7 66 <1> _386_o32 ; shr eax, cl 3711 000029F8 D3E8 <1> shr ax, cl 3712 000029FA E80990 <1> _386 call hexword 3713 000029FD EB03 <1> _386 jmp short .fppm 3714 000029FF E81690 <1> call hexnyb 3715 <1> .fppm: 3716 00002A02 66 <1> _386_PM_o32 ; mov eax, edx 3717 00002A03 89D0 <1> mov ax, dx 3718 00002A05 E8C167 <1> _386_PM call ispm 3719 00002A08 7403 <1> _386_PM jz .notpm_fppm 3720 00002A0A E8ED8F <1> _386_PM call hexword_high 3721 <1> .notpm_fppm: 3722 00002A0D E8F68F <1> call hexword 3723 00002A10 B020 <1> mov al, 32 3724 00002A12 AA <1> stosb 3725 00002A13 59 <1> pop cx 3726 00002A14 E2BC <1> loop .nextfp 3727 <1> 3728 00002A16 87F3 <1> xchg si, bx 3729 00002A18 16 <1> push ss 3730 00002A19 1F <1> pop ds ; ds = es = ss 3731 00002A1A E81990 <1> call trimputs 3732 <1> 3733 <1> ; display ST0..7 3734 00002A1D 5D <1> pop bp ; TW 3735 00002A1E 58 <1> pop ax ; SW 3736 00002A1F 5A <1> pop dx ; CW (discarded here) 3737 <1> 3738 00002A20 B10A <1> mov cl, 10 3739 00002A22 D3E8 <1> shr ax, cl ; move TOP to bits 1..3 3740 00002A24 240E <1> and al, 1110b ; separate TOP 3741 00002A26 88C1 <1> mov cl, al 3742 00002A28 D3CD <1> ror bp, cl ; adjust TW 3743 <1> 3744 00002A2A B130 <1> mov cl, '0' 3745 <1> .nextst: 3746 00002A2C BF[0E08] <1> mov di, line_out 3747 00002A2F 51 <1> push cx 3748 00002A30 B85354 <1> mov ax, "ST" 3749 00002A33 AB <1> stosw 3750 00002A34 88C8 <1> mov al, cl 3751 00002A36 B43D <1> mov ah, '=' 3752 00002A38 AB <1> stosw 3753 00002A39 57 <1> push di 3754 00002A3A A801 <1> test al, 1 3755 00002A3C B020 <1> mov al, 32 3756 00002A3E B91600 <1> mov cx, 22 3757 00002A41 F3AA <1> rep stosb 3758 00002A43 7404 <1> jz .oddst 3759 00002A45 B80D0A <1> mov ax, 10<<8|13 3760 00002A48 AB <1> stosw 3761 <1> .oddst: 3762 00002A49 B000 <1> mov al, 0 3763 00002A4B AA <1> stosb ; make it an ASCIZ string 3764 00002A4C 5F <1> pop di 3765 <1> 3766 00002A4D 89E8 <1> mov ax, bp 3767 00002A4F D1CD <1> ror bp, 1 3768 00002A51 D1CD <1> ror bp, 1 3769 00002A53 2403 <1> and al, 3 ; 00b = valid, 01b = zero, 10b = NaN, 11b = empty 3770 00002A55 741F <1> jz .isvalid 3771 00002A57 56 <1> push si 3772 00002A58 16 <1> push ss 3773 00002A59 1F <1> pop ds ; ds = es = ss 3774 00002A5A BE[5483] <1> mov si, msg.empty 3775 00002A5D B105 <1> mov cl, msg.empty_size 3776 00002A5F 3C03 <1> cmp al, 3 3777 00002A61 740E <1> je .gotst 3778 00002A63 BE[5983] <1> mov si, msg.nan 3779 00002A66 B103 <1> mov cl, msg.nan_size 3780 00002A68 3C02 <1> cmp al, 2 3781 00002A6A 7405 <1> je .gotst 3782 00002A6C B030 <1> mov al, '0' 3783 00002A6E AA <1> stosb 3784 00002A6F 31C9 <1> xor cx, cx 3785 <1> .gotst: 3786 00002A71 F3A4 <1> rep movsb 3787 00002A73 5E <1> pop si 3788 00002A74 EB34 <1> jmp short .regoutdone 3789 <1> 3790 <1> .isvalid: 3791 00002A76 8E1E[F209] <1> mov ds, word [auxbuff_segorsel] 3792 <1> ; ds:si -> auxbuff entry 3793 00002A7A 36F606[7C00]40 <1> testopt [ss:options], hexrn 3794 00002A80 7508 <1> jnz .hex 3795 00002A82 57 <1> push di ; -> buffer (first parameter; in es = ss) 3796 00002A83 1E <1> push ds 3797 00002A84 56 <1> push si ; -> auxbuff entry (second parameter) 3798 00002A85 E8E402 <1> call FloatToStr 3799 00002A88 EB20 <1> jmp short .regoutdone 3800 <1> 3801 <1> .hex: 3802 00002A8A 8B4408 <1> mov ax, word [si+8] 3803 00002A8D E8768F <1> call hexword 3804 00002A90 B02E <1> mov al, '.' 3805 00002A92 AA <1> stosb 3806 00002A93 8B4406 <1> mov ax, word [si+6] 3807 00002A96 E86D8F <1> call hexword 3808 00002A99 8B4404 <1> mov ax, word [si+4] 3809 00002A9C E8678F <1> call hexword 3810 00002A9F 8B4402 <1> mov ax, word [si+2] 3811 00002AA2 E8618F <1> call hexword 3812 00002AA5 8B04 <1> mov ax, word [si+0] 3813 00002AA7 E85C8F <1> call hexword 3814 <1> 3815 <1> .regoutdone: 3816 00002AAA BA[0E08] <1> mov dx, line_out 3817 00002AAD 16 <1> push ss 3818 00002AAE 1F <1> pop ds ; ds = es = ss 3819 00002AAF E80A93 <1> call putsz 3820 00002AB2 59 <1> pop cx 3821 <1> 3822 00002AB3 83C60A <1> add si, byte 10 ; -> next ST 3823 00002AB6 FEC1 <1> inc cl 3824 00002AB8 80F938 <1> cmp cl, '8' 3825 00002ABB 7403E96CFF <1> jne .nextst 3826 00002AC0 8E06[F209] <1> mov es, word [auxbuff_segorsel] 3827 <1> ; es => auxbuff 3828 00002AC4 66 <1> _386_o32 3829 00002AC5 26DD260000 <1> frstor [es:0] 3830 00002ACA C3 <1> retn 3831 <1> %endif 3832 <1> 3833 <1> 3834 <1> ; DMPFLAGS - Dump flags output. 3835 <1> dmpflags: 3836 00002ACB 52 <1> push dx 3837 00002ACC 53 <1> push bx 3838 00002ACD BE[0C80] <1> mov si, flagbits 3839 00002AD0 B90800 <1> mov cx, 8 3840 00002AD3 AD <1> .loop: lodsw 3841 00002AD4 8B16[E00C] <1> mov dx, word [reg_efl - regs + regs_prior] 3842 00002AD8 21C2 <1> and dx, ax 3843 00002ADA 8B1E[A00C] <1> mov bx, word [reg_efl] 3844 00002ADE 21C3 <1> and bx, ax 3845 00002AE0 39DA <1> cmp dx, bx 3846 00002AE2 7411 <1> je @F 3847 00002AE4 F606[8600]05 <1> testopt [options3], opt3_r_highlight_diff | opt3_r_highlight_full 3848 00002AE9 740A <1> jz @F 3849 00002AEB F606[A600]02 <1> testopt [internalflags3], dif3_do_not_highlight 3850 00002AF0 7503 <1> jnz @F 3851 00002AF2 E80CFE <1> call highlight 3852 <1> @@: 3853 00002AF5 85DB <1> test bx, bx 3854 00002AF7 8B441E <1> mov ax, word [si+(flagsoff-flagbits)-2] 3855 00002AFA 7403 <1> jz .off ; if not set 3856 00002AFC 8B440E <1> mov ax, word [si+(flagson-flagbits)-2] 3857 00002AFF AB <1> .off: stosw 3858 00002B00 E815FE <1> call unhighlight 3859 00002B03 B020 <1> mov al, 32 3860 00002B05 AA <1> stosb 3861 00002B06 E2CB <1> loop .loop 3862 00002B08 4F <1> dec di ; -> last (unnecessary) blank 3863 00002B09 5B <1> pop bx 3864 00002B0A 5A <1> pop dx 3865 00002B0B C3 <1> retn 3866 <1> 3867 <1> 3868 <1> %if _OPTIONS || _VARIABLES 3869 <1> dumpvars: 3870 <1> %if _VARIABLES 3871 00002B0C BE[E40C] <1> mov si, vregs 3872 <1> %endif 3873 00002B0F 31DB <1> xor bx, bx 3874 <1> .loop: 3875 00002B11 BF[0E08] <1> mov di, line_out 3876 00002B14 31D2 <1> xor dx, dx 3877 <1> %if _VARIABLES 3878 00002B16 B90400 <1> mov cx, 4 3879 00002B19 E8B000 <1> call .dump ; display four variables 3880 00002B1C 43 <1> inc bx ; (would be one off here) 3881 00002B1D 56 <1> push si 3882 <1> %else 3883 <1> add bx, byte 4 ; (no motivation to optimize that) 3884 <1> %endif 3885 <1> %if _OPTIONS 3886 <1> %if _VARIABLES 3887 00002B1E B82020 <1> mov ax, 32<<8|32 3888 00002B21 AB <1> stosw ; more blanks inbetween 3889 <1> %endif 3890 00002B22 80FB10 <1> cmp bl, 16 3891 00002B25 7439 <1> je .3 3892 00002B27 80FB08 <1> cmp bl, 8 3893 00002B2A 7721 <1> ja .2 3894 00002B2C 7411 <1> je .1 3895 <1> 3896 <1> ; First line, display DCO and DCS 3897 <1> .0: 3898 00002B2E B8434F <1> mov ax, "CO" 3899 00002B31 BE[7C00] <1> mov si, options 3900 00002B34 E88600 <1> call .dump_option 3901 00002B37 B84353 <1> mov ax, "CS" 3902 00002B3A BE[8C00] <1> mov si, startoptions 3903 00002B3D EB44 <1> jmp short .next 3904 <1> 3905 <1> ; Second line, DAO and DAS 3906 <1> .1: 3907 00002B3F B8414F <1> mov ax, "AO" 3908 00002B42 BE[AC00] <1> mov si, asm_options 3909 00002B45 E87500 <1> call .dump_option 3910 00002B48 B84153 <1> mov ax, "AS" 3911 <1> ; asm_startoptions follows directly behind asm_options 3912 00002B4B EB36 <1> jmp short .next 3913 <1> 3914 <1> ; Third line, DIF and DPI 3915 <1> .2: 3916 00002B4D B84946 <1> mov ax, "IF" 3917 00002B50 BE[9C00] <1> mov si, internalflags 3918 00002B53 E86700 <1> call .dump_option 3919 00002B56 B85049 <1> mov ax, "PI" 3920 00002B59 BE[C80A] <1> mov si, psp22 3921 00002B5C 42 <1> inc dx 3922 00002B5D 42 <1> inc dx 3923 00002B5E EB23 <1> jmp short .next 3924 <1> 3925 <1> ; Fourth line, DPR, DPS (if _PM) and DPP 3926 <1> .3: 3927 00002B60 42 <1> inc dx 3928 00002B61 B85052 <1> mov ax, "PR" 3929 00002B64 BE[A60A] <1> mov si, pspdbg 3930 00002B67 E85300 <1> call .dump_option 3931 <1> %if _PM 3932 00002B6A 31C0 <1> xor ax, ax 3933 00002B6C E85A66 <1> call ispm 3934 00002B6F 7502 <1> jnz .3_rm 3935 00002B71 1E <1> push ds 3936 00002B72 A8 <1> db __TEST_IMM8 ; (skip push) 3937 <1> .3_rm: 3938 00002B73 50 <1> push ax 3939 00002B74 B85053 <1> mov ax, "PS" 3940 00002B77 89E6 <1> mov si, sp 3941 00002B79 E84100 <1> call .dump_options 3942 00002B7C 58 <1> pop ax 3943 <1> %else 3944 <1> mov ax, 32<<8|32 3945 <1> stosw 3946 <1> stosw 3947 <1> %endif 3948 00002B7D B85050 <1> mov ax, "PP" 3949 00002B80 BE[CC0A] <1> mov si, parent 3950 <1> 3951 <1> .next: 3952 00002B83 E83700 <1> call .dump_options 3953 <1> %endif 3954 00002B86 53 <1> push bx 3955 00002B87 E8B48E <1> call putsline_crlf ; display line 3956 00002B8A 5B <1> pop bx ; (retain counter) 3957 <1> %if _VARIABLES 3958 00002B8B 5E <1> pop si ; (retain pointer to next variable) 3959 <1> %endif 3960 00002B8C 80FB10 <1> cmp bl, 16 ; was end ? 3961 00002B8F 7580 <1> jne .loop ; no, loop --> 3962 <1> 3963 <1> ; done 3964 <1> .mode: 3965 00002B91 BA[825D] <1> mov dx, msg.rv_mode.before 3966 00002B94 E82592 <1> call putsz 3967 <1> %if _PM 3968 00002B97 E82F66 <1> call ispm 3969 00002B9A 7511 <1> jnz .mode_86m 3970 00002B9C BA[915D] <1> mov dx, msg.rv_mode_dpmi_16 3971 00002B9F 8B1E[900C] <1> mov bx, word [reg_cs] 3972 00002BA3 E88E31 <1> call test_d_b_bit 3973 00002BA6 7412 <1> jz @F 3974 00002BA8 BA[A25D] <1> mov dx, msg.rv_mode_dpmi_32 3975 00002BAB EB0D <1> jmp @F 3976 <1> 3977 <1> .mode_86m: 3978 <1> %endif 3979 00002BAD BA[B35D] <1> mov dx, msg.rv_mode_r86m 3980 <1> ; (only 386+ has the V86M so even though smsw ax is a 3981 <1> ; 286 level instruction, so could be used without a 386, 3982 <1> ; we only really need it on a 386+.) 3983 00002BB0 0F01E0 <1> _386 smsw ax 3984 00002BB3 A801 <1> _386 test al, 1 3985 00002BB5 7403 <1> _386 jz @F 3986 00002BB7 BA[C25D] <1> _386 mov dx, msg.rv_mode_v86m 3987 <1> @@: 3988 00002BBA E9FF91 <1> jmp putsz 3989 <1> 3990 <1> 3991 <1> ; INP: ax = 2-byte option name ('N' will precede this) 3992 <1> ; d[si] = value 3993 <1> ; OUT: si-> behind value 3994 <1> ; cx = 0 3995 <1> ; CHG: ax 3996 <1> .dump_options: 3997 <1> %if _VARIABLES 3998 <1> .dump_option: 3999 00002BBD C7052044 <1> mov word [di], " D" 4000 00002BC1 AF <1> scasw 4001 <1> %else 4002 <1> mov byte [di], ' ' 4003 <1> inc di 4004 <1> .dump_option: 4005 <1> mov byte [di], 'D' 4006 <1> inc di 4007 <1> %endif 4008 00002BC2 AB <1> stosw 4009 <1> %if _VARIABLES ; falls through otherwise, always count 1 4010 00002BC3 B90100 <1> mov cx, 1 4011 00002BC6 EB0C <1> jmp short .dump_one 4012 <1> %endif 4013 <1> 4014 <1> %if 0 4015 <1> PM && OPTIONS && VARIABLES 4016 <1> V0=00000000 V1=00000000 V2=00000000 V3=00000000 DCO=00000000 DCS=00000000 4017 <1> V4=00000000 V5=00000000 V6=00000000 V7=00000000 DAO=00000000 DAS=00000000 4018 <1> V8=00000000 V9=00000000 VA=00000000 VB=00000000 DIF=0000840D DPI=0616:01DE 4019 <1> VC=00000000 VD=00000000 VE=00000000 VF=00000000 DPR=0984 DPS=0000 DPP=0616 4020 <1> 4021 <1> !PM && OPTIONS && VARIABLES 4022 <1> V0=00000000 V1=00000000 V2=00000000 V3=00000000 DCO=00000000 DCS=00000000 4023 <1> V4=00000000 V5=00000000 V6=00000000 V7=00000000 DAO=00000000 DAS=00000000 4024 <1> V8=00000000 V9=00000000 VA=00000000 VB=00000000 DIF=0000840D DPI=0616:01DE 4025 <1> VC=00000000 VD=00000000 VE=00000000 VF=00000000 DPR=0984 DPP=0616 4026 <1> 4027 <1> !OPTIONS && VARIABLES 4028 <1> V0=00000000 V1=00000000 V2=00000000 V3=00000000 4029 <1> V4=00000000 V5=00000000 V6=00000000 V7=00000000 4030 <1> V8=00000000 V9=00000000 VA=00000000 VB=00000000 4031 <1> VC=00000000 VD=00000000 VE=00000000 VF=00000000 4032 <1> 4033 <1> !PM && OPTIONS && !VARIABLES 4034 <1> DCO=00000000 DCS=00000000 4035 <1> DAO=00000000 DAS=00000000 4036 <1> DIF=0000840D DPI=0616:01DE 4037 <1> DPR=0984 DPP=0616 4038 <1> 4039 <1> PM && OPTIONS && !VARIABLES 4040 <1> DCO=00000000 DCS=00000000 4041 <1> DAO=00000000 DAS=00000000 4042 <1> DIF=0000840D DPI=0616:01DE 4043 <1> DPR=0984 DPS=0000 DPP=0616 4044 <1> 4045 <1> !OPTIONS && !VARIABLES 4046 <1> %endif 4047 <1> %if 0 4048 <1> DCO Debugger Common Options 4049 <1> DCS Debugger Common Startup options 4050 <1> DIF Debugger Internal Flags 4051 <1> DPR Debugger Process (Real-mode segment) 4052 <1> DPS Debugger Process Selector, or zero 4053 <1> DPP Debugger Parent Process 4054 <1> DPI Debugger Parent Interrupt 22h 4055 <1> DAO Debugger Assembler/disassembler Options 4056 <1> DAS Debugger Assembler/disassembler Startup options 4057 <1> %endif 4058 <1> 4059 <1> %if _VARIABLES 4060 <1> .dump_loop: 4061 00002BC8 43 <1> inc bx 4062 00002BC9 B020 <1> mov al, 32 4063 00002BCB AA <1> stosb 4064 <1> .dump: 4065 00002BCC B056 <1> mov al, 'V' 4066 00002BCE AA <1> stosb 4067 00002BCF 88D8 <1> mov al, bl 4068 00002BD1 E8448E <1> call hexnyb 4069 <1> %endif 4070 <1> .dump_one: 4071 00002BD4 B03D <1> mov al, '=' 4072 00002BD6 AA <1> stosb 4073 00002BD7 AD <1> lodsw 4074 00002BD8 80FA01 <1> cmp dl, 1 4075 00002BDB 740D <1> je .dumpw 4076 00002BDD 50 <1> push ax 4077 00002BDE AD <1> lodsw 4078 00002BDF 9C <1> pushf 4079 00002BE0 E8238E <1> call hexword 4080 00002BE3 9D <1> popf ; CF 4081 00002BE4 7203 <1> jb .nocolon 4082 00002BE6 B03A <1> mov al, ':' 4083 00002BE8 AA <1> stosb 4084 <1> .nocolon: 4085 00002BE9 58 <1> pop ax 4086 <1> .dumpw: 4087 00002BEA E8198E <1> call hexword 4088 <1> %if _VARIABLES 4089 00002BED E2D9 <1> loop .dump_loop 4090 <1> %endif 4091 00002BEF C3 <1> retn 4092 <1> %endif 4093 <1> 4094 <1> 4095 <1> dumpallvars: 4096 00002BF0 AC <1> lodsb 4097 00002BF1 E8278D <1> call chkeol 4098 00002BF4 BE[E40C] <1> mov si, vregs 4099 00002BF7 31DB <1> xor bx, bx 4100 <1> .loop: 4101 00002BF9 BF[0E08] <1> mov di, line_out 4102 00002BFC B90400 <1> mov cx, 4 4103 00002BFF 31D2 <1> xor dx, dx 4104 00002C01 E81500 <1> call .dump ; display four variables 4105 00002C04 43 <1> inc bx ; (would be one off here) 4106 00002C05 85D2 <1> test dx, dx 4107 00002C07 7407 <1> jz @F 4108 00002C09 56 <1> push si 4109 00002C0A 53 <1> push bx 4110 00002C0B E8308E <1> call putsline_crlf ; display line 4111 00002C0E 5B <1> pop bx ; (retain counter) 4112 00002C0F 5E <1> pop si ; (retain pointer to next variable) 4113 <1> @@: 4114 00002C10 84DB <1> test bl, bl ; was end ? 4115 00002C12 75E5 <1> jnz .loop ; no, loop --> 4116 00002C14 C3 <1> retn 4117 <1> 4118 <1> .dump_loop: 4119 00002C15 43 <1> inc bx 4120 00002C16 B020 <1> mov al, 32 4121 00002C18 AA <1> stosb 4122 <1> .dump: 4123 00002C19 B056 <1> mov al, 'V' 4124 00002C1B AA <1> stosb 4125 00002C1C 88D8 <1> mov al, bl 4126 00002C1E E8EC8D <1> call hexbyte 4127 <1> .dump_one: 4128 00002C21 B03D <1> mov al, '=' 4129 00002C23 AA <1> stosb 4130 00002C24 AD <1> lodsw 4131 00002C25 09C2 <1> or dx, ax 4132 00002C27 50 <1> push ax 4133 00002C28 AD <1> lodsw 4134 00002C29 09C2 <1> or dx, ax 4135 00002C2B E8D88D <1> call hexword 4136 00002C2E 58 <1> pop ax 4137 00002C2F E8D48D <1> call hexword 4138 00002C32 E2E1 <1> loop .dump_loop 4139 00002C34 C3 <1> retn 4140 <1> 4141 <1> 4142 <1> dumpmemory: 4143 00002C35 AC <1> lodsb 4144 00002C36 E8E28C <1> call chkeol 4145 <1> 4146 00002C39 A1[CE00] <1> mov ax, word [code_seg] 4147 <1> %if _PM 4148 00002C3C 8B16[D000] <1> mov dx, word [code_sel] 4149 <1> %endif 4150 00002C40 BE[C064] <1> mov si, msg.vm_codeseg 4151 00002C43 E82F00 <1> call .line 4152 <1> 4153 <1> %if _PM 4154 00002C46 A1[A60A] <1> mov ax, word [pspdbg] 4155 00002C49 8CD2 <1> mov dx, ss 4156 <1> %else 4157 <1> mov ax, ss 4158 <1> %endif 4159 00002C4B BE[CE64] <1> mov si, msg.vm_dataseg 4160 00002C4E E82400 <1> call .line 4161 <1> 4162 <1> %if _PM 4163 00002C51 A1[A60A] <1> mov ax, word [pspdbg] 4164 00002C54 8B16[D688] <1> mov dx, word [cssel] 4165 <1> %else 4166 <1> mov ax, ss 4167 <1> %endif 4168 00002C58 BE[DC64] <1> mov si, msg.vm_entryseg 4169 00002C5B E81700 <1> call .line 4170 <1> 4171 <1> %if _PM 4172 00002C5E A1[F409] <1> mov ax, word [auxbuff_segorsel + soaSegment] 4173 00002C61 8B16[F609] <1> mov dx, word [auxbuff_segorsel + soaSelector] 4174 <1> %else 4175 <1> mov ax, word [auxbuff_segorsel] 4176 <1> %endif 4177 00002C65 BE[EB64] <1> mov si, msg.vm_auxseg 4178 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 4179 00002C68 E80A00 <1> call .line 4180 <1> 4181 <1> %if _PM 4182 00002C6B A1[F80A] <1> mov ax, word [history.segorsel + soaSegment] 4183 00002C6E 8B16[FA0A] <1> mov dx, word [history.segorsel + soaSelector] 4184 <1> %else 4185 <1> mov ax, word [history.segorsel] 4186 <1> %endif 4187 00002C72 BE[FC64] <1> mov si, msg.vm_hisseg 4188 <1> %endif 4189 <1> 4190 <1> .line: 4191 00002C75 BF[0E08] <1> mov di, line_out 4192 00002C78 E88707 <1> call copy_single_counted_string 4193 00002C7B E8888D <1> call hexword 4194 <1> %if _PM 4195 00002C7E E84865 <1> call ispm 4196 00002C81 750A <1> jnz @F 4197 00002C83 BE[0D65] <1> mov si, msg.vm_selector 4198 00002C86 E87907 <1> call copy_single_counted_string 4199 00002C89 92 <1> xchg ax, dx 4200 00002C8A E8798D <1> call hexword 4201 <1> @@: 4202 <1> %endif 4203 00002C8D E9AE8D <1> jmp putsline_crlf 4204 <1> 4205 <1> 4206 <1> %if _MMXSUPP 4207 <1> subcpu 586 4208 <1> dumpregsMMX: 4209 00002C90 E84CD8 <1> call guard_auxbuff 4210 00002C93 8E1E[F209] <1> mov ds, word [auxbuff_segorsel] ; => auxbuff 4211 00002C97 66 <1> o32 4212 00002C98 DD360000 <1> fnsave [0] 4213 00002C9C BE1C00 <1> mov si, 7*4 4214 00002C9F B130 <1> mov cl, '0' 4215 00002CA1 BF[0E08] <1> mov di, line_out 4216 <1> .nextreg: 4217 00002CA4 8E1E[F209] <1> mov ds, word [auxbuff_segorsel] ; => auxbuff 4218 00002CA8 B84D4D <1> mov ax, "MM" 4219 00002CAB AB <1> stosw 4220 00002CAC 88C8 <1> mov al, cl 4221 00002CAE B43D <1> mov ah, '=' 4222 00002CB0 AB <1> stosw 4223 00002CB1 51 <1> push cx 4224 00002CB2 B208 <1> mov dl, 8 4225 <1> .nextbyte: 4226 00002CB4 AC <1> lodsb 4227 00002CB5 E8558D <1> call hexbyte 4228 00002CB8 B020 <1> mov al, 32 4229 00002CBA F6C201 <1> test dl, 1 4230 00002CBD 7402 <1> jz .oddbyte 4231 00002CBF B02D <1> mov al, '-' 4232 <1> .oddbyte: 4233 00002CC1 AA <1> stosb 4234 00002CC2 FECA <1> dec dl 4235 00002CC4 75EE <1> jnz .nextbyte 4236 00002CC6 4F <1> dec di 4237 00002CC7 B82020 <1> mov ax, 32<<8|32 4238 00002CCA AB <1> stosw 4239 00002CCB 83C602 <1> add si, byte 2 4240 00002CCE 59 <1> pop cx 4241 00002CCF F6C101 <1> test cl, 1 4242 00002CD2 740A <1> jz .oddreg 4243 00002CD4 51 <1> push cx 4244 00002CD5 16 <1> push ss 4245 00002CD6 1F <1> pop ds ; ds = es = ss 4246 00002CD7 E85C8D <1> call trimputs 4247 00002CDA 59 <1> pop cx 4248 00002CDB BF[0E08] <1> mov di, line_out 4249 <1> .oddreg: 4250 00002CDE FEC1 <1> inc cl 4251 00002CE0 80F938 <1> cmp cl, '8' 4252 00002CE3 75BF <1> jne .nextreg 4253 00002CE5 8E1E[F209] <1> mov ds, word [auxbuff_segorsel] ; => auxbuff 4254 00002CE9 66 <1> o32 4255 00002CEA D9260000 <1> fldenv [0] 4256 00002CEE C3 <1> retn 4257 <1> subcpureset 4258 <1> %endif 2060 %if _RN 2061 %include "fptostr.asm" 2062 <1> 2063 <1> %if 0 2064 <1> 2065 <1> Copyright (C) 2008-2012 C. Masloch 2066 <1> 2067 <1> Usage of the works is permitted provided that this 2068 <1> instrument is retained with the works, so that any entity 2069 <1> that uses the works is notified of this instrument. 2070 <1> 2071 <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 2072 <1> 2073 <1> %endif 2074 <1> 2075 <1> 2076 <1> usesection lDEBUG_DATA_ENTRY 2077 <1> 2078 <1> ;--- defines procedures 2079 <1> ;--- PowerOf10 2080 <1> ;--- FloatToBCD 2081 <1> ;--- FloatToStr 2082 <1> 2083 <1> ; These are bits in the FP status word. 2084 <1> 2085 <1> FP_LESSTHAN equ 01h 2086 <1> FP_EQUALTO equ 40h 2087 <1> 2088 0000835C 00 <1> align 8, db 0 2089 00008360 0000000000002440 <1> ten: dq 10.0 2090 00008368 0080E03779C34143 <1> ten16: dq 1.0e16 2091 <1> ;rounder:dq 5.0e10 2092 <1> 2093 00008370 00000000000000A002- <1> ten_1: dt 1.0e1 ; 10.0 2093 00008379 40 <1> 2094 0000837A 00000000000000C805- <1> dt 1.0e2 ; 100.0 2094 00008383 40 <1> 2095 00008384 00000000000000FA08- <1> dt 1.0e3 ; 1,000.0 2095 0000838D 40 <1> 2096 0000838E 000000000000409C0C- <1> dt 1.0e4 ; 10,000.0 2096 00008397 40 <1> 2097 00008398 00000000000050C30F- <1> dt 1.0e5 ; 100,000.0 2097 000083A1 40 <1> 2098 000083A2 00000000000024F412- <1> dt 1.0e6 ; 1,000,000.0 2098 000083AB 40 <1> 2099 000083AC 000000000080969816- <1> dt 1.0e7 ; 10,000,000.0 2099 000083B5 40 <1> 2100 000083B6 000000000020BCBE19- <1> dt 1.0e8 ; 100,000,000.0 2100 000083BF 40 <1> 2101 000083C0 0000000000286BEE1C- <1> dt 1.0e9 ; 1,000,000,000.0 2101 000083C9 40 <1> 2102 000083CA 0000000000F9029520- <1> dt 1.0e10 ; 10,000,000,000.0 2102 000083D3 40 <1> 2103 000083D4 0000000040B743BA23- <1> dt 1.0e11 ; 100,000,000,000.0 2103 000083DD 40 <1> 2104 000083DE 0000000010A5D4E826- <1> dt 1.0e12 ; 1,000,000,000,000.0 2104 000083E7 40 <1> 2105 000083E8 000000002AE784912A- <1> dt 1.0e13 ; 10,000,000,000,000.0 2105 000083F1 40 <1> 2106 000083F2 00000080F420E6B52D- <1> dt 1.0e14 ; 100,000,000,000,000.0 2106 000083FB 40 <1> 2107 000083FC 000000A031A95FE330- <1> dt 1.0e15 ; 1,000,000,000,000,000.0 2107 00008405 40 <1> 2108 <1> 2109 00008406 00000004BFC91B8E34- <1> ten_16: dt 1.0e16 2109 0000840F 40 <1> 2110 00008410 9EB5702BA8ADC59D69- <1> dt 1.0e32 2110 00008419 40 <1> 2111 0000841A D795430E058D29AF9E- <1> dt 1.0e48 2111 00008423 40 <1> 2112 00008424 D5A6CFFF491F78C2D3- <1> dt 1.0e64 2112 0000842D 40 <1> 2113 0000842E FCF7DA878F7AE7D708- <1> dt 1.0e80 2113 00008437 41 <1> 2114 00008438 A3149BC516ABB3EF3D- <1> dt 1.0e96 2114 00008441 41 <1> 2115 00008442 9E322399C0AD0F8573- <1> dt 1.0e112 2115 0000844B 41 <1> 2116 0000844C E08CE980C947BA93A8- <1> dt 1.0e128 2116 00008455 41 <1> 2117 00008456 E7A6D3A8C5B902A4DD- <1> dt 1.0e144 2117 0000845F 41 <1> 2118 00008460 AA17E67F2BA116B612- <1> dt 1.0e160 2118 00008469 42 <1> 2119 0000846A 93BF9B8591A228CA47- <1> dt 1.0e176 2119 00008473 42 <1> 2120 00008474 6B5527398DF770E07C- <1> dt 1.0e192 2120 0000847D 42 <1> 2121 0000847E 46618237350C2EF9B1- <1> dt 1.0e208 2121 00008487 42 <1> 2122 00008488 30C93CE3FF96528AE7- <1> dt 1.0e224 2122 00008491 42 <1> 2123 00008492 6617BFD6F3A691991C- <1> dt 1.0e240 2123 0000849B 43 <1> 2124 <1> 2125 0000849C 8EDEF99DFBEB7EAA51- <1> ten_256:dt 1.0e256 2125 000084A5 43 <1> 2126 <1> 2127 <1> ; The remaining exponents are only necessary for 10-byte doubles. 2128 <1> 2129 000084A6 C7910EA6AEA019E3A3- <1> dt 1.0e512 2129 000084AF 46 <1> 2130 000084B0 8CA600CDA89C3F97F6- <1> dt 1.0e768 2130 000084B9 49 <1> 2131 000084BA 170C7581867576C948- <1> dt 1.0e1024 2131 000084C3 4D <1> 2132 000084C4 CB6E85EB0E8C2C869B- <1> dt 1.0e1280 2132 000084CD 50 <1> 2133 000084CE E4A793393B35B8B2ED- <1> dt 1.0e1536 2133 000084D7 53 <1> 2134 000084D8 8CB84A9284DD0DEE3F- <1> dt 1.0e1792 2134 000084E1 57 <1> 2135 000084E2 E55D3DC55D3B8B9E92- <1> dt 1.0e2048 2135 000084EB 5A <1> 2136 000084EC 6F80F44132202ED3E4- <1> dt 1.0e2304 2136 000084F5 5D <1> 2137 000084F6 A6F0A120C054A58C37- <1> dt 1.0e2560 2137 000084FF 61 <1> 2138 00008500 CC77D99B9A0A57BB89- <1> dt 1.0e2816 2138 00008509 64 <1> 2139 0000850A 8B5A8BD8255D89F9DB- <1> dt 1.0e3072 2139 00008513 67 <1> 2140 00008514 45FE99567DEF30A62E- <1> dt 1.0e3328 2140 0000851D 6B <1> 2141 0000851E F8F327BFA2C85DDD80- <1> dt 1.0e3584 2141 00008527 6E <1> 2142 00008528 9B97208A025260C425- <1> dt 1.0e4096 2142 00008531 75 <1> 2143 00008532 B41CE17BE352C98278- <1> dt 1.0e4352 2143 0000853B 78 <1> 2144 0000853C F059D56E621135AECA- <1> dt 1.0e4608 2144 00008545 7B <1> 2145 00008546 6D6D14B97F380BE81C- <1> dt 1.0e4864 2145 0000854F 7F <1> 2146 <1> 2147 <1> 2148 <1> usesection lDEBUG_CODE 2149 <1> 2150 <1> ; Divide or multiply st0 to normalize it 2151 <1> ; 2152 <1> ; INP: ax = exponent word 2153 <1> ; CHG: bx, dx, cl 2154 <1> PowerOf10: 2155 00002CEF 56 <1> push si 2156 00002CF0 50 <1> push ax 2157 00002CF1 85C0 <1> test ax, ax 2158 00002CF3 7902 <1> jns .notnegative 2159 00002CF5 F7D8 <1> neg ax 2160 <1> .notnegative: 2161 00002CF7 D9E8 <1> fld1 2162 00002CF9 88C3 <1> mov bl, al 2163 00002CFB 80E30F <1> and bl, 0Fh ; bits 0..3 2164 00002CFE 7406 <1> je .0..3zero 2165 00002D00 BE[7083] <1> mov si, ten_1 2166 00002D03 E82B00 <1> call mul10 2167 <1> .0..3zero: 2168 00002D06 88C3 <1> mov bl, al 2169 00002D08 B104 <1> mov cl, 4 2170 00002D0A D2EB <1> shr bl, cl 2171 00002D0C 80E30F <1> and bl, 0Fh ; bits 4..7 2172 00002D0F 7406 <1> je .4..7zero 2173 00002D11 BE[0684] <1> mov si, ten_16 2174 00002D14 E81A00 <1> call mul10 2175 <1> .4..7zero: 2176 00002D17 88E3 <1> mov bl, ah 2177 00002D19 80E31F <1> and bl, 1Fh ; bits 8..12 2178 00002D1C 7406 <1> jz .8..12zero 2179 00002D1E BE[9C84] <1> mov si, ten_256 2180 00002D21 E80D00 <1> call mul10 2181 <1> .8..12zero: 2182 00002D24 58 <1> pop ax 2183 00002D25 85C0 <1> test ax, ax 2184 00002D27 7904 <1> jns .notnegative2 2185 00002D29 DEF9 <1> fdivp st1 2186 00002D2B 5E <1> pop si 2187 00002D2C C3 <1> retn 2188 <1> 2189 <1> .notnegative2: 2190 00002D2D DEC9 <1> fmulp st1 2191 00002D2F 5E <1> pop si 2192 00002D30 C3 <1> retn 2193 <1> 2194 <1> mul10: 2195 00002D31 FECB <1> dec bl 2196 00002D33 B700 <1> mov bh, 0 2197 00002D35 50 <1> push ax 2198 00002D36 89D8 <1> mov ax, bx 2199 00002D38 01C0 <1> add ax, ax 2200 00002D3A 01C0 <1> add ax, ax ; *4 2201 00002D3C 01C3 <1> add bx, ax ; *5 2202 00002D3E 01DB <1> add bx, bx ; *10 2203 00002D40 58 <1> pop ax 2204 00002D41 DB28 <1> fld tword [bx + si] 2205 00002D43 DEC9 <1> fmulp st1 2206 00002D45 C3 <1> retn 2207 <1> 2208 <1> 2209 <1> ; Convert a floating point register to ASCII. For internal use. 2210 <1> ; The result always has exactly 18 digits, with zero padding 2211 <1> ; on the left if required. 2212 <1> ; 2213 <1> ; INP: st0 = number to convert, 0 <= st0 < 1.0E19 2214 <1> ; di-> 18-character output buffer 2215 <1> ; CHG: si, di, cx, ax 2216 <1> FloatToBCD: 2217 00002D46 55 <1> push bp 2218 00002D47 89E5 <1> mov bp, sp 2219 00002D49 83EC0C <1> sub sp, 12 2220 <1> 2221 <1> ; The fbstp instruction converts the top of the stack to 2222 <1> ; a packed BCD form in ten bytes, with two digits per 2223 <1> ; byte. The top byte has the sign, which we ignore. 2224 00002D4C DF76F4 <1> fbstp [ bp-12 ] 2225 <1> 2226 <1> ; Now we need to unpack the BCD to ASCII. 2227 00002D4F 8D76FC <1> lea si, [ bp-4 ] 2228 00002D52 B90900 <1> mov cx, 9 2229 <1> .nextdigits: 2230 00002D55 8A04 <1> mov al, byte [ si ] ; xxxx xxxx AAAA BBBB 2231 00002D57 4E <1> dec si 2232 <1> %if 1 2233 00002D58 B400 <1> mov ah, 0 ; 0000 0000 AAAA BBBB 2234 00002D5A 51 <1> push cx 2235 00002D5B B104 <1> mov cl, 4 2236 00002D5D D3C8 <1> ror ax, cl ; BBBB xxxx xxxx AAAA 2237 00002D5F D2C4 <1> rol ah, cl ; xxxx BBBB xxxx AAAA 2238 00002D61 59 <1> pop cx 2239 <1> ;and ax, 0F0Fh ; 0000 BBBB 0000 AAAA 2240 <1> %else 2241 <1> aam 16 ; 0000 AAAA 0000 BBBB 2242 <1> xchg al, ah ; 0000 BBBB 0000 AAAA 2243 <1> %endif 2244 00002D62 053030 <1> add ax, "00" 2245 00002D65 AB <1> stosw 2246 00002D66 E2ED <1> loop .nextdigits 2247 00002D68 89EC <1> mov sp, bp 2248 00002D6A 5D <1> pop bp 2249 00002D6B C3 <1> retn 2250 <1> 2251 <1> 2252 <1> ; Convert a double precision number to a string. 2253 <1> ; 2254 <1> ; Entry: dword [far pfpin] -> 8-byte double to convert, non-zero 2255 <1> ; es = ss : word [pszDbl] -> character buffer 2256 <1> ; 2257 <1> ; Exit: es = ss : word [pszDbl] -> converted value 2258 <1> ; 2259 <1> ; CHG: ax, bx, cx, dx 2260 <1> ; 2261 <1> ; The buffer at pszDbl should be at least 19 bytes long. 2262 <1> ; The buffer needs to be initialized with blanks. 2263 <1> 2264 <1> ;FloatToStr PROC stdcall public USES si di pfpin: ptr TBYTE, pszDbl: PTR BYTE 2265 <1> FloatToStr: 2266 <1> lframe near 2267 <1> lpar word, ??pszDbl ; pszDbl: PTR BYTE, near 2268 <1> lpar dword, ??pfpin ; pfpin: ptr TBYTE, but far 2269 <1> lvar word, ??iExp ; LOCAL iExp: WORD 2270 <1> lvar word, ??mystat ; LOCAL mystat: WORD 2271 <1> lvar 10, ??fpin ; LOCAL fpin: TBYTE 2272 <1> lvar 22, ??szTemp ; LOCAL szTemp[22]: BYTE 2273 00002D6C 5589E58D66DC <1> lenter 2274 <1> 2275 <1> %define iExp bp+???%+%? 2276 <1> %define mystat bp+???%+%? 2277 <1> %define fpin bp+???%+%? 2278 <1> %define szTemp bp+???%+%? 2279 <1> %define pfpin bp+???%+%? 2280 <1> %define pszDbl bp+???%+%? 2281 <1> 2282 00002D72 1E <1> push ds 2283 00002D73 56 <1> push si ; USES si 2284 00002D74 06 <1> push es 2285 00002D75 57 <1> push di ; USES di 2286 <1> 2287 <1> ; Special case zero has been filtered already. (fxtract fails for zero.) 2288 00002D76 C57604 <1> lds si, [pfpin] 2289 00002D79 16 <1> push ss 2290 00002D7A 07 <1> pop es 2291 00002D7B 8D7EF2 <1> lea di, [fpin] 2292 00002D7E B90500 <1> mov cx, 5 2293 00002D81 F3A5 <1> rep movsw ; store number in local buffer 2294 00002D83 16 <1> push ss 2295 00002D84 1F <1> pop ds 2296 <1> 2297 00002D85 8B7E08 <1> mov di, [pszDbl] ; -> output buffer 2298 <1> 2299 <1> ; Check for a negative number. 2300 00002D88 F646FB80 <1> test byte [fpin+9], 80h 2301 00002D8C 7407 <1> jz .ispositive 2302 00002D8E 8066FB7F <1> and byte [fpin+9], ~80h ; change to positive 2303 00002D92 B02D <1> mov al, '-' ; store a minus sign 2304 00002D94 AA <1> stosb 2305 <1> .ispositive: 2306 <1> 2307 <1> ; Load our value onto the stack two times. 2308 00002D95 DB6EF2 <1> fld tword [fpin] 2309 00002D98 D9C0 <1> fld st0 2310 <1> 2311 <1> ; Compute the closest power of 10 below the number. We can't get an 2312 <1> ; exact value because of rounding. We could get close by adding in 2313 <1> ; log10(mantissa), but it still wouldn't be exact. Since we'll have to 2314 <1> ; check the result anyway, it's silly to waste cycles worrying about 2315 <1> ; the mantissa. 2316 <1> ; 2317 <1> ; The exponent is basically log2(fpin). Those of you who remember 2318 <1> ; algebra realize that log2(fpin) x log10(2) = log10(fpin), which is 2319 <1> ; what we want. 2320 <1> 2321 00002D9A D9F4 <1> fxtract ; ST = mantissa, exponent, fpin 2322 00002D9C DDD8 <1> fstp st0 ; discard the mantissa 2323 00002D9E D9EC <1> fldlg2 ; push log10(2) 2324 00002DA0 DEC9 <1> fmulp st1, st0 ; ST = log10(fpin), fpin 2325 00002DA2 DF5EFE <1> fistp word [iExp] ; ST = fpin 2326 <1> 2327 <1> ; An 8-byte double can carry almost 16 digits of precision. Actually, it's 2328 <1> ; 15.9 digits, so some numbers close to 1E17 will be wrong in the bottom 2329 <1> ; digit. If this is a concern, change the 18 or 16 to a 15. 2330 <1> ; 2331 <1> ; A 10-byte double can carry almost 19 digits, but fbstp only stores the 2332 <1> ; guaranteed 18. Since we're doing 10-byte doubles, we check for 18 instead of 16. 2333 <1> 2334 00002DA5 837EFE12 <1> cmp word [iExp], 18 2335 00002DA9 7332 <1> jae .notbelow18 2336 00002DAB D9C0 <1> fld st0 ; ST = fpin, fpin 2337 00002DAD D9FC <1> frndint ; ST = int(fpin), fpin 2338 00002DAF D8D9 <1> fcomp st1 ; ST = fpin, status set 2339 00002DB1 9BDD7EFC <1> fstsw word [mystat] 2340 00002DB5 8B46FC <1> mov ax, word [mystat] 2341 00002DB8 9E <1> sahf 2342 00002DB9 7522 <1> jne .notequal 2343 <1> 2344 <1> ; We have an integer! Lucky day. Go convert it into a temp buffer. 2345 <1> 2346 00002DBB 57 <1> push di 2347 00002DBC 8D7EDC <1> lea di, [szTemp] 2348 00002DBF E884FF <1> call FloatToBCD 2349 00002DC2 5F <1> pop di 2350 <1> 2351 00002DC3 B81100 <1> mov ax, 16+1 2352 00002DC6 8B4EFE <1> mov cx, word [iExp] 2353 00002DC9 29C8 <1> sub ax, cx 2354 00002DCB 41 <1> inc cx 2355 00002DCC 8D76DC <1> lea si, [szTemp] 2356 00002DCF 01C6 <1> add si, ax 2357 <1> 2358 <1> ; The off-by-one order of magnitude problem below can hit us here. 2359 <1> ; We just trim off the possible leading zero. 2360 <1> 2361 00002DD1 803C30 <1> cmp byte [si], '0' 2362 00002DD4 7502 <1> jnz .not0digit 2363 00002DD6 46 <1> inc si 2364 00002DD7 49 <1> dec cx 2365 <1> .not0digit: 2366 <1> 2367 <1> ; Copy the rest of the converted BCD value to our buffer. 2368 <1> 2369 00002DD8 F3A4 <1> rep movsb 2370 00002DDA E99800 <1> jmp .ftsExit 2371 <1> 2372 <1> .notequal: 2373 <1> .notbelow18: 2374 <1> 2375 <1> ; Have fbstp round to 17 places. 2376 <1> 2377 00002DDD B81000 <1> mov ax, 16 ; experiment 2378 00002DE0 2B46FE <1> sub ax, word [iExp] ; adjust exponent to 17 2379 00002DE3 E809FF <1> call PowerOf10 2380 <1> 2381 <1> ; Either we have exactly 17 digits, or we have exactly 16 digits. We can 2382 <1> ; detect that condition and adjust now. 2383 <1> 2384 00002DE6 DC16[6883] <1> fcom qword [ten16] 2385 <1> ; x0xxxx00 means top of stack > ten16 2386 <1> ; x0xxxx01 means top of stack < ten16 2387 <1> ; x1xxxx00 means top of stack = ten16 2388 00002DEA 9BDD7EFC <1> fstsw word [mystat] 2389 00002DEE 8B46FC <1> mov ax, word [mystat] 2390 00002DF1 F6C401 <1> test ah, 1 2391 00002DF4 7407 <1> jz .notset1 2392 00002DF6 DC0E[6083] <1> fmul qword [ten] 2393 00002DFA FF4EFE <1> dec word [iExp] 2394 <1> .notset1: 2395 <1> 2396 <1> ; Go convert to BCD. 2397 <1> 2398 00002DFD 57 <1> push di 2399 00002DFE 8D7EDC <1> lea di, [szTemp] 2400 00002E01 E842FF <1> call FloatToBCD 2401 00002E04 5F <1> pop di 2402 <1> 2403 00002E05 8D76DD <1> lea si, [szTemp+1] ; point to converted buffer 2404 <1> 2405 <1> ; If the exponent is between -15 and 16, we should express this as a number 2406 <1> ; without scientific notation. 2407 <1> 2408 00002E08 8B4EFE <1> mov cx, word [iExp] 2409 00002E0B 51 <1> push cx 2410 00002E0C 83C10F <1> add cx, 15 2411 00002E0F 83F91F <1> cmp cx, 15+16 2412 00002E12 59 <1> pop cx 2413 00002E13 7734 <1> ja .fts6 2414 <1> 2415 <1> ; If the exponent is less than zero, we insert '0.', then -cx 2416 <1> ; leading zeros, then 16 digits of mantissa. If the exponent is 2417 <1> ; positive, we copy cx+1 digits, then a decimal point (maybe), then 2418 <1> ; the remaining 16-cx digits. 2419 <1> 2420 00002E15 41 <1> inc cx 2421 00002E16 83F900 <1> cmp cx, byte 0 2422 00002E19 7F0F <1> jg .ispos1 2423 00002E1B B8302E <1> mov ax, "0." 2424 00002E1E AB <1> stosw 2425 00002E1F F7D9 <1> neg cx 2426 00002E21 B030 <1> mov al, '0' 2427 00002E23 F3AA <1> rep stosb 2428 00002E25 B91000 <1> mov cx, 16 2429 00002E28 EB0B <1> jmp short .fts3 2430 <1> .ispos1: 2431 00002E2A F3A4 <1> rep movsb 2432 00002E2C B02E <1> mov al, '.' 2433 00002E2E AA <1> stosb 2434 00002E2F B91000 <1> mov cx, 16 2435 00002E32 2B4EFE <1> sub cx, word [iExp] 2436 <1> .fts3: 2437 00002E35 F3A4 <1> rep movsb 2438 <1> 2439 <1> ; Trim off trailing zeros. 2440 <1> 2441 <1> .nextitem2: 2442 00002E37 807DFF30 <1> cmp byte [di-1], '0' 2443 00002E3B 7503 <1> jne .fts1 2444 00002E3D 4F <1> dec di 2445 00002E3E EBF7 <1> jmp short .nextitem2 2446 <1> .fts1: 2447 <1> 2448 <1> ; If we cleared out all the decimal digits, kill the decimal point, too. 2449 <1> 2450 00002E40 807DFF2E <1> cmp byte [di-1], '.' 2451 00002E44 7501 <1> jnz .fts2 2452 00002E46 4F <1> dec di 2453 <1> .fts2: 2454 <1> 2455 <1> ; That's it. 2456 <1> 2457 00002E47 EB2C <1> jmp short .ftsExit 2458 <1> .fts6: 2459 <1> 2460 <1> ; Now convert this to a standard, usable format. If needed, a minus 2461 <1> ; sign is already present in the outgoing buffer, and di already points 2462 <1> ; past it. 2463 <1> 2464 00002E49 A4 <1> movsb ; copy the first digit 2465 00002E4A B02E <1> mov al, '.' 2466 00002E4C AA <1> stosb ; plop in a decimal point 2467 00002E4D A5 <1> movsw 2468 00002E4E A5 <1> movsw 2469 00002E4F A5 <1> movsw ; copy six more digits 2470 <1> 2471 <1> %if 0 2472 <1> 2473 <1> ; The printf %g specified trims off trailing zeros here. I dislike 2474 <1> ; this, so I've disabled it. Comment out the %if 0 and %endif if you 2475 <1> ; want this. 2476 <1> 2477 <1> .fts61: 2478 <1> cmp byte [di-1], '0' 2479 <1> je .fts62 2480 <1> dec di 2481 <1> jmp short .fts61 2482 <1> .fts62: 2483 <1> %endif 2484 <1> 2485 <1> ; Shove in the exponent. If you support 10-byte reals, remember to 2486 <1> ; allow 4 digits for the exponent. 2487 <1> 2488 00002E50 B8652B <1> mov ax, "e+" 2489 00002E53 8B56FE <1> mov dx, word [iExp] 2490 00002E56 85D2 <1> test dx, dx 2491 00002E58 7904 <1> jns .fts7 2492 00002E5A F7DA <1> neg dx 2493 00002E5C B42D <1> mov ah, '-' 2494 <1> .fts7: 2495 00002E5E AB <1> stosw 2496 <1> 2497 00002E5F 92 <1> xchg ax, dx 2498 00002E60 BE0A00 <1> mov si, 10 2499 00002E63 B90400 <1> mov cx, 4 2500 <1> .fts8: 2501 00002E66 31D2 <1> xor dx, dx 2502 00002E68 F7F6 <1> div si 2503 00002E6A 52 <1> push dx 2504 00002E6B E2F9 <1> loop .fts8 2505 00002E6D B104 <1> mov cl, 4 2506 <1> .fts9: 2507 00002E6F 58 <1> pop ax 2508 00002E70 0430 <1> add al, '0' 2509 00002E72 AA <1> stosb 2510 00002E73 E2FA <1> loop .fts9 2511 <1> 2512 <1> %if 0 2513 <1> add di, byte 4 ; -> terminator 2514 <1> %endif 2515 <1> 2516 <1> ; Clean up and go home. 2517 <1> 2518 <1> .ftsExit: 2519 <1> ; fldcw [stat] ; restore control word 2520 <1> ; fwait 2521 <1> %if 0 2522 <1> mov ax, di 2523 <1> sub ax, word [pszDbl] 2524 <1> mov cx, 21 2525 <1> sub cx, ax 2526 <1> mov al, 32 2527 <1> rep stosb 2528 <1> %endif 2529 00002E75 5F <1> pop di 2530 00002E76 07 <1> pop es 2531 00002E77 5E <1> pop si 2532 00002E78 1F <1> pop ds 2533 <1> 2534 00002E79 89EC5D <1> lleave 2535 00002E7C C20600 <1> lret 2536 <1> 2537 <1> %undef pfpin 2538 <1> %undef pszDbl 2539 <1> %undef iExp 2540 <1> %undef mystat 2541 <1> %undef fpin 2542 <1> %undef szTemp 2062 %endif 2063 %include "run.asm" 2064 <1> 2065 <1> %if 0 2066 <1> 2067 <1> lDebug code and commands (P, T, G) to run debuggee code 2068 <1> 2069 <1> Copyright (C) 1995-2003 Paul Vojta 2070 <1> Copyright (C) 2008-2012 C. Masloch 2071 <1> 2072 <1> Usage of the works is permitted provided that this 2073 <1> instrument is retained with the works, so that any entity 2074 <1> that uses the works is notified of this instrument. 2075 <1> 2076 <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 2077 <1> 2078 <1> %endif 2079 <1> 2080 <1> 2081 <1> usesection lDEBUG_CODE 2082 <1> 2083 <1> gg_repeat: 2084 00002E7F E879D6 <1> call guard_re 2085 00002E82 800E[A000]20 <1> setopt [internalflags2], dif2_gg_again 2086 00002E87 EB17 <1> jmp @F 2087 <1> 2088 <1> ; G command - go. 2089 <1> gg: 2090 00002E89 4E <1> dec si 2091 00002E8A 4E <1> dec si 2092 00002E8B BA[7D65] <1> mov dx, msg.goto 2093 00002E8E E8168A <1> call isstring? 2094 00002E91 7503E9EA9E <1> je cmd_goto 2095 00002E96 46 <1> inc si 2096 00002E97 AC <1> lodsb 2097 <1> 2098 00002E98 E860D6 <1> call guard_re 2099 <1> 2100 00002E9B 8026[A000]DF <1> clropt [internalflags2], dif2_gg_again 2101 <1> @@: 2102 00002EA0 C706[C000][6370] <1> mov word [gg_deferred_message], msg.empty_message 2103 00002EA6 8326[C200]00 <1> and word [bb_deferred_message_in_lineout_behind], 0 2104 <1> 2105 00002EAB BB[E003] <1> mov bx, dmycmd 2106 00002EAE F606[7E00]02 <1> testopt [options], gg_no_autorepeat 2107 00002EB3 7503 <1> jnz @F 2108 00002EB5 BB[7F2E] <1> mov bx, gg_repeat 2109 <1> @@: 2110 00002EB8 891E[DA0B] <1> mov word [lastcmd], bx 2111 <1> 2112 00002EBC 800E[A000]08 <1> setopt [internalflags2], dif2_gg_is_gg 2113 00002EC1 8026[A000]E8 <1> clropt [internalflags2], dif2_gg_is_first | dif2_gg_first_detected | dif2_gg_skip_cseip | dif2_gg_skip_non_cseip 2116 <1> 2117 00002EC6 FF36[900C] <1> push word [reg_cs] ; save original CS 2118 00002ECA 8F06[D60B] <1> pop word [eqladdr+4] 2119 00002ECE E82118 <1> call parseql ; process =addr 2120 <1> 2121 00002ED1 F606[7E00]01 <1> testopt [options], gg_do_not_skip_bp 2122 00002ED6 752C <1> jnz .do_not_skip_cseip 2123 00002ED8 800E[A000]01 <1> setopt [internalflags2], dif2_gg_is_first 2124 <1> 2125 00002EDD 803E[D00B]00 <1> cmp byte [eqflag], 0 2126 00002EE2 7508 <1> jne .cseip_take_eql 2127 <1> 2128 00002EE4 66 <1> _386_PM_o32 ; xor ecx, ecx 2129 00002EE5 31C9 <1> xor cx, cx 2130 00002EE7 E86808 <1> call get_cseip_ecx_linear 2131 00002EEA EB0C <1> jmp .got_cseip 2132 <1> 2133 <1> .cseip_take_eql: 2134 00002EEC 8B1E[D60B] <1> mov bx, word [eqladdr + 4] 2135 00002EF0 66 <1> _386_PM_o32 ; mov edx, dword [eqladdr] 2136 00002EF1 8B16[D20B] <1> mov dx, word [eqladdr] 2137 00002EF5 E86608 <1> call getlinear 2138 <1> .got_cseip: 2139 00002EF8 7303E9E175 <1> jc error 2140 00002EFD A3[B400] <1> mov word [gg_first_cseip_linear], ax 2141 00002F00 8916[B600] <1> mov word [gg_first_cseip_linear + 2], dx 2142 <1> .do_not_skip_cseip: 2143 <1> 2144 <1> %ifn _NUM_G_BP 2145 <1> call chkeol 2146 <1> 2147 <1> testopt [options3], opt3_gg_no_paging 2148 <1> jz @F 2149 <1> clropt [internalflags], pagedcommand 2150 <1> @@: 2151 <1> call tpg_initialise_empty_auxbuff 2152 <1> 2153 <1> %if _BREAKPOINTS 2154 <1> call bb_writepoints_init_reset 2155 <1> %endif 2156 <1> 2157 <1> %else 2158 00002F04 4E <1> dec si 2159 00002F05 E8248A <1> call skipcomma 2160 00002F08 4E <1> dec si 2161 00002F09 BA[6970] <1> mov dx, msg.again 2162 00002F0C E89889 <1> call isstring? 2163 00002F0F 7531 <1> jne @F ; (after this, do not dec si!) 2164 <1> 2165 <1> gg_again: 2166 <1> 2167 <1> %if _AUXBUFFSIZE < (BPSIZE * _NUM_G_BP + 1) 2168 <1> %error auxbuff not large enough for gg breakpoint list 2169 <1> %endif 2170 <1> 2171 00002F11 56 <1> push si 2172 00002F12 BE[7B07] <1> mov si, g_bplist.used_count 2173 00002F15 31C0 <1> xor ax, ax 2174 00002F17 AC <1> lodsb ; ax = number of breakpoints set yet 2175 00002F18 4E <1> dec si ; -> gg breakpoint list 2176 00002F19 89C1 <1> mov cx, ax 2177 00002F1B 01C9 <1> add cx, cx 2178 00002F1D 01C9 <1> add cx, cx ; * 4 2179 <1> %if BPSIZE == 4 2180 <1> %elif BPSIZE == 5 2181 <1> add cx, ax ; * 5 2182 <1> %elif BPSIZE == 6 2183 <1> add cx, ax ; * 5 2184 <1> add cx, ax ; * 6 2185 <1> %elif BPSIZE == 9 2186 00002F1F 01C9 <1> add cx, cx ; * 8 2187 00002F21 01C1 <1> add cx, ax ; * 9 2188 <1> %else 2189 <1> %error Unexpected breakpoint size 2190 <1> %endif 2191 00002F23 41 <1> inc cx ; include the count 2192 00002F24 E8B8D5 <1> call guard_auxbuff 2193 00002F27 8E06[F209] <1> mov es, word [auxbuff_segorsel] 2194 00002F2B 31FF <1> xor di, di ; es:di -> auxbuff 2195 00002F2D F3A4 <1> rep movsb ; initialise auxbuff list 2196 <1> 2197 00002F2F 5E <1> pop si ; si -> separator after "AGAIN" keyword 2198 00002F30 BF0100 <1> mov di, 1 ; -> first point 2199 00002F33 89C1 <1> mov cx, ax 2200 00002F35 B0CC <1> mov al, 0CCh 2201 00002F37 E306 <1> jcxz .end 2202 <1> .loop: 2203 00002F39 83C708 <1> add di, BPSIZE - 1 ; -> point content 2204 00002F3C AA <1> stosb ; initialise breakpoint content 2205 00002F3D E2FA <1> loop .loop 2206 <1> .end: 2207 <1> ; es:di -> after last breakpoint in array 2208 00002F3F E9B200 <1> jmp gg3 ; parse additional points (do not dec si!) 2209 <1> 2210 <1> @@: 2211 00002F42 F606[A000]20 <1> testopt [internalflags2], dif2_gg_again 2212 00002F47 75C8 <1> jnz gg_again 2213 <1> 2214 <1> 2215 <1> gg_list: 2216 00002F49 BA[6470] <1> mov dx, msg.list 2217 00002F4C E85889 <1> call isstring? 2218 00002F4F 7403E99400 <1> jne .not 2219 <1> 2220 00002F54 AC <1> lodsb 2221 00002F55 E8C389 <1> call chkeol 2222 <1> 2223 00002F58 800E[A000]05 <1> setopt [internalflags2], dif2_gg_is_first | dif2_gg_skip_cseip 2224 <1> 2225 00002F5D BE[7C07] <1> mov si, g_bplist.bp 2226 00002F60 31C9 <1> xor cx, cx 2227 00002F62 8A4CFF <1> mov cl, byte [si - 1] 2228 00002F65 31DB <1> xor bx, bx 2229 00002F67 E379 <1> jcxz .none 2230 <1> .loop: 2231 00002F69 43 <1> inc bx 2232 00002F6A 51 <1> push cx 2233 00002F6B 53 <1> push bx 2234 <1> 2235 00002F6C 89D8 <1> mov ax, bx ; 1-based index 2236 00002F6E BF[0E08] <1> mov di, line_out 2237 00002F71 E84707 <1> call ordinalbyte 2238 <1> 2239 00002F74 57 <1> push di 2240 00002F75 81EF[1108] <1> sub di, line_out + 1 + 2 2241 <1> ; 1 = a digit, 2 = ordinal suffix, 2242 <1> ; result = how many additional digits are used 2243 00002F79 BA[ED6F] <1> mov dx, msg.list_bp.first 2244 00002F7C 01FA <1> add dx, di 2245 00002F7E E83B8E <1> call putsz ; show blanks first 2246 00002F81 5F <1> pop di 2247 00002F82 E8BD8A <1> call putsline 2248 <1> 2249 00002F85 E8A504 <1> call gg_bb_lods_bp_linear 2250 <1> ; BPSIZE implied 2251 <1> 2252 00002F88 BF[0770] <1> mov di, msg.list_bp.address1 2253 00002F8B 92 <1> xchg ax, dx 2254 00002F8C E8778A <1> call hexword 2255 00002F8F 47 <1> inc di 2256 <1> ; mov di, msg.list_bp.address2 2257 00002F90 92 <1> xchg ax, dx 2258 00002F91 E8728A <1> call hexword 2259 <1> 2260 00002F94 E8EA06 <1> call gg_bb_check_is_first 2261 <1> ; we set up the dif2_gg_skip_cseip flag, 2262 00002F97 B9[4574] <1> mov cx, msg.list_bp_not_cseip 2263 <1> ; so if CY (do not skip), initialise this 2264 00002F9A 721C <1> jc .not_cseip 2265 <1> ; if NC (do skip), use other string 2266 <1> %if _PM 2267 00002F9C 53 <1> push bx 2268 00002F9D 8B1E[900C] <1> mov bx, word [reg_cs] 2269 00002FA1 803E[D00B]00 <1> cmp byte [eqflag], 0 2270 00002FA6 7404 <1> je @F 2271 00002FA8 8B1E[D60B] <1> mov bx, word [eqladdr + 4] 2272 <1> @@: 2273 00002FAC E8852D <1> call test_d_b_bit 2274 00002FAF 5B <1> pop bx 2275 00002FB0 B9[1E70] <1> mov cx, msg.list_bp_cseip_32 2276 00002FB3 7503 <1> jnz @F ; if 32-bit cs --> 2277 <1> %endif 2278 00002FB5 B9[3070] <1> mov cx, msg.list_bp_csip_16 2279 <1> @@: 2280 <1> .not_cseip: 2281 <1> %if BPSIZE == 6 || BPSIZE == 9 2282 <1> ; INP: dx:ax = linear address 2283 <1> ; si -> (d)word offset 2284 <1> ; di -> where to store 2285 <1> ; OUT: cx = length displayed 2286 <1> ; si -> after offset 2287 <1> ; di -> after stored string 2288 <1> ; CHG: ax, dx 2289 00002FB8 51 <1> push cx 2290 00002FB9 BF[0E08] <1> mov di, line_out 2291 00002FBC E8AC5B <1> call bp_display_offset ; BPSIZE implied 2292 00002FBF 57 <1> push di 2293 <1> %endif 2294 00002FC0 BF[1B70] <1> mov di, msg.list_bp.value 2295 00002FC3 AC <1> lodsb ; BPSIZE implied 2296 00002FC4 E8468A <1> call hexbyte 2297 <1> 2298 00002FC7 BA[F16F] <1> mov dx, msg.list_bp.second 2299 00002FCA E8EF8D <1> call putsz 2300 <1> 2301 <1> %if BPSIZE == 6 || BPSIZE == 9 2302 00002FCD 5F <1> pop di 2303 00002FCE E8718A <1> call putsline 2304 00002FD1 59 <1> pop cx 2305 <1> %endif 2306 <1> 2307 00002FD2 BA[1170] <1> mov dx, msg.list_bp.third 2308 00002FD5 E8E48D <1> call putsz 2309 <1> 2310 00002FD8 89CA <1> mov dx, cx 2311 00002FDA E8DF8D <1> call putsz 2312 <1> 2313 00002FDD 5B <1> pop bx 2314 00002FDE 59 <1> pop cx 2315 00002FDF E288 <1> loop .loop 2316 <1> .end: 2317 <1> ; mov dx, msg.list_bp_first_detected 2318 <1> ; testopt [internalflags2], dif2_gg_first_detected 2319 <1> ; jnz .putsz 2320 00002FE1 C3 <1> retn 2321 <1> 2322 <1> .none: 2323 00002FE2 BA[4170] <1> mov dx, msg.list_bp_none 2324 <1> .putsz: 2325 00002FE5 E9D48D <1> jmp putsz 2326 <1> 2327 <1> .not: 2328 <1> 2329 <1> ; Store the address of each breakpoint into the buffer. We also 2330 <1> ; make sure that there aren't too many breakpoints. (The user can 2331 <1> ; specify them with 2 byte per breakpoints which gives about 128 2332 <1> ; breakpoints with a full command line.) The breakpoints will only 2333 <1> ; be set later when we have verified that the line contains no 2334 <1> ; syntax errors and that there aren't too many breakpoints. 2335 <1> ; 2336 <1> ; Note: With "G AGAIN" (or the gg_repeat handler), the user 2337 <1> ; can actually specify an arbitrary amount of 2338 <1> ; breakpoints. However, we limit the amount. 2339 <1> %if _AUXBUFFSIZE < (BPSIZE * _NUM_G_BP + 1) 2340 <1> %error auxbuff not large enough for gg breakpoint list 2341 <1> %endif 2342 00002FE8 E8F4D4 <1> call guard_auxbuff 2343 00002FEB 8E06[F209] <1> mov es, word [auxbuff_segorsel] 2344 00002FEF 31FF <1> xor di, di ; es:di -> auxbuff 2345 00002FF1 31C0 <1> xor ax, ax 2346 00002FF3 AA <1> stosb ; counter of saved breakpoints 2347 <1> gg3: 2348 <1> ; dec si ; don't use skipcomm0 instead - need to restore al 2349 00002FF4 E83589 <1> call skipcomma 2350 00002FF7 E80C89 <1> call iseol? 2351 00002FFA 7453 <1> je gg4 ; if done --> 2352 <1> 2353 00002FFC 06 <1> push es 2354 00002FFD 16 <1> push ss 2355 00002FFE 07 <1> pop es ; set STT es = ds = ss 2356 00002FFF 4E <1> dec si 2357 00003000 BA[7465] <1> mov dx, msg.remember 2358 00003003 E8A188 <1> call isstring? 2359 00003006 AC <1> lodsb 2360 00003007 7517 <1> jne @F 2361 <1> 2362 00003009 E80F89 <1> call chkeol 2363 0000300C 89F9 <1> mov cx, di ; -> after last point, = size of list 2364 0000300E 1E <1> push ds 2365 0000300F 07 <1> pop es 2366 00003010 1F <1> pop ds ; swap 2367 00003011 31F6 <1> xor si, si ; ds:si -> auxbuff 2368 00003013 BF[7B07] <1> mov di, g_bplist.used_count 2369 <1> ; es:di -> gg breakpoint list 2370 00003016 F3A4 <1> rep movsb ; copy list over 2371 00003018 16 <1> push ss 2372 00003019 1F <1> pop ds ; reset segregs 2373 0000301A 8026[A700]EF <1> clropt [internalflags3], dif3_auxbuff_guarded_1 2374 0000301F C3 <1> retn 2375 <1> 2376 <1> @@: 2377 00003020 8B1E[D60B] <1> mov bx, word [eqladdr+4]; default segment 2378 00003024 E88307 <1> call getlinearaddr ; get linear address into bx:dx (CHG edx) 2379 00003027 07 <1> pop es 2380 00003028 7303E9B174 <1> jc error 2381 0000302D 26803E000010 <1> cmp byte [es:0], _NUM_G_BP 2382 00003033 7203E9A674 <1> jae error ; can't store another breakpoint, g_bplist is full --> 2383 00003038 92 <1> xchg ax, dx ; ax = low word 2384 00003039 AB <1> stosw 2385 0000303A 93 <1> xchg ax, bx ; to store high byte/word 2386 <1> %if _PM 2387 0000303B AB <1> stosw 2388 <1> %else 2389 <1> stosb ; bits 24-31 (dh) always zero in 21-bit addresses 2390 <1> %endif 2391 <1> ; BPSIZE implied 2392 <1> %if BPSIZE == 6 2393 <1> mov ax, word [bp_offset] 2394 <1> stosw ; write offset (R86M-only 16-bit) 2395 <1> %elif BPSIZE == 9 2396 0000303C A1[5085] <1> mov ax, word [bp_offset] 2397 0000303F AB <1> stosw 2398 00003040 A1[5285] <1> mov ax, word [bp_offset + 2] 2399 00003043 AB <1> stosw ; write offset (PM 32-bit) 2400 <1> %endif 2401 00003044 B0CC <1> mov al, 0CCh 2402 00003046 AA <1> stosb ; later filled with the byte read from this address 2403 00003047 26FE060000 <1> inc byte [es:0] ; increment count 2404 0000304C 4E <1> dec si 2405 0000304D EBA5 <1> jmp short gg3 2406 <1> 2407 <1> gg4: 2408 0000304F 89F9 <1> mov cx, di ; -> after last point, = size of list 2409 00003051 06 <1> push es 2410 00003052 1E <1> push ds 2411 00003053 07 <1> pop es 2412 00003054 1F <1> pop ds ; swap 2413 00003055 31F6 <1> xor si, si ; ds:si -> auxbuff 2414 00003057 BF[7B07] <1> mov di, g_bplist.used_count 2415 <1> ; es:di -> gg breakpoint list 2416 0000305A F3A4 <1> rep movsb ; copy list over 2417 0000305C 16 <1> push ss 2418 0000305D 1F <1> pop ds ; reset segregs 2419 0000305E 8026[A700]EF <1> clropt [internalflags3], dif3_auxbuff_guarded_1 2420 <1> 2421 00003063 F606[8400]08 <1> testopt [options3], opt3_gg_no_paging 2422 00003068 7405 <1> jz @F 2423 0000306A 8026[9C00]F7 <1> clropt [internalflags], pagedcommand 2424 <1> @@: 2425 <1> 2426 <1> gg5: 2427 0000306F E87316 <1> call tpg_initialise_empty_auxbuff 2428 <1> %if _BREAKPOINTS 2429 00003072 E83804 <1> call bb_writepoints_init_reset 2430 <1> ; try to write bb points 2431 <1> ; (detect and write to cseip point too) 2432 <1> ; If this fails, it handles the errors and tries to restore 2433 <1> ; all its own points, then aborts the command. 2434 <1> 2435 <1> ; This call might return modeswitched. 2436 <1> %endif 2437 00003075 BE[7B07] <1> mov si, g_bplist.used_count 2438 00003078 31C0 <1> xor ax, ax 2439 0000307A AC <1> lodsb ; si-> first point 2440 0000307B 89C1 <1> mov cx, ax ; cx = number of saved breakpoints 2441 0000307D 51 <1> push cx 2442 0000307E E8A305 <1> call gg_writepoints ; Store breakpoint bytes in the given locations. 2443 00003081 5A <1> pop dx 2444 <1> ; dx = number of points tried to write 2445 <1> ; cx = number of points not written 2446 00003082 7342 <1> jnc .points_set ; successful --> 2447 <1> 2448 <1> 2449 <1> ; Failure to write to a gg breakpoint. Now the fun starts! 2450 00003084 29CA <1> sub dx, cx ; = number of points written 2451 00003086 89D1 <1> mov cx, dx 2452 <1> ; We now first have to try restoring all the points we 2453 <1> ; already set because they might be inside the DOS or 2454 <1> ; BIOS handlers we would otherwise call. So instead of 2455 <1> ; displaying errors as we detect them, all the intel is 2456 <1> ; stored first until all points have been taken care of 2457 <1> ; (if possible). We then display error messages. 2458 <1> %if _BREAKPOINTS 2459 00003088 83EC20 <1> sub sp, _NUM_B_BP * 2 ; reserve space for bb error info 2460 <1> %endif 2461 0000308B 89E5 <1> mov bp, sp ; -> behind gg error info, -> bb error info 2462 0000308D 01D2 <1> add dx, dx 2463 0000308F 29D4 <1> sub sp, dx ; reserve space for gg error info 2464 00003091 50 <1> push ax ; store error info on point that failed to be written 2465 <1> 2466 <1> ; The gg points were written last, so restore them first. 2467 00003092 E89604 <1> call gg_restorepoints_and_init_error_info 2468 <1> %if _BREAKPOINTS 2469 00003095 51 <1> push cx 2470 <1> ; Next, restore the bb points. 2471 00003096 B91000 <1> mov cx, _NUM_B_BP ; = index above last one to restore 2472 00003099 E8DF04 <1> call bb_restorepoints_and_init_error_info 2473 0000309C 59 <1> pop cx ; (preserve index of failed gg point) 2474 <1> %endif 2475 0000309D 58 <1> pop ax 2476 <1> 2477 0000309E E8AA01 <1> call put_deferred_message_silent 2478 <1> ; CHG: dx 2479 <1> 2480 <1> ; ax = info on initially failed point 2481 <1> ; cx = 0-based index of initially failed point 2482 <1> ; = number of points tried to restore 2483 000030A1 89CE <1> mov si, cx 2484 000030A3 01F6 <1> add si, si 2485 000030A5 01F6 <1> add si, si ; *4 2486 <1> %if BPSIZE == 4 2487 <1> %elif BPSIZE == 5 2488 <1> add si, cx ; * 5 2489 <1> %elif BPSIZE == 6 2490 <1> add si, cx ; * 5 2491 <1> add si, cx ; * 6 2492 <1> %elif BPSIZE == 9 2493 000030A7 01F6 <1> add si, si ; * 8 2494 000030A9 01CE <1> add si, cx ; * 9 2495 <1> %else 2496 <1> %error Unexpected breakpoint size 2497 <1> %endif 2498 000030AB 81C6[7C07] <1> add si, g_bplist.bp 2499 <1> 2500 <1> ; si-> point 2501 <1> ; ax = info (ah = reason, al = new value if reason 3) 2502 <1> ; cx = 0-based index of initially failed point 2503 000030AF 51 <1> push cx 2504 000030B0 FF7402 <1> push word [si + 2] 2505 000030B3 FF34 <1> push word [si] ; stack: linear address 2506 000030B5 BB0080 <1> mov bx, 8000h ; bh = 80h (gg), 2507 <1> ; bl = what we tried to restore (n/a) 2508 000030B8 E8F20F <1> call display_breakpoint_failure 2509 000030BB 59 <1> pop cx 2510 000030BC E85606 <1> call gg_handlefailedrestore 2511 <1> %if _BREAKPOINTS 2512 000030BF E82106 <1> call bb_handlefailedrestore 2513 000030C2 8D6620 <1> lea sp, [bp + _NUM_B_BP * 2] 2514 <1> %else 2515 <1> mov sp, bp 2516 <1> %endif 2517 <1> ; (discard bb + gg error info) 2518 000030C5 C3 <1> retn 2519 <1> 2520 <1> 2521 <1> .points_set: 2522 <1> ; All bb and gg points were successfully written. 2523 <1> ; Next: Handle cseip case, if such a point has been detected. 2524 <1> 2525 <1> 2526 <1> ; old cseip breakpoint handling comment: 2527 <1> ; interrupt ? emuint : .isstdtrace (including DPMI hack, pushf handling) 2528 <1> 2529 <1> %endif ; _NUM_G_BP 2530 <1> 2531 <1> 2532 <1> %if _NUM_G_BP || _BREAKPOINTS 2533 000030C6 F606[A000]10 <1> testopt [internalflags2], dif2_gg_first_detected 2534 000030CB 7503E91C01 <1> jz .only_run ; easy case, no cseip point detected --> 2535 <1> 2536 <1> 2537 <1> ; Enter special mode: Restore cseip breakpoint content. 2538 000030D0 800E[A000]02 <1> setopt [internalflags2], dif2_gg_skip_non_cseip 2539 <1> 2540 000030D5 89D1 <1> mov cx, dx ; = number of points set 2541 <1> %if _BREAKPOINTS 2542 000030D7 83EC20 <1> sub sp, _NUM_B_BP * 2 2543 <1> %endif 2544 000030DA 89E5 <1> mov bp, sp ; -> behind error info 2545 <1> %if _NUM_G_BP 2546 000030DC 89CA <1> mov dx, cx 2547 000030DE 01D2 <1> add dx, dx 2548 000030E0 29D4 <1> sub sp, dx 2549 000030E2 E84604 <1> call gg_restorepoints_and_init_error_info 2550 <1> 2551 000030E5 7326 <1> jnc .gg_restore_cseip_success 2552 <1> 2553 <1> 2554 <1> ; Error in gg_restorepoints. Try to restore other gg, all bb. 2555 <1> 2556 <1> ; Exit special mode: Handle non-cseip breakpoints again. 2557 000030E7 8026[A000]FD <1> clropt [internalflags2], dif2_gg_skip_non_cseip 2558 <1> 2559 <1> ; Enter special mode: Skip cseip breakpoints. 2560 000030EC 800E[A000]04 <1> setopt [internalflags2], dif2_gg_skip_cseip 2561 <1> 2562 <1> ; As we already tried to restore all cseip gg points, 2563 <1> ; here we skip these in the gg_restorepoints call. 2564 000030F1 E83A04 <1> call gg_restorepoints 2565 <1> 2566 <1> ; Exit special mode: No longer skip cseip breakpoints. 2567 000030F4 8026[A000]FB <1> clropt [internalflags2], dif2_gg_skip_cseip 2568 <1> 2569 <1> ; Any cseip bb points aren't yet restored, so do not skip them. 2570 <1> %if _BREAKPOINTS 2571 000030F9 51 <1> push cx 2572 000030FA B91000 <1> mov cx, _NUM_B_BP 2573 000030FD E87B04 <1> call bb_restorepoints_and_init_error_info 2574 00003100 59 <1> pop cx 2575 <1> %endif 2576 <1> %else 2577 <1> jmp .gg_restore_cseip_success 2578 <1> %endif 2579 <1> 2580 <1> .gg_bb_cseip_fail_common: 2581 <1> ; The failure that led us here is already noted in the info. 2582 <1> %if _NUM_G_BP 2583 00003101 E81106 <1> call gg_handlefailedrestore 2584 <1> %endif 2585 <1> %if _BREAKPOINTS 2586 00003104 E8DC05 <1> call bb_handlefailedrestore 2587 <1> %endif 2588 <1> %if _NUM_G_BP 2589 <1> %if _BREAKPOINTS 2590 00003107 8D6620 <1> lea sp, [bp + _NUM_B_BP * 2] 2591 <1> %else 2592 <1> mov sp, bp 2593 <1> %endif 2594 <1> %elif _BREAKPOINTS 2595 <1> add sp, _NUM_B_BP * 2 2596 <1> %endif 2597 0000310A E9F3CE <1> jmp cmd3 2598 <1> 2599 <1> .gg_restore_cseip_success: 2600 <1> %if _BREAKPOINTS 2601 0000310D B91000 <1> mov cx, _NUM_B_BP ; = index above last one to restore 2602 00003110 E86804 <1> call bb_restorepoints_and_init_error_info 2603 00003113 7322 <1> jnc @F ; no error ? --> 2604 <1> 2605 <1> ; Error in bb_restorepoints. Try to restore other gg, other bb. 2606 <1> 2607 <1> ; Exit special mode: Handle non-cseip breakpoints again. 2608 00003115 8026[A000]FD <1> clropt [internalflags2], dif2_gg_skip_non_cseip 2609 <1> 2610 <1> ; Enter special mode: Skip cseip breakpoints. 2611 0000311A 800E[A000]04 <1> setopt [internalflags2], dif2_gg_skip_cseip 2612 <1> 2613 <1> ; As we already tried to restore all cseip gg and bb points, 2614 <1> ; here we skip these in the bb_restorepoints call. 2615 <1> %if _NUM_G_BP 2616 0000311F 31C9 <1> xor cx, cx 2617 00003121 8A0E[7B07] <1> mov cl, byte [g_bplist.used_count] 2618 00003125 E80604 <1> call gg_restorepoints 2619 00003128 51 <1> push cx 2620 <1> %endif 2621 00003129 B91000 <1> mov cx, _NUM_B_BP 2622 0000312C E84F04 <1> call bb_restorepoints 2623 <1> %if _NUM_G_BP 2624 0000312F 59 <1> pop cx 2625 <1> %endif 2626 <1> 2627 <1> ; Exit special mode: No longer skip cseip breakpoints. 2628 00003130 8026[A000]FB <1> clropt [internalflags2], dif2_gg_skip_cseip 2629 <1> 2630 00003135 EBCA <1> jmp .gg_bb_cseip_fail_common 2631 <1> 2632 <1> @@: 2633 <1> ; Success! Now discard the reserved error info. 2634 00003137 8D6620 <1> lea sp, [bp + _NUM_B_BP * 2] 2635 <1> %else 2636 <1> mov sp, bp 2637 <1> %endif 2638 <1> 2639 <1> ; Special mode restoration handled. Now trace one instruction. 2640 <1> ; (Proceed if repeated string op or interrupt.) 2641 <1> %if _PM 2642 0000313A E83A07 <1> call resetmode 2643 <1> %endif 2644 0000313D E8E015 <1> call seteq ; make the = operand take effect 2645 00003140 BA0F00 <1> mov dx, 15 ; DL = number of bytes to go; DH = prefix flags. 2646 00003143 8B1E[900C] <1> mov bx, word [reg_cs] 2647 00003147 66 <1> _386_PM_o32 ; mov esi, dword [reg_eip] 2648 00003148 8B36[9C0C] <1> mov si, word [reg_eip] 2649 <1> .pp2: 2650 0000314C E8C410 <1> call pp16 ; get next instruction byte into AL 2651 0000314F BF[E410] <1> mov di, ppbytes 2652 00003152 B91800 <1> mov cx, PPLEN_ONLY_STRING 2653 00003155 F2AE <1> repne scasb 2654 00003157 752D <1> jne .not_p ; if not one of these --> 2655 00003159 8A451E <1> mov al,byte [di+PPLEN-1]; get corresponding byte in ppinfo 2656 0000315C A880 <1> test al, PP_PREFIX ; prefix ? 2657 0000315E 740E <1> jz .pp3 ; no --> 2658 00003160 08C6 <1> or dh, al ; set the OSIZE or ASIZE flags if either of these 2659 <1> ; Note: Multiple OSIZE in a 16-bit cs do not toggle 2660 <1> ; between decoding as O32 and O16, they're always 2661 <1> ; decoded as O32. The same is true for A32, and 2662 <1> ; in a 32-bit cs for O16 and A16. 2663 00003162 FECA <1> dec dl 2664 00003164 75E6 <1> jnz .pp2 ; if not out of bytes --> 2665 00003166 C706[C000][D971] <1> mov word [gg_deferred_message], msg.warnprefix 2666 0000316C EB18 <1> jmp .not_p 2667 <1> 2668 <1> ; A repeatable string instruction is to be decoded. 2669 <1> ; Finish the decoding and skip the appropriate number 2670 <1> ; of opcode bytes. 2671 <1> .pp3: 2672 0000316E E8B40C <1> _386_PM call pp_fix32bitflags 2673 00003171 A847 <1> test al, PP_VARSIZ | PP_SIZ_MASK 2674 00003173 7403E96673 <1> jnz error 2675 <1> %if 0 2676 <1> test al, PP_VARSIZ ; different opcode length depends on OSIZE ? 2677 <1> jz .ignoreosize ; no --> 2678 <1> and dh, 2 2679 <1> add al, dh 2680 <1> .ignoreosize: 2681 <1> and ax, PP_SIZ_MASK 2682 <1> _386_PM movzx eax, ax ; clear high word (in case it counts) 2683 <1> _386_PM_o32 ; add esi, eax 2684 <1> add si, ax 2685 <1> %endif 2686 <1> ; pp10: 2687 <1> ; jmp short pp11 ; we have a skippable instruction here 2688 <1> ; pp11: 2689 00003178 E8B92B <1> _386_PM call test_d_b_bit 2690 0000317B 7504 <1> _386_PM jnz .32 ; full 32-bit offset valid --> 2691 0000317D 660FB7F6 <1> _386_PM movzx esi, si ; clear high word here 2692 <1> .32: 2693 00003181 E8F90F <1> call proceedbreakpoint ; run until the breakpoint is hit 2694 <1> ; This call might return modeswitched. 2695 00003184 EB03 <1> jmp short @F 2696 <1> 2697 <1> .not_p: 2698 00003186 E8F80A <1> call traceone ; call common code 2699 <1> @@: 2700 00003189 9C <1> pushf 2701 <1> 2702 <1> ; Exit special mode, do not skip non-cseip breakpoints anymore. 2703 0000318A 8026[A000]FD <1> clropt [internalflags2], dif2_gg_skip_non_cseip 2704 <1> 2705 <1> ; Enter special mode: Skip matching/restoring cseip breakpoint. 2706 0000318F 800E[A000]04 <1> setopt [internalflags2], dif2_gg_skip_cseip 2707 <1> 2708 00003194 F6C47F <1> test ah, 7Fh ; error happened during proceedbreakpoint ? 2709 00003197 7440 <1> jz @F ; no --> 2710 <1> 2711 00003199 59 <1> pop cx ; (discard flags on stack) 2712 <1> 2713 <1> %if _NUM_G_BP 2714 0000319A 31C9 <1> xor cx, cx 2715 0000319C 8A0E[7B07] <1> mov cl, byte [g_bplist.used_count] 2716 <1> %endif 2717 <1> 2718 <1> %if _BREAKPOINTS 2719 000031A0 83EC20 <1> sub sp, _NUM_B_BP * 2 ; reserve space for bb error info 2720 <1> %endif 2721 000031A3 89E5 <1> mov bp, sp ; -> behind gg error info, -> bb error info 2722 <1> %if _NUM_G_BP 2723 000031A5 89CA <1> mov dx, cx 2724 000031A7 01D2 <1> add dx, dx 2725 000031A9 29D4 <1> sub sp, dx ; reserve space for gg error info 2726 <1> %endif 2727 000031AB 50 <1> push ax 2728 <1> %if _NUM_G_BP 2729 000031AC E87C03 <1> call gg_restorepoints_and_init_error_info 2730 <1> %endif 2731 <1> %if _BREAKPOINTS 2732 000031AF 51 <1> push cx 2733 000031B0 B91000 <1> mov cx, _NUM_B_BP 2734 000031B3 E8C503 <1> call bb_restorepoints_and_init_error_info 2735 000031B6 59 <1> pop cx 2736 <1> %endif 2737 <1> ; Exit special mode: No longer skip cseip breakpoints. 2738 000031B7 8026[A000]FB <1> clropt [internalflags2], dif2_gg_skip_cseip 2739 000031BC 58 <1> pop ax 2740 000031BD 51 <1> push cx 2741 <1> 2742 <1> %if _PM 2743 000031BE E8B606 <1> call resetmode 2744 <1> %endif 2745 000031C1 E88700 <1> call put_deferred_message_silent 2746 <1> 2747 000031C4 FF36[C600] <1> push word [tpg_proceed_bp + 2] 2748 000031C8 FF36[C400] <1> push word [tpg_proceed_bp] 2749 000031CC 8A1E[CC00] <1> mov bl, [tpg_proceed_bp + BPSIZE - 1] 2750 000031D0 B700 <1> mov bh, 0 ; proceed breakpoint 2751 000031D2 E8D80E <1> call display_breakpoint_failure 2752 000031D5 59 <1> pop cx 2753 000031D6 E928FF <1> jmp .gg_bb_cseip_fail_common 2754 <1> 2755 <1> 2756 <1> @@: 2757 000031D9 9D <1> popf ; CF 2758 <1> 2759 000031DA 7218 <1> jc .after_run ; an unexpected interrupt occured --> 2760 <1> 2761 000031DC E84000 <1> call .after_run_restore ; restore stuff 2762 000031DF E85002 <1> call gg_bb_check_hit ; expected interrupt matches our gg or bb ? 2763 000031E2 7321 <1> jnc .expectedinterrupt ; yes, handle expected interrupt --> 2764 <1> 2765 <1> 2766 <1> ; Clear all special modes. Stop specialcasing cseip breakpoint. 2767 000031E4 8026[A000]E8 <1> clropt [internalflags2], dif2_gg_is_first | dif2_gg_first_detected | dif2_gg_skip_cseip | dif2_gg_skip_non_cseip 2770 000031E9 E983FE <1> jmp gg5 ; next write all points and run --> 2771 <1> %endif ; _NUM_G_BP || _BREAKPOINTS 2772 <1> 2773 <1> .only_run: 2774 <1> ; Clear all special modes. Stop specialcasing cseip breakpoint. 2775 000031EC 8026[A000]E8 <1> clropt [internalflags2], dif2_gg_is_first | dif2_gg_first_detected | dif2_gg_skip_cseip | dif2_gg_skip_non_cseip 2778 <1> 2779 000031F1 E8B510 <1> call run ; Now run the program. 2780 <1> .after_run: 2781 <1> %if _NUM_G_BP || _BREAKPOINTS 2782 000031F4 E82800 <1> call .after_run_restore 2783 <1> 2784 000031F7 E83802 <1> call gg_bb_check_hit 2785 <1> .after_gg_bb_check_hit: 2786 000031FA 7309 <1> jnc .expectedinterrupt 2787 <1> %endif ; _NUM_G_BP || _BREAKPOINTS 2788 <1> .unexpectedinterrupt: 2789 <1> %if _PM 2790 000031FC E87806 <1> call resetmode 2791 <1> %endif 2792 000031FF E84900 <1> call put_deferred_message_silent 2793 00003202 E9430A <1> jmp unexpectedinterrupt ; print messages for unexpected breakpoint and quit. 2794 <1> 2795 <1> %if _NUM_G_BP || _BREAKPOINTS 2796 <1> .expectedinterrupt: 2797 00003205 E86500 <1> call adjust_cseip_after_breakpoint 2798 <1> ; it's one of our breakpoints, adjust (e)ip 2799 <1> 2800 00003208 89C1 <1> mov cx, ax ; handle_bb_* expects flags in cx 2801 0000320A 50 <1> push ax 2802 0000320B 50 <1> push ax ; handle_bb_* expects dword counter on stack 2803 0000320C E8DD08 <1> call handle_bb_hit_pass_match 2804 0000320F 58 <1> pop ax 2805 00003210 58 <1> pop ax ; discard 2806 00003211 7203E959FE <1> jnc gg5 ; if it was a pass non-hit or non-pass non-hit 2807 <1> ; then jump back to do a subsequent G step 2808 <1> ; If jumping, the function has set up gg_first_cseip_linear 2809 <1> ; with the current CS:(E)IP so that the next step will start 2810 <1> ; out with skipping past the breakpoint(s) on that address. 2811 <1> ; Note that gg_bb_check_hit returns ax = 7 if a gg point is 2812 <1> ; hit, so we always fall through to .actual_hit here. 2813 <1> 2814 <1> .actual_hit: 2815 <1> %if _PM 2816 00003216 E85E06 <1> call resetmode 2817 <1> %endif 2818 00003219 E82F00 <1> call put_deferred_message_silent 2819 <1> ; (put bb message after gg_bb_check_hit call) 2820 0000321C E9630D <1> jmp dumpregs_extended_silent 2821 <1> ; (handles sf_(double_)ctrl_c) 2822 <1> %endif 2823 <1> 2824 <1> 2825 <1> .after_run_restore: 2826 <1> %if _NUM_G_BP || _BREAKPOINTS 2827 0000321F 83EC20 <1> sub sp, _NUM_B_BP * 2 ; reserve space for bb error info 2828 00003222 89E5 <1> mov bp, sp ; -> behind gg error info, -> bb error info 2829 <1> %if _NUM_G_BP 2830 00003224 31C9 <1> xor cx, cx 2831 00003226 8A0E[7B07] <1> mov cl, byte [g_bplist.used_count] 2832 0000322A 89CA <1> mov dx, cx 2833 0000322C 01D2 <1> add dx, dx 2834 0000322E 29D4 <1> sub sp, dx ; reserve space for gg error info 2835 00003230 E8F802 <1> call gg_restorepoints_and_init_error_info 2836 <1> ; try restoring gg points, and fill error info 2837 <1> %endif 2838 <1> %if _BREAKPOINTS 2839 00003233 51 <1> push cx 2840 00003234 B91000 <1> mov cx, _NUM_B_BP ; = index above last one to restore 2841 00003237 E84103 <1> call bb_restorepoints_and_init_error_info 2842 <1> ; try restoring bb points, and fill error info 2843 0000323A 59 <1> pop cx 2844 <1> %endif 2845 <1> 2846 <1> %if _PM 2847 0000323B E83906 <1> call resetmode 2848 <1> %endif 2849 0000323E E80A00 <1> call put_deferred_message_silent 2850 <1> 2851 <1> %if _NUM_G_BP 2852 00003241 E8D104 <1> call gg_handlefailedrestore 2853 <1> ; handle gg point restore failures 2854 <1> %endif 2855 <1> %if _BREAKPOINTS 2856 00003244 E89C04 <1> call bb_handlefailedrestore 2857 <1> ; handle bb point restore failures 2858 <1> %endif 2859 <1> %if _NUM_G_BP 2860 <1> %if _BREAKPOINTS 2861 00003247 8D6620 <1> lea sp, [bp + _NUM_B_BP * 2] 2862 <1> %else 2863 <1> mov sp, bp ; remove the stack frame 2864 <1> %endif 2865 <1> %else 2866 <1> add sp, _NUM_B_BP * 2 2867 <1> %endif 2868 <1> %endif ; _NUM_G_BP || _BREAKPOINTS 2869 0000324A C3 <1> retn 2870 <1> 2871 <1> 2872 <1> ; INP: word [gg_deferred_message] 2873 <1> ; word [bb_deferred_message_in_lineout_behind] 2874 <1> ; OUT: variables reset to msg.empty_message 2875 <1> ; messages displayed; first the gg one then the bb one 2876 <1> ; CHG: dx 2877 <1> ; STT: ds = es = ss 2878 <1> ; 2879 <1> ; Note: Uses putsz_silent and putsline_silent, meaning 2880 <1> ; if silent mode is enabled, the messages are 2881 <1> ; written to the silent buffer instead of displayed. 2882 <1> put_deferred_message_silent: 2883 0000324B BA[6370] <1> mov dx, msg.empty_message 2884 0000324E 8716[C000] <1> xchg dx, word [gg_deferred_message] 2885 00003252 E89E09 <1> call putsz_silent 2886 00003255 BA[0F3C] <1> mov dx, putsline_silent 2887 <1> 2888 <1> ; INP: dx = puts function to call, CHG ax, bx, cx, dx, di 2889 <1> ; CHG: dx 2890 <1> ; STT: ds = es = ss 2891 <1> put_bb_deferred_message_calling_dx: 2892 00003258 57 <1> push di 2893 00003259 31FF <1> xor di, di 2894 0000325B 873E[C200] <1> xchg di, word [bb_deferred_message_in_lineout_behind] 2895 0000325F 85FF <1> test di, di 2896 00003261 7408 <1> jz @F 2897 00003263 50 <1> push ax 2898 00003264 53 <1> push bx 2899 00003265 51 <1> push cx 2900 00003266 FFD2 <1> call dx 2901 00003268 59 <1> pop cx 2902 00003269 5B <1> pop bx 2903 0000326A 58 <1> pop ax 2904 <1> @@: 2905 0000326B 5F <1> pop di 2906 0000326C C3 <1> retn 2907 <1> 2908 <1> 2909 <1> ; INP: [internalflags2] & dif2_tpg_adjusted_cseip 2910 <1> ; [internalflags2] & dif2_tpg_do_not_adjust 2911 <1> ; word [reg_cs] 2912 <1> ; (d)word [reg_eip] 2913 <1> ; OUT: If both flags clear on input, 2914 <1> ; set [internalflags2] & dif2_tpg_adjusted_cseip 2915 <1> ; cs:(e)ip adjusted by decrementing (e)ip 2916 <1> ; (It is only decremented by the first call to this 2917 <1> ; function, which sets the flag in dif2.) 2918 <1> ; Else, 2919 <1> ; do nothing 2920 <1> ; CHG: bx 2921 <1> ; STT: ds = ss = debugger data selector 2922 <1> adjust_cseip_after_breakpoint: 2923 0000326D F606[A100]06 <1> testopt [internalflags2], dif2_tpg_adjusted_cseip | dif2_tpg_do_not_adjust 2925 00003272 7513 <1> jnz .retn 2926 00003274 800E[A100]02 <1> setopt [internalflags2], dif2_tpg_adjusted_cseip 2927 00003279 8B1E[900C] <1> _386_PM mov bx, word [reg_cs] 2928 0000327D E8B12A <1> _386_PM call resetmode_and_test_d_b_bit 2929 00003280 7401 <1> _386_PM jz .16 ; 16-bit cs --> 2930 00003282 66 <1> _386_PM o32 ; dec dword [reg_eip] 2931 <1> .16: 2932 00003283 FF0E[9C0C] <1> dec word [reg_eip] ; re-execute (restored) opcode one byte in front of this 2933 <1> .retn: 2934 00003287 C3 <1> retn 2935 <1> 2936 <1> 2937 <1> %ifn _BREAKPOINTS 2938 <1> bb_check_hit: 2939 <1> xor ax, ax 2940 <1> stc 2941 <1> retn 2942 <1> %else 2943 <1> ; INP: word [run_int] 2944 <1> ; word [reg_cs] 2945 <1> ; (d)word [reg_eip] 2946 <1> ; bb breakpoints 2947 <1> ; OUT: NC if a breakpoint was hit, 2948 <1> ; (e)ip must be decremented by one 2949 <1> ; word [bb_deferred_message_in_lineout_behind] set 2950 <1> ; and line_out written if bb point matched 2951 <1> ; (The bb point's index is already written to this msg.) 2952 <1> ; ax & 1 set if non-pass match (actual hit), 2953 <1> ; else ax & 2 set if pass match (consider as hit first, 2954 <1> ; but dump registers next (not to silent buffer) 2955 <1> ; and then continue execution) 2956 <1> ; else ax & 4 always set, indicates any match 2957 <1> ; (including matches that should merely continue) 2958 <1> ; all pass points' counters stepped 2959 <1> ; CY if no breakpoint was hit, 2960 <1> ; ax = 0 2961 <1> ; CHG: all 2962 <1> ; STT: es = ds = ss 2963 <1> bb_check_hit: 2964 <1> lframe near 2965 00003288 5589E5 <1> lenter 2966 0000328B 31C0 <1> xor ax, ax 2967 <1> lequ 1, flag_trigger 2968 <1> lequ 2, flag_pass 2969 <1> lequ 4, flag_match 2970 <1> lvar word, flags 2971 0000328D 50 <1> push ax 2972 <1> 2973 <1> ; Finish up. Check if it was one of _our_ breakpoints. 2974 0000328E 813E[D80B][947A] <1> cmp word [run_int], int3msg 2975 00003294 7505 <1> jne @F ; if not interrupt 03h --> 2976 <1> 2977 <1> ; Get previous cs:eip (where breakpoint was executed if any at all). 2978 00003296 E86405 <1> call get_cseip_of_possible_breakpoint 2979 <1> ; dx:ax = linear address of previous cs:eip 2980 <1> ; bx = reg_cs 2981 00003299 EB16 <1> jmp .check 2982 <1> 2983 <1> @@: 2984 <1> ; For T/TP/P: if trace interrupt fired just while 2985 <1> ; pointing at a bb point, do match. 2986 0000329B 813E[D80B][717A] <1> cmp word [run_int], int1msg 2987 000032A1 7403E95501 <1> jne .gg9 2988 <1> 2989 000032A6 800E[A100]04 <1> setopt [internalflags2], dif2_tpg_do_not_adjust 2990 <1> ; remember that we should not adjust 2991 000032AB 66 <1> _386_PM_o32 2992 000032AC 31C9 <1> xor cx, cx 2993 000032AE E8A104 <1> call get_cseip_ecx_linear 2994 <1> ; get linear of this cs:(e)ip 2995 <1> .check: 2996 000032B1 7303E94501 <1> jc .gg9 2997 <1> 2998 <1> ; Store the matched address (if any) here in case of non-hit 2999 <1> ; match. (Ie, non-hit pass match or non-hit non-pass match.) 3000 000032B6 A3[B800] <1> mov word [gg_next_cseip_linear], ax 3001 000032B9 8916[BA00] <1> mov word [gg_next_cseip_linear + 2], dx 3002 <1> 3003 000032BD 87DA <1> xchg bx, dx 3004 000032BF 91 <1> xchg cx, ax ; bx:cx = linear address of previous cs:eip 3005 000032C0 31C0 <1> xor ax, ax 3006 <1> .loop: 3007 000032C2 53 <1> push bx 3008 000032C3 50 <1> push ax 3009 000032C4 E80E58 <1> call calcpointbit ; bx = index, ah = value 3010 000032C7 84A7[0201] <1> test byte [b_bplist.used_mask+bx], ah 3011 <1> ; (NC) 3012 000032CB 7503E91901 <1> jz .next 3013 000032D0 84A7[0401] <1> test byte [b_bplist.disabled_mask+bx], ah 3014 <1> ; (NC) 3015 000032D4 7403E91001 <1> jnz .next 3016 000032D9 58 <1> pop ax 3017 000032DA 5B <1> pop bx 3018 000032DB 53 <1> push bx 3019 000032DC 50 <1> push ax 3020 000032DD 89C6 <1> mov si, ax 3021 000032DF 01F6 <1> add si, si 3022 000032E1 01F6 <1> add si, si 3023 <1> %if BPSIZE == 4 3024 <1> %elif BPSIZE == 5 3025 <1> add si, ax 3026 <1> %elif BPSIZE == 6 3027 <1> add si, ax ; * 5 3028 <1> add si, ax ; * 6 3029 <1> %elif BPSIZE == 9 3030 000032E3 01F6 <1> add si, si ; * 8 3031 000032E5 01C6 <1> add si, ax ; * 9 3032 <1> %else 3033 <1> %error Unexpected breakpoint size 3034 <1> %endif 3035 000032E7 81C6[0601] <1> add si, b_bplist.bp ; -> point 3036 <1> 3037 000032EB E83F01 <1> call gg_bb_lods_bp_linear 3038 <1> 3039 000032EE E89003 <1> call gg_bb_check_is_first 3040 000032F1 7203E9F300 <1> jnc .next 3041 <1> 3042 000032F6 39C8 <1> cmp ax, cx 3043 000032F8 7403E9EC00 <1> jne .next 3044 000032FD 39DA <1> cmp dx, bx 3045 000032FF 7403E9E500 <1> jne .next 3046 <1> 3047 <1> .hit: 3048 00003304 58 <1> pop ax 3049 00003305 50 <1> push ax 3050 <1> 3051 00003306 804EFE04 <1> or byte [bp + ?flags], ?flag_match 3052 <1> 3053 0000330A 89C7 <1> mov di, ax 3054 0000330C 01FF <1> add di, di 3055 <1> 3056 0000330E 8BB5[D601] <1> mov si, [b_bplist.when + di] 3057 <1> ; si -> condition 3058 00003312 85F6 <1> test si, si ; any ? 3059 00003314 741E <1> jz @F ; no --> 3060 <1> %if _PM 3061 00003316 E85E05 <1> call resetmode 3062 <1> %endif 3063 00003319 FF36[F00A] <1> push word [rc] 3064 0000331D 8F06[F20A] <1> pop word [priorrc] 3065 00003321 AC <1> lodsb 3066 00003322 E8DA7F <1> call getexpression ; parse stored expression 3067 00003325 E8F385 <1> call chkeol 3068 00003328 E8E679 <1> call toboolean ; get boolean 3069 0000332B 85D2 <1> test dx, dx ; true ? 3070 0000332D 7503E9B700 <1> jz .next ; no, skip --> 3071 00003332 58 <1> pop ax 3072 00003333 50 <1> push ax 3073 <1> @@: 3074 <1> 3075 00003334 8D9D[9601] <1> lea bx, [b_bplist.counter + di] 3076 <1> ; word [bx] = this matched point's counter 3077 <1> 3078 00003338 F646FE03 <1> test byte [bp + ?flags], ?flag_trigger | ?flag_pass 3079 0000333C 7413 <1> jz @F ; none set yet ? --> 3080 0000333E E8C900 <1> call step_pass_counter ; step counter even if already matched 3081 00003341 7203E9A300 <1> jnc .next ; (either is already set, so additional 3082 <1> ; setting of ?flag_pass is skipped) 3083 00003346 F646FE01 <1> test byte [bp + ?flags], ?flag_trigger 3084 0000334A 7403E99A00 <1> jnz .next ; (trigger is already set, so skip triggering) 3085 0000334F EB05 <1> jmp .setup_trigger ; triggered (after previous pass match) 3086 <1> 3087 <1> @@: 3088 00003351 E8B600 <1> call step_pass_counter ; step counter of matched point, no flag yet 3089 00003354 7340 <1> jnc .check_pass ; not triggered, check for pass match --> 3090 <1> 3091 <1> .setup_trigger: 3092 <1> ; Trigger! (And the first detected triggering point.) 3093 00003356 804EFE01 <1> or byte [bp + ?flags], ?flag_trigger 3094 <1> 3095 0000335A 51 <1> push cx 3096 0000335B BF[0E08] <1> mov di, line_out 3097 0000335E BE[F16D] <1> mov si, msg.bb_hit.1 3098 00003361 E89E00 <1> call copy_single_counted_string 3099 <1> ; Now si -> msg.bb_hit.2.nocounter 3100 <1> 3101 00003364 89C2 <1> mov dx, ax 3102 <1> ; Store breakpoint index in message. 3103 00003366 E8A486 <1> call hexbyte ; store index of this point 3104 <1> 3105 <1> ; Get counter of this breakpoint. 3106 00003369 8B07 <1> mov ax, word [bx] 3107 <1> 3108 <1> ; Is it equal to default ? 3109 0000336B 3D0080 <1> cmp ax, 8000h 3110 0000336E 7409 <1> je @F ; yes, skip --> 3111 <1> 3112 00003370 BE[2B6E] <1> mov si, msg.bb_hit.2.counter 3113 00003373 E88C00 <1> call copy_single_counted_string 3114 <1> ; Now si -> msg.bb_hit.3.counter.no_id 3115 <1> 3116 <1> ; Store counter in message. 3117 00003376 E88D86 <1> call hexword 3118 <1> 3119 <1> @@: 3120 00003379 F606[A000]08 <1> testopt [internalflags2], dif2_gg_is_gg 3121 0000337E 7407 <1> jz @F 3122 00003380 F606[7E00]08 <1> testopt [options], gg_bb_hit_no_repeat 3123 00003385 EB05 <1> jmp @FF 3124 <1> @@: 3125 00003387 F606[7E00]10 <1> testopt [options], tp_bb_hit_no_repeat 3126 <1> @@: 3127 0000338C 7406 <1> jz @F 3128 0000338E C706[DA0B][E003] <1> mov word [lastcmd], dmycmd 3129 <1> @@: 3130 00003394 EB1D <1> jmp .trigger_common 3131 <1> 3132 <1> 3133 <1> .check_pass: 3134 00003396 7451 <1> jz .next ; no pass match ? --> 3135 <1> 3136 00003398 804EFE02 <1> or byte [bp + ?flags], ?flag_pass 3137 <1> 3138 0000339C 51 <1> push cx 3139 0000339D BF[0E08] <1> mov di, line_out 3140 000033A0 BE[0E6E] <1> mov si, msg.bb_pass.1 3141 000033A3 E85C00 <1> call copy_single_counted_string 3142 <1> ; Now si -> msg.bb_pass.2 3143 <1> 3144 000033A6 89C2 <1> mov dx, ax 3145 <1> ; Store breakpoint index in message. 3146 000033A8 E86286 <1> call hexbyte ; store index of this point 3147 <1> 3148 000033AB E85400 <1> call copy_single_counted_string 3149 <1> ; Now si -> msg.bb_pass.3.no_id 3150 <1> 3151 <1> ; Get counter of this breakpoint. 3152 000033AE 8B07 <1> mov ax, word [bx] 3153 <1> ; Store counter in message. 3154 000033B0 E85386 <1> call hexword 3155 <1> 3156 <1> .trigger_common: 3157 000033B3 53 <1> push bx 3158 000033B4 BBFFFF <1> mov bx, -1 3159 000033B7 E82953 <1> call get_set_id_offset_length 3160 000033BA F6C7FC <1> test bh, 63 << 2 ; length nonzero ? 3161 000033BD 7421 <1> jz @F ; no --> 3162 <1> 3163 <1> ; The maximum length of a short ID is based on 3164 <1> ; how much space there is after the longest message 3165 <1> ; ("Passed ..., counter=XXXX") assuming 80 columns. 3166 000033BF BE[416E] <1> mov si, msg.bb_hitpass_id.short 3167 000033C2 80FF74 <1> cmp bh, 29 << 2 ; long ? 3168 000033C5 7203 <1> jb .trigger_short_id 3169 <1> ; This jump MUST be a jb, not jbe. The jbe 3170 <1> ; would not match ZR for words where the 3171 <1> ; idbuffer offset is a nonzero value. 3172 000033C7 BE[396E] <1> mov si, msg.bb_hitpass_id.long 3173 <1> .trigger_short_id: 3174 <1> 3175 000033CA E83500 <1> call copy_single_counted_string 3176 000033CD 88F9 <1> mov cl, bh 3177 000033CF D0E9 <1> shr cl, 1 3178 000033D1 D0E9 <1> shr cl, 1 ; cx = length 3179 000033D3 81E3FF03 <1> and bx, 1023 ; bx = offset 3180 000033D7 8DB7[FA01] <1> lea si, [b_bplist.idbuffer + bx] 3181 000033DB F3A4 <1> rep movsb 3182 <1> 3183 000033DD BE[366E] <1> mov si, msg.bb_hitpass_id.after 3184 <1> 3185 <1> @@: 3186 000033E0 5B <1> pop bx 3187 000033E1 E81E00 <1> call copy_single_counted_string 3188 <1> 3189 000033E4 893E[C200] <1> mov word [bb_deferred_message_in_lineout_behind], di 3190 000033E8 59 <1> pop cx 3191 <1> 3192 <1> .next: 3193 000033E9 58 <1> pop ax 3194 000033EA 5B <1> pop bx 3195 <1> 3196 000033EB 40 <1> inc ax 3197 000033EC 83F810 <1> cmp ax, _NUM_B_BP 3198 000033EF 7303E9CEFE <1> jb .loop 3199 <1> 3200 000033F4 8B46FE <1> mov ax, word [bp + ?flags] 3201 000033F7 A807 <1> test al, ?flag_pass | ?flag_trigger | ?flag_match 3202 000033F9 7503 <1> jnz .return ; (NC) 3203 <1> 3204 <1> .gg9: 3205 000033FB 31C0 <1> xor ax, ax 3206 000033FD F9 <1> stc 3207 <1> .return: 3208 000033FE 89EC5D <1> lleave 3209 00003401 C3 <1> retn 3210 <1> 3211 <1> 3212 <1> ; INP: byte [ds:si] = length of source string 3213 <1> ; ds:si + 1 -> source string 3214 <1> ; es:di -> destination buffer 3215 <1> ; OUT: cx = 0 3216 <1> ; ds:si -> after source string 3217 <1> ; es:di -> after written string 3218 <1> ; CHG: - 3219 <1> ; STT: UP 3220 <1> copy_single_counted_string: 3221 00003402 91 <1> xchg ax, cx 3222 00003403 31C0 <1> xor ax, ax 3223 00003405 AC <1> lodsb 3224 00003406 91 <1> xchg ax, cx 3225 00003407 F3A4 <1> rep movsb 3226 00003409 C3 <1> retn 3227 <1> 3228 <1> 3229 <1> ; INP: word [bx] = pass counter of this breakpoint 3230 <1> ; OUT: NC if to proceed (no trigger), 3231 <1> ; ZR if no pass message display 3232 <1> ; NZ if pass message display 3233 <1> ; CY if to trigger 3234 <1> step_pass_counter: 3235 0000340A F707FF3F <1> test word [bx], 3FFFh ; is it already at a terminal state ? 3236 0000340E 740A <1> jz .no_decrement ; yes, do not further decrement --> 3237 00003410 FF0F <1> dec word [bx] ; decrement (to 0/4000h/8000h/C000h) 3238 00003412 7417 <1> jz .trigger ; case for decrementing 1 to 0 --> 3239 00003414 813F0040 <1> cmp word [bx], 4000h 3240 00003418 7411 <1> je .trigger ; case for decrementing 4001h to 4000h 3241 <1> .no_decrement: 3242 0000341A 813F0080 <1> cmp word [bx], 8000h ; decrement resulted in 8000h 3243 0000341E 740B <1> je .trigger ; or was already in that state? --> 3244 00003420 813F00C0 <1> cmp word [bx], 0_C000h 3245 00003424 7405 <1> je .trigger ; or C000h --> 3246 <1> .proceed: 3247 00003426 F6470140 <1> test byte [bx + 1], 40h ; (NC) ZR if no pass message 3248 0000342A C3 <1> retn 3249 <1> 3250 <1> .trigger: 3251 0000342B F9 <1> stc 3252 0000342C C3 <1> retn 3253 <1> %endif 3254 <1> 3255 <1> 3256 <1> ; INP: si -> linear address of breakpoint 3257 <1> ; (32 bits if _PM, else 24 bits) 3258 <1> ; OUT: dx:ax = linear address of breakpoint 3259 <1> ; si -> behind linear address 3260 <1> gg_bb_lods_bp_linear: 3261 0000342D AD <1> lodsw 3262 0000342E 92 <1> xchg ax, dx 3263 <1> %if _PM 3264 0000342F AD <1> lodsw 3265 <1> %else 3266 <1> xor ax, ax 3267 <1> lodsb 3268 <1> %endif 3269 00003430 92 <1> xchg ax, dx 3270 00003431 C3 <1> retn 3271 <1> 3272 <1> 3273 <1> ; INP: word [run_int] 3274 <1> ; word [reg_cs] 3275 <1> ; (d)word [reg_eip] 3276 <1> ; gg/bb breakpoints 3277 <1> ; OUT: NC if a breakpoint was hit, 3278 <1> ; (e)ip must be decremented by one 3279 <1> ; word [bb_deferred_message_in_lineout_behind] set 3280 <1> ; and line_out written if bb point matched 3281 <1> ; (The bb point's index is already written to this msg.) 3282 <1> ; ax = 7 if non-bb match, else 3283 <1> ; ax & 1 set if non-pass match (actual hit), 3284 <1> ; else ax & 2 set if pass match (consider as hit first, 3285 <1> ; but dump registers next (not to silent buffer) 3286 <1> ; and then continue execution) 3287 <1> ; else ax & 4 always set, indicates any match 3288 <1> ; (including matches that should merely continue) 3289 <1> ; all pass points' counters stepped 3290 <1> ; CY if no breakpoint was hit, 3291 <1> ; ax = 0 3292 <1> ; CHG: all 3293 <1> ; STT: es = ds = ss 3294 <1> gg_bb_check_hit: 3295 00003432 E853FE <1> call bb_check_hit 3296 00003435 720D <1> jc .gg_check_hit 3297 <1> 3298 00003437 A801 <1> test al, 1 ; actual bb hit ? 3299 00003439 7507 <1> jnz .ret_NC ; yes, return as hit 3300 <1> 3301 0000343B 50 <1> push ax ; bb is pass match or any other match, 3302 0000343C E80500 <1> call gg_check_hit ; is gg a match ? 3303 0000343F 58 <1> pop ax 3304 00003440 732D <1> jnc gg_check_hit.hit ; yes --> (set NC, ax = 7) 3305 <1> 3306 <1> ; Here, we return the flags 2 (set if pass match) and 3307 <1> ; 4 (always set, indicating any match). 3308 <1> 3309 <1> .ret_NC: 3310 00003442 F8 <1> clc 3311 00003443 C3 <1> retn 3312 <1> 3313 <1> .gg_check_hit: 3314 <1> ; (fall through) 3315 <1> 3316 <1> %ifn _NUM_G_BP 3317 <1> gg_check_hit: 3318 <1> stc 3319 <1> retn 3320 <1> %else 3321 <1> ; INP: word [run_int] 3322 <1> ; word [reg_cs] 3323 <1> ; (d)word [reg_eip] 3324 <1> ; bb breakpoints 3325 <1> ; OUT: NC if a breakpoint was hit, 3326 <1> ; (e)ip must be decremented by one 3327 <1> ; ax = 7 3328 <1> ; CY if no breakpoint was hit, 3329 <1> ; ax = 0 3330 <1> ; CHG: all 3331 <1> ; STT: es = ds = ss 3332 <1> gg_check_hit: 3333 <1> ; Finish up. Check if it was one of _our_ breakpoints. 3334 00003444 813E[D80B][947A] <1> cmp word [run_int], int3msg 3335 0000344A 752D <1> jne .gg9 ; if not interrupt 03h --> 3336 <1> 3337 <1> ; Get previous cs:eip (where breakpoint was executed if any at all). 3338 0000344C E8AE03 <1> call get_cseip_of_possible_breakpoint 3339 <1> ; dx:ax = linear address of previous cs:eip 3340 0000344F 7228 <1> jc .gg9 3341 00003451 BE[7C07] <1> mov si, g_bplist.bp 3342 00003454 31C9 <1> xor cx, cx 3343 00003456 8A4CFF <1> mov cl, byte [si-1] ; number of saved breakpoints 3344 00003459 E31E <1> jcxz .gg9 ; none, so always unexpected --> 3345 <1> 3346 0000345B 89C7 <1> mov di, ax 3347 0000345D 89D3 <1> mov bx, dx ; bx:di = linear address of previous cs:(e)ip 3348 <1> 3349 <1> .loop_gg6: 3350 0000345F E8CBFF <1> call gg_bb_lods_bp_linear 3351 <1> 3352 00003462 E81C02 <1> call gg_bb_check_is_first 3353 00003465 730D <1> jnc .next 3354 <1> 3355 00003467 39DA <1> cmp dx, bx 3356 00003469 7509 <1> jne .next 3357 0000346B 39F8 <1> cmp ax, di 3358 0000346D 7505 <1> jne .next 3359 <1> 3360 <1> .hit: 3361 0000346F B80700 <1> mov ax, 7 3362 00003472 F8 <1> clc 3363 00003473 C3 <1> retn 3364 <1> 3365 <1> .next: 3366 <1> 3367 <1> %if BPSIZE == 4 || BPSIZE == 5 3368 <1> inc si ; skip saved (actually CCh) byte 3369 <1> %elif BPSIZE == 6 3370 <1> add si, 3 ; skip word offset and byte content 3371 <1> %elif BPSIZE == 9 3372 00003474 83C605 <1> add si, 5 ; skip dword offset and byte content 3373 <1> %endif 3374 <1> ; BPSIZE implied 3375 00003477 E2E6 <1> loop .loop_gg6 ; try next if there's any 3376 <1> 3377 <1> .gg9: 3378 00003479 31C0 <1> xor ax, ax 3379 0000347B F9 <1> stc 3380 0000347C C3 <1> retn 3381 <1> %endif 3382 <1> 3383 <1> 3384 <1> %if _DELAY_BEFORE_BP 3385 <1> delay_before_bp: 3386 0000347D F606[8700]04 <1> testopt [options3], opt3_delay_before_bp 3387 00003482 7428 <1> jz .ret 3388 00003484 F606[A600]80 <1> testopt [internalflags3], dif3_delayed 3389 00003489 7521 <1> jnz .ret 3390 0000348B 800E[A600]80 <1> setopt [internalflags3], dif3_delayed 3391 00003490 06 <1> push es 3392 00003491 57 <1> push di 3393 00003492 50 <1> push ax 3394 00003493 BF4000 <1> mov di, 40h ; dual mode segment/selector 3395 00003496 8EC7 <1> mov es, di 3396 00003498 268B3E6C00 <1> mov di, word [es:6Ch] 3397 <1> @@: 3398 0000349D 263B3E6C00 <1> cmp di, word [es:6Ch] 3399 000034A2 7505 <1> jne @F 3400 000034A4 E8408C <1> call idle 3401 000034A7 EBF4 <1> jmp @B 3402 <1> @@: 3403 000034A9 58 <1> pop ax 3404 000034AA 5F <1> pop di 3405 000034AB 07 <1> pop es 3406 <1> .ret: 3407 000034AC C3 <1> retn 3408 <1> %endif 3409 <1> 3410 <1> 3411 <1> %if _BREAKPOINTS 3412 <1> bb_writepoints_init_reset: 3413 000034AD BF[0601] <1> mov di, b_bplist.bp 3414 000034B0 B0CC <1> mov al, 0CCh 3415 000034B2 B91000 <1> mov cx, _NUM_B_BP 3416 <1> .loop: 3417 000034B5 83C708 <1> add di, BPSIZE - 1 3418 000034B8 AA <1> stosb 3419 000034B9 E2FA <1> loop .loop 3420 <1> 3421 <1> ; This is called first by gg before writing any of the 3422 <1> ; gg points. So, if it fails, it only needs to restore 3423 <1> ; its own points, not any of the gg points. 3424 <1> ; This is also called deep down in run_with_bb when called 3425 <1> ; from tt or pp. In this case, there may be a proceed 3426 <1> ; breakpoint already written. On failure, after having 3427 <1> ; restored all yet-written bb points, this proceed 3428 <1> ; breakpoint is restored too. 3429 <1> ; 3430 <1> ; INP: bb breakpoints 3431 <1> ; tpg_proceed_bp 3432 <1> ; OUT: does not return if an error occurred, 3433 <1> ; instead jumps to cmd3 3434 <1> ; STT: might return modeswitched 3435 <1> bb_writepoints_init: 3436 000034BB E8D500 <1> call bb_writepoints 3437 000034BE 735B <1> jnc .retn 3438 <1> 3439 000034C0 83EC20 <1> sub sp, _NUM_B_BP * 2 ; reserve space for bb error info 3440 000034C3 89E5 <1> mov bp, sp 3441 <1> ; cx = index of failed point 3442 <1> ; = index above last one to restore 3443 <1> ; ax = error info of failed point 3444 000034C5 50 <1> push ax 3445 000034C6 51 <1> push cx 3446 000034C7 E8B100 <1> call bb_restorepoints_and_init_error_info 3447 <1> 3448 <1> bb_restorepoints_exit: equ $ 3449 <1> ; If this is not gg and T/P wrote a proceed breakpoint, 3450 <1> ; restore it here (after having restored bb points). 3451 000034CA E8770B <1> call proceed_writepoint_restore 3452 <1> ; This call might return modeswitched. 3453 000034CD BB0000 <1> mov bx, 0 ; (preserve CF) 3454 000034D0 7305 <1> jnc @F 3455 000034D2 80CC80 <1> or ah, 80h ; mark error during restoration 3456 000034D5 89C3 <1> mov bx, ax ; bx & 80h set: error restoring pp 3457 <1> @@: 3458 <1> 3459 000034D7 59 <1> pop cx 3460 000034D8 58 <1> pop ax ; error info + index of failed point 3461 <1> 3462 000034D9 89CE <1> mov si, cx 3463 000034DB 01F6 <1> add si, si 3464 000034DD 01F6 <1> add si, si ; * 4 3465 <1> %if BPSIZE == 4 3466 <1> %elif BPSIZE == 5 3467 <1> add si, cx ; * 5 3468 <1> %elif BPSIZE == 6 3469 <1> add si, cx ; * 5 3470 <1> add si, cx ; * 6 3471 <1> %elif BPSIZE == 9 3472 000034DF 01F6 <1> add si, si ; * 8 3473 000034E1 01CE <1> add si, cx ; * 9 3474 <1> %else 3475 <1> %error Unexpected breakpoint size 3476 <1> %endif 3477 000034E3 81C6[0601] <1> add si, b_bplist.bp ; -> point 3478 <1> 3479 000034E7 53 <1> push bx 3480 <1> 3481 000034E8 E860FD <1> call put_deferred_message_silent 3482 <1> ; CHG: dx 3483 <1> 3484 000034EB 83F9FF <1> cmp cx, -1 3485 000034EE 740B <1> je @F 3486 <1> 3487 <1> ; si-> point 3488 <1> ; ax = info (ah = reason, al = new value if reason 3) 3489 <1> ; cx = 0-based index of initially failed point 3490 000034F0 FF7402 <1> push word [si + 2] 3491 000034F3 FF34 <1> push word [si] ; stack: linear address 3492 000034F5 BB0040 <1> mov bx, 4000h ; bh = 40h (bb), 3493 <1> ; bl = what we tried to restore (n/a) 3494 000034F8 E8B20B <1> call display_breakpoint_failure 3495 <1> ; This function calls resetmode. 3496 <1> 3497 <1> @@: 3498 000034FB E8E501 <1> call bb_handlefailedrestore 3499 <1> ; This function calls resetmode. 3500 <1> 3501 000034FE 58 <1> pop ax 3502 000034FF F6C480 <1> test ah, 80h ; pp failed to restore ? 3503 00003502 7411 <1> jz @F 3504 <1> 3505 00003504 FF36[C600] <1> push word [tpg_proceed_bp + 2] 3506 00003508 FF36[C400] <1> push word [tpg_proceed_bp] 3507 0000350C 8A1E[CC00] <1> mov bl, [tpg_proceed_bp + BPSIZE - 1] 3508 00003510 B700 <1> mov bh, 0 ; proceed breakpoint 3509 00003512 E8980B <1> call display_breakpoint_failure 3510 <1> @@: 3511 00003515 83C420 <1> add sp, _NUM_B_BP * 2 ; discard bb error info 3512 00003518 E9E5CA <1> jmp cmd3 3513 <1> 3514 <1> .retn: 3515 0000351B C3 <1> retn 3516 <1> %endif 3517 <1> 3518 <1> 3519 <1> %if _NUM_G_BP 3520 <1> ; INP: ss:bp -> behind gg error info space 3521 <1> ; cx = number of error info words on stack 3522 <1> ; OUT: error info space initialised to all zeros 3523 <1> ; CHG: ax, di, es 3524 <1> ; STT: sets es to ss 3525 <1> gg_restorepoints_init_error_info: 3526 0000351C 16 <1> push ss 3527 0000351D 07 <1> pop es 3528 0000351E 89EF <1> mov di, bp ; es:di -> behind error info 3529 00003520 51 <1> push cx 3530 00003521 4F <1> dec di 3531 00003522 4F <1> dec di 3532 00003523 31C0 <1> xor ax, ax 3533 00003525 FD <1> std ; _AMD_ERRATUM_109_WORKAROUND does not apply 3534 00003526 F3AB <1> rep stosw ; initialize error info 3535 00003528 FC <1> cld 3536 00003529 59 <1> pop cx 3537 0000352A C3 <1> retn 3538 <1> 3539 <1> 3540 <1> gg_restorepoints_and_init_error_info: 3541 0000352B E8EEFF <1> call gg_restorepoints_init_error_info 3542 <1> 3543 <1> ; Restore gg breakpoints. 3544 <1> ; On errors remember failures but restore all remaining anyway. 3545 <1> ; 3546 <1> ; INP: cx = number of breakpoints to restore (<= 255), 3547 <1> ; assumed at beginning of g_bplist.bp 3548 <1> ; ss:bp -> behind cx words for error info 3549 <1> ; OUT: NC if all points restored successfully 3550 <1> ; CY if at least one point couldn't be restored, 3551 <1> ; error info filled, high byte: 3552 <1> ; reason = 0 = no error (this point didn't fail), 3553 <1> ; 1 = couldn't write, 3554 <1> ; 2 = unreachable, 3555 <1> ; 3 = overwritten), 3556 <1> ; low byte: new byte value (if reason 3) 3557 <1> ; CHG: ax, bx, (e)dx, si, di, es 3558 <1> ; STT: sets es to ss 3559 <1> ; might return modeswitched 3560 <1> ; 3561 <1> ; Note: The points are restored in reverse, from the last back 3562 <1> ; to the front. The first point is handled last. 3563 <1> gg_restorepoints: 3564 0000352E 89CE <1> mov si, cx 3565 00003530 01F6 <1> add si, si 3566 00003532 01F6 <1> add si, si ; * 4 3567 <1> %if BPSIZE == 4 3568 <1> %elif BPSIZE == 5 3569 <1> add si, cx ; * 5 3570 <1> %elif BPSIZE == 6 3571 <1> add si, cx ; * 5 3572 <1> add si, cx ; * 6 3573 <1> %elif BPSIZE == 9 3574 00003534 01F6 <1> add si, si ; * 8 3575 00003536 01CE <1> add si, cx ; * 9 3576 <1> %else 3577 <1> %error Unexpected breakpoint size 3578 <1> %endif 3579 00003538 81C6[7307] <1> add si, g_bplist.bp - BPSIZE ; -> last point in list (first to restore) 3580 <1> 3581 0000353C F8 <1> clc ; assume success 3582 0000353D 51 <1> push cx 3583 0000353E 9C <1> pushf 3584 0000353F E329 <1> jcxz .done ; nothing to do --> 3585 <1> .loop: 3586 00003541 E8E400 <1> call gg_writepoints_restore ; Restore breakpoint bytes. 3587 00003544 7324 <1> jnc .done ; successful --> 3588 00003546 5A <1> pop dx ; discard flags 3589 00003547 5B <1> pop bx 3590 00003548 53 <1> push bx 3591 00003549 9C <1> pushf ; store (CY) flags 3592 <1> 3593 0000354A 50 <1> push ax 3594 0000354B 89F7 <1> mov di, si 3595 0000354D 81EF[8507] <1> sub di, BPSIZE+g_bplist.bp 3596 <1> %if BPSIZE == 5 || BPSIZE == 6 || BPSIZE == 9 3597 00003551 89F8 <1> mov ax, di 3598 00003553 31D2 <1> xor dx, dx 3599 00003555 BF0900 <1> mov di, BPSIZE 3600 00003558 F7F7 <1> div di 3601 0000355A 89C7 <1> mov di, ax ; di = 0-based point index 3602 0000355C D1E7 <1> shl di, 1 ; di = 0-based error info offset 3603 <1> %elif BPSIZE == 4 3604 <1> shr di, 1 ; di = 0-based error info offset 3605 <1> %else 3606 <1> %error "Unexpected BPSIZE" 3607 <1> %endif 3608 0000355E 29DF <1> sub di, bx 3609 00003560 29DF <1> sub di, bx 3610 00003562 8F03 <1> pop word [bp+di] ; store error info 3611 00003564 49 <1> dec cx ; exclude the failed point 3612 00003565 83EE12 <1> sub si, 2*BPSIZE ; -> the point _before_ failed one 3613 00003568 EBD7 <1> jmp short .loop 3614 <1> .done: 3615 0000356A 9D <1> popf ; get flags. CY if any couldn't be restored 3616 0000356B 59 <1> pop cx ; restore cx 3617 0000356C C3 <1> retn 3618 <1> %endif 3619 <1> 3620 <1> 3621 <1> %if _BREAKPOINTS 3622 <1> ; INP: ss:bp -> error info space (one word per bb breakpoint) 3623 <1> ; OUT: error info space initialised to all zeros 3624 <1> ; CHG: ax, di, es 3625 <1> ; STT: sets es to ss 3626 <1> ; 3627 <1> ; Note: This initialises words for all bb points. 3628 <1> ; While the value in cx is preserved, it is 3629 <1> ; assumed that space for all points is allocated. 3630 <1> bb_restorepoints_init_error_info: 3631 0000356D 16 <1> push ss 3632 0000356E 07 <1> pop es 3633 0000356F 89EF <1> mov di, bp 3634 00003571 31C0 <1> xor ax, ax 3635 00003573 51 <1> push cx 3636 00003574 B91000 <1> mov cx, _NUM_B_BP 3637 00003577 F3AB <1> rep stosw 3638 00003579 59 <1> pop cx 3639 0000357A C3 <1> retn 3640 <1> 3641 <1> 3642 <1> bb_restorepoints_and_init_error_info: 3643 0000357B E8EFFF <1> call bb_restorepoints_init_error_info 3644 <1> 3645 <1> ; Restore bb breakpoints. 3646 <1> ; On errors remember failures but restore all remaining anyway. 3647 <1> ; 3648 <1> ; INP: cx = index above last one to restore 3649 <1> ; ss:bp -> error info space (one word per bb breakpoint) 3650 <1> ; OUT: NC if all points restored successfully 3651 <1> ; CY if at least one point couldn't be restored, 3652 <1> ; error info filled, high byte: 3653 <1> ; reason = 0 = no error (this point didn't fail), 3654 <1> ; 1 = couldn't write, 3655 <1> ; 2 = unreachable, 3656 <1> ; 3 = overwritten), 3657 <1> ; low byte: new byte value (if reason 3) 3658 <1> ; CHG: ax, bx, cx, (e)dx, si, di, es 3659 <1> ; STT: sets es to ss 3660 <1> ; might return modeswitched 3661 <1> ; 3662 <1> ; Note: The points are restored in reverse, from the list back 3663 <1> ; to the front. The first point is handled last. 3664 <1> bb_restorepoints: 3665 <1> 3666 0000357E F8 <1> clc ; assume success 3667 0000357F 9C <1> pushf 3668 00003580 E30F <1> jcxz .done 3669 <1> .loop: 3670 00003582 E81400 <1> call bb_writepoints_restore 3671 00003585 730A <1> jnc .done 3672 00003587 5A <1> pop dx ; (discard flags) 3673 00003588 9C <1> pushf ; store (CY) flags 3674 <1> ; cx = index of point that failed to write 3675 <1> ; ah = reason, al = new byte value (reason 3) 3676 00003589 89CF <1> mov di, cx 3677 0000358B 01FF <1> add di, di 3678 0000358D 8903 <1> mov word [bp + di], ax ; store error info 3679 0000358F EBF1 <1> jmp .loop 3680 <1> 3681 <1> .done: 3682 00003591 9D <1> popf ; CF 3683 00003592 C3 <1> retn 3684 <1> 3685 <1> 3686 <1> ; Loop through bb breakpoints and exchange the saved 3687 <1> ; byte with that one at the actual address. Used to write 3688 <1> ; the breakpoints. 3689 <1> ; 3690 <1> ; INP: - 3691 <1> ; OUT: NC if successful 3692 <1> ; CY if error writing a point, 3693 <1> ; cx = index of point that failed to write 3694 <1> ; (all PRIOR points were processed successfully, 3695 <1> ; either written successfully or skipped) 3696 <1> ; CHG: ax, bx, (e)dx, si, cx, di 3697 <1> ; STT: might return modeswitched 3698 <1> bb_writepoints: 3699 00003593 31C9 <1> xor cx, cx 3700 00003595 BF0100 <1> mov di, 1 3701 00003598 A9 <1> db __TEST_IMM16 ; (skip xor, NC) 3702 <1> 3703 <1> ; Same, but go through the breakpoints in reverse order 3704 <1> ; and check that what we overwrite is a 0CCh byte. If so, 3705 <1> ; restore the original value. (The 0CCh is discarded.) 3706 <1> ; 3707 <1> ; INP: cx = index *above* last to write (_NUM_B_BP for all) 3708 <1> ; OUT: NC if successful 3709 <1> ; CY if error writing a point, 3710 <1> ; cx = index of point that failed to write 3711 <1> ; ah = 1 if error because point could not be written 3712 <1> ; ah = 2 if error because address is unreachable 3713 <1> ; ah = 3 if error because point contained non-0CCh value, 3714 <1> ; al = new byte 3715 <1> ; CHG: ax, bx, (e)dx, si, cx, di 3716 <1> ; STT: might return modeswitched 3717 <1> bb_writepoints_restore: 3718 00003599 31FF <1> xor di, di ; (NC) 3719 <1> bb_wp: 3720 <1> lframe near 3721 0000359B 5589E5 <1> lenter 3722 <1> lvar word, is_write 3723 0000359E 57 <1> push di 3724 <1> 3725 0000359F F646FE01 <1> test byte [bp + ?is_write], 1 3726 <1> ; (NC) is it writing ? 3727 000035A3 7459 <1> jz .next ; no, is restoring, first decrement cx --> 3728 <1> 3729 <1> .loop: 3730 000035A5 89C8 <1> mov ax, cx 3731 000035A7 E82B55 <1> call calcpointbit ; bx = index, ah = value 3732 000035AA 84A7[0201] <1> test byte [b_bplist.used_mask+bx], ah 3733 <1> ; (NC) 3734 000035AE 744E <1> jz .next 3735 000035B0 84A7[0401] <1> test byte [b_bplist.disabled_mask+bx], ah 3736 <1> ; (NC) 3737 000035B4 7548 <1> jnz .next 3738 <1> 3739 000035B6 89CE <1> mov si, cx 3740 000035B8 01F6 <1> add si, si 3741 000035BA 01F6 <1> add si, si ; * 4 3742 <1> %if BPSIZE == 4 3743 <1> %elif BPSIZE == 5 3744 <1> add si, cx ; * 5 3745 <1> %elif BPSIZE == 6 3746 <1> add si, cx ; * 5 3747 <1> add si, cx ; * 6 3748 <1> %elif BPSIZE == 9 3749 000035BC 01F6 <1> add si, si ; * 8 3750 000035BE 01CE <1> add si, cx ; * 9 3751 <1> %else 3752 <1> %error Unexpected breakpoint size 3753 <1> %endif 3754 000035C0 81C6[0601] <1> add si, b_bplist.bp ; -> point 3755 <1> 3756 000035C4 E866FE <1> call gg_bb_lods_bp_linear 3757 <1> ; dx:ax = linear address 3758 <1> 3759 000035C7 E8B700 <1> call gg_bb_check_is_first 3760 000035CA 7332 <1> jnc .next ; (NC) 3761 <1> 3762 000035CC E8CD02 <1> call getsegmented ; bx:(e)dx = segmented address 3763 <1> %if BPSIZE == 6 3764 <1> lodsw ; skip word offset 3765 <1> %elif BPSIZE == 9 3766 000035CF AD <1> lodsw 3767 000035D0 AD <1> lodsw ; skip dword offset 3768 <1> %endif 3769 000035D1 AC <1> lodsb ; get byte to write 3770 000035D2 B402 <1> mov ah, 2 3771 000035D4 723E <1> jc .return ; not in PM anymore/address not available --> (CY) 3772 000035D6 F646FE01 <1> test byte [bp + ?is_write], 1 3773 <1> ; writing? 3774 000035DA 7517 <1> jnz .forward_nocheck ; yes --> 3775 <1> 3776 <1> .backward_check: 3777 000035DC 50 <1> push ax 3778 000035DD E88663 <1> call readmem ; read current byte 3779 000035E0 3CCC <1> cmp al, 0CCh ; is this still what we wrote? 3780 000035E2 B483 <1> mov ah, 83h ; (80h = error occurred while restoring) 3781 000035E4 F9 <1> stc 3782 000035E5 752D <1> jne .return_discard ; nope --> (CY) 3783 000035E7 58 <1> pop ax 3784 000035E8 E84E63 <1> call writemem ; return the byte to its original value 3785 000035EB 7211 <1> jc .next ; failed --> (CY, handled there) 3786 000035ED C644FFCC <1> mov byte [si-1], 0CCh ; reset stored point 3787 000035F1 EB0B <1> jmp short .next 3788 <1> 3789 <1> .forward_nocheck: 3790 <1> %if _DELAY_BEFORE_BP 3791 000035F3 E887FE <1> call delay_before_bp 3792 <1> %endif 3793 000035F6 E84063 <1> call writemem 3794 000035F9 7203 <1> jc .next 3795 000035FB 8844FF <1> mov byte [si-1], al ; save the previous byte there 3796 <1> .next: 3797 000035FE B401 <1> mov ah, 1 ; (in case of error) 3798 00003600 7212 <1> jc .return ; failed to write --> (CY) 3799 <1> 3800 00003602 F646FE01 <1> test byte [bp + ?is_write], 1 3801 00003606 7505 <1> jnz .is_write_next 3802 00003608 49 <1> dec cx ; restore: decrement index 3803 00003609 799A <1> jns .loop ; decremented to 0FFFFh ? no, loop --> 3804 0000360B EB06 <1> jmp .return_NC 3805 <1> 3806 <1> .is_write_next: 3807 0000360D 41 <1> inc cx ; write: increment index 3808 0000360E 83F910 <1> cmp cx, _NUM_B_BP ; above last ? 3809 00003611 7292 <1> jb .loop ; no, loop --> 3810 <1> .return_NC: 3811 00003613 F8 <1> clc 3812 <1> .return: 3813 <1> .return_discard: 3814 00003614 730A <1> jnc .ret 3815 <1> 3816 00003616 F646FE01 <1> test byte [bp + ?is_write], 1 3817 <1> ; restoring ? 3818 0000361A 7503 <1> jnz .ret_CY ; no --> 3819 0000361C 80CC80 <1> or ah, 80h ; error occurred while restoring 3820 <1> .ret_CY: 3821 0000361F F9 <1> stc 3822 <1> .ret: 3823 00003620 89EC5D <1> lleave 3824 00003623 C3 <1> lret 3825 <1> %endif 3826 <1> 3827 <1> 3828 <1> %if _NUM_G_BP 3829 <1> ; Loop through saved breakpoints and exchange the saved 3830 <1> ; byte with that one at the actual address. Used to write 3831 <1> ; the breakpoints. 3832 <1> ; 3833 <1> ; INP: si-> current point 3834 <1> ; cx = number of points to write (might be zero) 3835 <1> ; OUT: NC if successful 3836 <1> ; CY if error writing a point, 3837 <1> ; cx = number of points still to write (including failed one) 3838 <1> ; (si-BPSIZE)-> point that failed 3839 <1> ; CHG: ax, bx, (e)dx, si, cx, di 3840 <1> gg_writepoints: 3841 00003624 BF0100 <1> mov di, 1 3842 00003627 A9 <1> db __TEST_IMM16 ; (skip xor, NC) 3843 <1> 3844 <1> ; Same, but go through the breakpoints in reverse order 3845 <1> ; and check that what we overwrite is a 0CCh byte. If so, 3846 <1> ; restore the original value. (The 0CCh is discarded.) 3847 <1> ; 3848 <1> ; Additionally: 3849 <1> ; OUT: CY if error writing a point, 3850 <1> ; ah = 1 if error because point could not be written 3851 <1> ; ah = 2 if error because address is unreachable 3852 <1> ; ah = 3 if error because point contained non-0CCh value, 3853 <1> ; al = new byte 3854 <1> gg_writepoints_restore: 3855 00003628 31FF <1> xor di, di ; (NC) 3856 <1> gg_wp: 3857 0000362A E348 <1> jcxz .return ;if nothing to do --> (still NC from xor/test) 3858 <1> .loop: 3859 0000362C E8FEFD <1> call gg_bb_lods_bp_linear 3860 <1> ; dx:ax = linear address 3861 <1> 3862 0000362F E84F00 <1> call gg_bb_check_is_first 3863 00003632 7209 <1> jc @F ; if to handle this breakpoint --> 3864 <1> 3865 <1> ; Skip to next breakpoint. 3866 <1> %if BPSIZE == 4 || BPSIZE == 5 3867 <1> inc si ; -> after point 3868 <1> %elif BPSIZE == 6 3869 <1> add si, 3 ; skip word offset and byte content 3870 <1> %elif BPSIZE == 9 3871 00003634 83C605 <1> add si, 5 ; skip dword offset and byte content 3872 <1> %endif 3873 <1> ; BPSIZE implied 3874 <1> 3875 00003637 85FF <1> test di, di ; (NC) 3876 00003639 7533 <1> jnz .next ; going forward --> 3877 0000363B EB23 <1> jmp .next_lea_si ; (NC) 3878 <1> 3879 <1> ; Handle this breakpoint. 3880 <1> @@: 3881 0000363D E85C02 <1> call getsegmented ; bx:(e)dx = segmented address 3882 <1> %if BPSIZE == 6 3883 <1> lodsw ; skip word offset 3884 <1> %elif BPSIZE == 9 3885 00003640 AD <1> lodsw 3886 00003641 AD <1> lodsw ; skip dword offset 3887 <1> %endif 3888 00003642 AC <1> lodsb ; get byte to write 3889 00003643 B402 <1> mov ah, 2 3890 00003645 722D <1> jc .return ; not in PM anymore/address not available --> (CY) 3891 00003647 85FF <1> test di, di ; writing? 3892 00003649 751A <1> jnz .forward_nocheck ; yes --> 3893 <1> 3894 <1> .backward_check: 3895 0000364B 50 <1> push ax 3896 0000364C E81763 <1> call readmem ; read current byte 3897 0000364F 3CCC <1> cmp al, 0CCh ; is this still what we wrote? 3898 00003651 B483 <1> mov ah, 83h ; (80h = error occurred while restoring) 3899 00003653 F9 <1> stc 3900 00003654 7529 <1> jne .return_discard ; nope --> (CY) 3901 00003656 58 <1> pop ax 3902 00003657 E8DF62 <1> call writemem ; return the byte to its original value 3903 0000365A 7212 <1> jc .next ; failed --> (CY, handled there) 3904 0000365C C644FFCC <1> mov byte [si-1], 0CCh ; reset stored point 3905 <1> .next_lea_si: 3906 00003660 8D74EE <1> lea si, [si-2*BPSIZE] ; adjust (for reverse writing) 3907 00003663 EB09 <1> jmp short .next 3908 <1> 3909 <1> .forward_nocheck: 3910 <1> %if _DELAY_BEFORE_BP 3911 00003665 E815FE <1> call delay_before_bp 3912 <1> %endif 3913 00003668 E8CE62 <1> call writemem 3914 0000366B 8844FF <1> mov byte [si-1], al ; save the previous byte there 3915 <1> .next: 3916 0000366E B401 <1> mov ah, 1 ; (in case of error) 3917 00003670 7202 <1> jc .return ; failed to write --> (CY) 3918 00003672 E2B8 <1> loop .loop 3919 <1> .return: ; (NC) 3920 00003674 730A <1> jnc .ret 3921 <1> 3922 00003676 85FF <1> test di, di ; restoring ? 3923 00003678 7503 <1> jnz .ret_CY ; no --> 3924 0000367A 80CC80 <1> or ah, 80h ; error occurred while restoring 3925 <1> .ret_CY: 3926 0000367D F9 <1> stc 3927 0000367E 52 <1> push dx ; (counteract effect of pop) 3928 <1> .return_discard: 3929 0000367F 5A <1> pop dx 3930 <1> .ret: 3931 00003680 C3 <1> retn 3932 <1> %endif 3933 <1> 3934 <1> 3935 <1> ; INP: dx:ax = linear address of point to be (re)set 3936 <1> ; dword [internalflags2] 3937 <1> ; dword [gg_first_cseip_linear] 3938 <1> ; OUT: CY if to (re)set breakpoint 3939 <1> ; if: no flag set 3940 <1> ; or: dx:ax doesn't match, dif2_gg_skip_non_cseip clear 3941 <1> ; (setting non-cseip point) 3942 <1> ; or: dx:ax matches, dif2_gg_skip_cseip clear 3943 <1> ; (setting cseip point afterwards) 3944 <1> ; NC if to not (re)set breakpoint 3945 <1> ; if: dx:ax doesn't match, dif2_gg_skip_non_cseip set 3946 <1> ; (not setting non-cseip point afterwards) 3947 <1> ; or: dx:ax matches, dif2_gg_skip_cseip set 3948 <1> ; (not setting cseip point) 3949 <1> gg_bb_check_is_first: 3950 00003681 F606[A000]07 <1> testopt [internalflags2], dif2_gg_is_first | dif2_gg_skip_cseip | dif2_gg_skip_non_cseip 3952 00003686 7418 <1> jz .continue 3953 <1> 3954 00003688 3906[B400] <1> cmp [gg_first_cseip_linear], ax 3955 0000368C 7514 <1> jne .is_not_first 3956 0000368E 3916[B600] <1> cmp [gg_first_cseip_linear + 2], dx 3957 00003692 750E <1> jne .is_not_first 3958 <1> 3959 <1> .is_first: 3960 00003694 800E[A000]10 <1> setopt [internalflags2], dif2_gg_first_detected 3961 00003699 F606[A000]04 <1> testopt [internalflags2], dif2_gg_skip_cseip 3962 0000369E 7509 <1> jnz .skip 3963 <1> .continue: 3964 000036A0 F9 <1> stc 3965 000036A1 C3 <1> retn 3966 <1> 3967 <1> .is_not_first: 3968 000036A2 F606[A000]02 <1> testopt [internalflags2], dif2_gg_skip_non_cseip 3969 000036A7 74F7 <1> jz .continue 3970 <1> .skip: 3971 000036A9 F8 <1> clc 3972 000036AA C3 <1> retn 3973 <1> 3974 <1> 3975 <1> ; INP: al = number to put 3976 <1> ; OUT: putsline called with ordinal string 3977 <1> ; CHG: di, [line_out], ax 3978 <1> putordinalbyte: 3979 000036AB 53 <1> push bx 3980 000036AC 51 <1> push cx 3981 000036AD 52 <1> push dx 3982 <1> 3983 <1> ; Note that trim_overflow in front of line_out is 3984 <1> ; initialised to '0', which we depend on here. 3985 <1> ; With the output from decbyte, at least two decimal 3986 <1> ; digits are always valid in the buffer. 3987 000036AE BF[0E08] <1> mov di, line_out 3988 000036B1 E80700 <1> call ordinalbyte 3989 000036B4 E88B83 <1> call putsline 3990 000036B7 5A <1> pop dx 3991 000036B8 59 <1> pop cx 3992 000036B9 5B <1> pop bx 3993 000036BA C3 <1> retn 3994 <1> 3995 <1> 3996 <1> ordinalbyte: 3997 000036BB E8AF82 <1> call decbyte 3998 000036BE 8B45FE <1> mov ax, [di - 2] ; al = lower address, higher decimal digit 3999 <1> ; ah = higher address, lower decimal digit 4000 000036C1 3C31 <1> cmp al, '1' 4001 000036C3 7417 <1> je .gotsuf_th ; 11th, 12th, 13th or other teen --> 4002 000036C5 BA7374 <1> mov dx, "st" 4003 000036C8 80FC31 <1> cmp ah, '1' 4004 000036CB 7412 <1> je .gotsuf ; if low digit was one --> 4005 000036CD BA6E64 <1> mov dx, "nd" 4006 000036D0 80FC32 <1> cmp ah, '2' 4007 000036D3 740A <1> je .gotsuf ; if low digit was two --> 4008 000036D5 B272 <1> mov dl, 'r' 4009 000036D7 80FC33 <1> cmp ah, '3' 4010 000036DA 7403 <1> je .gotsuf ; if low digit was three --> 4011 <1> .gotsuf_th: 4012 000036DC BA7468 <1> mov dx, "th" 4013 <1> .gotsuf: 4014 000036DF 89D0 <1> mov ax, dx 4015 000036E1 AB <1> stosw 4016 000036E2 C3 <1> retn 4017 <1> 4018 <1> 4019 <1> %if _BREAKPOINTS 4020 <1> ; INP: ss:bp -> error info (points at first info word) 4021 <1> ; Each word provides information for one point we tried 4022 <1> ; to restore. The lowest info word corresponds to the 4023 <1> ; first bb breakpoint (bb 00), followed by the info word 4024 <1> ; for the second bb breakpoint (bb 01), and so on. 4025 <1> ; There are always as many info words as there are 4026 <1> ; bb breakpoints. 4027 <1> ; CHG: ax, bx, cx, dx, di, si 4028 <1> ; STT: sets es to ss 4029 <1> bb_handlefailedrestore: 4030 <1> %if _PM 4031 000036E3 E89101 <1> call resetmode 4032 <1> %endif 4033 000036E6 31FF <1> xor di, di 4034 000036E8 31C9 <1> xor cx, cx 4035 000036EA 16 <1> push ss 4036 000036EB 07 <1> pop es 4037 000036EC BE[0601] <1> mov si, b_bplist.bp 4038 <1> .loop: 4039 000036EF 8B03 <1> mov ax, word [bp + di] 4040 000036F1 F6C47F <1> test ah, 7Fh ; failed ? 4041 000036F4 7414 <1> jz .next 4042 000036F6 51 <1> push cx 4043 000036F7 57 <1> push di 4044 <1> ; cx = 0-based index 4045 000036F8 FF7402 <1> push word [si + 2] 4046 000036FB FF34 <1> push word [si] ; stack: linear address 4047 000036FD 8A5C08 <1> mov bl, byte [si + BPSIZE - 1] 4048 <1> ; bl = what we tried to restore 4049 00003700 B740 <1> mov bh, 40h ; bh = 40h (bb) 4050 00003702 80CC80 <1> or ah, 80h ; ah & 80h = set (is restore) 4051 00003705 E8A509 <1> call display_breakpoint_failure 4052 00003708 5F <1> pop di 4053 00003709 59 <1> pop cx 4054 <1> .next: 4055 0000370A 83C609 <1> add si, BPSIZE 4056 0000370D AF <1> scasw ; di += 2 4057 0000370E 41 <1> inc cx 4058 0000370F 83F910 <1> cmp cx, _NUM_B_BP 4059 00003712 72DB <1> jb .loop 4060 <1> .end: 4061 00003714 C3 <1> retn 4062 <1> %endif 4063 <1> 4064 <1> 4065 <1> %if _NUM_G_BP 4066 <1> ; INP: cx = number of restored points (number of info words) 4067 <1> ; ss:bp-> error info (points *behind* last info word) 4068 <1> ; Each word provides information for one point we tried 4069 <1> ; to restore. The lowest info word corresponds to the 4070 <1> ; first gg breakpoint, followed by the info word for 4071 <1> ; the second gg breakpoint (if any), and so on. 4072 <1> ; CHG: ax, bx, cx, dx, di, si 4073 <1> ; STT: sets es to ss 4074 <1> gg_handlefailedrestore: 4075 <1> %if _PM 4076 00003715 E85F01 <1> call resetmode 4077 <1> %endif 4078 00003718 89CF <1> mov di, cx 4079 0000371A 01FF <1> add di, di 4080 0000371C F7DF <1> neg di 4081 0000371E 16 <1> push ss 4082 0000371F 07 <1> pop es 4083 00003720 BB0000 <1> mov bx, 0 4084 00003723 BE[7C07] <1> mov si, g_bplist.bp 4085 00003726 E325 <1> jcxz .end 4086 <1> .loop: 4087 00003728 8B03 <1> mov ax, word [bp+di] 4088 0000372A F6C47F <1> test ah, 7Fh ; failed? 4089 0000372D 7416 <1> jz .next ; no --> 4090 <1> 4091 <1> ; si-> point 4092 <1> ; ax = info (ah = reason, al = new value if reason 3) 4093 <1> ; bx = point's 0-based index 4094 <1> .display: 4095 0000372F 53 <1> push bx 4096 00003730 57 <1> push di 4097 00003731 89D9 <1> mov cx, bx ; cx = 0-based index 4098 00003733 FF7402 <1> push word [si + 2] 4099 00003736 FF34 <1> push word [si] ; stack: linear address 4100 00003738 8A5C08 <1> mov bl, byte [si + BPSIZE - 1] 4101 <1> ; bl = what we tried to restore 4102 0000373B B780 <1> mov bh, 80h ; bh = 80h (gg) 4103 0000373D 80CC80 <1> or ah, 80h ; ah & 80h = set (is restore) 4104 00003740 E86A09 <1> call display_breakpoint_failure 4105 00003743 5F <1> pop di 4106 00003744 5B <1> pop bx 4107 <1> .next: 4108 00003745 43 <1> inc bx ; increment counter 4109 00003746 83C609 <1> add si, BPSIZE ; -> next point 4110 00003749 47 <1> inc di 4111 0000374A 47 <1> inc di ; di+bp-> next error info 4112 0000374B 75DB <1> jnz .loop ; not yet at end --> 4113 <1> .end: 4114 0000374D C3 <1> retn 4115 <1> %endif ; _NUM_G_BP 4116 <1> 4117 <1> 4118 <1> ; INP: word [reg_cs] 4119 <1> ; (d)word [reg_eip] 4120 <1> ; OUT: bx = word [reg_cs] 4121 <1> ; CY if invalid address 4122 <1> ; NC if address is valid, 4123 <1> ; dx:ax = linear address 4124 <1> ; CHG: edx, ax, ecx 4125 <1> get_cseip_minus_1_linear: 4126 0000374E 66 <1> _386_PM_o32 ; or ecx, byte -1 4127 0000374F 83C9FF <1> or cx, byte -1 4128 <1> 4129 <1> ; INP: word [reg_cs] 4130 <1> ; (d)word [reg_eip] 4131 <1> ; (e)cx = adjustment to (e)ip 4132 <1> ; OUT: bx = word [reg_cs] 4133 <1> ; CY if invalid address 4134 <1> ; NC if address is valid, 4135 <1> ; dx:ax = linear address 4136 <1> ; CHG: edx, ax 4137 <1> get_cseip_ecx_linear: 4138 00003752 8B1E[900C] <1> mov bx, [reg_cs] ; bx = cs 4139 00003756 66 <1> _386_PM_o32 4140 00003757 8B16[9C0C] <1> mov dx, [reg_eip] ; (e)dx = (e)ip 4141 0000375B 66 <1> _386_PM_o32 4142 0000375C 01CA <1> add dx, cx ; bx:(e)dx = adjusted cs:(e)ip 4143 <1> ; (getlinear doesn't use the high word of edx if it's a 16-bit cs) 4144 <1> ; call getlinear ; dx:ax = linear address of this cs:eip 4145 <1> ; (fall through) 4146 <1> 4147 <1> ; INP: If currently in RM, 4148 <1> ; bx:dx = segment:offset of address 4149 <1> ; If currently in PM, 4150 <1> ; bx:(e)dx = selector:offset of address 4151 <1> ; OUT: bx = unchanged (selector/segment) 4152 <1> ; CY if address is invalid, 4153 <1> ; because Int31.0006 failed for bx or 4154 <1> ; because 32-bit address overflowed or 4155 <1> ; because A20 could not be switched on 4156 <1> ; NC if address is valid, 4157 <1> ; dx:ax = linear address 4158 <1> ; dh is always zero if the address is in RM address space 4159 <1> ; CHG: dx, ax 4160 <1> getlinear: 4161 <1> %if _PM 4162 0000375E E81601 <1> call resetmode 4163 <1> ; This must execute in the correct mode, 4164 <1> ; because we get the input from whatever 4165 <1> ; mode we were originally entered in. 4166 <1> %endif 4167 <1> %if _DEBUG1 4168 <1> call .do_not_use_test ; get linear address 4169 <1> jc @F ; already an error ? then return --> 4170 <1> push bx 4171 <1> push cx 4172 <1> mov bx, test_records_getLinear 4173 <1> call handle_test_case_multiple_16 4174 <1> ; check whether this should testcase the error 4175 <1> ; CY to indicate error from this call 4176 <1> pop cx 4177 <1> pop bx 4178 <1> @@: 4179 <1> retn 4180 <1> 4181 <1> %endif 4182 <1> .do_not_use_test: 4183 00003761 53 <1> push bx 4184 <1> %if _PM 4185 00003762 E8645A <1> call ispm 4186 00003765 7521 <1> jnz .rm 4187 00003767 B80600 <1> mov ax, 0006h 4188 0000376A 51 <1> push cx 4189 0000376B 52 <1> push dx 4190 0000376C CD31 <1> int 31h ; get selector base address into cx:dx 4191 0000376E 58 <1> pop ax ; (edxh:)ax = offset, cx:dx = base 4192 0000376F 7214 <1> jc .return_cx_bx 4193 <1> 4194 00003771 E8C025 <1> _386 call test_d_b_bit 4195 00003774 7406 <1> _386 jz .16 4196 00003776 6652 <1> _386 push edx 4197 00003778 5B <1> _386 pop bx 4198 00003779 5B <1> _386 pop bx ; bx = high word edx (in 32-bit PM segment) 4199 0000377A EB02 <1> _386 jmp .32 4200 <1> .16: ; bx:ax = offset 4201 0000377C 31DB <1> xor bx, bx ; 16-bit PM segment, clear offset high word 4202 <1> .32: 4203 0000377E 01D0 <1> add ax, dx 4204 00003780 11CB <1> adc bx, cx ; add the base 4205 00003782 87DA <1> xchg bx, dx ; dx:ax = 32-bit linear address 4206 00003784 F8 <1> clc 4207 <1> 4208 <1> .return_cx_bx: 4209 00003785 59 <1> pop cx 4210 00003786 5B <1> pop bx 4211 00003787 C3 <1> retn 4212 <1> .rm: 4213 <1> %endif 4214 00003788 89D8 <1> mov ax, bx 4215 0000378A 51 <1> push cx 4216 0000378B B104 <1> mov cl, 4 4217 0000378D D3C0 <1> rol ax, cl 4218 0000378F 59 <1> pop cx 4219 00003790 BBF0FF <1> mov bx, 0FFF0h 4220 00003793 21C3 <1> and bx, ax ; bx = low word adjustment 4221 00003795 83E00F <1> and ax, byte 0Fh ; ax = higher bits which don't fit in the low word 4222 00003798 01DA <1> add dx, bx 4223 0000379A 83D000 <1> adc ax, byte 0 4224 0000379D 92 <1> xchg ax, dx ; dx:ax = 21-bit linear address 4225 0000379E F606[9D00]10 <1> testopt [internalflags], debuggeeA20 4226 000037A3 7503 <1> jnz .return_bx ; A20 line enabled, no need to adjust (NC) 4227 000037A5 80E2EF <1> and dl, ~10h ; clear corresponding bit of the address if it was set (NC) 4228 <1> .return_bx: 4229 000037A8 5B <1> pop bx 4230 000037A9 C3 <1> retn 4231 <1> 4232 <1> 4233 <1> ; INP: bx = segment/selector to use by default 4234 <1> ; al = next character in input 4235 <1> ; si -> following character in input 4236 <1> ; OUT: NC if successful, 4237 <1> ; bx:dx = linear address 4238 <1> ; (if not _PM, this always fits in 24 bits) 4239 <1> ; al = next character 4240 <1> ; si -> following character 4241 <1> ; (d)word [bp_offset] = preferred offset, -1 if none 4242 <1> ; CY if error 4243 <1> ; CHG: edx, bx, ax, si, (d)word [bp_offset] 4244 <1> getlinearaddr: 4245 <1> %if _PM 4246 000037AA E8CA00 <1> call resetmode 4247 <1> %endif 4248 000037AD 66 <1> _386_PM_o32 ; or dword 4249 000037AE 830E[5085]FF <1> or word [bp_offset], strict byte -1 4250 000037B3 E87781 <1> call skipcomm0 4251 000037B6 3C40 <1> cmp al, '@' 4252 000037B8 752B <1> jne .at_not 4253 000037BA AC <1> lodsb ; insure we have a blank or opening parens 4254 000037BB 3C28 <1> cmp al, '(' 4255 000037BD 740A <1> je .at 4256 000037BF 3C09 <1> cmp al, 9 4257 000037C1 7406 <1> je .at 4258 000037C3 3C20 <1> cmp al, 32 4259 000037C5 7402 <1> je .at 4260 000037C7 EB19 <1> jmp .at_not_reload ; assume the @ is part of a symbol 4261 <1> 4262 <1> .at: 4263 000037C9 E89081 <1> call skipwh0 4264 000037CC 3C28 <1> cmp al, '(' 4265 000037CE 750D <1> jne .at_not_paren 4266 <1> 4267 000037D0 E82C7B <1> call getdword 4268 000037D3 E88681 <1> call skipwh0 4269 000037D6 3C29 <1> cmp al, ')' 4270 000037D8 7521 <1> jne .error 4271 000037DA AC <1> lodsb 4272 <1> 4273 000037DB EB03 <1> jmp .at_got 4274 <1> 4275 <1> .at_not_paren: 4276 000037DD E81F7B <1> call getdword 4277 <1> .at_got: 4278 <1> %ifn _PM 4279 <1> ; test bh, bh 4280 <1> ; jnz .error 4281 <1> cmp bx, 11h 4282 <1> jae .error 4283 <1> %endif 4284 000037E0 F8 <1> clc 4285 000037E1 C3 <1> retn 4286 <1> 4287 <1> .at_not_reload: 4288 000037E2 4E <1> dec si 4289 000037E3 4E <1> dec si 4290 000037E4 AC <1> lodsb 4291 <1> .at_not: 4292 000037E5 E83071 <1> call getaddrX 4293 <1> %if _PM 4294 000037E8 8326[5285]00 <1> _no386 and word [bp_offset + 2], 0 4295 <1> %endif 4296 000037ED 66 <1> _386_PM_o32 ; mov dword [bp_offset], edx 4297 000037EE 8916[5085] <1> mov word [bp_offset], dx 4298 000037F2 50 <1> push ax 4299 000037F3 E868FF <1> call getlinear 4300 000037F6 93 <1> xchg bx, ax ; dx:bx = linear 4301 000037F7 87D3 <1> xchg dx, bx ; bx:dx = linear 4302 000037F9 58 <1> pop ax ; al = next character 4303 000037FA C3 <1> retn 4304 <1> 4305 <1> .error: 4306 000037FB F9 <1> stc 4307 000037FC C3 <1> retn 4308 <1> 4309 <1> 4310 <1> usesection lDEBUG_DATA_ENTRY 4311 <1> align 4, db 0 4312 00008550 0000 <1> bp_offset: dw 0 4313 <1> %if _PM 4314 00008552 0000 <1> dw 0 4315 <1> %endif 4316 <1> usesection lDEBUG_CODE 4317 <1> 4318 <1> 4319 <1> ; INP: word [reg_cs] 4320 <1> ; (d)word [reg_eip] 4321 <1> ; dword [tpg_possible_breakpoint] 4322 <1> ; [internalflags2] & dif2_tpg_have_bp 4323 <1> ; OUT: CY if invalid address 4324 <1> ; NC if address is valid, 4325 <1> ; dx:ax = linear address 4326 <1> ; CHG: edx, ax, ecx, bx 4327 <1> ; STT: ds = ss = debugger data selector 4328 <1> get_cseip_of_possible_breakpoint: 4329 000037FD A1[BC00] <1> mov ax, [tpg_possible_breakpoint] 4330 00003800 8B16[BE00] <1> mov dx, [tpg_possible_breakpoint + 2] 4331 <1> ; dx:ax = stored possible breakpoint address 4332 00003804 F606[A100]01 <1> testopt [internalflags2], dif2_tpg_have_bp 4333 00003809 7511 <1> jnz .retn ; (NC) if already stored --> 4334 0000380B E840FF <1> call get_cseip_minus_1_linear 4335 <1> ; dx:ax = linear address at cs:(e)ip - 1 4336 0000380E 720C <1> jc .retn ; (CY) if getlinear failed --> 4337 00003810 A3[BC00] <1> mov [tpg_possible_breakpoint], ax 4338 00003813 8916[BE00] <1> mov [tpg_possible_breakpoint + 2], dx 4339 <1> ; store for later use 4340 00003817 800E[A100]01 <1> setopt [internalflags2], dif2_tpg_have_bp 4341 <1> ; (NC) 4342 <1> .retn: 4343 0000381C C3 <1> retn 4344 <1> 4345 <1> 4346 <1> %if _PM 4347 <1> 4348 <1> ; DEBUGX: when a mode switch from PM to RM did occur in the debuggee, 4349 <1> ; breakpoint addresses in non-RM address space are unreachable. 4350 <1> ; To enable the debugger to reset the breakpoints, it has to switch 4351 <1> ; temporarily to PM. (In DEBUG/X 1.19, a switch from RM to PM in the 4352 <1> ; debuggee will temporarily switch the debugger back to RM too. We 4353 <1> ; handle this case without a switch as the linear RM address can be 4354 <1> ; accessed directly in PM, assuming that the DPMI hosts linear-to- 4355 <1> ; physical mapping for the RM address space is the same as the one 4356 <1> ; we get in PM.) 4357 <1> 4358 <1> ; (To use mode switching in any case, the format the breakpoints are 4359 <1> ; stored in needs to be modified. Additionally, the mode switching 4360 <1> ; needs to be done elsewhere instead of in getsegmented. resetmode 4361 <1> ; can be used as is, even if a mode switch from PM to RM occured.) 4362 <1> 4363 <1> switchmode: 4364 <1> ;--- raw switch: 4365 <1> ;--- si:e/di: new cs:e/ip 4366 <1> ;--- dx:e/bx: new ss:e/sp 4367 <1> ;--- ax: new ds 4368 <1> ;--- cx: new es 4369 0000381D 6631DB <1> _386 xor ebx, ebx ; clear ebxh 4370 00003820 89E3 <1> mov bx, sp 4371 00003822 6631FF <1> _386 xor edi, edi ; clear edih 4372 00003825 BF[4C38] <1> mov di, .back_after_switch 4373 00003828 E89E59 <1> call ispm 4374 0000382B 740F <1> jz .pm 4375 <1> .r86m: 4376 <1> d4 call d4message 4377 <1> d4 asciz "In switchmode.r86m",13,10 4378 0000382D A1[D488] <1> mov ax, [dssel] ; switch rm -> pm 4379 00003830 8B36[D000] <1> mov si, [code_sel] 4380 00003834 89C2 <1> mov dx, ax 4381 00003836 89C1 <1> mov cx, ax 4382 00003838 FF2E[C088] <1> jmp far [dpmi_rm2pm] 4383 <1> .pm: 4384 <1> d4 call d4message 4385 <1> d4 asciz "In switchmode.pm",13,10 4386 0000383C A1[A60A] <1> mov ax, [pspdbg] ; switch pm -> rm 4387 0000383F 8B36[CE00] <1> mov si, [code_seg] 4388 00003843 89C2 <1> mov dx, ax 4389 00003845 89C1 <1> mov cx, ax 4390 00003847 66 <1> _386_o32 ; jmp far dword [dpmi_pm2rm] 4391 00003848 FF2E[C888] <1> jmp far [dpmi_pm2rm] 4392 <1> 4393 <1> .back_after_switch: 4394 0000384C 8036[9D00]08 <1> xoropt [internalflags], protectedmode 4395 <1> d4 call d4message 4396 <1> d4 asciz "In switchmode.back_after_switch",13,10 4397 00003851 C3 <1> retn 4398 <1> 4399 <1> 4400 <1> ; INP: al = direction, 0 = save state, 1 = restore state 4401 <1> ; [auxbuff] = state buffer 4402 <1> ; ES = debugger data selector 4403 <1> ; CHG: edi 4404 <1> sr_state: 4405 00003852 F606[9E00]20 <1> testopt [internalflags], switchbuffer 4406 00003857 741B <1> jz .return ; no need to call --> 4407 00003859 66 <1> _386_o32 ; xor edi, edi 4408 0000385A 31FF <1> xor di, di 4409 0000385C E86A59 <1> call ispm 4410 0000385F 740A <1> jz .pm 4411 <1> .r86m: 4412 <1> d4 call d4message 4413 <1> d4 asciz "In sr_state.r86m",13,10 4414 00003861 8E06[F409] <1> mov es, word [auxbuff_segorsel + soaSegment] 4415 00003865 FF1E[C488] <1> call far [dpmi_rmsav] 4416 00003869 EB09 <1> jmp .return 4417 <1> 4418 <1> .pm: 4419 <1> d4 call d4message 4420 <1> d4 asciz "In sr_state.pm",13,10 4421 0000386B 8E06[F609] <1> mov es, word [auxbuff_segorsel + soaSelector] 4422 0000386F 66 <1> _386_o32 ; call far dword [dpmi_pmsav] 4423 00003870 FF1E[CE88] <1> call far [dpmi_pmsav] 4424 <1> .return: 4425 00003874 16 <1> push ss 4426 00003875 07 <1> pop es 4427 00003876 C3 <1> retn 4428 <1> 4429 <1> 4430 <1> ; INP: [internalflags] & modeswitched 4431 <1> ; OUT: flag cleared, mode switched back if had been switched 4432 <1> ; EI 4433 <1> ; CHG: - (not even flags!) 4434 <1> ; STT: es = ds = ss = gs = fs = debugger data segment/selector 4435 <1> ; 4436 <1> ; Switches back to RM if a mode switch to PM was done by getsegmented. 4437 <1> ; Does nothing otherwise. (Can be called multiple times.) 4438 <1> resetmode: 4439 00003877 9C <1> pushf 4440 00003878 F606[9E00]08 <1> testopt [internalflags], modeswitched ; switched mode previously ? 4441 0000387D 741A <1> jz .return ; no --> 4442 <1> d4 call d4message 4443 <1> d4 asciz "In resetmode (actually resetting)",13,10 4444 <1> subcpu 286 4445 0000387F 66 <1> _386_o32 4446 00003880 60 <1> pusha 4447 00003881 E899FF <1> call switchmode ; switch back to the mode we were entered in (RM) 4448 00003884 B001 <1> mov al, 1 4449 00003886 E8C9FF <1> call sr_state ; restore state 4450 00003889 E89C0B <1> call handle_mode_changed ; ! called with flag set 4451 0000388C 8026[9E00]F7 <1> clropt [internalflags], modeswitched ; reset the flag 4452 00003891 16 <1> _386 push ss 4453 00003892 0FA9 <1> _386 pop gs 4454 00003894 16 <1> _386 push ss 4455 00003895 0FA1 <1> _386 pop fs 4456 00003897 66 <1> _386_o32 4457 00003898 61 <1> popa 4458 <1> subcpureset 4459 <1> .return: 4460 00003899 9D <1> popf 4461 0000389A FB <1> sti 4462 0000389B C3 <1> retn 4463 <1> %endif 4464 <1> 4465 <1> ; INP: dx:ax = linear address 4466 <1> ; OUT: CY if inaccessible 4467 <1> ; NC if accessible, 4468 <1> ; bx:(e)dx = segment:offset or selector:offset address 4469 <1> ; A temporary mode switch from RM to PM might have occured. 4470 <1> ; This has to be reset by calling resetmode. 4471 <1> ; CHG: (e)ax, (e)bx, (e)dx, fs, gs 4472 <1> ; STT: es = ds = ss = our segment/selector 4473 <1> ; 4474 <1> ; It is assumed that only one byte needs to be accessed. 4475 <1> ; (A workaround to access multiple bytes would be to access each 4476 <1> ; byte separately and call this function for each of the bytes.) 4477 <1> ; 4478 <1> ; The TSR command code assumes that getsegmented.pm does not switch 4479 <1> ; modes and that it will return an offset in (e)dx that allows 4480 <1> ; 16-bit access. Adjust that code if either is no longer true. 4481 <1> getsegmented: 4482 <1> %if _DEBUG1 4483 <1> push bx 4484 <1> push cx 4485 <1> mov bx, test_records_getSegmented 4486 <1> call handle_test_case_multiple_16 4487 <1> pop cx 4488 <1> pop bx 4489 <1> jnc @F 4490 <1> ; stc ; (already CY if the conditional didn't jump) 4491 <1> retn 4492 <1> 4493 <1> @@: 4494 <1> %endif 4495 <1> .do_not_use_test: 4496 <1> 4497 <1> %if _PM 4498 0000389C E82A59 <1> call ispm 4499 0000389F 7513 <1> jnz .rm 4500 <1> .pm: 4501 000038A1 51 <1> push cx 4502 000038A2 8B1E[D888] <1> mov bx, word [scratchsel] 4503 000038A6 92 <1> xchg ax, dx 4504 000038A7 91 <1> xchg ax, cx ; cx:dx = linear address 4505 000038A8 B80700 <1> mov ax, 0007h 4506 000038AB CD31 <1> int 31h ; set base to the address 4507 000038AD 59 <1> pop cx 4508 000038AE 723B <1> jc .invalid 4509 <1> %if 0 ; scratchsel is expected by other code to access arbitrary data ?? 4510 <1> push cx 4511 <1> mov ax, 0008h 4512 <1> xor cx, cx 4513 <1> xor dx, dx 4514 <1> int 31h ; set limit to zero (access to one byte only) 4515 <1> pop cx 4516 <1> jc .invalid 4517 <1> %endif 4518 000038B0 66 <1> _386_o32 ; xor edx, edx 4519 000038B1 31D2 <1> xor dx, dx ; bx:(e)dx = selector:offset (using scratchsel with the address as base) 4520 000038B3 C3 <1> retn ; (NC) 4521 <1> %endif 4522 <1> .rm: 4523 000038B4 83FA10 <1> cmp dx, byte 10h ; check for address space 4524 000038B7 7249 <1> jb .nothma ; below HMA, normal access --> 4525 000038B9 7432 <1> je .checkhma ; possibly in HMA --> 4526 <1> .nonrmspace: ; above HMA 4527 <1> %if _PM 4528 <1> ; It's a PM address but we are in RM. 4529 000038BB F606[9E00]04 <1> testopt [internalflags], canswitchmode 4530 000038C0 7429 <1> jz .invalid ; can't switch to PM --> 4531 <1> .switchmodes: 4532 000038C2 66 <1> _386_o32 4533 000038C3 56 <1> push si 4534 000038C4 66 <1> _386_o32 4535 000038C5 57 <1> push di 4536 000038C6 66 <1> _386_o32 4537 000038C7 51 <1> push cx 4538 000038C8 66 <1> _386_o32 4539 000038C9 55 <1> push bp 4540 000038CA 52 <1> push dx 4541 000038CB 50 <1> push ax 4542 <1> d4 call d4message 4543 <1> d4 asciz "In getsegmented.switchmodes (switching to access memory beyond 1088 KiB)",13,10 4544 000038CC E82A0C <1> call remember_mode 4545 000038CF 800E[9E00]08 <1> setopt [internalflags], modeswitched ; set flag for resetmode 4546 000038D4 B000 <1> mov al, 0 4547 000038D6 E879FF <1> call sr_state ; save state 4548 000038D9 E841FF <1> call switchmode ; switch to PM 4549 000038DC E8490B <1> call handle_mode_changed ; ! called with flag set 4550 000038DF 58 <1> pop ax 4551 000038E0 5A <1> pop dx 4552 000038E1 66 <1> _386_o32 4553 000038E2 5D <1> pop bp 4554 000038E3 66 <1> _386_o32 4555 000038E4 59 <1> pop cx 4556 000038E5 66 <1> _386_o32 4557 000038E6 5F <1> pop di 4558 000038E7 66 <1> _386_o32 4559 000038E8 5E <1> pop si 4560 000038E9 EBB6 <1> jmp .pm 4561 <1> 4562 <1> .invalid: ; the address is inaccessible 4563 <1> %endif 4564 000038EB F9 <1> stc 4565 000038EC C3 <1> retn 4566 <1> 4567 <1> .checkhma: 4568 000038ED 83F8F0 <1> cmp ax, -10h ; valid offset for HMA ? 4569 000038F0 73C9 <1> jae .nonrmspace ; no, above HMA --> 4570 000038F2 F606[9D00]20 <1> testopt [internalflags], debuggerA20 ; A20 on, HMA accessible ? 4571 000038F7 74C2 <1> jz .nonrmspace ; no, treat as above HMA (DEBUGX) --> 4572 000038F9 BBFFFF <1> mov bx, 0FFFFh ; the HMA must always be addressed by segment FFFFh 4573 000038FC 83C010 <1> add ax, byte 10h ; and the offset is always at least 0010h (FFFFh:0010h = 00100000h) 4574 <1> ; (NC because we checked that this won't overflow) 4575 000038FF 92 <1> xchg ax, dx ; bx:dx = segment:offset 4576 00003900 EB11 <1> jmp .zero_edxh 4577 <1> 4578 <1> .nothma: 4579 00003902 51 <1> push cx 4580 00003903 B104 <1> mov cl, 4 4581 00003905 D3CA <1> ror dx, cl ; dx (high 4 bits) = high 4 bits of segment 4582 00003907 89C3 <1> mov bx, ax 4583 00003909 D3EB <1> shr bx, cl ; bx = low 12 bits of segment 4584 0000390B 09DA <1> or dx, bx ; dx = segment 4585 0000390D 83E00F <1> and ax, byte 0Fh ; ax = low 4 bits of linear, used as offset (NC) 4586 00003910 92 <1> xchg ax, dx 4587 00003911 93 <1> xchg ax, bx ; bx:dx = segment:offset 4588 00003912 59 <1> pop cx 4589 <1> .zero_edxh: 4590 00003913 660FB7D2 <1> _386_PM movzx edx, dx 4591 00003917 C3 <1> retn 4592 <1> 4593 <1> 4594 <1> ; T command - Trace. 4595 <1> tt: 4596 00003918 88C4 <1> mov ah, al 4597 0000391A 80E4DF <1> and ah, TOUPPER 4598 0000391D 80FC4D <1> cmp ah, 'M' 4599 00003920 7548 <1> jnz isnotmodeset 4600 00003922 E80780 <1> call skipcomma 4601 00003925 E8DE7F <1> call iseol? 4602 00003928 741C <1> je ismodeget 4603 0000392A E8B87E <1> call getword 4604 0000392D E8EB7F <1> call chkeol ; expect end of line here 4605 00003930 83FA01 <1> cmp dx, 1 4606 00003933 7603E9A66B <1> ja error 4607 00003938 7407 <1> je .set ; selected 1 --> 4608 <1> .clear: ; selected 0 4609 0000393A 8026[7C00]FD <1> clropt [options], traceints 4610 0000393F EB05 <1> jmp short .get 4611 <1> .set: 4612 00003941 800E[7C00]02 <1> setopt [options], traceints 4613 <1> .get: 4614 <1> ismodeget: 4615 00003946 B030 <1> mov al, '0' 4616 00003948 BE[217A] <1> mov si, tmode0 4617 0000394B F606[7C00]02 <1> testopt [options], traceints 4618 00003950 7404 <1> jz .zero 4619 00003952 40 <1> inc ax 4620 00003953 BE[1A7A] <1> mov si, tmode1 4621 <1> .zero: 4622 00003956 A2[067A] <1> mov byte [tmodev], al 4623 00003959 BF[0E08] <1> mov di, line_out 4624 0000395C 56 <1> push si 4625 0000395D BE[F879] <1> mov si, tmodes 4626 00003960 E80480 <1> call showstring 4627 00003963 5E <1> pop si 4628 00003964 E80080 <1> call showstring 4629 00003967 E9D480 <1> jmp putsline_crlf 4630 <1> 4631 <1> isnotmodeset: 4632 <1> %if _TTEST 4633 0000396A 50 <1> push ax 4634 0000396B 80FC54 <1> cmp ah, 'T' 4635 0000396E 7516 <1> jne @F 4636 00003970 8B04 <1> mov ax, word [si] 4637 00003972 25DFDF <1> and ax, TOUPPER_W 4638 00003975 3D4553 <1> cmp ax, "ES" 4639 00003978 750C <1> jne @F 4640 0000397A 8A4402 <1> mov al, byte [si + 2] 4641 0000397D 24DF <1> and al, TOUPPER 4642 0000397F 3C54 <1> cmp al, 'T' 4643 00003981 7503E9C900 <1> je ttestcmd 4644 <1> @@: 4645 00003986 58 <1> pop ax 4646 <1> %endif 4647 <1> %if _TSR 4648 00003987 80FC53 <1> cmp ah, 'S' 4649 0000398A 750D <1> jne @F 4650 0000398C 50 <1> push ax 4651 0000398D 8A04 <1> mov al, byte [si] 4652 0000398F 24DF <1> and al, TOUPPER 4653 00003991 3C52 <1> cmp al, 'R' 4654 00003993 58 <1> pop ax 4655 00003994 7503E9C401 <1> je tsr 4656 <1> %endif 4657 <1> @@: 4658 00003999 8026[9F00]F7 <1> clropt [internalflags], tt_p 4659 0000399E 80FC50 <1> cmp ah, 'P' 4660 000039A1 7506 <1> jne @F 4661 000039A3 AC <1> lodsb 4662 000039A4 800E[9F00]08 <1> setopt [internalflags], tt_p 4663 <1> @@: 4664 <1> tt0: 4665 000039A9 C706[DA0B][A939] <1> mov word [lastcmd], tt0 4666 000039AF 8026[A100]EF <1> clropt [internalflags2], dif2_is_pp 4667 000039B4 E89F0B <1> call parse_pt ; process arguments 4668 <1> 4669 <1> ; Do it times. 4670 <1> tt1: 4671 000039B7 53 <1> push bx 4672 000039B8 51 <1> push cx 4673 <1> 4674 000039B9 F606[9F00]08 <1> testopt [internalflags], tt_p 4675 000039BE 7449 <1> jz .not_p 4676 <1> 4677 <1> %if _PM 4678 000039C0 E8B4FE <1> call resetmode 4679 <1> %endif 4680 000039C3 BA0F00 <1> mov dx, 15 ; DL = number of bytes to go; DH = prefix flags. 4681 000039C6 8B1E[900C] <1> mov bx, word [reg_cs] 4682 000039CA 66 <1> _386_PM_o32 ; mov esi, dword [reg_eip] 4683 000039CB 8B36[9C0C] <1> mov si, word [reg_eip] 4684 <1> .pp2: 4685 000039CF E84108 <1> call pp16 ; get next instruction byte into AL 4686 000039D2 BF[E410] <1> mov di, ppbytes 4687 000039D5 B91800 <1> mov cx, PPLEN_ONLY_STRING 4688 000039D8 F2AE <1> repne scasb 4689 000039DA 752D <1> jne .not_p ; if not one of these --> 4690 000039DC 8A451E <1> mov al,byte [di+PPLEN-1]; get corresponding byte in ppinfo 4691 000039DF A880 <1> test al, PP_PREFIX ; prefix ? 4692 000039E1 740E <1> jz .pp3 ; no --> 4693 000039E3 08C6 <1> or dh, al ; set the OSIZE or ASIZE flags if either of these 4694 <1> ; Note: Multiple OSIZE in a 16-bit cs do not toggle 4695 <1> ; between decoding as O32 and O16, they're always 4696 <1> ; decoded as O32. The same is true for A32, and 4697 <1> ; in a 32-bit cs for O16 and A16. 4698 000039E5 FECA <1> dec dl 4699 000039E7 75E6 <1> jnz .pp2 ; if not out of bytes --> 4700 000039E9 BA[D971] <1> mov dx, msg.warnprefix 4701 000039EC E8CD83 <1> call putsz 4702 000039EF EB18 <1> jmp .not_p 4703 <1> 4704 <1> ; A repeatable string instruction is to be decoded. 4705 <1> ; Finish the decoding and skip the appropriate number 4706 <1> ; of opcode bytes. 4707 <1> .pp3: 4708 000039F1 E83104 <1> _386_PM call pp_fix32bitflags 4709 000039F4 A847 <1> test al, PP_VARSIZ | PP_SIZ_MASK 4710 000039F6 7403E9E36A <1> jnz error 4711 <1> %if 0 4712 <1> test al, PP_VARSIZ ; different opcode length depends on OSIZE ? 4713 <1> jz .ignoreosize ; no --> 4714 <1> and dh, 2 4715 <1> add al, dh 4716 <1> .ignoreosize: 4717 <1> and ax, PP_SIZ_MASK 4718 <1> _386_PM movzx eax, ax ; clear high word (in case it counts) 4719 <1> _386_PM_o32 ; add esi, eax 4720 <1> add si, ax 4721 <1> %endif 4722 <1> ; pp10: 4723 <1> ; jmp short pp11 ; we have a skippable instruction here 4724 <1> ; pp11: 4725 000039FB E83323 <1> _386_PM call resetmode_and_test_d_b_bit 4726 000039FE 7504 <1> _386_PM jnz .32 ; full 32-bit offset valid --> 4727 00003A00 660FB7F6 <1> _386_PM movzx esi, si ; clear high word here 4728 <1> .32: 4729 00003A04 E87607 <1> call proceedbreakpoint ; run until the breakpoint is hit 4730 <1> ; This call might return modeswitched. 4731 00003A07 EB03 <1> jmp short @F 4732 <1> 4733 <1> .not_p: 4734 00003A09 E87502 <1> call traceone ; call common code 4735 <1> @@: 4736 00003A0C 7303E93702 <1> jc unexpectedinterrupt ; an unexpected interrupt occured --> 4737 <1> %if _BREAKPOINTS 4738 00003A11 7416 <1> jz @F ; (breakpoint after instruction was hit) 4739 <1> 4740 <1> ; bb breakpoint was hit. dumpregs, then return 4741 00003A13 E8D600 <1> call handle_bb_hit_pass_match 4742 00003A16 7204 <1> jc .actual_hit ; actual match ? --> 4743 00003A18 7418 <1> jz tt2.nodump ; non-silent mode ? --> 4744 00003A1A EB0D <1> jmp tt2 ; silent mode --> 4745 <1> 4746 <1> .actual_hit: 4747 <1> %if _PM 4748 00003A1C E858FE <1> call resetmode 4749 <1> %endif 4750 00003A1F E829F8 <1> call put_deferred_message_silent 4751 00003A22 E85D05 <1> call dumpregs_extended_silent 4752 00003A25 59 <1> pop cx 4753 00003A26 5B <1> pop bx ; (discard counter) 4754 00003A27 EB1C <1> jmp @FF 4755 <1> @@: 4756 <1> %endif 4757 <1> tt2: 4758 <1> %if _PM 4759 00003A29 E84BFE <1> call resetmode 4760 <1> %endif 4761 00003A2C E81CF8 <1> call put_deferred_message_silent 4762 00003A2F E85005 <1> call dumpregs_extended_silent 4763 <1> ; dump registers 4764 <1> .nodump: 4765 <1> 4766 00003A32 E85600 <1> call tt_handle_while 4767 00003A35 59 <1> pop cx 4768 00003A36 5B <1> pop bx 4769 <1> 4770 00003A37 83E901 <1> sub cx, 1 4771 00003A3A 83DB00 <1> sbb bx, 0 ; decrement loop counter 4772 <1> 4773 00003A3D 85DB <1> test bx, bx 4774 00003A3F 750B <1> jnz tt1_jmp ; loop --> 4775 00003A41 85C9 <1> test cx, cx 4776 00003A43 7507 <1> jnz tt1_jmp ; loop --> 4777 <1> 4778 <1> @@: 4779 <1> %if _PM 4780 00003A45 E82FFE <1> call resetmode 4781 <1> %endif 4782 00003A48 E8B182 <1> call silence_dump 4783 <1> 4784 00003A4B C3 <1> retn 4785 <1> 4786 <1> tt1_jmp: 4787 00003A4C E968FF <1> jmp tt1 4788 <1> 4789 <1> 4790 <1> %if _TTEST 4791 <1> ttestcmd: 4792 00003A4F 58 <1> pop ax 4793 00003A50 46 <1> inc si 4794 00003A51 46 <1> inc si 4795 00003A52 46 <1> inc si 4796 00003A53 E8057F <1> call skipwhite 4797 <1> 4798 <1> .tt0: 4799 00003A56 C706[DA0B][563A] <1> mov word [lastcmd], .tt0 4800 00003A5C 8026[A100]EF <1> clropt [internalflags2], dif2_is_pp 4801 00003A61 E8F20A <1> call parse_pt ; process arguments 4802 <1> 4803 <1> ; Do it times. 4804 <1> .tt1: 4805 00003A64 53 <1> push bx 4806 00003A65 51 <1> push cx 4807 <1> 4808 <1> .tt2: 4809 <1> %if _PM 4810 00003A66 E80EFE <1> call resetmode 4811 <1> %endif 4812 00003A69 E8DFF7 <1> call put_deferred_message_silent 4813 00003A6C E81305 <1> call dumpregs_extended_silent 4814 <1> ; dump registers 4815 <1> .nodump: 4816 <1> 4817 00003A6F E81900 <1> call tt_handle_while 4818 00003A72 59 <1> pop cx 4819 00003A73 5B <1> pop bx 4820 <1> 4821 00003A74 83E901 <1> sub cx, 1 4822 00003A77 83DB00 <1> sbb bx, 0 ; decrement loop counter 4823 <1> 4824 00003A7A 85DB <1> test bx, bx 4825 00003A7C 750B <1> jnz .tt1_jmp ; loop --> 4826 00003A7E 85C9 <1> test cx, cx 4827 00003A80 7507 <1> jnz .tt1_jmp ; loop --> 4828 <1> 4829 <1> @@: 4830 <1> %if _PM 4831 00003A82 E8F2FD <1> call resetmode 4832 <1> %endif 4833 00003A85 E87482 <1> call silence_dump 4834 <1> 4835 00003A88 C3 <1> retn 4836 <1> 4837 <1> .tt1_jmp: 4838 00003A89 EBD9 <1> jmp .tt1 4839 <1> %endif 4840 <1> 4841 <1> 4842 <1> tt_handle_while: 4843 00003A8B F606[9F00]04 <1> testopt [internalflags], tt_while 4844 00003A90 7434 <1> jz @F 4845 <1> 4846 <1> %if _PM 4847 00003A92 E8E2FD <1> call resetmode 4848 <1> %endif 4849 00003A95 E82F00 <1> call .copy_condition_to_line_out 4850 <1> ; dx = si -> line_out with condition 4851 00003A98 FF36[F00A] <1> push word [rc] 4852 00003A9C 8F06[F20A] <1> pop word [priorrc] 4853 00003AA0 AC <1> lodsb 4854 00003AA1 E85B78 <1> call getexpression ; parse stored expression 4855 00003AA4 E8747E <1> call chkeol 4856 00003AA7 E86772 <1> call toboolean ; get boolean 4857 00003AAA 85D2 <1> test dx, dx ; true ? 4858 00003AAC 7518 <1> jnz @F ; yes, continue --> 4859 <1> 4860 00003AAE E84B82 <1> call silence_dump 4861 <1> 4862 00003AB1 BA[4369] <1> mov dx, msg.while_terminated_before 4863 00003AB4 E80583 <1> call putsz 4864 00003AB7 E80D00 <1> call .copy_condition_to_line_out 4865 00003ABA E8FF82 <1> call putsz ; display condition 4866 00003ABD BA[5569] <1> mov dx, msg.while_terminated_after 4867 00003AC0 E8F982 <1> call putsz 4868 00003AC3 E93AC5 <1> jmp cmd3 4869 <1> 4870 <1> @@: 4871 00003AC6 C3 <1> retn 4872 <1> 4873 <1> 4874 <1> .copy_condition_to_line_out: 4875 00003AC7 8E06[F209] <1> mov es, word [auxbuff_segorsel] 4876 00003ACB 31FF <1> xor di, di ; -> stored expression (if not PM) 4877 <1> %if _PM 4878 00003ACD 033E[F009] <1> add di, word [auxbuff_switchbuffer_size] 4879 <1> ; -> stored expression 4880 <1> %endif 4881 00003AD1 89FE <1> mov si, di 4882 00003AD3 B9FFFF <1> mov cx, -1 4883 00003AD6 B000 <1> mov al, 0 4884 00003AD8 F2AE <1> repne scasb 4885 00003ADA F7D1 <1> not cx ; = length, including zero terminator 4886 00003ADC 06 <1> push es 4887 00003ADD 1F <1> pop ds ; ds:si -> auxbuff stored expression 4888 00003ADE 16 <1> push ss 4889 00003ADF 07 <1> pop es 4890 00003AE0 BF[0E08] <1> mov di, line_out ; -> line_out 4891 00003AE3 57 <1> push di 4892 00003AE4 F3A4 <1> rep movsb ; move over 4893 00003AE6 5E <1> pop si 4894 <1> 4895 00003AE7 89F2 <1> mov dx, si 4896 00003AE9 16 <1> push ss 4897 00003AEA 1F <1> pop ds ; -> line_out 4898 00003AEB C3 <1> retn 4899 <1> 4900 <1> 4901 <1> ; INP: cl = flags indicating what kind of bb match occurred 4902 <1> ; cl & 1 set if actual hit, 4903 <1> ; else cl & 2 set if pass match, 4904 <1> ; else it is a non-pass non-hit match 4905 <1> ; (cl & 4 always set (indicates any bb match)) 4906 <1> ; cl & 8 set if pp/tt breakpoint hit 4907 <1> ; dword [ss:sp] = command repetition counter 4908 <1> ; OUT: NC if pass match or non-pass non-hit match, 4909 <1> ; if pass match: deferred message output, dumpregs output 4910 <1> ; if cl & 8 set (pass/nonpass bb, tt/pp hit): 4911 <1> ; ZR if [internalflags] & tt_silent_mode clear 4912 <1> ; NZ if [internalflags] & tt_silent_mode set 4913 <1> ; if cl & 8 clear (pass/nonpass bb, no tt/pp hit): 4914 <1> ; ZR 4915 <1> ; dword [ss:sp] increased by 1 4916 <1> ; CY if actual hit (hit bb) 4917 <1> ; ax = INP:cx 4918 <1> ; CHG: dx, bx, cx, si, di, all high words, fs, gs 4919 <1> ; STT: ds = es = ss 4920 <1> handle_bb_hit_pass_match: 4921 <1> d5 call d5message 4922 <1> d5 asciz "in handle_bb_hit_pass_match",13,10 4923 <1> 4924 00003AEC 91 <1> xchg ax, cx 4925 <1> 4926 00003AED F606[A100]08 <1> testopt [internalflags2], dif2_bp_failure 4927 00003AF2 7567 <1> jnz .actual_hit ; after failure, handle as actual hit 4928 <1> 4929 00003AF4 A801 <1> test al, 1 ; actual hit ? else: non-hit, pass or non-pass 4930 00003AF6 7563 <1> jnz .actual_hit ; yes --> 4931 <1> 4932 00003AF8 A802 <1> test al, 2 ; at least pass match ? 4933 00003AFA 7418 <1> jz .nonpassnonhit ; no --> 4934 <1> 4935 <1> .passnonhit: 4936 <1> 4937 <1> d5 call d5message 4938 <1> d5 asciz "bb pass non-hit",13,10 4939 <1> 4940 <1> %if _PM 4941 00003AFC E878FD <1> call resetmode 4942 <1> %endif 4943 <1> ; call put_deferred_message_loud 4944 00003AFF BA[6370] <1> mov dx, msg.empty_message 4945 00003B02 8716[C000] <1> xchg dx, word [gg_deferred_message] 4946 00003B06 E8B382 <1> call putsz 4947 00003B09 BA[42BA] <1> mov dx, putsline 4948 00003B0C E849F7 <1> call put_bb_deferred_message_calling_dx 4949 <1> 4950 00003B0F 50 <1> push ax 4951 <1> ; call dumpregs_extended_loud 4952 <1> ; (includes handle_serial_flags_ctrl_c) 4953 00003B10 E89CEB <1> call dumpregs_extended 4954 00003B13 58 <1> pop ax ; (preserve so the test al, 8 can use it) 4955 <1> .nonpassnonhit: 4956 00003B14 E88C04 <1> call handle_serial_flags_ctrl_c 4957 <1> 4958 <1> ; al & 4 always set 4959 <1> 4960 00003B17 8026[A000]E9 <1> clropt [internalflags2], dif2_gg_skip_non_cseip | dif2_gg_skip_cseip | dif2_gg_first_detected 4962 00003B1C 800E[A000]01 <1> setopt [internalflags2], dif2_gg_is_first 4963 <1> 4964 00003B21 FF36[BA00] <1> push word [gg_next_cseip_linear + 2] 4965 00003B25 FF36[B800] <1> push word [gg_next_cseip_linear] 4966 00003B29 8F06[B400] <1> pop word [gg_first_cseip_linear] 4967 00003B2D 8F06[B600] <1> pop word [gg_first_cseip_linear + 2] 4968 <1> 4969 00003B31 A808 <1> test al, 8 ; not bb hit, is tt/pp hit ? 4970 00003B33 7519 <1> jnz @FF ; yes --> 4971 <1> 4972 00003B35 F706[A000]8010 <1> testopt [internalflags2], dif2_is_pp | dif2_tpg_keep_proceed_bp, 1 4973 00003B3B 7502 <1> jnz @F 4974 00003B3D EB0F <1> jmp @FF 4975 <1> 4976 <1> @@: 4977 <1> lframe near 4978 <1> lpar dword, counter 4979 <1> lpar_return 4980 00003B3F 5589E5 <1> lenter 4981 00003B42 83460401 <1> add word [bp + ?counter], 1 4982 00003B46 83560600 <1> adc word [bp + ?counter + 2], 0 4983 00003B4A 5D <1> lleave 4984 00003B4B 38C0 <1> cmp al, al ; (NC, ZR) 4985 00003B4D C3 <1> retn 4986 <1> 4987 <1> @@: 4988 00003B4E A802 <1> test al, 2 ; displayed pass point ? 4989 00003B50 7503 <1> jnz @F ; yes --> 4990 00003B52 A8FF <1> test al, -1 ; NC, NZ (do not skip dump) 4991 <1> ; al & 0Ch is set so this test is NZ 4992 00003B54 C3 <1> retn 4993 <1> 4994 <1> @@: 4995 00003B55 F606[9F00]10 <1> testopt [internalflags], tt_silent_mode 4996 <1> ; (NC, ZF is ZR if to skip dump) 4997 00003B5A C3 <1> retn 4998 <1> 4999 <1> .actual_hit: 5000 <1> d5 call d5message 5001 <1> d5 asciz "bb hit",13,10 5002 <1> 5003 00003B5B F9 <1> stc 5004 00003B5C C3 <1> retn 5005 <1> 5006 <1> 5007 <1> %if _TSR 5008 <1> tsr: 5009 00003B5D E89BC9 <1> call guard_re 5010 00003B60 46 <1> inc si 5011 00003B61 AC <1> lodsb 5012 00003B62 E8B67D <1> call chkeol 5013 00003B65 F606[9E00]40 <1> testopt [internalflags], tsrmode 5014 00003B6A 7405 <1> jz .try ; not yet resident --> 5015 00003B6C BA[595F] <1> mov dx, msg.alreadytsr 5016 00003B6F EB53 <1> jmp short .putsz 5017 <1> .try: 5018 00003B71 8B16[A40A] <1> mov dx, word [pspdbe] 5019 00003B75 8B1E[A60A] <1> mov bx, word [pspdbg] 5020 00003B79 BF0A00 <1> mov di, 0Ah 5021 <1> .loop: 5022 <1> %if _PM 5023 00003B7C 89D1 <1> mov cx, dx ; = original segment address 5024 00003B7E E84856 <1> call ispm 5025 00003B81 7514 <1> jnz .rm 5026 00003B83 53 <1> push bx 5027 00003B84 89D0 <1> mov ax, dx 5028 <1> [cpu 286] 5029 00003B86 C1EA0C <1> shr dx, 12 5030 00003B89 C1E004 <1> shl ax, 4 ; shift to get a 32-bit linear address 5031 <1> __CPU__ 5032 00003B8C E812FD <1> call getsegmented.pm ; set up selector for access 5033 <1> ; This call makes some assumptions: 5034 <1> ; - No mode switch occurs; we are still in PM. 5035 <1> ; Currently none is performed from PM. 5036 <1> ; - (e)dx isn't larger than about FFD0h. 5037 <1> ; Currently scratchsel with an offset of zero is returned. 5038 00003B8F 89D7 <1> mov di, dx ; -> PSP 5039 00003B91 89DA <1> mov dx, bx 5040 00003B93 5B <1> pop bx 5041 00003B94 83C70A <1> add di, byte 0Ah ; -> PSP termination vector 5042 <1> .rm: 5043 <1> %endif 5044 00003B97 8EC2 <1> mov es, dx 5045 00003B99 268B450C <1> mov ax, word [es:(di-0Ah)+16h] 5046 00003B9D 40 <1> inc ax 5047 00003B9E 741F <1> jz .pspnotfound 5048 00003BA0 48 <1> dec ax 5049 00003BA1 741C <1> jz .pspnotfound ; parent is invalid --> 5050 <1> %if _PM 5051 00003BA3 39C8 <1> cmp ax, cx 5052 <1> %else 5053 <1> cmp ax, dx 5054 <1> %endif 5055 00003BA5 7418 <1> je .pspnotfound ; parent is the process itself --> 5056 00003BA7 89C2 <1> mov dx, ax 5057 00003BA9 39D8 <1> cmp ax, bx 5058 00003BAB 75CF <1> jne .loop ; parent is not us --> 5059 00003BAD 26813D[D085] <1> cmp word [es:di], int22 5060 00003BB2 7506 <1> jne .psphooked 5061 00003BB4 26395D02 <1> cmp word [es:di+2], bx 5062 00003BB8 740D <1> je .found ; correct vector --> (otherwise: hooked) 5063 <1> .psphooked: 5064 00003BBA BA[F95E] <1> mov dx, msg.psphooked 5065 00003BBD EB03 <1> jmp short .putsz_es 5066 <1> .pspnotfound: 5067 00003BBF BA[CE5E] <1> mov dx, msg.pspnotfound 5068 <1> .putsz_es: 5069 00003BC2 16 <1> push ss 5070 00003BC3 07 <1> pop es 5071 <1> .putsz: 5072 00003BC4 E9F581 <1> jmp putsz 5073 <1> 5074 <1> .found: 5075 00003BC7 BE[C80A] <1> mov si, psp22 5076 00003BCA A5 <1> movsw 5077 00003BCB A5 <1> movsw ; write our parent's vector 5078 00003BCC 83C708 <1> add di, 16h-(0Ah+4) 5079 00003BCF A5 <1> movsw ; write our parent 5080 00003BD0 800E[9E00]40 <1> setopt [internalflags], tsrmode ; note that we are resident 5081 <1> %if _PM 5082 00003BD5 51 <1> push cx 5083 <1> %else 5084 <1> push es 5085 <1> %endif 5086 00003BD6 BA[375F] <1> mov dx, msg.nowtsr1 5087 00003BD9 E8E6FF <1> call .putsz_es 5088 00003BDC 58 <1> pop ax 5089 00003BDD BF[0E08] <1> mov di, line_out 5090 00003BE0 E8237E <1> call hexword 5091 00003BE3 E85C7E <1> call putsline 5092 00003BE6 BF[C80A] <1> mov di, psp22 5093 00003BE9 31C0 <1> xor ax, ax 5094 00003BEB AB <1> stosw 5095 00003BEC AB <1> stosw 5096 00003BED AB <1> stosw ; clear our parent/int22 fields 5097 00003BEE BA[475F] <1> mov dx, msg.nowtsr2 5098 00003BF1 EBD1 <1> jmp short .putsz 5099 <1> %endif 5100 <1> 5101 <1> 5102 <1> ; INP: dx -> message, zero-terminated 5103 <1> ; CHG: - 5104 <1> ; OUT: message displayed or put into silent buffer 5105 <1> ; STT: ds = es = ss = debugger data selector 5106 <1> putsz_silent: 5107 00003BF3 F606[9F00]10 <1> testopt [internalflags], tt_silent_mode 5108 00003BF8 7405 <1> jz @F 5109 00003BFA 800E[9F00]20 <1> setopt [internalflags], tt_silence 5110 <1> @@: 5111 00003BFF E8BA81 <1> call putsz ; print string 5112 00003C02 F606[9F00]10 <1> testopt [internalflags], tt_silent_mode 5113 00003C07 7405 <1> jz @F 5114 00003C09 8026[9F00]DF <1> clropt [internalflags], tt_silence 5115 <1> @@: 5116 00003C0E C3 <1> retn 5117 <1> 5118 <1> 5119 <1> ; INP: es:di -> behind message in line_out 5120 <1> ; CHG: ax, bx, cx, dx 5121 <1> ; OUT: message displayed or put into silent buffer 5122 <1> ; STT: ds = es = ss = debugger data selector 5123 <1> putsline_silent: 5124 00003C0F F606[9F00]10 <1> testopt [internalflags], tt_silent_mode 5125 00003C14 7405 <1> jz @F 5126 00003C16 800E[9F00]20 <1> setopt [internalflags], tt_silence 5127 <1> @@: 5128 00003C1B E8247E <1> call putsline 5129 00003C1E F606[9F00]10 <1> testopt [internalflags], tt_silent_mode 5130 00003C23 7405 <1> jz @F 5131 00003C25 8026[9F00]DF <1> clropt [internalflags], tt_silence 5132 <1> @@: 5133 00003C2A C3 <1> retn 5134 <1> 5135 <1> 5136 <1> ; INP: word [run_int] 5137 <1> ; InDOS status 5138 <1> ; STT: es = ds = ss 5139 <1> ; OUT: dx -> message 5140 <1> ; CHG: ax, di 5141 <1> getrunint: 5142 00003C2B 8B16[D80B] <1> mov dx, word [run_int] 5143 00003C2F 81FA[247D] <1> cmp dx, progtrm 5144 00003C33 7512 <1> jne .ret 5145 <1> 5146 00003C35 B8FFFF <1> mov ax, -1 5147 00003C38 E86F6A <1> call InDos 5148 00003C3B 7504 <1> jnz .no_int21_4D 5149 <1> 5150 00003C3D B44D <1> mov ah, 4Dh 5151 00003C3F CD21 <1> int 21h 5152 <1> .no_int21_4D: 5153 00003C41 BF[437D] <1> mov di, progexit 5154 00003C44 E8BF7D <1> call hexword 5155 <1> .ret: 5156 00003C47 C3 <1> retn 5157 <1> 5158 <1> 5159 <1> ; Print message about unexpected interrupt, dump registers, and 5160 <1> ; end command. This code is also used by the G and P commands. 5161 <1> unexpectedinterrupt: 5162 <1> %if _PM 5163 00003C48 E82CFC <1> call resetmode 5164 <1> %endif 5165 00003C4B E8DDFF <1> call getrunint 5166 00003C4E E8A2FF <1> call putsz_silent 5167 <1> %if _CATCHINT19 5168 00003C51 81FA[677B] <1> cmp dx, int19msg 5169 00003C55 7409 <1> je .noregs ; if it terminated, skip the registers 5170 <1> %endif 5171 00003C57 81FA[247D] <1> cmp dx, progtrm 5172 00003C5B 7403 <1> je .noregs ; if it terminated, skip the registers 5173 00003C5D E82203 <1> call dumpregs_extended_silent 5174 <1> .noregs: 5175 00003C60 E89980 <1> call silence_dump 5176 <1> 5177 00003C63 F606[A000]08 <1> testopt [internalflags2], dif2_gg_is_gg 5178 00003C68 7407 <1> jz @F 5179 00003C6A F606[7E00]20 <1> testopt [options], gg_unexpected_no_repeat 5180 00003C6F EB05 <1> jmp @FF 5181 <1> @@: 5182 00003C71 F606[7E00]40 <1> testopt [options], tp_unexpected_no_repeat 5183 <1> @@: 5184 00003C76 7406 <1> jz @F 5185 00003C78 C706[DA0B][E003] <1> mov word [lastcmd], dmycmd 5186 <1> @@: 5187 <1> 5188 00003C7E E97FC3 <1> jmp cmd3 ; back to the start 5189 <1> 5190 <1> 5191 <1> ; Trace an instruction. 5192 <1> ; INP: word [reg_cs], dword [reg_eip], other register values 5193 <1> ; OUT: NC if the breakpoint or trace interrupt was hit, 5194 <1> ; ah = 0 5195 <1> ; ch = 0 5196 <1> ; d[reg_eip] adjusted if a breakpoint (bb) hit 5197 <1> ; cx & 8 set if trace interrupt hit 5198 <1> ; (assumed to be the expected trace hit) 5199 <1> ; (ZF only set if _BREAKPOINTS) 5200 <1> ; ZR if trace interrupt was hit, 5201 <1> ; cx & 7 = 0 5202 <1> ; NZ if a breakpoint (bb) was hit (or both were hit), 5203 <1> ; cx & 1 set if non-pass match (actual hit), 5204 <1> ; else cx & 2 set if pass match (consider as hit first, 5205 <1> ; but dump registers next (not to silent buffer) 5206 <1> ; and then continue execution) 5207 <1> ; else cx & 4 always set, indicates any match 5208 <1> ; (including matches that should merely continue) 5209 <1> ; all pass points' counters stepped 5210 <1> ; CY if no breakpoint and no trace interrupt was hit, 5211 <1> ; cx = 0 5212 <1> ; If [internalflags2] & dif2_gg_is_gg is set: 5213 <1> ; ah & 7Fh = status = 0 = no error, 5214 <1> ; 1 = couldn't write, 5215 <1> ; 2 = unreachable, 5216 <1> ; 3 = overwritten, al = new value 5217 <1> ; ah & 80h = set if error restoring point, 5218 <1> ; else error writing point to begin with 5219 <1> ; If that flag is clear: 5220 <1> ; Does not return if a breakpoint cannot be written 5221 <1> ; or cannot be restored, jumps to cmd3 instead. 5222 <1> ; CHG: all 5223 <1> ; STT: ds = es = ss 5224 <1> ; might return modeswitched (if dif2_gg_is_gg) 5225 <1> ; might be called while modeswitched 5226 <1> traceone: 5227 00003C81 F606[A000]80 <1> testopt [internalflags2], dif2_tpg_keep_proceed_bp 5228 00003C86 7403E99A00 <1> jnz .proceedbreakpoint 5229 <1> 5230 <1> %if _PM 5231 00003C8B E8E9FB <1> call resetmode 5232 <1> %endif 5233 00003C8E 31C9 <1> xor cx, cx 5234 00003C90 E8495C <1> call getcseipbyte 5235 00003C93 3CCD <1> cmp al, 0CDh ; int opcode? 5236 00003C95 7403E98E00 <1> jne .isstdtrace ; no --> 5237 00003C9A 41 <1> inc cx 5238 00003C9B E83E5C <1> call getcseipbyte 5239 00003C9E 3C03 <1> cmp al, 3 5240 00003CA0 7503E98300 <1> je .isstdtrace ; int 3 opcode --> 5241 00003CA5 F606[7C00]02 <1> testopt [options], traceints ; TM=1? 5242 00003CAA 7503E9E800 <1> jz isstdtraceX 5243 00003CAF 3C01 <1> cmp al, 1 5244 00003CB1 7475 <1> je .isstdtrace ; int 1 opcode --> 5245 <1> 5246 <1> ; TM==1, single-step into the INT 5247 00003CB3 88C3 <1> mov bl, al 5248 <1> %if _PM 5249 00003CB5 E81155 <1> call ispm 5250 00003CB8 745C <1> jz .singlestep_into_interrupt_pm 5251 <1> %endif 5252 00003CBA B700 <1> mov bh, 0 5253 00003CBC 1E <1> push ds 5254 00003CBD 31C0 <1> xor ax, ax 5255 00003CBF 8ED8 <1> mov ds, ax 5256 00003CC1 D1E3 <1> shl bx, 1 5257 00003CC3 D1E3 <1> shl bx, 1 5258 00003CC5 C537 <1> lds si, [bx] 5259 00003CC7 FA <1> cli 5260 00003CC8 8A04 <1> mov al, byte [si] 5261 00003CCA FE04 <1> inc byte [si] 5262 00003CCC 3804 <1> cmp byte [si], al 5263 00003CCE 8804 <1> mov byte [si], al 5264 00003CD0 FB <1> sti 5265 00003CD1 8CDB <1> mov bx, ds ; bx:si-> interrupt handler (RM, 16 bit) 5266 00003CD3 89D8 <1> mov ax, bx 5267 00003CD5 1F <1> pop ds 5268 00003CD6 754D <1> jne .singlestep_into_interrupt_setbp 5269 <1> 5270 <1> ; The interrupt handler is in a ROM. 5271 <1> %if 0 5272 <1> jmp short isstdtraceX 5273 <1> %else 5274 00003CD8 8736[9C0C] <1> xchg si, word [reg_eip] 5275 00003CDC 8706[900C] <1> xchg ax, word [reg_cs] ; get cs:ip, set interrupt handler address 5276 00003CE0 8B0E[A00C] <1> mov cx, word [reg_efl] ; get flags 5277 00003CE4 1E <1> push ds 5278 00003CE5 8B1E[740C] <1> mov bx, word [reg_esp] 5279 00003CE9 8E1E[8C0C] <1> mov ds, word [reg_ss] ; ds:bx-> debuggee stack 5280 00003CED 83EB06 <1> sub bx, byte 6 ; reserve enough space for flags, cs, ip 5281 00003CF0 46 <1> inc si 5282 00003CF1 46 <1> inc si ; skip CDh xxh opcode 5283 00003CF2 894F04 <1> mov word [bx+4], cx 5284 00003CF5 894702 <1> mov word [bx+2], ax 5285 00003CF8 8937 <1> mov word [bx+0], si ; save flags, cs, ip on stack 5286 00003CFA 1F <1> pop ds 5287 00003CFB 891E[740C] <1> mov word [reg_esp], bx ; update sp 5288 00003CFF 8026[A10C]FC <1> and byte [reg_efl+1], ~(2|1) ; clear IF and TF (NC) 5289 <1> ; Note: If invalid flag values were previously set by the user 5290 <1> ; by directly accessing the FL or EFL register, these won't be 5291 <1> ; fixed by us now. This could be worked around by executing a 5292 <1> ; NOP in debuggee's environment (or only with debuggee's flags) 5293 <1> ; first, but I don't think it's much of an issue. 5294 00003D04 C706[D80B][717A] <1> mov word [run_int], int1msg 5295 00003D0A 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 5298 00003D10 B90800 <1> mov cx, 8 5299 00003D13 31C0 <1> xor ax, ax ; NC, ZR 5300 00003D15 C3 <1> retn 5301 <1> 5302 <1> %endif 5303 <1> %if _PM 5304 <1> .singlestep_into_interrupt_pm: 5305 00003D16 B80402 <1> mov ax, 0204h 5306 00003D19 CD31 <1> int 31h 5307 00003D1B 89CB <1> mov bx, cx 5308 00003D1D 66 <1> _386_o32 ; mov esi, edx 5309 00003D1E 89D6 <1> mov si, dx ; bx:(e)si-> interrupt handler 5310 00003D20 F6C304 <1> test bl, 4 ; is it a LDT selector? (NC) 5311 00003D23 7472 <1> jz isstdtraceX ; no --> 5312 <1> %endif 5313 <1> .singlestep_into_interrupt_setbp: 5314 <1> .proceedbreakpoint: 5315 00003D25 E95504 <1> jmp proceedbreakpoint 5316 <1> 5317 <1> .isstdtrace: 5318 <1> %if _PM 5319 00003D28 E89E54 <1> call ispm 5320 00003D2B 7415 <1> jz .notdpmientry ; already in PM --> 5321 00003D2D A1[9C0C] <1> mov ax, w[reg_eip] ; is this a switch to protected mode ? 5322 00003D30 3B06[BC88] <1> cmp ax, w[dpmiwatch+0] 5323 00003D34 750C <1> jne .notdpmientry 5324 00003D36 A1[900C] <1> mov ax, w[reg_cs] 5325 00003D39 3B06[BE88] <1> cmp ax, w[dpmiwatch+2] 5326 00003D3D 7503E91404 <1> je isdpmientry ; yes, catch it --> (this means really "go") 5327 <1> .notdpmientry: 5328 <1> %endif 5329 00003D42 800E[A10C]01 <1> or byte [reg_efl+1], 1 ; set single-step mode (cleared when returning into DEBUG) 5330 00003D47 31C9 <1> xor cx, cx 5331 00003D49 E86300 <1> call skipprefixes 5332 00003D4C 3C9C <1> cmp al, 9Ch ; opcode "PUSHF"? 5333 00003D4E 7527 <1> jnz .notpushf 5334 <1> %if _BREAKPOINTS 5335 00003D50 E8CC04 <1> call run_with_bb 5336 00003D53 B400 <1> mov ah, 0 5337 00003D55 9C <1> pushf 5338 <1> %else 5339 <1> call run 5340 <1> xor cx, cx 5341 <1> xor ax, ax 5342 <1> %endif 5343 <1> ; Clear TF in the fl word or efl dword 5344 <1> ; pointed to by debuggee's ss:(e)sp 5345 00003D56 06 <1> push es 5346 <1> %if _PM 5347 00003D57 8B1E[8C0C] <1> mov bx, word [reg_ss] ; get ss selector into bx 5348 00003D5B 8EC3 <1> mov es, bx 5349 00003D5D E8D41F <1> _386 call test_d_b_bit ; check whether a 32-bit ss 5350 <1> %else 5351 <1> mov es, word [reg_ss] 5352 <1> %endif 5353 00003D60 66 <1> _386_PM_o32 ; mov ebx, dword [reg_esp] 5354 00003D61 8B1E[740C] <1> mov bx, word [reg_esp] ; es:(e)bx-> debuggee's stack 5355 00003D65 7408 <1> _386_PM jz .pushf_16 5356 00003D67 2667806301FE <1> _386_PM and byte [es:ebx+1], ~1 ; clear TF 5357 00003D6D EB05 <1> _386_PM jmp short .pushf_common 5358 <1> .pushf_16: 5359 00003D6F 26806701FE <1> and byte [es:bx+1], ~1 ; clear TF 5360 <1> .pushf_common: 5361 00003D74 07 <1> pop es 5362 00003D75 EB06 <1> jmp short .checkreturn 5363 <1> .notpushf: 5364 <1> %if _BREAKPOINTS 5365 00003D77 E8A504 <1> call run_with_bb 5366 00003D7A B400 <1> mov ah, 0 5367 00003D7C 9C <1> pushf 5368 <1> %else 5369 <1> call run 5370 <1> xor cx, cx 5371 <1> xor ax, ax 5372 <1> %endif 5373 <1> .checkreturn: 5374 00003D7D 813E[D80B][717A] <1> cmp word [run_int], int1msg 5375 00003D83 7509 <1> jne .nomatch 5376 00003D85 80C908 <1> or cl, 8 5377 <1> %if _BREAKPOINTS 5378 00003D88 9D <1> popf ; CF 5379 00003D89 7308 <1> jnc .ret_NZ_NC 5380 <1> %endif 5381 00003D8B 38C0 <1> cmp al, al ; if correct interrupt (ZR, NC) 5382 00003D8D C3 <1> retn 5383 <1> 5384 <1> .nomatch: 5385 <1> %if _BREAKPOINTS 5386 00003D8E 9D <1> popf ; CF 5387 00003D8F 7302 <1> jnc .ret_NZ_NC 5388 <1> %endif 5389 00003D91 F9 <1> stc 5390 00003D92 C3 <1> retn 5391 <1> 5392 <1> %if _BREAKPOINTS 5393 <1> .ret_NZ_NC: 5394 00003D93 80C904 <1> or cl, 4 ; (NZ, NC) 5395 00003D96 C3 <1> retn 5396 <1> %endif 5397 <1> 5398 <1> 5399 <1> ; an INT is to be processed (TM is 0) 5400 <1> ; to avoid the nasty x86 bug which makes IRET 5401 <1> ; cause a debug exception 1 instruction too late 5402 <1> ; a breakpoint is set behind the INT 5403 <1> 5404 <1> isstdtraceX: 5405 00003D97 B90200 <1> mov cx, 2 5406 00003D9A E84800 <1> call iswriteablecseip ; is it ROM ? 5407 00003D9D 7289 <1> jc traceone.isstdtrace ; is read-only --> 5408 00003D9F 8B1E[900C] <1> mov bx, word [reg_cs] 5409 <1> 5410 <1> ; (e)si = (e)ip + 2 5411 <1> ; We don't test whether it's a 32-bit code segment here. 5412 <1> ; The previous code would leave the high word of esi uninitialized then. 5413 00003DA3 66 <1> _386_PM_o32 ; mov esi, dword [reg_eip] 5414 00003DA4 8B36[9C0C] <1> mov si, word [reg_eip] 5415 00003DA8 66 <1> _386_PM_o32 ; add esi, byte 2 5416 00003DA9 83C602 <1> add si, byte 2 ; ! do not remove the byte override, else o32 won't work 5417 00003DAC E9CE03 <1> jmp proceedbreakpoint ; set BP at BX:(E)SI and run debuggee 5418 <1> 5419 <1> ; Call getcseipbyte and loop while increasing cx if the returned 5420 <1> ; byte was a prefix. Returns the first non-prefix byte (an opcode) 5421 <1> ; in al. (WAIT or FWAIT is not considered a prefix because it's 5422 <1> ; really an opcode and we also trace it without executing a 5423 <1> ; following FPU opcode.) 5424 <1> skipprefixes: 5425 <1> .: 5426 00003DAF E82A5B <1> call getcseipbyte 5427 00003DB2 3C26 <1> cmp al, 26h 5428 00003DB4 742A <1> je .prefix ; ES 5429 00003DB6 3C2E <1> cmp al, 2Eh 5430 00003DB8 7426 <1> je .prefix ; CS 5431 00003DBA 3C36 <1> cmp al, 36h 5432 00003DBC 7422 <1> je .prefix ; SS 5433 00003DBE 3C3E <1> cmp al, 3Eh 5434 00003DC0 741E <1> je .prefix ; DS 5435 00003DC2 3CF0 <1> cmp al, 0F0h 5436 00003DC4 741A <1> je .prefix ; LOCK 5437 00003DC6 3CF3 <1> cmp al, 0F3h 5438 00003DC8 7416 <1> je .prefix ; REPZ 5439 00003DCA 3CF2 <1> cmp al, 0F2h 5440 00003DCC 7412 <1> je .prefix ; REPNZ 5441 00003DCE EB14 <1> _no386_jmps .noprefix ; no 386, following aren't prefixes (invalid opcodes on 186+) --> 5442 00003DD0 3C64 <1> cmp al, 64h 5443 00003DD2 740C <1> je .prefix ; FS 5444 00003DD4 3C65 <1> cmp al, 65h 5445 00003DD6 7408 <1> je .prefix ; GS 5446 00003DD8 3C66 <1> cmp al, 66h 5447 00003DDA 7404 <1> je .prefix ; o32/o16 5448 00003DDC 3C67 <1> cmp al, 67h 5449 00003DDE 7504 <1> jne .noprefix ; not a32/a16 5450 <1> .prefix: 5451 00003DE0 41 <1> inc cx 5452 <1> ; jmp short . 5453 00003DE1 79CC <1> jns . ; this is not correct but serves as hack to avoid an infinite loop 5454 <1> ; (note that getcseipbyte really uses cx as signed number) 5455 00003DE3 49 <1> dec cx ; back to 07FFFh 5456 <1> .noprefix: 5457 00003DE4 C3 <1> retn 5458 <1> 5459 <1> 5460 <1> ;--- test if memory at CS:E/IP can be written to 5461 <1> ;--- return C if not 5462 <1> 5463 <1> iswriteablecseip: 5464 00003DE5 E8F45A <1> call getcseipbyte ; get byte at CS:EIP+CX 5465 00003DE8 88C4 <1> mov ah, al 5466 00003DEA 34FF <1> xor al, 0FFh 5467 00003DEC E81A5B <1> call setcseipbyte 5468 00003DEF 720E <1> jc .return 5469 00003DF1 E8E85A <1> call getcseipbyte 5470 00003DF4 38C4 <1> cmp ah, al ; is it ROM? 5471 00003DF6 F9 <1> stc 5472 00003DF7 7406 <1> jz .return 5473 00003DF9 88E0 <1> mov al, ah 5474 00003DFB E80B5B <1> call setcseipbyte 5475 00003DFE F8 <1> clc 5476 <1> .return: 5477 00003DFF C3 <1> retn 5478 <1> 5479 <1> 5480 <1> %if _PM 5481 <1> debuggerexception: 5482 00003E00 FC <1> cld 5483 00003E01 16 <1> push ss 5484 00003E02 1F <1> pop ds 5485 00003E03 E87968 <1> call unhack ; sets es to ss 5486 00003E06 E822FE <1> call getrunint 5487 00003E09 E8B07F <1> call putsz ; print string 5488 <1> %if _EXCCSIP 5489 00003E0C BF[C07B] <1> mov di, exccsip 5490 00003E0F A1[B688] <1> mov ax, word [exception_csip + 2] 5491 00003E12 E8F17B <1> call hexword 5492 00003E15 47 <1> inc di 5493 00003E16 A1[B488] <1> mov ax, word [exception_csip] 5494 00003E19 E8EA7B <1> call hexword 5495 <1> 5496 00003E1C BA[BA7B] <1> mov dx, excloc 5497 00003E1F E89A7F <1> call putsz 5498 <1> %endif 5499 00003E22 E9DBC1 <1> jmp cmd3 5500 <1> %endif 5501 <1> 5502 <1> 5503 <1> %if _PM 5504 <1> [cpu 386] 5505 <1> ; INP: dh = flags as for pp2,pp3,pp5 (1 = ASIZE, 2 = OSIZE) 5506 <1> ; OUT: dh = flags as used by pp3,pp5 (1 = A32, 2 = O32) 5507 <1> pp_fix32bitflags: 5508 00003E25 E80C1F <1> call test_d_b_bit 5509 00003E28 7403 <1> jz .16 5510 00003E2A 80F603 <1> xor dh, 1|2 ; toggle OSIZE and ASIZE (once) 5511 <1> .16: 5512 00003E2D C3 <1> retn 5513 <1> __CPU__ 5514 <1> %endif 5515 <1> 5516 <1> ; P command - proceed (i.e., skip over call/int/loop/string instruction). 5517 <1> pp: 5518 00003E2E C706[DA0B][2E3E] <1> mov word [lastcmd], pp 5519 00003E34 800E[A100]10 <1> setopt [internalflags2], dif2_is_pp 5520 00003E39 E81A07 <1> call parse_pt ; process arguments 5521 <1> 5522 <1> ; Do it times. First check the type of instruction. 5523 <1> pp1: 5524 00003E3C 53 <1> push bx 5525 00003E3D 51 <1> push cx ; save bx:cx 5526 <1> %if _PM 5527 00003E3E E836FA <1> call resetmode 5528 <1> %endif 5529 00003E41 BA0F00 <1> mov dx, 15 ; DL = number of bytes to go; DH = prefix flags. 5530 00003E44 8B1E[900C] <1> mov bx, word [reg_cs] 5531 00003E48 66 <1> _386_PM_o32 ; mov esi, dword [reg_eip] 5532 00003E49 8B36[9C0C] <1> mov si, word [reg_eip] 5533 <1> pp2: 5534 00003E4D E8C303 <1> call pp16 ; get next instruction byte into AL 5535 00003E50 BF[E410] <1> mov di, ppbytes 5536 00003E53 B91F00 <1> mov cx, PPLEN 5537 00003E56 F2AE <1> repne scasb 5538 00003E58 752E <1> jne pp5 ; if not one of these --> 5539 00003E5A 8A451E <1> mov al,byte [di+PPLEN-1]; get corresponding byte in ppinfo 5540 00003E5D A880 <1> test al, PP_PREFIX ; prefix ? 5541 00003E5F 740F <1> jz pp3 ; no --> 5542 00003E61 08C6 <1> or dh, al ; set the OSIZE or ASIZE flags if either of these 5543 <1> ; Note: Multiple OSIZE in a 16-bit cs do not toggle 5544 <1> ; between decoding as O32 and O16, they're always 5545 <1> ; decoded as O32. The same is true for A32, and 5546 <1> ; in a 32-bit cs for O16 and A16. 5547 00003E63 FECA <1> dec dl 5548 00003E65 75E6 <1> jnz pp2 ; if not out of bytes --> 5549 00003E67 BA[D971] <1> mov dx, msg.warnprefix 5550 00003E6A E84F7F <1> call putsz 5551 00003E6D E98000 <1> jmp pp12 5552 <1> 5553 <1> ; A repeatable string, interrupt, call immediate or loop 5554 <1> ; instruction is to be decoded. Finish the decoding and 5555 <1> ; skip the appropriate number of opcode bytes. 5556 <1> pp3: 5557 00003E70 E8B2FF <1> _386_PM call pp_fix32bitflags 5558 00003E73 A840 <1> test al, PP_VARSIZ ; different opcode length depends on OSIZE ? 5559 00003E75 7405 <1> jz .ignoreosize ; no --> 5560 00003E77 80E602 <1> and dh, 2 5561 00003E7A 00F0 <1> add al, dh 5562 <1> .ignoreosize: 5563 00003E7C 83E007 <1> and ax, PP_SIZ_MASK 5564 00003E7F 660FB7C0 <1> _386_PM movzx eax, ax ; clear high word (in case it counts) 5565 00003E83 66 <1> _386_PM_o32 ; add esi, eax 5566 00003E84 01C6 <1> add si, ax 5567 00003E86 EB56 <1> jmp pp10 5568 <1> 5569 <1> 5570 <1> pp5: 5571 00003E88 E89AFF <1> _386_PM call pp_fix32bitflags 5572 00003E8B 3CFF <1> cmp al, 0FFh ; FF/2 or FF/3 indirect NEAR or FAR call ? 5573 00003E8D 7561 <1> jne pp12 ; no, just an ordinary instruction --> 5574 00003E8F E88103 <1> call pp16 ; get MOD REG R/M byte 5575 00003E92 24F7 <1> and al, ~ (1 << 3) ; clear lowest bit of REG field (/3 to /2) 5576 00003E94 3410 <1> xor al, 2 << 3 ; /3 or /2 to /0 5577 00003E96 A838 <1> test al, 7 << 3 5578 00003E98 7556 <1> jnz pp12 ; if not FF/2 or FF/3 --> 5579 00003E9A 3CC0 <1> cmp al, 0C0h ; mod = 3 ? 5580 00003E9C 7340 <1> jae .adjust0 ; if just a register --> 5581 00003E9E F6C601 <1> test dh, 1 5582 00003EA1 750E <1> jnz .a32 ; if 32-bit addressing --> 5583 00003EA3 3C06 <1> cmp al, 6 ; mod = 0 r/m = 6 would encode bp ? 5584 00003EA5 7433 <1> je .adjust2 ; if just plain disp16 --> 5585 00003EA7 3C40 <1> cmp al, 40h 5586 00003EA9 7233 <1> jb .adjust0 ; if indirect register --> 5587 00003EAB 3C80 <1> cmp al, 80h 5588 00003EAD 722D <1> jb .adjust1 ; if disp8[reg(s)] 5589 00003EAF EB29 <1> jmp short .adjust2 ; it's disp16[reg(s)] 5590 <1> 5591 <1> ; Handle 32-bit addressing (A32 ModR/M referencing memory) 5592 <1> .a32: 5593 00003EB1 3C05 <1> cmp al, 5 ; mod = 0 and r/m = 5 (would encode ebp) ? 5594 00003EB3 7421 <1> je .adjust4 ; if just plain disp32 --> 5595 00003EB5 3404 <1> xor al, 4 ; 4 to 0 (r/m 4 would encode esp) 5596 00003EB7 A807 <1> test al, 7 ; 0 if r/m would encode esp 5597 00003EB9 7513 <1> jnz .a32_nosib ; if no SIB byte --> 5598 00003EBB 86C4 <1> xchg al, ah 5599 00003EBD E85303 <1> call pp16 5600 00003EC0 86C4 <1> xchg al, ah ; load and skip the SIB byte 5601 <1> ; The SIB byte is only used here to detect the 5602 <1> ; special case encoding of disp32 with mod=0 5603 <1> ; and base=5. index=4 is also special but it 5604 <1> ; does not alter the size of the displacement 5605 <1> ; that we have to skip. 5606 00003EC2 A8C0 <1> test al, 0C0h ; is it mod = 0 ? 5607 00003EC4 7508 <1> jnz @F ; no, not a special case --> 5608 00003EC6 80E407 <1> and ah, 7 5609 00003EC9 80FC05 <1> cmp ah, 5 ; is it base = 5 ? 5610 00003ECC 7408 <1> je .adjust4 ; yes, special case encoding of disp32 --> 5611 <1> @@: 5612 <1> .a32_nosib: 5613 00003ECE 3C40 <1> cmp al, 40h 5614 00003ED0 720C <1> jb .adjust0 ; if indirect register --> 5615 00003ED2 3C80 <1> cmp al, 80h 5616 00003ED4 7206 <1> jb .adjust1 ; if disp8[reg(s)] --> 5617 <1> ; otherwise, it's disp32[reg(s)] 5618 <1> .adjust4: 5619 00003ED6 66 <1> _386_PM_o32 ; inc esi 5620 00003ED7 46 <1> inc si ; skip an instruction byte 5621 00003ED8 66 <1> _386_PM_o32 ; inc esi 5622 00003ED9 46 <1> inc si ; skip an instruction byte 5623 <1> .adjust2: 5624 00003EDA 66 <1> _386_PM_o32 ; inc esi 5625 00003EDB 46 <1> inc si ; skip an instruction byte 5626 <1> .adjust1: 5627 00003EDC 66 <1> _386_PM_o32 ; inc esi 5628 00003EDD 46 <1> inc si ; skip an instruction byte 5629 <1> .adjust0: 5630 <1> 5631 <1> pp10: 5632 <1> ; jmp pp11 ; we have a skippable instruction here 5633 <1> pp11: 5634 00003EDE E8531E <1> _386_PM call test_d_b_bit 5635 00003EE1 7504 <1> _386_PM jnz .32 ; full 32-bit offset valid --> 5636 00003EE3 660FB7F6 <1> _386_PM movzx esi, si ; clear high word here 5637 <1> .32: 5638 <1> @@: 5639 00003EE7 E89302 <1> call proceedbreakpoint ; run until the breakpoint is hit 5640 00003EEA 7256 <1> jc pp15 ; unexpected --> 5641 <1> %if _BREAKPOINTS 5642 00003EEC 7510 <1> jnz pp12.bb_hit 5643 <1> %endif 5644 00003EEE EB2C <1> jmp short pp13 5645 <1> 5646 <1> pp12: 5647 00003EF0 F606[A000]80 <1> testopt [internalflags2], dif2_tpg_keep_proceed_bp 5648 00003EF5 75F0 <1> jnz @B 5649 <1> 5650 00003EF7 E887FD <1> call traceone 5651 00003EFA 7246 <1> jc pp15 5652 <1> ; jc unexpectedinterrupt 5653 <1> 5654 <1> %if _BREAKPOINTS 5655 00003EFC 7416 <1> jz @F 5656 <1> 5657 <1> .bb_hit: 5658 00003EFE E8EBFB <1> call handle_bb_hit_pass_match 5659 00003F01 7204 <1> jc .actual_hit 5660 <1> d5 call d5message 5661 <1> d5 asciz "in pp12.bb_hit after non-hit",13,10 5662 00003F03 7420 <1> jz pp13.nodump 5663 00003F05 EB15 <1> jmp pp13 5664 <1> 5665 <1> 5666 <1> .actual_hit: 5667 <1> %if _PM 5668 00003F07 E86DF9 <1> call resetmode 5669 <1> %endif 5670 00003F0A E83EF3 <1> call put_deferred_message_silent 5671 00003F0D E87200 <1> call dumpregs_extended_silent 5672 00003F10 59 <1> pop cx 5673 00003F11 5B <1> pop bx ; (discard counter) 5674 00003F12 EB24 <1> jmp @FF 5675 <1> 5676 <1> @@: 5677 <1> %endif 5678 <1> 5679 <1> ; We could check here for the correct address too, but that 5680 <1> ; would require disassembling the instruction and correctly so. 5681 <1> ; (Disassembling it incorrectly would only result in spurious 5682 <1> ; "Unexpected single-step interrupt" messages aborting multi- 5683 <1> ; traces though, so it won't be fatal.) 5684 <1> ; Wouldn't really be useful though: Only the "int1" or "int 01h" 5685 <1> ; instructions should cause this, and their operation means we 5686 <1> ; might as well behave as if the breakpoint was expected. 5687 00003F14 813E[D80B][717A] <1> cmp word [run_int], int1msg 5688 00003F1A 7526 <1> jne pp15 ; if some other interrupt (unexpected) --> 5689 <1> 5690 <1> pp13: 5691 <1> %if _PM 5692 00003F1C E858F9 <1> call resetmode 5693 <1> %endif 5694 <1> ; An expected breakpoint. Dump registers, then loop. 5695 00003F1F E829F3 <1> call put_deferred_message_silent 5696 00003F22 E85D00 <1> call dumpregs_extended_silent 5697 <1> 5698 <1> .nodump: 5699 00003F25 E863FB <1> call tt_handle_while 5700 00003F28 59 <1> pop cx 5701 00003F29 5B <1> pop bx 5702 <1> 5703 00003F2A 83E901 <1> sub cx, 1 5704 00003F2D 83DB00 <1> sbb bx, 0 5705 <1> 5706 00003F30 85DB <1> test bx, bx 5707 00003F32 750B <1> jnz pp14 5708 00003F34 85C9 <1> test cx, cx 5709 00003F36 7507 <1> jnz pp14 ; back for more --> 5710 <1> 5711 <1> @@: 5712 <1> %if _PM 5713 00003F38 E83CF9 <1> call resetmode 5714 <1> %endif 5715 00003F3B E8BE7D <1> call silence_dump 5716 <1> 5717 00003F3E C3 <1> retn 5718 <1> 5719 <1> %if ($ - pp1 - 1) < 128 5720 <1> pp14: equ pp1 5721 <1> %else 5722 00003F3F E9FAFE <1> pp14: jmp pp1 5723 <1> %endif 5724 <1> 5725 <1> pp15: 5726 00003F42 E903FD <1> jmp unexpectedinterrupt ; print message about unexpected interrupt 5727 <1> ; and quit 5728 <1> 5729 <1> 5730 <1> terminate_silent_dump.if_nonnull: 5731 00003F45 F606[9F00]10 <1> testopt [internalflags], tt_silent_mode 5732 00003F4A 7435 <1> jz terminate_silent_dump.ret 5733 00003F4C 06 <1> push es 5734 00003F4D 57 <1> push di 5735 00003F4E 50 <1> push ax 5736 00003F4F 8E06[F209] <1> mov es, word [auxbuff_segorsel] 5737 00003F53 8B3E[FA09] <1> mov di, word [auxbuff_behind_last_silent] 5738 00003F57 3B3E[F809] <1> cmp di, word [auxbuff_behind_while_condition] 5739 00003F5B 7421 <1> je terminate_silent_dump.done 5740 00003F5D 4F <1> dec di 5741 00003F5E B000 <1> mov al, 0 5742 00003F60 AE <1> scasb 5743 00003F61 741B <1> je terminate_silent_dump.done 5744 00003F63 EB14 <1> jmp @F 5745 <1> 5746 <1> terminate_silent_dump: 5747 00003F65 F606[9F00]10 <1> testopt [internalflags], tt_silent_mode 5748 00003F6A 7415 <1> jz .ret 5749 <1> .is_silent: 5750 00003F6C 06 <1> push es 5751 00003F6D 57 <1> push di 5752 00003F6E 50 <1> push ax 5753 00003F6F 8E06[F209] <1> mov es, word [auxbuff_segorsel] 5754 00003F73 8B3E[FA09] <1> mov di, word [auxbuff_behind_last_silent] 5755 00003F77 B000 <1> mov al, 0 5756 <1> @@: 5757 00003F79 AA <1> stosb 5758 00003F7A FF06[FA09] <1> inc word [auxbuff_behind_last_silent] 5759 <1> ; -> point past the NUL 5760 <1> .done: 5761 00003F7E 58 <1> pop ax 5762 00003F7F 5F <1> pop di 5763 00003F80 07 <1> pop es 5764 <1> .ret: 5765 00003F81 C3 <1> retn 5766 <1> 5767 <1> 5768 <1> dumpregs_extended_silent: 5769 <1> %if _PM 5770 00003F82 E8F2F8 <1> call resetmode 5771 <1> %endif 5772 00003F85 F606[9F00]10 <1> testopt [internalflags], tt_silent_mode 5773 00003F8A 7405 <1> jz @F 5774 00003F8C 800E[9F00]20 <1> setopt [internalflags], tt_silence 5775 <1> ; Call dumpregs (trimputs, puts, putsline, disasm) with 5776 <1> ; "silence" flag (writes to auxbuff instead of terminal). 5777 <1> @@: 5778 00003F91 E81BE7 <1> call dumpregs_extended 5779 00003F94 F606[9F00]10 <1> testopt [internalflags], tt_silent_mode 5780 00003F99 7408 <1> jz @F 5781 <1> ; Terminate the last dump's output with a NUL byte. 5782 00003F9B E8CEFF <1> call terminate_silent_dump.is_silent 5783 00003F9E 8026[9F00]DF <1> clropt [internalflags], tt_silence 5784 <1> @@: 5785 <1> 5786 <1> handle_serial_flags_ctrl_c: 5787 00003FA3 1E <1> push ds 5788 00003FA4 50 <1> push ax 5789 00003FA5 16 <1> push ss 5790 00003FA6 1F <1> pop ds 5791 00003FA7 F606[8700]40 <1> testopt [options3], opt3_check_ctrlc_0bh 5792 00003FAC 740A <1> jz @FF 5793 <1> ; The following DOS call originated in sleepcmd. 5794 <1> ; However, it is useful for all callers of this 5795 <1> ; function so put it here. 5796 00003FAE E8F966 <1> call InDos 5797 00003FB1 7505 <1> jnz @F 5798 00003FB3 B40B <1> mov ah, 0Bh 5799 <1> doscall ; allow to break with Ctrl-C 2037 00003FB5 E8AF1D <2> call _doscall 5800 <1> @@: 5801 <1> @@: 5802 00003FB8 F606[EB0B]02 <1> testopt [serial_flags], sf_ctrl_c 5803 00003FBD 755B <1> jnz handle_ctrl_c 5804 00003FBF F606[7D00]40 <1> testopt [options], enable_serial 5805 00003FC4 7551 <1> jnz .ret 5806 00003FC6 E8E166 <1> call InDos 5807 00003FC9 744C <1> jz .ret 5808 00003FCB F606[8700]20 <1> testopt [options3], opt3_check_ctrlc_keyb 5809 00003FD0 7445 <1> jz .ret 5810 <1> 5811 <1> .check_rombios_buffer: 5812 00003FD2 53 <1> push bx 5813 00003FD3 52 <1> push dx 5814 00003FD4 B84000 <1> mov ax, 40h ; dual mode segment/selector 5815 00003FD7 50 <1> push ax 5816 00003FD8 A1[FA0B] <1> mov ax, word [io_end_buffer] 5817 00003FDB 8B16[F80B] <1> mov dx, word [io_start_buffer] 5818 00003FDF 1F <1> pop ds 5819 00003FE0 85C0 <1> test ax, ax 5820 00003FE2 7503 <1> jnz @F 5821 00003FE4 A18200 <1> mov ax, word [82h] ; end of circular keypress buffer 5822 <1> @@: 5823 00003FE7 85D2 <1> test dx, dx 5824 00003FE9 7504 <1> jnz @F 5825 00003FEB 8B168000 <1> mov dx, word [80h] ; start of circular buffer 5826 <1> @@: 5827 00003FEF 89C3 <1> mov bx, ax 5828 00003FF1 29D3 <1> sub bx, dx ; cmp end, start 5829 00003FF3 7620 <1> jbe .ret_dx_bx ; invalid --> 5830 00003FF5 F6C301 <1> test bl, 1 ; even amount of bytes ? 5831 00003FF8 751B <1> jnz .ret_dx_bx ; invalid --> 5832 00003FFA 8B1E1A00 <1> mov bx, word [1Ah] ; current head of circular buffer 5833 <1> .loop: 5834 00003FFE 3B1E1C00 <1> cmp bx, word [1Ch] ; equal to current tail ? 5835 00004002 7411 <1> je .ret_dx_bx ; yes, all entries checked --> 5836 00004004 803F03 <1> cmp byte [bx], 3 ; is it Ctrl-C ? 5837 00004007 7411 <1> je handle_ctrl_c ; yes, handle --> 5838 00004009 43 <1> inc bx 5839 0000400A 43 <1> inc bx ; -> next entry 5840 0000400B 39C3 <1> cmp bx, ax ; at end of buffer ? 5841 0000400D 72EF <1> jb .loop ; no, loop --> 5842 0000400F 7704 <1> ja .ret_dx_bx ; invalid --> 5843 00004011 89D3 <1> mov bx, dx ; reset to start of buffer 5844 00004013 EBE9 <1> jmp .loop ; then loop --> 5845 <1> 5846 <1> .ret_dx_bx: 5847 00004015 5A <1> pop dx 5848 00004016 5B <1> pop bx 5849 <1> 5850 <1> .ret: 5851 00004017 58 <1> pop ax 5852 00004018 1F <1> pop ds 5853 00004019 C3 <1> retn 5854 <1> 5855 <1> 5856 <1> handle_ctrl_c: 5857 0000401A 16 <1> push ss 5858 0000401B 1F <1> pop ds 5859 0000401C 16 <1> push ss 5860 0000401D 07 <1> pop es 5861 0000401E 8026[EB0B]F9 <1> clropt [serial_flags], sf_ctrl_c | sf_double_ctrl_c 5862 <1> %if _PM 5863 00004023 E851F8 <1> call resetmode 5864 <1> %endif 5865 00004026 E81CFF <1> call terminate_silent_dump.if_nonnull 5866 00004029 E8D07C <1> call silence_dump 5867 0000402C BA[1C5D] <1> mov dx, msg.ctrlc 5868 0000402F E88A7D <1> call putsz 5869 <1> 5870 00004032 800E[A400]10 <1> setopt [internalflags3], dif3_input_terminal_override 5871 <1> ; make sure we drain terminal input 5872 <1> @@: 5873 00004037 E8D37F <1> call getc_if_any ; drain the buffer 5874 0000403A 75FB <1> jnz @B ; if any was available --> 5875 <1> 5876 0000403C 8026[A400]EF <1> clropt [internalflags3], dif3_input_terminal_override 5877 00004041 E949C3 <1> jmp cmd2_reset_re 5878 <1> 5879 <1> 5880 <1> ; INP: bp [tpg_proceed_bp], 5881 <1> ; linear address and point content to write 5882 <1> ; opt [internalflags2] & dif2_tpg_proceed_bp_set 5883 <1> ; set if a breakpoint was written 5884 <1> ; OUT: CY if error, 5885 <1> ; bp [tpg_proceed_bp] = has point content to restore 5886 <1> ; ah = reason = 0 = no error (never), 5887 <1> ; 1 = couldn't write, 5888 <1> ; 2 = unreachable, 5889 <1> ; 3 = overwritten, al = new byte value 5890 <1> ; NC if no error, 5891 <1> ; ah = 0 5892 <1> ; opt [internalflags2] & dif2_tpg_proceed_bp_set 5893 <1> ; cleared 5894 <1> ; CHG: di, (e)dx, ax, bx 5895 <1> ; STT: might switch modes due to getsegmented call 5896 <1> proceed_writepoint_restore: 5897 00004044 B400 <1> mov ah, 0 5898 00004046 F606[A000]40 <1> testopt [internalflags2], dif2_tpg_proceed_bp_set 5899 0000404B 745F <1> jz proceed_wp.retn ; (NC) 5900 0000404D BF0100 <1> mov di, 1 5901 00004050 EB05 <1> jmp proceed_wp 5902 <1> 5903 <1> ; INP: bp [tpg_proceed_bp], 5904 <1> ; linear address and point content to write (0CCh) 5905 <1> ; OUT: CY if error, 5906 <1> ; bp [tpg_proceed_bp] = has point content 0CCh 5907 <1> ; ah = reason = 0 = no error (never), 5908 <1> ; 1 = couldn't write, 5909 <1> ; 2 = unreachable, 5910 <1> ; 3 = overwritten (never) 5911 <1> ; NC if no error (either flag not set or point restored), 5912 <1> ; ah = 0 5913 <1> ; opt [internalflags2] & dif2_tpg_proceed_bp_set 5914 <1> ; set 5915 <1> ; CHG: di, (e)dx, ax, bx 5916 <1> ; STT: might switch modes due to getsegmented call 5917 <1> proceed_writepoint: 5918 <1> %if _DELAY_BEFORE_BP 5919 00004052 E828F4 <1> call delay_before_bp 5920 <1> %endif 5921 00004055 31FF <1> xor di, di 5922 <1> proceed_wp: 5923 <1> lframe near 5924 00004057 5589E5 <1> lenter 5925 0000405A 83F701 <1> xor di, 1 5926 <1> lvar word, is_write 5927 0000405D 57 <1> push di 5928 <1> 5929 0000405E A1[C400] <1> mov ax, word [tpg_proceed_bp] 5930 <1> %if _PM 5931 00004061 8B16[C600] <1> mov dx, word [tpg_proceed_bp + 2] 5932 <1> %else 5933 <1> xor dx, dx 5934 <1> mov dl, byte [tpg_proceed_bp + 2] 5935 <1> %endif 5936 00004065 E834F8 <1> call getsegmented 5937 00004068 A0[CC00] <1> mov al, byte [tpg_proceed_bp + BPSIZE - 1] 5938 <1> ; al = byte to restore 5939 0000406B B402 <1> mov ah, 2 ; error reason: unreachable 5940 0000406D 723A <1> jc .return 5941 <1> 5942 0000406F F646FE01 <1> test byte [bp + ?is_write], 1 5943 <1> ; (NC) is it writing ? 5944 00004073 7518 <1> jnz .write 5945 <1> .restore: 5946 00004075 50 <1> push ax 5947 00004076 E8ED58 <1> call readmem ; read current byte 5948 00004079 3CCC <1> cmp al, 0CCh ; is this still what we wrote? 5949 0000407B B403 <1> mov ah, 3 ; error reason: overwritten, al = new value 5950 0000407D F9 <1> stc 5951 0000407E 7529 <1> jne .return_discard ; nope --> (CY) 5952 00004080 58 <1> pop ax 5953 00004081 E8B558 <1> call writemem ; return the byte to its original value 5954 00004084 720D <1> jc .next ; failed --> (CY, handled there) 5955 00004086 C606[CC00]CC <1> mov byte [tpg_proceed_bp + BPSIZE - 1], 0CCh 5956 <1> ; reset stored point 5957 0000408B EB06 <1> jmp short .next 5958 <1> 5959 <1> .write: 5960 0000408D E8A958 <1> call writemem 5961 00004090 A2[CC00] <1> mov byte [tpg_proceed_bp + BPSIZE - 1], al 5962 <1> ; save the previous byte there 5963 <1> .next: 5964 00004093 B401 <1> mov ah, 1 ; (in case of error) error reason: cannot write 5965 00004095 7212 <1> jc .return ; failed to write --> (CY) 5966 00004097 B400 <1> mov ah, 0 ; (no error) 5967 <1> 5968 00004099 800E[A000]40 <1> setopt [internalflags2], dif2_tpg_proceed_bp_set 5969 <1> ; set flag in case of successful writing 5970 0000409E F646FE01 <1> test byte [bp + ?is_write], 1 5971 <1> ; (NC) is it writing ? 5972 000040A2 7505 <1> jnz .return ; yes, leave flag set --> 5973 000040A4 8026[A000]BF <1> clropt [internalflags2], dif2_tpg_proceed_bp_set 5974 <1> ; (NC) clear flag in case of successful restoring 5975 <1> .return: 5976 <1> .return_discard: 5977 000040A9 89EC5D <1> lleave 5978 <1> .retn: 5979 000040AC C3 <1> retn 5980 <1> 5981 <1> 5982 <1> ; INP: ah & 7Fh = status = 0 = no error, 5983 <1> ; 1 = couldn't write, 5984 <1> ; 2 = unreachable, 5985 <1> ; 3 = overwritten, al = new value 5986 <1> ; ah & 80h = set if error restoring point, 5987 <1> ; else error writing point 5988 <1> ; bh & 80h = set if gg breakpoint, 5989 <1> ; cx = index (0-based) 5990 <1> ; bh & 40h = set if bb breakpoint, 5991 <1> ; cx = index (0-based) 5992 <1> ; bh & C0h = clear if proceed breakpoint 5993 <1> ; bl = what we tried to restore, only set if ah & 80h set 5994 <1> ; dword [ss:sp] = linear address (24 bit if non-_PM) 5995 <1> ; CHG: ax, bx, cx, dx, di 5996 <1> ; STT: ds = es = ss = debugger data selector 5997 <1> display_breakpoint_failure: 5998 <1> %if _PM 5999 000040AD E8C7F7 <1> call resetmode 6000 <1> %endif 6001 <1> 6002 000040B0 50 <1> push ax 6003 000040B1 53 <1> push bx 6004 000040B2 51 <1> push cx 6005 000040B3 56 <1> push si 6006 000040B4 E8457C <1> call silence_dump ; do away with silent mode 6007 000040B7 5E <1> pop si 6008 000040B8 59 <1> pop cx 6009 000040B9 5B <1> pop bx 6010 000040BA 58 <1> pop ax 6011 <1> 6012 000040BB 800E[A100]08 <1> setopt [internalflags2], dif2_bp_failure 6013 <1> 6014 <1> lframe near 6015 <1> lpar dword, linear 6016 000040C0 5589E5 <1> lenter 6017 <1> lvar word, input_ax 6018 000040C3 50 <1> push ax 6019 <1> 6020 000040C4 BA[C56E] <1> mov dx, msg.cant_bp_the 6021 000040C7 E8F27C <1> call putsz 6022 000040CA F6C780 <1> test bh, 80h 6023 000040CD 740B <1> jz @F 6024 <1> 6025 000040CF 89C8 <1> mov ax, cx 6026 000040D1 40 <1> inc ax ; make it 1-based 6027 000040D2 E8D6F5 <1> call putordinalbyte 6028 <1> 6029 000040D5 BA[F56E] <1> mov dx, msg.cant_bp_type_gg 6030 000040D8 EB15 <1> jmp .got_type 6031 <1> 6032 <1> @@: 6033 000040DA F6C740 <1> test bh, 40h 6034 000040DD 740D <1> jz @F 6035 <1> 6036 000040DF 89C8 <1> mov ax, cx 6037 000040E1 BF[F26E] <1> mov di, msg.cant_bp_type_permanent.index 6038 000040E4 E82679 <1> call hexbyte ; (0-based index) 6039 <1> 6040 000040E7 BA[DD6E] <1> mov dx, msg.cant_bp_type_permanent 6041 000040EA EB03 <1> jmp .got_type 6042 <1> 6043 <1> @@: 6044 000040EC BA[CA6E] <1> mov dx, msg.cant_bp_type_proceed 6045 <1> 6046 <1> .got_type: 6047 000040EF E8CA7C <1> call putsz 6048 <1> 6049 000040F2 BF[0C6F] <1> mov di, msg.cant_bp_linear.address1 6050 000040F5 8B4606 <1> mov ax, word [bp + ?linear + 2] 6051 <1> %ifn _PM 6052 <1> mov ah, 0 6053 <1> %endif 6054 000040F8 E80B79 <1> call hexword 6055 000040FB 47 <1> inc di 6056 <1> ; mov di, msg.cant_bp_linear.address2 6057 000040FC 8B4604 <1> mov ax, word [bp + ?linear] 6058 000040FF E80479 <1> call hexword 6059 <1> 6060 00004102 BA[036F] <1> mov dx, msg.cant_bp_linear 6061 00004105 E8B47C <1> call putsz 6062 <1> 6063 00004108 BF[416F] <1> mov di, msg.cant_bp_restore.value 6064 0000410B 89D8 <1> mov ax, bx 6065 0000410D E8FD78 <1> call hexbyte 6066 <1> 6067 00004110 BA[186F] <1> mov dx, msg.cant_bp_write 6068 00004113 8B46FE <1> mov ax, word [bp + ?input_ax] 6069 00004116 F6C480 <1> test ah, 80h 6070 00004119 7406 <1> jz @F 6071 0000411B 80E47F <1> and ah, ~80h 6072 0000411E BA[2B6F] <1> mov dx, msg.cant_bp_restore 6073 <1> @@: 6074 00004121 E8987C <1> call putsz 6075 <1> 6076 00004124 BF[BC6F] <1> mov di, msg.cant_bp_reason3.value 6077 00004127 E8E378 <1> call hexbyte 6078 <1> 6079 0000412A BA[456F] <1> mov dx, msg.cant_bp_reason 6080 0000412D E88C7C <1> call putsz 6081 <1> 6082 00004130 BA[516F] <1> mov dx, msg.cant_bp_reason0 6083 00004133 80FC01 <1> cmp ah, 1 6084 00004136 7215 <1> jb @F 6085 00004138 BA[776F] <1> mov dx, msg.cant_bp_reason1 6086 0000413B 7410 <1> je @F 6087 0000413D BA[8A6F] <1> mov dx, msg.cant_bp_reason2 6088 00004140 80FC03 <1> cmp ah, 3 6089 00004143 7208 <1> jb @F 6090 00004145 BA[9F6F] <1> mov dx, msg.cant_bp_reason3 6091 00004148 7403 <1> je @F 6092 0000414A BA[C26F] <1> mov dx, msg.cant_bp_reasonu 6093 <1> @@: 6094 0000414D E86C7C <1> call putsz 6095 <1> 6096 00004150 89EC5D <1> lleave 6097 00004153 C20400 <1> lret 6098 <1> 6099 <1> 6100 <1> %if _PM 6101 <1> isdpmientry: 6102 00004156 F606[A800]02 <1> testopt [internalflags4], dif4_int_2F_hooked 6103 0000415B 7407 <1> jz @F 6104 0000415D F606[9D00]02 <1> testopt [internalflags], nohook2F 6105 00004162 740A <1> jz .stdhook 6106 <1> @@: 6107 00004164 C706[9C0C][7689] <1> mov word [reg_eip], mydpmientry 6108 0000416A 8C1E[900C] <1> mov word [reg_cs], ds ; if Int2F not hooked, point to the hook here 6109 <1> ; ds => lDEBUG_DATA_ENTRY 6110 <1> .stdhook: 6111 <1> ; Run code until it returned far. 6112 0000416E 8B1E[740C] <1> mov bx, word [reg_esp] 6113 00004172 1E <1> push ds 6114 00004173 8E1E[8C0C] <1> mov ds, word [reg_ss] ; ds:bx-> (16-bit) stack 6115 00004177 8B37 <1> mov si, word [bx+0] 6116 00004179 8B5F02 <1> mov bx, word [bx+2] ; get (16-bit) far return address 6117 0000417C 1F <1> pop ds 6118 <1> %endif 6119 <1> ; Proceed over an instruction 6120 <1> ; INP: bx:(e)si-> where to write the breakpoint 6121 <1> ; OUT: NC if the breakpoint was hit, 6122 <1> ; ah = 0 6123 <1> ; ch = 0 6124 <1> ; d[reg_eip] adjusted 6125 <1> ; cx & 8 set if proceed point hit 6126 <1> ; (ZF only set if _BREAKPOINTS) 6127 <1> ; ZR if breakpoint after instruction was hit, 6128 <1> ; cx & 7 = 0 6129 <1> ; NZ if another breakpoint (bb) was hit (or both), 6130 <1> ; cx & 1 set if non-pass match (actual hit), 6131 <1> ; else cx & 2 set if pass match (consider as hit first, 6132 <1> ; but dump registers next (not to silent buffer) 6133 <1> ; and then continue execution) 6134 <1> ; else cx & 4 always set, indicates any match 6135 <1> ; (including matches that should merely continue) 6136 <1> ; all pass points' counters stepped 6137 <1> ; CY if the breakpoint was not hit, 6138 <1> ; cx = 0 6139 <1> ; If [internalflags2] & dif2_gg_is_gg is set: 6140 <1> ; ah & 7Fh = status = 0 = no error, 6141 <1> ; 1 = couldn't write, 6142 <1> ; 2 = unreachable, 6143 <1> ; 3 = overwritten, al = new value 6144 <1> ; ah & 80h = set if error restoring point, 6145 <1> ; else error writing point to begin with 6146 <1> ; If that flag is clear: 6147 <1> ; Does not return if a breakpoint cannot be written 6148 <1> ; or cannot be restored, jumps to cmd3 instead. 6149 <1> ; CHG: all 6150 <1> ; STT: ds = es = ss 6151 <1> ; might return modeswitched (if dif2_gg_is_gg) 6152 <1> ; might be called while modeswitched 6153 <1> proceedbreakpoint: 6154 0000417D F606[A000]80 <1> testopt [internalflags2], dif2_tpg_keep_proceed_bp 6155 00004182 750D <1> jnz @F 6156 <1> 6157 00004184 66 <1> _386_PM_o32 ; mov edx, esi 6158 00004185 89F2 <1> mov dx, si ; bx:(e)dx = segmented 6159 00004187 E8D4F5 <1> call getlinear ; dx:ax = linear 6160 <1> 6161 0000418A A3[C400] <1> mov word [tpg_proceed_bp], ax 6162 <1> ; The following two instructions must be in this order. 6163 <1> ; For the non-_PM build, writing to the second word 6164 <1> ; of the breakpoint also writes to the content byte. 6165 0000418D 8916[C600] <1> mov word [tpg_proceed_bp + 2], dx 6166 <1> ; store in point 6167 <1> @@: 6168 00004191 C606[CC00]CC <1> mov byte [tpg_proceed_bp + BPSIZE - 1], 0CCh 6169 <1> ; initialise content 6170 00004196 E8B9FE <1> call proceed_writepoint 6171 <1> ; This call might return modeswitched. 6172 00004199 7308 <1> jnc @F 6173 <1> 6174 0000419B 80E47F <1> and ah, ~80h ; mark error during writing 6175 <1> 6176 0000419E 31C9 <1> xor cx, cx ; cx = 0 in case of branching 6177 000041A0 51 <1> push cx ; put the zero on the stack 6178 <1> 6179 000041A1 EB0E <1> jmp .failure 6180 <1> 6181 <1> @@: 6182 <1> ; The run functions call resetmode. 6183 <1> %if _BREAKPOINTS 6184 000041A3 E87900 <1> call run_with_bb 6185 000041A6 89C8 <1> mov ax, cx 6186 <1> %else 6187 <1> call run 6188 <1> xor ax, ax 6189 <1> %endif 6190 000041A8 50 <1> push ax 6191 <1> 6192 <1> ; It's important to keep the linear address saved inbetween, 6193 <1> ; even though we save by value (as opposed to DEBUG/X G's saving 6194 <1> ; of the reference) because the selector that we used for the 6195 <1> ; access might now be invalid or (worse) point elsewhere, or 6196 <1> ; a mode change might have occured. (The latter is sometimes 6197 <1> ; handled by a specific kludge in DEBUG/X, but not always.) 6198 <1> 6199 000041A9 E898FE <1> call proceed_writepoint_restore 6200 <1> ; This call might return modeswitched. 6201 000041AC 7329 <1> jnc @F 6202 <1> 6203 000041AE 80CC80 <1> or ah, 80h ; mark error during restoration 6204 <1> 6205 <1> .failure: 6206 <1> ; Here we may be modeswitched. 6207 000041B1 F606[A000]08 <1> testopt [internalflags2], dif2_gg_is_gg 6208 <1> ; is it from gg ? 6209 000041B6 7558 <1> jnz .return_CY_pop_cx ; (CY) yes, return to gg 6210 <1> ; This branch may be taken while modeswitched. 6211 <1> 6212 <1> %if _PM 6213 000041B8 E8BCF6 <1> call resetmode 6214 <1> %endif 6215 <1> 6216 000041BB E88DF0 <1> call put_deferred_message_silent 6217 <1> 6218 000041BE 50 <1> push ax 6219 000041BF E83A7B <1> call silence_dump 6220 000041C2 58 <1> pop ax 6221 <1> 6222 000041C3 FF36[C600] <1> push word [tpg_proceed_bp + 2] 6223 000041C7 FF36[C400] <1> push word [tpg_proceed_bp] 6224 000041CB 8A1E[CC00] <1> mov bl, [tpg_proceed_bp + BPSIZE - 1] 6225 000041CF B700 <1> mov bh, 0 6226 000041D1 E8D9FE <1> call display_breakpoint_failure 6227 <1> ; This function calls resetmode. 6228 000041D4 E929BE <1> jmp cmd3 6229 <1> 6230 <1> @@: 6231 000041D7 E823F6 <1> call get_cseip_of_possible_breakpoint 6232 <1> ; dx:ax = linear address 1 before cs:(e)ip 6233 000041DA 7232 <1> jc .return_CY_pop_cx_ax_zero 6234 <1> 6235 000041DC 59 <1> pop cx 6236 <1> %if _PM 6237 000041DD 3916[C600] <1> cmp word [tpg_proceed_bp + 2], dx 6238 <1> %else 6239 <1> test dh, dh ; (bits 24 to 31 set. shouldn't happen) 6240 <1> jnz .not_pp 6241 <1> cmp byte [tpg_proceed_bp + 2], dl 6242 <1> %endif 6243 000041E1 7511 <1> jne .not_pp 6244 000041E3 3906[C400] <1> cmp word [tpg_proceed_bp], ax 6245 000041E7 750B <1> jne .not_pp ; is unexpected (not behind the breakpoint) --> 6246 <1> 6247 <1> ; Need to check this here, because we have to 6248 <1> ; decrement (e)ip if the breakpoint was hit. 6249 000041E9 813E[D80B][947A] <1> cmp word [run_int], int3msg 6250 000041EF 7503 <1> jne .not_pp ; is unexpected (not returned by interrupt 03h) --> 6251 000041F1 80C908 <1> or cl, 8 ; set flag: pp hit 6252 <1> 6253 <1> .not_pp: 6254 000041F4 B400 <1> mov ah, 0 ; set error to "no error" 6255 <1> 6256 000041F6 E319 <1> jcxz .return_CY ; bb hit/pass/nonpass or pp hit ? if no --> 6257 <1> 6258 000041F8 E872F0 <1> call adjust_cseip_after_breakpoint 6259 <1> ; decrement (e)ip to point at the instruction 6260 <1> 6261 000041FB F6C101 <1> test cl, 1 ; bb hit ? 6262 000041FE 750A <1> jnz .return ; yes, return (NC, NZ) --> 6263 <1> 6264 00004200 F6C108 <1> test cl, 8 ; proceed point matched ? 6265 00004203 7506 <1> jnz @F ; yes --> 6266 <1> 6267 00004205 800E[A000]80 <1> setopt [internalflags2], dif2_tpg_keep_proceed_bp 6268 <1> ; flag that we should keep this proceed point 6269 <1> ; (NC, NZ) 6270 <1> .return: 6271 0000420A C3 <1> retn 6272 <1> 6273 <1> @@: 6274 <1> ; return with ax = 0, NC, ZR 6275 <1> ; 6276 <1> ; (hit proceed point, no hit bb (possibly pass/non-pass bb) 6277 0000420B 31C0 <1> xor ax, ax ; ah = 0 (NC, ZR) 6278 0000420D C3 <1> retn 6279 <1> 6280 <1> ; set ax = 0, pop cx, CY 6281 <1> .return_CY_pop_cx_ax_zero: 6282 0000420E 31C0 <1> xor ax, ax 6283 <1> 6284 <1> ; pop cx, CY (preserve ax) 6285 <1> .return_CY_pop_cx: 6286 00004210 59 <1> pop cx 6287 <1> .return_CY: 6288 00004211 F9 <1> stc 6289 00004212 C3 <1> retn 6290 <1> 6291 <1> 6292 <1> ; PPX - Get next byte in instruction stream. 6293 <1> ; INP: bx:(e)si-> next byte 6294 <1> ; OUT: al = next byte 6295 <1> ; (e)si incremented 6296 <1> pp16: 6297 <1> %if _PM 6298 00004213 E81B1B <1> call resetmode_and_test_d_b_bit 6299 <1> %endif 6300 00004216 1E <1> push ds 6301 00004217 8EDB <1> mov ds, bx 6302 <1> %if _PM 6303 00004219 7401 <1> jz .16 6304 0000421B 67 <1> a32 ; use esi for lodsb 6305 <1> .16: 6306 <1> %endif 6307 0000421C AC <1> lodsb 6308 0000421D 1F <1> pop ds 6309 0000421E C3 <1> retn 6310 <1> ; begin loop over instruction bytes. 6311 <1> 6312 <1> 6313 <1> %if _BREAKPOINTS 6314 <1> ; Run with bb breakpoints 6315 <1> ; 6316 <1> ; OUT: CY if another breakpoint (not a bb one) or trace hit, 6317 <1> ; cx = 0 6318 <1> ; NC if a bb breakpoint hit, 6319 <1> ; cx & 1 set if it is an actual hit 6320 <1> ; else cx & 2 set if it is a pass match, 6321 <1> ; else it is a non-pass non-match 6322 <1> ; (cx & 4 always set) 6323 <1> ; STT: might return modeswitched 6324 <1> run_with_bb: 6325 0000421F F606[A000]08 <1> testopt [internalflags2], dif2_gg_is_gg 6326 00004224 750C <1> jnz .no_bb 6327 <1> 6328 00004226 F606[9F00]C0 <1> testopt [internalflags], tt_no_bb | tt_no_bb_first 6329 0000422B 740C <1> jz @F 6330 <1> 6331 0000422D 8026[9F00]7F <1> clropt [internalflags], tt_no_bb_first 6332 <1> 6333 <1> .no_bb: 6334 00004232 E87400 <1> call run 6335 00004235 31C9 <1> xor cx, cx 6336 00004237 F9 <1> stc 6337 00004238 C3 <1> retn 6338 <1> 6339 <1> @@: 6340 <1> .gg5: 6341 <1> %if _BREAKPOINTS 6342 00004239 E871F2 <1> call bb_writepoints_init_reset 6343 <1> %endif 6344 <1> 6345 0000423C F606[A000]10 <1> testopt [internalflags2], dif2_gg_first_detected 6346 00004241 7436 <1> jz .only_run ; easy case, no cseip point detected --> 6347 <1> 6348 <1> 6349 <1> ; Enter special mode: Restore cseip breakpoint content. 6350 00004243 800E[A000]02 <1> setopt [internalflags2], dif2_gg_skip_non_cseip 6351 <1> 6352 00004248 83EC20 <1> sub sp, _NUM_B_BP * 2 6353 0000424B 89E5 <1> mov bp, sp ; -> error info 6354 <1> 6355 0000424D B91000 <1> mov cx, _NUM_B_BP ; = index above last one to restore 6356 00004250 E828F3 <1> call bb_restorepoints_and_init_error_info 6357 00004253 7317 <1> jnc @F ; no error ? --> 6358 <1> 6359 <1> ; Error in bb_restorepoints. Try to restore other bb. 6360 <1> 6361 <1> ; Exit special mode: Handle non-cseip breakpoints again. 6362 00004255 8026[A000]FD <1> clropt [internalflags2], dif2_gg_skip_non_cseip 6363 <1> 6364 <1> ; Enter special mode: Skip cseip breakpoints. 6365 0000425A 800E[A000]04 <1> setopt [internalflags2], dif2_gg_skip_cseip 6366 <1> 6367 <1> ; As we already tried to restore all cseip bb points, 6368 <1> ; here we skip these in the bb_restorepoints call. 6369 0000425F B91000 <1> mov cx, _NUM_B_BP 6370 00004262 E819F3 <1> call bb_restorepoints 6371 <1> 6372 <1> ; Exit special mode: No longer skip cseip breakpoints. 6373 00004265 8026[A000]FB <1> clropt [internalflags2], dif2_gg_skip_cseip 6374 <1> 6375 <1> ; The failure that led us here is already noted in the info. 6376 0000426A EB1D <1> jmp .bb_exit 6377 <1> 6378 <1> 6379 <1> @@: 6380 <1> ; Success! Now discard the reserved error info. 6381 0000426C 83C420 <1> add sp, _NUM_B_BP * 2 6382 <1> 6383 <1> ; Exit special mode, do not skip non-cseip breakpoints anymore. 6384 0000426F 8026[A000]FD <1> clropt [internalflags2], dif2_gg_skip_non_cseip 6385 <1> 6386 <1> ; Enter special mode: Skip matching/restoring cseip breakpoint. 6387 00004274 800E[A000]04 <1> setopt [internalflags2], dif2_gg_skip_cseip 6388 <1> 6389 <1> .only_run: 6390 00004279 E82D00 <1> call run 6391 <1> .after_run: 6392 <1> 6393 <1> %if _BREAKPOINTS 6394 0000427C 83EC20 <1> sub sp, _NUM_B_BP * 2 6395 0000427F 89E5 <1> mov bp, sp 6396 <1> 6397 00004281 B91000 <1> mov cx, _NUM_B_BP ; = index above last one to restore 6398 00004284 E8F4F2 <1> call bb_restorepoints_and_init_error_info 6399 00004287 7308 <1> jnc @F 6400 <1> 6401 <1> .bb_exit: 6402 00004289 B8FFFF <1> mov ax, -1 6403 0000428C 50 <1> push ax ; (unused: ax error info) 6404 0000428D 50 <1> push ax ; cx error point index, -1 = invalid 6405 <1> 6406 0000428E E939F2 <1> jmp bb_restorepoints_exit 6407 <1> 6408 <1> 6409 <1> @@: 6410 00004291 83C420 <1> add sp, _NUM_B_BP * 2 6411 <1> 6412 00004294 E8F1EF <1> call bb_check_hit 6413 00004297 89C1 <1> mov cx, ax 6414 00004299 9C <1> pushf 6415 <1> ; Clear all special modes. Stop specialcasing cseip breakpoint. 6416 <1> ; 6417 <1> ; This resets all the special flags for subsequent calls. 6418 0000429A 8026[A000]E8 <1> clropt [internalflags2], dif2_gg_is_first | dif2_gg_first_detected | dif2_gg_skip_cseip | dif2_gg_skip_non_cseip 6421 0000429F 9D <1> popf ; CF 6422 000042A0 7302 <1> jnc @F 6423 <1> 6424 000042A2 F9 <1> stc 6425 <1> ; cx = flags as returned by bb_check_hit 6426 000042A3 C3 <1> retn 6427 <1> 6428 <1> @@: 6429 000042A4 E8C6EF <1> call adjust_cseip_after_breakpoint 6430 <1> ; re-execute (restored) opcode one byte in front of this 6431 000042A7 F8 <1> clc ; (NC) 6432 <1> ; cx = flags as returned by bb_check_hit 6433 000042A8 C3 <1> retn 6434 <1> %endif 6435 <1> %endif 6436 <1> 6437 <1> 6438 <1> ; Run - Start up the running program. 6439 <1> ; 6440 <1> ; INP: b[eqflag], a[eqladdr] = address given behind '=' for command 6441 <1> ; w[pspdbe] = process of debuggee 6442 <1> ; [run2324] = interrupt handlers 23h and 24h to set 6443 <1> ; values for registers in d[reg_eax] etc 6444 <1> ; OUT: (_DEBUG && _DEBUGUPDATESAVE) 6445 <1> ; interrupt handlers' ieNext fields updated 6446 <1> ; d[reg_eax] etc updated 6447 <1> ; w[run_int]-> message of how execution returned 6448 <1> ; UP, EI, high word efl = 0, es = ds = ss 6449 <1> ; CHG: all 6450 <1> ; STT: ds = ss 6451 <1> ; UP 6452 <1> ; (INP:es ignored) 6453 <1> run: 6454 000042A9 16 <1> push ss 6455 000042AA 07 <1> pop es 6456 <1> %if _PM 6457 000042AB E8C9F5 <1> call resetmode 6458 000042AE E84802 <1> call remember_mode 6459 <1> %endif 6460 <1> %if _DELAY_BEFORE_BP 6461 000042B1 8026[A600]7F <1> clropt [internalflags3], dif3_delayed 6462 <1> %endif 6463 000042B6 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 6467 000042BC E86104 <1> call seteq ; set CS:IP to '=' address 6468 <1> 6469 <1> ; For DDebugX: Do this before we install our 6470 <1> ; exception handlers. So if an exception 6471 <1> ; is raised then it is handled by the outer 6472 <1> ; instance instead of our handler. 6473 <1> ; (The actual problem may be that we don't 6474 <1> ; restore the handlers in the entrypoint 6475 <1> ; that leads to debuggerexception.) 6476 <1> ; Also, for non-_DEBUG DebugX too, check the 6477 <1> ; validity before setting debuggee PSP and 6478 <1> ; int 23h, 24h so they needn't be reset. 6479 <1> %if _PM 6480 <1> ; Load segreg values into es to make sure 6481 <1> ; they're valid. (Previously done with 6482 <1> ; the stack pointing into the reg array. 6483 <1> ; Better to do it now with a valid stack.) 6484 <1> ; Only done if we may be in Protected Mode. 6485 <1> ; 86 Mode allows any value to be loaded. 6486 000042BF 8E06[840C] <1> mov es, word [reg_ds] 6487 000042C3 8E06[8C0C] <1> mov es, word [reg_ss] 6488 000042C7 8E06[940C] <1> _386 mov es, word [reg_fs] 6489 000042CB 8E06[980C] <1> _386 mov es, word [reg_gs] 6490 <1> %endif 6491 000042CF 8E06[880C] <1> mov es, word [reg_es] ; last one: actual es value 6492 <1> 6493 000042D3 8B1E[A40A] <1> mov bx, word [pspdbe] 6494 000042D7 E8FC4E <1> call setpsp ; set debuggee's PSP 6495 000042DA E89062 <1> call setint2324 ; set debuggee's int 23/24 6496 <1> %if _DEBUG ; set this copy's divide/trace/breakpoint ints 6497 <1> %if _TSR || _BOOTLDR 6498 <1> ..@patch_tsr_quit_run: 6499 <1> db __TEST_IMM16 6500 <1> dw __REL16__(.skipints) 6501 <1> %endif 6502 <1> push cx 6503 <1> push si 6504 <1> push ax 6505 <1> push dx 6506 <1> push es 6507 <1> push bx 6508 <1> push bp 6509 <1> push di 6510 <1> 6511 <1> %if _PM 6512 <1> call ispm 6513 <1> jz @F ; in PM --> 6514 <1> testopt [internalflags], canswitchmode 6515 <1> jz @FF ; in 86 Mode and cannot switch to PM --> 6516 <1> 6517 <1> d4 call d4message 6518 <1> d4 asciz "In run (switch mode before calling pm_set_handlers)",13,10 6519 <1> setopt [internalflags], modeswitched ; set flag for resetmode 6520 <1> mov al, 0 6521 <1> call sr_state ; save state 6522 <1> call switchmode ; switch to PM 6523 <1> ; ! handle_mode_changed not called here ! 6524 <1> ; do not call InDos or other functions using seg/sels 6525 <1> @@: 6526 <1> call pm_set_handlers 6527 <1> ; ! this calls resetmode 6528 <1> @@: 6529 <1> %endif 6530 <1> 6531 <1> mov cx, inttab_number 6532 <1> mov si, inttab 6533 <1> .intloop: 6534 <1> lodsb 6535 <1> xchg ax, dx 6536 <1> lodsw ; get address 6537 <1> xchg ax, dx 6538 <1> %if _DEBUGUPDATESAVE 6539 <1> mov di, dx ; -> IISP header 6540 <1> %endif 6541 <1> 6542 <1> call InDos 6543 <1> jz .int21_25 6544 <1> 6545 <1> xor bx, bx 6546 <1> %if _PM 6547 <1> call ispm 6548 <1> jnz @F 6549 <1> push dx 6550 <1> mov dx, bx ; set segment to access (= 0) 6551 <1> call setrmsegm ; get bx = selector configured to this 6552 <1> pop dx 6553 <1> @@: 6554 <1> %endif 6555 <1> mov es, bx ; => 86 Mode IVT (segment or selector) 6556 <1> %if _PM 6557 <1> xor bx, bx ; bh = 0 6558 <1> %endif 6559 <1> mov bl, al 6560 <1> add bx, bx 6561 <1> add bx, bx 6562 <1> 6563 <1> %if _DEBUGUPDATESAVE 6564 <1> push word [ es:bx + 2 ] 6565 <1> push word [ es:bx ] ; get vector 6566 <1> pop word [ di + ieNext ] 6567 <1> pop word [ di + ieNext + 2] 6568 <1> %endif 6569 <1> 6570 <1> mov word [ es:bx ], dx 6571 <1> %if _PM 6572 <1> push word [ pspdbg ] ; => lDEBUG_DATA_ENTRY (86 Mode seg) 6573 <1> pop word [ es:bx + 2 ] 6574 <1> %else 6575 <1> mov word [ es:bx + 2 ], ds ; => lDEBUG_DATA_ENTRY 6576 <1> %endif 6577 <1> jmp short .intset 6578 <1> 6579 <1> .int21_25: 6580 <1> 6581 <1> %if _PM 6582 <1> %if _DEBUGUPDATESAVE 6583 <1> mov ah, 35h ; get interrupt vector 6584 <1> push word [pspdbg] ; => lDEBUG_DATA_ENTRY 6585 <1> call _doscall_return_es_parameter_es_ds 6586 <1> mov word [ di + ieNext ], bx 6587 <1> pop word [ di + ieNext + 2 ] 6588 <1> %endif 6589 <1> mov ah, 25h ; set interrupt vector 6590 <1> push word [pspdbg] ; => lDEBUG_DATA_ENTRY 6591 <1> call _doscall_return_es_parameter_es_ds 6592 <1> pop ax ; (discard returned parameter) 6593 <1> %else 6594 <1> %if _DEBUGUPDATESAVE 6595 <1> mov ah, 35h 6596 <1> int 21h ; get vector 6597 <1> mov word [ di + ieNext ], bx 6598 <1> mov word [ di + ieNext + 2 ], es 6599 <1> %endif 6600 <1> mov ah, 25h ; set interrupt vector 6601 <1> int 21h ; ds => lDEBUG_DATA_ENTRY 6602 <1> %endif 6603 <1> .intset: 6604 <1> loop .intloop 6605 <1> 6606 <1> pop di 6607 <1> pop bp 6608 <1> pop bx 6609 <1> pop es 6610 <1> pop dx 6611 <1> pop ax 6612 <1> pop si 6613 <1> pop cx 6614 <1> .skipints: 6615 <1> %endif 6616 <1> 6617 <1> .2: 6618 000042DD 8926[A00A] <1> mov word [run_sp], sp ; save stack position 6619 <1> 6620 <1> ; Disable this for now. The debugger uses its ss 6621 <1> ; for 86 Mode and Protected Mode at the same area 6622 <1> ; so it should always be valid to adjust SPSAV with 6623 <1> ; the current run_sp, regardless of current mode. 6624 <1> ; Update: SPSAV should always hold a 86 Mode address. 6625 <1> ; So check for our segment, not the current ss. (But 6626 <1> ; for _PM=0 ss is always equal to word [pspdbg].) 6627 <1> ; I assume that the original fix was intended for cases 6628 <1> ; where the segment doesn't match our 86 Mode ss, that 6629 <1> ; is the word [pspdbg]. 6630 <1> %if 1 6631 <1> ; 16.2.2021: check if saved SS is debugger's SS. If no, don't adjust saved SP. 6632 <1> ; SS may be != saved SS if debugger is stopped in protected-mode - then the 6633 <1> ; current DPMI real-mode stack may be stored in SPSAV. 6634 <1> %if _PM 6635 000042E1 A1[A60A] <1> mov ax, word [pspdbg] 6636 <1> %else 6637 <1> mov ax, ss 6638 <1> %endif 6639 000042E4 3B063000 <1> cmp ax, word [SPSAV + 2] 6640 000042E8 7508 <1> jne @F 6641 <1> %endif 6642 000042EA 2B26[A20A] <1> sub sp, word [spadjust] 6643 000042EE 89262E00 <1> mov word [SPSAV], sp 6644 <1> @@: 6645 000042F2 FA <1> cli 6646 <1> 6647 000042F3 BC[640C] <1> mov sp, regs 6648 <1> %ifn _ONLY386 6649 000042F6 EB11 <1> _386_jmps .386 ; --> 6650 000042F8 58 <1> pop ax 6651 000042F9 58 <1> pop ax ; discard all high words 6652 000042FA 5B <1> pop bx 6653 000042FB 58 <1> pop ax 6654 000042FC 59 <1> pop cx 6655 000042FD 58 <1> pop ax 6656 000042FE 5A <1> pop dx 6657 000042FF 58 <1> pop ax 6658 00004300 58 <1> pop ax ; we'll get esp later 6659 00004301 58 <1> pop ax 6660 00004302 5D <1> pop bp 6661 00004303 58 <1> pop ax 6662 00004304 5E <1> pop si 6663 00004305 58 <1> pop ax 6664 00004306 5F <1> pop di 6665 <1> ; ds, ss, cs loaded later 6666 <1> ; es already loaded 6667 <1> %endif 6668 <1> %ifn _ONLYNON386 6669 <1> %ifn _ONLY386 6670 00004307 EB18 <1> jmp short .common 6671 <1> %endif 6672 <1> 6673 <1> .386: 6674 <1> [cpu 386] 6675 00004309 6658 <1> pop eax 6676 0000430B 665B <1> pop ebx 6677 0000430D 6659 <1> pop ecx 6678 0000430F 665A <1> pop edx 6679 00004311 58 <1> pop ax 6680 00004312 58 <1> pop ax ; we'll get esp later 6681 00004313 665D <1> pop ebp 6682 00004315 665E <1> pop esi 6683 00004317 665F <1> pop edi 6684 <1> ; pop ax ; get ds later 6685 <1> ; pop ax ; discard high words of segment registers 6686 <1> ; pop ax ; es already loaded 6687 <1> ; pop ax 6688 <1> ; pop ax ; get ss later 6689 <1> ; pop ax 6690 <1> ; pop ax ; get cs later 6691 <1> ; pop ax 6692 00004319 83C410 <1> add sp, byte 8 * 2 6693 0000431C 0FA1 <1> pop fs 6694 0000431E 58 <1> pop ax 6695 0000431F 0FA9 <1> pop gs 6696 <1> __CPU__ 6697 <1> .common: 6698 <1> %endif 6699 00004321 A1[640C] <1> mov ax, word [reg_eax] ; restore ax (used to discard words) 6700 00004324 8E16[8C0C] <1> mov ss, word [reg_ss] 6701 <1> %if _ONLYNON386 6702 <1> mov sp, word [reg_esp] 6703 <1> %else 6704 <1> ..@patch_no386_ds: 6705 00004328 66 <1> o32 ; mov esp, dword [reg_esp] 6706 00004329 8B26[740C] <1> mov sp, word [reg_esp] ; restore program stack 6707 <1> %endif 6708 0000432D C606[E60A]00 <1> mov byte [bInDbg], 0 6709 00004332 66 <1> _386_o32 ; push dword [reg_efl] 6710 00004333 FF36[A00C] <1> push word [reg_efl] 6711 00004337 66 <1> _386_o32 ; push dword [reg_cs] ; high word is zero 6712 00004338 FF36[900C] <1> push word [reg_cs] 6713 0000433C 66 <1> _386_o32 ; push dword [reg_eip] 6714 0000433D FF36[9C0C] <1> push word [reg_eip] 6715 00004341 F606[A10C]02 <1> test byte [reg_efl+1], 2 ; IF set? 6716 00004346 8E1E[840C] <1> mov ds, word [reg_ds] ; restore ds 6717 0000434A 7401 <1> jz .di 6718 0000434C FB <1> sti ; required for ring3 protected mode if IOPL==0 6719 <1> .di: 6720 <1> %if _ONLYNON386 6721 <1> iret 6722 <1> %else 6723 <1> ..@patch_no386_iret: 6724 0000434D 66 <1> o32 ; iretd 6725 0000434E CF <1> iret ; jump to program 6726 <1> %endif 6727 <1> 6728 <1> ; The byte at ..@patch_no386_ds will be adjusted to a ds prefix on non-386 processors. 6729 <1> ; This does not change the following instruction's behaviour (aside from changing it 6730 <1> ; to a 16-bit instruction as intended) and insures that sp is set in the instruction 6731 <1> ; right behind the instruction that sets ss. 6732 <1> 6733 <1> ; The byte at ..@patch_no386_iret will be adjusted to an iret instruction on non-386 processors. 6734 <1> ; This avoids the NOP that would be written there if _386_o32 was used, because the iret 6735 <1> ; should follow right behind the sti instruction. 6736 <1> 6737 <1> 6738 <1> usesection lDEBUG_DATA_ENTRY 6739 <1> 6740 <1> %if _CATCHINT08 6741 00008554 CB90EB10000000004B- <1> iispentry intr8, 0 6741 0000855D 4200EBF300 <1> 6742 <1> intr8_original: equ intr8.next 6743 00008568 9C <1> pushf 6744 00008569 2EFF1E[5885] <1> call far [cs:intr8_original] 6745 0000856E 9C <1> pushf 6746 0000856F 53 <1> push bx 6747 00008570 1E <1> push ds 6748 <1> 6749 00008571 0E <1> push cs 6750 00008572 1F <1> pop ds 6751 <1> 6752 00008573 803E[E60A]00 <1> cmp byte [bInDbg], 0 ; in debugger ? 6753 00008578 754D <1> jne .reset ; yes --> 6754 <1> 6755 0000857A F606[EB0B]04 <1> testopt [serial_flags], sf_double_ctrl_c 6756 0000857F 7408 <1> jz @F 6757 <1> 6758 00008581 C706[D80B][247B] <1> mov word [run_int], runint_ctrlc_msg 6759 00008587 EB38 <1> jmp @FF 6760 <1> 6761 <1> @@: 6762 00008589 BB4000 <1> mov bx, 40h 6763 0000858C 8EDB <1> mov ds, bx 6764 0000858E F606170004 <1> test byte [17h], 4 ; CTRL currently pressed ? 6765 00008593 0E <1> push cs 6766 00008594 1F <1> pop ds 6767 00008595 7430 <1> jz .reset ; no --> 6768 <1> 6769 00008597 FF06[E40B] <1> inc word [intr8_counter] 6770 0000859B 833E[E40B]5A <1> cmp word [intr8_counter], 18 * 5 ; ca 5 seconds 6771 000085A0 722A <1> jb .return 6772 <1> 6773 000085A2 C706[D80B][C77A] <1> mov word [run_int], int8msg 6774 000085A8 F606[7D00]80 <1> testopt [options], int8_disable_serial 6775 000085AD 7412 <1> jz @F 6776 000085AF F606[7D00]40 <1> testopt [options], enable_serial 6777 000085B4 740B <1> jz @F 6778 <1> 6779 000085B6 8026[7D00]BF <1> clropt [options], enable_serial 6780 000085BB C706[D80B][EC7A] <1> mov word [run_int], int8_kbd_msg 6781 <1> 6782 <1> @@: 6783 000085C1 1F <1> pop ds 6784 000085C2 5B <1> pop bx 6785 000085C3 9D <1> popf ; (in 86 Mode) 6786 000085C4 E90B01 <1> jmp intrtn 6787 <1> 6788 <1> .reset: 6789 000085C7 8326[E40B]00 <1> and word [intr8_counter], 0 6790 <1> .return: 6791 000085CC 1F <1> pop ds 6792 000085CD 5B <1> pop bx 6793 000085CE 9D <1> popf ; (in 86 Mode) 6794 000085CF CF <1> iret 6795 <1> %endif 6796 <1> 6797 <1> 6798 <1> ; Interrupt 22h (program termination) handler. 6799 <1> int22: 6800 000085D0 FA <1> cli 6801 <1> .cleartraceflag: 6802 000085D1 0E <1> push cs 6803 000085D2 1F <1> pop ds 6804 000085D3 0E <1> push cs 6805 000085D4 17 <1> pop ss 6806 000085D5 8B26[A00A] <1> mov sp, word [run_sp] ; restore running stack 6807 000085D9 C706[D80B][247D] <1> mov word [run_int], progtrm ; set interrupt message 6808 000085DF C706[DA0B][E003] <1> mov word [lastcmd], dmycmd ; disable T/P/G auto-repeat 6809 <1> %if _PM 6810 000085E5 8026[9D00]F7 <1> clropt [internalflags], protectedmode ; reset PM flag 6811 <1> %endif 6812 000085EA 90 <1> times 1 - (($ - $$) & 1) nop ; align in-code parameter 6813 000085EB E8F1FA <1> call entry_to_code_seg 6814 000085EE [C343] <1> dw intrtn1_code 6815 <1> ; jump to register saving routine 6816 <1> 6817 <1> 6818 <1> sharedentry1.hwreset: 6819 000085F0 CB <1> retf 6820 <1> 6821 <1> 6822 <1> ; Interrupt 01h (single-step interrupt) handler. 6823 000085F1 90EB10000000004B42- <1> iispentry intr1, 0, sharedentry1 6823 000085FA 00EBF300 <1> 6824 <1> lframe int 6825 00008604 5589E5 <1> lenter 6826 00008607 50 <1> push ax 6827 <1> 6828 00008608 806607FE <1> clropt [bp + ?frame_fl], 100h ; clear TF (always) 6829 0000860C 8CC8 <1> mov ax, cs 6830 0000860E 394604 <1> cmp word [bp + ?frame_cs], ax ; entry segment ? 6831 00008611 7513 <1> jne .if_ZR ; no --> (NZ) 6832 <1> %if _PM 6833 00008613 817E02[C595] <1> cmp word [bp + ?frame_ip], getline_extra_int22.cleartraceflag 6834 00008618 740C <1> je .if_ZR ; that one --> (ZR) 6835 <1> %endif 6836 0000861A 817E02[D185] <1> cmp word [bp + ?frame_ip], int22.cleartraceflag 6837 0000861F 7405 <1> je .if_ZR ; that one --> (ZR) 6838 00008621 817E02[0081] <1> cmp word [bp + ?frame_ip], debug22.cleartraceflag 6839 <1> .if_ZR: 6840 00008626 58 <1> pop ax 6841 00008627 5D <1> lleave , optimiserestoresp 6842 00008628 7501 <1> jnz @F 6843 0000862A CF <1> iret ; continue run if matched 6844 <1> 6845 <1> @@: 6846 0000862B 2EC706[D80B][717A] <1> mov word [cs:run_int], int1msg ; remember interrupt type 6847 00008632 E99D00 <1> jmp intrtn ; jump to register saving routine 6848 <1> 6849 <1> 6850 <1> ; Interrupt 00h (divide error) handler. 6851 00008635 90EB10000000004B42- <1> iispentry intr0, 0, sharedentry1 6851 0000863E 00EBAF00 <1> 6852 00008648 2EC706[D80B][627A] <1> mov word [cs:run_int], int0msg ; remember interrupt type 6853 0000864F E98000 <1> jmp intrtn ; jump to register saving routine 6854 <1> 6855 <1> 6856 <1> 6857 <1> ; Interrupt 03h (breakpoint interrupt) handler. 6858 00008652 EB10000000004B4200- <1> iispentry intr3, 0, sharedentry1 6858 0000865B EB9300 <1> 6859 00008664 2EC706[D80B][947A] <1> mov word [cs:run_int], int3msg ; remember interrupt type 6860 <1> %if _CATCHINT06 6861 0000866B EB65 <1> jmp intrtn ; jump to register saving routine 6862 <1> 6863 <1> 6864 <1> ; Interrupt 06h (invalid opcode) handler. 6865 0000866D 90EB10000000004B42- <1> iispentry intr6, 0, sharedentry2 6865 00008676 00EB7B00 <1> 6866 00008680 2EC706[D80B][B67A] <1> mov word [cs:run_int], int6msg ; remember interrupt type 6867 <1> %endif 6868 <1> %if _CATCHINT18 6869 00008687 EB49 <1> jmp intrtn ; jump to register saving routine 6870 <1> 6871 <1> 6872 <1> ; Interrupt 18h (diskless boot hook) handler. 6873 00008689 90EB10000000004B42- <1> iispentry intr18, 0, sharedentry2 6873 00008692 00EB5F00 <1> 6874 0000869C 2EC706[D80B][4B7B] <1> mov word [cs:run_int], int18msg ; remember interrupt type 6875 <1> %endif 6876 <1> %if _CATCHINT19 6877 000086A3 EB2D <1> jmp intrtn ; jump to register saving routine 6878 <1> 6879 <1> 6880 <1> ; Interrupt 19h (boot load) handler. 6881 000086A5 90EB10000000004B42- <1> iispentry intr19, 0, sharedentry2 6881 000086AE 00EB4300 <1> 6882 000086B8 2EC706[D80B][677B] <1> mov word [cs:run_int], int19msg ; remember interrupt type 6883 000086BF 2EC706[DA0B][E003] <1> mov word [cs:lastcmd], dmycmd ; disable T/P/G auto-repeat 6884 000086C6 2EC606[DC0B]00 <1> mov byte [cs:bInit], 0 6885 000086CC 2E8026[A300]FE <1> clropt [cs:internalflags2], dif2_boot_loaded_kernel 6886 <1> %endif 6887 <1> 6888 <1> ; Common interrupt routine. 6889 <1> 6890 <1> ; Housekeeping. 6891 <1> intrtn: 6892 000086D2 FA <1> cli ; just in case 6893 000086D3 2E8F06[9C0C] <1> pop word [cs:reg_eip] ; recover things from stack 6894 000086D8 2E8F06[900C] <1> pop word [cs:reg_cs] 6895 000086DD 2E8F06[A00C] <1> pop word [cs:reg_efl] 6896 000086E2 2E8C1E[840C] <1> mov word [cs:reg_ds], ds ; ! word-aligned (AC flag) 6897 000086E7 2EA3[640C] <1> mov word [cs:reg_eax], ax ; ! word-aligned (AC flag) 6898 000086EB 8CC8 <1> mov ax, cs 6899 000086ED 8ED8 <1> mov ds, ax ; => lDEBUG_DATA_ENTRY 6900 <1> times 1 - (($ - $$) & 1) nop ; align in-code parameter 6901 000086EF E8EDF9 <1> call entry_to_code_seg 6902 000086F2 [4F43] <1> dw intrtn_code 6903 <1> ; To avoid delaying the code segment switch, we use the client's 6904 <1> ; stack here to call (jump) via entry_to_code_seg. 6905 <1> 6906 <1> 6907 <1> sharedentry2.hwreset: 6908 000086F4 CB <1> retf 6909 <1> 6910 <1> 6911 <1> usesection lDEBUG_CODE 6912 <1> 6913 <1> code_insure_low_byte_not_0CCh 6914 <1> intrtn_code: 6915 0000434F 8C16[8C0C] <1> mov word [reg_ss], ss ; save stack position 6916 00004353 8326[9E0C]00 <1> _386 and word [reg_eip+2], byte 0 ; we're from real mode 6917 00004358 66 <1> _386_o32 ; mov dword [reg_esp], esp 6918 00004359 8926[740C] <1> mov word [reg_esp], sp 6919 0000435D 8ED0 <1> mov ss, ax ; mov ss, cs ; (don't use the stack here) 6920 <1> 6921 <1> %if _PM 6922 0000435F 8026[9D00]F7 <1> clropt [internalflags], protectedmode ; reset PM flag 6923 00004364 EB0D <1> jmp @F 6924 <1> 6925 <1> intrtn2_code: ; <--- entry protected mode 6926 00004366 368C1E[840C] <1> mov word [ss:reg_ds], ds ; ! word-aligned (AC flag) 6927 0000436B 36A3[640C] <1> mov word [ss:reg_eax], ax ; ! word-aligned (AC flag) 6928 0000436F 8CD0 <1> mov ax, ss 6929 00004371 8ED8 <1> mov ds, ax ; mov ds, ss 6930 <1> @@: 6931 <1> %endif 6932 00004373 B80200 <1> mov ax, 2 6933 <1> %ifn _ONLY386 6934 00004376 EB1A <1> _386_jmps .386 ; --> 6935 00004378 BC[8A0C] <1> mov sp, reg_es+2 6936 0000437B 06 <1> push es 6937 <1> ; sub sp, ax 6938 <1> ; sub sp, ax ; ds already saved 6939 <1> ; sub sp, ax ; don't overwrite high word of di 6940 0000437C 83EC06 <1> sub sp, byte 3*2 6941 0000437F 57 <1> push di 6942 00004380 29C4 <1> sub sp, ax 6943 00004382 56 <1> push si 6944 00004383 29C4 <1> sub sp, ax 6945 00004385 55 <1> push bp 6946 <1> ; sub sp, ax 6947 <1> ; sub sp, ax ; sp already saved 6948 <1> ; sub sp, ax 6949 00004386 83EC06 <1> sub sp, byte 3*2 6950 00004389 52 <1> push dx 6951 0000438A 29C4 <1> sub sp, ax 6952 0000438C 51 <1> push cx 6953 0000438D 29C4 <1> sub sp, ax 6954 0000438F 53 <1> push bx 6955 <1> %endif 6956 <1> %ifn _ONLYNON386 6957 <1> %ifn _ONLY386 6958 00004390 EB31 <1> jmp short .common 6959 <1> %endif 6960 <1> 6961 <1> .386: 6962 <1> [cpu 386] 6963 00004392 BC[9A0C] <1> mov sp, reg_gs+2 6964 00004395 0FA8 <1> push gs 6965 00004397 29C4 <1> sub sp, ax ; don't overwrite high words of segments 6966 00004399 0FA0 <1> push fs 6967 <1> ; sub sp, ax 6968 <1> ; sub sp, ax ; cs already saved 6969 <1> ; sub sp, ax 6970 <1> ; sub sp, ax ; ss already saved 6971 <1> ; sub sp, ax 6972 0000439B 83EC0A <1> sub sp, byte 5*2 6973 0000439E 06 <1> push es 6974 <1> ; sub sp, ax 6975 <1> ; sub sp, ax ; ds already saved 6976 0000439F 83EC04 <1> sub sp, byte 2*2 6977 000043A2 6657 <1> push edi 6978 000043A4 6656 <1> push esi 6979 000043A6 6655 <1> push ebp 6980 <1> ; sub sp, ax 6981 <1> ; sub sp, ax ; sp already saved 6982 000043A8 83EC04 <1> sub sp, byte 2*2 6983 000043AB 6652 <1> push edx 6984 000043AD 6651 <1> push ecx 6985 000043AF 669C <1> pushfd ; (this overwrites reg_ebx) 6986 000043B1 01C4 <1> add sp, ax ; discard low word of efl 6987 000043B3 8F06[A20C] <1> pop word [reg_efl+2] 6988 000043B7 6A00 <1> push 0 6989 000043B9 9C <1> pushf ; (this also overwrites reg_ebx) 6990 000043BA 669D <1> popfd ; clear high word of efl inside debugger (resets AC flag) 6991 000043BC 6653 <1> push ebx 6992 000043BE A1[640C] <1> mov ax, word [reg_eax] ; restore ax 6993 000043C1 6650 <1> push eax ; so we don't overwrite it with 2 here 6994 <1> __CPU__ 6995 <1> .common: 6996 <1> %endif 6997 <1> 6998 <1> code_insure_low_byte_not_0CCh 6999 <1> ; Clean up. 7000 <1> intrtn1_code: 7001 000043C3 8B26[A00A] <1> mov sp, word [run_sp] ; restore running stack 7002 000043C7 FC <1> cld ; clear direction flag 7003 000043C8 FB <1> sti ; interrupts back on 7004 000043C9 8026[A10C]FE <1> clropt [reg_efl], 100h ; clear TF 7005 <1> 7006 <1> %if _PM 7007 000043CE E85700 <1> call handle_mode_changed 7008 <1> %endif 7009 <1> 7010 000043D1 E8474E <1> call getpsp 7011 000043D4 891E[A40A] <1> mov word [pspdbe], bx 7012 <1> 7013 000043D8 E8D361 <1> call getint2324 ; save debuggee's int 23/24, set debugger's int 23/24 7014 <1> 7015 000043DB 16 <1> push ss 7016 000043DC 07 <1> pop es 7017 000043DD E8F44D <1> call setpspdbg ; set PSP of debugger 7018 <1> 7019 000043E0 E81AF4 <1> call get_cseip_of_possible_breakpoint 7020 <1> ; Initialise this here. This means we do not need to call 7021 <1> ; resetmode between proceed_wp and bb_wp and gg_wp. If 7022 <1> ; more than one point needs to switch modes this avoids 7023 <1> ; repeated modeswitching back and forth. 7024 <1> 7025 <1> %if _DEBUG ; reset to next copy's divide/trace/breakpoint ints 7026 <1> push cx 7027 <1> push si 7028 <1> push di 7029 <1> push ax 7030 <1> push bx 7031 <1> push dx 7032 <1> push bp 7033 <1> 7034 <1> %if _PM 7035 <1> call ispm 7036 <1> jz @F ; in PM --> 7037 <1> testopt [internalflags], canswitchmode 7038 <1> jz @FF ; in 86 Mode and cannot switch to PM --> 7039 <1> 7040 <1> d4 call d4message 7041 <1> d4 asciz "In intrtn1_code (switch mode before calling pm_reset_handlers)",13,10 7042 <1> setopt [internalflags], modeswitched ; set flag for resetmode 7043 <1> mov al, 0 7044 <1> call sr_state ; save state 7045 <1> call switchmode ; switch to PM 7046 <1> ; ! handle_mode_changed not called here ! 7047 <1> ; do not call InDos or other functions using seg/sels 7048 <1> @@: 7049 <1> call pm_reset_handlers 7050 <1> ; ! this calls resetmode 7051 <1> @@: 7052 <1> 7053 <1> numdef OVERRIDE_BUILD_PM_DEBUG, 0 7054 <1> %if ! _CATCHPMINT214C && ! _OVERRIDE_BUILD_PM_DEBUG 7055 <1> %fatal Cannot build DDEBUGX: handler switching without Int21.4C hook untested 7056 <1> %endif 7057 <1> %endif 7058 <1> 7059 <1> %if CATCHINTAMOUNT 7060 <1> mov cx, inttab_number 7061 <1> mov si, inttab 7062 <1> mov dx, -1 ; always force 7063 <1> .nextint: 7064 <1> lodsb 7065 <1> xchg ax, bx ; bl = number 7066 <1> lodsw ; si -> list 7067 <1> xchg ax, si ; si -> entry, ax -> list 7068 <1> xchg ax, bx ; al = number, bx -> list 7069 <1> call UnhookInterruptForce 7070 <1> xchg bx, si ; si -> list 7071 <1> loop .nextint 7072 <1> %endif 7073 <1> 7074 <1> pop bp 7075 <1> pop dx 7076 <1> pop bx 7077 <1> pop ax 7078 <1> pop di 7079 <1> pop si 7080 <1> pop cx 7081 <1> %endif 7082 <1> 7083 000043E3 800E[9D00]30 <1> setopt [internalflags], debuggerA20|debuggeeA20 ; assume A20 is on 7084 <1> %if _PM 7085 000043E8 E8DE4D <1> call ispm 7086 000043EB 7420 <1> jz .a20done ; assume A20 on. (is this the right thing to do?) 7087 <1> %endif 7088 000043ED 06 <1> push es 7089 000043EE 1E <1> push ds 7090 000043EF 57 <1> push di 7091 000043F0 56 <1> push si 7092 000043F1 51 <1> push cx 7093 000043F2 31F6 <1> xor si, si 7094 000043F4 8EDE <1> mov ds, si ; ds = 0000h 7095 000043F6 4E <1> dec si 7096 000043F7 8EC6 <1> mov es, si ; es = FFFFh 7097 000043F9 46 <1> inc si ; ds:si = 0000h:0000h = 00000h 7098 000043FA BF1000 <1> mov di, 0010h ; es:di = FFFFh:0010h = 100000h (same address if it overflows) 7099 000043FD 89F9 <1> mov cx, di ; 32 byte (16 = 10h word) 7100 000043FF F3A7 <1> repe cmpsw ; compare them and assume A20 line switched off if same 7101 00004401 59 <1> pop cx 7102 00004402 5E <1> pop si 7103 00004403 5F <1> pop di 7104 00004404 1F <1> pop ds 7105 00004405 07 <1> pop es 7106 00004406 7505 <1> jne .a20done ; not equal, A20 line is switched on --> 7107 <1> ; if equal, the A20 line is probably switched off 7108 00004408 8026[9D00]CF <1> clropt [internalflags], debuggerA20|debuggeeA20 ; assume A20 is off 7109 <1> 7110 <1> %if 0 ;_LOCALENABLEA20 7111 <1> ; This doesn't serve any particular reason if we have no business accessing the HMA. 7112 <1> ; What's more important is that the dump, assemble, and disassemble commands *should* 7113 <1> ; use a disabled A20 if it is disabled to the debuggee. Thus, enabling A20 belongs, if 7114 <1> ; at all, into getsegmented (similar to the switch to PM) as there may be breakpoints in 7115 <1> ; the HMA that we need to reset. 7116 <1> %if _GUARD_86M_INT2F 7117 <1> push es 7118 <1> xor ax, ax 7119 <1> mov es, ax ; (only used in 86 Mode) 7120 <1> mov ax, [es:2Fh * 4] 7121 <1> cmp ax, -1 7122 <1> je @F ; --> (ZR) 7123 <1> or ax, [es:2Fh * 4 + 2] 7124 <1> @@: 7125 <1> pop es 7126 <1> jz @F 7127 <1> %endif 7128 <1> mov ax, 4300h 7129 <1> int 2Fh ; XMS v2 installation check 7130 <1> cmp al, 80h ; installed ? 7131 <1> jne .a20done ; no --> 7132 <1> mov ax, 4310h 7133 <1> int 2Fh ; get entry 7134 <1> mov ah, 05h 7135 <1> push cs 7136 <1> call callfaresbx ; local enable A20 7137 <1> push ds 7138 <1> pop es 7139 <1> dec ax 7140 <1> jnz .a20done ; not able to enable A20 --> 7141 <1> ; actually check here to insure it is on? 7142 <1> setopt [internalflags], debuggerA20 ; our A20 is on 7143 <1> @@: 7144 <1> %endif 7145 <1> .a20done: 7146 <1> 7147 0000440D C606[E60A]01 <1> mov byte [bInDbg], 1 7148 <1> %if _CATCHINT19 7149 00004412 813E[D80B][677B] <1> cmp word [run_int], int19msg 7150 00004418 7408 <1> je @F 7151 <1> %endif 7152 0000441A 813E[D80B][247D] <1> cmp word [run_int], progtrm 7153 00004420 7505 <1> jnz .isnotterm 7154 <1> @@: 7155 00004422 800E[9E00]80 <1> setopt [internalflags], attachedterm 7156 <1> .isnotterm: 7157 00004427 C3 <1> retn 7158 <1> 7159 <1> %if 0 ;_LOCALENABLEA20 7160 <1> callfaresbx: 7161 <1> push es 7162 <1> push bx 7163 <1> retf 7164 <1> %endif 7165 <1> 7166 <1> 7167 <1> %if _PM 7168 <1> ; INP: flag for PM 7169 <1> ; flag for prior PM (from remember_mode) 7170 <1> ; flag for modeswitched (set if in modeswitching) 7171 <1> ; OUT: seg/sels initialised for new mode, if changed 7172 <1> handle_mode_changed: 7173 00004428 BE[DE88] <1> mov si, convsegs 7174 0000442B B90600 <1> mov cx, convsegs.amount 7175 <1> 7176 0000442E E8984D <1> call ispm 7177 00004431 7503E98000 <1> jz .now_pm 7178 <1> [cpu 286] 7179 <1> .now_86m: 7180 00004436 F606[A700]40 <1> testopt [internalflags3], dif3_prior_pm 7181 0000443B 7503E9B900 <1> jz .from_no_change 7182 <1> .from_pm_now_86m: 7183 <1> .from_pm_now_86m.loop: 7184 00004440 AD <1> lodsw 7185 00004441 97 <1> xchg ax, di 7186 00004442 81FE[E688] <1> cmp si, convsegs.end_fixed 7187 00004446 770A <1> ja @F 7188 00004448 8B5502 <1> mov dx, word [di + soaSegment] 7189 0000444B 8915 <1> mov word [di + soaSegSel], dx 7190 0000444D E2F1 <1> loop .from_pm_now_86m.loop 7191 0000444F E9A700 <1> jmp .from_done_change 7192 <1> 7193 <1> @@: 7194 <1> ; We want to switch modes to get the segment bases. 7195 <1> ; First check we aren't already modeswitched. 7196 00004452 F606[9E00]08 <1> testopt [internalflags], modeswitched 7197 00004457 7403E99D00 <1> jnz .from_done_change ; cancel this --> 7198 <1> 7199 0000445C F606[9E00]04 <1> testopt [internalflags], canswitchmode 7200 00004461 7510 <1> jnz @FF 7201 00004463 EB02 <1> jmp @F 7202 <1> 7203 <1> .from_pm_now_86m.loop.nonfixed.nomodeswitch: 7204 00004465 AD <1> lodsw 7205 00004466 97 <1> xchg ax, di 7206 <1> @@: 7207 00004467 31D2 <1> xor dx, dx 7208 00004469 895502 <1> mov word [di + soaSegment], dx 7209 0000446C 8915 <1> mov word [di + soaSegSel], dx 7210 0000446E E2F5 <1> loop .from_pm_now_86m.loop.nonfixed.nomodeswitch 7211 00004470 E98600 <1> jmp .from_done_change 7212 <1> 7213 <1> @@: 7214 00004473 51 <1> push cx 7215 00004474 57 <1> push di 7216 00004475 56 <1> push si 7217 <1> d4 call d4message 7218 <1> d4 asciz "In intrtn1_code.from_pm_now_86m (switching modes to access selectors)",13,10 7219 00004476 800E[9E00]08 <1> setopt [internalflags], modeswitched ; set flag for resetmode 7220 0000447B B000 <1> mov al, 0 7221 0000447D E8D2F3 <1> call sr_state ; save state 7222 00004480 E89AF3 <1> call switchmode ; switch to PM 7223 <1> ; ! handle_mode_changed not called here ! 7224 <1> ; do not call InDos or other functions using seg/sels 7225 00004483 5E <1> pop si 7226 00004484 5F <1> pop di 7227 00004485 EB03 <1> jmp @F 7228 <1> 7229 <1> .from_pm_now_86m.loop.nonfixed: 7230 00004487 AD <1> lodsw 7231 00004488 97 <1> xchg ax, di 7232 00004489 51 <1> push cx 7233 <1> @@: 7234 0000448A 31DB <1> xor bx, bx 7235 0000448C 875D04 <1> xchg bx, word [di + soaSelector] 7236 0000448F B80600 <1> mov ax, 0006h 7237 00004492 CD31 <1> int 31h 7238 00004494 7245 <1> jc @F 7239 00004496 F6C20F <1> test dl, 15 7240 00004499 7540 <1> jnz @F 7241 0000449B F7C1F0FF <1> test cx, 0FFF0h 7242 0000449F 753A <1> jnz @F 7243 000044A1 C1EA04 <1> shr dx, 4 7244 000044A4 C1E10C <1> shl cx, 12 7245 000044A7 09CA <1> or dx, cx 7246 000044A9 895502 <1> mov word [di + soaSegment], dx 7247 000044AC 59 <1> pop cx 7248 000044AD 8915 <1> mov word [di + soaSegSel], dx 7249 000044AF E2D6 <1> loop .from_pm_now_86m.loop.nonfixed 7250 000044B1 E8C3F3 <1> call resetmode ; ! only if we did the switch 7251 <1> ; Note: This recursively calls this function, 7252 <1> ; handle_mode_changed. Because the modeswitched 7253 <1> ; flag is set during this call, this only re- 7254 <1> ; initialises the fixed seg/sels with the segment 7255 <1> ; values. That is redundant but does no harm. 7256 000044B4 EB43 <1> jmp .from_done_change 7257 <1> __CPU__ 7258 <1> 7259 <1> .now_pm: 7260 000044B6 F606[A700]40 <1> testopt [internalflags3], dif3_prior_pm 7261 000044BB 753C <1> jnz .from_no_change 7262 <1> .from_86m_now_pm: 7263 <1> .from_86m_now_pm.loop: 7264 000044BD AD <1> lodsw 7265 000044BE 97 <1> xchg ax, di 7266 000044BF 81FE[E688] <1> cmp si, convsegs.end_fixed 7267 000044C3 7716 <1> ja @F 7268 <1> 7269 000044C5 8B4504 <1> mov ax, word [di + soaSelector] 7270 000044C8 85C0 <1> test ax, ax 7271 000044CA 750B <1> jnz .no_dosdata_change 7272 000044CC 8B5D02 <1> mov bx, word [di + soaSegment] 7273 000044CF B80200 <1> mov ax, 0002h 7274 000044D2 CD31 <1> int 31h 7275 000044D4 894504 <1> mov word [di + soaSelector], ax 7276 <1> 7277 <1> .no_dosdata_change: 7278 000044D7 8905 <1> mov word [di + soaSegSel], ax 7279 000044D9 EB1C <1> jmp @FFF 7280 <1> 7281 <1> @@: 7282 <1> ; Magic: Do not modify if called during modeswitching. 7283 000044DB F606[9E00]08 <1> testopt [internalflags], modeswitched 7284 000044E0 7517 <1> jnz .from_done_change ; cancel this --> 7285 <1> 7286 000044E2 8B5D02 <1> mov bx, word [di + soaSegment] 7287 000044E5 B80200 <1> mov ax, 0002h 7288 000044E8 CD31 <1> int 31h 7289 000044EA 7302 <1> jnc @F 7290 000044EC 31C0 <1> xor ax, ax 7291 <1> @@: 7292 000044EE 8905 <1> mov word [di + soaSegSel], ax 7293 000044F0 894504 <1> mov word [di + soaSelector], ax 7294 000044F3 83650200 <1> and word [di + soaSegment], 0 7295 <1> @@: 7296 <1> %if $ - .from_86m_now_pm.loop > 126 7297 <1> loop .from_86m_now_pm.loop_j 7298 <1> jmp .from_done_change 7299 <1> 7300 <1> .from_86m_now_pm.loop_j: 7301 <1> jmp .from_86m_now_pm.loop 7302 <1> %else 7303 000044F7 E2C4 <1> loop .from_86m_now_pm.loop 7304 <1> %endif 7305 <1> .from_done_change: 7306 <1> .from_no_change: 7307 <1> 7308 <1> 7309 <1> remember_mode: 7310 000044F9 E8CD4C <1> call ispm 7311 000044FC 7507 <1> jnz .from_86m 7312 <1> .from_pm: 7313 000044FE 800E[A700]40 <1> setopt [internalflags3], dif3_prior_pm 7314 00004503 EB05 <1> jmp @F 7315 <1> 7316 <1> .from_86m: 7317 00004505 8026[A700]BF <1> clropt [internalflags3], dif3_prior_pm 7318 <1> @@: 7319 0000450A C3 <1> retn 7320 <1> %endif 7321 <1> 7322 <1> 7323 <1> %if _PM && _DEBUG 7324 <1> ; INP: - 7325 <1> ; OUT: es = ds 7326 <1> ; CHG: eax, edx, bx, cx, bp, si, di 7327 <1> ; STT: in PM 7328 <1> ; do not call InDos or other functions using seg/sels 7329 <1> pm_set_handlers: 7330 <1> xor bp, bp ; = 0 if no 386 7331 <1> _386 inc bp 7332 <1> _386 inc bp ; = 2 if 386 7333 <1> 7334 <1> push ds 7335 <1> pop es 7336 <1> 7337 <1> mov si, exctab ; hook several exceptions 7338 <1> %if _DEBUGUPDATESAVE 7339 <1> mov di, excsave 7340 <1> %endif 7341 <1> _386 xor edx, edx ; clear edxh 7342 <1> mov dx, exc_first 7343 <1> .loopexc: 7344 <1> lodsb 7345 <1> mov bl, al 7346 <1> 7347 <1> %if _DEBUGUPDATESAVE 7348 <1> _386_o32 ; push edx 7349 <1> push dx ; preserve excXX pointer 7350 <1> mov ax, 0202h 7351 <1> ; (edxh is zero) 7352 <1> int 31h ; cx:(e)dx -> prior handler 7353 <1> _386_o32 ; xchg eax, edx 7354 <1> xchg ax, dx 7355 <1> _386_o32 ; stosd 7356 <1> stosw ; store offset (dword on 386+, else word) 7357 <1> xchg ax, cx 7358 <1> stosw ; store selector 7359 <1> mov ax, 4 7360 <1> sub ax, bp ; if 386, ax = 4 - 2 = 2, else ax = 4 7361 <1> add di, ax ; -> next entry of excsave 7362 <1> _386_o32 ; pop edx 7363 <1> pop dx 7364 <1> %endif 7365 <1> 7366 <1> mov cx, word [cssel] ; -> our handler for this exception 7367 <1> mov ax, 0203h 7368 <1> int 31h ; set our handler 7369 <1> add dx, byte exc_second - exc_first 7370 <1> ; -> next handler 7371 <1> cmp si, endexctab ; if another to go --> 7372 <1> jb .loopexc 7373 <1> 7374 <1> %if _CATCHPMINT214C 7375 <1> mov si, pminttab ; ds:si -> pminttab 7376 <1> %if _DEBUGUPDATESAVE 7377 <1> mov di, pmintsave ; es:di -> pmintsave 7378 <1> %endif 7379 <1> .loopint: 7380 <1> lodsb ; get interrupt number 7381 <1> mov bl, al ; bl = interrupt number 7382 <1> 7383 <1> %if _DEBUGUPDATESAVE 7384 <1> _386 xor edx, edx ; clear edxh 7385 <1> mov ax, 0204h 7386 <1> int 31h ; cx:(e)dx -> prior handler 7387 <1> _386_o32 ; xchg eax, edx 7388 <1> xchg ax, dx ; (e)ax = offset 7389 <1> _386_o32 ; stosd 7390 <1> stosw ; store offset (dword on 386+, else word) 7391 <1> xchg ax, cx 7392 <1> stosw ; store selector 7393 <1> mov ax, 4 7394 <1> sub ax, bp ; if 386, ax = 4 - 2 = 2, else ax = 4 7395 <1> add di, ax ; -> next entry of pmintsave 7396 <1> %endif 7397 <1> 7398 <1> lodsw ; ax -> our handler 7399 <1> _386 xor edx, edx 7400 <1> xchg ax, dx ; (e)dx -> our handler 7401 <1> mov cx, word [cssel] ; cx:(e)dx -> our handler 7402 <1> mov ax, 0205h 7403 <1> int 31h 7404 <1> cmp si, pminttab.end 7405 <1> jb .loopint 7406 <1> %endif 7407 <1> 7408 <1> jmp resetmode 7409 <1> %endif 7410 <1> 7411 <1> 7412 <1> %if _PM && (_DEBUG || 1 || _CATCHPMINT214C) 7413 <1> ; INP: - 7414 <1> ; OUT: - 7415 <1> ; CHG: eax, edx, bx, cx, bp, si, di 7416 <1> ; STT: in PM 7417 <1> ; do not call InDos or other functions using seg/sels 7418 <1> pm_reset_handlers: 7419 0000450B 31ED <1> xor bp, bp ; = 0 if no 386 7420 0000450D 45 <1> _386 inc bp 7421 0000450E 45 <1> _386 inc bp ; = 2 if 386 7422 <1> 7423 <1> 7424 <1> %if CATCHEXCAMOUNT 7425 <1> ; unhook exceptions 7426 0000450F BF[EA88] <1> mov di, exctab 7427 00004512 BE[F888] <1> mov si, excsave 7428 <1> .loopexc: 7429 00004515 8A1D <1> mov bl, [di] ; bl = exception number 7430 00004517 47 <1> inc di 7431 00004518 66 <1> _386_o32 ; lodsd 7432 00004519 AD <1> lodsw ; load offset (dword on 386+, else word) 7433 0000451A 66 <1> _386_o32 ; xchg eax, edx 7434 0000451B 92 <1> xchg ax, dx 7435 0000451C AD <1> lodsw ; load selector 7436 0000451D 91 <1> xchg ax, cx ; cx:(e)dx -> prior handler 7437 0000451E B80400 <1> mov ax, 4 7438 00004521 29E8 <1> sub ax, bp ; if 386, ax = 4 - 2 = 2, else ax = 4 7439 00004523 01C6 <1> add si, ax ; -> next entry of excsave 7440 00004525 B80302 <1> mov ax, 0203h 7441 00004528 CD31 <1> int 31h ; set previous handler 7442 0000452A 81FF[F188] <1> cmp di, endexctab ; if another to go --> 7443 0000452E 72E5 <1> jb .loopexc 7444 <1> %endif 7445 <1> 7446 <1> 7447 <1> %if CATCHPMINTAMOUNT 7448 <1> ; unhook interrupts 7449 00004530 BF[3089] <1> mov di, pminttab ; ds:di -> pminttab 7450 00004533 BE[3889] <1> mov si, pmintsave ; ds:si -> pmintsave 7451 <1> .loopint: 7452 00004536 8A1D <1> mov bl, [di] ; bl = interrupt number 7453 00004538 83C703 <1> add di, 3 ; -> after this pminttab entry 7454 0000453B 66 <1> _386_o32 ; lodsd 7455 0000453C AD <1> lodsw ; load offset (dword on 386+, else word) 7456 0000453D 66 <1> _386_o32 ; xchg eax, edx 7457 0000453E 92 <1> xchg ax, dx 7458 0000453F AD <1> lodsw ; load selector 7459 00004540 91 <1> xchg ax, cx ; cx:(e)dx -> prior handler 7460 00004541 B80400 <1> mov ax, 4 7461 00004544 29E8 <1> sub ax, bp ; if 386, ax = 4 - 2 = 2, else ax = 4 7462 00004546 01C6 <1> add si, ax ; -> next entry of pmintsave 7463 00004548 B80502 <1> mov ax, 0205h 7464 0000454B CD31 <1> int 31h ; set previous handler 7465 0000454D 81FF[3389] <1> cmp di, pminttab.end ; if another to go --> 7466 00004551 72E3 <1> jb .loopint 7467 <1> %endif 7468 <1> 7469 00004553 E921F3 <1> jmp resetmode 7470 <1> %endif 7471 <1> 7472 <1> 7473 <1> %if _DEBUG1 7474 <1> ; INP: bx -> dword address, word counter 7475 <1> ; dx:ax = linear address to check 7476 <1> ; OUT: NC if to proceed as usual 7477 <1> ; CY if address matched and counter indicates trigger 7478 <1> ; (ie, this should cause the caller to fail) 7479 <1> ; If the address matched, the counter has been stepped. 7480 <1> ; (The result of that step indicates whether to trigger.) 7481 <1> ; STT: ds = ss = debugger data selector 7482 <1> handle_test_case: 7483 <1> cmp word [bx], ax 7484 <1> jne .proceed 7485 <1> cmp word [bx + 2], dx 7486 <1> jne .proceed 7487 <1> 7488 <1> test word [bx + 4], 7FFFh ; is it already at a terminal state ? 7489 <1> jz .no_decrement ; yes, do not further decrement --> 7490 <1> dec word [bx + 4] ; decrement (towards 0 or 8000h) 7491 <1> jz .trigger ; case for decrementing 1 to 0 --> 7492 <1> .no_decrement: 7493 <1> cmp word [bx + 4], 8000h ; decrement resulted in 8000h 7494 <1> je .trigger ; or was already in that state? --> 7495 <1> .proceed: 7496 <1> clc 7497 <1> retn 7498 <1> 7499 <1> .trigger: 7500 <1> stc 7501 <1> retn 7502 <1> 7503 <1> 7504 <1> ; INP: bx -> first test record (dword address, word counter) 7505 <1> ; dx:ax = linear address to check 7506 <1> ; cx = number of consecutive test records to check 7507 <1> ; OUT: NC if to proceed as usual 7508 <1> ; CY if address matched and counter indicates trigger 7509 <1> ; (ie, this should cause the caller to fail) 7510 <1> ; CHG: bx, cx 7511 <1> ; STT: ds = ss = debugger data selector 7512 <1> ; 7513 <1> ; Note that all test cases are tried and, if the address 7514 <1> ; matches, their counters are stepped. In particular, 7515 <1> ; a trigger no longer causes us to skip all further 7516 <1> ; test cases that may have the same address. 7517 <1> ; If at least one of the matching test cases indicates a 7518 <1> ; trigger condition after its stepping, the return is CY. 7519 <1> handle_test_case_multiple_16: 7520 <1> mov cx, 16 7521 <1> handle_test_case_multiple: 7522 <1> clc 7523 <1> pushf ; initialise flags on stack with NC 7524 <1> jcxz .end 7525 <1> .loop: 7526 <1> call handle_test_case 7527 <1> jnc .next 7528 <1> popf ; (discard) 7529 <1> stc 7530 <1> pushf ; new flags on stack with CY 7531 <1> .next: 7532 <1> add bx, 6 7533 <1> loop .loop 7534 <1> .end: 7535 <1> popf ; CF 7536 <1> retn 7537 <1> %endif 7538 <1> 7539 <1> 7540 <1> usesection lDEBUG_DATA_ENTRY 7541 000086F5 00 <1> align 4, db 0 7542 000086F8 01000000 <1> default_pp_count: dd 1 7543 000086FC 01000000 <1> default_tp_count: dd 1 7544 00008700 01000000 <1> default_tt_count: dd 1 7545 <1> 7546 <1> 7547 <1> usesection lDEBUG_CODE 7548 <1> ; PARSE_PT - Parse 'p' or 't' command. Also resets pagedcommand flag. 7549 <1> ; Entry AL First character of command 7550 <1> ; SI Address of next character 7551 <1> ; [internalflags2] & dif2_is_pp = set if P 7552 <1> ; [internalflags] & tt_p = set if TP 7553 <1> ; both clear if T 7554 <1> ; Exit BX:CX Number of times to repeat 7555 <1> ; Uses AH,BX,CX,DX. 7556 <1> 7557 <1> parse_pt: 7558 00004556 E8A2BF <1> call guard_re 7559 00004559 C706[C000][6370] <1> mov word [gg_deferred_message], msg.empty_message 7560 0000455F 8326[C200]00 <1> and word [bb_deferred_message_in_lineout_behind], 0 7561 00004564 8026[A000]F7 <1> clropt [internalflags2], dif2_gg_is_gg 7562 00004569 8026[9F00]2B <1> clropt [internalflags], tt_while | tt_silent_mode | tt_no_bb | tt_no_bb_first 7564 0000456E 8326[FC09]00 <1> and word [tt_silent_mode_number], 0 7565 <1> 7566 <1> ; TP.NB, T.NB, P.NB: trace/proceed without bb breakpoints 7567 <1> ; 7568 <1> ; Note that when such a command is repeated through lastcmd, 7569 <1> ; it gets an empty line, thus tt_no_bb remains clear, and 7570 <1> ; the corresponding command without .NB is run. 7571 00004573 3C2E <1> cmp al, '.' 7572 00004575 7520 <1> jne .no_dot 7573 <1> 7574 00004577 AD <1> lodsw 7575 00004578 25DFDF <1> and ax, TOUPPER_W 7576 0000457B 3D4E42 <1> cmp ax, "NB" 7577 0000457E 7411 <1> je .dot_nb 7578 <1> ; TP.SB, T.SB, P.SB: trace/proceed without bb for first step 7579 00004580 3D5342 <1> cmp ax, "SB" 7580 00004583 7405 <1> je .dot_sb 7581 00004585 4E <1> dec si 7582 00004586 4E <1> dec si 7583 00004587 E9545F <1> jmp error 7584 <1> 7585 <1> .dot_sb: 7586 0000458A 800E[9F00]80 <1> setopt [internalflags], tt_no_bb_first 7587 0000458F EB05 <1> jmp .dot_common 7588 <1> 7589 <1> .dot_nb: 7590 00004591 800E[9F00]40 <1> setopt [internalflags], tt_no_bb 7591 <1> .dot_common: 7592 00004596 AC <1> lodsb 7593 <1> .no_dot: 7594 00004597 E85801 <1> call parseql ; process =addr 7595 0000459A E89073 <1> call skipcomm0 ; skip any white space 7596 <1> 7597 0000459D BA0400 <1> mov dx, opt3_pp_no_paging 7598 000045A0 8B1E[FA86] <1> mov bx, word [default_pp_count + 2] 7599 000045A4 8B0E[F886] <1> mov cx, word [default_pp_count] 7600 000045A8 F606[A100]10 <1> testopt [internalflags2], dif2_is_pp 7601 000045AD 751D <1> jnz @F 7602 000045AF BA0200 <1> mov dx, opt3_tp_no_paging 7603 000045B2 8B1E[FE86] <1> mov bx, word [default_tp_count + 2] 7604 000045B6 8B0E[FC86] <1> mov cx, word [default_tp_count] 7605 000045BA F606[9F00]08 <1> testopt [internalflags], tt_p 7606 000045BF 750B <1> jnz @F 7607 000045C1 BA0100 <1> mov dx, opt3_tt_no_paging 7608 000045C4 8B1E[0287] <1> mov bx, word [default_tt_count + 2] 7609 000045C8 8B0E[0087] <1> mov cx, word [default_tt_count] 7610 <1> @@: ; bx:cx = default count 7611 <1> 7612 000045CC 8516[8400] <1> test word [options3], dx 7613 000045D0 7405 <1> jz @F 7614 000045D2 8026[9C00]F7 <1> clropt [internalflags], pagedcommand 7615 <1> @@: 7616 <1> 7617 <1> ; Initialise auxbuff pointers in case there is no WHILE clause. 7618 000045D7 E80B01 <1> call tpg_initialise_empty_auxbuff 7619 <1> 7620 000045DA E82973 <1> call iseol? 7621 000045DD 7503E99500 <1> je .ppt1 ; if no count given --> (uses bx:cx = default) 7622 000045E2 E81A6D <1> call getdword ; bx:dx = given count 7623 <1> 7624 000045E5 53 <1> push bx 7625 000045E6 52 <1> push dx ; push count 7626 000045E7 E87273 <1> call skipwh0 7627 000045EA E81973 <1> call iseol? 7628 000045ED 7503E98300 <1> je .no_while 7629 000045F2 4E <1> dec si 7630 000045F3 BA[9D68] <1> mov dx, msg.while 7631 000045F6 E8AE72 <1> call isstring? 7632 000045F9 7408 <1> je .found_while 7633 <1> 7634 000045FB E8E1BE <1> call guard_auxbuff 7635 000045FE E8C100 <1> call .handle_silent ; (error if no SILENT keyword) 7636 <1> 7637 00004601 EB72 <1> jmp .no_while 7638 <1> 7639 <1> 7640 <1> .found_while: 7641 00004603 E8D9BE <1> call guard_auxbuff 7642 00004606 E82373 <1> call skipcomma 7643 00004609 4E <1> dec si 7644 0000460A 89F1 <1> mov cx, si 7645 0000460C AC <1> lodsb 7646 0000460D E8EF6C <1> call getexpression 7647 00004610 E8FE66 <1> call toboolean 7648 00004613 E84673 <1> call skipwh0 7649 00004616 52 <1> push dx 7650 00004617 56 <1> push si 7651 00004618 E8EB72 <1> call iseol? ; expect end of line here 7652 0000461B 7404 <1> je .no_while_silent 7653 <1> 7654 0000461D 4E <1> dec si 7655 0000461E E8A100 <1> call .handle_silent 7656 <1> 7657 <1> .no_while_silent: 7658 00004621 5E <1> pop si 7659 00004622 5A <1> pop dx 7660 00004623 85D2 <1> test dx, dx ; condition true now ? 7661 00004625 7509 <1> jnz @F 7662 <1> 7663 00004627 BA[1C69] <1> mov dx, msg.while_not_true 7664 0000462A E88F77 <1> call putsz 7665 0000462D E9D0B9 <1> jmp cmd3 7666 <1> 7667 <1> @@: 7668 <1> %if _PM 7669 00004630 8B1E[F009] <1> mov bx, word [auxbuff_switchbuffer_size] 7670 <1> %else 7671 <1> xor bx, bx 7672 <1> %endif 7673 <1> ; (si + 1) -> line terminator (13, ';', 0) or next keyword 7674 <1> @@: 7675 00004634 4E <1> dec si ; -> terminator, or blank 7676 00004635 807CFF20 <1> cmp byte [si - 1], 32 ; another blank at end ? 7677 00004639 74F9 <1> je @B ; yes --> 7678 0000463B 807CFF09 <1> cmp byte [si - 1], 9 7679 0000463F 74F3 <1> je @B ; yes --> 7680 00004641 89F0 <1> mov ax, si 7681 00004643 29C8 <1> sub ax, cx ; ax = length of expression 7682 00004645 53 <1> push bx 7683 00004646 01C3 <1> add bx, ax 7684 00004648 81FB0F20 <1> cmp bx, _AUXBUFFSIZE - 1 7685 0000464C 7603E98D5E <1> ja error 7686 00004651 8E06[F209] <1> mov es, word [auxbuff_segorsel] 7687 <1> ; => auxbuff 7688 00004655 5B <1> pop bx ; -> behind switchbuffer 7689 00004656 89CE <1> mov si, cx ; -> expression start 7690 00004658 89C1 <1> mov cx, ax ; = length of expression 7691 <1> .loop: 7692 0000465A AC <1> lodsb 7693 0000465B 268807 <1> mov byte [es:bx], al 7694 0000465E 43 <1> inc bx ; store expression 7695 0000465F E2F9 <1> loop .loop 7696 00004661 26C60700 <1> mov byte [es:bx], 0 ; terminate string 7697 00004665 43 <1> inc bx 7698 00004666 891E[F809] <1> mov word [auxbuff_behind_while_condition], bx 7699 0000466A 891E[FA09] <1> mov word [auxbuff_behind_last_silent], bx 7700 0000466E 16 <1> push ss 7701 0000466F 07 <1> pop es 7702 <1> 7703 00004670 800E[9F00]04 <1> setopt [internalflags], tt_while 7704 <1> .no_while: 7705 00004675 59 <1> pop cx 7706 00004676 5B <1> pop bx ; bx:cx = given count 7707 <1> 7708 <1> .ppt1: 7709 00004677 85DB <1> test bx, bx 7710 00004679 7507 <1> jnz @F 7711 0000467B 85C9 <1> test cx, cx 7712 0000467D 7503E95C5E <1> jz error ; must be at least 1, else error --> 7713 <1> @@: 7714 00004682 53 <1> push bx 7715 00004683 51 <1> push cx 7716 <1> 7717 00004684 8026[A000]E8 <1> clropt [internalflags2], dif2_gg_is_first | dif2_gg_first_detected | dif2_gg_skip_cseip | dif2_gg_skip_non_cseip 7720 <1> 7721 00004689 F606[7E00]04 <1> testopt [options], tp_do_not_skip_bp 7722 0000468E 752C <1> jnz .do_not_skip_cseip 7723 00004690 800E[A000]01 <1> setopt [internalflags2], dif2_gg_is_first 7724 <1> 7725 00004695 803E[D00B]00 <1> cmp byte [eqflag], 0 7726 0000469A 7508 <1> jne .cseip_take_eql 7727 <1> 7728 0000469C 66 <1> _386_PM_o32 ; xor ecx, ecx 7729 0000469D 31C9 <1> xor cx, cx 7730 0000469F E8B0F0 <1> call get_cseip_ecx_linear 7731 000046A2 EB0C <1> jmp .got_cseip 7732 <1> 7733 <1> .cseip_take_eql: 7734 000046A4 8B1E[D60B] <1> mov bx, word [eqladdr + 4] 7735 000046A8 66 <1> _386_PM_o32 ; mov edx, dword [eqladdr] 7736 000046A9 8B16[D20B] <1> mov dx, word [eqladdr] 7737 000046AD E8AEF0 <1> call getlinear 7738 <1> .got_cseip: 7739 000046B0 7303E9295E <1> jc error 7740 000046B5 A3[B400] <1> mov word [gg_first_cseip_linear], ax 7741 000046B8 8916[B600] <1> mov word [gg_first_cseip_linear + 2], dx 7742 <1> .do_not_skip_cseip: 7743 <1> 7744 000046BC 59 <1> pop cx 7745 000046BD 5B <1> pop bx 7746 <1> 7747 000046BE E85F00 <1> call seteq ; make the = operand take effect 7748 000046C1 C3 <1> retn 7749 <1> 7750 <1> 7751 <1> .handle_silent: 7752 000046C2 BA[A368] <1> mov dx, msg.silent 7753 000046C5 E8DF71 <1> call isstring? 7754 000046C8 7403E9115E <1> jne error 7755 000046CD E85C72 <1> call skipcomma 7756 000046D0 E83372 <1> call iseol? 7757 000046D3 740A <1> je .no_silent_mode_number 7758 <1> 7759 000046D5 E80D71 <1> call getword 7760 000046D8 8916[FC09] <1> mov word [tt_silent_mode_number], dx 7761 000046DC E83C72 <1> call chkeol 7762 <1> 7763 <1> .no_silent_mode_number: 7764 000046DF 800E[9F00]10 <1> setopt [internalflags], tt_silent_mode 7765 000046E4 C3 <1> retn 7766 <1> 7767 <1> 7768 <1> ; INP: (_PM) word [auxbuff_switchbuffer_size] 7769 <1> ; OUT: word [auxbuff_behind_while_condition] 7770 <1> ; word [auxbuff_behind_last_silent] 7771 <1> ; CHG: dx 7772 <1> tpg_initialise_empty_auxbuff: 7773 <1> %if _PM 7774 000046E5 8B16[F009] <1> mov dx, word [auxbuff_switchbuffer_size] 7775 <1> %else 7776 <1> xor dx, dx 7777 <1> %endif 7778 000046E9 8916[F809] <1> mov word [auxbuff_behind_while_condition], dx 7779 000046ED 8916[FA09] <1> mov word [auxbuff_behind_last_silent], dx 7780 000046F1 C3 <1> retn 7781 <1> 7782 <1> 7783 <1> ; PARSEQL - Parse `=' operand for `g', 'p' and `t' commands. 7784 <1> ; Entry AL First character of command 7785 <1> ; SI Address of next character 7786 <1> ; Exit AL First character beyond range 7787 <1> ; SI Address of the character after that 7788 <1> ; eqflag Nonzero if an `=' operand was present 7789 <1> ; eqladdr Address, if one was given 7790 <1> ; Uses AH,BX,CX,DX. 7791 <1> 7792 <1> parseql: 7793 000046F2 C606[D00B]00 <1> mov byte [eqflag], 0 ; mark '=' as absent 7794 000046F7 3C3D <1> cmp al, '=' 7795 000046F9 7524 <1> jne peq1 ; if no '=' operand 7796 000046FB E85D72 <1> call skipwhite 7797 000046FE 8B1E[900C] <1> mov bx, word [reg_cs] ; default segment 7798 00004702 E81362 <1> call getaddrX ; get the address into bx:(e)dx 7799 <1> %if _PM 7800 00004705 C706[D40B]0000 <1> mov word [eqladdr+2], 0 7801 0000470B 803E[DC88]00 <1> cmp byte [bAddr32], 0 7802 00004710 7401 <1> jz .nohighofs 7803 00004712 66 <1> o32 ; mov dword [eqladdr], edx 7804 <1> .nohighofs: 7805 <1> %endif 7806 00004713 8916[D20B] <1> mov word [eqladdr+0], dx 7807 00004717 891E[D60B] <1> mov word [eqladdr+4], bx 7808 0000471B FE06[D00B] <1> inc byte [eqflag] 7809 <1> peq1: 7810 0000471F C3 <1> retn 7811 <1> 7812 <1> 7813 <1> ; SETEQ - Copy the = arguments to their place, if appropriate. 7814 <1> ; (This is not done immediately, because the command may have 7815 <1> ; a syntax error.) 7816 <1> ; Uses AX. 7817 <1> seteq: 7818 00004720 803E[D00B]00 <1> cmp byte [eqflag], 0 7819 00004725 7417 <1> je .return ; if no `=' operand 7820 00004727 A1[D20B] <1> mov ax, word [eqladdr+0] 7821 0000472A A3[9C0C] <1> mov word [reg_eip], ax 7822 <1> %if _PM 7823 0000472D A1[D40B] <1> mov ax, word [eqladdr+2] 7824 00004730 A3[9E0C] <1> mov word [reg_eip+2], ax 7825 <1> %endif 7826 00004733 A1[D60B] <1> mov ax, word [eqladdr+4] 7827 00004736 A3[900C] <1> mov word [reg_cs], ax 7828 00004739 C606[D00B]00 <1> mov byte [eqflag], 0 ; clear the flag 7829 <1> .return: 7830 0000473E C3 <1> retn 2064 %include "uu.asm" 2065 <1> 2066 <1> %if 0 2067 <1> 2068 <1> lDebug U command - Disassembler 2069 <1> 2070 <1> Copyright (C) 1995-2003 Paul Vojta 2071 <1> Copyright (C) 2008-2012 C. Masloch 2072 <1> 2073 <1> Usage of the works is permitted provided that this 2074 <1> instrument is retained with the works, so that any entity 2075 <1> that uses the works is notified of this instrument. 2076 <1> 2077 <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 2078 <1> 2079 <1> %endif 2080 <1> 2081 <1> 2082 <1> usesection lDEBUG_CODE 2083 <1> 2084 <1> ; U command - disassemble. 2085 <1> uu: 2086 0000473F C706[DA0B][4A47] <1> mov word [lastcmd], lastuu 2087 00004745 E8BE71 <1> call iseol? 2088 00004748 7514 <1> jne uu1 ; if an address was given 2089 <1> 2090 <1> lastuu: 2091 0000474A 66 <1> _386_PM_o32 ; mov ecx, dword [u_addr] 2092 0000474B 8B0E[1E0B] <1> mov cx, word [u_addr] 2093 0000474F 66 <1> _386_PM_o32 ; mov edx, ecx 2094 00004750 89CA <1> mov dx, cx 2095 00004752 66 <1> _386_PM_o32 ; add ecx, byte 1Fh 2096 00004753 83C11F <1> add cx, byte 1Fh 2097 00004756 7304 <1> jnc .no_overflow ; if no overflow --> 2098 00004758 66 <1> _386_PM_o32 ; or ecx, byte -1 2099 00004759 83C9FF <1> or cx, byte -1 ; til end of segment 2100 <1> .no_overflow: 2101 0000475C EB25 <1> jmp short uu2 2102 <1> 2103 <1> uu1: 2104 0000475E B92000 <1> mov cx, 20h ; default length 2105 00004761 8B1E[900C] <1> mov bx, word [reg_cs] 2106 00004765 E8C260 <1> call getrangeX ; get address range into bx:(e)dx 2107 00004768 E8B071 <1> call chkeol ; expect end of line here 2108 0000476B 891E[220B] <1> mov word [u_addr + saSegSel], bx 2109 <1> %if _PM 2110 0000476F E8574A <1> call ispm 2111 00004772 7506 <1> jnz .86m 2112 <1> .pm: 2113 00004774 891E[260B] <1> mov word [u_addr + saSelector], bx 2114 00004778 EB04 <1> jmp @F 2115 <1> .86m: 2116 0000477A 891E[240B] <1> mov word [u_addr + saSegment], bx 2117 <1> @@: 2118 <1> %endif 2119 0000477E 66 <1> _386_PM_o32 ; mov dword [u_addr], edx 2120 0000477F 8916[1E0B] <1> mov word [u_addr], dx 2121 <1> 2122 <1> ; (d)word [u_addr] = offset start address 2123 <1> ; word [u_addr + saSegSel] = segment start address 2124 <1> ; (e)cx = end address 2125 <1> ; (e)dx = start adddress (same as [u_addr]) 2126 <1> uu2: 2127 00004783 66 <1> _386_PM_o32 ; inc ecx 2128 00004784 41 <1> inc cx 2129 <1> uu3: 2130 00004785 E81BF8 <1> call handle_serial_flags_ctrl_c 2131 00004788 66 <1> _386_PM_o32 ; push ecx 2132 00004789 51 <1> push cx 2133 0000478A 66 <1> _386_PM_o32 ; push edx 2134 0000478B 52 <1> push dx 2135 0000478C 8326[D687]00 <1> and word [disflags], 0 2136 00004791 E81700 <1> call disasm ; do it 2137 00004794 66 <1> _386_PM_o32 ; pop ebx 2138 00004795 5B <1> pop bx 2139 00004796 66 <1> _386_PM_o32 ; pop ecx 2140 00004797 59 <1> pop cx 2141 00004798 66 <1> _386_PM_o32 ; mov eax, dword [u_addr] 2142 00004799 A1[1E0B] <1> mov ax, word [u_addr] 2143 0000479C 66 <1> _386_PM_o32 ; mov edx, eax 2144 0000479D 89C2 <1> mov dx, ax 2145 0000479F 66 <1> _386_PM_o32 ; sub eax, ecx 2146 000047A0 29C8 <1> sub ax, cx ; current position - end 2147 000047A2 66 <1> _386_PM_o32 ; sub ebx, ecx 2148 000047A3 29CB <1> sub bx, cx ; previous position - end 2149 000047A5 66 <1> _386_PM_o32 ; cmp eax, ebx 2150 000047A6 39D8 <1> cmp ax, bx 2151 000047A8 73DB <1> jnb uu3 ; if we haven't reached the goal 2152 000047AA C3 <1> retn 2153 <1> 2154 <1> 2155 <1> usesection lDEBUG_DATA_ENTRY 2156 <1> 2157 <1> ; Jump table for displaying sized operands. 2158 <1> ; Entries are defined in the debug.asm opsizeditem list. 2159 <1> align 2, db 0 2160 <1> disjmp2: 2161 00008704 [A74F][D84F][0852]- <1> dw DISJMP2_OPSIZEDITEMS 2161 0000870A [1552][C94F][1E52]- <1> 2161 00008710 [5852][5D52] <1> 2162 <1> .end: 2163 <1> 2164 <1> ; Jump table for displaying operands. 2165 <1> ; Entries are defined in the debug.asm opitem list. 2166 <1> align 2, db 0 2167 <1> optab: 2168 00008714 [3B49] <1> dw da_internal_error ; entry for OP_END 2169 00008716 [6152][6552][7652]- <1> dw OPTAB_OPITEMS 2169 0000871C [9352][A952][BB52]- <1> 2169 00008722 [6653][A453][6555]- <1> 2169 00008728 [7555][8B55][AB55]- <1> 2169 0000872E [B655][D555][F655]- <1> 2169 00008734 [F655][0856][0E56]- <1> 2169 0000873A [1C56][2456][F456]- <1> 2169 00008740 [1E57][3957][4557]- <1> 2169 00008746 [4C57][FD56][0457]- <1> 2169 0000874C [0B57][1757][1257]- <1> 2169 00008752 [3556][5D56][9C56]- <1> 2169 00008758 [3B49]310033004458- <1> 2169 00008760 434C53544353445345- <1> 2169 00008769 53465347535353 <1> 2170 <1> 2171 <1> 2172 <1> %if _MEMREF_AMOUNT 2173 <1> align 16, db 0 2174 00008770 00 <1> memrefs: times MEMREF_size * _MEMREF_AMOUNT db 0 2175 000087B0 0000 <1> .free: dw 0 2176 <1> 2177 000087B2 00 <1> align 4, db 0 2178 <1> string_memref_counter: 2179 000087B4 00000000 <1> dd 0 2180 <1> %endif 2181 <1> 2182 <1> 2183 <1> ; DISASM - Disassemble. 2184 <1> 2185 <1> align 2, db 0 2186 000087B8 0000 <1> dis_n: dw 0 ; number of bytes in instruction so far 2187 000087BA 0000 <1> dw 0 2188 000087BC 00 <1> preflags: db 0 ; flags for prefixes found so far (includes OSIZE,ASIZE) 2189 000087BD 00 <1> preused: db 0 ; flags for prefixes used so far 2190 <1> %if _PM 2191 000087BE 00 <1> presizeflags: db 0 ; O32,A32 flags = (OSIZE,ASIZE) XOR (32-bit cs?) 2192 <1> %else 2193 <1> presizeflags: equ preflags ; O32,A32 flags are always equal to OSIZE,ASIZE 2194 <1> %endif 2195 <1> 2196 <1> PRESEG equ 1 ; segment prefix 2197 <1> PREREP equ 2 ; rep prefixes 2198 <1> PREREPZ equ 4 ; F3h, not F2h 2199 <1> PRELOCK equ 8 ; lock prefix 2200 <1> PREOSIZE equ 10h ; flag for OSIZE prefix 2201 <1> PREASIZE equ 20h ; flag for ASIZE prefix 2202 <1> PRE32D equ 10h ; flag for 32-bit data 2203 <1> PRE32A equ 20h ; flag for 32-bit addressing 2204 <1> PREWAIT equ 40h ; prefix wait (not really a prefix) 2205 <1> GOTREGM equ 80h ; set if we have the reg/mem part 2206 <1> 2207 000087BF 00 <1> instru: db 0 ; the main instruction byte 2208 000087C0 00 <1> disp8: db 0 2209 000087C1 00 <1> align 2, db 0 2210 000087C2 0000 <1> index: dw 0 ; index of the instruction (unsqueezed) 2211 000087C4 380339033C03 <1> obsinst:dw SFPGROUP3, SFPGROUP3+1, SFPGROUP3+4 2212 000087CA 04020602 <1> dw SPARSE_BASE+24h, SPARSE_BASE+26h ; obsolete-instruction values 2213 <1> ; This is used to search for obsolete instructions: 2214 <1> ; DBE0h: feni 2215 <1> ; DBE1h: fdisi 2216 <1> ; DBE4h: fsetpm 2217 <1> ; 124h: mov trX, reg 2218 <1> ; 126h: mov reg, trX 2219 <1> 2220 000087CE 00 <1> rmsize: db 0 ; <0 or 0 or >0 means mod r/m is 8 or 16 or 32 2221 000087CF 00 <1> segmnt: db 0 ; segment determined by prefix (or otherwise) 2222 <1> align 4, db 0 2223 000087D0 00000000 <1> addrr: dd 0 ; address in mod r/m byte 2224 000087D4 0000 <1> savesp2:dw 0 ; save the stack pointer here (used in disasm) 2225 <1> 2226 <1> align 2, db 0 2227 000087D6 0000 <1> disflags: dw 0 ; flags for the disassembler 2228 <1> 2229 <1> ;--- equates for disflags: 2230 <1> 2231 <1> DIS_F_REPT equ 1 ; repeat after pop ss, etc. 2232 <1> DIS_F_SHOW equ 2 ; show memory contents 2233 <1> DIS_I_SHOW equ 4 ; there are memory contents to show 2234 <1> DIS_I_UNUSED equ 8 ; (internal) print " (unused)" 2235 <1> DIS_I_SHOWSIZ equ 10h ; (internal) always show the operand size 2236 <1> DIS_I_KNOWSIZ equ 20h ; (internal) we know the operand size of instr. 2237 <1> DIS_I_MOV_SS equ 40h ; (internal) note for repetition: mov ss 2238 <1> DIS_I_DONTSHOW equ 80h ; do not show memory contents override 2239 <1> DIS_I_NOSIZ equ 100h ; do not show size 2240 <1> DIS_I_FAR_M equ 200h ; far memory reference, show segment word contents 2241 <1> DIS_I_DOUBLE_M equ 400h ; double memory reference, show second item contents 2242 <1> DIS_I_SHOW_A32 equ 800h ; memory contents to show are 32-bit addressed 2243 <1> DIS_I_M_SRC equ 1000h ; memory operand is source 2244 <1> DIS_I_M_DST equ 2000h ; memory operand is destination 2245 <1> ; both of the above may be set 2246 <1> 2247 000087D8 00 <1> disflags2: db 0 ; another copy of DIS_I_KNOWSIZ 2248 000087D9 00 <1> disrepeatcount: db 0 2249 <1> 2250 <1> align 2, db 0 2251 000087DA 0000 <1> sizeloc: dw 0 ; address of size words in output line 2252 <1> %if _COND 2253 000087DC 0000 <1> condmsg: dw 0 ; -> conditionals message to display (if R and no mem) 2254 <1> %endif 2255 <1> 2256 <1> ; Jump table for a certain place. 2257 <1> ; The size of this table matches OPTYPES_BASE. 2258 <1> align 2, db 0 2259 <1> disjmp: 2260 000087DE [6C57] <1> dw disbad ; illegal instruction 2261 000087E0 [4C48] <1> dw da_twobyte ; two-byte instruction 2262 000087E2 [5848] <1> dw da_insgrp ; instruction group 2263 000087E4 [5F48] <1> dw da_fpuins ; coprocessor instruction 2264 000087E6 [7A48] <1> dw da_fpugrp ; coprocessor instruction group 2265 000087E8 [8348] <1> dw da_insprf ; instruction prefix (including 66h/67h) 2266 <1> %if ($ - disjmp) != OPTYPES_BASE 2267 <1> %error Wrong length of table disjmp 2268 <1> %endif 2269 <1> 2270 <1> ; Table for 16-bit mod r/m addressing. 8 = BX, 4 = BP, 2 = SI, 1 = DI. 2271 000087EA 0A09060502010408 <1> rmtab: db 8+2, 8+1, 4+2, 4+1, 2, 1, 4, 8 2272 <1> 2273 <1> 2274 <1> %macro defgpr 1.nolist 2275 <1> REG_ %+ %1: equ ($ - rgnam816) / 2 2276 <1> %defstr %%string %1 2277 <1> db %%string 2278 <1> %endmacro 2279 <1> %macro defsr 1.nolist 2280 <1> REG_ %+ %1: equ REG_NO_GPR + ($ - segrgnam) / 2 2281 <1> %defstr %%string %1 2282 <1> db %%string 2283 <1> %endmacro 2284 <1> 2285 <1> REG_NO_GPR equ 24 ; 16..23 are registers eax..edi 2286 <1> 2287 <1> align 2, db 0 2288 <1> ; Tables of register names. 2289 <1> ; rgnam816/rgnam16/segrgnam/xregnam must be consecutive. 2290 <1> rgnam816: 2291 000087F2 414C <1> defgpr AL 2292 000087F4 434C <1> defgpr CL 2293 000087F6 444C <1> defgpr DL 2294 000087F8 424C <1> defgpr BL 2295 000087FA 4148 <1> defgpr AH 2296 000087FC 4348 <1> defgpr CH 2297 000087FE 4448 <1> defgpr DH 2298 00008800 4248 <1> defgpr BH ; 0..7 2299 <1> rgnam16: 2300 00008802 4158 <1> defgpr AX 2301 00008804 4358 <1> defgpr CX 2302 00008806 4458 <1> defgpr DX 2303 00008808 4258 <1> defgpr BX 2304 0000880A 5350 <1> defgpr SP 2305 0000880C 4250 <1> defgpr BP 2306 0000880E 5349 <1> defgpr SI 2307 00008810 4449 <1> defgpr DI ; 8..15 (16-bit), 16..23 (32-bit) 2308 <1> N_REGS16 equ ($ - rgnam16) >> 1 2309 <1> segrgnam: 2310 00008812 4553 <1> defsr ES 2311 00008814 4353 <1> defsr CS 2312 00008816 5353 <1> defsr SS 2313 00008818 4453 <1> defsr DS 2314 0000881A 4653 <1> defsr FS 2315 0000881C 4753 <1> defsr GS ; 24..29 2316 <1> N_SEGREGS equ ($ - segrgnam) >> 1 2317 <1> xregnam: 2318 0000881E 5354 <1> defsr ST 2319 00008820 4D4D <1> defsr MM 2320 00008822 4352 <1> defsr CR 2321 00008824 4452 <1> defsr DR 2322 00008826 5452 <1> defsr TR ; 30..34 2323 <1> N_ALLREGS equ ($ - rgnam816) >> 1 2324 <1> 2325 <1> 2326 <1> align 2, db 0 2327 00008828 [640C][6C0C][700C]- <1> reg32addr: dw reg_eax, reg_ecx, reg_edx, reg_ebx 2327 0000882E [680C] <1> 2328 00008830 [740C][780C][7C0C]- <1> dw reg_esp, reg_ebp, reg_esi, reg_edi 2328 00008836 [800C] <1> 2329 <1> 2330 <1> align 2, db 0 2331 00008838 [880C][900C][8C0C]- <1> segrgaddr: dw reg_es,reg_cs,reg_ss,reg_ds,reg_fs,reg_gs 2331 0000883E [840C][940C][980C] <1> 2332 <1> 2333 <1> ; Tables for handling of named prefixes. 2334 <1> 2335 00008844 262E363E6465 <1> prefixlist: db 26h,2Eh,36h,3Eh,64h,65h ; segment prefixes (in order) 2336 0000884A 9BF0F2F3 <1> db 9Bh,0F0h,0F2h,0F3h ; WAIT,LOCK,REPNE,REPE 2337 0000884E 6667 <1> db 066h,067h ; OSIZE, ASIZE 2338 <1> N_PREFIX: equ $ - prefixlist 2339 <1> 2340 <1> align 2, db 0 2341 00008850 C309F90535082F08 <1> prefixmnem: dw MN_WAIT,MN_LOCK,MN_REPNE,MN_REPE 2342 00008858 0C000200 <1> dw MN_O32,MN_A32 ; in 16-bit CS, OSIZE is O32 and ASIZE is A32 2343 <1> %if _PM 2344 0000885C 11000700 <1> dw MN_O16,MN_A16 ; in 32-bit CS, OSIZE is O16 and ASIZE is A16 2345 <1> %endif 2346 <1> 2347 <1> %if _COND 2348 <1> align 2, db 0 2349 <1> cond_table: 2350 00008860 0008 <1> dw 800h ; OF 2351 00008862 0100 <1> dw 1 ; CF 2352 00008864 4000 <1> dw 40h ; ZF 2353 00008866 4100 <1> dw 41h ; CF | ZF 2354 00008868 8000 <1> dw 80h ; SF 2355 0000886A 0400 <1> dw 4 ; PF 2356 <1> ; dw cond_L_GE ; handled specifically 2357 <1> ; dw cond_LE_G ; handled specifically 2358 <1> %endif 2359 <1> 2360 <1> single_byte_opcodes_repeat_disassembly: 2361 <1> .: 2362 0000886C 17 <1> db 17h ; pop ss 2363 0000886D E6 <1> db 0E6h ; out imm8, al 2364 0000886E E7 <1> db 0E7h ; out imm8, (e)ax 2365 0000886F EE <1> db 0EEh ; out dx, al 2366 00008870 EF <1> db 0EFh ; out dx, (e)ax 2367 00008871 6E <1> db 06Eh ; outsb 2368 00008872 6F <1> db 06Fh ; outsw/outsd 2369 00008873 E4 <1> db 0E4h ; in al, imm8 2370 00008874 E5 <1> db 0E5h ; in (e)ax, imm8 2371 00008875 EC <1> db 0ECh ; in al, dx 2372 00008876 ED <1> db 0EDh ; in (e)ax, dx 2373 00008877 6C <1> db 06Ch ; insb 2374 00008878 6D <1> db 06Dh ; insw/insd 2375 00008879 F4 <1> db 0F4h ; hlt 2376 0000887A FB <1> db 0FBh ; sti 2377 <1> .length: equ $ - . 2378 <1> 2379 <1> 2380 <1> usesection lDEBUG_CODE 2381 <1> 2382 <1> disasm: 2383 000047AB C606[D987]00 <1> mov byte [disrepeatcount], 0 ; number of repeated disassembly lines 2384 <1> 2385 <1> %if _MEMREF_AMOUNT 2386 000047B0 B90400 <1> mov cx, _MEMREF_AMOUNT 2387 000047B3 BF[7087] <1> mov di, memrefs 2388 <1> @@: 2389 000047B6 E8190D <1> call init_one_memref 2390 000047B9 E2FB <1> loop @B 2391 000047BB AB <1> stosw ; memrefs.free 2392 <1> %endif 2393 <1> 2394 <1> .preserve_disrepeatcount: 2395 <1> %if _COND 2396 000047BC 8326[DC87]00 <1> and word [condmsg], 0 ; initialize conditions message 2397 <1> %endif 2398 <1> .preserve_condmsg_and_disrepeatcount: 2399 000047C1 8926[D487] <1> mov word [savesp2], sp 2400 000047C5 66 <1> _386_PM_o32 ; xor eax, eax 2401 000047C6 31C0 <1> xor ax, ax 2402 000047C8 66 <1> _386_PM_o32 ; mov dword [dis_n], eax 2403 000047C9 A3[B887] <1> mov word [dis_n], ax 2404 000047CC A2[C087] <1> mov byte [disp8], al 2405 000047CF A3[BC87] <1> mov word [preflags], ax ; clear preflags and preused 2406 000047D2 C606[CF87]03 <1> mov byte [segmnt], 3 ; initially use DS segment 2407 000047D7 C606[CE87]80 <1> mov byte [rmsize], 80h ; don't display any memory 2408 000047DC A3[A281] <1> mov word [dismach], ax ; no special machine needed, so far 2409 000047DF 8B1E[220B] <1> mov bx, word [u_addr + saSegSel] 2410 <1> %if _PM 2411 000047E3 A2[DB88] <1> mov byte [bCSAttr], al 2412 000047E6 E84B15 <1> call test_d_b_bit 2413 000047E9 7405 <1> jz .16 2414 000047EB C606[DB88]40 <1> mov byte [bCSAttr], 40h 2415 <1> .16: 2416 <1> %endif 2417 <1> 2418 000047F0 E86111 <1> call disgetbyte ; get a byte of the instruction 2419 000047F3 3C9B <1> cmp al, 9Bh ; wait instruction (must be the first prefix) 2420 000047F5 7508 <1> jne da2 ; if not --> 2421 <1> 2422 <1> ; The wait instruction is actually a separate instruction as far as 2423 <1> ; the x86 is concerned, but we treat it as a prefix since there are 2424 <1> ; some mnemonics that incorporate it. But it has to be treated specially 2425 <1> ; since you can't do, e.g., seg cs wait ... but must do wait seg cs ... 2426 <1> ; instead. We'll catch it later if the wait instruction is not going to 2427 <1> ; be part of a shared mnemonic. 2428 <1> 2429 000047F7 800E[BC87]40 <1> or byte [preflags], PREWAIT 2430 <1> 2431 <1> ; If we've found a prefix, we return here for the actual instruction 2432 <1> ; (or another prefix). 2433 <1> 2434 <1> da1: 2435 000047FC E85511 <1> call disgetbyte 2436 <1> da2: 2437 000047FF A2[BF87] <1> mov [instru],al ; save away the instruction 2438 00004802 B400 <1> mov ah,0 2439 <1> 2440 <1> ; Now we have the sequence number of the instruction in AX. Look it up. 2441 <1> 2442 <1> da3: 2443 00004804 89C3 <1> mov bx,ax 2444 00004806 A3[C287] <1> mov [index],ax ; save the compressed index 2445 00004809 3DE001 <1> cmp ax,SPARSE_BASE 2446 0000480C 720A <1> jb da4 ; if it's not from the squeezed part of the table 2447 0000480E 8A9F[4812] <1> mov bl,[sqztab+bx-SPARSE_BASE] 2448 00004812 B700 <1> mov bh,0 2449 00004814 81C3E001 <1> add bx,SPARSE_BASE ; bx = compressed index 2450 <1> 2451 <1> da4: 2452 00004818 8A8F[500C] <1> mov cl, [optypes+bx]; cx = opcode type 2453 0000481C B500 <1> mov ch, 0 2454 0000481E D1E3 <1> shl bx, 1 2455 00004820 8B9F[EE0E] <1> mov bx, [opinfo+bx] ; bx = other info (usually the mnemonic) 2456 00004824 89CE <1> mov si, cx 2457 00004826 89D8 <1> mov ax, bx 2458 00004828 B10C <1> mov cl, 12 2459 0000482A D3E8 <1> shr ax, cl 2460 0000482C 3A06[A281] <1> cmp al, [dismach] 2461 00004830 7203 <1> jb da5 ; if a higher machine is already required 2462 00004832 A2[A281] <1> mov [dismach], al ; set machine type 2463 <1> da5: 2464 00004835 80E70F <1> and bh, 0Fh ; remove the machine field 2465 00004838 83FE0C <1> cmp si, OPTYPES_BASE 2466 0000483B 7360 <1> jae da13_unp ; if this is an actual instruction 2467 0000483D F7C60100 <1> test si, 1 ; check whether valid displacement 2468 00004841 7403E9F500 <1> jnz da_internal_error ; if not --> 2469 00004846 FF94[DE87] <1> call [disjmp+si] ; otherwise, do more specific processing 2470 0000484A EBB8 <1> jmp s da3 ; back for more 2471 <1> 2472 <1> ; Two-byte instruction. 2473 <1> 2474 <1> da_twobyte: 2475 0000484C E80511 <1> call disgetbyte 2476 0000484F A2[BF87] <1> mov [instru],al 2477 00004852 B400 <1> mov ah,0 2478 00004854 05E001 <1> add ax,SPARSE_BASE 2479 00004857 C3 <1> ret 2480 <1> 2481 <1> ; Instruction group. 2482 <1> 2483 <1> da_insgrp: 2484 00004858 E87B0F <1> call getregmem_r ; get the middle 3 bits of the R/M byte 2485 0000485B 98 <1> cbw 2486 0000485C 01D8 <1> add ax,bx ; offset 2487 0000485E C3 <1> ret 2488 <1> 2489 <1> ; Coprocessor instruction. 2490 <1> 2491 <1> da_fpuins: 2492 0000485F 800E[D687]10 <1> or byte [disflags],DIS_I_SHOWSIZ 2493 00004864 800E[A381]01 <1> or byte [dmflags],DM_COPR 2494 00004869 E8740F <1> call getregmem 2495 0000486C 3CC0 <1> cmp al,0c0h 2496 0000486E 72E8 <1> jb da_insgrp ;range 00-bfh is same as an instruction group 2497 00004870 B103 <1> mov cl,3 2498 00004872 D2E8 <1> shr al,cl ;C0h --> 18h 2499 00004874 2C10 <1> sub al,18h-8 ;18h --> 8 2500 00004876 98 <1> cbw 2501 00004877 01D8 <1> add ax,bx ;offset 2502 00004879 C3 <1> ret 2503 <1> 2504 <1> ; Coprocessor instruction group. 2505 <1> 2506 <1> da_fpugrp: 2507 0000487A A0[9C81] <1> mov al,[regmem] 2508 0000487D 2407 <1> and al,7 2509 0000487F 98 <1> cbw 2510 00004880 01D8 <1> add ax,bx 2511 00004882 C3 <1> ret 2512 <1> 2513 <1> ; Instruction prefix. At this point, bl = prefix bits; bh = segment 2514 <1> 2515 <1> da_insprf: 2516 00004883 841E[BC87] <1> test bl,[preflags] 2517 00004887 7511 <1> jnz da12 ; if there are duplicates 2518 00004889 081E[BC87] <1> or [preflags],bl 2519 0000488D F6C301 <1> test bl,PRESEG 2520 00004890 7404 <1> jz da11 ; if not a segment 2521 00004892 883E[CF87] <1> mov [segmnt],bh ; save the segment 2522 <1> da11: 2523 00004896 58 <1> pop ax ; discard return address 2524 00004897 E962FF <1> jmp da1 2525 <1> 2526 <1> da12: 2527 0000489A E9CF0E <1> jmp disbad ; we don't allow duplicate prefixes 2528 <1> 2529 <1> ; si = index into table opindex, + OPTYPES_BASE 2530 <1> da13_unp: 2531 0000489D 83EE0C <1> sub si, OPTYPES_BASE ; = offset into opindex 2532 000048A0 31C0 <1> xor ax, ax 2533 000048A2 8A84[2C16] <1> mov al, [si + opindex] ; ax = adjustment (from opindex) 2534 000048A6 01F6 <1> add si, si ; take offset twice 2535 000048A8 4E <1> dec si ; subtract one 2536 000048A9 01C6 <1> add si, ax ; add in the adjustment 2537 <1> 2538 <1> ; OK. Here we go. This is an actual instruction. 2539 <1> ; bx = offset of mnemonic in mnlist 2540 <1> ; si = offset of operand list in oplists 2541 <1> ; First print the op mnemonic. 2542 <1> 2543 <1> da13: 2544 <1> %if _PM 2545 000048AB A0[BC87] <1> mov al, byte [preflags] 2546 000048AE 2430 <1> and al, PREOSIZE | PREASIZE ; get OSIZE,ASIZE status (= O32,A32 in 16-bit cs) 2547 000048B0 F606[DB88]40 <1> _386 test byte [bCSAttr], 40h ; in a 32-bit segment? 2548 000048B5 7402 <1> _386 jz .16 ; no --> 2549 000048B7 3430 <1> _386 xor al, PRE32D | PRE32A ; OSIZE,ASIZE present means O16,A16 2550 <1> .16: 2551 000048B9 A2[BE87] <1> mov byte [presizeflags], al ; set O32,A32 status 2552 <1> %endif 2553 000048BC 56 <1> push si 2554 000048BD 8DB7[9A01] <1> lea si,[mnlist+bx] ; offset of mnemonic 2555 000048C1 81FE[F101] <1> cmp si,mnlist+MN_BSWAP 2556 000048C5 7505 <1> jne da13a ; if not BSWAP 2557 000048C7 E82010 <1> call dischk32d 2558 000048CA 74CE <1> jz da12 ; if no operand-size prefix --> 2559 <1> da13a: 2560 000048CC E8590F <1> call showop ; print out the op code (at line_out+28) 2561 000048CF 8326[DA87]00 <1> and word [sizeloc], 0 ; clear out this flag 2562 000048D4 5E <1> pop si ; recover list of operands (offset in oplists) 2563 000048D5 81C6[0000] <1> add si, oplists ; -> actual oplist entry 2564 <1> 2565 <1> da14_check_end: 2566 000048D9 803C00 <1> cmp byte [si], OP_END 2567 000048DC 7503E98400 <1> je da_op_end_e ; if we're done --> 2568 <1> 2569 <1> ; Loop over operands. si-> next operand type. 2570 <1> ; Fortunately the operands appear in the instruction in the same 2571 <1> ; order as they appear in the disassembly output. 2572 <1> 2573 <1> da14: 2574 000048E1 C606[D887]00 <1> mov byte [disflags2], 0 ; clear out size-related flags 2575 000048E6 AC <1> lodsb ; get the operand type 2576 000048E7 3C40 <1> cmp al,OP_SIZE 2577 000048E9 7259 <1> jb da18 ; if it's not size dependent 2578 000048EB C606[D887]20 <1> mov byte [disflags2],DIS_I_KNOWSIZ ;indicate variable size 2579 000048F0 3CA0 <1> cmp al,OP_1632_DEFAULT 2580 000048F2 7313 <1> jae da15_default 2581 000048F4 3C60 <1> cmp al,OP_8 2582 000048F6 7329 <1> jae da16 ; if the size is fixed (8, 16, 32, 64) 2583 000048F8 3C50 <1> cmp al,OP_1632 2584 000048FA 7317 <1> jae da15 ; if word or dword 2585 <1> ; OP_ALL here. This has a width of 2. 2586 <1> ; If the low bit is clear, this means 2587 <1> ; 8 bit, else 16/32 bits. 2588 000048FC B4FF <1> mov ah,-1 2589 000048FE F606[BF87]01 <1> test byte [instru],1 2590 00004903 7424 <1> jz da17 ; if byte --> 2591 00004905 EB0C <1> jmp da15 2592 <1> da15_default: 2593 00004907 F606[BC87]10 <1> test byte [preflags], PREOSIZE 2594 0000490C 7505 <1> jnz da15 2595 0000490E 800E[D787]01 <1> setopt [disflags], DIS_I_NOSIZ 2596 <1> da15: 2597 00004913 800E[BD87]10 <1> or byte [preused],PRE32D; mark this flag as used 2598 00004918 8A26[BE87] <1> mov ah,[presizeflags] 2599 0000491C 80E410 <1> and ah,PRE32D ;this will be 10h for dword, 00h for word 2600 0000491F EB08 <1> jmp s da17 ;done 2601 <1> 2602 <1> da16: 2603 00004921 88C4 <1> mov ah,al ;OP_8, OP_16, OP_32 or OP_64 (we know which) 2604 00004923 80E4F0 <1> and ah,0f0h ;this converts ah to <0 for byte, =0 for word, 2605 00004926 80EC70 <1> sub ah,OP_16 ;and >0 for dword (byte=F0h, word=00h, dword=10h, qword=20h) 2606 <1> 2607 <1> ; Now we know the size (in ah); branch off to do the operand itself. 2608 <1> 2609 <1> da17: 2610 00004929 88C3 <1> mov bl, al 2611 0000492B 83E30F <1> and bx, 0Fh ; 8 entries (IMM, RM, M, R_MOD, M_OFFS, R, R_ADD, AX) 2612 0000492E D1E3 <1> shl bx, 1 2613 00004930 83FB10 <1> cmp bx, disjmp2.end - disjmp2 2614 00004933 7306 <1> jae @F 2615 00004935 FF97[0487] <1> call [disjmp2 + bx] ; print out the operand 2616 00004939 EB27 <1> jmp short da20 ; done with operand 2617 <1> 2618 <1> @@: 2619 <1> da_internal_error: 2620 0000493B BA[9970] <1> mov dx, msg.uu_internal_error 2621 0000493E E87B74 <1> call putsz 2622 00004941 E9BCB6 <1> jmp cmd3 2623 <1> 2624 <1> 2625 <1> ; Sizeless operands. 2626 <1> 2627 <1> da18: 2628 00004944 98 <1> cbw 2629 00004945 93 <1> xchg ax, bx ; bx = index 2630 00004946 D1E3 <1> shl bx, 1 2631 00004948 8B87[1487] <1> mov ax, [optab + bx] 2632 0000494C 83FB46 <1> cmp bx, OP_FIRST_STRING << 1 2633 0000494F 720F <1> jb da19 ; if it's not a string 2634 00004951 83FB5C <1> cmp bx, OP_AFTER_LAST << 1 2635 00004954 73E5 <1> jae @B 2636 00004956 E8260F <1> call dis_stosw_lowercase 2637 00004959 84E4 <1> test ah, ah 2638 0000495B 7505 <1> jnz da20 ; if it's two characters 2639 0000495D 4F <1> dec di 2640 0000495E EB02 <1> jmp s da20 ; done with operand 2641 <1> 2642 <1> da19: 2643 00004960 FFD0 <1> call ax ; otherwise, do something else 2644 <1> 2645 <1> ; Operand done, check if there's another one. 2646 <1> da20: 2647 00004962 803C00 <1> cmp byte [si], OP_END 2648 <1> da_op_end_e: 2649 00004965 7410 <1> je da_op_end ; if we're done --> 2650 00004967 B02C <1> mov al,',' 2651 00004969 AA <1> stosb 2652 0000496A F606[AC00]02 <1> testopt [asm_options], disasm_commablank 2653 0000496F 7403 <1> jz .nospace 2654 00004971 B020 <1> mov al, 32 2655 00004973 AA <1> stosb 2656 <1> .nospace: 2657 00004974 E96AFF <1> jmp da14 ;another operand 2658 <1> 2659 <1> 2660 <1> ; All operands done. Now handle prefixes: 2661 <1> ; OPSIZE (66h), ADDRSIZE (67h), WAIT, segment, REP, LOCK 2662 <1> da_op_end: 2663 <1> 2664 <1> ; Now check whether O32 or A32 modifies the opcode. 2665 <1> da_modify_opcode_osize_asize: 2666 00004977 B90200 <1> mov cx, N_LTABO 2667 0000497A BB[C415] <1> mov bx, ltabo1 2668 0000497D BA0200 <1> mov dx, 2*N_LTABO-2 2669 00004980 B410 <1> mov ah, PRE32D 2670 00004982 E87D00 <1> call da23_osize_asize 2671 <1> 2672 00004985 B90100 <1> mov cx, N_LTABA 2673 00004988 BB[CC15] <1> mov bx, ltaba1 2674 0000498B BA0000 <1> mov dx, 2*N_LTABA-2 2675 0000498E B420 <1> mov ah, PRE32A 2676 00004990 E86F00 <1> call da23_osize_asize 2677 <1> 2678 <1> ; Now check and loop for unused prefixes. 2679 <1> da21: 2680 00004993 A0[BD87] <1> mov al, [preused] ; = flags that are used 2681 00004996 F6D0 <1> not al ; = flags that are not used 2682 00004998 2206[BC87] <1> and al, [preflags] ; = flags that are not used but present 2683 0000499C 7503E92B01 <1> jz da28 ; if all present flags were used --> 2684 <1> 2685 000049A1 B90B00 <1> mov cx, N_WTAB 2686 000049A4 BB[9815] <1> mov bx, wtab1 2687 000049A7 BA1400 <1> mov dx, 2*N_WTAB-2 2688 000049AA B440 <1> mov ah, PREWAIT 2689 000049AC 84E0 <1> test al, ah 2690 000049AE 7407 <1> jz @F 2691 <1> ; if there's a WAIT prefix hanging 2692 000049B0 E84B00 <1> call da23_wait 2693 000049B3 7572 <1> jne disbad2 2694 000049B5 EBDC <1> jmp da21 2695 <1> 2696 <1> @@: 2697 000049B7 B420 <1> mov ah, PREASIZE 2698 000049B9 84E0 <1> test al, ah 2699 000049BB 746D <1> jz da24 ; if it isn't a 67h prefix --> 2700 <1> 2701 <1> ; check whether ASIZE applies to an implicit operand 2702 000049BD 57 <1> push di 2703 000049BE 50 <1> push ax 2704 000049BF A1[C287] <1> mov ax, [index] 2705 000049C2 84E4 <1> test ah, ah 2706 000049C4 750D <1> jnz .nota32prfx_nz ; opcode index > FF, not in this list --> 2707 000049C6 BF[2A11] <1> mov di, a32prfxtab 2708 000049C9 AE <1> scasb ; xlatb ? 2709 000049CA 7407 <1> je @F ; yes --> (ZR) 2710 000049CC 24FE <1> and al, ~1 ; clear the low bit (MOVSW -> MOVSB) 2711 000049CE B90700 <1> mov cx, A32P_LEN - 1 2712 000049D1 F2AE <1> repne scasb ; scan table (low bit cleared) 2713 <1> @@: 2714 <1> .nota32prfx_nz: 2715 000049D3 58 <1> pop ax 2716 000049D4 5F <1> pop di 2717 000049D5 7550 <1> jne .nota32prfx ; not in the list --> 2718 <1> 2719 000049D7 0826[BD87] <1> or [preused], ah ; mark it as used 2720 000049DB B104 <1> mov cl, 4 ; (ch = 0 because A32P_LEN < 256) 2721 000049DD E8C60F <1> call moveover ; make space for "A32 " 2722 000049E0 B84133 <1> mov ax, "A3" 2723 000049E3 E8170E <1> call dis_lowercase ; al = "a" if lowercase option specified 2724 000049E6 A3[2A08] <1> mov word [line_out+MNEMONOFS], ax 2725 000049E9 C706[2C08]3220 <1> mov word [line_out+MNEMONOFS+2], "2 " 2726 000049EF F606[BE87]20 <1> _386_PM test byte [presizeflags], PRE32A 2727 <1> _386_PM ; do we have 32-bit ASIZE ? 2728 000049F4 7506 <1> _386_PM jnz da21_j0 ; yes, keep a32 (in 16-bit cs) --> 2729 000049F6 C706[2B08]3136 <1> _386_PM mov word [line_out + MNEMONOFS + 1], "16" 2730 <1> ; no, make it a16 (in 32-bit cs) 2731 <1> da21_j0: equ $ 2732 000049FC EB95 <1> jmp s da21 2733 <1> 2734 <1> .nota32prfx: equ disbad2 2735 <1> 2736 <1> 2737 <1> da23_osize_asize: equ da23 2738 <1> 2739 <1> da23_wait: 2740 <1> %if _PM 2741 000049FE 0826[BE87] <1> or byte [presizeflags], ah 2742 <1> ; Fake that this flag is set for da23's check. 2743 <1> ; If not _PM then presizeflags == preflags and 2744 <1> ; PREWAIT is already set in that variable. 2745 <1> %endif 2746 <1> 2747 <1> ; INP: bx -> array of words to match against word [index] 2748 <1> ; cx = number of array entries 2749 <1> ; ah = preused flag to mark as used if match 2750 <1> ; ah = presizeflags flag to check if in use 2751 <1> ; dx = offset to add to di -> behind matched word 2752 <1> ; OUT: ZR if one of the array entries matched, 2753 <1> ; byte [preused] |= INP:ah 2754 <1> ; if also flag in byte [presizeflags] was set, 2755 <1> ; mnemonic replaced 2756 <1> ; NZ if no entry matched 2757 <1> ; CHG: ax, cx, si 2758 <1> ; 2759 <1> ; Note: If this is called with a 32-bit CS then the 2760 <1> ; OSIZE/ASIZE value in the byte [preflags] is 2761 <1> ; inverted to that in the byte [presizeflags]. 2762 <1> ; As we check the latter, for O16/A16 we will 2763 <1> ; not modify the mnemonics (keeping the 16-bit 2764 <1> ; default mnemonics) but will mark the prefix 2765 <1> ; as used by setting the flag in byte [preused]. 2766 <1> ; If there is no OSIZE/ASIZE in 32-bit CS then 2767 <1> ; the preused flag is also set (which does no 2768 <1> ; harm) and the 32-bit mnemonic is selected. 2769 <1> ; Operation in 16-bit CS has the same result as 2770 <1> ; the prior handling, though it will always 2771 <1> ; scan for the affected opcodes, and set the 2772 <1> ; preused flag even if no prefix is used. 2773 <1> da23: 2774 00004A02 57 <1> push di 2775 00004A03 89DF <1> mov di, bx 2776 00004A05 50 <1> push ax 2777 00004A06 A1[C287] <1> mov ax, [index] 2778 00004A09 F2AF <1> repne scasw 2779 00004A0B 58 <1> pop ax 2780 00004A0C 7517 <1> jne .ret ; if not found in the list --> (NZ) 2781 00004A0E 0826[BD87] <1> or byte [preused], ah ; mark this (OSIZE, ASIZE or WAIT) prefix as used 2782 00004A12 8426[BE87] <1> test byte [presizeflags], ah 2783 <1> ; is it O32, A32, or is WAIT present ? 2784 00004A16 740D <1> jz .ret ; no, do not modify mnemonic --> 2785 00004A18 01D7 <1> add di, dx ; replace the mnemonic with the modified name 2786 00004A1A 8B35 <1> mov si, [di] 2787 00004A1C 81C6[9A01] <1> add si, mnlist 2788 00004A20 E8050E <1> call showop ; copy instruction mnemonic 2789 00004A23 38C0 <1> cmp al, al ; ZR 2790 <1> .ret: 2791 00004A25 5F <1> pop di 2792 00004A26 C3 <1> retn 2793 <1> 2794 <1> 2795 <1> da21_j1: equ da21_j0 2796 <1> 2797 <1> disbad2: 2798 00004A27 E9420D <1> jmp disbad 2799 <1> 2800 <1> da24: 2801 00004A2A A801 <1> test al, PRESEG 2802 00004A2C 7434 <1> jz da25 ; if not because of a segment prefix --> 2803 00004A2E A1[C287] <1> mov ax, [index] 2804 00004A31 84E4 <1> test ah, ah 2805 00004A33 75F2 <1> jnz disbad2 ; if index > 256, it's none of these --> 2806 00004A35 57 <1> push di 2807 00004A36 B90900 <1> mov cx, SEGP_LEN 2808 00004A39 BF[2211] <1> mov di, segprfxtab 2809 00004A3C F2AE <1> repne scasb 2810 00004A3E 5F <1> pop di 2811 00004A3F 75E6 <1> jne disbad2 ; if it's not on the list --> 2812 00004A41 B90300 <1> mov cx, 3 2813 00004A44 E85F0F <1> call moveover 2814 00004A47 57 <1> push di 2815 00004A48 BF[2A08] <1> mov di, line_out+MNEMONOFS 2816 00004A4B E82E0E <1> call showseg ; show segment register 2817 00004A4E B03A <1> mov al, ':' 2818 00004A50 F606[AC00]04 <1> testopt [asm_options], disasm_nasm 2819 00004A55 7402 <1> jz .notnasm 2820 00004A57 B020 <1> mov al, 32 2821 <1> .notnasm: 2822 00004A59 AA <1> stosb 2823 00004A5A 5F <1> pop di 2824 00004A5B 800E[BD87]01 <1> or byte [preused], PRESEG ; mark it as used 2825 <1> da21_j2: 2826 00004A60 EB9A <1> jmp s da21_j1 2827 <1> 2828 <1> da25: 2829 00004A62 A802 <1> test al, PREREP 2830 00004A64 7435 <1> jz da26 ; if not a REP prefix 2831 00004A66 2406 <1> and al, PREREP|PREREPZ 2832 00004A68 0806[BD87] <1> or [preused], al 2833 00004A6C A1[C287] <1> mov ax, [index] 2834 00004A6F 84E4 <1> test ah, ah 2835 00004A71 7525 <1> jnz disbad3 ; if not in the first 256 bytes 2836 00004A73 24FE <1> and al, ~1 ; clear the low bit (MOVSW -> MOVSB) 2837 00004A75 57 <1> push di 2838 00004A76 BF[2B11] <1> mov di, replist 2839 00004A79 B90500 <1> mov cx, REP_SAME_LEN; scan those for REP first 2840 00004A7C F2AE <1> repne scasb 2841 00004A7E BE[B709] <1> mov si, mnlist+MN_REP 2842 00004A81 7439 <1> je da27 ; if one of the REP instructions --> 2843 00004A83 B102 <1> mov cl, REP_DIFF_LEN; (ch = 0) 2844 00004A85 F2AE <1> repne scasb 2845 00004A87 750F <1> jne disbad3 ; if not one of the REPE/REPNE instructions 2846 00004A89 BE[C909] <1> mov si, mnlist+MN_REPE 2847 00004A8C F606[BD87]04 <1> test byte [preused], PREREPZ 2848 00004A91 7529 <1> jnz da27 ; if REPE 2849 00004A93 BE[CF09] <1> mov si, mnlist+MN_REPNE 2850 00004A96 EB24 <1> jmp s da27 ; it's REPNE 2851 <1> 2852 <1> disbad3: 2853 00004A98 E9D10C <1> jmp disbad 2854 <1> 2855 <1> da26: 2856 00004A9B A808 <1> test al, PRELOCK 2857 00004A9D 74F9 <1> jz disbad3 ; if not a lock prefix, either --> 2858 00004A9F 57 <1> push di 2859 00004AA0 A1[C287] <1> mov ax, [index] 2860 00004AA3 BF[D015] <1> mov di, locktab 2861 00004AA6 B92E00 <1> mov cx, N_LOCK 2862 00004AA9 F2AF <1> repne scasw 2863 00004AAB 75EB <1> jne disbad3 ; if not in the approved list --> 2864 00004AAD F606[BD87]01 <1> test byte [preused], PRESEG 2865 00004AB2 74E4 <1> jz disbad3 ; if memory was not accessed --> 2866 00004AB4 BE[9307] <1> mov si, mnlist+MN_LOCK 2867 00004AB7 800E[BD87]08 <1> or byte [preused], PRELOCK 2868 <1> 2869 <1> ; Slip in another mnemonic (REP or LOCK). 2870 <1> ; SI = offset of mnemonic, what should be 2871 <1> ; DI is on the stack. 2872 <1> 2873 <1> da27: 2874 00004ABC 5F <1> pop di 2875 00004ABD B90800 <1> mov cx, 8 2876 00004AC0 56 <1> push si 2877 00004AC1 E8E20E <1> call moveover 2878 00004AC4 5E <1> pop si 2879 00004AC5 57 <1> push di 2880 00004AC6 E85F0D <1> call showop 2881 00004AC9 5F <1> pop di 2882 00004ACA EB94 <1> jmp s da21_j2 2883 <1> 2884 <1> ; Done with instruction. Erase the size indicator, if appropriate. 2885 <1> 2886 <1> da28: 2887 00004ACC 8B0E[DA87] <1> mov cx, [sizeloc] 2888 00004AD0 E324 <1> jcxz da28b ;if there was no size given 2889 00004AD2 A0[D687] <1> mov al,[disflags] 2890 00004AD5 A810 <1> test al,DIS_I_SHOWSIZ 2891 00004AD7 751D <1> jnz da28b ;if we need to show the size 2892 00004AD9 A820 <1> test al,DIS_I_KNOWSIZ 2893 00004ADB 7419 <1> jz da28b ;if the size is not known already 2894 00004ADD 87CF <1> xchg cx,di 2895 00004ADF 89FE <1> mov si,di ;save old di 2896 00004AE1 B020 <1> mov al, 32 2897 <1> da28a: 2898 00004AE3 AE <1> scasb ;skip size name 2899 00004AE4 75FD <1> jne da28a ;if not done yet 2900 <1> ;(The above is the same as repne scasb, but 2901 <1> ;has no effect on cx.) 2902 00004AE6 F606[AC00]04 <1> testopt [asm_options], disasm_nasm 2903 00004AEB 7503 <1> jnz .nasm 2904 00004AED 83C704 <1> add di, byte 4 ;skip 'PTR ' 2905 <1> .nasm: 2906 00004AF0 87F7 <1> xchg si,di 2907 00004AF2 29F1 <1> sub cx,si 2908 00004AF4 F3A4 <1> rep movsb ;move the line 2909 <1> 2910 <1> ; Now we're really done. Print out the bytes on the left. 2911 <1> 2912 <1> da28b: 2913 00004AF6 57 <1> push di ;print start of disassembly line 2914 00004AF7 BF[0E08] <1> mov di,line_out 2915 00004AFA A1[220B] <1> mov ax,[u_addr + saSegSel] 2916 <1> ; print address 2917 00004AFD E8066F <1> call hexword 2918 00004B00 B03A <1> mov al,':' 2919 00004B02 AA <1> stosb 2920 00004B03 66 <1> _386_PM_o32 ; mov eax, dword [u_addr] 2921 00004B04 A1[1E0B] <1> mov ax, word [u_addr] 2922 <1> %if _PM 2923 00004B07 F606[DB88]40 <1> test byte [bCSAttr], 40h 2924 00004B0C 7403 <1> jz .16 2925 00004B0E E8E96E <1> call hexword_high 2926 <1> .16: 2927 <1> %endif 2928 00004B11 E8F26E <1> call hexword 2929 00004B14 B020 <1> mov al, 32 2930 00004B16 AA <1> stosb 2931 00004B17 8B1E[B887] <1> mov bx, [dis_n] 2932 <1> da28c: 2933 00004B1B BE[2908] <1> mov si,line_out+MNEMONOFS - 1 2934 00004B1E 29FE <1> sub si, di 2935 00004B20 D1EE <1> shr si, 1 2936 00004B22 39F3 <1> cmp bx, si 2937 00004B24 7619 <1> jbe da29 ; if it's a short instruction which fits in one line 2938 00004B26 29F3 <1> sub bx, si 2939 00004B28 53 <1> push bx 2940 00004B29 89F3 <1> mov bx, si 2941 00004B2B 57 <1> push di 2942 00004B2C E85E0E <1> call disshowbytes 2943 00004B2F E80C6F <1> call putsline_crlf 2944 00004B32 59 <1> pop cx 2945 00004B33 5B <1> pop bx 2946 00004B34 BF[0E08] <1> mov di, line_out 2947 00004B37 29F9 <1> sub cx, di 2948 00004B39 B020 <1> mov al, 32 2949 00004B3B F3AA <1> rep stosb 2950 00004B3D EBDC <1> jmp short da28c 2951 <1> da29: 2952 00004B3F E84B0E <1> call disshowbytes 2953 <1> da30: 2954 00004B42 B020 <1> mov al, 32 ; pad to op code 2955 00004B44 B9[2A08] <1> mov cx,line_out+MNEMONOFS 2956 00004B47 29F9 <1> sub cx,di 2957 00004B49 7202 <1> jc da30_1 2958 00004B4B F3AA <1> rep stosb 2959 <1> da30_1: 2960 00004B4D 5F <1> pop di 2961 00004B4E F606[D687]08 <1> test byte [disflags],DIS_I_UNUSED 2962 00004B53 740D <1> jz da32 ; if we don't print ` (unused)' 2963 00004B55 BE[2B7A] <1> mov si,unused 2964 00004B58 807DFF20 <1> cmp byte [di-1], 32 2965 00004B5C 7501 <1> jne da31 ; if there's already a space here 2966 00004B5E 46 <1> inc si 2967 <1> da31: 2968 00004B5F E8056E <1> call showstring 2969 <1> 2970 <1> ; Print info on minimal processor needed. 2971 <1> 2972 <1> da32: 2973 00004B62 A0[A281] <1> mov al, [dismach] 2974 00004B65 3A06[E60B] <1> cmp al, [maxmachinetype] 2975 00004B69 7603 <1> jbe @F 2976 00004B6B A2[E60B] <1> mov [maxmachinetype], al 2977 <1> @@: 2978 00004B6E 57 <1> push di 2979 00004B6F BF[C487] <1> mov di, obsinst 2980 00004B72 8B0E[C287] <1> mov cx, word [index] 2981 00004B76 E87C0D <1> call showmach ;show the machine type, if needed 2982 00004B79 5F <1> pop di 2983 00004B7A E30F <1> jcxz da32f_j1 ; if no message --> 2984 <1> 2985 <1> ; Print a message on the far right. 2986 <1> 2987 <1> da32_tabto: 2988 00004B7C B8[5D08] <1> mov ax, line_out+79 2989 00004B7F 29C8 <1> sub ax, cx 2990 00004B81 51 <1> push cx 2991 00004B82 E89E6E <1> call tab_to ; tab out to the location 2992 00004B85 59 <1> pop cx 2993 00004B86 F3A4 <1> rep movsb ; copy the string 2994 <1> da32z_j1: 2995 00004B88 E97302 <1> jmp da32z ; done 2996 <1> 2997 <1> da32f_j1: 2998 00004B8B EB73 <1> jmp da32f 2999 <1> 3000 <1> %if _COND 3001 <1> ; Try dumping a condition status. 3002 <1> da32_cond: 3003 <1> %if _COND_RDUMP_ONLY 3004 00004B8D A802 <1> test al, DIS_F_SHOW ; (! DIS_F_SHOW|DIS_I_SHOW is negated here) 3005 00004B8F 75F7 <1> jnz da32z_j1 ; not showing conditionals message --> 3006 <1> %endif 3007 00004B91 8B36[DC87] <1> mov si, word [condmsg] 3008 00004B95 85F6 <1> test si, si ; stored a message here ? 3009 00004B97 74EF <1> jz da32z_j1 ; no --> 3010 00004B99 57 <1> push di 3011 00004B9A 89F7 <1> mov di, si 3012 00004B9C B9FFFF <1> mov cx, -1 3013 00004B9F 31C0 <1> xor ax, ax 3014 00004BA1 F2AE <1> repne scasb 3015 00004BA3 F7D9 <1> neg cx 3016 00004BA5 49 <1> dec cx 3017 00004BA6 49 <1> dec cx ; get string length 3018 00004BA7 5F <1> pop di 3019 00004BA8 EBD2 <1> jmp short da32_tabto 3020 <1> %else 3021 <1> da32_cond: equ da32z_j1 3022 <1> %endif 3023 <1> 3024 <1> da32_xlatb: 3025 00004BAA A802 <1> test al, DIS_F_SHOW ; (! DIS_F_SHOW|DIS_I_SHOW is negated here) 3026 00004BAC 75DF <1> jnz da32_cond 3027 00004BAE 803E[CF87]03 <1> _no386 cmp byte [segmnt], 3 3028 00004BB3 77D8 <1> _no386 ja da32_cond ; if FS or GS on non-386 --> (invalid) 3029 00004BB5 F606[BE87]20 <1> _no386 test byte [presizeflags], PRE32A 3030 00004BBA 75D1 <1> _no386 jnz da32_cond 3031 00004BBC 803E[CF87]05 <1> cmp byte [segmnt], 5 3032 00004BC1 77CA <1> ja da32_cond ; if invalid segment --> 3033 00004BC3 813E[C287]D700 <1> cmp word [index], 0D7h ; xlatb ? 3034 00004BC9 75C2 <1> jne da32_cond 3035 00004BCB A1[680C] <1> mov ax, word [reg_ebx] 3036 00004BCE A3[D087] <1> mov word [addrr], ax 3037 00004BD1 A1[6A0C] <1> mov ax, word [reg_ebx + 2] 3038 00004BD4 A3[D287] <1> mov word [addrr + 2], ax; get address in (e)bx 3039 00004BD7 A0[640C] <1> mov al, byte [reg_eax] 3040 00004BDA 0006[D087] <1> add byte [addrr], al 3041 00004BDE 8016[D187]00 <1> adc byte [addrr + 1], 0 3042 00004BE3 8316[D287]00 <1> adc word [addrr + 2], 0 ; add al 3043 00004BE8 C606[CE87]80 <1> mov byte [rmsize], 80h ; byte size 3044 <1> %if _MEMREF_AMOUNT 3045 00004BED 800E[D787]10 <1> setopt [disflags], DIS_I_M_SRC 3046 <1> %endif 3047 00004BF2 F606[BE87]20 <1> test byte [presizeflags], PRE32A 3048 00004BF7 7425 <1> jz @F 3049 00004BF9 800E[D787]08 <1> setopt [disflags], DIS_I_SHOW_A32 3050 <1> ; set flag if 32-bit 3051 00004BFE EB1E <1> jmp @F 3052 <1> 3053 <1> 3054 <1> ; Dump referenced memory location. 3055 <1> 3056 <1> da32f: 3057 00004C00 A0[D687] <1> mov al,[disflags] 3058 00004C03 3406 <1> xor al, DIS_F_SHOW | DIS_I_SHOW 3059 00004C05 A886 <1> test al, DIS_F_SHOW | DIS_I_SHOW | DIS_I_DONTSHOW 3060 <1> ; (NZ if either _SHOW is clear, or _DONTSHOW is set) 3061 00004C07 75A1 <1> jnz da32_xlatb ; if there is no memory location to show --> 3062 00004C09 803E[CF87]03 <1> _no386 cmp byte [segmnt], 3 3063 00004C0E 779A <1> _no386 ja da32_xlatb ; if FS or GS on non-386 --> (invalid) 3064 00004C10 F606[D787]08 <1> _no386 testopt [disflags], DIS_I_SHOW_A32 3065 00004C15 7593 <1> _no386 jnz da32_xlatb 3066 00004C17 803E[CF87]05 <1> cmp byte [segmnt], 5 3067 00004C1C 778C <1> ja da32_xlatb ; if invalid segment --> 3068 <1> @@: 3069 <1> %if _PM 3070 00004C1E 50 <1> push ax 3071 <1> %endif 3072 00004C1F A0[CF87] <1> mov al, [segmnt] ; segment number 3073 00004C22 98 <1> cbw 3074 00004C23 D1E0 <1> shl ax, 1 3075 00004C25 93 <1> xchg ax, bx ; mov bx, ax 3076 00004C26 8B9F[3888] <1> mov bx, [segrgaddr + bx]; get address of value 3077 <1> %if _PM 3078 00004C2A 58 <1> pop ax 3079 00004C2B E89B45 <1> call ispm 3080 00004C2E 7508 <1> jnz @F ; if 86 Mode, all segments readable --> 3081 <1> [cpu 286] 3082 00004C30 0F0027 <1> verr word [bx] 3083 00004C33 7403E955FF <1> jnz da32_cond ; (NOT to da32_xlatb) 3084 <1> __CPU__ 3085 <1> @@: 3086 <1> %endif 3087 00004C38 53 <1> push bx 3088 <1> %if _MEMREF_AMOUNT 3089 00004C39 FF37 <1> push word [bx] ; = segment/selector value 3090 00004C3B E84508 <1> call get_free_memref ; memrefs + bx -> the memref structure 3091 00004C3E 8F87[7887] <1> pop word [memrefs + bx + mrSegmentSelector] 3092 00004C42 808F[7A87]02 <1> or byte [memrefs + bx + mrFlags], mrfMem 3093 00004C47 F606[D787]10 <1> testopt [disflags], DIS_I_M_SRC 3094 00004C4C 7405 <1> jz @F 3095 00004C4E 808F[7A87]04 <1> or byte [memrefs + bx + mrFlags], mrfMemSource 3096 <1> @@: 3097 00004C53 F606[D787]20 <1> testopt [disflags], DIS_I_M_DST 3098 00004C58 7405 <1> jz @F 3099 00004C5A 808F[7A87]08 <1> or byte [memrefs + bx + mrFlags], mrfMemDest 3100 <1> @@: 3101 <1> %endif 3102 <1> 3103 00004C5F B8[5408] <1> mov ax, line_out + 79 - 9 3104 <1> ; 9 is composed of: 3105 <1> ; 1 additional blank (added to the one that is 3106 <1> ; already given by tab_to in any case) 3107 <1> ; 3 segreg name + colon 3108 <1> ; 4 low word offset 3109 <1> ; 1 equals sign 3110 <1> ; 79 means we write to the very right of an 80-columns 3111 <1> ; display, up to the second-to-last column. 3112 00004C62 B90200 <1> mov cx, 2 ; if byte then content uses 2 digits 3113 <1> %if _MEMREF_AMOUNT 3114 00004C65 C687[7C87]01 <1> mov byte [memrefs + bx + mrLength], 1 3115 <1> ; if byte then length = 1 3116 <1> %endif 3117 00004C6A 803E[CE87]00 <1> cmp byte [rmsize],0 3118 00004C6F 7C10 <1> jl da32h ; if byte 3119 00004C71 7408 <1> jz da32g ; if word 3120 <1> %if _MEMREF_AMOUNT 3121 00004C73 8087[7C87]02 <1> add byte [memrefs + bx + mrLength], 2 3122 <1> ; add 2 bytes to length for high half of dword 3123 <1> %endif 3124 00004C78 83C104 <1> add cx, byte 4 ; add 4 digits for high half of dword 3125 <1> da32g: 3126 <1> %if _MEMREF_AMOUNT 3127 00004C7B FE87[7C87] <1> inc byte [memrefs + bx + mrLength] 3128 <1> ; add 1 byte to length for the high byte 3129 <1> %endif 3130 00004C7F 41 <1> inc cx 3131 00004C80 41 <1> inc cx ; add 2 digits for the high byte 3132 <1> da32h: 3133 00004C81 F606[D787]04 <1> testopt [disflags], DIS_I_DOUBLE_M 3134 00004C86 740B <1> jz @F 3135 <1> %if _MEMREF_AMOUNT 3136 00004C88 8A97[7C87] <1> mov dl, byte [memrefs + bx + mrLength] 3137 00004C8C 0097[7C87] <1> add byte [memrefs + bx + mrLength], dl 3138 <1> ; double the amount of bytes 3139 <1> %endif 3140 00004C90 01C9 <1> add cx, cx ; double the amount of digits 3141 00004C92 41 <1> inc cx ; plus one slot for the comma 3142 <1> @@: 3143 00004C93 F606[D787]02 <1> testopt [disflags], DIS_I_FAR_M 3144 00004C98 7408 <1> jz @F 3145 <1> %if _MEMREF_AMOUNT 3146 00004C9A 8087[7C87]02 <1> add byte [memrefs + bx + mrLength], 2 3147 <1> ; add 2 bytes to the length for the segment 3148 <1> %endif 3149 00004C9F 83C105 <1> add cx, 5 ; 4 digits for segment plus 1 colon 3150 <1> @@: 3151 <1> %if _MEMREF_AMOUNT 3152 00004CA2 FF36[D087] <1> push word [addrr] 3153 00004CA6 8F87[7487] <1> pop word [memrefs + bx + mrOffset] 3154 <1> %endif 3155 00004CAA F606[D787]08 <1> testopt [disflags], DIS_I_SHOW_A32 3156 00004CAF 7410 <1> jz @F 3157 <1> %if _MEMREF_AMOUNT 3158 00004CB1 FF36[D287] <1> push word [addrr + 2] 3159 00004CB5 8F87[7687] <1> pop word [memrefs + bx + mrOffset + 2] 3160 00004CB9 808F[7A87]10 <1> or byte [memrefs + bx + mrFlags], mrfA32 3161 <1> %endif 3162 00004CBE 83C104 <1> add cx, 4 ; add 4 digits for high word offset 3163 <1> @@: 3164 <1> %if _MEMREF_AMOUNT 3165 00004CC1 E8DA07 <1> call calc_linear_memref_and_mark_nonfree 3166 <1> %endif 3167 00004CC4 29C8 <1> sub ax, cx 3168 00004CC6 E85A6D <1> call tab_to ; CHG: ax, bx, cx, dx, di 3169 00004CC9 B020 <1> mov al, 32 3170 00004CCB AA <1> stosb 3171 00004CCC E8A10B <1> call showseg_uppercase_ax 3172 <1> ; ax = segment register name 3173 00004CCF E83D0B <1> call dis_lowercase_refmem_w 3174 00004CD2 AB <1> stosw 3175 00004CD3 B03A <1> mov al, ':' 3176 00004CD5 AA <1> stosb 3177 00004CD6 F606[D787]08 <1> testopt [disflags], DIS_I_SHOW_A32 3178 00004CDB 7406 <1> jz @F 3179 00004CDD A1[D287] <1> mov ax, [addrr + 2] 3180 00004CE0 E8236D <1> call hexword ; show high word of offset 3181 <1> @@: 3182 00004CE3 A1[D087] <1> mov ax, [addrr] 3183 00004CE6 E81D6D <1> call hexword ; show offset 3184 00004CE9 B03D <1> mov al,'=' 3185 00004CEB AA <1> stosb 3186 00004CEC 5B <1> pop bx 3187 00004CED 06 <1> push es 3188 00004CEE 8E07 <1> mov es, [bx] 3189 00004CF0 66 <1> _386_o32 3190 00004CF1 8B1E[D087] <1> mov bx, [addrr] 3191 <1> 3192 00004CF5 F606[D787]02 <1> testopt [disflags], DIS_I_FAR_M 3193 00004CFA 743D <1> jz .no_far_m 3194 00004CFC BE0100 <1> mov si, 1 3195 00004CFF 803E[CE87]00 <1> cmp byte [rmsize], 0 3196 00004D04 7C08 <1> jl @F 3197 00004D06 BE0200 <1> mov si, 2 3198 00004D09 7403 <1> jz @F 3199 00004D0B BE0400 <1> mov si, 4 3200 <1> @@: 3201 00004D0E F606[D787]08 <1> testopt [disflags], DIS_I_SHOW_A32 3202 00004D13 7411 <1> jz @F 3203 <1> [cpu 386] 3204 00004D15 660FB7F6 <1> movzx esi, si 3205 00004D19 26678A0433 <1> mov al, byte [es:ebx + esi] 3206 00004D1E 26678A643301 <1> mov ah, byte [es:ebx + esi + 1] 3207 <1> __CPU__ 3208 00004D24 EB07 <1> jmp @FF 3209 <1> @@: 3210 00004D26 268A00 <1> mov al, byte [es:bx + si] 3211 00004D29 268A6001 <1> mov ah, byte [es:bx + si + 1] 3212 <1> @@: 3213 00004D2D 8CC6 <1> mov si, es 3214 00004D2F 07 <1> pop es 3215 00004D30 06 <1> push es 3216 00004D31 E8D26C <1> call hexword 3217 00004D34 B03A <1> mov al, ':' 3218 00004D36 AA <1> stosb 3219 00004D37 8EC6 <1> mov es, si 3220 <1> .no_far_m: 3221 <1> 3222 00004D39 8CC6 <1> mov si, es 3223 00004D3B F606[D787]08 <1> testopt [disflags], DIS_I_SHOW_A32 3224 00004D40 741E <1> jz @F 3225 <1> [cpu 386] 3226 00004D42 26678A03 <1> mov al, [es:ebx] ; avoid a "mov ax,[-1]" 3227 00004D46 803E[CE87]00 <1> cmp byte [rmsize], 0 3228 00004D4B 7C38 <1> jl .displaybyte ; if byte --> 3229 00004D4D 26678A6301 <1> mov ah, [es:ebx + 1] 3230 00004D52 742B <1> jz .displayword ; if word --> 3231 00004D54 26678A5302 <1> mov dl, [es:ebx + 2] ; avoid a "mov dx,[-1]" 3232 00004D59 26678A7303 <1> mov dh, [es:ebx + 3] 3233 <1> __CPU__ 3234 00004D5E EB18 <1> jmp .displaydword ; is dword --> 3235 <1> @@: 3236 00004D60 268A07 <1> mov al, [es:bx] ; avoid a "mov ax,[-1]" 3237 00004D63 803E[CE87]00 <1> cmp byte [rmsize], 0 3238 00004D68 7C1B <1> jl .displaybyte ; if byte 3239 00004D6A 268A6701 <1> mov ah, [es:bx + 1] 3240 00004D6E 740F <1> jz .displayword ; if word 3241 00004D70 268A5702 <1> mov dl, [es:bx + 2] ; avoid a "mov dx,[-1]" 3242 00004D74 268A7703 <1> mov dh, [es:bx + 3] 3243 <1> .displaydword: 3244 00004D78 07 <1> pop es 3245 00004D79 92 <1> xchg ax, dx 3246 00004D7A E8896C <1> call hexword 3247 00004D7D 92 <1> xchg ax, dx 3248 00004D7E A8 <1> db __TEST_IMM8 ; (skip pop) 3249 <1> .displayword: 3250 00004D7F 07 <1> pop es 3251 00004D80 E8836C <1> call hexword 3252 00004D83 EB04 <1> jmp short .displayed ; done 3253 <1> .displaybyte: 3254 00004D85 07 <1> pop es 3255 00004D86 E8846C <1> call hexbyte ; display byte 3256 <1> .displayed: 3257 <1> 3258 00004D89 F606[D787]04 <1> testopt [disflags], DIS_I_DOUBLE_M 3259 00004D8E 746E <1> jz .no_double_m 3260 <1> 3261 00004D90 B02C <1> mov al, ',' 3262 00004D92 AA <1> stosb 3263 <1> 3264 00004D93 06 <1> push es 3265 00004D94 8EC6 <1> mov es, si 3266 <1> 3267 00004D96 BE0100 <1> mov si, 1 3268 00004D99 803E[CE87]00 <1> cmp byte [rmsize], 0 3269 00004D9E 7C08 <1> jl @F 3270 00004DA0 BE0200 <1> mov si, 2 3271 00004DA3 7403 <1> jz @F 3272 00004DA5 BE0400 <1> mov si, 4 3273 <1> @@: 3274 00004DA8 F606[D787]08 <1> testopt [disflags], DIS_I_SHOW_A32 3275 00004DAD 7426 <1> jz @F 3276 <1> [cpu 386] 3277 00004DAF 660FB7F6 <1> movzx esi, si 3278 00004DB3 26678A0433 <1> mov al, [es:ebx + esi] ; avoid a "mov ax,[-1]" 3279 00004DB8 803E[CE87]00 <1> cmp byte [rmsize], 0 3280 00004DBD 7C3B <1> jl .double_displaybyte ; if byte --> 3281 00004DBF 26678A643301 <1> mov ah, [es:ebx + esi + 1] 3282 00004DC5 742D <1> jz .double_displayword ; if word --> 3283 00004DC7 26678A543302 <1> mov dl, [es:ebx + esi + 2] 3284 <1> ; avoid a "mov dx,[-1]" 3285 00004DCD 26678A743303 <1> mov dh, [es:ebx + esi + 3] 3286 <1> __CPU__ 3287 00004DD3 EB18 <1> jmp .double_displaydword 3288 <1> @@: 3289 00004DD5 268A00 <1> mov al, [es:bx + si] ; avoid a "mov ax,[-1]" 3290 00004DD8 803E[CE87]00 <1> cmp byte [rmsize], 0 3291 00004DDD 7C1B <1> jl .double_displaybyte ; if byte --> 3292 00004DDF 268A6001 <1> mov ah, [es:bx + si + 1] 3293 00004DE3 740F <1> jz .double_displayword ; if word --> 3294 00004DE5 268A5002 <1> mov dl, [es:bx + si + 2]; avoid a "mov dx,[-1]" 3295 00004DE9 268A7003 <1> mov dh, [es:bx + si + 3] 3296 <1> .double_displaydword: 3297 00004DED 07 <1> pop es 3298 00004DEE 92 <1> xchg ax, dx 3299 00004DEF E8146C <1> call hexword 3300 00004DF2 92 <1> xchg ax, dx 3301 00004DF3 A8 <1> db __TEST_IMM8 ; (skip pop) 3302 <1> .double_displayword: 3303 00004DF4 07 <1> pop es 3304 00004DF5 E80E6C <1> call hexword 3305 00004DF8 EB04 <1> jmp short .double_displayed 3306 <1> .double_displaybyte: 3307 00004DFA 07 <1> pop es 3308 00004DFB E80F6C <1> call hexbyte ; display byte 3309 <1> .double_displayed: 3310 <1> .no_double_m: 3311 <1> 3312 <1> da32z: 3313 00004DFE E8356C <1> call trimputs ; done with operand list 3314 <1> 3315 <1> %if _MEMREF_AMOUNT 3316 <1> set_string_memref: 3317 00004E01 A1[C287] <1> mov ax, [index] 3318 00004E04 84E4 <1> test ah, ah 3319 00004E06 7403E9F100 <1> jnz .none 3320 00004E0B BF[EE10] <1> mov di, ppbytes.string ; list of string opcodes 3321 00004E0E B90E00 <1> mov cx, ppbytes.string_amount 3322 00004E11 F2AE <1> repne scasb 3323 00004E13 7403E9E400 <1> jne .none ; if not one of these --> 3324 <1> ; last entries are: 0A6h,0A7h,0AEh,0AFh 3325 <1> ; corresponding to cmpsb, cmpsw/d, scasb, scasw/d 3326 <1> ; so cx = 0 means scasw, = 1 scasb, = 2 cmpsw, = 3 cmpsb 3327 00004E18 8A451E <1> mov al,byte [di+PPLEN-1]; get corresponding byte in ppinfo 3328 <1> 3329 00004E1B 31D2 <1> xor dx, dx 3330 00004E1D FF36[6C0C] <1> push word [reg_ecx] 3331 00004E21 8F06[B487] <1> pop word [string_memref_counter] 3332 00004E25 F606[BE87]20 <1> test byte [presizeflags], PRE32A 3333 00004E2A 7404 <1> jz @F ; if 16-bit addressing --> 3334 00004E2C 8B16[6E0C] <1> mov dx, [reg_ecx + 2] ; = ecxh value 3335 <1> @@: 3336 00004E30 8916[B687] <1> mov word [string_memref_counter + 2], dx 3337 <1> 3338 00004E34 80F904 <1> cmp cl, 4 ; repetition differs for memory content ? 3339 00004E37 737B <1> jae @F ; no --> 3340 00004E39 F606[BC87]02 <1> test byte [preflags], PREREP 3341 00004E3E 7474 <1> jz @F ; if not repeated --> 3342 <1> 3343 00004E40 01C9 <1> add cx, cx ; 0 = scasd, 2 = scasb, 4 = cmpsd, 6 = cmpsb 3344 00004E42 F606[BE87]10 <1> test byte [presizeflags], PRE32D 3345 00004E47 7501 <1> jnz .iso32 3346 00004E49 41 <1> inc cx ; point to word entry, not dword 3347 <1> .iso32: 3348 <1> 3349 00004E4A 01C9 <1> add cx, cx ; table entries are words, so 0..14 3350 <1> 3351 00004E4C F606[BC87]04 <1> test byte [preflags], PREREPZ 3352 00004E51 7403 <1> jz .isrepne 3353 00004E53 83C110 <1> add cx, simulate_rep_sca_cmp.table_repe_offset 3354 <1> ; from 0..14 to 16..30 3355 <1> .isrepne: 3356 <1> 3357 00004E56 89CB <1> mov bx, cx ; = index into table 3358 00004E58 8B97[7C88] <1> mov dx, word [bx + simulate_rep_sca_cmp.table] 3359 <1> ; function to call 3360 00004E5C F606[BE87]20 <1> test byte [presizeflags], PRE32A 3361 00004E61 7401 <1> jz .isa16 ; if 16-bit addressing --> 3362 00004E63 4A <1> dec dx ; a32 prefix is 1 byte lower than table entry 3363 <1> .isa16: 3364 <1> 3365 00004E64 66 <1> _386_o32 3366 00004E65 8B36[7C0C] <1> mov si, word [reg_esi] 3367 00004E69 66 <1> _386_o32 3368 00004E6A 8B3E[800C] <1> mov di, word [reg_edi] 3369 00004E6E 66 <1> _386_o32 3370 00004E6F 8B0E[6C0C] <1> mov cx, word [reg_ecx] 3371 00004E73 8E06[880C] <1> mov es, word [reg_es] 3372 00004E77 50 <1> push ax 3373 00004E78 A810 <1> test al, PP_STRSRC ; cmps ? 3374 00004E7A 740D <1> jz .issca ; no, no need to load ds --> 3375 <1> 3376 00004E7C A0[CF87] <1> mov al, [segmnt] ; segment number 3377 00004E7F 98 <1> cbw 3378 00004E80 D1E0 <1> shl ax, 1 3379 00004E82 93 <1> xchg ax, bx ; mov bx, ax 3380 00004E83 8B9F[3888] <1> mov bx, word [segrgaddr + bx] 3381 <1> ; si = address of segment/selector reg 3382 00004E87 8E1F <1> mov ds, [bx] 3383 <1> 3384 <1> .issca: 3385 00004E89 66 <1> _386_o32 3386 00004E8A 36A1[640C] <1> mov ax, word [ss:reg_eax] 3387 <1> 3388 00004E8E 36F606[A10C]04 <1> testopt [ss:reg_efl], 400h 3389 <1> ; DF set ? 3390 00004E94 7401 <1> jz .up 3391 00004E96 FD <1> std 3392 <1> .up: 3393 00004E97 FFD2 <1> call dx ; simulate the repeated string op 3394 00004E99 FC <1> cld 3395 00004E9A 16 <1> push ss 3396 00004E9B 1F <1> pop ds 3397 00004E9C 16 <1> push ss 3398 00004E9D 07 <1> pop es 3399 <1> 3400 00004E9E 6651 <1> _386 push ecx 3401 00004EA0 59 <1> _386 pop cx 3402 00004EA1 5A <1> _386 pop dx 3403 <1> 3404 00004EA2 F606[BE87]20 <1> _386 test byte [presizeflags], PRE32A 3405 00004EA7 7502 <1> _386 jnz .count32 ; if 32-bit addressing --> 3406 00004EA9 31D2 <1> xor dx, dx 3407 <1> .count32: 3408 00004EAB 290E[B487] <1> sub word [string_memref_counter], cx 3409 00004EAF 1916[B687] <1> sbb word [string_memref_counter + 2], dx 3410 <1> 3411 00004EB3 58 <1> pop ax 3412 <1> @@: 3413 <1> 3414 00004EB4 A810 <1> test al, PP_STRSRC 3415 00004EB6 7429 <1> jz .no_src 3416 <1> 3417 00004EB8 803E[CF87]03 <1> _no386 cmp byte [segmnt], 3 3418 00004EBD 7722 <1> _no386 ja .no_src ; if FS or GS on non-386 --> (invalid) 3419 00004EBF 803E[CF87]05 <1> cmp byte [segmnt], 5 3420 00004EC4 771B <1> ja .no_src ; if invalid segment --> 3421 <1> 3422 00004EC6 50 <1> push ax 3423 00004EC7 A0[CF87] <1> mov al, [segmnt] ; segment number 3424 00004ECA 98 <1> cbw 3425 00004ECB D1E0 <1> shl ax, 1 3426 00004ECD 93 <1> xchg ax, bx ; mov bx, ax 3427 00004ECE 58 <1> pop ax 3428 00004ECF 8BB7[3888] <1> mov si, word [segrgaddr + bx] 3429 <1> ; si = address of segment/selector reg 3430 00004ED3 BF[7C0C] <1> mov di, reg_esi ; di = address of offset reg 3431 00004ED6 E80606 <1> call init_string_memref 3432 <1> @@: ; entry: set memref to string source and mark 3433 <1> ; (jump to .none afterwards if al is zero) 3434 00004ED9 808F[7A87]60 <1> or byte [memrefs + bx + mrFlags], mrfString | mrfStringSource 3435 00004EDE E8BD05 <1> call calc_linear_memref_and_mark_nonfree 3436 <1> 3437 <1> .no_src: 3438 00004EE1 A828 <1> test al, PP_STRDEST | PP_STRSRC2 3439 00004EE3 7417 <1> jz .none 3440 00004EE5 BE[880C] <1> mov si, reg_es ; si = address of segment/selector reg 3441 00004EE8 BF[800C] <1> mov di, reg_edi ; di = address of offset reg 3442 00004EEB E8F105 <1> call init_string_memref 3443 00004EEE A808 <1> test al, PP_STRSRC2 ; alternative string source ? 3444 00004EF0 B000 <1> mov al, 0 ; (cause conditional branch to jump) 3445 00004EF2 75E5 <1> jnz @B ; yes, set as string source --> 3446 00004EF4 808F[7A87]A0 <1> or byte [memrefs + bx + mrFlags], mrfString | mrfStringDest 3447 00004EF9 E8A205 <1> call calc_linear_memref_and_mark_nonfree 3448 <1> 3449 <1> .none: 3450 <1> 3451 <1> %if _DEBUG2 3452 <1> display_memrefs: 3453 <1> mov cx, [memrefs.free] 3454 <1> test cx, cx 3455 <1> jz .none 3456 <1> xor si, si 3457 <1> .loop: 3458 <1> mov bx, si 3459 <1> call get_memref_index_bx 3460 <1> mov ax, word [memrefs + bx + mrFlags] 3461 <1> mov dx, msg.memrefs_branchdirect 3462 <1> test al, mrfBranchDirect 3463 <1> jnz .gotmsg 3464 <1> mov dx, msg.memrefs_stringsource 3465 <1> test al, mrfStringSource 3466 <1> jnz .gotmsg 3467 <1> mov dx, msg.memrefs_stringdest 3468 <1> test al, mrfStringDest 3469 <1> jnz .gotmsg 3470 <1> mov dl, al 3471 <1> and dl, mrfMemSource | mrfMemDest 3472 <1> cmp dl, mrfMemSource | mrfMemDest 3473 <1> mov dx, msg.memrefs_memsourcedest 3474 <1> je .gotmsg 3475 <1> mov dx, msg.memrefs_memsource 3476 <1> test al, mrfMemSource 3477 <1> jnz .gotmsg 3478 <1> mov dx, msg.memrefs_memdest 3479 <1> test al, mrfMemDest 3480 <1> jnz .gotmsg 3481 <1> mov dx, msg.memrefs_mem_unknown 3482 <1> test al, mrfMem 3483 <1> jnz .gotmsg 3484 <1> mov dx, msg.memrefs_unknown 3485 <1> .gotmsg: 3486 <1> call putsz 3487 <1> 3488 <1> mov di, line_out 3489 <1> mov ax, word [memrefs + bx + mrSegmentSelector] 3490 <1> call hexword 3491 <1> push word [memrefs + bx + mrOffset] 3492 <1> mov al, ':' 3493 <1> stosb 3494 <1> %if 1 || _PM 3495 <1> mov ax, word [memrefs + bx + mrOffset + 2] 3496 <1> test byte [memrefs + bx + mrFlags], mrfA32 3497 <1> jz .16 3498 <1> call hexword 3499 <1> .16: 3500 <1> %endif 3501 <1> pop ax 3502 <1> call hexword 3503 <1> push si 3504 <1> push cx 3505 <1> mov si, msg.memrefs_length 3506 <1> call copy_single_counted_string 3507 <1> mov ax, word [memrefs + bx + mrLength + 2] 3508 <1> test ax, ax 3509 <1> jz @F 3510 <1> call hexword 3511 <1> @@: 3512 <1> mov ax, word [memrefs + bx + mrLength] 3513 <1> call hexword 3514 <1> call putsline_crlf 3515 <1> pop cx 3516 <1> pop si 3517 <1> 3518 <1> inc si 3519 <1> dec cx 3520 <1> jnz .loop 3521 <1> .none: 3522 <1> %endif ; _DEBUG2 3523 <1> %endif ; _MEMREF_AMOUNT 3524 <1> 3525 <1> da_repeat: 3526 00004EFC A0[D687] <1> mov al, [disflags] 3527 00004EFF A801 <1> test al, DIS_F_REPT 3528 00004F01 7437 <1> jz @FF ; if not repeating --> 3529 00004F03 A808 <1> test al, DIS_I_UNUSED 3530 00004F05 751A <1> jnz @F ; if " (unused)" was displayed --> 3531 00004F07 A840 <1> test al, DIS_I_MOV_SS 3532 00004F09 A1[C287] <1> mov ax, [index] 3533 00004F0C 7405 <1> jz .not_mov_to_ss ; not mov to ss --> 3534 <1> 3535 <1> ; DIS_I_MOV_SS is set, check for wo[index] == 8Eh; 3536 <1> ; as we only want to match move *to* ss, not from (8Ch). 3537 00004F0E 3D8E00 <1> cmp ax, 8Eh ; move to seg reg? 3538 00004F11 740E <1> je @F ; yes, it is mov to ss --> 3539 <1> 3540 <1> .not_mov_to_ss: 3541 00004F13 84E4 <1> test ah, ah 3542 00004F15 7524 <1> jnz .not_single_byte_opcode 3543 <1> 3544 00004F17 BF[6C88] <1> mov di, single_byte_opcodes_repeat_disassembly 3545 00004F1A B90F00 <1> mov cx, single_byte_opcodes_repeat_disassembly.length 3546 00004F1D F2AE <1> repne scasb 3547 00004F1F 751A <1> jne @FFF 3548 <1> @@: 3549 00004F21 8326[D687]03 <1> and word [disflags], DIS_F_REPT|DIS_F_SHOW 3550 00004F26 FE06[D987] <1> inc byte [disrepeatcount] 3551 00004F2A 803E[D987]10 <1> cmp byte [disrepeatcount], 16 3552 00004F2F 7303E988F8 <1> jb disasm.preserve_disrepeatcount 3553 <1> 3554 00004F34 BA[6F70] <1> mov dx, msg.uu_too_many_repeat 3555 00004F37 E8826E <1> call putsz 3556 <1> @@: 3557 00004F3A C3 <1> retn 3558 <1> 3559 <1> @@: 3560 <1> .not_single_byte_opcode: 3561 <1> 3562 00004F3B 8A3E[C087] <1> mov bh, byte [disp8] 3563 00004F3F 3DEB00 <1> cmp ax, 0EBh ; unconditional short jump ? 3564 00004F42 74F6 <1> je @BB ; yes, return --> 3565 00004F44 66 <1> _386_PM_o32 ; and dword [dis_n], byte 0 3566 00004F45 8326[B887]00 <1> and word [dis_n], byte 0 3567 00004F4A E8070A <1> call disgetbyte 3568 00004F4D B302 <1> mov bl, 2 ; displacement to skip a jmp short 3569 00004F4F 3CEB <1> cmp al, 0EBh ; jmp short ? 3570 00004F51 740F <1> je @F ; yes --> 3571 00004F53 B303 <1> mov bl, 3 ; displacement to skip a 16-bit jmp near 3572 00004F55 3CE9 <1> cmp al, 0E9h ; jmp near ? 3573 00004F57 75E1 <1> jne @BB ; no, return --> 3574 <1> %if _PM 3575 00004F59 F606[DB88]40 <1> test byte [bCSAttr], 40h ; 32-bit code segment ? 3576 00004F5E 7402 <1> jz @F ; no, 16-bit, use displacement 3 --> 3577 00004F60 B305 <1> mov bl, 5 ; displacement to skip a 32-bit jmp near 3578 <1> %endif 3579 <1> @@: 3580 00004F62 38DF <1> cmp bh, bl ; right displacement ? 3581 00004F64 75D4 <1> jne @BBB ; no --> 3582 <1> 3583 00004F66 8326[D687]03 <1> and word [disflags], DIS_F_REPT|DIS_F_SHOW 3584 00004F6B 8336[DC87]1C <1> xor word [condmsg], (msg.condnotjump + DATASECTIONFIXUP) ^ (msg.condjump + DATASECTIONFIXUP) 3586 00004F70 E94EF8 <1> jmp disasm.preserve_condmsg_and_disrepeatcount 3587 <1> 3588 <1> 3589 <1> %if _MEMREF_AMOUNT 3590 <1> simulate_rep_sca_cmp: 3591 <1> 3592 00004F73 67 <1> _386_a32 3593 <1> .repne_scasd: 3594 00004F74 66 <1> _386_o32 3595 00004F75 F2 <1> repne 3596 00004F76 AF <1> scasw 3597 00004F77 C3 <1> retn 3598 <1> 3599 00004F78 67 <1> _386_a32 3600 <1> .repne_scasw: 3601 00004F79 F2AF <1> repne scasw 3602 00004F7B C3 <1> retn 3603 <1> 3604 00004F7C 67 <1> _386_a32 3605 <1> .repne_scasb: 3606 00004F7D F2AE <1> repne scasb 3607 00004F7F C3 <1> retn 3608 <1> 3609 00004F80 67 <1> _386_a32 3610 <1> .repne_cmpsd: 3611 00004F81 66 <1> _386_o32 3612 00004F82 F2 <1> repne 3613 00004F83 A7 <1> cmpsw 3614 00004F84 C3 <1> retn 3615 <1> 3616 00004F85 67 <1> _386_a32 3617 <1> .repne_cmpsw: 3618 00004F86 F2A7 <1> repne cmpsw 3619 00004F88 C3 <1> retn 3620 <1> 3621 00004F89 67 <1> _386_a32 3622 <1> .repne_cmpsb: 3623 00004F8A F2A6 <1> repne cmpsb 3624 00004F8C C3 <1> retn 3625 <1> 3626 00004F8D 67 <1> _386_a32 3627 <1> .repe_scasd: 3628 00004F8E 66 <1> _386_o32 3629 00004F8F F3 <1> repe 3630 00004F90 AF <1> scasw 3631 00004F91 C3 <1> retn 3632 <1> 3633 00004F92 67 <1> _386_a32 3634 <1> .repe_scasw: 3635 00004F93 F3AF <1> repe scasw 3636 00004F95 C3 <1> retn 3637 <1> 3638 00004F96 67 <1> _386_a32 3639 <1> .repe_scasb: 3640 00004F97 F3AE <1> repe scasb 3641 00004F99 C3 <1> retn 3642 <1> 3643 00004F9A 67 <1> _386_a32 3644 <1> .repe_cmpsd: 3645 00004F9B 66 <1> _386_o32 3646 00004F9C F3 <1> repe 3647 00004F9D A7 <1> cmpsw 3648 00004F9E C3 <1> retn 3649 <1> 3650 00004F9F 67 <1> _386_a32 3651 <1> .repe_cmpsw: 3652 00004FA0 F3A7 <1> repe cmpsw 3653 00004FA2 C3 <1> retn 3654 <1> 3655 00004FA3 67 <1> _386_a32 3656 <1> .repe_cmpsb: 3657 00004FA4 F3A6 <1> repe cmpsb 3658 00004FA6 C3 <1> retn 3659 <1> 3660 <1> 3661 <1> usesection lDEBUG_DATA_ENTRY 3662 0000887B 00 <1> align 2, db 0 3663 <1> .table: 3664 0000887C [744F] <1> dw .repne_scasd 3665 0000887E [794F] <1> dw .repne_scasw 3666 00008880 [7D4F] <1> dw .repne_scasb 3667 00008882 [7D4F] <1> dw .repne_scasb 3668 00008884 [814F] <1> dw .repne_cmpsd 3669 00008886 [864F] <1> dw .repne_cmpsw 3670 00008888 [8A4F] <1> dw .repne_cmpsb 3671 0000888A [8A4F] <1> dw .repne_cmpsb 3672 <1> .table_repe_offset: equ $ - .table 3673 0000888C [8E4F] <1> dw .repe_scasd 3674 0000888E [934F] <1> dw .repe_scasw 3675 00008890 [974F] <1> dw .repe_scasb 3676 00008892 [974F] <1> dw .repe_scasb 3677 00008894 [9B4F] <1> dw .repe_cmpsd 3678 00008896 [A04F] <1> dw .repe_cmpsw 3679 00008898 [A44F] <1> dw .repe_cmpsb 3680 0000889A [A44F] <1> dw .repe_cmpsb 3681 <1> 3682 <1> usesection lDEBUG_CODE 3683 <1> %endif 3684 <1> 3685 <1> 3686 <1> ; Here are the routines for printing out the operands themselves. 3687 <1> ; Immediate data (OP_IMM) 3688 <1> 3689 <1> dop_imm: 3690 00004FA7 80FC00 <1> cmp ah, 0 3691 00004FAA 7C17 <1> jl dop03 ; if just a byte --> 3692 00004FAC 9C <1> pushf 3693 00004FAD F606[D687]10 <1> test byte [disflags], DIS_I_SHOWSIZ 3694 00004FB2 7403 <1> jz .nosize ; if we don't need to show the size --> 3695 00004FB4 E8CD08 <1> call showsize 3696 <1> .nosize: 3697 00004FB7 E8B609 <1> call disgetword 3698 00004FBA 9D <1> popf ; ZF 3699 00004FBB 7503E9466A <1> je hexword ; if just a word 3700 00004FC0 E90D09 <1> jmp disp32.ax 3701 <1> 3702 <1> dop03: 3703 00004FC3 E88E09 <1> call disgetbyte ; print immediate byte 3704 00004FC6 E9446A <1> jmp hexbyte 3705 <1> 3706 <1> 3707 <1> ; Memory offset reference (OP_MOFFS) 3708 <1> 3709 <1> dop_moffs: 3710 00004FC9 B005 <1> mov al, 5 3711 00004FCB F606[BE87]20 <1> test byte [presizeflags], PRE32A 3712 00004FD0 7501 <1> jnz .32 ; if 32-bit addressing --> 3713 00004FD2 40 <1> inc ax 3714 <1> .32: 3715 00004FD3 A2[9C81] <1> mov [regmem], al 3716 00004FD6 EB0A <1> jmp s dop05 3717 <1> 3718 <1> 3719 <1> ; MOD R/M (OP_RM) 3720 <1> 3721 <1> dop_rm: 3722 00004FD8 E80508 <1> call getregmem 3723 00004FDB 3CC0 <1> cmp al,0c0h 3724 00004FDD 7203E93F02 <1> jae dop33 ; if pure register reference --> 3725 <1> 3726 <1> dop05: ; <--- used by OP_M, OP_M64, OP_M80, OP_MOFFS 3727 00004FE2 8826[CE87] <1> mov byte [rmsize], ah ; save r/m size 3728 00004FE6 F606[D787]01 <1> testopt [disflags], DIS_I_NOSIZ 3729 00004FEB 7506 <1> jnz @F 3730 00004FED E89408 <1> call showsize ; print out size 3731 00004FF0 E8C808 <1> call showptr ; append "PTR " (if not NASM syntax) 3732 <1> @@: 3733 <1> dop06: ; <--- used by OP_MXX, OP_MFLOAT, OP_MDOUBLE 3734 00004FF3 800E[BD87]01 <1> or byte [preused],PRESEG ; needed even if there's no segment override 3735 <1> ; because handling of LOCK prefix relies on it 3736 00004FF8 B05B <1> mov al, '[' 3737 00004FFA E80202 <1> call stosb_nasm 3738 <1> 3739 00004FFD F606[BC87]01 <1> test byte [preflags],PRESEG 3740 00005002 7406 <1> jz dop07 ;if no segment override 3741 00005004 E87508 <1> call showseg ;print segment name 3742 00005007 B03A <1> mov al,':' 3743 00005009 AA <1> stosb 3744 <1> dop07: 3745 0000500A A0[9C81] <1> mov al,[regmem] 3746 0000500D 24C7 <1> and al,0c7h 3747 0000500F 800E[BD87]20 <1> or byte [preused],PREASIZE 3748 00005014 F606[BE87]20 <1> test byte [presizeflags],PRE32A 3749 00005019 7403E9AF00 <1> jnz dop18 ;if 32-bit addressing 3750 0000501E 800E[D687]04 <1> or byte [disflags],DIS_I_SHOW ;we'd like to show this address 3751 00005023 8326[D087]00 <1> and word [addrr], 0 ; zero out the address initially 3752 00005028 93 <1> xchg ax,bx ;mov bx,ax 3753 00005029 E8C601 <1> call store_opensqubracket 3754 0000502C 80FB06 <1> cmp bl,6 3755 0000502F 7503E98B00 <1> je dop16 ;if [xxxx] 3756 00005034 83E307 <1> and bx,7 3757 00005037 8A9F[EA87] <1> mov bl,[rmtab+bx] 3758 0000503B F6C308 <1> test bl,8 3759 0000503E 7525 <1> jnz dop09 ;if BX 3760 00005040 F6C304 <1> test bl,4 3761 00005043 7436 <1> jz dop11 ;if not BP 3762 00005045 B84250 <1> mov ax,'BP' 3763 00005048 8B0E[780C] <1> mov cx,[reg_ebp] 3764 0000504C E80A00 <1> call da_set_default_ss 3765 0000504F EB1B <1> jmp dop10 3766 <1> 3767 <1> 3768 <1> ; INP: al = 2 * register number 3769 <1> ; [preflags] & PRESEG set if segment overridden 3770 <1> ; else, 3771 <1> ; byte [segmnt] = initialised to 3 (ds) 3772 <1> ; OUT: no action if register number not for esp or ebp 3773 <1> ; no action if segment overridden 3774 <1> ; otherwise, 3775 <1> ; byte [segmnt] -= 1, resulting in 2 (ss) 3776 <1> da_set_default_ss_if_esp_ebp: 3777 00005051 3C08 <1> cmp al, 2 * 4 3778 00005053 7404 <1> je @F 3779 00005055 3C0A <1> cmp al, 2 * 5 3780 00005057 750B <1> jne @FF 3781 <1> @@: 3782 <1> da_set_default_ss: 3783 00005059 F606[BC87]01 <1> test byte [preflags], PRESEG 3784 0000505E 7504 <1> jnz @F ; if segment override --> 3785 00005060 FE0E[CF87] <1> dec byte [segmnt] ; default is now SS 3786 <1> @@: 3787 00005064 C3 <1> retn 3788 <1> 3789 <1> 3790 <1> dop09: 3791 00005065 B84258 <1> mov ax,'BX' ;BX 3792 00005068 8B0E[680C] <1> mov cx,[reg_ebx] 3793 <1> 3794 <1> dop10: 3795 0000506C 890E[D087] <1> mov [addrr],cx ;print it out, etc. 3796 00005070 E80C08 <1> call dis_stosw_lowercase 3797 00005073 F6C303 <1> test bl,2+1 3798 00005076 741C <1> jz dop13 ;if done 3799 00005078 B02B <1> mov al,'+' 3800 0000507A AA <1> stosb 3801 <1> dop11: 3802 0000507B B85349 <1> mov ax,'SI' 3803 0000507E 8B0E[7C0C] <1> mov cx,[reg_esi] 3804 00005082 F6C301 <1> test bl,1 3805 00005085 7406 <1> jz dop12 ;if SI 3806 00005087 B044 <1> mov al,'D' ;DI 3807 00005089 8B0E[800C] <1> mov cx,[reg_edi] 3808 <1> 3809 <1> dop12: 3810 0000508D 010E[D087] <1> add [addrr], cx ; print it out, etc. 3811 00005091 E8EB07 <1> call dis_stosw_lowercase 3812 <1> dop13: 3813 00005094 F606[9C81]C0 <1> test byte [regmem], 0C0h 3814 00005099 742E <1> jz s dop17 ; if no displacement --> 3815 0000509B F606[9C81]80 <1> test byte [regmem], 80h 3816 000050A0 751A <1> jnz dop15 ; if word displacement --> 3817 000050A2 E8AF08 <1> call disgetbyte 3818 000050A5 98 <1> cbw 3819 000050A6 0106[D087] <1> add [addrr], ax 3820 000050AA 3C00 <1> cmp al, 0 3821 000050AC B42B <1> mov ah, '+' 3822 000050AE 7D04 <1> jge dop14 ; if not negative --> 3823 000050B0 B42D <1> mov ah, '-' 3824 000050B2 F6D8 <1> neg al 3825 <1> dop14: 3826 000050B4 8825 <1> mov [di], ah 3827 000050B6 47 <1> inc di 3828 000050B7 E85369 <1> call hexbyte ; print the byte displacement 3829 000050BA EB0D <1> jmp s dop17 ; done --> 3830 <1> 3831 <1> dop15: 3832 000050BC B02B <1> mov al, '+' 3833 000050BE AA <1> stosb 3834 <1> dop16: 3835 000050BF E8AE08 <1> call disgetword 3836 000050C2 0106[D087] <1> add [addrr], ax 3837 000050C6 E83D69 <1> call hexword ; print word displacement 3838 <1> 3839 <1> dop17: 3840 000050C9 B05D <1> mov al, ']' 3841 000050CB AA <1> stosb 3842 000050CC C3 <1> retn 3843 <1> 3844 <1> ; 32-bit MOD REG R/M addressing. 3845 <1> 3846 <1> dop18: 3847 000050CD 810E[D687]0408 <1> or word [disflags], DIS_I_SHOW | DIS_I_SHOW_A32 3848 000050D3 8326[D087]00 <1> and word [addrr], 0 3849 000050D8 8326[D287]00 <1> and word [addrr + 2], 0 ; zero out the address initially 3850 000050DD 3C05 <1> cmp al, 5 ; mod=0 and r/m=5 ? 3851 000050DF 7503E98200 <1> je dop19 ; yes, just a disp32 address --> 3852 000050E4 50 <1> push ax 3853 000050E5 2407 <1> and al, 7 3854 000050E7 3C04 <1> cmp al, 4 3855 000050E9 7506 <1> jne dop20 ; if no SIB --> 3856 000050EB E86608 <1> call disgetbyte ; get and save it 3857 000050EE A2[9D81] <1> mov [sibbyte], al 3858 <1> dop20: 3859 000050F1 58 <1> pop ax 3860 000050F2 A880 <1> test al, 80h 3861 000050F4 7538 <1> jnz dop22 ; if disp32 --> 3862 000050F6 A840 <1> test al, 40h 3863 000050F8 743A <1> jz dop23 ; if no disp8 --> 3864 000050FA E85708 <1> call disgetbyte 3865 <1> 3866 000050FD 98 <1> cbw 3867 000050FE 99 <1> cwd 3868 000050FF 0106[D087] <1> add word [addrr], ax 3869 00005103 1116[D287] <1> adc word [addrr + 2], dx 3870 <1> 3871 00005107 3C00 <1> cmp al, 0 3872 00005109 7D06 <1> jge dop21 ; if not negative --> 3873 0000510B F6D8 <1> neg al 3874 0000510D C6052D <1> mov byte [di], '-' 3875 00005110 47 <1> inc di 3876 <1> dop21: 3877 00005111 E8F968 <1> call hexbyte 3878 00005114 EB1B <1> jmp s dop22a ; done --> 3879 <1> 3880 <1> disp32_add_to_addrr: 3881 00005116 E85708 <1> call disgetword 3882 00005119 0106[D087] <1> add word [addrr], ax 3883 0000511D 50 <1> push ax 3884 0000511E 9C <1> pushf 3885 0000511F E84E08 <1> call disgetword 3886 00005122 9D <1> popf 3887 00005123 1106[D287] <1> adc word [addrr + 2], ax 3888 00005127 E8DC68 <1> call hexword 3889 0000512A 58 <1> pop ax 3890 0000512B E9D868 <1> jmp hexword 3891 <1> 3892 <1> dop22: 3893 0000512E E8E5FF <1> call disp32_add_to_addrr 3894 <1> ; print disp32 3895 <1> 3896 <1> dop22a: 3897 00005131 E8C900 <1> call store_plus 3898 <1> 3899 <1> dop23: 3900 00005134 A0[9C81] <1> mov al,[regmem] 3901 00005137 2407 <1> and al,7 3902 00005139 3C04 <1> cmp al,4 3903 0000513B 7403E99800 <1> jne dop28 ;if no SIB 3904 00005140 A0[9D81] <1> mov al, [sibbyte] 3905 00005143 88C4 <1> mov ah, al 3906 00005145 250738 <1> and ax, 00_111_000_00_000_111b 3907 <1> ; ah = index << 3, al = base 3908 00005148 80FC20 <1> cmp ah, 4 << 3 ; index encodes esp ? 3909 0000514B 7414 <1> je dop_sib_index_4 ; yes, use base only --> 3910 <1> ; When this branch is taken, the scale is ignored. 3911 <1> ; This is typically used only for encoding [esp] 3912 <1> ; and [esp + x] but is a valid encoding even for 3913 <1> ; other base registers. So better support it. 3914 <1> ; (This used to be a special case for SIB == 24h 3915 <1> ; only because it doesn't usually occur else. 3916 <1> ; The other cases were rejected in dop25.) 3917 <1> 3918 0000514D E80700 <1> call dop_is_mod_0_and_base_5 3919 00005150 7539 <1> jnz dop24 ; if not mod=0 base=5 --> 3920 00005152 E8C1FF <1> call disp32_add_to_addrr; show 32-bit displacement instead of [EBP] 3921 00005155 EB45 <1> jmp dop25 ; and handle the scale and index --> 3922 <1> 3923 <1> 3924 <1> ; INP: al = low 3 bits of SIB byte (= base) 3925 <1> ; byte [regmem] = ModR/M byte 3926 <1> ; OUT: NZ if not mod=0 base=5 special case 3927 <1> ; ZR else 3928 <1> ; REM: base=5 usually encodes [ebp], and mod=0 3929 <1> ; usually encodes no displacement field. 3930 <1> ; If both are true however, then the 3931 <1> ; special case is true: there is no base 3932 <1> ; register and a 32-bit displacement. 3933 <1> dop_is_mod_0_and_base_5: 3934 00005157 3C05 <1> cmp al, 5 3935 00005159 7505 <1> jne @F ; NZ if not base=5 --> 3936 0000515B F606[9C81]C0 <1> test byte [regmem], 1100_0000b 3937 <1> ; NZ if not mod=0 3938 <1> @@: 3939 00005160 C3 <1> retn 3940 <1> 3941 <1> 3942 <1> dop_sib_index_4: 3943 <1> ; The mod=0 base=5 special case and the 3944 <1> ; index=4 special case can occur both 3945 <1> ; together. That is a SIB encoding of 3946 <1> ; a 32-bit displacement without any 3947 <1> ; index or base registers. 3948 <1> ; 3949 <1> ; This was noted on stackoverflow.com by 3950 <1> ; Peter Cordes: "x86-32 has 2 redundant 3951 <1> ; ways to encode [0x123456], i.e. no-base 3952 <1> ; + disp32: with or without a SIB byte, 3953 <1> ; because SIB has an encoding for no-base 3954 <1> ; and no-index." (There is a use for this 3955 <1> ; distinction and thus the SIB form only 3956 <1> ; in 64-bit mode but it is accepted as a 3957 <1> ; valid alternative encoding even for us.) 3958 <1> ; 3959 <1> ; - https://stackoverflow.com/questions/48124293/can-rip-be-used-with-another-register-with-rip-relative-addressing/48125453#48125453 3960 00005161 E8F3FF <1> call dop_is_mod_0_and_base_5 3961 00005164 7572 <1> jnz dop28 ; if not mod=0 base=5 --> 3962 <1> ; fall through to dop19 3963 <1> 3964 <1> dop19: 3965 00005166 E88900 <1> call store_opensqubracket 3966 00005169 E8AAFF <1> call disp32_add_to_addrr 3967 <1> ; display 32-bit offset 3968 <1> dop17_j1: 3969 0000516C E95AFF <1> jmp dop17 3970 <1> 3971 <1> add_reg32_to_addrr: 3972 0000516F B90100 <1> mov cx, 1 3973 <1> add_reg32_times_cx_to_addrr: 3974 00005172 50 <1> push ax 3975 00005173 53 <1> push bx 3976 00005174 93 <1> xchg ax, bx 3977 00005175 8B9F[2888] <1> mov bx, word [reg32addr + bx] 3978 <1> @@: 3979 00005179 8B07 <1> mov ax, word [bx] 3980 0000517B 0106[D087] <1> add word [addrr], ax 3981 0000517F 8B4702 <1> mov ax, word [bx + 2] 3982 00005182 1106[D287] <1> adc word [addrr + 2], ax 3983 00005186 E2F1 <1> loop @B 3984 00005188 5B <1> pop bx 3985 00005189 58 <1> pop ax 3986 0000518A C3 <1> retn 3987 <1> 3988 <1> dop24: 3989 0000518B E85800 <1> call store_opensqubracket_e 3990 0000518E E84A07 <1> call showreg16 ; show 16-bit register name (number in AL) 3991 00005191 E8BDFE <1> call da_set_default_ss_if_esp_ebp 3992 00005194 E8D8FF <1> call add_reg32_to_addrr 3993 00005197 B05D <1> mov al, ']' 3994 00005199 E85800 <1> call stosb_notnasm 3995 <1> dop25: 3996 0000519C E85E00 <1> call store_plus 3997 <1> 3998 0000519F A0[9D81] <1> mov al, [sibbyte] 3999 000051A2 E83406 <1> call da_get_bits_3_to_5 ; al = index 4000 <1> ; (In dop23 we already checked this is not = 4 4001 <1> ; which is a special escaping encoding.) 4002 <1> 4003 000051A5 E83E00 <1> call store_opensqubracket_e 4004 <1> 4005 000051A8 8A26[9D81] <1> mov ah, [sibbyte] 4006 000051AC B90100 <1> mov cx, 1 4007 000051AF F6C4C0 <1> test ah, 0C0h 4008 000051B2 740F <1> jz @F 4009 000051B4 41 <1> inc cx 4010 000051B5 F6C480 <1> test ah, 80h 4011 000051B8 7409 <1> jz @F 4012 000051BA B104 <1> mov cl, 4 4013 000051BC F6C440 <1> test ah, 40h 4014 000051BF 7402 <1> jz @F 4015 000051C1 B108 <1> mov cl, 8 4016 <1> @@: 4017 <1> 4018 000051C3 E81507 <1> call showreg16 4019 000051C6 51 <1> push cx 4020 000051C7 E8A8FF <1> call add_reg32_times_cx_to_addrr 4021 000051CA 59 <1> pop cx 4022 000051CB 49 <1> dec cx ; = 0-based scale 4023 000051CC 7408 <1> jz dop27 ; if scale == 1 (S=00b) --> 4024 000051CE B02A <1> mov al, '*' 4025 000051D0 AA <1> stosb 4026 000051D1 88C8 <1> mov al, cl 4027 000051D3 0431 <1> add al, '1' ; from 0-based to '1'-based 4028 <1> dop26: 4029 000051D5 AA <1> stosb 4030 <1> dop27: 4031 <1> dop17_j2: 4032 000051D6 EB94 <1> jmp s dop17_j1 4033 <1> 4034 <1> ; 32-bit addressing without SIB 4035 <1> 4036 <1> dop28: 4037 000051D8 E80B00 <1> call store_opensqubracket_e 4038 000051DB E8FD06 <1> call showreg16 4039 000051DE E870FE <1> call da_set_default_ss_if_esp_ebp 4040 000051E1 E88BFF <1> call add_reg32_to_addrr 4041 000051E4 EBF0 <1> jmp short dop27 4042 <1> 4043 <1> ; Store '[' if not NASM syntax, 4044 <1> ; then (regardless of syntax) store 'E' 4045 <1> ; INP: di-> buffer 4046 <1> ; OUT: di-> behind "[E" or 'E' 4047 <1> ; CHG: - 4048 <1> ; 4049 <1> ; The 'E' is lowercased if that option is selected. 4050 <1> store_opensqubracket_e: 4051 000051E6 50 <1> push ax 4052 000051E7 E80800 <1> call store_opensqubracket 4053 000051EA B045 <1> mov al, 'E' 4054 000051EC E80E06 <1> call dis_lowercase 4055 000051EF AA <1> stosb 4056 000051F0 58 <1> pop ax 4057 000051F1 C3 <1> retn 4058 <1> 4059 <1> ; Store '[' if not NASM syntax 4060 <1> ; INP: di-> buffer 4061 <1> ; OUT: di-> behind '[' if not NASM syntax 4062 <1> ; CHG: al 4063 <1> store_opensqubracket: 4064 000051F2 B05B <1> mov al, '[' 4065 <1> 4066 <1> ; Store al if not NASM syntax 4067 <1> ; INP: di-> buffer 4068 <1> ; OUT: di-> behind stored byte if not NASM syntax 4069 <1> ; CHG: - 4070 <1> stosb_notnasm: 4071 000051F4 F606[AC00]04 <1> testopt [asm_options], disasm_nasm 4072 000051F9 7501 <1> jnz .ret 4073 000051FB AA <1> stosb 4074 000051FC C3 <1> .ret: retn 4075 <1> 4076 <1> ; Store '+' if NASM syntax 4077 <1> ; INP: di-> buffer 4078 <1> ; OUT: di-> behind '+' if NASM syntax 4079 <1> ; CHG: al 4080 <1> store_plus: 4081 000051FD B02B <1> mov al, '+' 4082 <1> 4083 <1> ; Store al if NASM syntax 4084 <1> ; INP: di-> buffer 4085 <1> ; OUT: di-> behind stored byte if NASM syntax 4086 <1> ; CHG: - 4087 <1> stosb_nasm: 4088 000051FF F606[AC00]04 <1> testopt [asm_options], disasm_nasm 4089 00005204 7401 <1> jz .ret 4090 00005206 AA <1> stosb 4091 00005207 C3 <1> .ret: retn 4092 <1> 4093 <1> 4094 <1> ; Memory-only reference (OP_M) 4095 <1> 4096 <1> dop_m: 4097 00005208 E8D505 <1> call getregmem 4098 0000520B 3CC0 <1> cmp al, 0C0h 4099 0000520D 7303E9D0FD <1> jb dop05 ; if it's what we expect --> 4100 <1> 4101 <1> ; it's a register reference 4102 00005212 E95705 <1> disbad1:jmp disbad ; this is not supposed to happen --> 4103 <1> 4104 <1> ; Register reference from MOD R/M part (OP_R_MOD) 4105 <1> 4106 <1> dop_r_mod: 4107 00005215 E8C805 <1> call getregmem 4108 00005218 3CC0 <1> cmp al,0c0h 4109 0000521A 72F6 <1> jb disbad1 ;if it's a memory reference 4110 0000521C EB03 <1> jmp s dop33 4111 <1> 4112 <1> ; Pure register reference (OP_R) 4113 <1> 4114 <1> dop_r: 4115 0000521E E8B505 <1> call getregmem_r 4116 <1> 4117 <1> dop33: ; <--- used by OP_RM, OP_R_MOD and OP_R_ADD 4118 00005221 2407 <1> and al,7 ;entry point for regs from MOD R/M, and others 4119 00005223 8A0E[D887] <1> mov cl,[disflags2] 4120 00005227 080E[D687] <1> or [disflags],cl ;if it was variable size operand, the size 4121 <1> ;should now be marked as known. 4122 0000522B 80FC00 <1> cmp ah,0 4123 0000522E 7C11 <1> jl dop35 ;if byte register 4124 00005230 740D <1> jz dop34 ;if word register 4125 <1> dop33a: 4126 00005232 80FC20 <1> cmp ah, 20h ; qword register (MMX) ? 4127 00005235 7415 <1> je dop35_1 ; --> 4128 00005237 50 <1> push ax 4129 00005238 B045 <1> mov al, 'E' 4130 0000523A E8C005 <1> call dis_lowercase 4131 0000523D AA <1> stosb 4132 0000523E 58 <1> pop ax 4133 <1> ;mov byte [di],'E' ;enter here from OP_ECX 4134 <1> ;inc di 4135 <1> dop34: 4136 0000523F 0408 <1> add al,8 4137 <1> dop35: 4138 00005241 98 <1> cbw 4139 00005242 D1E0 <1> shl ax,1 4140 00005244 93 <1> xchg ax,bx ;mov bx,ax 4141 00005245 8B87[F287] <1> mov ax,[rgnam816+bx];get the register name 4142 00005249 E93306 <1> jmp dis_stosw_lowercase 4143 <1> 4144 <1> dop35_1: 4145 0000524C 50 <1> push ax 4146 0000524D B84D4D <1> mov ax, "MM" 4147 00005250 E82C06 <1> call dis_stosw_lowercase 4148 00005253 58 <1> pop ax 4149 00005254 0430 <1> add al, '0' 4150 00005256 AA <1> stosb 4151 00005257 C3 <1> retn 4152 <1> 4153 <1> ; Register number embedded in the instruction (OP_R_ADD) 4154 <1> 4155 <1> dop_r_add: 4156 00005258 A0[BF87] <1> mov al,[instru] 4157 0000525B EBC4 <1> jmp s dop33 4158 <1> 4159 <1> ; AL or AX or EAX (OP_AX) 4160 <1> 4161 <1> dop_ax: 4162 0000525D B000 <1> mov al,0 4163 0000525F EBC0 <1> jmp s dop33 4164 <1> 4165 <1> ; QWORD mem (OP_M64) 4166 <1> ; This operand type is used by CMPXCHG8B, FILD and FISTP. 4167 <1> dop_m64: 4168 <1> ;mov ax, 'Q' ; print "QWORD" 4169 00005261 B420 <1> mov ah, 20h ; size QWORD 4170 00005263 EB35 <1> jmp s dop40 4171 <1> 4172 <1> ; FLOAT (=REAL4) mem (OP_MFLOAT) 4173 <1> dop_mfloat: 4174 00005265 B8464C <1> mov ax, "FL" 4175 00005268 E81406 <1> call dis_stosw_lowercase 4176 0000526B B84F41 <1> mov ax, "OA" 4177 0000526E E80E06 <1> call dis_stosw_lowercase 4178 00005271 B85420 <1> mov ax, "T " 4179 00005274 EB15 <1> jmp short dop38c 4180 <1> 4181 <1> ; DOUBLE (=REAL8) mem (OP_MDOUBLE). 4182 <1> 4183 <1> dop_mdouble: 4184 00005276 B8444F <1> mov ax, "DO" 4185 00005279 E80306 <1> call dis_stosw_lowercase 4186 0000527C B85542 <1> mov ax, "UB" 4187 0000527F E8FD05 <1> call dis_stosw_lowercase 4188 00005282 B04C <1> mov al, 'L' 4189 00005284 E87605 <1> call dis_lowercase 4190 00005287 AA <1> stosb 4191 00005288 B84520 <1> mov ax, "E " 4192 <1> dop38c: 4193 0000528B E8F105 <1> call dis_stosw_lowercase 4194 0000528E E82A06 <1> call showptr 4195 00005291 EB1B <1> jmp s dop42a 4196 <1> 4197 <1> ; TBYTE (=REAL10) mem (OP_M80). 4198 <1> 4199 <1> dop_m80: 4200 00005293 B854FF <1> mov ax,0FF00h+'T' ;print 'T' + "BYTE" 4201 00005296 E86405 <1> call dis_lowercase 4202 00005299 AA <1> stosb 4203 <1> dop40: 4204 0000529A E84305 <1> call getregmem 4205 0000529D 3CC0 <1> cmp al,0c0h 4206 0000529F 7317 <1> jae disbad5 ; if it's a register reference 4207 000052A1 800E[D687]80 <1> or byte [disflags], DIS_I_DONTSHOW 4208 <1> ; don't show this 4209 000052A6 E939FD <1> jmp dop05 4210 <1> 4211 <1> %if 0 4212 <1> ; Far memory (OP_FARMEM). 4213 <1> ; This is either a FAR16 (DWORD) or FAR32 (FWORD) pointer. 4214 <1> dop_farmem: 4215 <1> call dischk32d 4216 <1> jz dop41a ; if not dword far 4217 <1> call showdword 4218 <1> dop41a: 4219 <1> mov ax, "FA" ; store "FAR " 4220 <1> call dis_stosw_lowercase 4221 <1> mov ax, "R " 4222 <1> call dis_stosw_lowercase 4223 <1> %endif 4224 <1> 4225 <1> ; mem (OP_MXX). 4226 <1> 4227 <1> dop_mxx: 4228 000052A9 800E[D687]80 <1> or byte [disflags], DIS_I_DONTSHOW 4229 <1> ; don't show this 4230 <1> dop42a: 4231 000052AE E82F05 <1> call getregmem 4232 000052B1 3CC0 <1> cmp al,0c0h 4233 000052B3 7303E93BFD <1> jb dop06 ; mem ref, don't show size --> 4234 <1> disbad5: 4235 000052B8 E9B104 <1> jmp disbad 4236 <1> 4237 <1> ; Far immediate (OP_FARP). Either FAR16 or FAR32. 4238 <1> dop_farimm: 4239 000052BB E8B206 <1> call disgetword 4240 000052BE 50 <1> push ax 4241 000052BF E82806 <1> call dischk32d 4242 000052C2 7410 <1> jz dop44_word ; if not 32-bit address 4243 <1> 4244 <1> dop44_dword: 4245 <1> %if _PM 4246 000052C4 F606[DB88]40 <1> test byte [bCSAttr],40h ; for 16-bit code segments 4247 000052C9 7503 <1> jnz @F ; no need to display "WORD " 4248 <1> %endif 4249 000052CB E8D505 <1> call showdword 4250 <1> @@: 4251 <1> 4252 000052CE E89F06 <1> call disgetword 4253 000052D1 50 <1> push ax 4254 000052D2 EB0A <1> jmp dop44_common 4255 <1> 4256 <1> dop44_word: 4257 <1> %if _PM 4258 000052D4 F606[DB88]40 <1> test byte [bCSAttr],40h ; for 32-bit code segments 4259 000052D9 7403 <1> jz @F ; no need to display "DWORD " 4260 000052DB E8CB05 <1> call showword 4261 <1> @@: 4262 <1> %endif 4263 <1> 4264 <1> dop44_common: 4265 000052DE E88F06 <1> call disgetword 4266 <1> %if _MEMREF_AMOUNT 4267 000052E1 E89F01 <1> call get_free_memref 4268 000052E4 8987[7887] <1> mov word [memrefs + bx + mrSegmentSelector], ax 4269 <1> %endif 4270 000052E8 E81B67 <1> call hexword 4271 000052EB B03A <1> mov al,':' 4272 000052ED AA <1> stosb 4273 000052EE E8F905 <1> call dischk32d 4274 000052F1 740D <1> jz dop45 ;if not 32-bit address 4275 000052F3 58 <1> pop ax 4276 <1> %if _MEMREF_AMOUNT 4277 000052F4 8987[7687] <1> mov word [memrefs + bx + mrOffset + 2], ax 4278 000052F8 808F[7A87]10 <1> or byte [memrefs + bx + mrFlags], mrfA32 4279 <1> %endif 4280 000052FD E80667 <1> call hexword 4281 <1> dop45: 4282 00005300 58 <1> pop ax 4283 <1> %if _MEMREF_AMOUNT 4284 00005301 8987[7487] <1> mov word [memrefs + bx + mrOffset], ax 4285 00005305 808F[7A87]01 <1> or byte [memrefs + bx + mrFlags], mrfBranchDirect 4286 0000530A E89101 <1> call calc_linear_memref_and_mark_nonfree 4287 <1> %endif 4288 0000530D E9F666 <1> jmp hexword 4289 <1> 4290 <1> 4291 <1> %if _COND 4292 <1> ; INP: [presizeflags] & PRE32A, d[reg_ecx] 4293 <1> ; OUT: dx:ax = (e)cx 4294 <1> cond_get_ecx: 4295 00005310 A1[6C0C] <1> mov ax, word [reg_ecx] 4296 00005313 F606[BE87]20 <1> test byte [presizeflags], PRE32A ; A32 ? 4297 00005318 8B16[6E0C] <1> mov dx, word [reg_ecx+2] 4298 0000531C 7502 <1> jnz .ecx 4299 0000531E 31D2 <1> xor dx, dx 4300 <1> .ecx: 4301 00005320 C3 <1> retn 4302 <1> 4303 <1> ; INP: ax = 0..15 condition code, else invalid 4304 <1> ; OUT: w[condmsg] set as appropriate 4305 <1> cond_handle: 4306 00005321 83F80F <1> cmp ax, 15 4307 00005324 7738 <1> ja .return 4308 00005326 8B0E[A00C] <1> mov cx, word [reg_efl] ; get flags 4309 0000532A 89C3 <1> mov bx, ax 4310 0000532C 80E3FE <1> and bl, ~1 ; make even 4311 0000532F 2401 <1> and al, 1 ; 1 if negated condition 4312 00005331 80FB0C <1> cmp bl, 12 ; L/GE or LE/G? 4313 00005334 7306 <1> jae .specific ; yes --> 4314 <1> 4315 00005336 858F[6088] <1> test cx, [cond_table+bx]; flag(s) set ? 4316 0000533A EB14 <1> jmp short .jump_ZF ; NZ if (normal) condition true --> 4317 <1> 4318 <1> .specific: 4319 0000533C 80FB0E <1> cmp bl, 14 4320 0000533F 7205 <1> jb .L_GE 4321 <1> 4322 <1> ; Handle LE/NG and G/NLE conditions. 4323 <1> ; The former says ZF | (OF ^ SF). 4324 <1> .LE_G: 4325 00005341 F6C140 <1> test cl, 40h ; ZF | .. 4326 00005344 750C <1> jnz .jump_true 4327 <1> 4328 <1> ; Handle L/NGE and GE/NL conditions. 4329 <1> ; The former says OF ^ SF. 4330 <1> .L_GE: 4331 00005346 81E18008 <1> and cx, 880h ; OF ^ SF 4332 0000534A 7408 <1> jz .jump_false ; both clear --> 4333 0000534C 81F18008 <1> xor cx, 880h 4334 <1> .jump_ZF: 4335 00005350 7402 <1> jz .jump_false ; both set --> (or ZR: (normal) condition false) 4336 <1> .jump_true: 4337 00005352 3401 <1> xor al, 1 ; (negating ^ raw truth) = cooked truth 4338 <1> .jump_false: 4339 00005354 84C0 <1> test al, al ; true ? 4340 00005356 7507 <1> jnz .msg_jumping ; yes --> 4341 <1> 4342 <1> .msg_notjumping: 4343 00005358 C706[DC87][4C80] <1> mov word [condmsg], msg.condnotjump 4344 <1> .return: 4345 0000535E C3 <1> retn 4346 <1> 4347 <1> .msg_jumping: 4348 0000535F C706[DC87][5080] <1> mov word [condmsg], msg.condjump 4349 00005365 C3 <1> retn 4350 <1> %endif 4351 <1> 4352 <1> 4353 <1> ; 8-bit relative jump (OP_REL8) 4354 <1> 4355 <1> dop_rel8: 4356 <1> %if _COND 4357 00005366 A1[C287] <1> mov ax, word [index] 4358 00005369 3DE300 <1> cmp ax, 0E3h 4359 0000536C 772C <1> ja .cond_done ; no conditional jump --> 4360 0000536E 7211 <1> jb .cond_noncx ; not jcxz, check for other --> 4361 <1> 4362 00005370 E89DFF <1> call cond_get_ecx 4363 00005373 09D0 <1> or ax, dx 4364 00005375 7405 <1> jz .cond_msg_jumping 4365 <1> .cond_msg_notjumping: 4366 00005377 E8DEFF <1> call cond_handle.msg_notjumping 4367 0000537A EB1E <1> jmp short .cond_done 4368 <1> 4369 <1> .cond_msg_jumping: 4370 0000537C E8E0FF <1> call cond_handle.msg_jumping 4371 0000537F EB19 <1> jmp short .cond_done 4372 <1> 4373 <1> .cond_noncx: 4374 00005381 3CE0 <1> cmp al, 0E0h 4375 00005383 7210 <1> jb .cond_nonloop ; not loop, check for other --> 4376 <1> 4377 00005385 50 <1> push ax 4378 00005386 E887FF <1> call cond_get_ecx 4379 00005389 48 <1> dec ax ; = 0 if cx is 1 4380 0000538A 09D0 <1> or ax, dx ; = 0 if cx is 1 and ecx is cx 4381 0000538C 58 <1> pop ax 4382 0000538D 74E8 <1> jz .cond_msg_notjumping ; if (e)cx is 1 --> 4383 0000538F 3CE2 <1> cmp al, 0E2h 4384 00005391 74E9 <1> je .cond_msg_jumping ; loop without additional condition --> 4385 00005393 3495 <1> xor al, 0E0h^75h ; E0h (loopnz) to 75h (jnz), 4386 <1> ; E1h (loopz) to 74h (jz) 4387 <1> 4388 <1> .cond_nonloop: 4389 00005395 2C70 <1> sub al, 70h ; (ah = 0) 4390 00005397 E887FF <1> call cond_handle ; call common code (checks for ax < 16) 4391 <1> .cond_done: 4392 <1> %endif 4393 0000539A E8B705 <1> call disgetbyte 4394 0000539D 98 <1> cbw 4395 0000539E A2[C087] <1> mov byte [disp8], al 4396 000053A1 E99E00 <1> jmp dop48 4397 <1> 4398 <1> ; 16/32-bit relative jump (OP_REL1632) 4399 <1> 4400 <1> dop_rel1632: 4401 <1> %if _COND 4402 000053A4 A1[C287] <1> mov ax, word [index] 4403 000053A7 2D6002 <1> sub ax, SPARSE_BASE+80h 4404 000053AA E874FF <1> call cond_handle 4405 <1> %endif 4406 000053AD E8C005 <1> call disgetword 4407 000053B0 E83705 <1> call dischk32d 4408 000053B3 7465 <1> jz dop48_near ; if not 32-bit offset 4409 000053B5 92 <1> xchg ax, dx ; mov dx, ax 4410 000053B6 E8B705 <1> call disgetword 4411 <1> 4412 000053B9 813E[C287]E800 <1> cmp word [index], 00E8h 4413 000053BF 7429 <1> je .not_show_keyword ; no need to distinguish NEAR call --> 4414 <1> ; ax:dx between FFFFh:FF80h (-128) .. 0000h:007Fh (127): 4415 <1> ; == show "NEAR" keyword 4416 <1> ; 4417 <1> ; Note: This is not entirely correct. If a jump short is 4418 <1> ; used, the actual opcode is shorter, thus the 4419 <1> ; exact distance that can be reached by the jump short 4420 <1> ; differs from what the jump near can reach with 4421 <1> ; a rel16/32 displacement between -128..127. 4422 000053C1 83F8FF <1> cmp ax, -1 4423 000053C4 7410 <1> je .checkminus 4424 000053C6 85C0 <1> test ax, ax 4425 000053C8 7520 <1> jnz .not_show_keyword 4426 <1> .checkplus: 4427 000053CA 83FA7F <1> cmp dx, byte 127 4428 000053CD 7F1B <1> jg .not_show_keyword 4429 000053CF 83FA00 <1> cmp dx, 0 4430 000053D2 7C16 <1> jl .not_show_keyword 4431 000053D4 EB0A <1> jmp .show_keyword 4432 <1> 4433 <1> .checkminus: 4434 000053D6 83FA80 <1> cmp dx, byte -128 4435 000053D9 7C0F <1> jl .not_show_keyword 4436 000053DB 83FA00 <1> cmp dx, 0 4437 000053DE 7D0A <1> jge .not_show_keyword 4438 <1> 4439 <1> .show_keyword: 4440 000053E0 F606[AC00]20 <1> testopt [asm_options], disasm_show_near 4441 000053E5 7503 <1> jnz .not_show_keyword 4442 000053E7 E87003 <1> call dop_show_near 4443 <1> .not_show_keyword: 4444 <1> 4445 <1> %if _PM 4446 000053EA F606[DB88]40 <1> test byte [bCSAttr],40h ; for 32-bit code segments 4447 000053EF 7505 <1> jnz @F ; no need to display "DWORD " 4448 <1> %endif 4449 000053F1 50 <1> push ax 4450 000053F2 E8AE04 <1> call showdword 4451 000053F5 58 <1> pop ax 4452 <1> @@: 4453 <1> 4454 000053F6 8B1E[1E0B] <1> mov bx,[u_addr+0] 4455 000053FA 031E[B887] <1> add bx,[dis_n] 4456 000053FE 1306[BA87] <1> adc ax,[dis_n + 2] 4457 00005402 01DA <1> add dx,bx 4458 <1> %if _PM 4459 00005404 1306[200B] <1> adc ax,[u_addr+2] 4460 <1> %else 4461 <1> adc ax, 0 4462 <1> %endif 4463 <1> %if _MEMREF_AMOUNT 4464 00005408 E87800 <1> call get_free_memref 4465 0000540B 8987[7687] <1> mov word [memrefs + bx + mrOffset + 2], ax 4466 0000540F 808F[7A87]10 <1> or byte [memrefs + bx + mrFlags], mrfA32 4467 <1> %endif 4468 00005414 E8EF65 <1> call hexword 4469 00005417 92 <1> xchg ax,dx 4470 00005418 EB4F <1> jmp s dop_branch_word 4471 <1> 4472 <1> 4473 <1> dop48_near: 4474 0000541A 813E[C287]E800 <1> cmp word [index], 00E8h 4475 00005420 7414 <1> je @F ; no need to distinguish NEAR call --> 4476 <1> ; ax between FF80h (-128) .. 007Fh (127): 4477 <1> ; == show "NEAR" keyword 4478 <1> ; 4479 <1> ; Note: This is not entirely correct. If a jump short is 4480 <1> ; used, the actual opcode is shorter, thus the 4481 <1> ; exact distance that can be reached by the jump short 4482 <1> ; differs from what the jump near can reach with 4483 <1> ; a rel16/32 displacement between -128..127. 4484 00005422 83F880 <1> cmp ax, byte -128 4485 00005425 7C0F <1> jl @F 4486 00005427 83F87F <1> cmp ax, byte 127 4487 0000542A 7F0A <1> jg @F 4488 0000542C F606[AC00]20 <1> testopt [asm_options], disasm_show_near 4489 00005431 7503 <1> jnz @F 4490 00005433 E82403 <1> call dop_show_near 4491 <1> @@: 4492 <1> 4493 <1> %if _PM 4494 00005436 F606[DB88]40 <1> test byte [bCSAttr],40h ; for 16-bit code segments 4495 0000543B 7405 <1> jz @F ; no need to display "WORD " 4496 0000543D 50 <1> push ax 4497 0000543E E86804 <1> call showword 4498 00005441 58 <1> pop ax 4499 <1> @@: 4500 <1> %endif 4501 <1> 4502 <1> dop48: 4503 00005442 99 <1> cwd 4504 00005443 0306[1E0B] <1> add ax, word [u_addr] 4505 <1> %if _PM 4506 00005447 1316[200B] <1> adc dx, word [u_addr + 2] 4507 <1> %else 4508 <1> adc dx, 0 4509 <1> %endif 4510 0000544B 0306[B887] <1> add ax, word [dis_n] 4511 0000544F 1316[BA87] <1> adc dx, word [dis_n + 2] 4512 00005453 E89404 <1> call dischk32d ; 32-bit opsize ? 4513 00005456 7411 <1> jz .16 ; no --> 4514 00005458 92 <1> xchg ax, dx 4515 00005459 E8AA65 <1> call hexword ; yes, display high word 4516 0000545C 92 <1> xchg ax, dx 4517 <1> %if _MEMREF_AMOUNT 4518 0000545D E82300 <1> call get_free_memref 4519 00005460 8997[7687] <1> mov word [memrefs + bx + mrOffset + 2], dx 4520 00005464 808F[7A87]10 <1> or byte [memrefs + bx + mrFlags], mrfA32 4521 <1> %endif 4522 <1> .16: 4523 <1> 4524 <1> dop_branch_word: 4525 <1> %if _MEMREF_AMOUNT 4526 00005469 E81700 <1> call get_free_memref 4527 0000546C 8987[7487] <1> mov word [memrefs + bx + mrOffset], ax 4528 00005470 FF36[220B] <1> push word [u_addr + saSegSel] 4529 00005474 8F87[7887] <1> pop word [memrefs + bx + mrSegmentSelector] 4530 00005478 808F[7A87]01 <1> or byte [memrefs + bx + mrFlags], mrfBranchDirect 4531 0000547D E81E00 <1> call calc_linear_memref_and_mark_nonfree 4532 <1> %endif 4533 00005480 E98365 <1> jmp hexword ; call hexword and return 4534 <1> 4535 <1> 4536 <1> %if _MEMREF_AMOUNT 4537 <1> ; INP: word [memrefs.free] 4538 <1> ; OUT: bx = byte index into memref array 4539 <1> ; CHG: - 4540 <1> ; STT: ss = ds = es 4541 <1> get_free_memref: 4542 00005483 8B1E[B087] <1> mov bx, [memrefs.free] 4543 <1> get_memref_index_bx: 4544 00005487 83FB04 <1> cmp bx, _MEMREF_AMOUNT 4545 0000548A 7309 <1> jae @F 4546 0000548C 01DB <1> add bx, bx 4547 0000548E 01DB <1> add bx, bx 4548 00005490 01DB <1> add bx, bx 4549 00005492 01DB <1> add bx, bx 4550 <1> %if MEMREF_size != 16 4551 <1> %error Adjust multiplication 4552 <1> %endif 4553 00005494 C3 <1> retn 4554 <1> 4555 <1> @@: 4556 00005495 BA[A671] <1> mov dx, msg.memrefs_invalid_internal 4557 00005498 E82169 <1> call putsz 4558 0000549B E962AB <1> jmp cmd3 4559 <1> 4560 <1> 4561 <1> ; INP: word [memrefs.free] 4562 <1> ; [memrefs] array entry 4563 <1> ; OUT: NC if valid segmented address (getlinear succeeded), 4564 <1> ; dword [memrefs + x + mrLinear] filled 4565 <1> ; word [memrefs.free] incremented 4566 <1> ; CY if invalid address, 4567 <1> ; [memrefs + x] re-initialised 4568 <1> ; word [memrefs.free] left unmodified 4569 <1> ; CHG: - 4570 <1> ; STT: ss = ds = es 4571 <1> calc_linear_memref_and_mark_nonfree: 4572 0000549E 50 <1> push ax 4573 0000549F 53 <1> push bx 4574 000054A0 66 <1> _386_PM_o32 4575 000054A1 52 <1> push dx 4576 000054A2 E8DEFF <1> call get_free_memref 4577 000054A5 53 <1> push bx 4578 000054A6 66 <1> _386_PM_o32 4579 000054A7 8B97[7487] <1> mov dx, word [memrefs + bx + mrOffset] 4580 000054AB 8B9F[7887] <1> mov bx, word [memrefs + bx + mrSegmentSelector] 4581 000054AF E8ACE2 <1> call getlinear 4582 000054B2 5B <1> pop bx 4583 000054B3 7211 <1> jc .error 4584 <1> 4585 000054B5 8987[7087] <1> mov word [memrefs + bx + mrLinear], ax 4586 000054B9 8997[7287] <1> mov word [memrefs + bx + mrLinear + 2], dx 4587 000054BD FF06[B087] <1> inc word [memrefs.free] 4588 <1> 4589 <1> ; clc 4590 <1> .return: 4591 000054C1 66 <1> _386_PM_o32 4592 000054C2 5A <1> pop dx 4593 000054C3 5B <1> pop bx 4594 000054C4 58 <1> pop ax 4595 000054C5 C3 <1> retn 4596 <1> 4597 <1> .error: 4598 000054C6 57 <1> push di 4599 000054C7 8DBF[7087] <1> lea di, [memrefs + bx] 4600 000054CB E80400 <1> call init_one_memref 4601 000054CE 5F <1> pop di 4602 000054CF F9 <1> stc 4603 000054D0 EBEF <1> jmp .return 4604 <1> 4605 <1> 4606 <1> ; INP: di -> memref to initialise 4607 <1> ; OUT: ax = 0 4608 <1> ; di -> past initialised memref 4609 <1> ; CHG: - 4610 <1> ; STT: ss = ds = es 4611 <1> init_one_memref: 4612 000054D2 31C0 <1> xor ax, ax 4613 <1> 4614 <1> ; INP: di -> memref to initialise 4615 <1> ; ax = 0 4616 <1> ; OUT: di -> past initialised memref 4617 <1> ; CHG: - 4618 <1> ; STT: ss = ds = es 4619 <1> .ax_already_zero: 4620 000054D4 AB <1> stosw ; zero-initialise all memrefs 4621 000054D5 AB <1> stosw ; mrLinear 4622 000054D6 AB <1> stosw 4623 000054D7 AB <1> stosw ; mrOffset 4624 000054D8 AB <1> stosw ; mrSegmentSelector 4625 000054D9 AB <1> stosw ; mrFlags 4626 000054DA 40 <1> inc ax 4627 000054DB AB <1> stosw 4628 000054DC 48 <1> dec ax 4629 000054DD AB <1> stosw ; mrLength = 1 4630 000054DE C3 <1> retn 4631 <1> 4632 <1> 4633 <1> ; INP: si = address of segreg (reg_cs, reg_ds, etc) 4634 <1> ; di = address of index reg (reg_esi or reg_edi) 4635 <1> ; [memrefs] 4636 <1> ; [presizeflags] 4637 <1> ; byte [index] = which opcode 4638 <1> ; [reg_ecx] 4639 <1> ; [reg_efl] & 400h = Direction Flag 4640 <1> ; OUT: memrefs + bx -> current memref (partially filled) 4641 <1> ; CHG: bx, si, di, cx, dx 4642 <1> init_string_memref: 4643 000054DF E8A1FF <1> call get_free_memref 4644 000054E2 FF34 <1> push word [si] ; get segment/selector 4645 000054E4 8F87[7887] <1> pop word [memrefs + bx + mrSegmentSelector] 4646 <1> ; store segment/selector 4647 000054E8 FF35 <1> push word [di] 4648 000054EA 8F87[7487] <1> pop word [memrefs + bx + mrOffset] 4649 <1> ; store low word of offset 4650 000054EE 8B0E[B687] <1> mov cx, word [string_memref_counter + 2] 4651 000054F2 8B16[B487] <1> mov dx, word [string_memref_counter] 4652 <1> 4653 000054F6 F606[BE87]20 <1> test byte [presizeflags], PRE32A 4654 000054FB 740C <1> jz @F ; if 16-bit addressing --> 4655 000054FD FF7502 <1> push word [di + 2] 4656 00005500 8F87[7687] <1> pop word [memrefs + bx + mrOffset + 2] 4657 <1> ; store high word of offset 4658 00005504 808F[7A87]10 <1> or byte [memrefs + bx + mrFlags], mrfA32 4659 <1> ; remember that it is a32 4660 <1> @@: 4661 <1> 4662 00005509 F606[BC87]02 <1> test byte [preflags], PREREP 4663 0000550E 7505 <1> jnz @F ; if to take (e)cx repetitions --> 4664 00005510 BA0100 <1> mov dx, 1 4665 00005513 31C9 <1> xor cx, cx ; cx:dx = 1, just one element 4666 <1> @@: 4667 <1> 4668 00005515 50 <1> push ax 4669 00005516 B80100 <1> mov ax, 1 4670 00005519 F606[C287]01 <1> test byte [index], 1 ; element size is byte ? 4671 0000551E 740A <1> jz @F ; yes, ax = 1 4672 00005520 40 <1> inc ax ; = 2 4673 00005521 F606[BE87]10 <1> test byte [presizeflags], PRE32D 4674 <1> ; element size is word ? 4675 00005526 7402 <1> jz @F ; yes, ax = 2 4676 00005528 01C0 <1> add ax, ax ; = 4 4677 <1> @@: 4678 <1> 4679 0000552A 3C01 <1> cmp al, 1 ; byte size ? 4680 0000552C 7415 <1> je @F ; yes, do not multiply --> 4681 0000552E 01D2 <1> add dx, dx 4682 00005530 11C9 <1> adc cx, cx ; * 2, word to byte 4683 00005532 720A <1> jc .carry_counter 4684 00005534 3C02 <1> cmp al, 2 ; word size ? 4685 00005536 740B <1> je @F ; yes, done multiplying --> 4686 00005538 01D2 <1> add dx, dx 4687 0000553A 11C9 <1> adc cx, cx ; * 4, dword to byte 4688 0000553C 7305 <1> jnc @F 4689 <1> .carry_counter: 4690 0000553E BAFFFF <1> mov dx, -1 4691 00005541 89D1 <1> mov cx, dx ; in case the counter is large 4692 <1> ; A carry out of an a16 address is not yet handled. 4693 <1> ; Note that eg cx=8000h a16 movsw may be valid to 4694 <1> ; copy exactly 64 KiB. Likewise, technically a 4695 <1> ; size of exactly 4 GiB is valid; however, our 4696 <1> ; memref format cannot store that. 4697 <1> @@: 4698 00005543 8997[7C87] <1> mov word [memrefs + bx + mrLength], dx 4699 00005547 898F[7E87] <1> mov word [memrefs + bx + mrLength + 2], cx 4700 <1> 4701 0000554B F606[A10C]04 <1> testopt [reg_efl], 400h ; DF set ? 4702 00005550 7411 <1> jz @F 4703 <1> 4704 00005552 0187[7487] <1> add word [memrefs + bx + mrOffset], ax 4705 00005556 8397[7687]00 <1> adc word [memrefs + bx + mrOffset + 2], 0 4706 0000555B 2997[7487] <1> sub word [memrefs + bx + mrOffset], dx 4707 0000555F 198F[7687] <1> sbb word [memrefs + bx + mrOffset + 2], cx 4708 <1> 4709 <1> @@: 4710 00005563 58 <1> pop ax 4711 00005564 C3 <1> retn 4712 <1> %endif 4713 <1> 4714 <1> 4715 <1> ; Check for ST(1) (OP_1CHK). 4716 <1> 4717 <1> dop49: 4718 00005565 58 <1> pop ax ;discard return address 4719 00005566 A0[9C81] <1> mov al,[regmem] 4720 00005569 2407 <1> and al,7 4721 0000556B 3C01 <1> cmp al,1 4722 0000556D 7403 <1> je dop50 ;if it's ST(1) 4723 0000556F E96FF3 <1> jmp da14 ;another operand (but no comma) 4724 <1> 4725 <1> dop50: 4726 00005572 E902F4 <1> jmp da_op_end ; end of list --> 4727 <1> 4728 <1> ; ST(I) (OP_STI). 4729 <1> 4730 <1> dop_sti: 4731 00005575 A0[9C81] <1> mov al, byte [regmem] 4732 00005578 2407 <1> and al, 7 4733 0000557A 93 <1> xchg ax, bx ;mov bx,ax 4734 0000557B B85354 <1> mov ax, 'ST' 4735 0000557E E8FE02 <1> call dis_stosw_lowercase; store ST(bl) 4736 00005581 B028 <1> mov al, '(' 4737 00005583 AA <1> stosb 4738 00005584 B83029 <1> mov ax, '0)' 4739 00005587 08D8 <1> or al, bl 4740 00005589 AB <1> stosw 4741 0000558A C3 <1> retn 4742 <1> 4743 <1> ; CRx (OP_CR). 4744 <1> 4745 <1> dop_cr: 4746 0000558B BB4352 <1> mov bx,'CR' 4747 0000558E E84502 <1> call getregmem_r 4748 00005591 3C04 <1> cmp al,4 4749 00005593 7713 <1> ja disbad4 ;if too large 4750 00005595 7505 <1> jne dop52a 4751 00005597 C606[A281]05 <1> mov byte [dismach],5 ;CR4 is new to the 586 4752 <1> dop52a: 4753 0000559C 813E[C287]0202 <1> cmp word [index],SPARSE_BASE+22h 4754 000055A2 7528 <1> jne dop55 ;if not MOV CRx,xx 4755 000055A4 3C01 <1> cmp al,1 4756 000055A6 7524 <1> jne dop55 ;if not CR1 4757 <1> 4758 000055A8 E9C101 <1> disbad4:jmp disbad ;can't MOV CR1,xx 4759 <1> 4760 <1> ; DRx (OP_DR). 4761 <1> 4762 <1> dop_dr: 4763 000055AB E82802 <1> call getregmem_r 4764 000055AE BB4452 <1> mov bx,'DR' 4765 000055B1 B9FFFF <1> mov cx,-1 ;no max or illegal value 4766 000055B4 EB16 <1> jmp s dop55 4767 <1> 4768 <1> ; TRx (OP_TR). 4769 <1> 4770 <1> dop_tr: 4771 000055B6 E81D02 <1> call getregmem_r 4772 000055B9 3C03 <1> cmp al,3 4773 000055BB 7303E9AC01 <1> jb disbad ;if too small 4774 000055C0 3C06 <1> cmp al,6 4775 000055C2 7305 <1> jae dop54a ;if TR6-7 4776 000055C4 C606[A281]04 <1> mov byte [dismach],4 ;TR3-5 are new to the 486 4777 <1> dop54a: 4778 000055C9 BB5452 <1> mov bx,'TR' 4779 <1> 4780 <1> dop55: 4781 000055CC 93 <1> xchg ax, bx 4782 000055CD E8AF02 <1> call dis_stosw_lowercase; store XX 4783 000055D0 93 <1> xchg ax, bx 4784 000055D1 0C30 <1> or al, '0' 4785 000055D3 AA <1> stosb 4786 000055D4 C3 <1> retn 4787 <1> 4788 <1> ; Segment register (OP_SEGREG). 4789 <1> 4790 <1> dop_segreg: 4791 000055D5 E8FE01 <1> call getregmem_r 4792 000055D8 3C06 <1> cmp al,6 4793 000055DA 7203E98D01 <1> jae disbad ; if not a segment register --> 4794 000055DF 3C02 <1> cmp al,2 4795 000055E1 7505 <1> jne @F ; if not SS --> 4796 000055E3 800E[D687]40 <1> or byte [disflags], DIS_I_MOV_SS ; note this 4797 <1> @@: 4798 000055E8 3C04 <1> cmp al,4 4799 000055EA 7205 <1> jb dop57a ;if not FS or GS 4800 000055EC C606[A281]03 <1> mov byte [dismach],3;(no new 486-686 instructions involve seg regs) 4801 <1> dop57a: 4802 000055F1 0410 <1> add al,16 4803 000055F3 E94BFC <1> jmp dop35 ;go print it out 4804 <1> 4805 <1> ; Sign-extended immediate byte (OP_IMMS8). "push xx" 4806 <1> 4807 <1> dop_imms8: 4808 000055F6 E85B03 <1> call disgetbyte 4809 000055F9 3C00 <1> cmp al,0 4810 000055FB 93 <1> xchg ax,bx ;mov bl,al 4811 000055FC B02B <1> mov al,'+' 4812 000055FE 7D04 <1> jge dop58a ;if >= 0 4813 00005600 F6DB <1> neg bl 4814 00005602 B02D <1> mov al,'-' 4815 <1> dop58a: 4816 00005604 AA <1> stosb 4817 00005605 93 <1> xchg ax,bx ;mov al,bl 4818 00005606 EB03 <1> jmp s dop59a ;call hexbyte and return 4819 <1> 4820 <1> 4821 <1> ; Immediate byte (OP_IMM8). 4822 <1> 4823 <1> dop_imm8: 4824 00005608 E84903 <1> call disgetbyte 4825 <1> dop59a: 4826 0000560B E9FF63 <1> jmp hexbyte ;call hexbyte and return 4827 <1> 4828 <1> 4829 <1> dop_imm8_int: 4830 0000560E E84303 <1> call disgetbyte 4831 00005611 3C03 <1> cmp al, 3 4832 00005613 75F6 <1> jne dop59a 4833 00005615 50 <1> push ax 4834 00005616 E87F02 <1> call showsize.byte 4835 00005619 58 <1> pop ax 4836 0000561A EBEF <1> jmp dop59a 4837 <1> 4838 <1> 4839 <1> ; Show MMx reg (OP_MMX; previously was "Show ECX if 32-bit LOOPxx"). 4840 <1> dop_mmx: 4841 0000561C BB4D4D <1> mov bx, "MM" 4842 0000561F E8B401 <1> call getregmem_r 4843 00005622 EBA8 <1> jmp short dop55 4844 <1> 4845 <1> ; MMX register (in ModR/M part) 4846 <1> dop_mmx_mod: 4847 00005624 BB4D4D <1> mov bx, "MM" 4848 00005627 E8B601 <1> call getregmem 4849 0000562A 3CC0 <1> cmp al, 0C0h 4850 0000562C 7303E93B01 <1> jb disbad ; needs to be encoded as register --> 4851 00005631 2407 <1> and al, 7 4852 00005633 EB97 <1> jmp short dop55 4853 <1> 4854 <1> 4855 <1> %if _MEMREF_AMOUNT 4856 <1> dop_stack_push: 4857 00005635 B80200 <1> mov ax, 2 4858 <1> .special: 4859 00005638 F606[BE87]10 <1> test byte [presizeflags], PRE32D 4860 0000563D 7402 <1> jz .iso16 4861 0000563F 01C0 <1> add ax, ax 4862 <1> .iso16: 4863 00005641 E83FFE <1> call get_free_memref ; memrefs + bx -> the memref structure 4864 <1> 4865 00005644 8987[7C87] <1> mov word [memrefs + bx + mrLength], ax 4866 00005648 8B0E[760C] <1> mov cx, word [reg_esp + 2] 4867 0000564C 8B16[740C] <1> mov dx, word [reg_esp] 4868 00005650 29C2 <1> sub dx, ax 4869 00005652 83D900 <1> sbb cx, 0 4870 <1> 4871 00005655 8997[7487] <1> mov word [memrefs + bx + mrOffset], dx 4872 <1> 4873 00005659 B20A <1> mov dl, mrfMemDest | mrfMem 4874 <1> 4875 0000565B EB21 <1> jmp dop_stack_common 4876 <1> 4877 <1> 4878 <1> dop_stack_pop: 4879 0000565D B80200 <1> mov ax, 2 4880 <1> .special: 4881 00005660 8B0E[760C] <1> mov cx, word [reg_esp + 2] 4882 00005664 8B16[740C] <1> mov dx, word [reg_esp] 4883 <1> .leave: 4884 00005668 F606[BE87]10 <1> test byte [presizeflags], PRE32D 4885 0000566D 7402 <1> jz .iso16 4886 0000566F 01C0 <1> add ax, ax 4887 <1> .iso16: 4888 00005671 E80FFE <1> call get_free_memref ; memrefs + bx -> the memref structure 4889 <1> 4890 00005674 8987[7C87] <1> mov word [memrefs + bx + mrLength], ax 4891 <1> 4892 00005678 8997[7487] <1> mov word [memrefs + bx + mrOffset], dx 4893 <1> 4894 0000567C B206 <1> mov dl, mrfMemSource | mrfMem 4895 <1> 4896 <1> dop_stack_common: 4897 0000567E A1[8C0C] <1> mov ax, word [reg_ss] ; get ss selector into ax 4898 00005681 8987[7887] <1> mov word [memrefs + bx + mrSegmentSelector], ax 4899 <1> 4900 00005685 93 <1> _386_PM xchg ax, bx ; selector in bx 4901 00005686 E8AB06 <1> _386_PM call test_d_b_bit ; check whether a 32-bit ss 4902 00005689 93 <1> _386_PM xchg ax, bx 4903 0000568A 7407 <1> _386_PM jz .isstack16 4904 0000568C 80CA10 <1> _386_PM or dl, mrfA32 4905 0000568F 898F[7687] <1> _386_PM mov word [memrefs + bx + mrOffset + 2], cx 4906 <1> .isstack16: 4907 <1> 4908 00005693 0897[7A87] <1> or byte [memrefs + bx + mrFlags], dl 4909 00005697 E804FE <1> call calc_linear_memref_and_mark_nonfree 4910 0000569A EB54 <1> jmp dop_continue_maybe_end 4911 <1> 4912 <1> 4913 <1> dop_stack_special: 4914 0000569C A1[C287] <1> mov ax, [index] 4915 0000569F 3D3301 <1> cmp ax, GROUP7 + 3 ; call far [mem] ? 4916 000056A2 7414 <1> je .callfar 4917 000056A4 84E4 <1> test ah, ah 4918 000056A6 7545 <1> jnz .error 4919 000056A8 57 <1> push di 4920 000056A9 BF[9C88] <1> mov di, .bytes ; list of opcodes 4921 000056AC B90B00 <1> mov cx, .bytes_amount 4922 000056AF F2AE <1> repne scasb 4923 000056B1 8A450A <1> mov al, [di + .bytes_amount - 1] 4924 000056B4 5F <1> pop di 4925 000056B5 7536 <1> jne .error ; if not one of these --> 4926 <1> 4927 000056B7 A9 <1> db __TEST_IMM16 ; (skip mov) 4928 <1> .callfar: 4929 000056B8 B044 <1> mov al, 40h + 4 4930 <1> 4931 <1> .haveinfo: 4932 000056BA 89C3 <1> mov bx, ax 4933 000056BC 83E03F <1> and ax, 3Fh 4934 000056BF 80FB80 <1> cmp bl, 80h 4935 000056C2 739C <1> jae dop_stack_pop.special 4936 000056C4 80FB40 <1> cmp bl, 40h 4937 000056C7 7203E96CFF <1> jae dop_stack_push.special 4938 000056CC 84C0 <1> test al, al 4939 000056CE 740F <1> jz .leave 4940 000056D0 3C01 <1> cmp al, 1 4941 000056D2 7519 <1> jne .error 4942 <1> .into: 4943 000056D4 F606[A10C]08 <1> testopt [reg_efl], 800h 4944 000056D9 7415 <1> jz .none 4945 000056DB B046 <1> mov al, 40h + 6 4946 000056DD EBDB <1> jmp .haveinfo 4947 <1> 4948 <1> .leave: 4949 000056DF B80200 <1> mov ax, 2 ; pop size = 1 word or 1 dword 4950 000056E2 8B0E[7A0C] <1> mov cx, word [reg_ebp + 2] 4951 000056E6 8B16[780C] <1> mov dx, word [reg_ebp] ; pop from address in (e)bp, not (e)sp 4952 000056EA E97BFF <1> jmp dop_stack_pop.leave 4953 <1> 4954 <1> .error: 4955 000056ED E94BF2 <1> jmp da_internal_error 4956 <1> 4957 <1> usesection lDEBUG_DATA_ENTRY 4958 <1> 4959 <1> .bytes: 4960 0000889C CDCE <1> db 0CDh, 0CEh ; int, into 4961 0000889E CCF1 <1> db 0CCh, 0F1h ; int3, int1 4962 000088A0 9A <1> db 9Ah ; call far imm:imm 4963 000088A1 CFCACB <1> db 0CFh, 0CAh, 0CBh ; iret, retf imm, retf 4964 000088A4 60 <1> db 60h ; pusha 4965 000088A5 61 <1> db 61h ; popa 4966 000088A6 C9 <1> db 0C9h ; leave 4967 <1> .bytes_amount: equ $ - .bytes 4968 <1> 4969 <1> ; In this table the bits have the following meaning: 4970 <1> ; 4971 <1> ; flag 80h: special pop 4972 <1> ; flag 40h: special push 4973 <1> ; if neither flag set: unusual, for leave and into 4974 <1> ; else: masked with 3Fh gives amount of bytes to push/pop 4975 <1> ; in o16, which needs to be doubled to get the amount 4976 <1> ; to push/pop in o32 instead. 4977 <1> .info: 4978 000088A7 46 <1> db 40h + 6 ; int 4979 000088A8 01 <1> db 1 ; into 4980 000088A9 46 <1> db 40h + 6 ; int3 4981 000088AA 46 <1> db 40h + 6 ; int1 4982 000088AB 44 <1> db 40h + 4 ; call far imm:imm 4983 000088AC 86 <1> db 80h + 6 ; iret 4984 000088AD 84 <1> db 80h + 4 ; retf imm 4985 000088AE 84 <1> db 80h + 4 ; retf 4986 000088AF 50 <1> db 40h + 16 ; pusha 4987 000088B0 90 <1> db 80h + 16 ; popa 4988 000088B1 00 <1> db 0 ; leave 4989 <1> 4990 <1> usesection lDEBUG_CODE 4991 <1> 4992 <1> .none: 4993 <1> %else 4994 <1> dop_stack_push: 4995 <1> dop_stack_pop: 4996 <1> dop_stack_special: 4997 <1> %endif 4998 <1> dop_continue_maybe_end: 4999 000056F0 58 <1> pop ax ; discard return address 5000 000056F1 E9E5F1 <1> jmp da14_check_end ; next --> 5001 <1> 5002 <1> ; Set flag to always show size (OP_SHOSIZ). 5003 <1> dop_shosiz: 5004 000056F4 800E[D687]10 <1> or byte [disflags],DIS_I_SHOWSIZ 5005 <1> dop60a: 5006 000056F9 58 <1> pop ax ; discard return address 5007 000056FA E9E4F1 <1> jmp da14 ; next... 5008 <1> 5009 <1> dop_far_m: 5010 000056FD 800E[D787]02 <1> setopt [disflags], DIS_I_FAR_M 5011 00005702 EBF5 <1> jmp dop60a 5012 <1> 5013 <1> dop_double_m: 5014 00005704 800E[D787]04 <1> setopt [disflags], DIS_I_DOUBLE_M 5015 00005709 EBEE <1> jmp dop60a 5016 <1> 5017 <1> 5018 <1> %if _MEMREF_AMOUNT 5019 <1> dop_m_src: 5020 0000570B 800E[D787]10 <1> setopt [disflags], DIS_I_M_SRC 5021 00005710 EBE7 <1> jmp dop60a 5022 <1> 5023 <1> dop_m_src_dst: 5024 00005712 800E[D787]10 <1> setopt [disflags], DIS_I_M_SRC 5025 <1> dop_m_dst: 5026 00005717 800E[D787]20 <1> setopt [disflags], DIS_I_M_DST 5027 0000571C EBDB <1> jmp dop60a 5028 <1> %else 5029 <1> dop_m_src: equ dop60a 5030 <1> dop_m_src_dst: equ dop60a 5031 <1> dop_m_dst: equ dop60a 5032 <1> %endif 5033 <1> 5034 <1> 5035 <1> dop_short: 5036 0000571E F606[AC00]10 <1> testopt [asm_options], disasm_show_short 5037 00005723 74D4 <1> jz dop60a 5038 00005725 B85348 <1> mov ax, "SH" 5039 00005728 E85401 <1> call dis_stosw_lowercase 5040 0000572B B84F52 <1> mov ax, "OR" 5041 0000572E E84E01 <1> call dis_stosw_lowercase 5042 00005731 B85420 <1> mov ax, "T " 5043 00005734 E84801 <1> call dis_stosw_lowercase 5044 <1> dop60a_1: 5045 00005737 EBC0 <1> jmp dop60a 5046 <1> 5047 <1> dop_near: 5048 00005739 F606[AC00]20 <1> testopt [asm_options], disasm_show_near 5049 0000573E 74F7 <1> jz dop60a_1 5050 00005740 E81700 <1> call dop_show_near 5051 <1> dop60a_2: 5052 00005743 EBF2 <1> jmp dop60a_1 5053 <1> 5054 <1> dop_far: 5055 00005745 F606[AC00]40 <1> testopt [asm_options], disasm_show_far 5056 0000574A 74F7 <1> jz dop60a_2 5057 <1> dop_far_required: 5058 0000574C B84641 <1> mov ax, "FA" ; store "FAR " 5059 0000574F E82D01 <1> call dis_stosw_lowercase 5060 00005752 B85220 <1> mov ax, "R " 5061 00005755 E82701 <1> call dis_stosw_lowercase 5062 00005758 EBE9 <1> jmp dop60a_2 5063 <1> 5064 <1> dop_show_near: 5065 0000575A 50 <1> push ax 5066 0000575B B84E45 <1> mov ax, "NE" 5067 0000575E E81E01 <1> call dis_stosw_lowercase 5068 00005761 B84152 <1> mov ax, "AR" 5069 00005764 E81801 <1> call dis_stosw_lowercase 5070 00005767 B020 <1> mov al, " " 5071 00005769 AA <1> stosb 5072 0000576A 58 <1> pop ax 5073 0000576B C3 <1> retn 5074 <1> 5075 <1> 5076 <1> disbad: 5077 0000576C 8B26[D487] <1> mov sp,[savesp2] ;pop junk off stack 5078 00005770 B8[AB48] <1> mov ax, da13 5079 00005773 50 <1> push ax 5080 00005774 66 <1> _386_PM_o32 ; xor eax, eax 5081 00005775 31C0 <1> xor ax, ax 5082 00005777 66 <1> _386_PM_o32 ; mov dword [dis_n], eax 5083 00005778 A3[B887] <1> mov word [dis_n], ax 5084 0000577B A3[BC87] <1> mov word [preflags], ax ; clear preflags and preused 5085 <1> %if _COND 5086 0000577E A3[DC87] <1> mov word [condmsg], ax ; initialize conditions message 5087 <1> %endif 5088 00005781 C606[CE87]80 <1> mov byte [rmsize], 80h ; don't display any memory 5089 00005786 A3[A281] <1> mov word [dismach], ax ; forget about the machine type 5090 00005789 8026[D687]FB <1> and byte [disflags],~DIS_I_SHOW ;and flags 5091 0000578E E8C301 <1> call disgetbyte 5092 00005791 BF[4488] <1> mov di,prefixlist 5093 00005794 B90C00 <1> mov cx,N_PREFIX 5094 00005797 F2AE <1> repne scasb 5095 00005799 740C <1> je .namedprefix ;if it's a named prefix 5096 0000579B 66 <1> _386_PM_o32 ; dec dword [dis_n] 5097 0000579C FF0E[B887] <1> dec word [dis_n] 5098 000057A0 BBC101 <1> mov bx,MN_DB ;offset of 'DB' mnemonic 5099 000057A3 BEAC16 <1> mov si, fake_oplist.op_imm8 - oplists 5100 000057A6 C3 <1> retn 5101 <1> 5102 <1> .namedprefix: 5103 000057A7 800E[D687]08 <1> or byte [disflags],DIS_I_UNUSED ;print special flag 5104 000057AC BB0B00 <1> mov bx,N_PREFIX - 1 5105 000057AF 29CB <1> sub bx,cx 5106 000057B1 D1E3 <1> shl bx,1 5107 000057B3 83FB0C <1> cmp bx, byte 6 *2 5108 000057B6 7216 <1> jb .segprefix ; if SEG directive --> 5109 <1> %if _PM 5110 000057B8 83FB14 <1> cmp bx, byte 10 *2 5111 000057BB 720A <1> jb .non16prefix ; if not OSIZE or ASIZE --> 5112 000057BD F606[DB88]40 <1> test byte [bCSAttr], 40h; 32-bit code segment ? 5113 000057C2 7403 <1> jz .non16prefix ; no, O32 or A32 --> 5114 000057C4 83C304 <1> add bx, byte 4 ; yes, change to O16 or A16 5115 <1> .non16prefix: 5116 <1> %endif 5117 000057C7 8B9F[4488] <1> mov bx,[prefixmnem+bx-6*2] 5118 000057CB 31F6 <1> xor si, si ; no operand (empty oplist) 5119 000057CD C3 <1> retn 5120 <1> 5121 <1> .segprefix: 5122 000057CE 8DB7AE16 <1> lea si, [bx + fake_oplist.op_segments - oplists] 5123 <1> ; -> fake OPLIST for segments 5124 000057D2 BB5108 <1> mov bx,MN_SEG 5125 000057D5 C3 <1> retn 5126 <1> 5127 <1> 5128 <1> usesection ASMTABLE1, 1 5129 <1> fake_oplist: 5130 <1> .op_imm8: 5131 000016AC 1100 <1> db OP_IMM8, 0 5132 <1> .op_segments: 5133 000016AE 2A00 <1> db OP_ES, 0 5134 000016B0 2800 <1> db OP_CS, 0 5135 000016B2 2D00 <1> db OP_SS, 0 5136 000016B4 2900 <1> db OP_DS, 0 5137 000016B6 2B00 <1> db OP_FS, 0 5138 000016B8 2C00 <1> db OP_GS, 0 5139 <1> __SECT__ 5140 <1> 5141 <1> 5142 <1> ; GETREGMEM_R - Get the reg part of the reg/mem part of the instruction 5143 <1> ; Uses CL 5144 <1> 5145 <1> getregmem_r: 5146 000057D6 E80700 <1> call getregmem 5147 <1> 5148 <1> ; INP: al = bits 3 to 5 has value to extract 5149 <1> ; OUT: al = (INP:al >> 3) & 7 5150 <1> ; CHG: cl 5151 <1> da_get_bits_3_to_5: 5152 000057D9 B103 <1> mov cl,3 5153 000057DB D2E8 <1> shr al,cl 5154 000057DD 2407 <1> and al,7 5155 000057DF C3 <1> ret 5156 <1> 5157 <1> ; GETREGMEM - Get the reg/mem part of the instruction 5158 <1> 5159 <1> getregmem: 5160 000057E0 F606[BD87]80 <1> test byte [preused],GOTREGM 5161 000057E5 750B <1> jnz grm1 ;if we have it already 5162 000057E7 800E[BD87]80 <1> or byte [preused],GOTREGM 5163 000057EC E86501 <1> call disgetbyte ;get the byte 5164 000057EF A2[9C81] <1> mov [regmem],al ;save it away 5165 <1> 5166 000057F2 A0[9C81] <1> grm1: mov al,[regmem] 5167 000057F5 C3 <1> ret 5168 <1> 5169 <1> dis_lowercase_w: 5170 000057F6 86C4 <1> xchg al, ah 5171 000057F8 E80200 <1> call dis_lowercase 5172 000057FB 86C4 <1> xchg al, ah 5173 <1> dis_lowercase: 5174 000057FD 3C41 <1> cmp al, 'A' 5175 000057FF 720D <1> jb .not 5176 00005801 3C5A <1> cmp al, 'Z' 5177 00005803 7709 <1> ja .not 5178 00005805 F606[AC00]01 <1> testopt [asm_options], disasm_lowercase 5179 0000580A 7402 <1> jz .not 5180 0000580C 0C20 <1> or al, 20h 5181 <1> .not: 5182 0000580E C3 <1> retn 5183 <1> 5184 <1> 5185 <1> dis_lowercase_refmem_w: 5186 0000580F 86C4 <1> xchg al, ah 5187 00005811 E80200 <1> call dis_lowercase_refmem 5188 00005814 86C4 <1> xchg al, ah 5189 <1> dis_lowercase_refmem: 5190 00005816 3C41 <1> cmp al, 'A' 5191 00005818 720D <1> jb .not 5192 0000581A 3C5A <1> cmp al, 'Z' 5193 0000581C 7709 <1> ja .not 5194 0000581E F606[AC00]08 <1> testopt [asm_options], disasm_lowercase_refmem 5195 00005823 7402 <1> jz .not 5196 00005825 0C20 <1> or al, 20h 5197 <1> .not: 5198 00005827 C3 <1> retn 5199 <1> 5200 <1> 5201 <1> ; Show the opcode mnemonic 5202 <1> ; 5203 <1> ; INP: si-> Opcode mnemonic string of an mnlist entry. 5204 <1> ; w[si-2] & 0Fh = Length of that string. 5205 <1> ; OUT: di-> next available byte in output line 5206 <1> ; (>= line_out + 32 due to padding) 5207 <1> ; CHG: ax, cx, si 5208 <1> showop: 5209 00005828 BF[2A08] <1> mov di, line_out+MNEMONOFS 5210 0000582B 56 <1> push si 5211 <1> 5212 0000582C 8B4CFE <1> mov cx, [si-2] 5213 0000582F 83E10F <1> and cx, 0Fh 5214 <1> .loop: 5215 00005832 AC <1> lodsb 5216 00005833 E8C7FF <1> call dis_lowercase 5217 00005836 AA <1> stosb 5218 00005837 E2F9 <1> loop .loop 5219 <1> 5220 00005839 58 <1> pop ax ; ax-> mnemonic 5221 0000583A 3D[8E0B] <1> cmp ax, mnlist_a_suffix_allowed ; non-suffixed mnemonic ? 5222 0000583D 7227 <1> jb .nosuffix ; yes --> 5223 0000583F 3D[B20B] <1> cmp ax, mnlist_o_suffix_allowed ; optional address size suffix ? 5224 00005842 7208 <1> jb .a_suffix_allowed ; yes --> 5225 00005844 3D[270C] <1> cmp ax, mnlist_o_suffix_required; optional operand size suffix ? 5226 00005847 B410 <1> mov ah, PREOSIZE ; (OSIZE: check OSIZE/O32) 5227 00005849 7309 <1> jae .suffix_decide ; no, it's required --> 5228 0000584B A9 <1> db __TEST_IMM16 ; (skip mov) 5229 <1> .a_suffix_allowed: 5230 0000584C B420 <1> mov ah, PREASIZE ; optional ASIZE: check ASIZE/A32 5231 <1> 5232 <1> .suffix_decide_optional: ; check whether the suffix is necessary 5233 0000584E 8426[BC87] <1> test byte [preflags], ah ; check if such a prefix occured (ZR if not) 5234 00005852 740E <1> jz .suffix_invisible ; no, is default form --> (hide suffix) 5235 <1> 5236 <1> .suffix_decide: ; suffix will be displayed, now only decide which 5237 00005854 B057 <1> mov al, 'W' 5238 00005856 8426[BE87] <1> test byte [presizeflags], ah ; 32-bit form ? 5239 0000585A 7402 <1> jz .got_suffix ; no --> 5240 0000585C B044 <1> mov al, 'D' 5241 <1> .got_suffix: 5242 0000585E E89CFF <1> call dis_lowercase 5243 00005861 AA <1> stosb ; store suffix 5244 <1> 5245 <1> .suffix_invisible: ; notional suffix either displayed or left hidden, 5246 00005862 0826[BD87] <1> or byte [preused], ah ; in any case, mark opcode prefix as used 5247 <1> 5248 <1> .nosuffix: 5249 <1> 5250 <1> ; Store blanks to pad to 8 characters, but at least one 5251 00005866 B020 <1> mov al, 32 5252 <1> .pad: 5253 00005868 AA <1> stosb 5254 00005869 81FF[3208] <1> cmp di, line_out+MNEMONOFS+8 5255 0000586D 72F9 <1> jb .pad 5256 <1> 5257 0000586F C3 <1> retn 5258 <1> 5259 <1> 5260 <1> ; INP: byte [segmnt] = number of segment register 5261 <1> ; [segrgnam] = uppercase segment register names 5262 <1> ; CHG: bx, ax 5263 <1> ; OUT: ax = uppercase segment register name 5264 <1> showseg_uppercase_ax: 5265 00005870 A0[CF87] <1> mov al,[segmnt] ;segment number 5266 00005873 98 <1> cbw 5267 00005874 D1E0 <1> shl ax,1 5268 00005876 93 <1> xchg ax,bx ;mov bx,ax 5269 00005877 8B87[1288] <1> mov ax,[segrgnam+bx] ;get register name 5270 0000587B C3 <1> retn 5271 <1> 5272 <1> ; SHOWSEG - Show the segment descriptor in SEGMNT 5273 <1> ; Entry DI Where to put it 5274 <1> ; Exit DI Updated 5275 <1> ; Uses AX, BX 5276 <1> 5277 <1> showseg: 5278 0000587C E8F1FF <1> call showseg_uppercase_ax 5279 <1> dis_stosw_lowercase: 5280 0000587F E874FF <1> call dis_lowercase_w 5281 00005882 AB <1> stosw 5282 00005883 C3 <1> retn 5283 <1> 5284 <1> 5285 <1> ; Write a size specifier to the buffer 5286 <1> ; and set some flags 5287 <1> ; INP: ah = r/m size value, 5288 <1> ; F0h byte (less than zero) 5289 <1> ; 00h word (equal to zero) 5290 <1> ; 10h dword (greater than zero, but != 20h) 5291 <1> ; 20h qword (greater than zero, == 20h) 5292 <1> ; di-> buffer 5293 <1> ; OUT: di-> behind size specifier in buffer 5294 <1> ; by[rmsize] set 5295 <1> ; wo[sizeloc]-> size specifier in buffer 5296 <1> ; CHG: ax 5297 <1> ; 5298 <1> ; Size specifiers are BYTE, WORD, DWORD, and QWORD. One 5299 <1> ; blank is appended to the size specifier. 5300 <1> ; 5301 <1> ; Size specifiers are lowercased if that option is selected. 5302 <1> showsize: 5303 00005884 8826[CE87] <1> mov [rmsize], ah ; save r/m size 5304 00005888 893E[DA87] <1> mov [sizeloc], di ; save where we're putting this 5305 0000588C B051 <1> mov al, 'Q' 5306 0000588E 80FC20 <1> cmp ah, 20h ; QWORD ? 5307 00005891 7412 <1> je .qword ; yes --> 5308 00005893 80FC00 <1> cmp ah, 0 5309 00005896 7D09 <1> jge .notbyte ; if word or dword --> 5310 <1> .byte: 5311 00005898 B85445 <1> mov ax, "TE" 5312 0000589B 50 <1> push ax 5313 0000589C B84259 <1> mov ax, "BY" 5314 0000589F EB0F <1> jmp s .common 5315 <1> 5316 <1> .notbyte: 5317 000058A1 7406 <1> je .word ; if word 5318 <1> .dword: 5319 000058A3 B044 <1> mov al, 'D' 5320 <1> .qword: 5321 000058A5 E855FF <1> call dis_lowercase 5322 000058A8 AA <1> stosb 5323 <1> .word: 5324 000058A9 B85244 <1> mov ax, "RD" 5325 000058AC 50 <1> push ax 5326 000058AD B8574F <1> mov ax, "WO" 5327 <1> .common: 5328 000058B0 E8CCFF <1> call dis_stosw_lowercase 5329 000058B3 58 <1> pop ax 5330 000058B4 E8C8FF <1> call dis_stosw_lowercase 5331 000058B7 B020 <1> mov al, 32 5332 000058B9 AA <1> stosb 5333 <1> showptr.ret: 5334 000058BA C3 <1> retn 5335 <1> 5336 <1> ; Write "PTR " to a buffer if NASM syntax is not selected. 5337 <1> ; INP: di-> buffer 5338 <1> ; OUT: di-> behind written string "PTR " (or unchanged) 5339 <1> ; CHG: ax 5340 <1> ; 5341 <1> ; The string is lowercased if that option is selected. 5342 <1> showptr: 5343 000058BB F606[AC00]04 <1> testopt [asm_options], disasm_nasm 5344 000058C0 75F8 <1> jnz .ret 5345 000058C2 B85054 <1> mov ax, "PT" 5346 000058C5 E8B7FF <1> call dis_stosw_lowercase 5347 000058C8 B85220 <1> mov ax, "R " 5348 000058CB EBB2 <1> jmp s dis_stosw_lowercase 5349 <1> 5350 <1> ; Write "DWORD " to a buffer 5351 <1> ; INP: di-> buffer 5352 <1> ; OUT: di-> behind written string "DWORD " 5353 <1> ; CHG: ax 5354 <1> ; 5355 <1> ; The string is lowercased if that option is selected. 5356 <1> showdword: equ showsize.dword 5357 <1> showword: equ showsize.word 5358 <1> 5359 <1> ; DISP32 - Print 32-bit displacement for addressing modes. 5360 <1> ; Entry None 5361 <1> ; Exit None 5362 <1> ; Uses AX 5363 <1> 5364 <1> disp32: 5365 000058CD E8A000 <1> call disgetword 5366 <1> .ax: 5367 000058D0 50 <1> push ax 5368 000058D1 E89C00 <1> call disgetword 5369 000058D4 E82F61 <1> call hexword 5370 000058D7 58 <1> pop ax 5371 000058D8 E92B61 <1> jmp hexword 5372 <1> 5373 <1> ; SHOWREG16 - Show 16-bit register name. 5374 <1> ; 5375 <1> ; INP: al = register number, 0 to 7 5376 <1> ; di -> buffer 5377 <1> ; OUT: register name stored to buffer 5378 <1> ; ax = INP:al * 2 5379 <1> showreg16: 5380 000058DB 98 <1> cbw 5381 000058DC D1E0 <1> shl ax,1 5382 000058DE 93 <1> xchg ax,bx 5383 000058DF 50 <1> push ax 5384 000058E0 8B87[0288] <1> mov ax,[rgnam16+bx] 5385 000058E4 E898FF <1> call dis_stosw_lowercase 5386 000058E7 58 <1> pop ax 5387 000058E8 93 <1> xchg ax,bx 5388 000058E9 C3 <1> ret 5389 <1> 5390 <1> 5391 <1> ; DISCHK32D - Check for O32 (32-bit operand size). 5392 <1> dischk32d: 5393 000058EA 800E[BD87]10 <1> or byte [preused], PREOSIZE 5394 000058EF F606[BE87]10 <1> test byte [presizeflags], PRE32D 5395 000058F4 C3 <1> retn 5396 <1> 5397 <1> 5398 <1> ; SHOWMACH - Return string "[needs math coprocessor]", etc. 5399 <1> ; Entry di -> table of 5 words 5400 <1> ; cx = instruction 5401 <1> ; Exit si Address of string 5402 <1> ; cx Length of string, or 0 if not needed 5403 <1> ; Uses al, di 5404 <1> 5405 <1> showmach: 5406 000058F5 BE[357A] <1> mov si,needsmsg ; candidate message 5407 000058F8 F606[A381]01 <1> test byte [dmflags],DM_COPR 5408 000058FD 741E <1> jz sm1 ; if not a coprocessor instruction 5409 000058FF C6440937 <1> mov byte [si + needsmsg.digit_6_ofs], '7' 5410 <1> ; change message text 5411 00005903 A0[E40A] <1> mov al,[mach_87] 5412 00005906 803E[E30A]00 <1> cmp byte [has_87],0 5413 0000590B 7517 <1> jnz sm2 ; if it has a coprocessor 5414 0000590D A0[E20A] <1> mov al,[machine] 5415 00005910 3A06[A281] <1> cmp al,[dismach] 5416 00005914 7214 <1> jb sm3 ; if we display the message 5417 00005916 BE[407A] <1> mov si,needsmath ; print this message instead 5418 00005919 B91800 <1> mov cx,needsmath_L 5419 0000591C C3 <1> retn 5420 <1> 5421 <1> sm1: 5422 0000591D C6440936 <1> mov byte [si + needsmsg.digit_6_ofs], '6' 5423 <1> ; reset message text 5424 00005921 A0[E20A] <1> mov al,[machine] 5425 <1> sm2: 5426 00005924 3A06[A281] <1> cmp al,[dismach] 5427 00005928 730C <1> jae sm4 ; if no message (so far) 5428 <1> sm3: 5429 0000592A A0[A281] <1> mov al,[dismach] 5430 0000592D 0430 <1> add al,'0' 5431 0000592F 884407 <1> mov byte [si + needsmsg.digit_x_ofs], al 5432 00005932 B90B00 <1> mov cx,needsmsg_L ; length of the message 5433 00005935 C3 <1> retn 5434 <1> 5435 <1> ; Check for obsolete instruction. 5436 <1> sm4: 5437 00005936 BE[587A] <1> mov si, obsolete ; candidate message 5438 00005939 89C8 <1> mov ax, cx ; get info on this instruction 5439 0000593B B90500 <1> mov cx, 5 5440 0000593E F2AF <1> repne scasw 5441 00005940 7511 <1> jne sm6 ; if no matches 5442 00005942 BF[BC81] <1> mov di, obsmach + 5 - 1 5443 00005945 29CF <1> sub di, cx 5444 00005947 31C9 <1> xor cx, cx ; clear CX: no message 5445 00005949 A0[E40A] <1> mov al, byte [mach_87] 5446 0000594C 3A05 <1> cmp al, byte [di] 5447 0000594E 7E03 <1> jle sm5 ; if this machine is OK 5448 00005950 B90A00 <1> mov cx, obsolete_L 5449 <1> sm5: 5450 00005953 C3 <1> retn 5451 <1> 5452 <1> sm6: equ sm5 5453 <1> 5454 <1> 5455 <1> ; DISGETBYTE - Get byte for disassembler. 5456 <1> ; Entry None 5457 <1> ; Exit AL Next byte in instruction stream 5458 <1> ; Uses None 5459 <1> 5460 <1> disgetbyte: 5461 00005954 1E <1> push ds 5462 00005955 66 <1> _386_PM_o32 ; push esi 5463 00005956 56 <1> push si ; save ds, (e)si 5464 00005957 66 <1> _386_PM_o32 ; mov esi, dword [u_addr] 5465 00005958 8B36[1E0B] <1> mov si, word [u_addr] 5466 0000595C 66 <1> _386_PM_o32 ; add esi, dword [dis_n] 5467 0000595D 0336[B887] <1> add si, word [dis_n] ; index to the right byte 5468 00005961 8E1E[220B] <1> mov ds, word [u_addr + saSegSel] 5469 00005965 67 <1> _386_PM_a32 5470 00005966 AC <1> lodsb ; get the byte 5471 00005967 66 <1> _386_PM_o32 ; pop esi 5472 00005968 5E <1> pop si 5473 00005969 1F <1> pop ds ; restore regs 5474 0000596A 66 <1> _386_PM_o32 ; inc dword [dis_n] 5475 0000596B FF06[B887] <1> inc word [dis_n] ; indicate that we've gotten this byte 5476 0000596F C3 <1> retn 5477 <1> 5478 <1> 5479 <1> ; DISGETWORD - Get word for disassembler. 5480 <1> ; Entry None 5481 <1> ; Exit AX Next word 5482 <1> ; Uses None 5483 <1> 5484 <1> disgetword: 5485 00005970 1E <1> push ds 5486 00005971 66 <1> _386_PM_o32 ; push esi 5487 00005972 56 <1> push si ; save ds, (e)si 5488 00005973 66 <1> _386_PM_o32 ; mov esi, dword [u_addr] 5489 00005974 8B36[1E0B] <1> mov si, word [u_addr] 5490 00005978 66 <1> _386_PM_o32 ; add esi, dword [dis_n] 5491 00005979 0336[B887] <1> add si, word [dis_n] ; index to the right byte 5492 0000597D 8E1E[220B] <1> mov ds, word [u_addr + saSegSel] 5493 00005981 67 <1> _386_PM_a32 5494 00005982 AD <1> lodsw ; get the word 5495 00005983 66 <1> _386_PM_o32 ; pop esi 5496 00005984 5E <1> pop si 5497 00005985 1F <1> pop ds ; restore regs 5498 00005986 66 <1> _386_PM_o32 ; add dword [dis_n], byte 2 5499 00005987 8306[B887]02 <1> add word [dis_n], byte 2 ; indicate that we've gotten this word 5500 0000598C C3 <1> retn 5501 <1> 5502 <1> 5503 <1> ; DISSHOWBYTES - Show bytes for the disassembler. 5504 <1> ; Entry BX Number of bytes (must be > 0) 5505 <1> ; di-> output line 5506 <1> ; Exit u_addr updated 5507 <1> ; Uses BX, (E)SI. 5508 <1> 5509 <1> disshowbytes: 5510 0000598D 66 <1> _386_PM_o32 ; mov esi, dword [u_addr] 5511 0000598E 8B36[1E0B] <1> mov si, word [u_addr] 5512 00005992 8E1E[220B] <1> mov ds, word [u_addr + saSegSel] 5513 <1> .loop: 5514 00005996 67 <1> _386_PM_a32 5515 00005997 AC <1> lodsb 5516 00005998 E87260 <1> call hexbyte 5517 0000599B 4B <1> dec bx 5518 0000599C 75F8 <1> jnz .loop 5519 0000599E 16 <1> push ss 5520 0000599F 1F <1> pop ds 5521 000059A0 66 <1> _386_PM_o32 ; mov dword [u_addr], esi 5522 000059A1 8936[1E0B] <1> mov word [u_addr], si 5523 000059A5 C3 <1> retn 5524 <1> 5525 <1> ; MOVEOVER - Move the line to the right. 5526 <1> ; Entry DI Last address + 1 of line so far 5527 <1> ; Exit CX Number of bytes to move 5528 <1> ; DI Updated 5529 <1> ; Uses SI 5530 <1> moveover: 5531 000059A6 833E[DA87]00 <1> cmp word [sizeloc], byte 0 5532 000059AB 7404 <1> je mo1 ; if sizeloc not saved 5533 000059AD 010E[DA87] <1> add word [sizeloc], cx 5534 <1> 5535 <1> mo1: 5536 000059B1 89FE <1> mov si, di 5537 000059B3 01CF <1> add di, cx 5538 000059B5 89F9 <1> mov cx, di 5539 000059B7 81E9[2A08] <1> sub cx, line_out+MNEMONOFS 5540 000059BB 57 <1> push di 5541 000059BC FD <1> std ; _AMD_ERRATUM_109_WORKAROUND as below 5542 000059BD 4E <1> dec si 5543 000059BE 4F <1> dec di 5544 <1> 5545 <1> 5546 <1> numdef AMD_ERRATUM_109_WORKAROUND, 1 5547 <1> ; Refer to comment in init.asm init_movp. 5548 <1> 5549 <1> %if _AMD_ERRATUM_109_WORKAROUND 5550 000059BF E308 <1> jcxz @FF 5551 000059C1 83F914 <1> cmp cx, 20 5552 000059C4 7703 <1> ja @FF 5553 <1> @@: 5554 000059C6 A4 <1> movsb 5555 000059C7 E2FD <1> loop @B 5556 <1> @@: 5557 <1> %endif 5558 000059C9 F3A4 <1> rep movsb 5559 000059CB 5F <1> pop di 5560 000059CC FC <1> cld 5561 000059CD C3 <1> retn 2065 2066 2067 %if _PM 2068 %include "pmdata.asm" 2069 <1> 2070 <1> %if 0 2071 <1> 2072 <1> lDebugX PM data 2073 <1> 2074 <1> Copyright (C) 1995-2003 Paul Vojta 2075 <1> Copyright (C) 2008-2021 C. Masloch 2076 <1> 2077 <1> Usage of the works is permitted provided that this 2078 <1> instrument is retained with the works, so that any entity 2079 <1> that uses the works is notified of this instrument. 2080 <1> 2081 <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 2082 <1> 2083 <1> %endif 2084 <1> 2085 <1> 2086 <1> usesection lDEBUG_DATA_ENTRY 2087 <1> 2088 000088B2 00 <1> align 4, db 0 2089 000088B4 00000000 <1> exception_csip: dd 0 ; 16:16 far 16-bit address of debugger exception 2090 000088B8 00000000 <1> dpmientry: dd 0 ; DPMI entry point returned by DPMI host 2091 000088BC 00000000 <1> dpmiwatch: dd 0 2092 000088C0 00000000 <1> dpmi_rm2pm: dd 0 2093 000088C4 00000000 <1> dpmi_rmsav: dd 0 2094 000088C8 000000000000 <1> dpmi_pm2rm: dw 0,0,0 2095 000088CE 000000000000 <1> dpmi_pmsav: dw 0,0,0 2096 <1> align 2, db 0 2097 000088D4 0000 <1> dssel: dw 0 ; debugger's (16-bit RW) data selector 2098 000088D6 0000 <1> cssel: dw 0 ; debugger's (16-bit RE) code selector 2099 000088D8 0000 <1> scratchsel: dw 0 ; scratch selector used for various purposes, limit -1 2100 000088DA 00 <1> dpmi32: db 0 ; 32-bit client if true 2101 000088DB 00 <1> bCSAttr: db 0 ; current code attribute (D bit) 2102 <1> align 2, db 0 2103 000088DC 00 <1> bAddr32: db 0 ; Address attribute. if 1, hiword(edx) is valid 2104 000088DD 00 <1> db 0 ; read/written when bAddr32 is pushed/popped 2105 <1> 2106 <1> 2107 <1> align 2, db 0 2108 <1> convsegs: 2109 <1> .: 2110 000088DE [D40A] <1> dw pInDOS + so16aSegSel 2111 <1> %if _USESDA 2112 000088E0 [DC0A] <1> dw pSDA + so16aSegSel 2113 <1> %endif 2114 000088E2 [F209] <1> dw auxbuff_segorsel + soaSegSel 2115 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 2116 000088E4 [F60A] <1> dw history.segorsel + soaSegSel 2117 <1> %endif 2118 <1> .end_fixed: 2119 <1> .amount_fixed: equ (.end_fixed - .) / 2 2120 000088E6 [040B] <1> dw a_addr + saSegSel 2121 000088E8 [0E0B] <1> dw d_addr + saSegSel 2122 <1> .end: 2123 <1> .amount: equ (.end - .) / 2 2124 <1> 2125 <1> exctab: 2126 <1> %if _CATCHEXC00 2127 000088EA 00 <1> db 00h 2128 <1> %endif 2129 <1> %if _CATCHEXC01 2130 000088EB 01 <1> db 01h 2131 <1> %endif 2132 <1> %if _CATCHEXC03 2133 000088EC 03 <1> db 03h 2134 <1> %endif 2135 <1> %if _CATCHEXC06 2136 000088ED 06 <1> db 06h 2137 <1> %endif 2138 <1> %if _CATCHEXC0C 2139 000088EE 0C <1> db 0Ch 2140 <1> %endif 2141 <1> %if _CATCHEXC0D 2142 000088EF 0D <1> db 0Dh 2143 <1> %endif 2144 <1> %if _CATCHEXC0E 2145 000088F0 0E <1> db 0Eh 2146 <1> %endif 2147 <1> endexctab: 2148 <1> 2149 <1> %if _CATCHPMINT214C || _DEBUG 2150 000088F1 00 <1> align 8, db 0 2151 <1> excsave: 2152 <1> .: 2153 <1> %if _CATCHEXC00 2154 000088F8 FFFFFFFFFFFF0000 <1> dw -1,-1,-1,0 ; 0 2155 <1> %endif 2156 <1> %if _CATCHEXC01 2157 00008900 FFFFFFFFFFFF0000 <1> dw -1,-1,-1,0 ; 1 2158 <1> %endif 2159 <1> %if _CATCHEXC03 2160 00008908 FFFFFFFFFFFF0000 <1> dw -1,-1,-1,0 ; 3 2161 <1> %endif 2162 <1> %if _CATCHEXC06 2163 00008910 FFFFFFFFFFFF0000 <1> dw -1,-1,-1,0 ; 6 2164 <1> %endif 2165 <1> %if _CATCHEXC0C 2166 00008918 FFFFFFFFFFFF0000 <1> dw -1,-1,-1,0 ; 0C 2167 <1> %endif 2168 <1> %if _CATCHEXC0D 2169 00008920 FFFFFFFFFFFF0000 <1> dw -1,-1,-1,0 ; 0D 2170 <1> %endif 2171 <1> %if _CATCHEXC0E 2172 00008928 FFFFFFFFFFFF0000 <1> dw -1,-1,-1,0 ; 0E 2173 <1> %endif 2174 <1> .end: 2175 <1> .amount: equ (.end - .) / 8 2176 <1> 2177 <1> %if .amount != (endexctab - exctab) 2178 <1> %error Wrong excsave length 2179 <1> %endif 2180 <1> %endif 2181 <1> 2182 <1> %if CATCHPMINTAMOUNT 2183 <1> pminttab: 2184 <1> .: 2185 <1> %if _CATCHPMINT214C 2186 00008930 21 <1> db 21h 2187 00008931 [0E8A] <1> dw pmint21 2188 <1> %endif 2189 <1> .end: 2190 <1> .amount: equ (.end - .) / 3 2191 <1> 2192 00008933 00 <1> align 8, db 0 2193 <1> pmintsave: 2194 <1> .: 2195 <1> %if _CATCHPMINT214C 2196 00008938 FFFFFFFFFFFF0000 <1> .int21: dw -1,-1,-1,0 2197 <1> %endif 2198 <1> .end: 2199 <1> .amount: equ (.end - .) / 8 2200 <1> %endif 2069 %include "pminit.asm" 2070 <1> 2071 <1> %if 0 2072 <1> 2073 <1> lDebugX PM initialisation 2074 <1> 2075 <1> Copyright (C) 1995-2003 Paul Vojta 2076 <1> Copyright (C) 2008-2021 C. Masloch 2077 <1> 2078 <1> Usage of the works is permitted provided that this 2079 <1> instrument is retained with the works, so that any entity 2080 <1> that uses the works is notified of this instrument. 2081 <1> 2082 <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 2083 <1> 2084 <1> %endif 2085 <1> 2086 <1> 2087 <1> usesection lDEBUG_DATA_ENTRY 2088 <1> 2089 <1> ; Int2F handler. Starts with an IISP header. 2090 <1> align 2, db 0 2091 00008940 EB10000000004B4200- <1> iispentry debug2F, 0, debug2F 2091 00008949 EB4100 <1> 2092 <1> oldi2F: equ debug2F.next 2093 00008952 9C <1> pushf 2094 00008953 3D8716 <1> cmp ax, 1687h 2095 <1> dpmidisable: ; set this byte to __TEST_IMM8 to disable new DPMI entry 2096 00008956 7406 <1> je dpmiquery 2097 00008958 9D <1> popf 2098 <1> jumpoldi2F: 2099 00008959 2EFF2E[4289] <1> jmp far [ cs:oldi2F ] 2100 <1> 2101 <1> dpmiquery: 2102 0000895E 0E <1> push cs 2103 0000895F E8F7FF <1> call jumpoldi2F 2104 00008962 85C0 <1> test ax, ax 2105 00008964 750F <1> jnz .nohost 2106 <1> 2107 00008966 2E893E[B888] <1> mov word [ cs:dpmientry+0 ], di 2108 0000896B 2E8C06[BA88] <1> mov word [ cs:dpmientry+2 ], es 2109 00008970 BF[7689] <1> mov di, mydpmientry 2110 00008973 0E <1> push cs 2111 00008974 07 <1> pop es 2112 <1> .nohost: 2113 00008975 CF <1> iret 2114 <1> 2115 <1> mydpmientry: 2116 00008976 2EC606[DA88]00 <1> mov byte [ cs:dpmi32 ], 0 2117 0000897C A801 <1> test al, 1 2118 0000897E 7405 <1> jz .16 2119 00008980 2EFE06[DA88] <1> inc byte [ cs:dpmi32 ] 2120 <1> .16: 2121 00008985 2EFF1E[B888] <1> call far [ cs:dpmientry ] 2122 0000898A 7301 <1> jnc installdpmi 2123 <1> debug2F.hwreset: 2124 0000898C CB <1> retf 2125 <1> 2126 <1> 2127 <1> subcpu 286 2128 <1> installdpmi: 2129 0000898D 60 <1> pusha 2130 0000898E 89E5 <1> mov bp, sp ; [bp+16]=ip, [bp+18]=cs 2131 00008990 9C <1> pushf 2132 00008991 1E <1> push ds 2133 00008992 06 <1> push es 2134 <1> 2135 00008993 8CCB <1> mov bx, cs 2136 00008995 B80600 <1> mov ax, 0006h 2137 00008998 CD31 <1> int 31h 2138 0000899A 726D <1> jc .fataldpmierr ; get base address of cs 2139 0000899C F6C20F <1> test dl, 15 2140 0000899F 7568 <1> jnz .fataldpmierr 2141 000089A1 F7C1F0FF <1> test cx, 0FFF0h 2142 000089A5 7562 <1> jnz .fataldpmierr 2143 000089A7 C1EA04 <1> shr dx, 4 2144 000089AA C1E10C <1> shl cx, 12 2145 000089AD 09CA <1> or dx, cx 2146 000089AF 2E3916[A60A] <1> cmp word [cs:pspdbg], dx 2147 000089B4 7553 <1> jne .fataldpmierr 2148 <1> 2149 000089B6 8CCB <1> mov bx, cs 2150 000089B8 B80A00 <1> mov ax, 000Ah ; get a data descriptor for DEBUG's segment 2151 000089BB CD31 <1> int 31h 2152 000089BD 724A <1> jc .fataldpmierr 2153 000089BF 8ED8 <1> mov ds, ax 2154 000089C1 8C0E[D688] <1> mov word [ cssel ], cs 2155 000089C5 A3[D488] <1> mov word [ dssel ], ax 2156 <1> 2157 000089C8 B90100 <1> mov cx, 1 ; allocate code_sel selector 2158 000089CB 31C0 <1> xor ax, ax 2159 000089CD CD31 <1> int 31h 2160 000089CF 7238 <1> jc .fataldpmierr 2161 000089D1 A3[D000] <1> mov word [ code_sel ], ax 2162 000089D4 89C3 <1> mov bx, ax 2163 000089D6 31C9 <1> xor cx, cx 2164 000089D8 83CAFF <1> or dx, -1 ; cx:dx = 0FFFFh 2165 000089DB B80800 <1> mov ax, 0008h 2166 000089DE CD31 <1> int 31h ; set limit 64 KiB 2167 000089E0 7227 <1> jc .fataldpmierr 2168 000089E2 0F020E[D688] <1> lar cx, word [ cssel ] ; get access rights/type of cs 2169 000089E7 7520 <1> jnz .fataldpmierr 2170 000089E9 C1E908 <1> shr cx, 8 ; proper format for 31.0009 2171 <1> ; high byte zero (16-bit and byte-granular selector) 2172 000089EC B80900 <1> mov ax, 0009h 2173 000089EF CD31 <1> int 31h ; set descriptor access rights/type 2174 000089F1 7216 <1> jc .fataldpmierr 2175 <1> 2176 000089F3 8B16[CE00] <1> mov dx, word [ code_seg ] 2177 000089F7 89D1 <1> mov cx, dx 2178 000089F9 C1E204 <1> shl dx, 4 2179 000089FC C1E90C <1> shr cx, 12 2180 000089FF B80700 <1> mov ax, 0007h 2181 00008A02 CD31 <1> int 31h ; set selector base to code segment's base 2182 <1> 2183 00008A04 E8DFF6 <1> call entry_to_code_sel 2184 00008A07 [CE59] <1> dw installdpmi_code 2185 <1> 2186 <1> .fataldpmierr: 2187 00008A09 B8FF4C <1> mov ax, 4CFFh 2188 00008A0C CD21 <1> int 21h 2189 <1> 2190 <1> 2191 <1> usesection lDEBUG_CODE 2192 <1> 2193 <1> code_insure_low_byte_not_0CCh 2194 <1> installdpmi_code: 2195 <1> ; Some code (particularly d4message) may expect us to 2196 <1> ; run on the debugger's stack, to access the data 2197 <1> ; segment. Therefore, switch stacks. 2198 000059CE 8CDA <1> mov dx, ds ; dx = ds = debugger data selector 2199 000059D0 8CD0 <1> mov ax, ss 2200 000059D2 89E3 <1> mov bx, sp ; ax:bx = stack to restore 2201 000059D4 8ED2 <1> mov ss, dx 2202 000059D6 8B26[A00A] <1> mov sp, [run_sp] ; switch to our stack 2203 <1> 2204 000059DA 50 <1> push ax 2205 000059DB 53 <1> push bx ; save original stack, far pointer 2206 <1> 2207 000059DC 800E[9D00]08 <1> setopt [internalflags], protectedmode 2208 <1> 2209 <1> d4 call d4message 2210 <1> d4 asciz "In installdpmi_code",13,10 2211 <1> 2212 000059E1 B90200 <1> mov cx, 2 ; alloc 2 descriptors 2213 000059E4 31C0 <1> xor ax, ax 2214 000059E6 CD31 <1> int 31h 2215 000059E8 7303E9F101 <1> jc .fataldpmierr 2216 <1> 2217 <1> d4 call d4message 2218 <1> d4 asciz "In installdpmi_code, allocated 2 descriptors",13,10 2219 <1> 2220 000059ED A3[D888] <1> mov word [ scratchsel ], ax ; the first is used as scratch descriptor 2221 000059F0 89C3 <1> mov bx, ax 2222 000059F2 31C9 <1> xor cx, cx 2223 <1> %if 1 2224 000059F4 49 <1> _386 dec cx ; set a limit of FFFFFFFFh if 386 2225 <1> %else 2226 <1> cmp byte [ dpmi32 ], 0 2227 <1> je .16 2228 <1> dec cx ; set a limit of FFFFFFFFh if 32-bit client 2229 <1> .16: 2230 <1> %endif 2231 000059F5 83CAFF <1> or dx, byte -1 2232 000059F8 B80800 <1> mov ax, 0008h 2233 000059FB CD31 <1> int 31h 2234 000059FD B80300 <1> mov ax, 0003h 2235 00005A00 CD31 <1> int 31h ; get selector increment 2236 <1> %if 0 2237 <1> jnc .03sup 2238 <1> mov ax, 8 2239 <1> .03sup: 2240 <1> %endif 2241 00005A02 01C3 <1> add bx, ax ; the second selector is client's CS 2242 00005A04 31C9 <1> xor cx, cx ; this limit is FFFFh even for 32-bits 2243 00005A06 B80800 <1> mov ax, 0008h 2244 00005A09 CD31 <1> int 31h 2245 <1> 2246 00005A0B 5A <1> pop dx 2247 00005A0C 58 <1> pop ax 2248 00005A0D 8EC0 <1> mov es, ax 2249 00005A0F 50 <1> push ax 2250 00005A10 52 <1> push dx 2251 <1> 2252 00005A11 268B5612 <1> mov dx, word [ es:bp+18 ] 2253 <1> ; get client's CS 2254 00005A15 E8B03E <1> call setrmaddr ; set base 2255 00005A18 0F020E[D688] <1> lar cx, word [ cssel ] 2256 00005A1D 7403E9BC01 <1> jnz .fataldpmierr 2257 00005A22 C1E908 <1> shr cx, 8 ; CS remains 16-bit 2258 00005A25 B80900 <1> mov ax, 0009h 2259 00005A28 CD31 <1> int 31h 2260 00005A2A 89DA <1> mov dx, bx 2261 00005A2C 26895E12 <1> mov word [ es:bp+18 ], bx 2262 <1> 2263 00005A30 FC <1> cld 2264 <1> 2265 00005A31 BE[DE88] <1> mov si, convsegs 2266 00005A34 B90400 <1> mov cx, convsegs.amount_fixed 2267 <1> .loopseg: 2268 <1> d4 call d4message 2269 <1> d4 asciz "In installdpmi_code.loopseg",13,10 2270 <1> 2271 00005A37 AD <1> lodsw 2272 00005A38 89C7 <1> mov di, ax 2273 00005A3A 8B5D02 <1> mov bx, word [di + soaSegment] 2274 00005A3D B80200 <1> mov ax, 0002h 2275 00005A40 CD31 <1> int 31h 2276 00005A42 7303E99701 <1> jc .fataldpmierr 2277 00005A47 894504 <1> mov word [di + soaSelector], ax 2278 00005A4A E2EB <1> loop .loopseg 2279 <1> 2280 <1> d4 call d4message 2281 <1> d4 asciz "In installdpmi_code after .loopseg",13,10 2282 <1> 2283 00005A4C 6657 <1> _386 push edi 2284 00005A4E 6631FF <1> _386 xor edi, edi ; clear edih 2285 00005A51 8026[9E00]DB <1> clropt [internalflags], canswitchmode|switchbuffer 2286 00005A56 31ED <1> xor bp, bp 2287 00005A58 45 <1> _386 inc bp 2288 00005A59 45 <1> _386 inc bp 2289 <1> .save16: 2290 00005A5A B80503 <1> mov ax, 0305h ; get raw mode-switch save state addresses 2291 00005A5D CD31 <1> int 31h 2292 00005A5F 7303E9A000 <1> jc .cannotswitch 2293 00005A64 3D1020 <1> cmp ax, _AUXBUFFSIZE ; fits into auxbuff ? 2294 00005A67 7603E99800 <1> ja .cannotswitch ; no --> 2295 00005A6C 85C0 <1> test ax, ax 2296 00005A6E 7473 <1> jz .nobuffer 2297 <1> 2298 <1> .switchbuffer_init: 2299 00005A70 50 <1> push ax ; ax = target switchbuffer size 2300 00005A71 53 <1> push bx 2301 00005A72 51 <1> push cx 2302 00005A73 56 <1> push si 2303 00005A74 57 <1> push di ; preserve regs returned by fn 0305h 2304 <1> 2305 00005A75 8B3E[F009] <1> mov di, word [auxbuff_switchbuffer_size] 2306 00005A79 89F9 <1> mov cx, di 2307 00005A7B 29C1 <1> sub cx, ax 2308 00005A7D 7441 <1> je .no_switchbuffer_size_change 2309 00005A7F 8E06[F609] <1> mov es, word [auxbuff_segorsel + soaSelector] 2310 00005A83 7737 <1> ja .fillblanks 2311 <1> 2312 00005A85 F7D9 <1> neg cx ; = amount of bytes to move 2313 <1> 2314 <1> .try_again: 2315 00005A87 8B36[FA09] <1> mov si, word [auxbuff_behind_last_silent] 2316 <1> ; (auxbuff):di -> next buffer (if it fits) 2317 00005A8B B81020 <1> mov ax, _AUXBUFFSIZE 2318 00005A8E 29F0 <1> sub ax, si ; number of bytes left free 2319 00005A90 39C8 <1> cmp ax, cx ; fits ? 2320 00005A92 7307 <1> jae .simple ; yes --> 2321 <1> 2322 <1> .delete: 2323 00005A94 E83862 <1> call silence_delete_one_string.internal 2324 00005A97 7228 <1> jc .switchbuffer_error 2325 00005A99 EBEC <1> jmp .try_again 2326 <1> 2327 <1> .simple: 2328 00005A9B 1E <1> push ds 2329 00005A9C 56 <1> push si 2330 <1> ; -> behind used data minus start of auxbuff (0) 2331 <1> ; = how much to copy 2332 00005A9D 4E <1> dec si ; -> last used byte 2333 00005A9E 89F7 <1> mov di, si ; -> last used source byte 2334 00005AA0 01CF <1> add di, cx ; -> destination of last byte 2335 00005AA2 010E[FA09] <1> add word [auxbuff_behind_last_silent], cx 2336 <1> ; update silent pointer 2337 00005AA6 010E[F809] <1> add word [auxbuff_behind_while_condition], cx 2338 <1> ; update while pointer 2339 00005AAA 59 <1> pop cx ; = how much to copy 2340 00005AAB FD <1> std ; _AMD_ERRATUM_109_WORKAROUND as below 2341 00005AAC 06 <1> push es 2342 00005AAD 1F <1> pop ds 2343 <1> 2344 <1> numdef AMD_ERRATUM_109_WORKAROUND, 1 2345 <1> ; Refer to comment in init.asm init_movp. 2346 <1> 2347 <1> %if _AMD_ERRATUM_109_WORKAROUND 2348 00005AAE E308 <1> jcxz @FF 2349 00005AB0 83F914 <1> cmp cx, 20 2350 00005AB3 7703 <1> ja @FF 2351 <1> @@: 2352 00005AB5 A4 <1> movsb 2353 00005AB6 E2FD <1> loop @B 2354 <1> @@: 2355 <1> %endif 2356 00005AB8 F3A4 <1> rep movsb ; copy up silent buffer and while cond 2357 00005ABA FC <1> cld 2358 <1> 2359 00005ABB 1F <1> pop ds 2360 <1> 2361 <1> ; (fall through. cx is equal to zero here so the 2362 <1> ; rep stosb in .fillblanks is effectively a no-op.) 2363 <1> 2364 <1> .fillblanks: 2365 <1> ; This isn't really supported but we'll do enough 2366 <1> ; to handle basic cases. WHILE conditions use the 2367 <1> ; switchbuffer size to find their stored condition. 2368 <1> ; So fill the additional space with blanks, which 2369 <1> ; WHILE condition parsing will happily eat up. 2370 00005ABC B020 <1> mov al, 32 2371 00005ABE F3AA <1> rep stosb 2372 <1> 2373 <1> .no_switchbuffer_size_change: 2374 00005AC0 A8 <1> db __TEST_IMM8 ; (skip stc, NC) 2375 <1> .switchbuffer_error: 2376 00005AC1 F9 <1> stc 2377 00005AC2 5F <1> pop di 2378 00005AC3 5E <1> pop si 2379 00005AC4 59 <1> pop cx 2380 00005AC5 5B <1> pop bx ; restore returned registers 2381 00005AC6 58 <1> pop ax ; ax = target switchbuffer size 2382 00005AC7 723B <1> jc .cannotswitch 2383 00005AC9 A3[F009] <1> mov word [auxbuff_switchbuffer_size], ax 2384 00005ACC 800E[9E00]20 <1> setopt [internalflags], switchbuffer 2385 00005AD1 890E[C488] <1> mov word [dpmi_rmsav+0], cx 2386 00005AD5 891E[C688] <1> mov word [dpmi_rmsav+2], bx 2387 00005AD9 66 <1> _386_o32 ; mov dword [dpmi_pmsav], edi 2388 00005ADA 893E[CE88] <1> mov word [dpmi_pmsav], di 2389 00005ADE 3E89B6[D088] <1> mov word [ds:bp+dpmi_pmsav+2], si 2390 <1> .nobuffer: 2391 00005AE3 6631FF <1> _386 xor edi, edi ; clear edih 2392 00005AE6 B80603 <1> mov ax, 0306h ; get raw mode-switch addresses 2393 00005AE9 CD31 <1> int 31h 2394 00005AEB 7217 <1> jc .cannotswitch 2395 00005AED 800E[9E00]04 <1> setopt [internalflags], canswitchmode 2396 00005AF2 890E[C088] <1> mov word [dpmi_rm2pm+0], cx 2397 00005AF6 891E[C288] <1> mov word [dpmi_rm2pm+2], bx 2398 00005AFA 66 <1> _386_o32 ; mov dword [dpmi_pm2rm], edi 2399 00005AFB 893E[C888] <1> mov word [dpmi_pm2rm], di 2400 00005AFF 3E89B6[CA88] <1> mov word [ds:bp+dpmi_pm2rm+2], si 2401 <1> .cannotswitch: 2402 00005B04 665F <1> _386 pop edi 2403 <1> 2404 00005B06 6652 <1> _386 push edx 2405 00005B08 6650 <1> _386 push eax 2406 <1> %if (_CATCHPMINT214C || _DEBUG) || 1 2407 00005B0A 06 <1> push es 2408 00005B0B 1E <1> push ds 2409 00005B0C 07 <1> pop es 2410 <1> %endif 2411 <1> 2412 <1> %if CATCHEXCAMOUNT 2413 00005B0D BE[EA88] <1> mov si, exctab ; hook several exceptions 2414 <1> %if (_CATCHPMINT214C || _DEBUG) || 1 2415 00005B10 BF[F888] <1> mov di, excsave 2416 <1> %endif 2417 00005B13 6631D2 <1> _386 xor edx, edx ; clear edxh 2418 00005B16 BA[268A] <1> mov dx, exc_first 2419 <1> .loopexc: 2420 00005B19 AC <1> lodsb 2421 <1> d4 call d4message 2422 <1> d4 asciz "In installdpmi_code.loopexc, ax=" 2423 <1> d4 push ax 2424 <1> d4 call d4disp_stack_hex 2425 <1> d4 call d4message 2426 <1> d4 asciz 13,10 2427 <1> 2428 00005B1A 88C3 <1> mov bl, al 2429 <1> %if (_CATCHPMINT214C || _DEBUG) || 1 2430 00005B1C 66 <1> _386_o32 ; push edx 2431 00005B1D 52 <1> push dx ; preserve excXX pointer 2432 00005B1E B80202 <1> mov ax, 0202h 2433 <1> ; (edxh is zero) 2434 00005B21 CD31 <1> int 31h ; cx:(e)dx -> prior handler 2435 00005B23 66 <1> _386_o32 ; xchg eax, edx 2436 00005B24 92 <1> xchg ax, dx 2437 00005B25 66 <1> _386_o32 ; stosd 2438 00005B26 AB <1> stosw ; store offset (dword on 386+, else word) 2439 00005B27 91 <1> xchg ax, cx 2440 00005B28 AB <1> stosw ; store selector 2441 00005B29 B80400 <1> mov ax, 4 2442 00005B2C 29E8 <1> sub ax, bp ; if 386, ax = 4 - 2 = 2, else ax = 4 2443 00005B2E 01C7 <1> add di, ax ; -> next entry of excsave 2444 00005B30 66 <1> _386_o32 ; pop edx 2445 00005B31 5A <1> pop dx 2446 <1> %endif 2447 00005B32 8B0E[D688] <1> mov cx, word [cssel] ; -> our handler for this exception 2448 00005B36 B80302 <1> mov ax, 0203h 2449 00005B39 CD31 <1> int 31h ; set our handler 2450 00005B3B 83C206 <1> add dx, byte exc_second - exc_first 2451 <1> ; -> next handler 2452 00005B3E 81FE[F188] <1> cmp si, endexctab ; if another to go --> 2453 00005B42 72D5 <1> jb .loopexc 2454 <1> %endif 2455 <1> 2456 <1> %if CATCHPMINTAMOUNT 2457 00005B44 BE[3089] <1> mov si, pminttab ; ds:si -> pminttab 2458 00005B47 BF[3889] <1> mov di, pmintsave ; es:di -> pmintsave 2459 <1> .loopint: 2460 00005B4A AC <1> lodsb ; get interrupt number 2461 00005B4B 88C3 <1> mov bl, al ; bl = interrupt number 2462 00005B4D 6631D2 <1> _386 xor edx, edx ; clear edxh 2463 00005B50 B80402 <1> mov ax, 0204h 2464 00005B53 CD31 <1> int 31h ; cx:(e)dx -> prior handler 2465 00005B55 66 <1> _386_o32 ; xchg eax, edx 2466 00005B56 92 <1> xchg ax, dx ; (e)ax = offset 2467 00005B57 66 <1> _386_o32 ; stosd 2468 00005B58 AB <1> stosw ; store offset (dword on 386+, else word) 2469 00005B59 91 <1> xchg ax, cx 2470 00005B5A AB <1> stosw ; store selector 2471 00005B5B B80400 <1> mov ax, 4 2472 00005B5E 29E8 <1> sub ax, bp ; if 386, ax = 4 - 2 = 2, else ax = 4 2473 00005B60 01C7 <1> add di, ax ; -> next entry of pmintsave 2474 00005B62 AD <1> lodsw ; ax -> our handler 2475 00005B63 6631D2 <1> _386 xor edx, edx 2476 00005B66 92 <1> xchg ax, dx ; (e)dx -> our handler 2477 00005B67 8B0E[D688] <1> mov cx, word [cssel] ; cx:(e)dx -> our handler 2478 00005B6B B80502 <1> mov ax, 0205h 2479 00005B6E CD31 <1> int 31h 2480 00005B70 81FE[3389] <1> cmp si, pminttab.end 2481 00005B74 72D4 <1> jb .loopint 2482 <1> %endif 2483 <1> 2484 <1> %if (_CATCHPMINT214C || _DEBUG) || 1 2485 00005B76 07 <1> pop es 2486 <1> %endif 2487 00005B77 6658 <1> _386 pop eax 2488 00005B79 665A <1> _386 pop edx 2489 <1> 2490 00005B7B BE[DE88] <1> mov si, convsegs 2491 <1> @@: 2492 00005B7E AD <1> lodsw 2493 00005B7F 97 <1> xchg ax, di 2494 00005B80 FF7504 <1> push word [di + soaSelector] 2495 00005B83 8F05 <1> pop word [di + soaSegSel] 2496 00005B85 81FE[E688] <1> cmp si, convsegs.end_fixed 2497 00005B89 72F3 <1> jb @B 2498 <1> 2499 00005B8B F606[9D00]01 <1> testopt [internalflags], hooked2F 2500 00005B90 7431 <1> jz .notours ; not currently hooked --> 2501 <1> 2502 00005B92 B02F <1> mov al, 2Fh ; interrupt number 2503 00005B94 BE[4089] <1> mov si, debug2F ; -> IISP entry header 2504 00005B97 BA0200 <1> mov dx, opt4_int_2F_force >> 16 2505 00005B9A E8F176 <1> call UnhookInterruptForce 2506 <1> ; try unhooking it 2507 00005B9D 730B <1> jnc .got2F 2508 <1> 2509 <1> .not2F: 2510 00005B9F C706[186B]3246 <1> mov word [msg.serial_cannot_unhook.int], "2F" 2511 00005BA5 BA[F46A] <1> mov dx, msg.serial_cannot_unhook 2512 00005BA8 EB16 <1> jmp @F 2513 <1> 2514 <1> .got2F: 2515 00005BAA 8026[9D00]FE <1> clropt [internalflags], hooked2F 2516 00005BAF 8026[A800]FD <1> clropt [internalflags4], dif4_int_2F_hooked 2517 00005BB4 E8E477 <1> call update_inttab_optional 2518 00005BB7 C706[8A6B]3246 <1> mov word [msg.serial_late_unhook.int], "2F" 2519 00005BBD BA[696B] <1> mov dx, msg.serial_late_unhook 2520 <1> @@: 2521 00005BC0 E8F961 <1> call putsz 2522 <1> .notours: 2523 <1> 2524 <1> 2525 <1> ; This is a bit silly: If we're never 2526 <1> ; entered in PM except for installdpmi 2527 <1> ; then the debugger thinks that the 2528 <1> ; SegSel fields should be segments. 2529 <1> ; It won't re-initialise them because 2530 <1> ; according to the flag used by run, 2531 <1> ; it was last running in 86 Mode. 2532 <1> ; So for now just hack them back. 2533 00005BC3 BE[DE88] <1> mov si, convsegs 2534 <1> @@: 2535 00005BC6 AD <1> lodsw 2536 00005BC7 97 <1> xchg ax, di 2537 00005BC8 FF7502 <1> push word [di + soaSegment] 2538 00005BCB 8F05 <1> pop word [di + soaSegSel] 2539 00005BCD 81FE[E688] <1> cmp si, convsegs.end_fixed 2540 00005BD1 72F3 <1> jb @B 2541 <1> 2542 <1> d4 call d4message 2543 <1> d4 asciz "In installdpmi_code end",13,10 2544 <1> 2545 00005BD3 5B <1> pop bx 2546 00005BD4 58 <1> pop ax 2547 00005BD5 8ED0 <1> mov ss, ax 2548 00005BD7 89DC <1> mov sp, bx ; return to user stack 2549 <1> 2550 00005BD9 07 <1> pop es 2551 00005BDA 1F <1> pop ds 2552 00005BDB 9D <1> popf 2553 00005BDC 61 <1> popa 2554 00005BDD CB <1> retf 2555 <1> 2556 <1> .fataldpmierr: 2557 <1> d4 call d4message 2558 <1> d4 asciz "In installdpmi_code.fataldpmierr",13,10 2559 00005BDE B8FF4C <1> mov ax, 4CFFh 2560 00005BE1 CD21 <1> int 21h 2070 %include "pmentry.asm" 2071 <1> 2072 <1> %if 0 2073 <1> 2074 <1> lDebugX PM entrypoints 2075 <1> 2076 <1> Copyright (C) 1995-2003 Paul Vojta 2077 <1> Copyright (C) 2008-2021 C. Masloch 2078 <1> 2079 <1> Usage of the works is permitted provided that this 2080 <1> instrument is retained with the works, so that any entity 2081 <1> that uses the works is notified of this instrument. 2082 <1> 2083 <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 2084 <1> 2085 <1> %endif 2086 <1> 2087 <1> 2088 <1> usesection lDEBUG_DATA_ENTRY 2089 <1> 2090 <1> %if _CATCHPMINT214C 2091 <1> pmint21: 2092 00008A0E 80FC4C <1> cmp ah, 4Ch 2093 00008A11 750C <1> jne .next_no_pop 2094 00008A13 1E <1> push ds 2095 00008A14 2E8E1E[D488] <1> mov ds, word [cs:dssel] 2096 00008A19 E8CAF6 <1> call entry_to_code_sel 2097 00008A1C [E35B] <1> dw pmint21_4C_code 2098 <1> 2099 <1> .next: 2100 00008A1E 1F <1> pop ds 2101 <1> .next_no_pop: 2102 <1> %ifn _ONLYNON386 2103 <1> ..@patch_no386_nop_DATA_ENTRY: 2104 00008A1F 66 <1> o32 2105 <1> %endif 2106 00008A20 2EFF2E[3889] <1> jmp far [cs:pmintsave.int21] 2107 <1> 2108 <1> 2109 <1> usesection lDEBUG_CODE 2110 <1> 2111 <1> code_insure_low_byte_not_0CCh 2112 <1> pmint21_4C_code: 2113 00005BE3 FF36[D688] <1> push word [cssel] 2114 00005BE7 68[1E8A] <1> push word pmint21.next 2115 <1> 2116 00005BEA 66 <1> _386_o32 2117 00005BEB 60 <1> pusha 2118 00005BEC 06 <1> push es 2119 <1> 2120 <1> ; Some code (particularly d4message) may expect us to 2121 <1> ; run on the debugger's stack, to access the data 2122 <1> ; segment. Therefore, switch stacks. 2123 00005BED 8CDA <1> mov dx, ds ; dx = ds = debugger data selector 2124 00005BEF 8CD0 <1> mov ax, ss 2125 00005BF1 66 <1> _386_o32 ; mov ebx, esp 2126 00005BF2 89E3 <1> mov bx, sp ; ax:(e)bx = stack to restore 2127 00005BF4 6631C9 <1> _386 xor ecx, ecx ; clear ecxh 2128 00005BF7 8B0E[A00A] <1> mov cx, word [run_sp] ; dx:(e)cx = our stack 2129 00005BFB 8ED2 <1> mov ss, dx 2130 <1> %ifn _ONLYNON386 2131 <1> ..@patch_no386_ds_2: ; (as for the other case in run.asm 2132 <1> ; insure to set sp directly after ss) 2133 00005BFD 66 <1> o32 ; mov esp, ecx 2134 <1> %endif 2135 00005BFE 89CC <1> mov sp, cx ; switch to our stack 2136 <1> 2137 00005C00 50 <1> push ax 2138 00005C01 66 <1> _386_o32 ; push ebx 2139 00005C02 53 <1> push bx ; save original stack, far pointer 2140 <1> 2141 00005C03 800E[9D00]08 <1> setopt [internalflags], protectedmode 2142 <1> 2143 <1> 2144 <1> ; remember that we cannot access Protected Mode any longer 2145 <1> ; (also clear modeswitched flag so resetmode is a no-op) 2146 00005C08 8026[9E00]D3 <1> clropt [internalflags], canswitchmode | switchbuffer | modeswitched 2147 <1> 2148 00005C0D 8B0E[F009] <1> mov cx, word [auxbuff_switchbuffer_size] 2149 00005C11 E30A <1> jcxz .no_switchbuffer_size_change 2150 00005C13 8E06[F609] <1> mov es, word [auxbuff_segorsel + soaSelector] 2151 00005C17 31FF <1> xor di, di ; es:di -> auxbuff switchbuffer 2152 00005C19 B020 <1> mov al, 32 2153 00005C1B F3AA <1> rep stosb ; fill with blanks (for WHILE) 2154 <1> .no_switchbuffer_size_change: 2155 00005C1D 8326[F009]00 <1> and word [auxbuff_switchbuffer_size], 0 2156 <1> 2157 00005C22 16 <1> push ss 2158 00005C23 07 <1> pop es 2159 <1> 2160 00005C24 E8E4E8 <1> call pm_reset_handlers 2161 <1> 2162 <1> 2163 00005C27 66 <1> _386_o32 2164 00005C28 5B <1> pop bx 2165 00005C29 58 <1> pop ax ; ax:(e)bx = original stack 2166 00005C2A 8ED0 <1> mov ss, ax 2167 <1> %ifn _ONLYNON386 2168 <1> ..@patch_no386_ds_3: ; (as for the other case above 2169 <1> ; insure to set sp directly after ss) 2170 00005C2C 66 <1> o32 ; mov esp, ebx 2171 <1> %endif 2172 00005C2D 89DC <1> mov sp, bx ; return to user stack 2173 <1> 2174 00005C2F 07 <1> pop es 2175 00005C30 66 <1> _386_o32 2176 00005C31 61 <1> popa 2177 <1> 2178 00005C32 CB <1> retf ; jump to cssel:pmint21.next 2179 <1> %endif 2180 <1> 2181 <1> 2182 <1> usesection lDEBUG_DATA_ENTRY 2183 <1> 2184 <1> struc exceptionframe16 2185 00000000 <1> resw 8 ; pusha 2186 00000010 ???? <1> fr16_ds: resw 1 ; push ds 2187 00000012 ???????? <1> resw 2 ; 16-bit return address to DPMI host 2188 00000016 ???? <1> resw 1 ; error code 2189 00000018 ???? <1> fr16_ip: resw 1 2190 0000001A ???? <1> fr16_cs: resw 1 2191 0000001C ???? <1> fr16_fl: resw 1 2192 0000001E ???? <1> fr16_sp: resw 1 2193 00000020 ???? <1> fr16_ss: resw 1 2194 <1> endstruc 2195 <1> 2196 <1> struc exceptionframe32 2197 00000000 <1> resd 8 ; pushad 2198 00000020 ???? <1> resw 1 ; stack alignment 2199 00000022 ???? <1> fr32_ds: resw 1 ; push ds 2200 00000024 ???????????????? <1> resd 2 ; 32-bit return address to DPMI host 2201 0000002C ???????? <1> resd 1 ; error code 2202 00000030 ???????? <1> fr32_eip: resd 1 2203 00000034 ???????? <1> fr32_cs: resd 1 2204 00000038 ???????? <1> fr32_efl: resd 1 2205 0000003C ???????? <1> fr32_esp: resd 1 2206 00000040 ???????? <1> fr32_ss: resd 1 2207 <1> endstruc 2208 <1> 2209 <1> %assign EXC_ENTRY_FIRST 1 2210 <1> %macro exc_entry 2.nolist 2211 <1> %ifn EXC_ENTRY_FIRST 2212 <1> jmp strict short exc 2213 <1> %endif 2214 <1> exc %+ %1 %+ : 2215 <1> push ds 2216 <1> push %2 2217 <1> %if EXC_ENTRY_FIRST 2218 <1> exc_second: equ $ + 2 ; + 2 for short jump 2219 <1> %endif 2220 <1> %assign EXC_ENTRY_FIRST 0 2221 <1> %endmacro 2222 <1> 2223 00008A25 00 <1> align 2, db 0 2224 <1> ; Exception handlers. 2225 <1> ; These are the entry into the debugger in protected mode. 2226 <1> ; The address difference between exc_first and exc_second 2227 <1> ; is assumed to be the same for all the entries. This is 2228 <1> ; above, in installdpmi, as well as in run.asm run. These 2229 <1> ; are where the exception handlers are installed. 2230 <1> 2231 <1> exc_first: 2232 <1> %if _CATCHEXC00 2233 00008A26 1E68[627A] <1> exc_entry 00, int0msg 2234 <1> %endif 2235 <1> %if _CATCHEXC01 2236 00008A2A EB221E68[717A] <1> exc_entry 01, int1msg 2237 <1> %endif 2238 <1> %if _CATCHEXC03 2239 00008A30 EB1C1E68[947A] <1> exc_entry 03, int3msg 2240 <1> %endif 2241 <1> %if _CATCHEXC06 2242 00008A36 EB161E68[7A7B] <1> exc_entry 06, exc6msg 2243 <1> %endif 2244 <1> %if _CATCHEXC0C 2245 00008A3C EB101E68[917B] <1> exc_entry 0C, excCmsg 2246 <1> %endif 2247 <1> %if _CATCHEXC0D 2248 00008A42 EB0A1E68[9F7B] <1> exc_entry 0D, excDmsg 2249 <1> %endif 2250 <1> %if _CATCHEXC0E 2251 00008A48 EB041E68[CC7B] <1> exc_entry 0E, excEmsg 2252 <1> %endif 2253 <1> exc: 2254 00008A4E 2E8E1E[D488] <1> mov ds, word [cs:dssel] 2255 00008A53 8F06[D80B] <1> pop word [run_int] 2256 <1> times 1 - (($ - $$) & 1) nop ; align in-code parameter 2257 00008A57 E88CF6 <1> call entry_to_code_sel 2258 00008A5A [335C] <1> dw exc_code 2259 <1> 2260 <1> 2261 <1> usesection lDEBUG_CODE 2262 <1> 2263 <1> code_insure_low_byte_not_0CCh 2264 <1> exc_code: 2265 00005C33 803E[DA88]00 <1> cmp byte [dpmi32], 0 2266 00005C38 7503E98D00 <1> jz exc16 2267 <1> 2268 <1> [cpu 386] 2269 <1> exc32: 2270 00005C3D 50 <1> push ax ; stack alignment 2271 00005C3E 6660 <1> pushad 2272 00005C40 6689E5 <1> mov ebp, esp 2273 00005C43 66678B4530 <1> mov eax, dword [ ebp + fr32_eip ] 2274 00005C48 678B5D34 <1> mov bx, word [ ebp + fr32_cs ] 2275 00005C4C 66678B4D38 <1> mov ecx, dword [ ebp + fr32_efl ] 2276 00005C51 66678B553C <1> mov edx, dword [ ebp + fr32_esp ] 2277 00005C56 678B7540 <1> mov si, word [ ebp + fr32_ss ] 2278 00005C5A 678C4D34 <1> mov word [ ebp + fr32_cs ], cs 2279 00005C5E 678C5D40 <1> mov word [ ebp + fr32_ss ], ds 2280 00005C62 803E[E60A]00 <1> cmp byte [ bInDbg ], 0 ; did the exception occur inside DEBUG? 2281 00005C67 7422 <1> je @F ; no --> 2282 <1> 2283 <1> ; inside debugger 2284 <1> %if _EXCCSIP 2285 00005C69 A3[B488] <1> mov word [exception_csip], ax 2286 00005C6C 891E[B688] <1> mov word [exception_csip + 2], bx 2287 <1> ; render CS:IP if internal GPF 2288 <1> %endif 2289 00005C70 6667C74530- <1> mov dword [ ebp + fr32_eip ], debuggerexception 2289 00005C75 [003E0000] <1> 2290 00005C79 660FB706[940A] <1> movzx eax, word [ savesp ] 2291 00005C7F 666789453C <1> mov dword [ ebp + fr32_esp ], eax 2292 00005C84 67806539FE <1> clropt [ ebp + fr32_efl ], 100h ; reset TF 2293 00005C89 EB39 <1> jmp short @FF 2294 <1> 2295 <1> @@: ; inside debuggee 2296 00005C8B 800E[9D00]08 <1> setopt [internalflags], protectedmode 2297 00005C90 6667C74530- <1> mov dword [ ebp + fr32_eip ], intrtn2_code 2297 00005C95 [66430000] <1> 2298 00005C99 67806539FC <1> clropt [ ebp + fr32_efl ], 300h ; reset IF + TF 2299 00005C9E 6667C7453C- <1> mov dword [ ebp + fr32_esp ], reg_ss 2299 00005CA3 [8C0C0000] <1> 2300 00005CA7 66A3[9C0C] <1> mov dword [ reg_eip ], eax 2301 00005CAB 891E[900C] <1> mov word [ reg_cs ], bx 2302 <1> ; mov dword [ reg_efl ], ecx ; (eflh is saved in intrtn2_code) 2303 00005CAF 890E[A00C] <1> mov word [ reg_efl ], cx 2304 00005CB3 668916[740C] <1> mov dword [ reg_esp ], edx 2305 00005CB8 8936[8C0C] <1> mov word [ reg_ss ], si 2306 00005CBC 67FF7522 <1> push word [ ebp + fr32_ds ] 2307 00005CC0 8F06[840C] <1> pop word [ reg_ds ] 2308 <1> 2309 <1> @@: 2310 00005CC4 6661 <1> popad 2311 00005CC6 58 <1> pop ax ; stack alignment 2312 00005CC7 1F <1> pop ds 2313 00005CC8 66CB <1> o32 retf 2314 <1> 2315 <1> __CPU__ 2316 <1> exc16: 2317 00005CCA 60 <1> pusha 2318 00005CCB 89E5 <1> mov bp, sp 2319 00005CCD 8B4618 <1> mov ax, word [ bp + fr16_ip ] 2320 00005CD0 8B5E1A <1> mov bx, word [ bp + fr16_cs ] 2321 00005CD3 8B4E1C <1> mov cx, word [ bp + fr16_fl ] 2322 00005CD6 8B561E <1> mov dx, word [ bp + fr16_sp ] 2323 00005CD9 8B7620 <1> mov si, word [ bp + fr16_ss ] 2324 00005CDC 8C4E1A <1> mov word [ bp + fr16_cs ], cs 2325 00005CDF 8C5E20 <1> mov word [ bp + fr16_ss ], ds 2326 00005CE2 803E[E60A]00 <1> cmp byte [ bInDbg ], 0 ; did the exception occur inside DEBUG? 2327 00005CE7 7418 <1> je isdebuggee16 2328 <1> %if _EXCCSIP 2329 00005CE9 A3[B488] <1> mov word [exception_csip], ax 2330 00005CEC 891E[B688] <1> mov word [exception_csip + 2], bx 2331 <1> ; render CS:IP if internal GPF 2332 <1> %endif 2333 00005CF0 C74618[003E] <1> mov word [ bp + fr16_ip ], debuggerexception 2334 00005CF5 A1[940A] <1> mov ax, word [ savesp ] 2335 00005CF8 89461E <1> mov word [ bp + fr16_sp ], ax 2336 00005CFB 80661DFE <1> clropt [ bp + fr16_fl ], 100h ; reset TF 2337 00005CFF EB2D <1> jmp short isdebugger16 2338 <1> isdebuggee16: 2339 00005D01 800E[9D00]08 <1> setopt [internalflags], protectedmode 2340 00005D06 C74618[6643] <1> mov word [ bp + fr16_ip ], intrtn2_code 2341 00005D0B 80661DFC <1> clropt [ bp + fr16_fl ], 300h ; reset IF + TF 2342 00005D0F C7461E[8C0C] <1> mov word [ bp + fr16_sp ], reg_ss 2343 00005D14 A3[9C0C] <1> mov word [ reg_eip ], ax 2344 00005D17 891E[900C] <1> mov word [ reg_cs ], bx 2345 00005D1B 890E[A00C] <1> mov word [ reg_efl ], cx 2346 00005D1F 8916[740C] <1> mov word [ reg_esp ], dx 2347 00005D23 8936[8C0C] <1> mov word [ reg_ss ], si 2348 00005D27 FF7610 <1> push word [ bp + fr16_ds ] 2349 00005D2A 8F06[840C] <1> pop word [ reg_ds ] 2350 <1> isdebugger16: 2351 00005D2E 61 <1> popa 2352 00005D2F 1F <1> pop ds 2353 00005D30 CB <1> retf 2354 <1> 2355 <1> 2356 <1> usesection lDEBUG_DATA_ENTRY 2357 <1> 2358 <1> i23pm: 2359 <1> %if 1 2360 00008A5C 1E <1> push ds 2361 00008A5D 2E8E1E[D488] <1> mov ds, word [cs:dssel] 2362 00008A62 800E[EB0B]02 <1> setopt [serial_flags], sf_ctrl_c 2363 00008A67 1F <1> pop ds 2364 <1> %endif 2365 00008A68 2E803E[DA88]00 <1> cmp byte [ cs:dpmi32 ], 0 ; ! always NC 2366 00008A6E 7404 <1> je .retfw_2 2367 <1> [cpu 386] 2368 00008A70 66CA0400 <1> retfd 4 ; (NC) 2369 <1> __CPU__ 2370 <1> .retfw_2: 2371 00008A74 CA0200 <1> retfw 2 ; (NC) 2372 <1> 2373 <1> i24pm: 2374 00008A77 B003 <1> mov al, 03h ; fail 2375 00008A79 2E803E[DA88]00 <1> cmp byte [ cs:dpmi32 ], 0 2376 00008A7F 7401 <1> je .iret16 2377 00008A81 66 <1> o32 ; iretd 2378 <1> .iret16: 2379 00008A82 CF <1> iret 2071 2072 2073 usesection lDEBUG_CODE 2074 2075 resetmode_and_test_d_b_bit: 2076 %if _PM 2077 00005D31 E843DB call resetmode 2078 %endif 2079 2080 ; Test if bx is a 32-bit selector 2081 ; (as opposed to a 16-bit selector or a segment) 2082 ; 2083 ; INP: bx = selector (PM) or segment (86M) 2084 ; OUT: NZ = 32-bit 2085 ; ZR = 16-bit (always if 86M) 2086 ; NC 2087 ; REM: This checks whether a code segment's D bit or 2088 ; a stack segment's B bit is set. This operation 2089 ; is not meaningful otherwise. 2090 test_d_b_bit: 2091 00005D34 E89234 _386 call ispm 2092 00005D37 7403 _386 jz .pm ; 386 and PM, check selector --> 2093 ; not PM or no 386 2094 .ZR: 2095 00005D39 38C0 cmp al, al ; ZR, NC 2096 00005D3B C3 retn 2097 .pm: 2098 [cpu 386] 2099 00005D3C 6650 push eax 2100 00005D3E 6631C0 xor eax, eax ; use rights = 0 if inaccessible 2101 00005D41 660F02C3 lar eax, ebx ; access rights 2102 ; eax is unchanged if the access rights are inaccessible 2103 ; (and NZ is set in that case) 2104 00005D45 66A900004000 test eax, 400000h ; test bit (NC) 2105 00005D4B 6658 pop eax 2106 00005D4D C3 retn 2107 __CPU__ 2108 2109 2110 ; Test if selector in bx has a limit beyond 64 KiB - 1 B 2111 ; 2112 ; INP: bx = selector (PM) or segment (86M) 2113 ; OUT: NZ = limit above 64 KiB - 1 B 2114 ; ZR = limit below 64 KiB (always if 86M) 2115 ; NC 2116 test_high_limit: 2117 00005D4E E87834 _386 call ispm 2118 00005D51 7402 _386 jz .pm ; 386 and PM, check selector --> 2119 ; not PM or no 386 2120 00005D53 EBE4 jmp test_d_b_bit.ZR 2121 2122 .pm: 2123 [cpu 386] 2124 00005D55 6650 push eax 2125 00005D57 6631C0 xor eax, eax ; use limit = 0 if inaccessible 2126 00005D5A 660F03C3 lsl eax, ebx ; segment limit 2127 ; eax is unchanged if the segment limit is inaccessible 2128 ; (and NZ is set in that case) 2129 00005D5E 66A90000FFFF test eax, 0FFFF_0000h ; (NC) ZR if low limit, else NZ 2130 00005D64 6658 pop eax 2131 00005D66 C3 retn 2132 __CPU__ 2133 2134 subcpureset ; subcpu used in pminit.asm 2135 %endif ; _PM 2136 2137 %if _NOEXTENDER 2138 ; When we support non-extended DPMI, some calls to Int21 2139 ; are (extended) Int21 calls and some are (not extended) 2140 ; calls down to the real mode Int21. doscall is a macro 2141 ; that will always call the non-extended Int21. 2142 2143 ; Execute a non-extended DOS call 2144 _doscall: 2145 00005D67 9C pushf 2146 00005D68 E85E34 call ispm 2147 00005D6B 750C jnz .rm 2148 subcpu 286 2149 ; Execute a non-extended DOS call from PM 2150 00005D6D 9D popf 2151 .pm: 2152 00005D6E 36FF36[A60A] push word [ss:pspdbg] 2153 00005D73 6A21 push 21h 2154 00005D75 E8A335 call intcall 2155 00005D78 C3 retn 2156 subcpureset 2157 .rm: 2158 00005D79 9D popf 2159 00005D7A E90F35 jmp _int21 2160 %endif 2161 2162 %if _PM 2163 ; For branches other than symbolic, here's selector_to_segment 2164 ; (as used by the puts in expr.asm). Picked from symsnip 2165 ; binsrch.asm at revision 9c232415d568. 2166 ; INP: word [ss:sp] = selector to access 2167 ; OUT: word [ss:sp] = segment value to use for access 2168 ; CHG: - 2169 selector_to_segment: 2170 lframe near 2171 lpar word, in_selector_out_segment 2172 lpar_return 2173 00005D7D 5589E5 lenter 2174 2175 00005D80 E84634 call ispm ; is it PM ? 2176 00005D83 751B jnz .ret ; no, 86M --> (selector == segment) 2177 2178 subcpu 286 2179 00005D85 50 push ax 2180 00005D86 53 push bx 2181 00005D87 51 push cx 2182 00005D88 52 push dx 2183 2184 00005D89 8B5E04 mov bx, word [bp + ?in_selector_out_segment] 2185 00005D8C B80600 mov ax, 6 2186 00005D8F CD31 int 31h ; get segment base to cx:dx 2187 00005D91 C1EA04 shr dx, 4 2188 00005D94 C1E10C shl cx, 12 2189 00005D97 09CA or dx, cx 2190 00005D99 895604 mov word [bp + ?in_selector_out_segment], dx 2191 2192 00005D9C 5A pop dx 2193 00005D9D 59 pop cx 2194 00005D9E 5B pop bx 2195 00005D9F 58 pop ax 2196 subcpureset 2197 2198 .ret: 2199 00005DA0 5D lleave 2200 00005DA1 C3 lret 2201 %endif 2202 2203 2204 ; support functions for symbols.asm 2205 2206 2207 ; INP: ds:dx -> message 2208 ; cx = length 2209 ; CHG: - 2210 ; STT: ds, es don't care 2211 disp_message_length_cx: 2212 00005DA2 50 push ax 2213 00005DA3 53 push bx 2214 00005DA4 51 push cx 2215 00005DA5 52 push dx 2216 00005DA6 06 push es 2217 00005DA7 1E push ds 2218 00005DA8 1E push ds 2219 00005DA9 07 pop es ; es:dx -> message, cx = length 2220 00005DAA 16 push ss 2221 00005DAB 1F pop ds ; ds = ss (required for puts) 2222 00005DAC E89A5C call puts 2223 00005DAF 1F pop ds 2224 00005DB0 07 pop es 2225 00005DB1 5A pop dx 2226 00005DB2 59 pop cx 2227 00005DB3 5B pop bx 2228 00005DB4 58 pop ax 2229 00005DB5 C3 retn 2230 2231 ; INP: ds:dx -> message, ASCIZ 2232 ; CHG: - 2233 ; STT: ds, es don't care 2234 disp_message: 2235 00005DB6 06 push es 2236 00005DB7 1E push ds 2237 00005DB8 07 pop es ; es:dx -> message 2238 00005DB9 E80060 call putsz ; (sets up ds = ss internally) 2239 00005DBC 07 pop es 2240 00005DBD C3 retn 2241 2242 ; INP: al = character to display 2243 ; CHG: - 2244 ; STT: ds, es don't care 2245 disp_al: equ putc 2246 2247 2248 ; Display number in ax hexadecimal, always 4 digits 2249 ; 2250 ; INP: ax = number 2251 ; OUT: displayed using disp_al 2252 ; CHG: none 2253 disp_ax_hex: 2254 00005DBE 86C4 xchg al, ah 2255 00005DC0 E80200 call disp_al_hex 2256 00005DC3 86C4 xchg al, ah 2257 disp_al_hex: 2258 00005DC5 51 push cx 2259 00005DC6 B104 mov cl, 4 2260 00005DC8 D2C0 rol al, cl 2261 00005DCA E80300 call disp_al_nybble_hex 2262 00005DCD D2C0 rol al, cl 2263 00005DCF 59 pop cx 2264 disp_al_nybble_hex: 2265 00005DD0 50 push ax 2266 00005DD1 240F and al, 0Fh 2267 00005DD3 0430 add al, '0' 2268 00005DD5 3C39 cmp al, '9' 2269 00005DD7 7602 jbe @F 2270 00005DD9 0407 add al, -'9' -1 +'A' 2271 @@: 2272 00005DDB E80160 call disp_al 2273 00005DDE 58 pop ax 2274 00005DDF C3 retn 2275 2276 2277 ; Display number in ax decimal 2278 ; 2279 ; INP: ax = number 2280 ; OUT: displayed using disp_al 2281 ; CHG: none 2282 disp_ax_dec: ; ax (no leading zeros) 2283 00005DE0 53 push bx 2284 00005DE1 31DB xor bx, bx 2285 .pushax: 2286 00005DE3 52 push dx 2287 00005DE4 50 push ax 2288 00005DE5 08DB or bl, bl 2289 00005DE7 7405 jz .nobl 2290 00005DE9 80EB05 sub bl, 5 2291 00005DEC F6DB neg bl 2292 .nobl: 2293 00005DEE 51 push cx 2294 00005DEF B91027 mov cx, 10000 2295 00005DF2 E81B00 call .divide_out 2296 00005DF5 B9E803 mov cx, 1000 2297 00005DF8 E81500 call .divide_out 2298 00005DFB B96400 mov cx, 100 2299 00005DFE E80F00 call .divide_out 2300 00005E01 B10A mov cl, 10 2301 00005E03 E80A00 call .divide_out 2302 ; (Divisor 1 is useless) 2303 00005E06 0430 add al, '0' 2304 00005E08 E8D45F call disp_al 2305 00005E0B 59 pop cx 2306 00005E0C 58 pop ax 2307 00005E0D 5A pop dx 2308 00005E0E 5B pop bx ; Caller's register 2309 00005E0F C3 retn 2310 2311 2312 ; INP: ax = number 2313 ; cx = divisor 2314 ; OUT: ax = remainder of operation 2315 ; result displayed 2316 .divide_out: 2317 00005E10 52 push dx 2318 00005E11 31D2 xor dx, dx 2319 00005E13 F7F1 div cx ; 0:ax / cx 2320 00005E15 52 push dx ; remainder 2321 00005E16 FECB dec bl 2322 00005E18 7503 jnz .nobl2 2323 00005E1A 80CF01 or bh, 1 2324 .nobl2: 2325 00005E1D 08C7 or bh, al 2326 00005E1F 7405 jz .leadingzero 2327 00005E21 0430 add al, '0' 2328 00005E23 E8B95F call disp_al ; display result 2329 .leadingzero: 2330 00005E26 58 pop ax ; remainder 2331 00005E27 5A pop dx 2332 00005E28 C3 retn 2333 2334 2335 ; C command - compare bytes. 2336 cc: 2337 00005E29 E8D148 call parsecm ; parse arguments 2338 2339 ; To make the 16-bit 64 KiB compare hack below work, the 2340 ; full ecx mustn't be increased here for 16-bit segments. 2341 ; The passed ecx isn't higher than FFFFh for 16-bit segments, 2342 ; and a value of 0001_0000h needs to be passed as zero to 2343 ; the hack anyway. 2344 %if _PM 2345 00005E2C 36803E[DC88]00 cmp byte [ss:bAddr32], 0 2346 00005E32 7407 je .16 2347 [cpu 386] 2348 00005E34 6641 inc ecx 2349 00005E36 7504 jnz cc1 2350 00005E38 E9A346 jmp error 2351 __CPU__ 2352 .16: 2353 %endif 2354 00005E3B 41 inc cx 2355 cc1: 2356 00005E3C 1E push ds 2357 00005E3D 06 push es 2358 00005E3E 16 push ss 2359 00005E3F 1F pop ds ; ds := cs 2360 00005E40 E80848 call dohack ; do the interrupt pointer hack 2361 00005E43 07 pop es 2362 00005E44 1F pop ds 2363 %if _PM 2364 00005E45 36803E[DC88]00 cmp byte [ss:bAddr32], 0 2365 00005E4B 740E jz .cmp16 2366 00005E4D F367A6 a32 repe cmpsb 2367 00005E50 678A56FF mov dl, byte [esi-1] 2368 00005E54 26678A77FF mov dh, byte [es:edi-1] 2369 00005E59 EB0D jmp short .cmpdone 2370 .cmp16: 2371 %endif 2372 ; The following 3 instructions make a hack to support 64 KiB 2373 ; compare. The only time we get here with cx = 0 is the first 2374 ; iteration for a 64 KiB compare. In that case, dec cx results 2375 ; in FFFFh making repe cmpsb work. The single cmpsb will either 2376 ; jump the repe cmpsb (if it found a mismatch) or not jump it. 2377 ; The repe cmpsb might be executed with cx = 0, but will then 2378 ; not change anything including the flags so it works. 2379 00005E5B 49 dec cx 2380 00005E5C A6 cmpsb 2381 00005E5D 7502 jne .skip 2382 00005E5F F3A6 repe cmpsb ; start comparing 2383 .skip: 2384 00005E61 8A54FF mov dl, byte [si-1] ; save the possibly errant characters 2385 00005E64 268A75FF mov dh, byte [es:di-1] 2386 .cmpdone: 2387 00005E68 9F lahf 2388 00005E69 1E push ds 2389 00005E6A 06 push es 2390 00005E6B 16 push ss 2391 00005E6C 1F pop ds 2392 00005E6D E80F48 call unhack ; undo the interrupt pointer hack 2393 00005E70 07 pop es 2394 00005E71 1F pop ds 2395 00005E72 9E sahf 2396 00005E73 7475 je cc2 ; if we're done 2397 00005E75 06 push es 2398 00005E76 16 push ss 2399 00005E77 07 pop es 2400 00005E78 66 _386_PM_o32 ; mov ebx, edi 2401 00005E79 89FB mov bx, di 2402 00005E7B BF[0E08] mov di, line_out 2403 00005E7E 8CD8 mov ax, ds 2404 00005E80 E8835B call hexword 2405 00005E83 B03A mov al, ':' 2406 00005E85 AA stosb 2407 00005E86 66 _386_PM_o32 ; mov eax, esi 2408 00005E87 89F0 mov ax, si 2409 00005E89 66 _386_PM_o32 ; dec eax 2410 00005E8A 48 dec ax 2411 %if _PM 2412 00005E8B 36803E[DC88]00 cmp byte [ss:bAddr32], 0 2413 00005E91 7403 jz .16si 2414 00005E93 E8645B call hexword_high 2415 .16si: 2416 %endif 2417 00005E96 E86D5B call hexword 2418 00005E99 B82020 mov ax, 32<<8|32 2419 00005E9C AB stosw 2420 00005E9D 88D0 mov al, dl 2421 00005E9F E86B5B call hexbyte 2422 00005EA2 B82020 mov ax, 32<<8|32 2423 00005EA5 AB stosw 2424 00005EA6 88F0 mov al, dh 2425 00005EA8 E8625B call hexbyte 2426 00005EAB B82020 mov ax, 32<<8|32 2427 00005EAE AB stosw 2428 00005EAF 58 pop ax 2429 00005EB0 50 push ax 2430 00005EB1 E8525B call hexword 2431 00005EB4 B03A mov al, ':' 2432 00005EB6 AA stosb 2433 00005EB7 66 _386_PM_o32 ; mov eax, ebx 2434 00005EB8 89D8 mov ax, bx 2435 00005EBA 66 _386_PM_o32 ; dec eax 2436 00005EBB 48 dec ax 2437 %if _PM 2438 00005EBC 36803E[DC88]00 cmp byte [ss:bAddr32], 0 2439 00005EC2 7403 jz .16bx 2440 00005EC4 E8335B call hexword_high 2441 .16bx: 2442 %endif 2443 00005EC7 E83C5B call hexword 2444 00005ECA 1E push ds 2445 00005ECB 16 push ss 2446 00005ECC 1F pop ds 2447 00005ECD 53 push bx 2448 00005ECE 51 push cx 2449 00005ECF E86C5B call putsline_crlf 2450 00005ED2 59 pop cx 2451 00005ED3 5F pop di 2452 00005ED4 1F pop ds 2453 00005ED5 07 pop es 2454 %if _PM 2455 00005ED6 36803E[DC88]00 cmp byte [ss:bAddr32],0 2456 00005EDC 7406 jz cc1_6 2457 [cpu 386] 2458 00005EDE 67E309 jecxz cc2 2459 __CPU__ 2460 cc1_j1: 2461 00005EE1 E958FF jmp cc1 2462 cc1_6: 2463 %else 2464 cc1_j1 equ cc1 2465 %endif 2466 %if 0 2467 _386_PM_o32 ; inc ecx 2468 inc cx 2469 _386_PM_a32 ; loopd cc1 2470 loop cc1 ; if not done yet 2471 %else 2472 00005EE4 67 _386_PM_a32 ; jecxz cc2 2473 00005EE5 E303 jcxz cc2 2474 00005EE7 E952FF jmp cc1 ; if not done yet 2475 %endif 2476 cc2: 2477 00005EEA 16 push ss ; restore segment registers 2478 00005EEB 1F pop ds 2479 00005EEC 16 push ss 2480 00005EED 07 pop es 2481 00005EEE C3 retn 2482 2483 2484 %if _BOOTLDR 2485 %include "boot.asm" 2486 <1> 2487 <1> %if 0 2488 <1> 2489 <1> lDebug "boot" commands - boot loading 2490 <1> 2491 <1> Copyright (C) 2008-2017 C. Masloch 2492 <1> 2493 <1> Usage of the works is permitted provided that this 2494 <1> instrument is retained with the works, so that any entity 2495 <1> that uses the works is notified of this instrument. 2496 <1> 2497 <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 2498 <1> 2499 <1> %endif 2500 <1> 2501 <1> 2502 <1> usesection lDEBUG_DATA_ENTRY 2503 <1> 2504 00008A83 00 <1> align 16, db 0 2505 <1> load_unit_flags: 2506 00008A90 00 <1> times 128 db _LUF_DEFAULT_DISKETTE 2507 00008B10 00 <1> times 128 db _LUF_DEFAULT_HARDDISK 2508 <1> 2509 <1> align 16, db 0 2510 00008B90 00 <1> load_partition_table: times 16 * 4 db 0 2511 <1> .end: 2512 <1> 2513 <1> align 16, db 0 2514 <1> ; Data passed to us from loader (in case we booted) 2515 <1> loaddata_loadedfrom: 2516 00008BD0 00 <1> times (-LOADDATA + bsBPB + ebpbNew + BPBN_size) db 0 2517 <1> 2518 00008C4A 00 <1> align 16, db 0 2519 <1> load_data_lowest: 2520 00008C50 00 <1> times LOADDATA3_size db 0 2521 <1> ; data used to access storage 2522 <1> load_data: 2523 00008C60 00 <1> times (-LOADDATA2 + bsBPB + ebpbNew + BPBN_size) db 0 2524 00008CEA 00 <1> align 16, db 0 2525 <1> load_current_settings: 2526 <1> istruc LOADSETTINGS 2527 00008CF0 0000 <1> at lsKernelName, load_kernelname_default: dw 0 2528 00008CF2 0000 <1> at lsAddName, load_addname_default: dw 0 2529 00008CF4 0000 <1> at lsMinPara, load_minpara: dw 0 2530 00008CF6 0000 <1> at lsMaxPara, load_maxpara: dw 0 2531 00008CF8 0000 <1> at lsOptions, load_options: dw 0 2532 00008CFA 0000 <1> at lsSegment, load_loadseg: dw 0 2533 00008CFC 00000000 <1> at lsEntry, load_entrypoint: dd 0 2534 00008D00 00000000 <1> at lsBPB, load_bpb: dd 0 2535 00008D04 0000 <1> at lsCheckOffset, load_check_offset: dw 0 2536 00008D06 0000 <1> at lsCheckValue, load_check_value: dw 0 2537 <1> at lsName 2538 <1> ; iend 2539 <1> %pop ; (pop off the istruc context) 2540 <1> 2541 <1> %if _INPUT_FILE_BOOT 2542 00008D08 00 <1> align 16, db 0 2543 <1> load_yy_direntry: 2544 00008D10 00 <1> times DIRENTRY_size db 0 2545 <1> 2546 <1> LOAD_INPUT_FILE_SIZE equ fromparas(paras(-LOADDATA3 + bsBPB + ebpbNew + BPBN_size)) 2547 <1> align 16, db 0 2548 <1> load_input_file: 2549 00008D30 00 <1> times _INPUT_FILE_BOOT * LOAD_INPUT_FILE_SIZE db 0 2550 <1> .active: 2551 00008FB0 0000 <1> dw 0 2552 <1> .goto_offset: 2553 00008FB2 0000 <1> dw 0 2554 <1> %endif 2555 <1> 2556 <1> align 4, db 0 2557 00008FB4 00000000 <1> load_bpb_dest: dd 0 2558 <1> load_sectors: equ load_data - LOADDATA2 + bsBPB + bpbCHSSectors 2559 <1> load_heads: equ load_data - LOADDATA2 + bsBPB + bpbCHSHeads 2560 <1> load_sectorsize: equ load_data - LOADDATA2 + bsBPB + bpbBytesPerSector 2561 <1> load_sectorsizepara: equ load_data - LOADDATA2 + ldParaPerSector 2562 <1> load_sectorseg: equ load_data - LOADDATA2 + ldSectorSeg 2563 00008FB8 00000000 <1> load_partition_sector: dd 0 2564 <1> load_ldp_sector: equ loaddata_loadedfrom - LOADDATA + bsBPB + bpbHiddenSectors 2565 <1> ; load_sdp_sector: equ load_data - LOADDATA2 + bsBPB + bpbHiddenSectors 2566 00008FBC 0000 <1> load_partition_cycle: dw 0 2567 00008FBE 0000 <1> load_cmdline: dw 0 2568 <1> load_ldflags: equ load_data - LOADDATA2 + ldFlags 2569 <1> load_unit: equ load_data - LOADDATA2 + bsBPB + ebpbNew + bpbnBootUnit 2570 00008FC0 0000 <1> load_partition_entry: dw 0 2571 00008FC2 00 <1> load_partition: db 0 2572 00008FC3 00 <1> load_current_partition: db 0 2573 00008FC4 00 <1> load_found_partition: db 0 2574 00008FC5 00 <1> load_check_dir_attr: db 0 2575 00008FC6 00 <1> load_sector_alt: db 0 2576 <1> 2577 00008FC7 00 <1> align 4, db 0 2578 00008FC8 00 <1> load_kernel_name: times 11 + 1 db 0 2579 <1> align 2, db 0 2580 <1> ; load_kernelname_default:dw 0 2581 <1> ; ASCIZ filename for if load_kernelname_input terminates in '/' 2582 00008FD4 0000 <1> load_kernelname_input: dw 0 2583 <1> ; input (ASCIZ '/'-terminated pathnames + optional filename) 2584 00008FD6 0000 <1> load_kernelname_next: dw 0 2585 <1> ; next element in ASCIZ load_kernelname_input, 2586 <1> ; empty string if pathname terminated in '/' 2587 <1> ; load_addname_default: dw 0 2588 00008FD8 0000 <1> load_addname_input: dw 0 2589 00008FDA 0000 <1> load_addname_next: dw 0 2590 <1> %if _INPUT_FILE_BOOT 2591 00008FDC 0000 <1> load_yyname_input: dw 0 2592 00008FDE 0000 <1> load_yyname_next: dw 0 2593 <1> %endif 2594 <1> 2595 <1> align 2, db 0 2596 00008FE0 0000 <1> load_adr_dirbuf_segment:dw 0 2597 00008FE2 0000 <1> boot_new_memsizekib: dw 0 2598 00008FE4 0000 <1> boot_old_memsizekib: dw 0 2599 00008FE6 00 <1> boot_ebdaflag: db 0 ; EBDA flag: non-zero if present 2600 <1> 2601 00008FE7 00 <1> align 4, db 0 2602 00008FE8 00000000 <1> load_readwrite_sector: dd 0 2603 00008FEC 0000 <1> load_readwrite_buffer: dw 0 2604 00008FEE 0000 <1> load_readwrite_count: dw 0 2605 00008FF0 0000 <1> load_readwrite_function:dw 0 2606 <1> 2607 <1> 2608 <1> usesection lDEBUG_CODE 2609 <1> 2610 <1> init_bootcmd: 2611 00005EEF E809A6 <1> call guard_re 2612 00005EF2 BD[908C] <1> mov bp, load_data - LOADDATA2 2613 <1> 2614 00005EF5 F606[A400]80 <1> testopt [internalflags3], dif3_partition_changed 2615 00005EFA 7413 <1> jz @F 2616 <1> 2617 00005EFC FF761E <1> push word [bp + bsBPB + bpbHiddenSectors + 2] 2618 00005EFF FF761C <1> push word [bp + bsBPB + bpbHiddenSectors] 2619 00005F02 8F06[B88F] <1> pop word [load_partition_sector] 2620 00005F06 8F06[BA8F] <1> pop word [load_partition_sector + 2] 2621 00005F0A 8026[A400]7F <1> clropt [internalflags3], dif3_partition_changed 2622 <1> @@: 2623 <1> 2624 00005F0F 31C9 <1> xor cx, cx 2625 00005F11 894E1C <1> mov [bp + bsBPB + bpbHiddenSectors + 0], cx 2626 00005F14 894E1E <1> mov [bp + bsBPB + bpbHiddenSectors + 2], cx 2627 00005F17 880E[C68F] <1> mov byte [load_sector_alt], cl 2628 00005F1B C3 <1> retn 2629 <1> 2630 <1> 2631 <1> bootcmd: 2632 <1> %if _PM 2633 00005F1C E8AA32 <1> call ispm 2634 00005F1F 750C <1> jnz .rm 2635 00005F21 BA[1A7C] <1> mov dx, nopmsupp 2636 00005F24 B80102 <1> mov ax, 0201h 2637 00005F27 E8FB45 <1> call setrc 2638 00005F2A E9895E <1> jmp putsz_error 2639 <1> .rm: 2640 <1> %endif 2641 <1> d4 call d4message 2642 <1> d4 asciz "In bootcmd",13,10 2643 <1> 2644 00005F2D E8BFFF <1> call init_bootcmd 2645 <1> 2646 00005F30 E8F959 <1> call skipcomma 2647 00005F33 4E <1> dec si 2648 00005F34 BA[6470] <1> mov dx, msg.list 2649 00005F37 E86D59 <1> call isstring? 2650 00005F3A 7503E9D304 <1> je .list 2651 <1> 2652 00005F3F BA[A163] <1> mov dx, msg.quit 2653 00005F42 E86259 <1> call isstring? 2654 00005F45 7536 <1> jne .not_quit 2655 <1> .quit: 2656 <1> %if _DOSEMU 2657 00005F47 F606[9F00]01 <1> testopt [internalflags], runningdosemu 2658 00005F4C 7407 <1> jz .quit_not_dosemu 2659 <1> 2660 00005F4E 31DB <1> xor bx, bx 2661 00005F50 B8FFFF <1> mov ax, -1 2662 00005F53 CDE6 <1> int 0E6h ; dosemu quit 2663 <1> 2664 <1> .quit_not_dosemu: 2665 <1> %endif 2666 <1> 2667 <1> ; from https://stackoverflow.com/a/5240330/738287 2668 00005F55 B80153 <1> mov ax, 5301h 2669 00005F58 31DB <1> xor bx, bx 2670 00005F5A CD15 <1> int 15h ; connect to APM API 2671 <1> 2672 00005F5C B80E53 <1> mov ax, 530Eh 2673 00005F5F 31DB <1> xor bx, bx 2674 00005F61 B90201 <1> mov cx, 0102h 2675 00005F64 CD15 <1> int 15h ; set APM version to 1.02 2676 <1> 2677 00005F66 B80753 <1> mov ax, 5307h 2678 00005F69 BB0100 <1> mov bx, 1 2679 00005F6C B90300 <1> mov cx, 3 2680 00005F6F CD15 <1> int 15h ; shut down system 2681 <1> 2682 00005F71 BA[C25F] <1> mov dx, msg.boot_quit_fail 2683 00005F74 B80202 <1> mov ax, 0202h 2684 00005F77 E8AB45 <1> call setrc 2685 00005F7A E9395E <1> jmp putsz_error 2686 <1> 2687 <1> .not_quit: 2688 00005F7D BA[7B63] <1> mov dx, msg.read 2689 00005F80 E82459 <1> call isstring? 2690 00005F83 7503E96408 <1> je boot_read 2691 <1> 2692 00005F88 BA[8063] <1> mov dx, msg.write 2693 00005F8B E81959 <1> call isstring? 2694 00005F8E 7503E96108 <1> je boot_write 2695 <1> 2696 00005F93 BA[8D63] <1> mov dx, msg.dir 2697 00005F96 E80E59 <1> call isstring? 2698 00005F99 7503E97110 <1> je boot_dir 2699 <1> 2700 00005F9E BA[A663] <1> mov dx, msg.protocol 2701 00005FA1 E80359 <1> call isstring? 2702 00005FA4 7533 <1> jne .notproto 2703 <1> 2704 00005FA6 E89C59 <1> call skipequals 2705 00005FA9 4E <1> dec si 2706 00005FAA BA[E863] <1> mov dx, msg.sector 2707 00005FAD E8F758 <1> call isstring? 2708 00005FB0 7423 <1> je .proto_sector 2709 <1> 2710 00005FB2 BA[EF63] <1> mov dx, msg.sector_alt 2711 00005FB5 E8EF58 <1> call isstring? 2712 00005FB8 7416 <1> je .proto_sector_alt 2713 <1> 2714 00005FBA BB[1877] <1> mov bx, loadsettings 2715 <1> .proto_settings_next: 2716 00005FBD 8D5718 <1> lea dx, [bx + lsName] 2717 00005FC0 E8E458 <1> call isstring? 2718 00005FC3 7421 <1> je .proto_settings 2719 00005FC5 83C320 <1> add bx, LOADSETTINGS_size 2720 00005FC8 833F00 <1> cmp word [bx], 0 2721 00005FCB 75F0 <1> jne .proto_settings_next 2722 <1> 2723 00005FCD E90E45 <1> jmp error 2724 <1> 2725 <1> .proto_sector_alt: 2726 00005FD0 C606[C68F]01 <1> mov byte [load_sector_alt], 1 2727 <1> .proto_sector: 2728 00005FD5 E85459 <1> call skipcomma 2729 00005FD8 A8 <1> db __TEST_IMM8 2730 <1> .notproto: 2731 00005FD9 AC <1> lodsb 2732 00005FDA E81D06 <1> call parseloadunit_default_sdp 2733 00005FDD E93303 <1> jmp .load 2734 <1> 2735 <1> 2736 <1> .errordec: 2737 00005FE0 4E <1> dec si 2738 <1> .error: 2739 00005FE1 A8 <1> db __TEST_IMM8 ; skip pop 2740 <1> .errorpop: 2741 00005FE2 5E <1> pop si 2742 00005FE3 E9F844 <1> jmp error 2743 <1> 2744 <1> 2745 <1> .proto_settings: 2746 00005FE6 56 <1> push si 2747 00005FE7 89DE <1> mov si, bx 2748 00005FE9 BF[F08C] <1> mov di, load_current_settings 2749 00005FEC B90C00 <1> mov cx, lsName >> 1 2750 00005FEF F3A5 <1> rep movsw 2751 <1> %if lsName & 1 2752 <1> movsb 2753 <1> %endif 2754 00005FF1 FF75E8 <1> push word [load_kernelname_default - (load_current_settings + lsName) + di] 2755 00005FF4 8F85CC02 <1> pop word [load_kernelname_input - (load_current_settings + lsName) + di] 2756 00005FF8 FF75EA <1> push word [load_addname_default - (load_current_settings + lsName) + di] 2757 00005FFB 8F85D002 <1> pop word [load_addname_input - (load_current_settings + lsName) + di] 2758 <1> 2759 00005FFF 5E <1> pop si 2760 <1> 2761 <1> d4 call d4message 2762 <1> d4 asciz "In bootcmd.proto_settings",13,10 2763 <1> 2764 <1> .proto_next: 2765 00006000 E82959 <1> call skipcomma 2766 00006003 4E <1> dec si 2767 00006004 BA[AF63] <1> mov dx, msg.segment 2768 00006007 E89D58 <1> call isstring? 2769 0000600A 7478 <1> je .proto_segment 2770 0000600C BA[B763] <1> mov dx, msg.entry 2771 0000600F E89558 <1> call isstring? 2772 00006012 7503E98C00 <1> je .proto_entry 2773 00006017 BA[BD63] <1> mov dx, msg.bpb 2774 0000601A E88A58 <1> call isstring? 2775 0000601D 7503E9A000 <1> je .proto_bpb 2776 00006022 BA[C163] <1> mov dx, msg.minpara 2777 00006025 E87F58 <1> call isstring? 2778 00006028 7503E9B400 <1> je .proto_minpara 2779 0000602D BA[C963] <1> mov dx, msg.maxpara 2780 00006030 E87458 <1> call isstring? 2781 00006033 7503E9B700 <1> je .proto_maxpara 2782 00006038 BA[D163] <1> mov dx, msg.checkoffset 2783 0000603B E86958 <1> call isstring? 2784 0000603E 7503E9BA00 <1> je .proto_checkoffset 2785 00006043 BA[DD63] <1> mov dx, msg.checkvalue 2786 00006046 E85E58 <1> call isstring? 2787 00006049 7503E9C800 <1> je .proto_checkvalue 2788 <1> 2789 0000604E BB[A875] <1> mov bx, loadoptiontable 2790 <1> .proto_lot_next: 2791 00006051 8B0F <1> mov cx, [bx] ; flag 2792 00006053 8B5702 <1> mov dx, [bx + 2] ; -> ASCIZ message 2793 00006056 85C9 <1> test cx, cx 2794 00006058 7503E9C700 <1> jz .proto_done 2795 0000605D E84758 <1> call isstring? 2796 00006060 7405 <1> je .proto_lot 2797 00006062 83C304 <1> add bx, 4 2798 00006065 EBEA <1> jmp .proto_lot_next 2799 <1> 2800 <1> .proto_lot: 2801 00006067 E8DB58 <1> call skipequals 2802 0000606A 89CA <1> mov dx, cx 2803 0000606C F7D2 <1> not dx 2804 0000606E 2116[F88C] <1> and word [load_options], dx 2805 00006072 E88A52 <1> call getexpression 2806 00006075 E8994C <1> call toboolean 2807 00006078 85D2 <1> test dx, dx 2808 0000607A 7404 <1> jz @F 2809 0000607C 090E[F88C] <1> or word [load_options], cx 2810 <1> @@: 2811 00006080 4E <1> dec si 2812 00006081 E97CFF <1> jmp .proto_next 2813 <1> 2814 <1> .proto_segment: 2815 00006084 E8BE58 <1> call skipequals 2816 00006087 E85B57 <1> call getword ; dx = word 2817 0000608A 83FA50 <1> cmp dx, 50h 2818 0000608D 7208 <1> jb @F 2819 0000608F 8916[FA8C] <1> mov word [load_loadseg], dx 2820 00006093 4E <1> dec si 2821 00006094 E969FF <1> jmp .proto_next 2822 <1> 2823 <1> @@: 2824 00006097 BA[2263] <1> mov dx, msg.boot_segment_too_low 2825 0000609A B81002 <1> mov ax, 0210h 2826 0000609D E88544 <1> call setrc 2827 000060A0 E95803 <1> jmp .fail 2828 <1> 2829 <1> 2830 <1> .proto_entry: 2831 000060A3 E89F58 <1> call skipequals 2832 000060A6 31DB <1> xor bx, bx 2833 000060A8 E86748 <1> call getaddr ; bx:(e)dx = addr 2834 000060AB 66F7C20000FFFF <1> _386 test edx, 0_FFFF_0000h 2835 000060B2 0F852BFF <1> _386 jnz .error 2836 000060B6 8916[FC8C] <1> mov word [load_entrypoint], dx 2837 000060BA 891E[FE8C] <1> mov word [load_entrypoint + 2], bx 2838 000060BE 4E <1> dec si 2839 000060BF E93EFF <1> jmp .proto_next 2840 <1> 2841 <1> .proto_bpb: 2842 000060C2 E88058 <1> call skipequals 2843 000060C5 31DB <1> xor bx, bx 2844 000060C7 E84848 <1> call getaddr ; bx:(e)dx = addr 2845 000060CA 66F7C20000FFFF <1> _386 test edx, 0_FFFF_0000h 2846 000060D1 0F850CFF <1> _386 jnz .error 2847 000060D5 8916[008D] <1> mov word [load_bpb], dx 2848 000060D9 891E[028D] <1> mov word [load_bpb + 2], bx 2849 000060DD 4E <1> dec si 2850 000060DE E91FFF <1> jmp .proto_next 2851 <1> 2852 <1> .proto_minpara: 2853 000060E1 E86158 <1> call skipequals 2854 000060E4 E8FE56 <1> call getword ; dx = word 2855 000060E7 8916[F48C] <1> mov word [load_minpara], dx 2856 000060EB 4E <1> dec si 2857 000060EC E911FF <1> jmp .proto_next 2858 <1> 2859 <1> .proto_maxpara: 2860 000060EF E85358 <1> call skipequals 2861 000060F2 E8F056 <1> call getword ; dx = word 2862 000060F5 8916[F68C] <1> mov word [load_maxpara], dx 2863 000060F9 4E <1> dec si 2864 000060FA E903FF <1> jmp .proto_next 2865 <1> 2866 <1> .proto_checkoffset: 2867 000060FD E84558 <1> call skipequals 2868 00006100 E8E256 <1> call getword ; dx = word 2869 00006103 89D0 <1> mov ax, dx 2870 00006105 241F <1> and al, 31 2871 00006107 3C1F <1> cmp al, 31 2872 00006109 7503E9D3FE <1> je .error 2873 <1> ; Previously we rejected all odd values here. Now, 2874 <1> ; we only reject a subset of odd values, namely 2875 <1> ; those that may actually cross a sector boundary. 2876 <1> ; Note that sectors may be as small as 32 bytes. 2877 <1> ; This insures the checked word never crosses a sector 2878 <1> ; boundary. Thus, loading a single sector suffices. 2879 0000610E 8916[048D] <1> mov word [load_check_offset], dx 2880 00006112 4E <1> dec si 2881 00006113 E9EAFE <1> jmp .proto_next 2882 <1> 2883 <1> .proto_checkvalue: 2884 00006116 E82C58 <1> call skipequals 2885 00006119 E8C956 <1> call getword ; dx = word 2886 0000611C 8916[068D] <1> mov word [load_check_value], dx 2887 00006120 4E <1> dec si 2888 00006121 E9DCFE <1> jmp .proto_next 2889 <1> 2890 <1> .proto_done: 2891 00006124 BB[E475] <1> mov bx, loadoptiontable.incompatible 2892 <1> @@: 2893 00006127 8B0F <1> mov cx, [bx] 2894 00006129 0B4F02 <1> or cx, [bx + 2] 2895 0000612C 746B <1> jz .proto_compatible 2896 0000612E 8B16[F88C] <1> mov dx, word [load_options] 2897 00006132 21CA <1> and dx, cx 2898 00006134 39CA <1> cmp dx, cx 2899 00006136 7405 <1> je .proto_incompatible 2900 00006138 83C304 <1> add bx, 4 2901 0000613B EBEA <1> jmp @B 2902 <1> 2903 <1> .proto_incompatible: 2904 0000613D 16 <1> push ss 2905 0000613E 07 <1> pop es 2906 0000613F B80302 <1> mov ax, 0203h 2907 00006142 E8E043 <1> call setrc 2908 00006145 BA[DC5F] <1> mov dx, msg.bootfail 2909 00006148 E86B5C <1> call putsz_error 2910 0000614B BA[D562] <1> mov dx, msg.boot_cannot_set_both 2911 0000614E E8655C <1> call putsz_error 2912 00006151 8B07 <1> mov ax, word [bx] 2913 00006153 E82200 <1> call .proto_incompatible_get_label 2914 00006156 E85D5C <1> call putsz_error 2915 00006159 BA[E662] <1> mov dx, msg.boot_and 2916 0000615C E8575C <1> call putsz_error 2917 0000615F 8B4702 <1> mov ax, word [bx + 2] 2918 00006162 E81300 <1> call .proto_incompatible_get_label 2919 00006165 E84E5C <1> call putsz_error 2920 00006168 BA[EC62] <1> mov dx, msg.boot_dot_crlf 2921 <1> .putsz_errret: 2922 0000616B B80402 <1> mov ax, 0204h 2923 0000616E E8B443 <1> call setrc 2924 00006171 E8425C <1> call putsz_error 2925 00006174 FF26[9A0A] <1> jmp near word [errret] 2926 <1> 2927 <1> .proto_incompatible_get_label: 2928 00006178 53 <1> push bx 2929 00006179 BB[A875] <1> mov bx, loadoptiontable 2930 <1> @@: 2931 0000617C 8B0F <1> mov cx, [bx] 2932 0000617E E30E <1> jcxz .proto_internal_error 2933 00006180 39C8 <1> cmp ax, cx 2934 00006182 8B5702 <1> mov dx, word [bx + 2] 2935 00006185 7405 <1> je @F 2936 00006187 83C304 <1> add bx, 4 2937 0000618A EBF0 <1> jmp @B 2938 <1> 2939 <1> @@: 2940 0000618C 5B <1> pop bx 2941 0000618D C3 <1> retn 2942 <1> 2943 <1> .proto_internal_error: 2944 0000618E BA[F062] <1> mov dx, msg.boot_internal_error 2945 00006191 B80502 <1> mov ax, 0205h 2946 00006194 E88E43 <1> call setrc 2947 00006197 EBD2 <1> jmp .putsz_errret 2948 <1> 2949 <1> 2950 <1> .proto_compatible: 2951 00006199 AC <1> lodsb 2952 0000619A E85D04 <1> call parseloadunit_default_sdp 2953 0000619D 7503E98800 <1> jz .fn_done_eol ; no filename given, use defaults --> 2954 <1> ; al was = '/' or '\' or first pathname's first character 2955 <1> ; si-> next char 2956 000061A2 BB[D48F] <1> mov bx, load_kernelname_input 2957 000061A5 E83E00 <1> call .pathname_parse_super 2958 <1> 2959 000061A8 56 <1> push si 2960 000061A9 50 <1> push ax 2961 000061AA E8AF57 <1> call skipwh0 2962 000061AD E85657 <1> call iseol? 2963 000061B0 58 <1> pop ax 2964 000061B1 5E <1> pop si 2965 000061B2 7478 <1> je .fn_done 2966 <1> 2967 000061B4 BB[D88F] <1> mov bx, load_addname_input 2968 <1> 2969 000061B7 E8A257 <1> call skipwh0 2970 000061BA 3C2F <1> cmp al, '/' 2971 000061BC 7404 <1> je @F 2972 000061BE 3C5C <1> cmp al, '\' 2973 000061C0 751F <1> jne .proto_not_double_slash 2974 <1> @@: 2975 000061C2 803C2F <1> cmp byte [si], '/' 2976 000061C5 7405 <1> je @F 2977 000061C7 803C5C <1> cmp byte [si], '\' 2978 000061CA 7515 <1> jne .proto_not_double_slash 2979 <1> @@: 2980 000061CC 4E <1> dec si 2981 000061CD 8937 <1> mov word [bx], si 2982 000061CF C7042F2F <1> mov word [si], "//" 2983 000061D3 46 <1> inc si 2984 000061D4 46 <1> inc si 2985 000061D5 E82E57 <1> call iseol? 2986 000061D8 C60400 <1> mov byte [si], 0 2987 000061DB 7401 <1> je @F 2988 000061DD 46 <1> inc si 2989 <1> @@: 2990 000061DE AC <1> lodsb 2991 000061DF EB4B <1> jmp .fn_done 2992 <1> 2993 <1> .proto_not_double_slash: 2994 000061E1 E80200 <1> call .pathname_parse_super 2995 000061E4 EB46 <1> jmp .fn_done 2996 <1> 2997 <1> 2998 <1> ; INP: bx -> word variable to hold filename 2999 <1> ; OUT: word [bx] -> list of /-separated pathnames, zero-terminated 3000 <1> ; CHG: ax, cx, si, di, [es:load_kernel_name] 3001 <1> .pathname_parse_super: 3002 <1> d4 call d4message 3003 <1> d4 asciz "In bootcmd.pathname_parse_super",13,10 3004 <1> 3005 000061E6 E87357 <1> call skipwh0 3006 000061E9 3C2F <1> cmp al, '/' 3007 000061EB 7404 <1> je @F 3008 000061ED 3C5C <1> cmp al, '\' 3009 000061EF 7506 <1> jne @FF 3010 <1> @@: 3011 000061F1 4E <1> dec si 3012 000061F2 8937 <1> mov word [bx], si 3013 000061F4 46 <1> inc si 3014 000061F5 EB0E <1> jmp .pathname_check 3015 <1> 3016 <1> @@: 3017 000061F7 4E <1> dec si 3018 000061F8 8937 <1> mov word [bx], si 3019 <1> 3020 <1> .pathname_parse: 3021 <1> .pathname_next: 3022 <1> d4 call d4message 3023 <1> d4 asciz "In bootcmd.pathname_parse",13,10 3024 000061FA E8D306 <1> call boot_parse_fn 3025 <1> ; al = separator char 3026 <1> ; si -> next char after that (if any) 3027 000061FD 3C2F <1> cmp al, '/' ; path separator? 3028 000061FF 7404 <1> je .pathname_check 3029 00006201 3C5C <1> cmp al, '\' 3030 00006203 7517 <1> jne .pathname_none ; no, this was the filename --> 3031 <1> .pathname_check: 3032 <1> d4 call d4message 3033 <1> d4 asciz "In bootcmd.pathname_parse_check",13,10 3034 00006205 C644FF2F <1> mov byte [si - 1], '/' ; normalise path separator 3035 00006209 AC <1> lodsb 3036 0000620A 3C20 <1> cmp al, 32 ; space ? 3037 0000620C 740E <1> je .pathname_gotfirst 3038 0000620E 3C09 <1> cmp al, 9 3039 00006210 740A <1> je .pathname_gotfirst ; yes, allow for second name --> 3040 00006212 4E <1> dec si 3041 00006213 E8F056 <1> call iseol? ; EOL ? 3042 00006216 75E2 <1> jne .pathname_next ; no, next pathname element --> 3043 00006218 C60400 <1> mov byte [si], 0 ; terminate after trailing path sep 3044 0000621B C3 <1> retn 3045 <1> 3046 <1> .pathname_gotfirst: 3047 <1> .pathname_none: 3048 0000621C B000 <1> mov al, 0 3049 0000621E 4E <1> dec si 3050 0000621F 8604 <1> xchg al, byte [si] ; terminate after filename 3051 00006221 8936[0E0C] <1> mov word [terminator_in_line_in.offset], si 3052 00006225 A2[100C] <1> mov byte [terminator_in_line_in.value], al 3053 00006228 46 <1> inc si 3054 00006229 C3 <1> retn 3055 <1> 3056 <1> 3057 <1> ; DPR:word [load_kernelname_input] -> ASCIZ pathname. 3058 <1> ; if it ends in '/', append DPR:word [load_kernelname_default] 3059 <1> ; DPR:word [load_addname_input] -> ASCIZ pathname. 3060 <1> ; if it ends in '/', append DPR:word [load_addname_default] 3061 <1> ; if it's empty (and no trailing '/' in front of the zero) 3062 <1> ; then no additional name is given. 3063 <1> .fn_done_eol: 3064 0000622A B00D <1> mov al, 13 3065 <1> .fn_done: 3066 <1> d4 call d4message 3067 <1> d4 asciz "In bootcmd.fn_done",13,10 3068 <1> 3069 0000622C 8326[BE8F]00 <1> and word [load_cmdline], 0 3070 <1> 3071 00006231 E8D256 <1> call iseol? 3072 00006234 743E <1> je @F 3073 <1> 3074 00006236 F606[F98C]10 <1> testopt [load_options], LOAD_CMDLINE 3075 0000623B 7503E99E42 <1> jz error 3076 <1> 3077 00006240 E81957 <1> call skipwh0 3078 00006243 B400 <1> mov ah, 0 3079 00006245 3C22 <1> cmp al, '"' 3080 00006247 7404 <1> je .cmdline_quote 3081 00006249 3C27 <1> cmp al, "'" 3082 0000624B 7503 <1> jne .cmdline_no_quote 3083 <1> .cmdline_quote: 3084 0000624D 88C4 <1> mov ah, al 3085 0000624F A8 <1> db __TEST_IMM8 3086 <1> .cmdline_no_quote: 3087 00006250 4E <1> dec si 3088 00006251 8936[BE8F] <1> mov word [load_cmdline], si 3089 <1> .cmdline_loop: 3090 00006255 AC <1> lodsb 3091 00006256 E8B156 <1> call iseol?.notsemicolon 3092 00006259 740E <1> je .cmdline_eol 3093 0000625B 38E0 <1> cmp al, ah 3094 0000625D 75F6 <1> jne .cmdline_loop 3095 <1> .cmdline_quote_eol: 3096 0000625F C644FF00 <1> mov byte [si - 1], 0 3097 00006263 AC <1> lodsb 3098 00006264 E8B456 <1> call chkeol 3099 00006267 EB0B <1> jmp @F 3100 <1> 3101 <1> .cmdline_eol: 3102 00006269 84E4 <1> test ah, ah 3103 0000626B 7403E96E42 <1> jnz error 3104 00006270 C644FF00 <1> mov byte [si - 1], 0 3105 <1> 3106 <1> @@: 3107 00006274 F606[A400]07 <1> testopt [internalflags3], dif3_load_is_dp 3108 00006279 7527 <1> jnz .load_kernel_from_ldp 3109 <1> 3110 0000627B 8A1E[C28F] <1> mov bl, [load_partition] 3111 0000627F 803E[D08C]80 <1> cmp byte [load_unit], 80h 3112 00006284 7228 <1> jb .p_f_is_diskette 3113 00006286 84DB <1> test bl, bl ; partition specified ? 3114 00006288 7503E954FD <1> jz .error ; no, error --> 3115 <1> 3116 0000628D E8B914 <1> call query_geometry 3117 <1> 3118 00006290 B9[C469] <1> mov cx, load_freedos_from_partition 3119 00006293 E80B13 <1> call scan_partitions 3120 00006296 BA[7661] <1> mov dx, msg.boot_partition_not_found 3121 00006299 B81102 <1> mov ax, 0211h 3122 0000629C E88642 <1> call setrc 3123 0000629F E95901 <1> jmp .fail 3124 <1> 3125 <1> 3126 <1> .load_kernel_from_ldp: 3127 000062A2 E8A414 <1> call query_geometry 3128 000062A5 A1[B88F] <1> mov ax, word [load_partition_sector] 3129 000062A8 8B16[BA8F] <1> mov dx, word [load_partition_sector + 2] 3130 000062AC EB0E <1> jmp @F 3131 <1> 3132 <1> 3133 <1> .p_f_is_diskette: 3134 000062AE 84DB <1> test bl, bl ; partition specified ? 3135 000062B0 7403E92CFD <1> jnz .error ; yes, error --> 3136 <1> 3137 000062B5 E89114 <1> call query_geometry 3138 <1> 3139 000062B8 31C0 <1> xor ax, ax 3140 000062BA 31D2 <1> xor dx, dx 3141 <1> @@: 3142 000062BC 8B1E[F209] <1> mov bx, word [auxbuff_segorsel] ; bx => auxbuff 3143 000062C0 52 <1> push dx 3144 000062C1 50 <1> push ax 3145 000062C2 E83A16 <1> call read_ae_512_bytes 3146 <1> 3147 000062C5 26813EFE0155AA <1> cmp word [es:510], 0AA55h 3148 000062CC 7403E91C19 <1> jne boot_sigmismatch 3149 000062D1 58 <1> pop ax 3150 000062D2 5A <1> pop dx 3151 <1> 3152 000062D3 06 <1> push es 3153 000062D4 F606[F98C]40 <1> testopt [load_options], LOAD_SET_DSSI_PARTINFO 3154 000062D9 7434 <1> jz @F 3155 <1> 3156 000062DB 50 <1> push ax 3157 000062DC 31FF <1> xor di, di 3158 000062DE 8EC7 <1> mov es, di 3159 000062E0 BF0006 <1> mov di, 600h 3160 000062E3 B8CD19 <1> mov ax, 19CDh 3161 000062E6 AB <1> stosw ; fake boot sector loader 3162 000062E7 B9FE00 <1> mov cx, 508 / 2 3163 000062EA 31C0 <1> xor ax, ax 3164 000062EC F3AB <1> rep stosw ; initialise pseudo MBR 3165 000062EE B855AA <1> mov ax, 0AA55h 3166 000062F1 AB <1> stosw ; fake boot sector signature 3167 000062F2 58 <1> pop ax 3168 <1> 3169 000062F3 BEBE07 <1> mov si, 600h + 512 - 2 - 64 3170 000062F6 26894408 <1> mov word [es:si + 8], ax 3171 000062FA 2689540A <1> mov word [es:si + 8 + 2], dx ; store in partition table entry 3172 000062FE 26C60480 <1> mov byte [es:si + piBoot], 80h ; fake primary active 3173 00006302 26C64404FF <1> mov byte [es:si + piType], 0FFh ; fake a type 3174 00006307 26FE440C <1> inc byte [es:si + piLength] ; fake a size 3175 <1> 3176 0000630B 8936[C08F] <1> mov word [load_partition_entry], si 3177 <1> @@: 3178 0000630F 07 <1> pop es 3179 <1> 3180 00006310 E92007 <1> jmp load_freedos_common 3181 <1> 3182 <1> 3183 <1> .load: 3184 00006313 7403E9C9FC <1> jnz bootcmd.error 3185 <1> 3186 00006318 F606[A400]07 <1> testopt [internalflags3], dif3_load_is_dp 3187 0000631D 751C <1> jnz .load_sector_from_ldp 3188 <1> 3189 0000631F 803E[C28F]00 <1> cmp byte [load_partition], 0 3190 00006324 7421 <1> je .load_boot 3191 <1> 3192 00006326 E82014 <1> call query_geometry 3193 <1> 3194 <1> d4 call d4message 3195 <1> d4 asciz "In bootcmd.load (before call to scan_partitions)",13,10 3196 <1> 3197 00006329 B9[5569] <1> mov cx, load_from_partition 3198 0000632C E87212 <1> call scan_partitions 3199 0000632F BA[7661] <1> mov dx, msg.boot_partition_not_found 3200 00006332 B81202 <1> mov ax, 0212h 3201 00006335 E8ED41 <1> call setrc 3202 00006338 E9C000 <1> jmp .fail 3203 <1> 3204 <1> 3205 <1> .load_sector_from_ldp: 3206 0000633B E80B14 <1> call query_geometry 3207 0000633E A1[B88F] <1> mov ax, word [load_partition_sector] 3208 00006341 8B16[BA8F] <1> mov dx, word [load_partition_sector + 2] 3209 00006345 EB07 <1> jmp @F 3210 <1> 3211 <1> .load_boot: 3212 00006347 E8FF13 <1> call query_geometry 3213 <1> 3214 0000634A 31C0 <1> xor ax, ax 3215 0000634C 31D2 <1> xor dx, dx 3216 <1> @@: 3217 0000634E BBC007 <1> mov bx, 7C0h 3218 <1> d4 call d4dumpregs 3219 <1> d4 call d4message 3220 <1> d4 asciz 13,10,"In bootcmd.load_boot (before call to read_sector)",13,10 3221 00006351 52 <1> push dx 3222 00006352 50 <1> push ax 3223 00006353 E8A915 <1> call read_ae_512_bytes 3224 <1> d4 call d4message 3225 <1> d4 asciz "In bootcmd.load_boot (after call to read_sector)",13,10 3226 00006356 31D2 <1> xor dx, dx 3227 00006358 8EC2 <1> mov es, dx 3228 <1> 3229 0000635A A0[D08C] <1> mov al, byte [load_unit] ; al = boot unit 3230 0000635D BB007C <1> mov bx, 7C00h 3231 <1> 3232 00006360 26813EFE7D55AA <1> cmp word [es:7C00h + 510], 0AA55h 3233 00006367 7403E98118 <1> jne boot_sigmismatch 3234 <1> 3235 0000636C 26833F00 <1> cmp word [es:bx], 0 3236 00006370 7503E98418 <1> je boot_codemismatch 3237 <1> 3238 00006375 50 <1> push ax 3239 00006376 B9FF00 <1> mov cx, 510 / 2 3240 00006379 BF0006 <1> mov di, 600h ; MBR location 3241 0000637C 31C0 <1> xor ax, ax 3242 0000637E F3AB <1> rep stosw ; initialise (sector and all entries) 3243 00006380 B855AA <1> mov ax, 0AA55h 3244 00006383 AB <1> stosw ; initialise boot sector signature 3245 00006384 26C7060006CD19 <1> mov word [es:600h], 019CDh ; initialise boot sector code 3246 0000638B BFBE07 <1> mov di, 600h + 510 - 4*16 ; -> first partition table entry 3247 0000638E 58 <1> pop ax 3248 0000638F 268F4508 <1> pop word [es:di + piStart] 3249 00006393 268F450A <1> pop word [es:di + piStart + 2] ; = boot sector LBA 3250 00006397 26C60580 <1> mov byte [es:di + 0], 80h ; "bootable" flag set 3251 0000639B 26C64504FF <1> mov byte [es:di + 4], 0FFh ; dummy value for FS type (nonzero) 3252 000063A0 26C6450C01 <1> mov byte [es:di + 12], 1 ; dummy value for length (nonzero) 3253 <1> 3254 <1> load_partition_common: equ $ 3255 000063A5 8126[A00C]FFF8 <1> and word [reg_efl], ~(400h|200h|100h) ; UP, DI, TF=0 3256 000063AB 893E[7C0C] <1> mov word [reg_esi], di 3257 000063AF 893E[780C] <1> mov word [reg_ebp], di 3258 000063B3 890E[840C] <1> mov word [reg_ds], cx ; ds:si -> 0:600h + offset to first entry 3259 000063B7 A2[700C] <1> mov byte [reg_edx], al ; dl = boot unit 3260 000063BA 891E[9C0C] <1> mov word [reg_eip], bx 3261 000063BE 890E[9E0C] <1> mov word [reg_eip + 2], cx 3262 000063C2 890E[900C] <1> mov word [reg_cs], cx ; cs:eip = 0:7C00h 3263 000063C6 803E[C68F]00 <1> cmp byte [load_sector_alt], 0 3264 000063CB 740A <1> je @F 3265 000063CD 890E[9C0C] <1> mov word [reg_eip], cx 3266 000063D1 C706[900C]C007 <1> mov word [reg_cs], 7C0h ; cs:eip = 07C0h:0 3267 <1> @@: 3268 000063D7 891E[740C] <1> mov word [reg_esp], bx 3269 000063DB 890E[760C] <1> mov word [reg_esp + 2], cx 3270 000063DF 890E[8C0C] <1> mov word [reg_ss], cx ; ss:esp = 0:7C00h 3271 000063E3 800E[A300]01 <1> setopt [internalflags2], dif2_boot_loaded_kernel 3272 000063E8 C3 <1> retn 3273 <1> 3274 <1> 3275 <1> .fail_read: 3276 000063E9 16 <1> push ss 3277 000063EA 07 <1> pop es 3278 000063EB BF[0860] <1> mov di, msg.bootfail_read_errorcode 3279 000063EE 88E0 <1> mov al, ah 3280 000063F0 B404 <1> mov ah, 04h 3281 000063F2 E83041 <1> call setrc 3282 000063F5 E81556 <1> call hexbyte 3283 000063F8 BA[EB5F] <1> mov dx, msg.bootfail_read 3284 <1> 3285 <1> .fail: 3286 000063FB 16 <1> push ss 3287 000063FC 07 <1> pop es 3288 000063FD 52 <1> push dx 3289 000063FE BA[DC5F] <1> mov dx, msg.bootfail 3290 00006401 E8B259 <1> call putsz_error 3291 00006404 5A <1> pop dx 3292 00006405 E8AE59 <1> call putsz_error 3293 00006408 B8FF02 <1> mov ax, 02FFh 3294 0000640B E81741 <1> call setrc 3295 0000640E FF26[9A0A] <1> jmp near word [errret] 3296 <1> 3297 <1> 3298 <1> bootcmd.list: 3299 00006412 E81755 <1> call skipcomma 3300 <1> 3301 00006415 E8E201 <1> call parseloadunit_default_sdp 3302 00006418 7403E9C4FB <1> jnz bootcmd.error 3303 <1> 3304 0000641D E82913 <1> call query_geometry 3305 <1> 3306 00006420 F606[A400]07 <1> testopt [internalflags3], dif3_load_is_dp 3307 00006425 752B <1> jnz .list_ldp 3308 <1> 3309 00006427 803E[C28F]00 <1> cmp byte [load_partition], 0 3310 0000642C 741E <1> je .listall 3311 <1> 3312 0000642E C606[C48F]00 <1> mov byte [load_found_partition], 0 3313 00006433 B9[8B64] <1> mov cx, list_single_partition 3314 00006436 E86811 <1> call scan_partitions 3315 00006439 803E[C48F]00 <1> cmp byte [load_found_partition], 0 3316 0000643E 750B <1> jne @F 3317 00006440 BA[7661] <1> mov dx, msg.boot_partition_not_found 3318 00006443 B81302 <1> mov ax, 0213h 3319 00006446 E8DC40 <1> call setrc 3320 00006449 EBB0 <1> jmp bootcmd.fail 3321 <1> @@: 3322 0000644B C3 <1> retn 3323 <1> 3324 <1> .listall: 3325 0000644C B9[9964] <1> mov cx, list_any_partition 3326 0000644F E94F11 <1> jmp scan_partitions 3327 <1> 3328 <1> .list_ldp: 3329 00006452 C606[C48F]00 <1> mov byte [load_found_partition], 0 3330 00006457 B9[7064] <1> mov cx, list_partition_if_ldp 3331 0000645A E84411 <1> call scan_partitions 3332 0000645D 803E[C48F]00 <1> cmp byte [load_found_partition], 0 3333 00006462 750B <1> jne @F 3334 00006464 BA[7661] <1> mov dx, msg.boot_partition_not_found 3335 00006467 B81402 <1> mov ax, 0214h 3336 0000646A E8B840 <1> call setrc 3337 0000646D EB8C <1> jmp bootcmd.fail 3338 <1> @@: 3339 0000646F C3 <1> retn 3340 <1> 3341 <1> 3342 <1> list_partition_if_ldp: 3343 <1> d4 call d4message 3344 <1> d4 asciz "In list_partition_if_ldp",13,10 3345 <1> 3346 00006470 8B43F8 <1> mov ax, word [bp + di - 8] 3347 00006473 8B53FA <1> mov dx, word [bp + di - 6] ; root 3348 00006476 26034408 <1> add ax, word [es:si + 8] 3349 0000647A 2613540A <1> adc dx, word [es:si + 8 + 2] ; add partition offset 3350 0000647E 3906[B88F] <1> cmp word [load_partition_sector], ax 3351 00006482 7506 <1> jne @F 3352 00006484 3916[BA8F] <1> cmp word [load_partition_sector + 2], dx 3353 00006488 740B <1> je list_single_partition.gotit 3354 <1> @@: 3355 0000648A C3 <1> retn 3356 <1> 3357 <1> list_single_partition: 3358 <1> d4 call d4message 3359 <1> d4 asciz "In list_single_partition",13,10 3360 <1> 3361 0000648B A0[C38F] <1> mov al, byte [load_current_partition] 3362 0000648E 3A06[C28F] <1> cmp al, byte [load_partition] 3363 00006492 7401 <1> je .gotit 3364 00006494 C3 <1> retn 3365 <1> 3366 <1> .gotit: 3367 00006495 FE06[C48F] <1> inc byte [load_found_partition] 3368 <1> 3369 <1> ; INP: es:si -> partition table entry, 3370 <1> ; si = load_partition_table .. load_partition_table+48, 3371 <1> ; es = ss 3372 <1> ; bp + di -> above part table metadata, 3373 <1> ; dwo [bp + di - 4] = root (outermost extended position) 3374 <1> ; dwo [bp + di - 8] = base (current table position) 3375 <1> ; CHG: ax, bx, (cx), dx 3376 <1> list_any_partition: 3377 00006499 06 <1> push es 3378 0000649A 51 <1> push cx 3379 0000649B 56 <1> push si 3380 0000649C 57 <1> push di 3381 <1> 3382 0000649D BF[0E08] <1> mov di, line_out ; reset di 3383 000064A0 B075 <1> mov al, "u" 3384 000064A2 AA <1> stosb 3385 000064A3 A0[D08C] <1> mov al, byte [load_unit] 3386 000064A6 E86455 <1> call hexbyte 3387 000064A9 B02E <1> mov al, '.' 3388 000064AB AA <1> stosb 3389 000064AC A0[C38F] <1> mov al, byte [load_current_partition] 3390 000064AF E8BB54 <1> call decbyte 3391 000064B2 3C0A <1> cmp al, 10 3392 000064B4 B020 <1> mov al, 32 3393 000064B6 7301 <1> jae @F 3394 000064B8 AA <1> stosb 3395 <1> @@: 3396 000064B9 AA <1> stosb 3397 <1> 3398 000064BA A0[D08C] <1> mov al, byte [load_unit] 3399 000064BD BB6664 <1> mov bx, "fd" 3400 000064C0 3C80 <1> cmp al, 80h 3401 000064C2 7202 <1> jb @F 3402 000064C4 B368 <1> mov bl, "h" 3403 <1> @@: 3404 000064C6 247F <1> and al, ~80h 3405 000064C8 0461 <1> add al, 'a' 3406 000064CA 3C7A <1> cmp al, 'z' 3407 000064CC 7609 <1> jbe @F 3408 000064CE B020 <1> mov al, 32 3409 000064D0 B90500 <1> mov cx, 3 + 2 3410 000064D3 F3AA <1> rep stosb 3411 000064D5 EB11 <1> jmp @FF 3412 <1> 3413 <1> @@: 3414 000064D7 93 <1> xchg ax, bx 3415 000064D8 AB <1> stosw 3416 000064D9 93 <1> xchg ax, bx 3417 000064DA AA <1> stosb 3418 000064DB A0[C38F] <1> mov al, byte [load_current_partition] 3419 000064DE E88C54 <1> call decbyte 3420 000064E1 3C0A <1> cmp al, 10 3421 000064E3 B020 <1> mov al, 32 3422 000064E5 7301 <1> jae @F 3423 000064E7 AA <1> stosb 3424 <1> @@: 3425 000064E8 AA <1> stosb 3426 <1> 3427 000064E9 8A4404 <1> mov al, byte [si + 4] 3428 000064EC E81E55 <1> call hexbyte 3429 <1> 3430 000064EF B020 <1> mov al, 32 3431 000064F1 AA <1> stosb 3432 <1> 3433 000064F2 89F9 <1> mov cx, di ; (preserve di in line_out) 3434 000064F4 5F <1> pop di ; get di of scan_partitions 3435 000064F5 57 <1> push di 3436 000064F6 8B43F8 <1> mov ax, word [bp + di - 8] 3437 000064F9 8B53FA <1> mov dx, word [bp + di - 6] ; root 3438 000064FC 89CF <1> mov di, cx ; (preserve di in line_out) 3439 000064FE 034408 <1> add ax, word [si + 8] 3440 00006501 13540A <1> adc dx, word [si + 8 + 2] ; add partition offset 3441 00006504 92 <1> xchg ax, dx 3442 00006505 E8FE54 <1> call hexword 3443 00006508 92 <1> xchg ax, dx 3444 00006509 E8FA54 <1> call hexword 3445 <1> 3446 0000650C 50 <1> push ax 3447 0000650D B82028 <1> mov ax, " (" 3448 00006510 AB <1> stosw 3449 00006511 58 <1> pop ax 3450 00006512 51 <1> push cx 3451 00006513 53 <1> push bx 3452 00006514 8B0E[9B8C] <1> mov cx, [load_sectorsize] 3453 00006518 BB0800 <1> mov bx, 4+4 3454 0000651B E80BBA <1> call disp_dxax_times_cx_width_bx_size.store 3455 0000651E 50 <1> push ax 3456 0000651F B82920 <1> mov ax, ") " 3457 00006522 AB <1> stosw 3458 00006523 58 <1> pop ax 3459 <1> 3460 00006524 52 <1> push dx 3461 00006525 50 <1> push ax 3462 <1> 3463 00006526 8B440C <1> mov ax, word [si + 12] 3464 00006529 8B540E <1> mov dx, word [si + 12 + 2] 3465 0000652C 92 <1> xchg ax, dx 3466 0000652D E8D654 <1> call hexword 3467 00006530 92 <1> xchg ax, dx 3468 00006531 E8D254 <1> call hexword 3469 <1> 3470 00006534 50 <1> push ax 3471 00006535 B82028 <1> mov ax, " (" 3472 00006538 AB <1> stosw 3473 00006539 58 <1> pop ax 3474 0000653A E8ECB9 <1> call disp_dxax_times_cx_width_bx_size.store 3475 0000653D B029 <1> mov al, ")" 3476 0000653F AA <1> stosb 3477 <1> 3478 00006540 58 <1> pop ax 3479 00006541 5A <1> pop dx 3480 <1> 3481 00006542 5B <1> pop bx 3482 00006543 59 <1> pop cx 3483 <1> 3484 00006544 807C0483 <1> cmp byte [si + piType], ptLinux 3485 00006548 7544 <1> jne .notlinux 3486 <1> 3487 0000654A 8B1E[F209] <1> mov bx, word [auxbuff_segorsel] ; bx => auxbuff 3488 0000654E E89D13 <1> call read_ae_1536_bytes 3489 <1> 3490 00006551 26813E380453EF <1> cmp word [es:1024 + 56], 0xEF53 ; s_magic == EXT2_SUPER_MAGIC ? 3491 00006558 7403E99300 <1> jne .nolabel 3492 <1> 3493 0000655D 26833E4E0400 <1> cmp word [es:1024 + 76 + 2], 0 3494 00006563 7403E98800 <1> jne .nolabel 3495 00006568 26833E4C0401 <1> cmp word [es:1024 + 76], 1 ; s_rev_level == EXT2_DYNAMIC_REV ? 3496 0000656E 7403E97D00 <1> jne .nolabel 3497 <1> 3498 00006573 06 <1> push es 3499 00006574 1F <1> pop ds 3500 00006575 BE7804 <1> mov si, 1024 + 120 3501 00006578 B91000 <1> mov cx, 16 3502 0000657B 16 <1> push ss 3503 0000657C 07 <1> pop es 3504 <1> 3505 0000657D B020 <1> mov al, 32 3506 0000657F AA <1> stosb 3507 <1> @@: 3508 00006580 AC <1> lodsb 3509 00006581 84C0 <1> test al, al 3510 00006583 7403 <1> jz @F 3511 00006585 AA <1> stosb 3512 00006586 E2F8 <1> loop @B 3513 <1> @@: 3514 <1> 3515 00006588 16 <1> push ss 3516 00006589 1F <1> pop ds 3517 <1> 3518 0000658A 59 <1> pop cx 3519 0000658B 5E <1> pop si 3520 0000658C 56 <1> push si ; get si of scan_partitions 3521 0000658D 51 <1> push cx 3522 <1> 3523 <1> .notlinux: 3524 0000658E 8A5C04 <1> mov bl, byte [si + piType] 3525 00006591 80FB01 <1> cmp bl, ptFAT12 3526 00006594 7419 <1> je .isfat 3527 00006596 80FB04 <1> cmp bl, ptFAT16_16BIT_CHS 3528 00006599 7414 <1> je .isfat 3529 0000659B 80FB06 <1> cmp bl, ptFAT16_CHS 3530 0000659E 740F <1> je .isfat 3531 000065A0 80FB0B <1> cmp bl, ptFAT32_CHS 3532 000065A3 740A <1> je .isfat 3533 000065A5 80FB0C <1> cmp bl, ptFAT32 3534 000065A8 7405 <1> je .isfat 3535 000065AA 80FB0E <1> cmp bl, ptFAT16 3536 000065AD 7541 <1> jne .notfat 3537 <1> .isfat: 3538 <1> 3539 000065AF 8B1E[F209] <1> mov bx, word [auxbuff_segorsel] ; bx => auxbuff 3540 000065B3 E84913 <1> call read_ae_512_bytes 3541 <1> 3542 000065B6 26813EFE0155AA <1> cmp word [es:510], 0AA55h 3543 000065BD 7531 <1> jne .nolabel 3544 000065BF 26833E0B0000 <1> cmp word [es:bsBPB + bpbBytesPerSector], 0 3545 000065C5 7429 <1> je .nolabel 3546 000065C7 BE2B00 <1> mov si, bsBPB + bpbNew + bpbnVolumeLabel 3547 000065CA 26833E160000 <1> cmp word [es:bsBPB + bpbSectorsPerFAT], 0 3548 000065D0 7503 <1> jne @F 3549 000065D2 BE4700 <1> mov si, bsBPB + ebpbNew + bpbnVolumeLabel 3550 <1> @@: 3551 000065D5 26807CFB29 <1> cmp byte [es:si - bpbnVolumeLabel + bpbnExtBPBSignature], 29h 3552 000065DA 7514 <1> jne .nolabel 3553 000065DC B90B00 <1> mov cx, 11 3554 <1> 3555 000065DF 06 <1> push es 3556 000065E0 1F <1> pop ds 3557 000065E1 16 <1> push ss 3558 000065E2 07 <1> pop es 3559 <1> 3560 000065E3 B020 <1> mov al, 32 3561 000065E5 AA <1> stosb 3562 <1> @@: 3563 000065E6 AC <1> lodsb 3564 000065E7 84C0 <1> test al, al 3565 000065E9 7403 <1> jz @F 3566 000065EB AA <1> stosb 3567 000065EC E2F8 <1> loop @B 3568 <1> @@: 3569 <1> 3570 000065EE 16 <1> push ss 3571 000065EF 1F <1> pop ds 3572 <1> .notfat: 3573 <1> .nolabel: 3574 000065F0 16 <1> push ss 3575 000065F1 07 <1> pop es 3576 000065F2 E84954 <1> call putsline_crlf 3577 <1> 3578 000065F5 5F <1> pop di 3579 000065F6 5E <1> pop si 3580 000065F7 59 <1> pop cx 3581 000065F8 07 <1> pop es 3582 000065F9 C3 <1> retn 3583 <1> 3584 <1> 3585 <1> ; INP: al = first character 3586 <1> ; si -> next 3587 <1> ; OUT: NC 3588 <1> ; byte [load_unit] set 3589 <1> ; byte [load_partition] set 3590 <1> ; (zero if none specified, -1 if ldp or sdp) 3591 <1> ; opt [internalflags3] & dif3_load_is_ldp 3592 <1> ; opt [internalflags3] & dif3_load_is_sdp 3593 <1> ; dword [load_partition_sector] set if ldp or sdp 3594 <1> ; ZR if no filename specified (at end of input) 3595 <1> ; NZ if presumably a filename specified, 3596 <1> ; al = first character (slash or whatever non-blank) 3597 <1> ; si -> next 3598 <1> ; CHG: bx, cx, dx, ax, si, di 3599 <1> ; STT: ds = es = ss 3600 <1> parseloadunit_default_sdp: 3601 000065FA E81C00 <1> call parseloadunit 3602 000065FD 7319 <1> jnc @F 3603 <1> 3604 000065FF 8A16[D08C] <1> mov dl, byte [load_data - LOADDATA2 + bsBPB + ebpbNew + bpbnBootUnit] 3606 00006603 8816[D08C] <1> mov byte [load_unit], dl 3607 00006607 C606[C28F]FF <1> mov byte [load_partition], -1 3608 0000660C 800E[A400]02 <1> or byte [internalflags3], dif3_load_is_sdp 3609 <1> 3610 00006611 E84853 <1> call skipwh0 3611 00006614 E8EF52 <1> call iseol? 3612 00006617 F8 <1> clc 3613 <1> @@: 3614 00006618 C3 <1> retn 3615 <1> 3616 <1> 3617 <1> ; INP: al = first character 3618 <1> ; si -> next 3619 <1> ; OUT: CY if no load unit 3620 <1> ; (not "HD[A-Z]", "FD[A-Z]", "LD[P]", "SD[P]", "U[0-9A-F]") 3621 <1> ; note: this is barely used! 3622 <1> ; NC else, 3623 <1> ; byte [load_unit] set 3624 <1> ; byte [load_partition] set 3625 <1> ; (zero if none specified, -1 if ldp or sdp) 3626 <1> ; opt [internalflags3] & dif3_load_is_ldp 3627 <1> ; opt [internalflags3] & dif3_load_is_sdp 3628 <1> ; dword [load_partition_sector] set if ldp or sdp 3629 <1> ; ZR if no filename specified (at end of input) 3630 <1> ; NZ if presumably a filename specified, 3631 <1> ; al = first character (slash or whatever non-blank) 3632 <1> ; si -> next 3633 <1> ; CHG: bx, cx, dx, ax, si, di 3634 <1> ; STT: ds = es = ss 3635 <1> parseloadunit: 3636 00006619 31DB <1> xor bx, bx 3637 <1> lframe near 3638 <1> lvar word, unit_low_partition_high 3639 <1> lequ ?unit_low_partition_high, unit 3640 <1> lequ ?unit_low_partition_high + 1, partition 3641 0000661B 5589E550 <1> lenter 3642 <1> lvar word, dif3_set 3643 0000661F 53 <1> push bx 3644 <1> lvar dword, load_partition_sector 3645 00006620 FF36[BA8F] <1> push word [load_partition_sector + 2] 3646 00006624 FF36[B88F] <1> push word [load_partition_sector] 3647 <1> 3648 00006628 89F7 <1> mov di, si 3649 0000662A 8026[A400]F8 <1> clropt [internalflags3], dif3_load_is_dp 3650 0000662F E8DD25 <1> call uppercase 3651 00006632 3C48 <1> cmp al, 'H' 3652 00006634 7503E9EF00 <1> je .load_hd 3653 00006639 3C46 <1> cmp al, 'F' 3654 0000663B 7503E9E500 <1> je .load_fd 3655 00006640 B401 <1> mov ah, dif3_load_is_ldp 3656 00006642 3C4C <1> cmp al, 'L' 3657 00006644 7419 <1> je .load_ld_sd 3658 00006646 B402 <1> mov ah, dif3_load_is_sdp 3659 00006648 3C53 <1> cmp al, 'S' 3660 0000664A 7413 <1> je .load_ld_sd 3661 <1> %if _INPUT_FILE_BOOT 3662 0000664C B404 <1> mov ah, dif3_load_is_ydp 3663 0000664E 3C59 <1> cmp al, 'Y' 3664 00006650 740D <1> je .load_ld_sd 3665 <1> %endif 3666 00006652 3C55 <1> cmp al, 'U' 3667 00006654 747C <1> je .load_u 3668 <1> .retc: 3669 00006656 89FE <1> mov si, di 3670 00006658 4E <1> dec si 3671 00006659 AC <1> lodsb 3672 0000665A F9 <1> stc 3673 <1> .ret: 3674 0000665B 89EC5D <1> lleave code 3675 0000665E C3 <1> lret 3676 <1> 3677 <1> .load_ld_sd: 3678 0000665F AC <1> lodsb 3679 00006660 E8AC25 <1> call uppercase 3680 00006663 3C44 <1> cmp al, 'D' 3681 00006665 75EF <1> jne .retc 3682 <1> 3683 <1> d4 call d4message 3684 <1> d4 asciz "In parseloadunit.load_ld_sd",13,10 3685 <1> 3686 00006667 8A16[D08C] <1> mov dl, byte [load_data - LOADDATA2 + bsBPB + ebpbNew + bpbnBootUnit] 3688 0000666B 80FC02 <1> cmp ah, dif3_load_is_sdp 3689 0000666E 741D <1> je @F 3690 00006670 8A16[308C] <1> mov dl, byte [loaddata_loadedfrom - LOADDATA + bsBPB + ebpbNew + bpbnBootUnit] 3692 <1> %if _INPUT_FILE_BOOT 3693 00006674 80FC01 <1> cmp ah, dif3_load_is_ldp 3694 00006677 7414 <1> je @F 3695 00006679 F606[A300]02 <1> testopt [internalflags2], dif2_input_file_boot 3696 0000667E 74D6 <1> jz .retc 3697 <1> 3698 00006680 93 <1> xchg ax, bx 3699 00006681 B8A000 <1> mov ax, LOAD_INPUT_FILE_SIZE 3700 00006684 F726[B08F] <1> mul word [load_input_file.active] 3701 <1> 3702 <1> ; test dx, dx 3703 <1> ; jnz .error 3704 <1> 3705 00006688 93 <1> xchg ax, bx 3706 00006689 8A97[B08D] <1> mov dl, byte [load_input_file + bx - LOADDATA3 + bsBPB + ebpbNew + bpbnBootUnit] 3708 <1> %endif 3709 <1> @@: 3710 0000668D AC <1> lodsb 3711 0000668E E87E25 <1> call uppercase 3712 00006691 3C50 <1> cmp al, 'P' 3713 00006693 7403E9AD00 <1> jne .got_unit 3714 <1> 3715 <1> d4 call d4message 3716 <1> d4 asciz "In parseloadunit.load_ld_sd with ldp",13,10 3717 <1> 3718 00006698 8856FE <1> mov byte [bp + ?unit], dl 3719 0000669B C646FFFF <1> mov byte [bp + ?partition], -1 3720 0000669F 0866FC <1> or byte [bp + ?dif3_set], ah 3721 <1> 3722 000066A2 80FC02 <1> cmp ah, dif3_load_is_sdp 3723 000066A5 741D <1> je @F 3724 <1> %if _INPUT_FILE_BOOT 3725 000066A7 80FC01 <1> cmp ah, dif3_load_is_ldp 3726 000066AA 740A <1> je .is_ldp 3727 000066AC FFB7[8E8D] <1> push word [load_input_file + bx - LOADDATA3 + bsBPB + bpbHiddenSectors + 2] 3729 000066B0 FFB7[8C8D] <1> push word [load_input_file + bx - LOADDATA3 + bsBPB + bpbHiddenSectors] 3731 000066B4 EB08 <1> jmp .is_ldp_ydp 3732 <1> 3733 <1> %endif 3734 <1> .is_ldp: 3735 000066B6 FF36[0E8C] <1> push word [load_ldp_sector + 2] 3736 000066BA FF36[0C8C] <1> push word [load_ldp_sector] 3737 <1> .is_ldp_ydp: 3738 000066BE 8F46F8 <1> pop word [bp + ?load_partition_sector] 3739 000066C1 8F46FA <1> pop word [bp + ?load_partition_sector + 2] 3740 <1> @@: 3741 <1> 3742 000066C4 E89452 <1> call skipwhite 3743 000066C7 E83C52 <1> call iseol? 3744 000066CA 7403E9F700 <1> jne .fn 3745 000066CF E9F000 <1> jmp .ret_nc 3746 <1> 3747 <1> .load_u: 3748 000066D2 AC <1> lodsb 3749 000066D3 E83925 <1> call uppercase 3750 <1> 3751 000066D6 3C28 <1> cmp al, '(' 3752 000066D8 7419 <1> je @F 3753 000066DA 3C30 <1> cmp al, '0' 3754 000066DC 7303E975FF <1> jb .retc 3755 000066E1 3C39 <1> cmp al, '9' 3756 000066E3 760E <1> jbe @F 3757 000066E5 3C41 <1> cmp al, 'A' 3758 000066E7 7303E96AFF <1> jb .retc 3759 000066EC 3C46 <1> cmp al, 'F' 3760 000066EE 7603E963FF <1> ja .retc 3761 <1> @@: 3762 <1> 3763 000066F3 3C28 <1> cmp al, '(' 3764 000066F5 7511 <1> jne .u_not_expr 3765 000066F7 AC <1> lodsb 3766 000066F8 E8044C <1> call getexpression 3767 000066FB E85E52 <1> call skipwh0 3768 000066FE 3C29 <1> cmp al, ')' 3769 00006700 AC <1> lodsb 3770 00006701 7403E9DAF8 <1> jne bootcmd.errordec 3771 00006706 EB03 <1> jmp .u_check_dot 3772 <1> 3773 <1> .u_not_expr: 3774 00006708 E8E90F <1> call boot_get_hexadecimal_literal 3775 <1> .u_check_dot: 3776 0000670B 3C2E <1> cmp al, '.' 3777 0000670D 7403E9CFF8 <1> jne bootcmd.error 3778 00006712 AC <1> lodsb 3779 00006713 85DB <1> test bx, bx 3780 00006715 7403E9C7F8 <1> jnz bootcmd.error 3781 0000671A 81FA0001 <1> cmp dx, 256 3782 0000671E 7203E9BEF8 <1> jae bootcmd.error 3783 00006723 EB20 <1> jmp .got_unit 3784 <1> 3785 <1> .load_fd: 3786 00006725 B200 <1> mov dl, 0 3787 <1> 3788 <1> d4 call d4message 3789 <1> d4 asciz "In parseloadunit.load_fd",13,10 3790 <1> 3791 00006727 A9 <1> db __TEST_IMM16 ; skip mov 3792 <1> .load_hd: 3793 00006728 B280 <1> mov dl, 80h 3794 <1> d4 call d4message 3795 <1> d4 asciz "In parseloadunit.load_fd or .load_hd",13,10 3796 <1> 3797 0000672A AC <1> lodsb 3798 0000672B E8E124 <1> call uppercase 3799 0000672E 3C44 <1> cmp al, 'D' 3800 00006730 7403E921FF <1> jne .retc 3801 00006735 AC <1> lodsb 3802 00006736 E8D624 <1> call uppercase 3803 00006739 2C41 <1> sub al, 'A' 3804 0000673B 3C19 <1> cmp al, 'Z' - 'A' 3805 0000673D 7603E914FF <1> ja .retc 3806 00006742 08C2 <1> or dl, al ; hdX: 80h + number, fdX: 0 + number 3807 00006744 AC <1> lodsb 3808 <1> 3809 <1> .got_unit: 3810 00006745 89D1 <1> mov cx, dx 3811 00006747 884EFE <1> mov byte [bp + ?unit], cl 3812 0000674A C646FF00 <1> mov byte [bp + ?partition], 0 3813 0000674E 3C2F <1> cmp al, '/' ; slash ? 3814 00006750 7474 <1> je .fn 3815 00006752 3C5C <1> cmp al, '\' 3816 00006754 7470 <1> je .fn ; got a filename --> 3817 00006756 3C20 <1> cmp al, 32 ; or blank ? 3818 00006758 7404 <1> je @F 3819 0000675A 3C09 <1> cmp al, 9 3820 0000675C 7508 <1> jne .checkeol ; check for EOL -- but no filename 3821 <1> ; (hdd1name is invalid -- must be hdd1/name or hdd1 name) 3822 <1> @@: ; was blank 3823 0000675E E8FB51 <1> call skipwh0 ; skip blanks 3824 00006761 E8A251 <1> call iseol? ; EOL ? 3825 00006764 7560 <1> jne .fn ; no, is filename --> 3826 <1> ; will jump after this 3827 <1> .checkeol: 3828 00006766 E89D51 <1> call iseol? ; EOL ? 3829 00006769 7457 <1> je .ret_nc ; yes, no filename --> 3830 <1> 3831 0000676B 3C28 <1> cmp al, '(' 3832 0000676D 740E <1> je @F 3833 0000676F 3C30 <1> cmp al, '0' 3834 00006771 7303E9E0FE <1> jb .retc 3835 00006776 3C39 <1> cmp al, '9' 3836 00006778 7603E9D9FE <1> ja .retc 3837 <1> @@: 3838 <1> 3839 <1> d4 call d4message 3840 <1> d4 asciz "In parseloadunit (after no EOL found)",13,10 3841 0000677D 51 <1> push cx 3842 0000677E 80FA80 <1> cmp dl, 80h 3843 00006781 7303E95BF8 <1> jb bootcmd.error ; diskettes aren't partitioned 3844 00006786 3C28 <1> cmp al, '(' 3845 00006788 750F <1> jne .not_expr 3846 0000678A AC <1> lodsb ; skip opening paren 3847 <1> 3848 <1> d4 call d4message 3849 <1> d4 asciz "In parseloadunit (before call to getexpression)",13,10 3850 <1> 3851 0000678B E8714B <1> call getexpression 3852 <1> 3853 <1> d4 call d4message 3854 <1> d4 asciz "In parseloadunit (after call to getexpression)",13,10 3855 0000678E E8CB51 <1> call skipwh0 3856 00006791 3C29 <1> cmp al, ')' 3857 00006793 AC <1> lodsb 3858 00006794 7406 <1> je .got_expr 3859 00006796 E947F8 <1> jmp bootcmd.errordec 3860 <1> 3861 <1> .not_expr: 3862 <1> d4 call d4message 3863 <1> d4 asciz "In parseloadunit (before call to boot_get_decimal_literal)",13,10 3864 00006799 E8500F <1> call boot_get_decimal_literal 3865 <1> .got_expr: ; bx:dx = load partition number 3866 <1> d4 call d4message 3867 <1> d4 asciz "In parseloadunit.got_expr",13,10 3868 0000679C 59 <1> pop cx ; cl = load unit 3869 0000679D 85DB <1> test bx, bx 3870 0000679F 7403E93DF8 <1> jnz bootcmd.error 3871 000067A4 81FAFF00 <1> cmp dx, 255 3872 000067A8 7603E934F8 <1> ja bootcmd.error 3873 000067AD 85D2 <1> test dx, dx 3874 000067AF 7503E92DF8 <1> jz bootcmd.error 3875 000067B4 E8A551 <1> call skipwh0 3876 000067B7 8856FF <1> mov byte [bp + ?partition], dl 3877 000067BA 884EFE <1> mov byte [bp + ?unit], cl 3878 000067BD E84651 <1> call iseol? 3879 000067C0 7504 <1> jne .fn 3880 <1> .ret_nc: 3881 000067C2 31DB <1> xor bx, bx ; NC, ZR 3882 000067C4 EB06 <1> jmp @F 3883 <1> 3884 <1> .fn: 3885 000067C6 E89351 <1> call skipwh0 3886 000067C9 83CB01 <1> or bx, 1 ; NC, NZ 3887 <1> @@: 3888 000067CC 8F06[B88F] <1> pop word [load_partition_sector] 3889 000067D0 8F06[BA8F] <1> pop word [load_partition_sector + 2] 3890 <1> ; pop from ?load_partition_sector 3891 000067D4 9C <1> pushf 3892 000067D5 8B5EFE <1> mov bx, word [bp + ?unit_low_partition_high] 3893 000067D8 881E[D08C] <1> mov byte [load_unit], bl 3894 000067DC 883E[C28F] <1> mov byte [load_partition], bh 3895 000067E0 8A5EFC <1> mov bl, byte [bp + ?dif3_set] 3896 000067E3 081E[A400] <1> or byte [internalflags3], bl 3897 000067E7 9D <1> popf ; ZF, CF 3898 000067E8 E970FE <1> jmp .ret 3899 <1> 3900 <1> lleave ctx 3901 <1> 3902 <1> 3903 000067EB 00 <1> align 4, db 0 3904 <1> 3905 <1> boot_read: 3906 000067EC C706[F08F][1179] <1> mov word [load_readwrite_function], read_sector 3907 000067F2 EB06 <1> jmp boot_readwrite 3908 <1> 3909 <1> boot_write: 3910 000067F4 C706[F08F][1079] <1> mov word [load_readwrite_function], write_sector 3911 <1> 3912 <1> boot_readwrite: 3913 <1> 3914 <1> d4 call d4message 3915 <1> d4 asciz "In boot_readwrite",13,10 3916 <1> 3917 000067FA E84851 <1> call skipequals 3918 000067FD E8FAFD <1> call parseloadunit_default_sdp 3919 00006800 7503E9C800 <1> jz .error 3920 <1> 3921 <1> %if 0 3922 <1> call skipwh0 3923 <1> mov bx, word [reg_ds] ; default segment 3924 <1> call getaddr ; get buffer address into bx:(e)dx 3925 <1> 3926 <1> _386 test edx, 0FFFF_0000h 3927 <1> _386 jnz .error 3928 <1> 3929 <1> ; (variable must be a dword!) 3930 <1> mov word [load_readwrite_buffer], dx 3931 <1> mov word [load_readwrite_buffer + 2], bx 3932 <1> %else 3933 00006805 E8DD4F <1> call getword 3934 <1> ; (variable is a word) 3935 00006808 8916[EC8F] <1> mov word [load_readwrite_buffer], dx 3936 <1> %endif 3937 <1> 3938 0000680C E84D51 <1> call skipwh0 3939 0000680F E8F450 <1> call iseol? 3940 00006812 750F <1> jne @F 3941 <1> 3942 <1> d4 call d4message 3943 <1> d4 asciz "In boot_readwrite no sector given no count given",13,10 3944 <1> 3945 00006814 8326[E88F]00 <1> and word [load_readwrite_sector], 0 3946 00006819 8326[EA8F]00 <1> and word [load_readwrite_sector + 2], 0 3947 0000681E BA0100 <1> mov dx, 1 3948 00006821 EB36 <1> jmp @FF 3949 <1> 3950 <1> @@: 3951 00006823 BA[8663] <1> mov dx, msg.hidden 3952 00006826 4E <1> dec si 3953 00006827 E87D50 <1> call isstring? 3954 0000682A 7510 <1> jne .nothidden 3955 <1> 3956 0000682C E81651 <1> call skipequals 3957 0000682F E8CD4A <1> call getdword 3958 <1> 3959 00006832 89561C <1> mov word [bp + bsBPB + bpbHiddenSectors + 0], dx 3960 00006835 895E1E <1> mov word [bp + bsBPB + bpbHiddenSectors + 2], bx 3961 00006838 E82151 <1> call skipwh0 3962 <1> 3963 0000683B A8 <1> db __TEST_IMM8 3964 <1> .nothidden: 3965 0000683C AC <1> lodsb 3966 0000683D E8BF4A <1> call getexpression ; bx:dx = value 3967 <1> 3968 00006840 8916[E88F] <1> mov word [load_readwrite_sector], dx 3969 00006844 891E[EA8F] <1> mov word [load_readwrite_sector + 2], bx 3970 <1> 3971 00006848 E81151 <1> call skipwh0 3972 0000684B BA0100 <1> mov dx, 1 3973 0000684E E8B550 <1> call iseol? 3974 00006851 7406 <1> je @F 3975 00006853 E88F4F <1> call getword 3976 00006856 E8C250 <1> call chkeol 3977 <1> @@: 3978 00006859 8916[EE8F] <1> mov word [load_readwrite_count], dx 3979 <1> 3980 0000685D E8E90E <1> call query_geometry 3981 <1> 3982 00006860 F606[A400]07 <1> testopt [internalflags3], dif3_load_is_dp 3983 00006865 753C <1> jnz .ldp 3984 <1> 3985 00006867 803E[C28F]00 <1> cmp byte [load_partition], 0 3986 0000686C 7447 <1> je .whole_unit 3987 <1> 3988 0000686E C606[C48F]00 <1> mov byte [load_found_partition], 0 3989 00006873 B9[8568] <1> mov cx, .single_partition 3990 00006876 E8280D <1> call scan_partitions 3991 <1> ; cmp byte [load_found_partition], 0 3992 <1> ; jne @F 3993 00006879 BA[7661] <1> mov dx, msg.boot_partition_not_found 3994 0000687C B81502 <1> mov ax, 0215h 3995 0000687F E8A33C <1> call setrc 3996 00006882 E976FB <1> jmp bootcmd.fail 3997 <1> ;@@: 3998 <1> ; retn 3999 <1> 4000 <1> 4001 <1> .single_partition: 4002 <1> ; INP: es:si -> partition table entry, 4003 <1> ; si = load_partition_table .. load_partition_table+48, 4004 <1> ; es = ss 4005 <1> ; bp + di -> above part table metadata, 4006 <1> ; dwo [bp + di - 4] = root (outermost extended position) 4007 <1> ; dwo [bp + di - 8] = base (current table position) 4008 <1> ;; CHG: ax, bx, (cx), dx 4009 <1> ; CHG: all 4010 <1> 4011 <1> d4 call d4message 4012 <1> d4 asciz "In boot_readwrite.single_partition",13,10 4013 <1> 4014 00006885 A0[C38F] <1> mov al, byte [load_current_partition] 4015 00006888 3A06[C28F] <1> cmp al, byte [load_partition] 4016 0000688C 7401 <1> je .gotit 4017 0000688E C3 <1> retn 4018 <1> 4019 <1> .gotit: 4020 <1> d4 call d4message 4021 <1> d4 asciz "In boot_readwrite.gotit",13,10 4022 <1> 4023 <1> ; inc byte [load_found_partition] 4024 <1> 4025 0000688F 8B43F8 <1> mov ax, [bp + di - 8] 4026 00006892 8B53FA <1> mov dx, [bp + di - 6] ; base (current table position) 4027 <1> 4028 00006895 26034408 <1> add ax, [es:si + 8] 4029 00006899 2613540A <1> adc dx, [es:si + 8 + 2] ; add offset to logical partition 4030 <1> 4031 0000689D 89EC <1> mov sp, bp 4032 0000689F 5D <1> pop bp ; restore bp (scan_partitions) 4033 000068A0 5B <1> pop bx ; discard ret address (scan_partitions) 4034 000068A1 EB07 <1> jmp .gotbase_dxax 4035 <1> 4036 <1> 4037 <1> .ldp: 4038 000068A3 A1[B88F] <1> mov ax, word [load_partition_sector] 4039 000068A6 8B16[BA8F] <1> mov dx, word [load_partition_sector + 2] 4040 <1> 4041 <1> .gotbase_dxax: 4042 000068AA 89461C <1> mov word [bp + bsBPB + bpbHiddenSectors + 0], ax 4043 000068AD 89561E <1> mov word [bp + bsBPB + bpbHiddenSectors + 2], dx 4044 000068B0 800E[A400]80 <1> setopt [internalflags3], dif3_partition_changed 4045 <1> 4046 <1> .whole_unit: 4047 000068B5 A1[E88F] <1> mov ax, word [load_readwrite_sector] 4048 000068B8 8B16[EA8F] <1> mov dx, word [load_readwrite_sector + 2] 4049 000068BC 8B0E[EE8F] <1> mov cx, word [load_readwrite_count] 4050 000068C0 8B1E[EC8F] <1> mov bx, word [load_readwrite_buffer] 4051 <1> 4052 000068C4 E306 <1> jcxz @FF 4053 <1> @@: 4054 000068C6 FF16[F08F] <1> call near word [load_readwrite_function] 4055 000068CA E2FA <1> loop @B 4056 <1> @@: 4057 000068CC C3 <1> retn 4058 <1> 4059 <1> .error: 4060 000068CD E90E3C <1> jmp error 4061 <1> 4062 <1> 4063 <1> ; INP: ds:si-> first letter of name 4064 <1> ; es:load_kernel_name-> 12-byte buffer (for fn + 0) 4065 <1> ; CHG: ax, cx, di 4066 <1> ; OUT: al = first character after name (EOL, blank, or slash) 4067 <1> ; si -> next character 4068 <1> boot_parse_fn: 4069 000068D0 B020 <1> mov al, 32 4070 000068D2 BF[C88F] <1> mov di, load_kernel_name 4071 000068D5 B90B00 <1> mov cx, 11 4072 000068D8 F3AA <1> rep stosb ; initialise to empty 4073 <1> 4074 000068DA BF[C88F] <1> mov di, load_kernel_name 4075 000068DD B90900 <1> mov cx, 9 4076 <1> .loop_name: 4077 000068E0 AC <1> lodsb 4078 000068E1 E82B23 <1> call uppercase 4079 000068E4 E81F50 <1> call iseol? 4080 000068E7 7455 <1> je .loop_name_done 4081 000068E9 3C20 <1> cmp al, 32 4082 000068EB 7451 <1> je .loop_name_done 4083 000068ED 3C09 <1> cmp al, 9 4084 000068EF 744D <1> je .loop_name_done 4085 000068F1 3C2F <1> cmp al, '/' 4086 000068F3 7449 <1> je .loop_name_done 4087 000068F5 3C5C <1> cmp al, '\' 4088 000068F7 7445 <1> je .loop_name_done 4089 000068F9 3C2E <1> cmp al, '.' 4090 000068FB 740F <1> je .loop_name_ext 4091 000068FD AA <1> stosb 4092 000068FE E2E0 <1> loop .loop_name 4093 <1> .invalid: 4094 00006900 BA[C162] <1> mov dx, msg.boot_invalid_filename 4095 00006903 B81602 <1> mov ax, 0216h 4096 00006906 E81C3C <1> call setrc 4097 00006909 E9EFFA <1> jmp bootcmd.fail 4098 <1> 4099 <1> .loop_name_ext: 4100 0000690C 83F909 <1> cmp cx, 9 4101 0000690F 74EF <1> je .invalid 4102 00006911 B90400 <1> mov cx, 4 4103 00006914 BF[D08F] <1> mov di, load_kernel_name + 8 4104 <1> .loop_ext: 4105 00006917 AC <1> lodsb 4106 00006918 E8F422 <1> call uppercase 4107 0000691B E8E84F <1> call iseol? 4108 0000691E 7419 <1> je .loop_ext_done 4109 00006920 3C20 <1> cmp al, 32 4110 00006922 7415 <1> je .loop_ext_done 4111 00006924 3C09 <1> cmp al, 9 4112 00006926 7411 <1> je .loop_ext_done 4113 00006928 3C2F <1> cmp al, '/' 4114 0000692A 740D <1> je .loop_ext_done 4115 0000692C 3C5C <1> cmp al, '\' 4116 0000692E 7409 <1> je .loop_ext_done 4117 00006930 3C2E <1> cmp al, '.' 4118 00006932 74CC <1> je .invalid 4119 00006934 AA <1> stosb 4120 00006935 E2E0 <1> loop .loop_ext 4121 00006937 EBC7 <1> jmp .invalid 4122 <1> 4123 <1> .loop_ext_done: 4124 00006939 83F904 <1> cmp cx, 4 4125 0000693C 74C2 <1> je .invalid 4126 <1> .loop_name_done: 4127 0000693E 83F909 <1> cmp cx, 9 4128 00006941 74BD <1> je .invalid 4129 00006943 C606[D38F]00 <1> mov byte [load_kernel_name + 11], 0 4130 00006948 803E[C88F]E5 <1> cmp byte [load_kernel_name], 0E5h 4131 0000694D 7505 <1> jne @F 4132 0000694F C606[C88F]05 <1> mov byte [load_kernel_name], 05h 4133 <1> @@: 4134 00006954 C3 <1> retn 4135 <1> 4136 <1> 4137 <1> ; INP: es:si -> partition table entry, 4138 <1> ; si = load_partition_table .. load_partition_table+48, 4139 <1> ; es = ss 4140 <1> ; bp + di -> above part table metadata, 4141 <1> ; dwo [bp + di - 4] = root (outermost extended position) 4142 <1> ; dwo [bp + di - 8] = base (current table position) 4143 <1> ; CHG: ax, bx, (cx), dx 4144 <1> load_from_partition: 4145 <1> d4 call d4message 4146 <1> d4 asciz "In load_from_partition",13,10 4147 <1> 4148 00006955 A0[C38F] <1> mov al, byte [load_current_partition] 4149 00006958 3A06[C28F] <1> cmp al, byte [load_partition] 4150 0000695C 7401 <1> je .gotit 4151 0000695E C3 <1> retn 4152 <1> 4153 <1> .gotit: 4154 <1> d4 call d4message 4155 <1> d4 asciz "In load_from_partition.gotit",13,10 4156 <1> 4157 0000695F 8B43F8 <1> mov ax, [bp + di - 8] 4158 00006962 8B53FA <1> mov dx, [bp + di - 6] ; base (current table position) 4159 <1> 4160 00006965 52 <1> push dx 4161 00006966 50 <1> push ax 4162 00006967 06 <1> push es 4163 00006968 BB6000 <1> mov bx, 60h 4164 0000696B E8910F <1> call read_ae_512_bytes ; load partition table to 0:600h 4165 0000696E 07 <1> pop es 4166 0000696F 58 <1> pop ax 4167 00006970 5A <1> pop dx 4168 <1> 4169 00006971 26034408 <1> add ax, [es:si + 8] 4170 00006975 2613540A <1> adc dx, [es:si + 8 + 2] ; add offset to logical partition 4171 <1> 4172 00006979 26894408 <1> mov word [es:si + 8], ax 4173 0000697D 2689540A <1> mov word [es:si + 8 + 2], dx ; store in partition table entry 4174 <1> 4175 00006981 31C9 <1> xor cx, cx 4176 00006983 8EC1 <1> mov es, cx ; es = 0 4177 00006985 8DB42E7B <1> lea si, [si - (load_partition_table + DATASECTIONFIXUP) + 600h + (510 - 64)] 4178 <1> ; si = 600h + 510-64 .. 600h + 510-16 4179 00006989 26894408 <1> mov word [es:si + 8], ax 4180 0000698D 2689540A <1> mov word [es:si + 8 + 2], dx ; store in partition table entry 4181 <1> 4182 <1> ; dx:ax = absolute sector number 4183 00006991 BBC007 <1> mov bx, 7C0h ; bx:0 = 7C0h:0 -> boot sector area 4184 00006994 E8680F <1> call read_ae_512_bytes ; load partition boot sector to 0:7C00h 4185 <1> 4186 00006997 89EC <1> mov sp, bp 4187 00006999 5D <1> pop bp ; restore bp (scan_partitions) 4188 0000699A 58 <1> pop ax ; discard ret address (scan_partitions) 4189 <1> 4190 0000699B 26813EFE0155AA <1> cmp word [es:510], 0AA55h 4191 000069A2 7403E94612 <1> jne boot_sigmismatch 4192 <1> 4193 000069A7 31C9 <1> xor cx, cx 4194 000069A9 26390E0000 <1> cmp word [es:0], cx 4195 000069AE 7503E94612 <1> je boot_codemismatch 4196 <1> 4197 000069B3 8EC1 <1> mov es, cx ; cx = 0, es = 0 4198 000069B5 89F7 <1> mov di, si ; di -> partition table entry (seg 0) 4199 000069B7 26800D80 <1> or byte [es:di + 0], 80h ; set bootable flag 4200 000069BB A0[D08C] <1> mov al, byte [load_unit] ; al = unit 4201 000069BE BB007C <1> mov bx, 7C00h ; bx = 7C00h 4202 000069C1 E9E1F9 <1> jmp load_partition_common 4203 <1> 4204 <1> 4205 <1> ; INP: es:si -> partition table entry, 4206 <1> ; si = load_partition_table .. load_partition_table+48, 4207 <1> ; es = ss 4208 <1> ; bp + di -> above part table metadata, 4209 <1> ; dwo [bp + di - 4] = root (outermost extended position) 4210 <1> ; dwo [bp + di - 8] = base (current table position) 4211 <1> ; CHG: ax, bx, (cx), dx 4212 <1> load_freedos_from_partition: 4213 <1> d4 call d4message 4214 <1> d4 asciz "In load_freedos_from_partition",13,10 4215 <1> 4216 000069C4 A0[C38F] <1> mov al, byte [load_current_partition] 4217 000069C7 3A06[C28F] <1> cmp al, byte [load_partition] 4218 000069CB 7401 <1> je .gotit 4219 000069CD C3 <1> retn 4220 <1> 4221 <1> .gotit: 4222 <1> d4 call d4message 4223 <1> d4 asciz "In load_freedos_from_partition.gotit",13,10 4224 <1> 4225 000069CE 8B43F8 <1> mov ax, [bp + di - 8] 4226 000069D1 8B53FA <1> mov dx, [bp + di - 6] ; base (current table position) 4227 <1> 4228 000069D4 26034408 <1> add ax, [es:si + 8] 4229 000069D8 2613540A <1> adc dx, [es:si + 8 + 2] ; add offset to logical partition 4230 <1> 4231 000069DC 26894408 <1> mov word [es:si + 8], ax 4232 000069E0 2689540A <1> mov word [es:si + 8 + 2], dx ; store in partition table entry 4233 000069E4 26800C80 <1> or byte [es:si + 0], 80h ; set bootable flag 4234 <1> 4235 <1> 4236 000069E8 F606[F98C]40 <1> testopt [load_options], LOAD_SET_DSSI_PARTINFO 4237 000069ED 7427 <1> jz @F 4238 <1> 4239 000069EF 52 <1> push dx 4240 000069F0 50 <1> push ax 4241 <1> 4242 000069F1 8B43F8 <1> mov ax, [bp + di - 8] 4243 000069F4 8B53FA <1> mov dx, [bp + di - 6] ; base (current table position) 4244 <1> 4245 000069F7 52 <1> push dx 4246 000069F8 50 <1> push ax 4247 000069F9 06 <1> push es 4248 000069FA BB6000 <1> mov bx, 60h 4249 000069FD E8FF0E <1> call read_ae_512_bytes ; load partition table to 0:600h 4250 00006A00 07 <1> pop es 4251 00006A01 58 <1> pop ax 4252 00006A02 5A <1> pop dx 4253 <1> 4254 00006A03 31C9 <1> xor cx, cx 4255 00006A05 8EC1 <1> mov es, cx ; es = 0 4256 00006A07 8DBC2E7B <1> lea di, [si - (load_partition_table + DATASECTIONFIXUP) + 600h + (510 - 64)] 4257 <1> ; si = 600h + 510-64 .. 600h + 510-16 4258 00006A0B B108 <1> mov cl, 16 / 2 4259 00006A0D 57 <1> push di 4260 00006A0E F3A5 <1> rep movsw 4261 <1> 4262 00006A10 8F06[C08F] <1> pop word [load_partition_entry] 4263 <1> 4264 00006A14 58 <1> pop ax 4265 00006A15 5A <1> pop dx 4266 <1> @@: 4267 <1> 4268 <1> 4269 00006A16 89EC <1> mov sp, bp 4270 00006A18 5D <1> pop bp ; restore bp (scan_partitions) 4271 00006A19 5B <1> pop bx ; discard ret address (scan_partitions) 4272 <1> 4273 <1> ; dx:ax = absolute sector number 4274 00006A1A 8B1E[F209] <1> mov bx, word [auxbuff_segorsel] ; bx => auxbuff 4275 00006A1E 50 <1> push ax 4276 00006A1F 52 <1> push dx 4277 00006A20 E8DC0E <1> call read_ae_512_bytes ; load partition boot sector 4278 <1> 4279 00006A23 26813EFE0155AA <1> cmp word [es:510], 0AA55h 4280 00006A2A 7403E9BE11 <1> jne boot_sigmismatch 4281 <1> 4282 00006A2F 31C9 <1> xor cx, cx 4283 <1> ; cmp word [es:0], cx 4284 <1> ; je boot_codemismatch 4285 <1> 4286 00006A31 5A <1> pop dx 4287 00006A32 58 <1> pop ax 4288 <1> 4289 <1> ; dx:ax = boot sector 4290 <1> ; byte [load_unit] = unit 4291 <1> ; es:0-> read sector 4292 <1> load_freedos_common: 4293 00006A33 26A31C00 <1> mov word [es:bsBPB + bpbHiddenSectors], ax 4294 00006A37 2689161E00 <1> mov word [es:bsBPB + bpbHiddenSectors + 2], dx 4295 <1> 4296 00006A3C 8B5E0B <1> mov bx, [bp + bsBPB + bpbBytesPerSector] 4297 00006A3F 263B1E0B00 <1> cmp bx, [es:bsBPB + bpbBytesPerSector] 4298 00006A44 7403E9B811 <1> jne boot_secsizemismatch 4299 <1> 4300 <1> ; preserve some variables from our pseudo BPB 4301 00006A49 31C0 <1> xor ax, ax 4302 00006A4B FF7618 <1> push word [bp + bsBPB + bpbCHSSectors] 4303 00006A4E 268F061800 <1> pop word [es:bsBPB + bpbCHSSectors] 4304 00006A53 FF761A <1> push word [bp + bsBPB + bpbCHSHeads] 4305 00006A56 268F061A00 <1> pop word [es:bsBPB + bpbCHSHeads] ; preserve geometry 4306 <1> 4307 00006A5B 8B5EEA <1> mov bx, word [bp + ldParaPerSector] 4308 00006A5E D1EB <1> shr bx, 1 4309 00006A60 895ED4 <1> mov word [bp + ldEntriesPerSector], bx 4310 <1> 4311 00006A63 2639061600 <1> cmp word [es:bsBPB + bpbSectorsPerFAT], ax 4312 00006A68 8A5E40 <1> mov bl, byte [bp + bsBPB + ebpbNew + bpbnBootUnit] 4313 00006A6B 7407 <1> je .is_fat32 4314 00006A6D 26881E2400 <1> mov byte [es:bsBPB + bpbNew + bpbnBootUnit], bl 4315 00006A72 EB05 <1> jmp short .was_fat1612 4316 <1> .is_fat32: 4317 00006A74 26881E4000 <1> mov byte [es:bsBPB + ebpbNew + bpbnBootUnit], bl 4318 <1> .was_fat1612: 4319 <1> 4320 00006A79 06 <1> push es 4321 00006A7A 1E <1> push ds 4322 00006A7B 06 <1> push es 4323 00006A7C 1F <1> pop ds 4324 00006A7D 31F6 <1> xor si, si ; -> BPB from boot partition 4325 00006A7F 16 <1> push ss 4326 00006A80 07 <1> pop es 4327 00006A81 BF[908C] <1> mov di, load_data - LOADDATA2 ; -> our copy of a BPB 4328 00006A84 B95A00 <1> mov cx, (bsBPB + ebpbNew + BPBN_size) 4329 00006A87 F3A4 <1> rep movsb ; get the BPB 4330 <1> 4331 00006A89 1F <1> pop ds 4332 00006A8A 800E[A400]80 <1> setopt [internalflags3], dif3_partition_changed 4333 <1> 4334 00006A8F 394616 <1> cmp word [bp + bsBPB + bpbSectorsPerFAT], ax 4335 00006A92 740B <1> je @F ; is FAT32 --> 4336 00006A94 BE[B48C] <1> mov si, load_data - LOADDATA2 + bsBPB + bpbNew 4337 00006A97 BF[D08C] <1> mov di, load_data - LOADDATA2 + bsBPB + ebpbNew 4338 00006A9A B91A00 <1> mov cx, BPBN_size 4339 00006A9D F3A4 <1> rep movsb ; clone the FAT16 / FAT12 BPBN 4340 <1> ; to where the FAT32 BPBN lives 4341 <1> @@: 4342 00006A9F 07 <1> pop es 4343 <1> 4344 00006AA0 E82869 <1> call bootgetmemorysize 4345 00006AA3 8956E0 <1> mov word [bp + ldMemoryTop], dx 4346 00006AA6 81EA0005 <1> sub dx, (20 * 1024) >> 4 4347 <1> ; leave 20 KiB free at the top, to 4348 <1> ; allow loading with the lDOS protocol (needs BPB and FAT seg 4349 <1> ; to live below its destination buffers for these) 4350 00006AAA 7303 <1> jnc @F 4351 <1> .outofmem: 4352 00006AAC E9FE0D <1> jmp query_geometry.out_of_memory_error 4353 <1> @@: 4354 <1> 4355 00006AAF 81EA0002 <1> sub dx, 8192 >> 4 4356 00006AB3 72F7 <1> jc .outofmem 4357 00006AB5 8956F8 <1> mov word [bp + lsvFATSeg], dx 4358 00006AB8 B8FFFF <1> mov ax, -1 4359 00006ABB 8946F4 <1> mov word [bp + lsvFATSector], ax 4360 00006ABE 8946F6 <1> mov word [bp + lsvFATSector + 2], ax 4361 <1> 4362 00006AC1 FF36[FA8C] <1> push word [load_loadseg] 4363 00006AC5 8F46FA <1> pop word [bp + lsvLoadSeg] 4364 <1> 4365 00006AC8 31DB <1> xor bx, bx 4366 00006ACA B90808 <1> mov cx, ((- LOADSTACKVARS + 15 + 4096) & ~15) >> 1 4367 00006ACD F606[F98C]20 <1> testopt [load_options], LOAD_NO_BPB 4368 00006AD2 7506 <1> jnz @F 4369 00006AD4 BB0002 <1> mov bx, 512 4370 00006AD7 B90809 <1> mov cx, ((512 - LOADSTACKVARS + 15 + 4096) & ~15) >> 1 4371 <1> @@: 4372 <1> 4373 00006ADA 833E[028D]FF <1> cmp word [load_bpb + 2], -1 4374 00006ADF 7469 <1> je .auto_bpb 4375 <1> 4376 00006AE1 A1[008D] <1> mov ax, [load_bpb] 4377 00006AE4 D1E8 <1> shr ax, 1 4378 00006AE6 D1E8 <1> shr ax, 1 4379 00006AE8 D1E8 <1> shr ax, 1 4380 00006AEA D1E8 <1> shr ax, 1 ; round down: start of BPB 4381 00006AEC 0306[028D] <1> add ax, [load_bpb + 2] ; start of BPB 4382 00006AF0 2D0101 <1> sub ax, (4096 - LOADSTACKVARS + 15) >> 4 4383 <1> ; start of stack area 4384 00006AF3 50 <1> push ax 4385 00006AF4 7235 <1> jc .bpb_too_low 4386 <1> 4387 00006AF6 3B46FA <1> cmp ax, word [bp + lsvLoadSeg] 4388 00006AF9 773B <1> ja .loads_below_bpb 4389 <1> 4390 00006AFB 83F860 <1> cmp ax, 60h 4391 00006AFE 722B <1> jb .bpb_too_low 4392 <1> 4393 00006B00 A1[008D] <1> mov ax, [load_bpb] 4394 00006B03 01D8 <1> add ax, bx 4395 00006B05 83C00F <1> add ax, 15 4396 00006B08 D1E8 <1> shr ax, 1 4397 00006B0A D1E8 <1> shr ax, 1 4398 00006B0C D1E8 <1> shr ax, 1 4399 00006B0E D1E8 <1> shr ax, 1 4400 00006B10 0306[028D] <1> add ax, [load_bpb + 2] ; end of BPB / pseudo-boot-sector 4401 <1> 4402 00006B14 3B46FA <1> cmp ax, word [bp + lsvLoadSeg] 4403 00006B17 761F <1> jbe .loads_above_bpb 4404 <1> 4405 00006B19 BA[0563] <1> mov dx, msg.boot_bpb_load_overlap 4406 00006B1C B81702 <1> mov ax, 0217h 4407 00006B1F E8033A <1> call setrc 4408 <1> .fail: 4409 00006B22 B81802 <1> mov ax, 0218h 4410 00006B25 E8FD39 <1> call setrc 4411 00006B28 E9D0F8 <1> jmp bootcmd.fail 4412 <1> 4413 <1> .bpb_too_low: 4414 00006B2B BA[3563] <1> mov dx, msg.boot_bpb_too_low 4415 00006B2E B81902 <1> mov ax, 0219h 4416 00006B31 E8F139 <1> call setrc 4417 00006B34 EBEC <1> jmp .fail 4418 <1> 4419 <1> 4420 <1> 4421 <1> .loads_below_bpb: 4422 00006B36 89C2 <1> mov dx, ax ; set load top to before BPB/lsv/stack 4423 <1> 4424 <1> .loads_above_bpb: ; dx = word [bp + ldLoadTop] = word [bp + lsvFATSeg] 4425 00006B38 FF36[028D] <1> push word [load_bpb + 2] 4426 00006B3C 8F06[B68F] <1> pop word [load_bpb_dest + 2] 4427 00006B40 FF36[008D] <1> push word [load_bpb] 4428 00006B44 8F06[B48F] <1> pop word [load_bpb_dest] 4429 00006B48 EB37 <1> jmp .got_bpb_set_load_top 4430 <1> 4431 <1> 4432 <1> ; auto-BPB: allocate BPB at top and load below that 4433 <1> .auto_bpb: 4434 00006B4A 81EA0101 <1> sub dx, (-LOADSTACKVARS + 15 + 4096) >> 4 4435 00006B4E 7303E959FF <1> jc .outofmem 4436 00006B53 85DB <1> test bx, bx 4437 00006B55 7408 <1> jz @F 4438 00006B57 83EA20 <1> sub dx, 512 >> 4 4439 00006B5A 7303E94DFF <1> jc .outofmem 4440 <1> @@: 4441 <1> 4442 00006B5F 52 <1> push dx 4443 00006B60 89D0 <1> mov ax, dx 4444 <1> ; eg dx = 800h 4445 <1> ; want (((800h<<4) + 4096 - LOADSTACKVARS) - 7C00h) >> 4 4446 <1> ; which is 143h 4447 <1> ; which :7C00h = 903h:0 4448 <1> ; dx + ( 4096 - LOADSTACKVARS - 7C00h) / 16 4449 <1> ; dx - (-4096 + LOADSTACKVARS + 7C00h) / 16 4450 00006B62 BBF0EF <1> mov bx, (-4096 +LOADSTACKVARS) 4451 00006B65 031E[008D] <1> add bx, word [load_bpb] 4452 00006B69 51 <1> push cx 4453 00006B6A B104 <1> mov cl, 4 4454 00006B6C D3EB <1> shr bx, cl 4455 00006B6E 59 <1> pop cx 4456 00006B6F 29D8 <1> sub ax, bx 4457 <1> ; sub ax, (-4096 +LOADSTACKVARS + 7C00h) / 16 4458 00006B71 7303E936FF <1> jc .outofmem 4459 <1> ; mov word [load_bpb_dest], 7C00h 4460 00006B76 FF36[008D] <1> push word [load_bpb] 4461 00006B7A 8F06[B48F] <1> pop word [load_bpb_dest] 4462 00006B7E A3[B68F] <1> mov word [load_bpb_dest + 2], ax 4463 <1> .got_bpb_set_load_top: 4464 00006B81 8956E2 <1> mov word [bp + ldLoadTop], dx 4465 <1> 4466 <1> .got_bpb: ; cx = how many words are used for stack/lsv/BPB 4467 00006B84 58 <1> pop ax ; -> stack area 4468 00006B85 06 <1> push es 4469 00006B86 8EC0 <1> mov es, ax 4470 00006B88 31FF <1> xor di, di 4471 00006B8A 31C0 <1> xor ax, ax 4472 00006B8C F3AB <1> rep stosw 4473 00006B8E 07 <1> pop es 4474 <1> 4475 00006B8F E8C916 <1> call initialise_fs 4476 <1> 4477 00006B92 C606[C58F]00 <1> mov byte [load_check_dir_attr], 0 4478 00006B97 8B36[D48F] <1> mov si, word [load_kernelname_input] 4479 00006B9B 803C2F <1> cmp byte [si], '/' 4480 00006B9E 7501 <1> jne @F 4481 00006BA0 46 <1> inc si 4482 <1> @@: 4483 00006BA1 803C00 <1> cmp byte [si], 0 4484 00006BA4 7504 <1> jne @F 4485 00006BA6 8B36[F08C] <1> mov si, word [load_kernelname_default] 4486 <1> @@: 4487 00006BAA 16 <1> push ss 4488 00006BAB 07 <1> pop es 4489 00006BAC E821FD <1> call boot_parse_fn ; get next pathname 4490 00006BAF 3C2F <1> cmp al, '/' 4491 00006BB1 7509 <1> jne @F 4492 00006BB3 C606[C58F]10 <1> mov byte [load_check_dir_attr], ATTR_DIRECTORY 4493 00006BB8 8936[D68F] <1> mov word [load_kernelname_next], si 4494 <1> @@: 4495 <1> 4496 00006BBC BFFFFF <1> mov di, -1 4497 00006BBF 89FE <1> mov si, di 4498 00006BC1 897EF4 <1> mov [bp + lsvFATSector], di 4499 00006BC4 8976F6 <1> mov [bp + lsvFATSector + 2], si 4500 <1> 4501 00006BC7 31C0 <1> xor ax, ax 4502 00006BC9 31D2 <1> xor dx, dx 4503 <1> 4504 <1> scan_dir_kernelname_loop: 4505 00006BCB 8946EC <1> mov word [bp + ldDirCluster], ax 4506 00006BCE 8956EE <1> mov word [bp + ldDirCluster + 2], dx 4507 <1> 4508 00006BD1 31DB <1> xor bx, bx 4509 00006BD3 8EC3 <1> mov es, bx 4510 00006BD5 BB0005 <1> mov bx, 500h 4511 00006BD8 E8C607 <1> call scan_dir_aux_for_file 4512 <1> 4513 00006BDB 803E[C58F]10 <1> cmp byte [load_check_dir_attr], ATTR_DIRECTORY 4514 00006BE0 753C <1> jne got_kernelentry 4515 <1> 4516 00006BE2 56 <1> push si 4517 00006BE3 57 <1> push di 4518 00006BE4 C606[C58F]00 <1> mov byte [load_check_dir_attr], 0 4519 00006BE9 8B36[D68F] <1> mov si, word [load_kernelname_next] 4520 00006BED 803C00 <1> cmp byte [si], 0 4521 00006BF0 7504 <1> jne @F 4522 00006BF2 8B36[F08C] <1> mov si, word [load_kernelname_default] 4523 <1> @@: 4524 00006BF6 06 <1> push es 4525 00006BF7 16 <1> push ss 4526 00006BF8 07 <1> pop es 4527 00006BF9 E8D4FC <1> call boot_parse_fn ; get next pathname 4528 00006BFC 07 <1> pop es 4529 00006BFD 3C2F <1> cmp al, '/' 4530 00006BFF 7509 <1> jne @F 4531 00006C01 C606[C58F]10 <1> mov byte [load_check_dir_attr], ATTR_DIRECTORY 4532 00006C06 8936[D68F] <1> mov word [load_kernelname_next], si 4533 <1> @@: 4534 00006C0A 5F <1> pop di 4535 00006C0B 5E <1> pop si 4536 <1> 4537 00006C0C 31D2 <1> xor dx, dx 4538 00006C0E 268B471A <1> mov ax, [es:bx + deClusterLow] 4539 <1> ; = first cluster (not FAT32) 4540 00006C12 807EE620 <1> cmp byte [bp + ldFATType], 32 4541 00006C16 7504 <1> jne @F 4542 00006C18 268B5714 <1> mov dx, [es:bx + deClusterHigh] 4543 <1> ; dx:ax = first cluster (FAT32) 4544 <1> @@: 4545 <1> 4546 00006C1C EBAD <1> jmp scan_dir_kernelname_loop 4547 <1> 4548 <1> 4549 <1> got_kernelentry: 4550 00006C1E 56 <1> push si 4551 00006C1F 57 <1> push di 4552 <1> 4553 00006C20 C606[C58F]00 <1> mov byte [load_check_dir_attr], 0 4554 00006C25 8B36[D88F] <1> mov si, word [load_addname_input] 4555 00006C29 803C2F <1> cmp byte [si], '/' 4556 00006C2C 7511 <1> jne @F 4557 00006C2E 46 <1> inc si 4558 00006C2F 803C2F <1> cmp byte [si], '/' 4559 00006C32 7503E9A400 <1> je got_no_addentry.no_dxax_on_stack 4560 <1> 4561 00006C37 31C0 <1> xor ax, ax 4562 00006C39 8946EC <1> mov word [bp + ldDirCluster], ax 4563 00006C3C 8946EE <1> mov word [bp + ldDirCluster + 2], ax 4564 <1> ; search from root directory 4565 <1> @@: 4566 00006C3F 803C00 <1> cmp byte [si], 0 4567 00006C42 750C <1> jne @F 4568 00006C44 8B36[F28C] <1> mov si, word [load_addname_default] 4569 00006C48 803C00 <1> cmp byte [si], 0 4570 00006C4B 7503E98B00 <1> je got_no_addentry.no_dxax_on_stack 4571 <1> @@: 4572 00006C50 16 <1> push ss 4573 00006C51 07 <1> pop es 4574 00006C52 E87BFC <1> call boot_parse_fn ; get next pathname 4575 00006C55 3C2F <1> cmp al, '/' 4576 00006C57 7509 <1> jne @F 4577 00006C59 C606[C58F]10 <1> mov byte [load_check_dir_attr], ATTR_DIRECTORY 4578 00006C5E 8936[D68F] <1> mov word [load_kernelname_next], si 4579 <1> @@: 4580 00006C62 5F <1> pop di 4581 00006C63 5E <1> pop si 4582 00006C64 EB06 <1> jmp @F 4583 <1> 4584 <1> scan_dir_addname_loop: 4585 00006C66 8946EC <1> mov word [bp + ldDirCluster], ax 4586 00006C69 8956EE <1> mov word [bp + ldDirCluster + 2], dx 4587 <1> 4588 <1> @@: 4589 00006C6C 31DB <1> xor bx, bx 4590 00006C6E 8EC3 <1> mov es, bx 4591 00006C70 BB2005 <1> mov bx, 520h ; 0:bx -> space for second directory entry 4592 00006C73 E82B07 <1> call scan_dir_aux_for_file 4593 <1> 4594 00006C76 803E[C58F]10 <1> cmp byte [load_check_dir_attr], ATTR_DIRECTORY 4595 00006C7B 756C <1> jne got_addentry 4596 <1> 4597 00006C7D 56 <1> push si 4598 00006C7E 57 <1> push di 4599 00006C7F 52 <1> push dx 4600 00006C80 50 <1> push ax 4601 00006C81 C606[C58F]00 <1> mov byte [load_check_dir_attr], 0 4602 00006C86 8B36[DA8F] <1> mov si, word [load_addname_next] 4603 00006C8A 803C00 <1> cmp byte [si], 0 4604 00006C8D 7509 <1> jne @F 4605 00006C8F 8B36[F28C] <1> mov si, word [load_addname_default] 4606 00006C93 803C00 <1> cmp byte [si], 0 4607 00006C96 7441 <1> je got_no_addentry 4608 <1> @@: 4609 00006C98 06 <1> push es 4610 00006C99 16 <1> push ss 4611 00006C9A 07 <1> pop es 4612 00006C9B E832FC <1> call boot_parse_fn ; get next pathname 4613 00006C9E 07 <1> pop es 4614 00006C9F 3C2F <1> cmp al, '/' 4615 00006CA1 7509 <1> jne @F 4616 00006CA3 C606[C58F]10 <1> mov byte [load_check_dir_attr], ATTR_DIRECTORY 4617 00006CA8 8936[DA8F] <1> mov word [load_addname_next], si 4618 <1> @@: 4619 00006CAC 58 <1> pop ax 4620 00006CAD 5A <1> pop dx 4621 00006CAE 5F <1> pop di 4622 00006CAF 5E <1> pop si 4623 <1> 4624 00006CB0 31D2 <1> xor dx, dx 4625 00006CB2 268B471A <1> mov ax, [es:bx + deClusterLow] 4626 <1> ; = first cluster (not FAT32) 4627 00006CB6 807EE620 <1> cmp byte [bp + ldFATType], 32 4628 00006CBA 7504 <1> jne @F 4629 00006CBC 268B5714 <1> mov dx, [es:bx + deClusterHigh] 4630 <1> ; dx:ax = first cluster (FAT32) 4631 <1> @@: 4632 <1> 4633 00006CC0 EBA4 <1> jmp scan_dir_addname_loop 4634 <1> 4635 <1> 4636 <1> helper_shift_down_and_clamp: 4637 00006CC2 B90400 <1> mov cx, 4 4638 <1> @@: 4639 00006CC5 D0EA <1> shr dl, 1 4640 00006CC7 D1D8 <1> rcr ax, 1 4641 00006CC9 D1DB <1> rcr bx, 1 4642 00006CCB E2F8 <1> loop @B 4643 <1> 4644 00006CCD 08D0 <1> or al, dl 4645 00006CCF 89DA <1> mov dx, bx ; size in paragraphs 4646 00006CD1 85C0 <1> test ax, ax ; > 0FFFFh ? 4647 00006CD3 7403 <1> jz @F ; no, take actual size --> 4648 00006CD5 BAFFFF <1> mov dx, 0FFFFh ; clamp to 0FFFFh 4649 <1> @@: 4650 00006CD8 C3 <1> retn 4651 <1> 4652 <1> got_no_addentry: 4653 00006CD9 58 <1> pop ax 4654 00006CDA 5A <1> pop dx 4655 <1> .no_dxax_on_stack: 4656 <1> ; push ax 4657 00006CDB B91000 <1> mov cx, 16 4658 00006CDE 31C0 <1> xor ax, ax 4659 00006CE0 8EC0 <1> mov es, ax 4660 00006CE2 BF2005 <1> mov di, 520h ; es:di -> space for second directory entry 4661 00006CE5 F3AB <1> rep stosw ; store zeros 4662 <1> ; pop ax 4663 <1> 4664 00006CE7 5F <1> pop di 4665 00006CE8 5E <1> pop si 4666 <1> 4667 <1> got_addentry: 4668 00006CE9 31C0 <1> xor ax, ax 4669 00006CEB 8EC0 <1> mov es, ax 4670 <1> 4671 <1> 4672 <1> ; (boot32.asm code starts here) 4673 <1> 4674 00006CED 8B46E2 <1> mov ax, word [bp + ldLoadTop] 4675 00006CF0 2B46EA <1> sub ax, word [bp + ldParaPerSector] 4676 00006CF3 7303E9B4FD <1> jc load_freedos_common.outofmem 4677 00006CF8 8946D6 <1> mov [bp + ldLastAvailableSector], ax 4678 <1> 4679 00006CFB 268B1E1C05 <1> mov bx, [es:500h + deSize] 4680 00006D00 26A11E05 <1> mov ax, [es:500h + deSize + 2] ; ax:bx = file size 4681 00006D04 268A160C05 <1> mov dl, [es:500h + 12] ; dl = FAT+ size bits 4682 00006D09 88D6 <1> mov dh, dl 4683 00006D0B 81E207E0 <1> and dx, 0E007h ; obtain bits 7-5 and 2-0 4684 00006D0F D0EE <1> shr dh, 1 4685 00006D11 D0EE <1> shr dh, 1 4686 00006D13 08F2 <1> or dl, dh ; dl:ax:bx = file size 4687 00006D15 52 <1> push dx 4688 00006D16 50 <1> push ax 4689 00006D17 53 <1> push bx 4690 <1> 4691 00006D18 E8A7FF <1> call helper_shift_down_and_clamp 4692 <1> ; round down to next paragraph boundary 4693 00006D1B 3916[F48C] <1> cmp word [load_minpara], dx 4694 00006D1F 7603E9A400 <1> ja error_filetoosmall 4695 <1> 4696 00006D24 5B <1> pop bx 4697 00006D25 58 <1> pop ax 4698 00006D26 5A <1> pop dx 4699 00006D27 8B4E0B <1> mov cx, [bp + bsBPB + bpbBytesPerSector] 4700 00006D2A 49 <1> dec cx ; BpS - 1 4701 00006D2B 01CB <1> add bx, cx 4702 00006D2D 83D000 <1> adc ax, 0 4703 00006D30 80D200 <1> adc dl, 0 ; round up to next sector 4704 00006D33 F7D1 <1> not cx ; ~ (BpS - 1) 4705 00006D35 21CB <1> and bx, cx ; mask to limit to rounded-up sector 4706 00006D37 E888FF <1> call helper_shift_down_and_clamp 4707 <1> 4708 <1> ; dl:ax:bx = size in paragraphs 4709 00006D3A A1[F68C] <1> mov ax, word [load_maxpara] 4710 00006D3D 39C2 <1> cmp dx, ax ; actual size below maximum ? 4711 00006D3F 7602 <1> jbe @F ; yes, use actual size --> 4712 00006D41 89C2 <1> mov dx, ax ; use maximum size 4713 <1> @@: 4714 00006D43 8956D8 <1> mov word [bp + ldParasLeft], dx 4715 00006D46 C746DA0000 <1> mov word [bp + ldParasDone], 0 4716 <1> 4717 <1> ; get starting cluster of file 4718 00006D4B 31D2 <1> xor dx, dx 4719 00006D4D 26A11A05 <1> mov ax, [es:500h + deClusterLow] 4720 <1> ; = first cluster (not FAT32) 4721 <1> 4722 00006D51 807EE620 <1> cmp byte [bp + ldFATType], 32 4723 00006D55 7505 <1> jne @F 4724 00006D57 268B161405 <1> mov dx, [es:500h + deClusterHigh] 4725 <1> ; dx:ax = first cluster (FAT32) 4726 <1> @@: 4727 <1> 4728 00006D5C 8946F0 <1> mov word [bp + lsvFirstCluster], ax 4729 00006D5F 8956F2 <1> mov word [bp + lsvFirstCluster + 2], dx 4730 <1> 4731 00006D62 E80A08 <1> call check_clust 4732 00006D65 7303E92E15 <1> jc error_badchain 4733 <1> 4734 <1> next_load_cluster: 4735 00006D6A E82107 <1> call clust_to_first_sector 4736 <1> ; dx:ax = first sector of cluster 4737 <1> ; cx:bx = cluster value 4738 00006D6D 51 <1> push cx 4739 00006D6E 53 <1> push bx ; preserve cluster number for later 4740 <1> 4741 00006D6F 8B4EE8 <1> mov cx, [bp + ldClusterSize] 4742 <1> 4743 00006D72 8B5EFA <1> mov bx, [bp + lsvLoadSeg] 4744 <1> ; xxx - this will always load an entire cluster (e.g. 64 sectors), 4745 <1> ; even if the file is shorter than this 4746 <1> @@: 4747 00006D75 3B5ED6 <1> cmp bx, [bp + ldLastAvailableSector] 4748 00006D78 7613 <1> jbe @F 4749 00006D7A 833E[F68C]00 <1> cmp word [load_maxpara], 0 4750 00006D7F 743D <1> je @FF ; if to allow partial load --> 4751 00006D81 BA[5362] <1> mov dx, msg.boot_file_too_big_error 4752 00006D84 B81A02 <1> mov ax, 021Ah 4753 00006D87 E89B37 <1> call setrc 4754 00006D8A E96EF6 <1> jmp bootcmd.fail 4755 <1> 4756 <1> @@: 4757 00006D8D 06 <1> push es ; (must preserve ADR_FATBUF reference) 4758 00006D8E E8800B <1> call read_sector 4759 00006D91 07 <1> pop es 4760 00006D92 895EFA <1> mov [bp + lsvLoadSeg], bx ; => after last read data 4761 <1> 4762 00006D95 50 <1> push ax 4763 00006D96 8B46EA <1> mov ax, [bp + ldParaPerSector] 4764 00006D99 0146DA <1> add word [bp + ldParasDone], ax 4765 00006D9C 833E[F68C]00 <1> cmp word [load_maxpara], 0 4766 00006DA1 7407 <1> je .donotuseleft 4767 00006DA3 2946D8 <1> sub word [bp + ldParasLeft], ax 4768 00006DA6 58 <1> pop ax 4769 00006DA7 7615 <1> jbe @F ; read enough --> 4770 00006DA9 A8 <1> db __TEST_IMM8 ; (skip pop) 4771 <1> .donotuseleft: 4772 00006DAA 58 <1> pop ax 4773 <1> 4774 00006DAB E2C8 <1> loop @BB 4775 00006DAD 5B <1> pop bx 4776 00006DAE 59 <1> pop cx 4777 <1> 4778 00006DAF E80507 <1> call clust_next 4779 00006DB2 73B6 <1> jnc next_load_cluster 4780 00006DB4 40 <1> inc ax 4781 00006DB5 40 <1> inc ax 4782 00006DB6 A808 <1> test al, 8 ; set in 0FFF_FFF8h--0FFF_FFFFh, 4783 <1> ; clear in 0, 1, and 0FFF_FFF7h 4784 00006DB8 7503E9DB14 <1> jz error_badchain 4785 00006DBD A9 <1> db __TEST_IMM16 4786 <1> @@: 4787 00006DBE 5B <1> pop bx 4788 00006DBF 59 <1> pop cx 4789 <1> 4790 00006DC0 A1[F48C] <1> mov ax, word [load_minpara] 4791 00006DC3 3B46DA <1> cmp ax, word [bp + ldParasDone] 4792 00006DC6 760C <1> jbe @F 4793 <1> error_filetoosmall: 4794 00006DC8 BA[6362] <1> mov dx, msg.boot_file_too_small_error 4795 00006DCB B81B02 <1> mov ax, 021Bh 4796 00006DCE E85437 <1> call setrc 4797 00006DD1 E927F6 <1> jmp bootcmd.fail 4798 <1> @@: 4799 <1> 4800 <1> 4801 00006DD4 8E06[FA8C] <1> mov es, word [load_loadseg] 4802 00006DD8 8B3E[048D] <1> mov di, word [load_check_offset] 4803 00006DDC A1[068D] <1> mov ax, word [load_check_value] 4804 00006DDF 85C0 <1> test ax, ax 4805 00006DE1 7406 <1> jz @F 4806 00006DE3 AF <1> scasw 4807 00006DE4 7403E9F301 <1> jne .error_check_mismatch 4808 <1> @@: 4809 <1> 4810 <1> ; turn off floppy motor 4811 00006DE9 BAF203 <1> mov dx,3F2h 4812 00006DEC B000 <1> mov al,0 4813 00006DEE EE <1> out dx,al 4814 <1> 4815 <1> ; Set-up registers for and jump to loaded file 4816 <1> 4817 00006DEF 8A5640 <1> mov dl, [bp + bsBPB + ebpbNew + bpbnBootUnit] 4818 <1> ; testopt [load_options], LOAD_SET_DL_UNIT 4819 <1> ; jz @F 4820 <1> ; (always set dl) 4821 00006DF2 8816[700C] <1> mov byte [reg_edx], dl 4822 <1> @@: 4823 <1> 4824 <1> ; testopt [load_options], LOAD_SET_BL_UNIT 4825 <1> ; jz @F 4826 <1> ; (always set bl -- overwritten later if LOAD_SET_AXBX_DATASTART) 4827 00006DF6 8816[680C] <1> mov byte [reg_ebx], dl 4828 <1> @@: 4829 <1> 4830 00006DFA 8A6E15 <1> mov ch, byte [bp + bsBPB + bpbMediaID] 4831 00006DFD 882E[6D0C] <1> mov byte [reg_ecx + 1], ch 4832 <1> 4833 00006E01 F606[F88C]40 <1> testopt [load_options], LOAD_DATASTART_HIDDEN 4834 00006E06 740C <1> jz @F 4835 00006E08 8B5E1C <1> mov bx, [bp + bsBPB + bpbHiddenSectors] 4836 00006E0B 8B461E <1> mov ax, [bp + bsBPB + bpbHiddenSectors + 2] 4837 00006E0E 015EFC <1> add word [bp + lsvDataStart], bx 4838 00006E11 1146FE <1> adc word [bp + lsvDataStart + 2], ax 4839 <1> @@: 4840 <1> 4841 00006E14 F606[F88C]80 <1> testopt [load_options], LOAD_SET_AXBX_DATASTART 4842 00006E19 740D <1> jz @F 4843 00006E1B 8B5EFC <1> mov bx, word [bp + lsvDataStart] 4844 00006E1E 8B46FE <1> mov ax, word [bp + lsvDataStart + 2] 4845 00006E21 891E[680C] <1> mov word [reg_ebx], bx 4846 00006E25 A3[640C] <1> mov word [reg_eax], ax 4847 <1> @@: 4848 <1> 4849 00006E28 F606[F98C]08 <1> testopt [load_options], LOAD_SET_AXBX_ROOT_HIDDEN 4850 00006E2D 7413 <1> jz @F 4851 00006E2F 8B5ED0 <1> mov bx, word [bp + ldRootSector] 4852 00006E32 8B46D2 <1> mov ax, word [bp + ldRootSector + 2] 4853 00006E35 035E1C <1> add bx, word [bp + bsBPB + bpbHiddenSectors] 4854 00006E38 13461E <1> adc ax, word [bp + bsBPB + bpbHiddenSectors + 2] 4855 00006E3B 891E[680C] <1> mov word [reg_ebx], bx 4856 00006E3F A3[640C] <1> mov word [reg_eax], ax 4857 <1> @@: 4858 <1> 4859 00006E42 F606[F88C]04 <1> testopt [load_options], LOAD_SET_SIDI_CLUSTER 4860 00006E47 740D <1> jz @F 4861 00006E49 8B56F2 <1> mov dx, word [bp + lsvFirstCluster + 2] 4862 00006E4C 8B46F0 <1> mov ax, word [bp + lsvFirstCluster] 4863 00006E4F 8916[7C0C] <1> mov word [reg_esi], dx 4864 00006E53 A3[800C] <1> mov word [reg_edi], ax 4865 <1> @@: 4866 <1> 4867 <1> ; (boot.asm code ends here) 4868 <1> 4869 <1> 4870 00006E56 C43E[B48F] <1> les di, [load_bpb_dest] 4871 00006E5A 57 <1> push di 4872 00006E5B 83EF10 <1> sub di, -LOADSTACKVARS 4873 00006E5E BE[808C] <1> mov si, load_data - LOADDATA2 + LOADSTACKVARS 4874 00006E61 B91000 <1> mov cx, -LOADSTACKVARS 4875 00006E64 F606[F98C]20 <1> testopt [load_options], LOAD_NO_BPB 4876 00006E69 7568 <1> jnz .no_bpb_movsb 4877 00006E6B B93400 <1> mov cx, -LOADSTACKVARS + bsBPB + bpbNew 4878 00006E6E F3A4 <1> rep movsb ; move common BPB part 4879 <1> 4880 00006E70 394E16 <1> cmp word [bp + bsBPB + bpbSectorsPerFAT], cx 4881 00006E73 B93600 <1> mov cx, ebpbNew - bpbNew + BPBN_size ; move FAT32 EBPB part + BPBN 4882 00006E76 7406 <1> je @F 4883 00006E78 83C61C <1> add si, ebpbNew - bpbNew; -> BPBN 4884 00006E7B B91A00 <1> mov cx, BPBN_size ; move only BPBN 4885 <1> @@: 4886 00006E7E F3A4 <1> rep movsb 4887 <1> 4888 00006E80 89F8 <1> mov ax, di 4889 00006E82 5F <1> pop di 4890 00006E83 29F8 <1> sub ax, di 4891 00006E85 48 <1> dec ax 4892 00006E86 48 <1> dec ax 4893 00006E87 86C4 <1> xchg al, ah 4894 00006E89 B0EB <1> mov al, 0EBh 4895 00006E8B 268905 <1> mov word [es:di], ax 4896 00006E8E 26C6450290 <1> mov byte [es:di + 2], 90h 4897 <1> 4898 00006E93 F606[F98C]02 <1> testopt [load_options], LOAD_LBA_SET_TYPE 4899 00006E98 7416 <1> jz @F 4900 00006E9A F646E701 <1> test byte [bp + ldFlags], ldfHasLBA 4901 00006E9E 7410 <1> jz @F 4902 <1> 4903 00006EA0 26C645020E <1> mov byte [es:di + 2], 0Eh ; (LBA-enabled) FAT16 FS partition type 4904 00006EA5 807EE620 <1> cmp byte [bp + ldFATType], 32 4905 00006EA9 7205 <1> jb @F 4906 00006EAB 26C645020C <1> mov byte [es:di + 2], 0Ch ; (LBA-enabled) FAT32 FS partition type 4907 <1> @@: 4908 <1> 4909 00006EB0 26C785FE0155AA <1> mov word [es:di + 510], 0AA55h 4910 00006EB7 1E <1> push ds 4911 00006EB8 31C9 <1> xor cx, cx 4912 00006EBA 8ED9 <1> mov ds, cx 4913 00006EBC BE0005 <1> mov si, 500h 4914 00006EBF 57 <1> push di 4915 00006EC0 81C7D601 <1> add di, 512 - 2 - 2 - 14 - 12 - 12 4916 <1> ; 2: AA55 sig, 2: null word, 14: MS-DOS 7 protocol 4917 <1> ; message table pointer lives here, 4918 <1> ; 12: add name, 12: kernel name 4919 00006EC4 B10B <1> mov cl, 11 4920 00006EC6 F3A4 <1> rep movsb ; put kernel filename into the pseudo boot sector 4921 00006EC8 47 <1> inc di 4922 00006EC9 BE2005 <1> mov si, 520h 4923 00006ECC B10B <1> mov cl, 11 4924 00006ECE F3A4 <1> rep movsb ; put additional filename (if any), cx = 0 4925 00006ED0 5F <1> pop di 4926 00006ED1 1F <1> pop ds 4927 <1> 4928 <1> ; cx = 0 4929 00006ED2 A8 <1> db __TEST_IMM8 ; (skip pop) 4930 <1> .no_bpb_movsb: 4931 00006ED3 58 <1> pop ax ; discard word on stack 4932 00006ED4 F3A4 <1> rep movsb 4933 <1> 4934 00006ED6 8126[A00C]FFF8 <1> and word [reg_efl], ~(400h|200h|100h) ; UP, DI, TF=0 4935 <1> 4936 00006EDC 890E[9E0C] <1> mov word [reg_eip + 2], cx 4937 00006EE0 FF36[FC8C] <1> push word [load_entrypoint] 4938 00006EE4 8F06[9C0C] <1> pop word [reg_eip] 4939 00006EE8 A1[FE8C] <1> mov ax, word [load_entrypoint + 2] 4940 00006EEB 0306[FA8C] <1> add ax, word [load_loadseg] 4941 00006EEF A3[900C] <1> mov word [reg_cs], ax 4942 <1> 4943 00006EF2 A1[B68F] <1> mov ax, word [load_bpb_dest + 2] 4944 00006EF5 A3[8C0C] <1> mov word [reg_ss], ax 4945 <1> ; testopt [load_options], LOAD_SET_DSBP_BPB 4946 <1> ; jz @F 4947 <1> ; (always set ds -- overwritten later if LOAD_SET_DSSI_DPT) 4948 00006EF8 A3[840C] <1> mov word [reg_ds], ax 4949 <1> @@: 4950 00006EFB 8B1E[B48F] <1> mov bx, word [load_bpb_dest] 4951 00006EFF 890E[7A0C] <1> mov word [reg_ebp + 2], cx 4952 00006F03 891E[780C] <1> mov word [reg_ebp], bx 4953 00006F07 89D8 <1> mov ax, bx 4954 00006F09 83EB10 <1> sub bx, -LOADSTACKVARS ; (subtracts --10h) 4955 00006F0C 890E[760C] <1> mov word [reg_esp + 2], cx 4956 00006F10 891E[740C] <1> mov word [reg_esp], bx 4957 <1> 4958 00006F14 F606[F98C]20 <1> testopt [load_options], LOAD_NO_BPB 4959 00006F19 751B <1> jnz @F 4960 <1> 4961 00006F1B F606[F98C]04 <1> testopt [load_options], LOAD_MESSAGE_TABLE 4962 00006F20 7414 <1> jz @F 4963 00006F22 B96000 <1> mov cx, (bsBPB + ebpbNew + BPBN_size + 2 + 15) & ~15 4964 00006F25 01C8 <1> add ax, cx 4965 00006F27 268985EE01 <1> mov word [es:di + 1EEh], ax 4966 <1> ; this pointer points to the MS-DOS 7 message table. 4967 <1> ; 4968 <1> ; note that in actual MS-DOS 7 boot sectors, this value is 4969 <1> ; eg 17Fh, which is incorrectly used with the boot sector's 4970 <1> ; ss to load the table into the initial loader. 4971 <1> ; 4972 <1> ; refer to comments in msg.asm about msdos7_message_table. 4973 00006F2C BE[D576] <1> mov si, msdos7_message_table 4974 00006F2F 01CF <1> add di, cx 4975 00006F31 B94300 <1> mov cx, msdos7_message_table.size 4976 00006F34 F3A4 <1> rep movsb 4977 <1> @@: 4978 <1> 4979 00006F36 F606[F98C]10 <1> testopt [load_options], LOAD_CMDLINE 4980 00006F3B 7440 <1> jz .no_cmdline 4981 <1> 4982 00006F3D 8B36[BE8F] <1> mov si, word [load_cmdline] 4983 00006F41 85F6 <1> test si, si 4984 00006F43 7503 <1> jnz @F 4985 00006F45 BE[BE8F] <1> mov si, load_cmdline 4986 <1> @@: 4987 <1> 4988 <1> ; due to the size of our line_in buffer, 4989 <1> ; the command line is never too long for 4990 <1> ; the lsv command line buffer (256 bytes). 4991 00006F48 B98000 <1> mov cx, lsvclBufferLength / 2 4992 00006F4B 812E[740C]0401 <1> sub word [reg_esp], - lsvCommandLine.start + LOADSTACKVARS 4993 <1> ; hazard: if sp is too low, this underflows! 4994 00006F51 7303E9AD00 <1> jc .error_stack_underflow 4995 00006F56 8E06[8C0C] <1> mov es, [reg_ss] 4996 00006F5A 8B3E[740C] <1> mov di, [reg_esp] ; es:di -> stack area for the pointers 4997 00006F5E 81FF0001 <1> cmp di, 256 4998 00006F62 7303E99C00 <1> jb .error_stack_underflow 4999 00006F67 57 <1> push di 5000 00006F68 F3A5 <1> rep movsw 5001 00006F6A 26884DFF <1> mov byte [es:di - 1], cl; truncate command line if too long 5002 00006F6E B8434C <1> mov ax, lsvclSignature 5003 00006F71 AB <1> stosw ; write lsvCommandLine.signature 5004 00006F72 31C0 <1> xor ax, ax 5005 00006F74 AB <1> stosw ; write lsvExtra 5006 00006F75 5F <1> pop di 5007 00006F76 B90001 <1> mov cx, lsvclBufferLength 5008 00006F79 F2AE <1> repne scasb ; search terminator 5009 00006F7B F3AA <1> rep stosb ; zero buffer behind terminator 5010 <1> .no_cmdline: 5011 <1> 5012 00006F7D 31C0 <1> xor ax, ax 5013 00006F7F 8EC0 <1> mov es, ax 5014 00006F81 BF7800 <1> mov di, 1Eh * 4 5015 00006F84 268B5502 <1> mov dx, word [es:di + 2] 5016 00006F88 268B1D <1> mov bx, word [es:di] 5017 <1> 5018 00006F8B F606[F88C]10 <1> testopt [load_options], LOAD_SET_DSSI_DPT 5019 00006F90 7408 <1> jz @F 5020 00006F92 8916[840C] <1> mov word [reg_ds], dx 5021 00006F96 891E[7C0C] <1> mov word [reg_esi], bx 5022 <1> @@: 5023 00006F9A F606[F88C]20 <1> testopt [load_options], LOAD_PUSH_DPT 5024 00006F9F 7419 <1> jz @F 5025 <1> 5026 00006FA1 06 <1> push es 5027 00006FA2 57 <1> push di 5028 00006FA3 832E[740C]08 <1> sub word [reg_esp], 4 * 2 ; push four words 5029 00006FA8 8E06[8C0C] <1> mov es, [reg_ss] 5030 00006FAC 8B3E[740C] <1> mov di, [reg_esp] ; es:di -> stack area for the pointers 5031 00006FB0 58 <1> pop ax ; di (1Eh * 4) 5032 00006FB1 AB <1> stosw 5033 00006FB2 58 <1> pop ax ; es (0) 5034 00006FB3 AB <1> stosw 5035 00006FB4 89D8 <1> mov ax, bx 5036 00006FB6 AB <1> stosw ; si (Int1E offset) 5037 00006FB7 89D0 <1> mov ax, dx 5038 00006FB9 AB <1> stosw ; ds (Int1E segment) 5039 <1> @@: 5040 <1> 5041 00006FBA F606[F98C]40 <1> testopt [load_options], LOAD_SET_DSSI_PARTINFO 5042 00006FBF 7415 <1> jz @F 5043 00006FC1 A1[C08F] <1> mov ax, word [load_partition_entry] 5044 00006FC4 8326[840C]00 <1> and word [reg_ds], 0 5045 00006FC9 A3[7C0C] <1> mov word [reg_esi], ax 5046 00006FCC F606[F98C]20 <1> testopt [load_options], LOAD_NO_BPB 5047 00006FD1 7403 <1> jz @F 5048 00006FD3 A3[780C] <1> mov word [reg_ebp], ax 5049 <1> @@: 5050 00006FD6 800E[A300]01 <1> setopt [internalflags2], dif2_boot_loaded_kernel 5051 00006FDB C3 <1> retn 5052 <1> 5053 <1> 5054 <1> .error_check_mismatch: 5055 00006FDC 4F <1> dec di 5056 00006FDD 4F <1> dec di ; = offset into file 5057 00006FDE 26FF35 <1> push word [es:di] ; = value we got in file 5058 00006FE1 57 <1> push di ; = offset 5059 00006FE2 16 <1> push ss 5060 00006FE3 07 <1> pop es ; set STT 5061 00006FE4 BF[F960] <1> mov di, msg.bootfail_check_mismatch.check_value 5062 00006FE7 E81C4A <1> call hexword ; write expected value 5063 00006FEA 58 <1> pop ax 5064 00006FEB BF[0961] <1> mov di, msg.bootfail_check_mismatch.check_offset 5065 00006FEE E8154A <1> call hexword ; write offset 5066 00006FF1 58 <1> pop ax 5067 00006FF2 BF[1761] <1> mov di, msg.bootfail_check_mismatch.check_got 5068 00006FF5 E80E4A <1> call hexword ; write what we got in file 5069 <1> 5070 00006FF8 BA[E060] <1> mov dx, msg.bootfail_check_mismatch 5071 00006FFB B81C02 <1> mov ax, 021Ch 5072 00006FFE E82435 <1> call setrc 5073 00007001 EB09 <1> jmp @F ; fail with error message 5074 <1> 5075 <1> .error_stack_underflow: 5076 00007003 BA[C660] <1> mov dx, msg.bootfail_stack_underflow 5077 00007006 B81D02 <1> mov ax, 021Dh 5078 00007009 E81935 <1> call setrc 5079 <1> @@: 5080 0000700C E9ECF3 <1> jmp bootcmd.fail 5081 <1> 5082 <1> 5083 <1> boot_dir: 5084 0000700F 8026[A400]F7 <1> clropt [internalflags3], dif3_load_dir_dir 5085 00007014 E84449 <1> call skipwhite 5086 00007017 4E <1> dec si 5087 00007018 BA[8D63] <1> mov dx, msg.dir 5088 0000701B E88948 <1> call isstring? 5089 0000701E 7505 <1> jne @F 5090 00007020 800E[A400]08 <1> setopt [internalflags3], dif3_load_dir_dir 5091 <1> @@: 5092 00007025 C706[D48F][9A63] <1> mov word [load_kernelname_input], msg.emptydirname 5093 0000702B AC <1> lodsb 5094 0000702C E8CBF5 <1> call parseloadunit_default_sdp 5095 0000702F 7409 <1> jz .fn_done_eol ; no filename given, use defaults --> 5096 <1> ; al was = '/' or '\' or first pathname's first character 5097 <1> ; si-> next char 5098 00007031 BB[D48F] <1> mov bx, load_kernelname_input 5099 00007034 E8AFF1 <1> call bootcmd.pathname_parse_super 5100 00007037 E8E148 <1> call chkeol 5101 <1> 5102 <1> .fn_done_eol: 5103 0000703A F606[A400]07 <1> testopt [internalflags3], dif3_load_is_dp 5104 0000703F 7527 <1> jnz .boot_dir_from_ldp 5105 <1> 5106 00007041 8A1E[C28F] <1> mov bl, [load_partition] 5107 00007045 803E[D08C]80 <1> cmp byte [load_unit], 80h 5108 0000704A 7228 <1> jb .boot_dir_is_diskette 5109 0000704C 84DB <1> test bl, bl ; partition specified ? 5110 0000704E 7503E98EEF <1> jz bootcmd.error ; no, error --> 5111 <1> 5112 00007053 E8F306 <1> call query_geometry 5113 <1> 5114 00007056 B9[9B70] <1> mov cx, boot_dir_from_partition 5115 00007059 E84505 <1> call scan_partitions 5116 0000705C BA[7661] <1> mov dx, msg.boot_partition_not_found 5117 0000705F B81102 <1> mov ax, 0211h 5118 00007062 E8C034 <1> call setrc 5119 00007065 E993F3 <1> jmp bootcmd.fail 5120 <1> 5121 <1> 5122 <1> .boot_dir_from_ldp: 5123 00007068 E8DE06 <1> call query_geometry 5124 0000706B A1[B88F] <1> mov ax, word [load_partition_sector] 5125 0000706E 8B16[BA8F] <1> mov dx, word [load_partition_sector + 2] 5126 00007072 EB0E <1> jmp @F 5127 <1> 5128 <1> 5129 <1> .boot_dir_is_diskette: 5130 00007074 84DB <1> test bl, bl ; partition specified ? 5131 00007076 7403E966EF <1> jnz bootcmd.error ; yes, error --> 5132 <1> 5133 0000707B E8CB06 <1> call query_geometry 5134 <1> 5135 0000707E 31C0 <1> xor ax, ax 5136 00007080 31D2 <1> xor dx, dx 5137 <1> @@: 5138 00007082 8B1E[F209] <1> mov bx, word [auxbuff_segorsel] ; bx => auxbuff 5139 00007086 52 <1> push dx 5140 00007087 50 <1> push ax 5141 00007088 E87408 <1> call read_ae_512_bytes 5142 <1> 5143 0000708B 26813EFE0155AA <1> cmp word [es:510], 0AA55h 5144 00007092 7403E9560B <1> jne boot_sigmismatch 5145 00007097 58 <1> pop ax 5146 00007098 5A <1> pop dx 5147 <1> 5148 00007099 EB41 <1> jmp boot_dir_common 5149 <1> 5150 <1> 5151 <1> ; INP: es:si -> partition table entry, 5152 <1> ; si = load_partition_table .. load_partition_table+48, 5153 <1> ; es = ss 5154 <1> ; bp + di -> above part table metadata, 5155 <1> ; dwo [bp + di - 4] = root (outermost extended position) 5156 <1> ; dwo [bp + di - 8] = base (current table position) 5157 <1> ; CHG: ax, bx, (cx), dx 5158 <1> boot_dir_from_partition: 5159 <1> d4 call d4message 5160 <1> d4 asciz "In boot_dir_from_partition",13,10 5161 <1> 5162 0000709B A0[C38F] <1> mov al, byte [load_current_partition] 5163 0000709E 3A06[C28F] <1> cmp al, byte [load_partition] 5164 000070A2 7401 <1> je .gotit 5165 000070A4 C3 <1> retn 5166 <1> 5167 <1> .gotit: 5168 <1> d4 call d4message 5169 <1> d4 asciz "In boot_dir_from_partition.gotit",13,10 5170 <1> 5171 000070A5 8B43F8 <1> mov ax, [bp + di - 8] 5172 000070A8 8B53FA <1> mov dx, [bp + di - 6] ; base (current table position) 5173 <1> 5174 000070AB 26034408 <1> add ax, [es:si + 8] 5175 000070AF 2613540A <1> adc dx, [es:si + 8 + 2] ; add offset to logical partition 5176 <1> 5177 000070B3 26894408 <1> mov word [es:si + 8], ax 5178 000070B7 2689540A <1> mov word [es:si + 8 + 2], dx ; store in partition table entry 5179 000070BB 26800C80 <1> or byte [es:si + 0], 80h ; set bootable flag 5180 <1> 5181 000070BF 89EC <1> mov sp, bp 5182 000070C1 5D <1> pop bp ; restore bp (scan_partitions) 5183 000070C2 5B <1> pop bx ; discard ret address (scan_partitions) 5184 <1> 5185 <1> ; dx:ax = absolute sector number 5186 000070C3 8B1E[F209] <1> mov bx, word [auxbuff_segorsel] ; bx => auxbuff 5187 000070C7 50 <1> push ax 5188 000070C8 52 <1> push dx 5189 000070C9 E83308 <1> call read_ae_512_bytes ; load partition boot sector 5190 <1> 5191 000070CC 26813EFE0155AA <1> cmp word [es:510], 0AA55h 5192 000070D3 7403E9150B <1> jne boot_sigmismatch 5193 <1> 5194 000070D8 31C9 <1> xor cx, cx 5195 <1> ; cmp word [es:0], cx 5196 <1> ; je boot_codemismatch 5197 <1> 5198 000070DA 5A <1> pop dx 5199 000070DB 58 <1> pop ax 5200 <1> 5201 <1> ; dx:ax = boot sector 5202 <1> ; byte [load_unit] = unit 5203 <1> ; es:0-> read sector 5204 <1> boot_dir_common: 5205 000070DC 26A31C00 <1> mov word [es:bsBPB + bpbHiddenSectors], ax 5206 000070E0 2689161E00 <1> mov word [es:bsBPB + bpbHiddenSectors + 2], dx 5207 <1> 5208 000070E5 8B5E0B <1> mov bx, [bp + bsBPB + bpbBytesPerSector] 5209 000070E8 263B1E0B00 <1> cmp bx, [es:bsBPB + bpbBytesPerSector] 5210 000070ED 7403E90F0B <1> jne boot_secsizemismatch 5211 <1> 5212 <1> ; preserve some variables from our pseudo BPB 5213 000070F2 31C0 <1> xor ax, ax 5214 000070F4 FF7618 <1> push word [bp + bsBPB + bpbCHSSectors] 5215 000070F7 268F061800 <1> pop word [es:bsBPB + bpbCHSSectors] 5216 000070FC FF761A <1> push word [bp + bsBPB + bpbCHSHeads] 5217 000070FF 268F061A00 <1> pop word [es:bsBPB + bpbCHSHeads] ; preserve geometry 5218 <1> 5219 00007104 8B5EEA <1> mov bx, word [bp + ldParaPerSector] 5220 00007107 D1EB <1> shr bx, 1 5221 00007109 895ED4 <1> mov word [bp + ldEntriesPerSector], bx 5222 <1> 5223 0000710C 2639061600 <1> cmp word [es:bsBPB + bpbSectorsPerFAT], ax 5224 00007111 8A5E40 <1> mov bl, byte [bp + bsBPB + ebpbNew + bpbnBootUnit] 5225 00007114 7407 <1> je .is_fat32 5226 00007116 26881E2400 <1> mov byte [es:bsBPB + bpbNew + bpbnBootUnit], bl 5227 0000711B EB05 <1> jmp short .was_fat1612 5228 <1> .is_fat32: 5229 0000711D 26881E4000 <1> mov byte [es:bsBPB + ebpbNew + bpbnBootUnit], bl 5230 <1> .was_fat1612: 5231 <1> 5232 00007122 06 <1> push es 5233 00007123 1E <1> push ds 5234 00007124 06 <1> push es 5235 00007125 1F <1> pop ds 5236 00007126 31F6 <1> xor si, si ; -> BPB from boot partition 5237 00007128 16 <1> push ss 5238 00007129 07 <1> pop es 5239 0000712A BF[908C] <1> mov di, load_data - LOADDATA2 ; -> our copy of a BPB 5240 0000712D B95A00 <1> mov cx, (bsBPB + ebpbNew + BPBN_size) 5241 00007130 F3A4 <1> rep movsb ; get the BPB 5242 <1> 5243 00007132 1F <1> pop ds 5244 00007133 800E[A400]80 <1> setopt [internalflags3], dif3_partition_changed 5245 <1> 5246 00007138 394616 <1> cmp word [bp + bsBPB + bpbSectorsPerFAT], ax 5247 0000713B 740B <1> je @F ; is FAT32 --> 5248 0000713D BE[B48C] <1> mov si, load_data - LOADDATA2 + bsBPB + bpbNew 5249 00007140 BF[D08C] <1> mov di, load_data - LOADDATA2 + bsBPB + ebpbNew 5250 00007143 B91A00 <1> mov cx, BPBN_size 5251 00007146 F3A4 <1> rep movsb ; clone the FAT16 / FAT12 BPBN 5252 <1> ; to where the FAT32 BPBN lives 5253 <1> @@: 5254 00007148 07 <1> pop es 5255 <1> 5256 00007149 FF36[F209] <1> push word [auxbuff_segorsel] 5257 0000714D 8F46F8 <1> pop word [bp + lsvFATSeg] 5258 00007150 804EE702 <1> or byte [bp + ldFlags], ldfFATInvalid 5259 00007154 B8FFFF <1> mov ax, -1 5260 00007157 8946F4 <1> mov word [bp + lsvFATSector], ax 5261 0000715A 8946F6 <1> mov word [bp + lsvFATSector + 2], ax 5262 <1> 5263 0000715D E8FB10 <1> call initialise_fs 5264 <1> 5265 00007160 C706[F28F][7273] <1> mov word [handle_scan_dir_entry], scan_dir_entry 5266 <1> 5267 00007166 C606[C58F]00 <1> mov byte [load_check_dir_attr], 0 5268 0000716B 8B36[D48F] <1> mov si, word [load_kernelname_input] 5269 0000716F 803C2F <1> cmp byte [si], '/' 5270 00007172 7501 <1> jne @F 5271 00007174 46 <1> inc si 5272 <1> @@: 5273 00007175 803C00 <1> cmp byte [si], 0 5274 00007178 7503E99B00 <1> je .root 5275 0000717D 16 <1> push ss 5276 0000717E 07 <1> pop es 5277 0000717F E84EF7 <1> call boot_parse_fn ; get next pathname 5278 00007182 3C2F <1> cmp al, '/' 5279 00007184 7509 <1> jne @F 5280 00007186 C606[C58F]10 <1> mov byte [load_check_dir_attr], ATTR_DIRECTORY 5281 0000718B 8936[D68F] <1> mov word [load_kernelname_next], si 5282 <1> @@: 5283 0000718F 84C0 <1> test al, al 5284 00007191 7506 <1> jnz @F 5285 00007193 C706[F28F][6F73] <1> mov word [handle_scan_dir_entry], scan_dir_entry_dir_or_file 5286 <1> @@: 5287 <1> 5288 00007199 BFFFFF <1> mov di, -1 5289 0000719C 89FE <1> mov si, di 5290 0000719E 897EF4 <1> mov [bp + lsvFATSector], di 5291 000071A1 8976F6 <1> mov [bp + lsvFATSector + 2], si 5292 <1> 5293 000071A4 31C0 <1> xor ax, ax 5294 000071A6 31D2 <1> xor dx, dx 5295 <1> 5296 000071A8 83EC20 <1> sub sp, 32 5297 <1> 5298 <1> .scan_dir_dirname_loop: 5299 000071AB 8946EC <1> mov word [bp + ldDirCluster], ax 5300 000071AE 8956EE <1> mov word [bp + ldDirCluster + 2], dx 5301 <1> 5302 000071B1 16 <1> push ss 5303 000071B2 07 <1> pop es 5304 000071B3 89E3 <1> mov bx, sp 5305 000071B5 E8EF01 <1> call scan_dir_aux_with_error 5306 <1> 5307 000071B8 803E[C58F]10 <1> cmp byte [load_check_dir_attr], ATTR_DIRECTORY 5308 000071BD 7542 <1> jne .got_direntry 5309 <1> 5310 000071BF 56 <1> push si 5311 000071C0 57 <1> push di 5312 000071C1 C606[C58F]00 <1> mov byte [load_check_dir_attr], 0 5313 000071C6 8B36[D68F] <1> mov si, word [load_kernelname_next] 5314 000071CA 803C00 <1> cmp byte [si], 0 5315 000071CD 744F <1> je .sub 5316 <1> 5317 000071CF 06 <1> push es 5318 000071D0 16 <1> push ss 5319 000071D1 07 <1> pop es 5320 000071D2 E8FBF6 <1> call boot_parse_fn ; get next pathname 5321 000071D5 07 <1> pop es 5322 000071D6 3C2F <1> cmp al, '/' 5323 000071D8 7509 <1> jne @F 5324 000071DA C606[C58F]10 <1> mov byte [load_check_dir_attr], ATTR_DIRECTORY 5325 000071DF 8936[D68F] <1> mov word [load_kernelname_next], si 5326 <1> @@: 5327 000071E3 84C0 <1> test al, al 5328 000071E5 7506 <1> jnz @F 5329 000071E7 C706[F28F][6F73] <1> mov word [handle_scan_dir_entry], scan_dir_entry_dir_or_file 5330 <1> @@: 5331 <1> 5332 000071ED 5F <1> pop di 5333 000071EE 5E <1> pop si 5334 <1> 5335 000071EF 31D2 <1> xor dx, dx 5336 000071F1 268B471A <1> mov ax, [es:bx + deClusterLow] 5337 <1> ; = first cluster (not FAT32) 5338 000071F5 807EE620 <1> cmp byte [bp + ldFATType], 32 5339 000071F9 7504 <1> jne @F 5340 000071FB 268B5714 <1> mov dx, [es:bx + deClusterHigh] 5341 <1> ; dx:ax = first cluster (FAT32) 5342 <1> @@: 5343 <1> 5344 000071FF EBAA <1> jmp .scan_dir_dirname_loop 5345 <1> 5346 <1> .got_direntry: 5347 00007201 F606[A400]08 <1> testopt [internalflags3], dif3_load_dir_dir 5348 00007206 7507 <1> jnz @F 5349 00007208 26F6470B10 <1> test byte [es:bx + deAttrib], ATTR_DIRECTORY 5350 0000720D 7511 <1> jnz @FF 5351 <1> @@: 5352 0000720F 89DF <1> mov di, bx 5353 00007211 E83400 <1> call list_dir_entry 5354 00007214 83C420 <1> add sp, 32 5355 00007217 C3 <1> retn 5356 <1> 5357 <1> .root: 5358 00007218 31C0 <1> xor ax, ax 5359 0000721A 31D2 <1> xor dx, dx 5360 0000721C EB15 <1> jmp .scan 5361 <1> 5362 <1> .sub: 5363 0000721E 5F <1> pop di 5364 0000721F 5E <1> pop si 5365 <1> 5366 <1> @@: 5367 00007220 83C420 <1> add sp, 32 5368 <1> 5369 00007223 31D2 <1> xor dx, dx 5370 00007225 268B471A <1> mov ax, [es:bx + deClusterLow] 5371 <1> ; = first cluster (not FAT32) 5372 00007229 807EE620 <1> cmp byte [bp + ldFATType], 32 5373 0000722D 7504 <1> jne @F 5374 0000722F 268B5714 <1> mov dx, [es:bx + deClusterHigh] 5375 <1> ; dx:ax = first cluster (FAT32) 5376 <1> @@: 5377 <1> .scan: 5378 00007233 8946EC <1> mov word [bp + ldDirCluster], ax 5379 00007236 8956EE <1> mov word [bp + ldDirCluster + 2], dx 5380 <1> 5381 00007239 C706[F28F][4872] <1> mov word [handle_scan_dir_entry], list_dir_entry 5382 0000723F C706[F48F][E003] <1> mov word [handle_scan_dir_not_found], dmycmd 5383 <1> 5384 00007245 E96501 <1> jmp scan_dir_aux 5385 <1> 5386 <1> 5387 <1> list_dir_entry: 5388 00007248 26803D00 <1> cmp byte [es:di], 0 5389 0000724C 7503E91D01 <1> je .ret ; (NC, ZR) 5390 00007251 26803DE5 <1> cmp byte [es:di], 0E5h 5391 00007255 7504 <1> jne @F 5392 00007257 80CB01 <1> or bl, 1 ; (NC, NZ) 5393 0000725A C3 <1> retn 5394 <1> 5395 <1> @@: 5396 0000725B 268A5D0B <1> mov bl, byte [es:di + deAttrib] 5397 0000725F F6C308 <1> test bl, ATTR_VOLLABEL 5398 00007262 7403E90401 <1> jnz .ret_NC_NZ ; skip volume labels (and LFNs) --> (NZ) 5399 <1> 5400 00007267 26803D2E <1> cmp byte [es:di], '.' ; dot or dotdot entry ? 5401 0000726B 7503E9FB00 <1> je .ret_NC_NZ ; yes, skip --> 5402 <1> 5403 00007270 50 <1> push ax 5404 00007271 53 <1> push bx 5405 00007272 51 <1> push cx 5406 00007273 52 <1> push dx 5407 00007274 56 <1> push si 5408 00007275 57 <1> push di 5409 00007276 06 <1> push es 5410 00007277 1E <1> push ds 5411 00007278 06 <1> push es 5412 00007279 1F <1> pop ds 5413 0000727A 89FE <1> mov si, di 5414 <1> 5415 0000727C 16 <1> push ss 5416 0000727D 07 <1> pop es 5417 0000727E BF[0E08] <1> mov di, line_out 5418 00007281 B90800 <1> mov cx, 8 5419 00007284 F3A4 <1> rep movsb 5420 00007286 B82020 <1> mov ax, 2020h 5421 00007289 AA <1> stosb 5422 0000728A B103 <1> mov cl, 3 5423 0000728C F3A4 <1> rep movsb 5424 0000728E AB <1> stosw 5425 <1> 5426 0000728F 1F <1> pop ds 5427 00007290 B02D <1> mov al, '-' 5428 00007292 F6C320 <1> test bl, ATTR_ARCHIVE 5429 00007295 7402 <1> jz @F 5430 00007297 B041 <1> mov al, 'A' 5431 <1> @@: 5432 00007299 AA <1> stosb 5433 0000729A B02D <1> mov al, '-' 5434 0000729C F6C302 <1> test bl, ATTR_HIDDEN 5435 0000729F 7402 <1> jz @F 5436 000072A1 B048 <1> mov al, 'H' 5437 <1> @@: 5438 000072A3 AA <1> stosb 5439 000072A4 B02D <1> mov al, '-' 5440 000072A6 F6C301 <1> test bl, ATTR_READONLY 5441 000072A9 7402 <1> jz @F 5442 000072AB B052 <1> mov al, 'R' 5443 <1> @@: 5444 000072AD AA <1> stosb 5445 000072AE B02D <1> mov al, '-' 5446 000072B0 F6C304 <1> test bl, ATTR_SYSTEM 5447 000072B3 7402 <1> jz @F 5448 000072B5 B053 <1> mov al, 'S' 5449 <1> @@: 5450 000072B7 AA <1> stosb 5451 000072B8 B82020 <1> mov ax, 2020h 5452 000072BB AB <1> stosw 5453 <1> 5454 000072BC F6C310 <1> test bl, ATTR_DIRECTORY 5455 000072BF 7408 <1> jz @F 5456 000072C1 BE[9163] <1> mov si, msg.dirinsteadsize 5457 000072C4 E83BC1 <1> call copy_single_counted_string 5458 000072C7 EB2D <1> jmp @FF 5459 <1> 5460 <1> @@: 5461 000072C9 07 <1> pop es 5462 000072CA 5E <1> pop si 5463 000072CB 56 <1> push si 5464 000072CC 06 <1> push es 5465 000072CD 268A440C <1> mov al, byte [es:si + dePlusSize] 5466 000072D1 88C4 <1> mov ah, al 5467 000072D3 2507E0 <1> and ax, 0E007h 5468 000072D6 88E2 <1> mov dl, ah 5469 000072D8 B400 <1> mov ah, 0 5470 000072DA B600 <1> mov dh, 0 5471 000072DC D1EA <1> shr dx, 1 5472 000072DE D1EA <1> shr dx, 1 5473 000072E0 09D0 <1> or ax, dx 5474 000072E2 50 <1> push ax 5475 000072E3 268B541E <1> mov dx, word [es:si + deSize + 2] 5476 000072E7 268B441C <1> mov ax, word [es:si + deSize] 5477 000072EB 5E <1> pop si 5478 000072EC 16 <1> push ss 5479 000072ED 07 <1> pop es 5480 000072EE 31C9 <1> xor cx, cx 5481 000072F0 BB0800 <1> mov bx, 4+4 5482 000072F3 E833AC <1> call disp_dxax_times_cx_width_bx_size.store 5483 <1> 5484 <1> @@: 5485 000072F6 B82020 <1> mov ax, 2020h 5486 000072F9 AB <1> stosw 5487 000072FA 07 <1> pop es 5488 000072FB 5E <1> pop si 5489 000072FC 56 <1> push si 5490 000072FD 06 <1> push es 5491 000072FE 268B5C18 <1> mov bx, word [es:si + deDate] 5492 00007302 268B7416 <1> mov si, word [es:si + deTime] 5493 00007306 16 <1> push ss 5494 00007307 07 <1> pop es 5495 00007308 89D8 <1> mov ax, bx 5496 0000730A B90900 <1> mov cx, 9 5497 0000730D D3E8 <1> shr ax, cl 5498 0000730F 05BC07 <1> add ax, 1980 5499 00007312 31D2 <1> xor dx, dx 5500 00007314 B104 <1> mov cl, 4 5501 00007316 E88546 <1> call dec_dword_minwidth 5502 00007319 B02D <1> mov al, '-' 5503 0000731B AA <1> stosb 5504 0000731C 89D8 <1> mov ax, bx 5505 0000731E B105 <1> mov cl, 5 5506 00007320 D3E8 <1> shr ax, cl 5507 00007322 83E00F <1> and ax, 15 5508 00007325 B102 <1> mov cl, 2 5509 00007327 E87446 <1> call dec_dword_minwidth 5510 0000732A B02D <1> mov al, '-' 5511 0000732C AA <1> stosb 5512 0000732D 89D8 <1> mov ax, bx 5513 0000732F 83E01F <1> and ax, 31 5514 00007332 E86946 <1> call dec_dword_minwidth 5515 00007335 B020 <1> mov al, 32 5516 00007337 AA <1> stosb 5517 00007338 89F0 <1> mov ax, si 5518 0000733A B10B <1> mov cl, 11 5519 0000733C D3E8 <1> shr ax, cl 5520 0000733E B102 <1> mov cl, 2 5521 00007340 E85B46 <1> call dec_dword_minwidth 5522 00007343 B03A <1> mov al, ':' 5523 00007345 AA <1> stosb 5524 00007346 89F0 <1> mov ax, si 5525 00007348 B105 <1> mov cl, 5 5526 0000734A D3E8 <1> shr ax, cl 5527 0000734C 83E03F <1> and ax, 63 5528 0000734F B102 <1> mov cl, 2 5529 00007351 E84A46 <1> call dec_dword_minwidth 5530 00007354 B03A <1> mov al, ':' 5531 00007356 AA <1> stosb 5532 00007357 89F0 <1> mov ax, si 5533 00007359 83E01F <1> and ax, 31 5534 0000735C D1E0 <1> shl ax, 1 5535 0000735E E83D46 <1> call dec_dword_minwidth 5536 <1> 5537 00007361 E8DA46 <1> call putsline_crlf 5538 <1> 5539 00007364 07 <1> pop es 5540 00007365 5F <1> pop di 5541 00007366 5E <1> pop si 5542 00007367 5A <1> pop dx 5543 00007368 59 <1> pop cx 5544 00007369 5B <1> pop bx 5545 0000736A 58 <1> pop ax 5546 <1> 5547 <1> .ret_NC_NZ: 5548 0000736B 80CB01 <1> or bl, 1 ; (NC, NZ) 5549 <1> .ret: 5550 0000736E C3 <1> retn 5551 <1> 5552 <1> 5553 <1> usesection lDEBUG_DATA_ENTRY 5554 <1> 5555 <1> align 2, db 0 5556 <1> handle_scan_dir_entry: 5557 00008FF2 [DEA4] <1> dw error 5558 <1> handle_scan_dir_not_found: 5559 00008FF4 [DEA4] <1> dw error 5560 <1> 5561 <1> 5562 <1> usesection lDEBUG_CODE 5563 <1> 5564 <1> scan_dir_entry_dir_or_file: 5565 0000736F B701 <1> mov bh, 1 5566 00007371 A9 <1> db __TEST_IMM16 ; (skip mov) 5567 <1> 5568 <1> scan_dir_entry: 5569 00007372 B700 <1> mov bh, 0 5570 00007374 26803D00 <1> cmp byte [es:di], 0 5571 00007378 F9 <1> stc 5572 00007379 7425 <1> je .ret 5573 0000737B 268A5D0B <1> mov bl, byte [es:di + deAttrib] 5574 0000737F F6C308 <1> test bl, ATTR_VOLLABEL 5575 00007382 751B <1> jnz @F ; skip volume labels (and LFNs) --> (NZ) 5576 00007384 84FF <1> test bh, bh 5577 00007386 7509 <1> jnz .no_check_dir 5578 00007388 80E310 <1> and bl, ATTR_DIRECTORY ; isolate directory bit 5579 0000738B 3A1E[C58F] <1> cmp bl, byte [load_check_dir_attr] ; is it what we're searching? 5580 0000738F 750E <1> jne @F ; no --> 5581 <1> .no_check_dir: 5582 00007391 56 <1> push si 5583 00007392 57 <1> push di 5584 00007393 51 <1> push cx 5585 00007394 BE[C88F] <1> mov si, load_kernel_name ; ds:si-> name to match 5586 00007397 B90B00 <1> mov cx, 11 ; length of padded 8.3 FAT filename 5587 0000739A F3A6 <1> repe cmpsb ; check entry 5588 0000739C 59 <1> pop cx 5589 0000739D 5F <1> pop di 5590 0000739E 5E <1> pop si 5591 <1> @@: 5592 0000739F F8 <1> clc 5593 <1> .ret: 5594 000073A0 C3 <1> retn 5595 <1> 5596 <1> 5597 <1> ; INP: es:bx -> where to place directory entry 5598 <1> ; si:di = loaded FAT sector (0 = first FAT sector) 5599 <1> ; dword [bp + ldDirCluster] = directory cluster to scan, 5600 <1> ; 0 for root dir 5601 <1> ; byte [bp + ldFATType] = size of FAT entry in bits 5602 <1> ; OUT: es:bx -> directory entry (es:bx unchanged) 5603 <1> ; si:di = loaded FAT sector 5604 <1> ; CHG: dx, ax, si, di, cx 5605 <1> scan_dir_aux_for_file: 5606 000073A1 C706[F28F][7273] <1> mov word [handle_scan_dir_entry], scan_dir_entry 5607 <1> 5608 <1> scan_dir_aux_with_error: 5609 000073A7 C706[F48F][0374] <1> mov word [handle_scan_dir_not_found], error_filenotfound 5610 <1> 5611 <1> scan_dir_aux: 5612 000073AD FF36[F209] <1> push word [auxbuff_segorsel] 5613 000073B1 8F06[E08F] <1> pop word [load_adr_dirbuf_segment] 5614 <1> 5615 <1> scan_dir: 5616 000073B5 8B46EC <1> mov ax, word [bp + ldDirCluster] 5617 000073B8 8B56EE <1> mov dx, word [bp + ldDirCluster + 2] 5618 <1> 5619 000073BB 85C0 <1> test ax, ax 5620 000073BD 7576 <1> jnz fat32_scan_root.dir_clust_dxax 5621 000073BF 85D2 <1> test dx, dx 5622 000073C1 7572 <1> jnz fat32_scan_root.dir_clust_dxax 5623 <1> 5624 <1> ; got to scan root directory. use FAT12/FAT16 walker if so, 5625 <1> ; else use FAT32 walker 5626 <1> 5627 000073C3 807EE610 <1> cmp byte [bp + ldFATType], 16 5628 000073C7 7766 <1> ja fat32_scan_root 5629 <1> 5630 000073C9 56 <1> push si 5631 000073CA 57 <1> push di 5632 000073CB 06 <1> push es 5633 000073CC 53 <1> push bx 5634 <1> 5635 000073CD 8B7611 <1> mov si, word [bp + bsBPB + bpbNumRootDirEnts] 5636 <1> 5637 <1> 5638 <1> ; (boot.asm code starts here) 5639 <1> 5640 <1> fat16_scan_root: 5641 000073D0 85F6 <1> test si, si 5642 000073D2 7424 <1> jz handle_filenotfound_fat16 5643 <1> 5644 000073D4 8B46D0 <1> mov ax, [bp + ldRootSector] 5645 000073D7 8B56D2 <1> mov dx, [bp + ldRootSector + 2] 5646 <1> 5647 <1> ; Scan root directory for file. We don't bother to check for deleted 5648 <1> ; entries (E5h) or entries that mark the end of the directory (00h). 5649 <1> ; number of root entries in si here 5650 <1> fat16_next_sect: 5651 000073DA 8B1E[E08F] <1> mov bx, [load_adr_dirbuf_segment] 5652 000073DE E83005 <1> call read_sector 5653 <1> 5654 000073E1 8B4ED4 <1> mov cx, [bp + ldEntriesPerSector] ; entries per sector as loop counter 5655 000073E4 31FF <1> xor di, di ; es:di-> first entry in this sector 5656 <1> fat16_next_ent: 5657 000073E6 FF16[F28F] <1> call near word [handle_scan_dir_entry] 5658 000073EA 720C <1> jc handle_filenotfound_fat16 5659 000073EC 8D7D20 <1> lea di, [di + DIRENTRY_size] ; bytes/dirent 5660 000073EF 7428 <1> je fat16_found_it ; found entry --> 5661 <1> 5662 000073F1 4E <1> dec si ; count down entire root's entries 5663 000073F2 E0F2 <1> loopnz fat16_next_ent ; count down sector's entries (jumps iff si >0 && cx >0) 5664 000073F4 85F6 <1> test si, si ; work around qemu bug 5665 000073F6 75E2 <1> jnz fat16_next_sect ; (jumps iff si >0 && cx ==0) 5666 <1> ; ends up here iff si ==0 5667 <1> ; ie all root entries checked unsuccessfully 5668 <1> %if 0 5669 <1> 5670 <1> qemu prior to 2020-08 has a bug which affects the above 5671 <1> conditionals. The bug is that if NZ is set (like when the 5672 <1> branch to fat16_found_it is not taken) and then another 5673 <1> instruction sets ZR (like the dec si at the end of the root 5674 <1> directory) and then loopnz is used which sets cx to zero 5675 <1> then after the loopnz FL will be NZ leading to the jnz branch 5676 <1> to be taken. Eventually the entire load unit is traversed and 5677 <1> qemu returns error 01h when trying to read past the end of 5678 <1> the unit (at least for 1440 KiB diskettes). 5679 <1> 5680 <1> The bug is now worked around by the comparison with zero at 5681 <1> the fat16_next_ent label. The test si, si serves as another 5682 <1> workaround to forcibly set the flag correctly after loopnz. 5683 <1> It is only really needed when the entire root is filled with 5684 <1> non-zero directory entries and an older qemu is used. 5685 <1> 5686 <1> Reference: https://bugs.launchpad.net/qemu/+bug/1888165 5687 <1> 5688 <1> %endif 5689 <1> 5690 <1> handle_filenotfound_fat16: 5691 000073F8 5B <1> pop bx 5692 000073F9 07 <1> pop es 5693 000073FA 5F <1> pop di 5694 000073FB 5E <1> pop si 5695 <1> 5696 000073FC A9 <1> db __TEST_IMM16 ; (skip pop and pop) 5697 <1> handle_filenotfound_fat32: 5698 000073FD 5B <1> pop bx 5699 000073FE 07 <1> pop es 5700 <1> 5701 <1> handle_filenotfound: 5702 000073FF FF26[F48F] <1> jmp near word [handle_scan_dir_not_found] 5703 <1> 5704 <1> error_filenotfound: 5705 <1> %if _INPUT_FILE_BOOT 5706 00007403 F606[A700]08 <1> testopt [internalflags3], dif3_in_if 5707 00007408 7403E96E1C <1> jnz if_exists_not_found 5708 <1> %endif 5709 0000740D BA[4162] <1> mov dx, msg.boot_file_not_found 5710 00007410 B81E02 <1> mov ax, 021Eh 5711 00007413 E80F31 <1> call setrc 5712 00007416 E9E2EF <1> jmp bootcmd.fail 5713 <1> 5714 <1> fat16_found_it: 5715 00007419 5B <1> pop bx 5716 0000741A 58 <1> pop ax 5717 0000741B B92000 <1> mov cx, 32 5718 0000741E 29CF <1> sub di, cx 5719 00007420 1E <1> push ds 5720 00007421 06 <1> push es 5721 00007422 1F <1> pop ds 5722 00007423 89FE <1> mov si, di ; ds:si -> entry in directory buffer 5723 00007425 89DF <1> mov di, bx 5724 00007427 8EC0 <1> mov es, ax ; es:di -> destination for entry 5725 00007429 F3A4 <1> rep movsb 5726 0000742B 1F <1> pop ds 5727 0000742C 5F <1> pop di 5728 0000742D 5E <1> pop si 5729 0000742E C3 <1> retn 5730 <1> 5731 <1> 5732 <1> ; (boot32.asm code starts here) 5733 <1> 5734 <1> fat32_scan_root: 5735 0000742F 8B462C <1> mov ax, [bp + bsBPB + ebpbRootCluster] 5736 00007432 8B562E <1> mov dx, [bp + bsBPB + ebpbRootCluster + 2] 5737 <1> 5738 <1> .dir_clust_dxax: 5739 00007435 06 <1> push es 5740 00007436 53 <1> push bx 5741 <1> 5742 00007437 E83501 <1> call check_clust 5743 0000743A 72C1 <1> jc handle_filenotfound_fat32 5744 <1> 5745 <1> fat32_next_root_clust: 5746 0000743C E84F00 <1> call clust_to_first_sector 5747 0000743F 51 <1> push cx 5748 00007440 53 <1> push bx 5749 00007441 8B4EE8 <1> mov cx, [bp + ldClusterSize] 5750 <1> fat32_next_root_sect: 5751 00007444 51 <1> push cx 5752 00007445 8B4ED4 <1> mov cx, [bp + ldEntriesPerSector] 5753 <1> 5754 <1> ; Scan root directory for file. We don't bother to check for deleted 5755 <1> ; entries (E5h) or entries that mark the end of the directory (00h). 5756 00007448 8B1E[E08F] <1> mov bx, [load_adr_dirbuf_segment] 5757 0000744C E8C204 <1> call read_sector 5758 <1> 5759 0000744F 57 <1> push di 5760 00007450 31FF <1> xor di, di ; es:di-> first entry in this sector 5761 <1> fat32_next_ent: 5762 00007452 FF16[F28F] <1> call near word [handle_scan_dir_entry] 5763 00007456 7214 <1> jc handle_filenotfound_fat32_pop 5764 00007458 8D7D20 <1> lea di, [di + DIRENTRY_size] ; bytes/dirent 5765 0000745B 7415 <1> je fat32_found_it ; found entry --> 5766 <1> 5767 0000745D E2F3 <1> loop fat32_next_ent ; count down sector's entries (jumps iff cx >0) 5768 0000745F 5F <1> pop di 5769 00007460 59 <1> pop cx 5770 00007461 E2E1 <1> loop fat32_next_root_sect 5771 00007463 5B <1> pop bx 5772 00007464 59 <1> pop cx 5773 00007465 E84F00 <1> call clust_next 5774 00007468 73D2 <1> jnc fat32_next_root_clust 5775 0000746A EB04 <1> jmp @F 5776 <1> 5777 <1> handle_filenotfound_fat32_pop: 5778 0000746C 5F <1> pop di 5779 0000746D 59 <1> pop cx 5780 0000746E 5B <1> pop bx 5781 0000746F 59 <1> pop cx 5782 <1> @@: 5783 00007470 EB8B <1> jmp handle_filenotfound_fat32 5784 <1> 5785 <1> 5786 <1> fat32_found_it: 5787 00007472 5A <1> pop dx ; value for di 5788 00007473 83C406 <1> add sp, 6 ; discard sector-in-cluster counter and cluster 5789 00007476 5B <1> pop bx 5790 00007477 58 <1> pop ax 5791 00007478 B92000 <1> mov cx, 32 5792 0000747B 29CF <1> sub di, cx 5793 0000747D 1E <1> push ds 5794 0000747E 06 <1> push es 5795 0000747F 1F <1> pop ds 5796 00007480 56 <1> push si 5797 00007481 89FE <1> mov si, di ; ds:si -> entry in directory buffer 5798 00007483 89DF <1> mov di, bx 5799 00007485 8EC0 <1> mov es, ax ; es:di -> destination for entry 5800 00007487 F3A4 <1> rep movsb 5801 00007489 5E <1> pop si 5802 0000748A 1F <1> pop ds 5803 0000748B 89D7 <1> mov di, dx ; restore si:di = loaded FAT sector 5804 0000748D C3 <1> retn 5805 <1> 5806 <1> 5807 <1> ; (iniload.asm code continues here) 5808 <1> 5809 <1> ; INP: dx:ax = cluster - 2 (0-based cluster) 5810 <1> ; OUT: cx:bx = input dx:ax 5811 <1> ; dx:ax = first sector of that cluster 5812 <1> ; CHG: - 5813 <1> clust_to_first_sector: 5814 0000748E 52 <1> push dx 5815 0000748F 50 <1> push ax 5816 00007490 52 <1> push dx 5817 00007491 F726[788C] <1> mul word [load_data - LOADDATA2 + ldClusterSize] 5818 00007495 93 <1> xchg bx, ax 5819 00007496 87CA <1> xchg cx, dx 5820 00007498 58 <1> pop ax 5821 00007499 F726[788C] <1> mul word [load_data - LOADDATA2 + ldClusterSize] 5822 0000749D 85D2 <1> test dx, dx 5823 0000749F 7513 <1> jnz .error_badchain 5824 000074A1 92 <1> xchg dx, ax 5825 000074A2 01CA <1> add dx, cx 5826 000074A4 720E <1> jc .error_badchain 5827 000074A6 93 <1> xchg ax, bx 5828 <1> 5829 000074A7 0306[8C8C] <1> add ax, [load_data - LOADDATA2 + lsvDataStart] 5830 000074AB 1316[8E8C] <1> adc dx, [load_data - LOADDATA2 + lsvDataStart + 2] 5831 000074AF 7203 <1> jc .error_badchain 5832 <1> ; dx:ax = first sector in cluster 5833 000074B1 5B <1> pop bx 5834 000074B2 59 <1> pop cx ; cx:bx = cluster 5835 000074B3 C3 <1> retn 5836 <1> 5837 <1> .error_badchain: 5838 000074B4 E9E10D <1> jmp error_badchain 5839 <1> 5840 <1> 5841 <1> ; INP: cx:bx = cluster (0-based) 5842 <1> ; si:di = loaded FAT sector, -1 if none 5843 <1> ; OUT: CY if no next cluster 5844 <1> ; NC if next cluster found, 5845 <1> ; dx:ax = next cluster value (0-based) 5846 <1> ; si:di = loaded FAT sector 5847 <1> ; CHG: cx, bx 5848 <1> clust_next: 5849 000074B7 89D8 <1> mov ax, bx 5850 000074B9 89CA <1> mov dx, cx 5851 <1> .dxax: 5852 000074BB 83C002 <1> add ax, 2 5853 000074BE 83D200 <1> adc dx, 0 5854 <1> 5855 000074C1 06 <1> push es 5856 000074C2 803E[768C]10 <1> cmp byte [load_data - LOADDATA2 + ldFATType], 16 5857 000074C7 7452 <1> je .fat16 5858 000074C9 774C <1> ja .fat32 5859 <1> 5860 <1> .fat12: 5861 <1> ; FAT12 entries are 12 bits, bytes are 8 bits. Ratio is 3 / 2, 5862 <1> ; so multiply cluster number by 3 first, then divide by 2. 5863 <1> ; ax = cluster number (up to 12 bits set) 5864 000074CB 89C2 <1> mov dx, ax 5865 000074CD D1E0 <1> shl ax, 1 ; = 2n (up to 13 bits set) 5866 000074CF 01D0 <1> add ax, dx ; = 2n+n = 3n (up to 14 bits set) 5867 000074D1 D1E8 <1> shr ax, 1 ; ax = byte offset into FAT (0..6129) 5868 <1> ; CF = whether to use high 12 bits 5869 000074D3 19C9 <1> sbb cx, cx ; = -1 iff CY, else 0 5870 <1> 5871 <1> ; Use the calculated byte offset as an offset into the FAT 5872 <1> ; buffer, which holds all of the FAT's relevant data. 5873 000074D5 8E06[888C] <1> mov es, [load_data - LOADDATA2 + lsvFATSeg] 5874 000074D9 89C3 <1> mov bx, ax ; -> 16-bit word in FAT to load 5875 <1> 5876 000074DB F606[778C]02 <1> test byte [load_ldflags], ldfFATInvalid 5877 000074E0 7426 <1> jz .fat12_have_fat ; already have it --> 5878 000074E2 51 <1> push cx 5879 000074E3 31D2 <1> xor dx, dx 5880 000074E5 F736[9B8C] <1> div word [load_data - LOADDATA2 + bsBPB + bpbBytesPerSector] 5881 <1> ; dx = remainder, byte offset 5882 <1> ; ax = sector to read 5883 000074E9 52 <1> push dx 5884 000074EA 31D2 <1> xor dx, dx 5885 000074EC 0306[9E8C] <1> add ax, [load_data - LOADDATA2 + bsBPB + bpbReservedSectors] 5886 000074F0 11D2 <1> adc dx, dx 5887 000074F2 8B1E[888C] <1> mov bx, [load_data - LOADDATA2 + lsvFATSeg] 5888 000074F6 E81804 <1> call read_sector 5889 000074F9 59 <1> pop cx 5890 000074FA 3B0E[9B8C] <1> cmp cx, word [load_data - LOADDATA2 + bsBPB + bpbBytesPerSector] 5891 000074FE 7505 <1> jne .fat12_have_fat_cx 5892 00007500 06 <1> push es 5893 00007501 E80D04 <1> call read_sector ; read second sector for straddling entry 5894 00007504 07 <1> pop es 5895 <1> 5896 <1> .fat12_have_fat_cx: 5897 00007505 89CB <1> mov bx, cx 5898 00007507 59 <1> pop cx 5899 <1> 5900 <1> .fat12_have_fat: 5901 <1> 5902 <1> ; get 16 bits from FAT 5903 00007508 268B07 <1> mov ax, [es:bx] 5904 <1> 5905 0000750B 80E104 <1> and cl, 4 ; = 4 iff CY after shift, else 0 5906 0000750E D3E8 <1> shr ax, cl ; shift down iff odd entry, else unchanged 5907 00007510 25FF0F <1> and ax, 0FFFh ; insure it's only 12 bits 5908 00007513 31D2 <1> xor dx, dx 5909 00007515 EB57 <1> jmp short .gotvalue 5910 <1> 5911 <1> .fat32: 5912 <1> ; * 4 = byte offset into FAT (0--4000_0000h) 5913 00007517 01C0 <1> add ax, ax 5914 00007519 11D2 <1> adc dx, dx 5915 <1> .fat16: 5916 <1> ; * 2 = byte offset into FAT (0--2_0000h) 5917 0000751B 01C0 <1> add ax, ax 5918 0000751D 11D2 <1> adc dx, dx 5919 <1> 5920 0000751F 50 <1> push ax 5921 00007520 92 <1> xchg ax, dx 5922 00007521 31D2 <1> xor dx, dx ; dx:ax = high word 5923 00007523 F736[9B8C] <1> div word [load_data - LOADDATA2 + bsBPB + bpbBytesPerSector] 5924 00007527 89C3 <1> mov bx, ax 5925 00007529 58 <1> pop ax ; dx = remainder, ax = low word 5926 0000752A F736[9B8C] <1> div word [load_data - LOADDATA2 + bsBPB + bpbBytesPerSector] 5927 0000752E 87D3 <1> xchg dx, bx ; dx:ax = result, bx = remainder 5928 <1> ; dx:ax = sector offset into FAT (0--200_0000h) 5929 <1> ; bx = byte offset into FAT sector (0--8190) 5930 00007530 F606[778C]02 <1> test byte [load_ldflags], ldfFATInvalid 5931 00007535 7513 <1> jnz .read_no_store ; always read --> 5932 <1> 5933 00007537 39F2 <1> cmp dx, si 5934 00007539 7504 <1> jne @F ; read sector 5935 0000753B 39F8 <1> cmp ax, di 5936 0000753D 741B <1> je @FF ; sector is already buffered 5937 <1> @@: 5938 0000753F 89D6 <1> mov si, dx 5939 00007541 89C7 <1> mov di, ax 5940 00007543 8916[868C] <1> mov word [load_data - LOADDATA2 + lsvFATSector + 2], dx 5941 00007547 A3[848C] <1> mov word [load_data - LOADDATA2 + lsvFATSector + 0], ax 5942 <1> 5943 <1> .read_no_store: 5944 0000754A 53 <1> push bx 5945 0000754B 0306[9E8C] <1> add ax, [load_data - LOADDATA2 + bsBPB + bpbReservedSectors] 5946 0000754F 83D200 <1> adc dx, 0 5947 00007552 8B1E[888C] <1> mov bx, [load_data - LOADDATA2 + lsvFATSeg] 5948 00007556 E8B803 <1> call read_sector 5949 00007559 5B <1> pop bx 5950 <1> @@: 5951 0000755A 8E06[888C] <1> mov es, [load_data - LOADDATA2 + lsvFATSeg] 5952 0000755E 31D2 <1> xor dx, dx 5953 00007560 268B07 <1> mov ax, [es:bx] 5954 <1> 5955 00007563 803E[768C]10 <1> cmp byte [load_data - LOADDATA2 + ldFATType], 16 5956 00007568 7404 <1> je @F 5957 0000756A 268B5702 <1> mov dx, [es:bx + 2] 5958 <1> @@: 5959 <1> .gotvalue: 5960 0000756E 07 <1> pop es 5961 <1> 5962 <1> ; INP: dx:ax = cluster value, 2-based 5963 <1> ; OUT: dx:ax -= 2 (makes it 0-based) 5964 <1> ; CY iff invalid cluster 5965 <1> check_clust: 5966 0000756F 80E60F <1> and dh, 0Fh 5967 00007572 83E802 <1> sub ax, 2 5968 00007575 83DA00 <1> sbb dx, 0 5969 <1> 5970 00007578 803E[768C]10 <1> cmp byte [load_data - LOADDATA2 + ldFATType], 16 5971 0000757D 7707 <1> ja .fat32 5972 0000757F 740B <1> je .fat16 5973 <1> 5974 <1> .fat12: 5975 00007581 3DF50F <1> cmp ax, 0FF7h - 2 5976 00007584 EB09 <1> jmp short .common 5977 <1> 5978 <1> .fat32: 5979 00007586 81FAFF0F <1> cmp dx, 0FFFh 5980 0000758A 7203 <1> jb @F ; CY here means valid ...- 5981 <1> 5982 <1> .fat16: 5983 0000758C 83F8F5 <1> cmp ax, 0FFF7h - 2 5984 <1> @@: ; -... or if NC first, CY here also 5985 <1> .common: 5986 0000758F F5 <1> cmc ; NC if valid 5987 00007590 720E <1> jc .ret 5988 00007592 3B16[528C] <1> cmp dx, word [load_data - LOADDATA2 + ldMaxCluster + 2] 5989 00007596 7504 <1> jne @F 5990 00007598 3B06[508C] <1> cmp ax, word [load_data - LOADDATA2 + ldMaxCluster] 5991 <1> @@: 5992 0000759C 7701 <1> ja .ret_CY 5993 0000759E A8 <1> db __TEST_IMM8 ; (skip stc, NC) 5994 <1> .ret_CY: 5995 0000759F F9 <1> stc 5996 <1> .ret: 5997 000075A0 C3 <1> retn 5998 <1> 5999 <1> 6000 <1> partition_table equ load_partition_table 6001 <1> partition_table.end equ load_partition_table.end 6002 <1> %define _SCANPTAB_PREFIX 6003 <1> %define _SCANPTAB_DEBUG4_PREFIX 6004 <1> %assign _PARTITION_TABLE_IN_CS 0 6005 <1> %define _BASE bp 6006 <1> %include "scanptab.asm" 6007 <2> 6008 <2> %if 0 6009 <2> 6010 <2> scanptab - Scan partition table 6011 <2> 2019 by C. Masloch 6012 <2> 6013 <2> Usage of the works is permitted provided that this 6014 <2> instrument is retained with the works, so that any entity 6015 <2> that uses the works is notified of this instrument. 6016 <2> 6017 <2> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 6018 <2> 6019 <2> %endif 6020 <2> 6021 <2> ; _SCANPTAB_PREFIX = prefix for our variables and functions 6022 <2> ; _SCANPTAB_DEBUG4_PREFIX = prefix for d4 function calls 6023 <2> numdef PARTITION_TABLE_IN_CS, 1 6024 <2> numdef BOOTCMD_FAIL_ERROR, 1 6025 <2> gendef BASE, ss:bx 6026 <2> %ifidn _BASE, ss:bx 6027 <2> %elifidn _BASE, bp 6028 <2> %else 6029 <2> %error Invalid base 6030 <2> %endif 6031 <2> 6032 <2> 6033 <2> ; INP: byte [%load_unit] = unit to scan 6034 <2> ; cx = function to call for each partition 6035 <2> ; OUT: function called for each partition 6036 <2> ; CHG: di, si, ax, bx, (cx), dx, es 6037 <2> ; STT: ds => data segment (used for %load_* variables, unless bp-based) 6038 <2> ; 6039 <2> ; Note: Calls %read_partition_table (in this module), 6040 <2> ; which calls %read_ae_512_bytes, which calls 6041 <2> ; read_sector. The read_sector base must be 6042 <2> ; zero and the geometry must be initialised. 6043 <2> 6044 <2> ; Function in cx is called with: 6045 <2> ; INP: es:si -> partition table entry, 6046 <2> ; si = %partition_table .. %partition_table+48, 6047 <2> ; es = ss (if not _PARTITION_TABLE_IN_CS) 6048 <2> ; es = cs (if _PARTITION_TABLE_IN_CS) 6049 <2> ; byte [%load_current_partition] = partition number, 6050 <2> ; 0 for diskette (unpartitioned), 6051 <2> ; 1 to 4 for primary partitions, 6052 <2> ; 5+ for logical partitions 6053 <2> ; _BASE + di -> above part table metadata, 6054 <2> ; dword [_BASE + di - 4] = root (outermost extended position) 6055 <2> ; dword [_BASE + di - 8] = base (current table position) 6056 <2> ; dword [es:si + piStart] = local partition start 6057 <2> ; base + local start = absolute partition start 6058 <2> ; _BASE -> bp value (dummy if _BASE is not bp), 6059 <2> ; near return address of scan_partitions 6060 <2> ; CHG: ax, (cx), dx, bx (unless part of _BASE) 6061 <2> ; STT: ds => data segment (used for load_* variables, unless bp-based) 6062 <2> ; Note: preserves (cx), si, di, ds, es, (bp), _BASE 6063 <2> ; 6064 <2> ; Note: If the function returns to scan_partitions, 6065 <2> ; cx must be left as the function to call for 6066 <2> ; subsequent partitions afterwards. 6067 <2> ; Note: May load sp from _BASE then pop bp then return 6068 <2> ; near if the scan should stop after the call. 6069 <2> %[_SCANPTAB_PREFIX]scan_partitions: 6070 000075A1 8326[BC8F]00 <2> and word [ %[_SCANPTAB_PREFIX]load_partition_cycle], 0 6071 <2> d4 call %[_SCANPTAB_DEBUG4_PREFIX]d4message 6072 <2> d4 asciz "In scan_partitions",13,10 6073 <2> 6074 000075A6 55 <2> push bp 6075 <2> %ifidn _BASE, ss:bx 6076 <2> mov bx, sp 6077 <2> %elifidn _BASE, bp 6078 000075A7 89E5 <2> mov bp, sp 6079 <2> %endif 6080 000075A9 31FF <2> xor di, di 6081 000075AB 57 <2> push di ; [_BASE+di-2] 6082 000075AC 57 <2> push di ; [_BASE+di-4] 6083 000075AD 57 <2> push di ; [_BASE+di-6] 6084 000075AE 57 <2> push di ; [_BASE+di-8] 6085 <2> 6086 000075AF 803E[D08C]80 <2> cmp byte [ %[_SCANPTAB_PREFIX]load_unit], 80h 6087 000075B4 7325 <2> jae @F 6088 <2> 6089 000075B6 57 <2> push di 6090 000075B7 51 <2> push cx 6091 <2> %if _PARTITION_TABLE_IN_CS 6092 <2> push cs 6093 <2> %else 6094 000075B8 16 <2> push ss 6095 <2> %endif 6096 000075B9 07 <2> pop es 6097 000075BA BF[908B] <2> mov di, %[_SCANPTAB_PREFIX]partition_table 6098 000075BD 31C0 <2> xor ax, ax 6099 000075BF B92000 <2> mov cx, (4 * 16) >> 1 6100 000075C2 F3AB <2> rep stosw ; initialise fake partition table 6101 000075C4 59 <2> pop cx 6102 000075C5 5F <2> pop di 6103 000075C6 BE[908B] <2> mov si, %[_SCANPTAB_PREFIX]partition_table 6104 <2> ; -> fake PARTINFO 6105 000075C9 26C60480 <2> mov byte [es:si + piBoot], 80h ; fake primary active 6106 000075CD 26C64404FF <2> mov byte [es:si + piType], 0FFh ; fake a type 6107 000075D2 C606[C38F]00 <2> mov byte [ %[_SCANPTAB_PREFIX]load_current_partition], 0 ; special: 0 = diskette 6108 <2> ; piLength is 0, too 6109 000075D7 FFD1 <2> call cx 6110 <2> 6111 000075D9 EB66 <2> jmp %[_SCANPTAB_PREFIX]scan_logical.end 6112 <2> 6113 <2> 6114 <2> @@: 6115 000075DB 31C0 <2> xor ax, ax 6116 000075DD 31D2 <2> xor dx, dx 6117 <2> d4 call %[_SCANPTAB_DEBUG4_PREFIX]d4message 6118 <2> d4 asciz "In scan_partitions (before first call to read_partition_table)",13,10 6119 000075DF E8DA00 <2> call %[_SCANPTAB_PREFIX]read_partition_table 6120 <2> d4 call %[_SCANPTAB_DEBUG4_PREFIX]d4message 6121 <2> d4 asciz "In scan_partitions (after first call to read_partition_table)",13,10 6122 000075E2 BE[908B] <2> mov si, %[_SCANPTAB_PREFIX]partition_table 6123 000075E5 8816[C38F] <2> mov byte [ %[_SCANPTAB_PREFIX]load_current_partition], dl ; = 0 6124 <2> .loop_primary_parts: 6125 000075E9 FE06[C38F] <2> inc byte [ %[_SCANPTAB_PREFIX]load_current_partition] 6126 000075ED 26807C0400 <2> cmp byte [es:si + piType], 0 6127 000075F2 7402 <2> je .loop_primary_skip 6128 000075F4 FFD1 <2> call cx ; es:si -> partition table entry 6129 <2> ; byte [load_current_partition] = which 6130 <2> .loop_primary_skip: 6131 000075F6 83C610 <2> add si, 16 6132 000075F9 81FE[D08B] <2> cmp si, %[_SCANPTAB_PREFIX]partition_table.end 6133 000075FD 72EA <2> jb .loop_primary_parts 6134 <2> 6135 <2> %[_SCANPTAB_PREFIX]scan_logical: 6136 <2> .: 6137 <2> d4 call %[_SCANPTAB_DEBUG4_PREFIX]d4message 6138 <2> d4 asciz "In scan_logical.",13,10 6139 000075FF BE[908B] <2> mov si, %[_SCANPTAB_PREFIX]partition_table 6140 <2> .loop: 6141 00007602 FF06[BC8F] <2> inc word [ %[_SCANPTAB_PREFIX]load_partition_cycle] 6142 00007606 7503E9A500 <2> jz .got_partition_cycle 6143 <2> 6144 0000760B 268A4404 <2> mov al, [es:si + piType] 6145 <2> 6146 <2> %ifidn _BASE, bp 6147 0000760F 31DB <2> xor bx, bx 6148 <2> %endif 6149 00007611 84C0 <2> test al, al 6150 00007613 741F <2> jz .next 6151 00007615 3C0F <2> cmp al, 0Fh ; extended partition (LBA aware) ? 6152 00007617 742C <2> je .push ; yes --> 6153 00007619 247F <2> and al, ~80h ; extended partition Linux (85h) ? 6154 0000761B 3C05 <2> cmp al, 05h ; or extended partition DOS (05h) ? 6155 0000761D 7426 <2> je .push ; yes --> 6156 <2> 6157 <2> %ifidn _BASE, bp 6158 0000761F 395BFE <2> cmp word [_BASE+di-2], bx 6159 00007622 7505 <2> jne .logical 6160 00007624 395BFC <2> cmp word [_BASE+di-4], bx 6161 <2> %else 6162 <2> cmp word [_BASE+di-2], 0 6163 <2> jne .logical 6164 <2> cmp word [_BASE+di-4], 0 6165 <2> %endif 6166 00007627 740B <2> je .next 6167 <2> .logical: 6168 00007629 FE06[C38F] <2> inc byte [ %[_SCANPTAB_PREFIX]load_current_partition] 6169 0000762D 7503E98400 <2> jz .error_too_many_partitions 6170 00007632 FFD1 <2> call cx 6171 <2> ; CHG: ax, (cx), dx, bx if _BASE = bp 6172 <2> ; preserve: (cx), si, di, ds, es, bx if _BASE = ss:bx 6173 <2> .next: 6174 00007634 83C610 <2> add si, 16 ; -> next partition table entry 6175 00007637 81FE[D08B] <2> cmp si, %[_SCANPTAB_PREFIX]partition_table.end 6176 <2> ; was last? 6177 0000763B 72C5 <2> jb .loop ; no, loop --> 6178 0000763D 85FF <2> test di, di ; still some on stack? 6179 0000763F 7546 <2> jnz .pop ; yes, pop 6180 <2> .end: 6181 <2> %ifidn _BASE, bp 6182 00007641 89EC <2> mov sp, bp ; restore sp 6183 00007643 5D <2> pop bp 6184 <2> %else 6185 <2> mov sp, bx ; restore sp 6186 <2> pop ax ; (discard dummy bp value) 6187 <2> %endif 6188 00007644 C3 <2> retn ; and bye 6189 <2> 6190 <2> .push: 6191 <2> d4 call %[_SCANPTAB_DEBUG4_PREFIX]d4message 6192 <2> d4 asciz "In scan_logical.push",13,10 6193 <2> 6194 00007645 56 <2> push si 6195 <2> .push_check_empty_next: 6196 00007646 83C610 <2> add si, 16 ; -> next 6197 00007649 81FE[D08B] <2> cmp si, %[_SCANPTAB_PREFIX]partition_table.end 6198 <2> ; at end? 6199 0000764D 734A <2> jae .replace ; yes, no other partitions found, replace --> 6200 0000764F 26807C0400 <2> cmp byte [es:si + piType], 0 ; is this a partition? 6201 00007654 74F0 <2> je .push_check_empty_next ; no, check next --> 6202 <2> ; found a partition after this, do push 6203 <2> ; (possibly logical or another extended) 6204 <2> .push_check_is_not_empty: 6205 <2> d4 call %[_SCANPTAB_DEBUG4_PREFIX]d4message 6206 <2> d4 asciz "In scan_logical.push_check_is_not_empty",13,10 6207 00007656 5E <2> pop si ; restore -> partition table entry 6208 00007657 56 <2> push si ; stored at word [_BASE+di-10] 6209 00007658 83EF0A <2> sub di, 10 6210 0000765B FF7308 <2> push word [_BASE+di+10-2] 6211 0000765E FF7306 <2> push word [_BASE+di+10-4] ; copy root 6212 <2> 6213 00007661 268B4408 <2> mov ax, word [es:si + piStart] 6214 00007665 268B540A <2> mov dx, word [es:si + piStart + 2] ; get extended partition offset 6215 00007669 0343FC <2> add ax, word [_BASE+di-4] 6216 0000766C 1353FE <2> adc dx, word [_BASE+di-2] ; add in root to get absolute sector number 6217 <2> 6218 0000766F 52 <2> push dx 6219 00007670 50 <2> push ax ; new base 6220 <2> 6221 <2> .replace_common: 6222 <2> %ifidn _BASE, bp 6223 00007671 395BFE <2> cmp word [_BASE+di-2], bx ; have a (nonzero) root? 6224 00007674 750B <2> jne .have_root 6225 00007676 395BFC <2> cmp word [_BASE+di-4], bx 6226 <2> %else 6227 <2> cmp word [_BASE+di-2], 0 ; have a (nonzero) root? 6228 <2> jne .have_root 6229 <2> cmp word [_BASE+di-4], 0 6230 <2> %endif 6231 00007679 7506 <2> jne .have_root ; yes --> 6232 <2> 6233 0000767B 8953FE <2> mov word [_BASE+di-2], dx 6234 0000767E 8943FC <2> mov word [_BASE+di-4], ax ; set root 6235 <2> .have_root: 6236 <2> 6237 00007681 E83800 <2> call %[_SCANPTAB_PREFIX]read_partition_table 6238 00007684 E978FF <2> jmp . 6239 <2> 6240 <2> .pop: 6241 <2> d4 call %[_SCANPTAB_DEBUG4_PREFIX]d4message 6242 <2> d4 asciz "In scan_logical.pop",13,10 6243 <2> 6244 00007687 83C70A <2> add di, 10 6245 0000768A 83C408 <2> add sp, 8 6246 0000768D 5E <2> pop si 6247 <2> 6248 0000768E 8B43F8 <2> mov ax, word [_BASE+di-8] 6249 00007691 8B53FA <2> mov dx, word [_BASE+di-6] 6250 00007694 E82500 <2> call %[_SCANPTAB_PREFIX]read_partition_table 6251 00007697 EB9B <2> jmp .next 6252 <2> 6253 <2> .replace: 6254 <2> d4 call %[_SCANPTAB_DEBUG4_PREFIX]d4message 6255 <2> d4 asciz "In scan_logical.replace",13,10 6256 <2> 6257 00007699 5E <2> pop si ; (discard) 6258 0000769A 268B4408 <2> mov ax, word [es:si + piStart] 6259 0000769E 268B540A <2> mov dx, word [es:si + piStart + 2] ; get extended partition offset 6260 000076A2 0343FC <2> add ax, word [_BASE+di - 4] 6261 000076A5 1353FE <2> adc dx, word [_BASE+di - 2] ; add in root 6262 000076A8 8943F8 <2> mov word [_BASE+di - 8], ax 6263 000076AB 8953FA <2> mov word [_BASE+di - 6], dx ; set base 6264 <2> 6265 000076AE EBC1 <2> jmp .replace_common 6266 <2> 6267 <2> 6268 <2> %if _BOOTCMD_FAIL_ERROR 6269 <2> .got_partition_cycle: 6270 000076B0 BA[5461] <2> mov dx, msg.boot_partition_cycle_error 6271 000076B3 E945ED <2> jmp bootcmd.fail 6272 <2> 6273 <2> .error_too_many_partitions: 6274 000076B6 BA[3161] <2> mov dx, msg.boot_too_many_partitions_error 6275 000076B9 E93FED <2> jmp bootcmd.fail 6276 <2> %endif 6277 <2> 6278 <2> 6279 <2> ; if _PARTITION_TABLE_IN_CS: 6280 <2> ; INP: dx:ax = partition table sector to read 6281 <2> ; CHG: ax, dx 6282 <2> ; OUT: es = cs 6283 <2> ; 64 bytes [es:partition_table] = partition table 6284 <2> ; does not return if error 6285 <2> 6286 <2> ; else: 6287 <2> ; INP: dx:ax = partition table sector to read 6288 <2> ; CHG: ax, dx 6289 <2> ; OUT: es = ss 6290 <2> ; 64 bytes [es:partition_table] = partition table 6291 <2> ; does not return if error 6292 <2> %[_SCANPTAB_PREFIX]read_partition_table: 6293 000076BC 53 <2> push bx 6294 <2> %ifidn _BASE, bp 6295 000076BD 8B1E[F209] <2> mov bx, word [auxbuff_segorsel] ; bx => auxbuff 6296 <2> %else 6297 <2> mov bx, word [bp + ldSectorSeg] 6298 <2> %endif 6299 000076C1 E83B02 <2> call %[_SCANPTAB_PREFIX]read_ae_512_bytes 6300 000076C4 5B <2> pop bx 6301 000076C5 26813EFE0155AA <2> cmp word [es:510], 0AA55h 6302 000076CC 7518 <2> jne .signature_fail 6303 000076CE 1E <2> push ds 6304 000076CF 57 <2> push di 6305 000076D0 56 <2> push si 6306 000076D1 51 <2> push cx 6307 000076D2 06 <2> push es 6308 000076D3 1F <2> pop ds 6309 000076D4 BEBE01 <2> mov si, 510 - 4*16 ; ds:si -> partition table in sectorseg 6310 <2> %if _PARTITION_TABLE_IN_CS 6311 <2> push cs 6312 <2> %else 6313 000076D7 16 <2> push ss 6314 <2> %endif 6315 000076D8 07 <2> pop es 6316 000076D9 BF[908B] <2> mov di, %[_SCANPTAB_PREFIX]partition_table 6317 <2> ; es:di -> cs:%[_SCANPTAB_PREFIX]partition_table 6318 000076DC B92000 <2> mov cx, 4*16 / 2 6319 000076DF F3A5 <2> rep movsw 6320 000076E1 59 <2> pop cx 6321 000076E2 5E <2> pop si 6322 000076E3 5F <2> pop di 6323 000076E4 1F <2> pop ds 6324 000076E5 C3 <2> retn 6325 <2> 6326 <2> 6327 <2> %if _BOOTCMD_FAIL_ERROR 6328 <2> .signature_fail: 6329 000076E6 BA[4060] <2> mov dx, msg.bootfail_sig_parttable 6330 000076E9 E90FED <2> jmp bootcmd.fail 6331 <2> %endif 6007 <1> 6008 <1> 6009 <1> ; INP: al = first character 6010 <1> ; si -> next 6011 <1> ; OUT: doesn't return if error 6012 <1> ; bx:dx = number read 6013 <1> ; al = character after the number 6014 <1> ; si -> next 6015 <1> ; CHG: cx, ax, di 6016 <1> boot_get_decimal_literal: 6017 000076EC BA0A00 <1> mov dx, 10 ; set base: decimal 6018 <1> %if 1 6019 000076EF B93940 <1> mov cx, '9' | (('A'-10-1 + 10) << 8) 6020 <1> %else 6021 <1> mov cl, dl 6022 <1> add cl, '0'-1 6023 <1> cmp cl, '9' 6024 <1> jbe .lit_basebelow11 6025 <1> mov cl, '9' 6026 <1> .lit_basebelow11: ; cl = highest decimal digit for base ('1'..'9') 6027 <1> mov ch, dl 6028 <1> add ch, 'A'-10-1 ; ch = highest letter for base ('A'-x..'Z') 6029 <1> %endif 6030 000076F2 EB06 <1> jmp @F 6031 <1> 6032 <1> 6033 <1> boot_get_hexadecimal_literal: 6034 000076F4 BA1000 <1> mov dx, 16 ; set base: hexadecimal 6035 <1> %if 1 6036 000076F7 B93946 <1> mov cx, '9' | (('A'-10-1 + 16) << 8) 6037 <1> %else 6038 <1> mov cl, dl 6039 <1> add cl, '0'-1 6040 <1> cmp cl, '9' 6041 <1> jbe .lit_basebelow11 6042 <1> mov cl, '9' 6043 <1> .lit_basebelow11: ; cl = highest decimal digit for base ('1'..'9') 6044 <1> mov ch, dl 6045 <1> add ch, 'A'-10-1 ; ch = highest letter for base ('A'-x..'Z') 6046 <1> %endif 6047 <1> 6048 <1> @@: 6049 000076FA B400 <1> mov ah, 0 6050 000076FC 31DB <1> xor bx, bx 6051 000076FE 89D7 <1> mov di, dx ; di = base 6052 <1> 6053 00007700 E85640 <1> call getexpression.lit_isdigit? ; first character must be a digit 6054 00007703 7241 <1> jc .err2 6055 00007705 31D2 <1> xor dx, dx ; initialize value 6056 <1> .lit_loopdigit: 6057 00007707 3C5F <1> cmp al, '_' 6058 00007709 7432 <1> je .lit_skip 6059 0000770B E84B40 <1> call getexpression.lit_isdigit? ; was last character ? 6060 0000770E 7230 <1> jc .lit_end ; yes --> 6061 00007710 E8FC14 <1> call uppercase 6062 00007713 2C30 <1> sub al, '0' 6063 00007715 3C09 <1> cmp al, 9 ; was decimal digit ? 6064 00007717 7602 <1> jbe .lit_decimaldigit ; yes --> 6065 00007719 2C07 <1> sub al, 'A'-('9'+1) ; else adjust for hexadecimal digit 6066 <1> .lit_decimaldigit: 6067 0000771B 50 <1> push ax 6068 0000771C 89D0 <1> mov ax, dx 6069 0000771E 53 <1> push bx 6070 0000771F F7E7 <1> mul di ; multiply low word with base 6071 00007721 89D3 <1> mov bx, dx 6072 00007723 89C2 <1> mov dx, ax 6073 00007725 58 <1> pop ax 6074 00007726 52 <1> push dx 6075 00007727 F7E7 <1> mul di ; multiply high word with base 6076 00007729 85D2 <1> test dx, dx 6077 0000772B 5A <1> pop dx 6078 0000772C 7518 <1> jnz .err2 ; overflow --> 6079 0000772E 01C3 <1> add bx, ax ; add them 6080 00007730 58 <1> pop ax 6081 00007731 7213 <1> jc .err2 ; overflow --> 6082 00007733 00C2 <1> add dl, al ; add in the new digit 6083 00007735 80D600 <1> adc dh, 0 6084 00007738 83D300 <1> adc bx, byte 0 6085 0000773B 7209 <1> jc .err2 ; overflow --> 6086 <1> 6087 <1> .lit_skip: 6088 0000773D AC <1> lodsb 6089 0000773E EBC7 <1> jmp short .lit_loopdigit 6090 <1> 6091 <1> .lit_end: 6092 00007740 E89E32 <1> call isseparator? ; after the number, there must be a separator 6093 00007743 7501 <1> jne .err2 ; none here --> 6094 00007745 C3 <1> retn 6095 <1> 6096 <1> .err2: 6097 00007746 E9952D <1> jmp error 6098 <1> 6099 <1> 6100 <1> query_geometry: 6101 00007749 E8938D <1> call guard_auxbuff 6102 0000774C 8A16[D08C] <1> mov dl, [load_unit] 6103 <1> ; test dl, dl ; floppy? 6104 <1> ; jns @F ; don't attempt query, might fail --> 6105 <1> ; Note that while the original PC BIOS doesn't support this function 6106 <1> ; (for its diskettes), it does properly return the error code 01h. 6107 <1> ; https://sites.google.com/site/pcdosretro/ibmpcbios (IBM PC version 1) 6108 00007750 B408 <1> mov ah, 08h 6109 00007752 31C9 <1> xor cx, cx ; initialise cl to 0 6110 00007754 890E[AA8C] <1> mov [load_heads], cx 6111 00007758 890E[A88C] <1> mov [load_sectors], cx 6112 0000775C F9 <1> stc ; initialise to CY 6113 0000775D E83701 <1> call .int13_retry ; query drive geometry 6114 00007760 720C <1> jc .try_bootsector ; apparently failed --> 6115 00007762 88F2 <1> mov dl, dh 6116 00007764 B600 <1> mov dh, 0 ; dx = maximum head number 6117 00007766 42 <1> inc dx ; dx = number of heads (H is 0-based) 6118 00007767 89C8 <1> mov ax, cx ; ax & 3Fh = maximum sector number 6119 00007769 83E03F <1> and ax, 3Fh ; get sectors (number of sectors, S is 1-based) 6120 0000776C 7523 <1> jnz .got_sectors_heads ; valid (S is 1-based), use these --> 6121 <1> ; zero = invalid 6122 <1> .try_bootsector: 6123 0000776E 8E06[F209] <1> mov es, word [auxbuff_segorsel] ; es => auxbuff 6124 00007772 31DB <1> xor bx, bx ; es:bx -> auxbuff 6125 00007774 B80102 <1> mov ax, 0201h ; read sector, 1 sector 6126 00007777 B90100 <1> mov cx, 1 ; sector 1 (1-based!), cylinder 0 (0-based) 6127 0000777A B600 <1> mov dh, 0 ; head 0 (0-based) 6128 0000777C 8A16[D08C] <1> mov dl, [load_unit] 6129 00007780 F9 <1> stc 6130 00007781 E81301 <1> call .int13_retry 6131 00007784 7303E92B01 <1> jc .access_error 6132 <1> 6133 <1> ; note: the smallest supported sector size, 32 bytes, 6134 <1> ; does contain these entries (offset 18h and 1Ah in sector) 6135 <1> ; within the first BPB sector. 6136 00007789 268B4718 <1> mov ax, word [es:bx + bsBPB + bpbCHSSectors] 6137 0000778D 268B571A <1> mov dx, word [es:bx + bsBPB + bpbCHSHeads] 6138 <1> 6139 <1> .got_sectors_heads: 6140 00007791 A3[A88C] <1> mov word [load_sectors], ax 6141 00007794 8916[AA8C] <1> mov word [load_heads], dx 6142 <1> 6143 00007798 85C0 <1> test ax, ax 6144 0000779A 7503E93B01 <1> jz .invalid_sectors 6145 0000779F 83F83F <1> cmp ax, 63 6146 000077A2 7603E93301 <1> ja .invalid_sectors 6147 000077A7 85D2 <1> test dx, dx 6148 000077A9 7503E93301 <1> jz .invalid_heads 6149 000077AE 81FA0001 <1> cmp dx, 100h 6150 000077B2 7603E92A01 <1> ja .invalid_heads 6151 <1> 6152 000077B7 8E06[F209] <1> mov es, word [auxbuff_segorsel] ; es => auxbuff 6153 000077BB 31DB <1> xor bx, bx ; es:bx -> auxbuff 6154 000077BD 31C0 <1> xor ax, ax 6155 <1> 6156 <1> %if _AUXBUFFSIZE < 8192+2 6157 <1> %error Expecting to use auxbuff as sector size detection buffer 6158 <1> %endif 6159 <1> 6160 <1> d5 call d5dumpregs 6161 <1> d5 call d5message 6162 <1> d5 asciz 13,10,"In query_geometry 0",13,10 6163 <1> 6164 000077BF 89DF <1> mov di, bx 6165 000077C1 B90110 <1> mov cx, (8192 + 2) >> 1 6166 <1> ; es:bx -> auxbuff, es:di = same 6167 000077C4 F3AB <1> rep stosw ; fill buffer, di -> behind (auxbuff+8192+2) 6168 000077C6 B80102 <1> mov ax, 0201h ; read sector, 1 sector 6169 000077C9 41 <1> inc cx ; sector 1 (1-based!), cylinder 0 (0-based) 6170 000077CA B600 <1> mov dh, 0 ; head 0 (0-based) 6171 000077CC 8A16[D08C] <1> mov dl, [load_unit] 6172 000077D0 F9 <1> stc 6173 000077D1 E8C300 <1> call .int13_retry 6174 000077D4 7303E9DB00 <1> jc .access_error 6175 <1> 6176 000077D9 FD <1> std ; _AMD_ERRATUM_109_WORKAROUND does not apply 6177 000077DA AF <1> scasw ; -> auxbuff+8192 (at last word to sca) 6178 <1> d5 call d5dumpregs 6179 <1> d5 call d5message 6180 <1> d5 asciz 13,10,"In query_geometry 1",13,10 6181 000077DB B90110 <1> mov cx, (8192 + 2) >> 1 6182 000077DE 31C0 <1> xor ax, ax 6183 000077E0 F3AF <1> repe scasw 6184 000077E2 83C704 <1> add di, 4 ; di -> first differing byte (from top) 6185 000077E5 FC <1> cld 6186 000077E6 57 <1> push di 6187 <1> 6188 000077E7 89DF <1> mov di, bx 6189 000077E9 B90110 <1> mov cx, (8192 + 2) >> 1 6190 000077EC 48 <1> dec ax ; = FFFFh 6191 000077ED F3AB <1> rep stosw 6192 <1> 6193 000077EF B80102 <1> mov ax, 0201h 6194 000077F2 41 <1> inc cx 6195 000077F3 B600 <1> mov dh, 0 6196 000077F5 8A16[D08C] <1> mov dl, [load_unit] 6197 000077F9 F9 <1> stc 6198 000077FA E89A00 <1> call .int13_retry 6199 000077FD 7303E9B200 <1> jc .access_error 6200 <1> 6201 00007802 FD <1> std ; _AMD_ERRATUM_109_WORKAROUND does not apply 6202 00007803 AF <1> scasw ; di -> auxbuff+8192 (last word to sca) 6203 <1> d5 call d5dumpregs 6204 <1> d5 call d5message 6205 <1> d5 asciz 13,10,"In query_geometry 2",13,10 6206 00007804 5A <1> pop dx 6207 00007805 B8FFFF <1> mov ax, -1 6208 00007808 B90110 <1> mov cx, (8192 + 2) >> 1 6209 0000780B F3AF <1> repe scasw 6210 <1> %if 0 6211 <1> AAAB 6212 <1> ^ 6213 <1> sca B, match 6214 <1> ^ 6215 <1> sca B, mismatch 6216 <1> ^ 6217 <1> stop 6218 <1> %endif 6219 0000780D 83C704 <1> add di, 4 ; di -> first differing byte (from top) 6220 00007810 FC <1> cld 6221 <1> 6222 <1> %if 0 6223 <1> 0000000000000 6224 <1> AAAAAAAA00000 6225 <1> ^ 6226 <1> FFFFFFFFFFFFF 6227 <1> AAAAAAAA00FFF 6228 <1> ^ 6229 <1> %endif 6230 00007811 39FA <1> cmp dx, di ; choose the higher one 6231 00007813 7302 <1> jae @F 6232 00007815 89FA <1> mov dx, di 6233 <1> @@: 6234 00007817 29DA <1> sub dx, bx ; dx = sector size 6235 <1> 6236 <1> d5 call d5dumpregs 6237 <1> d5 call d5message 6238 <1> d5 asciz 13,10,"In query_geometry 3",13,10 6239 <1> 6240 00007819 81FA0220 <1> cmp dx, 8192 + 2 6241 0000781D 7203E9A300 <1> jae .sector_too_large 6242 00007822 B82000 <1> mov ax, 32 6243 00007825 39C2 <1> cmp dx, ax 6244 00007827 7303E9A000 <1> jb .sector_too_small 6245 <1> @@: 6246 0000782C 39C2 <1> cmp dx, ax 6247 0000782E 740C <1> je .got_match 6248 00007830 3D0020 <1> cmp ax, 8192 6249 00007833 7203E99B00 <1> jae .sector_not_power 6250 00007838 D1E0 <1> shl ax, 1 6251 0000783A EBF0 <1> jmp @B 6252 <1> 6253 <1> .got_match: 6254 0000783C A3[9B8C] <1> mov word [load_sectorsize], ax 6255 0000783F B104 <1> mov cl, 4 6256 00007841 D3E8 <1> shr ax, cl 6257 00007843 A3[7A8C] <1> mov word [load_sectorsizepara], ax 6258 <1> 6259 00007846 C606[778C]00 <1> mov byte [load_ldflags], 0 6260 0000784B 8A16[D08C] <1> mov dl, [load_unit] 6261 0000784F 31DB <1> xor bx, bx 6262 00007851 88D3 <1> mov bl, dl 6263 00007853 F687[908A]01 <1> testopt [load_unit_flags + bx], lufForceCHS 6264 00007858 7519 <1> jnz .no_lba 6265 0000785A B441 <1> mov ah, 41h 6266 0000785C BBAA55 <1> mov bx, 55AAh 6267 0000785F F9 <1> stc 6268 00007860 CD13 <1> int 13h ; 13.41.bx=55AA extensions installation check 6269 00007862 720F <1> jc .no_lba 6270 00007864 81FB55AA <1> cmp bx, 0AA55h 6271 00007868 7509 <1> jne .no_lba 6272 0000786A F6C101 <1> test cl, 1 ; support bitmap bit 0 6273 0000786D 7404 <1> jz .no_lba 6274 <1> 6275 <1> %if ldfHasLBA != 1 6276 <1> %error Assuming ldfHasLBA is 1 6277 <1> %endif 6278 0000786F FE06[778C] <1> inc byte [load_ldflags] 6279 <1> .no_lba: 6280 <1> 6281 00007873 A1[F209] <1> mov ax, word [auxbuff_segorsel] ; ax => auxbuff 6282 00007876 89C2 <1> mov dx, ax 6283 00007878 81C2FF01 <1> add dx, (8192 - 16) >> 4 6284 0000787C 89C3 <1> mov bx, ax 6285 0000787E 89D1 <1> mov cx, dx 6286 00007880 81E300F0 <1> and bx, 0F000h 6287 00007884 81E100F0 <1> and cx, 0F000h 6288 00007888 39D9 <1> cmp cx, bx 6289 0000788A 7504 <1> jne @F 6290 0000788C A3[748C] <1> mov word [load_sectorseg], ax 6291 0000788F C3 <1> retn 6292 <1> 6293 <1> @@: 6294 00007890 BA[4463] <1> mov dx, msg.boot_auxbuff_crossing 6295 00007893 B020 <1> mov al, 20h 6296 00007895 EB4F <1> jmp .error_common_j 6297 <1> 6298 <1> 6299 <1> .int13_retry: 6300 00007897 9C <1> pushf 6301 00007898 50 <1> push ax 6302 00007899 CD13 <1> int 13h ; first try 6303 0000789B 730B <1> jnc @F ; NC, success on first attempt --> 6304 <1> 6305 <1> ; reset drive 6306 0000789D 31C0 <1> xor ax, ax 6307 0000789F CD13 <1> int 13h 6308 000078A1 7205 <1> jc @F ; CY, reset failed, error in ah --> 6309 <1> 6310 <1> ; try read again 6311 000078A3 58 <1> pop ax ; restore function number 6312 000078A4 9D <1> popf ; CF 6313 000078A5 CD13 <1> int 13h ; retry, CF error status, ah error number 6314 000078A7 C3 <1> retn 6315 <1> 6316 <1> @@: ; NC or CY, stack has function number 6317 000078A8 44 <1> inc sp 6318 000078A9 44 <1> inc sp 6319 000078AA 44 <1> inc sp 6320 000078AB 44 <1> inc sp ; discard two words on stack, preserve CF 6321 000078AC C3 <1> retn 6322 <1> 6323 <1> 6324 <1> .out_of_memory_error: 6325 000078AD BA[2061] <1> mov dx, msg.boot_out_of_memory_error 6326 000078B0 B021 <1> mov al, 21h 6327 000078B2 EB32 <1> jmp .error_common_j 6328 <1> .access_error: 6329 <1> %if _INPUT_FILE_BOOT 6330 000078B4 F606[A700]08 <1> testopt [internalflags3], dif3_in_if 6331 000078B9 7403E9BD17 <1> jnz if_exists_not_found 6332 <1> %endif 6333 000078BE BA[8D61] <1> mov dx, msg.boot_access_error 6334 000078C1 B022 <1> mov al, 22h 6335 000078C3 EB21 <1> jmp .error_common_j 6336 <1> .sector_too_large: 6337 000078C5 BA[9B61] <1> mov dx, msg.boot_sector_too_large 6338 000078C8 B023 <1> mov al, 23h 6339 000078CA EB1A <1> jmp .error_common_j 6340 <1> .sector_too_small: 6341 000078CC BA[C161] <1> mov dx, msg.boot_sector_too_small 6342 000078CF B024 <1> mov al, 24h 6343 000078D1 EB13 <1> jmp .error_common_j 6344 <1> .sector_not_power: 6345 000078D3 BA[E961] <1> mov dx, msg.boot_sector_not_power 6346 000078D6 B025 <1> mov al, 25h 6347 000078D8 EB0C <1> jmp .error_common_j 6348 <1> .invalid_sectors: 6349 000078DA BA[0B62] <1> mov dx, msg.boot_invalid_sectors 6350 000078DD B026 <1> mov al, 26h 6351 000078DF EB05 <1> jmp .error_common_j 6352 <1> .invalid_heads: 6353 000078E1 BA[2762] <1> mov dx, msg.boot_invalid_heads 6354 000078E4 B027 <1> mov al, 27h 6355 <1> .error_common_j: 6356 000078E6 B402 <1> mov ah, 02h 6357 000078E8 E83A2C <1> call setrc 6358 000078EB E90DEB <1> jmp bootcmd.fail 6359 <1> 6360 <1> 6361 <1> ; INP: dx:ax = first sector 6362 <1> ; bx:0 -> buffer 6363 <1> ; OUT: dx:ax = sector number after last read 6364 <1> ; es = input bx 6365 <1> ; bx:0 -> buffer after last written 6366 <1> ; CHG: - 6367 <1> ; STT: ds = ss 6368 <1> read_ae_1536_bytes: 6369 000078EE 51 <1> push cx 6370 000078EF 53 <1> push bx 6371 000078F0 B90006 <1> mov cx, 1536 6372 <1> .loop: 6373 000078F3 E81B00 <1> call read_sector 6374 000078F6 2B0E[9B8C] <1> sub cx, word [load_data - LOADDATA2 + bsBPB + bpbBytesPerSector] 6375 000078FA 77F7 <1> ja .loop 6376 000078FC 07 <1> pop es 6377 000078FD 59 <1> pop cx 6378 000078FE C3 <1> retn 6379 <1> 6380 <1> ; INP: dx:ax = first sector 6381 <1> ; bx:0 -> buffer 6382 <1> ; OUT: dx:ax = sector number after last read 6383 <1> ; es = input bx 6384 <1> ; bx:0 -> buffer after last written 6385 <1> ; CHG: - 6386 <1> ; STT: ds = ss 6387 <1> read_ae_512_bytes: 6388 000078FF 51 <1> push cx 6389 00007900 53 <1> push bx 6390 00007901 B90002 <1> mov cx, 512 6391 <1> .loop: 6392 00007904 E80A00 <1> call read_sector 6393 00007907 2B0E[9B8C] <1> sub cx, word [load_data - LOADDATA2 + bsBPB + bpbBytesPerSector] 6394 0000790B 77F7 <1> ja .loop 6395 0000790D 07 <1> pop es 6396 0000790E 59 <1> pop cx 6397 0000790F C3 <1> retn 6398 <1> 6399 <1> 6400 <1> ; Write a sector using Int13.03 or Int13.43 6401 <1> ; 6402 <1> ; Protocol as for read_sector 6403 <1> write_sector: 6404 00007910 A8 <1> db __TEST_IMM8 ; (skip stc, NC) 6405 <1> 6406 <1> ; Read a sector using Int13.02 or Int13.42 6407 <1> ; 6408 <1> ; INP: dx:ax = sector number (within partition) 6409 <1> ; bx:0-> buffer 6410 <1> ; (_LBA) ds = ss 6411 <1> ; dword[load_data - LOADDATA2 + bsBPB + bpbHiddenSectors] 6412 <1> ; = base sector number (dx:ax is added to this to get 6413 <1> ; the absolute sector number in the selected unit.) 6414 <1> ; OUT: If unable to read, 6415 <1> ; ! jumps to error instead of returning 6416 <1> ; If sector has been read, 6417 <1> ; dx:ax = next sector number (has been incremented) 6418 <1> ; bx:0-> next buffer (bx = es+word[load_sectorsizepara]) 6419 <1> ; es = input bx 6420 <1> ; CHG: - 6421 <1> ; 6422 <1> ; Note: If error 09h (data boundary error) is returned, 6423 <1> ; the read is done into the load_sectorseg buffer, 6424 <1> ; then copied into the user buffer. 6425 <1> read_sector: 6426 00007911 F9 <1> stc 6427 <1> 6428 <1> read_sector_CY_or_write_sector_NC: 6429 <1> lframe near 6430 00007912 5589E5 <1> lenter 6431 <1> lvar word, is_read_bit0 6432 00007915 9C <1> pushf 6433 <1> 6434 <1> .err: equ bootcmd.fail_read 6435 <1> d5 call d5dumpregs 6436 <1> d5 call d5message 6437 <1> d5 asciz 13,10,"In read_sector",13,10 6438 <1> 6439 00007916 52 <1> push dx 6440 00007917 51 <1> push cx 6441 00007918 50 <1> push ax 6442 00007919 56 <1> push si 6443 <1> 6444 0000791A 53 <1> push bx 6445 <1> 6446 <1> ; DX:AX==LBA sector number 6447 <1> ; add partition start (= number of hidden sectors) 6448 0000791B 0306[AC8C] <1> add ax,[load_data - LOADDATA2 + bsBPB + bpbHiddenSectors + 0] 6449 0000791F 1316[AE8C] <1> adc dx,[load_data - LOADDATA2 + bsBPB + bpbHiddenSectors + 2] 6450 <1> 6451 00007923 19F6 <1> sbb si, si ; -1 if was CY, 0 else 6452 00007925 F7DE <1> neg si ; 1 if was CY, 0 else 6453 00007927 31C9 <1> xor cx, cx 6454 00007929 51 <1> push cx 6455 0000792A 56 <1> push si ; bit 32 = 1 if operating in 33-bit space 6456 0000792B 52 <1> push dx 6457 0000792C 50 <1> push ax ; qword sector number (lpSector) 6458 0000792D 53 <1> push bx 6459 0000792E 51 <1> push cx ; bx:0 -> buffer (lpBuffer) 6460 0000792F 41 <1> inc cx 6461 00007930 51 <1> push cx ; word number of sectors to read (lpCount) 6462 00007931 B110 <1> mov cl, 10h 6463 00007933 51 <1> push cx ; word size of disk address packet (lpSize) 6464 00007934 89E6 <1> mov si, sp ; ds:si -> disk address packet (on stack) 6465 <1> 6466 00007936 F606[778C]01 <1> test byte [load_data - LOADDATA2 + ldFlags], ldfHasLBA 6467 0000793B 7503E9BB00 <1> jz .no_lba 6468 <1> 6469 <1> d5 call d5message 6470 <1> d5 asciz "In read_sector.lba",13,10 6471 <1> 6472 00007940 8A16[D08C] <1> mov dl, byte [load_unit] 6473 00007944 E89A01 <1> call .set_ah_function_42_or_43 6474 00007947 CD13 <1> int 13h ; 13.42 extensions read 6475 00007949 7203E9A600 <1> jnc .lba_done 6476 <1> 6477 0000794E 31C0 <1> xor ax, ax 6478 00007950 CD13 <1> int 13h 6479 00007952 7303E992EA <1> jc .lba_error 6480 <1> 6481 <1> ; have to reset the LBAPACKET's lpCount, as the handler may 6482 <1> ; set it to "the number of blocks successfully transferred". 6483 <1> ; (in any case, the high byte is still zero.) 6484 00007957 C6440201 <1> mov byte [si + lpCount], 1 6485 <1> 6486 0000795B E88301 <1> call .set_ah_function_42_or_43 6487 0000795E CD13 <1> int 13h 6488 00007960 7203E98F00 <1> jnc .lba_done 6489 <1> 6490 00007965 80FC09 <1> cmp ah, 9 ; data boundary error? 6491 00007968 7403E97CEA <1> jne .lba_error 6492 <1> 6493 <1> .lba_sectorseg: 6494 <1> d4 call d4dumpregs 6495 <1> d4 call d4message 6496 <1> d4 asciz 13,10,"In read_sector.lba_sectorseg",13,10 6497 <1> 6498 0000796D F646FE01 <1> test byte [bp + ?is_read_bit0], 1 6499 00007971 7542 <1> jnz .lba_sectorseg_read 6500 <1> 6501 <1> .lba_sectorseg_write: 6502 00007973 1E <1> push ds 6503 00007974 56 <1> push si 6504 00007975 06 <1> push es 6505 00007976 57 <1> push di 6506 00007977 8B0E[9B8C] <1> mov cx, word [load_sectorsize] 6507 0000797B 8E06[748C] <1> mov es, word [load_sectorseg] ; => sectorseg 6508 <1> ; lds si, [si + lpBuffer + 0] 6509 0000797F 8E5C06 <1> mov ds, word [si + lpBuffer + 2]; => user buffer 6510 00007982 31F6 <1> xor si, si 6511 00007984 31FF <1> xor di, di 6512 00007986 F3A4 <1> rep movsb ; copy data into sectorseg 6513 00007988 5F <1> pop di 6514 00007989 07 <1> pop es 6515 0000798A 5E <1> pop si 6516 0000798B 1F <1> pop ds 6517 <1> 6518 0000798C FF36[748C] <1> push word [load_sectorseg] 6519 00007990 8F4406 <1> pop word [si + lpBuffer + 2] ; => sectorseg 6520 <1> ; and word [si + lpBuffer + 0], byte 0 6521 <1> 6522 00007993 C6440201 <1> mov byte [si + lpCount], 1 6523 00007997 B443 <1> mov ah, 43h 6524 00007999 CD13 <1> int 13h 6525 0000799B 7316 <1> jnc @F 6526 <1> 6527 0000799D 31C0 <1> xor ax, ax 6528 0000799F CD13 <1> int 13h 6529 000079A1 7303E943EA <1> jc .lba_error 6530 <1> 6531 000079A6 C6440201 <1> mov byte [si + lpCount], 1 6532 000079AA B443 <1> mov ah, 43h 6533 000079AC CD13 <1> int 13h 6534 000079AE 7303E936EA <1> jc .lba_error 6535 <1> @@: 6536 000079B3 EB3F <1> jmp .lba_done 6537 <1> 6538 <1> 6539 <1> .lba_sectorseg_read: 6540 <1> ; the offset part of the pointer is already zero! 6541 <1> ; push word [si + lpBuffer + 0] 6542 000079B5 FF7406 <1> push word [si + lpBuffer + 2] ; user buffer 6543 000079B8 FF36[748C] <1> push word [load_sectorseg] 6544 000079BC 8F4406 <1> pop word [si + lpBuffer + 2] 6545 <1> ; and word [si + lpBuffer + 0], byte 0 6546 <1> 6547 000079BF C6440201 <1> mov byte [si + lpCount], 1 6548 000079C3 E81B01 <1> call .set_ah_function_42_or_43 6549 000079C6 CD13 <1> int 13h 6550 000079C8 7317 <1> jnc .lba_sectorseg_done 6551 <1> 6552 000079CA 31C0 <1> xor ax, ax 6553 000079CC CD13 <1> int 13h 6554 000079CE 7303E916EA <1> jc .lba_error 6555 <1> 6556 000079D3 C6440201 <1> mov byte [si + lpCount], 1 6557 000079D7 E80701 <1> call .set_ah_function_42_or_43 6558 000079DA CD13 <1> int 13h 6559 000079DC 7303E908EA <1> jc .lba_error 6560 <1> .lba_sectorseg_done: 6561 <1> 6562 000079E1 31F6 <1> xor si, si 6563 000079E3 8E1E[748C] <1> mov ds, word [load_sectorseg] 6564 000079E7 07 <1> pop es 6565 <1> ; pop cx 6566 000079E8 57 <1> push di 6567 <1> ; mov di, cx 6568 000079E9 31FF <1> xor di, di 6569 000079EB 8B0E[9B8C] <1> mov cx, word [load_sectorsize] 6570 000079EF F3A4 <1> rep movsb 6571 000079F1 5F <1> pop di 6572 <1> 6573 000079F2 16 <1> push ss 6574 000079F3 1F <1> pop ds 6575 <1> .lba_done: 6576 000079F4 83C410 <1> add sp, 10h 6577 000079F7 5B <1> pop bx 6578 000079F8 E9D400 <1> jmp .chs_done 6579 <1> 6580 <1> .lba_error: equ .err 6581 <1> 6582 <1> .no_lba: 6583 000079FB 83C408 <1> add sp, 8 6584 000079FE 58 <1> pop ax 6585 000079FF 5A <1> pop dx 6586 00007A00 5E <1> pop si 6587 00007A01 59 <1> pop cx 6588 00007A02 85F6 <1> test si, si 6589 00007A04 7403E9E0E9 <1> jnz .err 6590 <1> 6591 <1> ; DX:AX=LBA sector number 6592 <1> ; divide by number of sectors per track to get sector number 6593 <1> ; Use 32:16 DIV instead of 64:32 DIV for 8088 compatability 6594 <1> ; Use two-step 32:16 divide to avoid overflow 6595 00007A09 89C1 <1> mov cx,ax 6596 00007A0B 89D0 <1> mov ax,dx 6597 00007A0D 31D2 <1> xor dx,dx 6598 00007A0F F736[A88C] <1> div word [load_sectors] 6599 00007A13 91 <1> xchg cx,ax 6600 00007A14 F736[A88C] <1> div word [load_sectors] 6601 00007A18 87CA <1> xchg cx,dx 6602 <1> 6603 <1> ; DX:AX=quotient, CX=remainder=sector (S) - 1 6604 <1> ; divide quotient by number of heads 6605 00007A1A 89C3 <1> mov bx, ax 6606 00007A1C 92 <1> xchg ax, dx 6607 00007A1D 31D2 <1> xor dx, dx 6608 00007A1F F736[AA8C] <1> div word [load_heads] 6609 00007A23 93 <1> xchg bx, ax 6610 00007A24 F736[AA8C] <1> div word [load_heads] 6611 <1> 6612 <1> ; bx:ax=quotient=cylinder (C), dx=remainder=head (H) 6613 <1> ; move variables into registers for INT 13h AH=02h 6614 00007A28 88D6 <1> mov dh, dl ; dh = head 6615 00007A2A 41 <1> inc cx ; cl5:0 = sector 6616 00007A2B 86E8 <1> xchg ch, al ; ch = cylinder 7:0, al = 0 6617 00007A2D D1E8 <1> shr ax, 1 6618 00007A2F D1E8 <1> shr ax, 1 ; al7:6 = cylinder 9:8 6619 <1> ; bx has bits set iff it's > 0, indicating a cylinder >= 65536. 6620 00007A31 08FB <1> or bl, bh ; collect set bits from bh 6621 00007A33 08C1 <1> or cl, al ; cl7:6 = cylinder 9:8 6622 <1> ; ah has bits set iff it was >= 4, indicating a cylinder >= 1024. 6623 00007A35 08E3 <1> or bl, ah ; collect set bits from ah 6624 00007A37 8A16[D08C] <1> mov dl, [load_unit] 6625 <1> ; dl = drive 6626 00007A3B B404 <1> mov ah, 04h ; error number: sector not found 6627 00007A3D 7403E9A7E9 <1> jnz .err ; error if cylinder >= 1024 --> 6628 <1> ; ! bx = 0 (for 13.02 call) 6629 <1> 6630 <1> ; we call INT 13h AH=02h once for each sector. Multi-sector reads 6631 <1> ; may fail if we cross a track or 64K boundary 6632 00007A42 07 <1> pop es 6633 <1> 6634 00007A43 BE1100 <1> mov si, 16 + 1 6635 <1> .loop_chs_retry_repeat: 6636 00007A46 E8A300 <1> call .set_ax_function_0201_or_0301 6637 00007A49 CD13 <1> int 13h ; read one sector 6638 00007A4B 7203E97D00 <1> jnc .done 6639 00007A50 50 <1> push ax 6640 00007A51 31C0 <1> xor ax, ax 6641 00007A53 CD13 <1> int 13h ; reset disk 6642 00007A55 58 <1> pop ax 6643 00007A56 4E <1> dec si ; another attempt ? 6644 00007A57 75ED <1> jnz .loop_chs_retry_repeat ; yes --> 6645 <1> 6646 00007A59 80FC09 <1> cmp ah, 9 ; data boundary error? 6647 00007A5C 7403E988E9 <1> jne .err 6648 <1> 6649 <1> .chs_sectorseg: 6650 <1> d4 call d4dumpregs 6651 <1> d4 call d4message 6652 <1> d4 asciz 13,10,"In read_sector.chs_sectorseg",13,10 6653 <1> 6654 00007A61 F646FE01 <1> test byte [bp + ?is_read_bit0], 1 6655 00007A65 7534 <1> jnz .chs_sectorseg_read 6656 <1> 6657 <1> .chs_sectorseg_write: 6658 00007A67 06 <1> push es 6659 <1> 6660 00007A68 1E <1> push ds 6661 00007A69 57 <1> push di 6662 00007A6A 51 <1> push cx 6663 00007A6B 8B0E[9B8C] <1> mov cx, word [load_sectorsize] 6664 00007A6F 06 <1> push es 6665 00007A70 8E06[748C] <1> mov es, word [load_sectorseg] ; => sectorseg 6666 00007A74 1F <1> pop ds ; => user buffer 6667 00007A75 31F6 <1> xor si, si 6668 00007A77 31FF <1> xor di, di 6669 00007A79 F3A4 <1> rep movsb ; copy data into sectorseg 6670 00007A7B 59 <1> pop cx 6671 00007A7C 5F <1> pop di 6672 00007A7D 1F <1> pop ds 6673 <1> 6674 00007A7E B80103 <1> mov ax, 0301h 6675 00007A81 CD13 <1> int 13h 6676 00007A83 7313 <1> jnc @F 6677 <1> 6678 00007A85 31C0 <1> xor ax, ax 6679 00007A87 CD13 <1> int 13h 6680 00007A89 7303E95BE9 <1> jc .err 6681 <1> 6682 00007A8E B80103 <1> mov ax, 0301h 6683 00007A91 CD13 <1> int 13h 6684 00007A93 7303E951E9 <1> jc .err 6685 <1> @@: 6686 00007A98 5B <1> pop bx 6687 00007A99 EB34 <1> jmp .chs_done 6688 <1> 6689 <1> 6690 <1> .chs_sectorseg_read: 6691 <1> 6692 00007A9B 06 <1> push es ; user buffer 6693 00007A9C 8E06[748C] <1> mov es, word [load_sectorseg] 6694 <1> 6695 00007AA0 E84900 <1> call .set_ax_function_0201_or_0301 6696 00007AA3 CD13 <1> int 13h 6697 00007AA5 7313 <1> jnc .chs_sectorseg_done 6698 <1> 6699 00007AA7 31C0 <1> xor ax, ax 6700 00007AA9 CD13 <1> int 13h 6701 00007AAB 7303E939E9 <1> jc .err 6702 <1> 6703 00007AB0 E83900 <1> call .set_ax_function_0201_or_0301 6704 00007AB3 CD13 <1> int 13h 6705 00007AB5 7303E92FE9 <1> jc .err 6706 <1> .chs_sectorseg_done: 6707 <1> 6708 00007ABA 31F6 <1> xor si, si 6709 00007ABC 8E1E[748C] <1> mov ds, word [load_sectorseg] 6710 00007AC0 07 <1> pop es 6711 00007AC1 57 <1> push di 6712 00007AC2 31FF <1> xor di, di 6713 00007AC4 8B0E[9B8C] <1> mov cx, word [load_sectorsize] 6714 00007AC8 F3A4 <1> rep movsb 6715 00007ACA 5F <1> pop di 6716 <1> 6717 00007ACB 16 <1> push ss 6718 00007ACC 1F <1> pop ds 6719 <1> .done: 6720 <1> ; increment segment 6721 00007ACD 8CC3 <1> mov bx, es 6722 <1> 6723 <1> .chs_done: 6724 00007ACF 8EC3 <1> mov es, bx 6725 00007AD1 031E[7A8C] <1> add bx, word [load_sectorsizepara] 6726 <1> 6727 00007AD5 5E <1> pop si 6728 00007AD6 58 <1> pop ax 6729 00007AD7 59 <1> pop cx 6730 00007AD8 5A <1> pop dx 6731 <1> ; increment LBA sector number 6732 00007AD9 40 <1> inc ax 6733 00007ADA 7501 <1> jne @F 6734 00007ADC 42 <1> inc dx 6735 <1> @@: 6736 00007ADD 89EC5D <1> lleave code 6737 00007AE0 C3 <1> retn 6738 <1> 6739 <1> .set_ah_function_42_or_43: 6740 00007AE1 B442 <1> mov ah, 42h 6741 00007AE3 F646FE01 <1> test byte [bp + ?is_read_bit0], 1 6742 00007AE7 7502 <1> jnz @F 6743 00007AE9 B443 <1> mov ah, 43h 6744 <1> @@: 6745 00007AEB C3 <1> retn 6746 <1> 6747 <1> .set_ax_function_0201_or_0301: 6748 00007AEC B001 <1> mov al, 1 6749 <1> .set_ah_function_02_or_03: 6750 00007AEE B402 <1> mov ah, 02h 6751 00007AF0 F646FE01 <1> test byte [bp + ?is_read_bit0], 1 6752 00007AF4 7502 <1> jnz @F 6753 00007AF6 B403 <1> mov ah, 03h 6754 <1> @@: 6755 00007AF8 C3 <1> retn 6756 <1> 6757 <1> lleave ctx 6758 <1> 6759 <1> 6760 <1> %if _INPUT_FILE_BOOT 6761 <1> yy_boot: 6762 00007AF9 E8F3E3 <1> call init_bootcmd 6763 <1> 6764 00007AFC E8FBEA <1> call parseloadunit_default_sdp 6765 00007AFF 7510 <1> jnz .have_filename 6766 <1> 6767 00007B01 BA[856C] <1> mov dx, msg.yy_requires_filename 6768 <1> .disp_error_1: 6769 00007B04 B80002 <1> mov ax, 0200h 6770 00007B07 E81B2A <1> call setrc 6771 00007B0A E8A942 <1> call putsz_error 6772 00007B0D FF26[9A0A] <1> jmp near word [errret] 6773 <1> 6774 <1> .have_filename: 6775 00007B11 F606[A300]02 <1> testopt [internalflags2], dif2_input_file_boot 6776 00007B16 740C <1> jz @F 6777 00007B18 833E[B08F]03 <1> cmp word [load_input_file.active], _INPUT_FILE_BOOT - 1 6778 00007B1D 7205 <1> jb @F 6779 <1> 6780 00007B1F BA[C56C] <1> mov dx, msg.yy_too_many_handles 6781 00007B22 EBE0 <1> jmp .disp_error_1 6782 <1> @@: 6783 <1> 6784 <1> ; al was = '/' or '\' or first pathname's first character 6785 <1> ; si-> next char 6786 00007B24 3C3A <1> cmp al, ':' 6787 00007B26 751F <1> jne .not_yy_goto_subfunction 6788 <1> 6789 00007B28 F606[A300]02 <1> testopt [internalflags2], dif2_input_file_boot 6790 00007B2D 7413 <1> jz @F 6791 <1> 6792 00007B2F E8293E <1> call skipwhite 6793 00007B32 4E <1> dec si 6794 00007B33 8936[B28F] <1> mov word [load_input_file.goto_offset], si 6795 <1> 6796 00007B37 E8F402 <1> call yy_boot_get 6797 00007B3A 800E[A400]80 <1> setopt [internalflags3], dif3_partition_changed 6798 00007B3F E97F02 <1> jmp load_yy_finish 6799 <1> 6800 <1> @@: 6801 00007B42 BA[0B6D] <1> mov dx, msg.yy_no_file 6802 00007B45 EBBD <1> jmp .disp_error_1 6803 <1> .not_yy_goto_subfunction: 6804 <1> 6805 00007B47 BB[DC8F] <1> mov bx, load_yyname_input 6806 00007B4A E899E6 <1> call bootcmd.pathname_parse_super 6807 <1> 6808 00007B4D 8326[B28F]00 <1> and word [load_input_file.goto_offset], 0 6809 00007B52 E8073E <1> call skipwh0 6810 00007B55 8936[060C] <1> mov word [if_exists_then_address], si 6811 00007B59 E8993D <1> call iseol?_or_then 6812 00007B5C 7427 <1> je .not_yy_goto 6813 <1> 6814 00007B5E 3C3A <1> cmp al, ':' 6815 00007B60 7403E97929 <1> jne error 6816 <1> 6817 00007B65 E8F33D <1> call skipwhite 6818 00007B68 4E <1> dec si 6819 00007B69 8936[B28F] <1> mov word [load_input_file.goto_offset], si 6820 <1> 6821 <1> @@: 6822 00007B6D AC <1> lodsb 6823 00007B6E 3C20 <1> cmp al, 32 6824 00007B70 7409 <1> je @F 6825 00007B72 3C09 <1> cmp al, 9 6826 00007B74 7405 <1> je @F 6827 00007B76 E88D3D <1> call iseol? 6828 00007B79 75F2 <1> jne @B 6829 <1> @@: 6830 00007B7B E8DE3D <1> call skipwh0 6831 00007B7E 8936[060C] <1> mov word [if_exists_then_address], si 6832 00007B82 E88C3D <1> call chkeol_or_then 6833 <1> 6834 <1> .not_yy_goto: 6835 <1> 6836 00007B85 F606[A400]07 <1> testopt [internalflags3], dif3_load_is_dp 6837 00007B8A 7555 <1> jnz .load_yy_from_ldp 6838 <1> 6839 00007B8C 8A1E[C28F] <1> mov bl, [load_partition] 6840 00007B90 803E[D08C]80 <1> cmp byte [load_unit], 80h 6841 00007B95 7226 <1> jb .p_f_is_diskette 6842 00007B97 84DB <1> test bl, bl ; partition specified ? 6843 00007B99 7503E94029 <1> jz error ; no, error --> 6844 <1> 6845 00007B9E E8A8FB <1> call query_geometry 6846 <1> 6847 00007BA1 B9[097C] <1> mov cx, load_yy_from_partition 6848 00007BA4 E8FAF9 <1> call scan_partitions 6849 00007BA7 F606[A700]08 <1> testopt [internalflags3], dif3_in_if 6850 00007BAC 7403E9CA14 <1> jnz if_exists_not_found 6851 00007BB1 BA[7661] <1> mov dx, msg.boot_partition_not_found 6852 00007BB4 B80602 <1> mov ax, 0206h 6853 00007BB7 E86B29 <1> call setrc 6854 00007BBA E93EE8 <1> jmp bootcmd.fail 6855 <1> 6856 <1> 6857 <1> .p_f_is_diskette: 6858 00007BBD 84DB <1> test bl, bl ; partition specified ? 6859 00007BBF 7403E91A29 <1> jnz error ; yes, error --> 6860 <1> 6861 00007BC4 E882FB <1> call query_geometry 6862 <1> 6863 00007BC7 31C0 <1> xor ax, ax 6864 00007BC9 31D2 <1> xor dx, dx 6865 <1> @@: 6866 00007BCB 8B1E[F209] <1> mov bx, word [auxbuff_segorsel] ; bx => auxbuff 6867 00007BCF 52 <1> push dx 6868 00007BD0 50 <1> push ax 6869 00007BD1 E82BFD <1> call read_ae_512_bytes 6870 <1> 6871 00007BD4 26813EFE0155AA <1> cmp word [es:510], 0AA55h 6872 00007BDB 7510 <1> jne boot_sigmismatch 6873 00007BDD 58 <1> pop ax 6874 00007BDE 5A <1> pop dx 6875 <1> 6876 00007BDF EB62 <1> jmp load_yy_common 6877 <1> 6878 <1> 6879 <1> .load_yy_from_ldp: 6880 00007BE1 E865FB <1> call query_geometry 6881 00007BE4 A1[B88F] <1> mov ax, word [load_partition_sector] 6882 00007BE7 8B16[BA8F] <1> mov dx, word [load_partition_sector + 2] 6883 00007BEB EBDE <1> jmp @B 6884 <1> %endif 6885 <1> 6886 <1> 6887 <1> boot_sigmismatch: 6888 00007BED BA[1060] <1> mov dx, msg.bootfail_sig 6889 00007BF0 B80702 <1> mov ax, 0207h 6890 <1> @@: 6891 00007BF3 E82F29 <1> call setrc 6892 00007BF6 E902E8 <1> jmp bootcmd.fail 6893 <1> 6894 <1> boot_codemismatch: 6895 00007BF9 BA[7460] <1> mov dx, msg.bootfail_code 6896 00007BFC B80802 <1> mov ax, 0208h 6897 00007BFF EBF2 <1> jmp @B 6898 <1> 6899 <1> boot_secsizemismatch: 6900 00007C01 BA[9B60] <1> mov dx, msg.bootfail_secsizediffer 6901 00007C04 B80902 <1> mov ax, 0209h 6902 00007C07 EBEA <1> jmp @B 6903 <1> 6904 <1> 6905 <1> %if _INPUT_FILE_BOOT 6906 <1> ; INP: es:si -> partition table entry, 6907 <1> ; si = load_partition_table .. load_partition_table+48, 6908 <1> ; es = ss 6909 <1> ; bp + di -> above part table metadata, 6910 <1> ; dwo [bp + di - 4] = root (outermost extended position) 6911 <1> ; dwo [bp + di - 8] = base (current table position) 6912 <1> ; CHG: ax, bx, (cx), dx 6913 <1> load_yy_from_partition: 6914 <1> d4 call d4message 6915 <1> d4 asciz "In load_yy_from_partition",13,10 6916 <1> 6917 00007C09 A0[C38F] <1> mov al, byte [load_current_partition] 6918 00007C0C 3A06[C28F] <1> cmp al, byte [load_partition] 6919 00007C10 7401 <1> je .gotit 6920 00007C12 C3 <1> retn 6921 <1> 6922 <1> .gotit: 6923 <1> d4 call d4message 6924 <1> d4 asciz "In load_yy_from_partition.gotit",13,10 6925 <1> 6926 00007C13 8B43F8 <1> mov ax, [bp + di - 8] 6927 00007C16 8B53FA <1> mov dx, [bp + di - 6] ; base (current table position) 6928 <1> 6929 00007C19 26034408 <1> add ax, [es:si + 8] 6930 00007C1D 2613540A <1> adc dx, [es:si + 8 + 2] ; add offset to logical partition 6931 <1> 6932 00007C21 26894408 <1> mov word [es:si + 8], ax 6933 00007C25 2689540A <1> mov word [es:si + 8 + 2], dx ; store in partition table entry 6934 <1> 6935 00007C29 89EC <1> mov sp, bp 6936 00007C2B 5D <1> pop bp ; restore bp (scan_partitions) 6937 00007C2C 5B <1> pop bx ; discard ret address (scan_partitions) 6938 <1> 6939 <1> ; dx:ax = absolute sector number 6940 00007C2D 8B1E[F209] <1> mov bx, word [auxbuff_segorsel] ; bx => auxbuff 6941 00007C31 50 <1> push ax 6942 00007C32 52 <1> push dx 6943 00007C33 E8C9FC <1> call read_ae_512_bytes ; load partition boot sector 6944 <1> 6945 00007C36 26813EFE0155AA <1> cmp word [es:510], 0AA55h 6946 00007C3D 75AE <1> jne boot_sigmismatch 6947 <1> 6948 00007C3F 31C9 <1> xor cx, cx 6949 <1> ; cmp word [es:0], cx 6950 <1> ; je boot_codemismatch 6951 <1> 6952 00007C41 5A <1> pop dx 6953 00007C42 58 <1> pop ax 6954 <1> 6955 <1> ; dx:ax = boot sector 6956 <1> ; byte [load_unit] = unit 6957 <1> ; es:0-> read sector 6958 <1> load_yy_common: 6959 00007C43 26A31C00 <1> mov word [es:bsBPB + bpbHiddenSectors], ax 6960 00007C47 2689161E00 <1> mov word [es:bsBPB + bpbHiddenSectors + 2], dx 6961 <1> 6962 00007C4C 8B5E0B <1> mov bx, [bp + bsBPB + bpbBytesPerSector] 6963 00007C4F 263B1E0B00 <1> cmp bx, [es:bsBPB + bpbBytesPerSector] 6964 00007C54 75AB <1> jne boot_secsizemismatch 6965 <1> 6966 <1> ; preserve some variables from our pseudo BPB 6967 00007C56 31C0 <1> xor ax, ax 6968 00007C58 FF7618 <1> push word [bp + bsBPB + bpbCHSSectors] 6969 00007C5B 268F061800 <1> pop word [es:bsBPB + bpbCHSSectors] 6970 00007C60 FF761A <1> push word [bp + bsBPB + bpbCHSHeads] 6971 00007C63 268F061A00 <1> pop word [es:bsBPB + bpbCHSHeads] ; preserve geometry 6972 <1> 6973 00007C68 8B5EEA <1> mov bx, word [bp + ldParaPerSector] 6974 00007C6B D1EB <1> shr bx, 1 6975 00007C6D 895ED4 <1> mov word [bp + ldEntriesPerSector], bx 6976 <1> 6977 00007C70 2639061600 <1> cmp word [es:bsBPB + bpbSectorsPerFAT], ax 6978 00007C75 8A5E40 <1> mov bl, byte [bp + bsBPB + ebpbNew + bpbnBootUnit] 6979 00007C78 7407 <1> je .is_fat32 6980 00007C7A 26881E2400 <1> mov byte [es:bsBPB + bpbNew + bpbnBootUnit], bl 6981 00007C7F EB05 <1> jmp short .was_fat1612 6982 <1> .is_fat32: 6983 00007C81 26881E4000 <1> mov byte [es:bsBPB + ebpbNew + bpbnBootUnit], bl 6984 <1> .was_fat1612: 6985 <1> 6986 00007C86 06 <1> push es 6987 00007C87 1E <1> push ds 6988 00007C88 06 <1> push es 6989 00007C89 1F <1> pop ds 6990 00007C8A 31F6 <1> xor si, si ; -> BPB from boot partition 6991 00007C8C 16 <1> push ss 6992 00007C8D 07 <1> pop es 6993 00007C8E BF[908C] <1> mov di, load_data - LOADDATA2 ; -> our copy of a BPB 6994 00007C91 B95A00 <1> mov cx, (bsBPB + ebpbNew + BPBN_size) 6995 00007C94 F3A4 <1> rep movsb ; get the BPB 6996 <1> 6997 00007C96 1F <1> pop ds 6998 00007C97 800E[A400]80 <1> setopt [internalflags3], dif3_partition_changed 6999 <1> 7000 00007C9C 394616 <1> cmp word [bp + bsBPB + bpbSectorsPerFAT], ax 7001 00007C9F 740B <1> je @F ; is FAT32 --> 7002 00007CA1 BE[B48C] <1> mov si, load_data - LOADDATA2 + bsBPB + bpbNew 7003 00007CA4 BF[D08C] <1> mov di, load_data - LOADDATA2 + bsBPB + ebpbNew 7004 00007CA7 B91A00 <1> mov cx, BPBN_size 7005 00007CAA F3A4 <1> rep movsb ; clone the FAT16 / FAT12 BPBN 7006 <1> ; to where the FAT32 BPBN lives 7007 <1> @@: 7008 00007CAC 07 <1> pop es 7009 <1> 7010 <1> .outofmem: equ query_geometry.out_of_memory_error 7011 <1> 7012 00007CAD FF36[F209] <1> push word [auxbuff_segorsel] 7013 00007CB1 8F46F8 <1> pop word [bp + lsvFATSeg] 7014 00007CB4 804EE702 <1> or byte [bp + ldFlags], ldfFATInvalid 7015 00007CB8 B8FFFF <1> mov ax, -1 7016 00007CBB 8946F4 <1> mov word [bp + lsvFATSector], ax 7017 00007CBE 8946F6 <1> mov word [bp + lsvFATSector + 2], ax 7018 <1> 7019 00007CC1 E89705 <1> call initialise_fs 7020 <1> 7021 00007CC4 C606[C58F]00 <1> mov byte [load_check_dir_attr], 0 7022 00007CC9 8B36[DC8F] <1> mov si, word [load_yyname_input] 7023 00007CCD 803C2F <1> cmp byte [si], '/' 7024 00007CD0 7501 <1> jne @F 7025 00007CD2 46 <1> inc si 7026 <1> @@: 7027 00007CD3 803C00 <1> cmp byte [si], 0 7028 00007CD6 750C <1> jne @F 7029 <1> ..@yy_filename_empty: 7030 00007CD8 BA[A66C] <1> mov dx, msg.yy_filename_empty 7031 00007CDB B80A02 <1> mov ax, 020Ah 7032 00007CDE E84428 <1> call setrc 7033 00007CE1 E917E7 <1> jmp bootcmd.fail 7034 <1> @@: 7035 00007CE4 16 <1> push ss 7036 00007CE5 07 <1> pop es 7037 00007CE6 E8E7EB <1> call boot_parse_fn ; get next pathname 7038 00007CE9 3C2F <1> cmp al, '/' 7039 00007CEB 7509 <1> jne @F 7040 00007CED C606[C58F]10 <1> mov byte [load_check_dir_attr], ATTR_DIRECTORY 7041 00007CF2 8936[DE8F] <1> mov word [load_yyname_next], si 7042 <1> @@: 7043 <1> 7044 00007CF6 BFFFFF <1> mov di, -1 7045 00007CF9 89FE <1> mov si, di 7046 00007CFB 897EF4 <1> mov [bp + lsvFATSector], di 7047 00007CFE 8976F6 <1> mov [bp + lsvFATSector + 2], si 7048 <1> 7049 00007D01 31C0 <1> xor ax, ax 7050 00007D03 31D2 <1> xor dx, dx 7051 <1> 7052 <1> scan_dir_yyname_loop: 7053 00007D05 8946EC <1> mov word [bp + ldDirCluster], ax 7054 00007D08 8956EE <1> mov word [bp + ldDirCluster + 2], dx 7055 <1> 7056 00007D0B 16 <1> push ss 7057 00007D0C 07 <1> pop es 7058 00007D0D BB[108D] <1> mov bx, load_yy_direntry 7059 <1> 7060 00007D10 E88EF6 <1> call scan_dir_aux_for_file 7061 <1> 7062 00007D13 803E[C58F]10 <1> cmp byte [load_check_dir_attr], ATTR_DIRECTORY 7063 00007D18 753A <1> jne got_yyentry 7064 <1> 7065 00007D1A 56 <1> push si 7066 00007D1B 57 <1> push di 7067 00007D1C C606[C58F]00 <1> mov byte [load_check_dir_attr], 0 7068 00007D21 8B36[DE8F] <1> mov si, word [load_yyname_next] 7069 00007D25 803C00 <1> cmp byte [si], 0 7070 00007D28 7502 <1> jne @F 7071 00007D2A EBAC <1> jmp ..@yy_filename_empty 7072 <1> @@: 7073 00007D2C 06 <1> push es 7074 00007D2D 16 <1> push ss 7075 00007D2E 07 <1> pop es 7076 00007D2F E89EEB <1> call boot_parse_fn ; get next pathname 7077 00007D32 07 <1> pop es 7078 00007D33 3C2F <1> cmp al, '/' 7079 00007D35 7509 <1> jne @F 7080 00007D37 C606[C58F]10 <1> mov byte [load_check_dir_attr], ATTR_DIRECTORY 7081 00007D3C 8936[DE8F] <1> mov word [load_yyname_next], si 7082 <1> @@: 7083 00007D40 5F <1> pop di 7084 00007D41 5E <1> pop si 7085 <1> 7086 00007D42 31D2 <1> xor dx, dx 7087 00007D44 268B471A <1> mov ax, [es:bx + deClusterLow] 7088 <1> ; = first cluster (not FAT32) 7089 00007D48 807EE620 <1> cmp byte [bp + ldFATType], 32 7090 00007D4C 7504 <1> jne @F 7091 00007D4E 268B5714 <1> mov dx, [es:bx + deClusterHigh] 7092 <1> ; dx:ax = first cluster (FAT32) 7093 <1> @@: 7094 <1> 7095 00007D52 EBB1 <1> jmp scan_dir_yyname_loop 7096 <1> 7097 <1> 7098 <1> got_yyentry: 7099 <1> 7100 <1> 7101 <1> ; (boot32.asm code starts here) 7102 <1> 7103 00007D54 8B1E[2C8D] <1> mov bx, [load_yy_direntry + deSize] 7104 00007D58 A1[2E8D] <1> mov ax, [load_yy_direntry + deSize + 2] 7105 <1> ; ax:bx = file size 7106 00007D5B 8A16[1C8D] <1> mov dl, [load_yy_direntry + 12] 7107 <1> ; dl = FAT+ size bits 7108 00007D5F 88D6 <1> mov dh, dl 7109 00007D61 81E207E0 <1> and dx, 0E007h ; obtain bits 7-5 and 2-0 7110 00007D65 740C <1> jz @F 7111 00007D67 BA[986D] <1> mov dx, msg.yy_too_large 7112 00007D6A B80B02 <1> mov ax, 020Bh 7113 00007D6D E8B527 <1> call setrc 7114 00007D70 E988E6 <1> jmp bootcmd.fail 7115 <1> @@: 7116 00007D73 895EC4 <1> mov word [bp + ldFileSize], bx 7117 00007D76 8946C6 <1> mov word [bp + ldFileSize + 2], ax 7118 <1> 7119 00007D79 09D8 <1> or ax, bx 7120 00007D7B 7516 <1> jnz @F 7121 <1> 7122 00007D7D F606[A700]08 <1> testopt [internalflags3], dif3_in_if 7123 00007D82 7403E9F412 <1> jnz if_exists_not_found 7124 00007D87 BA[B46D] <1> mov dx, msg.yy_empty 7125 00007D8A B80C02 <1> mov ax, 020Ch 7126 00007D8D E89527 <1> call setrc 7127 00007D90 E968E6 <1> jmp bootcmd.fail 7128 <1> @@: 7129 <1> 7130 <1> ; get starting cluster of file 7131 00007D93 31D2 <1> xor dx, dx 7132 00007D95 A1[2A8D] <1> mov ax, [load_yy_direntry + deClusterLow] 7133 <1> ; = first cluster (not FAT32) 7134 <1> 7135 00007D98 807EE620 <1> cmp byte [bp + ldFATType], 32 7136 00007D9C 7504 <1> jne @F 7137 00007D9E 8B16[248D] <1> mov dx, [load_yy_direntry + deClusterHigh] 7138 <1> ; dx:ax = first cluster (FAT32) 7139 <1> @@: 7140 <1> 7141 00007DA2 80E60F <1> and dh, 0Fh 7142 00007DA5 8946F0 <1> mov word [bp + lsvFirstCluster], ax 7143 00007DA8 8956F2 <1> mov word [bp + lsvFirstCluster + 2], dx 7144 <1> 7145 00007DAB 8946C8 <1> mov word [bp + ldCurrentCluster], ax 7146 00007DAE 8956CA <1> mov word [bp + ldCurrentCluster + 2], dx 7147 00007DB1 31DB <1> xor bx, bx 7148 00007DB3 895ECC <1> mov word [bp + ldCurrentSeek], bx 7149 00007DB6 895ECE <1> mov word [bp + ldCurrentSeek + 2], bx 7150 00007DB9 E8B3F7 <1> call check_clust 7151 00007DBC 7303E9D704 <1> jc error_badchain 7152 <1> 7153 <1> load_yy_finish: 7154 00007DC1 31ED <1> xor bp, bp 7155 00007DC3 31DB <1> xor bx, bx 7156 00007DC5 BE[508C] <1> mov si, load_data_lowest 7157 00007DC8 B95000 <1> mov cx, (LOAD_INPUT_FILE_SIZE + 1) >> 1 7158 <1> 7159 00007DCB BF[308D] <1> mov di, load_input_file 7160 00007DCE F606[A300]02 <1> testopt [internalflags2], dif2_input_file_boot 7161 00007DD3 7415 <1> jz @F 7162 00007DD5 8B1E[B08F] <1> mov bx, word [load_input_file.active] 7163 00007DD9 43 <1> inc bx 7164 00007DDA B8A000 <1> mov ax, LOAD_INPUT_FILE_SIZE 7165 00007DDD F7E3 <1> mul bx 7166 <1> ; test dx, dx 7167 <1> ; jnz error 7168 00007DDF 01C7 <1> add di, ax 7169 00007DE1 8B5586 <1> mov dx, word [di - LOAD_INPUT_FILE_SIZE - LOADDATA3 + ldFATType] 7170 00007DE4 81E200F0 <1> and dx, ifhfTestReserved1 | ifhfTestReserved2 | ifhfQuietInput | ifhfQuietOutput 7172 00007DE8 09D5 <1> or bp, dx 7173 <1> 7174 <1> @@: 7175 <1> 7176 00007DEA 092E[768C] <1> or word [load_data - LOADDATA2 + ldFATType], bp 7177 00007DEE 16 <1> push ss 7178 00007DEF 07 <1> pop es 7179 00007DF0 F3A5 <1> rep movsw 7180 <1> 7181 <1> ; hazard: this uses load_input_file and 7182 <1> ; load_data_lowest if we are already in 7183 <1> ; a yy_boot script. 7184 00007DF2 8026[A700]EF <1> clropt [internalflags3], dif3_auxbuff_guarded_1 7185 00007DF7 E81A4E <1> call yy_reset_buf 7186 <1> 7187 00007DFA 891E[B08F] <1> mov word [load_input_file.active], bx 7188 00007DFE 800E[A300]02 <1> setopt [internalflags2], dif2_input_file_boot 7189 <1> 7190 00007E03 8B36[B28F] <1> mov si, word [load_input_file.goto_offset] 7191 00007E07 85F6 <1> test si, si 7192 00007E09 7403E9944F <1> jnz cmd_goto.yy_entry 7193 <1> 7194 00007E0E F606[A700]08 <1> testopt [internalflags3], dif3_in_if 7195 00007E13 7403E97012 <1> jnz if_exists_found_open 7196 00007E18 C3 <1> retn 7197 <1> 7198 <1> 7199 <1> ; INP: [load_input_file], dif2_input_file_boot 7200 <1> ; OUT: most recent file closed, flag cleared if no longer file 7201 <1> ; CHG: di, bx, ax 7202 <1> yy_boot_close_file: 7203 00007E19 A1[B08F] <1> mov ax, word [load_input_file.active] 7204 00007E1C 48 <1> dec ax 7205 00007E1D 790B <1> jns .next 7206 00007E1F 8026[A300]FD <1> clropt [internalflags2], dif2_input_file_boot 7207 00007E24 800E[A300]04 <1> setopt [internalflags2], dif2_closed_input_file_boot 7208 00007E29 C3 <1> retn 7209 <1> .next: 7210 00007E2A A3[B08F] <1> mov word [load_input_file.active], ax 7211 00007E2D C3 <1> retn 7212 <1> 7213 <1> 7214 <1> ; INP: [load_input_file] 7215 <1> ; OUT: [load_data_lowest] = LOADDATA[123], lsv, BPB 7216 <1> ; CHG: es, ax, dx, di, si 7217 <1> yy_boot_get: 7218 00007E2E 16 <1> push ss 7219 00007E2F 07 <1> pop es 7220 <1> 7221 00007E30 B8A000 <1> mov ax, LOAD_INPUT_FILE_SIZE 7222 00007E33 F726[B08F] <1> mul word [load_input_file.active] 7223 <1> 7224 <1> ; test dx, dx 7225 <1> ; jnz .error 7226 <1> 7227 00007E37 51 <1> push cx 7228 00007E38 BF[508C] <1> mov di, load_data_lowest 7229 00007E3B B95000 <1> mov cx, (LOAD_INPUT_FILE_SIZE + 1) >> 1 7230 <1> 7231 00007E3E BE[308D] <1> mov si, load_input_file 7232 00007E41 01C6 <1> add si, ax 7233 <1> 7234 00007E43 F3A5 <1> rep movsw 7235 00007E45 59 <1> pop cx 7236 00007E46 C3 <1> retn 7237 <1> 7238 <1> 7239 <1> ; INP: [load_data_lowest] = LOADDATA3 7240 <1> ; OUT: [load_input_file] 7241 <1> ; CHG: es, ax, dx, di, si 7242 <1> ; Note: Preserves flags (ZF, CF) 7243 <1> yy_boot_update: 7244 00007E47 9C <1> pushf 7245 <1> 7246 00007E48 16 <1> push ss 7247 00007E49 07 <1> pop es 7248 <1> 7249 00007E4A B8A000 <1> mov ax, LOAD_INPUT_FILE_SIZE 7250 00007E4D F726[B08F] <1> mul word [load_input_file.active] 7251 <1> 7252 <1> ; test dx, dx 7253 <1> ; jnz .error 7254 <1> 7255 00007E51 51 <1> push cx 7256 00007E52 BE[508C] <1> mov si, load_data_lowest 7257 00007E55 B90800 <1> mov cx, LOADDATA3_size >> 1 7258 <1> 7259 00007E58 BF[308D] <1> mov di, load_input_file 7260 00007E5B 01C7 <1> add di, ax 7261 <1> 7262 00007E5D F3A5 <1> rep movsw 7263 00007E5F 59 <1> pop cx 7264 00007E60 9D <1> popf ; ZF, CF 7265 00007E61 C3 <1> retn 7266 <1> 7267 <1> 7268 <1> 7269 <1> ; INP: [load_input_file] = active file 7270 <1> ; cx = how many bytes to read 7271 <1> ; ds:dx -> buffer 7272 <1> ; OUT: CY if error reading 7273 <1> ; NC if success 7274 <1> ; ax = how many bytes read 7275 <1> ; CHG: bx, cx 7276 <1> ; STT: ds = es = ss 7277 <1> yy_boot_read: 7278 <1> lframe near 7279 <1> lvar word, length 7280 <1> lvar word, length_this_cluster 7281 <1> lvar dword, bytes_per_cluster 7282 <1> lvar dword, how_far_in_cluster 7283 00007E62 5589E58D66F4 <1> lenter 7284 <1> lvar dword, pointer 7285 00007E68 1E <1> push ds 7286 00007E69 52 <1> push dx 7287 00007E6A 31C0 <1> xor ax, ax 7288 <1> lvar word, did_guard_auxbuff 7289 00007E6C 50 <1> push ax 7290 <1> lvar word, read_how_many 7291 00007E6D 50 <1> push ax 7292 00007E6E 52 <1> push dx 7293 00007E6F 56 <1> push si 7294 00007E70 57 <1> push di 7295 <1> 7296 00007E71 FF36[9A0A] <1> push word [errret] 7297 00007E75 FF36[9C0A] <1> push word [throwret] 7298 00007E79 FF36[9E0A] <1> push word [throwsp] 7299 <1> 7300 00007E7D 55 <1> push bp 7301 <1> 7302 00007E7E C706[9A0A][E67F] <1> mov word [errret], .err_ret 7303 00007E84 C706[9C0A][E67F] <1> mov word [throwret], .err_ret 7304 00007E8A 8926[9E0A] <1> mov word [throwsp], sp 7305 <1> 7306 00007E8E E89DFF <1> call yy_boot_get 7307 <1> 7308 00007E91 E84B86 <1> call guard_auxbuff 7309 00007E94 FF46EE <1> inc word [bp + ?did_guard_auxbuff] 7310 <1> 7311 00007E97 8B16[568C] <1> mov dx, word [load_data - LOADDATA2 + ldFileSize + 2] 7312 00007E9B A1[548C] <1> mov ax, word [load_data - LOADDATA2 + ldFileSize] 7313 <1> 7314 00007E9E 2B06[5C8C] <1> sub ax, word [load_data - LOADDATA2 + ldCurrentSeek] 7315 00007EA2 1B16[5E8C] <1> sbb dx, word [load_data - LOADDATA2 + ldCurrentSeek + 2] 7316 <1> 7317 00007EA6 85D2 <1> test dx, dx 7318 00007EA8 7506 <1> jnz .use_count 7319 00007EAA 39C8 <1> cmp ax, cx 7320 00007EAC 7302 <1> jae .use_count 7321 00007EAE 89C1 <1> mov cx, ax 7322 <1> .use_count: 7323 00007EB0 85C9 <1> test cx, cx 7324 00007EB2 7503E90801 <1> jz .success 7325 00007EB7 894EFE <1> mov word [bp + ?length], cx 7326 <1> 7327 <1> .next_cluster: 7328 00007EBA 8B36[5E8C] <1> mov si, word [load_data - LOADDATA2 + ldCurrentSeek + 2] 7329 00007EBE 8B3E[5C8C] <1> mov di, word [load_data - LOADDATA2 + ldCurrentSeek] 7330 00007EC2 A1[9B8C] <1> mov ax, word [load_data - LOADDATA2 + bsBPB + bpbBytesPerSector] 7331 00007EC5 F726[788C] <1> mul word [load_data - LOADDATA2 + ldClusterSize] 7332 <1> 7333 00007EC9 8946F8 <1> mov word [bp + ?bytes_per_cluster], ax 7334 00007ECC 8956FA <1> mov word [bp + ?bytes_per_cluster + 2], dx 7335 00007ECF 83E801 <1> sub ax, 1 7336 00007ED2 83DA00 <1> sbb dx, 0 7337 00007ED5 21D6 <1> and si, dx 7338 00007ED7 21C7 <1> and di, ax ; how far are we into cluster 7339 <1> 7340 00007ED9 897EF4 <1> mov word [bp + ?how_far_in_cluster], di 7341 00007EDC 8976F6 <1> mov word [bp + ?how_far_in_cluster + 2], si 7342 <1> 7343 00007EDF F7DE <1> neg si 7344 00007EE1 F7DF <1> neg di 7345 00007EE3 83DE00 <1> sbb si, byte 0 ; neg si:di 7346 <1> 7347 00007EE6 037EF8 <1> add di, word [bp + ?bytes_per_cluster] 7348 00007EE9 1376FA <1> adc si, word [bp + ?bytes_per_cluster + 2] 7349 <1> ; cluster size - how far we are 7350 <1> ; = how much to read from this cluster 7351 00007EEC 85F6 <1> test si, si 7352 00007EEE 7506 <1> jnz .use_count_2 7353 00007EF0 39CF <1> cmp di, cx 7354 00007EF2 7302 <1> jae .use_count_2 7355 00007EF4 89F9 <1> mov cx, di 7356 <1> .use_count_2: 7357 00007EF6 894EFC <1> mov word [bp + ?length_this_cluster], cx 7358 <1> 7359 <1> .next_sector: 7360 00007EF9 A1[588C] <1> mov ax, word [load_data - LOADDATA2 + ldCurrentCluster] 7361 00007EFC 8B16[5A8C] <1> mov dx, word [load_data - LOADDATA2 + ldCurrentCluster + 2] 7362 00007F00 E86CF6 <1> call check_clust 7363 00007F03 7303E9B800 <1> jc .error 7364 00007F08 E883F5 <1> call clust_to_first_sector 7365 00007F0B 8B1E[9B8C] <1> mov bx, word [load_data - LOADDATA2 + bsBPB + bpbBytesPerSector] 7366 00007F0F 8B7EF4 <1> mov di, word [bp + ?how_far_in_cluster] 7367 00007F12 8B76F6 <1> mov si, word [bp + ?how_far_in_cluster + 2] 7368 00007F15 87D6 <1> xchg dx, si 7369 00007F17 97 <1> xchg ax, di 7370 00007F18 F7F3 <1> div bx 7371 <1> ; dx = byte offset into sector 7372 <1> ; ax = sector offset into cluster's data 7373 00007F1A 01C7 <1> add di, ax 7374 00007F1C 83D600 <1> adc si, 0 7375 00007F1F 87D6 <1> xchg dx, si 7376 00007F21 97 <1> xchg ax, di 7377 <1> ; dx:ax = sector in fs 7378 <1> ; si = byte offset 7379 <1> 7380 00007F22 89F1 <1> mov cx, si ; = byte offset 7381 00007F24 F7D9 <1> neg cx ; - byte offset 7382 00007F26 01D9 <1> add cx, bx ; sector size - byte offset 7383 <1> ; = length this sector 7384 00007F28 3B4EFC <1> cmp cx, word [bp + ?length_this_cluster] 7385 00007F2B 7603 <1> jbe @F ; sector has less than requested --> 7386 00007F2D 8B4EFC <1> mov cx, word [bp + ?length_this_cluster] 7387 <1> ; fill entire remaining request 7388 <1> @@: 7389 00007F30 8B1E[F209] <1> mov bx, word [auxbuff_segorsel] 7390 00007F34 E8DAF9 <1> call read_sector 7391 00007F37 1E <1> push ds 7392 <1> 7393 00007F38 06 <1> push es 7394 <1> ; es:si -> data in sector buffer 7395 00007F39 C47EF0 <1> les di, [bp + ?pointer] 7396 <1> ; es:di -> buffer 7397 00007F3C 014EEC <1> add word [bp + ?read_how_many], cx 7398 00007F3F 294EFC <1> sub word [bp + ?length_this_cluster], cx 7399 00007F42 294EFE <1> sub word [bp + ?length], cx 7400 00007F45 010E[5C8C] <1> add word [load_data - LOADDATA2 + ldCurrentSeek], cx 7401 00007F49 8316[5E8C]00 <1> adc word [load_data - LOADDATA2 + ldCurrentSeek + 2], 0 7402 00007F4E 014EF4 <1> add word [bp + ?how_far_in_cluster], cx 7403 00007F51 8356F600 <1> adc word [bp + ?how_far_in_cluster + 2], 0 7404 00007F55 1F <1> pop ds ; ds:si -> data in sector buffer 7405 00007F56 F3A4 <1> rep movsb ; copy 7406 00007F58 897EF0 <1> mov word [bp + ?pointer], di 7407 <1> ; update pointer 7408 00007F5B 1F <1> pop ds 7409 <1> 7410 00007F5C 837EFC00 <1> cmp word [bp + ?length_this_cluster], 0 7411 00007F60 7597 <1> jne .next_sector 7412 <1> 7413 00007F62 8B7EF8 <1> mov di, word [bp + ?bytes_per_cluster] 7414 00007F65 8B76FA <1> mov si, word [bp + ?bytes_per_cluster + 2] 7415 00007F68 397EF4 <1> cmp word [bp + ?how_far_in_cluster], di 7416 00007F6B 7505 <1> jne @F 7417 00007F6D 3976F6 <1> cmp word [bp + ?how_far_in_cluster + 2], si 7418 00007F70 7408 <1> je @FF 7419 <1> @@: 7420 00007F72 837EFE00 <1> cmp word [bp + ?length], 0 7421 00007F76 7548 <1> jne .error 7422 00007F78 EB45 <1> jmp .success 7423 <1> 7424 <1> @@: 7425 00007F7A A1[588C] <1> mov ax, word [load_data - LOADDATA2 + ldCurrentCluster] 7426 00007F7D 8B16[5A8C] <1> mov dx, word [load_data - LOADDATA2 + ldCurrentCluster + 2] 7427 00007F81 E8EBF5 <1> call check_clust 7428 00007F84 723A <1> jc .error 7429 00007F86 E832F5 <1> call clust_next.dxax 7430 00007F89 731B <1> jnc @F ; (NC) --> 7431 00007F8B B8F6FF <1> mov ax, 0FFF8h - 2 7432 00007F8E BAFF0F <1> mov dx, 0FFFh 7433 00007F91 8B3E[5C8C] <1> mov di, word [load_data - LOADDATA2 + ldCurrentSeek] 7434 00007F95 8B36[5E8C] <1> mov si, word [load_data - LOADDATA2 + ldCurrentSeek + 2] 7435 00007F99 3B36[548C] <1> cmp si, word [load_data - LOADDATA2 + ldFileSize] 7436 00007F9D 7506 <1> jne .set_error 7437 00007F9F 3B3E[568C] <1> cmp di, word [load_data - LOADDATA2 + ldFileSize + 2] 7438 00007FA3 7401 <1> je .do_not_set_error ; if same then NC --> 7439 <1> .set_error: 7440 00007FA5 F9 <1> stc 7441 <1> .do_not_set_error: 7442 <1> @@: 7443 00007FA6 9C <1> pushf 7444 00007FA7 83C002 <1> add ax, 2 7445 00007FAA 83D200 <1> adc dx, 0 7446 00007FAD A3[588C] <1> mov word [load_data - LOADDATA2 + ldCurrentCluster], ax 7447 00007FB0 8916[5A8C] <1> mov word [load_data - LOADDATA2 + ldCurrentCluster + 2], dx 7448 00007FB4 9D <1> popf ; CF 7449 00007FB5 7209 <1> jc .error 7450 00007FB7 8B4EFE <1> mov cx, word [bp + ?length] 7451 00007FBA E303 <1> jcxz .success 7452 00007FBC E9FBFE <1> jmp .next_cluster 7453 <1> 7454 <1> .success: 7455 00007FBF A8 <1> db __TEST_IMM8 ; (skip stc, NC) 7456 <1> .error: 7457 00007FC0 F9 <1> stc 7458 <1> 7459 00007FC1 5D <1> pop bp 7460 <1> 7461 00007FC2 8F06[9E0A] <1> pop word [throwsp] 7462 00007FC6 8F06[9C0A] <1> pop word [throwret] ; restore throw destination 7463 00007FCA 8F06[9A0A] <1> pop word [errret] 7464 <1> 7465 00007FCE 9C <1> pushf 7466 00007FCF F646EE01 <1> testopt [bp + ?did_guard_auxbuff], 1 7467 00007FD3 7405 <1> jz @F 7468 00007FD5 8026[A700]EF <1> clropt [internalflags3], dif3_auxbuff_guarded_1 7469 <1> @@: 7470 00007FDA 9D <1> popf ; CF 7471 <1> 7472 00007FDB E869FE <1> call yy_boot_update 7473 <1> 7474 00007FDE 5F <1> pop di 7475 00007FDF 5E <1> pop si 7476 00007FE0 5A <1> pop dx 7477 00007FE1 58 <1> pop ax ; pop from ?read_how_many 7478 00007FE2 89EC5D <1> lleave 7479 00007FE5 C3 <1> retn 7480 <1> 7481 <1> .err_ret: 7482 00007FE6 8B26[9E0A] <1> mov sp, word [throwsp] ; restore stack 7483 <1> ; (needed here if returned to errret) 7484 00007FEA EBD4 <1> jmp .error 7485 <1> 7486 <1> 7487 <1> ; INP: [load_input_file] = active file 7488 <1> ; cx:dx = signed seek distance from current 7489 <1> ; OUT: - 7490 <1> ; CHG: ax, bx, cx, dx 7491 <1> ; STT: ds = es = ss 7492 <1> yy_boot_seek_current: 7493 <1> lframe near 7494 <1> lvar dword, length 7495 <1> lvar dword, length_this_cluster 7496 <1> lvar dword, bytes_per_cluster 7497 <1> lvar dword, how_far_in_cluster 7498 00007FEC 5589E58D66F0 <1> lenter 7499 <1> lvar dword, seek_distance 7500 00007FF2 51 <1> push cx 7501 00007FF3 52 <1> push dx 7502 00007FF4 31C0 <1> xor ax, ax 7503 <1> lvar word, did_guard_auxbuff 7504 00007FF6 50 <1> push ax 7505 00007FF7 56 <1> push si 7506 00007FF8 57 <1> push di 7507 <1> 7508 00007FF9 FF36[9A0A] <1> push word [errret] 7509 00007FFD FF36[9C0A] <1> push word [throwret] 7510 00008001 FF36[9E0A] <1> push word [throwsp] 7511 <1> 7512 00008005 55 <1> push bp 7513 <1> 7514 00008006 C706[9A0A][3082] <1> mov word [errret], .err_ret 7515 0000800C C706[9C0A][3082] <1> mov word [throwret], .err_ret 7516 00008012 8926[9E0A] <1> mov word [throwsp], sp 7517 <1> 7518 00008016 E815FE <1> call yy_boot_get 7519 <1> 7520 00008019 E8C384 <1> call guard_auxbuff 7521 0000801C FF46EA <1> inc word [bp + ?did_guard_auxbuff] 7522 <1> 7523 0000801F 85C9 <1> test cx, cx 7524 00008021 7975 <1> jns .plus 7525 <1> 7526 00008023 8B36[5E8C] <1> mov si, word [load_data - LOADDATA2 + ldCurrentSeek + 2] 7527 00008027 8B3E[5C8C] <1> mov di, word [load_data - LOADDATA2 + ldCurrentSeek] 7528 0000802B A1[9B8C] <1> mov ax, word [load_data - LOADDATA2 + bsBPB + bpbBytesPerSector] 7529 0000802E F726[788C] <1> mul word [load_data - LOADDATA2 + ldClusterSize] 7530 <1> 7531 00008032 8946F4 <1> mov word [bp + ?bytes_per_cluster], ax 7532 00008035 8956F6 <1> mov word [bp + ?bytes_per_cluster + 2], dx 7533 00008038 83E801 <1> sub ax, 1 7534 0000803B 83DA00 <1> sbb dx, 0 7535 0000803E F7D0 <1> not ax 7536 00008040 F7D2 <1> not dx 7537 <1> 7538 00008042 56 <1> push si 7539 00008043 57 <1> push di 7540 <1> 7541 00008044 21D6 <1> and si, dx 7542 00008046 21C7 <1> and di, ax ; start seek of current cluster 7543 <1> 7544 00008048 58 <1> pop ax 7545 00008049 5A <1> pop dx ; current seek 7546 <1> 7547 0000804A 0346EC <1> add ax, word [bp + ?seek_distance] 7548 0000804D 1356EE <1> adc dx, word [bp + ?seek_distance + 2] 7549 00008050 7203E9B801 <1> jnc .error ; target seek 7550 <1> 7551 <1> ; if the cluster is invalid, need to reset 7552 00008055 813E[5A8C]FF0F <1> cmp word [load_data - LOADDATA2 + ldCurrentCluster + 2], 0FFFh 7553 0000805B 7207 <1> jb @F 7554 0000805D 833E[588C]F8 <1> cmp word [load_data - LOADDATA2 + ldCurrentCluster], 0FFF8h 7555 00008062 7308 <1> jae .minus_reset 7556 <1> @@: 7557 <1> 7558 00008064 39F2 <1> cmp dx, si ; is target seek 7559 <1> ; >= start seek of current cluster? 7560 00008066 7502 <1> jne @F 7561 00008068 39F8 <1> cmp ax, di 7562 <1> @@: 7563 0000806A 7322 <1> jae .minus_simple ; yes, simple --> 7564 <1> 7565 <1> .minus_reset: 7566 <1> ; reset current cluster to first, seek to 0 7567 0000806C FF36[828C] <1> push word [load_data - LOADDATA2 + lsvFirstCluster + 2] 7568 00008070 FF36[808C] <1> push word [load_data - LOADDATA2 + lsvFirstCluster] 7569 00008074 8F06[588C] <1> pop word [load_data - LOADDATA2 + ldCurrentCluster] 7570 00008078 8F06[5A8C] <1> pop word [load_data - LOADDATA2 + ldCurrentCluster + 2] 7571 0000807C 8326[5C8C]00 <1> and word [load_data - LOADDATA2 + ldCurrentSeek], 0 7572 00008081 8326[5E8C]00 <1> and word [load_data - LOADDATA2 + ldCurrentSeek + 2], 0 7573 <1> 7574 <1> ; set distance 7575 00008086 8946EC <1> mov word [bp + ?seek_distance], ax 7576 00008089 8956EE <1> mov word [bp + ?seek_distance + 2], dx 7577 <1> ; use positive seek code 7578 0000808C EB0A <1> jmp .plus 7579 <1> 7580 <1> .minus_simple: 7581 <1> ; just set seek, current cluster still valid 7582 0000808E A3[5C8C] <1> mov word [load_data - LOADDATA2 + ldCurrentSeek], ax 7583 00008091 8916[5E8C] <1> mov word [load_data - LOADDATA2 + ldCurrentSeek + 2], dx 7584 00008095 E97501 <1> jmp .return 7585 <1> 7586 <1> .plus: 7587 00008098 8B16[568C] <1> mov dx, word [load_data - LOADDATA2 + ldFileSize + 2] 7588 0000809C A1[548C] <1> mov ax, word [load_data - LOADDATA2 + ldFileSize] 7589 <1> 7590 0000809F 2B06[5C8C] <1> sub ax, word [load_data - LOADDATA2 + ldCurrentSeek] 7591 000080A3 1B16[5E8C] <1> sbb dx, word [load_data - LOADDATA2 + ldCurrentSeek + 2] 7592 <1> 7593 000080A7 720A <1> jc .eof 7594 <1> ; dx:ax = how far we can seek within file 7595 000080A9 3B56EE <1> cmp dx, word [bp + ?seek_distance + 2] 7596 000080AC 7503 <1> jne @F 7597 000080AE 3B46EC <1> cmp ax, word [bp + ?seek_distance] 7598 <1> @@: 7599 000080B1 771D <1> ja .not_eof 7600 <1> .eof: 7601 000080B3 8B46EC <1> mov ax, word [bp + ?seek_distance] 7602 000080B6 8B56EE <1> mov dx, word [bp + ?seek_distance + 2] 7603 000080B9 0106[5C8C] <1> add word [load_data - LOADDATA2 + ldCurrentSeek], ax 7604 000080BD 1116[5E8C] <1> adc word [load_data - LOADDATA2 + ldCurrentSeek + 2], dx 7605 000080C1 C706[588C]F8FF <1> mov word [load_data - LOADDATA2 + ldCurrentCluster], 0FFF8h 7606 000080C7 C706[5A8C]FF0F <1> mov word [load_data - LOADDATA2 + ldCurrentCluster + 2], 0FFFh 7607 000080CD E93D01 <1> jmp .return 7608 <1> 7609 <1> .not_eof: 7610 000080D0 8B4EEC <1> mov cx, word [bp + ?seek_distance] 7611 000080D3 8B5EEE <1> mov bx, word [bp + ?seek_distance + 2] 7612 000080D6 85DB <1> test bx, bx 7613 000080D8 7507 <1> jnz @F 7614 000080DA 85C9 <1> test cx, cx 7615 000080DC 7503E92C01 <1> jz .return 7616 <1> @@: 7617 000080E1 894EFC <1> mov word [bp + ?length], cx 7618 000080E4 895EFE <1> mov word [bp + ?length + 2], bx 7619 <1> 7620 <1> ; bx:cx = length 7621 <1> .next_cluster: 7622 000080E7 8B36[5E8C] <1> mov si, word [load_data - LOADDATA2 + ldCurrentSeek + 2] 7623 000080EB 8B3E[5C8C] <1> mov di, word [load_data - LOADDATA2 + ldCurrentSeek] 7624 000080EF A1[9B8C] <1> mov ax, word [load_data - LOADDATA2 + bsBPB + bpbBytesPerSector] 7625 000080F2 F726[788C] <1> mul word [load_data - LOADDATA2 + ldClusterSize] 7626 <1> 7627 000080F6 8946F4 <1> mov word [bp + ?bytes_per_cluster], ax 7628 000080F9 8956F6 <1> mov word [bp + ?bytes_per_cluster + 2], dx 7629 000080FC 83E801 <1> sub ax, 1 7630 000080FF 83DA00 <1> sbb dx, 0 7631 00008102 21D6 <1> and si, dx 7632 00008104 21C7 <1> and di, ax ; how far are we into cluster 7633 <1> 7634 00008106 897EF0 <1> mov word [bp + ?how_far_in_cluster], di 7635 00008109 8976F2 <1> mov word [bp + ?how_far_in_cluster + 2], si 7636 <1> 7637 0000810C F7DE <1> neg si 7638 0000810E F7DF <1> neg di 7639 00008110 83DE00 <1> sbb si, byte 0 ; neg si:di 7640 <1> 7641 00008113 037EF4 <1> add di, word [bp + ?bytes_per_cluster] 7642 00008116 1376F6 <1> adc si, word [bp + ?bytes_per_cluster + 2] 7643 <1> ; cluster size - how far we are 7644 <1> ; = how much to read from this cluster 7645 00008119 39DE <1> cmp si, bx 7646 0000811B 7502 <1> jne @F 7647 0000811D 39CF <1> cmp di, cx 7648 <1> @@: 7649 0000811F 7304 <1> jae .use_count_2 7650 00008121 89F9 <1> mov cx, di 7651 00008123 89F3 <1> mov bx, si 7652 <1> .use_count_2: 7653 <1> ; bx:cx = how far to seek in this cluster 7654 00008125 894EF8 <1> mov word [bp + ?length_this_cluster], cx 7655 00008128 895EFA <1> mov word [bp + ?length_this_cluster + 2], bx 7656 <1> 7657 <1> .next_sector: 7658 0000812B A1[588C] <1> mov ax, word [load_data - LOADDATA2 + ldCurrentCluster] 7659 0000812E 8B16[5A8C] <1> mov dx, word [load_data - LOADDATA2 + ldCurrentCluster + 2] 7660 00008132 E83AF4 <1> call check_clust 7661 00008135 7303E9D300 <1> jc .error 7662 0000813A 8B1E[9B8C] <1> mov bx, word [load_data - LOADDATA2 + bsBPB + bpbBytesPerSector] 7663 0000813E 8B7EF0 <1> mov di, word [bp + ?how_far_in_cluster] 7664 00008141 8B76F2 <1> mov si, word [bp + ?how_far_in_cluster + 2] 7665 <1> 7666 00008144 87D6 <1> xchg dx, si 7667 00008146 97 <1> xchg ax, di 7668 00008147 F7F3 <1> div bx 7669 <1> ; dx = byte offset into sector 7670 <1> ; ax = sector offset into cluster's data 7671 00008149 87D6 <1> xchg dx, si 7672 0000814B 97 <1> xchg ax, di 7673 <1> ; si = byte offset 7674 <1> 7675 0000814C 89F1 <1> mov cx, si ; = byte offset 7676 0000814E F7D9 <1> neg cx ; - byte offset 7677 00008150 01D9 <1> add cx, bx ; sector size - byte offset 7678 <1> ; = length this sector 7679 00008152 837EFA00 <1> cmp word [bp + ?length_this_cluster + 2], 0 7680 00008156 7508 <1> jne @F ; fill remaining sector size 7681 00008158 3B4EF8 <1> cmp cx, word [bp + ?length_this_cluster] 7682 0000815B 7603 <1> jbe @F ; sector has less than requested --> 7683 0000815D 8B4EF8 <1> mov cx, word [bp + ?length_this_cluster] 7684 <1> ; fill entire remaining request 7685 <1> @@: 7686 00008160 294EF8 <1> sub word [bp + ?length_this_cluster], cx 7687 00008163 835EFA00 <1> sbb word [bp + ?length_this_cluster + 2], 0 7688 00008167 294EFC <1> sub word [bp + ?length], cx 7689 0000816A 835EFE00 <1> sbb word [bp + ?length + 2], 0 7690 0000816E 010E[5C8C] <1> add word [load_data - LOADDATA2 + ldCurrentSeek], cx 7691 00008172 8316[5E8C]00 <1> adc word [load_data - LOADDATA2 + ldCurrentSeek + 2], 0 7692 00008177 014EF0 <1> add word [bp + ?how_far_in_cluster], cx 7693 0000817A 8356F200 <1> adc word [bp + ?how_far_in_cluster + 2], 0 7694 <1> 7695 0000817E 837EFA00 <1> cmp word [bp + ?length_this_cluster + 2], 0 7696 00008182 75A7 <1> jne .next_sector 7697 00008184 837EF800 <1> cmp word [bp + ?length_this_cluster], 0 7698 00008188 75A1 <1> jne .next_sector 7699 <1> 7700 0000818A 8B7EF4 <1> mov di, word [bp + ?bytes_per_cluster] 7701 0000818D 8B76F6 <1> mov si, word [bp + ?bytes_per_cluster + 2] 7702 00008190 397EF0 <1> cmp word [bp + ?how_far_in_cluster], di 7703 00008193 7505 <1> jne @F 7704 00008195 3976F2 <1> cmp word [bp + ?how_far_in_cluster + 2], si 7705 00008198 740E <1> je @FF 7706 <1> @@: 7707 0000819A 837EFE00 <1> cmp word [bp + ?length + 2], 0 7708 0000819E 756D <1> jne .error 7709 000081A0 837EFC00 <1> cmp word [bp + ?length], 0 7710 000081A4 7567 <1> jne .error 7711 000081A6 EB65 <1> jmp .return 7712 <1> 7713 <1> @@: 7714 000081A8 A1[588C] <1> mov ax, word [load_data - LOADDATA2 + ldCurrentCluster] 7715 000081AB 8B16[5A8C] <1> mov dx, word [load_data - LOADDATA2 + ldCurrentCluster + 2] 7716 000081AF E8BDF3 <1> call check_clust 7717 000081B2 7259 <1> jc .error 7718 000081B4 E804F3 <1> call clust_next.dxax 7719 000081B7 732F <1> jnc @F ; (NC) --> 7720 000081B9 B8F6FF <1> mov ax, 0FFF8h - 2 7721 000081BC BAFF0F <1> mov dx, 0FFFh 7722 000081BF 8B3E[5C8C] <1> mov di, word [load_data - LOADDATA2 + ldCurrentSeek] 7723 000081C3 8B36[5E8C] <1> mov si, word [load_data - LOADDATA2 + ldCurrentSeek + 2] 7724 000081C7 3B36[548C] <1> cmp si, word [load_data - LOADDATA2 + ldFileSize] 7725 000081CB 7506 <1> jne .set_error 7726 000081CD 3B3E[568C] <1> cmp di, word [load_data - LOADDATA2 + ldFileSize + 2] 7727 000081D1 7401 <1> je .do_not_set_error ; if same then NC --> 7728 <1> .set_error: 7729 000081D3 F9 <1> stc 7730 <1> .do_not_set_error: 7731 000081D4 9C <1> pushf 7732 000081D5 31C9 <1> xor cx, cx 7733 000081D7 31DB <1> xor bx, bx 7734 000081D9 874EFC <1> xchg cx, word [bp + ?length] 7735 000081DC 875EFE <1> xchg bx, word [bp + ?length + 2] 7736 000081DF 010E[5C8C] <1> add word [load_data - LOADDATA2 + ldCurrentSeek], cx 7737 000081E3 111E[5E8C] <1> adc word [load_data - LOADDATA2 + ldCurrentSeek + 2], bx 7738 000081E7 A8 <1> db __TEST_IMM8 ; (skip pushf) 7739 <1> @@: 7740 000081E8 9C <1> pushf 7741 000081E9 83C002 <1> add ax, 2 7742 000081EC 83D200 <1> adc dx, 0 7743 000081EF A3[588C] <1> mov word [load_data - LOADDATA2 + ldCurrentCluster], ax 7744 000081F2 8916[5A8C] <1> mov word [load_data - LOADDATA2 + ldCurrentCluster + 2], dx 7745 000081F6 9D <1> popf ; CF 7746 000081F7 7214 <1> jc .error 7747 000081F9 8B4EFC <1> mov cx, word [bp + ?length] 7748 000081FC 8B5EFE <1> mov bx, word [bp + ?length + 2] 7749 000081FF 85DB <1> test bx, bx 7750 00008201 7403E9E1FE <1> jnz .next_cluster 7751 00008206 85C9 <1> test cx, cx 7752 00008208 7403E9DAFE <1> jnz .next_cluster 7753 <1> .return: 7754 <1> .error: 7755 <1> 7756 0000820D 5D <1> pop bp 7757 <1> 7758 0000820E 8F06[9E0A] <1> pop word [throwsp] 7759 00008212 8F06[9C0A] <1> pop word [throwret] ; restore throw destination 7760 00008216 8F06[9A0A] <1> pop word [errret] 7761 <1> 7762 0000821A 9C <1> pushf 7763 0000821B F646EA01 <1> testopt [bp + ?did_guard_auxbuff], 1 7764 0000821F 7405 <1> jz @F 7765 00008221 8026[A700]EF <1> clropt [internalflags3], dif3_auxbuff_guarded_1 7766 <1> @@: 7767 00008226 9D <1> popf ; CF 7768 <1> 7769 00008227 E81DFC <1> call yy_boot_update 7770 <1> 7771 0000822A 5F <1> pop di 7772 0000822B 5E <1> pop si 7773 0000822C 89EC5D <1> lleave 7774 0000822F C3 <1> retn 7775 <1> 7776 <1> .err_ret: 7777 00008230 8B26[9E0A] <1> mov sp, word [throwsp] ; restore stack 7778 <1> ; (needed here if returned to errret) 7779 00008234 EBD7 <1> jmp .error 7780 <1> 7781 <1> 7782 <1> ; INP: [load_input_file] = active file 7783 <1> ; cx:dx = 0 7784 <1> ; OUT: - 7785 <1> ; CHG: ax, bx, cx, dx 7786 <1> ; STT: ds = es = ss 7787 <1> yy_boot_seek_start: 7788 00008236 56 <1> push si 7789 00008237 57 <1> push di 7790 <1> 7791 00008238 E8F3FB <1> call yy_boot_get 7792 <1> 7793 <1> .reset: 7794 <1> ; reset current cluster to first, seek to 0 7795 0000823B FF36[828C] <1> push word [load_data - LOADDATA2 + lsvFirstCluster + 2] 7796 0000823F FF36[808C] <1> push word [load_data - LOADDATA2 + lsvFirstCluster] 7797 00008243 8F06[588C] <1> pop word [load_data - LOADDATA2 + ldCurrentCluster] 7798 00008247 8F06[5A8C] <1> pop word [load_data - LOADDATA2 + ldCurrentCluster + 2] 7799 0000824B 8326[5C8C]00 <1> and word [load_data - LOADDATA2 + ldCurrentSeek], 0 7800 00008250 8326[5E8C]00 <1> and word [load_data - LOADDATA2 + ldCurrentSeek + 2], 0 7801 <1> 7802 00008255 E8EFFB <1> call yy_boot_update 7803 <1> 7804 00008258 5F <1> pop di 7805 00008259 5E <1> pop si 7806 0000825A C3 <1> retn 7807 <1> %endif 7808 <1> 7809 <1> 7810 <1> ; INP: bp = load_data - LOADDATA2 7811 <1> initialise_fs: 7812 <1> ; (boot.asm code starts here) 7813 <1> 7814 0000825B 31C0 <1> xor ax, ax 7815 <1> ; calculate some values that we need: 7816 <1> ; adjusted sectors per cluster (store in a word, 7817 <1> ; and decode EDR-DOS's special value 0 meaning 256) 7818 0000825D 8A460D <1> mov al, [bp + bsBPB + bpbSectorsPerCluster] 7819 00008260 FEC8 <1> dec al 7820 00008262 40 <1> inc ax 7821 00008263 8946E8 <1> mov [bp + ldClusterSize], ax 7822 <1> 7823 00008266 8B46D4 <1> mov ax, [bp + ldEntriesPerSector] 7824 <1> 7825 <1> ; number of sectors used for root directory (store in CX) 7826 00008269 31D2 <1> xor dx, dx 7827 0000826B 89C3 <1> mov bx, ax 7828 0000826D 48 <1> dec ax ; rounding up 7829 0000826E 034611 <1> add ax, [bp + bsBPB + bpbNumRootDirEnts] ; (0 iff FAT32) 7830 00008271 11D2 <1> adc dx, dx ; account for overflow (dx was zero) 7831 00008273 F7F3 <1> div bx ; get number of root sectors 7832 00008275 91 <1> xchg ax, cx ; cx = number of root secs 7833 <1> 7834 <1> 7835 <1> ; (iniload.asm code starts here) 7836 <1> 7837 00008276 51 <1> push cx ; number of root secs 7838 00008277 31C0 <1> xor ax, ax 7839 <1> ; first sector of root directory 7840 00008279 8A4610 <1> mov al, [bp + bsBPB + bpbNumFATs] ; ! ah = 0, hence ax = number of FATs 7841 0000827C 8B4E16 <1> mov cx, word [bp + bsBPB + bpbSectorsPerFAT] 7842 0000827F 31FF <1> xor di, di ; di:cx = sectors per FAT 7843 <1> ; iff FAT12, FAT16 7844 00008281 85C9 <1> test cx, cx ; is FAT32 ? 7845 00008283 7506 <1> jnz @F ; no --> 7846 00008285 8B4E24 <1> mov cx, word [bp + bsBPB + ebpbSectorsPerFATLarge] 7847 00008288 8B7E26 <1> mov di, word [bp + bsBPB + ebpbSectorsPerFATLarge + 2] ; for FAT32 7848 <1> @@: 7849 0000828B 50 <1> push ax 7850 0000828C F7E1 <1> mul cx 7851 <1> ; ax = low word SpF*nF 7852 <1> ; dx = high word 7853 0000828E 93 <1> xchg bx, ax 7854 0000828F 87CA <1> xchg cx, dx 7855 <1> ; cx:bx = first mul 7856 00008291 58 <1> pop ax 7857 00008292 F7E7 <1> mul di 7858 <1> ; ax = high word adjust 7859 <1> ; dx = third word 7860 00008294 85D2 <1> test dx, dx 7861 00008296 740C <1> jz @F 7862 <1> .error_badchain: 7863 <1> error_badchain: equ $ 7864 00008298 BA[8F62] <1> mov dx, msg.boot_badchain 7865 0000829B B80D02 <1> mov ax, 020Dh 7866 0000829E E88422 <1> call setrc 7867 000082A1 E957E1 <1> jmp bootcmd.fail 7868 <1> 7869 <1> @@: 7870 000082A4 92 <1> xchg dx, ax 7871 <1> ; dx = high word adjust 7872 000082A5 01CA <1> add dx, cx 7873 <1> ; dx:bx = result 7874 000082A7 93 <1> xchg ax, bx 7875 <1> ; dx:ax = result 7876 000082A8 72EE <1> jc .error_badchain 7877 <1> 7878 000082AA 03460E <1> add ax, [bp + bsBPB + bpbReservedSectors] 7879 000082AD 83D200 <1> adc dx, byte 0 7880 000082B0 72E6 <1> jc .error_badchain 7881 <1> 7882 000082B2 59 <1> pop cx ; number of root sectors 7883 000082B3 31FF <1> xor di, di 7884 <1> 7885 <1> ; first sector of disk data area: 7886 000082B5 01C1 <1> add cx, ax 7887 000082B7 11D7 <1> adc di, dx 7888 000082B9 72DD <1> jc .error_badchain 7889 000082BB 894EFC <1> mov [bp + lsvDataStart], cx 7890 000082BE 897EFE <1> mov [bp + lsvDataStart + 2], di 7891 <1> 7892 000082C1 8946D0 <1> mov [bp + ldRootSector], ax 7893 000082C4 8956D2 <1> mov [bp + ldRootSector + 2], dx 7894 <1> 7895 <1> ; total sectors 7896 000082C7 31D2 <1> xor dx, dx 7897 000082C9 8B4613 <1> mov ax, [bp + bsBPB + bpbTotalSectors] 7898 000082CC 85C0 <1> test ax, ax 7899 000082CE 7506 <1> jnz @F 7900 000082D0 8B5622 <1> mov dx, [bp + bsBPB + bpbTotalSectorsLarge + 2] 7901 000082D3 8B4620 <1> mov ax, [bp + bsBPB + bpbTotalSectorsLarge] 7902 <1> 7903 <1> ; fall through and let it overwrite the field with the 7904 <1> ; already current contents. saves a jump. 7905 <1> @@: 7906 000082D6 895622 <1> mov [bp + bsBPB + bpbTotalSectorsLarge + 2], dx 7907 000082D9 894620 <1> mov [bp + bsBPB + bpbTotalSectorsLarge], ax 7908 <1> 7909 <1> ; dx:ax = total sectors 7910 <1> 7911 000082DC 8B5E16 <1> mov bx, [bp + bsBPB + bpbSectorsPerFAT] 7912 000082DF C646E620 <1> mov byte [bp + ldFATType], 32 7913 000082E3 85DB <1> test bx, bx 7914 000082E5 740B <1> jz @F 7915 <1> 7916 000082E7 31C9 <1> xor cx, cx 7917 <1> 7918 000082E9 895E24 <1> mov word [bp + bsBPB + ebpbSectorsPerFATLarge], bx 7919 000082EC 894E26 <1> mov word [bp + bsBPB + ebpbSectorsPerFATLarge + 2], cx 7920 000082EF 894E28 <1> mov word [bp + bsBPB + ebpbFSFlags], cx 7921 <1> ; FSVersion, RootCluster, FSINFOSector, BackupSector, Reserved: 7922 <1> ; uninitialised here (initialised by loaded_all later) 7923 <1> 7924 <1> @@: 7925 <1> ; dx:ax = total amount of sectors 7926 000082F2 2B46FC <1> sub ax, word [bp + lsvDataStart] 7927 000082F5 1B56FE <1> sbb dx, word [bp + lsvDataStart + 2] 7928 <1> 7929 <1> ; dx:ax = total amount of data sectors 7930 000082F8 89C3 <1> mov bx, ax 7931 000082FA 92 <1> xchg ax, dx 7932 000082FB 31D2 <1> xor dx, dx 7933 000082FD F776E8 <1> div word [bp + ldClusterSize] 7934 00008300 93 <1> xchg bx, ax 7935 00008301 F776E8 <1> div word [bp + ldClusterSize] 7936 <1> ; bx:ax = quotient, dx = remainder 7937 <1> ; bx:ax = number of clusters 7938 00008304 85DB <1> test bx, bx 7939 00008306 741F <1> jz @FF 7940 <1> ; >= 1_0000h clusters, should be FAT32 7941 00008308 81FBFF0F <1> cmp bx, 0FFFh 7942 0000830C 770D <1> ja .badclusters 7943 0000830E 7505 <1> jne @F 7944 00008310 83F8F5 <1> cmp ax, 0FFF7h - 2 7945 00008313 7706 <1> ja .badclusters 7946 <1> @@: 7947 <1> ; check it is really FAT32 7948 00008315 837E1600 <1> cmp word [bp + bsBPB + bpbSectorsPerFAT], 0 7949 00008319 7447 <1> je .gotfattype 7950 <1> 7951 <1> .badclusters: 7952 0000831B BA[7562] <1> mov dx, msg.boot_badclusters 7953 0000831E B80E02 <1> mov ax, 020Eh 7954 00008321 E80122 <1> call setrc 7955 00008324 E9D4E0 <1> jmp bootcmd.fail 7956 <1> 7957 <1> @@: 7958 <1> ; <= FFFFh clusters, must be FAT16 or FAT12 7959 <1> ; check it is really not FAT32 7960 00008327 837E1600 <1> cmp word [bp + bsBPB + bpbSectorsPerFAT], 0 7961 0000832B 74EE <1> je .badclusters 7962 <1> 7963 0000832D 83F8F5 <1> cmp ax, 0FFF7h - 2 ; too much for FAT16 ? 7964 00008330 77E9 <1> ja .badclusters 7965 00008332 C646E610 <1> mov byte [bp + ldFATType], 16 7966 00008336 3DF50F <1> cmp ax, 0FF7h - 2 ; is it FAT12 ? 7967 00008339 7727 <1> ja .gotfattype ; no, is FAT16 --> 7968 <1> 7969 0000833B C646E60C <1> mov byte [bp + ldFATType], 12 7970 <1> 7971 0000833F F606[778C]02 <1> testopt [load_ldflags], ldfFATInvalid 7972 00008344 751C <1> jnz .gotfattype 7973 <1> 7974 00008346 53 <1> push bx 7975 00008347 50 <1> push ax 7976 <1> ; (boot.asm code continues here) 7977 <1> 7978 <1> ; Load the entire FAT into memory. This is easily feasible for FAT12, 7979 <1> ; as the FAT can only contain at most 4096 entries. 7980 <1> ; (The exact condition should be "at most 4087 entries", or with a 7981 <1> ; specific FF7h semantic, "at most 4088 entries"; the more reliable 7982 <1> ; and portable alternative would be "at most 4080 entries".) 7983 <1> ; Thus, no more than 6 KiB need to be read, even though the FAT size 7984 <1> ; as indicated by word[sectors_per_fat] could be much higher. The 7985 <1> ; first loop condition below is to correctly handle the latter case. 7986 <1> ; (Sector size is assumed to be a power of two between 32 and 8192 7987 <1> ; bytes, inclusive. An 8 KiB buffer is necessary if the sector size 7988 <1> ; is 4 or 8 KiB, because reading the FAT can or will write to 8 KiB 7989 <1> ; of memory instead of only the relevant 6 KiB. This is always true 7990 <1> ; if the sector size is 8 KiB, and with 4 KiB sector size it is true 7991 <1> ; iff word[sectors_per_fat] is higher than one.) 7992 00008348 BF0018 <1> mov di, 6 << 10 ; maximum size of FAT12 to load 7993 0000834B 8B4E16 <1> mov cx, [bp + bsBPB + bpbSectorsPerFAT] 7994 <1> ; maximum size of this FS's FAT 7995 0000834E 31D2 <1> xor dx, dx 7996 00008350 8B460E <1> mov ax, [bp + bsBPB + bpbReservedSectors]; = first FAT sector 7997 00008353 8B5EF8 <1> mov bx, [bp + lsvFATSeg] 7998 <1> @@: 7999 00008356 E8B8F5 <1> call read_sector ; read next FAT sector 8000 00008359 2B7E0B <1> sub di, [bp + bsBPB + bpbBytesPerSector] 8001 <1> ; di = bytes still left to read 8002 0000835C 7602 <1> jbe @F ; if none --> 8003 <1> ; (jbe means jump if CF || ZF) 8004 0000835E E2F6 <1> loop @B ; if any FAT sector still remains --> 8005 <1> @@: ; one of the limits reached; FAT read 8006 00008360 58 <1> pop ax 8007 00008361 5B <1> pop bx 8008 <1> 8009 <1> .gotfattype: 8010 <1> 8011 <1> ; if bx:ax = 1, then entries 0, 1, 2 are valid 8012 00008362 83C001 <1> add ax, 1 8013 00008365 83D300 <1> adc bx, 0 8014 <1> ; max entry is x+1 (2 if x=1) 8015 <1> 8016 00008368 8946C0 <1> mov word [bp + ldMaxCluster], ax 8017 0000836B 895EC2 <1> mov word [bp + ldMaxCluster + 2], bx 8018 <1> 8019 <1> ; if bx:ax was = 1, then entries below 3 have to exist 8020 0000836E 83C001 <1> add ax, 1 8021 00008371 83D300 <1> adc bx, 0 8022 <1> ; if bx:ax was 1, bx:ax now = 3 8023 <1> 8024 00008374 89DA <1> mov dx, bx 8025 <1> 8026 00008376 807EE610 <1> cmp byte [bp + ldFATType], 16 8027 0000837A 720C <1> jb .check_fat_limit_12 8028 0000837C 7404 <1> je .check_fat_limit_16 8029 <1> .check_fat_limit_32: 8030 0000837E 01C0 <1> add ax, ax 8031 00008380 11D2 <1> adc dx, dx 8032 <1> .check_fat_limit_16: 8033 00008382 01C0 <1> add ax, ax 8034 00008384 11D2 <1> adc dx, dx 8035 00008386 EB0D <1> jmp @F 8036 <1> 8037 <1> .check_fat_limit_12: 8038 00008388 89C2 <1> mov dx, ax 8039 0000838A 01C0 <1> add ax, ax 8040 0000838C 01D0 <1> add ax, dx ; * 3 8041 0000838E D1E8 <1> shr ax, 1 ; * 3 / 2 = * 1.5 8042 00008390 83D000 <1> adc ax, 0 ; if the last nybble is needed 8043 00008393 31D2 <1> xor dx, dx 8044 <1> 8045 <1> @@: 8046 00008395 8B5E0B <1> mov bx, word [bp + bsBPB + bpbBytesPerSector] 8047 00008398 4B <1> dec bx 8048 00008399 01D8 <1> add ax, bx 8049 0000839B 83D200 <1> adc dx, 0 8050 0000839E 43 <1> inc bx 8051 <1> 8052 0000839F 91 <1> xchg cx, ax 8053 000083A0 89D0 <1> mov ax, dx 8054 000083A2 31D2 <1> xor dx, dx 8055 000083A4 F7F3 <1> div bx 8056 000083A6 91 <1> xchg cx, ax 8057 000083A7 F7F3 <1> div bx 8058 000083A9 87CA <1> xchg cx, dx 8059 <1> ; cx = remainder, dx:ax = number of sectors needed 8060 <1> 8061 000083AB 8B4E16 <1> mov cx, word [bp + bsBPB + bpbSectorsPerFAT] 8062 000083AE 31FF <1> xor di, di ; di:cx = sectors per FAT 8063 <1> ; iff FAT12, FAT16 8064 000083B0 85C9 <1> test cx, cx ; is FAT32 ? 8065 000083B2 7506 <1> jnz @F ; no --> 8066 000083B4 8B4E24 <1> mov cx, word [bp + bsBPB + ebpbSectorsPerFATLarge] 8067 000083B7 8B7E26 <1> mov di, word [bp + bsBPB + ebpbSectorsPerFATLarge + 2] ; for FAT32 8068 <1> @@: 8069 <1> 8070 000083BA 39D7 <1> cmp di, dx 8071 000083BC 7502 <1> jne @F 8072 000083BE 39C1 <1> cmp cx, ax 8073 <1> @@: 8074 000083C0 730C <1> jae @F 8075 <1> .badfat: 8076 000083C2 BA[A462] <1> mov dx, msg.boot_badfat 8077 000083C5 B80F02 <1> mov ax, 020Fh 8078 000083C8 E85A21 <1> call setrc 8079 000083CB E92DE0 <1> jmp bootcmd.fail 8080 <1> 8081 <1> @@: 8082 000083CE C3 <1> retn 2486 %endif 2487 2488 2489 usesection lDEBUG_CODE 2490 2491 bb: 2492 %if _BOOTLDR 2493 000083CF F606[9D00]40 testopt [internalflags], nodosloaded 2494 000083D4 740F jz @F 2495 000083D6 4E dec si 2496 000083D7 4E dec si ; -> at 'B' 2497 000083D8 BA[9C63] mov dx, msg.boot 2498 000083DB E8C934 call isstring? ; check for "BOOT" 2499 000083DE 7503E939DB je bootcmd 2500 000083E3 46 inc si ; skip 'B' 2501 000083E4 AC lodsb ; load next 2502 @@: 2503 %endif 2504 000083E5 E82708 call uppercase 2505 %if _BREAKPOINTS 2506 000083E8 3C50 cmp al, 'P' 2507 000083EA 7449 je point_set 2508 000083EC 3C4E cmp al, 'N' 2509 000083EE 7503E91302 je point_number 2510 000083F3 3C43 cmp al, 'C' 2511 000083F5 7503E9AA04 je point_clear 2512 000083FA 3C44 cmp al, 'D' 2513 000083FC 7503E91E05 je point_disable 2514 00008401 3C45 cmp al, 'E' 2515 00008403 7503E90B05 je point_enable 2516 00008408 3C54 cmp al, 'T' 2517 0000840A 7503E91A05 je point_toggle 2518 0000840F 3C4C cmp al, 'L' 2519 00008411 7503E91D05 je point_list 2520 00008416 3C49 cmp al, 'I' 2521 00008418 7503E94102 je point_id 2522 0000841D 3C57 cmp al, 'W' 2523 0000841F 7503E97F03 je point_when 2524 %if BPSIZE == 6 || BPSIZE == 9 2525 00008424 3C4F cmp al, 'O' 2526 00008426 7503E91803 je point_offset 2527 %endif 2528 %endif 2529 0000842B 3C55 cmp al, 'U' ; BU command ? 2530 0000842D 7503E9D307 je bu_breakpoint 2531 2532 00008432 E9A920 jmp error ; no valid subcommand --> 2533 2534 %if _BREAKPOINTS 2535 point_set: 2536 00008435 E82335 call skipwhite 2537 2538 00008438 E8EB06 call getpointat ; "AT" keyword ? 2539 0000843B 720B jc .not_at ; no --> 2540 0000843D BF[7B84] mov di, .get_saved ; access saved address later 2541 00008440 E8A106 call findpointat ; do we find it ? 2542 00008443 7210 jc .find_new ; no, treat as if "NEW" keyword given --> 2543 ; point index is in dx 2544 00008445 52 push dx 2545 00008446 EB51 jmp @FF ; skip check whether used 2546 2547 .not_at: 2548 00008448 BF[6F84] mov di, .get_addr ; get address from input command line later 2549 0000844B E8F906 call getpointindex 2550 0000844E 7338 jnc @F ; got an index --> 2551 00008450 7503E98920 jz error ; "ALL" is invalid 2552 ; got "NEW" keyword 2553 .find_new: 2554 00008455 31C9 xor cx, cx 2555 00008457 50 push ax 2556 .new_loop: 2557 00008458 89C8 mov ax, cx ; try this index 2558 0000845A E87806 call calcpointbit 2559 %if ((_NUM_B_BP+7)>>3) != 1 2560 0000845D 84A7[0201] test byte [b_bplist.used_mask+bx], ah 2561 %else 2562 test byte [b_bplist.used_mask], ah 2563 %endif 2564 00008461 7421 jz .new_found ; found unused one --> 2565 2566 00008463 41 inc cx ; = next index 2567 00008464 83F910 cmp cx, _NUM_B_BP ; valid ? 2568 00008467 72EF jb .new_loop ; yes, try next --> 2569 2570 00008469 BA[D46D] mov dx, msg.bb_no_new 2571 0000846C E9FE7F jmp prnquit 2572 2573 2574 ; INP: al=, si-> input line 2575 ; OUT: al=, si-> after 2576 ; bx:dx = linear adddress 2577 ; does not return if error 2578 ; CHG: edxh 2579 .get_addr: 2580 0000846F 8B1E[900C] mov bx, word [reg_cs] 2581 00008473 E834B3 call getlinearaddr 2582 00008476 730B jnc .retn 2583 00008478 E96320 jmp error 2584 2585 2586 ; INP: al=, si-> input line 2587 ; OUT: bx:dx = linear address 2588 ; CHG: - 2589 .get_saved: 2590 0000847B 8B16[F88F] mov dx, word [..@bb_saved_linear] 2591 0000847F 8B1E[FA8F] mov bx, word [..@bb_saved_linear + 2] 2592 .retn: 2593 00008483 C3 retn 2594 2595 usesection lDEBUG_DATA_ENTRY 2596 00008FF6 00 align 4, db 0 2597 ..@bb_saved_linear: 2598 00008FF8 00000000 dd 0 2599 usesection lDEBUG_CODE 2600 2601 2602 .new_found: 2603 00008484 58 pop ax 2604 00008485 51 push cx 2605 00008486 EB11 jmp @FF 2606 2607 @@: 2608 00008488 52 push dx 2609 00008489 50 push ax 2610 0000848A 89D0 mov ax, dx 2611 0000848C E84606 call calcpointbit 2612 %if ((_NUM_B_BP+7)>>3) != 1 2613 0000848F 84A7[0201] test byte [b_bplist.used_mask+bx], ah 2614 %else 2615 test byte [b_bplist.used_mask], ah 2616 %endif 2617 00008493 58 pop ax 2618 00008494 7403E94520 jnz error 2619 @@: 2620 00008499 FFD7 call di ; call either .get_addr or .get_saved 2621 ; in any case, bx:dx = linear address 2622 0000849B BF0080 mov di, 8000h ; default counter 2623 0000849E 52 push dx 2624 0000849F 31D2 xor dx, dx 2625 2626 usesection lDEBUG_DATA_ENTRY 2627 align 4, db 0 2628 ..@bb_id_start: 2629 00008FFC 0000 dw 0 2630 ..@bb_id_length: 2631 00008FFE 0000 dw 0 2632 ..@bb_when_start: 2633 00009000 0000 dw 0 2634 ..@bb_when_length: 2635 00009002 0000 dw 0 2636 usesection lDEBUG_CODE 2637 2638 2639 000084A1 8916[FE8F] mov word [..@bb_id_length], dx 2640 000084A5 8916[0290] mov word [..@bb_when_length], dx 2641 ; initialise to empty ID 2642 000084A9 52 push dx 2643 .loop_additional: 2644 000084AA E8AF34 call skipwh0 2645 000084AD 4E dec si 2646 000084AE BA[4E65] mov dx, msg.number 2647 000084B1 E8F333 call isstring? 2648 000084B4 7435 je .additional_number 2649 000084B6 BA[5565] mov dx, msg.counter 2650 000084B9 E8EB33 call isstring? 2651 000084BC 742D je .additional_number 2652 000084BE BA[5D65] mov dx, msg.id 2653 000084C1 E8E333 call isstring? 2654 000084C4 745A je .additional_id 2655 000084C6 BA[6065] mov dx, msg.when 2656 000084C9 E8DB33 call isstring? 2657 000084CC 7444 je .additional_when 2658 %if BPSIZE == 6 || BPSIZE == 9 2659 000084CE BA[6565] mov dx, msg.offset 2660 000084D1 E8D333 call isstring? 2661 000084D4 7425 je .additional_offset 2662 %endif 2663 000084D6 AC lodsb 2664 000084D7 E82C34 call iseol? 2665 000084DA 744B je .no_additional 2666 000084DC 5A pop dx 2667 000084DD 85D2 test dx, dx ; already got a number without keyword? 2668 000084DF 7403E9FA1F jnz error ; yes --> 2669 000084E4 42 inc dx ; remember for subsequent iterations 2670 000084E5 52 push dx 2671 000084E6 E87334 call skipwh0 2672 000084E9 EB0B jmp @F 2673 2674 .additional_number: 2675 000084EB E85734 call skipequals 2676 000084EE E81534 call iseol? 2677 000084F1 7503E9E81F je error 2678 @@: 2679 000084F6 E8DC00 call getcounter 2680 000084F9 EBAF jmp .loop_additional 2681 2682 %if BPSIZE == 6 || BPSIZE == 9 2683 .additional_offset: 2684 000084FB 5A pop dx 2685 000084FC 80CA01 or dl, 1 ; remember for subsequent iterations 2686 ; not to accept number without keyword 2687 000084FF 52 push dx 2688 00008500 E84234 call skipequals 2689 %if _PM 2690 00008503 53 push bx 2691 00008504 E8F82D call getdword 2692 00008507 8916[5085] mov word [bp_offset], dx 2693 0000850B 891E[5285] mov word [bp_offset + 2], bx 2694 0000850F 5B pop bx 2695 %else 2696 call getword 2697 mov word [bp_offset], dx 2698 %endif 2699 00008510 EB98 jmp .loop_additional 2700 %endif 2701 2702 .additional_when: 2703 00008512 5A pop dx 2704 00008513 80CA01 or dl, 1 ; remember for subsequent iterations 2705 ; not to accept number without keyword 2706 00008516 52 push dx 2707 00008517 E82B34 call skipequals 2708 0000851A 4E dec si 2709 0000851B E88C00 call get_when 2710 0000851E EB8A jmp .loop_additional 2711 2712 .additional_id: 2713 00008520 E82234 call skipequals 2714 00008523 4E dec si 2715 00008524 E85300 call get_id 2716 2717 .no_additional: 2718 00008527 5A pop dx ; discard non-keyword NUMBER indicator 2719 00008528 5A pop dx ; restore dx = low word of linear 2720 2721 00008529 87DA xchg bx, dx ; dx:bx = linear 2722 0000852B 93 xchg bx, ax ; dx:ax = linear 2723 0000852C 5B pop bx ; = 0-based point index to set 2724 0000852D 52 push dx 2725 0000852E 50 push ax ; on stack: dword linear 2726 2727 0000852F 57 push di 2728 00008530 87D3 xchg dx, bx ; dx = point index 2729 2730 ; As for set_id, set_when will free a prior condition 2731 ; when writing the new one. However, we check for the 2732 ; appropriate buffer size being still free before 2733 ; calling set_when because we want to cancel the point 2734 ; initialisation if either the ID or the condition do 2735 ; not fit, without having yet written anything. 2736 00008532 E8F602 call check_when_space ; CHG ax, bx, cx, si, di 2737 2738 ; Note that point_clear and init both leave the 2739 ; empty word in the ID array. Therefore we can 2740 ; always handle this by freeing the prior value 2741 ; first, which is required if we're resetting 2742 ; an existing point with BP AT. 2743 ; The set_id function takes care of this. 2744 00008535 E86501 call set_id ; CHG ax, bx, cx, si, di 2745 2746 ; After check_when_space then set_id both returned, 2747 ; we have finally checked all error conditions and 2748 ; are now actually modifying things. 2749 00008538 E8B402 call set_when ; CHG ax, bx, cx, si, di 2750 0000853B 92 xchg ax, dx ; ax = point index 2751 0000853C 5F pop di ; preserve counter value 2752 2753 0000853D 89C3 mov bx, ax 2754 0000853F 01DB add bx, bx 2755 00008541 01DB add bx, bx 2756 %if BPSIZE == 4 2757 %elif BPSIZE == 5 2758 add bx, ax 2759 %elif BPSIZE == 6 2760 add bx, ax ; * 5 2761 add bx, ax ; * 6 2762 %elif BPSIZE == 9 2763 00008543 01DB add bx, bx ; * 8 2764 00008545 01C3 add bx, ax ; * 9 2765 %else 2766 %error Unexpected breakpoint size 2767 %endif 2768 00008547 8F87[0601] pop word [ b_bplist.bp + bx ] 2769 ; These two instructions need to stay in that order. 2770 ; For the non-PM version, the pop overwrites the byte 2771 ; that is then initialized to 0CCh (the breakpoint 2772 ; content byte). 2773 ; (This is not true for BPSIZE == 6. Instead, the pop 2774 ; overwrites the first byte of the preferred offset.) 2775 0000854B 8F87[0801] pop word [ b_bplist.bp + bx + 2 ] 2776 0000854F C687[0E01]CC mov byte [ b_bplist.bp + bx + BPSIZE - 1 ], 0CCh 2777 %if BPSIZE == 6 2778 push word [bp_offset] 2779 pop word [ b_bplist.bp + bx + 3 ] 2780 %elif BPSIZE == 9 2781 00008554 FF36[5085] push word [bp_offset] 2782 00008558 8F87[0A01] pop word [ b_bplist.bp + bx + 4 ] 2783 0000855C FF36[5285] push word [bp_offset + 2] 2784 00008560 8F87[0C01] pop word [ b_bplist.bp + bx + 6 ] 2785 %endif 2786 00008564 89C3 mov bx, ax 2787 00008566 01DB add bx, bx 2788 00008568 89BF[9601] mov word [ b_bplist.counter + bx ], di 2789 0000856C E86605 call calcpointbit 2790 %if ((_NUM_B_BP+7)>>3) != 1 2791 0000856F 08A7[0201] or byte [b_bplist.used_mask+bx], ah 2792 00008573 F6D4 not ah 2793 00008575 20A7[0401] and byte [b_bplist.disabled_mask+bx], ah 2794 %if _BREAKPOINTS_STICKY 2795 and byte [b_bplist.sticky_mask+bx], ah 2796 %endif 2797 %else 2798 or byte [b_bplist.used_mask], ah 2799 not ah 2800 and byte [b_bplist.disabled_mask], ah 2801 %if _BREAKPOINTS_STICKY 2802 and byte [b_bplist.sticky_mask], ah 2803 %endif 2804 %endif 2805 00008579 C3 retn 2806 2807 2808 ; INP: si -> first non-blank character 2809 ; OUT: ..@bb_id_start and ..@bb_id_length set 2810 ; does not return if error (too long) 2811 ; CHG: ax, cx, si 2812 get_id: 2813 0000857A 8936[FC8F] mov word [..@bb_id_start], si 2814 @@: 2815 0000857E AC lodsb 2816 0000857F E88833 call iseol?.notsemicolon 2817 00008582 75FA jne @B 2818 ; si -> after EOL char 2819 ; si - 1 -> EOL char 2820 @@: 2821 00008584 4E dec si 2822 00008585 3B36[FC8F] cmp si, word [..@bb_id_start] 2823 00008589 740C je @F 2824 0000858B 807CFF20 cmp byte [si - 1], 32 2825 0000858F 74F3 je @B 2826 00008591 807CFF09 cmp byte [si - 1], 9 2827 00008595 74ED je @B 2828 @@: 2829 00008597 89F1 mov cx, si 2830 00008599 2B0E[FC8F] sub cx, word [..@bb_id_start] 2831 0000859D 890E[FE8F] mov word [..@bb_id_length], cx 2832 000085A1 83F93F cmp cx, 63 2833 000085A4 7603E9351F ja error 2834 2835 %if 0 2836 push dx 2837 mov dx, msg.id 2838 call putsz 2839 mov al, 32 2840 call putc 2841 mov al, '"' 2842 call putc 2843 mov dx, word [..@bb_id_start] 2844 mov cx, word [..@bb_id_length] 2845 call disp_message_length_cx 2846 mov al, '"' 2847 call putc 2848 mov dx, crlf 2849 call putsz 2850 pop dx 2851 %endif 2852 000085A9 C3 retn 2853 2854 2855 ; INP: si -> first non-blank character 2856 ; OUT: ..@bb_when_start and ..@bb_when_length set 2857 ; does not return if error 2858 ; al = character after the condition, si -> next 2859 ; CHG: ax, cx, si 2860 get_when: 2861 000085AA 8936[0090] mov word [..@bb_when_start], si 2862 @@: 2863 000085AE AC lodsb 2864 000085AF 52 push dx 2865 000085B0 53 push bx 2866 000085B1 E84B2D call getexpression 2867 000085B4 5B pop bx 2868 000085B5 5A pop dx 2869 ; si -> after condition char 2870 ; si - 1 -> last condition char 2871 @@: 2872 000085B6 4E dec si 2873 000085B7 3B36[0090] cmp si, word [..@bb_when_start] 2874 000085BB 740C je @F 2875 000085BD 807CFF20 cmp byte [si - 1], 32 2876 000085C1 74F3 je @B 2877 000085C3 807CFF09 cmp byte [si - 1], 9 2878 000085C7 74ED je @B 2879 @@: 2880 000085C9 89F1 mov cx, si 2881 000085CB 2B0E[0090] sub cx, word [..@bb_when_start] 2882 000085CF 890E[0290] mov word [..@bb_when_length], cx 2883 2884 000085D3 AC lodsb 2885 %if 0 2886 push dx 2887 mov dx, msg.when 2888 call putsz 2889 mov al, 32 2890 call putc 2891 mov al, '"' 2892 call putc 2893 mov dx, word [..@bb_when_start] 2894 mov cx, word [..@bb_when_length] 2895 call disp_message_length_cx 2896 mov al, '"' 2897 call putc 2898 mov dx, crlf 2899 call putsz 2900 dec si 2901 lodsb 2902 pop dx 2903 %endif 2904 000085D4 C3 retn 2905 2906 2907 ; INP: al = first character, si -> next character 2908 ; di = default value 2909 ; OUT: di = counter value (default if EOL) 2910 ; al = first character after number, si -> next 2911 ; CHG: - 2912 ; does not return if error encountered 2913 getcounter: 2914 .: 2915 000085D5 E88433 call skipwh0 2916 000085D8 E82B33 call iseol? 2917 000085DB 7407 je .got_counter 2918 000085DD 52 push dx 2919 000085DE E80432 call getword 2920 000085E1 89D7 mov di, dx 2921 000085E3 5A pop dx 2922 .got_counter: 2923 000085E4 C3 retn 2924 2925 2926 ; INP: al = first character, si -> next character 2927 ; OUT: di = counter value (defaults to 8000h) 2928 ; CHG: ax, si (flags not changed) 2929 ; does not return if error encountered 2930 .pushf_chkeol: 2931 000085E5 9C pushf 2932 000085E6 52 push dx 2933 000085E7 4E dec si 2934 000085E8 BA[4E65] mov dx, msg.number 2935 000085EB E8B932 call isstring? 2936 000085EE 7408 je @F 2937 000085F0 BA[5565] mov dx, msg.counter 2938 000085F3 E8B132 call isstring? 2939 000085F6 7504 jne @FF 2940 @@: 2941 000085F8 E84A33 call skipequals 2942 000085FB A8 db __TEST_IMM8 ; (skip lodsb) 2943 @@: 2944 000085FC AC lodsb 2945 000085FD 5A pop dx 2946 000085FE E8D4FF call . 2947 00008601 E81733 call chkeol 2948 00008604 9D popf 2949 00008605 C3 retn 2950 2951 2952 point_number: 2953 00008606 E85233 call skipwhite 2954 2955 00008609 E81A05 call getpointat ; "AT" keyword ? 2956 0000860C 7210 jc .not_at ; no --> 2957 0000860E E8D304 call findpointat ; do we find it ? 2958 00008611 7303E9C81E jc error ; not found --> 2959 00008616 BF0080 mov di, 8000h ; default counter 2960 00008619 E8C9FF call getcounter.pushf_chkeol 2961 0000861C EB29 jmp @F ; point index is in dx --> 2962 2963 .not_at: 2964 0000861E E82605 call getpointindex 2965 00008621 BF0080 mov di, 8000h ; default counter 2966 00008624 E8BEFF call getcounter.pushf_chkeol 2967 00008627 731E jnc @F 2968 00008629 7403E9B01E jnz error ; "NEW" is invalid --> 2969 2970 0000862E 31C9 xor cx, cx 2971 .all_loop: 2972 00008630 89C8 mov ax, cx 2973 00008632 89CA mov dx, cx 2974 00008634 E89E04 call calcpointbit 2975 %if ((_NUM_B_BP+7)>>3) != 1 2976 00008637 84A7[0201] test byte [b_bplist.used_mask+bx], ah 2977 %else 2978 test byte [b_bplist.used_mask], ah 2979 %endif 2980 0000863B 7403 jz .all_next 2981 0000863D E81500 call .setnumber 2982 .all_next: 2983 00008640 41 inc cx 2984 00008641 83F910 cmp cx, _NUM_B_BP 2985 00008644 72EA jb .all_loop 2986 00008646 C3 retn 2987 2988 @@: 2989 00008647 89D0 mov ax, dx 2990 00008649 E88904 call calcpointbit 2991 %if ((_NUM_B_BP+7)>>3) != 1 2992 0000864C 84A7[0201] test byte [b_bplist.used_mask+bx], ah 2993 %else 2994 test byte [b_bplist.used_mask], ah 2995 %endif 2996 00008650 7503E9891E jz error 2997 2998 .setnumber: 2999 00008655 89D3 mov bx, dx 3000 00008657 01DB add bx, bx 3001 00008659 89BF[9601] mov word [b_bplist.counter + bx], di 3002 0000865D C3 retn 3003 3004 3005 point_id: 3006 0000865E E8FA32 call skipwhite 3007 3008 00008661 E8C204 call getpointat ; "AT" keyword ? 3009 00008664 720A jc .not_at ; no --> 3010 00008666 E87B04 call findpointat ; do we find it ? 3011 00008669 7303E9701E jc error ; not found --> 3012 0000866E EB08 jmp @F ; point index is in dx --> 3013 3014 .not_at: 3015 00008670 E8D404 call getpointindex 3016 00008673 7303E9661E jc error ; "NEW" and "ALL" keywords are invalid --> 3017 3018 @@: 3019 00008678 50 push ax 3020 00008679 89D0 mov ax, dx 3021 0000867B E85704 call calcpointbit 3022 %if ((_NUM_B_BP+7)>>3) != 1 3023 0000867E 84A7[0201] test byte [b_bplist.used_mask+bx], ah 3024 %else 3025 test byte [b_bplist.used_mask], ah 3026 %endif 3027 00008682 7503E9571E jz error 3028 00008687 58 pop ax 3029 3030 00008688 E8D132 call skipwh0 3031 3032 0000868B 4E dec si 3033 0000868C 52 push dx 3034 0000868D BA[5D65] mov dx, msg.id 3035 00008690 E81432 call isstring? 3036 00008693 7504 jne .no_id_kw 3037 00008695 E8AD32 call skipequals 3038 00008698 4E dec si 3039 .no_id_kw: 3040 00008699 5A pop dx 3041 0000869A E8DDFE call get_id 3042 3043 ; INP: ..@bb_id_start 3044 ; ..@bb_id_length 3045 ; dx = point index 3046 ; OUT: jumps to error if failure (too long) 3047 ; CHG: ax, bx, cx, si, di 3048 set_id: 3049 0000869D BBFFFF mov bx, -1 3050 000086A0 E84000 call get_set_id_offset_length 3051 000086A3 B10A mov cl, 10 3052 000086A5 89D8 mov ax, bx 3053 000086A7 D3EB shr bx, cl ; bx = length of ID to free 3054 3055 000086A9 8B36[F601] mov si, word [b_bplist.idbuffer.free] 3056 ; offset free 3057 000086AD F7DE neg si ; - offset free 3058 000086AF 81C68001 add si, b_bplist.idbuffer.length 3059 ; 1024 - offset free = amount free 3060 000086B3 01DE add si, bx ; amount free + length of ID to free 3061 000086B5 8B0E[FE8F] mov cx, word [..@bb_id_length] 3062 000086B9 E33F jcxz .empty ; if no ID to set --> 3063 000086BB 39CE cmp si, cx ; enough free ? 3064 000086BD 8B36[FC8F] mov si, word [..@bb_id_start] 3065 ; -> ID string 3066 000086C1 7303E9181E jb error ; no --> 3067 3068 000086C6 51 push cx 3069 000086C7 E83700 call free_id ; actually free it now 3070 000086CA 59 pop cx 3071 000086CB 51 push cx 3072 000086CC 89CB mov bx, cx ; length 3073 000086CE B10A mov cl, 10 ; offset part is 10 bits (0..1023) 3074 000086D0 D3E3 shl bx, cl ; length is in top 6 bits (0..63) 3075 000086D2 59 pop cx 3076 000086D3 8B3E[F601] mov di, word [b_bplist.idbuffer.free] 3077 ; = offset of free part 3078 000086D7 010E[F601] add word [b_bplist.idbuffer.free], cx 3079 ; mark space as used 3080 000086DB 09FB or bx, di ; OR in the offset 3081 000086DD 81C7[FA01] add di, b_bplist.idbuffer 3082 ; -> into buffer space 3083 000086E1 F3A4 rep movsb ; write 3084 3085 ; now remember this 3086 .after_empty: 3087 ; INP: dx = 0-based point index 3088 ; bx = word to set (-1 if not to modify) 3089 ; OUT: bx = word read 3090 get_set_id_offset_length: equ $ 3091 000086E3 87D3 xchg dx, bx 3092 000086E5 D1E3 shl bx, 1 3093 000086E7 FFB7[B601] push word [b_bplist.id + bx] 3094 000086EB 83FAFF cmp dx, -1 3095 000086EE 7404 je @F 3096 000086F0 8997[B601] mov word [b_bplist.id + bx], dx 3097 @@: 3098 000086F4 5A pop dx 3099 000086F5 D1EB shr bx, 1 3100 000086F7 87D3 xchg dx, bx 3101 000086F9 C3 retn 3102 3103 .empty: 3104 000086FA E80400 call free_id 3105 000086FD 31DB xor bx, bx ; offset = 0 and length = 0 3106 000086FF EBE2 jmp .after_empty 3107 3108 3109 ; INP: ax = offset/length word of ID to free 3110 ; (length zero means none) 3111 ; b_bplist.id = ID array (ONE of which matches ax) 3112 ; CHG: ax, bx, cx 3113 ; OUT: b_bplist.id entries adjusted 3114 ; (the one that is being freed is unaffected) 3115 ; b_bplist.idbuffer adjusted 3116 ; STT: UP, ss = ds = es 3117 ; REM: The b_bplist.id array contains zeroes as 3118 ; indicators of unused entries. This implies 3119 ; that the length field is zero too. However, 3120 ; the canonical NULL entry is *all* zeros. 3121 free_id: 3122 00008701 B10A mov cl, 10 3123 00008703 89C3 mov bx, ax 3124 00008705 81E3FF03 and bx, 1023 ; bx = offset of ID to free 3125 00008709 D3E8 shr ax, cl ; ax = length of ID to free 3126 0000870B 91 xchg cx, ax ; cx = length of ID to free 3127 3128 0000870C 56 push si 3129 0000870D 57 push di 3130 3131 0000870E E330 jcxz .return ; if none to free --> 3132 3133 00008710 51 push cx 3134 00008711 8DBF[FA01] lea di, [b_bplist.idbuffer + bx] 3135 ; -> ID to be freed 3136 ; (destination of following data) 3137 00008715 89FE mov si, di 3138 00008717 01CE add si, cx ; -> behind ID to be freed 3139 ; (source of following data) 3140 00008719 89F1 mov cx, si 3141 0000871B F7D9 neg cx ; minus pointer to first subsequent data 3142 0000871D 81C1[7A03] add cx, b_bplist.idbuffer + b_bplist.idbuffer.length 3143 ; pointer behind buffer - pointer subsequent data 3144 ; = length of data to move 3145 00008721 F3A4 rep movsb ; now di -> first uninitialised byte 3146 00008723 59 pop cx ; = length of data freed 3147 3148 00008724 290E[F601] sub word [b_bplist.idbuffer.free], cx 3149 ; mark as free 3150 00008728 51 push cx 3151 00008729 30C0 xor al, al 3152 0000872B F3AA rep stosb ; clear the buffer trailer (uninitialised part) 3153 0000872D 5F pop di ; di = length of data freed 3154 3155 0000872E BE[B601] mov si, b_bplist.id 3156 %if _NUM_B_BP < 256 3157 00008731 B110 mov cl, _NUM_B_BP 3158 %else 3159 mov cx, _NUM_B_BP 3160 %endif 3161 .loop: 3162 00008733 AD lodsw 3163 00008734 25FF03 and ax, 1023 ; get offset 3164 00008737 39D8 cmp ax, bx ; offset matches what we're freeing ?, OR 3165 ; is it below/equal the offset we're freeing ? 3166 00008739 7603 jbe .next ; yes --> (also jumps if ax == 0) 3167 0000873B 297CFE sub word [si - 2], di ; adjust offset 3168 ; This subtraction shouldn't underflow the 10 bits 3169 ; used for the offset, so it should leave the top 3170 ; 6 bits for the ID length unchanged. 3171 .next: 3172 0000873E E2F3 loop .loop 3173 3174 .return: 3175 00008740 5F pop di 3176 00008741 5E pop si 3177 00008742 C3 retn 3178 3179 3180 %if BPSIZE == 6 || BPSIZE == 9 3181 point_offset: 3182 00008743 E81532 call skipwhite 3183 3184 00008746 E8DD03 call getpointat ; "AT" keyword ? 3185 00008749 720A jc .not_at ; no --> 3186 0000874B E89603 call findpointat ; do we find it ? 3187 0000874E 7303E98B1D jc error ; not found --> 3188 00008753 EB08 jmp @F ; point index is in dx --> 3189 3190 .not_at: 3191 00008755 E8EF03 call getpointindex 3192 00008758 7303E9811D jc error ; "NEW" and "ALL" keywords are invalid --> 3193 3194 @@: 3195 0000875D 50 push ax 3196 0000875E 89D0 mov ax, dx 3197 00008760 E87203 call calcpointbit 3198 %if ((_NUM_B_BP+7)>>3) != 1 3199 00008763 84A7[0201] test byte [b_bplist.used_mask+bx], ah 3200 %else 3201 test byte [b_bplist.used_mask], ah 3202 %endif 3203 00008767 7503E9721D jz error 3204 0000876C 58 pop ax 3205 3206 0000876D E8EC31 call skipwh0 3207 00008770 52 push dx 3208 00008771 BAFFFF mov dx, -1 3209 %if BPSIZE == 9 3210 00008774 89D3 mov bx, dx 3211 %endif 3212 00008776 E88D31 call iseol? 3213 00008779 7414 je @F 3214 0000877B 4E dec si 3215 0000877C BA[6565] mov dx, msg.offset 3216 0000877F E82531 call isstring? 3217 00008782 7504 jne .no_offset_kw 3218 00008784 E8BE31 call skipequals 3219 00008787 4E dec si 3220 .no_offset_kw: 3221 00008788 AC lodsb 3222 %if BPSIZE == 9 3223 00008789 E8732B call getdword ; bx:dx = offset 3224 %else 3225 call getword ; dx = offset 3226 %endif 3227 0000878C E88C31 call chkeol 3228 @@: 3229 0000878F 58 pop ax 3230 00008790 89C7 mov di, ax 3231 00008792 01FF add di, di 3232 00008794 01FF add di, di ; * 4 3233 %if BPSIZE == 6 3234 add di, ax ; * 5 3235 add di, ax ; * 6 3236 add di, b_bplist.bp + 3 3237 %elif BPSIZE == 9 3238 00008796 01FF add di, di ; * 8 3239 00008798 01C7 add di, ax ; * 9 3240 0000879A 81C7[0A01] add di, b_bplist.bp + 4 3241 %else 3242 %error Unexpected breakpoint size 3243 %endif 3244 0000879E 92 xchg ax, dx 3245 0000879F AB stosw ; store low word of offset 3246 %if BPSIZE == 9 3247 000087A0 93 xchg ax, bx 3248 000087A1 AB stosw ; store high word of offset 3249 %endif 3250 000087A2 C3 retn 3251 %endif 3252 3253 3254 point_when: 3255 000087A3 E8B531 call skipwhite 3256 3257 000087A6 E87D03 call getpointat ; "AT" keyword ? 3258 000087A9 720A jc .not_at ; no --> 3259 000087AB E83603 call findpointat ; do we find it ? 3260 000087AE 7303E92B1D jc error ; not found --> 3261 000087B3 EB08 jmp @F ; point index is in dx --> 3262 3263 .not_at: 3264 000087B5 E88F03 call getpointindex 3265 000087B8 7303E9211D jc error ; "NEW" and "ALL" keywords are invalid --> 3266 3267 @@: 3268 000087BD 50 push ax 3269 000087BE 89D0 mov ax, dx 3270 000087C0 E81203 call calcpointbit 3271 %if ((_NUM_B_BP+7)>>3) != 1 3272 000087C3 84A7[0201] test byte [b_bplist.used_mask+bx], ah 3273 %else 3274 test byte [b_bplist.used_mask], ah 3275 %endif 3276 000087C7 7503E9121D jz error 3277 000087CC 58 pop ax 3278 3279 000087CD E88C31 call skipwh0 3280 000087D0 8326[0290]00 and word [..@bb_when_length], 0 3281 000087D5 E82E31 call iseol? 3282 000087D8 7415 je @F 3283 000087DA 4E dec si 3284 000087DB 52 push dx 3285 000087DC BA[6065] mov dx, msg.when 3286 000087DF E8C530 call isstring? 3287 000087E2 7504 jne .no_when_kw 3288 000087E4 E85E31 call skipequals 3289 000087E7 4E dec si 3290 .no_when_kw: 3291 000087E8 5A pop dx 3292 000087E9 E8BEFD call get_when 3293 000087EC E82C31 call chkeol 3294 @@: 3295 3296 3297 ; INP: ..@bb_when_start 3298 ; ..@bb_when_length 3299 ; dx = point index 3300 ; OUT: jumps to error if failure (too long) 3301 ; CHG: ax, bx, cx, si, di 3302 ; STT: UP, ss = ds = es 3303 set_when: 3304 000087EF E83900 call check_when_space ; cx = length (with terminating NUL) or 0, 3305 ; si -> clause (if cx != 0), 3306 ; ax = prior pointer or 0 3307 000087F2 E330 jcxz .empty 3308 3309 000087F4 51 push cx 3310 000087F5 E86B00 call free_when ; actually free it now (INP ax) 3311 000087F8 59 pop cx 3312 000087F9 8B3E[F801] mov di, word [b_bplist.whenbuffer.free] 3313 ; = offset of free part 3314 000087FD 010E[F801] add word [b_bplist.whenbuffer.free], cx 3315 ; mark space as used 3316 00008801 81C7[7A03] add di, b_bplist.whenbuffer 3317 ; -> into buffer space 3318 00008805 89FB mov bx, di ; bx -> buffer for clause, for set function 3319 ; si -> new clause (left by check function) 3320 00008807 F3A4 rep movsb ; write (with space for the NUL) 3321 00008809 C645FF00 mov byte [di - 1], 0 ; actually write a NUL 3322 3323 ; now remember this 3324 .after_empty: 3325 ; INP: dx = 0-based point index 3326 ; bx = word to set (-1 if not to modify) 3327 ; OUT: bx = word read 3328 get_set_when_offset: equ $ 3329 0000880D 87D3 xchg dx, bx 3330 0000880F D1E3 shl bx, 1 3331 00008811 FFB7[D601] push word [b_bplist.when + bx] 3332 00008815 83FAFF cmp dx, -1 3333 00008818 7404 je @F 3334 0000881A 8997[D601] mov word [b_bplist.when + bx], dx 3335 @@: 3336 0000881E 5A pop dx 3337 0000881F D1EB shr bx, 1 3338 00008821 87D3 xchg dx, bx 3339 00008823 C3 retn 3340 3341 .empty: 3342 00008824 E83C00 call free_when 3343 00008827 31DB xor bx, bx ; offset = 0 3344 00008829 EBE2 jmp .after_empty 3345 3346 3347 ; INP: ..@bb_when_start 3348 ; ..@bb_when_length 3349 ; dx = point index 3350 ; OUT: jumps to error if failure (too long) 3351 ; ax = prior pointer from array (to be freed), 3352 ; or 0 if no prior clause to free 3353 ; cx = length (including terminating NUL) 3354 ; or = 0 if no WHEN clause 3355 ; (if cx != 0) si -> WHEN clause data 3356 ; CHG: ax, bx, cx, si, di 3357 ; STT: UP, ss = ds = es 3358 check_when_space: 3359 0000882B BBFFFF mov bx, -1 3360 0000882E E8DCFF call get_set_when_offset 3361 3362 00008831 53 push bx 3363 00008832 85DB test bx, bx 3364 00008834 740D jz @F 3365 00008836 89DF mov di, bx 3366 00008838 B9FFFF mov cx, -1 3367 0000883B B000 mov al, 0 3368 0000883D F2AE repne scasb 3369 0000883F F7D1 not cx ; = length to free (including terminating NUL) 3370 00008841 89CB mov bx, cx 3371 @@: ; bx = length to free 3372 00008843 58 pop ax ; ax -> prior clause in .whenbuffer 3373 3374 00008844 8B36[F801] mov si, word [b_bplist.whenbuffer.free] 3375 ; offset free 3376 00008848 F7DE neg si ; - offset free 3377 0000884A 81C60004 add si, b_bplist.whenbuffer.length 3378 ; 1024 - offset free = amount free 3379 0000884E 01DE add si, bx ; amount free + length of condition to free 3380 00008850 8B0E[0290] mov cx, word [..@bb_when_length] 3381 00008854 E30C jcxz .empty ; if no condition to set --> 3382 00008856 41 inc cx ; count terminating NUL 3383 00008857 39CE cmp si, cx ; enough free ? 3384 00008859 8B36[0090] mov si, word [..@bb_when_start] 3385 ; -> condition string 3386 0000885D 7303E97C1C jb error ; no --> 3387 .empty: 3388 00008862 C3 retn 3389 3390 3391 ; INP: ax = offset word of condition to free 3392 ; (zero means none) 3393 ; b_bplist.when = condition array (ONE of which matches ax) 3394 ; CHG: ax, bx, cx 3395 ; OUT: b_bplist.when entries adjusted 3396 ; (the one that is being freed is unaffected) 3397 ; b_bplist.whenbuffer adjusted 3398 ; STT: UP, ss = ds = es 3399 ; REM: The b_bplist.when array contains actual offsets 3400 ; into the b_bplist.whenbuffer space. Therefore 3401 ; a value of zero acts as a NULL pointer and valid 3402 ; values are >= b_bplist.whenbuffer. 3403 free_when: 3404 00008863 56 push si 3405 00008864 57 push di 3406 3407 00008865 85C0 test ax, ax 3408 00008867 7438 jz .return 3409 3410 00008869 89C7 mov di, ax 3411 0000886B 89C3 mov bx, ax 3412 ; -> condition to be freed 3413 ; (destination of following data) 3414 0000886D 57 push di 3415 0000886E B9FFFF mov cx, -1 3416 00008871 B000 mov al, 0 3417 00008873 F2AE repne scasb 3418 00008875 F7D1 not cx ; = length to free (including terminating NUL) 3419 00008877 5F pop di 3420 00008878 51 push cx 3421 00008879 89FE mov si, di 3422 0000887B 01CE add si, cx ; -> behind condition to be freed 3423 ; (source of following data) 3424 0000887D 89F1 mov cx, si 3425 0000887F F7D9 neg cx ; minus pointer to first subsequent data 3426 00008881 81C1[7A07] add cx, b_bplist.whenbuffer + b_bplist.whenbuffer.length 3427 ; pointer behind buffer - pointer subsequent data 3428 ; = length of data to move 3429 00008885 F3A4 rep movsb ; now di -> first uninitialised byte 3430 00008887 59 pop cx ; = length of data freed 3431 3432 00008888 290E[F801] sub word [b_bplist.whenbuffer.free], cx 3433 ; mark as free 3434 0000888C 51 push cx 3435 0000888D 30C0 xor al, al 3436 0000888F F3AA rep stosb ; clear the buffer trailer (uninitialised part) 3437 00008891 5F pop di ; di = length of data freed 3438 3439 00008892 BE[D601] mov si, b_bplist.when 3440 %if _NUM_B_BP < 256 3441 00008895 B110 mov cl, _NUM_B_BP 3442 %else 3443 mov cx, _NUM_B_BP 3444 %endif 3445 .loop: 3446 00008897 AD lodsw 3447 00008898 39D8 cmp ax, bx ; offset we're freeing ?, OR 3448 ; is it below/equal the offset we're freeing ? 3449 0000889A 7603 jbe .next ; yes --> (also jumps if ax == 0) 3450 0000889C 297CFE sub word [si - 2], di ; adjust offset 3451 .next: 3452 0000889F E2F6 loop .loop 3453 3454 .return: 3455 000088A1 5F pop di 3456 000088A2 5E pop si 3457 000088A3 C3 retn 3458 3459 3460 point_clear: 3461 000088A4 BF[A988] mov di, .clear 3462 000088A7 EB1F jmp point_clear_enable_disable_toggle_common 3463 3464 .clear: 3465 000088A9 F7D0 not ax 3466 %if ((_NUM_B_BP+7)>>3) != 1 3467 000088AB 20A7[0201] and byte [b_bplist.used_mask+bx], ah 3468 000088AF 20A7[0401] and byte [b_bplist.disabled_mask+bx], ah 3469 %else 3470 and byte [b_bplist.used_mask], ah 3471 and byte [b_bplist.disabled_mask], ah 3472 %endif 3473 000088B3 51 push cx 3474 3475 000088B4 31DB xor bx, bx ; replace by empty word 3476 000088B6 E82AFE call get_set_id_offset_length 3477 000088B9 93 xchg ax, bx ; ax = word what to free 3478 000088BA E844FE call free_id ; actually free it now 3479 3480 000088BD 31DB xor bx, bx ; replace by empty word 3481 000088BF E84BFF call get_set_when_offset 3482 000088C2 93 xchg ax, bx ; ax = word what to free 3483 000088C3 E89DFF call free_when ; actually free it now 3484 3485 %if 0 3486 xor cx, cx 3487 3488 mov bx, dx 3489 add bx, bx ; * 2 3490 mov word [b_bplist.counter + bx], cx 3491 3492 add bx, bx ; * 4 3493 %if BPSIZE == 4 3494 %elif BPSIZE == 5 3495 add bx, dx ; * 5 3496 %elif BPSIZE == 6 3497 add bx, dx ; * 5 3498 add bx, dx ; * 6 3499 %elif BPSIZE == 9 3500 add bx, bx ; * 8 3501 add bx, dx ; * 9 3502 %else 3503 %error Unexpected breakpoint size 3504 %endif 3505 add bx, b_bplist.bp 3506 mov word [bx], cx 3507 mov word [bx + 2], cx 3508 %if BPSIZE == 4 3509 %elif BPSIZE == 5 3510 mov byte [bx + 4], cl 3511 %elif BPSIZE == 6 3512 mov word [bx + 4], cx 3513 %elif BPSIZE == 9 3514 mov word [bx + 4], cx 3515 mov word [bx + 6], cx 3516 mov byte [bx + 8], cl 3517 %else 3518 %error Unexpected breakpoint size 3519 %endif 3520 3521 %endif 3522 3523 000088C6 59 pop cx 3524 000088C7 C3 retn 3525 3526 point_clear_enable_disable_toggle_common: 3527 000088C8 E89030 call skipwhite 3528 3529 000088CB E85802 call getpointat ; "AT" keyword ? 3530 000088CE 720A jc .not_at ; no --> 3531 000088D0 E81102 call findpointat ; do we find it ? 3532 000088D3 7303E9061C jc error ; not found --> 3533 000088D8 EB25 jmp @F ; point index is in dx --> 3534 3535 .not_at: 3536 000088DA E86A02 call getpointindex 3537 000088DD 7320 jnc @F ; point index is in dx, no keyword --> 3538 000088DF 7403E9FA1B jnz error ; "NEW" is invalid --> 3539 3540 000088E4 E83430 call chkeol 3541 000088E7 31C9 xor cx, cx 3542 .all_loop: 3543 000088E9 89C8 mov ax, cx 3544 000088EB E8E701 call calcpointbit 3545 %if ((_NUM_B_BP+7)>>3) != 1 3546 000088EE 84A7[0201] test byte [b_bplist.used_mask+bx], ah 3547 %else 3548 test byte [b_bplist.used_mask], ah 3549 %endif 3550 000088F2 7404 jz .all_next 3551 000088F4 89CA mov dx, cx 3552 000088F6 FFD7 call di 3553 .all_next: 3554 000088F8 41 inc cx 3555 000088F9 83F910 cmp cx, _NUM_B_BP 3556 000088FC 72EB jb .all_loop 3557 000088FE C3 retn 3558 3559 @@: 3560 000088FF E81930 call chkeol 3561 00008902 89D0 mov ax, dx 3562 00008904 E8CE01 call calcpointbit 3563 %if ((_NUM_B_BP+7)>>3) != 1 3564 00008907 84A7[0201] test byte [b_bplist.used_mask+bx], ah 3565 %else 3566 test byte [b_bplist.used_mask], ah 3567 %endif 3568 0000890B 7503E9CE1B jz error 3569 00008910 FFD7 call di 3570 00008912 C3 retn 3571 3572 3573 point_enable: 3574 00008913 BF[1889] mov di, .enable 3575 00008916 EBB0 jmp point_clear_enable_disable_toggle_common 3576 3577 .enable: 3578 00008918 F7D0 not ax 3579 %if ((_NUM_B_BP+7)>>3) != 1 3580 0000891A 20A7[0401] and byte [b_bplist.disabled_mask+bx], ah 3581 %else 3582 and byte [b_bplist.disabled_mask], ah 3583 %endif 3584 0000891E C3 retn 3585 3586 3587 point_disable: 3588 0000891F BF[2489] mov di, .disable 3589 00008922 EBA4 jmp point_clear_enable_disable_toggle_common 3590 3591 .disable: 3592 %if ((_NUM_B_BP+7)>>3) != 1 3593 00008924 08A7[0401] or byte [b_bplist.disabled_mask+bx], ah 3594 %else 3595 or byte [b_bplist.disabled_mask], ah 3596 %endif 3597 00008928 C3 retn 3598 3599 3600 point_toggle: 3601 00008929 BF[2E89] mov di, .toggle 3602 0000892C EB9A jmp point_clear_enable_disable_toggle_common 3603 3604 .toggle: 3605 %if ((_NUM_B_BP+7)>>3) != 1 3606 0000892E 30A7[0401] xor byte [b_bplist.disabled_mask+bx], ah 3607 %else 3608 xor byte [b_bplist.disabled_mask], ah 3609 %endif 3610 00008932 C3 retn 3611 3612 3613 point_list: 3614 00008933 E82530 call skipwhite 3615 00008936 E8CD2F call iseol? 3616 00008939 747B je .all 3617 3618 0000893B E8E801 call getpointat ; "AT" keyword ? 3619 0000893E 7256 jc .not_at ; no --> 3620 00008940 E8A101 call findpointat ; do we find it ? 3621 ; Here we ignore the point index in dx, we just 3622 ; take note that at least one point matching the 3623 ; specified address exists. The points are matched 3624 ; against the linear address in ..@bb_saved_linear. 3625 00008943 7307 jnc .all_matching 3626 3627 00008945 BA[956E] mov dx, msg.bpnone_at 3628 00008948 E87134 call putsz 3629 0000894B C3 retn 3630 3631 3632 .all_matching: 3633 0000894C 31ED xor bp, bp 3634 0000894E 31DB xor bx, bx 3635 00008950 31D2 xor dx, dx 3636 00008952 BF[0E08] mov di, line_out 3637 .loop_matching: 3638 00008955 89DE mov si, bx 3639 00008957 01F6 add si, si 3640 00008959 01F6 add si, si 3641 %if BPSIZE == 4 3642 %elif BPSIZE == 5 3643 add si, bx 3644 %elif BPSIZE == 6 3645 add si, bx ; * 5 3646 add si, bx ; * 6 3647 %elif BPSIZE == 9 3648 0000895B 01F6 add si, si ; * 8 3649 0000895D 01DE add si, bx ; * 9 3650 %else 3651 %error Unexpected breakpoint size 3652 %endif 3653 0000895F 81C6[0601] add si, b_bplist.bp 3654 00008963 AD lodsw 3655 00008964 3906[F88F] cmp word [..@bb_saved_linear], ax 3656 00008968 7524 jne .next_matching 3657 %if _PM 3658 0000896A AD lodsw 3659 %else 3660 xor ax, ax 3661 lodsb 3662 %endif 3663 0000896B 3906[FA8F] cmp word [..@bb_saved_linear + 2], ax 3664 0000896F 751D jne .next_matching 3665 3666 00008971 57 push di 3667 00008972 B020 mov al, 32 3668 00008974 B92800 mov cx, 40 3669 00008977 F3AA rep stosb ; initialize field with blanks 3670 00008979 30C0 xor al, al 3671 0000897B AA stosb ; terminate it 3672 0000897C 5F pop di 3673 3674 0000897D E88000 call .single ; fill buffer 3675 3676 00008980 52 push dx 3677 00008981 53 push bx 3678 %if 0 3679 test dl, 1 ; an odd point ? 3680 jnz .odd_matching ; yes --> 3681 mov di, line_out + 40 ; write next point after the field 3682 jmp .was_even_matching 3683 .odd_matching: 3684 %endif 3685 00008982 E8B930 call putsline_crlf ; put line with linebreak (and no excess blanks) 3686 00008985 E83301 call handle_bl_when 3687 00008988 BF[0E08] mov di, line_out ; write next point at start of field 3688 .was_even_matching: 3689 0000898B 5B pop bx 3690 0000898C 5A pop dx 3691 0000898D 42 inc dx ; increment odd/even counter 3692 .next_matching: 3693 0000898E 43 inc bx ; increment breakpoint index 3694 0000898F 83FB10 cmp bx, _NUM_B_BP 3695 00008992 75C1 jne .loop_matching 3696 00008994 EB51 jmp .end 3697 3698 3699 .not_at: 3700 00008996 E8AE01 call getpointindex 3701 00008999 730A jnc @F 3702 0000899B 7403E93E1B jnz error ; "NEW" is invalid --> 3703 3704 000089A0 E8782F call chkeol 3705 000089A3 EB11 jmp .all 3706 @@: 3707 000089A5 E8732F call chkeol 3708 000089A8 89D3 mov bx, dx 3709 000089AA BF[0E08] mov di, line_out 3710 000089AD E85000 call .single 3711 000089B0 E88B30 call putsline_crlf 3712 000089B3 E90501 jmp handle_bl_when 3713 3714 3715 .all: 3716 000089B6 31ED xor bp, bp ; high byte: any set points encountered yet, 3717 ; low byte: current line has any set points 3718 000089B8 31DB xor bx, bx 3719 000089BA BF[0E08] mov di, line_out 3720 .loop: 3721 000089BD 57 push di 3722 000089BE B020 mov al, 32 3723 000089C0 B92800 mov cx, 40 3724 000089C3 F3AA rep stosb ; initialize field with blanks 3725 000089C5 30C0 xor al, al 3726 000089C7 AA stosb ; terminate it 3727 000089C8 5F pop di 3728 3729 000089C9 E83400 call .single ; fill buffer 3730 3731 000089CC 53 push bx 3732 %if 0 3733 test bl, 1 ; an odd point ? 3734 jnz .odd ; yes --> 3735 mov di, line_out + 40 ; write next point after the field 3736 jmp .was_even 3737 .odd: 3738 %endif 3739 000089CD F7C5FF00 test bp, 00FFh ; any point set in this line ? 3740 000089D1 740A jz .skip_putsline ; no --> 3741 000089D3 E86830 call putsline_crlf ; put line with linebreak (and no excess blanks) 3742 000089D6 E8E200 call handle_bl_when 3743 3744 000089D9 81E500FF and bp, ~00FFh ; clear flag for next line processing 3745 .skip_putsline: 3746 000089DD BF[0E08] mov di, line_out ; write next point at start of field 3747 .was_even: 3748 000089E0 5B pop bx 3749 000089E1 43 inc bx 3750 000089E2 83FB10 cmp bx, _NUM_B_BP 3751 000089E5 75D6 jne .loop 3752 .end: 3753 000089E7 81FF[0E08] cmp di, line_out 3754 000089EB 7406 je @F 3755 000089ED E84E30 call putsline_crlf 3756 000089F0 E8C800 call handle_bl_when 3757 @@: 3758 000089F3 F7C500FF test bp, 0FF00h 3759 000089F7 7506 jnz @F 3760 000089F9 BA[756E] mov dx, msg.bpnone 3761 000089FC E8BD33 call putsz 3762 @@: 3763 000089FF C3 retn 3764 3765 .single: 3766 00008A00 BE[4F6E] mov si, msg.bp 3767 00008A03 E8612F call showstring 3768 00008A06 53 push bx 3769 00008A07 89D8 mov ax, bx 3770 00008A09 E80130 call hexbyte ; store index of this point 3771 00008A0C E8C600 call calcpointbit 3772 00008A0F BE[596E] mov si, msg.bpunused 3773 %if ((_NUM_B_BP+7)>>3) != 1 3774 00008A12 84A7[0201] test byte [b_bplist.used_mask+bx], ah 3775 %else 3776 test byte [b_bplist.used_mask], ah 3777 %endif 3778 00008A16 7508 jnz @F ; if set --> 3779 00008A18 E84C2F call showstring 3780 00008A1B 31F6 xor si, si 3781 00008A1D E99900 jmp .unused 3782 3783 @@: 3784 00008A20 81CD0101 or bp, 0101h ; flag that there was a point set in this line 3785 00008A24 BE[566E] mov si, msg.bpdisabled 3786 %if ((_NUM_B_BP+7)>>3) != 1 3787 00008A27 84A7[0401] test byte [b_bplist.disabled_mask+bx], ah 3788 %else 3789 test byte [b_bplist.disabled_mask], ah 3790 %endif 3791 00008A2B 7503 jnz .disabled ; disabled --> (D) 3792 00008A2D BE[536E] mov si, msg.bpenabled 3793 .disabled: 3794 00008A30 E8342F call showstring 3795 00008A33 BE[616E] mov si, msg.bpaddress 3796 00008A36 E82E2F call showstring 3797 00008A39 58 pop ax 3798 00008A3A 50 push ax 3799 00008A3B 89C6 mov si, ax 3800 00008A3D 01F6 add si, si 3801 00008A3F 01F6 add si, si 3802 %if BPSIZE == 4 3803 %elif BPSIZE == 5 3804 add si, ax 3805 %elif BPSIZE == 6 3806 add si, ax ; * 5 3807 add si, ax ; * 6 3808 %elif BPSIZE == 9 3809 00008A41 01F6 add si, si ; * 8 3810 00008A43 01C6 add si, ax ; * 9 3811 %else 3812 %error Unexpected breakpoint size 3813 %endif 3814 00008A45 81C6[0601] add si, b_bplist.bp ; -> point 3815 00008A49 52 push dx 3816 00008A4A AD lodsw 3817 00008A4B 92 xchg ax, dx 3818 %if _PM 3819 00008A4C AD lodsw 3820 00008A4D E8B62F call hexword 3821 %else 3822 xor ax, ax 3823 lodsb 3824 call hexbyte 3825 %endif 3826 00008A50 50 push ax 3827 00008A51 B05F mov al, '_' 3828 00008A53 AA stosb 3829 00008A54 58 pop ax 3830 00008A55 92 xchg ax, dx 3831 00008A56 E8AD2F call hexword ; display (linear) address 3832 %if BPSIZE == 6 || BPSIZE == 9 3833 ; INP: dx:ax = linear address 3834 ; si -> (d)word offset 3835 ; di -> where to store 3836 ; OUT: cx = length displayed 3837 ; si -> after offset 3838 ; di -> after stored string 3839 ; CHG: ax, dx 3840 00008A59 E80F01 call bp_display_offset ; BPSIZE implied 3841 %else 3842 xor cx, cx 3843 %endif 3844 00008A5C 5A pop dx 3845 00008A5D AC lodsb 3846 00008A5E 50 push ax 3847 00008A5F BE[676E] mov si, msg.bpcontent 3848 00008A62 E8022F call showstring 3849 00008A65 58 pop ax 3850 00008A66 E8A42F call hexbyte ; display content 3851 00008A69 BE[6A6E] mov si, msg.bpcounter 3852 00008A6C E8F82E call showstring 3853 00008A6F 58 pop ax 3854 00008A70 50 push ax 3855 00008A71 89C3 mov bx, ax 3856 00008A73 52 push dx 3857 00008A74 89C2 mov dx, ax 3858 00008A76 01DB add bx, bx 3859 00008A78 8B87[9601] mov ax, word [b_bplist.counter + bx] 3860 00008A7C E8872F call hexword 3861 3862 00008A7F BBFFFF mov bx, -1 3863 00008A82 E85EFC call get_set_id_offset_length 3864 00008A85 F6C7FC test bh, 63 << 2 ; length nonzero ? 3865 00008A88 7426 jz @F ; no --> 3866 3867 ; The maximum length of a short ID is based on 3868 ; how much space there is assuming 80 columns. 3869 00008A8A BE[416E] mov si, msg.bb_hitpass_id.short 3870 00008A8D D0E1 shl cl, 1 3871 00008A8F D0E1 shl cl, 1 3872 00008A91 F6D9 neg cl 3873 00008A93 80C18C add cl, 35 << 2 3874 00008A96 38CF cmp bh, cl ; long ? 3875 00008A98 7203 jb .trigger_short_id 3876 ; This jump MUST be a jb, not jbe. The jbe 3877 ; would not match ZR for words where the 3878 ; idbuffer offset is a nonzero value. 3879 00008A9A BE[396E] mov si, msg.bb_hitpass_id.long 3880 .trigger_short_id: 3881 3882 00008A9D E862A9 call copy_single_counted_string 3883 00008AA0 88F9 mov cl, bh 3884 00008AA2 D0E9 shr cl, 1 3885 00008AA4 D0E9 shr cl, 1 ; cx = length 3886 00008AA6 81E3FF03 and bx, 1023 ; bx = offset 3887 00008AAA 8DB7[FA01] lea si, [b_bplist.idbuffer + bx] 3888 00008AAE F3A4 rep movsb 3889 3890 @@: 3891 3892 00008AB0 BBFFFF mov bx, -1 3893 00008AB3 E857FD call get_set_when_offset 3894 00008AB6 89DE mov si, bx 3895 00008AB8 5A pop dx 3896 3897 .unused: 3898 00008AB9 5B pop bx ; restore counter (if displaying all) 3899 00008ABA C3 retn 3900 3901 3902 ; CHG: si, al 3903 handle_bl_when: 3904 00008ABB 87D6 xchg dx, si 3905 00008ABD 85D2 test dx, dx 3906 00008ABF 7411 jz @F 3907 00008AC1 52 push dx 3908 00008AC2 BA[486E] mov dx, msg.bb_when 3909 00008AC5 E8F432 call putsz 3910 00008AC8 5A pop dx 3911 00008AC9 E8F032 call putsz 3912 %if 0 3913 mov al, '$' 3914 call putc 3915 %endif 3916 00008ACC BA[4574] mov dx, crlf 3917 00008ACF E8EA32 call putsz 3918 @@: 3919 00008AD2 87D6 xchg dx, si 3920 00008AD4 C3 retn 3921 3922 3923 ; INP: ax = 0-based index of point 3924 ; OUT: (bx-> byte to access. only if at least 9 points) 3925 ; (bx = 0 always if 8 or fewer points) 3926 ; ah = value to access 3927 ; CHG: al 3928 calcpointbit: 3929 %if ((_NUM_B_BP+7)>>3) != 1 3930 00008AD5 89C3 mov bx, ax 3931 %endif 3932 00008AD7 2407 and al, 7 3933 00008AD9 B401 mov ah, 1 3934 00008ADB 91 xchg ax, cx 3935 00008ADC D2E5 shl ch, cl 3936 %if ((_NUM_B_BP+7)>>3) != 1 3937 00008ADE B103 mov cl, 3 3938 00008AE0 D3EB shr bx, cl 3939 %else 3940 xor bx, bx 3941 %endif 3942 00008AE2 91 xchg ax, cx 3943 00008AE3 C3 retn 3944 3945 3946 ; INP: bx:dx = linear address 3947 ; OUT: NC if point found, 3948 ; dx = point index 3949 ; CY if point not found, 3950 ; bx:dx unchanged 3951 ; CHG: di 3952 findpointat: 3953 lframe near 3954 00008AE4 5589E5 lenter 3955 lvar word, orig_ax 3956 00008AE7 50 push ax 3957 lvar word, orig_si 3958 00008AE8 56 push si 3959 lvar dword, orig_bxdx 3960 00008AE9 53 push bx 3961 00008AEA 52 push dx 3962 00008AEB 31D2 xor dx, dx 3963 .loop: 3964 00008AED 89D0 mov ax, dx 3965 00008AEF E8E3FF call calcpointbit 3966 %if ((_NUM_B_BP+7)>>3) != 1 3967 00008AF2 84A7[0201] test byte [b_bplist.used_mask + bx], ah 3968 %else 3969 test byte [b_bplist.used_mask], ah 3970 %endif 3971 00008AF6 741F jz .next 3972 3973 00008AF8 89D6 mov si, dx 3974 00008AFA 01F6 add si, si 3975 00008AFC 01F6 add si, si 3976 %if BPSIZE == 4 3977 %elif BPSIZE == 5 3978 add si, dx 3979 %elif BPSIZE == 6 3980 add si, dx ; * 5 3981 add si, dx ; * 6 3982 %elif BPSIZE == 9 3983 00008AFE 01F6 add si, si ; * 8 3984 00008B00 01D6 add si, dx ; * 9 3985 %else 3986 %error Unexpected breakpoint size 3987 %endif 3988 00008B02 81C6[0601] add si, b_bplist.bp ; -> point 3989 00008B06 AD lodsw 3990 00008B07 3946F8 cmp word [bp + ?orig_bxdx], ax 3991 00008B0A 750B jne .next 3992 %if _PM 3993 00008B0C AD lodsw 3994 %else 3995 xor ax, ax 3996 lodsb 3997 %endif 3998 00008B0D 3946FA cmp word [bp + ?orig_bxdx + 2], ax 3999 00008B10 7505 jne .next 4000 ; (NC) 4001 00008B12 8956F8 mov word [bp + ?orig_bxdx], dx 4002 00008B15 EB07 jmp .ret 4003 4004 .next: 4005 00008B17 42 inc dx 4006 00008B18 83FA10 cmp dx, _NUM_B_BP 4007 00008B1B 72D0 jb .loop 4008 4009 00008B1D F9 stc 4010 .ret: 4011 00008B1E 5A pop dx 4012 00008B1F 5B pop bx ; pop ?orig_bxdx 4013 00008B20 5E pop si ; pop ?orig_si 4014 00008B21 58 pop ax ; pop ?orig_ax 4015 00008B22 89EC5D lleave 4016 00008B25 C3 lret 4017 4018 4019 ; INP: si->, al= 4020 ; OUT: CY if no "AT" keyword + address, 4021 ; si, al unchanged 4022 ; NC if "AT" keyword + address, 4023 ; si->, al= after 4024 ; bx:dx = dword [..@bb_saved_linear] = linear address 4025 ; CHG: edx, bx 4026 getpointat: 4027 00008B26 4E dec si 4028 00008B27 BA[9A68] mov dx, msg.at 4029 00008B2A E87A2D call isstring? 4030 00008B2D AC lodsb 4031 00008B2E 7402 je .at 4032 00008B30 F9 stc 4033 00008B31 C3 retn 4034 4035 .at: 4036 00008B32 8B1E[900C] mov bx, word [reg_cs] 4037 00008B36 E871AC call getlinearaddr 4038 00008B39 7303E9A019 jc error 4039 00008B3E 8916[F88F] mov word [..@bb_saved_linear], dx 4040 00008B42 891E[FA8F] mov word [..@bb_saved_linear + 2], bx 4041 00008B46 C3 retn 4042 4043 4044 ; INP: si->, al= 4045 ; OUT: NC if a point is specified, 4046 ; dx = point index (0-based, below _NUM_B_BP) 4047 ; CY if a keyword is specified, 4048 ; ZR if "ALL" keyword specified 4049 ; NZ if "NEW" keyword specified 4050 getpointindex: 4051 00008B47 4E dec si 4052 00008B48 BA[CC6D] mov dx, msg.all 4053 00008B4B E8592D call isstring? 4054 00008B4E 7418 je .is_all ; (ZR) 4055 00008B50 BA[D06D] mov dx, msg.new 4056 00008B53 E8512D call isstring? 4057 00008B56 740E je .is_new 4058 00008B58 AC lodsb 4059 00008B59 E8892C call getword 4060 00008B5C 83FA10 cmp dx, _NUM_B_BP 4061 00008B5F 7203E97A19 jae error 4062 00008B64 F8 clc ; (NC) 4063 00008B65 C3 retn 4064 4065 .is_new: 4066 00008B66 85F6 test si, si ; (NZ) 4067 .is_all: 4068 00008B68 F9 stc ; (CY) 4069 00008B69 AC lodsb ; al = separator, si-> after 4070 00008B6A C3 retn 4071 %endif 4072 4073 4074 %if BPSIZE == 6 || BPSIZE == 9 4075 ; INP: dx:ax = linear address 4076 ; si -> (d)word offset 4077 ; di -> where to store 4078 ; OUT: cx = length displayed 4079 ; si -> after offset 4080 ; di -> after stored string 4081 ; CHG: ax, dx 4082 bp_display_offset: 4083 lframe 4084 lvar dword, offset 4085 00008B6B 5589E55050 lenter 4086 lvar dword, linear 4087 00008B70 52 push dx 4088 00008B71 50 push ax 4089 00008B72 B82020 mov ax, " " 4090 lvar word, prefix 4091 00008B75 50 push ax 4092 lvar word, start_write 4093 00008B76 57 push di 4094 00008B77 53 push bx 4095 00008B78 AD lodsw 4096 %if _PM 4097 00008B79 92 xchg ax, dx 4098 00008B7A AD lodsw 4099 00008B7B 83F8FF cmp ax, -1 4100 00008B7E 92 xchg ax, dx 4101 00008B7F 7505 jne @F 4102 %else 4103 xor dx, dx 4104 %endif 4105 00008B81 83F8FF cmp ax, -1 4106 00008B84 746A je .skip 4107 @@: 4108 00008B86 8956FE mov word [bp + ?offset + 2], dx 4109 00008B89 8946FC mov word [bp + ?offset], ax 4110 4111 00008B8C 8B56FA mov dx, word [bp + ?linear + 2] 4112 00008B8F 8B46F8 mov ax, word [bp + ?linear] 4113 00008B92 2B46FC sub ax, word [bp + ?offset] 4114 00008B95 1B56FE sbb dx, word [bp + ?offset + 2] 4115 4116 %if _PM 4117 00008B98 E82E06 call ispm 4118 00008B9B 7525 jnz .r86m 4119 4120 00008B9D 52 push dx 4121 00008B9E 50 push ax 4122 00008B9F B80600 mov ax, 6 4123 00008BA2 8B1E[900C] mov bx, word [reg_cs] 4124 00008BA6 CD31 int 31h 4125 00008BA8 58 pop ax 4126 00008BA9 5B pop bx 4127 00008BAA 7212 jc .try_r86m 4128 4129 00008BAC 39D9 cmp cx, bx 4130 00008BAE 750E jne .try_r86m 4131 00008BB0 39C2 cmp dx, ax 4132 00008BB2 750A jne .try_r86m 4133 4134 00008BB4 B82020 mov ax, " " 4135 00008BB7 AB stosw 4136 00008BB8 B84353 mov ax, "CS" 4137 00008BBB AB stosw 4138 00008BBC EB1F jmp .offset 4139 4140 .try_r86m: 4141 00008BBE C646F724 mov byte [bp + ?prefix + 1], '$' 4142 %endif 4143 4144 .r86m: 4145 00008BC2 B90400 mov cx, 4 4146 00008BC5 A80F test al, 15 4147 00008BC7 7531 jnz .questionmarks 4148 00008BC9 F7C2F0FF test dx, 0FFF0h 4149 00008BCD 752B jnz .questionmarks 4150 00008BCF D3E8 shr ax, cl 4151 00008BD1 D3CA ror dx, cl 4152 00008BD3 09C2 or dx, ax 4153 00008BD5 8B46F6 mov ax, word [bp + ?prefix] 4154 00008BD8 AB stosw 4155 00008BD9 92 xchg ax, dx 4156 00008BDA E8292E call hexword 4157 4158 .offset: 4159 00008BDD B03A mov al, ':' 4160 00008BDF AA stosb 4161 %if _PM 4162 00008BE0 8B46FE mov ax, word [bp + ?offset + 2] 4163 00008BE3 85C0 test ax, ax 4164 00008BE5 7403 jz @F 4165 00008BE7 E81C2E call hexword 4166 @@: 4167 %endif 4168 00008BEA 8B46FC mov ax, word [bp + ?offset] 4169 00008BED E8162E call hexword 4170 4171 .skip: 4172 00008BF0 5B pop bx 4173 00008BF1 59 pop cx ; get ?start_write 4174 00008BF2 F7D9 neg cx 4175 00008BF4 01F9 add cx, di 4176 00008BF6 89EC5D lleave 4177 00008BF9 C3 retn 4178 4179 .questionmarks: 4180 00008BFA B82020 mov ax, " " 4181 00008BFD AB stosw 4182 00008BFE B83F3F mov ax, "??" 4183 00008C01 AB stosw 4184 00008C02 AB stosw 4185 00008C03 EBD8 jmp .offset 4186 %endif 4187 4188 4189 bu_breakpoint: 4190 00008C05 AC lodsb 4191 00008C06 E8122D call chkeol 4192 %if _DEBUG 4193 mov dx, msg.bu 4194 call putsz 4195 int3 4196 retn 4197 %else 4198 00008C09 BA[1072] mov dx, msg.notbu 4199 00008C0C E9AD31 jmp putsz 4200 %endif 4201 4202 4203 uppercase: 4204 00008C0F 3C61 cmp al, 'a' 4205 00008C11 7206 jb .ret 4206 00008C13 3C7A cmp al, 'z' 4207 00008C15 7702 ja .ret 4208 00008C17 24DF and al, TOUPPER 4209 .ret: 4210 00008C19 C3 retn 4211 4212 4213 errorj4: 4214 00008C1A E9C118 jmp error 4215 4216 4217 %if 0 4218 4219 ee 0: 4220 push ss 4221 pop ds 4222 push ss 4223 pop es 4224 mov ax, word [ savesp ] 4225 inc ax 4226 inc ax 4227 mov sp, ax ; restore stack 4228 mov bx, word [e_addr + saSegSel] 4229 _386_PM_o32 4230 mov dx, word [ e_addr ] ; get back address 4231 4232 4233 ; Prompt mode. 4234 ee 1: 4235 mov word [ errret ], ee 0 4236 4237 ; Begin loop over lines. 4238 ee 2: ; <--- next line 4239 mov word [e_addr + saSegSel], bx 4240 %if _PM 4241 call ispm 4242 jnz .86m 4243 .pm: 4244 mov word [e_addr + saSelector], bx 4245 jmp @F 4246 .86m: 4247 mov word [e_addr + saSegment], bx 4248 @@: 4249 %endif 4250 _386_PM_o32 4251 mov word [ e_addr ], dx ; save address 4252 mov di, line_out 4253 mov ax, bx ; print out segment and offset 4254 call hexword 4255 4256 === 4257 4258 4259 mov al, '.' 4260 stosb 4261 call getline00 ; read input line 4262 call iseol? 4263 je .end 4264 %if _PM 4265 xor bx, bx 4266 %endif 4267 mov dx, 1 4268 call ee_checkplusminus 4269 jne .notplusminus 4270 cmp al, '+' 4271 je ee 3 4272 jmp short ee 2 4273 4274 .notplusminus: 4275 4276 === 4277 4278 4279 ; INP: al = character, si-> line 4280 ; bx:dx = increment to add/subtract if this is an add/sub request 4281 ; OUT: al, si unchanged 4282 ; NZ if no add/sub request 4283 ; ZR if add/sub request, 4284 ; [ e_addr ] offset adjusted 4285 ee_checkplusminus: 4286 cmp al, '-' 4287 jne .not 4288 cmp al, '+' 4289 jne .not 4290 push si 4291 push ax 4292 call skipwhite 4293 call iseol? 4294 pop ax 4295 pop si 4296 jne .not 4297 cmp al, '-' 4298 je .minus 4299 add word [ e_addr ], dx 4300 _386_PM adc word [ e_addr+2 ], bx 4301 jmp short .done 4302 4303 .minus: 4304 sub word [ e_addr ], dx 4305 _386_PM sbb word [ e_addr+2 ], bx 4306 .done: 4307 cmp al, al 4308 .not: 4309 retn 4310 4311 === 4312 4313 4314 ee 9: 4315 call getline00 4316 4317 %endif 4318 4319 4320 ; E command - edit memory. 4321 ee: 4322 00008C1D E8FD19 call prephack 4323 00008C20 8B1E[840C] mov bx, word [reg_ds] 4324 00008C24 E8EB1C call getaddr ; get address into bx:(e)dx 4325 00008C27 E8032D call skipcomm0 4326 00008C2A E8D92C call iseol? 4327 00008C2D 743E je ee1 ; if prompt mode 4328 4329 eeparsestr: 4330 00008C2F 52 push dx ; save destination offset 4331 00008C30 E8511D call getstr ; get data bytes 4332 00008C33 89F9 mov cx, di 4333 00008C35 BA[0E08] mov dx, line_out 4334 00008C38 29D1 sub cx, dx ; length of byte string 4335 00008C3A 5F pop di 4336 00008C3B 89C8 mov ax, cx 4337 00008C3D 48 dec ax 4338 00008C3E 01F8 add ax, di 4339 00008C40 72D8 jc short errorj4 ; if it wraps around 4340 00008C42 E8061A call dohack 4341 00008C45 89D6 mov si, dx 4342 00008C47 8EC3 mov es, bx 4343 %if _PM 4344 00008C49 803E[DC88]00 cmp byte [bAddr32], 0 4345 00008C4E 740E jz ee_2 4346 [cpu 386] 4347 00008C50 89FA mov dx, di ; dx was destroyed 4348 00008C52 6689D7 mov edi, edx 4349 00008C55 660FB7F6 movzx esi, si 4350 00008C59 660FB7C9 movzx ecx, cx 4351 00008C5D 67 a32 4352 __CPU__ 4353 ee_2: 4354 %endif 4355 00008C5E F3A4 rep movsb 4356 4357 ; Restore ds + es and undo the interrupt vector hack. 4358 ; This code is also used by the `m' command. 4359 ee0a: 4360 00008C60 16 push ss ; restore ds 4361 00008C61 1F pop ds 4362 00008C62 16 push ss ; restore es 4363 00008C63 07 pop es 4364 00008C64 BF[A80A] mov di, run2324 ; debuggee's int 23/24 values 4365 00008C67 E8CC19 call prehak1 ; copy things back 4366 00008C6A E9121A jmp unhack 4367 4368 4369 4370 ; Prompt mode. 4371 ee1: 4372 00008C6D E88B78 call guard_re 4373 ; Begin loop over lines. 4374 ee2: ; <--- next line 4375 00008C70 89D8 mov ax, bx ; print out segment and offset 4376 00008C72 E8912D call hexword 4377 00008C75 B03A mov al, ':' 4378 00008C77 AA stosb 4379 00008C78 66 _386_PM_o32 ; mov eax, edx 4380 00008C79 89D0 mov ax, dx 4381 %if _PM 4382 00008C7B E8B6D0 call test_d_b_bit ; 32-bit segment ? 4383 00008C7E 7403 jz .16 ; no --> 4384 00008C80 E8772D call hexword_high 4385 .16: 4386 %endif 4387 00008C83 E8802D call hexword 4388 4389 ; Begin loop over bytes. 4390 ee3: ; <--- next byte 4391 00008C86 B82020 mov ax, 32<<8|32 ; print old value of byte 4392 00008C89 AB stosw 4393 00008C8A E8BE19 call dohack ; do the INT pointer hack 4394 00008C8D E8D60C call readmem ; read mem at BX:(E)DX 4395 00008C90 E8EC19 call unhack ; undo the INT pointer hack 4396 00008C93 E8772D call hexbyte 4397 00008C96 B02E mov al, '.' 4398 00008C98 AA stosb 4399 00008C99 C606[930A]00 mov byte [ linecounter ], 0 ; reset counter 4400 00008C9E 8026[9E00]EF clropt [internalflags], promptwaiting 4401 00008CA3 53 push bx 4402 00008CA4 52 push dx 4403 00008CA5 E89A2D call putsline 4404 00008CA8 5A pop dx 4405 00008CA9 5B pop bx 4406 00008CAA BE[1E08] mov si, line_out+16 ; address of buffer for characters 4407 00008CAD 31C9 xor cx, cx ; number of characters so far 4408 4409 ee4_next: 4410 00008CAF E85337 call getline_is_input_file? 4411 00008CB2 7238 jc ee9_getc_tty ; if it's a TTY 4412 4413 ee_getc_file: 4414 00008CB4 800E[A200]40 setopt [internalflags2], dif2_did_getline_file 4415 ; set this flag so yy_reset_buf knows 4416 ; that we may have buffered the file 4417 4418 00008CB9 56 push si 4419 %if _NEWFULLHANDLING 4420 00008CBA BF[0300] mov di, line_in+3 ; read max 4421 %else 4422 mov di, line_in+2 4423 %endif 4424 00008CBD 8B36[EC0A] mov si, word [bufnext] 4425 ee5: 4426 00008CC1 3B36[EE0A] cmp si, word [bufend] 4427 00008CC5 7207 jb ee6 ; if there's a character already 4428 00008CC7 E8463C call fillbuf 4429 00008CCA B00D mov al, 13 4430 00008CCC 7217 jc ee8 ; if eof 4431 ee6: 4432 00008CCE 803E[E70A]0D cmp byte [notatty], 13 4433 00008CD3 750C jne ee7 ; if no need to compress CR/LF 4434 00008CD5 803C0A cmp byte [si], 10 4435 00008CD8 7507 jne ee7 ; if not a line feed 4436 00008CDA 46 inc si ; skip it 4437 00008CDB FE06[E70A] inc byte [notatty] ; avoid repeating this 4438 00008CDF EBE0 jmp ee5 ; next character 4439 4440 ee7: 4441 00008CE1 AC lodsb ; get the character 4442 00008CE2 A2[E70A] mov byte [notatty], al 4443 ee8: 4444 00008CE5 8936[EC0A] mov word [bufnext], si 4445 00008CE9 5E pop si 4446 00008CEA EB03 jmp ee10_got_codepoint 4447 4448 ee9_getc_tty: 4449 00008CEC E83231 call getc ; character input without echo 4450 ee10_got_codepoint: 4451 00008CEF 3C20 cmp al, 32 ; (go to next byte) 4452 00008CF1 7448 je ee13_write 4453 00008CF3 3C2D cmp al, '-' ; (go to prior byte) 4454 00008CF5 7444 je ee13_write 4455 00008CF7 3C2E cmp al, '.' ; (exit E interactive mode) 4456 00008CF9 7440 je ee13_write 4457 00008CFB 3C0A cmp al, 10 4458 00008CFD 743C je ee13_write 4459 00008CFF E8082C call iseol?.notsemicolon; (also exit E interactive mode) 4460 00008D02 7437 je ee13_write ; all: done with this byte --> 4461 00008D04 3C08 cmp al, 8 4462 00008D06 7423 je ee11_backspace ; if backspace --> 4463 00008D08 3C7F cmp al, 7Fh 4464 00008D0A 741F je ee11_backspace ; if DEL (handle like backspace) --> 4465 00008D0C 83F902 cmp cx, byte 2 ; otherwise, it should be a hex character 4466 00008D0F 739E jae ee4_next ; if we have a full byte already 4467 00008D11 8804 mov byte [si], al 4468 00008D13 E8F42A call getnyb 4469 00008D16 7297 jc ee4_next ; if it's not a hex character 4470 00008D18 41 inc cx 4471 00008D19 AC lodsb ; get the character back 4472 00008D1A EB19 jmp ee12_put_then_next 4473 4474 ee112_priorbyte: 4475 00008D1C E8C030 call putc ; display the minus 4476 00008D1F E812D0 _386_PM call test_d_b_bit ; 32-bit segment ? 4477 00008D22 7401 _386_PM jz .16 ; no --> 4478 00008D24 66 _386_PM_o32 4479 .16: 4480 00008D25 4A dec dx ; decrement offset (16 bit or 32 bit) 4481 00008D26 BF[0E08] mov di, line_out 4482 00008D29 EB6E jmp ee15_linebreak_and_ee2 4483 4484 ee11_backspace: 4485 00008D2B E382 jcxz ee4_next ; if nothing to backspace over 4486 00008D2D 49 dec cx 4487 00008D2E 4E dec si 4488 00008D2F E8233B call fullbsout 4489 00008D32 E97AFF jmp ee4_next 4490 4491 ee12_put_then_next: 4492 00008D35 E8A730 call putc 4493 00008D38 E974FF jmp ee4_next ; back for more 4494 4495 ; We have a byte (if CX != 0). 4496 ; 4497 ; cx = number of digits we have (0..2) 4498 ; al = codepoint specifying how to proceed after writing 4499 ee13_write: 4500 00008D3B E329 jcxz ee14_done_write ; if no change for this byte 4501 4502 00008D3D 50 push ax ; preserve proceed control 4503 00008D3E 31C0 xor ax, ax ; ah = 0, al = 0 4504 00008D40 8804 mov byte [si], al ; terminate the string 4505 00008D42 29CE sub si, cx ; point to beginning 4506 @@: 4507 00008D44 00E4 add ah, ah 4508 00008D46 00E4 add ah, ah 4509 00008D48 00E4 add ah, ah 4510 00008D4A 00E4 add ah, ah ; prior value times 16 4511 00008D4C 00C4 add ah, al ; add next digit (0 in first iteration) 4512 00008D4E AC lodsb ; load next digit (or NUL) 4513 00008D4F E8B82A call getnyb 4514 00008D52 73F0 jnc @B ; if another digit --> (NC) 4515 ; (CY can only mean we reached the NUL) 4516 00008D54 88E0 mov al, ah ; get byte value 4517 00008D56 E8F218 call dohack ; do the INT pointer hack 4518 00008D59 E8DD0B call writemem ; write AL at BX:(E)DX 4519 00008D5C BF[A80A] mov di, run2324 ; debuggee's int 23/24 4520 00008D5F E8D418 call prehak1 ; copy things back 4521 00008D62 E81A19 call unhack ; undo the INT pointer hack 4522 00008D65 58 pop ax ; al = how to proceed 4523 4524 ; End the loop over bytes. 4525 ee14_done_write: 4526 00008D66 BF[0E08] mov di, line_out ; reset output buffer 4527 4528 00008D69 3C20 cmp al, 32 ; (go to next byte) 4529 00008D6B 7414 je ee_nextbyte 4530 00008D6D 3C2D cmp al, '-' ; (go to prior byte) 4531 00008D6F 74AB je ee112_priorbyte 4532 00008D71 3C2E cmp al, '.' ; (exit E interactive mode) 4533 00008D73 742B je ee16_end 4534 00008D75 3C0A cmp al, 10 4535 00008D77 7427 je ee16_end 4536 00008D79 E88E2B call iseol?.notsemicolon; (also exit E interactive mode) 4537 00008D7C 7422 je ee16_end 4538 00008D7E E95D17 jmp error ; unexpected value 4539 4540 ee_nextbyte: 4541 00008D81 E8B0CF _386_PM call test_d_b_bit ; 32-bit segment ? 4542 00008D84 7401 _386_PM jz .16 ; no --> 4543 00008D86 66 _386_PM_o32 4544 .16: 4545 00008D87 42 inc dx ; increment offset (16 bit or 32 bit) 4546 00008D88 F6C207 test dl, 7 4547 00008D8B 740C jz ee15_linebreak_and_ee2 4548 ; if new line 4549 00008D8D F7D1 not cx 4550 00008D8F 83C104 add cx, byte 4 ; compute 3 - cx 4551 00008D92 B020 mov al, 32 4552 00008D94 F3AA rep stosb ; store that many spaces 4553 00008D96 E9EDFE jmp ee3 ; back for more 4554 4555 ee15_linebreak_and_ee2: 4556 00008D99 B80D0A mov ax, 10 << 8 | 13 ; terminate this line 4557 00008D9C AB stosw 4558 00008D9D E9D0FE jmp ee2 ; back for a new line 4559 4560 ee16_end: 4561 00008DA0 E99B2C jmp putsline_crlf ; call putsline and return 4562 4563 4564 ; F command - fill memory 4565 ff: 4566 00008DA3 31C9 xor cx, cx ; get address range (no default length) 4567 00008DA5 8B1E[840C] mov bx, word [reg_ds] 4568 00008DA9 E88E1A call getrange ; get address range into bx:(e)dx 4569 00008DAC 66 _386_PM_o32 ; sub ecx, edx 4570 00008DAD 29D1 sub cx, dx 4571 00008DAF 66 _386_PM_o32 ; inc ecx 4572 00008DB0 41 inc cx ; (e)cx = number of bytes 4573 00008DB1 53 push bx 4574 00008DB2 66 _386_PM_o32 ; push ecx 4575 00008DB3 51 push cx ; save it 4576 00008DB4 66 _386_PM_o32 ; push edx 4577 00008DB5 52 push dx ; save start address 4578 4579 00008DB6 4E dec si 4580 00008DB7 BA[0067] mov dx, msg.range 4581 00008DBA E8EA2A call isstring? 4582 00008DBD AC lodsb 4583 00008DBE 7517 jne .notrange 4584 4585 00008DC0 8B1E[840C] mov bx, word [reg_ds] ; get search range 4586 00008DC4 800E[A700]04 setopt [internalflags3], dif3_accept_getrange_0 4587 00008DC9 E8671A call getrangeX.ecx_and_0_valid 4588 ; try to get second range 4589 00008DCC E84C2B call chkeol ; and insure end-of-line 4590 ; successful if it returned 4591 00008DCF 66 _386_PM_o32 ; mov esi, edx 4592 00008DD0 89D6 mov si, dx ; bx:esi-> source string 4593 00008DD2 66 _386_PM_o32 ; sub ecx, edx 4594 00008DD3 29D1 sub cx, dx ; ecx = count - 1 4595 00008DD5 EB1E jmp short @F 4596 4597 .notrange: 4598 00008DD7 E8532B call skipcomm0 4599 00008DDA E8A71B call getstr ; get string of bytes 4600 00008DDD 89F9 mov cx, di 4601 00008DDF 81E9[0E08] sub cx, line_out 4602 00008DE3 7503E9F616 jz error 4603 00008DE8 49 dec cx 4604 00008DE9 660FB7C9 _386_PM movzx ecx, cx 4605 00008DED 8CDB mov bx, ds 4606 00008DEF 6631F6 _386_PM xor esi, esi 4607 00008DF2 BE[0E08] mov si, line_out 4608 4609 @@: 4610 00008DF5 66 _386_PM_o32 ; pop edi 4611 00008DF6 5F pop di 4612 00008DF7 66 _386_PM_o32 ; pop eax 4613 00008DF8 58 pop ax 4614 00008DF9 07 pop es 4615 00008DFA 8EDB mov ds, bx 4616 %if _PM 4617 00008DFC 36803E[DC88]00 cmp byte [ss:bAddr32], 0 4618 00008E02 7440 jz ff16 4619 ff32: 4620 [cpu 386] 4621 00008E04 6641 inc ecx 4622 00008E06 0F84D416 jz error 4623 00008E0A 6683F901 cmp ecx, byte 1 4624 00008E0E 7429 je .onebytesource 4625 00008E10 6631D2 xor edx, edx ; edx:eax = size 4626 00008E13 66F7F1 div ecx 4627 00008E16 6685C0 test eax, eax 4628 00008E19 7413 jz .partial 4629 .loop: 4630 00008E1B 6656 push esi 4631 00008E1D 6651 push ecx 4632 00008E1F 67A4 a32 movsb 4633 00008E21 6649 dec ecx 4634 00008E23 F367A4 a32 rep movsb 4635 00008E26 6659 pop ecx 4636 00008E28 665E pop esi 4637 00008E2A 6648 dec eax 4638 00008E2C 75ED jnz .loop 4639 .partial: 4640 00008E2E 6689D1 mov ecx, edx ; get remainder (number of bytes in partial copy) 4641 00008E31 67E344 jecxz ffret ; if no partial copy --> 4642 00008E34 F367A4 a32 rep movsb 4643 00008E37 EB3F jmp short ffret ; done --> 4644 .onebytesource: 4645 00008E39 6689C1 mov ecx, eax ; size 4646 00008E3C 678A06 mov al, byte [esi] 4647 00008E3F F367AA a32 rep stosb 4648 00008E42 EB34 jmp short ffret 4649 __CPU__ 4650 ff16: 4651 %endif 4652 00008E44 31D2 xor dx, dx ; dx:ax = size 4653 00008E46 83F801 cmp ax, byte 1 4654 00008E49 83D200 adc dx, byte 0 ; convert 0000:0000 to 0001:0000 (0 = 64 KiB) 4655 00008E4C 41 inc cx 4656 00008E4D 7503 jnz @F 4657 ; dx:ax = 1_0000h, remainder = 0, quotient = 1 4658 ; dx:ax = 1, remainder = 1, quotient = 0 4659 ; dx:ax = 1234h, remainder = 1234h, quotient = 0 4660 00008E4F 92 xchg ax, dx 4661 00008E50 EB07 jmp @FF 4662 4663 @@: 4664 00008E52 83F901 cmp cx, byte 1 4665 00008E55 7419 je .onebytesource ; a common optimization 4666 00008E57 F7F1 div cx ; compute number of whole repetitions 4667 @@: 4668 00008E59 85C0 test ax, ax 4669 00008E5B 740B jz .partial ; if less than one whole rep 4670 .loop: 4671 00008E5D 56 push si 4672 00008E5E 51 push cx 4673 00008E5F A4 movsb 4674 00008E60 49 dec cx 4675 00008E61 F3A4 rep movsb 4676 00008E63 59 pop cx 4677 00008E64 5E pop si 4678 00008E65 48 dec ax 4679 00008E66 75F5 jnz .loop ; if more to go 4680 .partial: 4681 00008E68 89D1 mov cx, dx ; get remainder (number of bytes in partial copy) 4682 00008E6A E30C jcxz ffret ; if no partial copy --> 4683 00008E6C F3A4 rep movsb 4684 00008E6E EB08 jmp short ffret ; done --> 4685 .onebytesource: 4686 00008E70 89C1 mov cx, ax ; size 4687 00008E72 8A04 mov al, byte [si] 4688 00008E74 AA stosb ; cx=0 -> 64 kB 4689 00008E75 49 dec cx 4690 00008E76 F3AA rep stosb 4691 ffret: 4692 00008E78 16 push ss ; restore ds 4693 00008E79 1F pop ds 4694 00008E7A 16 push ss ; restore es 4695 00008E7B 07 pop es 4696 00008E7C C3 retn 4697 4698 4699 %if _EXPRESSIONS 4700 4701 ; H command - hex computation 4702 hh: 4703 00008E7D E8AD2A call skipcomm0 4704 00008E80 4E dec si 4705 00008E81 BA[5467] mov dx, msg.base 4706 00008E84 E8202A call isstring? 4707 00008E87 7403E9CC00 jne .normal 4708 00008E8C E8B62A call skipequals 4709 00008E8F E86D24 call getexpression 4710 00008E92 85DB test bx, bx 4711 @@: 4712 00008E94 7403E94516 jnz error 4713 00008E99 83FA24 cmp dx, 36 4714 00008E9C 77F6 ja @B 4715 00008E9E 83FA02 cmp dx, 2 4716 00008EA1 72F1 jb @B 4717 00008EA3 52 push dx 4718 4719 00008EA4 E8862A call skipcomm0 4720 00008EA7 4E dec si 4721 00008EA8 BA[5967] mov dx, msg.group 4722 00008EAB E8F929 call isstring? 4723 00008EAE BA0000 mov dx, 0 4724 00008EB1 7513 jne .gotgroup 4725 00008EB3 E88F2A call skipequals 4726 00008EB6 E84624 call getexpression 4727 00008EB9 E8712A call skipcomm0 4728 00008EBC 85DB test bx, bx 4729 00008EBE 75D4 jnz @B 4730 00008EC0 83FA20 cmp dx, 32 4731 00008EC3 77CF ja @B 4732 00008EC5 4E dec si 4733 .gotgroup: 4734 00008EC6 52 push dx 4735 00008EC7 BA[5F67] mov dx, msg.width 4736 00008ECA E8DA29 call isstring? 4737 00008ECD BB0000 mov bx, 0 4738 00008ED0 7515 jne .gotwidth 4739 00008ED2 E8702A call skipequals 4740 00008ED5 E82724 call getexpression 4741 00008ED8 E8522A call skipcomm0 4742 00008EDB 85DB test bx, bx 4743 00008EDD 75B5 jnz @B 4744 00008EDF 83FA20 cmp dx, 32 4745 00008EE2 77B0 ja @B 4746 00008EE4 89D3 mov bx, dx 4747 00008EE6 A8 db __TEST_IMM8 ; (skip lodsb) 4748 .gotwidth: 4749 00008EE7 AC lodsb 4750 00008EE8 53 push bx 4751 00008EE9 E8E200 call .compute 4752 00008EEC 58 pop ax 4753 00008EED 5E pop si 4754 00008EEE 59 pop cx 4755 00008EEF BF[5008] mov di, line_out + 66 4756 4757 00008EF2 E81901 call .storeresult 4758 4759 00008EF5 93 xchg bx, ax ; ax:dx = number, bx = width 4760 00008EF6 92 xchg ax, dx ; dx:ax = number 4761 lframe 4762 00008EF7 5589E5 lenter 4763 lvar dword, dividend 4764 00008EFA 52 push dx 4765 00008EFB 50 push ax 4766 00008EFC 4B dec bx 4767 lvar word, minwidth 4768 00008EFD 53 push bx 4769 lvar word, group 4770 00008EFE 56 push si 4771 lvar word, groupcounter 4772 00008EFF 56 push si 4773 4774 00008F00 89FB mov bx, di 4775 00008F02 FD std ; _AMD_ERRATUM_109_WORKAROUND does not apply 4776 4777 ; dword [bp + ?dividend] = number to display 4778 ; cx = base 4779 .loop_write: 4780 4781 00008F03 31D2 xor dx, dx 4782 00008F05 57 push di 4783 00008F06 BF0400 mov di, 4 4784 .loop_divide: 4785 00008F09 8B43FA mov ax, [bp + ?dividend - 2 + di] 4786 00008F0C F7F1 div cx 4787 00008F0E 8943FA mov word [bp + ?dividend - 2 + di], ax 4788 00008F11 4F dec di 4789 00008F12 4F dec di 4790 00008F13 75F4 jnz .loop_divide 4791 ; dx = last remainder 4792 00008F15 5F pop di 4793 00008F16 92 xchg ax, dx ; ax = remainder (next digit) 4794 ; dword [bp + ?dividend] = result of div 4795 00008F17 0430 add al, '0' 4796 00008F19 3C39 cmp al, '9' 4797 00008F1B 7602 jbe @F 4798 00008F1D 0407 add al, -('9'+1)+'A' 4799 @@: 4800 00008F1F AA stosb 4801 4802 00008F20 FF4EF6 dec word [bp + ?groupcounter] 4803 00008F23 7509 jnz @F 4804 00008F25 FF76F8 push word [bp + ?group] 4805 00008F28 8F46F6 pop word [bp + ?groupcounter] 4806 00008F2B B05F mov al, '_' 4807 00008F2D AA stosb 4808 @@: 4809 4810 00008F2E FF4EFA dec word [bp + ?minwidth] 4811 00008F31 79D0 jns .loop_write 4812 4813 00008F33 837EFE00 cmp word [bp + ?dividend + 2], 0 4814 00008F37 75CA jnz .loop_write 4815 00008F39 837EFC00 cmp word [bp + ?dividend], 0 4816 ; any more ? 4817 00008F3D 75C4 jnz .loop_write ; loop --> 4818 4819 00008F3F FC cld 4820 4821 00008F40 29FB sub bx, di 4822 00008F42 89D9 mov cx, bx 4823 00008F44 89FE mov si, di 4824 00008F46 46 inc si 4825 4826 00008F47 BF[0E08] mov di, line_out 4827 4828 00008F4A 803C5F cmp byte [si], '_' 4829 00008F4D 7502 jne @F 4830 00008F4F 46 inc si 4831 00008F50 49 dec cx 4832 ; never need to loop because next digit is always a digit 4833 4834 @@: 4835 00008F51 F3A4 rep movsb ; overlapping! 4836 4837 00008F53 89EC5D lleave 4838 00008F56 EB73 jmp short .putsline_crlf 4839 4840 4841 .normal: 4842 00008F58 AC lodsb 4843 00008F59 56 push si 4844 00008F5A 50 push ax 4845 00008F5B 800E[AC95]01 or byte [hhflag], 1 ; set flag so no operator means add 4846 00008F60 E86B00 call .compute 4847 00008F63 58 pop ax 4848 00008F64 5E pop si 4849 00008F65 E8A600 call .storeresult 4850 00008F68 F606[AC95]04 test byte [hhflag], 4 ; any two-fold operation ? 4851 00008F6D 741F jz .single ; no --> 4852 00008F6F 8A26[8100] mov ah, byte [options2 + 1] 4853 00008F73 80E410 and ah, opt2_hh_compat >> 8 4854 00008F76 E87100 call .store2 ; display "FFFFFFFF (-0001)" 4855 00008F79 50 push ax 4856 00008F7A B82020 mov ax, 32<<8|32 4857 00008F7D AB stosw 4858 00008F7E 58 pop ax 4859 00008F7F 50 push ax 4860 00008F80 800E[AC95]02 or byte [hhflag], 2 ; set flag so no operator means sub 4861 00008F85 E84600 call .compute 4862 00008F88 58 pop ax 4863 00008F89 E85E00 call .store2 ; display "FFFFFFFF (-0001)" 4864 00008F8C EB3D jmp short .putsline_crlf 4865 4866 .single: 4867 00008F8E B400 mov ah, 0 4868 00008F90 53 push bx 4869 00008F91 52 push dx 4870 00008F92 E85500 call .store2 4871 4872 00008F95 B82020 mov ax, (32 << 8) | 32 4873 00008F98 AB stosw 4874 00008F99 B86465 mov ax, "de" 4875 00008F9C AB stosw 4876 00008F9D B86369 mov ax, "ci" 4877 00008FA0 AB stosw 4878 00008FA1 B86D61 mov ax, "ma" 4879 00008FA4 AB stosw 4880 00008FA5 B86C3A mov ax, "l:" 4881 00008FA8 AB stosw 4882 00008FA9 B020 mov al, 32 4883 00008FAB AA stosb 4884 00008FAC 58 pop ax 4885 00008FAD 5A pop dx 4886 00008FAE E8E529 call decdword 4887 00008FB1 85D2 test dx, dx ; result negative ? 4888 00008FB3 7916 jns @F ; no --> 4889 00008FB5 50 push ax 4890 00008FB6 B82028 mov ax, " (" 4891 00008FB9 AB stosw 4892 00008FBA B02D mov al, "-" 4893 00008FBC AA stosb 4894 00008FBD 58 pop ax 4895 00008FBE F7DA neg dx 4896 00008FC0 F7D8 neg ax 4897 00008FC2 83DA00 sbb dx, byte 0 ; neg bx:dx 4898 00008FC5 E8CE29 call decdword 4899 00008FC8 B029 mov al, ")" 4900 00008FCA AA stosb 4901 @@: 4902 .putsline_crlf: 4903 00008FCB E9702A jmp putsline_crlf 4904 4905 4906 .compute: 4907 00008FCE E82E23 call getdword 4908 00008FD1 E84729 call chkeol ; expect end of line here 4909 .comp_ret: 4910 00008FD4 C3 retn 4911 4912 ; INP: bx:dx = result 4913 ; ah = flag, nonzero if to stay 86-DOS Debug compatible 4914 ; OUT: displayed 4915 ; CHG: di, bx, dx 4916 .store: 4917 00008FD5 50 push ax 4918 00008FD6 84E4 test ah, ah 4919 00008FD8 7509 jnz .store_nothigh 4920 00008FDA 85DB test bx, bx 4921 00008FDC 7405 jz .store_nothigh ; no need to display 32-bit value 4922 00008FDE 89D8 mov ax, bx 4923 00008FE0 E8232A call hexword 4924 .store_nothigh: 4925 00008FE3 89D0 mov ax, dx 4926 00008FE5 E81E2A call hexword 4927 00008FE8 58 pop ax 4928 00008FE9 C3 retn 4929 4930 .store2: 4931 00008FEA E8E8FF call .store 4932 00008FED 50 push ax 4933 00008FEE 84E4 test ah, ah 4934 00008FF0 751A jnz .store2_ret 4935 00008FF2 85DB test bx, bx ; result negative ? 4936 00008FF4 7916 jns .store2_ret ; no --> 4937 00008FF6 B82028 mov ax, " (" 4938 00008FF9 AB stosw 4939 00008FFA B02D mov al, "-" 4940 00008FFC AA stosb 4941 00008FFD F7DB neg bx 4942 00008FFF F7DA neg dx 4943 00009001 83DB00 sbb bx, byte 0 ; neg bx:dx 4944 00009004 58 pop ax 4945 00009005 50 push ax 4946 00009006 E8CCFF call .store 4947 00009009 B029 mov al, ")" 4948 0000900B AA stosb 4949 .store2_ret: 4950 0000900C 58 pop ax 4951 0000900D C3 retn 4952 4953 4954 .storeresult: 4955 0000900E 8916[0490] mov word [hhresult], dx 4956 00009012 891E[0690] mov word [hhresult + 2], bx 4957 00009016 C3 retn 4958 %else 4959 ; H command - hex addition and subtraction. 4960 hh: 4961 call getdword 4962 push bx 4963 push dx 4964 call skipcomm0 4965 call getdword 4966 call chkeol ; expect end of line here 4967 pop cx 4968 pop ax ; first value in AX:CX, second in BX:DX 4969 mov si, ax 4970 mov bp, cx ; first value in SI:BP now 4971 mov ax, cx 4972 add ax, dx 4973 push ax 4974 mov ax, si 4975 adc ax, bx 4976 jz .nothigh1 ; no need to display 32-bit value 4977 call hexword 4978 .nothigh1: 4979 pop ax 4980 call hexword 4981 mov ax, 2020h 4982 stosw 4983 mov ax, bp 4984 sub ax, dx 4985 push ax 4986 mov ax, si 4987 sbb ax, bx 4988 jz .nothigh2 ; no need to display 32-bit value 4989 or si, bx 4990 jz .nothigh2 ; both were zero, non-zero result only by carry --> 4991 call hexword 4992 .nothigh2: 4993 pop ax 4994 call hexword 4995 call putsline_crlf 4996 retn 4997 %endif 4998 4999 5000 usesection lDEBUG_DATA_ENTRY 5001 5002 align 4, db 0 5003 00009004 00000000 hhresult: dd 0 5004 5005 usesection lDEBUG_CODE 5006 5007 5008 ; O command - output to I/O port. 5009 oo: 5010 00009017 B44F mov ah, 'O' 5011 00009019 BB[2090] mov bx, .tab 5012 0000901C E95A01 jmp ii.common 5013 5014 5015 0000901F 00 align 2, db 0 5016 .tab: 5017 00009020 [2690][3090][3A90] dw .byte, .word, .dword 5018 5019 5020 .byte: 5021 00009026 E8CA27 call getbyte ; read value from command line 5022 00009029 E8EF28 call chkeol ; expect end of line here 5023 0000902C 92 xchg ax, dx ; al = value 5024 0000902D 5A pop dx ; recover port number 5025 0000902E EE out dx, al ; send 5026 0000902F C3 retn 5027 5028 .word: 5029 00009030 E8B227 call getword 5030 00009033 E8E528 call chkeol 5031 00009036 92 xchg ax, dx ; ax = value 5032 00009037 5A pop dx 5033 00009038 EF out dx, ax 5034 00009039 C3 retn 5035 5036 .dword: 5037 [cpu 386] 5038 0000903A E8C222 call getdword 5039 0000903D E8DB28 call chkeol ; expect end of line here 5040 00009040 53 push bx 5041 00009041 52 push dx 5042 00009042 6658 pop eax ; eax = value 5043 00009044 5A pop dx 5044 00009045 66EF out dx, eax 5045 00009047 C3 retn 5046 __CPU__ 5047 5048 5049 %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 5050 if_exists_check: 5051 00009048 16 push ss 5052 00009049 07 pop es 5053 0000904A 8B3E[080C] mov di, word [if_exists_si] 5054 0000904E 8B0E[0C0C] mov cx, word [if_exists_length] 5055 00009052 8B36[0A0C] mov si, word [if_exists_sp] 5056 00009056 F3A4 rep movsb 5057 00009058 8B0E[0C0C] mov cx, word [if_exists_length] 5058 0000905C 41 inc cx 5059 0000905D 80E1FE and cl, ~1 5060 5061 00009060 8B36[060C] mov si, word [if_exists_then_address] 5062 00009064 85F6 test si, si 5063 00009066 740A jz .error 5064 00009068 4E dec si 5065 00009069 BA[B164] mov dx, msg.then 5066 0000906C E83828 call isstring? 5067 0000906F 7501 jne .error 5068 00009071 C3 retn 5069 5070 .error: 5071 00009072 B80701 mov ax, 107h 5072 00009075 E8AD14 call setrc 5073 00009078 E96314 jmp error 5074 5075 if_exists_not_found: 5076 0000907B E8CAFF call if_exists_check 5077 0000907E F606[A400]40 testopt [internalflags3], dif3_if_not 5078 00009083 7512 jnz if_exists_condition_met 5079 if_exists_condition_not_met: 5080 00009085 E9786F jmp cmd3 5081 5082 if_exists_found_open: 5083 00009088 16 push ss 5084 00009089 07 pop es 5085 0000908A E8B133 call getline_close_file 5086 5087 if_exists_found_closed: 5088 0000908D E8B8FF call if_exists_check 5089 00009090 F606[A400]40 testopt [internalflags3], dif3_if_not 5090 00009095 75EE jnz if_exists_condition_not_met 5091 if_exists_condition_met: 5092 00009097 8B26[0A0C] mov sp, word [if_exists_sp] 5093 0000909B 01CC add sp, cx 5094 0000909D E8BB28 call skipwhite 5095 000090A0 5A pop dx ; discard near return address 5096 000090A1 8026[A700]E7 clropt [internalflags3], dif3_in_if | dif3_auxbuff_guarded_1 5097 000090A6 E99872 jmp cmd3_notblank 5098 %endif 5099 5100 5101 ; I command - input from I/O port. 5102 ; 5103 ; IF command -- conditional 5104 ii: 5105 000090A9 89F2 mov dx, si 5106 000090AB 50 push ax 5107 000090AC 8B44FE mov ax, [si - 2] 5108 000090AF 25DFDF and ax, TOUPPER_W 5109 000090B2 3D4946 cmp ax, "IF" 5110 000090B5 58 pop ax 5111 000090B6 7403E9B500 jne .not_if 5112 5113 000090BB E89D28 call skipwhite 5114 000090BE E80A19 call isoperator? 5115 000090C1 7514 jne .if 5116 000090C3 89CB mov bx, cx 5117 000090C5 01DB add bx, bx ; bh = 0 ! 5118 000090C7 50 push ax 5119 000090C8 FF97[B090] call near [operatordispatchers+bx] 5120 000090CC 58 pop ax 5121 000090CD 85DB test bx, bx 5122 000090CF 7403E99C00 jnz .not_if 5123 000090D4 E88428 call skipwhite 5124 .if: 5125 000090D7 8026[A400]BF clropt [internalflags3], dif3_if_not 5126 000090DC 4E dec si 5127 000090DD BA[B664] mov dx, msg.not 5128 000090E0 E8C427 call isstring? 5129 000090E3 AC lodsb 5130 000090E4 7508 jne @F 5131 000090E6 E87328 call skipwh0 5132 000090E9 800E[A400]40 setopt [internalflags3], dif3_if_not 5133 5134 @@: 5135 %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 5136 000090EE 4E dec si 5137 000090EF BA[7C6C] mov dx, msg.exists 5138 000090F2 E8B227 call isstring? 5139 000090F5 AC lodsb 5140 000090F6 754C jne .if_numeric 5141 000090F8 E86128 call skipwh0 5142 000090FB 4E dec si 5143 000090FC BA[836C] mov dx, msg.y 5144 000090FF E8A527 call isstring? 5145 00009102 7403E9D713 jne error 5146 00009107 E85128 call skipwhite 5147 5148 0000910A 4E dec si 5149 0000910B 8936[080C] mov word [if_exists_si], si 5150 0000910F 89F3 mov bx, si 5151 @@: 5152 00009111 AC lodsb 5153 00009112 E8F527 call iseol?.notsemicolon 5154 00009115 75FA jne @B 5155 00009117 89F1 mov cx, si ; -> after EOL byte 5156 00009119 29D9 sub cx, bx ; = length including EOL 5157 0000911B 890E[0C0C] mov word [if_exists_length], cx 5158 0000911F 41 inc cx ; round up 5159 00009120 80E1FE and cl, ~1 ; make even 5160 00009123 29CC sub sp, cx 5161 00009125 8926[0A0C] mov word [if_exists_sp], sp 5162 00009129 89E7 mov di, sp 5163 0000912B 89DE mov si, bx 5164 0000912D D1E9 shr cx, 1 5165 0000912F F3A5 rep movsw 5166 5167 00009131 89DE mov si, bx 5168 00009133 AC lodsb 5169 00009134 8326[060C]00 and word [if_exists_then_address], 0 5170 00009139 800E[A700]08 setopt [internalflags3], dif3_in_if 5171 0000913E E88D38 call yy 5172 00009141 E99A13 jmp error 5173 %endif 5174 5175 .if_numeric: 5176 00009144 E8B821 call getexpression 5177 00009147 E8C71B call toboolean 5178 0000914A 89D3 mov bx, dx 5179 0000914C BA[B164] mov dx, msg.then 5180 0000914F 4E dec si 5181 00009150 E85427 call isstring? 5182 00009153 7403E98613 jne error 5183 00009158 E80028 call skipwhite 5184 0000915B F606[A400]40 testopt [internalflags3], dif3_if_not 5185 00009160 7403 jz @F 5186 00009162 80F301 xor bl, 1 5187 @@: 5188 00009165 85DB test bx, bx 5189 00009167 7404 jz .if_false 5190 00009169 5B pop bx ; discard near return address to cmd3 5191 0000916A E9D471 jmp cmd3_notblank ; execute tail 5192 5193 .if_false: 5194 0000916D E91E3D jmp resetrc 5195 5196 .not_if: 5197 00009170 89D6 mov si, dx 5198 00009172 4E dec si 5199 00009173 AC lodsb 5200 5201 00009174 B449 mov ah, 'I' 5202 00009176 BB[AC91] mov bx, .tab 5203 5204 ; bx = jump table for byte, word, dword handler 5205 ; ah = letter of the command 5206 ; si, al etc. 5207 .common: 5208 00009179 50 push ax 5209 0000917A E892FA call uppercase 5210 0000917D 3C57 cmp al, 'W' 5211 0000917F 7507 jne .notw 5212 .incbx2: 5213 00009181 43 inc bx 5214 00009182 43 inc bx ; use word handler 5215 00009183 E8D527 call skipwhite ; skip the 'W' til next character 5216 00009186 EB12 jmp short .sizeset 5217 5218 .notw: 5219 00009188 3C44 cmp al, 'D' 5220 0000918A 750E jne .sizeset 5221 %if 1 5222 0000918C 3264FE xor ah, byte [si-2] 5223 0000918F 7405 jz .d ; "Id" or "Od" --> (uppercase command) 5224 00009191 80F420 xor ah, 32 5225 00009194 7504 jnz .sizeset ; no space is allowed between the command and 'D' --> 5226 ; "id" or "od" here (lowercase command) 5227 .d: 5228 %endif 5229 00009196 43 _386 inc bx 5230 00009197 43 _386 inc bx ; use dword handler 5231 00009198 EBE7 _386_jmps .incbx2 ; bx += 2 and skip the 'D' 5232 ; no 386 here. try with D as part of port number 5233 .sizeset: 5234 0000919A E84826 call getword ; get port 5235 0000919D 59 pop cx ; restore letter if necessary 5236 0000919E 80FD49 cmp ch, 'I' ; check whether I or O 5237 000091A1 7504 jne .o ; O --> 5238 000091A3 E87527 call chkeol ; expect end of line here for I commands 5239 000091A6 A8 db __TEST_IMM8 ; (skip push) 5240 .o: 5241 000091A7 52 push dx ; save port number for O commands 5242 000091A8 2EFF27 jmp near [cs:bx] 5243 5244 5245 000091AB 00 align 2, db 0 5246 .tab: 5247 000091AC [B291][B891][BF91] dw .byte, .word, .dword 5248 5249 .byte: 5250 000091B2 EC in al, dx 5251 000091B3 E85728 call hexbyte 5252 000091B6 EB04 jmp short .done 5253 5254 .word: 5255 000091B8 ED in ax, dx 5256 .doneword: 5257 000091B9 E84A28 call hexword 5258 .done: 5259 000091BC E97F28 jmp putsline_crlf 5260 5261 .dword: 5262 [cpu 386] 5263 000091BF 66ED in eax, dx 5264 000091C1 E83628 call hexword_high 5265 __CPU__ 5266 000091C4 EBF3 jmp short .doneword 5267 5268 5269 000091C6 E91513 errorj5:jmp error 5270 5271 5272 %if _PM 5273 ; OUT: NC 5274 ; ZR if in protected mode 5275 ; NZ otherwise 5276 ; STT: - 5277 ; ([internalflags] & nodosloaded, [internalflags] & protectedmode set up) 5278 ispm: 5279 000091C9 50 push ax 5280 %if protectedmode & ~0FF00h 5281 %error Internal flags re-ordered, adjust code here 5282 %endif 5283 000091CA 36A0[9D00] mov al, byte [ss:internalflags+1] ; get flag byte 5284 000091CE 2408 and al, protectedmode>>8 ; separate PM flag 5285 000091D0 3408 xor al, protectedmode>>8 ; ZR if in PM (NC) 5286 000091D2 58 pop ax 5287 000091D3 C3 retn 5288 %endif 5289 5290 5291 setpspdbg: 5292 000091D4 8CD3 mov bx, ss 5293 setpsp: 5294 %if _BOOTLDR 5295 000091D6 F606[9D00]40 testopt [internalflags], nodosloaded 5296 000091DB 753D jnz .ret ; no PSPs --> 5297 %endif 5298 000091DD B450 mov ah, 50h 5299 %if _PM && (_NOEXTENDER || _USESDA) 5300 000091DF E8E7FF call ispm 5301 %if _NOEXTENDER 5302 000091E2 751B jnz .rm 5303 subcpu 286 5304 000091E4 51 push cx 5305 000091E5 52 push dx 5306 000091E6 53 push bx 5307 000091E7 50 push ax 5308 000091E8 B80600 mov ax, 0006h 5309 000091EB CD31 int 31h 5310 000091ED 58 pop ax 5311 000091EE C1E10C shl cx, 12 5312 000091F1 C1EA04 shr dx, 4 5313 000091F4 09CA or dx, cx 5314 000091F6 89D3 mov bx, dx 5315 000091F8 E873CB call _doscall.pm ; insure non-extended 5316 000091FB 5B pop bx 5317 000091FC 5A pop dx 5318 000091FD 59 pop cx 5319 000091FE C3 retn 5320 subcpureset 5321 %else 5322 jz _int21 ; extended 5323 %endif 5324 %endif 5325 .rm: 5326 %if _USESDA 5327 000091FF 833E[DA0A]FF cmp word [pSDA+0], byte -1 5328 00009204 7503E98300 je _int21 5329 00009209 1E push ds 5330 0000920A 56 push si 5331 0000920B BE[DC0A] mov si, pSDA + so16aSegSel 5332 0000920E E8B814 call update_dosdata_segment 5333 00009211 C574FE lds si, [si - so16aSegSel] 5334 00009214 895C10 mov word [si+10h], bx 5335 00009217 5E pop si 5336 00009218 1F pop ds 5337 00009219 C3 retn 5338 %else 5339 jmp short _int21 5340 %endif 5341 %if _BOOTLDR 5342 .ret: 5343 getpsp.ret: 5344 0000921A C3 retn 5345 %endif 5346 5347 getpsp: 5348 %if _BOOTLDR 5349 0000921B 31DB xor bx, bx 5350 0000921D F606[9D00]40 testopt [internalflags], nodosloaded 5351 00009222 75F6 jnz .ret ; no PSPs --> 5352 %endif 5353 00009224 B451 mov ah, 51h 5354 %if _PM && (_NOEXTENDER || _USESDA) 5355 00009226 E8A0FF call ispm 5356 %if _NOEXTENDER 5357 00009229 750B jnz .rm 5358 0000922B E840CB call _doscall.pm ; insure non-extended 5359 0000922E B80200 mov ax, 2 5360 00009231 CD31 int 31h 5361 00009233 89C3 mov bx, ax 5362 00009235 C3 retn 5363 %else 5364 jz _int21 ; extended 5365 %endif 5366 %endif 5367 .rm: 5368 %if _USESDA 5369 00009236 833E[DA0A]FF cmp word [pSDA+0], byte -1 5370 0000923B 744F je _int21 5371 0000923D 1E push ds 5372 0000923E 56 push si 5373 0000923F BE[DC0A] mov si, pSDA + so16aSegSel 5374 00009242 E88414 call update_dosdata_segment 5375 00009245 C574FE lds si, [si - so16aSegSel] 5376 00009248 8B5C10 mov bx, word [si + 10h] 5377 0000924B 5E pop si 5378 0000924C 1F pop ds 5379 0000924D C3 retn 5380 %else 5381 jmp short _int21 5382 %endif 5383 5384 5385 _doscall_return_es: 5386 _doscall_return_es_parameter_es_ds: 5387 lframe near 5388 lpar word, es_ds_value 5389 lpar_return 5390 %if _PM 5391 lvar word, int_number 5392 0000924E 5589E550 lenter 5393 00009252 C746FE2100 mov word [bp + ?int_number], 21h 5394 00009257 9C pushf 5395 00009258 E86EFF call ispm 5396 0000925B 7518 jnz .rm 5397 .pm: 5398 0000925D 9D popf 5399 0000925E FF7604 push word [bp + ?es_ds_value] 5400 00009261 FF7604 push word [bp + ?es_ds_value] 5401 00009264 FF76FE push word [bp + ?int_number] 5402 00009267 FF7600 push word [bp + ?frame_bp] 5403 0000926A E83100 call intcall_return_parameter_es_parameter_ds 5404 0000926D 8F4604 pop word [bp + ?es_ds_value] ; discard returned ds 5405 00009270 8F4604 pop word [bp + ?es_ds_value] ; get es 5406 00009273 EB13 jmp .ret 5407 .rm: 5408 00009275 9D popf 5409 %else 5410 lenter 5411 %endif 5412 00009276 06 push es 5413 00009277 1E push ds 5414 00009278 FF7604 push word [bp + ?es_ds_value] 5415 0000927B 1F pop ds 5416 0000927C FF7604 push word [bp + ?es_ds_value] 5417 0000927F 07 pop es 5418 00009280 CD21 int 21h 5419 00009282 06 push es 5420 00009283 8F4604 pop word [bp + ?es_ds_value] 5421 00009286 1F pop ds 5422 00009287 07 pop es 5423 .ret: 5424 00009288 89EC5D lleave 5425 0000928B C3 lret 5426 5427 5428 ; Execute real Int21 instruction. If this is in PM it might get extended. 5429 _int21: 5430 %if _BOOTLDR 5431 0000928C 9C pushf 5432 0000928D F606[9D00]40 testopt [internalflags], nodosloaded 5433 00009292 7504 jnz .reterr ; no Int21 --> (throw?) 5434 00009294 9D popf 5435 %endif 5436 00009295 CD21 int 21h 5437 00009297 C3 retn 5438 %if _BOOTLDR 5439 .reterr: 5440 00009298 9D popf 5441 00009299 B80100 mov ax, 1 5442 0000929C F9 stc 5443 0000929D C3 retn 5444 %endif 5445 5446 5447 %if _PM 5448 intcall_return_parameter_es_parameter_ds: 5449 lframe near 5450 lpar word, es_value 5451 lpar word, ds_value 5452 lpar_return 5453 lpar word, int_number 5454 lpar word, bp_value 5455 lvar 32h, 86m_call_struc 5456 0000929E 5589E58D66CE lenter 5457 000092A4 06 push es 5458 000092A5 897ECE mov word [bp + ?86m_call_struc +00h], di ; edi 5459 000092A8 8976D2 mov word [bp + ?86m_call_struc +04h], si ; esi 5460 000092AB 895EDE mov word [bp + ?86m_call_struc +10h], bx ; ebx 5461 000092AE 8956E2 mov word [bp + ?86m_call_struc +14h], dx ; edx 5462 000092B1 894EE6 mov word [bp + ?86m_call_struc +18h], cx ; ecx 5463 000092B4 8946EA mov word [bp + ?86m_call_struc +1Ch], ax ; eax 5464 000092B7 8B4604 mov ax, word [bp + ?bp_value] 5465 000092BA 8946D6 mov word [bp + ?86m_call_struc +08h], ax ; bp 5466 000092BD B000 mov al, 0 ; (preserve flags!) 5467 000092BF 9F lahf 5468 000092C0 86C4 xchg al, ah 5469 000092C2 8946EE mov word [bp + ?86m_call_struc +20h], ax ; flags 5470 000092C5 31C0 xor ax, ax 5471 000092C7 8946DC mov word [bp + ?86m_call_struc +0Ch + 2], ax 5472 000092CA 8946DA mov word [bp + ?86m_call_struc +0Ch], ax 5473 000092CD 8946FC mov word [bp + ?86m_call_struc +2Eh], ax ; sp 5474 000092D0 8946FE mov word [bp + ?86m_call_struc +30h], ax ; ss 5475 000092D3 8B460A mov ax, word [bp + ?es_value] ; usually [pspdbg] 5476 000092D6 8946F0 mov word [bp + ?86m_call_struc +22h], ax ; es 5477 000092D9 8B4608 mov ax, word [bp + ?ds_value] ; usually [pspdbg] 5478 000092DC 8946F2 mov word [bp + ?86m_call_struc +24h], ax ; ds 5479 000092DF 16 push ss 5480 000092E0 07 pop es ; => stack 5481 000092E1 8D7ECE lea di, [bp + ?86m_call_struc] ; -> 86-Mode call structure 5482 000092E4 660FB7FF _386 movzx edi, di ; (previously checked b[dpmi32] here) 5483 000092E8 8B5E06 mov bx, word [bp + ?int_number] ; int# 5484 000092EB 31C9 xor cx, cx 5485 000092ED B80003 mov ax, 0300h 5486 000092F0 CD31 int 31h 5487 000092F2 8A66EE mov ah, byte [bp + ?86m_call_struc +20h] ; flags 5488 000092F5 9E sahf 5489 000092F6 8B7ECE mov di, word [bp + ?86m_call_struc +00h] ; edi 5490 000092F9 8B76D2 mov si, word [bp + ?86m_call_struc +04h] ; esi 5491 000092FC 8B5EDE mov bx, word [bp + ?86m_call_struc +10h] ; ebx 5492 000092FF 8B56E2 mov dx, word [bp + ?86m_call_struc +14h] ; edx 5493 00009302 8B4EE6 mov cx, word [bp + ?86m_call_struc +18h] ; ecx 5494 00009305 8B46EA mov ax, word [bp + ?86m_call_struc +1Ch] ; eax 5495 00009308 FF76F0 push word [bp + ?86m_call_struc +22h] ; return es value 5496 0000930B 8F460A pop word [bp + ?es_value] ; in the parameter 5497 0000930E FF76F2 push word [bp + ?86m_call_struc +24h] ; return ds value 5498 00009311 8F4608 pop word [bp + ?ds_value] ; in the parameter 5499 00009314 07 pop es 5500 00009315 89EC5D lleave 5501 00009318 C20400 lret 5502 5503 intcall: 5504 lframe near 5505 lpar word, es_ds_value 5506 lpar word, int_number 5507 0000931B 5589E5 lenter 5508 0000931E FF7606 push word [bp + ?es_ds_value] ; es 5509 00009321 FF7606 push word [bp + ?es_ds_value] ; ds 5510 00009324 FF7604 push word [bp + ?int_number] ; int number 5511 00009327 FF7600 push word [bp + ?frame_bp] ; bp 5512 0000932A E871FF call intcall_return_parameter_es_parameter_ds 5513 ; (discard returned parameters ?es_value, ?ds_value, done by lleave) 5514 0000932D 89EC5D lleave , forcerestoresp 5515 00009330 C20400 lret 5516 5517 5518 call_int2D: 5519 00009333 E893FE call ispm 5520 00009336 750B jnz short .rm 5521 subcpu 286 5522 00009338 36FF36[A60A] push word [ss:pspdbg] ; es ds value. generally unused 5523 0000933D 6A2D push 2Dh ; interrupt 2Dh 5524 0000933F E8D9FF call intcall ; call it 5525 00009342 C3 retn 5526 subcpureset 5527 .rm: 5528 00009343 CD2D int 2Dh ; directly call int 2Dh 5529 00009345 C3 retn 5530 5531 5532 ; Called in PM only, ds unknown. 5533 ; 5534 ; INP: - 5535 ; OUT: CY if no DOS extender available ("MS-DOS" on Int2F.168A) 5536 ; NC if DOS extender available 5537 ; CHG: - 5538 isextenderavailable: 5539 subcpu 286 5540 00009346 1E push ds 5541 00009347 06 push es 5542 00009348 60 pusha 5543 00009349 16 push ss 5544 0000934A 1F pop ds 5545 0000934B BE[C97C] mov si, msg.msdos 5546 0000934E 660FB7F6 _386 movzx esi, si 5547 00009352 B88A16 mov ax, 168Ah 5548 00009355 CD2F int 2Fh 5549 00009357 3C01 cmp al, 1 ; CY if al is zero 5550 00009359 F5 cmc ; NC if al is zero, CY else 5551 0000935A 61 popa 5552 0000935B 07 pop es 5553 0000935C 1F pop ds 5554 0000935D C3 retn 5555 subcpureset 5556 5557 nodosextinst: 5558 0000935E 16 push ss 5559 0000935F 1F pop ds 5560 00009360 BA[D97B] mov dx, nodosext 5561 00009363 E9562A jmp putsz 5562 %endif 5563 5564 5565 ; L command - read a program, or disk sectors, from disk. 5566 ll: 5567 %if _BOOTLDR 5568 00009366 F606[9D00]40 testopt [internalflags], nodosloaded 5569 0000936B 7406 jz @F 5570 0000936D BA[955F] mov dx, msg.nobootsupp 5571 00009370 E9492A jmp putsz 5572 @@: 5573 %endif 5574 5575 00009373 E8C513 call parselw ; parse L and W argument format 5576 00009376 7441 jz ll1 ; if request to read program 5577 %if _PM && _NOEXTENDER 5578 00009378 E84EFE call ispm 5579 0000937B 7505 jnz .rm 5580 0000937D E8C6FF call isextenderavailable 5581 00009380 72DC jc nodosextinst 5582 .rm: 5583 %endif 5584 00009382 36F606[9C00]06 testopt [ss:internalflags], newpacket| ntpacket 5585 00009388 7427 jz .oldint 5586 0000938A 88C2 mov dl, al ; zero-based drive 5587 0000938C BE0060 mov si, 6000h ; read, assume "file data" 5588 %if _VDD 5589 0000938F F606[9C00]04 testopt [internalflags], ntpacket 5590 00009394 750A jnz .vdd 5591 %endif 5592 00009396 FEC2 inc dl ; one-based drive 5593 00009398 B80573 mov ax, 7305h ; ds:(e)bx-> packet 5594 0000939B F9 stc 5595 0000939C CD21 int 21h ; use int 21h here, not doscall 5596 0000939E EB13 jmp short .done 5597 %if _VDD 5598 .vdd: 5599 000093A0 A1[B80A] mov ax, word [hVdd] 5600 000093A3 B90500 mov cx, 5 5601 %if _PM 5602 000093A6 020E[DA88] add cl, byte [dpmi32] 5603 %endif 5604 000093AA C4C4580290 DispatchCall 5605 000093AF EB02 jmp short .done 5606 %endif 5607 .oldint: 5608 000093B1 CD25 int 25h 5609 .done: 5610 000093B3 BA[A379] mov dx, reading 5611 000093B6 E9DF0D jmp ww1 5612 5613 ; For .COM or .EXE files, we can only load at cs:100. Check that first. 5614 ll1: 5615 000093B9 E8EE12 call InDos 5616 000093BC 7519 jnz not_while_indos 5617 000093BE E83A71 call guard_re 5618 000093C1 F606[DD0B]06 test byte [fileext], EXT_COM| EXT_EXE 5619 000093C6 7423 jz ll4 ; if not .COM or .EXE file 5620 000093C8 3B1E[900C] cmp bx, word [reg_cs] 5621 000093CC 7506 jne ll2 ; if segment is wrong 5622 000093CE 81FA0001 cmp dx, 100h 5623 000093D2 7417 je ll4 ; if address is OK (or not given) 5624 ll2: 5625 000093D4 E90711 jmp error ; can only load .COM or .EXE at cs:100 5626 5627 not_while_indos: 5628 000093D7 B80501 mov ax, 0105h 5629 000093DA E84811 call setrc 5630 000093DD BA[555D] mov dx, msg.not_while_indos 5631 000093E0 E9D329 jmp putsz_error 5632 5633 5634 ; load (any) file (if not .EXE or .COM, load at BX:DX) 5635 ll3: 5636 000093E3 803E[DD0B]00 cmp byte [fileext], 0 5637 000093E8 7501 jne ll4 5638 000093EA C3 retn 5639 5640 ; open file and get length 5641 ll4: 5642 000093EB 89DE mov si, bx ; save destination address, segment 5643 000093ED 89D7 mov di, dx ; and offset 5644 000093EF B8003D mov ax, 3D00h ; open file for reading 5645 000093F2 BA8000 mov dx, DTA 5646 doscall 2037 000093F5 E86FC9 <1> call _doscall 5647 000093F8 7303E9AB01 jc ll16 ; error 5648 000093FD 93 xchg ax, bx ; mov bx, ax 5649 000093FE B80242 mov ax, 4202h ; lseek 5650 00009401 31C9 xor cx, cx 5651 00009403 31D2 xor dx, dx 5652 00009405 CD21 int 21h 5653 5654 ; Split off file types 5655 ; At this point: 5656 ; bx file handle 5657 ; dx:ax file length 5658 ; si:di load address (CS:100h for .EXE or .COM) 5659 5660 00009407 F606[DD0B]06 test byte [fileext], EXT_COM | EXT_EXE 5661 0000940C 7403E97E00 jnz ll13 ; if .COM or .EXE file 5662 5663 %if _PM 5664 ;--- dont load a file in protected mode, 5665 ;--- the read loop makes some segment register arithmetic 5666 00009411 E8B5FD call ispm 5667 00009414 7508 jnz .rm 5668 00009416 BA[1A7C] mov dx, nopmsupp 5669 00009419 E8A029 call putsz 5670 0000941C EB6A jmp ll12 5671 .rm: 5672 %endif 5673 5674 ; Load it ourselves. 5675 ; For non-.com/.exe files, we just do a read, and set BX:CX to the 5676 ; number of bytes read. 5677 5678 0000941E E8E03F call ensuredebuggeeloaded ; make sure a debuggee is loaded 5679 00009421 8E06[A40A] mov es, word [pspdbe] 5680 5681 ; Check the size against available space. 5682 00009425 56 push si 5683 00009426 53 push bx 5684 5685 00009427 263B360200 cmp si, word [es:ALASAP] 5686 0000942C 9C pushf 5687 0000942D F7DE neg si 5688 0000942F 9D popf 5689 00009430 7305 jae ll6 ; if loading past end of mem, allow through ffff 5690 00009432 2603360200 add si, word [es:ALASAP] ; si = number of paragraphs available 5691 ll6: 5692 00009437 B90400 mov cx, 4 5693 0000943A 31DB xor bx, bx 5694 ll7: 5695 0000943C D1E6 shl si, 1 5696 0000943E D1D3 rcl bx, 1 5697 00009440 E2FA loop ll7 5698 00009442 29FE sub si, di 5699 00009444 19CB sbb bx, cx ; bx:si = number of words left 5700 00009446 7208 jb ll9 ; if already we're out of space 5701 00009448 39D3 cmp bx, dx 5702 0000944A 7502 jne ll8 5703 0000944C 39C6 cmp si, ax 5704 ll8: 5705 0000944E 730A jae ll10 ; if not out of space 5706 ll9: 5707 00009450 5B pop bx ; out of space 5708 00009451 5E pop si 5709 00009452 BA[FE7D] mov dx, doserr8 ; not enough memory 5710 00009455 E86429 call putsz ; print string 5711 00009458 EB2E jmp short ll12 5712 5713 ll10: 5714 0000945A 5B pop bx 5715 0000945B 5E pop si 5716 5717 ; Store length in registers 5718 5719 ; seems a bit unwise to modify registers if a debuggee is running 5720 ; but MS DEBUG does it as well 5721 5722 %if 0 5723 mov cx,[reg_cs] 5724 cmp cx,[pspdbe] 5725 jnz .noregmodify 5726 cmp word [reg_eip], 100h 5727 jnz .noregmodify 5728 %endif 5729 0000945C 8916[680C] mov word [reg_ebx], dx 5730 00009460 A3[6C0C] mov word [reg_ecx], ax 5731 .noregmodify: 5732 5733 ; Rewind the file 5734 00009463 B80042 mov ax, 4200h ; lseek 5735 00009466 31C9 xor cx, cx 5736 00009468 31D2 xor dx, dx 5737 0000946A CD21 int 21h 5738 5739 0000946C BA0F00 mov dx, 0Fh 5740 0000946F 21FA and dx, di 5741 00009471 B104 mov cl, 4 5742 00009473 D3EF shr di, cl 5743 00009475 01FE add si, di ; si:dx is the address to read to 5744 5745 ; Begin loop over chunks to read 5746 ll11: 5747 00009477 B43F mov ah, 3Fh ; read from file into DS:(E)DX 5748 00009479 B900FE mov cx, 0FE00h ; read up to this many bytes 5749 0000947C 8EDE mov ds, si 5750 0000947E CD21 int 21h 5751 5752 00009480 81C6E00F add si,0fe0h ;wont work in protected-mode! 5753 00009484 39C8 cmp ax,cx 5754 00009486 74EF je ll11 ;if end of file reached 5755 5756 ; Close the file and finish up. 5757 5758 ll12: 5759 00009488 B43E mov ah, 3Eh ; close file 5760 0000948A CD21 int 21h 5761 0000948C 16 push ss ; restore ds 5762 0000948D 1F pop ds 5763 0000948E C3 retn ; done 5764 5765 ll13: 5766 ; file is .EXE or .COM 5767 ; Close the file 5768 %if 0 5769 push ax 5770 mov ah, 3Eh ; close file 5771 int 21h 5772 pop bx ; dx:bx is the file length 5773 5774 ; adjust .exe size by 200h (who knows why) 5775 ; cm: this is wrong. It needs to be adjusted by the header size, 5776 ; which is stored (as number of paragraphs) in the .EXE header. 5777 ; The header size is often 200h, but not always. 5778 test byte [fileext], EXT_EXE 5779 jz ll14 ; if not .EXE 5780 sub bx, 200h 5781 sbb dx, 0 5782 %else 5783 0000948F 52 push dx 5784 00009490 50 push ax 5785 5786 00009491 B80042 mov ax, 4200h ; lseek set 5787 00009494 31C9 xor cx, cx 5788 00009496 31D2 xor dx, dx 5789 00009498 CD21 int 21h 5790 0000949A 16 push ss 5791 0000949B 1F pop ds 5792 5793 0000949C 89E5 mov bp, sp 5794 0000949E B91C00 mov cx, EXEHEADER_size 5795 000094A1 29CC sub sp, cx 5796 000094A3 89E2 mov dx, sp 5797 000094A5 89E6 mov si, sp 5798 000094A7 B43F mov ah, 3Fh 5799 000094A9 CD21 int 21h 5800 5801 000094AB 50 push ax 5802 000094AC B43E mov ah, 3Eh ; close file 5803 000094AE CD21 int 21h 5804 000094B0 58 pop ax 5805 5806 000094B1 39C8 cmp ax, cx 5807 000094B3 7524 jne .no_exe 5808 000094B5 813C4D5A cmp word [si + exeSignature], "MZ" 5809 000094B9 7406 je @F 5810 000094BB 813C5A4D cmp word [si + exeSignature], "ZM" 5811 000094BF 7518 jne .no_exe 5812 @@: 5813 5814 ; This possibly should honour the size of the image in pages 5815 ; as indicated by the header, instead of the file size. 5816 ; Oh well, for now we use the file size (on stack). 5817 000094C1 8B4408 mov ax, [si + exeHeaderSize] 5818 000094C4 31F6 xor si, si 5819 000094C6 B90400 mov cx, 4 5820 @@: 5821 000094C9 D1E0 shl ax, 1 5822 000094CB D1D6 rcl si, 1 5823 000094CD E2FA loop @B ; si:ax <<= 4 5824 5825 000094CF 89EC mov sp, bp 5826 000094D1 5B pop bx 5827 000094D2 5A pop dx 5828 5829 000094D3 29C3 sub bx, ax 5830 000094D5 19F2 sbb dx, si ; file size minus header size 5831 5832 000094D7 EB04 jmp @F 5833 5834 .no_exe: 5835 000094D9 89EC mov sp, bp 5836 000094DB 5B pop bx 5837 000094DC 5A pop dx ; full file size 5838 @@: 5839 %endif 5840 5841 ; Clear registers 5842 5843 ll14: 5844 000094DD 53 push bx 5845 000094DE 52 push dx 5846 ; mov word [reg_ebx], dx 5847 ; mov word [reg_ecx], bx 5848 5849 ;--- cancel current process (unless there is none) 5850 ;--- this will also put cpu back in real-mode!!! 5851 5852 000094DF E84E10 call terminate_attached_process 5853 000094E2 7503E9C400 jz ll_attached_unterminated 5854 5855 000094E7 BF[640C] mov di, regs 5856 000094EA B92000 mov cx, 16*2 ;(8 std, 6 seg, ip, fl) * 2 5857 000094ED 31C0 xor ax, ax 5858 000094EF F3AB rep stosw 5859 5860 000094F1 8F06[680C] pop word [reg_ebx] 5861 000094F5 8F06[6C0C] pop word [reg_ecx] 5862 5863 ; Fix up interrupt vectors in PSP 5864 000094F9 BE0E00 mov si, CCIV ; address of original INT 23 and 24 (in PSP) 5865 000094FC BF[A80A] mov di, run2324 5866 000094FF A5 movsw 5867 00009500 A5 movsw 5868 00009501 A5 movsw 5869 00009502 A5 movsw 5870 5871 ; Actual program loading. Use the DOS interrupt. 5872 00009503 B8014B mov ax, 4B01h ; load program 5873 00009506 BA8000 mov dx, DTA ; offset of file to load 5874 00009509 BB[4C0C] mov bx, execblk ; parameter block 5875 0000950C CD21 int 21h ; load it 5876 0000950E 7303E99500 jc ll16 ; if error 5877 00009513 89E0 mov ax, sp 5878 00009515 2B062E00 sub ax, [SPSAV] 5879 00009519 3D8000 cmp ax, 80h 5880 0000951C 7203 jb ll15 ; if in range 5881 0000951E B88000 mov ax, 80h 5882 ll15: 5883 00009521 A3[A20A] mov word [spadjust], ax 5884 00009524 C436[5A0C] les si, [execblk+14] 5885 00009528 26AD es lodsw ; recover ax 5886 0000952A A3[640C] mov word [reg_eax], ax 5887 0000952D 8936[740C] mov word [reg_esp], si 5888 00009531 8326[760C]00 and word [reg_esp + 2], 0 5889 00009536 8C06[8C0C] mov word [reg_ss], es 5890 0000953A C436[5E0C] les si, [execblk+18] 5891 0000953E 8936[9C0C] mov word [reg_eip], si 5892 00009542 8326[9E0C]00 and word [reg_eip + 2], 0 5893 00009547 8C06[900C] mov word [reg_cs], es 5894 0000954B C606[DC0B]00 mov byte [bInit],0 5895 00009550 16 push ss 5896 00009551 07 pop es 5897 00009552 E8CC3F call set_efl_to_fl 5898 00009555 E8C3FC call getpsp 5899 00009558 89D8 mov ax, bx 5900 0000955A A3[A40A] mov word [pspdbe], ax 5901 0000955D 8026[9E00]7F clropt [internalflags], attachedterm 5902 00009562 BF[840C] mov di, reg_ds 5903 00009565 AB stosw 5904 00009566 AF scasw 5905 00009567 AB stosw ; reg_es 5906 00009568 E869FC call setpspdbg 5907 5908 ; Finish up. Set termination address. 5909 0000956B B82225 mov ax, 2522h ; set interrupt vector 22h 5910 0000956E BA[D085] mov dx, int22 ; ds => lDEBUG_DATA_ENTRY 5911 00009571 CD21 int 21h 5912 00009573 8E1E[A40A] mov ds, word [pspdbe] 5913 00009577 89160A00 mov word [TPIV], dx 5914 0000957B 8C160C00 mov word [TPIV+2], ss ; => lDEBUG_DATA_ENTRY 5915 0000957F 16 push ss 5916 00009580 1F pop ds 5917 5918 ; Set up initial addresses for 'a', 'd', and 'u' commands. 5919 adusetup: 5920 00009581 A1[9C0C] mov ax, word [reg_eip] 5921 00009584 8B0E[9E0C] mov cx, word [reg_eip+2] 5922 00009588 8B1E[900C] mov bx, word [reg_cs] 5923 0000958C BA0900 mov dx, var_addr_entries.amount 5924 0000958F BF[000B] mov di, var_addr_entries 5925 5926 .loop: 5927 00009592 AB stosw ; IP 5928 %if saSegSel == 4 5929 00009593 890D mov word [di], cx 5930 00009595 AF scasw ; skip this word 5931 %endif 5932 00009596 93 xchg ax, bx 5933 00009597 AB stosw ; CS 5934 %if _PM 5935 %if SEGADR_size != 10 5936 %error Unexpected SEGADR size 5937 %endif 5938 00009598 E82EFC call ispm 5939 0000959B 7504 jnz .86m 5940 .pm: 5941 0000959D AF scasw ; skip saSegment 5942 0000959E AB stosw ; store saSelector 5943 0000959F EB02 jmp @F 5944 .86m: 5945 000095A1 AB stosw ; store saSegment 5946 000095A2 AF scasw ; skip saSelector 5947 @@: 5948 %else 5949 %if SEGADR_size == 10 5950 %error Unexpected SEGADR size 5951 %endif 5952 %endif 5953 000095A3 93 xchg ax, bx ; d_addr 5954 5955 000095A4 4A dec dx 5956 000095A5 75EB jnz .loop 5957 000095A7 C3 retn 5958 5959 ; Error messages. Print and quit. 5960 ll16: 5961 000095A8 E9E80C jmp ww15 ; print error message 5962 5963 ll_attached_unterminated: 5964 000095AB BA[CE6B] mov dx, msg.ll_unterm 5965 000095AE E90B28 jmp putsz 5966 5967 ; M command - move from place to place. 5968 ; 5969 ; first check if there is more than 1 argument 5970 ; 0 or 1 arguments are handled by the 'M [cpu]' code 5971 mm: 5972 %if 0 5973 push si 5974 call iseol? 5975 je mc ; no argument, CPU-related M command 5976 mov ah, byte [ si ] 5977 push ax 5978 and ax, ~(2020h) 5979 cmp ax, "NC" 5980 pop ax 5981 je mc 5982 call getdword 5983 call iseol? 5984 je mc ; one argument, CPU-related 5985 cmp al, 32 5986 je .blank ; end of first argument 5987 cmp al, 9 5988 jne .nonblank ; not end of first argument 5989 .blank: 5990 %else 5991 000095B1 56 push si 5992 000095B2 E85123 call iseol? 5993 000095B5 7503E9CF00 je mc ; no argument, CPU-related M command 5994 .nonblank: 5995 000095BA AC lodsb ; is a non-space and non-CR ? 5996 000095BB E84823 call iseol? 5997 000095BE 7503E9C600 je mc ; one argument, CPU-related 5998 000095C3 3C20 cmp al, 32 5999 000095C5 7404 je .blank ; end of first argument 6000 000095C7 3C09 cmp al, 9 6001 000095C9 75EF jne .nonblank ; not end of first argument 6002 .blank: 6003 %endif 6004 000095CB E88E23 call skipwh0 ; skip blanks behind argument 6005 000095CE E83523 call iseol? 6006 000095D1 7503E9B300 je mc ; one argument, CPU-related 6007 000095D6 5E pop si 6008 000095D7 4E dec si 6009 000095D8 AC lodsb 6010 ; It is a normal M command (Move) 6011 000095D9 E82111 call parsecm ; parse arguments (DS:ESI, ES:EDI, ECX) 6012 000095DC 51 push cx 6013 %if _PM 6014 000095DD E8E9FB call ispm 6015 000095E0 7543 jnz .rm 6016 000095E2 8CD8 mov ax, ds 6017 000095E4 8CC1 mov cx, es 6018 000095E6 39C8 cmp ax, cx 6019 000095E8 7470 je .pmsimple ; same selector, simple --> 6020 6021 000095EA B80600 mov ax, 0006h 6022 000095ED 8CDB mov bx, ds 6023 000095EF CD31 int 31h ; get selector's base 6024 000095F1 7303E9E80E jc error 6025 000095F6 51 push cx 6026 000095F7 52 push dx 6027 000095F8 B80600 mov ax, 0006h 6028 000095FB 8CC3 mov bx, es 6029 000095FD CD31 int 31h ; get selector's base 6030 000095FF 7303E9DA0E jc error ; throw 6031 00009604 36803E[DC88]00 cmp byte [ss:bAddr32], 0 6032 0000960A 7430 je .pm16 6033 [cpu 386] 6034 0000960C 6658 pop eax 6035 0000960E 51 push cx 6036 0000960F 52 push dx 6037 00009610 665A pop edx ; mov edx, cxdx 6038 00009612 6601F0 add eax, esi ; add offset to source selector's base 6039 00009615 0F82C50E jc error 6040 00009619 6601FA add edx, edi ; add offset to destination selector's base 6041 0000961C 0F82BE0E jc error ; if overflow (> 4 GiB) --> 6042 00009620 6639D0 cmp eax, edx ; compare linear source to linear destination 6043 00009623 EB38 jmp short m3 ; and decide whether to move up or down --> 6044 __CPU__ 6045 6046 .rm: 6047 00009625 8CD8 mov ax, ds 6048 00009627 8CDB mov bx, ds 6049 00009629 8CC2 mov dx, es 6050 0000962B B10C mov cl, 12 6051 0000962D D3EB shr bx, cl 6052 0000962F D3EA shr dx, cl 6053 00009631 52 push dx 6054 00009632 8CC2 mov dx, es 6055 00009634 B104 mov cl, 4 6056 00009636 D3E0 shl ax, cl 6057 00009638 D3E2 shl dx, cl 6058 0000963A 59 pop cx 6059 0000963B A9 db __TEST_IMM16 ; (skip 2 pop instructions) 6060 6061 .pm16: 6062 0000963C 58 pop ax 6063 0000963D 5B pop bx 6064 0000963E 01F0 add ax, si 6065 00009640 83D300 adc bx, byte 0 ; add offset to source selector's base 6066 00009643 7303E9960E jc error 6067 00009648 01FA add dx, di 6068 0000964A 83D100 adc cx, byte 0 ; add offset to destination selector's base 6069 0000964D 7303E98C0E jc error ; if overflow (> 4 GiB) --> 6070 00009652 39CB cmp bx, cx ; compare linear source to linear destination 6071 00009654 7507 jne m3 6072 00009656 39D0 cmp ax, dx 6073 00009658 EB03 jmp short m3 ; and decide whether to move up or down --> 6074 6075 .pmsimple: 6076 0000965A 66 _386_o32 ; cmp esi, edi 6077 0000965B 39FE cmp si, di 6078 %else 6079 mov dx, di 6080 mov bx, es 6081 mov cl, 4 6082 shr dx, cl 6083 add dx, bx ; upper 16 bits of destination 6084 mov ax, si 6085 shr ax, cl 6086 mov bx, ds 6087 add ax, bx 6088 cmp ax, dx 6089 jne m3 ; if we know which is larger 6090 mov ax, si 6091 and al, 0Fh 6092 mov bx, di 6093 and bl, 0Fh 6094 cmp al, bl 6095 %endif 6096 0000965D 59 m3: pop cx 6097 0000965E 9F lahf 6098 0000965F 1E push ds 6099 00009660 06 push es 6100 00009661 16 push ss ; ds := cs 6101 00009662 1F pop ds 6102 00009663 E8E50F call dohack ; do the interrupt pointer hack 6103 00009666 07 pop es 6104 00009667 1F pop ds 6105 00009668 9E sahf 6106 00009669 7315 jae .forward ; if forward copy is OK 6107 0000966B 66 _386_PM_o32 6108 0000966C 01CE add si, cx 6109 0000966E 66 _386_PM_o32 6110 0000966F 01CF add di, cx ; point both behind data 6111 00009671 FD std ; _AMD_ERRATUM_109_WORKAROUND as below 6112 6113 6114 numdef AMD_ERRATUM_109_WORKAROUND, 1 6115 ; Refer to comment in init.asm init_movp. 6116 6117 %if _AMD_ERRATUM_109_WORKAROUND 6118 00009672 67 _386_PM_a32 6119 00009673 E30B jcxz @FF 6120 00009675 66 _386_PM_o32 6121 00009676 83F914 cmp cx, strict byte 20 6122 00009679 7705 ja @FF 6123 @@: 6124 0000967B 67 _386_PM_a32 6125 0000967C A4 movsb 6126 0000967D 67 _386_PM_a32 6127 0000967E E2FB loop @B 6128 @@: 6129 %endif 6130 .forward: 6131 00009680 67 _386_PM_a32 6132 00009681 F3A4 rep movsb ; do the move 6133 00009683 67 _386_PM_a32 6134 00009684 A4 movsb ; one more byte (length of zero means 64 KiB. or 4 GiB..) 6135 .was32: 6136 00009685 FC cld ; restore flag 6137 00009686 E9D7F5 jmp ee0a ; restore segments and undo the interrupt pointer hack 6138 6139 6140 ; Other M command: set machine type. 6141 mc: 6142 00009689 5E pop si 6143 0000968A 4E dec si 6144 0000968B AC lodsb 6145 0000968C E87722 call iseol? 6146 0000968F 7456 je m10 ; if just an 'm' (query machine type) 6147 00009691 3C3F cmp al, '?' 6148 00009693 7452 je m10 ; if '?' (also query) 6149 00009695 3C30 cmp al, '0' 6150 00009697 720D jb mc1 ; if not a digit 6151 00009699 3C36 cmp al, '6' 6152 0000969B 7709 ja mc1 ; ditto 6153 0000969D 2C30 sub al, '0' 6154 0000969F A2[E20A] mov byte [machine], al ; set machine type 6155 000096A2 A2[E40A] mov byte [mach_87], al ; coprocessor type, too 6156 000096A5 C3 retn 6157 6158 000096A6 0C20 mc1: or al, TOLOWER 6159 000096A8 3C63 cmp al, 'c' 6160 000096AA 7415 je mcc ; if coprocessor declaration 6161 000096AC 3C6E cmp al, 'n' 6162 000096AE 756A jne short errorj3 ; if something else 6163 000096B0 AC lodsb 6164 000096B1 0C20 or al, TOLOWER 6165 000096B3 3C63 cmp al, 'c' 6166 000096B5 7563 jne short errorj3 ; if not 'c' after that 6167 000096B7 AC lodsb 6168 000096B8 E86022 call chkeol 6169 000096BB C606[E30A]00 mov byte [has_87], 0 ; clear coprocessor flag 6170 000096C0 C3 retn ; done 6171 6172 mcc: 6173 000096C1 E89722 call skipwhite ; get next nonblank character 6174 000096C4 8A26[E20A] mov ah, byte [machine] 6175 000096C8 80FC03 cmp ah, 3 6176 000096CB 750D jne mcc2 ; if not a 386 6177 000096CD 3C33 cmp al, '3' 6178 000096CF 7406 je mcc1 ; if declaring a 387 6179 000096D1 3C32 cmp al, '2' 6180 000096D3 7505 jne mcc2 ; if not '2' 6181 000096D5 B402 mov ah, 2 6182 mcc1: 6183 000096D7 E88122 call skipwhite 6184 mcc2: 6185 000096DA E83E22 call chkeol 6186 000096DD C606[E30A]01 mov byte [has_87], 1 ; set coprocessor flag 6187 000096E2 8826[E40A] mov byte [mach_87], ah ; set copr. type 6188 000096E6 C3 retn 6189 6190 ; Display machine type. 6191 m10: 6192 000096E7 BE[BB79] mov si, msg8088 6193 000096EA A0[E20A] mov al, byte [machine] 6194 000096ED 3C00 cmp al, 0 6195 000096EF 7407 je .88or86 ; if 8088 6196 000096F1 BE[C379] mov si, msgx86 6197 000096F4 0430 add al, '0' 6198 000096F6 8804 mov byte [si], al 6199 .88or86: 6200 000096F8 E86C22 call showstring 6201 000096FB BE[C779] mov si, no_copr 6202 000096FE 803E[E30A]00 cmp byte [has_87], 0 6203 00009703 740F je m12 ; if no coprocessor 6204 00009705 BE[DC79] mov si, has_copr 6205 00009708 A0[E40A] mov al, byte [mach_87] 6206 0000970B 3A06[E20A] cmp al, byte [machine] 6207 0000970F 7403 je m12 ; if has coprocessor same as processor 6208 00009711 BE[EE79] mov si, has_287 6209 m12: 6210 00009714 E85022 call showstring ; show string 6211 00009717 E92423 jmp putsline_crlf ; call puts and quit 6212 6213 errorj3: 6214 0000971A E9C10D jmp error 6215 6216 6217 ; N command - change the name of the program being debugged. 6218 nn: 6219 0000971D 16 push ss 6220 0000971E 07 pop es 6221 %if _BOOTLDR 6222 0000971F 36F606[9D00]40 testopt [ss:internalflags], nodosloaded 6223 00009725 7406 jz @F 6224 00009727 BA[955F] mov dx, msg.nobootsupp 6225 0000972A E98F26 jmp putsz 6226 @@: 6227 %endif 6228 0000972D BF8000 mov di, DTA ; destination address 6229 6230 ; Copy and canonicalize file name. 6231 nn1: 6232 00009730 81FF[4A00] cmp di, N_BUFFER_END 6233 00009734 7313 jae .toolong 6234 00009736 E83D01 call ifsep ; check for separators CR, blank, tab, comma, ;, = 6235 00009739 7428 je nn3 ; if end of file name 6236 0000973B 363A06[E90A] cmp al, byte [ss:swch1] 6237 ; The use of ss here appears to be intended to 6238 ; allow loading from ds different from the 6239 ; data entry and PSP segment, However, the 6240 ; subsequent copy of the command tail around 6241 ; nn4 does not participate in this scheme. 6242 ; So if this is used make sure to adjust that. 6243 00009740 7421 je nn3 ; if '/' (and '/' is the switch character) 6244 00009742 E8CAF4 call uppercase 6245 00009745 AA stosb 6246 00009746 AC lodsb 6247 00009747 EBE7 jmp short nn1 ; back for more 6248 6249 .toolong: 6250 nn4.toolong: 6251 00009749 16 push ss 6252 0000974A 1F pop ds 6253 0000974B BA[3365] mov dx, msg.n_toolongname 6254 0000974E E86B26 call putsz 6255 00009751 BF[4700] mov di, N_BUFFER_END - 3 6256 00009754 B000 mov al, 0 ; truncate the name 6257 00009756 AA stosb 6258 00009757 A2[DD0B] mov byte [fileext], al ; invalid / none 6259 0000975A 893E[4E0C] mov word [execblk+2], di 6260 0000975E B8000D mov ax, 13 << 8 ; 0 in low byte (tail length), CR in high byte 6261 00009761 AB stosw 6262 00009762 C3 retn 6263 6264 6265 nn3: 6266 00009763 16 push ss 6267 00009764 1F pop ds 6268 00009765 B000 mov al, 0 ; null terminate the file name string 6269 00009767 AA stosb 6270 00009768 893E[4E0C] mov word [execblk+2], di; save start of command tail 6271 6272 %if _DEBUG4 6273 push dx 6274 mov dx, DTA 6275 call d4disp_msg 6276 mov dx, crlf 6277 call d4disp_msg 6278 pop dx 6279 %endif 6280 ; Determine file extension 6281 0000976C 81FF8100 cmp di, DTA+1 6282 00009770 7438 je nn3d ; if no file name at all 6283 00009772 81FF8500 cmp di, DTA+5 6284 00009776 7230 jb nn3c ; if no extension (name too short) 6285 00009778 B008 mov al, EXT_HEX 6286 0000977A 817DFB2E48 cmp word [di-5], ".H" 6287 0000977F 7507 jne nn3a ; if not .HEX 6288 00009781 817DFD4558 cmp word [di-3], "EX" 6289 00009786 7422 je nn3d ; if .HEX 6290 nn3a: 6291 00009788 B004 mov al, EXT_EXE 6292 0000978A 817DFB2E45 cmp word [di-5], ".E" 6293 0000978F 7507 jne nn3b ; if not .EXE 6294 00009791 817DFD5845 cmp word [di-3], "XE" 6295 00009796 7412 je nn3d ; if .EXE 6296 nn3b: 6297 00009798 B002 mov al, EXT_COM 6298 0000979A 817DFB2E43 cmp word [di-5], ".C" 6299 0000979F 7507 jne nn3c ; if not .COM 6300 000097A1 817DFD4F4D cmp word [di-3], "OM" 6301 000097A6 7402 je nn3d ; if .COM 6302 nn3c: 6303 000097A8 B001 mov al, EXT_OTHER 6304 nn3d: 6305 000097AA A2[DD0B] mov byte [fileext], al 6306 6307 ; Finish the N command 6308 000097AD 57 push di 6309 000097AE BF[0E08] mov di, line_out 6310 000097B1 4E dec si 6311 nn4: 6312 000097B2 AC lodsb ; copy the remainder to line_out 6313 000097B3 AA stosb 6314 000097B4 E85321 call iseol?.notsemicolon 6315 000097B7 75F9 jne nn4 6316 6317 000097B9 E8EE0E call InDos 6318 000097BC 7407 jz .fcb_setup 6319 000097BE 8326[640C]00 and word [reg_eax], 0 6320 000097C3 EB15 jmp .fcb_none 6321 6322 .fcb_setup: 6323 ; Set up FCBs. 6324 000097C5 BE[0E08] mov si, line_out 6325 000097C8 BF5C00 mov di, 5Ch 6326 000097CB E85100 call nn6 ; do first FCB 6327 000097CE A2[640C] mov byte [reg_eax], al 6328 000097D1 BF6C00 mov di, 6Ch 6329 000097D4 E84800 call nn6 ; second FCB 6330 000097D7 A2[650C] mov byte [reg_eax+1], al 6331 .fcb_none: 6332 6333 ; Copy command tail. 6334 000097DA BE[0E08] mov si, line_out 6335 000097DD 5F pop di 6336 000097DE 81FF[4800] cmp di, N_BUFFER_END - 2 6337 000097E2 7203E962FF jae .toolong 6338 000097E7 57 push di 6339 000097E8 47 inc di 6340 nn5: 6341 000097E9 AC lodsb 6342 000097EA AA stosb 6343 000097EB 81FF[4A00] cmp di, N_BUFFER_END 6344 000097EF 731F jae .toolong 6345 000097F1 E81621 call iseol?.notsemicolon 6346 000097F4 75F3 jne nn5 ; if not end of string 6347 ; test al, al 6348 ; jnz @B 6349 000097F6 C645FF0D mov byte [di - 1], 13 ; (just overwrite this unconditionally) 6350 ; @@: ; jump destination from above if al == 13 6351 @@: ; jump destination from .toolong 6352 000097FA 57 push di 6353 000097FB 89F9 mov cx, di 6354 000097FD 81E9[4A00] sub cx, N_BUFFER_END 6355 00009801 F7D9 neg cx 6356 00009803 31C0 xor ax, ax 6357 00009805 F3AA rep stosb 6358 00009807 5F pop di 6359 00009808 58 pop ax ; recover old DI 6360 00009809 97 xchg ax, di 6361 0000980A 29F8 sub ax, di ; compute length of tail 6362 0000980C 48 dec ax 6363 0000980D 48 dec ax 6364 0000980E AA stosb 6365 %if _DEBUG4 6366 mov dx, DTA 6367 call d4disp_msg 6368 mov dx, crlf 6369 call d4disp_msg 6370 %endif 6371 0000980F C3 retn ; done 6372 6373 .toolong: 6374 00009810 BA[1865] mov dx, msg.n_toolongtail 6375 00009813 E8A625 call putsz 6376 00009816 BF[4A00] mov di, N_BUFFER_END 6377 00009819 C645FF0D mov byte [di - 1], 13 6378 0000981D EBDB jmp @B 6379 6380 6381 ; Subroutine to process an FCB. 6382 ; 6383 ; INP: di -> FCB 6384 ; si -> input 6385 nn6: 6386 0000981F AC lodsb 6387 00009820 E8E720 call iseol?.notsemicolon 6388 00009823 740B je nn7 ; if end 6389 00009825 E84E00 call ifsep 6390 00009828 74F5 je nn6 ; if separator (other than CR) 6391 0000982A 3A06[E80A] cmp al, byte [switchar] 6392 0000982E 741C je nn10 ; if switch character 6393 nn7: 6394 00009830 4E dec si 6395 00009831 B80129 mov ax, 2901h ; parse filename 6396 doscall 2037 00009834 E830C5 <1> call _doscall 6397 00009837 50 push ax ; save AL 6398 nn8: 6399 00009838 AC lodsb ; skip till separator 6400 00009839 E83A00 call ifsep 6401 0000983C 7406 je nn9 ; if separator character (including CR) 6402 0000983E 3A06[E90A] cmp al, byte [swch1] 6403 00009842 75F4 jne nn8 ; if not switchar (sort of) 6404 nn9: 6405 00009844 4E dec si 6406 00009845 58 pop ax ; recover AL 6407 00009846 3C01 cmp al, 1 6408 00009848 7501 jne nn9a ; if not 1 6409 0000984A 48 dec ax 6410 nn9a: 6411 0000984B C3 retn 6412 6413 ; Handle a switch (differently). 6414 0000984C AC nn10: lodsb 6415 0000984D E8BA20 call iseol?.notsemicolon 6416 00009850 74DE je nn7 ; if end of string 6417 00009852 E82100 call ifsep 6418 00009855 74F5 je nn10 ; if another separator (other than CR) 6419 00009857 B000 mov al, 0 6420 00009859 AA stosb 6421 0000985A 4E dec si 6422 0000985B AC lodsb 6423 0000985C 3C61 cmp al, 'a' 6424 0000985E 7206 jb nn11 ; if not a lower case letter 6425 00009860 3C7A cmp al, 'z' 6426 00009862 7702 ja nn11 6427 00009864 24DF and al, TOUPPER ; convert to upper case 6428 00009866 AA nn11: stosb 6429 00009867 B82020 mov ax, 32<<8|32 6430 0000986A AB stosw 6431 0000986B AB stosw 6432 0000986C AB stosw 6433 0000986D AB stosw 6434 0000986E AB stosw 6435 0000986F 31C0 xor ax, ax 6436 00009871 AB stosw 6437 00009872 AB stosw 6438 00009873 AB stosw 6439 00009874 AB stosw 6440 00009875 C3 retn ; return with al = 0 6441 6442 6443 ; Compare character with separators 6444 ; 6445 ; INP: al = character 6446 ; OUT: ZR if al is CR, NUL, blank, tab, comma, semicolon, or equal sign 6447 ; NZ else 6448 ; REM: This is only used for parsing FCBs. 6449 ifsep: 6450 00009876 E88D20 call iseol? ; semicolon or CR or NUL 6451 00009879 740E je .return 6452 0000987B 3C20 cmp al, 32 6453 0000987D 740A je .return 6454 0000987F 3C09 cmp al, 9 6455 00009881 7406 je .return 6456 00009883 3C2C cmp al, ',' 6457 00009885 7402 je .return 6458 00009887 3C3D cmp al, '=' 6459 .return: 6460 00009889 C3 retn 6461 6462 6463 ; Ensure segment in bx is writeable 6464 ; 6465 ; INP: bx = selector/segment 6466 ; OUT: NC if in 86M, bx unchanged 6467 ; NC if in PM and bx not a code segment, bx unchanged 6468 ; NC if in PM and was a code segment, 6469 ; bx = word [scratchsel], set up to mirror INP:bx selector 6470 ; CY if in PM and a failure occurred, segment not writeable 6471 ; CHG: bx 6472 ; STT: (if in PM) es = ss = debugger data selector 6473 %if _PM 6474 verifysegm: 6475 0000988A E83CF9 call ispm 6476 0000988D 7533 jnz .rm ; (NC) 6477 0000988F 50 push ax 6478 00009890 66 _386_o32 ; push edi 6479 00009891 57 push di 6480 00009892 55 push bp 6481 00009893 89E5 mov bp, sp 6482 00009895 83EC08 sub sp, 8 6483 00009898 89E7 mov di, sp 6484 0000989A 660FB7FF _386 movzx edi, di 6485 0000989E B80B00 mov ax, 000Bh ; get descriptor 6486 000098A1 CD31 int 31h 6487 000098A3 7217 jc @F 6488 000098A5 F6450508 test byte [di+5], 8 ; code segment ? 6489 000098A9 7411 jz @F ; (NC) no --> 6490 000098AB 806505F3 and byte [di+5], 0F3h ; reset CODE+conforming attr 6491 000098AF 804D0502 or byte [di+5], 2 ; set writable 6492 000098B3 8B1E[D888] mov bx, word [scratchsel] 6493 000098B7 B80C00 mov ax, 000Ch 6494 000098BA CD31 int 31h 6495 @@: 6496 000098BC 89EC mov sp, bp 6497 000098BE 5D pop bp 6498 000098BF 66 _386_o32 ; pop edi 6499 000098C0 5F pop di 6500 000098C1 58 pop ax 6501 .rm: 6502 000098C2 C3 retn 6503 6504 subcpu 286 6505 ; INP: dx = 86 Mode segment to access 6506 ; OUT: bx = scratch selector, addressing that segment 6507 ; CHG: - 6508 ; STT: ss = lDEBUG_DATA_ENTRY selector, in PM 6509 setrmsegm: 6510 000098C3 368B1E[D888] mov bx, word [ss:scratchsel] 6511 setrmaddr: ;<--- set selector in BX to segment address in DX 6512 .: 6513 000098C8 52 push dx 6514 000098C9 50 push ax 6515 000098CA 51 push cx 6516 000098CB 89D1 mov cx, dx 6517 000098CD C1E204 shl dx, 4 6518 000098D0 C1E90C shr cx, 12 6519 000098D3 B80700 mov ax, 7 6520 000098D6 CD31 int 31h 6521 000098D8 59 pop cx 6522 000098D9 58 pop ax 6523 000098DA 5A pop dx 6524 000098DB C3 retn 6525 6526 subcpureset 6527 %endif 6528 6529 ; Read a byte relative to cs:eip 6530 ; 6531 ; INP: reg_cs, reg_eip 6532 ; cx = (signed) eip adjustment 6533 ; OUT: al = byte at that address 6534 ; (e)bx = new offset (eip+adjustment) 6535 ; CHG: - 6536 getcseipbyte: 6537 000098DC 06 push es 6538 %if _PM 6539 000098DD 8B1E[900C] mov bx, word [reg_cs] 6540 000098E1 8EC3 mov es, bx 6541 000098E3 E84EC4 call test_d_b_bit 6542 000098E6 7416 jz .16 6543 [cpu 386] 6544 000098E8 668B1E[9C0C] mov ebx, dword [reg_eip] 6545 000098ED 6652 push edx 6546 000098EF 660FBFD1 movsx edx, cx 6547 000098F3 6601D3 add ebx, edx 6548 000098F6 26678A03 mov al, byte [es:ebx] 6549 000098FA 665A pop edx 6550 000098FC 07 pop es 6551 000098FD C3 retn 6552 __CPU__ 6553 .16: 6554 %else 6555 mov es, word [reg_cs] 6556 %endif 6557 000098FE 8B1E[9C0C] mov bx, word [reg_eip] 6558 00009902 01CB add bx, cx 6559 00009904 268A07 mov al, byte [es:bx] 6560 00009907 07 pop es 6561 00009908 C3 retn 6562 6563 ; Write to a byte relative to cs:eip 6564 ; 6565 ; INP: reg_cs, reg_eip 6566 ; cx = (signed) eip adjustment 6567 ; OUT: al = byte at that address 6568 ; CHG: (e)bx 6569 setcseipbyte: 6570 00009909 06 push es 6571 %if _PM 6572 0000990A 8B1E[900C] mov bx, word [reg_cs] 6573 0000990E E879FF call verifysegm 6574 00009911 7224 jc .ret 6575 00009913 8EC3 mov es, bx 6576 00009915 E81CC4 call test_d_b_bit 6577 00009918 7414 jz .16 6578 [cpu 386] 6579 0000991A 668B1E[9C0C] mov ebx, dword [reg_eip] 6580 0000991F 6652 push edx 6581 00009921 660FBFD1 movsx edx, cx 6582 00009925 2667880413 mov byte [es:ebx+edx],al 6583 0000992A 665A pop edx 6584 0000992C 07 pop es 6585 0000992D C3 retn 6586 __CPU__ 6587 .16: 6588 %else 6589 mov es, word [reg_cs] 6590 %endif 6591 0000992E 8B1E[9C0C] mov bx, word [reg_eip] 6592 00009932 01CB add bx, cx 6593 00009934 268807 mov byte [es:bx], al 6594 .ret: 6595 00009937 07 pop es 6596 00009938 C3 retn 6597 6598 ; Exchange byte with memory 6599 ; 6600 ; INP: bx:(e)dx-> destination byte 6601 ; al = source byte 6602 ; OUT: CY if failed due to segment not writable 6603 ; NC if successful, 6604 ; al = previous value of destination byte 6605 ; CHG: ah 6606 writemem: 6607 %if _DEBUG1 6608 push dx 6609 push ax 6610 6611 call getlinear.do_not_use_test 6612 jc @F ; already an error ? then return --> (CY) 6613 push bx 6614 push cx 6615 mov bx, test_records_Writemem 6616 call handle_test_case_multiple_16 6617 ; check whether this should testcase the error 6618 ; CY to indicate error from this call 6619 pop cx 6620 pop bx 6621 @@: 6622 pop ax 6623 pop dx 6624 jnc .do_not_use_test 6625 retn ; return CY here 6626 6627 %endif 6628 .do_not_use_test: 6629 6630 00009939 88C4 mov ah, al 6631 %if _PM 6632 0000993B E88BF8 call ispm 6633 0000993E 7516 jnz .16 ; (NC from ispm) --> 6634 00009940 E847FF call verifysegm ; make bx a writeable segment 6635 00009943 7220 jc .ret 6636 00009945 E8ECC3 call test_d_b_bit 6637 00009948 740C jz .16 ; (NC from test_d_b_bit) --> 6638 [cpu 386] 6639 0000994A 1E push ds 6640 0000994B 8EDB mov ds, bx 6641 0000994D 678602 xchg al, byte [edx] 6642 00009950 673A22 cmp ah, byte [edx] 6643 00009953 1F pop ds 6644 __CPU__ 6645 00009954 EB0C jmp short .cmp 6646 .16: 6647 %endif 6648 00009956 1E push ds 6649 00009957 8EDB mov ds, bx 6650 00009959 53 push bx 6651 0000995A 89D3 mov bx, dx 6652 0000995C 8607 xchg al, byte [bx] 6653 0000995E 3A27 cmp ah, byte [bx] 6654 00009960 5B pop bx 6655 00009961 1F pop ds 6656 .cmp: 6657 00009962 7401 je .ret ; (NC) 6658 00009964 F9 stc ; Failed to compare (i.e. memory wasn't our byte after writing). 6659 ; This check catches ROM that will silently fail to write. 6660 .ret: 6661 00009965 C3 retn 6662 6663 6664 ;--- read byte at BX:EDX into AL 6665 6666 readmem: 6667 %if _DEBUG1 6668 push dx 6669 push ax 6670 6671 call getlinear.do_not_use_test 6672 jc @F ; already an error ? then return --> (CY) 6673 push bx 6674 push cx 6675 mov bx, test_records_Readmem 6676 call handle_test_case_multiple_16 6677 ; check whether this should testcase the error 6678 ; CY to indicate error from this call 6679 pop cx 6680 pop bx 6681 @@: 6682 pop ax 6683 pop dx 6684 jnc .do_not_use_test 6685 mov al, byte [test_readmem_value] 6686 ; return a most likely wrong value 6687 retn 6688 6689 %endif 6690 .do_not_use_test: 6691 6692 %if _PM 6693 00009966 E8CBC3 call test_d_b_bit 6694 00009969 7408 jz .16 6695 [cpu 386] 6696 0000996B 1E push ds 6697 0000996C 8EDB mov ds, bx 6698 0000996E 678A02 mov al, byte [edx] 6699 00009971 1F pop ds 6700 00009972 C3 retn 6701 __CPU__ 6702 .16: 6703 %endif 6704 00009973 1E push ds 6705 00009974 53 push bx 6706 00009975 8EDB mov ds, bx 6707 00009977 89D3 mov bx, dx 6708 00009979 8A07 mov al, byte [bx] 6709 0000997B 5B pop bx 6710 0000997C 1F pop ds 6711 0000997D C3 retn 6712 6713 6714 ; Q command - quit. 6715 qq: 6716 0000997E E87A6B call guard_re 6717 %if _BOOTLDR 6718 ; Test whether we are in non-DOS mode, and were 6719 ; currently entered in protected mode. Since 6720 ; this will make the entire operation fail, 6721 ; it has to be checked for before modifying 6722 ; or releasing any of the resources. 6723 ; (Does this ever occur? No?) 6724 00009981 F606[9D00]40 testopt [internalflags], nodosloaded 6725 00009986 7418 jz .notpmnodos 6726 %if _PM 6727 00009988 E83EF8 call ispm 6728 %if _TSR ; same message, reuse code 6729 0000998B 741F jz .cannotpmquit 6730 %else 6731 jnz .notpmnodos_nodos 6732 mov dx, msg.cannotpmquit 6733 jmp putsz 6734 %endif 6735 %endif 6736 .notpmnodos_nodos: 6737 0000998D E83B3A call bootgetmemorysize ; dx => behind usable memory 6738 00009990 A1[E28F] mov ax, word [ boot_new_memsizekib ] 6739 00009993 B106 mov cl, 6 6740 00009995 D3E0 shl ax, cl 6741 00009997 39D0 cmp ax, dx ; same? 6742 00009999 7405 je @F 6743 0000999B BA[8D64] mov dx, msg.cannotbootquit_memsizes 6744 0000999E EB0F jmp .putsz 6745 %if !_TSR || !_PM 6746 .putsz equ putsz 6747 %endif 6748 6749 @@: 6750 .notpmnodos: 6751 %endif 6752 %if _PM 6753 %if _TSR 6754 ; Test whether we are in TSR mode, and were 6755 ; currently entered in protected mode. Since 6756 ; this will make the entire operation fail, 6757 ; it has to be checked for before modifying 6758 ; or releasing any of the resources. 6759 000099A0 F606[9E00]40 testopt [internalflags], tsrmode 6760 000099A5 740B jz .notpmtsr 6761 000099A7 E81FF8 call ispm 6762 000099AA 7506 jnz .notpmtsr 6763 6764 ; This isn't yet implemented. Broken down: 6765 ; * Uses terminate_attached_process which returns in real mode. 6766 ; * Exception vectors are implicitly restored/discarded by that. 6767 ; * (RM) Interrupt vectors are currently restored in real mode. Unnecessary. 6768 ; * The VDD is un-registered in real mode. Necessary? 6769 ; * Normal 21.4C is used to return to the real parent. 6770 ; * We have to discard our DOS process resources. Any DPMI TSR resources? 6771 ; * We must again gain control in debuggee's mode after discarding them. 6772 ; * We must return to the debuggee and seemlessly discard our memory. The 6773 ; stack trick possibly/probably does not work in protected mode. 6774 6775 .cannotpmquit: 6776 000099AC BA[6D5F] mov dx, msg.cannotpmquit 6777 .putsz: 6778 000099AF E90A24 jmp putsz 6779 6780 .notpmtsr: 6781 %endif 6782 6783 %if (nohook2F)&~0FF00h 6784 %fatal Internal flags re-ordered, adjust code here 6785 %endif 6786 000099B2 A1[9C00] mov ax, [internalflags] 6787 000099B5 B0A8 mov al, __TEST_IMM8 6788 000099B7 8606[5689] xchg al, [dpmidisable] ; disable DPMI hook 6789 ; (SMC in section lDEBUG_DATA_ENTRY) 6790 000099BB 50 push ax 6791 000099BC 800E[9D00]02 setopt [internalflags], nohook2F ; avoid a new hook while terminating 6792 %endif 6793 6794 6795 qq_restore_interrupts_simulated: 6796 000099C1 31ED xor bp, bp 6797 %if _CATCHINT2D 6798 .2D: 6799 000099C3 F606[A800]08 testopt [internalflags4], dif4_int_2D_hooked 6800 000099C8 741C jz .noint2D 6801 6802 000099CA B02D mov al, 2Dh ; interrupt number 6803 000099CC BE[4C81] mov si, int2D ; -> IISP entry header 6804 000099CF BA0800 mov dx, opt4_int_2D_force >> 16 6805 000099D2 E8E838 call UnhookInterruptForceSim 6806 ; try unhooking it 6807 000099D5 16 push ss 6808 000099D6 07 pop es 6809 000099D7 730D jnc .got2D 6810 6811 .not2D: 6812 000099D9 C706[186B]3244 mov word [msg.serial_cannot_unhook.int], "2D" 6813 000099DF BA[FD6A] mov dx, msg.serial_cannot_unhook.nowarn 6814 000099E2 E8D723 call putsz 6815 000099E5 45 inc bp 6816 6817 .got2D: 6818 .noint2D: 6819 %endif 6820 6821 6822 %if _CATCHINT08 6823 .08: 6824 000099E6 F606[A800]04 testopt [internalflags4], dif4_int_08_hooked 6825 000099EB 741C jz .noint08 6826 6827 000099ED B008 mov al, 08h ; interrupt number 6828 000099EF BE[5685] mov si, intr8 ; -> IISP entry header 6829 000099F2 BA0400 mov dx, opt4_int_08_force >> 16 6830 000099F5 E8C538 call UnhookInterruptForceSim 6831 ; try unhooking it 6832 000099F8 16 push ss 6833 000099F9 07 pop es 6834 000099FA 730D jnc .got08 6835 6836 .not08: 6837 000099FC C706[186B]3038 mov word [msg.serial_cannot_unhook.int], "08" 6838 00009A02 BA[FD6A] mov dx, msg.serial_cannot_unhook.nowarn 6839 00009A05 E8B423 call putsz 6840 00009A08 45 inc bp 6841 6842 .got08: 6843 .noint08: 6844 %endif 6845 6846 6847 .serial: 6848 00009A09 F606[A800]01 testopt [internalflags4], dif4_int_serial_hooked 6849 00009A0E 7420 jz .done_serial 6850 00009A10 BE[D895] mov si, serial_interrupt_handler 6851 00009A13 A0[120C] mov al, byte [serial_installed_intnum] 6852 00009A16 BA0100 mov dx, opt4_int_serial_force >> 16 6853 00009A19 E8A138 call UnhookInterruptForceSim 6854 00009A1C 16 push ss 6855 00009A1D 07 pop es 6856 00009A1E 7310 jnc .done_serial ; if it succeeded --> 6857 6858 00009A20 BF[186B] mov di, msg.serial_cannot_unhook.int 6859 00009A23 A0[120C] mov al, byte [serial_installed_intnum] 6860 00009A26 E8E41F call hexbyte 6861 00009A29 BA[FD6A] mov dx, msg.serial_cannot_unhook.nowarn 6862 00009A2C E88D23 call putsz 6863 00009A2F 45 inc bp 6864 6865 .done_serial: 6866 6867 %if _PM 6868 .2F: 6869 00009A30 F606[9D00]01 testopt [internalflags], hooked2F 6870 00009A35 741C jz .noint2F 6871 6872 00009A37 B02F mov al, 2Fh ; interrupt number 6873 00009A39 BE[4089] mov si, debug2F ; -> IISP entry header 6874 00009A3C BA0200 mov dx, opt4_int_2F_force >> 16 6875 00009A3F E87B38 call UnhookInterruptForceSim 6876 ; try unhooking it 6877 00009A42 16 push ss 6878 00009A43 07 pop es 6879 00009A44 730D jnc .got2F 6880 6881 .not2F: 6882 00009A46 C706[186B]3246 mov word [msg.serial_cannot_unhook.int], "2F" 6883 00009A4C BA[FD6A] mov dx, msg.serial_cannot_unhook.nowarn 6884 00009A4F E86A23 call putsz 6885 00009A52 45 inc bp 6886 6887 .got2F: 6888 .noint2F: 6889 %endif 6890 6891 6892 %if CATCHINTAMOUNT && ! _DEBUG 6893 ; Simulate to restore interrupt vectors. 6894 00009A53 BE[310C] mov si, inttab 6895 00009A56 BF[460C] mov di, intforcetab 6896 00009A59 B90600 mov cx, inttab_number 6897 00009A5C 31D2 xor dx, dx 6898 .nextintsim: 6899 00009A5E AC lodsb 6900 00009A5F 93 xchg ax, bx ; bl = number 6901 00009A60 AD lodsw ; si -> list 6902 00009A61 96 xchg ax, si ; si -> entry, ax -> list 6903 00009A62 93 xchg ax, bx ; al = number, bx -> list 6904 00009A63 57 push di 6905 00009A64 8A35 mov dh, byte [di] 6906 00009A66 E85438 call UnhookInterruptForceSim 6907 00009A69 5F pop di 6908 00009A6A 16 push ss 6909 00009A6B 07 pop es 6910 00009A6C 730D jnc @F 6911 00009A6E BF[186B] mov di, msg.serial_cannot_unhook.int 6912 00009A71 E8991F call hexbyte 6913 00009A74 BA[FD6A] mov dx, msg.serial_cannot_unhook.nowarn 6914 00009A77 E84223 call putsz 6915 00009A7A 45 inc bp 6916 @@: 6917 00009A7B 47 inc di 6918 00009A7C 87DE xchg bx, si ; si -> list 6919 00009A7E E2DE loop .nextintsim 6920 %endif 6921 6922 00009A80 BA[6370] mov dx, msg.empty_message 6923 00009A83 85ED test bp, bp 6924 00009A85 7403E99601 jnz qq_attached_unterminated.common 6925 6926 6927 qq_restore_interrupts: 6928 %if _CATCHINT2D 6929 .2D: 6930 00009A8A F606[A800]08 testopt [internalflags4], dif4_int_2D_hooked 6931 00009A8F 741E jz .noint2D 6932 6933 00009A91 B02D mov al, 2Dh ; interrupt number 6934 00009A93 BE[4C81] mov si, int2D ; -> IISP entry header 6935 00009A96 BA0800 mov dx, opt4_int_2D_force >> 16 6936 00009A99 E8F237 call UnhookInterruptForce 6937 ; try unhooking it 6938 00009A9C 730C jnc .got2D 6939 6940 .not2D: 6941 00009A9E C706[186B]3244 mov word [msg.serial_cannot_unhook.int], "2D" 6942 00009AA4 BA[FD6A] mov dx, msg.serial_cannot_unhook.nowarn 6943 00009AA7 E97601 jmp qq_attached_unterminated.common 6944 6945 .got2D: 6946 00009AAA 8026[A800]F7 clropt [internalflags4], dif4_int_2D_hooked 6947 .noint2D: 6948 %endif 6949 6950 6951 %if _CATCHINT08 6952 .08: 6953 00009AAF F606[A800]04 testopt [internalflags4], dif4_int_08_hooked 6954 00009AB4 7421 jz .noint08 6955 6956 00009AB6 B008 mov al, 08h ; interrupt number 6957 00009AB8 BE[5685] mov si, intr8 ; -> IISP entry header 6958 00009ABB BA0400 mov dx, opt4_int_08_force >> 16 6959 00009ABE E8CD37 call UnhookInterruptForce 6960 ; try unhooking it 6961 00009AC1 730C jnc .got08 6962 6963 .not08: 6964 00009AC3 C706[186B]3038 mov word [msg.serial_cannot_unhook.int], "08" 6965 00009AC9 BA[FD6A] mov dx, msg.serial_cannot_unhook.nowarn 6966 00009ACC E95101 jmp qq_attached_unterminated.common 6967 6968 .got08: 6969 00009ACF 8026[A800]FB clropt [internalflags4], dif4_int_08_hooked 6970 00009AD4 E8C438 call update_inttab_optional 6971 .noint08: 6972 %endif 6973 6974 6975 .serial: 6976 00009AD7 F606[EB0B]01 testopt [serial_flags], sf_init_done 6977 00009ADC 740D jz @F 6978 00009ADE E8FE34 call serial_clean_up ; unhook interrupt 6979 00009AE1 8026[EB0B]FE clropt [serial_flags], sf_init_done ; clear (in case return to cmd3) 6980 00009AE6 8026[7D00]BF clropt [options], enable_serial ; do not output to serial any longer 6981 @@: 6982 00009AEB F606[A800]01 testopt [internalflags4], dif4_int_serial_hooked 6983 00009AF0 7419 jz .done_serial 6984 00009AF2 E83535 call serial_uninstall_interrupt_handler 6985 00009AF5 7314 jnc .done_serial ; if it succeeded --> 6986 6987 00009AF7 BF[186B] mov di, msg.serial_cannot_unhook.int 6988 00009AFA A0[120C] mov al, byte [serial_installed_intnum] 6989 00009AFD E80D1F call hexbyte 6990 00009B00 BA[FD6A] mov dx, msg.serial_cannot_unhook.nowarn 6991 00009B03 C606[E095]00 mov byte [serial_interrupt_handler + ieEOI], 0 6992 ; we do not issue EOI any longer 6993 00009B08 E91501 jmp qq_attached_unterminated.common 6994 6995 6996 .done_serial: 6997 6998 %if _PM 6999 .2F: 7000 00009B0B F606[9D00]01 testopt [internalflags], hooked2F 7001 00009B10 7426 jz .noint2F 7002 7003 00009B12 B02F mov al, 2Fh ; interrupt number 7004 00009B14 BE[4089] mov si, debug2F ; -> IISP entry header 7005 00009B17 BA0200 mov dx, opt4_int_2F_force >> 16 7006 00009B1A E87137 call UnhookInterruptForce 7007 ; try unhooking it 7008 00009B1D 730C jnc .got2F 7009 7010 .not2F: 7011 00009B1F C706[186B]3246 mov word [msg.serial_cannot_unhook.int], "2F" 7012 00009B25 BA[FD6A] mov dx, msg.serial_cannot_unhook.nowarn 7013 00009B28 E9F500 jmp qq_attached_unterminated.common 7014 7015 .got2F: 7016 00009B2B 8026[9D00]FE clropt [internalflags], hooked2F 7017 00009B30 8026[A800]FD clropt [internalflags4], dif4_int_2F_hooked 7018 00009B35 E86338 call update_inttab_optional 7019 .noint2F: 7020 %endif 7021 7022 7023 %if _BOOTLDR 7024 00009B38 F606[9D00]40 testopt [internalflags], nodosloaded 7025 00009B3D 753D jnz .restoreints 7026 %endif 7027 7028 ; Cancel child's process if any. 7029 ; This will drop to real mode if debuggee is in protected mode. 7030 %if _TSR 7031 00009B3F F606[9E00]40 testopt [internalflags], tsrmode 7032 00009B44 7423 jz .terminate_attached 7033 7034 %if _PM 7035 00009B46 E880F6 call ispm 7036 00009B49 7414 jz @F ; in PM --> 7037 00009B4B F606[9E00]04 testopt [internalflags], canswitchmode 7038 00009B50 7415 jz @FF ; in 86 Mode and cannot switch to PM --> 7039 7040 00009B52 800E[9E00]08 setopt [internalflags], modeswitched ; set flag for resetmode 7041 00009B57 B000 mov al, 0 7042 00009B59 E8F69C call sr_state ; save state 7043 00009B5C E8BE9C call switchmode ; switch to PM 7044 ; ! handle_mode_changed not called here ! 7045 ; do not call InDos or other functions using seg/sels 7046 @@: 7047 00009B5F E8A9A9 call pm_reset_handlers 7048 ; ! this calls resetmode 7049 7050 ; remember that we cannot access Protected Mode any longer 7051 00009B62 8026[9E00]DB clropt [internalflags], canswitchmode | switchbuffer 7052 @@: 7053 %endif 7054 7055 00009B67 EB13 jmp .restoreints 7056 7057 .terminate_attached: 7058 %endif 7059 7060 00009B69 E8C409 call terminate_attached_process 7061 00009B6C 7503E9AC00 jz qq_attached_unterminated 7062 %if _PM 7063 00009B71 E855F6 call ispm 7064 00009B74 7506 jnz @F 7065 7066 00009B76 BA[3E6C] mov dx, msg.qq_still_pm 7067 00009B79 E9A400 jmp qq_attached_unterminated.common 7068 @@: 7069 %endif 7070 7071 .restoreints: 7072 %if CATCHINTAMOUNT && ! _DEBUG 7073 ; Restore interrupt vectors. 7074 00009B7C BE[310C] mov si, inttab 7075 00009B7F BF[460C] mov di, intforcetab 7076 00009B82 B90600 mov cx, inttab_number 7077 00009B85 31D2 xor dx, dx 7078 .nextint: 7079 00009B87 AC lodsb 7080 00009B88 93 xchg ax, bx ; bl = number 7081 00009B89 AD lodsw ; si -> list 7082 00009B8A 96 xchg ax, si ; si -> entry, ax -> list 7083 00009B8B 93 xchg ax, bx ; al = number, bx -> list 7084 00009B8C 57 push di 7085 00009B8D 8A35 mov dh, byte [di] 7086 00009B8F E8FC36 call UnhookInterruptForce 7087 00009B92 5F pop di 7088 00009B93 47 inc di 7089 00009B94 87DE xchg bx, si ; si -> list 7090 00009B96 E2EF loop .nextint 7091 %endif 7092 7093 7094 %if _PM 7095 00009B98 58 pop ax ; (discard) 7096 %endif 7097 7098 7099 qqlate: 7100 ; Release the registered VDD. 7101 %if _VDD 7102 00009B99 F606[9C00]04 testopt [internalflags], ntpacket 7103 00009B9E 7408 jz .novdd 7104 00009BA0 A1[B80A] mov ax, word [hVdd] 7105 00009BA3 C4C4580190 UnRegisterModule 7106 .novdd: 7107 %endif 7108 7109 ; Restore termination address. 7110 %if _BOOTLDR 7111 00009BA8 F606[9D00]40 testopt [internalflags], nodosloaded 7112 00009BAD 7403E99200 jnz .bootterminate ; terminate --> 7113 %endif 7114 %if _TSR 7115 00009BB2 F606[9E00]40 testopt [internalflags], tsrmode 7116 00009BB7 744C jz .nontsrterminate 7117 00009BB9 31F6 xor si, si 7118 00009BBB E82169 call guard_auxbuff 7119 00009BBE 8E06[F209] mov es, word [auxbuff_segorsel] 7120 00009BC2 31FF xor di, di 7121 00009BC4 31C0 xor ax, ax 7122 00009BC6 B90800 mov cx, 8 7123 00009BC9 F3AB rep stosw ; 10h MCB bytes 7124 00009BCB B94000 mov cx, 40h 7125 00009BCE F3A5 rep movsw ; 80h PSP bytes 7126 00009BD0 8CC0 mov ax, es 7127 00009BD2 40 inc ax 7128 00009BD3 26A30100 mov word [es:1], ax ; fake MCB 7129 00009BD7 1E push ds 7130 00009BD8 8ED8 mov ds, ax 7131 00009BDA C70634001800 mov word [34h], 18h 7132 00009BE0 A33600 mov word [36h], ax ; insure default PHT and fix segment 7133 00009BE3 C70632000100 mov word [32h], 1 ; only one PHT entry (zero might crash) 7134 00009BE9 C6061800FF mov byte [18h], -1 ; PHT entry is closed 7135 00009BEE C7062C000000 mov word [2Ch], 0 ; PSP clear 7136 00009BF4 E83F00 call .setparent ; make it self-owned, just in case 7137 00009BF7 8CD3 mov bx, ss 7138 00009BF9 4B dec bx 7139 00009BFA 8EDB mov ds, bx ; => our (real) MCB 7140 00009BFC A30100 mov word [1], ax ; parent = fake PSP 7141 00009BFF 1F pop ds 7142 00009C00 E83300 call .setparent ; make the fake PSP our parent 7143 00009C03 EB13 jmp short terminate_00 ; see ya 7144 7145 .nontsrterminate: 7146 %endif 7147 00009C05 BE[C80A] mov si, psp22 ; restore termination address 7148 00009C08 BF0A00 mov di, TPIV 7149 00009C0B A5 movsw 7150 00009C0C A5 movsw 7151 00009C0D BF1600 mov di, 16h ; restore PSP of parent 7152 00009C10 A5 movsw 7153 ; Really done. 7154 00009C11 B44C mov ah, 4Ch ; quit 7155 00009C13 A0[110C] mov al, byte [termcode] ; return code 7156 00009C16 CD21 int 21h 7157 7158 7159 terminate_00: ; used by terminate_attached_process 7160 00009C18 B8004C mov ax, 4C00h ; quit 7161 00009C1B CD21 int 21h 7162 7163 7164 qq_attached_unterminated: 7165 00009C1D BA[0C6C] mov dx, msg.qq_unterm 7166 7167 .common: 7168 ; Restore state: 7169 %if _PM 7170 %if (nohook2F)&~0FF00h 7171 %fatal Internal flags re-ordered, adjust code here 7172 %endif 7173 00009C20 58 pop ax 7174 00009C21 A2[5689] mov [dpmidisable], al ; (SMC in section lDEBUG_DATA_ENTRY) 7175 00009C24 80E402 and ah, nohook2F>>8 7176 00009C27 8026[9D00]FD clropt [internalflags], nohook2F 7177 00009C2C 0826[9D00] or [internalflags+1], ah 7178 %endif 7179 00009C30 E98921 jmp putsz 7180 7181 7182 usesection lDEBUG_DATA_ENTRY 7183 7184 %if _TSR 7185 qq.proceedtsrtermination: 7186 00009008 FA cli 7187 00009009 FC cld 7188 0000900A 8CC8 mov ax, cs 7189 0000900C 8ED8 mov ds, ax 7190 0000900E 8ED0 mov ss, ax 7191 00009010 BC[400C] mov sp, stack_end 7192 00009013 FB sti 7193 00009014 832E[740C]10 sub word [reg_esp], 2+4+((qq.tsrfreecode_size+1)&~1) 7194 00009019 8B3E[740C] mov di, word [reg_esp] ; -> stack frame 7195 0000901D 8E06[8C0C] mov es, word [reg_ss] 7196 00009021 A1[840C] mov ax, word [reg_ds] 7197 00009024 AB stosw ; debuggee's ds 7198 00009025 A1[9C0C] mov ax, word [reg_eip] 7199 00009028 AB stosw 7200 00009029 A1[900C] mov ax, word [reg_cs] 7201 0000902C AB stosw ; debuggee's cs:ip 7202 0000902D 06 push es 7203 0000902E 57 push di 7204 0000902F BE[5690] mov si, qq.tsrfreecode 7205 00009032 B90500 mov cx, ((qq.tsrfreecode_size+1)>>1) 7206 00009035 F3A5 rep movsw ; code on stack 7207 00009037 8CC8 mov ax, cs 7208 00009039 48 dec ax 7209 0000903A A3[840C] mov word [reg_ds], ax ; = our MCB 7210 0000903D 8F06[9C0C] pop word [reg_eip] 7211 00009041 8F06[900C] pop word [reg_cs] ; -> code on stack 7212 00009045 F606[8700]80 testopt [options3], opt3_tsr_quit_leave_tf 7213 0000904A 7505 jnz @F 7214 0000904C 8026[A10C]FE clropt [reg_efl], 100h ; clear TF 7215 @@: 7216 7217 00009051 E88BF0 call entry_to_code_seg 7218 00009054 [339C] dw .proceedtsrcode 7219 7220 7221 usesection lDEBUG_CODE 7222 7223 code_insure_low_byte_not_0CCh 7224 .proceedtsrcode: 7225 %if _DEBUG 7226 ; avoid hooking interrupts again: 7227 mov byte [cs:..@patch_tsr_quit_run], __JMP_REL16 7228 ; (SMC in section lDEBUG_CODE) 7229 %endif 7230 00009C33 E973A6 jmp run ; run this 7231 7232 7233 usesection lDEBUG_DATA_ENTRY 7234 7235 align 2, db 0 7236 ; (Update: Explicitly clears TF now, except if the 7237 ; option opt3_tsr_quit_leave_tf is set. See above.) 7238 ; 7239 ; Note that since we are in control of debuggee's TF and 7240 ; reset it every time the debugger is entered, this code 7241 ; will not be entered with TF set. It might be entered 7242 ; with IF set and an interrupt might occur; the only harm 7243 ; done then is that the interrupt handler has less stack 7244 ; available. All flags must be preserved by this code. 7245 qq.tsrfreecode: 7246 00009056 C70601000000 mov word [1], 0 ; free the MCB 7247 0000905C 1F pop ds ; restore debuggee's ds 7248 0000905D CA0A00 retf ((qq.tsrfreecode_size+1)&~1) ; jump 7249 qq.tsrfreecode_size: equ $-qq.tsrfreecode 7250 7251 7252 usesection lDEBUG_CODE 7253 7254 qqlate.setparent: 7255 00009C36 A31600 mov word [16h], ax 7256 00009C39 C7060A00[0890] mov word [0Ah], qq.proceedtsrtermination 7257 00009C3F 8C160C00 mov word [0Ah+2], ss 7258 00009C43 C3 retn 7259 %endif 7260 7261 %if _BOOTLDR 7262 qqlate.bootterminate: 7263 00009C44 812E[740C]BC00 sub word [reg_esp], 2*8+4+((qq.bootfreecode_size+1)&~1) 7264 00009C4A 8B3E[740C] mov di, word [reg_esp] ; -> stack frame 7265 00009C4E 8E06[8C0C] mov es, word [reg_ss] 7266 00009C52 A1[840C] mov ax, word [reg_ds] 7267 00009C55 AB stosw 7268 00009C56 A1[880C] mov ax, word [reg_es] 7269 00009C59 AB stosw 7270 00009C5A A1[7C0C] mov ax, word [reg_esi] 7271 00009C5D AB stosw 7272 00009C5E A1[800C] mov ax, word [reg_edi] 7273 00009C61 AB stosw 7274 00009C62 A1[640C] mov ax, word [reg_eax] 7275 00009C65 AB stosw 7276 00009C66 A1[6C0C] mov ax, word [reg_ecx] 7277 00009C69 AB stosw 7278 00009C6A A1[680C] mov ax, word [reg_ebx] 7279 00009C6D AB stosw 7280 00009C6E A1[700C] mov ax, word [reg_edx] 7281 00009C71 AB stosw 7282 00009C72 A1[9C0C] mov ax, word [reg_eip] 7283 00009C75 AB stosw 7284 00009C76 A1[900C] mov ax, word [reg_cs] 7285 00009C79 AB stosw ; debuggee's cs:ip 7286 00009C7A 06 push es 7287 00009C7B 57 push di 7288 00009C7C 1E push ds 7289 00009C7D 0E push cs 7290 00009C7E 1F pop ds ; => lDEBUG_CODE 7291 00009C7F BE[E69C] mov si, qq.bootfreecode 7292 00009C82 B95400 mov cx, ((qq.bootfreecode_size+1)>>1) 7293 00009C85 F3A5 rep movsw ; code on stack 7294 00009C87 1F pop ds 7295 7296 00009C88 16 push ss 7297 00009C89 07 pop es 7298 7299 00009C8A A1[E28F] mov ax, word [ boot_new_memsizekib ] 7300 00009C8D B106 mov cl, 6 7301 00009C8F D3E0 shl ax, cl ; ax => source of EBDA (new position) 7302 00009C91 8B16[E48F] mov dx, word [ boot_old_memsizekib ] 7303 00009C95 D3E2 shl dx, cl ; dx => destination of EBDA (old position) 7304 00009C97 31C9 xor cx, cx ; size of EBDA to move (if none) 7305 00009C99 1E push ds 7306 00009C9A 8ED9 mov ds, cx 7307 00009C9C 8B1E0E04 mov bx, word [40Eh] ; new ref in word [0:40Eh] (if none) 7308 00009CA0 1F pop ds 7309 00009CA1 803E[E68F]00 cmp byte [ boot_ebdaflag ], 0 ; any EBDA ? 7310 00009CA6 7412 jz .noebda 7311 7312 00009CA8 1E push ds 7313 00009CA9 8ED8 mov ds, ax ; => EBDA 7314 00009CAB 31DB xor bx, bx 7315 00009CAD 8A1E0000 mov bl, byte [ 0 ] ; EBDA size in KiB 7316 00009CB1 B106 mov cl, 6 7317 00009CB3 D3E3 shl bx, cl ; *64, to paragraphs 7318 00009CB5 89D9 mov cx, bx ; = size of EBDA to move (in paragraphs) 7319 00009CB7 89D3 mov bx, dx ; = new EBDA reference to put in word [0:40Eh] 7320 00009CB9 1F pop ds 7321 7322 .noebda: 7323 00009CBA A3[640C] mov word [reg_eax], ax ; => relocated (new) EBDA position 7324 ; (in front of debugger image) 7325 00009CBD 891E[680C] mov word [reg_ebx], bx ; = what to put in word [0:40Eh], 7326 ; unchanged content of that word if no EBDA 7327 00009CC1 890E[6C0C] mov word [reg_ecx], cx ; = EBDA size, 0 if no EBDA 7328 00009CC5 8916[700C] mov word [reg_edx], dx ; = original (old) EBDA position 7329 ; = original mem size (in paras) 7330 ; (behind/in debugger image) 7331 00009CC9 C706[840C]0000 mov word [reg_ds], 0 7332 7333 00009CCF 8F06[9C0C] pop word [reg_eip] 7334 00009CD3 8F06[900C] pop word [reg_cs] ; -> code on stack 7335 00009CD7 F606[8700]80 testopt [options3], opt3_tsr_quit_leave_tf 7336 00009CDC 7505 jnz @F 7337 00009CDE 8026[A10C]FE clropt [reg_efl], 100h ; clear TF 7338 @@: 7339 ; call dumpregs 7340 %if _DEBUG 7341 ; avoid hooking interrupts again: 7342 mov byte [cs:..@patch_tsr_quit_run], __JMP_REL16 7343 ; (SMC in section lDEBUG_CODE) 7344 %endif 7345 ; jmp cmd3 7346 00009CE3 E9C3A5 jmp run ; run this 7347 7348 7349 align 2, db 0 7350 qq.bootfreecode: 7351 00009CE6 9C pushf 7352 00009CE7 E81800 call movp ; move EBDA back (if any) 7353 00009CEA 891E0E04 mov word [40Eh], bx ; back relocate EBDA (if any) 7354 00009CEE B106 mov cl, 6 7355 00009CF0 D3EA shr dx, cl ; = to KiB 7356 00009CF2 89161304 mov word [413h], dx ; back relocate mem size 7357 00009CF6 9D popf 7358 00009CF7 1F pop ds 7359 00009CF8 07 pop es 7360 00009CF9 5E pop si 7361 00009CFA 5F pop di 7362 00009CFB 58 pop ax 7363 00009CFC 59 pop cx 7364 00009CFD 5B pop bx 7365 00009CFE 5A pop dx 7366 00009CFF CAA800 retf ((qq.bootfreecode_size+1)&~1) 7367 7368 7369 ; Move paragraphs 7370 ; 7371 ; INP: ax:0-> source 7372 ; dx:0-> destination 7373 ; cx = number of paragraphs 7374 ; CHG: - 7375 ; Note: Doesn't work correctly on HMA; doesn't always wrap to LMA either. 7376 ; Do not provide a wrapped/HMA source or destination! 7377 movp: 7378 00009D02 51 push cx 7379 00009D03 1E push ds 7380 00009D04 56 push si 7381 00009D05 06 push es 7382 00009D06 57 push di 7383 7384 00009D07 39D0 cmp ax, dx ; source above destination ? 7385 00009D09 770A ja .up ; yes, move up (forwards) --> 7386 00009D0B 747B je .return ; same, no need to move --> 7387 00009D0D 50 push ax 7388 00009D0E 01C8 add ax, cx ; (expected not to carry) 7389 00009D10 39D0 cmp ax, dx ; end of source is above destination ? 7390 00009D12 58 pop ax 7391 00009D13 7730 ja .down ; yes, move from top down --> 7392 ; Here, the end of source is below-or-equal the destination, 7393 ; so they do not overlap. In this case we prefer moving up. 7394 7395 .up: 7396 00009D15 50 push ax 7397 00009D16 52 push dx 7398 .uploop: 7399 00009D17 8ED8 mov ds, ax 7400 00009D19 8EC2 mov es, dx 7401 00009D1B 31FF xor di, di 7402 00009D1D 31F6 xor si, si ; -> start of segment 7403 00009D1F 81E90010 sub cx, 1000h ; 64 KiB left ? 7404 00009D23 7610 jbe .uplast ; no --> 7405 00009D25 51 push cx 7406 00009D26 B90080 mov cx, 10000h /2 7407 00009D29 F3A5 rep movsw ; move 64 KiB 7408 00009D2B 59 pop cx 7409 00009D2C 050010 add ax, 1000h 7410 00009D2F 81C20010 add dx, 1000h ; -> next segment 7411 00009D33 EBE2 jmp short .uploop ; proceed for more --> 7412 .uplast: 7413 00009D35 81C10010 add cx, 1000h ; restore counter 7414 00009D39 D1E1 shl cx, 1 7415 00009D3B D1E1 shl cx, 1 7416 00009D3D D1E1 shl cx, 1 ; *8, paragraphs to words 7417 00009D3F F3A5 rep movsw ; move last part 7418 00009D41 5A pop dx 7419 00009D42 58 pop ax 7420 00009D43 EB43 jmp short .return 7421 7422 .down: 7423 00009D45 FD std ; _AMD_ERRATUM_109_WORKAROUND as below 7424 .dnloop: 7425 00009D46 81E90010 sub cx, 1000h ; 64 KiB left ? 7426 00009D4A 761A jbe .dnlast ; no --> 7427 00009D4C 50 push ax 7428 00009D4D 52 push dx 7429 00009D4E 01C8 add ax, cx 7430 00009D50 01CA add dx, cx 7431 00009D52 8ED8 mov ds, ax ; -> 64 KiB not yet moved 7432 00009D54 8EC2 mov es, dx 7433 00009D56 5A pop dx 7434 00009D57 58 pop ax 7435 00009D58 BFFEFF mov di, -2 7436 00009D5B 89FE mov si, di ; moved from last word down 7437 00009D5D 51 push cx 7438 00009D5E B90080 mov cx, 10000h /2 7439 00009D61 F3A5 rep movsw ; move 64 KiB 7440 00009D63 59 pop cx 7441 00009D64 EBE0 jmp short .dnloop ; proceed for more --> 7442 .dnlast: 7443 00009D66 81C10010 add cx, 1000h ; restore counter 7444 00009D6A D1E1 shl cx, 1 7445 00009D6C D1E1 shl cx, 1 7446 00009D6E D1E1 shl cx, 1 ; *8, paragraphs to words 7447 00009D70 89CF mov di, cx 7448 00009D72 4F dec di 7449 00009D73 D1E7 shl di, 1 ; words to offset, -> last word 7450 00009D75 89FE mov si, di 7451 00009D77 8ED8 mov ds, ax 7452 00009D79 8EC2 mov es, dx ; first segment correct 7453 7454 7455 numdef AMD_ERRATUM_109_WORKAROUND, 1 7456 ; Refer to comment in init.asm init_movp. 7457 7458 %if _AMD_ERRATUM_109_WORKAROUND 7459 00009D7B E308 jcxz @FF 7460 00009D7D 83F914 cmp cx, 20 7461 00009D80 7703 ja @FF 7462 @@: 7463 00009D82 A5 movsw 7464 00009D83 E2FD loop @B 7465 @@: 7466 %endif 7467 00009D85 F3A5 rep movsw ; move first part 7468 00009D87 FC cld 7469 .return: 7470 00009D88 5F pop di 7471 00009D89 07 pop es 7472 00009D8A 5E pop si 7473 00009D8B 1F pop ds 7474 00009D8C 59 pop cx 7475 00009D8D C3 retn 7476 qq.bootfreecode_size: equ $-qq.bootfreecode 7477 %endif 7478 7479 7480 sleepcmd: 7481 00009D8E E89B1B call skipcomma 7482 00009D91 E86B15 call getdword 7483 00009D94 53 push bx 7484 00009D95 52 push dx 7485 00009D96 E8C31B call skipwh0 7486 00009D99 E86A1B call iseol? 7487 00009D9C 7421 je .seconds 7488 00009D9E 4E dec si 7489 00009D9F BA[B068] mov dx, msg.seconds 7490 00009DA2 E8021B call isstring? 7491 00009DA5 7414 je .seconds_check_eol 7492 00009DA7 BA[B868] mov dx, msg.ticks 7493 00009DAA E8FA1A call isstring? 7494 .error_NZ: 7495 00009DAD 7403E92C07 jne error 7496 .ticks_check_eol: 7497 00009DB2 AC lodsb 7498 00009DB3 E8651B call chkeol 7499 7500 00009DB6 B80100 mov ax, 1 7501 00009DB9 EB07 jmp .common 7502 7503 .seconds_check_eol: 7504 00009DBB AC lodsb 7505 00009DBC E85C1B call chkeol 7506 .seconds: 7507 00009DBF B81200 mov ax, 18 7508 .common: 7509 00009DC2 5A pop dx 7510 00009DC3 50 push ax 7511 00009DC4 F7E2 mul dx ; dx:ax = low word times multiplier 7512 00009DC6 89D3 mov bx, dx 7513 00009DC8 89C1 mov cx, ax ; bx:cx = low word times multiplier 7514 00009DCA 58 pop ax 7515 00009DCB 5A pop dx 7516 00009DCC F7E2 mul dx ; dx:ax = high word times multiplier 7517 00009DCE 01C3 add bx, ax 7518 00009DD0 83D200 adc dx, 0 ; dx:bx:cx = entire result 7519 00009DD3 75D8 jnz .error_NZ 7520 7521 00009DD5 85C9 test cx, cx 7522 00009DD7 7504 jnz @F 7523 00009DD9 85DB test bx, bx 7524 00009DDB 7436 jz .end 7525 @@: 7526 7527 00009DDD B84000 mov ax, 40h ; bimodal segment/selector 7528 00009DE0 8EC0 mov es, ax 7529 .loop_reset: 7530 00009DE2 268B166C00 mov dx, word [es:6Ch] 7531 .loop: 7532 00009DE7 263B166C00 cmp dx, word [es:6Ch] 7533 00009DEC 7519 jne .next 7534 00009DEE E8B2A1 call handle_serial_flags_ctrl_c 7535 00009DF1 F606[8700]40 testopt [options3], opt3_check_ctrlc_0bh 7536 00009DF6 750A jnz @F ; already called function 0Bh --> 7537 00009DF8 E8AF08 call InDos 7538 00009DFB 7505 jnz @F 7539 00009DFD B40B mov ah, 0Bh 7540 doscall ; allow to break with Ctrl-C 2037 00009DFF E865BF <1> call _doscall 7541 @@: 7542 00009E02 E8E222 call idle 7543 00009E05 EBE0 jmp .loop 7544 7545 .next: 7546 00009E07 83E901 sub cx, 1 7547 00009E0A 83DB00 sbb bx, 0 7548 00009E0D 75D3 jnz .loop_reset 7549 00009E0F E302 jcxz .end 7550 00009E11 EBCF jmp .loop_reset 7551 7552 .end: 7553 00009E13 C3 retn 7554 7555 7556 ; S command - search for a string of bytes. 7557 sss: 7558 00009E14 4E dec si 7559 00009E15 4E dec si ; -> at 'S' 7560 00009E16 BA[AA68] mov dx, msg.sleep 7561 00009E19 E88B1A call isstring? ; check for "SLEEP" 7562 00009E1C 7503E96DFF je sleepcmd 7563 00009E21 46 inc si ; skip 'S' 7564 00009E22 AC lodsb ; load next 7565 7566 00009E23 8026[A700]7F clropt [internalflags3], dif3_sss_is_reverse 7567 7568 00009E28 8B1E[840C] mov bx, word [reg_ds] ; get search range 7569 00009E2C 66 _386_PM_o32 ; xor ecx, ecx 7570 00009E2D 31C9 xor cx, cx 7571 00009E2F E8F809 call getrangeX ; get address range into BX:(E)DX..BX:(E)CX 7572 00009E32 E8F81A call skipcomm0 7573 00009E35 66 _386_PM_o32 ; push edx 7574 00009E36 52 push dx 7575 00009E37 66 _386_PM_o32 ; push ecx 7576 00009E38 51 push cx 7577 00009E39 53 push bx 7578 7579 00009E3A BA[0667] mov dx, msg.reverse 7580 00009E3D 4E dec si 7581 00009E3E E8661A call isstring? 7582 00009E41 7509 jne @F 7583 7584 00009E43 800E[A700]80 setopt [internalflags3], dif3_sss_is_reverse 7585 00009E48 E8101B call skipwhite 7586 00009E4B 4E dec si 7587 @@: 7588 00009E4C BA[0067] mov dx, msg.range 7589 00009E4F E8551A call isstring? 7590 00009E52 AC lodsb 7591 00009E53 7514 jne .notrange 7592 7593 00009E55 8B1E[840C] mov bx, word [reg_ds] ; get search range 7594 00009E59 31C9 xor cx, cx 7595 00009E5B E8CC09 call getrangeX ; try to get second range 7596 00009E5E E8BA1A call chkeol ; and insure end-of-line 7597 ; successful if it returned 7598 00009E61 66 _386_PM_o32 ; mov esi, edx 7599 00009E62 89D6 mov si, dx ; bx:esi-> source string 7600 00009E64 66 _386_PM_o32 ; sub ecx, edx 7601 00009E65 29D1 sub cx, dx ; ecx = count - 1 7602 00009E67 EB28 jmp short .setesedi 7603 7604 .notrange: 7605 00009E69 E8180B call getstr ; get string of bytes 7606 00009E6C 81EF[0E08] sub di, line_out ; di = number of bytes to look for 7607 00009E70 7503E96906 jz error 7608 00009E75 89F9 mov cx, di 7609 00009E77 4F dec di ; minus one 7610 00009E78 BE[0E08] mov si, line_out 7611 00009E7B 57 push di 7612 00009E7C E86066 call guard_auxbuff 7613 00009E7F 8E06[F209] mov es, word [auxbuff_segorsel] 7614 00009E83 31FF xor di, di 7615 00009E85 F3A4 rep movsb ; move to auxbuff 7616 00009E87 66 _386_PM_o32 ; xor esi, esi 7617 00009E88 31F6 xor si, si 7618 00009E8A 8CC3 mov bx, es ; bx:esi -> auxbuff 7619 00009E8C 59 pop cx 7620 00009E8D 660FB7C9 _386_PM movzx ecx, cx ; ecx = count - 1 7621 .setesedi: 7622 00009E91 16 push ss 7623 00009E92 07 pop es 7624 00009E93 BF[6C0B] mov di, search_results 7625 00009E96 31C0 xor ax, ax 7626 00009E98 A3[CC0B] mov word [sscounter], ax 7627 00009E9B A3[CE0B] mov word [sscounter + 2], ax 7628 00009E9E 51 push cx 7629 %if _PM 7630 00009E9F B93000 mov cx, (6 * 16) >> 1 7631 %else 7632 mov cx, (4 * 16) >> 1 7633 %endif 7634 00009EA2 F3AB rep stosw 7635 00009EA4 59 pop cx 7636 7637 00009EA5 E87507 call prephack ; set up for the interrupt vector hack 7638 00009EA8 E8A007 call dohack 7639 00009EAB 8EDB mov ds, bx 7640 00009EAD 07 pop es 7641 00009EAE E92501 _386_PM_jmpn .386init ; 386 --> 7642 .init: 7643 00009EB1 5B pop bx 7644 00009EB2 5A pop dx 7645 .init_popped: 7646 00009EB3 29D3 sub bx, dx ; bx = number of bytes in search range minus one 7647 00009EB5 29CB sub bx, cx ; = number of possible positions of string minus 1 7648 00009EB7 7303E92206 jb error 7649 00009EBC 89D7 mov di, dx 7650 00009EBE 89CA mov dx, cx 7651 00009EC0 89D9 mov cx, bx 7652 7653 ; ds:si-> search string, length (dx+1) 7654 ; es:di-> data to search in, (cx+1) bytes 7655 00009EC2 36F606[A700]80 testopt [ss:internalflags3], dif3_sss_is_reverse 7656 00009EC8 7516 jnz .reverse 7657 .loop: 7658 00009ECA 0C01 or al, 1 ; NZ (iff cx==0, repne scasb doesn't change ZF) 7659 00009ECC 56 push si 7660 00009ECD AC lodsb ; first character in al 7661 00009ECE F2AE repne scasb ; look for first byte 7662 00009ED0 7408 je .foundbyte 7663 00009ED2 AE scasb ; count in cx was cnt-1 7664 00009ED3 7536 jne .done 7665 .found_last_byte: 7666 00009ED5 E85600 call .handle_found_byte 7667 00009ED8 EB31 jmp .done 7668 7669 .foundbyte: 7670 00009EDA E85100 call .handle_found_byte 7671 00009EDD 5E pop si 7672 00009EDE EBEA jmp .loop ; cx = 0 if one to search, 7673 ; cx = 1 if two to search, etc 7674 7675 .reverse: 7676 00009EE0 01CF add di, cx ; -> last position to check 7677 .reverseloop: 7678 00009EE2 0C01 or al, 1 ; NZ (iff cx==0, repne scasb doesn't change ZF) 7679 00009EE4 56 push si 7680 00009EE5 AC lodsb ; first character in al 7681 00009EE6 FD std ; no AMD erratum workaround needed 7682 00009EE7 F2AE repne scasb ; look for first byte 7683 00009EE9 7411 je .reversefoundbyte 7684 00009EEB AE scasb ; count in cx was cnt-1 7685 00009EEC 751D jne .done 7686 .reversefound_last_byte: 7687 00009EEE FC cld 7688 00009EEF 83C702 add di, 2 7689 00009EF2 38C0 cmp al, al ; ZR for case if dx = 0 7690 00009EF4 E83700 call .handle_found_byte 7691 00009EF7 83EF02 sub di, 2 7692 00009EFA EB0F jmp .done 7693 7694 .reversefoundbyte: 7695 00009EFC FC cld 7696 00009EFD 83C702 add di, 2 7697 00009F00 38C0 cmp al, al ; ZR for case if dx = 0 7698 00009F02 E82900 call .handle_found_byte 7699 00009F05 83EF02 sub di, 2 7700 00009F08 5E pop si 7701 00009F09 EBD7 jmp .reverseloop ; cx = 0 if one to search, 7702 ; cx = 1 if two to search, etc 7703 7704 .done: 7705 00009F0B 5E pop si ; discard 7706 .commondone: 7707 00009F0C FC cld 7708 00009F0D 16 push ss 7709 00009F0E 1F pop ds 7710 00009F0F E86D07 call unhack 7711 00009F12 BF[0E08] mov di, line_out 7712 7713 00009F15 A1[CE0B] mov ax, word [sscounter + 2] 7714 00009F18 85C0 test ax, ax 7715 00009F1A 7403 jz .nohighcounter 7716 00009F1C E8E71A call hexword 7717 .nohighcounter: 7718 7719 00009F1F A1[CC0B] mov ax, word [sscounter] 7720 00009F22 E8E11A call hexword 7721 00009F25 E81A1B call putsline 7722 00009F28 BA[5880] mov dx, msg.matches 7723 00009F2B E98E1E jmp putsz 7724 7725 7726 ; INP: ZR 7727 .handle_found_byte: 7728 00009F2E 51 push cx 7729 00009F2F 57 push di 7730 00009F30 89D1 mov cx, dx 7731 00009F32 F3A6 repe cmpsb ; compare string behind first byte 7732 ; If we're searching for a single-byte value then 7733 ; dx is equal to zero here. In that case cx gets 7734 ; the value zero and then repe cmpsb does not 7735 ; alter ZF, meaning it will stay ZR (as noted for 7736 ; the comment INP section). 7737 00009F34 5F pop di 7738 00009F35 7402 je .display ; if equal 7739 .next: 7740 00009F37 59 pop cx 7741 00009F38 C3 retn 7742 7743 .display: 7744 00009F39 8CC3 mov bx, es 7745 00009F3B 57 push di 7746 00009F3C 1E push ds 7747 00009F3D 06 push es 7748 00009F3E 16 push ss 7749 00009F3F 1F pop ds 7750 00009F40 E83C07 call unhack ; undo the interrupt vector hack and restore es 7751 00009F43 57 push di 7752 00009F44 833E[CE0B]00 cmp word [sscounter + 2], 0 7753 00009F49 751F jne @F 7754 00009F4B 8B3E[CC0B] mov di, word [sscounter] 7755 00009F4F 83FF10 cmp di, 16 7756 00009F52 7316 jae @F 7757 %if _PM 7758 00009F54 01FF add di, di ; * 2 7759 00009F56 89F8 mov ax, di 7760 00009F58 01FF add di, di ; * 4 7761 00009F5A 01C7 add di, ax ; * 4 + * 2 = * 6 7762 %else 7763 add di, di 7764 add di, di ; * 4 7765 %endif 7766 00009F5C 81C7[6C0B] add di, search_results 7767 00009F60 58 pop ax 7768 00009F61 50 push ax 7769 00009F62 48 dec ax 7770 00009F63 AB stosw 7771 %if _PM 7772 00009F64 31C0 xor ax, ax 7773 00009F66 AB stosw 7774 %endif 7775 00009F67 89D8 mov ax, bx 7776 00009F69 AB stosw 7777 7778 @@: 7779 00009F6A 8306[CC0B]01 add word [sscounter], 1 7780 00009F6F 8316[CE0B]00 adc word [sscounter + 2], 0 7781 00009F74 89D8 mov ax, bx 7782 00009F76 BF[0E08] mov di, line_out 7783 00009F79 E88A1A call hexword ; 4 (segment) 7784 00009F7C B03A mov al, ':' 7785 00009F7E AA stosb ; +1=5 7786 00009F7F 58 pop ax 7787 00009F80 48 dec ax 7788 00009F81 E8821A call hexword 7789 %if _SDUMP 7790 00009F84 F606[7E00]80 testopt [options], ss_no_dump 7791 00009F89 753D jnz @F 7792 00009F8B F9 stc 7793 00009F8C 11D0 adc ax, dx ; -> behind result 7794 00009F8E 7638 jbe .noresult ; end of segment 7795 00009F90 89C6 mov si, ax 7796 00009F92 B82020 mov ax, 32<<8|32 7797 00009F95 AB stosw 7798 00009F96 8D5D30 lea bx, [di+3*16] 7799 00009F99 89F1 mov cx, si 7800 00009F9B F7D9 neg cx 7801 00009F9D 83F910 cmp cx, byte 16 7802 00009FA0 7603 jbe .cxdone 7803 00009FA2 B91000 mov cx, 16 7804 .cxdone: 7805 00009FA5 1F pop ds 7806 00009FA6 1E push ds ; restore search's segment 7807 00009FA7 51 push cx 7808 .disploop: 7809 00009FA8 AC lodsb 7810 00009FA9 E8E975 call dd_store 7811 00009FAC B020 mov al, 32 7812 00009FAE AA stosb 7813 00009FAF E2F7 loop .disploop 7814 00009FB1 59 pop cx 7815 00009FB2 16 push ss 7816 00009FB3 1F pop ds 7817 00009FB4 F7D9 neg cx 7818 00009FB6 83C110 add cx, byte 16 7819 00009FB9 7407 jz .noblanks 7820 .loopblanks: 7821 00009FBB B82020 mov ax, 32<<8|32 7822 00009FBE AB stosw 7823 00009FBF AA stosb 7824 00009FC0 E2F9 loop .loopblanks 7825 .noblanks: 7826 00009FC2 C645E72D mov byte [di-(1+(8*3))], '-' 7827 00009FC6 89DF mov di, bx 7828 .noresult: 7829 @@: 7830 %endif ; _SDUMP 7831 00009FC8 52 push dx 7832 00009FC9 E8721A call putsline_crlf 7833 00009FCC E87C06 call dohack 7834 00009FCF 5A pop dx 7835 00009FD0 07 pop es 7836 00009FD1 1F pop ds 7837 00009FD2 5F pop di 7838 00009FD3 E961FF jmp .next 7839 7840 %if _PM 7841 .386init: 7842 [cpu 386] 7843 00009FD6 665B pop ebx 7844 00009FD8 665A pop edx 7845 00009FDA E8ECF1 call ispm 7846 00009FDD 0F85D2FE jnz .init_popped ; not PM --> 7847 00009FE1 6629D3 sub ebx, edx ; ebx = number of bytes in search range minus one 7848 00009FE4 6629CB sub ebx, ecx ; = number of possible positions of string minus 1 7849 00009FE7 0F82F304 jb error 7850 00009FEB 6689D7 mov edi, edx 7851 00009FEE 6689CA mov edx, ecx 7852 00009FF1 6689D9 mov ecx, ebx 7853 7854 ; ds:esi-> search string, length (edx+1) 7855 ; es:edi-> data to search in, (ecx+1) bytes 7856 ; Although 386+ RM still uses 64 KiB segments, it allows 7857 ; us to use the 32-bit addressing variant of the string 7858 ; instructions as long as we never access any byte above 7859 ; the 64 KiB limit. (Even if the index register contains 7860 ; 00010000h after an instruction executed.) 7861 00009FF4 36F606[A700]80 testopt [ss:internalflags3], dif3_sss_is_reverse 7862 00009FFA 751B jnz .386reverse 7863 .386loop: 7864 00009FFC 0C01 or al, 1 ; NZ (iff cx==0, repne scasb doesn't change ZF) 7865 00009FFE 6656 push esi 7866 0000A000 67AC a32 lodsb ; first character in al 7867 0000A002 F267AE a32 repne scasb ; look for first byte 7868 0000A005 7409 je .386foundbyte 7869 0000A007 67AE a32 scasb ; count in ecx was cnt-1 7870 0000A009 7541 jne .386done 7871 .386found_last_byte: 7872 0000A00B E84300 call .386handle_found_byte 7873 0000A00E EB3C jmp .386done 7874 7875 .386foundbyte: 7876 0000A010 E83E00 call .386handle_found_byte 7877 0000A013 665E pop esi 7878 0000A015 EBE5 jmp .386loop ; ecx = 0 if one to search, 7879 ; ecx = 1 if two to search, etc 7880 7881 .386reverse: 7882 0000A017 6601CF add edi, ecx ; -> last position to check 7883 .386reverseloop: 7884 0000A01A 0C01 or al, 1 ; NZ (iff cx==0, repne scasb doesn't change ZF) 7885 0000A01C 6656 push esi 7886 0000A01E 67AC a32 lodsb ; first character in al 7887 0000A020 FD std ; no AMD erratum workaround needed 7888 0000A021 F267AE a32 repne scasb ; look for first byte 7889 0000A024 7414 je .386reversefoundbyte 7890 0000A026 67AE a32 scasb ; count in ecx was cnt-1 7891 0000A028 7522 jne .386done 7892 .386reversefound_last_byte: 7893 0000A02A FC cld 7894 0000A02B 6683C702 add edi, 2 7895 0000A02F 38C0 cmp al, al ; ZR for case if edx = 0 7896 0000A031 E81D00 call .386handle_found_byte 7897 0000A034 6683EF02 sub edi, 2 7898 0000A038 EB12 jmp .386done 7899 7900 .386reversefoundbyte: 7901 0000A03A FC cld 7902 0000A03B 6683C702 add edi, 2 7903 0000A03F 38C0 cmp al, al ; ZR for case if edx = 0 7904 0000A041 E80D00 call .386handle_found_byte 7905 0000A044 6683EF02 sub edi, 2 7906 0000A048 665E pop esi 7907 0000A04A EBCE jmp .386reverseloop ; ecx = 0 if one to search, 7908 ; ecx = 1 if two to search, etc 7909 7910 .386done: 7911 0000A04C 665E pop esi ; discard 7912 0000A04E E9BBFE jmp .commondone 7913 7914 7915 ; INP: ZR 7916 .386handle_found_byte: 7917 0000A051 6651 push ecx 7918 0000A053 6657 push edi 7919 0000A055 6689D1 mov ecx, edx 7920 0000A058 F367A6 a32 repe cmpsb ; compare string behind first byte 7921 ; If we're searching for a single-byte value then 7922 ; edx is equal to zero here. In that case ecx gets 7923 ; the value zero and then a32 repe cmpsb does not 7924 ; alter ZF, meaning it will stay ZR (as noted for 7925 ; the comment INP section). 7926 0000A05B 665F pop edi 7927 0000A05D 7403 je .386display ; if equal 7928 .386next: 7929 0000A05F 6659 pop ecx 7930 0000A061 C3 retn 7931 7932 .386display: 7933 0000A062 8CC3 mov bx, es 7934 0000A064 6657 push edi 7935 0000A066 1E push ds 7936 0000A067 06 push es 7937 0000A068 16 push ss 7938 0000A069 1F pop ds 7939 0000A06A E81206 call unhack ; undo the interrupt vector hack and restore es 7940 0000A06D 6657 push edi 7941 0000A06F 668B3E[CC0B] mov edi, dword [sscounter] 7942 0000A074 6683FF10 cmp edi, 16 7943 0000A078 7317 jae @F 7944 0000A07A 01FF add di, di ; * 2 7945 0000A07C 89F8 mov ax, di 7946 0000A07E 01FF add di, di ; * 4 7947 0000A080 01C7 add di, ax ; * 4 + * 2 = * 6 7948 0000A082 81C7[6C0B] add di, search_results 7949 0000A086 6658 pop eax 7950 0000A088 6650 push eax 7951 0000A08A 6648 dec eax 7952 0000A08C 66AB stosd 7953 0000A08E 89D8 mov ax, bx 7954 0000A090 AB stosw 7955 7956 @@: 7957 0000A091 66FF06[CC0B] inc dword [sscounter] 7958 0000A096 89D8 mov ax, bx 7959 0000A098 BF[0E08] mov di, line_out 7960 0000A09B E86819 call hexword ; 4 (segment) 7961 0000A09E B03A mov al, ':' 7962 0000A0A0 AA stosb ; +1=5 7963 0000A0A1 6658 pop eax 7964 0000A0A3 6648 dec eax 7965 0000A0A5 E88CBC call test_d_b_bit 7966 0000A0A8 7403 jz .noa32 7967 0000A0AA E84D19 call hexword_high 7968 .noa32: 7969 0000A0AD E85619 call hexword 7970 %if _SDUMP 7971 0000A0B0 F606[7E00]80 testopt [options], ss_no_dump 7972 0000A0B5 7543 jnz @F 7973 0000A0B7 F9 stc 7974 0000A0B8 6611D0 adc eax, edx ; -> behind result 7975 0000A0BB 763D jbe .386noresult ; end of segment 7976 0000A0BD 6689C6 mov esi, eax 7977 0000A0C0 B82020 mov ax, 32<<8|32 7978 0000A0C3 AB stosw 7979 0000A0C4 8D5D30 lea bx, [di+3*16] 7980 0000A0C7 6689F1 mov ecx, esi 7981 0000A0CA 66F7D9 neg ecx 7982 0000A0CD 6683F910 cmp ecx, byte 16 7983 0000A0D1 7603 jbe .386cxdone 7984 0000A0D3 B91000 mov cx, 16 7985 .386cxdone: 7986 0000A0D6 1F pop ds 7987 0000A0D7 1E push ds ; restore search's segment 7988 0000A0D8 51 push cx 7989 .386disploop: 7990 0000A0D9 67AC a32 lodsb 7991 0000A0DB E8B774 call dd_store 7992 0000A0DE B020 mov al, 32 7993 0000A0E0 AA stosb 7994 0000A0E1 E2F6 loop .386disploop 7995 0000A0E3 59 pop cx 7996 0000A0E4 16 push ss 7997 0000A0E5 1F pop ds 7998 0000A0E6 F7D9 neg cx 7999 0000A0E8 83C110 add cx, byte 16 8000 0000A0EB 7407 jz .386noblanks 8001 .386loopblanks: 8002 0000A0ED B82020 mov ax, 32<<8|32 8003 0000A0F0 AB stosw 8004 0000A0F1 AA stosb 8005 0000A0F2 E2F9 loop .386loopblanks 8006 .386noblanks: 8007 0000A0F4 C645E72D mov byte [di-(1+(8*3))], '-' 8008 0000A0F8 89DF mov di, bx 8009 .386noresult: 8010 @@: 8011 %endif ; _SDUMP 8012 0000A0FA 52 push dx 8013 0000A0FB E84019 call putsline_crlf 8014 0000A0FE E84A05 call dohack 8015 0000A101 5A pop dx 8016 0000A102 07 pop es 8017 0000A103 1F pop ds 8018 0000A104 665F pop edi 8019 0000A106 E956FF jmp .386next 8020 __CPU__ 8021 %endif ; _PM 8022 8023 8024 %if 0 8025 getdebuggeebyte: 8026 push bp 8027 mov bp, sp 8028 sub sp, byte 4 8029 push bx 8030 push cx 8031 %define _dedata -4 8032 %define _bp 0 8033 %define _ip 2 8034 %define _adroffset 4 8035 %define _adrsegment 8 8036 test byte [], memorydump 8037 jz .realmemory 8038 8039 jmp short .return 8040 .realmemory32: 8041 .realmemory: 8042 mov ax, word [ bp + _adrsegment ] 8043 mov bx, word [ bp + _adroffset ] 8044 push ds 8045 mov ds, ax 8046 push word [ bx ] 8047 pop word [ bp + _dedata ] 8048 push word [ bx +2 ] 8049 pop word [ bp + _dedata +2 ] 8050 pop ds 8051 ; test ax, ax 8052 ; jnz .return 8053 mov dx, ax 8054 mov cl, 4 8055 shl ax, cl 8056 mov cl, 12 8057 shr dx, cl 8058 add ax, bx 8059 adc dx, byte 0 8060 jnz .return 8061 sub ax, 23h*4 8062 jb .return 8063 cmp ax, 2*4 8064 jae .return 8065 8066 push ds 8067 xor bx, bx 8068 mov ds, bx 8069 push si 8070 push di 8071 mov si, 22h*4 8072 mov di, hackints.dummy22 8073 movsw 8074 movsw 8075 mov bl, 8 8076 add si, bx 8077 add di, bx 8078 movsw 8079 movsw 8080 8081 mov cl, byte [ bx - 4 + hackints2324 ] 8082 mov byte [ bp + _dedata ], cl 8083 .return: 8084 pop cx 8085 pop bx 8086 pop ax 8087 pop dx 8088 pop bp 8089 retn 6 8090 8091 8092 ; Interrupt hack table 8093 ; 8094 ; This contains the Int23 and Int24 handler we want to show 8095 ; the user. As we'll retrieve a dword per access, 8096 align 4, db 0 8097 hackints: 8098 .dummy22: dd 0 8099 .23: dd 0 8100 .24: dd 0 8101 .dummy25: dd 0 8102 %endif 8103 8104 8105 lockdrive: 8106 0000A109 50 push ax 8107 0000A10A 53 push bx 8108 0000A10B 51 push cx 8109 0000A10C 52 push dx 8110 0000A10D 88C3 mov bl, al 8111 0000A10F FEC3 inc bl 8112 0000A111 B700 mov bh, 0 8113 0000A113 B94A08 mov cx, 084Ah 8114 0000A116 BA0100 mov dx, 0001h 8115 0000A119 B80D44 mov ax, 440Dh 8116 0000A11C CD21 int 21h 8117 0000A11E 5A pop dx 8118 0000A11F 59 pop cx 8119 0000A120 5B pop bx 8120 0000A121 58 pop ax 8121 0000A122 C3 retn 8122 8123 unlockdrive: 8124 0000A123 50 push ax 8125 0000A124 53 push bx 8126 0000A125 51 push cx 8127 0000A126 52 push dx 8128 0000A127 88C3 mov bl, al 8129 0000A129 FEC3 inc bl 8130 0000A12B B700 mov bh, 0 8131 0000A12D B96A08 mov cx, 086Ah 8132 0000A130 BA0100 mov dx, 0001h 8133 0000A133 B80D44 mov ax, 440Dh 8134 0000A136 CD21 int 21h 8135 0000A138 5A pop dx 8136 0000A139 59 pop cx 8137 0000A13A 5B pop bx 8138 0000A13B 58 pop ax 8139 0000A13C C3 retn 8140 8141 8142 ; W command - write a program, or disk sectors, to disk. 8143 ww: 8144 %if _BOOTLDR 8145 0000A13D F606[9D00]40 testopt [internalflags], nodosloaded 8146 0000A142 7406 jz @F 8147 0000A144 BA[955F] mov dx, msg.nobootsupp 8148 0000A147 E9721C jmp putsz 8149 @@: 8150 %endif 8151 8152 0000A14A E8EE05 call parselw ; parse L and W argument format 8153 0000A14D 747B jz ww4 ; if request to write program 8154 %if _PM && _NOEXTENDER 8155 0000A14F E877F0 call ispm 8156 0000A152 7508 jnz .rm 8157 0000A154 E8EFF1 call isextenderavailable 8158 0000A157 7303E902F2 jc nodosextinst 8159 .rm: 8160 %endif 8161 0000A15C 36F606[9C00]06 testopt [ss:internalflags], newpacket| ntpacket 8162 0000A162 742F jz .oldint 8163 0000A164 88C2 mov dl, al ; A: = 0, ... 8164 0000A166 BE0160 mov si, 6001h ; write, assume "file data" 8165 %if _VDD 8166 0000A169 F606[9C00]04 testopt [internalflags], ntpacket 8167 0000A16E 7512 jnz .vdd 8168 %endif 8169 0000A170 FEC2 inc dl ; A: = 1, ... 8170 0000A172 E894FF call lockdrive 8171 0000A175 B80573 mov ax, 7305h ; ds:(e)bx-> packet 8172 0000A178 F9 stc 8173 0000A179 CD21 int 21h ; use int 21h here, not doscall 8174 0000A17B 9C pushf 8175 0000A17C E8A4FF call unlockdrive 8176 0000A17F 9D popf 8177 0000A180 EB13 jmp short .done 8178 %if _VDD 8179 .vdd: 8180 0000A182 A1[B80A] mov ax, word [hVdd] 8181 0000A185 B90500 mov cx, 5 8182 %if _PM 8183 0000A188 020E[DA88] add cl, byte [dpmi32] 8184 %endif 8185 0000A18C C4C4580290 DispatchCall 8186 0000A191 EB02 jmp short .done 8187 %endif 8188 .oldint: 8189 0000A193 CD26 int 26h 8190 .done: 8191 0000A195 BA[A979] mov dx, writing 8192 ww1: 8193 0000A198 8CD3 mov bx, ss ; restore segment registers 8194 0000A19A 8EDB mov ds, bx 8195 0000A19C 8B26[940A] mov sp, word [savesp] 8196 0000A1A0 8EC3 mov es, bx 8197 0000A1A2 7323 jnc ww3 ; if no error 8198 0000A1A4 3C0C cmp al, 0Ch 8199 0000A1A6 7602 jbe ww2 ; if in range 8200 0000A1A8 B00C mov al, 0Ch 8201 ww2: 8202 0000A1AA 98 cbw ; ah = 0 8203 0000A1AB BB[DA78] mov bx, dskerrs ; -> byte table 8204 0000A1AE D7 xlatb ; get offset from dskerrs 8205 0000A1AF 01D8 add ax, bx ; -> message 8206 0000A1B1 BF[0E08] mov di, line_out 8207 0000A1B4 89C6 mov si, ax 8208 0000A1B6 E8AE17 call showstring 8209 0000A1B9 89D6 mov si, dx 8210 0000A1BB E8A917 call showstring 8211 0000A1BE BE[AF79] mov si, drive 8212 0000A1C1 E8A317 call showstring 8213 0000A1C4 E87718 call putsline_crlf 8214 ww3: 8215 0000A1C7 E9365E jmp cmd3 ; can't return because Int26 leaves stack wrong 8216 8217 ; Write to file. First check the file extension. 8218 ; size of file is in client's BX:CX, 8219 ; default start address is DS:100h 8220 8221 ww4: 8222 0000A1CA E8DD04 call InDos 8223 0000A1CD 7403E905F2 jnz not_while_indos 8224 8225 0000A1D2 A0[DD0B] mov al, byte [fileext] ; get flags of file extension 8226 0000A1D5 A80C test al, EXT_EXE + EXT_HEX 8227 0000A1D7 7405 jz ww5 ; if not EXE or HEX 8228 0000A1D9 BA[4B7D] mov dx, nowhexe 8229 0000A1DC EB07 jmp short ww6 8230 8231 ww5: 8232 0000A1DE 3C00 cmp al, 0 8233 0000A1E0 7506 jnz ww7 ; if extension exists 8234 0000A1E2 BA[717D] mov dx, nownull 8235 ww6: 8236 0000A1E5 E9D400 jmp ww16 8237 8238 ; File extension is OK; write it. First, create the file. 8239 ww7: 8240 %if _PM 8241 0000A1E8 E8DEEF call ispm 8242 0000A1EB 7506 jnz ww7_1 8243 0000A1ED BA[1A7C] mov dx, nopmsupp 8244 0000A1F0 E9C91B jmp putsz 8245 ww7_1: 8246 %endif 8247 0000A1F3 BD[0E08] mov bp, line_out 8248 0000A1F6 80FEFE cmp dh, 0FEh 8249 0000A1F9 7207 jb ww8 ; if (dx < 0xFE00) 8250 0000A1FB 80EEFE sub dh, 0FEh ; dx -= 0xFE00; 8251 0000A1FE 81C3E00F add bx, 0FE0h 8252 ww8: 8253 0000A202 89560A mov word [bp+10], dx ; save lower part of address in line_out+10 8254 0000A205 89DE mov si, bx ; upper part goes into si 8255 0000A207 B43C mov ah, 3Ch ; create file 8256 0000A209 31C9 xor cx, cx ; no attributes 8257 0000A20B BA8000 mov dx, DTA 8258 doscall 2037 0000A20E E856BB <1> call _doscall 8259 0000A211 7303E97D00 jc ww15 ; if error 8260 0000A216 50 push ax ; save file handle 8261 8262 ; Print message about writing. 8263 0000A217 BA[947D] mov dx, wwmsg1 8264 0000A21A E89F1B call putsz ; print string 8265 0000A21D A1[680C] mov ax, word [reg_ebx] 8266 0000A220 83F810 cmp ax, 10h 8267 0000A223 7202 jb ww9 ; if not too large 8268 0000A225 31C0 xor ax, ax ; too large: zero it out 8269 ww9: 8270 0000A227 894608 mov word [bp+8], ax 8271 0000A22A 85C0 test ax, ax 8272 0000A22C 7403 jz ww10 8273 0000A22E E8E717 call hexnyb 8274 ww10: 8275 0000A231 A1[6C0C] mov ax, word [reg_ecx] 8276 0000A234 894606 mov word [bp+6], ax 8277 0000A237 E8CC17 call hexword 8278 0000A23A E80518 call putsline ; print size 8279 0000A23D BA[9D7D] mov dx, wwmsg2 8280 0000A240 E8791B call putsz ; print string 8281 8282 ; Now write the file. Size remaining is in line_out+6. 8283 0000A243 5B pop bx ; recover file handle 8284 0000A244 8B560A mov dx, word [bp+10] ; address to write from is si:dx 8285 ww11: 8286 0000A247 B800FE mov ax, 0FE00h 8287 0000A24A 29D0 sub ax, dx 8288 0000A24C 807E0800 cmp byte [bp+8], 0 8289 0000A250 7508 jnz ww12 ; if more than 0FE00h bytes remaining 8290 0000A252 3B4606 cmp ax, word [bp+6] 8291 0000A255 7203 jb ww12 ; ditto 8292 0000A257 8B4606 mov ax, word [bp+6] 8293 ww12: 8294 0000A25A 91 xchg ax, cx ; mov cx, ax 8295 0000A25B 8EDE mov ds, si 8296 0000A25D B440 mov ah, 40h ; write to file 8297 0000A25F CD21 int 21h ; use INT, not doscall 8298 0000A261 16 push ss ; restore DS 8299 0000A262 1F pop ds 8300 0000A263 39C8 cmp ax, cx 8301 0000A265 7515 jne ww13 ; if disk full 8302 0000A267 31D2 xor dx, dx ; next time write from xxxx:0 8303 0000A269 81C6E00F add si, 0FE0h ; update segment pointer 8304 0000A26D 294E06 sub word [bp+6], cx 8305 0000A270 9F lahf 8306 0000A271 805E0800 sbb byte [bp+8], 0 8307 0000A275 75D0 jnz ww11 ; if more to go 8308 0000A277 9E sahf 8309 0000A278 75CD jnz ww11 ; ditto 8310 0000A27A EB12 jmp short ww14 ; done 8311 8312 ww13: 8313 0000A27C BA[A67D] mov dx, diskful 8314 0000A27F E83A1B call putsz ; print string 8315 0000A282 E80900 call ww14 ; close file 8316 8317 0000A285 B441 mov ah, 41h ; unlink file 8318 0000A287 BA8000 mov dx, DTA 8319 doscall 2037 0000A28A E8DABA <1> call _doscall 8320 0000A28D C3 retn 8321 8322 ; Close the file. 8323 ww14: 8324 0000A28E B43E mov ah, 3Eh ; close file 8325 0000A290 CD21 int 21h 8326 0000A292 C3 retn 8327 8328 ; Error opening file. This is also called by the load command. 8329 ww15: 8330 0000A293 83F802 cmp ax, byte 2 8331 0000A296 BA[CC7D] mov dx, doserr2 ; File not found 8332 0000A299 7421 je ww16 8333 0000A29B 83F803 cmp ax, byte 3 8334 0000A29E BA[DD7D] mov dx, doserr3 ; Path not found 8335 0000A2A1 7419 je ww16 8336 0000A2A3 83F805 cmp ax, byte 5 8337 0000A2A6 BA[EE7D] mov dx, doserr5 ; Access denied 8338 0000A2A9 7411 je ww16 8339 0000A2AB 83F808 cmp ax, byte 8 8340 0000A2AE BA[FE7D] mov dx, doserr8 ; Insufficient memory 8341 0000A2B1 7409 je ww16 8342 0000A2B3 BF[B87D] mov di, openerr1 8343 0000A2B6 E84D17 call hexword 8344 0000A2B9 BA[B27D] mov dx, openerr ; Error ____ opening file 8345 ww16: 8346 0000A2BC E9FD1A jmp putsz 8347 8348 8349 %ifn _EMS 8350 xx: equ error 8351 %else 8352 ; X commands - manipulate EMS memory. 8353 ; 8354 ; Reference: 8355 ; http://www.nondot.org/sabre/os/files/MemManagement/LIMEMS41.txt 8356 8357 0000A2BF 3C3F xx: cmp al, '?' 8358 0000A2C1 741F je xhelp ; if a call for help 8359 0000A2C3 0C20 or al, TOLOWER 8360 0000A2C5 3C61 cmp al, 'a' 8361 0000A2C7 7423 je xa ; if XA command 8362 0000A2C9 3C64 cmp al, 'd' 8363 0000A2CB 7446 je xd ; if XD command 8364 0000A2CD 3C6D cmp al, 'm' 8365 0000A2CF 7503E97E00 je xm ; if XM command 8366 0000A2D4 3C72 cmp al, 'r' 8367 0000A2D6 7459 je xr ; if XR command 8368 0000A2D8 3C73 cmp al, 's' 8369 0000A2DA 7503E9A900 je xs ; if XS command 8370 0000A2DF E9FC01 jmp error 8371 8372 0000A2E2 AC xhelp: lodsb 8373 0000A2E3 E83516 call chkeol 8374 0000A2E6 BA[F75D] mov dx, msg.xhelp 8375 0000A2E9 E9D01A jmp putsz ; print string and return 8376 8377 ; XA - Allocate EMS. 8378 0000A2EC E89201 xa: call emschk 8379 0000A2EF E83A16 call skipcomma 8380 0000A2F2 E8F014 call getword ; get argument into DX 8381 0000A2F5 E82316 call chkeol ; expect end of line here 8382 0000A2F8 89D3 mov bx, dx 8383 8384 0000A2FA B8005A mov ax, 5A00h ; use the EMS 4.0 version to alloc 0 pages 8385 0000A2FD 85DB test bx, bx 8386 0000A2FF 7402 jz short .nullcnt 8387 0000A301 B443 mov ah, 43h ; allocate handle 8388 .nullcnt: 8389 0000A303 E83C01 call emscall 8390 0000A306 92 xchg ax, dx ; mov ax, dx 8391 0000A307 BF[0E7F] mov di, xaans1 8392 0000A30A E8F916 call hexword 8393 0000A30D BA[FD7E] mov dx, xaans 8394 0000A310 E9A91A jmp putsz ; print string and return 8395 8396 ; XD - Deallocate EMS handle. 8397 0000A313 E86B01 xd: call emschk 8398 0000A316 E81316 call skipcomma 8399 0000A319 E8C914 call getword ; get argument into DX 8400 0000A31C E8FC15 call chkeol ; expect end of line here 8401 8402 0000A31F B445 mov ah, 45h ; deallocate handle 8403 0000A321 E81E01 call emscall 8404 0000A324 92 xchg ax, dx ; mov ax,dx 8405 0000A325 BF[1C7F] mov di, xdans1 8406 0000A328 E8DB16 call hexword 8407 0000A32B BA[157F] mov dx, xdans 8408 0000A32E E98B1A jmp putsz ; print string and return 8409 8410 ; XR - Reallocate EMS handle. 8411 0000A331 E84D01 xr: call emschk 8412 0000A334 E8F515 call skipcomma 8413 0000A337 E8AB14 call getword ; get handle argument into DX 8414 0000A33A 89D3 mov bx, dx 8415 0000A33C E8EE15 call skipcomm0 8416 0000A33F E8A314 call getword ; get count argument into DX 8417 0000A342 E8D615 call chkeol ; expect end of line here 8418 0000A345 87DA xchg bx, dx 8419 8420 0000A347 B451 mov ah, 51h ; reallocate handle 8421 0000A349 E8F600 call emscall 8422 0000A34C BA[2F7F] mov dx, xrans 8423 0000A34F E96A1A jmp putsz ; print string and return 8424 8425 ; XM - Map EMS memory to physical page. 8426 0000A352 E82C01 xm: call emschk 8427 0000A355 E8D415 call skipcomma 8428 0000A358 E88A14 call getword ; get logical page (FFFFh means unmap) 8429 0000A35B 89D3 mov bx, dx ; save it in BX 8430 0000A35D E8CD15 call skipcomm0 8431 0000A360 E89014 call getbyte ; get physical page (DL) 8432 0000A363 52 push dx 8433 0000A364 E8C615 call skipcomm0 8434 0000A367 E87B14 call getword ; get handle into DX 8435 0000A36A E8AE15 call chkeol ; expect end of line 8436 0000A36D 58 pop ax ; recover physical page into AL 8437 0000A36E 50 push ax 8438 0000A36F B444 mov ah, 44h ; function 5 - map memory 8439 0000A371 E8CE00 call emscall 8440 0000A374 BF[517F] mov di, xmans1 8441 0000A377 93 xchg ax, bx ; mov ax, bx 8442 0000A378 E88B16 call hexword 8443 0000A37B BF[6E7F] mov di, xmans2 8444 0000A37E 58 pop ax 8445 0000A37F E88B16 call hexbyte 8446 0000A382 BA[447F] mov dx, xmans 8447 0000A385 E9341A jmp putsz ; print string and return 8448 8449 ; XS - Print EMS status. 8450 xs: 8451 0000A388 E8F600 call emschk 8452 0000A38B AC lodsb 8453 0000A38C E88C15 call chkeol ; no arguments allowed 8454 8455 ; First print out the handles and handle sizes. This can be done either 8456 ; by trying all possible handles or getting a handle table. 8457 ; The latter is preferable, if it fits in memory. 8458 0000A38F B44B mov ah, 4Bh ; function 12 - get handle count 8459 0000A391 E8AE00 call emscall 8460 0000A394 83FB42 cmp bx, (line_out_end-line_out)/4 8461 0000A397 762B jbe short xs3 ; if we can do it by getting the table 8462 0000A399 31D2 xor dx, dx ; handle 8463 8464 xs1: 8465 ; try EMS 4.0 function 5402h to get total number of handles 8466 0000A39B B80254 mov ax, 5402h 8467 0000A39E E8CB00 call emscall.witherrors 8468 0000A3A1 89D9 mov cx, bx ; cx = number of handles 8469 0000A3A3 7403 jz @F 8470 8471 0000A3A5 B9FF00 mov cx, 0FFh ; total number of handles (assumed) 8472 ; this does not match the prior code here, 8473 ; which used 100h handles assuming that 8474 ; 0FFh is the last valid handle number. 8475 ; however, if we assume that there are 0FFh 8476 ; valid handles then the last number is 0FEh! 8477 @@: 8478 8479 0000A3A8 B44C mov ah, 4Ch ; function 13 - get handle pages 8480 0000A3AA E8BF00 call emscall.witherrors 8481 0000A3AD 750D jnz short .err 8482 0000A3AF 93 xchg ax, bx ; mov ax,bx 8483 0000A3B0 E8E200 call hndlshow 8484 .cont: 8485 0000A3B3 42 inc dx ; increment handle number to access 8486 0000A3B4 7404 jz @F ; (if 0000h handles, do not loop forever) 8487 0000A3B6 39CA cmp dx, cx ; end of the loop ? 8488 0000A3B8 72E1 jb short xs1 ; if more to be done --> 8489 @@: 8490 0000A3BA EB1F jmp short xs5 ; done with this part 8491 8492 .err: 8493 0000A3BC 80FC83 cmp ah, 83h ; no such handle? 8494 0000A3BF 74F2 je short .cont ; just skip --> 8495 0000A3C1 E98300 jmp emscall.errorhandle ; if other error --> 8496 8497 ; Get the information in tabular form. 8498 xs3: 8499 0000A3C4 B44D mov ah, 4Dh ; function 14 - get all handle pages 8500 0000A3C6 BF[0E08] mov di, line_out 8501 0000A3C9 E87600 call emscall 8502 0000A3CC 85DB test bx, bx 8503 0000A3CE 740B jz short xs5 8504 0000A3D0 89FE mov si, di 8505 xs4: 8506 0000A3D2 AD lodsw 8507 0000A3D3 92 xchg ax, dx 8508 0000A3D4 AD lodsw 8509 0000A3D5 E8BD00 call hndlshow 8510 0000A3D8 4B dec bx 8511 0000A3D9 75F7 jnz short xs4 ; if more to go 8512 8513 xs5: 8514 0000A3DB BA[4574] mov dx, crlf 8515 0000A3DE E8DB19 call putsz ; print string 8516 8517 ; Next print the mappable physical address array. 8518 ; The size of the array shouldn't be a problem. 8519 0000A3E1 B80058 mov ax, 5800h ; function 25 - get mappable phys. address array 8520 0000A3E4 BF[0E08] mov di, line_out ; address to put array 8521 0000A3E7 E85800 call emscall 8522 0000A3EA BA[F67F] mov dx, xsnopgs 8523 0000A3ED E328 jcxz xs7 ; NO mappable pages! 8524 8525 0000A3EF 89FE mov si, di 8526 xs6: 8527 0000A3F1 51 push cx 8528 0000A3F2 AD lodsw 8529 0000A3F3 BF[B27F] mov di, xsstr2b 8530 0000A3F6 E80D16 call hexword 8531 0000A3F9 AD lodsw 8532 0000A3FA BF[A57F] mov di, xsstr2a 8533 0000A3FD E80D16 call hexbyte 8534 0000A400 BA[9A7F] mov dx, xsstr2 8535 0000A403 E8B619 call putsz ; print string 8536 0000A406 59 pop cx ; end of loop 8537 0000A407 F6C101 test cl, 1 8538 0000A40A 7406 jz short xs_nonl 8539 0000A40C BA[4574] mov dx, crlf ; blank line 8540 0000A40F E8AA19 call putsz ; print string 8541 xs_nonl: 8542 0000A412 E2DD loop xs6 8543 0000A414 BA[4574] mov dx, crlf ; blank line 8544 xs7: 8545 0000A417 E8A219 call putsz ; print string 8546 8547 ; Finally, print the cumulative totals. 8548 0000A41A B442 mov ah, 42h ; function 3 - get unallocated page count 8549 0000A41C E82300 call emscall 8550 0000A41F 89D0 mov ax, dx ; total pages available 8551 0000A421 29D8 sub ax, bx ; number of pages allocated 8552 0000A423 BB[EC7F] mov bx, xsstrpg 8553 0000A426 E88300 call sumshow ; print the line 8554 0000A429 B44B mov ah, 4Bh ; function 12 - get handle count 8555 0000A42B E81400 call emscall 8556 0000A42E 53 push bx ; number of handles allocated 8557 8558 ; try EMS 4.0 function 5402h to get total number of handles 8559 0000A42F B80254 mov ax, 5402h 8560 0000A432 E83700 call emscall.witherrors ; don't use emscall, this function may fail! 8561 0000A435 89DA mov dx, bx 8562 0000A437 7403 jz @F 8563 8564 0000A439 BAFF00 mov dx, 0FFh ; total number of handles 8565 @@: 8566 0000A43C 58 pop ax ; ax = number of handles allocated 8567 0000A43D BB[F07F] mov bx, xsstrhd 8568 0000A440 EB6A jmp sumshow ; print the line 8569 8570 ; Call EMS 8571 emscall: 8572 0000A442 E82700 call .witherrors 8573 0000A445 7439 jz short .ret ; return if OK 8574 .errorhandle: 8575 0000A447 88E0 mov al, ah 8576 0000A449 3C8B cmp al, 8Bh 8577 0000A44B 7F0D jg short .ce2 ; if out of range (signed comparison intended) 8578 0000A44D 98 cbw 8579 0000A44E 89C3 mov bx, ax 8580 0000A450 D1E3 shl bx, 1 8581 0000A452 8B97[DA7F] mov dx, word [emserrs+100h+bx] 8582 0000A456 85D2 test dx, dx 8583 0000A458 7538 jnz short .ce4 ; if there's a word there 8584 .ce2: 8585 0000A45A BA[F27E] mov dx, emserrx 8586 0000A45D E85C19 call putsz 8587 0000A460 BF[0E08] mov di, line_out 8588 0000A463 E8A715 call hexbyte 8589 0000A466 E8D515 call putsline_crlf 8590 0000A469 E9945B jmp cmd3 ; quit 8591 8592 .witherrors: 8593 %if _PM 8594 0000A46C E85AED call ispm 8595 0000A46F 750B jnz short .rm 8596 subcpu 286 8597 0000A471 36FF36[A60A] push word [ss:pspdbg] 8598 0000A476 6A67 push 67h 8599 0000A478 E8A0EE call intcall 8600 0000A47B A9 db __TEST_IMM16 ; (skip int opcode) 8601 subcpureset 8602 .rm: 8603 %endif 8604 0000A47C CD67 int 67h 8605 0000A47E 84E4 test ah, ah 8606 .ret: 8607 emschk.ret: 8608 0000A480 C3 retn 8609 8610 8611 ; Check for EMS 8612 ; maybe should disable this while bootloaded ? 8613 emschk: 8614 0000A481 B067 mov al, 67h 8615 0000A483 E81A2D call intchk ; ZR if offset = -1 or segment = 0 8616 ; CHG: ax, dx, bx 8617 0000A486 7407 jz .failed 8618 0000A488 B446 mov ah, 46h 8619 0000A48A E8DFFF call emscall.witherrors ; get version 8620 0000A48D 74F1 jz short .ret ; success --> 8621 .failed: 8622 0000A48F BA[147E] mov dx, emsnot 8623 emscall.ce4: 8624 0000A492 E9D85F jmp prnquit ; otherwise abort with message --> 8625 8626 ; HNDLSHOW - Print XS line giving the handle and pages allocated. 8627 ; 8628 ; Entry DX Handle 8629 ; AX Number of pages 8630 ; 8631 ; Exit Line printed 8632 ; 8633 ; Uses ax, di 8634 hndlshow: 8635 0000A495 BF[837F] mov di, xsstr1b 8636 0000A498 E86B15 call hexword 8637 0000A49B 89D0 mov ax, dx 8638 0000A49D BF[7A7F] mov di, xsstr1a 8639 0000A4A0 E86315 call hexword 8640 0000A4A3 52 push dx 8641 0000A4A4 BA[737F] mov dx, xsstr1 8642 0000A4A7 E81219 call putsz ; print string 8643 0000A4AA 5A pop dx 8644 0000A4AB C3 retn 8645 8646 ; SUMSHOW - Print summary line for XS command. 8647 ; 8648 ; Entry AX Number of xxxx's that have been used 8649 ; DX Total number of xxxx's 8650 ; BX Name of xxxx 8651 ; 8652 ; Exit String printed 8653 ; 8654 ; Uses AX, CX, DX, DI 8655 sumshow: 8656 0000A4AC BF[B97F] mov di, xsstr3 8657 0000A4AF 57 push di 8658 0000A4B0 E81600 call trimhex 8659 0000A4B3 92 xchg ax, dx ; mov ax,dx 8660 0000A4B4 BF[C97F] mov di, xsstr3a 8661 0000A4B7 E80F00 call trimhex 8662 0000A4BA 5A pop dx ; mov dx,xsstr3 8663 0000A4BB E8FE18 call putsz ; print string 8664 0000A4BE 89DA mov dx, bx 8665 0000A4C0 E8F918 call putsz ; print string 8666 0000A4C3 BA[D37F] mov dx, xsstr4 8667 0000A4C6 E9F318 jmp putsz ; print string and return 8668 8669 ; TRIMHEX - Print word without leading zeroes. 8670 ; 8671 ; Entry AX Number to print 8672 ; DI Where to print it 8673 ; 8674 ; Uses AX, CX, DI. 8675 trimhex: 8676 0000A4C9 E83A15 call hexword 8677 0000A4CC 83EF04 sub di, 4 ; back up DI to start of word 8678 0000A4CF B90300 mov cx, 3 8679 0000A4D2 B030 mov al, '0' 8680 .loop: 8681 0000A4D4 AE scasb 8682 0000A4D5 7506 jne .done ; return if not a '0' 8683 0000A4D7 C645FF20 mov byte [di-1], ' ' 8684 0000A4DB E2F7 loop .loop 8685 .done: 8686 0000A4DD C3 retn 8687 %endif ; _EMS 8688 8689 ; Error handlers. 8690 error: 8691 0000A4DE 16 push ss 8692 0000A4DF 07 pop es 8693 0000A4E0 16 push ss 8694 0000A4E1 1F pop ds 8695 0000A4E2 89F1 mov cx, si 8696 0000A4E4 81E9[0300] sub cx, line_in+3 8697 0000A4E8 81F90001 cmp cx, 256 8698 0000A4EC 7705 ja .invalid 8699 0000A4EE 030E[EA0A] add cx, word [promptlen]; number of spaces to skip 8700 0000A4F2 A9 db __TEST_IMM16 ; (skip xor) 8701 .invalid: 8702 0000A4F3 31C9 xor cx, cx ; if we're really messed up 8703 0000A4F5 8B26[9E0A] mov sp, [throwsp] 8704 0000A4F9 FF26[9C0A] jmp near [throwret] 8705 ; INP: cx = number of spaces to indent 8706 8707 ; This is the default address in throwret. 8708 ; Display the error, then jump to errret. 8709 errhandler: 8710 0000A4FD E86423 call get_columns ; ax = columns 8711 .: 8712 0000A500 29C1 sub cx, ax 8713 0000A502 73FC jnc . 8714 0000A504 01C1 add cx, ax 8715 0000A506 7407 jz err2 8716 0000A508 B020 mov al, 32 8717 .loop: 8718 0000A50A E8D218 call putc 8719 0000A50D E2FB loop .loop 8720 err2: 8721 0000A50F BA[3D74] mov dx, errcarat 8722 0000A512 E8A718 call putsz ; print string 8723 0000A515 B8FF01 mov ax, 01FFh 8724 0000A518 E80A00 call setrc 8725 0000A51B C706[DA0B][E003] mov word [lastcmd], dmycmd 8726 ; cancel command repetition 8727 0000A521 FF26[9A0A] jmp near [errret] ; return to the prompt (cmd3, aa01) 8728 8729 8730 setrc: 8731 0000A525 833E[F00A]00 cmp word [rc], 0 8732 0000A52A 7503 jne .ret 8733 0000A52C A3[F00A] mov word [rc], ax 8734 .ret: 8735 0000A52F C3 retn 8736 8737 8738 ; Terminate the attached process, if any 8739 ; 8740 ; OUT: NZ if now no process attached 8741 ; ZR if still a process attached, 8742 ; ie we failed to terminate this one 8743 terminate_attached_process: 8744 0000A530 F606[9E00]80 testopt [internalflags], attachedterm 8745 0000A535 7535 jnz @F 8746 8747 0000A537 8026[A10C]FC clropt [reg_efl], 300h ; clear TF and IF 8748 0000A53C 8C0E[900C] mov word [reg_cs], cs 8749 0000A540 C706[9C0C][189C] mov word [reg_eip], terminate_00 8750 0000A546 50 push ax ; (dummy to take space for return address) 8751 0000A547 8C16[8C0C] mov word [reg_ss], ss 8752 0000A54B 8926[740C] mov word [reg_esp], sp ; save current ss:sp 8753 0000A54F 58 pop ax ; (discard) 8754 0000A550 31C0 xor ax, ax 8755 0000A552 A3[9E0C] mov word [reg_eip+2], ax 8756 0000A555 A3[760C] mov word [reg_esp+2], ax 8757 %if _PM 8758 0000A558 A3[880C] mov word [reg_es], ax 8759 0000A55B A3[840C] mov word [reg_ds], ax 8760 0000A55E A3[940C] mov word [reg_fs], ax 8761 0000A561 A3[980C] mov word [reg_gs], ax ; insure valid segregs in PM 8762 %endif 8763 0000A564 E8429D call run 8764 ; The dummy stack space above is to hold the return address 8765 ; of this call. The debugger stack is used by this run. 8766 8767 0000A567 F606[9E00]80 testopt [internalflags], attachedterm 8768 @@: 8769 0000A56C C3 retn 8770 8771 8772 ;--- this is called by "run" 8773 ;--- better don't use INTs inside 8774 ;--- set debuggee's INT 23/24 8775 8776 ; Low-level functions to reset to debuggee's interrupt vectors 23h/24h 8777 ; INP: - 8778 ; OUT: - 8779 ; CHG: bx, (e)dx, cx, ax 8780 ; STT: ds = our segment 8781 ; Do not use Int21, even if not in InDOS mode 8782 setint2324: 8783 %if _BOOTLDR 8784 0000A56D F606[9D00]40 testopt [internalflags], nodosloaded 8785 0000A572 751C jnz .ret ; don't touch int23/24 --> 8786 %endif 8787 %if _PM 8788 0000A574 E852EC call ispm 8789 0000A577 7418 jz .pm 8790 %endif 8791 0000A579 06 push es 8792 0000A57A 57 push di 8793 0000A57B 56 push si 8794 8795 0000A57C 31FF xor di, di 8796 0000A57E 8EC7 mov es, di 8797 0000A580 BF8C00 mov di, 23h *4 8798 0000A583 BE[A80A] mov si, run2324 8799 0000A586 A5 movsw 8800 0000A587 A5 movsw 8801 0000A588 A5 movsw 8802 0000A589 A5 movsw 8803 8804 %if _PM 8805 0000A58A E8A22F call hook2F 8806 %endif 8807 0000A58D 5E pop si 8808 0000A58E 5F pop di 8809 0000A58F 07 pop es 8810 .ret: 8811 0000A590 C3 retn 8812 %if _PM 8813 .pm: 8814 0000A591 56 push si 8815 0000A592 BE[A80A] mov si, run2324 8816 0000A595 BB2302 mov bx, 0223h 8817 .loop: 8818 0000A598 66 _386_o32 ; mov edx, dword [si+0] 8819 0000A599 8B14 mov dx, word [si+0] 8820 0000A59B 8B4C04 mov cx, word [si+4] 8821 0000A59E B80502 mov ax, 0205h 8822 0000A5A1 CD31 int 31h 8823 0000A5A3 83C606 add si, 6 8824 0000A5A6 FEC3 inc bl 8825 0000A5A8 FECF dec bh 8826 0000A5AA 75EC jnz .loop 8827 0000A5AC 5E pop si 8828 0000A5AD C3 retn 8829 %endif 8830 8831 ; Low-level functions to save debuggee's interrupt vectors 23h/24h 8832 ; and set our interrupt vectors instead 8833 ; INP: - 8834 ; OUT: - 8835 ; CHG: - 8836 ; STT: ds = our segment 8837 ; Do not use Int21, even if not in InDOS mode 8838 getint2324: 8839 %if _BOOTLDR 8840 0000A5AE F606[9D00]40 testopt [internalflags], nodosloaded 8841 0000A5B3 752A jnz .ret ; don't touch int23/24 --> 8842 %endif 8843 %if _PM 8844 0000A5B5 E811EC call ispm 8845 0000A5B8 7426 jz .pm 8846 %endif 8847 0000A5BA 56 push si 8848 0000A5BB 57 push di 8849 0000A5BC 06 push es 8850 8851 0000A5BD 1E push ds 8852 0000A5BE 07 pop es 8853 0000A5BF 31FF xor di, di 8854 0000A5C1 8EDF mov ds, di 8855 0000A5C3 BF[A80A] mov di, run2324 8856 0000A5C6 BE8C00 mov si, 23h *4 8857 0000A5C9 56 push si 8858 0000A5CA A5 movsw ; save interrupt vector 23h 8859 0000A5CB A5 movsw 8860 0000A5CC A5 movsw ; save interrupt vector 24h 8861 0000A5CD A5 movsw 8862 0000A5CE 5F pop di 8863 0000A5CF 06 push es 8864 0000A5D0 1F pop ds 8865 0000A5D1 31F6 xor si, si 8866 0000A5D3 8EC6 mov es, si 8867 0000A5D5 BE0E00 mov si, CCIV 8868 0000A5D8 A5 movsw 8869 0000A5D9 A5 movsw 8870 0000A5DA A5 movsw 8871 0000A5DB A5 movsw 8872 8873 0000A5DC 07 pop es 8874 0000A5DD 5F pop di 8875 0000A5DE 5E pop si 8876 .ret: 8877 0000A5DF C3 retn 8878 %if _PM 8879 subcpu 286 8880 .pm: 8881 0000A5E0 66 _386_o32 8882 0000A5E1 60 pusha 8883 0000A5E2 BF[A80A] mov di, run2324 8884 0000A5E5 BB2302 mov bx, 0223h 8885 .loop: 8886 0000A5E8 B80402 mov ax, 0204h 8887 0000A5EB CD31 int 31h 8888 0000A5ED 66 _386_o32 ; mov dword [di+0], edx 8889 0000A5EE 8915 mov word [di+0], dx 8890 0000A5F0 894D04 mov word [di+4], cx 8891 0000A5F3 83C706 add di, byte 6 8892 0000A5F6 FEC3 inc bl 8893 0000A5F8 FECF dec bh 8894 0000A5FA 75EC jnz .loop 8895 %if _ONLYNON386 8896 db __TEST_IMM8 ; (skip pusha) 8897 %else 8898 0000A5FC A9 db __TEST_IMM16 ; (skip pushad) 8899 %endif 8900 8901 restoredbgi2324: 8902 setdbgi2324: 8903 0000A5FD 66 _386_o32 8904 0000A5FE 60 pusha 8905 0000A5FF BE[B40A] mov si, dbg2324 8906 0000A602 BB2302 mov bx, 0223h 8907 0000A605 6631D2 _386 xor edx, edx 8908 .loop: 8909 0000A608 AD lodsw 8910 0000A609 89C2 mov dx, ax 8911 0000A60B 8B0E[D688] mov cx, word [cssel] 8912 0000A60F B80502 mov ax, 0205h 8913 0000A612 CD31 int 31h 8914 0000A614 FEC3 inc bl 8915 0000A616 FECF dec bh 8916 0000A618 75EE jnz .loop 8917 0000A61A 66 _386_o32 8918 0000A61B 61 popa 8919 0000A61C C3 retn 8920 subcpureset 8921 %endif 8922 8923 %if 0 8924 The next three subroutines concern the handling of Int23 and 24. 8925 These interrupt vectors are saved and restored when running the 8926 child process, but are not active when DEBUG itself is running. 8927 It is still useful for the programmer to be able to check where Int23 8928 and 24 point, so these values are copied into the interrupt table 8929 during parts of the C, D, (DX, DI,) E, M, and S commands, so that 8930 they appear to be in effect. The E command also copies these values 8931 back. 8932 8933 Between calls to dohack and unhack, there should be no calls to DOS, 8934 so that there is no possibility of these vectors being used when 8935 DEBUG itself is running. 8936 8937 ; As long as no DOS is loaded anyway, Int23 and Int24 won't be touched 8938 by us, so the whole hack is unnecessary and will be skipped. 8939 %endif 8940 8941 ; PREPHACK - Set up for interrupt vector substitution. 8942 ; Entry es = cs 8943 prephack: 8944 0000A61D 803E[C40A]00 cmp byte [hakstat], 0 8945 0000A622 7509 jne .err ; if hack status error --> 8946 0000A624 57 push di 8947 0000A625 BF[BC0A] mov di, sav2324 ; debugger's Int2324 8948 0000A628 E80B00 call prehak1 8949 0000A62B 5F pop di 8950 0000A62C C3 retn 8951 8952 .err: 8953 0000A62D 52 push dx 8954 0000A62E BA[FE7C] mov dx, ph_msg 8955 0000A631 E88817 call putsz ; display error 8956 0000A634 5A pop dx 8957 0000A635 C3 retn 8958 8959 ; INP: di-> saved interrupt vectors 8960 ; OUT: - 8961 ; CHG: - 8962 prehak1: 8963 %if _PM 8964 0000A636 E890EB call ispm 8965 0000A639 740F jz .pm ; nothing to do 8966 %endif 8967 0000A63B 1E push ds 8968 0000A63C 56 push si 8969 0000A63D 31F6 xor si, si 8970 0000A63F 8EDE mov ds, si 8971 0000A641 BE8C00 mov si, 23h *4 8972 0000A644 A5 movsw 8973 0000A645 A5 movsw 8974 0000A646 A5 movsw 8975 0000A647 A5 movsw 8976 0000A648 5E pop si 8977 0000A649 1F pop ds 8978 .pm: 8979 0000A64A C3 retn 8980 8981 8982 ; DOHACK - Fake the interrupt vectors 23h and 24h to debuggee's 8983 ; UNHACK - Restore interrupt vectors 23h and 24h to our values 8984 ; It's OK to do either of these twice in a row. 8985 ; In particular, the S command may do unhack twice in a row. 8986 ; INP: ds = our segment 8987 ; OUT: es = our segment 8988 ; CHG: - 8989 ; STT: Do not use Int21 8990 dohack: 8991 0000A64B 16 push ss 8992 0000A64C 07 pop es 8993 %if _BOOTLDR 8994 0000A64D F606[9D00]40 testopt [internalflags], nodosloaded 8995 0000A652 7555 jnz unhack.ret ; nothing to hack --> 8996 %endif 8997 0000A654 56 push si 8998 0000A655 C606[C40A]01 mov byte [hakstat], 1 8999 0000A65A BE[A80A] mov si, run2324 ; debuggee's interrupt vectors 9000 %if _PM 9001 0000A65D E869EB call ispm 9002 0000A660 7537 jnz unhack.common 9003 subcpu 286 9004 0000A662 66 _386_o32 9005 0000A663 60 pusha 9006 0000A664 BB2302 mov bx, 0223h 9007 .pm_loop: 9008 0000A667 66 _386_o32 9009 0000A668 8B14 mov dx, word [si+0+0] 9010 0000A66A 8B4C04 mov cx, word [si+0+4] 9011 0000A66D B80502 mov ax, 205h 9012 0000A670 CD31 int 31h 9013 0000A672 83C606 add si, byte 6 9014 0000A675 FEC3 inc bl 9015 0000A677 FECF dec bh 9016 0000A679 75EC jnz .pm_loop 9017 0000A67B 66 _386_o32 9018 0000A67C 61 popa 9019 0000A67D 5E pop si 9020 0000A67E C3 retn 9021 subcpureset 9022 %else 9023 jmp short unhack.common 9024 %endif 9025 9026 unhack: 9027 0000A67F 16 push ss 9028 0000A680 07 pop es 9029 %if _BOOTLDR 9030 0000A681 F606[9D00]40 testopt [internalflags], nodosloaded 9031 0000A686 7521 jnz .ret ; nothing to hack --> 9032 %endif 9033 0000A688 C606[C40A]00 mov byte [hakstat], 0 9034 %if _PM 9035 0000A68D E839EB call ispm 9036 0000A690 7503E968FF jz restoredbgi2324 9037 %endif 9038 0000A695 56 push si 9039 0000A696 BE[BC0A] mov si, sav2324 ; debugger's interrupt vectors 9040 .common: 9041 0000A699 57 push di 9042 0000A69A 06 push es 9043 0000A69B 31FF xor di, di 9044 0000A69D 8EC7 mov es, di 9045 0000A69F BF8C00 mov di, 23h *4 9046 0000A6A2 A5 movsw 9047 0000A6A3 A5 movsw 9048 0000A6A4 A5 movsw 9049 0000A6A5 A5 movsw 9050 0000A6A6 07 pop es 9051 0000A6A7 5F pop di 9052 0000A6A8 5E pop si 9053 .ret: 9054 0000A6A9 C3 retn 9055 9056 9057 ; OUT: NZ if InDOS mode 9058 ; ZR if not 9059 ; CHG: - 9060 ; STT: ss = ds 9061 InDos: 9062 %if _BOOTLDR 9063 0000A6AA F606[9D00]40 testopt [internalflags], nodosloaded 9064 0000A6AF 7517 jnz .return ; always "in DOS" --> 9065 %endif 9066 0000A6B1 F606[7C00]08 testopt [options], fakeindos 9067 0000A6B6 7510 jnz .return ; faking InDOS on anyway --> 9068 .real_indos: 9069 0000A6B8 1E push ds 9070 0000A6B9 56 push si 9071 0000A6BA BE[D40A] mov si, pInDOS + so16aSegSel 9072 0000A6BD E80900 call update_dosdata_segment 9073 0000A6C0 C574FE lds si, [si - so16aSegSel] 9074 0000A6C3 803C00 cmp byte [si], 0 9075 0000A6C6 5E pop si 9076 0000A6C7 1F pop ds 9077 .return: 9078 0000A6C8 C3 retn 9079 9080 9081 ; INP: si -> word seg or sel, word segment, word selector 9082 update_dosdata_segment: 9083 0000A6C9 F606[A300]20 testopt [internalflags2], dif2_int31_segment 9084 0000A6CE 742C jz .ret 9085 0000A6D0 52 push dx 9086 0000A6D1 50 push ax 9087 0000A6D2 53 push bx 9088 0000A6D3 B031 mov al, 31h 9089 0000A6D5 E88F2A call get_86m_interrupt_handler_no_dos 9090 %if _PM 9091 0000A6D8 395402 cmp word [si + soaSegment], dx 9092 0000A6DB 7419 je @F 9093 9094 0000A6DD E8E9EA call ispm 9095 0000A6E0 750E jnz .realmode 9096 9097 0000A6E2 89D3 mov bx, dx 9098 0000A6E4 B80200 mov ax, 0002h 9099 0000A6E7 CD31 int 31h 9100 9101 0000A6E9 8904 mov word [si + soaSegSel], ax 9102 0000A6EB 894404 mov word [si + soaSelector], ax 9103 0000A6EE EB06 jmp @F 9104 9105 .realmode: 9106 0000A6F0 8914 mov word [si + soaSegSel], dx 9107 0000A6F2 83640400 and word [si + soaSelector], 0 9108 9109 @@: 9110 0000A6F6 895402 mov word [si + soaSegment], dx 9111 0000A6F9 5B pop bx 9112 0000A6FA 58 pop ax 9113 %else 9114 pop bx 9115 pop ax 9116 mov word [si + soaSegSel], dx 9117 %endif 9118 0000A6FB 5A pop dx 9119 .ret: 9120 0000A6FC C3 retn 9121 9122 9123 ; PARSECM - Parse command line for C and M commands. 9124 ; Entry AL First nonwhite character of parameters 9125 ; SI Address of the character after that 9126 ; Exit DS:ESI Address from first parameter 9127 ; ES:EDI Address from second parameter 9128 ; ECX Length of address range minus one 9129 ; [bAddr32] Set if any high word non-zero 9130 9131 parsecm: 9132 0000A6FD E81DFF call prephack 9133 0000A700 8B1E[840C] mov bx, word [reg_ds] ; get source range 9134 0000A704 31C9 xor cx, cx 9135 0000A706 E83101 call getrange ; get address range into bx:(e)dx bx:(e)cx 9136 0000A709 53 push bx ; save segment first address 9137 0000A70A E82012 call skipcomm0 9138 0000A70D 8B1E[840C] mov bx, word [reg_ds] 9139 0000A711 66 _386_PM_o32 ; sub ecx, edx 9140 0000A712 29D1 sub cx, dx ; number of bytes minus one 9141 0000A714 66 _386_PM_o32 ; push edx 9142 0000A715 52 push dx 9143 0000A716 66 _386_PM_o32 ; push ecx 9144 0000A717 51 push cx 9145 %if _PM 9146 0000A718 8A0E[DC88] mov cl, byte [bAddr32] 9147 0000A71C 51 push cx 9148 0000A71D E8F201 call getaddr ; get destination address into bx:edx 9149 0000A720 59 pop cx 9150 0000A721 080E[DC88] or byte [bAddr32], cl ; if either is 32-bit, handle both as 32-bit 9151 %else 9152 call getaddr ; get destination address into bx:dx 9153 %endif 9154 0000A725 66 _386_PM_o32 9155 0000A726 59 pop cx ; pop ecx 9156 0000A727 66 _386_PM_o32 ; mov edi, edx 9157 0000A728 89D7 mov di, dx 9158 0000A72A 66 _386_PM_o32 9159 0000A72B 01CA add dx, cx ; add edx, ecx 9160 0000A72D 7209 jc short errorj7 ; if it wrapped around 9161 0000A72F E8E911 call chkeol ; expect end of line 9162 0000A732 8EC3 mov es, bx 9163 0000A734 66 _386_PM_o32 ; pop esi 9164 0000A735 5E pop si 9165 0000A736 1F pop ds 9166 0000A737 C3 retn 9167 9168 errorj7: 9169 0000A738 E9A3FD jmp error 9170 9171 ; PARSELW - Parse command line for L and W commands. 9172 ; 9173 ; Entry AL First nonwhite character of parameters 9174 ; SI Address of the character after that 9175 ; 9176 ; Exit If there is at most one argument (program load/write), then the 9177 ; zero flag is set, and registers are set as follows: 9178 ; bx:(e)dx Transfer address 9179 ; 9180 ; If there are more arguments (absolute disk read/write), then the 9181 ; zero flag is clear, and registers are set as follows: 9182 ; 9183 ; DOS versions prior to 3.31: 9184 ; AL Drive number 9185 ; CX Number of sectors to read 9186 ; DX Beginning logical sector number 9187 ; DS:BX Transfer address 9188 ; 9189 ; Later DOS versions: 9190 ; AL Drive number 9191 ; BX Offset of packet 9192 ; CX 0FFFFh 9193 9194 usesection lDEBUG_DATA_ENTRY 9195 align 4, db 0 9196 00009060 00000000 packet: dd 0 ; sector number 9197 00009064 0000 dw 0 ; number of sectors to read 9198 00009066 00000000 dd 0 ; transfer address Segm:OOOO 9199 %if _PM 9200 0000906A 0000 dw 0 ; transfer address might be Segm:OOOOOOOO! 9201 %endif 9202 9203 usesection lDEBUG_CODE 9204 parselw: 9205 0000A73B 8B1E[900C] mov bx, word [reg_cs] ; default segment 9206 0000A73F 6631D2 _386 xor edx, edx 9207 0000A742 BA0001 mov dx, 100h ; default offset 9208 0000A745 E8BE11 call iseol? 9209 0000A748 7468 je plw2 ; if no arguments 9210 0000A74A E8C501 call getaddr ; get buffer address into bx:(e)dx 9211 0000A74D E8DD11 call skipcomm0 9212 0000A750 E8B311 call iseol? 9213 0000A753 745D je plw2 ; if only one argument 9214 0000A755 53 push bx ; save segment 9215 0000A756 52 push dx ; save offset 9216 0000A757 BB8000 mov bx, 80h ; max number of sectors to read 9217 0000A75A F7DA neg dx 9218 0000A75C 7406 jz plw1 ; if address is zero 9219 0000A75E B109 mov cl, 9 9220 0000A760 D3EA shr dx, cl ; max number of sectors which can be read 9221 0000A762 89D7 mov di, dx 9222 plw1: 9223 0000A764 803C3A cmp byte [si], ':' ; drive letter specification ? 9224 0000A767 750F jne @F ; no --> 9225 9226 0000A769 50 push ax 9227 0000A76A E8A2E4 call uppercase 9228 0000A76D 2C41 sub al, 'A' 9229 0000A76F 3C20 cmp al, 32 ; valid drive ? 9230 0000A771 88C2 mov dl, al ; put drive number 9231 0000A773 46 inc si ; -> past the colon 9232 0000A774 58 pop ax 9233 0000A775 7205 jb @FF ; got it --> 9234 0000A777 4E dec si ; -> at colon 9235 9236 @@: 9237 0000A778 E87810 call getbyte ; get drive number (DL) 9238 0000A77B A8 db __TEST_IMM8 ; (skip lodsb) 9239 @@: 9240 0000A77C AC lodsb 9241 0000A77D E8AD11 call skipcomm0 9242 0000A780 52 push dx 9243 0000A781 80C241 add dl, 'A' 9244 0000A784 8816[B979] mov byte [driveno], dl 9245 0000A788 E8740B call getdword ; get relative sector number 9246 0000A78B E89F11 call skipcomm0 9247 0000A78E 53 push bx ; save sector number high 9248 0000A78F 52 push dx ; save sector number low 9249 0000A790 56 push si ; in case we find an error 9250 0000A791 E85110 call getword ; get sector count 9251 0000A794 4A dec dx 9252 0000A795 39FA cmp dx, di 9253 0000A797 739F jae errorj7 ; if too many sectors 9254 0000A799 42 inc dx 9255 0000A79A 89D1 mov cx, dx 9256 0000A79C E87C11 call chkeol ; expect end of line 9257 0000A79F F606[9C00]07 testopt [internalflags], oldpacket| newpacket| ntpacket 9258 0000A7A4 750D jnz plw3 ; if using a packet --> 9259 0000A7A6 5E pop si ; in case of error 9260 0000A7A7 5A pop dx ; get LoWord starting logical sector number 9261 0000A7A8 5B pop bx ; get HiWord 9262 0000A7A9 85DB test bx, bx ; just a 16-bit sector number possible 9263 0000A7AB 758B jnz errorj7 ; if too big 9264 0000A7AD 58 pop ax ; drive number 9265 0000A7AE 5B pop bx ; transfer buffer ofs 9266 0000A7AF 1F pop ds ; transfer buffer seg 9267 0000A7B0 85C9 test cx, cx ; NZ 9268 plw2: 9269 0000A7B2 C3 retn 9270 9271 ; disk I/O packet for Int25/Int26, Int21.7305, VDD 9272 plw3: 9273 0000A7B3 5B pop bx ; discard si 9274 0000A7B4 BB[6090] mov bx, packet 9275 0000A7B7 8F07 pop word [bx+0] ; LoWord sector number 9276 0000A7B9 8F4702 pop word [bx+2] ; HiWord sector number 9277 0000A7BC 894F04 mov word [bx+4], cx ; number of sectors 9278 0000A7BF 58 pop ax ; drive number 9279 0000A7C0 8F4706 pop word [bx+6] ; transfer address ofs 9280 0000A7C3 5A pop dx 9281 0000A7C4 31C9 xor cx, cx 9282 %if _PM 9283 0000A7C6 E800EA call ispm 9284 0000A7C9 751B jnz plw3_1 9285 0000A7CB 803E[DA88]00 cmp byte [dpmi32], 0 9286 0000A7D0 7414 jz plw3_1 9287 [cpu 386] 9288 0000A7D2 89570A mov word [bx+10], dx ; save segment of transfer buffer 9289 0000A7D5 660FB7DB movzx ebx, bx 9290 0000A7D9 66C1EA10 shr edx, 16 ; get HiWord(offset) 9291 0000A7DD 803E[DC88]01 cmp byte [bAddr32], 1 9292 0000A7E2 7402 jz plw3_1 9293 0000A7E4 31D2 xor dx, dx 9294 __CPU__ 9295 plw3_1: 9296 %endif 9297 0000A7E6 895708 mov word [bx+8], dx ; transfer address seg 9298 0000A7E9 49 dec cx ; NZ and make cx = -1 9299 0000A7EA C3 retn 9300 9301 9302 %include "expr.asm" 9303 <1> 9304 <1> %if 0 9305 <1> 9306 <1> lDebug expression evaluator 9307 <1> 9308 <1> Copyright (C) 1995-2003 Paul Vojta 9309 <1> Copyright (C) 2008-2012 C. Masloch 9310 <1> 9311 <1> Usage of the works is permitted provided that this 9312 <1> instrument is retained with the works, so that any entity 9313 <1> that uses the works is notified of this instrument. 9314 <1> 9315 <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 9316 <1> 9317 <1> %endif 9318 <1> 9319 <1> 9320 <1> usesection lDEBUG_CODE 9321 <1> 9322 <1> ;--- get a valid offset for segment in BX 9323 <1> 9324 <1> ; INP: bx = segment 9325 <1> ; al = first character, si -> next character 9326 <1> ; ah = 1 if might be a segment or pointer 9327 <1> ; ah = 0 if must be an offset 9328 <1> ; OUT: CY if pointer type return, bx:dx = pointer 9329 <1> ; DebugX on a 386: 9330 <1> ; edx = offset (even if 16-bit PM/86M segment) 9331 <1> ; ah = 1 if a 32-bit segment, 0 if a 16-bit segment 9332 <1> ; DebugX otherwise: 9333 <1> ; dx = offset 9334 <1> ; ah = 0 9335 <1> ; Debug: 9336 <1> ; dx = offset 9337 <1> ; al, si refer to next part of command line 9338 <1> ; CHG: Debug: ah, DebugX: - 9339 <1> ; REM: The byte [bAddr32] is no longer changed by this 9340 <1> ; function. The caller has to use the status that 9341 <1> ; is returned in ah, if desired. 9342 <1> getofsforbx: 9343 0000A7EB 51 <1> push cx ; preserve 9344 0000A7EC 53 <1> push bx ; preserve 9345 0000A7ED 88E5 <1> mov ch, ah ; ch = 0 if must be an offset 9346 <1> %if _PM 9347 0000A7EF 6631D2 <1> _386 xor edx, edx ; properly initialize high word 9348 0000A7F2 E83FB5 <1> call test_d_b_bit 9349 0000A7F5 740E <1> jz .16 ; 16-bit segment --> 9350 <1> [cpu 386] 9351 0000A7F7 E8050B <1> call getdword 9352 0000A7FA 53 <1> push bx 9353 0000A7FB 52 <1> push dx 9354 0000A7FC 665A <1> pop edx ; edx = 32-bit offset 9355 0000A7FE E81300 <1> call checkpointer 9356 0000A801 B401 <1> mov ah, 1 ; return 32-bit offset flag 9357 0000A803 EB0B <1> jmp .ret_pop_NC 9358 <1> __CPU__ 9359 <1> %endif 9360 <1> 9361 <1> .16: 9362 0000A805 E8F70A <1> call getexpression 9363 0000A808 E80900 <1> call checkpointer 9364 0000A80B E8DC0F <1> call getword.checksignificantbits 9365 <1> %if _PM 9366 0000A80E B400 <1> mov ah, 0 ; return 16-bit offset flag 9367 <1> %endif 9368 <1> .ret_pop_NC: 9369 0000A810 5B <1> pop bx 9370 0000A811 59 <1> pop cx ; restore 9371 0000A812 F8 <1> clc 9372 0000A813 C3 <1> retn 9373 <1> 9374 <1> checkpointer: 9375 0000A814 84E4 <1> test ah, ah ; pointer type ? 9376 0000A816 790E <1> jns .ret ; no --> 9377 0000A818 84ED <1> test ch, ch ; can be a pointer or segment ? 9378 0000A81A 740B <1> jz errorj10 ; no --> 9379 0000A81C 59 <1> pop cx ; discard a near return address 9380 0000A81D 59 <1> pop cx ; discard bx 9381 0000A81E 59 <1> pop cx ; restore cx 9382 <1> %if _PM 9383 0000A81F 660FB7D2 <1> _386 movzx edx, dx ; edx = dx 9384 0000A823 B400 <1> mov ah, 0 ; always treat as 16-bit offset 9385 <1> %endif 9386 0000A825 F9 <1> stc ; return a pointer type 9387 0000A826 C3 <1> .ret: retn 9388 <1> 9389 0000A827 E9B4FC <1> errorj10: jmp error 9390 <1> 9391 <1> 9392 <1> ; GETRANGE - Get address range from input line. 9393 <1> ; a range consists of either start and end address 9394 <1> ; or a start address, a 'L' and a length. 9395 <1> ; Entry AL First character of range 9396 <1> ; SI Address of next character 9397 <1> ; BX Default segment to use 9398 <1> ; CX Default length to use (or 0 if not allowed) 9399 <1> ; Exit AL First character beyond range 9400 <1> ; SI Address of the character after that 9401 <1> ; BX:(E)DX First address in range 9402 <1> ; BX:(E)CX Last address in range 9403 <1> ; Uses AH 9404 <1> 9405 <1> getrangeX: 9406 <1> %if _PM 9407 0000A82A 8026[A700]FB <1> clropt [internalflags3], dif3_accept_getrange_0 9408 0000A82F 660FB7C9 <1> _386 movzx ecx, cx 9409 <1> .ecx_and_0_valid: 9410 0000A833 66 <1> _386_PM_o32 9411 0000A834 51 <1> push cx 9412 0000A835 E8E000 <1> call getaddrX 9413 0000A838 EB0E <1> jmp short getrange.common 9414 <1> %else 9415 <1> .ecx_and_0_valid: equ getrange.ecx_and_0_valid 9416 <1> %endif 9417 <1> 9418 <1> getrange: 9419 0000A83A 8026[A700]FB <1> clropt [internalflags3], dif3_accept_getrange_0 9420 0000A83F 660FB7C9 <1> _386_PM movzx ecx, cx 9421 <1> .ecx_and_0_valid: 9422 0000A843 66 <1> _386_PM_o32 9423 0000A844 51 <1> push cx ; save the default length 9424 0000A845 E8CA00 <1> call getaddr ; get address into bx:(e)dx (sets bAddr32) (returns edx) 9425 <1> .common: 9426 0000A848 56 <1> push si 9427 0000A849 E8E110 <1> call skipcomm0 9428 0000A84C E8B710 <1> call iseol? 9429 0000A84F 753E <1> jne gr2 9430 0000A851 5E <1> pop si ; restore si and cx 9431 0000A852 66 <1> _386_PM_o32 9432 0000A853 59 <1> pop cx 9433 0000A854 4E <1> dec si ; restore al 9434 0000A855 AC <1> lodsb 9435 0000A856 F606[A700]04 <1> testopt [internalflags3], dif3_accept_getrange_0 9436 0000A85B 7503 <1> jnz @F 9437 0000A85D 67 <1> _386_PM_a32 9438 0000A85E E3C7 <1> jcxz errorj10 ; if a range is mandatory 9439 <1> @@: 9440 0000A860 30E4 <1> xor ah, ah 9441 <1> gr3.addcheck: 9442 0000A862 803E[DC88]00 <1> _386_PM cmp byte [bAddr32], 0 9443 0000A867 740D <1> _386_PM je .16 9444 0000A869 6649 <1> _386_PM dec ecx 9445 0000A86B 6601D1 <1> _386_PM add ecx, edx 9446 0000A86E 731E <1> _386_PM jnc gr1 ; if no wraparound 9447 0000A870 6683C9FF <1> _386_PM or ecx, byte -1 ; go to end of segment 9448 0000A874 EB14 <1> _386_PM jmp short .checkgr3 9449 <1> .16: 9450 0000A876 6681F9FFFF0000 <1> _386_PM cmp ecx, 0FFFFh ; was high ? 9451 0000A87D 7603 <1> _386_PM jbe @F ; no --> (ecxh = 0) 9452 0000A87F 6631C9 <1> _386_PM xor ecx, ecx ; ecxh = 0 and prepare so as to 9453 <1> ; result in cx = FFFFh after dec 9454 <1> @@: 9455 0000A882 49 <1> dec cx 9456 0000A883 01D1 <1> add cx, dx 9457 0000A885 7307 <1> jnc gr1 ; if no wraparound 9458 0000A887 B9FFFF <1> mov cx, -1 ; go to end of segment 9459 <1> .checkgr3: 9460 0000A88A 84E4 <1> test ah, ah 9461 0000A88C 7599 <1> jnz short errorj10 ; if specified length wrapped --> 9462 <1> gr1: 9463 0000A88E C3 <1> retn 9464 <1> 9465 <1> gr2: 9466 0000A88F 83C402 <1> _386_PM add sp, byte 2 ; for the ecxh on stack 9467 0000A892 83C404 <1> add sp, byte 4 ; discard saved cx, si 9468 0000A895 E877E3 <1> call uppercase 9469 0000A898 3C4C <1> cmp al, 'L' 9470 0000A89A 7414 <1> je gr3 ; if a range is given 9471 <1> ; call skipwh0 ; get next nonblank 9472 0000A89C 66 <1> _386_PM_o32 ; xchg ecx, edx 9473 0000A89D 87CA <1> xchg cx, dx 9474 0000A89F B400 <1> mov ah, 0 ; must be offset 9475 0000A8A1 E8D800 <1> call getofsforbx_remember_bitness 9476 <1> ; (DebugX: returns edx no matter what) 9477 0000A8A4 66 <1> _386_PM_o32 ; xchg ecx, edx 9478 0000A8A5 87CA <1> xchg cx, dx 9479 0000A8A7 66 <1> _386_PM_o32 ; cmp edx, ecx 9480 0000A8A8 39CA <1> cmp dx, cx 9481 0000A8AA 7603E9A500 <1> ja errorj2 ; if empty range --> 9482 0000A8AF C3 <1> retn 9483 <1> 9484 <1> gr3: 9485 0000A8B0 4E <1> dec si ; -> at 'L' 9486 0000A8B1 52 <1> push dx 9487 0000A8B2 BA[F966] <1> mov dx, msg.length 9488 0000A8B5 E8EF0F <1> call isstring? 9489 0000A8B8 5A <1> pop dx 9490 0000A8B9 7501 <1> jne .notlength 9491 0000A8BB A8 <1> db __TEST_IMM8 ; (skip inc, si -> terminator after "LENGTH") 9492 <1> .notlength: 9493 0000A8BC 46 <1> inc si ; -> behind 'L' 9494 0000A8BD E86C10 <1> call skipcomma ; discard the 'L' 9495 <1> ;--- a range is entered with the L/ength argument 9496 <1> ;--- get a valid length for segment in BX 9497 0000A8C0 52 <1> push dx 9498 0000A8C1 53 <1> push bx 9499 0000A8C2 E86FB4 <1> _386_PM call test_d_b_bit 9500 0000A8C5 9C <1> _386_PM pushf 9501 0000A8C6 E8360A <1> call getdword 9502 <1> 9503 0000A8C9 4E <1> dec si 9504 0000A8CA 52 <1> push dx 9505 0000A8CB B90200 <1> mov cx, 2 ; shift count = 2 (do times 4) 9506 0000A8CE BA[EC66] <1> mov dx, msg.dwords 9507 0000A8D1 E8D30F <1> call isstring? 9508 0000A8D4 7410 <1> je .gotsize 9509 0000A8D6 49 <1> dec cx ; shift count = 1 9510 0000A8D7 BA[ED66] <1> mov dx, msg.words 9511 0000A8DA E8CA0F <1> call isstring? 9512 0000A8DD 7407 <1> je .gotsize 9513 0000A8DF 49 <1> dec cx ; shift count = 0 9514 0000A8E0 BA[F366] <1> mov dx, msg.bytes 9515 0000A8E3 E8C10F <1> call isstring? 9516 <1> ; je .gotsize 9517 <1> .gotsize: ; si -> terminator after length unit 9518 <1> ; (or -> after expression if no unit) 9519 0000A8E6 5A <1> pop dx 9520 0000A8E7 E30B <1> jcxz .noshift ; "BYTES" or no unit given --> 9521 <1> .shiftloop: 9522 0000A8E9 D1E2 <1> shl dx, 1 9523 0000A8EB D1D3 <1> rcl bx, 1 9524 0000A8ED 7303E9ECFB <1> jc error ; too large --> 9525 0000A8F2 E2F5 <1> loop .shiftloop ; loop shifting (if it was shift count = 2) 9526 <1> .noshift: 9527 0000A8F4 AC <1> lodsb ; al = next character, si -> after that 9528 0000A8F5 9D <1> _386_PM popf 9529 0000A8F6 740B <1> _386_PM jz .not16_64kib ; don't check for <= 64 KiB 9530 0000A8F8 83FB01 <1> cmp bx, byte 1 9531 0000A8FB 7206 <1> jb .not16_64kib ; < 64 KiB in 16-bit segment --> 9532 0000A8FD 7555 <1> jne short errorj2 ; 16-bit segment, above 64 KiB --> 9533 0000A8FF 85D2 <1> test dx, dx 9534 0000A901 7551 <1> jnz short errorj2 ; 16-bit segment, above 64 KiB --> 9535 <1> .not16_64kib: 9536 <1> %if _PM 9537 0000A903 53 <1> _386 push bx ; (only push high word on 386+) 9538 0000A904 52 <1> push dx 9539 0000A905 66 <1> _386_o32 ; pop ecx ; mov ecx, bxdx 9540 0000A906 59 <1> pop cx ; mov cx, dx 9541 <1> %else 9542 <1> mov cx, dx 9543 <1> %endif 9544 0000A907 09D3 <1> or bx, dx ; zero ? 9545 0000A909 7449 <1> jz short errorj2 ; yes, error --> 9546 0000A90B 5B <1> pop bx 9547 0000A90C 5A <1> pop dx 9548 0000A90D B401 <1> mov ah, 1 9549 0000A90F E950FF <1> jmp .addcheck 9550 <1> 9551 <1> %ifn _PM 9552 <1> errorj2: 9553 <1> jmp error 9554 <1> %endif 9555 <1> 9556 <1> 9557 <1> ; GETADDR - Get address from input line. 9558 <1> ; Entry AL First character of address 9559 <1> ; SI Address of next character 9560 <1> ; BX Default segment to use 9561 <1> ; Exit AL First character beyond address 9562 <1> ; SI Address of the character after that 9563 <1> ; BX:(E)DX Address found 9564 <1> ; Uses AH,CX 9565 <1> 9566 <1> getaddr: 9567 <1> %if _PM 9568 0000A912 E80300 <1> call getaddrX 9569 0000A915 E972EF <1> jmp verifysegm ; make BX a writeable segment 9570 <1> 9571 <1> ; getaddrX differs from getaddr in that BX is not ensured 9572 <1> ; to be writeable in PM. 9573 <1> ; 9574 <1> ; For DEBUG without PM support, getaddr is getaddrX. Both don't return CF. 9575 <1> 9576 <1> getaddrX: 9577 0000A918 C606[DC88]00 <1> mov byte [bAddr32], 0 9578 0000A91D 3C24 <1> cmp al, '$' ; a real-mode segment? 9579 0000A91F 7536 <1> jne ga1_1 9580 0000A921 AC <1> lodsb 9581 <1> 9582 0000A922 6631D2 <1> _386 xor edx, edx ; edxh = 0 9583 0000A925 E8D709 <1> call getexpression 9584 0000A928 84E4 <1> test ah, ah ; pointer type ? 9585 0000A92A 7911 <1> jns @F 9586 <1> 9587 0000A92C E89AE8 <1> call ispm ; need to translate ? 9588 0000A92F 750B <1> jnz .ret ; no --> 9589 <1> ; bx = segment 9590 <1> ; after falling through we get bx:(e)dx = segmented address 9591 <1> 9592 <1> seg_bx_to_sel: equ $ ; (no base for local labels) 9593 0000A931 50 <1> push ax 9594 0000A932 B80200 <1> mov ax, 0002h 9595 0000A935 CD31 <1> int 31h 9596 0000A937 721B <1> jc short errorj2 9597 0000A939 89C3 <1> mov bx, ax ; bx = segment 9598 0000A93B 58 <1> pop ax 9599 <1> .ret: 9600 0000A93C C3 <1> retn 9601 <1> 9602 <1> @@: 9603 0000A93D E8AA0E <1> call getword.checksignificantbits 9604 0000A940 E886E8 <1> call ispm ; need to translate ? 9605 0000A943 7507 <1> jnz .checkseg ; no --> 9606 0000A945 89D3 <1> mov bx, dx 9607 0000A947 E8E7FF <1> call seg_bx_to_sel 9608 0000A94A 89DA <1> mov dx, bx 9609 <1> .checkseg: 9610 0000A94C 56 <1> push si 9611 0000A94D E80C10 <1> call skipwh0 9612 0000A950 3C3A <1> cmp al, ':' ; was a segment at all? 9613 0000A952 7420 <1> je ga2_2 ; yes --> 9614 <1> errorj2: 9615 0000A954 E987FB <1> jmp error 9616 <1> %else 9617 <1> getaddrX: 9618 <1> cmp al, '$' 9619 <1> jne ga1_1 9620 <1> lodsb 9621 <1> call getexpression 9622 <1> test ah, ah ; pointer type ? 9623 <1> js .ret ; return bx:dx = segmented address 9624 <1> push ax ; (unused) 9625 <1> call getword.checksignificantbits 9626 <1> call skipwh0 9627 <1> cmp al, ':' 9628 <1> je ga2_2 9629 <1> jmp error 9630 <1> 9631 <1> .ret: 9632 <1> retn 9633 <1> %endif 9634 <1> ga1_1: 9635 0000A957 B401 <1> mov ah, 1 ; might be a pointer type 9636 0000A959 E88FFE <1> call getofsforbx 9637 0000A95C 720B <1> jc .ret 9638 0000A95E 56 <1> push si 9639 0000A95F E8FA0F <1> call skipwh0 9640 0000A962 3C3A <1> cmp al, ':' 9641 0000A964 7405 <1> je ga2 ; if this is a segment/selector --> 9642 0000A966 5E <1> pop si 9643 0000A967 4E <1> dec si 9644 0000A968 AC <1> lodsb 9645 <1> .ret: 9646 <1> %if _PM 9647 0000A969 EB14 <1> jmp short remember_bitness 9648 <1> ; remember 32-bitness (only if no segment) 9649 <1> %else 9650 <1> retn 9651 <1> %endif 9652 <1> 9653 <1> ga2: 9654 0000A96B 6681FA00000100 <1> _386_PM cmp edx, 0001_0000h ; segment/selector fits in word ? 9655 0000A972 73E0 <1> _386_PM jae short errorj2 ; no --> 9656 <1> ga2_2: 9657 0000A974 58 <1> pop ax ; throw away saved si 9658 0000A975 89D3 <1> mov bx, dx ; mov segment into BX 9659 0000A977 E8E10F <1> call skipwhite ; skip to next word 9660 0000A97A B400 <1> mov ah, 0 ; must be an offset 9661 <1> %if _PM 9662 <1> getofsforbx_remember_bitness: 9663 0000A97C E86CFE <1> call getofsforbx 9664 <1> remember_bitness: 9665 0000A97F 0826[DC88] <1> or byte [bAddr32], ah ; remember 32-bitness 9666 0000A983 C3 <1> retn 9667 <1> %else 9668 <1> jmp getofsforbx 9669 <1> 9670 <1> getofsforbx_remember_bitness: equ getofsforbx 9671 <1> %endif 9672 <1> 9673 <1> 9674 <1> ; GETSTR - Get string of bytes. Put the answer in line_out. 9675 <1> ; Entry AL first character 9676 <1> ; SI address of next character 9677 <1> ; Exit [line_out] first byte of string 9678 <1> ; DI address of last+1 byte of string 9679 <1> ; Uses AX,CL,DL,SI 9680 <1> 9681 <1> getstr: 9682 0000A984 BF[0E08] <1> mov di, line_out 9683 0000A987 E87C0F <1> call iseol? 9684 0000A98A 74C8 <1> je short errorj2 ; we don't allow empty byte strings 9685 <1> gs1: 9686 0000A98C 3C27 <1> cmp al, "'" 9687 0000A98E 740C <1> je gs2 ; if string 9688 0000A990 3C22 <1> cmp al, '"' 9689 0000A992 7408 <1> je gs2 ; ditto 9690 0000A994 E85C0E <1> call getbyte ; byte in DL 9691 0000A997 8815 <1> mov byte [di], dl ; store the byte 9692 0000A999 47 <1> inc di 9693 0000A99A EB14 <1> jmp short gs6 9694 <1> 9695 <1> gs2: 9696 0000A99C 88C4 <1> mov ah, al ; save quote character 9697 <1> gs3: 9698 0000A99E AC <1> lodsb 9699 0000A99F 38E0 <1> cmp al, ah 9700 0000A9A1 7408 <1> je gs5 ; if possible end of string 9701 0000A9A3 E8640F <1> call iseol?.notsemicolon 9702 0000A9A6 74AC <1> je short errorj2 ; if end of line 9703 <1> gs4: 9704 0000A9A8 AA <1> stosb ; save character and continue 9705 0000A9A9 EBF3 <1> jmp short gs3 9706 <1> 9707 <1> gs5: 9708 0000A9AB AC <1> lodsb 9709 0000A9AC 38E0 <1> cmp al, ah 9710 0000A9AE 74F8 <1> je gs4 ; if doubled quote character 9711 <1> gs6: 9712 0000A9B0 E87A0F <1> call skipcomm0 ; go back for more 9713 0000A9B3 E8500F <1> call iseol? 9714 0000A9B6 75D4 <1> jne gs1 ; if not done yet 9715 <1> .ret: 9716 0000A9B8 C3 <1> retn 9717 <1> 9718 <1> isbracketorunaryoperator?: 9719 0000A9B9 E80900 <1> call isunaryoperator? 9720 0000A9BC 7406 <1> je .yes 9721 <1> %if _INDIRECTION 9722 0000A9BE 3C5B <1> cmp al, '[' 9723 0000A9C0 7402 <1> je .yes 9724 <1> %endif 9725 0000A9C2 3C28 <1> cmp al, '(' 9726 <1> .yes: 9727 0000A9C4 C3 <1> retn 9728 <1> 9729 <1> 9730 <1> ; Is al one of the simple unary operators? 9731 <1> ; OUT: NZ if not 9732 <1> ; ZR if so, 9733 <1> ; NC 9734 <1> ; cx = index into unaryoperators 9735 <1> isunaryoperator?: 9736 0000A9C5 57 <1> push di 9737 0000A9C6 BF[9E90] <1> mov di, unaryoperators 9738 0000A9C9 EB04 <1> jmp short isoperator?.common 9739 <1> 9740 <1> ; See previous description. 9741 <1> isoperator?: 9742 0000A9CB 57 <1> push di 9743 0000A9CC BF[8890] <1> mov di, operators 9744 <1> .common: 9745 0000A9CF 8B0D <1> mov cx, word [di] 9746 0000A9D1 51 <1> push cx 9747 0000A9D2 AF <1> scasw 9748 0000A9D3 F2AE <1> repne scasb 9749 0000A9D5 5F <1> pop di 9750 0000A9D6 7507 <1> jne .no 9751 0000A9D8 F7D9 <1> neg cx 9752 0000A9DA 01F9 <1> add cx, di 9753 0000A9DC 49 <1> dec cx 9754 0000A9DD 38C0 <1> cmp al, al ; NC, ZR 9755 <1> .no: 9756 0000A9DF 5F <1> pop di 9757 0000A9E0 C3 <1> retn 9758 <1> 9759 <1> 9760 <1> ; INP: al = character 9761 <1> ; OUT: al = capitalised character 9762 <1> ; ZR, NC if a separator 9763 <1> ; NZ if no separator 9764 <1> isseparator?: 9765 <1> .: 9766 0000A9E1 E82BE2 <1> call uppercase 9767 0000A9E4 51 <1> push cx 9768 <1> %if _EXPRESSIONS 9769 0000A9E5 3C41 <1> cmp al, 'A' 9770 0000A9E7 7204 <1> jb @F 9771 0000A9E9 3C5A <1> cmp al, 'Z' 9772 0000A9EB 7605 <1> jbe @FF 9773 <1> @@: 9774 0000A9ED E8DBFF <1> call isoperator? ; normal operators are separators (also handles equality sign) 9775 0000A9F0 740A <1> je .yes ; if match --> (ZR, NC) 9776 <1> @@: 9777 <1> %endif 9778 0000A9F2 57 <1> push di 9779 0000A9F3 BF[9495] <1> mov di, separators 9780 0000A9F6 8B0D <1> mov cx, word [di] 9781 0000A9F8 AF <1> scasw 9782 0000A9F9 F2AE <1> repne scasb ; ZR, NC on match, NZ else 9783 0000A9FB 5F <1> pop di 9784 <1> .yes: 9785 0000A9FC 59 <1> pop cx 9786 0000A9FD C3 <1> retn 9787 <1> 9788 <1> ; INP: al = character 9789 <1> ; OUT: al = capitalised character 9790 <1> ; ZR, NC if a separator (not L or dot) 9791 <1> ; NZ if no separator (including L or dot) 9792 <1> .except_L_or_dot: 9793 0000A9FE E80EE2 <1> call uppercase 9794 0000AA01 3C2E <1> cmp al, '.' 9795 0000AA03 7404 <1> je .ret_NZ 9796 0000AA05 3C4C <1> cmp al, 'L' 9797 0000AA07 75D8 <1> jne . 9798 <1> .ret_NZ: 9799 0000AA09 84C0 <1> test al, al 9800 0000AA0B C3 <1> retn 9801 <1> 9802 <1> 9803 <1> ; Does one of the type operators start in input? 9804 <1> ; 9805 <1> ; INP: al = first character 9806 <1> ; si-> next character 9807 <1> ; OUT: Iff NC, 9808 <1> ; bx>>1 = offset into typebitmasks and typehandlers tables 9809 <1> ; bx&1 = set iff signed type 9810 <1> ; di-> behind the type operator 9811 <1> ; CHG: bx, cx, di 9812 <1> ; 9813 <1> ; Note: Signed types are specified by an S prefix to 9814 <1> ; the type names. Only non-address types can 9815 <1> ; be signed (that is, offset, segment, and 9816 <1> ; pointer cannot be signed). 9817 <1> ; Types can be specified with abbreviated names, 9818 <1> ; except where that would clash with numeric 9819 <1> ; input or a register name or ambiguity would 9820 <1> ; be caused. These cases are: 9821 <1> ; SS, S (short, seg, signed, ss) 9822 <1> ; B (byte, numeric 0Bh) 9823 <1> ; C (char, numeric 0Ch) 9824 <1> ; D (dword, numeric 0Dh) 9825 <1> ; 3 (3byte, numeric 3) 9826 <1> ; 3B (3byte, numeric 3Bh) 9827 <1> ; CH (char, register ch) 9828 <1> istype?: 9829 <1> %if maxtypesize & 1 9830 0000AA0C B90800 <1> mov cx, maxtypesize+1 ; = maximum count + 1 9831 <1> %else 9832 <1> mov cx, maxtypesize ; = maximum count 9833 <1> %endif 9834 <1> ; cx is even here! 9835 0000AA0F 52 <1> push dx 9836 0000AA10 50 <1> push ax 9837 0000AA11 56 <1> push si 9838 <1> 9839 0000AA12 29CC <1> sub sp, cx ; allocate name buffer 9840 0000AA14 89E7 <1> mov di, sp ; -> name buffer 9841 0000AA16 57 <1> push di 9842 0000AA17 31DB <1> xor bx, bx ; initialise count 9843 <1> %ifn maxtypesize & 1 9844 <1> inc cx ; = maximum count + 1 9845 <1> %endif 9846 <1> ; The +1 does not represent an off-by-one 9847 <1> ; because the below loop stores to the 9848 <1> ; buffer at the beginning of subsequent 9849 <1> ; iterations, after checking cx. 9850 <1> 9851 0000AA19 A9 <1> db __TEST_IMM16 ; (skip stosb and lodsb) 9852 <1> .storename: 9853 0000AA1A AA <1> stosb ; store in name buffer 9854 0000AA1B AC <1> lodsb ; get next character to check 9855 0000AA1C E8F0E1 <1> call uppercase 9856 0000AA1F 51 <1> push cx 9857 0000AA20 E896FF <1> call isbracketorunaryoperator? ; terminator ? 9858 0000AA23 59 <1> pop cx 9859 0000AA24 7413 <1> je .endname 9860 0000AA26 E8DD0E <1> call iseol? 9861 0000AA29 740E <1> je .endname 9862 0000AA2B 3C20 <1> cmp al, 32 9863 0000AA2D 740A <1> je .endname 9864 0000AA2F 3C09 <1> cmp al, 9 9865 0000AA31 7406 <1> je .endname ; yes --> 9866 <1> ; We don't check for digits here. 9867 <1> ; Immediate values and variables 9868 <1> ; must leave a space inbetween. 9869 0000AA33 43 <1> inc bx ; count characters 9870 0000AA34 E2E4 <1> loop .storename ; count remaining buffer space 9871 <1> ; Here, the potential name was too 9872 <1> ; long for a valid type name. 9873 0000AA36 F9 <1> stc 9874 0000AA37 EB1F <1> jmp short .done ; --> 9875 <1> 9876 <1> .endname: 9877 0000AA39 E8200F <1> call skipwh0 ; skip to next field 9878 0000AA3C 4E <1> dec si ; -> behind potential name 9879 0000AA3D 5F <1> pop di ; -> name buffer 9880 0000AA3E 89D9 <1> mov cx, bx ; cx = length 9881 0000AA40 56 <1> push si ; save position in input line 9882 0000AA41 89FE <1> mov si, di ; si-> name buffer 9883 0000AA43 53 <1> push bx 9884 0000AA44 57 <1> push di 9885 0000AA45 F8 <1> clc ; indicate unsigned check 9886 0000AA46 E81900 <1> call isunsignedtype? ; matches an unsigned type ? 9887 0000AA49 5E <1> pop si 9888 0000AA4A 59 <1> pop cx 9889 0000AA4B 730B <1> jnc .done ; yes --> 9890 <1> 9891 0000AA4D AC <1> lodsb ; al = first, si-> second character 9892 0000AA4E 49 <1> dec cx ; cx = length less one 9893 0000AA4F 3C53 <1> cmp al, 'S' ; first character an "S" ? 9894 0000AA51 F9 <1> stc ; (indicate signed check, or: no type) 9895 0000AA52 7504 <1> jne .done ; no, not signed either --> 9896 0000AA54 E80B00 <1> call isunsignedtype? ; matches an unsigned type now ? 9897 0000AA57 43 <1> inc bx ; if NC, set to indicate signed type 9898 <1> .done: 9899 0000AA58 9F <1> lahf 9900 0000AA59 5F <1> pop di ; if NC, -> behind matched type name 9901 0000AA5A 83C408 <1> add sp, (maxtypesize+1) & ~1 ; discard name buffer 9902 0000AA5D 5E <1> pop si 9903 0000AA5E 9E <1> sahf 9904 0000AA5F 58 <1> pop ax 9905 0000AA60 5A <1> pop dx 9906 0000AA61 C3 <1> retn 9907 <1> 9908 <1> ; Does one of the unsigned type operators start in buffer? 9909 <1> ; 9910 <1> ; INP: si-> name buffer with capitalised potential name 9911 <1> ; cx = length of potential name 9912 <1> ; CY iff looking for signed type 9913 <1> ; OUT: Iff NC, 9914 <1> ; bx>>1 = offset into typebitmasks and typehandlers tables 9915 <1> ; bx&1 = 0 9916 <1> ; CHG: ax, bx, cx, dx, si, di 9917 <1> isunsignedtype?: 9918 0000AA62 BF[9480] <1> mov di, types 9919 0000AA65 19D2 <1> sbb dx, dx ; 0FFFFh if signed check else 0 9920 0000AA67 E351 <1> jcxz .notype ; if zero characters --> 9921 0000AA69 83F902 <1> cmp cx, 2 9922 0000AA6C 750C <1> jne @F 9923 0000AA6E 813C4348 <1> cmp word [si], "CH" 9924 0000AA72 7446 <1> je .notype 9925 0000AA74 813C3342 <1> cmp word [si], "3B" 9926 0000AA78 7440 <1> je .notype 9927 <1> @@: 9928 0000AA7A E214 <1> loop .single_character_checked ; if not single character --> 9929 <1> 9930 0000AA7C AC <1> lodsb ; get that character 9931 0000AA7D 3C53 <1> cmp al, 'S' ; specified "S" or "SS" ? 9932 0000AA7F 7439 <1> je .notype ; yes, not allowed --> 9933 0000AA81 08D0 <1> or al, dl ; iff signed check, al |= 0FFh 9934 0000AA83 4E <1> dec si ; (restore) 9935 0000AA84 3C33 <1> cmp al, '3' 9936 0000AA86 7432 <1> je .notype 9937 0000AA88 3C41 <1> cmp al, 'A' ; specified only a valid digit ? 9938 0000AA8A 7204 <1> jb .single_character_checked 9939 0000AA8C 3C47 <1> cmp al, 'F'+1 9940 0000AA8E 722A <1> jb .notype ; yes, not allowed --> 9941 <1> 9942 <1> .single_character_checked: 9943 0000AA90 41 <1> inc cx ; (restore) 9944 0000AA91 83E2E1 <1> and dx, types.addresses-types.end ; = 0 iff unsigned check 9945 0000AA94 31C0 <1> xor ax, ax ; initialise ah, and ax = 0 first 9946 0000AA96 31DB <1> xor bx, bx 9947 0000AA98 87FE <1> xchg di, si 9948 0000AA9A 81C2[DF80] <1> add dx, types.end ; = .addresses for signed check, 9949 <1> ; = .end for unsigned check 9950 <1> 9951 <1> ; Before each iteration, 9952 <1> ; si-> byte-counted next name to check 9953 <1> ; di-> potential name (in name buffer) 9954 <1> ; cx = cl = length of potential name 9955 <1> ; (dx-1) = maximum value for si 9956 <1> ; ah = 0 9957 <1> ; Before the first iteration additionally, 9958 <1> ; bx&~3 = index to return for this name (if match) 9959 <1> ; al = 0 9960 <1> ; Before subsequent iterations additionally, 9961 <1> ; (bx+2)&~3 = index to return for this name (if match) 9962 <1> ; al = offset to add to si first 9963 0000AA9E A9 <1> db __TEST_IMM16 ; (skip two times inc bx) 9964 <1> .loop: 9965 0000AA9F 43 <1> inc bx 9966 0000AAA0 43 <1> inc bx ; increase index 9967 0000AAA1 01C6 <1> add si, ax ; -> next table entry 9968 0000AAA3 AC <1> lodsb ; ax = length of full name 9969 0000AAA4 39D6 <1> cmp si, dx ; checked all allowed names? 9970 0000AAA6 7312 <1> jae .notype ; yes, done --> 9971 0000AAA8 39C8 <1> cmp ax, cx ; full name large enough ? 9972 0000AAAA 72F3 <1> jb .loop ; no --> 9973 0000AAAC 57 <1> push di 9974 0000AAAD 51 <1> push cx 9975 0000AAAE 56 <1> push si 9976 0000AAAF F3A6 <1> repe cmpsb ; potential name matches ? 9977 0000AAB1 5E <1> pop si 9978 0000AAB2 59 <1> pop cx 9979 0000AAB3 5F <1> pop di 9980 0000AAB4 75E9 <1> jne .loop ; no --> 9981 <1> 9982 0000AAB6 80E3FC <1> and bl, ~3 ; conflate alternative type names 9983 0000AAB9 A8 <1> db __TEST_IMM8 ; (NC, skip stc) 9984 <1> .notype: 9985 0000AABA F9 <1> stc 9986 0000AABB C3 <1> retn 9987 <1> 9988 <1> 9989 <1> usesection lDEBUG_DATA_ENTRY 9990 <1> 9991 <1> ; Table of bit masks and shift counts to determine 9992 <1> ; how a type modifies the bit mask of required bytes. 9993 <1> ; 9994 <1> ; It would be possible to always retrieve a full dword 9995 <1> ; from memory to process indirection in expressions, 9996 <1> ; but this could fault if accessing inexistent data. 9997 <1> ; Hence the debugger should minimise memory access. 9998 <1> ; For this reason, types allow the expression evaluator 9999 <1> ; to keep track which of the term's bytes are actually 10000 <1> ; going to be used. The bit mask of required bytes 10001 <1> ; indicates which bytes are not discarded by any of a 10002 <1> ; term's type operators. 10003 <1> ; 10004 <1> ; The second byte of each entry (applied to ch by the 10005 <1> ; reader, ie high byte of cx) indicates a mask to 10006 <1> ; apply to the bit mask of required bytes. Note that 10007 <1> ; this mask is applied first, before the shift that's 10008 <1> ; described next. 10009 <1> ; The first byte of each entry (loaded into cl by the 10010 <1> ; reader, ie low byte of cx) indicates a shift left 10011 <1> ; count to apply to the bit mask of required bytes. 10012 <1> ; (Only the segment type doesn't have 0 currently.) 10013 <1> ; 10014 <1> ; Note that types are parsed forwards through the input 10015 <1> ; (ie the specified command) but are actually applied 10016 <1> ; to the numeric value they refer to backwards, that 10017 <1> ; is, a type that is closer to the term in the input 10018 <1> ; is applied to the term's result before a type that's 10019 <1> ; farther from the term. 10020 <1> ; Misleadingly, this reversal isn't very apparent in 10021 <1> ; most processing of the type and unary operators. 10022 <1> ; The segment type's shifting and masking reflects the 10023 <1> ; reversal: while the actual operation is to shift 10024 <1> ; right then restrict to the low word, the entry in 10025 <1> ; this table indicates to restrict the bit mask to 10026 <1> ; the low word then shift left. 10027 <1> align 2, db 0 10028 <1> typebitmasks: 10029 0000906C 0001 <1> db 0, 1b ; byte 10030 0000906E 0003 <1> db 0, 11b ; word 10031 00009070 0007 <1> db 0, 111b ; 3byte 10032 00009072 000F <1> db 0, 1111b ; dword 10033 00009074 000F <1> db 0, 1111b ; pointer 10034 00009076 0003 <1> db 0, 11b ; offset 10035 00009078 0203 <1> db 2, 11b ; segment 10036 <1> 10037 <1> 10038 <1> ; Dispatch table for type conversion functions. 10039 <1> ; 10040 <1> ; INP: bx:dx = dword input 10041 <1> ; CF = signedness of type conversion 10042 <1> ; ah from lahf with the same CF as current 10043 <1> ; al = type (80h = pointer, 40h = signed) 10044 <1> ; OUT: bx:dx = new value 10045 <1> ; ah = type (80h = pointer, 40h = signed) 10046 <1> ; CHG: ax 10047 <1> align 2, db 0 10048 <1> typehandlers: 10049 0000907A [CFAA] <1> dw handlebyte 10050 0000907C [DAAA] <1> dw handleword 10051 0000907E [C2AA] <1> dw handle3byte 10052 00009080 [E5AA] <1> dw handledword 10053 00009082 [EDAA] <1> dw handlepointer 10054 00009084 [DAAA] <1> dw handleoffset 10055 00009086 [BCAA] <1> dw handlesegment 10056 <1> 10057 <1> 10058 <1> usesection lDEBUG_CODE 10059 <1> 10060 <1> handlesegment: 10061 0000AABC 89DA <1> mov dx, bx 10062 0000AABE 30E4 <1> xor ah, ah ; NC, ah = 0 10063 0000AAC0 EB18 <1> jmp short handleword 10064 <1> handleoffset equ handleword 10065 <1> 10066 <1> handle3byte: 10067 0000AAC2 B700 <1> mov bh, 0 10068 0000AAC4 7307 <1> jnc .zero ; (iff unsigned type -->) 10069 0000AAC6 84DB <1> test bl, bl ; signed ? 10070 0000AAC8 7902 <1> jns .zero_f ; no --> 10071 0000AACA FECF <1> dec bh 10072 <1> .zero_f: 10073 0000AACC 9E <1> sahf ; restore CF 10074 <1> .zero: 10075 0000AACD EB16 <1> jmp handledword 10076 <1> 10077 <1> handlebyte: 10078 0000AACF B600 <1> mov dh, 0 10079 0000AAD1 7307 <1> jnc .zero ; (iff unsigned type -->) 10080 0000AAD3 84D2 <1> test dl, dl ; signed ? 10081 0000AAD5 7902 <1> jns .zero_f ; no --> 10082 0000AAD7 FECE <1> dec dh 10083 <1> .zero_f: 10084 0000AAD9 9E <1> sahf ; restore CF 10085 <1> .zero: 10086 <1> handleword: 10087 0000AADA BB0000 <1> mov bx, 0 10088 0000AADD 7306 <1> jnc .zero ; (iff unsigned type -->) 10089 0000AADF 85D2 <1> test dx, dx ; signed ? 10090 0000AAE1 7901 <1> jns .zero_f ; no --> 10091 0000AAE3 4B <1> dec bx 10092 <1> .zero_f: 10093 0000AAE4 9E <1> sahf ; restore CF 10094 <1> .zero: 10095 <1> handledword: 10096 0000AAE5 7203 <1> jc .signed ; if signed --> 10097 0000AAE7 30E4 <1> xor ah, ah ; return pointer=0 signed=0 10098 0000AAE9 C3 <1> retn 10099 <1> 10100 <1> .signed: 10101 0000AAEA B440 <1> mov ah, 40h ; return pointer=0 signed=1 10102 0000AAEC C3 <1> retn 10103 <1> 10104 <1> handlepointer: 10105 0000AAED B480 <1> mov ah, 80h ; return pointer=1 signed=0 10106 0000AAEF C3 <1> retn 10107 <1> 10108 <1> 10109 <1> usesection lDEBUG_DATA_ENTRY 10110 <1> 10111 <1> ; List of binary and unary operators. 10112 <1> ; The order has to match that in the respective 10113 <1> ; operator handler dispatch table below. 10114 <1> align 2, db 0 10115 <1> operators: 10116 00009088 13002B2D2A2F253C3E- <1> .: countedw "+-*/%<>=!|&^oOaAxX?" 10116 00009091 3D217C265E6F4F6141- <1> 10116 0000909A 78583F <1> 10117 <1> .amount: equ $ - . - 2 10118 0000909D 00 <1> align 2, db 0 10119 <1> unaryoperators: 10120 0000909E 05002B2D7E213F <1> .: countedw "+-~!?" 10121 <1> .amount: equ $ - . - 2 10122 <1> 10123 <1> 10124 <1> ; Dispatch table for unary operators, 10125 <1> ; used by getexpression. 10126 <1> ; Functions in this table are called with: 10127 <1> ; 10128 <1> ; INP: bx:dx = number 10129 <1> ; ah = type 10130 <1> ; OUT: bx:dx = result 10131 <1> ; ah = type 10132 <1> ; CHG: - 10133 000090A5 00 <1> align 2, db 0 10134 <1> unaryoperatorhandlers: 10135 <1> .: 10136 000090A6 [02AB] <1> dw uoh_plus ; + 10137 000090A8 [F8AA] <1> dw uoh_minus ; - 10138 000090AA [03AB] <1> dw uoh_not_bitwise ; ~ 10139 000090AC [0AAB] <1> dw uoh_not_boolean ; ! 10140 000090AE [F0AA] <1> dw uoh_abs ; ? 10141 <1> .amount: equ ($ - .) / 2 10142 <1> %if .amount != unaryoperators.amount 10143 <1> %error String and table mismatch 10144 <1> %endif 10145 <1> 10146 <1> 10147 <1> usesection lDEBUG_CODE 10148 <1> 10149 <1> uoh_abs: 10150 0000AAF0 80E4BF <1> and ah, ~ 40h ; make type signed=0 10151 0000AAF3 F6C780 <1> test bh, 80h ; negative ? 10152 0000AAF6 740A <1> jz uoh_plus ; no --> 10153 <1> uoh_minus: 10154 0000AAF8 80CC40 <1> or ah, 40h ; make type signed=1 10155 <1> calculate_minus_bxdx: 10156 0000AAFB F7DB <1> neg bx 10157 0000AAFD F7DA <1> neg dx 10158 0000AAFF 83DB00 <1> sbb bx, byte 0 ; neg bx:dx 10159 <1> uoh_plus: ; (nop) 10160 0000AB02 C3 <1> retn 10161 <1> 10162 <1> uoh_not_bitwise: 10163 0000AB03 B400 <1> mov ah, 0 ; make type pointer=0 signed=0 10164 0000AB05 F7D3 <1> not bx 10165 0000AB07 F7D2 <1> not dx 10166 0000AB09 C3 <1> retn 10167 <1> 10168 <1> uoh_not_boolean: 10169 0000AB0A B400 <1> mov ah, 0 ; make type pointer=0 signed=0 10170 0000AB0C E80202 <1> call toboolean 10171 0000AB0F 80F201 <1> xor dl, 1 ; toggle only bit 0 10172 0000AB12 C3 <1> retn 10173 <1> 10174 <1> 10175 <1> usesection lDEBUG_DATA_ENTRY 10176 <1> 10177 <1> ; Word table operatordispatchers: order as in string operators 10178 <1> ; Pointed functions dispatch depending on operator characters 10179 <1> ; Return: operator index, 0 = invalid 10180 <1> 10181 <1> ; Operator index (byte): 10182 <1> ; 0 = invalid, no operator found 10183 <1> ; 1.. = 1-based index in byte table operatorprecedences 10184 <1> ; = 1-based index in word table operatorfunctions 10185 <1> 10186 <1> 10187 <1> ; Dispatch table for (binary) expression operators, 10188 <1> ; used by getexpression. 10189 <1> ; Functions in this table are called with: 10190 <1> ; INP: al = operator character (which is also implicit) 10191 <1> ; si-> remaining line (directly) behind operator character 10192 <1> ; OUT: bl != 0 if a valid operator, 10193 <1> ; bl = operator index 10194 <1> ; si-> behind the last character belonging to the operator 10195 <1> ; bl = 0 if no valid operator 10196 <1> ; CHG: al, bh, dx 10197 <1> 10198 <1> struc opprecs 10199 00000000 ?? <1> OPPREC_INVALID: resb 1 10200 00000001 ?? <1> OPPREC_COND: resb 1 10201 00000002 ?? <1> OPPREC_BOOL_OR: resb 1 10202 00000003 ?? <1> OPPREC_BOOL_XOR:resb 1 10203 00000004 ?? <1> OPPREC_BOOL_AND:resb 1 10204 00000005 ?? <1> OPPREC_COMPARE: resb 1 10205 00000006 ?? <1> OPPREC_BIT_OR: resb 1 10206 00000007 ?? <1> OPPREC_BIT_XOR: resb 1 10207 00000008 ?? <1> OPPREC_BIT_AND: resb 1 10208 00000009 ?? <1> OPPREC_SHIFT: resb 1 10209 0000000A ?? <1> OPPREC_ADDSUB: resb 1 10210 0000000B ?? <1> OPPREC_MULDIV: resb 1 10211 0000000C ?? <1> OPPREC_POWER: resb 1 10212 <1> OPPREC_RIGHTOP: ; (to process it first in getexpression) 10213 <1> endstruc 10214 <1> ; The number of precedence levels indicates how many 10215 <1> ; intermediate results getexpression might have to save 10216 <1> ; on its stack. With eleven levels of precedence, up to 10217 <1> ; ten intermediate results are pushed by getexpression. 10218 <1> ; (With 6 bytes each, that gives a moderate 60 bytes.) 10219 <1> ; Key to this is that, in case of a low enough operator 10220 <1> ; behind the one that triggered the pushing, the pushed 10221 <1> ; value will be popped before proceeding. This way more 10222 <1> ; intermediate results may be pushed later but the stack 10223 <1> ; never holds intermediate results that don't need to be 10224 <1> ; on the stack. 10225 <1> 10226 <1> ; This is the definition of operator index values. The tables 10227 <1> ; operatorprecedences and operatorfunctions are ordered by this. 10228 <1> ; The operator dispatchers return one of these. 10229 <1> struc ops 10230 00000000 ?? <1> OPERATOR_INVALID: resb 1 ; 0 - invalid 10231 00000001 ?? <1> OPERATOR_PLUS: resb 1 ; + 10232 00000002 ?? <1> OPERATOR_MINUS: resb 1 ; - 10233 00000003 ?? <1> OPERATOR_MULTIPLY: resb 1 ; * 10234 00000004 ?? <1> OPERATOR_DIVIDE: resb 1 ; / 10235 00000005 ?? <1> OPERATOR_MODULO: resb 1 ; % 10236 00000006 ?? <1> OPERATOR_POWER: resb 1 ; ** 10237 00000007 ?? <1> OPERATOR_CMP_BELOW: resb 1 ; < 10238 00000008 ?? <1> OPERATOR_CMP_BELOW_EQUAL: resb 1 ; <= 10239 00000009 ?? <1> OPERATOR_CMP_ABOVE: resb 1 ; > 10240 0000000A ?? <1> OPERATOR_CMP_ABOVE_EQUAL: resb 1 ; >= 10241 0000000B ?? <1> OPERATOR_CMP_EQUAL: resb 1 ; == 10242 0000000C ?? <1> OPERATOR_CMP_NOT_EQUAL: resb 1 ; != 10243 0000000D ?? <1> OPERATOR_SHIFT_LEFT: resb 1 ; << 10244 0000000E ?? <1> OPERATOR_SHIFT_RIGHT: resb 1 ; >> 10245 0000000F ?? <1> OPERATOR_SHIFT_RIGHT_SIGNED: resb 1 ; >>> 10246 00000010 ?? <1> OPERATOR_BIT_MIRROR: resb 1 ; >< 10247 00000011 ?? <1> OPERATOR_BIT_OR: resb 1 ; | 10248 00000012 ?? <1> OPERATOR_BIT_XOR: resb 1 ; ^ 10249 00000013 ?? <1> OPERATOR_BIT_AND: resb 1 ; & 10250 00000014 ?? <1> OPERATOR_BOOL_OR: resb 1 ; || 10251 00000015 ?? <1> OPERATOR_BOOL_XOR: resb 1 ; ^^ 10252 00000016 ?? <1> OPERATOR_BOOL_AND: resb 1 ; && 10253 00000017 ?? <1> OPERATOR_COND: resb 1 ; ?? :: construct (special) 10254 00000018 ?? <1> OPERATOR_RIGHTOP: resb 1 ; (dummy right-operand operator) 10255 <1> endstruc 10256 <1> ; Order of BIT_* needs to be the same as that of BOOL_*. 10257 <1> ; BOOL_* have to follow directly behind BIT_*. 10258 <1> ; "r cf op= expr" depends on that. 10259 <1> 10260 <1> align 2, db 0 10261 <1> operatordispatchers: 10262 <1> .: 10263 000090B0 [16AB] <1> dw od_plus ; + 10264 000090B2 [13AB] <1> dw od_minus ; - 10265 000090B4 [19AB] <1> dw od_multiply ; * ** 10266 000090B6 [23AB] <1> dw od_divide ; / 10267 000090B8 [26AB] <1> dw od_modulo ; % 10268 000090BA [4EAB] <1> dw od_below ; < <> <= << 10269 000090BC [29AB] <1> dw od_above ; > >< >= >> >>> 10270 000090BE [6BAB] <1> dw od_equal ; == =< => 10271 000090C0 [7DAB] <1> dw od_not ; != 10272 000090C2 [85AB] <1> dw od_or ; | || 10273 000090C4 [90AB] <1> dw od_and ; & && 10274 000090C6 [9BAB] <1> dw od_xor ; ^ ^^ 10275 000090C8 [ADAB] <1> dw od_o ; o 10276 000090CA [ADAB] <1> dw od_o ; O 10277 000090CC [B4AB] <1> dw od_a ; a 10278 000090CE [B4AB] <1> dw od_a ; A 10279 000090D0 [BBAB] <1> dw od_x ; x 10280 000090D2 [BBAB] <1> dw od_x ; X 10281 000090D4 [A6AB] <1> dw od_cond ; ? 10282 <1> .end: equ $ - . 10283 <1> .amount: equ ($ - .) / 2 10284 <1> %if .amount != operators.amount 10285 <1> %error String and table mismatch 10286 <1> %endif 10287 <1> %if .amount > 100h 10288 <1> %error Too many operator dispatchers 10289 <1> %endif 10290 <1> 10291 <1> 10292 <1> operatorprecedences: 10293 <1> .: 10294 000090D6 00 <1> db OPPREC_INVALID ; need this for some checks 10295 000090D7 0A <1> db OPPREC_ADDSUB ; + 10296 000090D8 0A <1> db OPPREC_ADDSUB ; - 10297 000090D9 0B <1> db OPPREC_MULDIV ; * 10298 000090DA 0B <1> db OPPREC_MULDIV ; / 10299 000090DB 0B <1> db OPPREC_MULDIV ; % 10300 000090DC 0C <1> db OPPREC_POWER ; ** 10301 000090DD 05 <1> db OPPREC_COMPARE ; < 10302 000090DE 05 <1> db OPPREC_COMPARE ; <= 10303 000090DF 05 <1> db OPPREC_COMPARE ; > 10304 000090E0 05 <1> db OPPREC_COMPARE ; >= 10305 000090E1 05 <1> db OPPREC_COMPARE ; == 10306 000090E2 05 <1> db OPPREC_COMPARE ; != 10307 000090E3 09 <1> db OPPREC_SHIFT ; << 10308 000090E4 09 <1> db OPPREC_SHIFT ; >> 10309 000090E5 09 <1> db OPPREC_SHIFT ; >>> 10310 000090E6 09 <1> db OPPREC_SHIFT ; >< 10311 000090E7 06 <1> db OPPREC_BIT_OR ; | 10312 000090E8 07 <1> db OPPREC_BIT_XOR ; ^ 10313 000090E9 08 <1> db OPPREC_BIT_AND ; & 10314 000090EA 02 <1> db OPPREC_BOOL_OR ; || 10315 000090EB 03 <1> db OPPREC_BOOL_XOR ; ^^ 10316 000090EC 04 <1> db OPPREC_BOOL_AND ; && 10317 000090ED 01 <1> db OPPREC_COND ; ?? :: construct 10318 000090EE 0D <1> db OPPREC_RIGHTOP ; getexpression: no number yet 10319 <1> .amount: equ $ - . 10320 <1> %if .amount != ops_size 10321 <1> %error Operators table size mismatch 10322 <1> %endif 10323 <1> 10324 <1> 10325 000090EF 00 <1> align 2, db 0 10326 <1> operatorfunctions: 10327 <1> .: 10328 000090F0 [DEA4] <1> dw error ; should not be called 10329 000090F2 [EBAB] <1> dw of_plus ; + 10330 000090F4 [E8AB] <1> dw of_minus ; - 10331 000090F6 [F8AB] <1> dw of_multiply ; * 10332 000090F8 [23AC] <1> dw of_divide ; / 10333 000090FA [C8AB] <1> dw of_modulo ; % 10334 000090FC [9AAC] <1> dw of_power ; ** 10335 000090FE [F3AC] <1> dw of_compare_below ; < 10336 00009100 [EDAC] <1> dw of_compare_below_equal ; <= 10337 00009102 [0BAD] <1> dw of_compare_above ; > 10338 00009104 [05AD] <1> dw of_compare_above_equal ; >= 10339 00009106 [FFAC] <1> dw of_compare_equal ; == 10340 00009108 [F9AC] <1> dw of_compare_not_equal ; != 10341 0000910A [46AD] <1> dw of_shift_left ; << 10342 0000910C [2EAD] <1> dw of_shift_right ; >> 10343 0000910E [3AAD] <1> dw of_shift_right_signed ; >>> 10344 00009110 [6DAD] <1> dw of_bit_mirror ; >< 10345 00009112 [B8AD] <1> dw of_or_bitwise ; | 10346 00009114 [DBAD] <1> dw of_xor_bitwise ; ^ 10347 00009116 [CAAD] <1> dw of_and_bitwise ; & 10348 00009118 [C3AD] <1> dw of_or_boolean ; || 10349 0000911A [E5AD] <1> dw of_xor_boolean ; ^^ 10350 0000911C [D4AD] <1> dw of_and_boolean ; && 10351 0000911E [73B7] <1> dw of_cond ; ?? :: construct 10352 00009120 [1BAD] <1> dw of_rightop ; set to right operand 10353 <1> .amount: equ ($ - .) / 2 10354 <1> %if .amount != ops_size 10355 <1> %error Operators table size mismatch 10356 <1> %endif 10357 <1> 10358 <1> 10359 <1> usesection lDEBUG_CODE 10360 <1> 10361 <1> od_minus: 10362 0000AB13 B302 <1> mov bl, OPERATOR_MINUS 10363 0000AB15 C3 <1> retn 10364 <1> 10365 <1> od_plus: 10366 0000AB16 B301 <1> mov bl, OPERATOR_PLUS 10367 0000AB18 C3 <1> retn 10368 <1> 10369 <1> od_multiply: 10370 0000AB19 B303 <1> mov bl, OPERATOR_MULTIPLY 10371 0000AB1B 3804 <1> cmp byte [si], al 10372 0000AB1D 7503 <1> jne .ret 10373 0000AB1F 46 <1> inc si 10374 0000AB20 B306 <1> mov bl, OPERATOR_POWER 10375 <1> .ret: 10376 0000AB22 C3 <1> retn 10377 <1> 10378 <1> od_divide: 10379 0000AB23 B304 <1> mov bl, OPERATOR_DIVIDE 10380 0000AB25 C3 <1> retn 10381 <1> 10382 <1> od_modulo: 10383 0000AB26 B305 <1> mov bl, OPERATOR_MODULO 10384 0000AB28 C3 <1> retn 10385 <1> 10386 <1> od_above: 10387 0000AB29 3804 <1> cmp byte [si], al 10388 0000AB2B 7411 <1> je .shr 10389 0000AB2D 803C3C <1> cmp byte [si], '<' 10390 0000AB30 7418 <1> je .mirror 10391 0000AB32 803C3D <1> cmp byte [si], '=' 10392 0000AB35 7403 <1> je .cmp_ae 10393 0000AB37 B309 <1> mov bl, OPERATOR_CMP_ABOVE 10394 0000AB39 C3 <1> retn 10395 <1> .cmp_ae: 10396 0000AB3A 46 <1> inc si 10397 0000AB3B B30A <1> mov bl, OPERATOR_CMP_ABOVE_EQUAL 10398 0000AB3D C3 <1> retn 10399 <1> .shr: 10400 0000AB3E 46 <1> inc si 10401 0000AB3F 3804 <1> cmp byte [si], al 10402 0000AB41 7403 <1> je .sar 10403 0000AB43 B30E <1> mov bl, OPERATOR_SHIFT_RIGHT 10404 0000AB45 C3 <1> retn 10405 <1> .sar: 10406 0000AB46 46 <1> inc si 10407 0000AB47 B30F <1> mov bl, OPERATOR_SHIFT_RIGHT_SIGNED 10408 0000AB49 C3 <1> retn 10409 <1> .mirror: 10410 0000AB4A 46 <1> inc si 10411 0000AB4B B310 <1> mov bl, OPERATOR_BIT_MIRROR 10412 0000AB4D C3 <1> retn 10413 <1> 10414 <1> od_below: 10415 0000AB4E 3804 <1> cmp byte [si], al 10416 0000AB50 7411 <1> je .shl 10417 0000AB52 803C3E <1> cmp byte [si], '>' 10418 0000AB55 7410 <1> je .ncmp 10419 0000AB57 803C3D <1> cmp byte [si], '=' 10420 0000AB5A 7403 <1> je .cmp_be 10421 0000AB5C B307 <1> mov bl, OPERATOR_CMP_BELOW 10422 0000AB5E C3 <1> retn 10423 <1> .cmp_be: 10424 0000AB5F 46 <1> inc si 10425 0000AB60 B308 <1> mov bl, OPERATOR_CMP_BELOW_EQUAL 10426 0000AB62 C3 <1> retn 10427 <1> .shl: 10428 0000AB63 46 <1> inc si 10429 0000AB64 B30D <1> mov bl, OPERATOR_SHIFT_LEFT 10430 0000AB66 C3 <1> retn 10431 <1> .ncmp: 10432 <1> od_not.ncmp: 10433 0000AB67 46 <1> inc si 10434 0000AB68 B30C <1> mov bl, OPERATOR_CMP_NOT_EQUAL 10435 0000AB6A C3 <1> retn 10436 <1> 10437 <1> od_equal: 10438 0000AB6B 803C3E <1> cmp byte [si], '>' 10439 0000AB6E 74CA <1> je od_above.cmp_ae 10440 0000AB70 803C3C <1> cmp byte [si], '<' 10441 0000AB73 74EA <1> je od_below.cmp_be 10442 0000AB75 3804 <1> cmp byte [si], al 10443 0000AB77 7509 <1> jne .invalid ; no valid operator --> 10444 <1> .cmp: 10445 0000AB79 46 <1> inc si 10446 0000AB7A B30B <1> mov bl, OPERATOR_CMP_EQUAL 10447 0000AB7C C3 <1> retn 10448 <1> 10449 <1> od_not: 10450 0000AB7D 803C3D <1> cmp byte [si], '=' 10451 0000AB80 74E5 <1> je .ncmp 10452 <1> od_equal.invalid: 10453 0000AB82 B300 <1> mov bl, OPERATOR_INVALID 10454 0000AB84 C3 <1> retn 10455 <1> 10456 <1> od_or: 10457 0000AB85 3804 <1> cmp byte [si], al 10458 0000AB87 7403 <1> je .boolean 10459 0000AB89 B311 <1> mov bl, OPERATOR_BIT_OR 10460 0000AB8B C3 <1> retn 10461 <1> .boolean: 10462 0000AB8C 46 <1> inc si 10463 0000AB8D B314 <1> mov bl, OPERATOR_BOOL_OR 10464 0000AB8F C3 <1> retn 10465 <1> od_and: 10466 0000AB90 3804 <1> cmp byte [si], al 10467 0000AB92 7403 <1> je .boolean 10468 0000AB94 B313 <1> mov bl, OPERATOR_BIT_AND 10469 0000AB96 C3 <1> retn 10470 <1> .boolean: 10471 0000AB97 46 <1> inc si 10472 0000AB98 B316 <1> mov bl, OPERATOR_BOOL_AND 10473 0000AB9A C3 <1> retn 10474 <1> 10475 <1> od_xor: 10476 0000AB9B 3804 <1> cmp byte [si], al 10477 0000AB9D 7403 <1> je .boolean 10478 0000AB9F B312 <1> mov bl, OPERATOR_BIT_XOR 10479 0000ABA1 C3 <1> retn 10480 <1> .boolean: 10481 0000ABA2 46 <1> inc si 10482 0000ABA3 B315 <1> mov bl, OPERATOR_BOOL_XOR 10483 0000ABA5 C3 <1> retn 10484 <1> 10485 <1> 10486 <1> od_cond: 10487 0000ABA6 B317 <1> mov bl, OPERATOR_COND 10488 0000ABA8 BA[6C65] <1> mov dx, msg.questionmark 10489 0000ABAB EB13 <1> jmp od_string_common 10490 <1> 10491 <1> od_o: 10492 0000ABAD B311 <1> mov bl, OPERATOR_BIT_OR 10493 0000ABAF BA[6F65] <1> mov dx, msg.r 10494 0000ABB2 EB0C <1> jmp od_string_common 10495 <1> 10496 <1> od_a: 10497 0000ABB4 B313 <1> mov bl, OPERATOR_BIT_AND 10498 0000ABB6 BA[7165] <1> mov dx, msg.nd 10499 0000ABB9 EB05 <1> jmp od_string_common 10500 <1> 10501 <1> od_x: 10502 0000ABBB B312 <1> mov bl, OPERATOR_BIT_XOR 10503 0000ABBD BA[6E65] <1> mov dx, msg.or 10504 <1> ; jmp od_string_common 10505 <1> 10506 <1> od_string_common: 10507 0000ABC0 E8E40C <1> call isstring? 10508 0000ABC3 7402 <1> je .ret 10509 <1> .none: 10510 0000ABC5 31DB <1> xor bx, bx 10511 <1> .ret: 10512 0000ABC7 C3 <1> retn 10513 <1> 10514 <1> 10515 <1> ; (Binary) Expression operator functions, 10516 <1> ; used by getexpression. 10517 <1> ; These functions are called with: 10518 <1> ; INP: dword [hhvar] = previous number (left-hand operand) 10519 <1> ; byte [hhtype] = previous type 10520 <1> ; bx:dx = following number (right-hand operand) 10521 <1> ; ah = following type 10522 <1> ; OUT: bx:dx = result 10523 <1> ; ah = type 10524 <1> ; CHG: ax, cx 10525 <1> ; Note: Errors (divisor zero) are currently simply handled 10526 <1> ; by jumping to "error". 10527 <1> ; getexpression mustn't be called after until hhvar is 10528 <1> ; no longer used, as the call might overwrite hhvar. 10529 <1> ; 10530 <1> ; Type info (in ah and b[hhtype]) appears to be correctly 10531 <1> ; passed to here already. However, how should that be used? 10532 <1> ; 10533 <1> ; Quite simply, doing any arithmetic on two unsigned numbers 10534 <1> ; could return the smallest possible unsigned type (so that 10535 <1> ; if the result is <= 255 then the type is 1, if <= 65536 10536 <1> ; then the type is 2, else the type is 4). 10537 <1> ; 10538 <1> ; Handling two signed numbers here might be equally simple: 10539 <1> ; if the result is >= -128 && <= 127 then the type is 81h, 10540 <1> ; if the result is >= -32768 && <= 32767 then the type is 10541 <1> ; 82h, otherwise the type is 84h. Have to look into this. 10542 <1> ; (How does this interact with the unsignedness of the 10543 <1> ; actual computations?) 10544 <1> ; 10545 <1> ; It gets hairy when one operand is signed and the other 10546 <1> ; isn't; generally, two sub-cases of this exist: first, the 10547 <1> ; signed operand is positive, second, the signed operand is 10548 <1> ; negative. (Whether this distinction actually makes sense 10549 <1> ; for the implementation is still to be determined.) 10550 <1> ; Possible models: 10551 <1> ; * Result is always signed. 10552 <1> ; * Result is always unsigned(?!). 10553 <1> ; * Result is treated as signed, but if it's positive its 10554 <1> ; type is changed to unsigned. 10555 <1> ; 10556 <1> ; It is also possible that operators could be handled 10557 <1> ; differently, for example, (some) bit and boolean 10558 <1> ; operators could imply unsigned operands in any case. 10559 <1> ; (>>> obviously implies a signed left operand already.) 10560 <1> ; 10561 <1> ; Note that (signed) negative bit shifting counts could 10562 <1> ; imply reversing the operation; << becomes >> and such. 10563 <1> ; 10564 <1> ; Note that for the addition of, for example, bit rotation, 10565 <1> ; it would be useful to retain the originally used type 10566 <1> ; inside getdword. At the end of getdword, the current bit 10567 <1> ; counting could be changed to use the "signed" bit of the 10568 <1> ; types and then determine which signed or unsigned type is 10569 <1> ; large enough to hold the value. (It might already work 10570 <1> ; mostly like that.) (Is this specifically about binary 10571 <1> ; operators? - No. In fact, binary operators are the most 10572 <1> ; likely to be (one of) the syntactic element(s) which 10573 <1> ; should change (and possible 'optimize') types. - Then 10574 <1> ; this might still apply to unary operators, and brackets 10575 <1> ; and parentheses. In particular, the later should call 10576 <1> ; a different entry or instruct getdword not to optimize 10577 <1> ; the type at the end so as to retain it. - Although in 10578 <1> ; cases where that matters, the parentheses are arguably 10579 <1> ; unnecessary, aren't they?) 10580 <1> ; 10581 <1> ; It has to be decided whether there should be implicit 10582 <1> ; dispatching based on the operands' types' signedness. 10583 <1> ; For example, currently (with all operands being implied 10584 <1> ; to be unsigned) there exist >> and >>>, and there could 10585 <1> ; exist > and S>. With implicit signedness dispatching, the 10586 <1> ; behaviour of >> would change: it would expose the current 10587 <1> ; >>'s behaviour with an unsigned (left) operand, and the 10588 <1> ; current >>>'s behaviour with a signed (left) operand. 10589 <1> ; (Either U(nsigned)>> and S(igned)>> operators could then 10590 <1> ; exist, which would imply an unsigned or signed left 10591 <1> ; operand respectively, or the affected operands' signedness 10592 <1> ; could be changed with the currently available prefix or 10593 <1> ; possible new postfix unary operators. 10594 <1> of_modulo: 10595 0000ABC8 FF36[A695] <1> push word [hhvar+2] 10596 0000ABCC FF36[A495] <1> push word [hhvar] 10597 0000ABD0 53 <1> push bx 10598 0000ABD1 52 <1> push dx 10599 0000ABD2 E84E00 <1> call of_divide ; bx:dx := prev / foll 10600 0000ABD5 8F06[A495] <1> pop word [hhvar] 10601 0000ABD9 8F06[A695] <1> pop word [hhvar+2] 10602 0000ABDD E81800 <1> call of_multiply ; bx:dx := (prev / foll) * foll 10603 0000ABE0 8F06[A495] <1> pop word [hhvar] 10604 0000ABE4 8F06[A695] <1> pop word [hhvar+2] 10605 <1> ; jmp short of_minus ; bx:dx := prev - ((prev / foll) * foll) 10606 <1> 10607 <1> of_minus: 10608 0000ABE8 E810FF <1> call calculate_minus_bxdx 10609 <1> of_plus: 10610 0000ABEB 0316[A495] <1> add dx, word [hhvar] 10611 0000ABEF 131E[A695] <1> adc bx, word [hhvar+2] 10612 <1> or_hhtype: 10613 0000ABF3 0A26[AD95] <1> or ah, byte [hhtype] 10614 0000ABF7 C3 <1> retn 10615 <1> 10616 <1> of_multiply: ; bx:dx := var * bx:dx 10617 0000ABF8 0826[AD95] <1> or byte [hhtype], ah 10618 0000ABFC 56 <1> push si 10619 0000ABFD 57 <1> push di ; si:di is used as temporary storage 10620 0000ABFE 89D0 <1> mov ax, dx 10621 0000AC00 50 <1> push ax 10622 0000AC01 F726[A495] <1> mul word [hhvar] 10623 0000AC05 89C7 <1> mov di, ax 10624 0000AC07 89D6 <1> mov si, dx 10625 0000AC09 58 <1> pop ax 10626 0000AC0A F726[A695] <1> mul word [hhvar+2] 10627 0000AC0E 01C6 <1> add si, ax 10628 0000AC10 89D8 <1> mov ax, bx 10629 0000AC12 F726[A495] <1> mul word [hhvar] 10630 0000AC16 01C6 <1> add si, ax 10631 <1> ; bx*[hhvar+2] not required, completely overflows 10632 0000AC18 89FA <1> mov dx, di 10633 0000AC1A 89F3 <1> mov bx, si 10634 0000AC1C 5F <1> pop di 10635 0000AC1D 5E <1> pop si ; restore those 10636 <1> set_hhtype: 10637 0000AC1E 8A26[AD95] <1> mov ah, byte [hhtype] 10638 0000AC22 C3 <1> retn 10639 <1> 10640 <1> of_divide: ; bx:dx := var / bx:dx 10641 0000AC23 0826[AD95] <1> or byte [hhtype], ah 10642 0000AC27 53 <1> push bx 10643 0000AC28 09D3 <1> or bx, dx ; divisor zero ? 10644 0000AC2A 5B <1> pop bx 10645 0000AC2B 7503E9AEF8 <1> jz error ; divisor zero ! 10646 0000AC30 EB48 <1> _386_jmps .32 ; 386, use 32-bit code --> 10647 0000AC32 85DB <1> test bx, bx ; need only 16-bit divisor ? 10648 0000AC34 7514 <1> jnz .difficultdiv16 ; nope --> 10649 0000AC36 89D1 <1> mov cx, dx 10650 0000AC38 31D2 <1> xor dx, dx 10651 0000AC3A A1[A695] <1> mov ax, word [hhvar+2] ; dx:ax = high word of previous number 10652 0000AC3D F7F1 <1> div cx 10653 0000AC3F 89C3 <1> mov bx, ax 10654 0000AC41 A1[A495] <1> mov ax, word [hhvar] ; ax = low word of previous number, dx = remainder 10655 0000AC44 F7F1 <1> div cx 10656 0000AC46 89C2 <1> mov dx, ax ; bx:dx = result 10657 0000AC48 EBD4 <1> jmp set_hhtype 10658 <1> 10659 <1> .difficultdiv16: ; code adapted from Art of Assembly chapter 9 10660 <1> ; refer to http://www.plantation-productions.com/Webster/www.artofasm.com/DOS/ch09/CH09-4.html#HEADING4-99 10661 0000AC4A B92000 <1> mov cx, 32 10662 0000AC4D 55 <1> push bp 10663 0000AC4E 56 <1> push si 10664 0000AC4F 57 <1> push di 10665 0000AC50 A1[A495] <1> mov ax, word [hhvar] 10666 0000AC53 8B2E[A695] <1> mov bp, word [hhvar+2] ; bp:ax = previous number 10667 0000AC57 31FF <1> xor di, di 10668 0000AC59 31F6 <1> xor si, si ; clear variable si:di 10669 0000AC5B 92 <1> xchg ax, dx 10670 0000AC5C 87EB <1> xchg bp, bx ; bx:dx = previous number, bp:ax = divisor 10671 <1> .bitloop: 10672 0000AC5E D1E2 <1> shl dx, 1 10673 0000AC60 D1D3 <1> rcl bx, 1 10674 0000AC62 D1D7 <1> rcl di, 1 10675 0000AC64 D1D6 <1> rcl si, 1 ; si:di:bx:dx << 1 10676 0000AC66 39EE <1> cmp si, bp ; does the divisor fit into si:di here ? 10677 0000AC68 7502 <1> jne @F 10678 0000AC6A 39C7 <1> cmp di, ax 10679 <1> @@: 10680 0000AC6C 7205 <1> jb .trynext ; no --> 10681 <1> .goesinto: 10682 0000AC6E 29C7 <1> sub di, ax 10683 0000AC70 19EE <1> sbb si, bp ; subtract divisor 10684 0000AC72 42 <1> inc dx ; set a bit of the result (bit was zero before, never carries) 10685 <1> .trynext: 10686 0000AC73 E2E9 <1> loop .bitloop ; loop for 32 bits 10687 0000AC75 5F <1> pop di 10688 0000AC76 5E <1> pop si 10689 0000AC77 5D <1> pop bp 10690 0000AC78 EBA4 <1> jmp set_hhtype 10691 <1> 10692 <1> %ifn _ONLYNON386 10693 <1> .32: 10694 <1> [cpu 386] 10695 0000AC7A 6650 <1> push eax 10696 0000AC7C 6653 <1> push ebx 10697 0000AC7E 6652 <1> push edx ; to preserve the high words 10698 0000AC80 53 <1> push bx 10699 0000AC81 52 <1> push dx 10700 0000AC82 665B <1> pop ebx ; ebx = following number 10701 0000AC84 6631D2 <1> xor edx, edx 10702 0000AC87 66A1[A495] <1> mov eax, dword [hhvar] ; edx:eax = previous number 10703 0000AC8B 66F7F3 <1> div ebx 10704 0000AC8E 665A <1> pop edx 10705 0000AC90 665B <1> pop ebx ; restore high words 10706 0000AC92 6650 <1> push eax 10707 0000AC94 5A <1> pop dx 10708 0000AC95 5B <1> pop bx ; bx:dx = result 10709 0000AC96 6658 <1> pop eax ; restore high word of eax 10710 <1> __CPU__ 10711 0000AC98 EB84 <1> jmp set_hhtype 10712 <1> %endif 10713 <1> 10714 <1> 10715 <1> of_power: 10716 0000AC9A 0826[AD95] <1> or byte [hhtype], ah 10717 0000AC9E 89D9 <1> mov cx, bx 10718 0000ACA0 89D0 <1> mov ax, dx ; get exponent 10719 0000ACA2 09D3 <1> or bx, dx ; exponent zero ? 10720 0000ACA4 BB0000 <1> mov bx, 0 10721 0000ACA7 BA0100 <1> mov dx, 1 10722 0000ACAA 743E <1> jz .ret ; yes, return with result as 1 --> 10723 0000ACAC 3916[A495] <1> cmp word [hhvar], dx ; optimization: 10724 0000ACB0 7506 <1> jne .notone 10725 0000ACB2 391E[A695] <1> cmp word [hhvar+2], bx 10726 0000ACB6 7432 <1> je .ret ; if base is one (and exponent not zero), result is 1 --> 10727 <1> .notone: 10728 0000ACB8 55 <1> push bp 10729 <1> 10730 <1> .loop: ; cx:ax non-zero here 10731 0000ACB9 D1E9 <1> shr cx, 1 10732 0000ACBB D1D8 <1> rcr ax, 1 ; exponent /= 2 10733 0000ACBD 50 <1> push ax 10734 0000ACBE 51 <1> push cx 10735 0000ACBF 7303 <1> jnc .even ; if exponent was even --> 10736 0000ACC1 E834FF <1> call of_multiply ; var *= base 10737 <1> .even: 10738 <1> ; In the last iteration, cx:ax might be zero here 10739 <1> ; making the next call unnecessary. Oh well. 10740 0000ACC4 53 <1> push bx 10741 0000ACC5 52 <1> push dx 10742 0000ACC6 8B1E[A695] <1> mov bx, word [hhvar+2] 10743 0000ACCA 8B16[A495] <1> mov dx, word [hhvar] ; base 10744 0000ACCE E827FF <1> call of_multiply ; * base = base squared 10745 0000ACD1 891E[A695] <1> mov word [hhvar+2], bx 10746 0000ACD5 8916[A495] <1> mov word [hhvar], dx ; store as new base 10747 0000ACD9 5A <1> pop dx 10748 0000ACDA 5B <1> pop bx 10749 0000ACDB 59 <1> pop cx 10750 0000ACDC 58 <1> pop ax 10751 <1> 10752 0000ACDD 89DD <1> mov bp, bx ; optimization: 10753 0000ACDF 09D5 <1> or bp, dx ; register now zero ? 10754 0000ACE1 7406 <1> jz .ret_bp ; if so, return now --> (multiplying zero always results in zero) 10755 0000ACE3 89CD <1> mov bp, cx 10756 0000ACE5 09C5 <1> or bp, ax ; exponent now zero ? 10757 0000ACE7 75D0 <1> jnz .loop ; no, loop --> 10758 <1> 10759 <1> .ret_bp: 10760 0000ACE9 5D <1> pop bp 10761 <1> .ret: 10762 0000ACEA E931FF <1> jmp set_hhtype 10763 <1> 10764 <1> of_compare_below_equal: 10765 0000ACED E82C00 <1> call of_helper_compare 10766 0000ACF0 7628 <1> jbe of_helper_compare_true 10767 0000ACF2 C3 <1> retn 10768 <1> 10769 <1> of_compare_below: 10770 0000ACF3 E82600 <1> call of_helper_compare 10771 0000ACF6 7222 <1> jb of_helper_compare_true 10772 0000ACF8 C3 <1> retn 10773 <1> 10774 <1> of_compare_not_equal: 10775 0000ACF9 E82000 <1> call of_helper_compare 10776 0000ACFC 751C <1> jne of_helper_compare_true 10777 0000ACFE C3 <1> retn 10778 <1> 10779 <1> of_compare_equal: 10780 0000ACFF E81A00 <1> call of_helper_compare 10781 0000AD02 7416 <1> je of_helper_compare_true 10782 0000AD04 C3 <1> retn 10783 <1> 10784 <1> of_compare_above_equal: 10785 0000AD05 E81400 <1> call of_helper_compare 10786 0000AD08 7310 <1> jae of_helper_compare_true 10787 0000AD0A C3 <1> retn 10788 <1> 10789 <1> of_compare_above: 10790 0000AD0B E80E00 <1> call of_helper_compare 10791 0000AD0E 770A <1> ja of_helper_compare_true 10792 0000AD10 C3 <1> retn 10793 <1> 10794 <1> 10795 <1> ; Called by operator functions to convert a number to boolean 10796 <1> ; 10797 <1> ; INP: bx:dx 10798 <1> ; OUT: dx = 0 or 1 10799 <1> ; bx = 0 10800 <1> ; ZF 10801 <1> toboolean: 10802 0000AD11 09D3 <1> or bx, dx ; = 0 iff it was 0000_0000h 10803 0000AD13 83FB01 <1> cmp bx, byte 1 ; CY iff it was 0000_0000h, else NC 10804 0000AD16 19D2 <1> sbb dx, dx ; -1 iff it was 0000_0000h, else 0 10805 0000AD18 31DB <1> xor bx, bx 10806 <1> 10807 <1> ; INP: dx 10808 <1> ; OUT: dx += 1 10809 <1> of_helper_compare_true: 10810 0000AD1A 42 <1> inc dx ; bx:dx = 0 iff it was 0000_0000h, else 1 10811 <1> 10812 <1> ; Dummy operator computation function, 10813 <1> ; used when setting a register without operator (rr) 10814 <1> ; and to initialize the first getexpression loop iteration 10815 <1> ; INP: dword [hhvar] = previous number (left-hand operand) 10816 <1> ; byte [hhtype] = previous type 10817 <1> ; bx:dx = following number (right-hand operand) 10818 <1> ; ah = following type 10819 <1> ; OUT: bx:dx = result (right-hand operand) 10820 <1> ; ah = type 10821 <1> ; CHG: ax, cx 10822 <1> of_rightop: 10823 0000AD1B C3 <1> retn 10824 <1> 10825 <1> 10826 <1> ; Called by operator functions to compare operands 10827 <1> ; 10828 <1> ; INP: dword [hhvar], byte [hhtype] 10829 <1> ; bx:dx, ah 10830 <1> ; OUT: Flags as for "cmp d[hhvar], bxdx" 10831 <1> ; bx:dx = 0 10832 <1> ; ah = 0 10833 <1> of_helper_compare: 10834 0000AD1C 30E4 <1> xor ah, ah ; type signed=0 pointer=0 10835 0000AD1E 391E[A695] <1> cmp word [hhvar+2], bx 10836 0000AD22 7504 <1> jne .ret 10837 0000AD24 3916[A495] <1> cmp word [hhvar], dx 10838 <1> .ret: 10839 0000AD28 BB0000 <1> mov bx, 0 10840 0000AD2B 89DA <1> mov dx, bx ; set both to zero (without affecting flags) 10841 0000AD2D C3 <1> retn 10842 <1> 10843 <1> of_shift_right: 10844 0000AD2E 30E4 <1> xor ah, ah 10845 0000AD30 E81F00 <1> call of_helper_getshiftdata 10846 <1> .loop: 10847 0000AD33 D1EB <1> shr bx, 1 10848 0000AD35 D1DA <1> rcr dx, 1 10849 0000AD37 E2FA <1> loop .loop 10850 0000AD39 C3 <1> retn 10851 <1> 10852 <1> of_shift_right_signed: 10853 0000AD3A B440 <1> mov ah, 40h 10854 0000AD3C E81300 <1> call of_helper_getshiftdata 10855 <1> .loop: 10856 0000AD3F D1FB <1> sar bx, 1 10857 0000AD41 D1DA <1> rcr dx, 1 10858 0000AD43 E2FA <1> loop .loop 10859 0000AD45 C3 <1> retn 10860 <1> 10861 <1> of_shift_left: 10862 0000AD46 30E4 <1> xor ah, ah 10863 0000AD48 E80700 <1> call of_helper_getshiftdata 10864 <1> .loop: 10865 0000AD4B D1E2 <1> shl dx, 1 10866 0000AD4D D1D3 <1> rcl bx, 1 10867 0000AD4F E2FA <1> loop .loop 10868 0000AD51 C3 <1> retn 10869 <1> 10870 <1> ; Called by operator functions to get shift data 10871 <1> ; 10872 <1> ; This returns to the next caller with the unchanged input 10873 <1> ; operand if the shift count is zero. Otherwise, large shift 10874 <1> ; counts are normalized so the returned value in cx is not 10875 <1> ; zero and not higher than 32. This normalization is not just 10876 <1> ; an optimization, it's required for shift counts that don't 10877 <1> ; fit into a 16-bit counter. 10878 <1> ; 10879 <1> ; INP: bx:dx = shift count 10880 <1> ; OUT: bx:dx = input operand 10881 <1> ; If shift count is >= 1 and <= 32, 10882 <1> ; cx = shift count 10883 <1> ; If shift count is > 32, 10884 <1> ; cx = 32 10885 <1> ; If shift count is zero, 10886 <1> ; discards one near return address before returning 10887 <1> ; CHG: cx 10888 <1> of_helper_getshiftdata: 10889 0000AD52 89D1 <1> mov cx, dx 10890 0000AD54 85DB <1> test bx, bx 10891 0000AD56 7505 <1> jnz .largeshift 10892 0000AD58 83FA20 <1> cmp dx, byte 32 10893 0000AD5B 7203 <1> jb .normalshift 10894 <1> .largeshift: 10895 0000AD5D B92000 <1> mov cx, 32 ; fix at maximal shift count 10896 <1> .normalshift: 10897 0000AD60 8B16[A495] <1> mov dx, word [hhvar] 10898 0000AD64 8B1E[A695] <1> mov bx, word [hhvar+2] 10899 0000AD68 E301 <1> jcxz .break ; shift count zero, return input --> 10900 0000AD6A C3 <1> retn 10901 <1> 10902 <1> .break: 10903 0000AD6B 59 <1> pop cx ; discard near return address 10904 0000AD6C C3 <1> retn 10905 <1> 10906 <1> of_bit_mirror: 10907 0000AD6D 30E4 <1> xor ah, ah 10908 0000AD6F 89D1 <1> mov cx, dx 10909 0000AD71 85DB <1> test bx, bx 10910 0000AD73 7505 <1> jnz .large 10911 0000AD75 83FA40 <1> cmp dx, byte 64 10912 0000AD78 7205 <1> jb .normal 10913 <1> .large: 10914 0000AD7A 31DB <1> xor bx, bx ; mirror count 64 or higher: 10915 0000AD7C 31D2 <1> xor dx, dx ; all 32 bits mirrored with (nonexistent) zero bits 10916 0000AD7E C3 <1> retn 10917 <1> .normal: 10918 0000AD7F 8B16[A495] <1> mov dx, word [hhvar] 10919 0000AD83 8B1E[A695] <1> mov bx, word [hhvar+2] 10920 0000AD87 80F901 <1> cmp cl, 1 10921 0000AD8A 762B <1> jbe .ret ; mirror count one or zero, return input --> 10922 0000AD8C 56 <1> push si 10923 0000AD8D 57 <1> push di 10924 <1> 10925 0000AD8E 51 <1> push cx 10926 0000AD8F BFFFFF <1> mov di, -1 10927 0000AD92 89FE <1> mov si, di 10928 <1> .loopmask: 10929 0000AD94 D1E7 <1> shl di, 1 10930 0000AD96 D1D6 <1> rcl si, 1 10931 0000AD98 E2FA <1> loop .loopmask ; create mask of bits not involved in mirroring 10932 0000AD9A 21DE <1> and si, bx 10933 0000AD9C 21D7 <1> and di, dx ; get the uninvolved bits 10934 0000AD9E 59 <1> pop cx 10935 <1> 10936 0000AD9F 56 <1> push si 10937 0000ADA0 57 <1> push di ; save them 10938 0000ADA1 31F6 <1> xor si, si 10939 0000ADA3 31FF <1> xor di, di ; initialize mirrored register 10940 <1> .loop: 10941 0000ADA5 D1EB <1> shr bx, 1 10942 0000ADA7 D1DA <1> rcr dx, 1 ; shift out of original register's current LSB 10943 0000ADA9 D1D7 <1> rcl di, 1 10944 0000ADAB D1D6 <1> rcl si, 1 ; into other register's current LSB 10945 0000ADAD E2F6 <1> loop .loop 10946 0000ADAF 5A <1> pop dx 10947 0000ADB0 5B <1> pop bx ; restore uninvolved bits 10948 0000ADB1 09F3 <1> or bx, si 10949 0000ADB3 09FA <1> or dx, di ; combine with mirrored bits 10950 <1> 10951 0000ADB5 5F <1> pop di 10952 0000ADB6 5E <1> pop si 10953 <1> .ret: 10954 0000ADB7 C3 <1> retn 10955 <1> 10956 <1> of_or_bitwise: 10957 0000ADB8 0B16[A495] <1> or dx, word [hhvar] 10958 0000ADBC 0B1E[A695] <1> or bx, word [hhvar+2] ; bitwise or 10959 <1> or_hhtype_1: 10960 0000ADC0 E930FE <1> jmp or_hhtype 10961 <1> 10962 <1> of_or_boolean: 10963 0000ADC3 E82700 <1> call of_helper_getbool 10964 0000ADC6 09DA <1> or dx, bx ; boolean or 10965 0000ADC8 EB20 <1> jmp short of_helper_retbool 10966 <1> 10967 <1> of_and_bitwise: 10968 0000ADCA 2316[A495] <1> and dx, word [hhvar] 10969 0000ADCE 231E[A695] <1> and bx, word [hhvar+2] ; bitwise and 10970 0000ADD2 EBEC <1> jmp or_hhtype_1 10971 <1> 10972 <1> of_and_boolean: 10973 0000ADD4 E81600 <1> call of_helper_getbool 10974 0000ADD7 21DA <1> and dx, bx ; boolean and 10975 0000ADD9 EB0F <1> jmp short of_helper_retbool 10976 <1> 10977 <1> of_xor_bitwise: 10978 0000ADDB 3316[A495] <1> xor dx, word [hhvar] 10979 0000ADDF 331E[A695] <1> xor bx, word [hhvar+2] ; bitwise xor 10980 0000ADE3 EBDB <1> jmp or_hhtype_1 10981 <1> 10982 <1> of_xor_boolean: 10983 0000ADE5 E80500 <1> call of_helper_getbool 10984 0000ADE8 31DA <1> xor dx, bx ; boolean xor 10985 <1> of_helper_retbool: 10986 0000ADEA 31DB <1> xor bx, bx ; high word always zero 10987 0000ADEC C3 <1> retn 10988 <1> 10989 <1> ; Called by operator functions to convert operands to boolean 10990 <1> ; 10991 <1> ; INP: bx:dx = next number, ah = type 10992 <1> ; [hhvar] = previous number, [hhtype] = type 10993 <1> ; OUT: bx = next number's boolean value 10994 <1> ; dx = previous number's boolean value 10995 <1> ; ah = 0 10996 <1> of_helper_getbool: 10997 0000ADED 30E4 <1> xor ah, ah 10998 0000ADEF E81FFF <1> call toboolean 10999 0000ADF2 52 <1> push dx 11000 0000ADF3 8B16[A495] <1> mov dx, word [hhvar] 11001 0000ADF7 8B1E[A695] <1> mov bx, word [hhvar+2] 11002 0000ADFB E813FF <1> call toboolean 11003 0000ADFE 5B <1> pop bx 11004 0000ADFF C3 <1> retn 11005 <1> 11006 <1> 11007 <1> usesection lDEBUG_DATA_ENTRY 11008 <1> 11009 <1> isvariable_data: 11010 <1> 11011 <1> %if _DEBUG3 11012 <1> align 8, db 0 11013 <1> kregs: dd 0 11014 <1> dd 1 11015 <1> dd 0aa55aa55h 11016 <1> dd -1 11017 <1> times 12 dd 0 11018 <1> %endif 11019 <1> 11020 00009122 00 <1> align 8, db 0 11021 <1> isvariable_struc_list: 11022 <1> 11023 <1> %assign IVS_ONEBYTE 1 11024 <1> isvariable_struc_onebyte_list: 11025 <1> ; name, size, flags, address, array last index, array skip 11026 00009128 00003000[E40C]FF00 <1> isvariablestruc "V", 4, 0, vregs, 255 11027 <1> %if _DEBUG3 11028 <1> isvariablestruc "K", 4, 0, kregs, 15 11029 <1> %endif 11030 <1> isvariable_struc_onebyte_list_end: 11031 <1> 11032 <1> %assign IVS_ONEBYTE 0 11033 <1> isvariable_struc_morebyte_list: 11034 00009130 [A694]0100[E60B]00- <1> isvariablestruc "MMT", 1, 0, maxmachinetype 11034 00009137 00 <1> 11035 00009138 [A794]3103[7C00]04- <1> isvariablestruc "DCO", 4, ivfArrayOneBased | ivfArrayOptional, options, 4 11035 0000913F 00 <1> 11037 00009140 [A894]B103[8C00]04- <1> isvariablestruc "DCS", 4, ivfReadOnly | ivfArrayOneBased | ivfArrayOptional, startoptions, 4 11037 00009147 00 <1> 11039 00009148 [A994]B103[9C00]04- <1> isvariablestruc "DIF", 4, ivfReadOnly | ivfArrayOneBased | ivfArrayOptional, internalflags, 4 11039 0000914F 00 <1> 11041 00009150 [AA94]3100[AC00]00- <1> isvariablestruc "DAO", 4, 0, asm_options 11041 00009157 00 <1> 11043 00009158 [AB94]B100[B000]00- <1> isvariablestruc "DAS", 4, ivfReadOnly, asm_startoptions 11043 0000915F 00 <1> 11045 00009160 [AC94]B100[C80A]00- <1> isvariablestruc "DPI", 4, ivfReadOnly, psp22 11045 00009167 00 <1> 11047 00009168 [AD94]9100[A60A]00- <1> isvariablestruc "DPR", 2, ivfReadOnly, pspdbg 11047 0000916F 00 <1> 11049 00009170 [AE94]9100[CC0A]00- <1> isvariablestruc "DPP", 2, ivfReadOnly, parent 11049 00009177 00 <1> 11051 <1> %if _PM 11052 00009178 [AF94]D100[00AE]00- <1> isvariablestruc "DPS", 2, ivfReadOnly | ivfSpecialSetUp, var_seldbg_setup 11052 0000917F 00 <1> 11054 <1> %endif 11055 <1> 11056 00009180 [B094]3100[F886]00- <1> isvariablestruc "PPC", 4, 0, default_pp_count 11056 00009187 00 <1> 11057 00009188 [B194]3100[FC86]00- <1> isvariablestruc "TPC", 4, 0, default_tp_count 11057 0000918F 00 <1> 11058 00009190 [B294]3100[0087]00- <1> isvariablestruc "TTC", 4, 0, default_tt_count 11058 00009197 00 <1> 11059 <1> 11060 00009198 [B394]3500[EC09]00- <1> isvariablestruc "RELIMIT", 4, 0, re_limit 11060 0000919F 00 <1> 11061 000091A0 [B894]3500[E809]00- <1> isvariablestruc "RECOUNT", 4, 0, re_count 11061 000091A7 00 <1> 11062 <1> 11063 000091A8 [BD94]1000[F20A]00- <1> isvariablestruc "RC", 2, 0, priorrc 11063 000091AF 00 <1> 11064 000091B0 [BD94]1100[F40A]00- <1> isvariablestruc "ERC", 2, 0, erc 11064 000091B7 00 <1> 11065 000091B8 [BE94]0400[110C]00- <1> isvariablestruc "QQCODE", 1, 0, termcode 11065 000091BF 00 <1> 11066 <1> 11067 <1> %if _PM 11068 <1> %assign var_addr_offset 4 11069 <1> %else 11070 <1> %assign var_addr_offset 2 11071 <1> %endif 11072 <1> 11073 000091C0 [C294]3100[000B]00- <1> isvariablestruc "AAO", var_addr_offset, 0, a_addr 11073 000091C7 00 <1> 11074 000091C8 [C394]1100[040B]00- <1> isvariablestruc "AAS", 2, 0, a_addr + saSegSel 11074 000091CF 00 <1> 11075 000091D0 [C494]3100[0A0B]00- <1> isvariablestruc "ADO", var_addr_offset, 0, d_addr 11075 000091D7 00 <1> 11076 000091D8 [C594]1100[0E0B]00- <1> isvariablestruc "ADS", 2, 0, d_addr + saSegSel 11076 000091DF 00 <1> 11077 000091E0 [C694]3100[140B]00- <1> isvariablestruc "ABO", var_addr_offset, 0, behind_r_u_addr 11077 000091E7 00 <1> 11078 000091E8 [C794]1100[180B]00- <1> isvariablestruc "ABS", 2, 0, behind_r_u_addr + saSegSel 11078 000091EF 00 <1> 11079 000091F0 [C894]3100[1E0B]00- <1> isvariablestruc "AUO", var_addr_offset, 0, u_addr 11079 000091F7 00 <1> 11080 000091F8 [C994]1100[220B]00- <1> isvariablestruc "AUS", 2, 0, u_addr + saSegSel 11080 000091FF 00 <1> 11081 00009200 [CA94]3100[280B]00- <1> isvariablestruc "AEO", var_addr_offset, 0, e_addr 11081 00009207 00 <1> 11082 00009208 [CB94]1100[2C0B]00- <1> isvariablestruc "AES", 2, 0, e_addr + saSegSel 11082 0000920F 00 <1> 11083 <1> %if _DSTRINGS 11084 00009210 [CC94]3100[320B]00- <1> isvariablestruc "AZO", var_addr_offset, 0, dz_addr 11084 00009217 00 <1> 11085 00009218 [CD94]1100[360B]00- <1> isvariablestruc "AZS", 2, 0, dz_addr + saSegSel 11085 0000921F 00 <1> 11086 00009220 [CE94]3100[3C0B]00- <1> isvariablestruc "ACO", var_addr_offset, 0, dcpm_addr 11086 00009227 00 <1> 11087 00009228 [CF94]1100[400B]00- <1> isvariablestruc "ACS", 2, 0, dcpm_addr + saSegSel 11087 0000922F 00 <1> 11088 00009230 [D094]3100[460B]00- <1> isvariablestruc "APO", var_addr_offset, 0, dcount_addr 11088 00009237 00 <1> 11089 00009238 [D194]1100[4A0B]00- <1> isvariablestruc "APS", 2, 0, dcount_addr + saSegSel 11089 0000923F 00 <1> 11090 00009240 [D294]3100[500B]00- <1> isvariablestruc "AWO", var_addr_offset, 0, dwcount_addr 11090 00009247 00 <1> 11091 00009248 [D394]1100[540B]00- <1> isvariablestruc "AWS", 2, 0, dwcount_addr + saSegSel 11091 0000924F 00 <1> 11092 <1> %endif 11093 <1> %if _PM 11094 00009250 [D494]3100[000B]00- <1> isvariablestruc "AXO", 4, 0, a_addr 11094 00009257 00 <1> 11095 <1> %endif 11096 <1> 11097 00009258 [D594]0100[E70B]00- <1> isvariablestruc "DSR", 1, 0, serial_rows 11097 0000925F 00 <1> 11098 00009260 [D694]0100[E80B]00- <1> isvariablestruc "DSC", 1, 0, serial_columns 11098 00009267 00 <1> 11099 00009268 [D794]0100[E90B]00- <1> isvariablestruc "DST", 1, 0, serial_keep_timeout 11099 0000926F 00 <1> 11100 <1> %if _USE_TX_FIFO 11101 00009270 [D894]0100[EA0B]00- <1> isvariablestruc "DSF", 1, 0, serial_fifo_size 11101 00009277 00 <1> 11102 <1> %endif 11103 00009278 [D994]0300[EC0B]00- <1> isvariablestruc "DSPVI", 1, 0, serial_var_intnum 11103 0000927F 00 <1> 11104 00009280 [DC94]8300[2209]00- <1> isvariablestruc "DSPUI", 1, ivfReadOnly, serial_use_intnum 11104 00009287 00 <1> 11105 00009288 [DF94]0300[ED0B]00- <1> isvariablestruc "DSPVS", 1, 0, serial_var_params 11105 0000928F 00 <1> 11106 00009290 [E294]8300[2309]00- <1> isvariablestruc "DSPUS", 1, ivfReadOnly, serial_use_params 11106 00009297 00 <1> 11107 00009298 [E594]0300[EE0B]00- <1> isvariablestruc "DSPVF", 1, 0, serial_var_fifo 11107 0000929F 00 <1> 11108 000092A0 [E894]8300[2409]00- <1> isvariablestruc "DSPUF", 1, ivfReadOnly, serial_use_fifo 11108 000092A7 00 <1> 11109 000092A8 [EB94]1300[F00B]00- <1> isvariablestruc "DSPVP", 2, 0, serial_var_baseport 11109 000092AF 00 <1> 11110 000092B0 [EE94]9300[2609]00- <1> isvariablestruc "DSPUP", 2, ivfReadOnly, serial_use_baseport 11110 000092B7 00 <1> 11111 000092B8 [F194]0300[F20B]00- <1> isvariablestruc "DSPVD", 1, 0, serial_var_dl 11111 000092BF 00 <1> 11112 000092C0 [F494]8300[2809]00- <1> isvariablestruc "DSPUD", 1, ivfReadOnly, serial_use_dl 11112 000092C7 00 <1> 11113 000092C8 [F794]0300[F40B]00- <1> isvariablestruc "DSPVM", 1, 0, serial_var_irqmask 11113 000092CF 00 <1> 11114 000092D0 [FA94]8300[2A09]00- <1> isvariablestruc "DSPUM", 1, ivfReadOnly, serial_use_irqmask 11114 000092D7 00 <1> 11115 <1> 11116 000092D8 [FD94]0100[F60B]00- <1> isvariablestruc "IOR", 1, 0, io_rows 11116 000092DF 00 <1> 11117 000092E0 [FE94]0100[F70B]00- <1> isvariablestruc "IOC", 1, 0, io_columns 11117 000092E7 00 <1> 11118 000092E8 [FF94]1100[F80B]00- <1> isvariablestruc "IOS", 2, 0, io_start_buffer 11118 000092EF 00 <1> 11119 000092F0 [0095]1100[FA0B]00- <1> isvariablestruc "IOE", 2, 0, io_end_buffer 11119 000092F7 00 <1> 11120 000092F8 [0195]1100[FC0B]00- <1> isvariablestruc "IOL", 2, 0, io_levels 11120 000092FF 00 <1> 11121 00009300 [0295]1100[FE0B]00- <1> isvariablestruc "IOF", 2, 0, io_flags 11121 00009307 00 <1> 11122 00009308 [0395]D100[0FAE]00- <1> isvariablestruc "IOI", 2, ivfReadOnly | ivfSpecialSetUp, var_ioi_setup 11122 0000930F 00 <1> 11123 <1> 11124 <1> %if _CATCHINT2D 11125 00009310 [0495]8500[6081]00- <1> isvariablestruc "AMISNUM", 1, ivfReadOnly, amis_multiplex_number 11125 00009317 00 <1> 11126 00009318 [0995]0800[4881]00- <1> isvariablestruc "TRYAMISNUM", 1, 0, try_amis_multiplex_number 11126 0000931F 00 <1> 11127 <1> %endif 11128 <1> 11129 00009320 [1195]3600[0490]00- <1> isvariablestruc "HHRESULT", 4, 0, hhresult 11129 00009327 00 <1> 11130 <1> 11131 <1> %if _DEBUG1 11132 <1> isvariablestruc "TRC", 2, ivfArrayOptional, test_records_Readmem + 4, 15, 4 11134 <1> isvariablestruc "TRA", 4, ivfArrayOptional, test_records_Readmem, 15, 2 11136 <1> isvariablestruc "TWC", 2, ivfArrayOptional, test_records_Writemem + 4, 15, 4 11138 <1> isvariablestruc "TWA", 4, ivfArrayOptional, test_records_Writemem, 15, 2 11140 <1> isvariablestruc "TLC", 2, ivfArrayOptional, test_records_getLinear + 4, 15, 4 11142 <1> isvariablestruc "TLA", 4, ivfArrayOptional, test_records_getLinear, 15, 2 11144 <1> isvariablestruc "TSC", 2, ivfArrayOptional, test_records_getSegmented + 4, 15, 4 11146 <1> isvariablestruc "TSA", 4, ivfArrayOptional, test_records_getSegmented, 15, 2 11148 <1> isvariablestruc "TRV", 1, 0, test_readmem_value 11150 <1> %endif 11151 <1> 11152 <1> 11153 <1> %if _PM 11154 00009328 [1795]B102[6C0B]0F- <1> isvariablestruc "SRO", 4, ivfArrayOptional | ivfReadOnly, search_results, 15, 2 11154 0000932F 02 <1> 11156 00009330 [1895]9102[700B]0F- <1> isvariablestruc "SRS", 2, ivfArrayOptional | ivfReadOnly, search_results + 4, 15, 4 11156 00009337 04 <1> 11158 <1> %else 11159 <1> isvariablestruc "SRO", 2, ivfArrayOptional | ivfReadOnly, search_results, 15, 2 11161 <1> isvariablestruc "SRS", 2, ivfArrayOptional | ivfReadOnly, search_results + 2, 15, 2 11163 <1> %endif 11164 00009338 [1995]B100[CC0B]00- <1> isvariablestruc "SRC", 4, ivfReadOnly, sscounter 11164 0000933F 00 <1> 11166 <1> 11167 00009340 [1A95]D004[F1B1]FF- <1> isvariablestruc "RI", 2, ivfSpecialSetUp | ivfSeparatorSpecial | ivfReadOnly, var_ri_setup, 255 11167 00009347 00 <1> 11169 <1> 11170 <1> %if _DEBUG3 11171 <1> isvariablestruc "MT", 4, ivfSpecialSetUp, var_mt_setup, 1 11172 <1> %endif 11173 <1> 11174 <1> %if _INPUT_FILE_BOOT || _INPUT_FILE_HANDLES 11175 00009348 [1A95]5102[73B2]0F- <1> isvariablestruc "YSF", 2, ivfSpecialSetUp | ivfArrayOptional, var_ysf_setup, 15 11175 0000934F 00 <1> 11177 <1> %if _INPUT_FILE_HANDLES 11178 00009350 [1B95]5102[73B2]0F- <1> isvariablestruc "YHF", 2, ivfSpecialSetUp | ivfArrayOptional, var_ysf_setup, 15 11178 00009357 00 <1> 11180 <1> %endif 11181 <1> %if _INPUT_FILE_BOOT 11182 00009358 [1C95]5102[73B2]0F- <1> isvariablestruc "YBF", 2, ivfSpecialSetUp | ivfArrayOptional, var_ysf_setup, 15 11182 0000935F 00 <1> 11184 <1> %endif 11185 <1> %endif 11186 <1> 11187 <1> %if _ACCESS_VARIABLES_AMOUNT 11188 00009360 [1D95]B502[0483]03- <1> isvariablestruc "READADR", 4, ivfReadOnly | ivfArrayOptional, reading_access_variables, _ACCESS_VARIABLES_AMOUNT - 1, 4 11188 00009367 04 <1> 11190 00009368 [2295]B502[0883]03- <1> isvariablestruc "READLEN", 4, ivfReadOnly | ivfArrayOptional, reading_access_variables + 4, _ACCESS_VARIABLES_AMOUNT - 1, 4 11190 0000936F 04 <1> 11192 00009370 [2795]B502[2483]03- <1> isvariablestruc "WRITADR", 4, ivfReadOnly | ivfArrayOptional, writing_access_variables, _ACCESS_VARIABLES_AMOUNT - 1, 4 11192 00009377 04 <1> 11194 00009378 [2C95]B502[2883]03- <1> isvariablestruc "WRITLEN", 4, ivfReadOnly | ivfArrayOptional, writing_access_variables + 4, _ACCESS_VARIABLES_AMOUNT - 1, 4 11194 0000937F 04 <1> 11196 <1> %endif 11197 <1> 11198 <1> %if _PSPVARIABLES 11199 00009380 [3195]9200[A40A]00- <1> isvariablestruc "PSPS", 2, ivfReadOnly, pspdbe 11199 00009387 00 <1> 11200 00009388 [3395]D100[19AE]00- <1> isvariablestruc "PSP", 2, ivfReadOnly | ivfSpecialSetUp, var_psp_setup 11200 0000938F 00 <1> 11201 00009390 [3495]D100[23AE]00- <1> isvariablestruc "PPR", 2, ivfReadOnly | ivfSpecialSetUp, var_ppr_setup 11201 00009397 00 <1> 11202 00009398 [3595]F100[3CAE]00- <1> isvariablestruc "PPI", 4, ivfReadOnly | ivfSpecialSetUp, var_ppi_setup 11202 0000939F 00 <1> 11203 <1> %endif 11204 <1> 11205 <1> %if _BOOTLDR 11206 000093A0 [3695]4800[F2AE]FF- <1> isvariablestruc "BOOTUNITFL", 1, ivfSpecialSetUp, var_bootunitflags_setup, 255 11206 000093A7 00 <1> 11207 000093A8 [3E95]C900[B0AE]00- <1> isvariablestruc "BOOTLDPUNIT", 1, ivfReadOnly | ivfSpecialSetUp, var_bootldpunit_setup 11207 000093AF 00 <1> 11208 000093B0 [4795]C900[B5AE]00- <1> isvariablestruc "BOOTSDPUNIT", 1, ivfReadOnly | ivfSpecialSetUp, var_bootsdpunit_setup 11208 000093B7 00 <1> 11209 <1> %if _INPUT_FILE_BOOT 11210 000093B8 [5095]C900[BAAE]00- <1> isvariablestruc "BOOTYDPUNIT", 1, ivfReadOnly | ivfSpecialSetUp, var_bootydpunit_setup 11210 000093BF 00 <1> 11211 <1> %endif 11212 000093C0 [5995]F900[D1AE]00- <1> isvariablestruc "BOOTLDPPART", 4, ivfReadOnly | ivfSpecialSetUp, var_bootldppart_setup 11212 000093C7 00 <1> 11213 000093C8 [6295]F900[D6AE]00- <1> isvariablestruc "BOOTSDPPART", 4, ivfReadOnly | ivfSpecialSetUp, var_bootsdppart_setup 11213 000093CF 00 <1> 11214 <1> %if _INPUT_FILE_BOOT 11215 000093D0 [6B95]F900[DBAE]00- <1> isvariablestruc "BOOTYDPPART", 4, ivfReadOnly | ivfSpecialSetUp, var_bootydppart_setup 11215 000093D7 00 <1> 11216 <1> %endif 11217 <1> %endif 11218 <1> 11219 000093D8 [7495]0900[4981]00- <1> isvariablestruc "TRYDEBUGNUM", 1, 0, try_debugger_amis_multiplex_number 11219 000093DF 00 <1> 11220 000093E0 [7D95]9700[1681]00- <1> isvariablestruc "DEBUGFUNC", 2, ivfReadOnly, debuggerfunction 11220 000093E7 00 <1> 11221 <1> 11222 <1> isvariable_struc_morebyte_list_end: 11223 <1> isvariable_struc_list_end: 11224 <1> 11225 <1> align 2, db 0 11226 000093E8 00000000 <1> interrupt_var: dd 0 11227 <1> align 2, db 0 11228 000093EC 0000 <1> ioi_var: dw 0 11229 <1> %if _PM 11230 <1> align 2, db 0 11231 000093EE 0000 <1> seldbg: dw 0 11232 <1> %endif 11233 <1> %if _PSPVARIABLES 11234 <1> align 2, db 0 11235 000093F0 0000 <1> psp_segment: dw 0 11236 000093F2 0000 <1> psp_parent: dw 0 11237 000093F4 00000000 <1> psp_pra: dd 0 11238 <1> %endif 11239 <1> 11240 <1> align 2, db 0 11241 <1> isvariable_morebyte_nameheaders: 11242 000093F8 4D4D44434443444944- <1> dw IVS_MOREBYTE_NAMEHEADERS 11242 00009401 414441445044504450- <1> 11242 0000940A 445050505450545452- <1> 11242 00009413 455245524345525151- <1> 11242 0000941C 414141414144414441- <1> 11242 00009425 424142415541554145- <1> 11242 0000942E 4145415A415A414341- <1> 11242 00009437 434150415041574157- <1> 11242 00009440 415844534453445344- <1> 11242 00009449 534453445344534453- <1> 11242 00009452 445344534453445344- <1> 11242 0000945B 53445344534453494F- <1> 11242 00009464 494F494F494F494F49- <1> 11242 0000946D 4F494F414D54524848- <1> 11242 00009476 535253525352524959- <1> 11242 0000947F 535948594252455245- <1> 11242 00009488 575257525053505350- <1> 11242 00009491 505050424F424F424F- <1> 11242 0000949A 424F424F424F424F54- <1> 11242 000094A3 524445 <1> 11243 <1> .end: 11244 <1> %if IVS_HAVE_ONEBYTE && ! IVS_SINGLE_ONEBYTE 11245 <1> isvariable_onebyte_names: 11246 <1> db IVS_ONEBYTE_NAMES 11247 <1> .end: 11248 <1> %endif 11249 <1> 11250 000094A6 544F53464F53495250- <1> isvariablestrings ISVARIABLESTRINGS 11250 000094AF 534343434C494D4954- <1> 11250 000094B8 434F554E5443434F44- <1> 11250 000094C1 454F534F534F534F53- <1> 11250 000094CA 4F534F534F534F534F- <1> 11250 000094D3 534F52435446505649- <1> 11250 000094DC 505549505653505553- <1> 11250 000094E5 505646505546505650- <1> 11250 000094EE 505550505644505544- <1> 11250 000094F7 50564D50554D524353- <1> 11250 00009500 454C464949534E554D- <1> 11250 00009509 59414D49534E554D52- <1> 11250 00009512 4553554C544F534346- <1> 11250 0000951B 464641444144524144- <1> 11250 00009524 4C454E495441445249- <1> 11250 0000952D 544C454E5053505249- <1> 11250 00009536 4F54554E4954464C4F- <1> 11250 0000953F 544C4450554E49544F- <1> 11250 00009548 54534450554E49544F- <1> 11250 00009551 54594450554E49544F- <1> 11250 0000955A 544C4450504152544F- <1> 11250 00009563 54534450504152544F- <1> 11250 0000956C 545944505041525459- <1> 11250 00009575 44454255474E554D42- <1> 11250 0000957E 554746554E43 <1> 11251 <1> 11252 <1> 11253 <1> usesection lDEBUG_CODE 11254 <1> isvariable_code: 11255 <1> 11256 <1> %if _PM 11257 <1> var_seldbg_setup: 11258 0000AE00 BB[EE93] <1> mov bx, seldbg 11259 0000AE03 832700 <1> and word [bx], byte 0 11260 0000AE06 E8C0E3 <1> call ispm 11261 0000AE09 7502 <1> jnz @F 11262 0000AE0B 8C1F <1> mov word [bx], ds 11263 <1> @@: 11264 0000AE0D F8 <1> clc 11265 0000AE0E C3 <1> retn 11266 <1> %endif 11267 <1> 11268 <1> %if _DEBUG3 11269 <1> var_mt_setup: 11270 <1> mov bx, ax 11271 <1> add bx, bx 11272 <1> add bx, bx 11273 <1> mov di, bx 11274 <1> add bx, mtest_regs 11275 <1> add di, masks_test 11276 <1> clc 11277 <1> retn 11278 <1> %endif 11279 <1> 11280 <1> var_ioi_setup: 11281 0000AE0F E8E60F <1> call peekc 11282 0000AE12 BB[EC93] <1> mov bx, ioi_var 11283 0000AE15 8907 <1> mov word [bx], ax 11284 0000AE17 F8 <1> clc 11285 0000AE18 C3 <1> retn 11286 <1> 11287 <1> %if _PSPVARIABLES 11288 <1> var_psp_setup: 11289 0000AE19 BB[F093] <1> mov bx, psp_segment 11290 0000AE1C E83B00 <1> call var_get_psp_segment 11291 0000AE1F 8907 <1> mov word [bx], ax 11292 0000AE21 F8 <1> clc 11293 0000AE22 C3 <1> retn 11294 <1> 11295 <1> 11296 <1> var_ppr_setup: 11297 0000AE23 BB[F293] <1> mov bx, psp_parent 11298 0000AE26 31C0 <1> xor ax, ax 11299 0000AE28 8907 <1> mov word [bx], ax 11300 0000AE2A E84700 <1> call var_get_psp_selector 11301 0000AE2D 7206 <1> jc @F 11302 0000AE2F 26A11600 <1> mov ax, word [es:16h] 11303 0000AE33 8907 <1> mov word [bx], ax ; retrieve parent process 11304 <1> @@: 11305 0000AE35 16 <1> push ss 11306 0000AE36 07 <1> pop es 11307 <1> %if _PM ; This is not really needed but does not hurt either. 11308 <1> ; getsegmented is used above, but only from PM. 11309 <1> ; This is assumed not to switch modes. 11310 0000AE37 E83D8A <1> call resetmode ; reset mode if we switched 11311 <1> %endif 11312 0000AE3A F8 <1> clc 11313 0000AE3B C3 <1> retn 11314 <1> 11315 <1> 11316 <1> var_ppi_setup: 11317 0000AE3C BB[F493] <1> mov bx, psp_pra 11318 0000AE3F 31C0 <1> xor ax, ax 11319 0000AE41 8907 <1> mov word [bx], ax 11320 0000AE43 894702 <1> mov word [bx + 2], ax 11321 0000AE46 E82B00 <1> call var_get_psp_selector 11322 0000AE49 72EA <1> jc @B 11323 0000AE4B 26A10A00 <1> mov ax, word [es:TPIV] 11324 0000AE4F 8907 <1> mov word [bx], ax 11325 0000AE51 26A10C00 <1> mov ax, word [es:TPIV + 2] 11326 0000AE55 894702 <1> mov word [bx + 2], ax ; retrieve Int22 address 11327 0000AE58 EBDB <1> jmp @B 11328 <1> 11329 <1> 11330 <1> var_get_psp_segment: 11331 0000AE5A A1[A40A] <1> mov ax, word [pspdbe] 11332 0000AE5D 40 <1> inc ax ; FFFFh ? 11333 0000AE5E 7410 <1> jz short .pspvar_psp_invalid ; yes, invalid --> 11334 0000AE60 48 <1> dec ax ; 0 ? 11335 0000AE61 740D <1> jz short .pspvar_psp_invalid ; yes, invalid --> 11336 <1> %if _PM 11337 0000AE63 50 <1> push ax 11338 0000AE64 E816AF <1> call selector_to_segment 11339 0000AE67 58 <1> pop ax 11340 0000AE68 40 <1> inc ax ; FFFFh ? 11341 0000AE69 7405 <1> jz short .pspvar_psp_invalid ; yes, invalid --> 11342 0000AE6B 48 <1> dec ax ; 0 ? 11343 0000AE6C 7402 <1> jz short .pspvar_psp_invalid ; yes, invalid --> 11344 <1> %endif 11345 0000AE6E F8 <1> clc 11346 0000AE6F C3 <1> retn 11347 <1> 11348 <1> .pspvar_psp_invalid: 11349 0000AE70 31C0 <1> xor ax, ax 11350 0000AE72 F9 <1> stc 11351 0000AE73 C3 <1> retn 11352 <1> 11353 <1> 11354 <1> var_get_psp_selector: 11355 0000AE74 E8E3FF <1> call var_get_psp_segment 11356 0000AE77 7230 <1> jc .pspvar_psp_invalid 11357 <1> %if _PM 11358 0000AE79 E84DE3 <1> call ispm 11359 0000AE7C 751E <1> jnz short .pspvar_rm 11360 0000AE7E 53 <1> push bx 11361 0000AE7F 66 <1> _386_o32 ; push edx 11362 0000AE80 52 <1> push dx 11363 0000AE81 51 <1> push cx 11364 0000AE82 31D2 <1> xor dx, dx 11365 0000AE84 B90400 <1> mov cx, 4 11366 <1> .pspvar_shift: 11367 0000AE87 D1E0 <1> shl ax, 1 11368 0000AE89 D1D2 <1> rcl dx, 1 11369 0000AE8B E2FA <1> loop .pspvar_shift ; dx:ax = PSP segment << 4 11370 0000AE8D E80C8A <1> call getsegmented 11371 <1> ; getsegmented is assumed not to switch modes (see below). 11372 0000AE90 7219 <1> jc short .pspvar_error ; (shouldn't happen) 11373 0000AE92 66 <1> _386_o32 11374 0000AE93 85D2 <1> test dx, dx ; test edx, edx 11375 0000AE95 7514 <1> jnz short .pspvar_error ; (assumed not to happen) 11376 0000AE97 59 <1> pop cx 11377 0000AE98 66 <1> _386_o32 11378 0000AE99 5A <1> pop dx ; pop edx 11379 0000AE9A 93 <1> xchg ax, bx ; ax = selector 11380 0000AE9B 5B <1> pop bx 11381 <1> .pspvar_rm: 11382 <1> %endif 11383 0000AE9C 8EC0 <1> mov es, ax ; es = segment/selector 11384 0000AE9E 26813E0000CD20 <1> cmp word [es:0], 20CDh ; int 20h opcode ? 11385 0000AEA5 7502 <1> jne short .pspvar_psp_invalid ; no, invalid --> 11386 0000AEA7 F8 <1> clc 11387 0000AEA8 C3 <1> retn 11388 <1> 11389 <1> .pspvar_psp_invalid: 11390 0000AEA9 F9 <1> stc 11391 0000AEAA C3 <1> retn 11392 <1> 11393 <1> .pspvar_error: 11394 0000AEAB 31F6 <1> xor si, si 11395 0000AEAD E92EF6 <1> jmp error 11396 <1> %endif 11397 <1> 11398 <1> 11399 <1> %if _BOOTLDR 11400 <1> var_bootldpunit_setup: 11401 0000AEB0 BB[308C] <1> mov bx, loaddata_loadedfrom - LOADDATA + bsBPB + ebpbNew + bpbnBootUnit 11403 0000AEB3 EB45 <1> jmp @F 11404 <1> 11405 <1> var_bootsdpunit_setup: 11406 0000AEB5 BB[D08C] <1> mov bx, load_data - LOADDATA2 + bsBPB + ebpbNew + bpbnBootUnit 11408 0000AEB8 EB40 <1> jmp @F 11409 <1> 11410 <1> %if _INPUT_FILE_BOOT 11411 <1> var_bootydpunit_setup: 11412 0000AEBA F606[A300]02 <1> testopt [internalflags2], dif2_input_file_boot 11413 0000AEBF 7440 <1> jz .retc 11414 <1> 11415 0000AEC1 52 <1> push dx 11416 0000AEC2 B8A000 <1> mov ax, LOAD_INPUT_FILE_SIZE 11417 0000AEC5 F726[B08F] <1> mul word [load_input_file.active] 11418 0000AEC9 5A <1> pop dx 11419 <1> 11420 0000AECA 93 <1> xchg ax, bx 11421 0000AECB 8D9F[B08D] <1> lea bx, [load_input_file + bx - LOADDATA3 + bsBPB + ebpbNew + bpbnBootUnit] 11423 0000AECF EB29 <1> jmp @F 11424 <1> %endif 11425 <1> 11426 <1> var_bootldppart_setup: 11427 0000AED1 BB[0C8C] <1> mov bx, loaddata_loadedfrom - LOADDATA + bsBPB + bpbHiddenSectors 11429 0000AED4 EB24 <1> jmp @F 11430 <1> 11431 <1> var_bootsdppart_setup: 11432 0000AED6 BB[AC8C] <1> mov bx, load_data - LOADDATA2 + bsBPB + bpbHiddenSectors 11434 0000AED9 EB1F <1> jmp @F 11435 <1> 11436 <1> %if _INPUT_FILE_BOOT 11437 <1> var_bootydppart_setup: 11438 0000AEDB F606[A300]02 <1> testopt [internalflags2], dif2_input_file_boot 11439 0000AEE0 741F <1> jz .retc 11440 <1> 11441 0000AEE2 52 <1> push dx 11442 0000AEE3 B8A000 <1> mov ax, LOAD_INPUT_FILE_SIZE 11443 0000AEE6 F726[B08F] <1> mul word [load_input_file.active] 11444 0000AEEA 5A <1> pop dx 11445 <1> 11446 0000AEEB 93 <1> xchg ax, bx 11447 0000AEEC 8D9F[8C8D] <1> lea bx, [load_input_file + bx - LOADDATA3 + bsBPB + bpbHiddenSectors] 11449 0000AEF0 EB08 <1> jmp @F 11450 <1> %endif 11451 <1> 11452 <1> var_bootunitflags_setup: 11453 0000AEF2 05[908A] <1> add ax, load_unit_flags 11454 0000AEF5 89C3 <1> mov bx, ax 11455 0000AEF7 BF[9095] <1> mov di, mask_bootunitflags 11456 <1> @@: 11457 0000AEFA F606[9D00]40 <1> testopt [internalflags], nodosloaded 11458 0000AEFF 7501 <1> jnz @F ; (NC) 11459 <1> var_bootydpunit_setup.retc: 11460 <1> var_bootydppart_setup.retc: 11461 0000AF01 F9 <1> stc 11462 <1> @@: 11463 0000AF02 C3 <1> retn 11464 <1> %endif 11465 <1> 11466 <1> 11467 <1> usesection lDEBUG_DATA_ENTRY 11468 <1> 11469 <1> align 4, db 0 11470 <1> masks: 11471 <1> ; size 4 want masks + 0 11472 <1> ; size 3 want masks + 1 11473 <1> ; size 2 want masks + 2 11474 <1> ; size 1 want masks + 3 11475 <1> ; size 0 want masks + 4 11476 <1> ; 4 - size = offset into masks 11477 00009584 00 <1> mask_4byte: db 0 11478 00009585 00 <1> mask_3byte: db 0 11479 00009586 00 <1> mask_2byte: db 0 11480 00009587 00 <1> mask_1byte: db 0 11481 00009588 FFFFFFFF <1> mask_0byte: dd -1 11482 0000958C FF0FFFFF <1> mask_ysf: dd ~ (ifhfTestReserved1 | ifhfTestReserved2 | ifhfQuietInput | ifhfQuietOutput) 11484 <1> %if _BOOTLDR 11485 00009590 FEFFFFFF <1> mask_bootunitflags: dd ~ luf_mask_writable 11486 <1> %endif 11487 <1> 11488 <1> %if _DEBUG3 11489 <1> masks_test: 11490 <1> mask_test_0: dd 0AA55AA55h 11491 <1> mask_test_1: dd 00FF00FFh 11492 <1> mtest_regs: 11493 <1> mtest_reg_0: dd 0 11494 <1> mtest_reg_1: dd 00110022h 11495 <1> %endif 11496 <1> 11497 <1> 11498 <1> usesection lDEBUG_CODE 11499 <1> ; INP: al = first character 11500 <1> ; si-> next character 11501 <1> ; OUT: CY if no variable, 11502 <1> ; al, si = unchanged 11503 <1> ; NC if variable, 11504 <1> ; bx-> low word 11505 <1> ; dx-> high word 11506 <1> ; (if cl <= 2 then dx-> some word in our memory) 11507 <1> ; (dx != bx+2 if compound register) 11508 <1> ; cl = size of variable (1, 2, 3, 4 bytes) 11509 <1> ; ch = size of variable's name (2..13 bytes) 11510 <1> ; INP:si - 1 -> variable's name 11511 <1> ; (can be modified from original content) 11512 <1> ; ah = 0 if a writeable variable (ie simply memory) 11513 <1> ; 1 if a read-only variable (ie simply memory) 11514 <1> ; 2..33 if an MMX register, see note below 11515 <1> ; al = next character behind variable 11516 <1> ; si-> behind next character 11517 <1> ; dword [di] = mask of bits that are read-only 11518 <1> ; CHG: ah, bx, dx, cx, di 11519 <1> ; STT: ss = ds = es, UP 11520 <1> ; 11521 <1> ; Note: For read access to (half of) an MMX register, no 11522 <1> ; special handling is necessary at all, because cl, 11523 <1> ; bx, and dx are set up to access a buffer that 11524 <1> ; contains the current value. (The value should be 11525 <1> ; read at once though, as the buffer may be shared 11526 <1> ; or become outdated otherwise.) 11527 <1> ; Write access to an MMX register must be handled 11528 <1> ; specifically, however. The returned field type 11529 <1> ; in ah indicates the register number (0..7) in the 11530 <1> ; lowest three bits. The two bits above those specify 11531 <1> ; the access type, which also specifies what was read 11532 <1> ; but need not be examined by readers. The access 11533 <1> ; type must be adhered to by writers. These are the 11534 <1> ; access types: 11535 <1> ; 0 zero extension from 32 bits to write all 64 bits 11536 <1> ; 1 sign extension from 32 bits to write all 64 bits 11537 <1> ; 2 writes only low 32 bits 11538 <1> ; 3 writes only high 32 bits 11539 <1> ; (Access type 3 is the only one for which the read 11540 <1> ; buffer is initialised with the high 32 bits.) 11541 <1> ; 11542 <1> ; As dx points to 'some word in our memory' if it 11543 <1> ; doesn't serve any purpose, it is still valid to 11544 <1> ; read the word that it points to. Particularly dx 11545 <1> ; mustn't contain 0FFFFh then, but with the current 11546 <1> ; implementation, it can also be assumed that we do 11547 <1> ; actually 'own' the word (even with a PM segment 11548 <1> ; shorter than 64 KiB the read would be allowed). 11549 <1> isvariable?: 11550 0000AF03 A8 <1> db __TEST_IMM8 ; (skip stc, NC) 11551 <1> 11552 <1> ; As above but additionally: 11553 <1> ; 11554 <1> ; INP: di -> buffer to receive variable name, 14 bytes 11555 <1> ; OUT: if NC, buffer filled with all-caps ASCIZ name 11556 <1> .return_name: 11557 0000AF04 F9 <1> stc 11558 <1> 11559 0000AF05 4E <1> dec si 11560 <1> lframe 11561 0000AF06 5589E5 <1> lenter 11562 <1> lvar word, bit0_is_return_name 11563 0000AF09 9C <1> pushf 11564 <1> lvar word, return_name_pointer 11565 0000AF0A 57 <1> push di 11566 0000AF0B 31C0 <1> xor ax, ax 11567 <1> lvar 16, namebuffer 11568 0000AF0D 50 <1> push ax ; ax = 0 so that accidentally reading past 11569 <1> ; the actual buffer wouldn't match 11570 0000AF0E FF740C <1> push word [si+12] 11571 0000AF11 FF740A <1> push word [si+10] 11572 0000AF14 FF7408 <1> push word [si+8] 11573 0000AF17 FF7406 <1> push word [si+6] 11574 0000AF1A FF7404 <1> push word [si+4] 11575 0000AF1D FF7402 <1> push word [si+2] 11576 0000AF20 FF34 <1> push word [si] 11577 0000AF22 89E7 <1> mov di, sp ; -> name buffer 11578 <1> 11579 <1> lvar word, fieldtype_high_flags_low 11580 <1> lequ ?fieldtype_high_flags_low + 1, fieldtype 11581 <1> lequ ?fieldtype_high_flags_low, flags 11582 0000AF24 50 <1> push ax ; field type initialised to 0 (RW), flags too 11583 0000AF25 31DB <1> _386 xor bx, bx ; (a flag for the 32-bit register name check) 11584 <1> lvar word, length_to_add 11585 0000AF27 50 <1> push ax ; = 0 11586 <1> lvar word, startpointer 11587 0000AF28 56 <1> push si ; -> name start 11588 0000AF29 89FE <1> mov si, di 11589 0000AF2B 57 <1> push di 11590 <1> 11591 0000AF2C B91000 <1> mov cx, 16 11592 <1> .store: 11593 0000AF2F AC <1> lodsb 11594 <1> ; call uppercase ; (isseparator? calls uppercase) 11595 0000AF30 E8AEFA <1> call isseparator? 11596 0000AF33 F8 <1> clc 11597 0000AF34 7501 <1> jne short .not_separator 11598 0000AF36 F9 <1> stc 11599 <1> .not_separator: 11600 0000AF37 D1DA <1> rcr dx, 1 ; dl = flags indicating separators 11601 0000AF39 AA <1> stosb 11602 0000AF3A E2F3 <1> loop .store 11603 <1> 11604 0000AF3C 5E <1> pop si 11605 <1> 11606 0000AF3D F646FE01 <1> test byte [bp + ?bit0_is_return_name], 1 11607 0000AF41 7409 <1> jz @F 11608 <1> 11609 0000AF43 56 <1> push si 11610 0000AF44 B107 <1> mov cl, 14 >> 1 11611 0000AF46 8B7EFC <1> mov di, word [bp + ?return_name_pointer] 11612 0000AF49 F3A5 <1> rep movsw 11613 0000AF4B 5E <1> pop si 11614 <1> 11615 <1> @@: 11616 0000AF4C F6C214 <1> test dl, 1<<2|1<<4 11617 0000AF4F AD <1> lodsw 11618 0000AF50 7460 <1> jz short .notreg16 11619 <1> 11620 0000AF52 E84700 <1> call .reg16names_match ; (iff no match, --> .notreg16) 11621 <1> ; bx-> regs entry of (first) match 11622 0000AF55 F6C204 <1> test dl, 1<<2 11623 0000AF58 AD <1> lodsw 11624 0000AF59 7403E99000 <1> jnz .reg16 ; iff single match --> 11625 <1> 11626 <1> ; Check for a second 16-bit register name 11627 <1> ; (ie check for a compound register name) 11628 0000AF5E E83B00 <1> call .reg16names_match ; (iff no match, --> .notreg16) 11629 <1> ; bx-> regs entry of second match 11630 0000AF61 92 <1> xchg dx, ax ; dx-> regs entry of first match 11631 0000AF62 B90404 <1> mov cx, 4<<8|4 11632 <1> .return_success: ; cx, bx, dx, ?fieldtype set 11633 0000AF65 31C0 <1> xor ax, ax 11634 0000AF67 88C8 <1> mov al, cl 11635 0000AF69 F7D8 <1> neg ax 11636 0000AF6B 05[8895] <1> add ax, masks + 4 ; 4 - size = offset into masks 11637 0000AF6E 97 <1> xchg di, ax ; di -> mask 11638 0000AF6F 807EEB01 <1> cmp byte [bp + ?fieldtype], 1 11639 0000AF73 7503 <1> jne @F 11640 0000AF75 BF[8895] <1> mov di, mask_0byte ; di -> mask 11641 <1> @@: 11642 <1> .return_success_di: 11643 0000AF78 31C0 <1> xor ax, ax 11644 0000AF7A 88E8 <1> mov al, ch ; ax = length 11645 <1> 11646 0000AF7C F646FE01 <1> test byte [bp + ?bit0_is_return_name], 1 11647 0000AF80 7407 <1> jz @F 11648 <1> 11649 0000AF82 8B76FC <1> mov si, word [bp + ?return_name_pointer] 11650 0000AF85 01C6 <1> add si, ax 11651 0000AF87 8824 <1> mov byte [si], ah ; zero-terminate 11652 <1> @@: 11653 <1> 11654 0000AF89 5E <1> pop si ; ?startpointer 11655 0000AF8A F646EA01 <1> testopt [bp + ?flags], 1 11656 0000AF8E 7402 <1> jz @F 11657 0000AF90 58 <1> pop ax ; get length to add to start 11658 0000AF91 50 <1> push ax ; fill stack slot again 11659 <1> @@: 11660 0000AF92 01C6 <1> add si, ax ; -> behind name (should NC) 11661 0000AF94 58 <1> pop ax ; discard ?length_to_add 11662 0000AF95 F8 <1> clc ; (NC) 11663 <1> .return_ax_frame_lodsb: 11664 0000AF96 58 <1> pop ax ; ah = ?type 11665 0000AF97 89EC5D <1> lleave code 11666 0000AF9A AC <1> lodsb 11667 <1> .retn: 11668 0000AF9B C3 <1> retn 11669 <1> 11670 <1> 11671 <1> ; INP: ax = capitalised candidate register name 11672 <1> ; ch = 0 11673 <1> ; dx, si, bx, etc set up for later checks 11674 <1> ; OUT: Iff match, 11675 <1> ; bx-> associated regs entry (dword-aligned) 11676 <1> ; ax = INP:bx 11677 <1> ; Else, 11678 <1> ; returns to .notreg16 11679 <1> ; bx left unchanged on 386 systems 11680 <1> ; CHG: cl, di, bx, ax 11681 <1> ; 11682 <1> ; Note: The 32-bit register name check depends on the 11683 <1> ; fact that the low two bits of bx are set to 11684 <1> ; zero on a match, which is true because regs 11685 <1> ; is dword-aligned. 11686 <1> ; It also depends on bx being left unchanged on 11687 <1> ; a mismatch, which is the case unless the 11688 <1> ; non-386 additional FS,GS filtering occurs. 11689 <1> .reg16names_match: 11690 0000AF9C BF[7480] <1> mov di, reg16names 11691 0000AF9F B110 <1> mov cl, 16 11692 0000AFA1 F2AF <1> repne scasw 11693 0000AFA3 750C <1> jne short .notreg16_pop ; no match --> 11694 0000AFA5 01FF <1> add di, di 11695 0000AFA7 93 <1> xchg ax, bx ; (returned for compound register name match) 11696 0000AFA8 8D9D[7809] <1> lea bx, [di -2*(reg16names+DATASECTIONFIXUP+2) +regs] 11697 <1> ; -> regs entry 11698 0000AFAC C3 <1> _386 retn 11699 <1> ; cx = number of remaining reg16names 11700 0000AFAD D1E9 <1> _no386 shr cx, 1 ; cx = number of remaining reg16names pairs 11701 <1> ; = 1 iff exactly the IP,FL pair remaining 11702 <1> ; (ie matched one of FS,GS) 11703 0000AFAF E2EA <1> _no386 loop .retn ; iff cx != 1, return the match --> 11704 <1> ; on non-386 systems, FS,GS matches fall through here 11705 <1> .notreg16_pop: 11706 0000AFB1 58 <1> pop ax ; (discard near return address) 11707 <1> .notreg16: 11708 <1> ; Check for a 32-bit register name 11709 0000AFB2 F6C208 <1> _386 test dl, 1<<3 11710 0000AFB5 7419 <1> _386 jz short .notreg32 11711 <1> 11712 0000AFB7 8D76EC <1> _386 lea si, [bp+?namebuffer] 11713 0000AFBA AC <1> _386 lodsb 11714 0000AFBB D0EB <1> _386 shr bl, 1 ; CY iff second entry during same call 11715 <1> ; (in that case, al contains 'E') 11716 0000AFBD 1C45 <1> _386 sbb al, 'E' ; possibly an 'E' register ? (on first entry) 11717 0000AFBF AD <1> _386 lodsw 11718 0000AFC0 750E <1> _386 jne short .notreg32 ; no --> (or after second entry) 11719 0000AFC2 43 <1> _386 inc bx ; prepare flag for second entry 11720 <1> ; (this requires regs to be dword-aligned!) 11721 0000AFC3 80FC53 <1> _386 cmp ah, 'S' ; candidate segment register ? 11722 0000AFC6 7408 <1> _386 je short .notreg32 ; yes, skip check (disallow match) --> 11723 <1> 11724 0000AFC8 E8D1FF <1> _386 call .reg16names_match ; (iff no match, --> .notreg16 (second entry)) 11725 <1> ; bx-> regs entry of match 11726 0000AFCB B90403 <1> _386 mov cx, 3<<8|4 11727 0000AFCE EB22 <1> _386 jmp short .return_success_var32_set_dx 11728 <1> 11729 <1> .notreg32: 11730 <1> ; Check for an 8-bit register name 11731 0000AFD0 F6C204 <1> test dl, 1<<2 11732 0000AFD3 7423 <1> jz short .notreg8 11733 <1> 11734 0000AFD5 8D76EC <1> lea si, [bp+?namebuffer] 11735 0000AFD8 AD <1> lodsw 11736 0000AFD9 BF[6480] <1> mov di, reg8names 11737 0000AFDC B108 <1> mov cl, 8 11738 0000AFDE F2AF <1> repne scasw 11739 0000AFE0 7516 <1> jne short .notreg8 11740 <1> ; cx = cl = number of remaining reg8names 11741 0000AFE2 80E101 <1> and cl, 1 ; cx = cl = 1 iff an xL register, else 0 11742 0000AFE5 8D9DFD8B <1> lea bx, [di-reg8names-2+regs-1] 11743 <1> ; bx-> reg_eax-1 if AL, reg_eax+1 if AH, etc 11744 0000AFE9 01CB <1> add bx, cx ; bx-> reg_eax if AL, reg_eax+1 if AH, etc 11745 0000AFEB B101 <1> mov cl, 1 11746 <1> 11747 0000AFED A9 <1> db __TEST_IMM16 ; (NC, skip mov) 11748 <1> .reg16: 11749 0000AFEE B102 <1> mov cl, 2 11750 <1> .got2bytename: 11751 <1> .got2bytename_var32_set_dx: 11752 0000AFF0 B502 <1> mov ch, 2 11753 <1> .return_success_var32_set_dx: 11754 0000AFF2 8D5702 <1> lea dx, [bx+2] ; (irrelevant to 8-/16-bit register return) 11755 <1> %define .return_success_j .return_success_j1 11756 <1> %[.return_success_j]: 11757 0000AFF5 E96DFF <1> jmp .return_success 11758 <1> 11759 <1> .notreg8: 11760 <1> 11761 0000AFF8 BF[F893] <1> mov di, isvariable_morebyte_nameheaders 11762 <1> 11763 <1> .loop: 11764 0000AFFB 8B46EC <1> mov ax, word [bp + ?namebuffer] 11765 0000AFFE B9[A694] <1> mov cx, isvariable_morebyte_nameheaders.end 11766 0000B001 39CF <1> cmp di, cx 11767 0000B003 730A <1> jae @F 11768 0000B005 29F9 <1> sub cx, di 11769 0000B007 D1E9 <1> shr cx, 1 ; = how many headers remaining 11770 0000B009 F2AF <1> repne scasw 11771 0000B00B 741E <1> je .check_morebyte 11772 <1> %if IVS_HAVE_ONEBYTE 11773 0000B00D EB0C <1> jmp .next_no_pop 11774 <1> 11775 <1> @@: 11776 <1> %if IVS_SINGLE_ONEBYTE 11777 0000B00F 41 <1> inc cx 11778 0000B010 39CF <1> cmp di, cx ; iteration after one byte var check ? 11779 0000B012 7309 <1> jae @F ; yes, end --> 11780 0000B014 47 <1> inc di ; remember we did the one byte check 11781 0000B015 3C56 <1> cmp al, IVS_SINGLE_ONEBYTE_NAME 11782 0000B017 7407 <1> je .check_onebyte 11783 <1> %else 11784 <1> mov cx, isvariable_onebyte_names.end 11785 <1> sub cx, di ; = how many names remaining 11786 <1> jbe @F ; if none --> 11787 <1> repne scasb 11788 <1> je .check_onebyte 11789 <1> %endif 11790 <1> %endif 11791 0000B019 A8 <1> db __TEST_IMM8 ; (skip pop) 11792 <1> .next: 11793 0000B01A 5F <1> pop di 11794 <1> .next_no_pop: 11795 0000B01B EBDE <1> jmp .loop 11796 <1> 11797 <1> @@: 11798 0000B01D E94801 <1> jmp .end 11799 <1> 11800 <1> 11801 <1> %if IVS_HAVE_ONEBYTE 11802 <1> .check_onebyte: 11803 0000B020 57 <1> push di 11804 <1> %if IVS_SINGLE_ONEBYTE 11805 0000B021 BB[2891] <1> mov bx, isvariable_struc_onebyte_list 11806 <1> %else 11807 <1> sub di, isvariable_onebyte_names + 1 11808 <1> ; = index 11809 <1> %if ISVARIABLESTRUC_size == 8 11810 <1> add di, di ; = index * 2 11811 <1> add di, di ; = index * 4 11812 <1> add di, di ; = index * 8 11813 <1> %else 11814 <1> %error Unexpected structure size 11815 <1> %endif 11816 <1> lea bx, [di + isvariable_struc_onebyte_list] 11817 <1> %endif 11818 0000B024 8D76ED <1> lea si, [bp + ?namebuffer + 1] ; -> buffered string (allcaps) 11819 0000B027 31C9 <1> xor cx, cx ; = 0, gets incremented next 11820 0000B029 EB21 <1> jmp @F 11821 <1> %endif 11822 <1> 11823 <1> .check_morebyte: 11824 0000B02B 57 <1> push di 11825 0000B02C 81EF[FA93] <1> sub di, isvariable_morebyte_nameheaders + 2 11826 <1> ; = index * 2 11827 <1> %if ISVARIABLESTRUC_size == 8 11828 0000B030 01FF <1> add di, di ; = index * 4 11829 0000B032 01FF <1> add di, di ; = index * 8 11830 <1> %else 11831 <1> %error Unexpected structure size 11832 <1> %endif 11833 0000B034 8D9D[3091] <1> lea bx, [di + isvariable_struc_morebyte_list] 11834 0000B038 8B4F02 <1> mov cx, word [bx + ivFlags] 11835 0000B03B 83E10F <1> and cx, ivfNameLengthMask ; cx = length 11836 0000B03E 8B3F <1> mov di, word [bx + ivName] ; -> name 11837 0000B040 8D76EE <1> lea si, [bp + ?namebuffer + 2] ; -> buffered string (allcaps) 11838 0000B043 38C0 <1> cmp al, al ; ZR (in case remaining length is zero) 11839 0000B045 51 <1> push cx 11840 0000B046 F3A6 <1> repe cmpsb ; compare 11841 0000B048 59 <1> pop cx 11842 0000B049 75CF <1> jne .next ; if not same --> 11843 0000B04B 41 <1> inc cx ; increment twice 11844 <1> @@: 11845 0000B04C 41 <1> inc cx ; increment once 11846 0000B04D AC <1> lodsb ; get next byte in buffer 11847 0000B04E 807F0600 <1> cmp byte [bx + ivArrayLast], 0 11848 0000B052 7503E9BC00 <1> je .notarray 11849 <1> 11850 <1> .array: 11851 0000B057 3C28 <1> cmp al, '(' 11852 0000B059 754B <1> jne .array_not_index_expression ; not index expression --> 11853 <1> 11854 <1> .array_index_expression: 11855 0000B05B 8B76E6 <1> mov si, word [bp + ?startpointer] 11856 0000B05E 01CE <1> add si, cx ; -> at opening parens 11857 0000B060 46 <1> inc si ; -> behind opening parens 11858 0000B061 AC <1> lodsb 11859 0000B062 52 <1> push dx 11860 0000B063 E88D07 <1> call getbyte 11861 0000B066 B600 <1> mov dh, 0 11862 0000B068 89D7 <1> mov di, dx ; di = index 11863 0000B06A 5A <1> pop dx 11864 0000B06B E8EE08 <1> call skipwh0 11865 0000B06E 3C29 <1> cmp al, ')' ; insure closing parens 11866 0000B070 7403E99B00 <1> jne .error_j1 11867 <1> 11868 0000B075 56 <1> push si 11869 0000B076 2B76E6 <1> sub si, word [bp + ?startpointer] 11870 <1> ; = how much to skip 11871 0000B079 8976E8 <1> mov word [bp + ?length_to_add], si 11872 0000B07C 5E <1> pop si 11873 0000B07D 804EEA01 <1> setopt [bp + ?flags], 1 11874 <1> 11875 0000B081 F646FE01 <1> test byte [bp + ?bit0_is_return_name], 1 11876 0000B085 7415 <1> jz .array_no_return_name 11877 <1> 11878 0000B087 97 <1> xchg ax, di 11879 0000B088 8B7EFC <1> mov di, word [bp + ?return_name_pointer] 11880 0000B08B 01CF <1> add di, cx ; -> behind name 11881 0000B08D 807F060F <1> cmp byte [bx + ivArrayLast], 0Fh 11882 0000B091 7705 <1> ja @F ; if >= 10h is a valid index --> 11883 0000B093 E88209 <1> call hexnyb ; expand to single digit 11884 0000B096 EB03 <1> jmp @FF 11885 <1> @@: 11886 0000B098 E87209 <1> call hexbyte ; expand to two digits 11887 <1> @@: 11888 0000B09B 97 <1> xchg ax, di ; restore di = index 11889 <1> 11890 <1> .array_no_return_name: 11891 0000B09C 41 <1> inc cx ; make space for one digit 11892 0000B09D 807F060F <1> cmp byte [bx + ivArrayLast], 0Fh 11893 0000B0A1 7601 <1> jna @F ; if maximum index <= 0Fh --> 11894 0000B0A3 41 <1> inc cx ; make space for another digit 11895 <1> @@: 11896 0000B0A4 EB57 <1> jmp .array_index_expression_common 11897 <1> 11898 <1> .array_not_index_expression: 11899 0000B0A6 E838F9 <1> call isseparator? ; name ends ? 11900 0000B0A9 7509 <1> jne @F ; no --> 11901 0000B0AB F6470302 <1> testopt [bx + ivFlags], ivfArrayOptional 11902 <1> ; is the index optional ? 11903 0000B0AF 7567 <1> jnz .arrayfirst ; yes, handle as if first --> 11904 <1> .next_j1: 11905 0000B0B1 E966FF <1> jmp .next ; no, mismatch --> 11906 <1> 11907 <1> @@: 11908 0000B0B4 E85307 <1> call getnyb 11909 0000B0B7 72F8 <1> jc .next_j1 11910 0000B0B9 98 <1> cbw ; ax = first nybble of index 11911 0000B0BA 97 <1> xchg di, ax ; di = first nybble of index 11912 0000B0BB AC <1> lodsb 11913 0000B0BC F6470304 <1> testopt [bx + ivFlags], ivfSeparatorSpecial 11914 0000B0C0 7408 <1> jz @F 11915 0000B0C2 807F060F <1> cmp byte [bx + ivArrayLast], 0Fh 11916 <1> ; highest > 0Fh ? 11917 0000B0C6 7629 <1> jna .gotseparatorspecial; no --> 11918 0000B0C8 EB0B <1> jmp .get_second_digit 11919 <1> 11920 <1> @@: 11921 0000B0CA E814F9 <1> call isseparator? ; single digit ? 11922 0000B0CD 7422 <1> je @F ; yes --> 11923 0000B0CF 807F060F <1> cmp byte [bx + ivArrayLast], 0Fh 11924 <1> ; highest > 0Fh ? 11925 0000B0D3 76DC <1> jna .next_j1 ; no --> 11926 <1> .get_second_digit: 11927 0000B0D5 E83207 <1> call getnyb 11928 0000B0D8 72D7 <1> jc .next_j1 11929 0000B0DA 98 <1> cbw ; ax = second nybble of index 11930 0000B0DB 01FF <1> add di, di 11931 0000B0DD 01FF <1> add di, di 11932 0000B0DF 01FF <1> add di, di 11933 0000B0E1 01FF <1> add di, di ; di = first digit times 16 11934 0000B0E3 01C7 <1> add di, ax ; di = full index 11935 0000B0E5 AC <1> lodsb 11936 0000B0E6 F6470304 <1> testopt [bx + ivFlags], ivfSeparatorSpecial 11937 0000B0EA 7505 <1> jnz @F 11938 0000B0EC E8F2F8 <1> call isseparator? 11939 0000B0EF 75C0 <1> jne .next_j1 11940 <1> @@: 11941 <1> .gotseparatorspecial: 11942 <1> 11943 0000B0F1 F7DE <1> neg si ; minus -> after separator 11944 0000B0F3 8D4AED <1> lea cx, [bp + ?namebuffer + 1 + si] 11945 <1> ; -> buffered string plus 1 minus -> after separator 11946 <1> ; -> buffered string plus 1 minus (-> at separator plus 1) 11947 <1> ; -> buffered string minus -> at separator 11948 0000B0F6 F7D9 <1> neg cx ; -> at separator minus -> buffered string 11949 0000B0F8 8B76E6 <1> mov si, word [bp + ?startpointer] 11950 0000B0FB 01CE <1> add si, cx 11951 <1> 11952 <1> .array_index_expression_common: 11953 <1> ; si -> behind index 11954 0000B0FD 89F8 <1> mov ax, di 11955 <1> ; test ah, ah 11956 <1> ; jnz .error_j1 ; (not possible) 11957 0000B0FF 3A4706 <1> cmp al, byte [bx + ivArrayLast] 11958 <1> ; index > last ? 11959 0000B102 770C <1> ja .error_j1 ; then error --> 11960 <1> 11961 0000B104 F6470301 <1> testopt [bx + ivFlags], ivfArrayOneBased 11962 0000B108 7403 <1> jz @F ; got index 11963 0000B10A 48 <1> dec ax ; decrement index to get 0-based 11964 0000B10B 7803 <1> js .error_j1 ; if it was 0, invalid --> 11965 <1> @@: 11966 0000B10D 96 <1> xchg ax, si ; si = index 11967 0000B10E EB0A <1> jmp .arraycommon ; continue 11968 <1> 11969 <1> .error_j1: 11970 0000B110 E9CBF3 <1> jmp error 11971 <1> 11972 <1> 11973 <1> .notarray: 11974 0000B113 E8CBF8 <1> call isseparator? ; name ends ? 11975 0000B116 7599 <1> jne .next_j1 ; no, mismatch --> 11976 <1> 11977 <1> .arrayfirst: 11978 0000B118 31F6 <1> xor si, si ; si = array index (0 here) 11979 <1> 11980 <1> .arraycommon: 11981 0000B11A 88CD <1> mov ch, cl ; ch = name length 11982 0000B11C 8B4702 <1> mov ax, word [bx + ivFlags] 11983 0000B11F 83E030 <1> and ax, ivfVarLengthMask; ax = shifted encoded var length 11984 0000B122 B104 <1> mov cl, ivfVarLengthShift 11985 0000B124 D3E8 <1> shr ax, cl ; ax = encoded var length 11986 0000B126 40 <1> inc ax ; decode var length 11987 0000B127 88C1 <1> mov cl, al ; cl = var length 11988 <1> 11989 0000B129 96 <1> xchg ax, si ; ax = array index 11990 <1> 11991 0000B12A F6470280 <1> testopt [bx + ivFlags], ivfReadOnly 11992 0000B12E 7403 <1> jz @F 11993 0000B130 FE46EB <1> inc byte [bp + ?fieldtype] 11994 <1> ; = 1 (RO) 11995 <1> @@: 11996 0000B133 31FF <1> xor di, di 11997 0000B135 8B7704 <1> mov si, word [bx + ivAddress] 11998 0000B138 F6470240 <1> testopt [bx + ivFlags], ivfSpecialSetUp 11999 0000B13C 7407 <1> jz .notspecial 12000 <1> ; (NC) 12001 0000B13E FFD6 <1> call si ; INP: ax = array index (0-based), di = 0 12002 <1> ; CHG: si, ax 12003 <1> ; OUT: NC if valid, 12004 <1> ; bx -> var, di = 0 or di -> mask 12005 0000B140 7318 <1> jnc @F 12006 0000B142 E9D5FE <1> jmp .next 12007 <1> 12008 <1> .notspecial: 12009 0000B145 8A5F07 <1> mov bl, byte [bx + ivArrayBetween] 12010 0000B148 B700 <1> mov bh, 0 ; bx = array between offset 12011 0000B14A 00CB <1> add bl, cl 12012 0000B14C 80D700 <1> adc bh, 0 ; bx = array item size 12013 0000B14F F7E3 <1> mul bx ; dx:ax = ax times bx 12014 0000B151 85D2 <1> test dx, dx 12015 0000B153 75BB <1> jnz .error_j1 12016 0000B155 01F0 <1> add ax, si ; ax -> variable 12017 0000B157 72B7 <1> jc .error_j1 12018 0000B159 93 <1> xchg ax, bx ; bx -> variable 12019 <1> @@: 12020 0000B15A 5A <1> pop dx ; (discard pointer into names/headers) 12021 0000B15B 8D5702 <1> lea dx, [bx+2] ; (irrelevant to 8-/16-bit register return) 12022 0000B15E 85FF <1> test di, di 12023 0000B160 7503E900FE <1> jz .return_success 12024 0000B165 E910FE <1> jmp .return_success_di 12025 <1> 12026 <1> 12027 <1> .end: 12028 <1> %if _MMXSUPP 12029 <1> ;MMx MMxf MM(x) MM(x)f 12030 0000B168 F6C278 <1> test dl, 1<<3|1<<4| 1<<5| 1<<6 12031 0000B16B 746A <1> jz short .notmmx 12032 <1> 12033 0000B16D 8D76EC <1> lea si, [bp+?namebuffer] 12034 0000B170 803E[E50A]00 <1> cmp byte [has_mmx], 0 ; MMX supported ? 12035 0000B175 7460 <1> je short .notmmx ; no --> 12036 <1> [cpu 586] 12037 0000B177 AD <1> lodsw 12038 0000B178 3D4D4D <1> cmp ax, "MM" ; possibly an MMX register ? 12039 0000B17B 755A <1> jne short .notmmx ; no --> 12040 0000B17D AC <1> lodsb 12041 0000B17E E85301 <1> call getstmmxdigit 12042 0000B181 7254 <1> jc short .notmmx 12043 0000B183 88DC <1> mov ah, bl 12044 0000B185 C0E303 <1> shl bl, 3 ; shift into reg field 12045 0000B188 8D4C14 <1> lea cx, [si-?namebuffer] 12046 0000B18B 80CB06 <1> or bl, 06h ; code to get our ModR/M byte (r/m = [ofs]) 12047 0000B18E 29E9 <1> sub cx, bp ; length of name (if with suffix) 12048 0000B190 881E[C2B1] <1> mov byte [.getmmxlow_modrm], bl 12049 0000B194 43 <1> inc bx ; adjust the ModR/M byte (r/m = [bx]) 12050 0000B195 AC <1> lodsb 12051 0000B196 881E[E7B1] <1> mov byte [.getmmxhigh_modrm], bl 12052 0000B19A 4E <1> dec si 12053 0000B19B 4E <1> dec si 12054 <1> 12055 0000B19C E842F8 <1> call isseparator? ; a separator after potential suffix ? 12056 0000B19F AC <1> lodsb 12057 0000B1A0 B700 <1> mov bh, 0 12058 0000B1A2 7516 <1> jne short .check_mmx_no_suffix ; no --> 12059 <1> 12060 0000B1A4 3C5A <1> cmp al, 'Z' 12061 0000B1A6 7418 <1> je short .getmmxlow ; 0 = ZX --> 12062 0000B1A8 B710 <1> mov bh, 2<<3 ; = 10h = low 12063 0000B1AA 3C4C <1> cmp al, 'L' 12064 0000B1AC 7412 <1> je short .getmmxlow 12065 0000B1AE B708 <1> mov bh, 1<<3 ; = 8h = SX 12066 0000B1B0 3C53 <1> cmp al, 'S' 12067 0000B1B2 740C <1> je short .getmmxlow 12068 0000B1B4 3C48 <1> cmp al, 'H' 12069 0000B1B6 7425 <1> je short .getmmxhigh 12070 0000B1B8 B700 <1> mov bh, 0 ; 0 = ZX 12071 <1> .check_mmx_no_suffix: 12072 0000B1BA 49 <1> dec cx ; length of name (if no suffix follows) 12073 0000B1BB E823F8 <1> call isseparator? ; immediately a separator (but no suffix) ? 12074 0000B1BE 7517 <1> jne short .notmmx ; no --> 12075 <1> ; yes, (default to) zero-extending full reg 12076 <1> .getmmxlow: 12077 <1> .getmmxlow_modrm: equ $+2 ; (opcode adjusted for the right MMX reg) 12078 0000B1C0 0F7E06[E00B] <1> movd dword [mmxbuff], mm0 12079 0000B1C5 08FC <1> or ah, bh 12080 <1> 12081 <1> .mmxcommon: 12082 0000B1C7 80C402 <1> add ah, 2 12083 0000B1CA B504 <1> mov ch, 4 12084 0000B1CC 86CD <1> xchg cl, ch 12085 0000B1CE BB[E00B] <1> mov bx, mmxbuff 12086 0000B1D1 8866EB <1> mov byte [bp+?fieldtype], ah 12087 <1> .return_success_var32_set_dx_j: 12088 0000B1D4 E91BFE <1> jmp .return_success_var32_set_dx 12089 <1> __CPU__ 12090 <1> 12091 <1> .notmmx: 12092 <1> %endif 12093 <1> 12094 <1> .return_failure: 12095 0000B1D7 5E <1> pop si ; ?startpointer 12096 0000B1D8 58 <1> pop ax ; ?length_to_add 12097 0000B1D9 F9 <1> stc 12098 0000B1DA E9B9FD <1> jmp .return_ax_frame_lodsb 12099 <1> 12100 <1> 12101 <1> %if _MMXSUPP 12102 <1> [cpu 586] 12103 <1> .getmmxhigh: 12104 0000B1DD 83EC08 <1> sub sp, byte 8 12105 0000B1E0 80CC18 <1> or ah, 3<<3 ; = 18h = high 12106 0000B1E3 89E3 <1> mov bx, sp ; (ss = ds) 12107 <1> .getmmxhigh_modrm: equ $+2 ; (opcode adjusted for the right MMX reg) 12108 0000B1E5 0F7F07 <1> movq qword [bx], mm0 12109 0000B1E8 5B <1> pop bx 12110 0000B1E9 5B <1> pop bx ; discard low dword 12111 0000B1EA 668F06[E00B] <1> pop dword [mmxbuff] ; save high dword here 12112 0000B1EF EBD6 <1> jmp short .mmxcommon 12113 <1> __CPU__ 12114 <1> %endif 12115 <1> 12116 <1> 12117 <1> var_ri_setup: 12118 0000B1F1 8D76F0 <1> lea si, [bp + ?namebuffer + 4] 12119 0000B1F4 F646EA01 <1> testopt [bp + ?flags], 1 12120 0000B1F8 7409 <1> jz @F 12121 0000B1FA 8B76E6 <1> mov si, word [bp + ?startpointer] 12122 0000B1FD 0376E8 <1> add si, word [bp + ?length_to_add] 12123 0000B200 FF46E8 <1> inc word [bp + ?length_to_add] 12124 <1> @@: 12125 0000B203 50 <1> push ax 12126 0000B204 AC <1> lodsb ; al = last letter 12127 0000B205 E807DA <1> call uppercase 12128 0000B208 88C7 <1> mov bh, al ; bh = letter 12129 0000B20A 3C4C <1> cmp al, 'L' ; valid one ? 12130 0000B20C 7408 <1> je @F 12131 0000B20E 3C4F <1> cmp al, 'O' 12132 0000B210 7404 <1> je @F 12133 0000B212 3C53 <1> cmp al, 'S' 12134 0000B214 755A <1> jne .ret_CY_pop ; no --> 12135 <1> @@: ; is valid letter 12136 0000B216 AC <1> lodsb ; = candidate separator 12137 0000B217 E8C7F7 <1> call isseparator? ; is it ? 12138 0000B21A 7554 <1> jne .ret_CY_pop ; no --> 12139 0000B21C 58 <1> pop ax 12140 <1> 12141 0000B21D F646FE01 <1> test byte [bp + ?bit0_is_return_name], 1 12142 0000B221 7408 <1> jz .interrupt_no_return_name 12143 <1> 12144 0000B223 8B7EFC <1> mov di, word [bp + ?return_name_pointer] 12145 0000B226 83C704 <1> add di, 4 12146 0000B229 883D <1> mov byte [di], bh ; store the additional letter 12147 <1> 12148 <1> .interrupt_no_return_name: 12149 0000B22B FEC5 <1> inc ch ; increment name length 12150 0000B22D 93 <1> xchg ax, bx 12151 <1> 12152 <1> ; INP: bx = interrupt number 0..255 12153 <1> ; ah = 'S' for segment, 'O' for offset, 'L' for linear 12154 0000B22E 31F6 <1> xor si, si 12155 <1> %if _PM 12156 0000B230 53 <1> push bx 12157 0000B231 E8166C <1> call setds2si ; ds => IVT 12158 0000B234 5B <1> pop bx 12159 <1> %else 12160 <1> mov ds, si ; ds => IVT 12161 <1> %endif 12162 0000B235 80FC53 <1> cmp ah, 'S' 12163 0000B238 7502 <1> jne @F 12164 0000B23A 46 <1> inc si 12165 0000B23B 46 <1> inc si ; si = 2 (displacement to get segment) 12166 <1> @@: 12167 0000B23C 01DB <1> add bx, bx 12168 0000B23E 01DB <1> add bx, bx ; ds:bx -> IVT entry 12169 0000B240 FF7002 <1> push word [bx + si + 2] 12170 0000B243 FF30 <1> push word [bx + si] ; get segment:offset or trash:segment 12171 0000B245 16 <1> push ss 12172 0000B246 1F <1> pop ds 12173 0000B247 BB[E893] <1> mov bx, interrupt_var 12174 0000B24A 8F07 <1> pop word [bx] 12175 0000B24C 8F4702 <1> pop word [bx + 2] 12176 <1> ; store in variable 12177 0000B24F 80FC4C <1> cmp ah, 'L' 12178 0000B252 7519 <1> jne @FF 12179 0000B254 51 <1> push cx 12180 0000B255 31C0 <1> xor ax, ax 12181 0000B257 874702 <1> xchg ax, word [bx + 2] ; clear high word, get segment 12182 0000B25A 31D2 <1> xor dx, dx ; dx:ax = segment 12183 0000B25C B90400 <1> mov cx, 4 12184 <1> @@: 12185 0000B25F D1E0 <1> shl ax, 1 12186 0000B261 D1D2 <1> rcl dx, 1 12187 0000B263 E2FA <1> loop @B ; shift up 4 bits 12188 0000B265 0107 <1> add word [bx], ax 12189 0000B267 115702 <1> adc word [bx + 2], dx ; add to dword 12190 0000B26A 59 <1> pop cx 12191 0000B26B B103 <1> mov cl, 3 ; 3byte variable (21 bits needed) 12192 <1> @@: 12193 0000B26D 31FF <1> xor di, di ; (NC) 12194 0000B26F C3 <1> retn 12195 <1> 12196 <1> .ret_CY_pop: 12197 0000B270 58 <1> pop ax 12198 <1> .ret_CY: 12199 0000B271 F9 <1> stc 12200 0000B272 C3 <1> retn 12201 <1> 12202 <1> 12203 <1> 12204 <1> %if _INPUT_FILE_BOOT || _INPUT_FILE_HANDLES 12205 <1> var_ysf_setup: 12206 0000B273 93 <1> xchg ax, bx ; bx = index 12207 0000B274 8A46ED <1> mov al, byte [bp + ?namebuffer + 1] 12208 0000B277 3C53 <1> cmp al, 'S' 12209 0000B279 750B <1> jne @F 12210 <1> %if _INPUT_FILE_BOOT 12211 0000B27B F606[A300]02 <1> testopt [internalflags2], dif2_input_file_boot 12212 0000B280 B042 <1> mov al, 'B' 12213 0000B282 7502 <1> jnz @F 12214 <1> %endif 12215 0000B284 B048 <1> mov al, 'H' 12216 <1> @@: 12217 0000B286 3C42 <1> cmp al, 'B' 12218 0000B288 7509 <1> jne @F 12219 <1> %if _INPUT_FILE_BOOT 12220 0000B28A F606[A300]02 <1> testopt [internalflags2], dif2_input_file_boot 12221 0000B28F 750D <1> jnz @FF 12222 <1> %endif 12223 <1> .notysf: 12224 0000B291 F9 <1> stc 12225 0000B292 C3 <1> retn 12226 <1> @@: 12227 <1> %if _INPUT_FILE_HANDLES 12228 0000B293 3C48 <1> cmp al, 'H' 12229 0000B295 75FA <1> jne short .notysf 12230 0000B297 F606[A200]10 <1> testopt [internalflags2], dif2_input_file 12231 0000B29C 74F3 <1> jz .notysf 12232 <1> %else 12233 <1> jmp .notysf 12234 <1> %endif 12235 <1> @@: 12236 <1> ; bx = index 12237 <1> %if _INPUT_FILE_HANDLES 12238 0000B29E BF[800A] <1> mov di, input_file_handles.active 12239 <1> ; -> active index for YHF 12240 <1> %endif 12241 <1> %if _INPUT_FILE_BOOT 12242 <1> %if _INPUT_FILE_HANDLES 12243 0000B2A1 3C42 <1> cmp al, 'B' 12244 0000B2A3 7503 <1> jne @F 12245 <1> %endif 12246 0000B2A5 BF[B08F] <1> mov di, load_input_file.active 12247 <1> ; -> active index for YBF 12248 <1> @@: 12249 <1> %endif 12250 0000B2A8 F7DB <1> neg bx ; -1 .. 0 12251 0000B2AA 7406 <1> jz @F ; if 0, always valid --> 12252 <1> ; index was nonzero, meaning bx now holds a 12253 <1> ; negative number. if [.active] is large enough, 12254 <1> ; adding it to bx yields a positive number, which 12255 <1> ; carries in the addition. check for that. 12256 0000B2AC 031D <1> add bx, word [di] 12257 0000B2AE 73E1 <1> jnc .notysf ; not valid index --> 12258 0000B2B0 EB02 <1> jmp @FF ; valid, use it 12259 <1> @@: 12260 0000B2B2 031D <1> add bx, word [di] 12261 <1> ; 0 means the topmost level 12262 <1> @@: 12263 <1> %if _INPUT_FILE_BOOT 12264 <1> %if _INPUT_FILE_HANDLES 12265 0000B2B4 3C42 <1> cmp al, 'B' 12266 0000B2B6 750D <1> jne @F 12267 <1> %endif 12268 <1> 12269 0000B2B8 B8A000 <1> mov ax, LOAD_INPUT_FILE_SIZE 12270 0000B2BB 93 <1> xchg ax, bx 12271 0000B2BC F7E3 <1> mul bx ; dx ignored, should be zero 12272 0000B2BE 93 <1> xchg ax, bx ; bx = offset into array 12273 0000B2BF 81C3[568D] <1> add bx, load_input_file - LOADDATA3 + ldFATType 12274 <1> ; -> flag word 12275 0000B2C3 EB0A <1> jmp @FF 12276 <1> 12277 <1> @@: 12278 <1> %endif 12279 <1> %if _INPUT_FILE_HANDLES 12280 0000B2C5 D1E3 <1> shl bx, 1 12281 0000B2C7 D1E3 <1> shl bx, 1 12282 0000B2C9 D1E3 <1> shl bx, 1 ; to qword array index 12283 <1> %if INPUTFILEHANDLE_size != 8 12284 <1> %error Unexpected structure size 12285 <1> %endif 12286 0000B2CB 81C3[020A] <1> add bx, input_file_handles + ifhFlags 12287 <1> ; -> flags word 12288 <1> %endif 12289 <1> @@: 12290 0000B2CF BF[8C95] <1> mov di, mask_ysf ; give the mask of read-only bits 12291 0000B2D2 F8 <1> clc 12292 0000B2D3 C3 <1> retn 12293 <1> %endif 12294 <1> 12295 <1> 12296 <1> lleave ctx 12297 <1> 12298 <1> 12299 <1> ; INP: al, si-> string 12300 <1> ; OUT: CY if no valid digit 0..7 12301 <1> ; NC if valid digit, 12302 <1> ; bl = 0..7 12303 <1> ; al, si-> behind digit specification 12304 <1> ; CHG: bl 12305 <1> getstmmxdigit: 12306 0000B2D4 3C28 <1> cmp al, '(' 12307 0000B2D6 7407 <1> je .paropen 12308 0000B2D8 E81A00 <1> call .isdigit? 12309 0000B2DB 7201 <1> jc .ret 12310 <1> .retlodsb: 12311 0000B2DD AC <1> lodsb 12312 <1> .ret: 12313 0000B2DE C3 <1> retn 12314 <1> 12315 <1> .paropen: 12316 0000B2DF 50 <1> push ax 12317 0000B2E0 56 <1> push si 12318 0000B2E1 AC <1> lodsb 12319 0000B2E2 E81000 <1> call .isdigit? 12320 0000B2E5 720B <1> jc .retpop 12321 0000B2E7 AC <1> lodsb 12322 0000B2E8 3C29 <1> cmp al, ')' ; closing parenthesis ? 12323 0000B2EA F9 <1> stc 12324 0000B2EB 7505 <1> jne .retpop ; no --> (CY) 12325 0000B2ED 83C404 <1> add sp, byte 4 ; discard saved registers (NC) 12326 0000B2F0 EBEB <1> jmp short .retlodsb 12327 <1> 12328 <1> .retpop: 12329 0000B2F2 5E <1> pop si 12330 0000B2F3 58 <1> pop ax 12331 0000B2F4 C3 <1> retn 12332 <1> 12333 <1> .isdigit?: 12334 0000B2F5 88C3 <1> mov bl, al 12335 0000B2F7 80EB30 <1> sub bl, '0' 12336 0000B2FA 80FB08 <1> cmp bl, 8 ; valid digit 0..7 ? (CY if so) 12337 0000B2FD F5 <1> cmc ; NC if so 12338 0000B2FE C3 <1> retn 12339 <1> 12340 <1> 12341 <1> usesection lDEBUG_CODE 12342 <1> isvariable_code_size equ $ - isvariable_code 12343 <1> 12344 <1> 12345 <1> usesection lDEBUG_DATA_ENTRY 12346 <1> isvariable_data_size equ $ - isvariable_data 12347 <1> 12348 <1> numdef SHOW_ISVARIABLE_SIZE, 0 12349 <1> %if _SHOW_ISVARIABLE_SIZE 12350 <1> %assign CODESIZE isvariable_code_size 12351 <1> %assign DATASIZE isvariable_data_size 12352 <1> %warning isvariable size: CODESIZE code, DATASIZE data 12353 <1> %endif 12354 <1> 12355 <1> 12356 <1> align 2, db 0 12357 00009594 0D0020090D2C4C3B5D- <1> separators: countedw 32,9,13,",L;]:)(=.",0 12357 0000959D 3A29283D2E00 <1> 12358 <1> 12359 <1> %ifn _EXPRESSIONS 12360 <1> %error Building without the expression evaluator is not possible right now 12361 <1> %endif 12362 <1> 12363 <1> %if _EXPRESSIONS 12364 <1> 12365 000095A3 00 <1> align 4, db 0 12366 000095A4 00000000 <1> hhvar: dd 0 ; left-hand operand for operator functions 12367 <1> align 2, db 0 12368 <1> hh_depth: 12369 000095A8 0000 <1> dw 0 12370 <1> hh_depth_of_single_term: 12371 000095AA 0000 <1> dw 0 12372 000095AC 00 <1> hhflag: db 0 ; &2: getdword called from hh, default to sub (precedence over 1) 12373 <1> ; &1: getdword called from hh, default to add 12374 <1> ; &4: getdword defaulted to add/sub for hh 12375 <1> ; (Note that during recursive getexpression calls (ie, 12376 <1> ; bracket handling), hh_depth is incremented to 2 and 12377 <1> ; higher. As these flags are only used with hh_depth == 1, 12378 <1> ; this means inside brackets the hh defaulting is 12379 <1> ; not in effect.) 12380 000095AD 00 <1> hhtype: db 0 ; type info on left-hand operand for operator functions 12381 <1> %endif 12382 <1> 12383 <1> 12384 <1> usesection lDEBUG_CODE 12385 <1> 12386 <1> ; Get a numerical value from input line 12387 <1> ; INP: al = first character 12388 <1> ; si-> next character 12389 <1> ; OUT: bx:dx = numerical value 12390 <1> ; ah&80h = whether a pointer 12391 <1> ; ah&40h = whether a signed type 12392 <1> ; ah&3Fh = number of significant bits 12393 <1> ; one-based position of highest one bit if unsigned or signed but positive 12394 <1> ; one-based position of lowest one bit from the top if negative signed 12395 <1> getdword: 12396 <1> getexpression: 12397 0000B2FF FF06[A895] <1> inc word [hh_depth] 12398 0000B303 E82706 <1> call skipcomm0 12399 0000B306 51 <1> push cx 12400 0000B307 57 <1> push di 12401 <1> lframe 12402 0000B308 5589E5 <1> lenter 12403 <1> 12404 0000B30B 31C9 <1> xor cx, cx 12405 0000B30D 51 <1> push cx 12406 <1> lvar word, ??Count 12407 <1> %define lCount ???Count 12408 <1> 12409 <1> ; The first number field's operator is initialized to 12410 <1> ; the dummy right-operand operator, which is set up with 12411 <1> ; the highest precedence. This means it'll be processed 12412 <1> ; immediately in the first iteration below. 12413 0000B30E B118 <1> mov cl, OPERATOR_RIGHTOP 12414 0000B310 51 <1> push cx ; initialize dummy first number operator 12415 0000B311 83EC0A <1> sub sp, byte 6+4 12416 <1> lvar 6, ??A 12417 <1> %define lA ???A 12418 <1> lvar 6, ??B 12419 <1> %define lB ???B 12420 <1> 12421 <1> .loop: 12422 <1> ; Get next term of an expression. A term is one variable, 12423 <1> ; one immediate number, one expression contained within 12424 <1> ; round brackets or one expression used to access memory. 12425 <1> ; This code also parses any number of unary operators 12426 <1> ; (including type conversions) in front of the term. 12427 <1> ; 12428 <1> ; INP: (si-1)-> first character 12429 <1> ; OUT: (see label .operator) 12430 <1> ; bx:dx = numerical value of term 12431 <1> ; ah&80h = whether a pointer 12432 <1> ; ah&40h = whether a signed type 12433 <1> ; ah&20h = whether a positive value but signed type 12434 <1> ; al = first character behind term 12435 <1> ; si-> line 12436 <1> ; CHG: di, cx 12437 <1> ; 12438 <1> ; This part might be simplified by directly modifying 6byte[bp+lB] 12439 <1> ; instead of setting bx:dx and ah. (The current interface is one of 12440 <1> ; the holdovers of getexpressionterm as a separate function.) In 12441 <1> ; that case, bx:dx and ah presumably will then be simply added to 12442 <1> ; the CHG specification. 12443 <1> .term: 12444 0000B314 4E <1> dec si 12445 0000B315 56 <1> push si ; -> term 12446 <1> 12447 <1> ; count unary operators and type specifiers, 12448 <1> ; get the bit mask of required bytes 12449 <1> ; and skip past the operators and specifiers 12450 0000B316 E89504 <1> call count_unary_operators 12451 <1> 12452 <1> %if _INDIRECTION 12453 0000B319 3C5B <1> cmp al, '[' 12454 0000B31B 7503E91202 <1> je .indirection ; handle indirected value --> 12455 <1> %endif 12456 0000B320 3C28 <1> cmp al, '(' 12457 0000B322 7503E95E02 <1> je .parens ; handle term with precedence --> 12458 <1> 12459 0000B327 52 <1> push dx ; remember the count+1 12460 <1> ; (only if no indirection or bracket) 12461 <1> 12462 0000B328 4E <1> dec si 12463 0000B329 BA[0E67] <1> mov dx, msg.value ; does a VALUE keyword for VALUE x IN y go here ? 12464 0000B32C E87805 <1> call isstring? 12465 0000B32F 7503E95701 <1> je .value_in ; yes --> 12466 <1> 12467 0000B334 BA[4D67] <1> mov dx, msg.linear ; does a LINEAR keyword go here ? 12468 0000B337 E86D05 <1> call isstring? 12469 0000B33A 7503E91D01 <1> je .linear ; yes --> 12470 <1> 12471 0000B33F AC <1> lodsb 12472 <1> 12473 0000B340 E8C0FB <1> call isvariable? ; is it a variable ? 12474 0000B343 7226 <1> jc .literal ; no, must be an immediate value --> 12475 <1> 12476 <1> .variable: 12477 0000B345 87DA <1> xchg bx, dx ; bx-> high word 12478 0000B347 88CC <1> mov ah, cl 12479 0000B349 31C9 <1> xor cx, cx 12480 0000B34B 80FC02 <1> cmp ah, 2 12481 0000B34E 7609 <1> jbe .variable_nohigh 12482 0000B350 8B0F <1> mov cx, word [bx] ; get high word 12483 0000B352 80FC03 <1> cmp ah, 3 12484 0000B355 7702 <1> ja @F 12485 0000B357 B500 <1> mov ch, 0 12486 <1> @@: 12487 <1> .variable_nohigh: 12488 0000B359 87DA <1> xchg bx, dx ; bx-> low word 12489 0000B35B 8B17 <1> mov dx, word [bx] ; get low word 12490 0000B35D 89CB <1> mov bx, cx ; high word/zero 12491 0000B35F 80FC01 <1> cmp ah, 1 12492 0000B362 7702 <1> ja .variable_notbyte 12493 0000B364 B600 <1> mov dh, 0 ; limit to byte 12494 <1> .variable_notbyte: 12495 0000B366 B400 <1> mov ah, 0 ; type pointer=0 signed=0 12496 0000B368 E92A02 <1> jmp .term_end 12497 <1> 12498 <1> 12499 <1> .literal: 12500 0000B36B 31DB <1> xor bx, bx ; (in case of decimal base shortcut: 12501 0000B36D BA0A00 <1> mov dx, 10 ; set base: decimal) 12502 0000B370 3C23 <1> cmp al, '#' ; shortcut change to decimal base, or string literal? 12503 0000B372 753C <1> jne .lithex_common 12504 0000B374 803C22 <1> cmp byte [si], '"' 12505 0000B377 7407 <1> je .lit_string 12506 0000B379 803C27 <1> cmp byte [si], "'" 12507 0000B37C 7402 <1> je .lit_string 12508 0000B37E EB72 <1> jmp .lit_base ; decimal base --> 12509 <1> 12510 <1> .lit_string: 12511 0000B380 31D2 <1> xor dx, dx 12512 0000B382 AC <1> lodsb 12513 0000B383 86C4 <1> xchg al, ah 12514 <1> 12515 0000B385 E81900 <1> call @F 12516 0000B388 88C2 <1> mov dl, al 12517 0000B38A E81400 <1> call @F 12518 0000B38D 88C6 <1> mov dh, al 12519 0000B38F E80F00 <1> call @F 12520 0000B392 88C3 <1> mov bl, al 12521 0000B394 E80A00 <1> call @F 12522 0000B397 88C7 <1> mov bh, al 12523 0000B399 AC <1> lodsb 12524 0000B39A 38E0 <1> cmp al, ah 12525 0000B39C 740F <1> je @FFF 12526 <1> .err3: 12527 0000B39E E9B800 <1> jmp .err2 12528 <1> 12529 <1> @@: 12530 0000B3A1 AC <1> lodsb 12531 0000B3A2 38E0 <1> cmp al, ah 12532 0000B3A4 7406 <1> je @F 12533 0000B3A6 E86105 <1> call iseol?.notsemicolon 12534 0000B3A9 74F3 <1> je .err3 12535 0000B3AB C3 <1> retn 12536 <1> 12537 <1> @@: 12538 0000B3AC 59 <1> pop cx ; (discard near return address) 12539 <1> @@: 12540 0000B3AD AC <1> lodsb 12541 0000B3AE EB38 <1> jmp .lit_end_string 12542 <1> 12543 <1> 12544 <1> .lithex_common: 12545 0000B3B0 E8A303 <1> call .lit_ishexdigit? ; the first character must be a digit then 12546 0000B3B3 7303E9A100 <1> jc .err2 12547 0000B3B8 30D2 <1> xor dl, dl ; initialize value 12548 <1> .lithex_loopdigit: 12549 0000B3BA 3C5F <1> cmp al, '_' 12550 0000B3BC 7423 <1> je .lithex_skip 12551 0000B3BE E89503 <1> call .lit_ishexdigit? ; was last character ? 12552 0000B3C1 7221 <1> jc .lit_end ; yes --> 12553 0000B3C3 F6C7F0 <1> test bh, 0F0h ; would shift bits out ? 12554 0000B3C6 7403E98E00 <1> jnz .err2 12555 0000B3CB E841D8 <1> call uppercase 12556 0000B3CE 2C30 <1> sub al, '0' 12557 0000B3D0 3C09 <1> cmp al, 9 ; was decimal digit ? 12558 0000B3D2 7602 <1> jbe .lithex_decimaldigit; yes --> 12559 0000B3D4 2C07 <1> sub al, 'A'-('9'+1) ; else adjust for hexadecimal digit 12560 <1> .lithex_decimaldigit: 12561 0000B3D6 B90400 <1> mov cx, 4 12562 <1> .lithex_loopshift: 12563 0000B3D9 D1E2 <1> shl dx, 1 12564 0000B3DB D1D3 <1> rcl bx, 1 12565 0000B3DD E2FA <1> loop .lithex_loopshift ; *16 12566 0000B3DF 08C2 <1> or dl, al ; add in the new digit 12567 <1> .lithex_skip: 12568 0000B3E1 AC <1> lodsb 12569 0000B3E2 EBD6 <1> jmp short .lithex_loopdigit 12570 <1> 12571 <1> .lit_end: 12572 0000B3E4 3C23 <1> cmp al, '#' ; base change specification? 12573 0000B3E6 740A <1> je .lit_base ; yes --> 12574 <1> .lit_end_string: 12575 0000B3E8 E8F6F5 <1> call isseparator? ; after the number, there must be a separator 12576 0000B3EB 756C <1> jne .err2 ; none here --> 12577 0000B3ED B400 <1> mov ah, 0 ; type pointer=0 signed=0 12578 0000B3EF E9A301 <1> jmp .term_end ; okay --> 12579 <1> .lit_base: 12580 0000B3F2 85DB <1> test bx, bx ; insure base <= 36 12581 0000B3F4 7563 <1> jnz .err2 12582 0000B3F6 83FA24 <1> cmp dx, byte 36 12583 0000B3F9 775E <1> ja .err2 12584 0000B3FB 83FA02 <1> cmp dx, byte 2 ; and >= 2 12585 0000B3FE 7259 <1> jb .err2 ; otherwise error --> 12586 <1> 12587 0000B400 AC <1> lodsb 12588 0000B401 80FA10 <1> cmp dl, 16 ; hexadecimal ? 12589 0000B404 74AA <1> je .lithex_common ; yes, use specific handling --> 12590 <1> 12591 0000B406 89D7 <1> mov di, dx ; di = base 12592 0000B408 88D1 <1> mov cl, dl 12593 0000B40A 80C12F <1> add cl, '0'-1 12594 0000B40D 80F939 <1> cmp cl, '9' 12595 0000B410 7602 <1> jbe .lit_basebelow11 12596 0000B412 B139 <1> mov cl, '9' 12597 <1> .lit_basebelow11: ; cl = highest decimal digit for base ('1'..'9') 12598 0000B414 88D5 <1> mov ch, dl 12599 0000B416 80C536 <1> add ch, 'A'-10-1 ; ch = highest letter for base ('A'-x..'Z') 12600 <1> 12601 0000B419 E83D03 <1> call .lit_isdigit? ; first character must be a digit 12602 0000B41C 723B <1> jc .err2 12603 0000B41E 31D2 <1> xor dx, dx ; initialize value 12604 <1> .lit_loopdigit: 12605 0000B420 3C5F <1> cmp al, '_' 12606 0000B422 7432 <1> je .lit_skip 12607 0000B424 E83203 <1> call .lit_isdigit? ; was last character ? 12608 0000B427 72BB <1> jc .lit_end ; yes --> 12609 0000B429 E8E3D7 <1> call uppercase 12610 0000B42C 2C30 <1> sub al, '0' 12611 0000B42E 3C09 <1> cmp al, 9 ; was decimal digit ? 12612 0000B430 7602 <1> jbe .lit_decimaldigit ; yes --> 12613 0000B432 2C07 <1> sub al, 'A'-('9'+1) ; else adjust for hexadecimal digit 12614 <1> .lit_decimaldigit: 12615 0000B434 50 <1> push ax 12616 0000B435 89D0 <1> mov ax, dx 12617 0000B437 53 <1> push bx 12618 0000B438 F7E7 <1> mul di ; multiply low word with base 12619 0000B43A 89D3 <1> mov bx, dx 12620 0000B43C 89C2 <1> mov dx, ax 12621 0000B43E 58 <1> pop ax 12622 0000B43F 52 <1> push dx 12623 0000B440 F7E7 <1> mul di ; multiply high word with base 12624 0000B442 85D2 <1> test dx, dx 12625 0000B444 5A <1> pop dx 12626 0000B445 7512 <1> jnz .err2 ; overflow --> 12627 0000B447 01C3 <1> add bx, ax ; add them 12628 0000B449 58 <1> pop ax 12629 0000B44A 720D <1> jc .err2 ; overflow --> 12630 0000B44C 00C2 <1> add dl, al ; add in the new digit 12631 0000B44E 80D600 <1> adc dh, 0 12632 0000B451 83D300 <1> adc bx, byte 0 12633 0000B454 7203 <1> jc .err2 ; overflow --> 12634 <1> ; The value 3#102002022201221111210 is exactly equal to ffffFFFFh 12635 <1> ; so 3#102002022201221111211 (or ...2) overflows 32 bits and 12636 <1> ; needs to be detected here when adding in the as yet least 12637 <1> ; significant digit. This is why this jump is needed. 12638 <1> ; This also applies to decimal #4294967296. 12639 <1> 12640 <1> .lit_skip: 12641 0000B456 AC <1> lodsb 12642 0000B457 EBC7 <1> jmp short .lit_loopdigit 12643 <1> 12644 <1> .err2: 12645 0000B459 E982F0 <1> jmp error 12646 <1> 12647 <1> 12648 <1> .linear: 12649 0000B45C 58 <1> pop ax ; discard unary operators counter 12650 <1> 12651 <1> %if _EXPRESSION_INDIRECTION_STACK_CHECK == _EXPRESSION_LINEAR_STACK_CHECK 12652 0000B45D E81D04 <1> call stack_check_indirection 12653 <1> %else 12654 <1> mov ax, _EXPRESSION_LINEAR_STACK_CHECK 12655 <1> call stack_check ; abort if deep recursion 12656 <1> %endif 12657 0000B460 A9[6D71] <1> test ax, msg.stack_overflow.linear 12658 <1> 12659 0000B463 E8F504 <1> call skipwhite 12660 0000B466 FF36[DC88] <1> _386_PM push word [bAddr32] 12661 0000B46A 6652 <1> _386_PM push edx 12662 0000B46C 5A <1> _386_PM pop dx 12663 0000B46D 8B1E[840C] <1> mov bx, word [reg_ds] 12664 0000B471 E83683 <1> call getlinearaddr 12665 0000B474 52 <1> _386_PM push dx 12666 0000B475 665A <1> _386_PM pop edx 12667 0000B477 8F06[DC88] <1> _386_PM pop word [bAddr32] 12668 0000B47B 72DC <1> jc .err2 12669 <1> 12670 0000B47D 66 <1> _386_PM_o32 ; or dword 12671 0000B47E 830E[5085]FF <1> or word [bp_offset], strict byte -1 12672 <1> ; do not use a preferred offset 12673 <1> 12674 0000B483 E8A704 <1> call skipcomm0 12675 0000B486 B400 <1> mov ah, 0 ; type pointer=0 signed=0 12676 0000B488 E90901 <1> jmp .term_end_recount 12677 <1> 12678 <1> 12679 <1> .value_in: 12680 0000B48B 58 <1> pop ax ; discard unary operators counter 12681 <1> 12682 <1> %if _EXPRESSION_INDIRECTION_STACK_CHECK == _EXPRESSION_VALUE_IN_STACK_CHECK 12683 0000B48C E8EE03 <1> call stack_check_indirection 12684 <1> %else 12685 <1> mov ax, _EXPRESSION_VALUE_IN_STACK_CHECK 12686 <1> call stack_check ; abort if deep recursion 12687 <1> %endif 12688 0000B48F A9[5271] <1> test ax, msg.stack_overflow.value_in 12689 <1> 12690 0000B492 E8C604 <1> call skipwhite 12691 0000B495 4E <1> dec si 12692 0000B496 BA[1F67] <1> mov dx, msg.executing 12693 0000B499 E80B04 <1> call isstring? 12694 0000B49C 7514 <1> jne @F 12695 0000B49E E8BA04 <1> call skipwhite 12696 0000B4A1 56 <1> push si 12697 0000B4A2 BE[2967] <1> mov si, msg.executing_value_range 12698 0000B4A5 E87D03 <1> call get_value_range 12699 0000B4A8 9C <1> pushf 12700 0000B4A9 E86F04 <1> call chkeol 12701 0000B4AC 9D <1> popf 12702 0000B4AD 5E <1> pop si 12703 0000B4AE 4E <1> dec si 12704 0000B4AF AC <1> lodsb 12705 0000B4B0 EB03 <1> jmp @FF 12706 <1> 12707 <1> @@: 12708 0000B4B2 E87003 <1> call get_value_range ; OUT: cx:di = from, bx:dx = to 12709 <1> @@: 12710 <1> 12711 <1> ; If the VALUE is a not normal range (zero length 12712 <1> ; or from > to) then we still have to parse the 12713 <1> ; remaining input line to find the end of the 12714 <1> ; VALUE x IN y construct. So we do this with a 12715 <1> ; sort of hack: we take the invalid / unset 12716 <1> ; range values, do all the (invalid) comparisons, 12717 <1> ; but do not count any of the possible matches. 12718 <1> ; Look at .value_in.found for this hack. 12719 <1> lframe none, nested 12720 0000B4B5 5589E5 <1> lenter 12721 <1> lvar word, bit0_do_not_match 12722 0000B4B8 9C <1> pushf 12723 <1> lvar dword, value_from 12724 0000B4B9 51 <1> push cx 12725 0000B4BA 57 <1> push di 12726 <1> lvar dword, value_to 12727 0000B4BB 53 <1> push bx 12728 0000B4BC 52 <1> push dx 12729 0000B4BD 31C9 <1> xor cx, cx 12730 <1> lvar dword, found 12731 0000B4BF 51 <1> push cx 12732 0000B4C0 51 <1> push cx 12733 <1> 12734 0000B4C1 51 <1> push cx ; zero terminator of keyword remembered offsets 12735 0000B4C2 4E <1> dec si 12736 0000B4C3 BA[1467] <1> mov dx, msg.in 12737 0000B4C6 E8DE03 <1> call isstring? 12738 <1> .err3_NZ: 12739 <1> .err4_NZ: 12740 0000B4C9 758E <1> jne .err2 12741 <1> 12742 <1> .value_in.loop: 12743 0000B4CB E88D04 <1> call skipwhite 12744 0000B4CE 4E <1> dec si 12745 0000B4CF BB[4874] <1> mov bx, msgtable_value_range 12746 <1> ; -> table 12747 <1> 12748 <1> @@: 12749 0000B4D2 8B17 <1> mov dx, word [bx] 12750 0000B4D4 85D2 <1> test dx, dx 12751 0000B4D6 7419 <1> jz @F ; last checked, go get range --> 12752 0000B4D8 E8CC03 <1> call isstring? 12753 0000B4DB 7405 <1> je .value_in.keyword ; found a keyword --> 12754 0000B4DD 83C304 <1> add bx, 4 ; go to next table entry 12755 0000B4E0 EBF0 <1> jmp @B 12756 <1> 12757 <1> .value_in.keyword: 12758 <1> %if _EXPRESSION_INDIRECTION_STACK_CHECK == _EXPRESSION_VALUE_IN_STACK_CHECK 12759 0000B4E2 E89803 <1> call stack_check_indirection 12760 <1> %else 12761 <1> mov ax, _EXPRESSION_VALUE_IN_STACK_CHECK 12762 <1> call stack_check ; abort if deep recursion 12763 <1> %endif 12764 0000B4E5 A9[5271] <1> test ax, msg.stack_overflow.value_in 12765 <1> 12766 0000B4E8 E87004 <1> call skipwhite ; skip past blanks 12767 0000B4EB 56 <1> push si ; remember offset after keyword 12768 0000B4EC 8B7702 <1> mov si, word [bx + 2] ; -> keyword replacement text 12769 0000B4EF EBDA <1> jmp .value_in.loop ; handle replacement --> 12770 <1> 12771 <1> @@: 12772 0000B4F1 E83103 <1> call get_value_range ; OUT: cx:di = from, bx:dx = to 12773 0000B4F4 7223 <1> jc .value_in.next 12774 <1> 12775 <1> ; ! (StartVal > EndMatch) 12776 0000B4F6 395EFC <1> cmp word [bp + ?value_from + 2], bx 12777 0000B4F9 7503 <1> jne @F 12778 0000B4FB 3956FA <1> cmp word [bp + ?value_from], dx 12779 <1> @@: 12780 0000B4FE 7719 <1> ja .value_in.next 12781 <1> 12782 <1> ; ! (EndVal < StartMatch) 12783 0000B500 394EF8 <1> cmp word [bp + ?value_to + 2], cx 12784 0000B503 7503 <1> jne @F 12785 0000B505 397EF6 <1> cmp word [bp + ?value_to], di 12786 <1> @@: 12787 0000B508 720F <1> jb .value_in.next 12788 <1> 12789 <1> .value_in.found: 12790 0000B50A 8B4EFE <1> mov cx, word [bp + ?bit0_do_not_match] 12791 0000B50D F7D1 <1> not cx 12792 0000B50F 83E101 <1> and cx, 1 12793 0000B512 014EF2 <1> add word [bp + ?found], cx 12794 0000B515 8356F200 <1> adc word [bp + ?found], 0 12795 <1> 12796 <1> .value_in.next: 12797 <1> @@: 12798 0000B519 E84004 <1> call skipwh0 12799 0000B51C 3C2C <1> cmp al, ',' 12800 0000B51E 74AB <1> je .value_in.loop 12801 <1> 12802 0000B520 59 <1> pop cx ; get next remembered offset 12803 0000B521 E306 <1> jcxz @F ; if none --> 12804 0000B523 89CE <1> mov si, cx ; -> behind keyword 12805 0000B525 4E <1> dec si 12806 0000B526 AC <1> lodsb ; reload al 12807 0000B527 EBF0 <1> jmp @B ; continue after the keyword --> 12808 <1> 12809 <1> @@: 12810 0000B529 5A <1> pop dx 12811 0000B52A 5B <1> pop bx ; pop ?found counter variable 12812 0000B52B 89EC5D <1> lleave 12813 <1> 12814 0000B52E B400 <1> mov ah, 0 ; type pointer=0 signed=0 12815 0000B530 EB62 <1> jmp .term_end_recount 12816 <1> 12817 <1> 12818 <1> %if _INDIRECTION 12819 <1> .indirection: 12820 0000B532 E84803 <1> call stack_check_indirection 12821 <1> ; abort if deep recursion 12822 0000B535 A9[0571] <1> test ax, msg.stack_overflow.indirection 12823 <1> 12824 0000B538 FF36[DC88] <1> _386_PM push word [bAddr32] 12825 0000B53C 6652 <1> _386_PM push edx 12826 0000B53E 5A <1> _386_PM pop dx 12827 <1> 12828 0000B53F E8EA03 <1> call skipcomma ; also skips the '[' in al 12829 0000B542 8B1E[840C] <1> mov bx, word [reg_ds] ; default segment/selector 12830 0000B546 51 <1> push cx ; save previous bit mask (ch) 12831 0000B547 E8CEF3 <1> call getaddrX ; (recursively calls getexpression:) 12832 0000B54A 59 <1> pop cx 12833 0000B54B B100 <1> mov cl, 0 12834 0000B54D 3C5D <1> cmp al, ']' ; verify this is the closing bracket 12835 <1> .err5_NZ: 12836 0000B54F 7403E975FF <1> jne .err4_NZ ; if not --> 12837 0000B554 AC <1> lodsb ; get next character 12838 <1> ; bx:(e)dx-> data 12839 <1> ; ch = bit mask of required bytes 12840 <1> ; cl = 0 12841 <1> 12842 0000B555 50 <1> push ax 12843 0000B556 55 <1> push bp 12844 0000B557 31ED <1> xor bp, bp 12845 0000B559 55 <1> push bp 12846 0000B55A 55 <1> push bp 12847 0000B55B 89E5 <1> mov bp, sp ; -> buffer 12848 <1> 12849 0000B55D E8BDF0 <1> call prephack 12850 0000B560 E8E8F0 <1> call dohack 12851 <1> ; Regarding how this loop handles cx, 12852 <1> ; remember that ch holds the flags for 12853 <1> ; the required bytes. 12854 <1> ; And cl is initialised to 0. In 12855 <1> ; each iteration, cl is incremented. 12856 <1> ; The loop instruction then decrements 12857 <1> ; cl again, but the entire cx is only 12858 <1> ; zero if no more bytes are required. 12859 <1> ; (This hack saves a single byte over 12860 <1> ; the "test ch, ch \ jnz" alternative 12861 <1> ; but it isn't very pretty. It 12862 <1> ; also probably slows down a bit.) 12863 <1> .indirection_loop: 12864 0000B563 D0ED <1> shr ch, 1 ; need to read this byte ? 12865 0000B565 7306 <1> jnc .indirection_skip ; no --> 12866 0000B567 E8FCE3 <1> call readmem ; else read byte 12867 0000B56A 884600 <1> mov byte [bp+0], al ; store byte 12868 <1> .indirection_skip: 12869 0000B56D 41 <1> inc cx ; = 1 if no more to read 12870 0000B56E 45 <1> inc bp ; increase buffer pointer 12871 0000B56F 66 <1> _386_PM_o32 ; inc edx 12872 0000B570 42 <1> inc dx ; increase offset 12873 0000B571 E2F0 <1> loop .indirection_loop ; read next byte if any --> 12874 0000B573 E809F1 <1> call unhack 12875 <1> 12876 0000B576 5A <1> pop dx 12877 0000B577 5B <1> pop bx 12878 0000B578 5D <1> pop bp 12879 0000B579 58 <1> pop ax 12880 <1> 12881 0000B57A 52 <1> _386_PM push dx 12882 0000B57B 665A <1> _386_PM pop edx 12883 0000B57D 8F06[DC88] <1> _386_PM pop word [bAddr32] 12884 0000B581 B400 <1> mov ah, 0 ; type pointer=0 signed=0 12885 0000B583 EB0F <1> jmp short .term_end_recount 12886 <1> %endif 12887 <1> 12888 <1> 12889 <1> .parens: 12890 <1> %if _EXPRESSION_INDIRECTION_STACK_CHECK == _EXPRESSION_PARENS_STACK_CHECK 12891 0000B585 E8F502 <1> call stack_check_indirection 12892 <1> %else 12893 <1> mov ax, _EXPRESSION_PARENS_STACK_CHECK 12894 <1> call stack_check ; abort if deep recursion 12895 <1> %endif 12896 0000B588 A9[1F71] <1> test ax, msg.stack_overflow.parens 12897 <1> 12898 0000B58B AC <1> lodsb 12899 0000B58C E870FD <1> call getexpression ; (recursive) bx:dx = number, ah = type 12900 0000B58F 3C29 <1> cmp al, ')' ; closing parens ? 12901 0000B591 75BC <1> jne .err5_NZ ; no --> 12902 0000B593 AC <1> lodsb 12903 <1> 12904 <1> .term_end_recount: 12905 0000B594 A9 <1> db __TEST_IMM16 ; skip pop, stc; NC 12906 <1> .term_end: 12907 0000B595 59 <1> pop cx ; get count+1 of unary operators and type specifiers 12908 0000B596 F9 <1> stc 12909 0000B597 5F <1> pop di ; -> term 12910 0000B598 87F7 <1> xchg si, di 12911 0000B59A 57 <1> push di ; save -> behind 12912 <1> ; si-> unary operators and types 12913 0000B59B 720B <1> jc .unary_processnext ; if we preserved the count --> 12914 <1> 12915 0000B59D 53 <1> push bx 12916 0000B59E 52 <1> push dx 12917 0000B59F 56 <1> push si 12918 0000B5A0 E80B02 <1> call count_unary_operators 12919 0000B5A3 89D1 <1> mov cx, dx ; get count+1 again 12920 0000B5A5 5E <1> pop si 12921 0000B5A6 5A <1> pop dx 12922 0000B5A7 5B <1> pop bx 12923 <1> 12924 <1> .unary_processnext: 12925 0000B5A8 E204 <1> loop .unary_doprocess 12926 0000B5AA 5E <1> pop si ; -> behind term 12927 0000B5AB 4E <1> dec si ; -> character to reload in skipwhite 12928 0000B5AC EB33 <1> jmp short .term_done 12929 <1> 12930 <1> .unary_doprocess: 12931 0000B5AE 56 <1> push si 12932 0000B5AF 51 <1> push cx 12933 0000B5B0 53 <1> push bx 12934 0000B5B1 52 <1> push dx 12935 <1> 12936 0000B5B2 89CF <1> mov di, cx ; count+1 of operators to skip 12937 0000B5B4 E8F901 <1> call count_unary_operators_restrict ; skip them 12938 0000B5B7 7525 <1> jnz .err ; if not enough --> (?!) 12939 <1> 12940 0000B5B9 E850F4 <1> call istype? ; get type info if it's a type 12941 0000B5BC 7211 <1> jc .unary_processnotype ; isn't a type --> 12942 0000B5BE 86C4 <1> xchg al, ah ; al = type input 12943 0000B5C0 D1EB <1> shr bx, 1 ; CF = signedness 12944 0000B5C2 9F <1> lahf ; with CF = signedness 12945 0000B5C3 8B8F[7A90] <1> mov cx, word [ typehandlers + bx ] ; function 12946 <1> .unary_processcall: 12947 0000B5C7 5A <1> pop dx 12948 0000B5C8 5B <1> pop bx 12949 0000B5C9 FFD1 <1> call cx ; call type or unary operator handler 12950 <1> ; bx:dx = output number, ah = type 12951 0000B5CB 59 <1> pop cx ; restore processing counter 12952 0000B5CC 5E <1> pop si ; restore ->term 12953 0000B5CD EBD9 <1> jmp short .unary_processnext 12954 <1> 12955 <1> .unary_processnotype: 12956 0000B5CF E8F3F3 <1> call isunaryoperator? ; get unary operator index 12957 0000B5D2 750A <1> jne .err ; if no unary operator --> (?!) 12958 0000B5D4 89CB <1> mov bx, cx 12959 0000B5D6 D1E3 <1> shl bx, 1 12960 0000B5D8 8B8F[A690] <1> mov cx, word [ unaryoperatorhandlers + bx ] 12961 0000B5DC EBE9 <1> jmp short .unary_processcall 12962 <1> 12963 <1> .err: 12964 0000B5DE E9FDEE <1> jmp error 12965 <1> 12966 <1> .term_done: ; bx:dx = number, ah = type 12967 <1> ; get the operator following this number 12968 0000B5E1 E87703 <1> call skipwhite 12969 0000B5E4 8956F2 <1> mov word [bp+lB+0], dx 12970 0000B5E7 895EF4 <1> mov word [bp+lB+2], bx ; store numeric value 12971 0000B5EA 8B1E[AA95] <1> mov bx, word [hh_depth_of_single_term] 12972 0000B5EE 3B1E[A895] <1> cmp bx, word [hh_depth] 12973 0000B5F2 7455 <1> je .operator_invalid 12974 0000B5F4 E8D4F3 <1> call isoperator? ; cl = operator index (if any) 12975 0000B5F7 7440 <1> je .operator_apparently_valid 12976 0000B5F9 E80A03 <1> call iseol? ; end of line follows ? 12977 0000B5FC 744B <1> je .operator_invalid 12978 <1> .hh_twofold_check: 12979 0000B5FE 807EFC17 <1> cmp byte [bp + lA + 4], OPERATOR_COND 12980 0000B602 7445 <1> je .operator_invalid ; special check for conditional operator 12981 0000B604 807EFC18 <1> cmp byte [bp + lA + 4], OPERATOR_RIGHTOP 12982 0000B608 750D <1> jne @F 12983 0000B60A 837EFE00 <1> cmp word [bp + lCount], 0 12984 0000B60E 7407 <1> je @F 12985 0000B610 59 <1> pop cx 12986 0000B611 51 <1> push cx 12987 0000B612 80F917 <1> cmp cl, OPERATOR_COND 12988 0000B615 7432 <1> je .operator_invalid ; special check for conditional operator 12989 <1> @@: 12990 0000B617 833E[A895]01 <1> cmp word [hh_depth], 1 ; are we in first level expression ? 12991 0000B61C 752B <1> jne .operator_invalid ; no, do not do special H operation --> 12992 0000B61E F606[AC95]03 <1> test byte [hhflag], 1|2 ; special H operation requested ? 12993 0000B623 7424 <1> jz .operator_invalid ; no --> 12994 0000B625 B302 <1> mov bl, OPERATOR_MINUS ; assume it's sub 12995 0000B627 F606[AC95]02 <1> test byte [hhflag], 2 ; sub requested by H ? 12996 0000B62C 7501 <1> jnz .hh_twofold_found ; yes --> 12997 0000B62E 4B <1> dec bx ; else it must be add 12998 <1> %if (OPERATOR_MINUS - 1) != OPERATOR_PLUS 12999 <1> %error Remove optimisation 13000 <1> %endif 13001 <1> .hh_twofold_found: 13002 0000B62F 800E[AC95]04 <1> or byte [hhflag], 4 ; set flag for H twofold operation 13003 0000B634 E8F602 <1> call skipcomm0 13004 0000B637 EB12 <1> jmp short .operator_done ; return this --> 13005 <1> 13006 <1> .operator_apparently_valid: 13007 0000B639 89CB <1> mov bx, cx 13008 0000B63B 01DB <1> add bx, bx 13009 0000B63D FF97[B090] <1> call [operatordispatchers + bx] 13010 0000B641 84DB <1> test bl, bl ; valid ? 13011 0000B643 74B9 <1> jz .hh_twofold_check ; no, check for H twofold operation --> 13012 0000B645 E81303 <1> call skipwhite 13013 0000B648 A9 <1> db __TEST_IMM16 13014 <1> .operator_invalid: 13015 0000B649 31DB <1> xor bx, bx ; bl = 0 (no operator) 13016 <1> .operator_done: 13017 0000B64B 88E7 <1> mov bh, ah ; bh = type info 13018 0000B64D 895EF6 <1> mov word [bp+lB+4], bx ; store type and following operator 13019 <1> 13020 0000B650 8A4EFC <1> mov cl, byte [bp+lA+4] 13021 0000B653 E8EE00 <1> call .compare_operators ; (cmp bl, cl = cmp Boprtr, Aoprtr) 13022 0000B656 7249 <1> jb .high_precedence_A ; compute the first operand first --> 13023 <1> ; (jump taken for invalid Boprtr too) 13024 0000B658 7505 <1> jne @F 13025 0000B65A 83FB01 <1> cmp bx, OPPREC_COND 13026 0000B65D 7542 <1> jne .high_precedence_A 13027 <1> 13028 <1> @@: 13029 0000B65F FF46FE <1> inc word [bp+lCount] ; increase loop count 13030 0000B662 FF76F8 <1> push word [bp+lA+0] 13031 0000B665 FF76FA <1> push word [bp+lA+2] 13032 0000B668 FF76FC <1> push word [bp+lA+4] ; push A and its operator 13033 <1> 13034 0000B66B FF76F6 <1> push word [bp+lB+4] 13035 0000B66E FF76F4 <1> push word [bp+lB+2] 13036 0000B671 FF76F2 <1> push word [bp+lB+0] 13037 0000B674 8F46F8 <1> pop word [bp+lA+0] 13038 0000B677 8F46FA <1> pop word [bp+lA+2] 13039 0000B67A 8F46FC <1> pop word [bp+lA+4] ; set A to B, including operator 13040 <1> 13041 <1> %if _EXPRESSION_INDIRECTION_STACK_CHECK == _EXPRESSION_PRECEDENCE_STACK_CHECK 13042 0000B67D E8FD01 <1> call stack_check_indirection 13043 <1> %else 13044 <1> mov ax, _EXPRESSION_PRECEDENCE_STACK_CHECK 13045 <1> call stack_check ; abort if deep recursion 13046 <1> %endif 13047 0000B680 A9[3971] <1> test ax, msg.stack_overflow.precedence 13048 <1> 13049 <1> d4 call d4message 13050 <1> d4 asciz "getexpression: Entering loop/recursion",13,10 13051 <1> 13052 <1> .loop_j: 13053 0000B683 E98EFC <1> jmp .loop ; start again (former B as first term) --> 13054 <1> 13055 <1> .cont: 13056 <1> 13057 <1> d4 call d4message 13058 <1> d4 asciz "getexpression: End of loop/recursion",13,10 13059 <1> 13060 0000B686 FF76FC <1> push word [bp+lA+4] 13061 0000B689 FF76FA <1> push word [bp+lA+2] 13062 0000B68C FF76F8 <1> push word [bp+lA+0] 13063 0000B68F 8F46F2 <1> pop word [bp+lB+0] 13064 0000B692 8F46F4 <1> pop word [bp+lB+2] 13065 0000B695 8F46F6 <1> pop word [bp+lB+4] ; set B to A, including operator 13066 <1> 13067 0000B698 8F46FC <1> pop word [bp+lA+4] 13068 0000B69B 8F46FA <1> pop word [bp+lA+2] 13069 0000B69E 8F46F8 <1> pop word [bp+lA+0] ; pop A and its operator 13070 <1> 13071 <1> .high_precedence_A: 13072 0000B6A1 8B4EFC <1> mov cx, word [bp+lA+4] ; retrieve A's type info and operator 13073 0000B6A4 FF76FA <1> push word [bp+lA+2] 13074 0000B6A7 FF76F8 <1> push word [bp+lA+0] 13075 0000B6AA 8B46F6 <1> mov ax, word [bp+lB+4] ; retrieve B's type info and operator 13076 0000B6AD 882E[AD95] <1> mov byte [hhtype], ch ; set type info 13077 0000B6B1 8F06[A495] <1> pop word [hhvar] 13078 0000B6B5 B500 <1> mov ch, 0 ; cx = A's 1-based operator index 13079 0000B6B7 8F06[A695] <1> pop word [hhvar+2] ; retrieve A's number 13080 0000B6BB 8B56F2 <1> mov dx, word [bp+lB+0] 13081 0000B6BE 89CF <1> mov di, cx 13082 0000B6C0 8B5EF4 <1> mov bx, word [bp+lB+2] ; retrieve B's number 13083 0000B6C3 01FF <1> add di, di ; = offset into dispatch table 13084 0000B6C5 50 <1> push ax ; preserve B's operator 13085 0000B6C6 FF95[F090] <1> call near [operatorfunctions+di]; compute: (A) operatorA (B) 13086 0000B6CA 59 <1> pop cx ; cl = B's operator 13087 <1> 13088 0000B6CB 8956F8 <1> mov word [bp+lA+0], dx 13089 0000B6CE 88C8 <1> mov al, cl ; B's operator 13090 0000B6D0 895EFA <1> mov word [bp+lA+2], bx 13091 0000B6D3 8946FC <1> mov word [bp+lA+4], ax ; store result in A, with B's operator 13092 <1> 13093 <1> %if OPERATOR_INVALID != 0 13094 <1> %error Remove optimisation 13095 <1> %endif 13096 0000B6D6 84C0 <1> test al, al ; (previous B's) operator valid ? 13097 0000B6D8 7412 <1> jz .end ; no, end of sequence --> 13098 <1> 13099 0000B6DA 837EFE00 <1> cmp word [bp+lCount], byte 0 ; in recursion ? 13100 0000B6DE 74A3 <1> je .loop_j ; no, loop --> 13101 <1> 13102 0000B6E0 5B <1> pop bx 13103 0000B6E1 53 <1> push bx ; retrieve saved ('@') operator 13104 <1> 13105 0000B6E2 E85F00 <1> call .compare_operators ; (cmp bl, cl = cmp @oprtr, Aoprtr) 13106 0000B6E5 729C <1> jb .loop_j ; A's operator's precedence higher --> 13107 <1> 13108 0000B6E7 83FB01 <1> cmp bx, OPPREC_COND 13109 0000B6EA 7497 <1> je .loop_j 13110 <1> 13111 <1> d4 call d4message 13112 <1> d4 asciz "getexpression: Loop/recursion found to be not necessary anymore",13,10 13113 <1> 13114 <1> ; dec word [bp+lCount] 13115 <1> ; jmp .cont ; return to previous level --> 13116 <1> 13117 <1> .end: 13118 0000B6EC FF4EFE <1> dec word [bp+lCount] ; decrease loop count 13119 0000B6EF 7995 <1> jns .cont ; process next operand from stack --> 13120 <1> 13121 0000B6F1 8B56F8 <1> mov dx, word [bp+lA+0] 13122 0000B6F4 8B5EFA <1> mov bx, word [bp+lA+2] ; retrieve A 13123 0000B6F7 8B46FC <1> mov ax, word [bp+lA+4] ; (discard (invalid) operator) 13124 <1> 13125 0000B6FA 89EC5D <1> lleave code ; remove the stack frame 13126 <1> 13127 0000B6FD 5F <1> pop di 13128 0000B6FE 59 <1> pop cx ; restore registers 13129 <1> 13130 0000B6FF FF0E[A895] <1> dec word [hh_depth] 13131 0000B703 4E <1> dec si 13132 0000B704 AC <1> lodsb ; (restore al) 13133 <1> 13134 <1> .countsignificantbits: 13135 0000B705 51 <1> push cx 13136 0000B706 52 <1> push dx 13137 0000B707 53 <1> push bx 13138 0000B708 B90100 <1> mov cx, 1 13139 0000B70B 53 <1> push bx 13140 0000B70C F6C440 <1> test ah, 40h ; signed type ? 13141 0000B70F 7416 <1> jz .unsigned ; no --> 13142 0000B711 F6C780 <1> test bh, 80h ; negative value ? 13143 0000B714 7411 <1> jz .unsigned ; no --> 13144 <1> .signed: 13145 0000B716 21D3 <1> and bx, dx 13146 0000B718 43 <1> inc bx ; = 0 if -1 (all bits set) 13147 0000B719 5B <1> pop bx 13148 0000B71A 741F <1> jz .done ; is -1, 1 significant bit --> 13149 0000B71C B122 <1> mov cl, 32+1+1 ; number of significant bits is 1 + 1-based index of highest clear bit 13150 <1> .signedloop: 13151 0000B71E D1E2 <1> shl dx, 1 13152 0000B720 D1D3 <1> rcl bx, 1 ; shift up the number 13153 0000B722 49 <1> dec cx ; maintain index 13154 0000B723 72F9 <1> jc .signedloop ; still a set bit --> 13155 0000B725 EB14 <1> jmp short .done 13156 <1> .unsigned: 13157 0000B727 09D3 <1> or bx, dx ; = 0 if 0 (all bits cleared) 13158 0000B729 5B <1> pop bx 13159 0000B72A 740F <1> jz .done ; is 0, 1 significant bit --> 13160 0000B72C B121 <1> mov cl, 32+1 ; number of significant bits is 1-based index of highest set bit 13161 <1> .unsignedloop: 13162 0000B72E D1E2 <1> shl dx, 1 13163 0000B730 D1D3 <1> rcl bx, 1 13164 0000B732 49 <1> dec cx 13165 0000B733 73F9 <1> jnc .unsignedloop 13166 0000B735 F6C440 <1> test ah, 40h ; positive signed value ? 13167 0000B738 7401 <1> jz .done ; no --> 13168 0000B73A 41 <1> inc cx ; then the following zero bit is required too 13169 <1> .done: 13170 0000B73B 80E4C0 <1> and ah, 1100_0000b 13171 <1> ; insure we only pass the top two type bits 13172 0000B73E 08CC <1> or ah, cl 13173 <1> ; low 6 bits = number of significant bits 13174 0000B740 5B <1> pop bx 13175 0000B741 5A <1> pop dx 13176 0000B742 59 <1> pop cx 13177 0000B743 C3 <1> retn 13178 <1> 13179 <1> 13180 <1> ; INP: bl = operator index 1 13181 <1> ; cl = operator index 2 13182 <1> ; OUT: flags as for "cmp precedence1, precedence2" 13183 <1> ; CHG: bx, cx 13184 <1> .compare_operators: 13185 0000B744 E80600 <1> call .getprecedence 13186 0000B747 E80300 <1> call .getprecedence 13187 0000B74A 39CB <1> cmp bx, cx 13188 0000B74C C3 <1> retn 13189 <1> 13190 <1> .getprecedence: 13191 0000B74D 30FF <1> xor bh, bh 13192 0000B74F 8A9F[D690] <1> mov bl, byte [operatorprecedences+bx] 13193 0000B753 87D9 <1> xchg bx, cx 13194 0000B755 C3 <1> retn 13195 <1> 13196 <1> getexpression.lit_ishexdigit?: 13197 0000B756 B93946 <1> mov cx, "9F" 13198 <1> getexpression.lit_isdigit?: 13199 0000B759 3C30 <1> cmp al, '0' 13200 0000B75B 7214 <1> jb .no 13201 0000B75D 38C8 <1> cmp al, cl 13202 0000B75F 760D <1> jbe .yes 13203 0000B761 50 <1> push ax 13204 0000B762 E8AAD4 <1> call uppercase 13205 0000B765 38E8 <1> cmp al, ch 13206 0000B767 7707 <1> ja .no_p 13207 0000B769 3C41 <1> cmp al, 'A' 13208 0000B76B 7203 <1> jb .no_p 13209 0000B76D 58 <1> pop ax 13210 <1> .yes: 13211 0000B76E F8 <1> clc 13212 0000B76F C3 <1> retn 13213 <1> 13214 <1> .no_p: 13215 0000B770 58 <1> pop ax 13216 <1> .no: 13217 0000B771 F9 <1> stc 13218 0000B772 C3 <1> retn 13219 <1> 13220 <1> 13221 <1> of_cond: 13222 0000B773 50 <1> push ax ; second operand type 13223 0000B774 4E <1> dec si 13224 0000B775 AD <1> lodsw 13225 0000B776 3D3A3A <1> cmp ax, "::" 13226 0000B779 7403E960ED <1> jne error 13227 <1> %if _EXPRESSION_INDIRECTION_STACK_CHECK == _EXPRESSION_COND_STACK_CHECK 13228 0000B77E E8FC00 <1> call stack_check_indirection 13229 <1> %else 13230 <1> mov ax, _EXPRESSION_COND_STACK_CHECK 13231 <1> call stack_check ; abort if deep recursion 13232 <1> %endif 13233 0000B781 A9[8271] <1> test ax, msg.stack_overflow.cond 13234 <1> 13235 0000B784 A1[A495] <1> mov ax, word [hhvar] 13236 0000B787 0B06[A695] <1> or ax, word [hhvar + 2] ; ax = flag (zero if to take third operand) 13237 0000B78B 53 <1> push bx 13238 0000B78C 52 <1> push dx 13239 0000B78D 50 <1> push ax ; preserve stack 13240 0000B78E AC <1> lodsb 13241 0000B78F E86DFB <1> call getexpression ; parse third operand 13242 0000B792 E89801 <1> call skipcomm0 ; allow comma afterwards 13243 0000B795 59 <1> pop cx 13244 0000B796 E309 <1> jcxz @F ; if to take third operand --> 13245 0000B798 5A <1> pop dx 13246 0000B799 5B <1> pop bx ; take second operand 13247 0000B79A 88C1 <1> mov cl, al 13248 0000B79C 58 <1> pop ax ; ah = second operand type 13249 0000B79D 88C8 <1> mov al, cl ; preserve al 13250 0000B79F EB03 <1> jmp @FF 13251 <1> 13252 <1> @@: 13253 0000B7A1 59 <1> pop cx 13254 0000B7A2 59 <1> pop cx ; discard second operand value 13255 0000B7A3 59 <1> pop cx ; discard second operand type 13256 <1> @@: 13257 0000B7A4 59 <1> pop cx ; discard near return address 13258 0000B7A5 59 <1> pop cx ; discard cx on stack 13259 <1> 13260 0000B7A6 C646FC18 <1> mov byte [bp+lA+4], OPERATOR_RIGHTOP 13261 0000B7AA 4E <1> dec si 13262 0000B7AB E933FE <1> jmp getexpression.term_done 13263 <1> 13264 <1> 13265 <1> lleave ctx 13266 <1> 13267 <1> 13268 <1> ; INP: si-> possible unary operators 13269 <1> ; OUT: dx = 1 + count of unary operators 13270 <1> ; al, si-> behind identified unary operators 13271 <1> ; ch = bit mask of required bytes, 13272 <1> ; bits 0..3 represent one byte of a dword each 13273 <1> ; bits 4..7 are clear 13274 <1> ; CHG: bx, ch, di 13275 <1> ; 13276 <1> ; Type specifications are parsed as unary operators 13277 <1> ; here. (Elsewhere, "unary operators" refers only to 13278 <1> ; the unary operators specified as one of "+-~!?".) 13279 <1> count_unary_operators: 13280 0000B7AE 31FF <1> xor di, di 13281 <1> ; INP: si-> possible unary operators 13282 <1> ; di = maximum count+1 of unary operators to process, 13283 <1> ; zero means unlimited 13284 <1> ; OUT: dx = 1 + count of unary operators, 13285 <1> ; at most di 13286 <1> ; al, si-> behind identified unary operators 13287 <1> ; ch = bit mask of required bytes, 13288 <1> ; bits 0..3 represent one byte of a dword each 13289 <1> ; bits 4..7 are clear 13290 <1> ; ZR if maximum reached 13291 <1> ; NZ if maximum not reached 13292 <1> ; CHG: bx, ch 13293 <1> count_unary_operators_restrict: 13294 0000B7B0 B50F <1> mov ch, 1111b ; default to access a full dword 13295 0000B7B2 31D2 <1> xor dx, dx ; initialize counter to zero 13296 0000B7B4 A8 <1> db __TEST_IMM8 ; skip pop 13297 <1> .loop: 13298 0000B7B5 5F <1> pop di ; get maximum count 13299 0000B7B6 42 <1> inc dx ; count unary operators and type specifiers 13300 0000B7B7 57 <1> push di ; save maximum count again 13301 0000B7B8 E8A001 <1> call skipwhite ; load next character and skip blanks 13302 0000B7BB 39FA <1> cmp dx, di ; reached maximum ? 13303 0000B7BD 741B <1> je .end ; yes --> (ZR) 13304 0000B7BF 51 <1> push cx 13305 0000B7C0 E849F2 <1> call istype? ; check for type and if so retrieve info 13306 0000B7C3 720F <1> jc .notype ; not a type --> 13307 0000B7C5 59 <1> pop cx 13308 <1> 13309 0000B7C6 D1EB <1> shr bx, 1 ; discard signedness bit 13310 0000B7C8 89FE <1> mov si, di ; -> behind the type specifier 13311 0000B7CA B11F <1> mov cl, 01Fh ; prepare shift count register 13312 0000B7CC 238F[6C90] <1> and cx,[typebitmasks+bx]; apply mask and get shift count register 13313 0000B7D0 D2E5 <1> shl ch, cl ; apply shift 13314 0000B7D2 EBE1 <1> jmp short .loop ; check for more --> 13315 <1> 13316 <1> .notype: 13317 0000B7D4 E8EEF1 <1> call isunaryoperator? ; is it a unary operator? 13318 0000B7D7 59 <1> pop cx 13319 0000B7D8 74DB <1> je .loop ; yes, check for more --> 13320 <1> ; (NZ) 13321 <1> .end: 13322 0000B7DA 5F <1> pop di ; discard 13323 0000B7DB C3 <1> retn 13324 <1> 13325 <1> 13326 <1> get3byte.checksignificantbits: 13327 0000B7DC 50 <1> push ax 13328 0000B7DD 80E43F <1> and ah, 3Fh 13329 0000B7E0 80FC18 <1> cmp ah, 24 13330 0000B7E3 EB1E <1> jmp checksignificantbitscommon 13331 <1> 13332 <1> getword: 13333 0000B7E5 53 <1> push bx 13334 0000B7E6 E816FB <1> call getexpression 13335 0000B7E9 5B <1> pop bx 13336 <1> .checksignificantbits: 13337 0000B7EA 50 <1> push ax 13338 0000B7EB 80E43F <1> and ah, 3Fh 13339 0000B7EE 80FC10 <1> cmp ah, 16 13340 0000B7F1 EB10 <1> jmp checksignificantbitscommon 13341 <1> 13342 <1> getbyte: 13343 0000B7F3 53 <1> push bx 13344 0000B7F4 52 <1> push dx 13345 0000B7F5 E807FB <1> call getexpression 13346 0000B7F8 5B <1> pop bx 13347 0000B7F9 88FE <1> mov dh, bh 13348 0000B7FB 5B <1> pop bx 13349 <1> .checksignificantbits: 13350 0000B7FC 50 <1> push ax 13351 0000B7FD 80E43F <1> and ah, 3Fh 13352 0000B800 80FC08 <1> cmp ah, 8 13353 <1> checksignificantbitscommon: 13354 0000B803 58 <1> pop ax 13355 0000B804 7701 <1> ja short errorj6 ; if error 13356 0000B806 C3 <1> retn 13357 <1> 13358 <1> errorj6: 13359 0000B807 E9D4EC <1> jmp error 13360 <1> 13361 <1> 13362 <1> ; GETNYB - Convert the hex character in AL into a nybble. Return 13363 <1> ; carry set in case of error. 13364 <1> 13365 <1> getnyb: 13366 0000B80A 50 <1> push ax 13367 0000B80B 2C30 <1> sub al, '0' 13368 0000B80D 3C09 <1> cmp al, 9 13369 0000B80F 760D <1> jbe .return ; if normal digit 13370 0000B811 58 <1> pop ax 13371 0000B812 50 <1> push ax 13372 0000B813 E8F9D3 <1> call uppercase 13373 0000B816 2C41 <1> sub al, 'A' 13374 0000B818 3C05 <1> cmp al, 'F'-'A' 13375 0000B81A 7706 <1> ja .error ; if not A..F 13376 0000B81C 040A <1> add al, 10 13377 <1> .return: 13378 0000B81E 44 <1> inc sp ; normal return (first pop old AX) 13379 0000B81F 44 <1> inc sp 13380 0000B820 F8 <1> clc 13381 0000B821 C3 <1> retn 13382 <1> .error: 13383 0000B822 58 <1> pop ax ; error return 13384 0000B823 F9 <1> stc 13385 0000B824 C3 <1> retn 13386 <1> 13387 <1> 13388 <1> ; INP: si -> input line 13389 <1> ; OUT: NC if normal range (nonzero, upper >= lower), 13390 <1> ; bx:dx = TO value (upper bound) 13391 <1> ; cx:di = FROM value (lower bound) 13392 <1> ; CY if not normal, 13393 <1> ; bx:dx and cx:di may be invalid 13394 <1> ; ZR if FROM LENGTH with zero length, cx:di valid 13395 <1> ; al = first character 13396 <1> ; si -> next character 13397 <1> ; jumps to error if invalid input 13398 <1> get_value_range: 13399 0000B825 E83301 <1> call skipwhite 13400 0000B828 4E <1> dec si 13401 0000B829 BA[1767] <1> mov dx, msg.from 13402 0000B82C E87800 <1> call isstring? 13403 0000B82F AC <1> lodsb 13404 0000B830 753B <1> jne .not_from 13405 <1> 13406 <1> .from: 13407 0000B832 E8CAFA <1> call getexpression ; (recursive) 13408 0000B835 89D7 <1> mov di, dx 13409 0000B837 89D9 <1> mov cx, bx ; cx:di = from 13410 <1> 13411 0000B839 4E <1> dec si 13412 0000B83A BA[1C67] <1> mov dx, msg.to 13413 0000B83D E86700 <1> call isstring? 13414 0000B840 7425 <1> je .from_to 13415 0000B842 BA[F966] <1> mov dx, msg.length 13416 0000B845 E85F00 <1> call isstring? 13417 0000B848 7403E991EC <1> jne error 13418 <1> 13419 <1> .from_length: 13420 0000B84D AC <1> lodsb 13421 0000B84E E8AEFA <1> call getexpression ; (recursive) 13422 0000B851 85DB <1> test bx, bx 13423 0000B853 7506 <1> jnz @F 13424 0000B855 85D2 <1> test dx, dx 13425 0000B857 7502 <1> jnz @F 13426 <1> ; ZR = length is zero, cx:di = from 13427 <1> .notnormal: 13428 0000B859 F9 <1> stc 13429 0000B85A C3 <1> retn 13430 <1> 13431 <1> @@: 13432 <1> ; bx:dx = length 13433 0000B85B 01FA <1> add dx, di 13434 0000B85D 11CB <1> adc bx, cx ; bx:dx = from + length 13435 0000B85F 83EA01 <1> sub dx, 1 13436 0000B862 83DB00 <1> sbb bx, 0 ; bx:dx = from + length - 1 13437 0000B865 EB0D <1> jmp @F 13438 <1> 13439 <1> .from_to: 13440 0000B867 AC <1> lodsb 13441 <1> 13442 0000B868 E894FA <1> call getexpression ; (recursive) 13443 <1> ; bx:dx = to 13444 <1> ; cx:di = from 13445 0000B86B EB07 <1> jmp @F 13446 <1> 13447 <1> .not_from: 13448 0000B86D E88FFA <1> call getexpression ; (recursive) 13449 0000B870 89D7 <1> mov di, dx 13450 0000B872 89D9 <1> mov cx, bx ; bx:dx = cx:ax = value 13451 <1> 13452 <1> @@: 13453 0000B874 39CB <1> cmp bx, cx 13454 0000B876 7502 <1> jne @F 13455 0000B878 39FA <1> cmp dx, di 13456 <1> @@: 13457 0000B87A 72DD <1> jb .notnormal ; NZ = length overflow or not normal FROM TO 13458 0000B87C C3 <1> retn ; (NC) 13459 <1> 13460 <1> 13461 <1> stack_check_indirection: 13462 0000B87D B88000 <1> mov ax, _EXPRESSION_INDIRECTION_STACK_CHECK 13463 <1> 13464 <1> ; INP: ax = how much stack should be left 13465 <1> ; word [cs:ip + 1] = message for location 13466 <1> ; OUT: doesn't return if stack overflow 13467 <1> ; CHG: ax 13468 <1> ; STT: ds = ss 13469 <1> stack_check: 13470 0000B880 05[400A] <1> add ax, stack 13471 0000B883 39C4 <1> cmp sp, ax 13472 0000B885 7201 <1> jb @F 13473 0000B887 C3 <1> retn 13474 <1> 13475 <1> @@: 13476 0000B888 58 <1> pop ax 13477 <1> 13478 0000B889 16 <1> push ss 13479 0000B88A 07 <1> pop es 13480 0000B88B 8B26[9E0A] <1> mov sp, [throwsp] 13481 <1> 13482 0000B88F BF[F670] <1> mov di, msg.stack_overflow.caller 13483 0000B892 E87101 <1> call hexword 13484 0000B895 BA[DA70] <1> mov dx, msg.stack_overflow 13485 0000B898 E82105 <1> call putsz 13486 0000B89B 93 <1> xchg ax, bx 13487 0000B89C 2E8B5701 <1> mov dx, [cs:bx + 1] 13488 0000B8A0 E81905 <1> call putsz 13489 <1> 13490 0000B8A3 FF26[9A0A] <1> jmp near [errret] 9303 9304 9305 %include "lineio.asm" 9306 <1> 9307 <1> %if 0 9308 <1> 9309 <1> lDebug line input and output 9310 <1> 9311 <1> Copyright (C) 1995-2003 Paul Vojta 9312 <1> Copyright (C) 2008-2012 C. Masloch 9313 <1> 9314 <1> Usage of the works is permitted provided that this 9315 <1> instrument is retained with the works, so that any entity 9316 <1> that uses the works is notified of this instrument. 9317 <1> 9318 <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 9319 <1> 9320 <1> %endif 9321 <1> 9322 <1> 9323 <1> usesection lDEBUG_CODE 9324 <1> 9325 <1> ; Check for given string (cap-insensitive) 9326 <1> ; 9327 <1> ; INP: si-> input string to check (either cap), 9328 <1> ; terminated by CR (13), semicolon, space, tab, 9329 <1> ; comma, colon, [, ], (, or ) 9330 <1> ; dx-> ASCIZ string to check (all-caps) 9331 <1> ; OUT: Iff string matches, 9332 <1> ; ZR 9333 <1> ; si-> at separator that terminates the keyword 9334 <1> ; else, 9335 <1> ; NZ 9336 <1> ; si = input si 9337 <1> ; STT: ds = es = ss 9338 <1> ; CHG: dx, al 9339 <1> isstring?: 9340 0000B8A7 56 <1> push si 9341 0000B8A8 87D7 <1> xchg dx, di 9342 <1> .loop: 9343 0000B8AA AC <1> lodsb 9344 0000B8AB E861D3 <1> call uppercase 9345 0000B8AE AE <1> scasb 9346 0000B8AF 7506 <1> jne .mismatch 9347 0000B8B1 84C0 <1> test al, al 9348 0000B8B3 75F5 <1> jne .loop 9349 0000B8B5 EB38 <1> jmp .matched_zr 9350 <1> 9351 <1> .mismatch: 9352 0000B8B7 E84C00 <1> call iseol? 9353 0000B8BA 742C <1> je .checkend 9354 0000B8BC 3C20 <1> cmp al, 32 9355 0000B8BE 7428 <1> je .checkend 9356 0000B8C0 3C09 <1> cmp al, 9 9357 0000B8C2 7424 <1> je .checkend 9358 0000B8C4 3C2E <1> cmp al, '.' 9359 0000B8C6 7420 <1> je .checkend 9360 0000B8C8 3C2C <1> cmp al, ',' 9361 0000B8CA 741C <1> je .checkend 9362 0000B8CC 3C3D <1> cmp al, '=' 9363 0000B8CE 7418 <1> je .checkend 9364 0000B8D0 3C3A <1> cmp al, ':' 9365 0000B8D2 7414 <1> je .checkend 9366 0000B8D4 3C5B <1> cmp al, '[' 9367 0000B8D6 7410 <1> je .checkend 9368 0000B8D8 3C5D <1> cmp al, ']' 9369 0000B8DA 740C <1> je .checkend 9370 0000B8DC 3C28 <1> cmp al, '(' 9371 0000B8DE 7408 <1> je .checkend 9372 0000B8E0 3C29 <1> cmp al, ')' 9373 0000B8E2 7404 <1> je .checkend 9374 <1> .ret_nz: 9375 <1> ; NZ 9376 0000B8E4 5E <1> pop si 9377 <1> .ret: 9378 0000B8E5 87D7 <1> xchg dx, di 9379 0000B8E7 C3 <1> retn 9380 <1> 9381 <1> .checkend: 9382 0000B8E8 26807DFF00 <1> cmp byte [es:di - 1], 0 9383 0000B8ED 75F5 <1> jne .ret_nz 9384 <1> .matched_zr: ; ZR 9385 0000B8EF 5F <1> pop di ; (discard) 9386 0000B8F0 8D74FF <1> lea si, [si - 1] ; -> separator 9387 0000B8F3 EBF0 <1> jmp .ret 9388 <1> 9389 <1> 9390 <1> iseol?_or_then: 9391 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 9392 0000B8F5 F606[A700]08 <1> testopt [internalflags3], dif3_in_if 9393 0000B8FA 740A <1> jz iseol? 9394 0000B8FC BA[B164] <1> mov dx, msg.then 9395 0000B8FF 4E <1> dec si 9396 0000B900 E8A4FF <1> call isstring? 9397 0000B903 740B <1> je iseol?.ret 9398 0000B905 AC <1> lodsb 9399 <1> %endif 9400 <1> 9401 <1> iseol?: 9402 0000B906 3C3B <1> cmp al, ';' 9403 0000B908 7406 <1> je .ret 9404 <1> .notsemicolon: 9405 0000B90A 3C0D <1> cmp al, 13 ; this *IS* iseol? 9406 0000B90C 7402 <1> je .ret 9407 0000B90E 3C00 <1> cmp al, 0 9408 <1> .ret: 9409 0000B910 C3 <1> retn 9410 <1> 9411 <1> 9412 <1> chkeol_or_then: 9413 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 9414 0000B911 E84800 <1> call skipwh0 9415 0000B914 E8DEFF <1> call iseol?_or_then 9416 0000B917 74F7 <1> je iseol?.ret ; if EOL --> 9417 0000B919 EB08 <1> jmp @F 9418 <1> %endif 9419 <1> 9420 <1> ; Check for end of line 9421 <1> ; 9422 <1> ; INP: al = first character 9423 <1> ; ds:si-> next character 9424 <1> ; OUT: ZR 9425 <1> ; al = 13 or al = ';' or al = 0 9426 <1> ; (does not return if anything on line beside blanks) 9427 <1> chkeol: 9428 0000B91B E83E00 <1> call skipwh0 9429 0000B91E E8E5FF <1> call iseol? 9430 0000B921 74ED <1> je iseol?.ret ; if EOL --> 9431 <1> 9432 <1> @@: 9433 0000B923 B80001 <1> mov ax, 0100h 9434 0000B926 E8FCEB <1> call setrc 9435 <1> errorj8: 9436 0000B929 E9B2EB <1> jmp error 9437 <1> 9438 <1> 9439 <1> ; SKIPCOMMA - Skip white space, then an optional comma, and more white 9440 <1> ; space. 9441 <1> ; SKIPCOMM0 - Same as above, but we already have the character in AL. 9442 <1> ; STK: 3 word 9443 <1> skipcomma: 9444 0000B92C AC <1> lodsb 9445 <1> skipcomm0: 9446 0000B92D E82C00 <1> call skipwh0 9447 0000B930 3C2C <1> cmp al, ',' 9448 0000B932 7510 <1> jne .return ; if no comma 9449 0000B934 56 <1> push si 9450 0000B935 E82300 <1> call skipwhite 9451 0000B938 E8CBFF <1> call iseol? 9452 0000B93B 7504 <1> jne .noteol ; if not end of line 9453 0000B93D 5E <1> pop si 9454 0000B93E B02C <1> mov al, ',' 9455 0000B940 C3 <1> retn 9456 <1> .noteol: 9457 0000B941 83C402 <1> add sp, byte 2 ; pop si into nowhere 9458 <1> .return: 9459 0000B944 C3 <1> retn 9460 <1> 9461 <1> 9462 <1> skipequals: 9463 0000B945 AC <1> lodsb 9464 <1> skipequ0: 9465 0000B946 E81300 <1> call skipwh0 9466 0000B949 3C3D <1> cmp al, '=' 9467 0000B94B 7503 <1> jne .return 9468 0000B94D E80B00 <1> call skipwhite 9469 <1> .return: 9470 0000B950 C3 <1> retn 9471 <1> 9472 <1> 9473 <1> ; Skip alphabetic characters, and then white space 9474 <1> ; 9475 <1> ; INP: ds:si-> first character 9476 <1> ; OUT: al = first non-blank character behind alphabetic characters 9477 <1> ; ds:si-> character behind the first non-blank behind alpha. 9478 <1> ; NC 9479 <1> skipalpha: 9480 <1> .: 9481 0000B951 AC <1> lodsb 9482 0000B952 24DF <1> and al, TOUPPER 9483 0000B954 2C41 <1> sub al, 'A' 9484 0000B956 3C19 <1> cmp al, 'Z'-'A' 9485 0000B958 76F7 <1> jbe . 9486 0000B95A 4E <1> dec si 9487 <1> 9488 <1> ; Skip blanks and tabs 9489 <1> ; 9490 <1> ; INP: ds:si-> first character 9491 <1> ; OUT: al = first non-blank character 9492 <1> ; ds:si-> character behind the first non-blank 9493 <1> ; NC 9494 <1> ; CHG: - 9495 <1> ; STK: 1 word 9496 <1> skipwhite: 9497 0000B95B AC <1> lodsb 9498 <1> 9499 <1> ; Same as above, but first character in al 9500 <1> ; 9501 <1> ; INP: al = first character 9502 <1> ; ds:si-> next character 9503 <1> ; OUT: al = first non-blank character 9504 <1> ; ds:si-> character behind the first non-blank 9505 <1> ; NC 9506 <1> ; CHG: - 9507 <1> ; STK: 1 word 9508 <1> skipwh0: 9509 0000B95C 3C20 <1> cmp al, 32 9510 0000B95E 74FB <1> je skipwhite 9511 0000B960 3C09 <1> cmp al, 9 9512 0000B962 74F7 <1> je skipwhite 9513 0000B964 F8 <1> clc 9514 0000B965 C3 <1> retn 9515 <1> 9516 <1> 9517 <1> ; SHOWSTRING - Print ASCIZ string. 9518 <1> showstring.next: 9519 0000B966 AA <1> stosb 9520 <1> showstring: 9521 0000B967 AC <1> lodsb 9522 0000B968 84C0 <1> test al, al 9523 0000B96A 75FA <1> jnz .next 9524 0000B96C C3 <1> retn 9525 <1> 9526 <1> 9527 <1> ; Dump byte as decimal number string 9528 <1> ; 9529 <1> ; INP: al = byte 9530 <1> ; di-> where to store 9531 <1> ; OUT: - 9532 <1> ; CHG: di-> behind variable-length string 9533 <1> decbyte: 9534 0000B96D 50 <1> push ax 9535 0000B96E 51 <1> push cx 9536 0000B96F B96400 <1> mov cx, 100 9537 0000B972 E80B00 <1> call .div 9538 0000B975 B10A <1> mov cl, 10 9539 0000B977 E80600 <1> call .div 9540 0000B97A 0430 <1> add al, '0' 9541 0000B97C AA <1> stosb 9542 0000B97D 59 <1> pop cx 9543 0000B97E 58 <1> pop ax 9544 0000B97F C3 <1> retn 9545 <1> 9546 <1> .div: 9547 0000B980 30E4 <1> xor ah, ah 9548 0000B982 F6F1 <1> div cl 9549 0000B984 08C5 <1> or ch, al 9550 0000B986 7403 <1> jz .leadingzero 9551 0000B988 0430 <1> add al, '0' 9552 0000B98A AA <1> stosb 9553 <1> .leadingzero: 9554 0000B98B 86C4 <1> xchg al, ah 9555 0000B98D C3 <1> retn 9556 <1> 9557 <1> 9558 <1> decword: 9559 0000B98E 52 <1> push dx 9560 0000B98F 31D2 <1> xor dx, dx 9561 0000B991 E80200 <1> call decdword 9562 0000B994 5A <1> pop dx 9563 0000B995 C3 <1> retn 9564 <1> 9565 <1> 9566 <1> decdword: 9567 0000B996 51 <1> push cx 9568 0000B997 31C9 <1> xor cx, cx 9569 0000B999 E80200 <1> call dec_dword_minwidth 9570 0000B99C 59 <1> pop cx 9571 0000B99D C3 <1> retn 9572 <1> 9573 <1> 9574 <1> ; Dump dword as decimal number string 9575 <1> ; 9576 <1> ; INP: dx:ax = dword 9577 <1> ; cx = minimum width (<= 1 for none, must be < 128) 9578 <1> ; di -> where to store 9579 <1> ; OUT: - 9580 <1> ; CHG: di -> behind variable-length string 9581 <1> ; STT: UP 9582 <1> dec_dword_minwidth: 9583 <1> lframe near 9584 <1> lequ 10, bufferlen 9585 <1> lvar ?bufferlen,buffer 9586 0000B99E 5589E58D66F6 <1> lenter 9587 <1> lvar dword, dividend 9588 0000B9A4 52 <1> push dx 9589 0000B9A5 50 <1> push ax 9590 0000B9A6 49 <1> dec cx 9591 <1> lvar word, minwidth 9592 0000B9A7 51 <1> push cx 9593 0000B9A8 41 <1> inc cx 9594 <1> 9595 0000B9A9 50 <1> push ax 9596 0000B9AA 53 <1> push bx 9597 0000B9AB 51 <1> push cx 9598 0000B9AC 52 <1> push dx 9599 0000B9AD 56 <1> push si 9600 0000B9AE 57 <1> push di 9601 0000B9AF 06 <1> push es 9602 <1> 9603 0000B9B0 16 <1> push ss 9604 0000B9B1 07 <1> pop es 9605 <1> 9606 0000B9B2 8D7EFF <1> lea di, [bp + ?buffer + ?bufferlen - 1] 9607 0000B9B5 89FB <1> mov bx, di 9608 0000B9B7 FD <1> std ; _AMD_ERRATUM_109_WORKAROUND does not apply 9609 <1> 9610 <1> ; dword [bp + ?dividend] = number to display 9611 0000B9B8 B90A00 <1> mov cx, 10 ; divisor 9612 <1> .loop_write: 9613 <1> 9614 0000B9BB 31D2 <1> xor dx, dx 9615 0000B9BD 57 <1> push di 9616 0000B9BE BF0400 <1> mov di, 4 9617 <1> .loop_divide: 9618 0000B9C1 8B43F0 <1> mov ax, [bp + ?dividend - 2 + di] 9619 0000B9C4 F7F1 <1> div cx 9620 0000B9C6 8943F0 <1> mov word [bp + ?dividend - 2 + di], ax 9621 0000B9C9 4F <1> dec di 9622 0000B9CA 4F <1> dec di 9623 0000B9CB 75F4 <1> jnz .loop_divide 9624 <1> ; dx = last remainder 9625 0000B9CD 5F <1> pop di 9626 0000B9CE 92 <1> xchg ax, dx ; ax = remainder (next digit) 9627 <1> ; dword [bp + ?dividend] = result of div 9628 0000B9CF 0430 <1> add al, '0' 9629 0000B9D1 AA <1> stosb 9630 0000B9D2 FF4EF0 <1> dec word [bp + ?minwidth] 9631 0000B9D5 79E4 <1> jns .loop_write 9632 <1> 9633 0000B9D7 837EF400 <1> cmp word [bp + ?dividend + 2], 0 9634 0000B9DB 75DE <1> jnz .loop_write 9635 0000B9DD 837EF200 <1> cmp word [bp + ?dividend], 0 9636 <1> ; any more ? 9637 0000B9E1 75D8 <1> jnz .loop_write ; loop --> 9638 <1> 9639 0000B9E3 FC <1> cld 9640 <1> 9641 0000B9E4 29FB <1> sub bx, di 9642 0000B9E6 89D9 <1> mov cx, bx 9643 0000B9E8 89FE <1> mov si, di 9644 0000B9EA 46 <1> inc si 9645 <1> 9646 0000B9EB 07 <1> pop es 9647 0000B9EC 5F <1> pop di 9648 <1> 9649 <1> @@: 9650 0000B9ED 36A4 <1> ss movsb ; do not replace by rep ss movsb, because 9651 <1> ; some 8086 don't like two-prefix opcodes 9652 0000B9EF E2FC <1> loop @B 9653 <1> 9654 0000B9F1 5E <1> pop si 9655 0000B9F2 5A <1> pop dx 9656 0000B9F3 59 <1> pop cx 9657 0000B9F4 5B <1> pop bx 9658 0000B9F5 58 <1> pop ax 9659 <1> 9660 0000B9F6 89EC5D <1> lleave 9661 0000B9F9 C3 <1> retn 9662 <1> 9663 <1> 9664 <1> ; dump high word of eax - assumes 386 9665 <1> hexword_high: 9666 <1> [cpu 386] 9667 0000B9FA 66C1C010 <1> rol eax, 16 9668 0000B9FE E80500 <1> call hexword 9669 0000BA01 66C1C010 <1> rol eax, 16 9670 <1> __CPU__ 9671 0000BA05 C3 <1> retn 9672 <1> 9673 <1> 9674 <1> ; hexdword - dump dword (in eax) to hex ASCII - assumes 386 9675 <1> ; HEXWORD - Print hex word (in AX). 9676 <1> ; HEXBYTE - Print hex byte (in AL). 9677 <1> ; HEXNYB - Print hex digit. 9678 <1> ; Uses none. 9679 <1> %if 0 ; currently disabled because only one call made to here (ID command) 9680 <1> hexdword: 9681 <1> call hexword_high 9682 <1> %endif 9683 <1> hexword: 9684 0000BA06 86C4 <1> xchg al, ah 9685 0000BA08 E80200 <1> call hexbyte 9686 0000BA0B 86C4 <1> xchg al, ah 9687 <1> 9688 <1> hexbyte: 9689 0000BA0D 51 <1> push cx 9690 0000BA0E B104 <1> mov cl, 4 9691 0000BA10 D2C0 <1> rol al, cl 9692 0000BA12 E80300 <1> call hexnyb 9693 0000BA15 D2C0 <1> rol al, cl 9694 0000BA17 59 <1> pop cx 9695 <1> 9696 <1> hexnyb: 9697 0000BA18 50 <1> push ax 9698 0000BA19 240F <1> and al, 0Fh 9699 <1> .common: 9700 <1> ; These three instructions change to ASCII hex. 9701 <1> ; Refer to https://codegolf.stackexchange.com/questions/193793/little-endian-number-to-string-conversion/193842#193842 9702 0000BA1B 3C0A <1> cmp al, 10 ; set CF according to digit <= 9 9703 0000BA1D 1C69 <1> sbb al, 69h ; read CF, set CF and conditionally set AF 9704 0000BA1F 2F <1> das ; magic, which happens to work 9705 0000BA20 AA <1> stosb 9706 0000BA21 58 <1> pop ax 9707 0000BA22 C3 <1> retn 9708 <1> 9709 <1> ; TAB_TO - Space fill until reaching the column indicated by AX. 9710 <1> ; (Print a new line if necessary.) 9711 <1> 9712 <1> tab_to: 9713 0000BA23 50 <1> push ax 9714 0000BA24 29F8 <1> sub ax, di 9715 0000BA26 7706 <1> ja tabto1 ; if there's room on this line 9716 0000BA28 E80B00 <1> call trimputs 9717 0000BA2B BF[0E08] <1> mov di, line_out 9718 <1> tabto1: 9719 0000BA2E 59 <1> pop cx 9720 0000BA2F 29F9 <1> sub cx, di 9721 0000BA31 B020 <1> mov al, 32 9722 0000BA33 F3AA <1> rep stosb ; space fill to the right end 9723 <1> puts.retn: 9724 0000BA35 C3 <1> retn 9725 <1> 9726 <1> ; Trim excess blanks, append linebreak and display line_out. 9727 <1> ; 9728 <1> ; INP: es:di -> behind last character to display, or blank 9729 <1> ; 9730 <1> ; Note: May overflow if line_out only contains blanks. The byte at 9731 <1> ; trim_overflow is used to avoid overflows. 9732 <1> trimputs: 9733 0000BA36 4F <1> dec di 9734 0000BA37 26803D20 <1> cmp byte [es:di], 32 9735 0000BA3B 74F9 <1> je trimputs 9736 0000BA3D 47 <1> inc di 9737 <1> 9738 <1> ; Append linebreak and display line_out 9739 <1> ; 9740 <1> ; INP: es:di -> behind last character to display 9741 <1> ; STT: all segment registers same 9742 <1> ; CHG: ax, bx, cx, dx 9743 <1> putsline_crlf: 9744 0000BA3E B80D0A <1> mov ax, 10<<8| 13 9745 0000BA41 AB <1> stosw 9746 <1> 9747 <1> ; Display line_out 9748 <1> ; 9749 <1> ; INP: es:di -> behind last character to display 9750 <1> ; es:line_out -> first character to display 9751 <1> ; STT: all segment registers same 9752 <1> ; CHG: ax, bx, cx, dx 9753 <1> putsline: 9754 0000BA42 89F9 <1> mov cx, di 9755 0000BA44 BA[0E08] <1> mov dx, line_out 9756 0000BA47 29D1 <1> sub cx, dx 9757 <1> 9758 <1> ; Display message 9759 <1> ; 9760 <1> ; INP: es:dx -> message to display 9761 <1> ; cx = length of message 9762 <1> ; STT: ds = ss = debugger data selector 9763 <1> ; CHG: ax, bx, cx, dx 9764 <1> puts: 9765 <1> ;d4 call d4message 9766 <1> ;d4 asciz "In puts first",13,10 9767 <1> 9768 0000BA49 F606[9F00]20 <1> testopt [internalflags], tt_silence 9769 0000BA4E 7403E93302 <1> jnz puts_silence 9770 <1> 9771 0000BA53 F606[A500]60 <1> testopt [internalflags3], dif3_unquiet 9772 0000BA58 7507 <1> jnz @F 9773 0000BA5A F606[A500]10 <1> testopt [internalflags3], dif3_quiet_output 9774 0000BA5F 75D4 <1> jnz .retn 9775 <1> @@: 9776 <1> 9777 <1> ; The following code contains most of the paging support. 9778 <1> ; Based on the number of LF characters in the string it 9779 <1> ; displays only parts of the string, then interrupts it by 9780 <1> ; the "[more]" prompt which waits for any key before 9781 <1> ; proceeding. This is ensured to work proper in InDOS mode. 9782 <1> ; 9783 <1> ; Paging is deactivated if the command's output mustn't be 9784 <1> ; paged (clears pagedcommand, which is set by cmd3). It is 9785 <1> ; also not used when we output to a file. 9786 0000BA61 F606[7C00]10 <1> testopt [options], nonpagingdevice 9787 0000BA66 7403E9FE00 <1> jnz .display ; deactivated by user --> 9788 0000BA6B F606[A700]01 <1> testopt [internalflags3], dif3_input_re 9789 0000BA70 7403E9F400 <1> jnz .display 9790 0000BA75 F606[A500]01 <1> testopt [internalflags3], dif3_input_cmdline 9791 0000BA7A 7403E9EA00 <1> jnz .display 9792 <1> %if _INPUT_FILE_BOOT 9793 0000BA7F F606[A300]02 <1> testopt [internalflags2], dif2_input_file_boot 9794 0000BA84 7403E9E000 <1> jnz .display 9795 <1> %endif 9796 0000BA89 E81EEC <1> call InDos ; InDOS mode ? 9797 0000BA8C 752C <1> jnz .dontcheckredirection ; yes, then we display with Int10 anyway --> 9798 <1> %if _INPUT_FILE_HANDLES 9799 0000BA8E F606[A200]10 <1> testopt [internalflags2], dif2_input_file 9800 0000BA93 7403E9D100 <1> jnz .display 9801 <1> %endif 9802 0000BA98 F606[7D00]40 <1> testopt [options], enable_serial ; I/O done using serial port ? 9803 0000BA9D 751B <1> jnz .dontcheckredirection ; yes, is paged --> 9804 0000BA9F F606[9C00]80 <1> testopt [internalflags], outputfile 9805 0000BAA4 7403E9C000 <1> jnz .display ; output redirected to file. never page --> 9806 0000BAA9 F606[7D00]01 <1> testopt [options], nondospaging 9807 0000BAAE 750A <1> jnz .dontcheckredirection 9808 0000BAB0 F606[9C00]20 <1> testopt [internalflags], inputfile 9809 0000BAB5 7403E9AF00 <1> jnz .display ; input redirected from a file. never page --> 9810 <1> .dontcheckredirection: 9811 0000BABA 57 <1> push di 9812 0000BABB 51 <1> push cx ; used as variable: remaining (not yet displayed) line length 9813 0000BABC 89D7 <1> mov di, dx ; es:di-> string, cx = length 9814 <1> .looplf: 9815 0000BABE 85C9 <1> test cx, cx 9816 0000BAC0 7503E9A200 <1> jz .display_pop ; end of string (or ended in LF) --> 9817 <1> ; Important: We only ever jump back to .looplf when cx 9818 <1> ; zero means it's okay to ignore the waiting prompt as 9819 <1> ; flagged below. This is (A) at the start of a string, 9820 <1> ; where cx is the whole string's length, (B) after 9821 <1> ; determining that prompting is not yet necessary, in 9822 <1> ; which case the flag was checked earlier already, (C) 9823 <1> ; after the flag has been set and a substring was already 9824 <1> ; displayed (so cx is again the whole substring's length) 9825 <1> ; or (D) just after the prompt was displayed, in which 9826 <1> ; case the flag cannot be set. 9827 <1> ; In case A and C, when the (sub)string is empty (ie. cx 9828 <1> ; is zero) it's crucial to ignore the waiting prompt as 9829 <1> ; this is the exact behaviour we want: If nothing is 9830 <1> ; displayed anymore before the getline code prompts 9831 <1> ; anyway, do not display our prompt. 9832 0000BAC5 F606[9E00]10 <1> testopt [internalflags], promptwaiting ; do we have a prompt to display ? 9833 0000BACA 7550 <1> jnz .promptnow ; yes, display it before the string --> 9834 <1> 9835 0000BACC 31C0 <1> xor ax, ax 9836 0000BACE F606[7D00]40 <1> testopt [options], enable_serial ; serial ? 9837 0000BAD3 7409 <1> jz @F ; no --> 9838 0000BAD5 0A06[E70B] <1> or al, byte [serial_rows] ; ax = number of rows if serial 9839 0000BAD9 7419 <1> jz .display_pop_ZR ; if zero, do not page --> 9840 0000BADB 48 <1> dec ax ; was 1 ? (adjust to rows minus one) 9841 0000BADC 7516 <1> jnz @FF ; no, use as rows minus one --> (NZ) 9842 <1> ; ax = 0 if it was 1 9843 <1> @@: 9844 0000BADE 0A06[F60B] <1> or al, [io_rows] 9845 0000BAE2 7410 <1> jz .display_pop_ZR 9846 0000BAE4 48 <1> dec ax ; was 1 ? (adjust to rows minus one) 9847 0000BAE5 750D <1> jnz @F ; no, use as rows minus one --> (NZ) 9848 <1> ; yes, automatic (use BDA) 9849 0000BAE7 06 <1> push es 9850 0000BAE8 B84000 <1> mov ax, 40h ; 0040h is a bimodal segment/selector 9851 0000BAEB 8EC0 <1> mov es, ax 9852 0000BAED 26A08400 <1> mov al, byte [ es:84h ] ; rows on screen 9853 0000BAF1 07 <1> pop es 9854 0000BAF2 85C0 <1> test ax, ax 9855 <1> @@: 9856 <1> .display_pop_ZR: 9857 0000BAF4 7471 <1> jz .display_pop 9858 <1> 9859 0000BAF6 3806[930A] <1> cmp byte [ linecounter ], al 9860 0000BAFA 725E <1> jb .notyet ; not yet reached --> 9861 0000BAFC F606[9C00]08 <1> testopt [internalflags], pagedcommand ; active ? 9862 0000BB01 7506 <1> jnz .prompt ; yes, prompt --> 9863 0000BB03 FE0E[930A] <1> dec byte [ linecounter ] ; keep count, but don't prompt til next LF 9864 0000BB07 EB51 <1> jmp short .notyet 9865 <1> 9866 <1> .prompt: 9867 0000BB09 58 <1> pop ax ; ax = length of string, cx = length of string remaining 9868 0000BB0A 29C8 <1> sub ax, cx ; ax = length of string til LF 9869 0000BB0C 91 <1> xchg ax, cx ; cx = til LF incl., ax = behind LF 9870 0000BB0D 50 <1> push ax ; new count 9871 <1> ; cx = length til LF 9872 <1> ; es:dx-> start of part til LF 9873 0000BB0E E85800 <1> call .display ; display part of message which fits on screen 9874 0000BB11 59 <1> pop cx 9875 0000BB12 51 <1> push cx ; update cx from variable 9876 0000BB13 89FA <1> mov dx, di ; dx-> start of next part 9877 0000BB15 800E[9E00]10 <1> setopt [internalflags], promptwaiting ; mark as prompting necessary 9878 0000BB1A EBA2 <1> jmp short .looplf ; now check whether anything follows at all 9879 <1> ; This is the magic to suppress unnecessary prompts as 9880 <1> ; were displayed previously. Now, we'll set this flag 9881 <1> ; which effectively displays the prompt before (!) any 9882 <1> ; other output is done. Previously, the prompt would be 9883 <1> ; displayed right here. The only case where behaviour 9884 <1> ; changed is when no more output occurs until the flag 9885 <1> ; is reset elsewhere - ie. if getline prompts anyway. 9886 <1> 9887 <1> .promptnow: 9888 0000BB1C 52 <1> push dx 9889 0000BB1D 51 <1> push cx 9890 0000BB1E C606[930A]00 <1> mov byte [ linecounter ], 0 ; prompting, so reset the line counter 9891 0000BB23 8026[9E00]EF <1> clropt [internalflags], promptwaiting 9892 0000BB28 06 <1> push es 9893 0000BB29 16 <1> push ss 9894 0000BB2A 07 <1> pop es 9895 0000BB2B BA[0E5D] <1> mov dx, msg.more ; es:dx -> message 9896 0000BB2E B90600 <1> mov cx, msg.more_size 9897 0000BB31 E83500 <1> call .display ; print string (avoiding a recursion) 9898 0000BB34 07 <1> pop es 9899 <1> 9900 <1> ; This option is a hack for the sole use of 9901 <1> ; demo scripts that only want the user to press 9902 <1> ; a key for paging. 9903 0000BB35 F606[7D00]01 <1> testopt [options], nondospaging 9904 0000BB3A 7405 <1> jz .getc 9905 0000BB3C E8F502 <1> call getc.rawnext ; get a character from BIOS 9906 0000BB3F EB03 <1> jmp short .dispover 9907 <1> .getc: 9908 0000BB41 E8DD02 <1> call getc ; get a character 9909 <1> .dispover: 9910 0000BB44 3C03 <1> cmp al, 3 ; is it Ctrl+C ? 9911 0000BB46 743D <1> je .ctrlc ; yes, handle that --> 9912 0000BB48 E85884 <1> call handle_serial_flags_ctrl_c 9913 0000BB4B 06 <1> push es 9914 0000BB4C 16 <1> push ss 9915 0000BB4D 07 <1> pop es 9916 0000BB4E BA[145D] <1> mov dx, msg.more_over ; es:dx -> message 9917 0000BB51 B90800 <1> mov cx, msg.more_over_size 9918 0000BB54 E81200 <1> call .display ; overwrite the prompt (avoiding a recursion) 9919 0000BB57 07 <1> pop es 9920 0000BB58 59 <1> pop cx 9921 0000BB59 5A <1> pop dx 9922 <1> 9923 <1> .notyet: 9924 0000BB5A B00A <1> mov al, 10 9925 0000BB5C F2AE <1> repne scasb ; search LF 9926 0000BB5E 7507 <1> jne .display_pop ; none --> 9927 <1> 9928 0000BB60 FE06[930A] <1> inc byte [ linecounter ] ; record how many LFs will be displayed 9929 0000BB64 E957FF <1> jmp .looplf ; search for next LF --> 9930 <1> 9931 <1> .display_pop: 9932 0000BB67 59 <1> pop cx 9933 0000BB68 5F <1> pop di 9934 <1> .display: 9935 <1> ; Non-paged output code follows. 9936 <1> ;d4 call d4message 9937 <1> ;d4 asciz "In puts.display first",13,10 9938 <1> 9939 0000BB69 F606[7D00]40 <1> testopt [options], enable_serial 9940 0000BB6E 7522 <1> jnz .notdos 9941 0000BB70 E837EB <1> call InDos 9942 0000BB73 751D <1> jnz .notdos 9943 <1> ; es:dx -> message 9944 0000BB75 BB0100 <1> mov bx, 1 ; standard output 9945 0000BB78 B440 <1> mov ah, 40h ; write to file 9946 <1> %if _PM 9947 <1> d5 push di 9948 0000BB7A 06 <1> push es ; point ds of _doscall* to msg segment 9949 <1> d5 call d4message 9950 <1> d5 asciz 13,10,"In puts.display, es=" 9951 <1> d5 push es 9952 <1> d5 call d4disp_stack_hex 9953 <1> d5 call d4message 9954 <1> d5 asciz "h",13,10 9955 0000BB7B E8FFA1 <1> call selector_to_segment ; make sure we give it as a segment 9956 <1> ; This assumes that non-access-slice pointers into the 9957 <1> ; symbol tables (SYMSTR particularly) can be converted 9958 <1> ; into 86M segmented addresses, ie that the selector 9959 <1> ; points into 86M-accessible memory. 9960 <1> d5 call d4message 9961 <1> d5 asciz "In puts.display, on stack =" 9962 <1> d5 pop di 9963 <1> d5 push di 9964 <1> d5 push di 9965 <1> d5 call d4disp_stack_hex 9966 <1> d5 call d4message 9967 <1> d5 asciz "h",13,10 9968 0000BB7E E8CDD6 <1> call _doscall_return_es_parameter_es_ds 9969 0000BB81 83C402 <1> add sp, 2 ; discard es returned from call 9970 <1> d5 pop di 9971 <1> %else 9972 <1> push ds 9973 <1> push es 9974 <1> pop ds ; ds:dx -> message 9975 <1> int 21h ; simply call into DOS 9976 <1> pop ds 9977 <1> %endif 9978 0000BB84 C3 <1> retn 9979 <1> 9980 <1> .ctrlc: 9981 0000BB85 F606[A300]10 <1> testopt [internalflags2], dif2_in_silence_dump 9982 0000BB8A 7403 <1> jz @F 9983 0000BB8C E81C02 <1> call reset_silent_mode 9984 <1> @@: 9985 0000BB8F E98884 <1> jmp handle_ctrl_c ; abort currently running command --> 9986 <1> ; If handled by DOS, Ctrl+C causes our process to be terminated. 9987 <1> ; Because we are self-owned, we re-enter our code at debug22 then. 9988 <1> ; debug22 only does some re-initialization of registers before 9989 <1> ; entering cmd3. Therefore, instead of aborting we can directly jump 9990 <1> ; to cmd3 here. This has the additional benefit of not requiring DOS 9991 <1> ; at all, so that no workarounds for InDOS mode and boot loader 9992 <1> ; operation are necessary. 9993 <1> 9994 <1> ; No command should fail spectacularly when being aborted this way, 9995 <1> ; because in fact every command calling puts can already be aborted by 9996 <1> ; DOS's Ctrl+C checking if DOS is used. This check is really only an 9997 <1> ; _additional_ way the commands can be aborted. 9998 <1> 9999 <1> ; Note that a more complete way to support command abortion would be 10000 <1> ; to hook Int1B, and to keep a flag of whether Ctrl+C or Ctrl+Break 10001 <1> ; were requested, and to additionally check before or after every I/O 10002 <1> ; operation whether Ctrl+C was pressed using non-destructive reads. 10003 <1> ; In short, exactly what DOS does. 10004 <1> 10005 <1> .notdos: 10006 0000BB92 56 <1> push si 10007 0000BB93 F606[9E00]01 <1> testopt [internalflags], usecharcounter 10008 0000BB98 7505 <1> jnz .dontresetcharcounter 10009 0000BB9A C606[920A]01 <1> mov byte [ charcounter ], 1 10010 <1> ; This assumes we always start at the beginning of a line. 10011 <1> ; Therefore any call to puts must display at the beginning 10012 <1> ; of a line or tab parsing will not work. Only calls to puts 10013 <1> ; not containing tab characters may display partial lines. 10014 <1> ; (Calls to puts with partial lines and tab characters have 10015 <1> ; to set the flag usecharcounter in internalflags.) 10016 <1> .dontresetcharcounter: 10017 0000BB9F E358 <1> jcxz .return 10018 0000BBA1 89D6 <1> mov si, dx 10019 <1> .loop: 10020 0000BBA3 26AC <1> es lodsb 10021 0000BBA5 3C09 <1> cmp al, 9 10022 0000BBA7 750B <1> jne .nottab ; is no tab --> 10023 0000BBA9 A0[920A] <1> mov al, byte [ charcounter ] 10024 0000BBAC 2407 <1> and al, 7 ; at 8 character boundary ? 10025 0000BBAE B020 <1> mov al, 32 ; (always replaced by blank) 10026 0000BBB0 7402 <1> jz .nottab ; yes, don't use hack --> 10027 0000BBB2 41 <1> inc cx 10028 0000BBB3 4E <1> dec si ; find tab again next lodsb 10029 <1> .nottab: 10030 0000BBB4 3C0D <1> cmp al, 13 ; (exact match for CR) 10031 0000BBB6 750A <1> jne .notcr 10032 0000BBB8 8026[A600]FD <1> clropt [internalflags3], dif3_int10_highlight 10033 0000BBBD C606[920A]00 <1> mov byte [ charcounter ], 0 ; increased to one before displaying 10034 <1> .notcr: 10035 <1> %if 0 ; currently we never receive BS here 10036 <1> cmp al, 8 10037 <1> jne .notbs 10038 <1> mov ah, 0Fh 10039 <1> int 10h ; get page 10040 <1> mov bl, al ; save number of characters per column 10041 <1> push cx 10042 <1> mov ah, 03h 10043 <1> int 10h ; get cursor position dx 10044 <1> pop cx 10045 <1> dec byte [ charcounter ] ; assume not at start of line 10046 <1> mov al, 8 ; changed by Int10 10047 <1> or dl, dl 10048 <1> jnz .dontcount ; not first column, so display normal --> 10049 <1> mov byte [ charcounter ], 1 ; assume at start of screen 10050 <1> or dh, dh 10051 <1> jz .next ; at start of screen, don't display --> 10052 <1> dec dh ; previous line 10053 <1> mov dl, bl 10054 <1> mov byte [ charcounter ], dl ; really at end of line (one-based counter) 10055 <1> dec dl ; last column 10056 <1> mov ah, 02h 10057 <1> int 10h ; set new cursor position 10058 <1> jmp short .next 10059 <1> .notbs: 10060 <1> %endif 10061 0000BBC2 3C0A <1> cmp al, 10 10062 0000BBC4 7404 <1> je .dontcount ; must not count line feeds! 10063 0000BBC6 FE06[920A] <1> inc byte [ charcounter ] 10064 <1> .dontcount: 10065 0000BBCA F606[7D00]40 <1> testopt [options], enable_serial 10066 0000BBCF 7405 <1> jz @F 10067 <1> 10068 0000BBD1 E87914 <1> call serial_send_char 10069 <1> 10070 0000BBD4 EB21 <1> jmp .next 10071 <1> @@: 10072 <1> 10073 0000BBD6 3C1B <1> cmp al, 27 10074 0000BBD8 7421 <1> je .try_highlight 10075 <1> 10076 <1> .nohighlight: 10077 0000BBDA F606[A600]02 <1> testopt [internalflags3], dif3_int10_highlight 10078 0000BBDF 740F <1> jz @F 10079 0000BBE1 B409 <1> mov ah, 09h 10080 0000BBE3 B700 <1> mov bh, 0 10081 0000BBE5 8A1E[AE95] <1> mov bl, byte [.attribute] 10082 0000BBE9 51 <1> push cx 10083 0000BBEA B90100 <1> mov cx, 1 10084 0000BBED CD10 <1> int 10h 10085 0000BBEF 59 <1> pop cx 10086 <1> 10087 <1> @@: 10088 0000BBF0 BB0700 <1> mov bx, 0007 10089 0000BBF3 B40E <1> mov ah, 0Eh 10090 0000BBF5 CD10 <1> int 10h 10091 <1> .next: 10092 0000BBF7 E2AA <1> loop .loop 10093 <1> .return: 10094 0000BBF9 5E <1> pop si 10095 0000BBFA C3 <1> retn 10096 <1> 10097 <1> .try_highlight: 10098 0000BBFB F606[8600]02 <1> testopt [options3], opt3_r_highlight_dumb 10099 0000BC00 75D8 <1> jnz .nohighlight 10100 0000BC02 83F902 <1> cmp cx, 2 10101 0000BC05 76D3 <1> jbe .nohighlight 10102 0000BC07 26803C5B <1> cmp byte [es:si], '[' 10103 0000BC0B 75CD <1> jne .nohighlight 10104 0000BC0D 26807C016D <1> cmp byte [es:si + 1], 'm' 10105 0000BC12 742C <1> je .highlight_reset 10106 0000BC14 83F903 <1> cmp cx, 3 10107 0000BC17 74C1 <1> je .nohighlight 10108 0000BC19 26807C0137 <1> cmp byte [es:si + 1], '7' 10109 0000BC1E 75BA <1> jne .nohighlight 10110 0000BC20 26807C026D <1> cmp byte [es:si + 2], 'm' 10111 0000BC25 75B3 <1> jne .nohighlight 10112 <1> .highlight_set: 10113 0000BC27 50 <1> push ax 10114 0000BC28 51 <1> push cx 10115 0000BC29 B403 <1> mov ah, 3 10116 0000BC2B B700 <1> mov bh, 0 10117 0000BC2D 31D2 <1> xor dx, dx ; pre-initialise to zero 10118 0000BC2F CD10 <1> int 10h ; dl = column, dh = row 10119 0000BC31 84D2 <1> test dl, dl 10120 0000BC33 59 <1> pop cx 10121 0000BC34 58 <1> pop ax 10122 0000BC35 74A3 <1> jz .nohighlight 10123 <1> ; This test fails if we are at the very left of 10124 <1> ; the screen or in dosemu -dumb mode. So don't 10125 <1> ; use highlighting at the beginning of a line! 10126 0000BC37 800E[A600]02 <1> setopt [internalflags3], dif3_int10_highlight 10127 0000BC3C 49 <1> dec cx 10128 0000BC3D 46 <1> inc si 10129 0000BC3E EB10 <1> jmp @F 10130 <1> 10131 <1> .highlight_reset: 10132 0000BC40 50 <1> push ax 10133 0000BC41 51 <1> push cx 10134 0000BC42 B403 <1> mov ah, 3 10135 0000BC44 B700 <1> mov bh, 0 10136 0000BC46 31D2 <1> xor dx, dx ; pre-initialise to zero 10137 0000BC48 CD10 <1> int 10h ; dl = column, dh = row 10138 0000BC4A 84D2 <1> test dl, dl 10139 0000BC4C 59 <1> pop cx 10140 0000BC4D 58 <1> pop ax 10141 0000BC4E 748A <1> jz .nohighlight 10142 <1> ; Refer to above comment. 10143 <1> @@: 10144 0000BC50 800E[A600]02 <1> setopt [internalflags3], dif3_int10_highlight 10145 0000BC55 FECA <1> dec dl 10146 0000BC57 B402 <1> mov ah, 02h 10147 0000BC59 B700 <1> mov bh, 0 10148 0000BC5B CD10 <1> int 10h ; set cursor position 10149 0000BC5D B408 <1> mov ah, 08h 10150 0000BC5F B700 <1> mov bh, 0 10151 0000BC61 CD10 <1> int 10h ; read attribute to ah 10152 0000BC63 50 <1> push ax 10153 0000BC64 FEC2 <1> inc dl 10154 0000BC66 B402 <1> mov ah, 02h 10155 0000BC68 B700 <1> mov bh, 0 10156 0000BC6A CD10 <1> int 10h ; set cursor position 10157 0000BC6C 58 <1> pop ax 10158 0000BC6D 88E0 <1> mov al, ah 10159 0000BC6F 257788 <1> and ax, 8877h 10160 0000BC72 D0C0 <1> rol al, 1 10161 0000BC74 D0C0 <1> rol al, 1 10162 0000BC76 D0C0 <1> rol al, 1 10163 0000BC78 D0C0 <1> rol al, 1 10164 0000BC7A 08E0 <1> or al, ah 10165 0000BC7C A2[AE95] <1> mov byte [.attribute], al 10166 <1> 10167 0000BC7F 49 <1> dec cx 10168 0000BC80 49 <1> dec cx 10169 0000BC81 46 <1> inc si 10170 0000BC82 46 <1> inc si 10171 0000BC83 E971FF <1> jmp .next 10172 <1> 10173 <1> 10174 <1> usesection lDEBUG_DATA_ENTRY 10175 000095AE 00 <1> .attribute: db 0 10176 <1> usesection lDEBUG_CODE 10177 <1> 10178 <1> 10179 <1> ; INP: es:dx -> message to display 10180 <1> ; cx = length of message 10181 <1> ; STT: ds = ss = debugger data selector 10182 <1> ; CHG: ax, bx, cx, dx 10183 <1> puts_silence: 10184 0000BC86 56 <1> push si 10185 0000BC87 57 <1> push di 10186 <1> 10187 <1> .try_again: 10188 0000BC88 89D6 <1> mov si, dx ; es:si -> message 10189 0000BC8A 8B3E[FA09] <1> mov di, word [auxbuff_behind_last_silent] 10190 <1> ; (auxbuff):di -> next buffer (if it fits) 10191 0000BC8E B80F20 <1> mov ax, _AUXBUFFSIZE - 1 10192 0000BC91 29F8 <1> sub ax, di ; number of bytes left free 10193 <1> ; (+ 1 byte terminator) 10194 0000BC93 7204 <1> jc .delete 10195 0000BC95 39C8 <1> cmp ax, cx ; fits ? 10196 0000BC97 730B <1> jae .simple ; yes --> 10197 <1> 10198 <1> .delete: 10199 0000BC99 06 <1> push es 10200 0000BC9A 8E06[F209] <1> mov es, word [auxbuff_segorsel] 10201 0000BC9E E81700 <1> call silence_delete_one_string 10202 0000BCA1 07 <1> pop es 10203 0000BCA2 EBE4 <1> jmp .try_again 10204 <1> 10205 <1> .simple: 10206 0000BCA4 1E <1> push ds 10207 0000BCA5 06 <1> push es 10208 0000BCA6 FF36[F209] <1> push word [auxbuff_segorsel] 10209 0000BCAA 06 <1> push es 10210 0000BCAB 1F <1> pop ds ; ds:si -> message 10211 0000BCAC 07 <1> pop es ; es:di -> next buffer 10212 0000BCAD F3A4 <1> rep movsb ; copy over 10213 0000BCAF 07 <1> pop es 10214 0000BCB0 1F <1> pop ds 10215 0000BCB1 893E[FA09] <1> mov word [auxbuff_behind_last_silent], di 10216 <1> ; update pointer 10217 0000BCB5 5F <1> pop di 10218 0000BCB6 5E <1> pop si 10219 0000BCB7 C3 <1> retn 10220 <1> 10221 <1> 10222 <1> ; INP: es => auxbuff 10223 <1> ; ds = ss 10224 <1> ; [auxbuff_behind_last_silent] -> behind last silent 10225 <1> ; [auxbuff_behind_while_condition] 10226 <1> ; OUT: [auxbuff_behind_last_silent] updated 10227 <1> ; auxbuff updated (deleted one of the dump strings, 10228 <1> ; moved forwards in the buffer the remainder) 10229 <1> ; if error, aborts command by jumping to cmd3 10230 <1> ; CHG: ax, di, si 10231 <1> silence_delete_one_string: 10232 0000BCB8 E81400 <1> call .internal ; call internal implementation 10233 0000BCBB 733E <1> jnc .retn ; no error ? --> 10234 <1> .error: ; else: error, abort command 10235 0000BCBD 16 <1> push ss 10236 0000BCBE 1F <1> pop ds 10237 0000BCBF 16 <1> push ss 10238 0000BCC0 07 <1> pop es 10239 0000BCC1 8026[9F00]DF <1> clropt [internalflags], tt_silence 10240 0000BCC6 BA[E968] <1> mov dx, msg.silent_error 10241 0000BCC9 E8F000 <1> call putsz 10242 0000BCCC E93143 <1> jmp cmd3 10243 <1> 10244 <1> 10245 <1> ; INP: as for silence_delete_one_string 10246 <1> ; OUT: as for silence_delete_one_string, but: 10247 <1> ; CY if error (no more space) 10248 <1> ; NC if success 10249 <1> ; CHG: ax, di, si 10250 <1> ; STT: ds = ss 10251 <1> .internal: 10252 0000BCCF 51 <1> push cx 10253 0000BCD0 8B0E[FA09] <1> mov cx, [auxbuff_behind_last_silent] 10254 <1> ; -> next buffer position 10255 0000BCD4 8B3E[F809] <1> mov di, word [auxbuff_behind_while_condition] 10256 0000BCD8 29F9 <1> sub cx, di 10257 0000BCDA B000 <1> mov al, 0 10258 0000BCDC 3C01 <1> cmp al, 1 ; initialise to NZ (if cx is zero) 10259 0000BCDE F2AE <1> repne scasb 10260 0000BCE0 F9 <1> stc 10261 0000BCE1 7518 <1> jne .retn ; error, no NUL found in data (CY) 10262 <1> ; es:di -> behind first NUL 10263 <1> 10264 0000BCE3 89FE <1> mov si, di ; es:si -> next message 10265 0000BCE5 8B3E[F809] <1> mov di, word [auxbuff_behind_while_condition] 10266 0000BCE9 8B0E[FA09] <1> mov cx, word [auxbuff_behind_last_silent] 10267 0000BCED 06 <1> push es 10268 0000BCEE 1F <1> pop ds ; ds:si -> next message 10269 0000BCEF 29F1 <1> sub cx, si ; remaining buffer 10270 0000BCF1 F3A4 <1> rep movsb ; move to start of silent buffer 10271 0000BCF3 16 <1> push ss 10272 0000BCF4 1F <1> pop ds 10273 0000BCF5 893E[FA09] <1> mov word [auxbuff_behind_last_silent], di 10274 0000BCF9 59 <1> pop cx 10275 0000BCFA F8 <1> clc ; (NC) 10276 <1> .retn: 10277 0000BCFB C3 <1> retn 10278 <1> 10279 <1> 10280 <1> ; After having used puts_silence, this dumps all data 10281 <1> ; remaining in the silent buffer in auxbuff. 10282 <1> ; If word [tt_silent_mode_number] is set, only that many 10283 <1> ; data strings (zero-terminated) are dumped, from the end 10284 <1> ; of the buffer. 10285 <1> ; 10286 <1> ; CHG: ax, bx, cx, dx, si, di, es 10287 <1> ; STT: ds = ss = debugger data selector 10288 <1> ; sets es to ss 10289 <1> silence_dump: 10290 0000BCFC F606[9F00]10 <1> testopt [internalflags], tt_silent_mode ; is in use ? 10291 0000BD01 7501 <1> jnz @F ; yes --> 10292 0000BD03 C3 <1> retn ; no. simple 10293 <1> 10294 <1> @@: 10295 0000BD04 8026[9F00]DF <1> clropt [internalflags], tt_silence 10296 0000BD09 800E[A300]10 <1> setopt [internalflags2], dif2_in_silence_dump 10297 <1> 10298 0000BD0E F606[8500]01 <1> testopt [options3], opt3_silence_paging_set 10299 0000BD13 7413 <1> jz @F 10300 0000BD15 F606[8500]02 <1> testopt [options3], opt3_silence_paging_on 10301 0000BD1A 7407 <1> jz .turn_paging_off 10302 <1> 10303 <1> .turn_paging_on: 10304 0000BD1C 800E[9C00]08 <1> setopt [internalflags], pagedcommand 10305 0000BD21 EB05 <1> jmp @F 10306 <1> 10307 <1> .turn_paging_off: 10308 0000BD23 8026[9C00]F7 <1> clropt [internalflags], pagedcommand 10309 <1> @@: 10310 <1> 10311 0000BD28 8B16[FC09] <1> mov dx, word [tt_silent_mode_number] 10312 0000BD2C 85D2 <1> test dx, dx 10313 0000BD2E 7428 <1> jz .no_number_given 10314 <1> 10315 0000BD30 8E06[F209] <1> mov es, word [auxbuff_segorsel] 10316 0000BD34 8B3E[F809] <1> mov di, word [auxbuff_behind_while_condition] 10317 0000BD38 8B0E[FA09] <1> mov cx, word [auxbuff_behind_last_silent] 10318 0000BD3C 29F9 <1> sub cx, di 10319 0000BD3E 7418 <1> jz .no_number_given 10320 <1> 10321 0000BD40 31DB <1> xor bx, bx ; counter of zeros 10322 <1> @@: 10323 0000BD42 B000 <1> mov al, 0 10324 0000BD44 E307 <1> jcxz @F ; no more data --> 10325 0000BD46 F2AE <1> repne scasb ; another zero ? 10326 0000BD48 7503 <1> jne @F ; no, done --> 10327 0000BD4A 43 <1> inc bx ; count zeros 10328 0000BD4B EBF5 <1> jmp @B ; search for next --> 10329 <1> 10330 <1> @@: 10331 0000BD4D 29D3 <1> sub bx, dx ; number of dumps - requested number 10332 <1> ; = excess number of dumps 10333 0000BD4F 7607 <1> jbe .no_number_given 10334 <1> 10335 0000BD51 89D9 <1> mov cx, bx ; use excess number as loop counter 10336 <1> @@: 10337 0000BD53 E862FF <1> call silence_delete_one_string 10338 <1> ; delete one string 10339 0000BD56 E2FB <1> loop @B ; loop for however many to delete --> 10340 <1> 10341 <1> .no_number_given: 10342 0000BD58 8B3E[F809] <1> mov di, word [auxbuff_behind_while_condition] 10343 <1> ; es:di -> silent buffer 10344 <1> .loop_line: 10345 0000BD5C 8E06[F209] <1> mov es, word [auxbuff_segorsel] 10346 0000BD60 8B0E[FA09] <1> mov cx, word [auxbuff_behind_last_silent] 10347 0000BD64 29F9 <1> sub cx, di ; any more data ? 10348 0000BD66 7439 <1> jz .return ; no, return --> 10349 0000BD68 B000 <1> mov al, 0 10350 0000BD6A 49 <1> dec cx ; (in case of branching for next conditional) 10351 0000BD6B AE <1> scasb ; starts with a NUL byte ? 10352 0000BD6C 7402 <1> je @F ; yes, skipped --> 10353 0000BD6E 41 <1> inc cx ; (restore cx to original value) 10354 0000BD6F 4F <1> dec di ; no, decrement 10355 <1> @@: 10356 0000BD70 89FE <1> mov si, di ; es:si -> start of string 10357 <1> 10358 0000BD72 81F90001 <1> cmp cx, 256 ; cx > 256 ? 10359 0000BD76 7603 <1> jbe @F ; no --> 10360 0000BD78 B90001 <1> mov cx, 256 ; limit to 256 bytes per string 10361 <1> ; (line_out is 264 bytes) 10362 <1> @@: 10363 0000BD7B E324 <1> jcxz .return ; (if single byte that was NUL remaining -->) 10364 0000BD7D 89CB <1> mov bx, cx ; search string length 10365 0000BD7F B000 <1> mov al, 0 10366 0000BD81 F2AE <1> repne scasb ; scan for NUL bytes 10367 0000BD83 7501 <1> jne @F ; (if none found: cx = 0) 10368 <1> ; (if any found: cx = remaining length) 10369 0000BD85 41 <1> inc cx ; cx = remaining length + 1 (do not output NUL) 10370 <1> @@: 10371 0000BD86 29CB <1> sub bx, cx ; search length - remaining = found length 10372 0000BD88 89D9 <1> mov cx, bx ; how much to show 10373 0000BD8A 06 <1> push es 10374 0000BD8B 1F <1> pop ds ; ds => auxbuff (ds:si -> start of string) 10375 0000BD8C 16 <1> push ss 10376 0000BD8D 07 <1> pop es ; es => line_out 10377 0000BD8E BF[0E08] <1> mov di, line_out ; es:di -> line_out 10378 0000BD91 51 <1> push cx 10379 0000BD92 F3A4 <1> rep movsb ; copy over to line_out 10380 0000BD94 59 <1> pop cx ; cx = message length 10381 <1> 10382 0000BD95 16 <1> push ss 10383 0000BD96 1F <1> pop ds ; reset seg regs to ss 10384 0000BD97 BA[0E08] <1> mov dx, line_out ; dx -> message, cx = length 10385 0000BD9A 56 <1> push si 10386 0000BD9B E8ABFC <1> call puts ; print out 10387 0000BD9E 5F <1> pop di ; -> next silent message 10388 0000BD9F EBBB <1> jmp .loop_line 10389 <1> 10390 <1> .return: 10391 0000BDA1 16 <1> push ss 10392 0000BDA2 07 <1> pop es 10393 0000BDA3 FF36[F809] <1> push word [auxbuff_behind_while_condition] 10394 0000BDA7 8F06[FA09] <1> pop word [auxbuff_behind_last_silent] 10395 <1> reset_silent_mode: 10396 0000BDAB 8026[9F00]CF <1> clropt [internalflags], tt_silent_mode | tt_silence 10397 0000BDB0 8026[A300]EF <1> clropt [internalflags2], dif2_in_silence_dump 10398 0000BDB5 C3 <1> retn 10399 <1> 10400 <1> 10401 <1> putsz_error: 10402 0000BDB6 36800E[A500]20 <1> setopt [ss:internalflags3], dif3_unquiet_error 10403 <1> 10404 <1> ; Display ASCIZ message 10405 <1> ; 10406 <1> ; INP: ds:dx -> ASCIZ message to display 10407 <1> ; CHG: - 10408 <1> ; STT: ds, es don't care 10409 <1> putsz: 10410 0000BDBC 50 <1> push ax 10411 0000BDBD 53 <1> push bx 10412 0000BDBE 51 <1> push cx 10413 0000BDBF 52 <1> push dx 10414 0000BDC0 06 <1> push es 10415 0000BDC1 1E <1> push ds 10416 0000BDC2 1E <1> push ds 10417 0000BDC3 07 <1> pop es 10418 0000BDC4 57 <1> push di 10419 0000BDC5 89D7 <1> mov di, dx ; es:di-> string 10420 0000BDC7 30C0 <1> xor al, al 10421 0000BDC9 B9FFFF <1> mov cx, -1 10422 0000BDCC F2AE <1> repne scasb ; search zero 10423 0000BDCE F7D9 <1> neg cx 10424 0000BDD0 49 <1> dec cx 10425 0000BDD1 49 <1> dec cx ; cx = length of message 10426 0000BDD2 5F <1> pop di 10427 0000BDD3 16 <1> push ss 10428 0000BDD4 1F <1> pop ds ; ds = ss 10429 0000BDD5 E871FC <1> call puts 10430 0000BDD8 1F <1> pop ds 10431 0000BDD9 07 <1> pop es 10432 0000BDDA 5A <1> pop dx 10433 0000BDDB 59 <1> pop cx 10434 0000BDDC 5B <1> pop bx 10435 0000BDDD 58 <1> pop ax 10436 0000BDDE C3 <1> retn 10437 <1> 10438 <1> ; Display character 10439 <1> ; 10440 <1> ; INP: al = character to display 10441 <1> ; CHG: - 10442 <1> ; STT: ds, es don't care 10443 <1> putc: 10444 0000BDDF 53 <1> push bx 10445 0000BDE0 51 <1> push cx 10446 0000BDE1 52 <1> push dx 10447 0000BDE2 06 <1> push es 10448 0000BDE3 1E <1> push ds 10449 0000BDE4 16 <1> push ss 10450 0000BDE5 07 <1> pop es ; es:dx -> message 10451 0000BDE6 16 <1> push ss 10452 0000BDE7 1F <1> pop ds ; ds = ss 10453 0000BDE8 50 <1> push ax 10454 0000BDE9 B90100 <1> mov cx, 1 ; one character 10455 0000BDEC 89E2 <1> mov dx, sp ; ds:dx-> ax on stack 10456 0000BDEE E858FC <1> call puts 10457 0000BDF1 58 <1> pop ax 10458 0000BDF2 1F <1> pop ds 10459 0000BDF3 07 <1> pop es 10460 0000BDF4 5A <1> pop dx 10461 0000BDF5 59 <1> pop cx 10462 0000BDF6 5B <1> pop bx 10463 0000BDF7 C3 <1> retn 10464 <1> 10465 <1> 10466 <1> ; OUT: ax = 0 if no input available 10467 <1> ; ax = 0FFFFh if DOS stdin input available 10468 <1> ; ah = scancode, al = ASCII if int 16h input available 10469 <1> ; ax = al = ASCII if serial input available 10470 <1> ; REM: This is always a nondestructive read. 10471 <1> peekc: 10472 0000BDF8 F606[7D00]40 <1> testopt [options], enable_serial 10473 0000BDFD 750C <1> jnz .serial 10474 0000BDFF E8A8E8 <1> call InDos 10475 0000BE02 740E <1> jz .dos 10476 <1> .bios: 10477 0000BE04 B401 <1> mov ah, 01h 10478 0000BE06 CD16 <1> int 16h ; key available ? 10479 <1> @@: 10480 0000BE08 7413 <1> jz .return_ax_0 10481 0000BE0A C3 <1> retn 10482 <1> 10483 <1> .serial: 10484 0000BE0B E8AA10 <1> call serial_check_receive_char 10485 <1> ; do serial getc (check rx buffer) 10486 0000BE0E B400 <1> mov ah, 0 10487 0000BE10 EBF6 <1> jmp @B 10488 <1> 10489 <1> .dos: 10490 0000BE12 B40B <1> mov ah, 0Bh 10491 <1> doscall 2037 0000BE14 E8509F <2> call _doscall 10492 0000BE17 B4FF <1> mov ah, -1 10493 0000BE19 84C0 <1> test al, al 10494 0000BE1B EBEB <1> jmp @B 10495 <1> 10496 <1> .return_ax_0: 10497 0000BE1D B80000 <1> mov ax, 0 10498 <1> .return: 10499 0000BE20 C3 <1> retn 10500 <1> 10501 <1> 10502 <1> ; Get character/key 10503 <1> ; 10504 <1> ; OUT: al = character (if zero, look for ah) 10505 <1> ; ah = scan code or zero 10506 <1> ; CHG: ax 10507 <1> ; STT: ds = ss = debugger segment/selector 10508 <1> ; 10509 <1> ; Idles system when in InDOS mode. When not in InDOS mode, Int21.08 10510 <1> ; is used which is assumed to idle the system itself. 10511 <1> getc: 10512 0000BE21 F606[A400]20 <1> testopt [internalflags3], dif3_input_serial_override 10513 0000BE26 750C <1> jnz @F 10514 0000BE28 F606[7D00]40 <1> testopt [options], enable_serial 10515 0000BE2D 7505 <1> jnz @F 10516 0000BE2F E878E8 <1> call InDos 10517 0000BE32 7440 <1> jz getc_dos 10518 <1> @@: 10519 <1> .rawnext: 10520 0000BE34 FF16[040C] <1> call near word [getline_timer_func] 10521 <1> 10522 0000BE38 F606[A400]20 <1> testopt [internalflags3], dif3_input_serial_override 10523 0000BE3D 7523 <1> jnz @F 10524 0000BE3F F606[A700]01 <1> testopt [internalflags3], dif3_input_re 10525 0000BE44 751C <1> jnz @F 10526 <1> %if _INPUT_FILE_BOOT 10527 0000BE46 F606[A300]02 <1> testopt [internalflags2], dif2_input_file_boot 10528 0000BE4B 7515 <1> jnz @F 10529 <1> %endif 10530 0000BE4D F606[A500]01 <1> testopt [internalflags3], dif3_input_cmdline 10531 0000BE52 750E <1> jnz @F 10532 0000BE54 F606[7D00]40 <1> testopt [options], enable_serial 10533 0000BE59 7507 <1> jnz @F 10534 0000BE5B F606[7D00]04 <1> testopt [options], biosidles 10535 <1> ; idling disabled? 10536 0000BE60 750D <1> jnz .rawkey ; yes, just request a key --> 10537 <1> 10538 <1> @@: 10539 0000BE62 E8A801 <1> call getc_if_any ; got a key ? 10540 0000BE65 750C <1> jnz .return ; yes --> 10541 <1> .idle: ; common idling for BIOS keyboard and serial 10542 0000BE67 E83981 <1> call handle_serial_flags_ctrl_c 10543 0000BE6A E87A02 <1> call idle 10544 0000BE6D EBC5 <1> jmp .rawnext ; check again --> 10545 <1> 10546 <1> .rawkey: 10547 0000BE6F 31C0 <1> xor ax, ax 10548 0000BE71 CD16 <1> int 16h ; get the key and scancode 10549 <1> .return: 10550 0000BE73 C3 <1> retn 10551 <1> 10552 <1> 10553 <1> getc_dos: 10554 <1> %if _PM 10555 0000BE74 E852D3 <1> call ispm 10556 0000BE77 7507 <1> jnz @F ; if 86 Mode --> 10557 0000BE79 F606[8100]40 <1> testopt [options2], opt2_getc_idle_dpmi 10558 0000BE7E 7507 <1> jnz @FF 10559 <1> @@: 10560 <1> %endif 10561 0000BE80 F606[8100]20 <1> testopt [options2], opt2_getc_idle 10562 0000BE85 7410 <1> jz getc_dos_internal 10563 <1> @@: 10564 <1> .with_idle: 10565 0000BE87 E88301 <1> call getc_if_any 10566 0000BE8A 7403E9B500 <1> jnz .return 10567 0000BE8F E81181 <1> call handle_serial_flags_ctrl_c 10568 0000BE92 E85202 <1> call idle 10569 0000BE95 EBF0 <1> jmp .with_idle 10570 <1> 10571 <1> .return equ getc_dos_internal_get_extended.return 10572 <1> 10573 <1> 10574 <1> getc_dos_internal: ; DOS character devices handle one-byte characters. Therefore 10575 <1> ; non-ASCII keys cannot be returned with scancode in the high 10576 <1> ; byte of the same call. A non-ASCII key will be split into 10577 <1> ; two characters by CON: one NUL byte followed by the scancode. 10578 0000BE97 F606[A700]01 <1> testopt [internalflags3], dif3_input_re 10579 0000BE9C 741B <1> jz @F 10580 0000BE9E 56 <1> push si 10581 0000BE9F 8B36[E409] <1> mov si, word [re_buffer.position] 10582 0000BEA3 31C0 <1> xor ax, ax 10583 0000BEA5 AC <1> lodsb 10584 0000BEA6 84C0 <1> test al, al 10585 0000BEA8 8936[E409] <1> mov word [re_buffer.position], si 10586 0000BEAC 5E <1> pop si 10587 0000BEAD 7403E99200 <1> jnz .return 10588 0000BEB2 FF0E[E409] <1> dec word [re_buffer.position] 10589 0000BEB6 E98B00 <1> jmp .return 10590 <1> 10591 <1> .return equ getc_dos_internal_get_extended.return 10592 <1> 10593 <1> 10594 <1> @@: 10595 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 10596 <1> %if _INPUT_FILE_BOOT 10597 0000BEB9 F606[A300]02 <1> testopt [internalflags2], dif2_input_file_boot 10598 0000BEBE 750E <1> jnz .file 10599 <1> %endif 10600 <1> %if _INPUT_FILE_HANDLES 10601 0000BEC0 E8E7E7 <1> call InDos 10602 0000BEC3 7546 <1> jnz .file_not 10603 0000BEC5 F606[A200]10 <1> testopt [internalflags2], dif2_input_file 10604 0000BECA 7502 <1> jnz .file 10605 <1> %endif 10606 0000BECC EB3D <1> jmp .file_not 10607 <1> 10608 <1> .file: 10609 0000BECE 52 <1> push dx 10610 0000BECF 51 <1> push cx 10611 0000BED0 53 <1> push bx 10612 0000BED1 57 <1> push di 10613 0000BED2 31C0 <1> xor ax, ax ; initialise ah to zero 10614 0000BED4 50 <1> push ax 10615 0000BED5 89E2 <1> mov dx, sp ; ds:dx -> al byte on stack 10616 0000BED7 B90100 <1> mov cx, 1 10617 <1> %if _INPUT_FILE_BOOT 10618 <1> %if _INPUT_FILE_HANDLES 10619 0000BEDA F606[A300]02 <1> testopt [internalflags2], dif2_input_file_boot 10620 0000BEDF 7408 <1> jz @F 10621 <1> %endif 10622 0000BEE1 E87F0E <1> call yy_boot_remember_seek 10623 0000BEE4 E87BBF <1> call yy_boot_read 10624 <1> %if _INPUT_FILE_HANDLES 10625 0000BEE7 EB0B <1> jmp @FF 10626 <1> @@: 10627 <1> %endif 10628 <1> %endif 10629 <1> %if _INPUT_FILE_HANDLES 10630 0000BEE9 B43F <1> mov ah, 3Fh 10631 0000BEEB E81001 <1> call yy_get_handle 10632 0000BEEE E83B0E <1> call yy_remember_seek 10633 <1> doscall ; (depends on ds = ss) 2037 0000BEF1 E8739E <2> call _doscall 10634 <1> %endif 10635 <1> @@: 10636 0000BEF4 7204 <1> jc @F 10637 0000BEF6 85C0 <1> test ax, ax 10638 0000BEF8 750B <1> jnz .file_got 10639 <1> 10640 <1> @@: 10641 0000BEFA E85100 <1> call yy_close_file 10642 0000BEFD 58 <1> pop ax 10643 0000BEFE 5F <1> pop di 10644 0000BEFF 5B <1> pop bx 10645 0000BF00 59 <1> pop cx 10646 0000BF01 5A <1> pop dx 10647 0000BF02 E91CFF <1> jmp getc 10648 <1> 10649 <1> 10650 <1> .file_got: 10651 0000BF05 58 <1> pop ax ; ah = 0, al = character read 10652 0000BF06 5F <1> pop di 10653 0000BF07 5B <1> pop bx 10654 0000BF08 59 <1> pop cx 10655 0000BF09 5A <1> pop dx 10656 0000BF0A C3 <1> retn 10657 <1> 10658 <1> .file_not: 10659 <1> %endif 10660 0000BF0B F606[A500]01 <1> testopt [internalflags3], dif3_input_cmdline 10661 0000BF10 7419 <1> jz @F 10662 0000BF12 56 <1> push si 10663 0000BF13 8B36[E001] <1> mov si, word [cmdline_buffer.position] 10664 0000BF17 31C0 <1> xor ax, ax 10665 0000BF19 AC <1> lodsb 10666 0000BF1A 84C0 <1> test al, al 10667 0000BF1C 8936[E001] <1> mov word [cmdline_buffer.position], si 10668 0000BF20 5E <1> pop si 10669 0000BF21 7521 <1> jnz .return 10670 0000BF23 8026[A500]FE <1> clropt [internalflags3], dif3_input_cmdline 10671 0000BF28 E9F6FE <1> jmp getc 10672 <1> 10673 <1> @@: 10674 0000BF2B B408 <1> mov ah, 8 10675 <1> doscall ; wait for a key 2037 0000BF2D E8379E <2> call _doscall 10676 <1> 10677 <1> getc_dos_internal_get_extended: 10678 <1> ; FreeDOS kernel 2036 returns with ax=4C00h upon Control C. 10679 <1> ; This is due to setting ax internally to terminate the 10680 <1> ; process, paired with the termination service just 10681 <1> ; returning for self-owned processes. This was eventually 10682 <1> ; fixed in https://sourceforge.net/p/freedos/svn/1469/ 10683 <1> ; This is a work around to restart our command line then. 10684 <1> ; Usually ah stays 08h when this call returns. 10685 <1> ; (06h if calling from getc_if_any to here.) 10686 0000BF30 80FC4C <1> cmp ah, 4Ch 10687 0000BF33 7410 <1> je .freedos_ctrlc_workaround 10688 0000BF35 B400 <1> mov ah, 0 ; assume it is ASCII 10689 0000BF37 08C0 <1> or al, al 10690 0000BF39 7509 <1> jne .return ; ASCII, return with ah zero --> 10691 0000BF3B B408 <1> mov ah, 8 10692 <1> doscall ; scancode of non-ASCII key to al 2037 0000BF3D E8279E <2> call _doscall 10693 0000BF40 86C4 <1> xchg al, ah ; to ah 10694 0000BF42 B000 <1> mov al, 0 ; return zero for non-ASCII key 10695 <1> .return: 10696 0000BF44 C3 <1> retn 10697 <1> 10698 <1> .freedos_ctrlc_workaround: 10699 0000BF45 BA[215D] <1> mov dx, msg.freedos_ctrlc_workaround 10700 0000BF48 E871FE <1> call putsz 10701 0000BF4B E937FC <1> jmp puts.ctrlc ; use common handler 10702 <1> 10703 <1> 10704 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT || 1 10705 <1> ; INP: [input_file_handles], dif2_input_file 10706 <1> ; OUT: most recent file closed, flag cleared if no longer file 10707 <1> ; CHG: di, bx, ax 10708 <1> yy_close_file: 10709 0000BF4E F606[A700]01 <1> testopt [internalflags3], dif3_input_re 10710 0000BF53 740B <1> jz @F 10711 0000BF55 8026[A700]FE <1> clropt [internalflags3], dif3_input_re 10712 0000BF5A 800E[A700]02 <1> setopt [internalflags3], dif3_input_re_closed 10713 0000BF5F C3 <1> retn 10714 <1> 10715 <1> @@: 10716 <1> %if _INPUT_FILE_BOOT 10717 0000BF60 F606[A300]02 <1> testopt [internalflags2], dif2_input_file_boot 10718 0000BF65 7406 <1> jz @F 10719 0000BF67 E8DE0D <1> call yy_boot_clear_remember_seek 10720 0000BF6A E9ACBE <1> jmp yy_boot_close_file 10721 <1> 10722 <1> @@: 10723 <1> %endif 10724 <1> %if _INPUT_FILE_HANDLES 10725 0000BF6D F606[A200]10 <1> testopt [internalflags2], dif2_input_file 10726 0000BF72 7455 <1> jz .notfile 10727 0000BF74 8B3E[800A] <1> mov di, word [input_file_handles.active] 10728 0000BF78 57 <1> push di 10729 0000BF79 D1E7 <1> shl di, 1 10730 0000BF7B D1E7 <1> shl di, 1 10731 0000BF7D D1E7 <1> shl di, 1 10732 <1> %if INPUTFILEHANDLE_size != 8 10733 <1> %error Unexpected structure size 10734 <1> %endif 10735 0000BF7F 8B9D[000A] <1> mov bx, word [input_file_handles + di + ifhHandle] 10736 0000BF83 E88A0D <1> call yy_clear_remember_seek 10737 <1> 10738 0000BF86 F685[030A]01 <1> testopt [input_file_handles + di + ifhFlags], ifhfIsDup 10739 0000BF8B 7416 <1> jz @F 10740 <1> 10741 0000BF8D 51 <1> push cx 10742 0000BF8E 52 <1> push dx 10743 <1> 10744 0000BF8F 8B9D[F809] <1> mov bx, word [input_file_handles + di - INPUTFILEHANDLE_size + ifhHandle] 10745 0000BF93 8B95[040A] <1> mov dx, word [input_file_handles + di + ifhParentSeek] 10746 0000BF97 8B8D[060A] <1> mov cx, word [input_file_handles + di + ifhParentSeek + 2] 10747 0000BF9B B80042 <1> mov ax, 4200h ; seek from start 10748 0000BF9E E8F90C <1> call handle_seek_or_remember 10749 <1> 10750 0000BFA1 5A <1> pop dx 10751 0000BFA2 59 <1> pop cx 10752 <1> 10753 <1> @@: 10754 <1> 10755 0000BFA3 E804E7 <1> call InDos 10756 0000BFA6 7406 <1> jz .closefile 10757 <1> 10758 0000BFA8 FF06[820A] <1> inc word [input_file_handles.to_close] 10759 0000BFAC EB06 <1> jmp @F 10760 <1> 10761 <1> .closefile: 10762 0000BFAE B80100 <1> mov ax, 1 10763 0000BFB1 E82C00 <1> call yy_close_file_handles 10764 <1> 10765 <1> @@: 10766 0000BFB4 5F <1> pop di 10767 0000BFB5 4F <1> dec di 10768 0000BFB6 790C <1> jns .next 10769 0000BFB8 8026[A200]EF <1> clropt [internalflags2], dif2_input_file 10770 0000BFBD 800E[A200]20 <1> setopt [internalflags2], dif2_closed_input_file 10771 0000BFC2 EB04 <1> jmp .done 10772 <1> .next: 10773 0000BFC4 893E[800A] <1> mov word [input_file_handles.active], di 10774 <1> .done: 10775 0000BFC8 C3 <1> retn 10776 <1> 10777 <1> .notfile: 10778 0000BFC9 F606[A500]01 <1> testopt [internalflags3], dif3_input_cmdline 10779 0000BFCE 740B <1> jz @F 10780 0000BFD0 8026[A500]FE <1> clropt [internalflags3], dif3_input_cmdline 10781 0000BFD5 800E[A500]02 <1> setopt [internalflags3], dif3_input_cmdline_closed 10782 0000BFDA C3 <1> retn 10783 <1> 10784 <1> @@: 10785 0000BFDB 31F6 <1> xor si, si 10786 0000BFDD E9FEE4 <1> jmp error 10787 <1> 10788 <1> 10789 <1> ; INP: word [input_file_handles.to_close] = how many 10790 <1> ; ax = additionally how many (0 or 1) 10791 <1> ; input_file_handles + di -> first to close 10792 <1> ; OUT: word [input_file_handles.to_close] = 0 10793 <1> ; closed handle fields = -1 10794 <1> ; CHG: ax, bx, di 10795 <1> ; STT: DOS must be accessible 10796 <1> yy_close_file_handles: 10797 0000BFE0 51 <1> push cx 10798 0000BFE1 31C9 <1> xor cx, cx 10799 0000BFE3 870E[820A] <1> xchg cx, word [input_file_handles.to_close] 10800 0000BFE7 01C1 <1> add cx, ax 10801 0000BFE9 7411 <1> jz @FF 10802 <1> @@: 10803 0000BFEB BBFFFF <1> mov bx, -1 10804 0000BFEE 879D[000A] <1> xchg bx, word [input_file_handles + di + ifhHandle] 10805 0000BFF2 B43E <1> mov ah, 3Eh 10806 <1> doscall 2037 0000BFF4 E8709D <2> call _doscall 10807 0000BFF7 83C708 <1> add di, INPUTFILEHANDLE_size 10808 0000BFFA E2EF <1> loop @B 10809 <1> @@: 10810 0000BFFC 59 <1> pop cx 10811 0000BFFD C3 <1> retn 10812 <1> 10813 <1> 10814 <1> ; INP: - 10815 <1> ; OUT: di = active handle offset 10816 <1> ; bx = active handle 10817 <1> ; CHG: - 10818 <1> yy_get_handle: 10819 0000BFFE 8B3E[800A] <1> mov di, word [input_file_handles.active] 10820 0000C002 D1E7 <1> shl di, 1 10821 0000C004 D1E7 <1> shl di, 1 10822 0000C006 D1E7 <1> shl di, 1 10823 <1> %if INPUTFILEHANDLE_size != 8 10824 <1> %error Unexpected structure size 10825 <1> %endif 10826 0000C008 8B9D[000A] <1> mov bx, word [input_file_handles + di + ifhHandle] 10827 <1> %endif 10828 0000C00C C3 <1> retn 10829 <1> %endif 10830 <1> 10831 <1> 10832 <1> ; INP: - 10833 <1> ; OUT: NZ if received any, 10834 <1> ; al = character 10835 <1> ; ah = scan code or zero 10836 <1> ; ZR if none received 10837 <1> ; CHG: ax 10838 <1> ; STT: ds = ss = debugger segment/selector 10839 <1> getc_if_any: 10840 0000C00D F606[A400]20 <1> testopt [internalflags3], dif3_input_serial_override 10841 0000C012 755B <1> jnz .serial 10842 0000C014 F606[A400]10 <1> testopt [internalflags3], dif3_input_terminal_override 10843 0000C019 754D <1> jnz .terminal 10844 <1> 10845 0000C01B F606[A700]01 <1> testopt [internalflags3], dif3_input_re 10846 0000C020 741D <1> jz @F 10847 0000C022 56 <1> push si 10848 0000C023 8B36[E409] <1> mov si, word [re_buffer.position] 10849 0000C027 31C0 <1> xor ax, ax 10850 0000C029 AC <1> lodsb 10851 0000C02A 84C0 <1> test al, al 10852 0000C02C 8936[E409] <1> mov word [re_buffer.position], si 10853 0000C030 5E <1> pop si 10854 0000C031 7403E9B000 <1> jnz .return 10855 0000C036 FF0E[E409] <1> dec word [re_buffer.position] 10856 0000C03A 38C0 <1> cmp al, al ; ZR 10857 0000C03C E9A700 <1> jmp .return 10858 <1> 10859 <1> @@: 10860 <1> %if _INPUT_FILE_BOOT 10861 0000C03F F606[A300]02 <1> testopt [internalflags2], dif2_input_file_boot 10862 0000C044 7552 <1> jnz .file 10863 <1> %endif 10864 <1> 10865 0000C046 F606[A500]01 <1> testopt [internalflags3], dif3_input_cmdline 10866 0000C04B 741B <1> jz @F 10867 0000C04D 56 <1> push si 10868 0000C04E 8B36[E001] <1> mov si, word [cmdline_buffer.position] 10869 0000C052 31C0 <1> xor ax, ax 10870 0000C054 AC <1> lodsb 10871 0000C055 84C0 <1> test al, al 10872 0000C057 8936[E001] <1> mov word [cmdline_buffer.position], si 10873 0000C05B 5E <1> pop si 10874 0000C05C 7403E98500 <1> jnz .return 10875 0000C061 8026[A500]FE <1> clropt [internalflags3], dif3_input_cmdline 10876 0000C066 EBA5 <1> jmp getc_if_any 10877 <1> 10878 <1> @@: 10879 <1> .terminal: 10880 0000C068 F606[7D00]40 <1> testopt [options], enable_serial 10881 0000C06D 7408 <1> jz @F ; do BIOS keyboard or DOS getc --> 10882 <1> 10883 <1> .serial: 10884 0000C06F E8250E <1> call serial_receive_char ; do serial getc (check rx buffer) 10885 0000C072 7472 <1> jz .return ; no data, go and idle --> 10886 0000C074 B400 <1> mov ah, 0 10887 0000C076 C3 <1> retn 10888 <1> 10889 <1> @@: 10890 0000C077 E830E6 <1> call InDos 10891 0000C07A 755C <1> jnz .bios 10892 <1> 10893 0000C07C F606[A400]10 <1> testopt [internalflags3], dif3_input_terminal_override 10894 0000C081 7547 <1> jnz .dos_terminal 10895 <1> 10896 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 10897 <1> %if _INPUT_FILE_BOOT 10898 0000C083 F606[A300]02 <1> testopt [internalflags2], dif2_input_file_boot 10899 0000C088 750E <1> jnz .file 10900 <1> %endif 10901 <1> %if _INPUT_FILE_HANDLES 10902 0000C08A E81DE6 <1> call InDos 10903 0000C08D 753B <1> jnz .file_not 10904 0000C08F F606[A200]10 <1> testopt [internalflags2], dif2_input_file 10905 0000C094 7502 <1> jnz .file 10906 <1> %endif 10907 0000C096 EB32 <1> jmp .file_not 10908 <1> 10909 <1> .file: 10910 0000C098 57 <1> push di 10911 0000C099 53 <1> push bx 10912 0000C09A 51 <1> push cx 10913 0000C09B 52 <1> push dx 10914 0000C09C 31C0 <1> xor ax, ax 10915 0000C09E 50 <1> push ax 10916 <1> 10917 0000C09F 89E2 <1> mov dx, sp ; ds:dx -> al byte on stack 10918 0000C0A1 B90100 <1> mov cx, 1 ; buffer length = 1 10919 <1> %if _INPUT_FILE_BOOT 10920 <1> %if _INPUT_FILE_HANDLES 10921 0000C0A4 F606[A300]02 <1> testopt [internalflags2], dif2_input_file_boot 10922 0000C0A9 7408 <1> jz @F 10923 <1> %endif 10924 0000C0AB E8B50C <1> call yy_boot_remember_seek 10925 0000C0AE E8B1BD <1> call yy_boot_read 10926 0000C0B1 EB0B <1> jmp @FF 10927 <1> @@: 10928 <1> %endif 10929 <1> %if _INPUT_FILE_HANDLES 10930 0000C0B3 B43F <1> mov ah, 3Fh 10931 0000C0B5 E846FF <1> call yy_get_handle 10932 0000C0B8 E8710C <1> call yy_remember_seek 10933 <1> doscall ; DOS read file (depends on ds = ss) 2037 0000C0BB E8A99C <2> call _doscall 10934 <1> %endif 10935 <1> @@: 10936 0000C0BE 7302 <1> jnc @F 10937 0000C0C0 31C0 <1> xor ax, ax 10938 <1> @@: 10939 0000C0C2 85C0 <1> test ax, ax 10940 0000C0C4 58 <1> pop ax 10941 0000C0C5 5A <1> pop dx 10942 0000C0C6 59 <1> pop cx 10943 0000C0C7 5B <1> pop bx 10944 0000C0C8 5F <1> pop di 10945 0000C0C9 C3 <1> retn ; ZR if no character read 10946 <1> 10947 <1> .file_not: 10948 <1> %endif 10949 <1> .dos_terminal: 10950 <1> %if 0 10951 <1> push dx 10952 <1> mov ah, 06h 10953 <1> mov dl, -1 10954 <1> doscall 10955 <1> jz .return_dx ; none available 10956 <1> ; bugfix: the 06h call is a *destructive* read. 10957 <1> ; so do not call getc again, just handle the 10958 <1> ; possible second byte returned. 10959 <1> call getc_dos_internal_get_extended 10960 <1> pop dx 10961 <1> jmp .return_NZ 10962 <1> .return_dx: 10963 <1> pop dx 10964 <1> retn 10965 <1> %else 10966 0000C0CA B40B <1> mov ah, 0Bh 10967 <1> doscall 2037 0000C0CC E8989C <2> call _doscall 10968 0000C0CF 84C0 <1> test al, al 10969 0000C0D1 7413 <1> jz .return 10970 0000C0D3 E8C1FD <1> call getc_dos_internal 10971 0000C0D6 EB0A <1> jmp .return_NZ 10972 <1> %endif 10973 <1> 10974 <1> .bios: 10975 0000C0D8 B401 <1> mov ah, 01h 10976 0000C0DA CD16 <1> int 16h ; key available ? 10977 0000C0DC 7408 <1> jz .return 10978 0000C0DE 31C0 <1> xor ax, ax 10979 0000C0E0 CD16 <1> int 16h 10980 <1> .return_NZ: 10981 0000C0E2 50 <1> push ax 10982 0000C0E3 0C01 <1> or al, 1 ; (NZ) 10983 0000C0E5 58 <1> pop ax 10984 <1> .return: 10985 0000C0E6 C3 <1> retn 10986 <1> 10987 <1> 10988 <1> ; INP: - 10989 <1> ; OUT: - 10990 <1> ; CHG: ax 10991 <1> ; STT: ds = ss = debugger segment/selector 10992 <1> ; 10993 <1> ; Idle system, using 2F.1680 (in given mode), or 2F.1680 10994 <1> ; (calling down to 86 Mode), or sti \ hlt. 10995 <1> idle: 10996 <1> %if _BOOTLDR 10997 0000C0E7 F606[9D00]40 <1> testopt [internalflags], nodosloaded 10998 0000C0EC 7568 <1> jnz .hlt ; can't call 2F --> 10999 <1> %endif 11000 0000C0EE F606[8700]02 <1> testopt [options3], opt3_no_idle_2F 11001 0000C0F3 7561 <1> jnz .hlt 11002 <1> %if _GUARD_86M_INT2F 11003 <1> %if _PM 11004 0000C0F5 E8D1D0 <1> call ispm 11005 0000C0F8 7416 <1> jz @FF ; --> (NZ) 11006 <1> %endif 11007 0000C0FA 06 <1> push es 11008 0000C0FB 31C0 <1> xor ax, ax 11009 0000C0FD 8EC0 <1> mov es, ax ; (only used in 86 Mode) 11010 0000C0FF 26A1BC00 <1> mov ax, [es:2Fh * 4] 11011 0000C103 83F8FF <1> cmp ax, -1 11012 0000C106 7405 <1> je @F ; --> (ZR) 11013 0000C108 260B06BE00 <1> or ax, [es:2Fh * 4 + 2] 11014 <1> @@: 11015 0000C10D 07 <1> pop es 11016 0000C10E 7409 <1> jz @FF 11017 <1> @@: 11018 <1> %endif 11019 0000C110 B88016 <1> mov ax, 1680h 11020 0000C113 CD2F <1> int 2Fh ; release timeslice in multitasker 11021 0000C115 84C0 <1> test al, al 11022 0000C117 7450 <1> jz .return ; done idling --> 11023 <1> @@: 11024 <1> %if _PM 11025 0000C119 E8ADD0 <1> call ispm 11026 0000C11C 7538 <1> jnz .hlt 11027 <1> 11028 0000C11E 53 <1> push bx 11029 0000C11F 51 <1> push cx 11030 0000C120 06 <1> push es 11031 0000C121 66 <1> _386_PM_o32 ; push edi 11032 0000C122 57 <1> push di 11033 0000C123 6631FF <1> _386 xor edi, edi ; clear EDIH 11034 0000C126 31C9 <1> xor cx, cx ; (copy no words from stack) 11035 <1> 11036 <1> [cpu 286] 11037 0000C128 51 <1> push cx ; ss 11038 0000C129 51 <1> push cx ; sp (0:0 = host should allocate a stack) 11039 0000C12A 83EC0C <1> sub sp, byte 12 ; cs:ip (ignored), segments (uninitialized) 11040 0000C12D 9C <1> pushf 11041 0000C12E 51 <1> push cx ; EAXH (uninitialized) 11042 0000C12F 688016 <1> push 1680h ; AX 11043 0000C132 83EC0C <1> sub sp, byte 12 ; ecx, edx, ebx (uninitialized) 11044 0000C135 51 <1> push cx 11045 0000C136 51 <1> push cx ; reserved (zero) 11046 0000C137 83EC0C <1> sub sp, byte 12 ; ebp, esi, edi (uninitialized) 11047 0000C13A 16 <1> push ss 11048 0000C13B 07 <1> pop es 11049 0000C13C 89E7 <1> mov di, sp ; es:(e)di -> 86 Mode call structure 11050 0000C13E B80003 <1> mov ax, 0300h 11051 0000C141 BB2F00 <1> mov bx, 2Fh ; bl = interrupt, bh = reserved (zero) 11052 0000C144 CD31 <1> int 31h ; call real mode 2F.1680 11053 <1> __CPU__ 11054 <1> 11055 0000C146 83C41C <1> add sp, byte 28 ; discard RM call structure 11056 0000C149 58 <1> pop ax ; get AX 11057 0000C14A 83C414 <1> add sp, byte 20 ; discard RM call structure 11058 <1> 11059 0000C14D 66 <1> _386_PM_o32 ; pop edi 11060 0000C14E 5F <1> pop di 11061 0000C14F 07 <1> pop es 11062 0000C150 59 <1> pop cx 11063 0000C151 5B <1> pop bx 11064 <1> 11065 0000C152 84C0 <1> test al, al 11066 0000C154 7413 <1> jz .return ; done idling --> 11067 <1> %endif 11068 <1> .hlt: 11069 0000C156 F606[7D00]02 <1> testopt [options], nohlt 11070 0000C15B 750C <1> jnz .return 11071 <1> %if _PM 11072 <1> %if (protectedmode|dpminohlt)&~0FF00h 11073 <1> %error Option bits re-ordered, adjust code here 11074 <1> %endif 11075 0000C15D A0[9D00] <1> mov al, byte [internalflags+1] 11076 0000C160 240C <1> and al, (protectedmode|dpminohlt)>>8 11077 0000C162 340C <1> xor al, (protectedmode|dpminohlt)>>8 11078 0000C164 7403 <1> jz .return ; DPMI host throws GPF when we execute hlt --> 11079 <1> %endif 11080 0000C166 FB <1> sti 11081 0000C167 F4 <1> hlt ; else idle by hlt 11082 0000C168 90 <1> nop 11083 <1> .return: 11084 0000C169 C3 <1> retn 11085 <1> 11086 <1> 11087 <1> ; GETLINE - Print a prompt (address in DX, length in CX) and read a line 11088 <1> ; of input. 11089 <1> ; GETLINE0 - Same as above, but use the output line (so far), plus two 11090 <1> ; spaces and a colon, as a prompt. 11091 <1> ; GETLINE00 - Same as above, but use the output line (so far) as a prompt. 11092 <1> ; Entry CX Length of prompt (getline only) 11093 <1> ; DX Address of prompt string (getline only) 11094 <1> ; 11095 <1> ; DI Address + 1 of last character in prompt (getline0 and 11096 <1> ; getline00 only) 11097 <1> ; 11098 <1> ; Exit AL First nonwhite character in input line 11099 <1> ; SI Address of the next character after that 11100 <1> ; Uses AH,BX,CX,DX,DI 11101 <1> 11102 <1> getline0: 11103 0000C16A B82020 <1> mov ax, 32<<8|32 ; add two spaces and a colon 11104 0000C16D AB <1> stosw 11105 0000C16E B03A <1> mov al, ':' 11106 0000C170 AA <1> stosb 11107 <1> getline00: 11108 0000C171 BA[0E08] <1> mov dx, line_out 11109 0000C174 89F9 <1> mov cx, di 11110 0000C176 29D1 <1> sub cx, dx 11111 <1> 11112 <1> getline: ; note: this entry is no longer used 11113 0000C178 8026[A500]77 <1> clropt [internalflags3], dif3_quiet_input_single | dif3_return_eof 11114 <1> .use_dif3_flags: 11115 <1> %if _DEBUG 11116 <1> d0bp 11117 <1> %endif 11118 0000C17D 890E[EA0A] <1> mov word [promptlen], cx ; save length of prompt 11119 0000C181 C606[930A]00 <1> mov byte [linecounter], 0 ; reset counter 11120 0000C186 8326[0E0C]00 <1> and word [terminator_in_line_in.offset], 0 11121 <1> ; reset this when reading new line 11122 0000C18B 8026[9E00]EF <1> clropt [internalflags], promptwaiting 11123 <1> 11124 0000C190 E87202 <1> call getline_is_input_file? 11125 0000C193 7303E9FF00 <1> jc getline_nofile 11126 <1> 11127 <1> getline_file: 11128 0000C198 F606[A700]01 <1> testopt [internalflags3], dif3_input_re 11129 0000C19D 7549 <1> jnz .notquiet 11130 <1> 11131 <1> %if _INPUT_FILE_BOOT 11132 0000C19F F606[A300]02 <1> testopt [internalflags2], dif2_input_file_boot 11133 0000C1A4 7412 <1> jz @F 11134 0000C1A6 B8A000 <1> mov ax, LOAD_INPUT_FILE_SIZE 11135 0000C1A9 52 <1> push dx 11136 0000C1AA F726[B08F] <1> mul word [load_input_file.active] 11137 0000C1AE 5A <1> pop dx 11138 0000C1AF 89C7 <1> mov di, ax 11139 0000C1B1 F685[578D]40 <1> testopt [load_input_file + di - LOADDATA3 + ldFATType], ifhfQuietInput 11140 0000C1B6 EB29 <1> jmp .quiet_if_nz 11141 <1> 11142 <1> @@: 11143 <1> %endif 11144 <1> %if _INPUT_FILE_HANDLES 11145 0000C1B8 E8EFE4 <1> call InDos 11146 0000C1BB 7518 <1> jnz @F 11147 0000C1BD F606[A200]10 <1> testopt [internalflags2], dif2_input_file 11148 0000C1C2 7411 <1> jz @F 11149 0000C1C4 8B3E[800A] <1> mov di, word [input_file_handles.active] 11150 0000C1C8 D1E7 <1> shl di, 1 11151 0000C1CA D1E7 <1> shl di, 1 11152 0000C1CC D1E7 <1> shl di, 1 ; to qword array index 11153 <1> %if INPUTFILEHANDLE_size != 8 11154 <1> %error Unexpected structure size 11155 <1> %endif 11156 0000C1CE F685[030A]40 <1> testopt [input_file_handles + di + ifhFlags], ifhfQuietInput 11157 0000C1D3 EB0C <1> jmp .quiet_if_nz 11158 <1> 11159 <1> @@: 11160 <1> %endif 11161 0000C1D5 F606[A500]01 <1> testopt [internalflags3], dif3_input_cmdline 11162 0000C1DA 740C <1> jz @F 11163 0000C1DC F606[7F00]40 <1> testopt [options], opt_cmdline_quiet_input 11164 <1> ; jmp .quiet_if_nz 11165 <1> 11166 <1> .quiet_if_nz: 11167 0000C1E1 7405 <1> jz @F 11168 <1> .quiet: 11169 0000C1E3 800E[A500]08 <1> setopt [internalflags3], dif3_quiet_input_single 11170 <1> .notquiet: 11171 <1> @@: 11172 <1> 11173 0000C1E8 800E[A200]40 <1> setopt [internalflags2], dif2_did_getline_file 11174 <1> 11175 <1> 11176 <1> ; This part reads the input line from a file (in the case of 11177 <1> ; `debug < file'). It is necessary to do this by hand because DOS 11178 <1> ; function 0Ah does not handle EOF correctly otherwise. This is 11179 <1> ; especially important for DEBUG because it traps Control-C. 11180 0000C1ED C706[DA0B][E003] <1> mov word [lastcmd], dmycmd ; disable auto-repeat while reading from a file 11181 <1> 11182 <1> %if _NEWFULLHANDLING 11183 0000C1F3 BF[0300] <1> mov di, line_in+3 ; read max 11184 <1> %else 11185 <1> mov di, line_in+2 11186 <1> %endif 11187 0000C1F6 8B36[EC0A] <1> mov si, word [bufnext] 11188 0000C1FA 3B36[EE0A] <1> cmp si, word [bufend] 11189 0000C1FE 7216 <1> jb .char_buffered ; if there's a character already 11190 0000C200 E80D07 <1> call fillbuf 11191 0000C203 7311 <1> jnc .fillbuf_had_data 11192 0000C205 F606[A500]80 <1> testopt [internalflags3], dif3_return_eof 11193 0000C20A 7402 <1> jz @F 11194 0000C20C F9 <1> stc 11195 0000C20D C3 <1> retn 11196 <1> @@: 11197 0000C20E E82D02 <1> call getline_close_file 11198 0000C211 7403E962FF <1> jnz getline 11199 <1> 11200 <1> .fillbuf_had_data: 11201 <1> .char_buffered: 11202 <1> %if _NEWFULLHANDLING 11203 0000C216 4F <1> dec di 11204 <1> %endif 11205 <1> 11206 <1> ; Discard an LF if the last character read was CR. 11207 0000C217 803E[E70A]0D <1> cmp byte [notatty], 13 ; last parsed character was CR ? 11208 0000C21C 750A <1> jne .no_lf_skip ; no, nothing more to do --> 11209 0000C21E 803C0A <1> cmp byte [si], 10 ; first read character is LF ? 11210 0000C221 7505 <1> jne .no_lf_skip ; no --> 11211 0000C223 46 <1> inc si ; skip the LF 11212 0000C224 FE06[E70A] <1> inc byte [notatty] ; avoid repeating this 11213 <1> .no_lf_skip: 11214 <1> 11215 0000C228 3B36[EE0A] <1> cmp si, word [bufend] 11216 0000C22C 740B <1> je @F 11217 0000C22E 803C40 <1> cmp byte [si], '@' ; no display ? 11218 0000C231 7506 <1> jne @F 11219 <1> 11220 0000C233 46 <1> inc si ; increment past @ 11221 0000C234 800E[A500]08 <1> setopt [internalflags3], dif3_quiet_input_single 11222 <1> @@: 11223 0000C239 F606[A500]08 <1> testopt [internalflags3], dif3_quiet_input_single 11224 0000C23E 7503 <1> jnz gl1 11225 <1> 11226 0000C240 E806F8 <1> call puts ; display prompt (having checked it wasn't EOF) 11227 <1> 11228 <1> ; si-> next character in buffer 11229 <1> ; w[bufend]-> behind last valid character of buffer 11230 <1> gl1: 11231 0000C243 8B0E[EE0A] <1> mov cx, word [bufend] 11232 0000C247 29F1 <1> sub cx, si ; cx = number of valid characters in buffer 11233 0000C249 740C <1> jz gl3 ; if none --> 11234 <1> gl2: 11235 0000C24B AC <1> lodsb 11236 0000C24C 3C0D <1> cmp al, 13 ; (exact match for CR) 11237 0000C24E 7410 <1> je gl4 11238 0000C250 3C0A <1> cmp al, 10 11239 0000C252 740C <1> je gl4 ; if EOL --> 11240 0000C254 AA <1> stosb 11241 0000C255 E2F4 <1> loop gl2 ; if more valid characters --> 11242 <1> 11243 <1> ; The buffer is empty. Fill it again. 11244 <1> gl3: 11245 <1> %if _NEWFULLHANDLING 11246 0000C257 47 <1> inc di 11247 <1> %endif 11248 0000C258 E8B506 <1> call fillbuf 11249 <1> %if _NEWFULLHANDLING 11250 0000C25B 4F <1> dec di 11251 <1> %endif 11252 0000C25C 73E5 <1> jnc gl1 ; if we have more characters --> 11253 0000C25E B00A <1> mov al, 10 ; make jump after gl4 always branch 11254 <1> %ifn _NEWFULLHANDLING ; should now always have at least one byte free 11255 <1> cmp di, line_in+LINE_IN_LEN 11256 <1> jb @F 11257 <1> dec si 11258 <1> dec di 11259 <1> @@: 11260 <1> %endif 11261 <1> 11262 <1> gl4: 11263 0000C260 3C0D <1> cmp al, 13 ; terminator was CR ? 11264 0000C262 7508 <1> jne @F ; no --> 11265 0000C264 E306 <1> jcxz @F ; if no other byte buffered --> 11266 0000C266 803C0A <1> cmp byte [si], 10 ; next byte is an LF ? 11267 0000C269 7501 <1> jne @F ; no --> 11268 0000C26B AC <1> lodsb ; increment si past the LF and set al = 10 11269 <1> ; dec cx ; (not used in subsequent code) 11270 <1> @@: 11271 0000C26C 8936[EC0A] <1> mov word [bufnext], si 11272 0000C270 A2[E70A] <1> mov byte [notatty], al ; store 10 or 13 (depending on the kind of EOL) 11273 <1> 11274 0000C273 800E[A500]04 <1> setopt [internalflags3], dif3_at_line_end 11275 0000C278 E81906 <1> call getline_reset_notatty 11276 <1> 11277 0000C27B 89F9 <1> mov cx, di ; (counter is for input without CR) 11278 0000C27D B00D <1> mov al, 13 11279 0000C27F AA <1> stosb ; terminate line for our usage 11280 0000C280 BA[0200] <1> mov dx, line_in + 2 11281 0000C283 29D1 <1> sub cx, dx ; = length of input (no CR) 11282 0000C285 F606[A500]08 <1> testopt [internalflags3], dif3_quiet_input_single 11283 0000C28A 7503 <1> jnz @F 11284 0000C28C E8BAF7 <1> call puts ; print out the received line 11285 <1> @@: 11286 0000C28F 49 <1> dec cx 11287 0000C290 880E[0100] <1> mov byte [line_in+1], cl 11288 0000C294 E92201 <1> jmp getline_eol ; done 11289 <1> 11290 <1> getline_nofile: 11291 0000C297 E87A09 <1> call yy_reset_buf 11292 0000C29A 51 <1> push cx 11293 0000C29B 52 <1> push dx 11294 0000C29C E8AAF7 <1> call puts ; display prompt 11295 0000C29F 5A <1> pop dx 11296 0000C2A0 59 <1> pop cx 11297 0000C2A1 F606[7D00]40 <1> testopt [options], enable_serial 11298 0000C2A6 7516 <1> jnz .rawinput_NZ 11299 0000C2A8 E8FFE3 <1> call InDos 11300 0000C2AB 7511 <1> jnz .rawinput_NZ 11301 <1> %if _PM 11302 0000C2AD E819CF <1> call ispm 11303 0000C2B0 7507 <1> jnz @F ; if 86 Mode --> 11304 0000C2B2 F606[8100]08 <1> testopt [options2], opt2_rawinput_dpmi 11305 0000C2B7 7505 <1> jnz .rawinput_NZ 11306 <1> @@: 11307 <1> %endif 11308 0000C2B9 F606[7D00]08 <1> testopt [options], opt_userawinput 11309 <1> .rawinput_NZ: 11310 0000C2BE 7403E9E001 <1> jnz rawinput 11311 <1> 11312 <1> %if _PM 11313 0000C2C3 E803CF <1> call ispm 11314 0000C2C6 7537 <1> jnz @F ; if 86 Mode --> 11315 0000C2C8 F606[9E00]04 <1> testopt [internalflags], canswitchmode 11316 0000C2CD 7430 <1> jz @F ; can't switch to 86M --> 11317 0000C2CF 800E[9E00]08 <1> setopt [internalflags], modeswitched 11318 <1> ; set flag for resetmode 11319 0000C2D4 B000 <1> mov al, 0 11320 0000C2D6 E87975 <1> call sr_state ; save state 11321 0000C2D9 E84175 <1> call switchmode ; switch to 86M 11322 0000C2DC E84981 <1> call handle_mode_changed ; ! called with flag set 11323 <1> 11324 0000C2DF BE[B095] <1> mov si, getline_extra_int23 11325 0000C2E2 B023 <1> mov al, 23h 11326 0000C2E4 E82D0E <1> call install_86m_interrupt_handler 11327 <1> ; override DPMI host's int 23h vector 11328 0000C2E7 BA[C495] <1> mov dx, getline_extra_int22 11329 0000C2EA B82225 <1> mov ax, 2522h 11330 0000C2ED CD21 <1> int 21h 11331 0000C2EF 89160A00 <1> mov word [TPIV], dx ; override our PRI 11332 <1> 11333 0000C2F3 BA[0000] <1> mov dx, line_in 11334 0000C2F6 B40A <1> mov ah, 0Ah 11335 0000C2F8 CD21 <1> int 21h ; call DOS 11336 <1> 11337 0000C2FA E8D300 <1> call getline_extra_uninstall 11338 <1> ; undo patches 11339 0000C2FD EB08 <1> jmp getline_eol_enter_history 11340 <1> ; go to common trail 11341 <1> 11342 <1> @@: 11343 <1> %endif 11344 0000C2FF BA[0000] <1> mov dx, line_in 11345 0000C302 B40A <1> mov ah, 0Ah ; buffered keyboard input 11346 <1> doscall 2037 0000C304 E8609A <2> call _doscall 11347 <1> 11348 <1> getline_eol_enter_history: 11349 <1> %if _HISTORY 11350 <1> .loop: 11351 0000C307 BE[0200] <1> mov si, line_in + 2 11352 0000C30A 31C9 <1> xor cx, cx 11353 0000C30C 0A4CFF <1> or cl, byte [si - 1] 11354 0000C30F 7503E9A300 <1> jz .dontenter 11355 <1> gethistorysegment es 298 0000C314 368E06[F60A] <2> mov %1, word [ss:history.segorsel] 11356 <1> gethistoryoffset bx 301 0000C319 BB0000 <2> mov %1, 0 11357 0000C31C A1[FE0A] <1> mov ax, word [history.last] 11358 0000C31F 3B06[FC0A] <1> cmp ax, word [history.first] 11359 0000C323 7419 <1> je @F 11360 0000C325 89C7 <1> mov di, ax 11361 0000C327 268B15 <1> mov dx, [es:di] 11362 0000C32A 268B7D02 <1> mov di, [es:di + 2] 11363 0000C32E 29FA <1> sub dx, di 11364 0000C330 39D1 <1> cmp cx, dx 11365 0000C332 750A <1> jne @F 11366 0000C334 8D39 <1> lea di, [di + bx] 11367 0000C336 51 <1> push cx 11368 0000C337 56 <1> push si 11369 0000C338 F3A6 <1> repe cmpsb 11370 0000C33A 5E <1> pop si 11371 0000C33B 59 <1> pop cx 11372 0000C33C 7479 <1> je .dontenter 11373 <1> @@: 11374 0000C33E 89C7 <1> mov di, ax 11375 0000C340 268B15 <1> mov dx, [es:di] 11376 0000C343 01DA <1> add dx, bx ; -> free space 11377 0000C345 F7DA <1> neg dx ; - free space start 11378 0000C347 7502 <1> jnz @F 11379 0000C349 4A <1> dec dx 11380 0000C34A 47 <1> inc di 11381 <1> @@: 11382 0000C34B 01FA <1> add dx, di ; free space end - free space start 11383 0000C34D 730C <1> jnc .delete 11384 0000C34F 740A <1> je .delete 11385 0000C351 4A <1> dec dx 11386 0000C352 7407 <1> jz .delete 11387 0000C354 4A <1> dec dx 11388 0000C355 7404 <1> jz .delete 11389 0000C357 39D1 <1> cmp cx, dx 11390 0000C359 7646 <1> jbe .insert 11391 <1> .delete: 11392 0000C35B 3B06[FC0A] <1> cmp ax, word [history.first] 11393 0000C35F 7508 <1> jne @F 11394 <1> 11395 <1> .error: 11396 0000C361 BA[6567] <1> mov dx, msg.history_internal_error 11397 0000C364 E855FA <1> call putsz 11398 0000C367 EB4E <1> jmp .dontenter 11399 <1> 11400 <1> @@: 11401 0000C369 89C7 <1> mov di, ax 11402 0000C36B 268B3D <1> mov di, [es:di] ; + bx -> after last 11403 0000C36E 8B36[FC0A] <1> mov si, word [history.first] 11404 0000C372 268B74FE <1> mov si, [es:si - 2] ; + bx -> at second 11405 0000C376 29F7 <1> sub di, si ; = after last - after first 11406 <1> ; = length excluding first 11407 0000C378 89F9 <1> mov cx, di ; length to move 11408 0000C37A 56 <1> push si 11409 0000C37B 01DE <1> add si, bx ; -> after first 11410 0000C37D 89DF <1> mov di, bx ; -> start of buffer 11411 0000C37F 06 <1> push es 11412 0000C380 1F <1> pop ds 11413 0000C381 F3A4 <1> rep movsb ; move stuff 11414 0000C383 59 <1> pop cx ; = how far we moved 11415 0000C384 89C7 <1> mov di, ax 11416 0000C386 8B15 <1> mov dx, word [di] 11417 <1> @@: 11418 0000C388 47 <1> inc di 11419 0000C389 47 <1> inc di 11420 0000C38A 363B3E[FC0A] <1> cmp di, word [ss:history.first] 11421 0000C38F 7406 <1> je @F 11422 0000C391 29CA <1> sub dx, cx 11423 0000C393 8715 <1> xchg word [di], dx 11424 0000C395 EBF1 <1> jmp @B 11425 <1> 11426 <1> @@: 11427 0000C397 16 <1> push ss 11428 0000C398 1F <1> pop ds 11429 0000C399 8306[FE0A]02 <1> add word [history.last], 2 11430 0000C39E E966FF <1> jmp .loop 11431 <1> 11432 <1> .insert: 11433 0000C3A1 48 <1> dec ax 11434 0000C3A2 48 <1> dec ax 11435 0000C3A3 A3[FE0A] <1> mov word [history.last], ax 11436 0000C3A6 89C7 <1> mov di, ax 11437 0000C3A8 57 <1> push di 11438 0000C3A9 268B7D02 <1> mov di, word [es:di + 2] 11439 0000C3AD 01DF <1> add di, bx 11440 0000C3AF F3A4 <1> rep movsb 11441 0000C3B1 5E <1> pop si 11442 0000C3B2 29DF <1> sub di, bx 11443 0000C3B4 26893C <1> mov word [es:si], di 11444 <1> 11445 <1> .dontenter: 11446 0000C3B7 16 <1> push ss 11447 0000C3B8 07 <1> pop es 11448 <1> %endif 11449 <1> 11450 <1> getline_eol: 11451 0000C3B9 F606[A500]08 <1> testopt [internalflags3], dif3_quiet_input_single 11452 0000C3BE 750A <1> jnz @F 11453 0000C3C0 B00D <1> mov al, 13 11454 0000C3C2 E81AFA <1> call putc ; fix ZDOS Int21.0A display bug 11455 0000C3C5 B00A <1> mov al, 10 11456 0000C3C7 E815FA <1> call putc 11457 <1> @@: 11458 0000C3CA BE[0200] <1> mov si, line_in+2 11459 0000C3CD E98BF5 <1> jmp skipwhite ; NC 11460 <1> 11461 <1> 11462 <1> %if _PM 11463 <1> getline_extra_uninstall: 11464 0000C3D0 BA[FF80] <1> mov dx, debug22 11465 0000C3D3 B82225 <1> mov ax, 2522h 11466 0000C3D6 CD21 <1> int 21h 11467 0000C3D8 89160A00 <1> mov word [TPIV], dx ; restore default int 22h (PRI) 11468 0000C3DC BE[B095] <1> mov si, getline_extra_int23 11469 0000C3DF B023 <1> mov al, 23h 11470 0000C3E1 BAFFFF <1> mov dx, -1 11471 0000C3E4 E8A70E <1> call UnhookInterruptForce 11472 <1> ; restore DPMI host's int 23h handler 11473 0000C3E7 E98D74 <1> jmp resetmode ; return to PM 11474 <1> 11475 <1> usesection lDEBUG_DATA_ENTRY 11476 <1> 11477 000095AF CBEB10000000004B42- <1> iispentry getline_extra_int23 11477 000095B8 00EBF400 <1> 11478 000095C2 F9 <1> stc 11479 000095C3 CB <1> retf ; indicate to abort syscall and process 11480 <1> 11481 <1> align 2 11482 <1> getline_extra_int22: 11483 000095C4 FA <1> cli 11484 <1> .cleartraceflag: 11485 000095C5 FC <1> cld ; reestablish things 11486 000095C6 8CC8 <1> mov ax, cs 11487 000095C8 8ED8 <1> mov ds, ax 11488 000095CA 8ED0 <1> mov ss, ax 11489 000095CC 8B26[940A] <1> mov sp, word [ savesp ] ; restore stack 11490 000095D0 90 <1> times 1 - (($ - $$) & 1) nop ; align in-code parameter 11491 000095D1 E80BEB <1> call entry_to_code_seg 11492 000095D4 [EAC3] <1> dw .code 11493 <1> 11494 <1> usesection lDEBUG_CODE 11495 <1> 11496 <1> .code: 11497 <1> 11498 0000C3EA 66 <1> _386_o32 ; mov esp 11499 0000C3EB 8B26[940A] <1> mov sp, word [ savesp ] ; restore stack 11500 0000C3EF 83E4FC <1> _386 and sp, ~3 ; align stack 11501 0000C3F2 66 <1> _386_o32 11502 0000C3F3 31C0 <1> xor ax, ax 11503 0000C3F5 66 <1> _386_o32 11504 0000C3F6 50 <1> push ax 11505 0000C3F7 66 <1> _386_o32 11506 0000C3F8 9D <1> popf 11507 0000C3F9 8B26[940A] <1> _386 mov sp, word [ savesp ] ; restore stack 11508 0000C3FD FC <1> cld 11509 0000C3FE FB <1> sti 11510 <1> 11511 0000C3FF E8CEFF <1> call getline_extra_uninstall 11512 <1> ; undo patches and return to PM 11513 0000C402 E9157C <1> jmp handle_ctrl_c ; go to common handler --> 11514 <1> %endif 11515 <1> 11516 <1> 11517 <1> getline_is_input_file?: 11518 0000C405 F606[A400]20 <1> testopt [internalflags3], dif3_input_serial_override 11519 0000C40A 7530 <1> jnz .nofile 11520 0000C40C F606[A700]01 <1> testopt [internalflags3], dif3_input_re 11521 0000C411 7528 <1> jnz .file 11522 0000C413 F606[A500]01 <1> testopt [internalflags3], dif3_input_cmdline 11523 0000C418 7521 <1> jnz .file 11524 <1> %if _INPUT_FILE_BOOT 11525 0000C41A F606[A300]02 <1> testopt [internalflags2], dif2_input_file_boot 11526 0000C41F 751A <1> jnz .file 11527 <1> %endif 11528 0000C421 E886E2 <1> call InDos 11529 0000C424 7516 <1> jnz .nofile ; InDOS, not reading from a file --> 11530 <1> %if _INPUT_FILE_HANDLES 11531 0000C426 F606[A200]10 <1> testopt [internalflags2], dif2_input_file 11532 0000C42B 750E <1> jnz .file 11533 <1> %endif 11534 0000C42D F606[7D00]40 <1> testopt [options], enable_serial 11535 0000C432 7508 <1> jnz .nofile 11536 0000C434 803E[E70A]00 <1> cmp byte [notatty], 0 ; check this weird flag 11537 0000C439 7401 <1> je .nofile ; not reading from a file --> 11538 <1> 11539 <1> .file: 11540 0000C43B A8 <1> db __TEST_IMM8 ; (skip stc, NC) 11541 <1> .nofile: 11542 0000C43C F9 <1> stc 11543 0000C43D C3 <1> retn 11544 <1> 11545 <1> 11546 <1> getline_close_file: 11547 0000C43E 51 <1> push cx 11548 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT || 1 11549 <1> ; EOF reached. if not input file, quit. else, close input file. 11550 0000C43F F606[A700]01 <1> testopt [internalflags3], dif3_input_re 11551 0000C444 7515 <1> jnz .re 11552 <1> %if _INPUT_FILE_HANDLES && _INPUT_FILE_BOOT 11553 0000C446 F706[A200]1002 <1> testopt [internalflags2], dif2_input_file | dif2_input_file_boot, 1 11554 0000C44C 750A <1> jnz @F 11555 <1> %elif _INPUT_FILE_HANDLES 11556 <1> testopt [internalflags2], dif2_input_file 11557 <1> jnz @F 11558 <1> %elif _INPUT_FILE_BOOT 11559 <1> testopt [internalflags2], dif2_input_file_boot 11560 <1> jnz @F 11561 <1> %endif 11562 0000C44E F606[A500]01 <1> testopt [internalflags3], dif3_input_cmdline 11563 0000C453 7503E926D5 <1> jz qq ; if EOF, quit --> 11564 <1> 11565 <1> @@: 11566 0000C458 31C9 <1> xor cx, cx 11567 0000C45A A9 <1> db __TEST_IMM16 11568 <1> .re: 11569 0000C45B B1FF <1> mov cl, -1 11570 <1> 11571 0000C45D 51 <1> push cx 11572 0000C45E E82B00 <1> call .resetstuff 11573 0000C461 59 <1> pop cx 11574 <1> 11575 0000C462 E302 <1> jcxz .notre 11576 0000C464 EB15 <1> jmp @F 11577 <1> 11578 <1> .notre: 11579 0000C466 59 <1> pop cx 11580 0000C467 F606[A500]04 <1> testopt [internalflags3], dif3_at_line_end 11581 0000C46C 750C <1> jnz .return ; (NZ) 11582 <1> 11583 0000C46E B80D0A <1> mov ax, 13 | 10 << 8 ; pretend we read a CR LF sequence 11584 0000C471 AB <1> stosw 11585 0000C472 893E[EE0A] <1> mov word [bufend], di 11586 0000C476 4F <1> dec di 11587 0000C477 4F <1> dec di 11588 0000C478 38C0 <1> cmp al, al ; ZR 11589 <1> .return: 11590 0000C47A C3 <1> retn 11591 <1> 11592 <1> @@: 11593 0000C47B 59 <1> pop cx 11594 0000C47C F606[A500]04 <1> testopt [internalflags3], dif3_at_line_end 11595 0000C481 7506 <1> jnz @F 11596 0000C483 BA[A366] <1> mov dx, msg.unexpected_noneol_re 11597 0000C486 E82DF9 <1> call putsz_error 11598 <1> @@: 11599 0000C489 E99762 <1> jmp dumpregs_extended.exit 11600 <1> %else 11601 <1> jmp qq ; if EOF, quit --> 11602 <1> %endif 11603 <1> 11604 <1> .resetstuff: 11605 0000C48C 57 <1> push di 11606 0000C48D E8BEFA <1> call yy_close_file ; close file 11607 0000C490 5F <1> pop di 11608 <1> 11609 <1> %if _NEWFULLHANDLING 11610 0000C491 C706[EC0A][0300] <1> mov word [bufnext], line_in + 3 11611 0000C497 C706[EE0A][0300] <1> mov word [bufend], line_in + 3 11612 <1> %else 11613 <1> mov word [bufnext], line_in + 2 11614 <1> mov word [bufend], line_in + 2 11615 <1> %endif 11616 <1> 11617 0000C49D E8F403 <1> call getline_reset_notatty 11618 <1> 11619 0000C4A0 E9E23F <1> jmp determine_quiet_output 11620 <1> 11621 <1> 11622 <1> rawinput: 11623 <1> lframe 11624 <1> lequ 254, limit 11625 <1> lvar word, columns 11626 <1> lvar word, maxpercol 11627 <1> lvar word, maxpercolhalf 11628 0000C4A3 5589E58D66FA <1> lenter 11629 0000C4A9 06 <1> push es 11630 0000C4AA 52 <1> push dx 11631 <1> lvar dword, prompt ; (in line_out buffer) 11632 0000C4AB 31C0 <1> xor ax, ax 11633 <1> %if _HISTORY 11634 0000C4AD 50 <1> push ax 11635 <1> lvar word, historyentry 11636 <1> %endif 11637 0000C4AE 50 <1> push ax 11638 <1> lvar word, length_displayed 11639 0000C4AF 50 <1> push ax 11640 <1> lvar word, length_input 11641 0000C4B0 50 <1> push ax 11642 <1> lvar word, offset 11643 0000C4B1 50 <1> push ax 11644 <1> lvar word, lastskip 11645 0000C4B2 50 <1> push ax 11646 <1> lvar word, low_redraw_and_high_beep 11647 <1> lequ ?low_redraw_and_high_beep, redraw 11648 <1> lequ ?low_redraw_and_high_beep + 1, beep 11649 0000C4B3 50 <1> push ax 11650 <1> lvar word, edited 11651 0000C4B4 51 <1> push cx 11652 <1> lvar word, column 11653 0000C4B5 51 <1> push cx 11654 <1> lvar word, promptlength 11655 <1> 11656 0000C4B6 57 <1> push di 11657 0000C4B7 1E <1> push ds 11658 0000C4B8 07 <1> pop es 11659 <1> 11660 0000C4B9 BF[0200] <1> mov di, line_in+2 11661 <1> .next: 11662 0000C4BC E8E47A <1> call handle_serial_flags_ctrl_c 11663 <1> 11664 0000C4BF 807EEA00 <1> cmp byte [bp + ?redraw], 0 11665 0000C4C3 7503E9AF00 <1> je .no_do_redraw 11666 <1> .do_redraw: 11667 <1> 11668 0000C4C8 E89903 <1> call get_columns 11669 <1> 11670 0000C4CB 8946FE <1> mov word [bp + ?columns], ax 11671 0000C4CE 48 <1> dec ax ; $COLS - 1 11672 0000C4CF 2B46E4 <1> sub ax, word [bp + ?promptlength]; - $promptlength 11673 0000C4D2 8946FC <1> mov word [bp + ?maxpercol], ax 11674 0000C4D5 D1E8 <1> shr ax, 1 ; int($maxpercol / 2) 11675 0000C4D7 8946FA <1> mov word [bp + ?maxpercolhalf], ax 11676 <1> 11677 0000C4DA B00D <1> mov al, 13 11678 0000C4DC E800F9 <1> call putc 11679 <1> 11680 0000C4DF C456F6 <1> les dx, [bp + ?prompt] 11681 0000C4E2 8B4EE4 <1> mov cx, [bp + ?promptlength] 11682 0000C4E5 E861F5 <1> call puts 11683 0000C4E8 8B46F0 <1> mov ax, [bp + ?length_input] 11684 0000C4EB 89C1 <1> mov cx, ax 11685 0000C4ED 31FF <1> xor di, di ; skip 11686 <1> ; + line_in + 2 -> to display 11687 0000C4EF 3B46FC <1> cmp ax, word [bp + ?maxpercol] 11688 0000C4F2 8B46E6 <1> mov ax, word [bp + ?column] ; col 11689 0000C4F5 7626 <1> jna .not_show_a_maxpercol 11690 <1> .show_a_maxpercol: 11691 0000C4F7 8B5EEC <1> mov bx, word [bp + ?lastskip] 11692 0000C4FA 395EEE <1> cmp word [bp + ?offset], bx 11693 0000C4FD 7206 <1> jnae .not_offset_ae_lastskip 11694 <1> .offset_ae_lastskip: 11695 0000C4FF 29D8 <1> sub ax, bx ; col -= lastskip 11696 0000C501 01DF <1> add di, bx ; skip += lastskip 11697 0000C503 29D9 <1> sub cx, bx ; lessen length of part to display 11698 <1> .not_offset_ae_lastskip: 11699 <1> 11700 <1> @@: 11701 0000C505 3B46FC <1> cmp ax, word [bp + ?maxpercol] 11702 0000C508 760B <1> jna .not_col_a_maxpercol 11703 <1> .col_a_maxpercol: 11704 0000C50A 2B46FA <1> sub ax, word [bp + ?maxpercolhalf] 11705 <1> ; lessen col 11706 0000C50D 037EFA <1> add di, word [bp + ?maxpercolhalf] 11707 <1> ; heighten offset of part to display 11708 0000C510 2B4EFA <1> sub cx, word [bp + ?maxpercolhalf] 11709 <1> ; lessen length of part to display 11710 0000C513 EBF0 <1> jmp @B 11711 <1> 11712 <1> .not_col_a_maxpercol: 11713 0000C515 3B4EFC <1> cmp cx, word [bp + ?maxpercol] 11714 0000C518 7603 <1> jbe @F 11715 0000C51A 8B4EFC <1> mov cx, word [bp + ?maxpercol] 11716 <1> @@: 11717 <1> .not_show_a_maxpercol: 11718 0000C51D 897EEC <1> mov word [bp + ?lastskip], di 11719 0000C520 8D95[0200] <1> lea dx, [di + line_in + 2] 11720 0000C524 16 <1> push ss 11721 0000C525 07 <1> pop es 11722 <1> 11723 0000C526 FF76F2 <1> push word [bp + ?length_displayed] 11724 0000C529 894EF2 <1> mov word [bp + ?length_displayed], cx 11725 0000C52C 50 <1> push ax 11726 0000C52D 51 <1> push cx 11727 0000C52E 52 <1> push dx 11728 0000C52F E817F5 <1> call puts ; redraw 11729 0000C532 5A <1> pop dx 11730 0000C533 59 <1> pop cx 11731 0000C534 58 <1> pop ax 11732 0000C535 5B <1> pop bx 11733 <1> 11734 0000C536 87D9 <1> xchg bx, cx ; cx = prior length displayed, 11735 <1> ; bx = new length displayed 11736 0000C538 29D9 <1> sub cx, bx ; = how many blanks needed to overwrite 11737 0000C53A 760B <1> jbe @FF 11738 0000C53C 01CB <1> add bx, cx ; = length displayed 11739 0000C53E 50 <1> push ax 11740 0000C53F B020 <1> mov al, 32 11741 <1> @@: 11742 0000C541 E89BF8 <1> call putc 11743 0000C544 E2FB <1> loop @B 11744 0000C546 58 <1> pop ax 11745 <1> @@: 11746 <1> 11747 0000C547 52 <1> push dx 11748 0000C548 01DA <1> add dx, bx 11749 0000C54A 81EA[0200] <1> sub dx, line_in + 2 ; offset into line (with length displayed) 11750 0000C54E 0356E4 <1> add dx, word [bp + ?promptlength]; offset into display 11751 0000C551 3B56E6 <1> cmp dx, word [bp + ?column] ; same as column ? 11752 0000C554 5A <1> pop dx 11753 0000C555 741C <1> je .do_redraw_done ; yes, skip cursor movement stuff --> 11754 <1> 11755 0000C557 50 <1> push ax 11756 0000C558 52 <1> push dx 11757 0000C559 B00D <1> mov al, 13 11758 0000C55B E881F8 <1> call putc ; reset cursor 11759 0000C55E C456F6 <1> les dx, [bp + ?prompt] 11760 0000C561 8B4EE4 <1> mov cx, [bp + ?promptlength] 11761 0000C564 E8E2F4 <1> call puts ; redraw prompt 11762 0000C567 16 <1> push ss 11763 0000C568 07 <1> pop es 11764 0000C569 5A <1> pop dx ; -> current input text 11765 0000C56A 58 <1> pop ax ; = col 11766 0000C56B 2B46E4 <1> sub ax, word [bp + ?promptlength] 11767 <1> ; = offset into input text 11768 0000C56E 89C1 <1> mov cx, ax ; draw that much 11769 0000C570 E8D6F4 <1> call puts ; draw (to move cursor) 11770 <1> 11771 <1> .do_redraw_done: 11772 0000C573 C646EA00 <1> mov byte [bp + ?redraw], 0 11773 <1> 11774 <1> .no_do_redraw: 11775 <1> 11776 0000C577 807EEB00 <1> cmp byte [bp + ?beep], 0 11777 0000C57B 7409 <1> je .no_do_beep 11778 <1> .do_beep: 11779 0000C57D B007 <1> mov al, 7 11780 0000C57F E85DF8 <1> call putc 11781 <1> 11782 0000C582 C646EB00 <1> mov byte [bp + ?beep], 0 11783 <1> .no_do_beep: 11784 <1> 11785 0000C586 E898F8 <1> call getc 11786 <1> 11787 <1> ; check scancode for int 16h in non-dumb dosemu first 11788 0000C589 86C4 <1> xchg al, ah 11789 0000C58B 3C48 <1> cmp al, 48h 11790 0000C58D 7503E9F901 <1> je .up 11791 0000C592 3C4B <1> cmp al, 4Bh 11792 0000C594 7503E9CA01 <1> je .left 11793 0000C599 3C50 <1> cmp al, 50h 11794 0000C59B 7503E90702 <1> je .down 11795 0000C5A0 3C4D <1> cmp al, 4Dh 11796 0000C5A2 7503E9CF01 <1> je .right 11797 0000C5A7 3C52 <1> cmp al, 52h 11798 0000C5A9 7503E95502 <1> je .insert 11799 0000C5AE 3C53 <1> cmp al, 53h 11800 0000C5B0 7503E96101 <1> je .del 11801 0000C5B5 3C47 <1> cmp al, 47h 11802 0000C5B7 7503E98301 <1> je .home 11803 0000C5BC 3C4F <1> cmp al, 4Fh 11804 0000C5BE 7503E98D01 <1> je .end 11805 0000C5C3 3C49 <1> cmp al, 49h 11806 0000C5C5 7503E93902 <1> je .pageup 11807 0000C5CA 3C51 <1> cmp al, 51h 11808 0000C5CC 7503E93202 <1> je .pagedown 11809 <1> 11810 <1> ; not a special scancode, check character returned 11811 0000C5D1 86C4 <1> xchg al, ah 11812 0000C5D3 3C1B <1> cmp al, 1Bh 11813 0000C5D5 7403E98B00 <1> jne .not_esc 11814 <1> 11815 <1> ; check escape opcodes for int 16h in -dumb dosemu 11816 <1> ; or input from serial I/O (picocom/screen/ssh/mate-terminal) 11817 <1> .esc: 11818 0000C5DA E844F8 <1> call getc 11819 0000C5DD 3C5B <1> cmp al, '[' 11820 0000C5DF 7403E91F02 <1> jne .beep 11821 0000C5E4 E83AF8 <1> call getc 11822 0000C5E7 3C41 <1> cmp al, 41h 11823 0000C5E9 7503E99D01 <1> je .up 11824 0000C5EE 3C44 <1> cmp al, 44h 11825 0000C5F0 7503E96E01 <1> je .left 11826 0000C5F5 3C42 <1> cmp al, 42h 11827 0000C5F7 7503E9AB01 <1> je .down 11828 0000C5FC 3C43 <1> cmp al, 43h 11829 0000C5FE 7503E97301 <1> je .right 11830 0000C603 3C32 <1> cmp al, 32h 11831 0000C605 7425 <1> je .check_insert 11832 0000C607 3C33 <1> cmp al, 33h 11833 0000C609 7421 <1> je .check_del 11834 0000C60B 3C31 <1> cmp al, 31h 11835 0000C60D 741D <1> je .check_home 11836 0000C60F 3C34 <1> cmp al, 34h 11837 0000C611 7419 <1> je .check_end 11838 0000C613 3C48 <1> cmp al, 48h 11839 0000C615 7503E92501 <1> je .home 11840 0000C61A 3C46 <1> cmp al, 46h 11841 0000C61C 7503E92F01 <1> je .end 11842 0000C621 3C35 <1> cmp al, 35h 11843 0000C623 7407 <1> je .check_pageup 11844 0000C625 3C36 <1> cmp al, 36h 11845 0000C627 7403 <1> je .check_pagedown 11846 0000C629 E9D701 <1> jmp .beep 11847 <1> 11848 <1> 11849 <1> .check_insert: 11850 <1> .check_del: 11851 <1> .check_home: 11852 <1> .check_end: 11853 <1> .check_pageup: 11854 <1> .check_pagedown: 11855 0000C62C 50 <1> push ax 11856 0000C62D E8F1F7 <1> call getc 11857 0000C630 3C7E <1> cmp al, 7Eh 11858 0000C632 58 <1> pop ax 11859 0000C633 7403E9CB01 <1> jne .beep 11860 <1> 11861 0000C638 3C32 <1> cmp al, 32h 11862 0000C63A 7503E9C401 <1> je .insert 11863 0000C63F 3C33 <1> cmp al, 33h 11864 0000C641 7503E9D000 <1> je .del 11865 0000C646 3C31 <1> cmp al, 31h 11866 0000C648 7503E9F200 <1> je .home 11867 0000C64D 3C34 <1> cmp al, 34h 11868 0000C64F 7503E9FC00 <1> je .end 11869 0000C654 3C35 <1> cmp al, 35h 11870 0000C656 7503E9A801 <1> je .pageup 11871 0000C65B 3C36 <1> cmp al, 36h 11872 0000C65D 7503E9A101 <1> je .pagedown 11873 <1> 11874 0000C662 E99E01 <1> jmp .beep 11875 <1> 11876 <1> 11877 <1> .not_esc: 11878 <1> ; check regular characters 11879 0000C665 84C0 <1> test al, al ; waste? 11880 0000C667 7503E950FE <1> je .next 11881 0000C66C 3CE0 <1> cmp al, 0E0h 11882 0000C66E 7503E949FE <1> je .next ; waste --> 11883 <1> 11884 0000C673 3C03 <1> cmp al, 03h 11885 0000C675 7503E99001 <1> je .ctrlc 11886 0000C67A 3C09 <1> cmp al, 09h 11887 0000C67C 7503E98201 <1> je .beep ; tab 11888 0000C681 3C08 <1> cmp al, 08h 11889 0000C683 745D <1> je .backspace 11890 0000C685 3C7F <1> cmp al, 7Fh 11891 <1> ; On the server in int 16h of -dumb dosemu, as well as on 11892 <1> ; both systems across serial I/O this code is used. 11893 0000C687 7459 <1> je .backspace 11894 0000C689 3C0A <1> cmp al, 10 ; (allow Linux style linebreak) 11895 0000C68B 7503E97D01 <1> je .done 11896 0000C690 3C0D <1> cmp al, 13 ; (match for CR keypress) 11897 0000C692 7503E97601 <1> je .done 11898 <1> 11899 <1> .textcodepoint: 11900 0000C697 8B5EF0 <1> mov bx, word [bp + ?length_input] 11901 0000C69A 81FBFE00 <1> cmp bx, ?limit 11902 0000C69E 720B <1> jb @F 11903 0000C6A0 C646EA01 <1> mov byte [bp + ?redraw], 1 11904 0000C6A4 C646EB01 <1> mov byte [bp + ?beep], 1 11905 0000C6A8 E911FE <1> jmp .next 11906 <1> @@: 11907 <1> 11908 0000C6AB C646E801 <1> mov byte [bp + ?edited], 1 11909 0000C6AF 8B56F0 <1> mov dx, word [bp + ?length_input] 11910 0000C6B2 89D1 <1> mov cx, dx 11911 0000C6B4 89D7 <1> mov di, dx 11912 0000C6B6 16 <1> push ss 11913 0000C6B7 07 <1> pop es 11914 0000C6B8 81C7[0200] <1> add di, line_in + 2 ; di -> behind end of input 11915 0000C6BC 89FE <1> mov si, di 11916 0000C6BE 4E <1> dec si ; si -> at last entry of input 11917 0000C6BF 2B4EEE <1> sub cx, word [bp + ?offset] 11918 0000C6C2 FD <1> std ; AMD erratum 109 workaround done 11919 <1> numdef AMD_ERRATUM_109_WORKAROUND, 1 11920 <1> %if _AMD_ERRATUM_109_WORKAROUND 11921 0000C6C3 E308 <1> jcxz @FF 11922 0000C6C5 83F914 <1> cmp cx, 20 11923 0000C6C8 7703 <1> ja @FF 11924 <1> @@: 11925 0000C6CA A4 <1> movsb 11926 0000C6CB E2FD <1> loop @B 11927 <1> @@: 11928 <1> %endif 11929 0000C6CD F3A4 <1> rep movsb 11930 0000C6CF FC <1> cld 11931 0000C6D0 8805 <1> mov byte [di], al 11932 0000C6D2 FF46E6 <1> inc word [bp + ?column] 11933 0000C6D5 FF46EE <1> inc word [bp + ?offset] 11934 0000C6D8 FF46F0 <1> inc word [bp + ?length_input] 11935 0000C6DB C646EA01 <1> mov byte [bp + ?redraw], 1 11936 0000C6DF E9DAFD <1> jmp .next 11937 <1> 11938 <1> .backspace: 11939 0000C6E2 837EEE00 <1> cmp word [bp + ?offset], 0 11940 0000C6E6 7427 <1> je .backspace_offset_0 11941 <1> 11942 0000C6E8 C646E801 <1> mov byte [bp + ?edited], 1 11943 0000C6EC 16 <1> push ss 11944 0000C6ED 07 <1> pop es 11945 0000C6EE 8B7EEE <1> mov di, word [bp + ?offset] 11946 0000C6F1 8B4EF0 <1> mov cx, word [bp + ?length_input] 11947 0000C6F4 29F9 <1> sub cx, di ; length after offset 11948 0000C6F6 81C7[0200] <1> add di, line_in + 2 ; -> at offset in line 11949 0000C6FA 89FE <1> mov si, di ; -> at offset in line 11950 0000C6FC 4F <1> dec di ; -> at offset - 1 in line 11951 0000C6FD F3A4 <1> rep movsb ; move down additional content 11952 0000C6FF FF4EE6 <1> dec word [bp + ?column] 11953 0000C702 FF4EEE <1> dec word [bp + ?offset] 11954 0000C705 FF4EF0 <1> dec word [bp + ?length_input] 11955 0000C708 C646EA01 <1> mov byte [bp + ?redraw], 1 11956 0000C70C E9ADFD <1> jmp .next 11957 <1> 11958 <1> .backspace_offset_0: 11959 <1> .del_offset_ae_length_input: 11960 <1> .left_offset_0: 11961 <1> .right_offset_too_high: 11962 0000C70F C646EB01 <1> mov byte [bp + ?beep], 1 11963 0000C713 E9A6FD <1> jmp .next 11964 <1> 11965 <1> .del: 11966 0000C716 8B46EE <1> mov ax, word [bp + ?offset] 11967 0000C719 3B46F0 <1> cmp ax, word [bp + ?length_input] 11968 0000C71C 73F1 <1> jae .del_offset_ae_length_input 11969 0000C71E C646E801 <1> mov byte [bp + ?edited], 1 11970 0000C722 89C7 <1> mov di, ax 11971 0000C724 81C7[0200] <1> add di, line_in + 2 ; -> at current offset 11972 0000C728 89FE <1> mov si, di 11973 0000C72A 46 <1> inc si ; -> after current offset 11974 0000C72B 40 <1> inc ax ; offset + 1 11975 0000C72C F7D8 <1> neg ax ; - (offset + 1) 11976 0000C72E 0346F0 <1> add ax, word [bp + ?length_input]; length input - (offset + 1) 11977 0000C731 89C1 <1> mov cx, ax 11978 0000C733 F3A4 <1> rep movsb ; move down part after deleted point 11979 0000C735 FF4EF0 <1> dec word [bp + ?length_input] 11980 0000C738 C646EA01 <1> mov byte [bp + ?redraw], 1 11981 0000C73C E97DFD <1> jmp .next 11982 <1> 11983 <1> .home: 11984 0000C73F 8366EE00 <1> and word [bp + ?offset], 0 11985 0000C743 FF76E4 <1> push word [bp + ?promptlength] 11986 0000C746 8F46E6 <1> pop word [bp + ?column] 11987 0000C749 C646EA01 <1> mov byte [bp + ?redraw], 1 11988 0000C74D E96CFD <1> jmp .next 11989 <1> 11990 <1> .end: 11991 0000C750 8B46F0 <1> mov ax, word [bp + ?length_input] 11992 0000C753 8946EE <1> mov word [bp + ?offset], ax 11993 0000C756 0346E4 <1> add ax, word [bp + ?promptlength] 11994 0000C759 8946E6 <1> mov word [bp + ?column], ax 11995 0000C75C C646EA01 <1> mov byte [bp + ?redraw], 1 11996 0000C760 E959FD <1> jmp .next 11997 <1> 11998 <1> .left: 11999 0000C763 837EEE00 <1> cmp word [bp + ?offset], 0 12000 0000C767 74A6 <1> je .left_offset_0 12001 0000C769 FF4EEE <1> dec word [bp + ?offset] 12002 0000C76C FF4EE6 <1> dec word [bp + ?column] 12003 0000C76F C646EA01 <1> mov byte [bp + ?redraw], 1 12004 0000C773 E946FD <1> jmp .next 12005 <1> 12006 <1> .right: 12007 0000C776 8B46EE <1> mov ax, word [bp + ?offset] 12008 0000C779 3B46F0 <1> cmp ax, word [bp + ?length_input] 12009 0000C77C 7391 <1> jnb .right_offset_too_high 12010 0000C77E FF46EE <1> inc word [bp + ?offset] 12011 0000C781 FF46E6 <1> inc word [bp + ?column] 12012 0000C784 C646EA01 <1> mov byte [bp + ?redraw], 1 12013 0000C788 E931FD <1> jmp .next 12014 <1> 12015 <1> .up: 12016 0000C78B 807EE800 <1> cmp byte [bp + ?edited], 0 12017 0000C78F 7572 <1> jne .beep 12018 <1> %if _HISTORY 12019 0000C791 8B76F4 <1> mov si, word [bp + ?historyentry] 12020 0000C794 85F6 <1> test si, si 12021 0000C796 8D7402 <1> lea si, [si + 2] 12022 0000C799 7504 <1> jnz @F 12023 0000C79B 8B36[FE0A] <1> mov si, word [history.last] 12024 <1> @@: 12025 0000C79F 3B36[FC0A] <1> cmp si, word [history.first] 12026 0000C7A3 745E <1> je .beep 12027 0000C7A5 EB1B <1> jmp .copyline 12028 <1> 12029 <1> .down: 12030 0000C7A7 807EE800 <1> cmp byte [bp + ?edited], 0 12031 0000C7AB 7556 <1> jne .beep 12032 0000C7AD 8B76F4 <1> mov si, word [bp + ?historyentry] 12033 0000C7B0 85F6 <1> test si, si 12034 0000C7B2 744F <1> jz .beep 12035 0000C7B4 3B36[FE0A] <1> cmp si, word [history.last] 12036 0000C7B8 7506 <1> jne @F 12037 0000C7BA 31C0 <1> xor ax, ax 12038 0000C7BC 31C9 <1> xor cx, cx 12039 0000C7BE EB10 <1> jmp .setline 12040 <1> 12041 <1> @@: 12042 0000C7C0 4E <1> dec si 12043 0000C7C1 4E <1> dec si 12044 <1> 12045 <1> .copyline: 12046 0000C7C2 89F0 <1> mov ax, si 12047 <1> gethistorysegment ds 298 0000C7C4 368E1E[F60A] <2> mov %1, word [ss:history.segorsel] 12048 0000C7C9 8B0C <1> mov cx, [si] 12049 0000C7CB 8B7402 <1> mov si, [si + 2] 12050 0000C7CE 29F1 <1> sub cx, si 12051 <1> 12052 <1> .setline: 12053 0000C7D0 8946F4 <1> mov word [bp + ?historyentry], ax 12054 <1> gethistoryoffset bx 301 0000C7D3 BB0000 <2> mov %1, 0 12055 0000C7D6 8D30 <1> lea si, [si + bx] 12056 0000C7D8 16 <1> push ss 12057 0000C7D9 07 <1> pop es 12058 0000C7DA BF[0100] <1> mov di, line_in + 1 12059 0000C7DD 88C8 <1> mov al, cl 12060 0000C7DF AA <1> stosb 12061 0000C7E0 F3A4 <1> rep movsb 12062 0000C7E2 B00D <1> mov al, 13 12063 0000C7E4 AA <1> stosb 12064 0000C7E5 16 <1> push ss 12065 0000C7E6 1F <1> pop ds 12066 <1> %else 12067 <1> .down: equ .beep 12068 <1> 12069 <1> mov byte [bp + ?edited], 1 12070 <1> %endif 12071 0000C7E7 31C0 <1> xor ax, ax 12072 0000C7E9 A0[0100] <1> mov al, byte [line_in + 1] 12073 0000C7EC 8946EE <1> mov word [bp + ?offset], ax 12074 0000C7EF 8946F0 <1> mov word [bp + ?length_input], ax 12075 0000C7F2 0346E4 <1> add ax, word [bp + ?promptlength] 12076 0000C7F5 8946E6 <1> mov word [bp + ?column], ax 12077 0000C7F8 8366EC00 <1> and word [bp + ?lastskip], 0 12078 0000C7FC C646EA01 <1> mov byte [bp + ?redraw], 1 12079 0000C800 E9B9FC <1> jmp .next 12080 <1> 12081 <1> .insert: 12082 <1> .pageup: 12083 <1> .pagedown: 12084 <1> .beep: 12085 0000C803 C646EB01 <1> mov byte [bp + ?beep], 1 12086 0000C807 E9B2FC <1> jmp .next 12087 <1> 12088 <1> .ctrlc: 12089 0000C80A E90D78 <1> jmp handle_ctrl_c 12090 <1> 12091 <1> .done: 12092 0000C80D 8B7EF0 <1> mov di, word [bp + ?length_input] 12093 <1> 12094 0000C810 8B56EC <1> mov dx, word [bp + ?lastskip] 12095 0000C813 0356F2 <1> add dx, word [bp + ?length_displayed] 12096 <1> ; offset into line (with length displayed) 12097 0000C816 0356E4 <1> add dx, word [bp + ?promptlength]; offset into display 12098 0000C819 3B56E6 <1> cmp dx, word [bp + ?column] ; same as column ? 12099 0000C81C 750A <1> jne @F ; no, always redraw --> 12100 <1> 12101 0000C81E 89F8 <1> mov ax, di 12102 0000C820 0346E4 <1> add ax, word [bp + ?promptlength] 12103 0000C823 3946FE <1> cmp word [bp + ?columns], ax 12104 0000C826 7719 <1> ja .done_no_redraw 12105 <1> 12106 <1> @@: 12107 0000C828 B00D <1> mov al, 13 12108 0000C82A E8B2F5 <1> call putc ; reset cursor 12109 0000C82D C456F6 <1> les dx, [bp + ?prompt] 12110 0000C830 8B4EE4 <1> mov cx, [bp + ?promptlength] 12111 0000C833 E813F2 <1> call puts ; redraw prompt 12112 0000C836 16 <1> push ss 12113 0000C837 07 <1> pop es 12114 0000C838 BA[0200] <1> mov dx, line_in + 2 12115 0000C83B 8B4EF0 <1> mov cx, word [bp + ?length_input] 12116 0000C83E E808F2 <1> call puts ; draw 12117 <1> 12118 <1> .done_no_redraw: 12119 0000C841 81C7[0200] <1> add di, line_in + 2 12120 0000C845 B00D <1> mov al, 13 12121 0000C847 AA <1> stosb ; store the CR (there always is room) 12122 0000C848 97 <1> xchg ax, di ; -> behind CR 12123 0000C849 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 12126 <1> ; (This instruction disregards the unnecessary higher byte.) 12127 0000C84B 5F <1> pop di ; restore di 12128 0000C84C A2[0100] <1> mov byte [line_in+1], al ; store the length byte 12129 0000C84F 89EC5D <1> lleave code 12130 0000C852 E9B2FA <1> jmp getline_eol_enter_history 12131 <1> 12132 <1> lleave ctx 12133 <1> 12134 <1> 12135 <1> fullbsout: 12136 0000C855 B008 <1> mov al, 8 12137 0000C857 E885F5 <1> call putc 12138 0000C85A B020 <1> mov al, 32 12139 0000C85C E880F5 <1> call putc 12140 0000C85F B008 <1> mov al, 8 12141 0000C861 E97BF5 <1> jmp putc 12142 <1> 12143 <1> 12144 <1> ; INP: - 12145 <1> ; OUT: ax = number of columns to use 12146 <1> ; STT: ds = ss = debugger data selector 12147 <1> get_columns: 12148 0000C864 31C0 <1> xor ax, ax 12149 0000C866 F606[7D00]40 <1> testopt [options], enable_serial ; serial ? 12150 0000C86B 7411 <1> jz @F ; no --> 12151 0000C86D 0A06[E80B] <1> or al, byte [serial_columns] ; ax = number of columns if serial 12152 0000C871 7407 <1> jz .default_columns 12153 0000C873 3C01 <1> cmp al, 1 12154 0000C875 751C <1> jne @FF 12155 0000C877 48 <1> dec ax ; = 0 12156 0000C878 EB04 <1> jmp @F ; use IOC / BDA selection 12157 <1> .default_columns: 12158 0000C87A B050 <1> mov al, 80 12159 0000C87C EB15 <1> jmp @FF 12160 <1> @@: 12161 0000C87E 0A06[F70B] <1> or al, [io_columns] 12162 0000C882 74F6 <1> jz .default_columns 12163 0000C884 3C01 <1> cmp al, 1 ; is 1 ? 12164 0000C886 750B <1> jne @F ; no, use as columns --> 12165 <1> ; yes, automatic (use BDA) 12166 0000C888 06 <1> push es 12167 0000C889 B84000 <1> mov ax, 40h ; 0040h is a bimodal segment/selector 12168 0000C88C 8EC0 <1> mov es, ax 12169 0000C88E 26A14A00 <1> mov ax, word [ es:4Ah ] ; columns on screen 12170 0000C892 07 <1> pop es 12171 <1> @@: 12172 0000C893 C3 <1> retn 12173 <1> 12174 <1> 12175 <1> getline_reset_notatty: 12176 0000C894 F606[A700]02 <1> testopt [internalflags3], dif3_input_re_closed 12177 0000C899 7421 <1> jz @F 12178 0000C89B 8026[A700]FD <1> clropt [internalflags3], dif3_input_re_closed 12179 0000C8A0 F606[A500]01 <1> testopt [internalflags3], dif3_input_cmdline 12180 0000C8A5 7515 <1> jnz @F 12181 <1> %if _INPUT_FILE_HANDLES 12182 0000C8A7 E800DE <1> call InDos 12183 0000C8AA 7507 <1> jnz .notfile1 12184 0000C8AC F606[A200]10 <1> testopt [internalflags2], dif2_input_file 12185 0000C8B1 7509 <1> jnz @F 12186 <1> .notfile1: 12187 <1> %endif 12188 <1> %if _INPUT_FILE_BOOT 12189 0000C8B3 F606[A300]02 <1> testopt [internalflags2], dif2_input_file_boot 12190 0000C8B8 7502 <1> jnz @F 12191 <1> %endif 12192 0000C8BA EB47 <1> jmp .clear_notatty 12193 <1> 12194 <1> @@: 12195 0000C8BC F606[A500]02 <1> testopt [internalflags3], dif3_input_cmdline_closed 12196 0000C8C1 741A <1> jz @F 12197 0000C8C3 8026[A500]FD <1> clropt [internalflags3], dif3_input_cmdline_closed 12198 <1> %if _INPUT_FILE_HANDLES 12199 0000C8C8 E8DFDD <1> call InDos 12200 0000C8CB 7507 <1> jnz .notfile2 12201 0000C8CD F606[A200]10 <1> testopt [internalflags2], dif2_input_file 12202 0000C8D2 7509 <1> jnz @F 12203 <1> .notfile2: 12204 <1> %endif 12205 <1> %if _INPUT_FILE_BOOT 12206 0000C8D4 F606[A300]02 <1> testopt [internalflags2], dif2_input_file_boot 12207 0000C8D9 7502 <1> jnz @F 12208 <1> %endif 12209 0000C8DB EB26 <1> jmp .clear_notatty 12210 <1> 12211 <1> @@: 12212 <1> %if _INPUT_FILE_BOOT 12213 0000C8DD F606[A300]04 <1> testopt [internalflags2], dif2_closed_input_file_boot 12214 0000C8E2 7413 <1> jz @F 12215 0000C8E4 8026[A300]FB <1> clropt [internalflags2], dif2_closed_input_file_boot 12216 <1> %if _INPUT_FILE_HANDLES 12217 0000C8E9 E8BEDD <1> call InDos 12218 0000C8EC 7507 <1> jnz .notfile3 12219 0000C8EE F606[A200]10 <1> testopt [internalflags2], dif2_input_file 12220 0000C8F3 7502 <1> jnz @F 12221 <1> .notfile3: 12222 <1> %endif 12223 0000C8F5 EB0C <1> jmp .clear_notatty 12224 <1> @@: 12225 <1> %endif 12226 <1> %if _INPUT_FILE_HANDLES 12227 0000C8F7 F606[A200]20 <1> testopt [internalflags2], dif2_closed_input_file 12228 0000C8FC 7411 <1> jz @F 12229 0000C8FE 8026[A200]DF <1> clropt [internalflags2], dif2_closed_input_file 12230 <1> %else 12231 <1> jmp @F 12232 <1> %endif 12233 <1> .clear_notatty: 12234 0000C903 F606[9C00]30 <1> testopt [internalflags], inputfile | notstdinput 12235 0000C908 7505 <1> jnz @F 12236 0000C90A C606[E70A]00 <1> mov byte [notatty], 0 ; it _is_ a tty 12237 <1> @@: 12238 0000C90F C3 <1> retn 12239 <1> 12240 <1> 12241 <1> ; Fill input buffer from file. 12242 <1> ; 12243 <1> ; INP: di-> first available byte in input buffer 12244 <1> ; OUT: CY if DOS returned an error or EOF occured 12245 <1> ; NC if no error 12246 <1> ; si = di 12247 <1> ; CHG: - 12248 <1> fillbuf: 12249 0000C910 E89076 <1> call handle_serial_flags_ctrl_c 12250 0000C913 50 <1> push ax 12251 0000C914 53 <1> push bx 12252 0000C915 51 <1> push cx 12253 0000C916 52 <1> push dx 12254 0000C917 89FE <1> mov si, di ; we know this already 12255 0000C919 B9[0101] <1> mov cx, line_in+LINE_IN_LEN 12256 0000C91C 89FA <1> mov dx, di 12257 0000C91E 29F9 <1> sub cx, di 12258 0000C920 7703E99F00 <1> jbe .ret_cy ; if no more room --> 12259 <1> 12260 0000C925 F606[A700]01 <1> testopt [internalflags3], dif3_input_re 12261 0000C92A 7429 <1> jz .not_re 12262 0000C92C 56 <1> push si 12263 0000C92D 57 <1> push di 12264 0000C92E 89CB <1> mov bx, cx 12265 0000C930 8B36[E409] <1> mov si, word [re_buffer.position] 12266 0000C934 89F7 <1> mov di, si 12267 0000C936 B9FFFF <1> mov cx, -1 12268 0000C939 31C0 <1> xor ax, ax 12269 0000C93B F2AE <1> repne scasb 12270 0000C93D F7D1 <1> not cx 12271 0000C93F 49 <1> dec cx 12272 0000C940 39CB <1> cmp bx, cx 12273 0000C942 7702 <1> ja @F 12274 0000C944 89D9 <1> mov cx, bx 12275 <1> @@: 12276 0000C946 89C8 <1> mov ax, cx 12277 0000C948 89D7 <1> mov di, dx 12278 0000C94A F3A4 <1> rep movsb 12279 0000C94C 8936[E409] <1> mov word [re_buffer.position], si 12280 0000C950 5F <1> pop di 12281 0000C951 5E <1> pop si 12282 0000C952 F8 <1> clc 12283 0000C953 EB61 <1> jmp .after 12284 <1> 12285 <1> .not_re: 12286 <1> 12287 <1> %if _INPUT_FILE_BOOT 12288 0000C955 F606[A300]02 <1> testopt [internalflags2], dif2_input_file_boot 12289 0000C95A 7408 <1> jz @F 12290 0000C95C E80404 <1> call yy_boot_remember_seek 12291 0000C95F E800B5 <1> call yy_boot_read 12292 0000C962 EB52 <1> jmp .after 12293 <1> @@: 12294 <1> %endif 12295 <1> 12296 <1> %if _INPUT_FILE_HANDLES 12297 0000C964 E843DD <1> call InDos 12298 0000C967 750E <1> jnz @F 12299 0000C969 F606[A200]10 <1> testopt [internalflags2], dif2_input_file 12300 0000C96E 7407 <1> jz @F ; if not input file --> 12301 0000C970 57 <1> push di 12302 0000C971 E88AF6 <1> call yy_get_handle ; bx = handle 12303 0000C974 5F <1> pop di 12304 0000C975 EB37 <1> jmp .file_handle 12305 <1> %endif 12306 <1> 12307 <1> @@: 12308 0000C977 F606[A500]01 <1> testopt [internalflags3], dif3_input_cmdline 12309 0000C97C 7429 <1> jz .not_cmdline 12310 0000C97E 56 <1> push si 12311 0000C97F 57 <1> push di 12312 0000C980 89CB <1> mov bx, cx 12313 0000C982 8B36[E001] <1> mov si, word [cmdline_buffer.position] 12314 0000C986 89F7 <1> mov di, si 12315 0000C988 B9FFFF <1> mov cx, -1 12316 0000C98B 31C0 <1> xor ax, ax 12317 0000C98D F2AE <1> repne scasb 12318 0000C98F F7D1 <1> not cx 12319 0000C991 49 <1> dec cx 12320 0000C992 39CB <1> cmp bx, cx 12321 0000C994 7702 <1> ja @F 12322 0000C996 89D9 <1> mov cx, bx 12323 <1> @@: 12324 0000C998 89C8 <1> mov ax, cx 12325 0000C99A 89D7 <1> mov di, dx 12326 0000C99C F3A4 <1> rep movsb 12327 0000C99E 8936[E001] <1> mov word [cmdline_buffer.position], si 12328 0000C9A2 5F <1> pop di 12329 0000C9A3 5E <1> pop si 12330 0000C9A4 F8 <1> clc 12331 0000C9A5 EB0F <1> jmp .after 12332 <1> 12333 <1> .not_cmdline: 12334 <1> 12335 <1> @@: 12336 0000C9A7 31DB <1> xor bx, bx ; bx = handle (0 is STDIN) 12337 0000C9A9 E8FEDC <1> call InDos 12338 0000C9AC 7516 <1> jnz .ret_cy 12339 <1> 12340 <1> .file_handle: 12341 0000C9AE B43F <1> mov ah, 3Fh ; read from file 12342 0000C9B0 E87903 <1> call yy_remember_seek 12343 <1> doscall 2037 0000C9B3 E8B193 <2> call _doscall 12344 <1> .after: 12345 0000C9B6 720C <1> jc .ret_cy ; if error --> 12346 0000C9B8 85C0 <1> test ax, ax 12347 0000C9BA 7408 <1> jz .ret_cy ; if EOF --> 12348 0000C9BC 01C2 <1> add dx, ax ; -> behind last valid byte 12349 <1> 12350 0000C9BE 8026[A500]FB <1> clropt [internalflags3], dif3_at_line_end 12351 <1> 12352 0000C9C3 A8 <1> db __TEST_IMM8 ; (NC) 12353 <1> .ret_cy: 12354 0000C9C4 F9 <1> stc 12355 0000C9C5 8916[EE0A] <1> mov word [bufend], dx ; -> behind last valid byte 12356 0000C9C9 5A <1> pop dx 12357 0000C9CA 59 <1> pop cx 12358 0000C9CB 5B <1> pop bx 12359 0000C9CC 58 <1> pop ax 12360 0000C9CD C3 <1> retn 12361 <1> 12362 <1> 12363 <1> %ifn _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 12364 <1> yy equ error 12365 <1> %else 12366 <1> yy: 12367 0000C9CE E82A3B <1> call guard_re 12368 <1> %if _INPUT_FILE_BOOT 12369 0000C9D1 F606[9D00]40 <1> testopt [internalflags], nodosloaded 12370 0000C9D6 7403E91EB1 <1> jnz yy_boot 12371 <1> %endif 12372 <1> %ifn _INPUT_FILE_HANDLES 12373 <1> jmp error 12374 <1> %else 12375 0000C9DB E8CCDC <1> call InDos 12376 0000C9DE 740B <1> jz @F 12377 0000C9E0 B80503 <1> mov ax, 0305h 12378 0000C9E3 E83FDB <1> call setrc 12379 0000C9E6 BA[436D] <1> mov dx, msg.yy_no_dos 12380 0000C9E9 EB2F <1> jmp .disp_error_1 12381 <1> 12382 <1> @@: 12383 <1> ; If input_file_handles.to_close is set, 12384 <1> ; close all left over open files. (This 12385 <1> ; may only be done when DOS is available.) 12386 0000C9EB 31DB <1> xor bx, bx ; if none left open, -> first structure 12387 0000C9ED F606[A200]10 <1> testopt [internalflags2], dif2_input_file 12388 0000C9F2 740B <1> jz @F 12389 0000C9F4 8B1E[800A] <1> mov bx, word [input_file_handles.active] 12390 0000C9F8 43 <1> inc bx ; point to first unused structure 12391 0000C9F9 D1E3 <1> shl bx, 1 12392 0000C9FB D1E3 <1> shl bx, 1 12393 0000C9FD D1E3 <1> shl bx, 1 ; to qword array index 12394 <1> %if INPUTFILEHANDLE_size != 8 12395 <1> %error Unexpected structure size 12396 <1> %endif 12397 <1> @@: 12398 0000C9FF 89DF <1> mov di, bx ; + input_file_handles -> to close 12399 0000CA01 31C0 <1> xor ax, ax ; zero base amount to close 12400 0000CA03 E8DAF5 <1> call yy_close_file_handles 12401 <1> ; CHG: ax, bx, di 12402 <1> ; if we remembered to close any, do it now 12403 <1> 12404 0000CA06 4E <1> dec si 12405 0000CA07 89F3 <1> mov bx, si ; -> start of name 12406 0000CA09 89F7 <1> mov di, si ; -> start of name 12407 0000CA0B AC <1> lodsb ; load character 12408 0000CA0C E8F7EE <1> call iseol? 12409 0000CA0F 7515 <1> jne @F 12410 0000CA11 BA[856C] <1> mov dx, msg.yy_requires_filename 12411 0000CA14 B80403 <1> mov ax, 0304h 12412 0000CA17 E80BDB <1> call setrc 12413 <1> .disp_error_1: 12414 0000CA1A B8FF03 <1> mov ax, 03FFh 12415 0000CA1D E805DB <1> call setrc 12416 0000CA20 E893F3 <1> call putsz_error 12417 0000CA23 E9DA35 <1> jmp cmd3 12418 <1> 12419 <1> @@: 12420 <1> .unquoted_loop: 12421 0000CA26 3C20 <1> cmp al, 32 ; blank or EOL outside quoted part ? 12422 0000CA28 7434 <1> je .blank 12423 0000CA2A 3C09 <1> cmp al, 9 12424 0000CA2C 7430 <1> je .blank 12425 0000CA2E E8D5EE <1> call iseol? ; (includes semicolon in lDebug) 12426 0000CA31 742B <1> je .blank ; yes --> 12427 0000CA33 3C22 <1> cmp al, '"' ; starting quote mark ? 12428 0000CA35 740E <1> je .quoted ; yes --> 12429 0000CA37 AA <1> stosb ; store character 12430 <1> .unquote: 12431 0000CA38 AC <1> lodsb ; load character 12432 0000CA39 EBEB <1> jmp .unquoted_loop ; continue in not-quoted loop --> 12433 <1> 12434 <1> .quoted_loop: 12435 0000CA3B E8CCEE <1> call iseol?.notsemicolon; EOL inside quoted part ? 12436 0000CA3E 7413 <1> je .quoted_eol ; if yes, error --> 12437 0000CA40 3C22 <1> cmp al, '"' ; ending quote mark ? 12438 0000CA42 74F4 <1> je .unquote ; yes --> 12439 0000CA44 AA <1> stosb ; store character 12440 <1> .quoted: 12441 0000CA45 AC <1> lodsb ; load character 12442 0000CA46 EBF3 <1> jmp .quoted_loop ; continue in quoted loop --> 12443 <1> 12444 <1> .empty: 12445 0000CA48 B80603 <1> mov ax, 0306h 12446 0000CA4B E8D7DA <1> call setrc 12447 0000CA4E BA[A66C] <1> mov dx, msg.yy_filename_empty 12448 0000CA51 EBC7 <1> jmp .disp_error_1 12449 <1> 12450 <1> .quoted_eol: 12451 0000CA53 B80703 <1> mov ax, 0307h 12452 0000CA56 E8CCDA <1> call setrc 12453 0000CA59 BA[6D6D] <1> mov dx, msg.yy_filename_missing_unquote 12454 0000CA5C EBBC <1> jmp .disp_error_1 12455 <1> 12456 <1> .blank: 12457 <1> ; mov byte [si - 1], 0 ; terminate (shouldn't be needed) 12458 <1> 12459 0000CA5E B000 <1> mov al, 0 12460 0000CA60 8605 <1> xchg al, byte [di] ; terminate after filename 12461 0000CA62 893E[0E0C] <1> mov word [terminator_in_line_in.offset], di 12462 0000CA66 A2[100C] <1> mov byte [terminator_in_line_in.value], al 12463 0000CA69 39FB <1> cmp bx, di ; empty ? 12464 0000CA6B 74DB <1> je .empty ; yes --> 12465 <1> ; done 12466 <1> 12467 0000CA6D F606[A200]10 <1> testopt [internalflags2], dif2_input_file 12468 0000CA72 7412 <1> jz @F 12469 <1> ; IFH = 1 12470 <1> ; IFH - 1 = 0 12471 <1> ; cmp active, 0 12472 <1> ; active >= 0 --> error 12473 <1> 12474 <1> ; IFH = 2 12475 <1> ; IFH - 1 = 1 12476 <1> ; cmp active, 1 12477 <1> ; active >= 1 --> error 12478 0000CA74 833E[800A]0F <1> cmp word [input_file_handles.active], _INPUT_FILE_HANDLES - 1 12479 0000CA79 720B <1> jb @F 12480 <1> 12481 0000CA7B B80803 <1> mov ax, 0308h 12482 0000CA7E E8A4DA <1> call setrc 12483 0000CA81 BA[C56C] <1> mov dx, msg.yy_too_many_handles 12484 0000CA84 EB94 <1> jmp .disp_error_1 12485 <1> @@: 12486 <1> 12487 0000CA86 803F3A <1> cmp byte [bx], ':' 12488 0000CA89 7552 <1> jne .not_yy_goto_subfunction 12489 <1> 12490 0000CA8B F606[A200]10 <1> testopt [internalflags2], dif2_input_file 12491 0000CA90 750C <1> jnz @F 12492 <1> 12493 0000CA92 E870F9 <1> call getline_is_input_file? 12494 0000CA95 723A <1> jc .no_file 12495 0000CA97 F606[A500]01 <1> testopt [internalflags3], dif3_input_cmdline 12496 0000CA9C 7533 <1> jnz .no_file 12497 <1> @@: 12498 0000CA9E 43 <1> inc bx 12499 0000CA9F 89DD <1> mov bp, bx 12500 <1> 12501 0000CAA1 E87001 <1> call yy_reset_buf 12502 <1> 12503 0000CAA4 31DB <1> xor bx, bx ; bx = handle (0 is STDIN) 12504 <1> %if _INPUT_FILE_HANDLES 12505 0000CAA6 F606[A200]10 <1> testopt [internalflags2], dif2_input_file 12506 0000CAAB 7405 <1> jz @F ; if not input file --> 12507 0000CAAD 57 <1> push di 12508 0000CAAE E84DF5 <1> call yy_get_handle ; bx = handle 12509 0000CAB1 5F <1> pop di 12510 <1> @@: 12511 <1> %endif 12512 0000CAB2 B445 <1> mov ah, 45h 12513 <1> doscall ; duplicate file handle 2037 0000CAB4 E8B092 <2> call _doscall 12514 0000CAB7 7303E9DD00 <1> jc yy_open_file.error 12515 0000CABC 93 <1> xchg ax, bx 12516 <1> 12517 0000CABD 31C9 <1> xor cx, cx 12518 0000CABF 31D2 <1> xor dx, dx 12519 0000CAC1 B80142 <1> mov ax, 4201h ; lseek, from current file position 12520 <1> doscall ; call DOS 2037 0000CAC4 E8A092 <2> call _doscall 12521 0000CAC7 91 <1> xchg ax, cx ; dx:cx = current seek 12522 0000CAC8 87D1 <1> xchg dx, cx ; cx:dx = current seek 12523 0000CACA BE0001 <1> mov si, ifhfIsDup 12524 0000CACD 93 <1> xchg ax, bx 12525 0000CACE E9F200 <1> jmp yy_finish 12526 <1> 12527 <1> 12528 <1> .no_file: 12529 0000CAD1 B80903 <1> mov ax, 0309h 12530 0000CAD4 E84EDA <1> call setrc 12531 0000CAD7 BA[0B6D] <1> mov dx, msg.yy_no_file 12532 0000CADA E93DFF <1> jmp .disp_error_1 12533 <1> 12534 <1> .not_yy_goto_subfunction: 12535 0000CADD 31ED <1> xor bp, bp 12536 0000CADF E87AEE <1> call skipwh0 12537 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 12538 0000CAE2 8936[060C] <1> mov word [if_exists_then_address], si 12539 <1> %endif 12540 0000CAE6 E80CEE <1> call iseol?_or_then 12541 0000CAE9 7425 <1> je .not_yy_goto 12542 <1> 12543 0000CAEB 3C3A <1> cmp al, ':' 12544 0000CAED 7403E9ECD9 <1> jne error 12545 <1> 12546 0000CAF2 E866EE <1> call skipwhite 12547 0000CAF5 4E <1> dec si 12548 0000CAF6 89F5 <1> mov bp, si 12549 <1> 12550 <1> @@: 12551 0000CAF8 AC <1> lodsb 12552 0000CAF9 3C20 <1> cmp al, 32 12553 0000CAFB 7409 <1> je @F 12554 0000CAFD 3C09 <1> cmp al, 9 12555 0000CAFF 7405 <1> je @F 12556 0000CB01 E802EE <1> call iseol? 12557 0000CB04 75F2 <1> jne @B 12558 <1> @@: 12559 0000CB06 E853EE <1> call skipwh0 12560 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 12561 0000CB09 8936[060C] <1> mov word [if_exists_then_address], si 12562 <1> %endif 12563 0000CB0D E801EE <1> call chkeol_or_then 12564 <1> 12565 <1> .not_yy_goto: 12566 0000CB10 89DF <1> mov di, bx 12567 <1> 12568 <1> ; INP: ds:di -> filename 12569 <1> ; OUT: File opened, 12570 <1> ; bx = file handle 12571 <1> ; STT: ds = es = ss = debugger data selector/segment 12572 <1> yy_open_file: 12573 0000CB12 E89A00 <1> call .setup_opencreate ; ds:si -> pathname 12574 0000CB15 B86C71 <1> mov ax, 716Ch ; LFN open-create 12575 0000CB18 57 <1> push di 12576 0000CB19 31FF <1> xor di, di ; alias hint 12577 0000CB1B F9 <1> stc 12578 <1> doscall 2037 0000CB1C E84892 <2> call _doscall 12579 0000CB1F 5F <1> pop di 12580 0000CB20 7203E99500 <1> jnc .got ; LFN call succeeded --> 12581 <1> 12582 <1> ; Early case for no-LFN-interface available. 12583 <1> ; cmp ax, 1 12584 <1> ; je .try_sfn 12585 0000CB25 3D0071 <1> cmp ax, 7100h 12586 0000CB28 744D <1> je .try_sfn 12587 <1> 12588 <1> ; Only now, we check whether the used drive supports LFNs. 12589 <1> ; If it does, then we treat the error received as an 12590 <1> ; actual error and cancel here. If not, the SFN function 12591 <1> ; is called next as a fallback. 12592 <1> ; 12593 <1> ; We cannot rely on specific error returns like the 12594 <1> ; expected 7100h CY (or 7100h CF-unchanged) or the similar 12595 <1> ; 0001h CY (Invalid function) because no one agrees on what 12596 <1> ; error code to use. 12597 <1> ; 12598 <1> ; dosemu returns 0003h (Path not found) on FATFS and 12599 <1> ; redirected-non-dosemu drives. But may be changed so as to 12600 <1> ; return 0059h (Function not supported on network). 12601 <1> ; MSWindows 98SE returns 0002h (File not found) on 12602 <1> ; DOS-redirected drives. 12603 <1> ; DOSLFN with Fallback mode enabled supports the call (albeit 12604 <1> ; limited to SFNs). 12605 <1> ; 12606 <1> ; To suss out what the error means, check LFN availability. 12607 <1> ; 12608 <1> ; Refer to https://github.com/stsp/dosemu2/issues/770 12609 0000CB2A 1E <1> push ds 12610 0000CB2B 06 <1> push es 12611 0000CB2C 57 <1> push di 12612 0000CB2D 50 <1> push ax 12613 <1> lframe 12614 <1> lvar 34, fstype_buffer 12615 <1> lvar 4, pathname_buffer 12616 0000CB2E 5589E58D66DA <1> lenter 12617 <1> 12618 0000CB34 AD <1> lodsw ; load first two bytes of pathname 12619 <1> 12620 0000CB35 16 <1> push ss 12621 0000CB36 1F <1> pop ds 12622 0000CB37 89E2 <1> mov dx, sp ; ds:dx -> ?pathname_buffer 12623 0000CB39 16 <1> push ss 12624 0000CB3A 07 <1> pop es 12625 0000CB3B 89E7 <1> mov di, sp ; es:di -> ?pathname_buffer 12626 <1> 12627 0000CB3D 80FC3A <1> cmp ah, ':' ; starts with drive specifier ? 12628 0000CB40 7409 <1> je @F ; yes --> 12629 <1> 12630 0000CB42 B419 <1> mov ah, 19h 12631 <1> doscall ; get current default drive 2037 0000CB44 E82092 <2> call _doscall 12632 0000CB47 0441 <1> add al, 'A' ; A: = 0, convert to drive letter 12633 0000CB49 B43A <1> mov ah, ':' ; drive specifier 12634 <1> @@: 12635 0000CB4B AB <1> stosw 12636 0000CB4C B85C00 <1> mov ax, '\' ; backslash and zero terminator 12637 0000CB4F AB <1> stosw ; es:di -> ?fstype_buffer 12638 <1> 12639 0000CB50 31C0 <1> xor ax, ax 12640 0000CB52 B91100 <1> mov cx, 34 >> 1 12641 0000CB55 57 <1> push di 12642 0000CB56 F3AB <1> rep stosw ; initialise ?fstype_buffer to all zeros 12643 0000CB58 5F <1> pop di ; -> ?fstype_buffer 12644 <1> 12645 0000CB59 B92000 <1> mov cx, 32 ; size of ?fstype_buffer 12646 0000CB5C 31DB <1> xor bx, bx ; harden, initialise this 12647 0000CB5E B8A071 <1> mov ax, 71A0h ; get volume information 12648 0000CB61 F9 <1> stc 12649 <1> doscall ; (depends on ds = es = ss) 2037 0000CB62 E80292 <2> call _doscall 12650 <1> 12651 0000CB65 7207 <1> jc @F ; if call not supported --> 12652 <1> ; bx = FS flags 12653 0000CB67 F6C740 <1> test bh, 0100_0000b ; LFN interface available ? 12654 0000CB6A F9 <1> stc ; if no 12655 0000CB6B 7401 <1> jz @F ; no --> 12656 <1> 12657 0000CB6D F8 <1> clc ; is available 12658 <1> @@: 12659 <1> 12660 0000CB6E 89EC5D <1> lleave 12661 0000CB71 58 <1> pop ax ; (restore error code) 12662 0000CB72 5F <1> pop di 12663 0000CB73 07 <1> pop es 12664 0000CB74 1F <1> pop ds 12665 0000CB75 7322 <1> jnc .error ; if LFN interface is available, actual error 12666 <1> ; if LFN interface is not available, try SFN 12667 <1> 12668 <1> .try_sfn: 12669 0000CB77 E83500 <1> call .setup_opencreate 12670 0000CB7A B8006C <1> mov ax, 6C00h ; Open-create 12671 0000CB7D F9 <1> stc 12672 <1> doscall 2037 0000CB7E E8E691 <2> call _doscall 12673 0000CB81 7337 <1> jnc .got 12674 <1> 12675 0000CB83 83F801 <1> cmp ax, 1 12676 0000CB86 7405 <1> je .try_old_open 12677 0000CB88 3D006C <1> cmp ax, 6C00h 12678 0000CB8B 750C <1> jne .error 12679 <1> 12680 <1> .try_old_open: 12681 0000CB8D 88D8 <1> mov al, bl ; access and sharing modes 12682 0000CB8F B43D <1> mov ah, 3Dh ; Open 12683 0000CB91 89F2 <1> mov dx, si ; -> filename 12684 0000CB93 F9 <1> stc 12685 <1> doscall 2037 0000CB94 E8D091 <2> call _doscall 12686 0000CB97 7321 <1> jnc .got 12687 <1> 12688 <1> .error: 12689 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 12690 0000CB99 F606[A700]08 <1> testopt [internalflags3], dif3_in_if 12691 0000CB9E 7403E9D8C4 <1> jnz if_exists_not_found 12692 <1> %endif 12693 0000CBA3 B80A03 <1> mov ax, 030Ah 12694 0000CBA6 E87CD9 <1> call setrc 12695 0000CBA9 BA[EA6C] <1> mov dx, msg.yy_error_file_open 12696 0000CBAC E96BFE <1> jmp yy.disp_error_1 12697 <1> 12698 <1> .setup_opencreate: 12699 0000CBAF 89FE <1> mov si, di ; -> filename 12700 0000CBB1 BB2060 <1> mov bx, 0110_0000_0010_0000b ; Auto-commit, no int 24h 12701 <1> ; DENY WRITE, Read-only 12702 0000CBB4 31C9 <1> xor cx, cx ; create attribute 12703 0000CBB6 BA0100 <1> mov dx, 0000_0000_0000_0001b ; no create / open, no truncate 12704 0000CBB9 C3 <1> retn 12705 <1> 12706 <1> .got: 12707 <1> ; ax = file handle 12708 0000CBBA E85700 <1> call yy_reset_buf 12709 <1> 12710 0000CBBD 31C9 <1> xor cx, cx 12711 0000CBBF 31D2 <1> xor dx, dx 12712 0000CBC1 31F6 <1> xor si, si 12713 <1> yy_finish: 12714 0000CBC3 F606[A200]10 <1> testopt [internalflags2], dif2_input_file 12715 0000CBC8 7509 <1> jnz @F 12716 0000CBCA 800E[A200]10 <1> setopt [internalflags2], dif2_input_file 12717 0000CBCF 31DB <1> xor bx, bx 12718 0000CBD1 EB18 <1> jmp @FF 12719 <1> 12720 <1> @@: 12721 0000CBD3 FF06[800A] <1> inc word [input_file_handles.active] 12722 0000CBD7 8B1E[800A] <1> mov bx, word [input_file_handles.active] 12723 0000CBDB D1E3 <1> shl bx, 1 12724 0000CBDD D1E3 <1> shl bx, 1 12725 0000CBDF D1E3 <1> shl bx, 1 ; to qword array index 12726 <1> %if INPUTFILEHANDLE_size != 8 12727 <1> %error Unexpected structure size 12728 <1> %endif 12729 0000CBE1 8BBF[FA09] <1> mov di, word [input_file_handles + bx - INPUTFILEHANDLE_size + ifhFlags] 12730 0000CBE5 81E700F0 <1> and di, ifhfTestReserved1 | ifhfTestReserved2 | ifhfQuietInput | ifhfQuietOutput 12732 0000CBE9 09FE <1> or si, di 12733 <1> @@: 12734 <1> 12735 0000CBEB 8987[000A] <1> mov word [input_file_handles + bx + ifhHandle], ax 12736 0000CBEF 89B7[020A] <1> mov word [input_file_handles + bx + ifhFlags], si 12737 0000CBF3 8997[040A] <1> mov word [input_file_handles + bx + ifhParentSeek], dx 12738 0000CBF7 898F[060A] <1> mov word [input_file_handles + bx + ifhParentSeek + 2], cx 12739 <1> 12740 0000CBFB 8026[A700]EF <1> clropt [internalflags3], dif3_auxbuff_guarded_1 12741 0000CC00 89EE <1> mov si, bp 12742 0000CC02 85F6 <1> test si, si 12743 0000CC04 7403E99901 <1> jnz cmd_goto.yy_entry 12744 <1> 12745 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 12746 0000CC09 F606[A700]08 <1> testopt [internalflags3], dif3_in_if 12747 0000CC0E 7403E975C4 <1> jnz if_exists_found_open 12748 <1> %endif 12749 0000CC13 C3 <1> retn 12750 <1> %endif 12751 <1> %endif 12752 <1> 12753 <1> 12754 <1> ; INP: word [bufnext], word [bufend] 12755 <1> ; CHG: - 12756 <1> ; 12757 <1> ; Note: When reading from a file, we buffer some of the input 12758 <1> ; in line_in. When switching to a non-file, or starting 12759 <1> ; to read from another file, we have to reset the seek 12760 <1> ; position of the (prior) file to avoid losing the data. 12761 <1> ; This cropped up during yy development, but actually 12762 <1> ; affects serial and InDOS input, too. Therefore, 12763 <1> ; this function is not below the conditional for yy. 12764 <1> yy_reset_buf: 12765 0000CC14 51 <1> push cx 12766 <1> %if _NEWFULLHANDLING 12767 0000CC15 B9[0300] <1> mov cx, line_in + 3 12768 <1> %else 12769 <1> mov cx, line_in + 2 12770 <1> %endif 12771 0000CC18 870E[EC0A] <1> xchg cx, word [bufnext] 12772 0000CC1C F7D9 <1> neg cx 12773 0000CC1E 030E[EE0A] <1> add cx, word [bufend] ; cx = how much remaining in buffer 12774 <1> %if _NEWFULLHANDLING 12775 0000CC22 C706[EE0A][0300] <1> mov word [bufend], line_in + 3 12776 <1> %else 12777 <1> mov word [bufend], line_in + 2 12778 <1> %endif 12779 <1> 12780 0000CC28 F606[A200]40 <1> testopt [internalflags2], dif2_did_getline_file 12781 0000CC2D 7469 <1> jz .not_used 12782 <1> 12783 0000CC2F 50 <1> push ax 12784 0000CC30 52 <1> push dx 12785 0000CC31 53 <1> push bx 12786 0000CC32 89CA <1> mov dx, cx 12787 0000CC34 31C9 <1> xor cx, cx 12788 0000CC36 F7DA <1> neg dx ; dx = minus how much remaining 12789 0000CC38 7456 <1> jz .done ; if zero, do not seek at all --> 12790 0000CC3A 49 <1> dec cx ; sign extension into cx:dx 12791 <1> 12792 0000CC3B F606[A700]01 <1> testopt [internalflags3], dif3_input_re 12793 0000CC40 7406 <1> jz @F 12794 0000CC42 0116[E409] <1> add word [re_buffer.position], dx 12795 0000CC46 EB48 <1> jmp .done 12796 <1> @@: 12797 <1> 12798 <1> %if _INPUT_FILE_BOOT 12799 0000CC48 F606[A300]02 <1> testopt [internalflags2], dif2_input_file_boot 12800 0000CC4D 741E <1> jz @F 12801 0000CC4F F606[A700]30 <1> testopt [internalflags3], dif3_auxbuff_guarded_1 | dif3_auxbuff_guarded_2 12802 0000CC54 7412 <1> jz .do_boot_seek 12803 <1> 12804 0000CC56 FF36[B08F] <1> push word [load_input_file.active] 12805 0000CC5A 8F06[900A] <1> pop word [boot_remember_seek_handle] 12806 0000CC5E 890E[8E0A] <1> mov word [boot_remember_seek_offset + 2], cx 12807 0000CC62 8916[8C0A] <1> mov word [boot_remember_seek_offset], dx 12808 0000CC66 EB28 <1> jmp .done 12809 <1> 12810 <1> .do_boot_seek: 12811 0000CC68 E881B3 <1> call yy_boot_seek_current 12812 0000CC6B EB23 <1> jmp .done 12813 <1> @@: 12814 <1> %endif 12815 <1> 12816 <1> %if _INPUT_FILE_HANDLES 12817 0000CC6D F606[A200]10 <1> testopt [internalflags2], dif2_input_file 12818 0000CC72 7407 <1> jz @F ; if not input file --> 12819 0000CC74 57 <1> push di 12820 0000CC75 E886F3 <1> call yy_get_handle ; bx = handle 12821 0000CC78 5F <1> pop di 12822 0000CC79 EB0F <1> jmp .filehandle 12823 <1> @@: 12824 <1> %endif 12825 <1> 12826 0000CC7B F606[A500]01 <1> testopt [internalflags3], dif3_input_cmdline 12827 0000CC80 7406 <1> jz @F 12828 0000CC82 0116[E001] <1> add word [cmdline_buffer.position], dx 12829 0000CC86 EB08 <1> jmp .done 12830 <1> @@: 12831 <1> 12832 0000CC88 31DB <1> xor bx, bx ; bx = handle (0 is STDIN) 12833 <1> .filehandle: 12834 0000CC8A B80142 <1> mov ax, 4201h ; lseek, from current file position 12835 0000CC8D E80A00 <1> call handle_seek_or_remember 12836 <1> 12837 <1> .done: 12838 0000CC90 5B <1> pop bx 12839 0000CC91 5A <1> pop dx 12840 0000CC92 58 <1> pop ax 12841 <1> 12842 0000CC93 8026[A200]BF <1> clropt [internalflags2], dif2_did_getline_file 12843 <1> 12844 <1> .not_used: 12845 0000CC98 59 <1> pop cx 12846 0000CC99 C3 <1> retn 12847 <1> 12848 <1> 12849 <1> handle_seek_or_remember: 12850 0000CC9A E80DDA <1> call InDos 12851 0000CC9D 7411 <1> jz @F 12852 <1> 12853 0000CC9F A3[840A] <1> mov word [indos_remember_seek_function], ax 12854 0000CCA2 891E[860A] <1> mov word [indos_remember_seek_handle], bx 12855 0000CCA6 890E[8A0A] <1> mov word [indos_remember_seek_offset + 2], cx 12856 0000CCAA 8916[880A] <1> mov word [indos_remember_seek_offset], dx 12857 0000CCAE EB03 <1> jmp .done 12858 <1> 12859 <1> @@: 12860 <1> doscall ; call DOS 2037 0000CCB0 E8B490 <2> call _doscall 12861 <1> .done: 12862 0000CCB3 C3 <1> retn 12863 <1> 12864 <1> 12865 <1> yy_reset_buf_and_seek_start: 12866 0000CCB4 51 <1> push cx 12867 0000CCB5 50 <1> push ax 12868 0000CCB6 52 <1> push dx 12869 0000CCB7 53 <1> push bx 12870 <1> %if _NEWFULLHANDLING 12871 0000CCB8 B8[0300] <1> mov ax, line_in + 3 12872 <1> %else 12873 <1> mov ax, line_in + 2 12874 <1> %endif 12875 0000CCBB A3[EC0A] <1> mov word [bufnext], ax 12876 0000CCBE A3[EE0A] <1> mov word [bufend], ax 12877 <1> 12878 0000CCC1 31D2 <1> xor dx, dx 12879 0000CCC3 31C9 <1> xor cx, cx 12880 <1> 12881 0000CCC5 F606[A700]01 <1> testopt [internalflags3], dif3_input_re 12882 0000CCCA 7408 <1> jz @F 12883 0000CCCC C706[E409][E401] <1> mov word [re_buffer.position], re_buffer 12884 0000CCD2 EB37 <1> jmp .done 12885 <1> @@: 12886 <1> 12887 <1> %if _INPUT_FILE_BOOT 12888 0000CCD4 F606[A300]02 <1> testopt [internalflags2], dif2_input_file_boot 12889 0000CCD9 7408 <1> jz @F 12890 0000CCDB E86A00 <1> call yy_boot_clear_remember_seek 12891 0000CCDE E855B5 <1> call yy_boot_seek_start 12892 0000CCE1 EB28 <1> jmp .done 12893 <1> @@: 12894 <1> %endif 12895 <1> 12896 <1> %if _INPUT_FILE_HANDLES 12897 0000CCE3 F606[A200]10 <1> testopt [internalflags2], dif2_input_file 12898 0000CCE8 7407 <1> jz @F ; if not input file --> 12899 0000CCEA 57 <1> push di 12900 0000CCEB E810F3 <1> call yy_get_handle ; bx = handle 12901 0000CCEE 5F <1> pop di 12902 0000CCEF EB11 <1> jmp .filehandle 12903 <1> @@: 12904 <1> %endif 12905 <1> 12906 0000CCF1 F606[A500]01 <1> testopt [internalflags3], dif3_input_cmdline 12907 0000CCF6 7408 <1> jz @F 12908 0000CCF8 C706[E001][E000] <1> mov word [cmdline_buffer.position], cmdline_buffer 12909 0000CCFE EB0B <1> jmp .done 12910 <1> @@: 12911 <1> 12912 0000CD00 31DB <1> xor bx, bx ; bx = handle (0 is STDIN) 12913 <1> 12914 <1> .filehandle: 12915 0000CD02 E80B00 <1> call yy_clear_remember_seek 12916 0000CD05 B80042 <1> mov ax, 4200h ; seek from start 12917 0000CD08 E88FFF <1> call handle_seek_or_remember 12918 <1> .done: 12919 0000CD0B 5B <1> pop bx 12920 0000CD0C 5A <1> pop dx 12921 0000CD0D 58 <1> pop ax 12922 0000CD0E 59 <1> pop cx 12923 0000CD0F C3 <1> retn 12924 <1> 12925 <1> 12926 <1> yy_clear_remember_seek: 12927 0000CD10 391E[860A] <1> cmp word [indos_remember_seek_handle], bx 12928 0000CD14 7515 <1> jne .ret 12929 <1> .clear: 12930 0000CD16 C706[840A]0142 <1> mov word [indos_remember_seek_function], 4201h 12931 0000CD1C 830E[860A]FF <1> or word [indos_remember_seek_handle], -1 12932 0000CD21 8326[8A0A]00 <1> and word [indos_remember_seek_offset + 2], 0 12933 0000CD26 8326[880A]00 <1> and word [indos_remember_seek_offset], 0 12934 <1> .ret: 12935 0000CD2B C3 <1> retn 12936 <1> 12937 <1> 12938 <1> yy_remember_seek: 12939 0000CD2C 391E[860A] <1> cmp word [indos_remember_seek_handle], bx 12940 0000CD30 75F9 <1> jne yy_clear_remember_seek.ret 12941 <1> 12942 0000CD32 50 <1> push ax 12943 0000CD33 51 <1> push cx 12944 0000CD34 52 <1> push dx 12945 0000CD35 8B0E[8A0A] <1> mov cx, word [indos_remember_seek_offset + 2] 12946 0000CD39 8B16[880A] <1> mov dx, word [indos_remember_seek_offset] 12947 0000CD3D A1[840A] <1> mov ax, word [indos_remember_seek_function] 12948 <1> doscall ; call DOS 2037 0000CD40 E82490 <2> call _doscall 12949 0000CD43 5A <1> pop dx 12950 0000CD44 59 <1> pop cx 12951 0000CD45 58 <1> pop ax 12952 0000CD46 EBCE <1> jmp yy_clear_remember_seek.clear 12953 <1> 12954 <1> 12955 <1> %if _INPUT_FILE_BOOT 12956 <1> yy_boot_clear_remember_seek: 12957 0000CD48 50 <1> push ax 12958 0000CD49 A1[B08F] <1> mov ax, word [load_input_file.active] 12959 0000CD4C 3906[900A] <1> cmp word [boot_remember_seek_handle], ax 12960 0000CD50 750F <1> jne .ret_pop_ax 12961 <1> .clear: 12962 0000CD52 830E[900A]FF <1> or word [boot_remember_seek_handle], -1 12963 0000CD57 8326[8E0A]00 <1> and word [boot_remember_seek_offset + 2], 0 12964 0000CD5C 8326[8C0A]00 <1> and word [boot_remember_seek_offset], 0 12965 <1> .ret_pop_ax: 12966 0000CD61 58 <1> pop ax 12967 0000CD62 C3 <1> retn 12968 <1> 12969 <1> 12970 <1> yy_boot_remember_seek: 12971 0000CD63 50 <1> push ax 12972 0000CD64 A1[B08F] <1> mov ax, word [load_input_file.active] 12973 0000CD67 3906[900A] <1> cmp word [boot_remember_seek_handle], ax 12974 0000CD6B 75F4 <1> jne yy_boot_clear_remember_seek.ret_pop_ax 12975 <1> 12976 0000CD6D 53 <1> push bx 12977 0000CD6E 51 <1> push cx 12978 0000CD6F 52 <1> push dx 12979 0000CD70 8B0E[8E0A] <1> mov cx, word [boot_remember_seek_offset + 2] 12980 0000CD74 8B16[8C0A] <1> mov dx, word [boot_remember_seek_offset] 12981 0000CD78 E871B2 <1> call yy_boot_seek_current 12982 0000CD7B 5A <1> pop dx 12983 0000CD7C 59 <1> pop cx 12984 0000CD7D 5B <1> pop bx 12985 0000CD7E EBD2 <1> jmp yy_boot_clear_remember_seek.clear 12986 <1> %endif 12987 <1> 12988 <1> 12989 <1> cmd_goto: 12990 0000CD80 E8D8EB <1> call skipwhite 12991 0000CD83 3C3A <1> cmp al, ':' 12992 0000CD85 7503 <1> jne @F 12993 0000CD87 E8D1EB <1> call skipwhite 12994 <1> @@: 12995 <1> 12996 0000CD8A E878F6 <1> call getline_is_input_file? 12997 0000CD8D 7312 <1> jnc @F 12998 0000CD8F BA[8A65] <1> mov dx, msg.goto_not_file 12999 0000CD92 B80003 <1> mov ax, 0300h 13000 0000CD95 E88DD7 <1> call setrc 13001 <1> .error: 13002 0000CD98 B8FF03 <1> mov ax, 03FFh 13003 0000CD9B E887D7 <1> call setrc 13004 0000CD9E E915F0 <1> jmp putsz_error 13005 <1> 13006 <1> @@: 13007 0000CDA1 4E <1> dec si 13008 <1> .yy_entry: ; si -> destination label 13009 0000CDA2 BA[8265] <1> mov dx, msg.sof 13010 0000CDA5 E8FFEA <1> call isstring? 13011 0000CDA8 751B <1> jne @F 13012 0000CDAA E8AEEB <1> call skipwhite 13013 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 13014 0000CDAD 8936[060C] <1> mov word [if_exists_then_address], si 13015 <1> %endif 13016 0000CDB1 E85DEB <1> call chkeol_or_then 13017 0000CDB4 E8D700 <1> call resetrc 13018 0000CDB7 E8FAFE <1> call yy_reset_buf_and_seek_start 13019 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 13020 0000CDBA F606[A700]08 <1> testopt [internalflags3], dif3_in_if 13021 0000CDBF 7403E9C4C2 <1> jnz if_exists_found_open 13022 <1> %endif 13023 0000CDC4 C3 <1> retn 13024 <1> 13025 <1> @@: 13026 0000CDC5 BA[8665] <1> mov dx, msg.eof 13027 0000CDC8 E8DCEA <1> call isstring? 13028 0000CDCB 751B <1> jne @F 13029 0000CDCD E88BEB <1> call skipwhite 13030 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 13031 0000CDD0 8936[060C] <1> mov word [if_exists_then_address], si 13032 <1> %endif 13033 0000CDD4 E83AEB <1> call chkeol_or_then 13034 0000CDD7 E8B400 <1> call resetrc 13035 0000CDDA E861F6 <1> call getline_close_file 13036 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 13037 0000CDDD F606[A700]08 <1> testopt [internalflags3], dif3_in_if 13038 0000CDE2 7403E9A6C2 <1> jnz if_exists_found_closed 13039 <1> %endif 13040 0000CDE7 C3 <1> retn 13041 <1> 13042 <1> @@: 13043 0000CDE8 89F3 <1> mov bx, si 13044 0000CDEA B9FFFF <1> mov cx, -1 13045 <1> .loop: 13046 0000CDED 41 <1> inc cx 13047 0000CDEE AC <1> lodsb 13048 0000CDEF 3C20 <1> cmp al, 32 13049 0000CDF1 7409 <1> je .end 13050 0000CDF3 3C09 <1> cmp al, 9 13051 0000CDF5 7405 <1> je .end 13052 0000CDF7 E80CEB <1> call iseol? 13053 0000CDFA 75F1 <1> jne .loop 13054 <1> .end: 13055 0000CDFC C644FF00 <1> mov byte [si - 1], 0 ; terminate 13056 0000CE00 E859EB <1> call skipwh0 13057 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 13058 0000CE03 8936[060C] <1> mov word [if_exists_then_address], si 13059 <1> %endif 13060 0000CE07 E807EB <1> call chkeol_or_then 13061 0000CE0A E376 <1> jcxz .empty 13062 0000CE0C 41 <1> inc cx ; space for zero terminator 13063 0000CE0D 41 <1> inc cx ; round up 13064 0000CE0E 80E1FE <1> and cl, ~1 ; align to word 13065 0000CE11 89E5 <1> mov bp, sp 13066 0000CE13 29CC <1> sub sp, cx ; allocate stack space 13067 0000CE15 89DE <1> mov si, bx ; -> label in line_in 13068 0000CE17 89E7 <1> mov di, sp ; -> buffer on stack 13069 0000CE19 57 <1> push di 13070 <1> @@: 13071 0000CE1A AC <1> lodsb 13072 0000CE1B E8F1BD <1> call uppercase ; normalise the name in buffer 13073 0000CE1E AA <1> stosb 13074 0000CE1F E2F9 <1> loop @B ; copy all or all+1 13075 <1> 13076 0000CE21 E890FE <1> call yy_reset_buf_and_seek_start 13077 <1> 13078 <1> .next_line: 13079 0000CE24 800E[A500]88 <1> setopt [internalflags3], dif3_quiet_input_single | dif3_return_eof 13080 0000CE29 31C9 <1> xor cx, cx 13081 0000CE2B E84FF3 <1> call getline.use_dif3_flags 13082 0000CE2E 7228 <1> jc .notfound 13083 0000CE30 89F3 <1> mov bx, si 13084 0000CE32 3C3A <1> cmp al, ':' 13085 0000CE34 75EE <1> jne .next_line 13086 0000CE36 E822EB <1> call skipwhite 13087 0000CE39 5A <1> pop dx 13088 0000CE3A 52 <1> push dx 13089 0000CE3B 4E <1> dec si 13090 0000CE3C E868EA <1> call isstring? 13091 0000CE3F 75E3 <1> jne .next_line 13092 0000CE41 8D77FF <1> lea si, [bx - 1] 13093 0000CE44 AC <1> lodsb 13094 0000CE45 89EC <1> mov sp, bp 13095 0000CE47 E84400 <1> call resetrc 13096 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 13097 0000CE4A F606[A700]08 <1> testopt [internalflags3], dif3_in_if 13098 0000CE4F 7403E934C2 <1> jnz if_exists_found_open 13099 <1> %endif 13100 0000CE54 5A <1> pop dx ; return address to cmd3 13101 0000CE55 E9E934 <1> jmp cmd3_notblank 13102 <1> 13103 <1> .notfound: 13104 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 13105 0000CE58 F606[A700]08 <1> testopt [internalflags3], dif3_in_if 13106 0000CE5D 751B <1> jnz @F 13107 <1> %endif 13108 0000CE5F B80103 <1> mov ax, 0301h 13109 0000CE62 E8C0D6 <1> call setrc 13110 0000CE65 BA[F265] <1> mov dx, msg.goto_not_found.1 13111 0000CE68 E84BEF <1> call putsz_error 13112 0000CE6B 5A <1> pop dx 13113 0000CE6C E847EF <1> call putsz_error 13114 0000CE6F BA[1266] <1> mov dx, msg.goto_not_found.2 13115 0000CE72 E841EF <1> call putsz_error 13116 0000CE75 89EC <1> mov sp, bp 13117 0000CE77 E9C4F5 <1> jmp getline_close_file 13118 <1> 13119 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 13120 <1> @@: 13121 0000CE7A 89EC <1> mov sp, bp 13122 0000CE7C E8BFF5 <1> call getline_close_file 13123 0000CE7F E9F9C1 <1> jmp if_exists_not_found 13124 <1> %endif 13125 <1> 13126 <1> .empty: 13127 0000CE82 B80203 <1> mov ax, 0302h 13128 0000CE85 E89DD6 <1> call setrc 13129 0000CE88 BA[C965] <1> mov dx, msg.goto_empty 13130 0000CE8B E90AFF <1> jmp .error 13131 <1> 13132 <1> 13133 <1> resetrc: 13134 0000CE8E FF36[F20A] <1> push word [priorrc] 13135 0000CE92 8F06[F00A] <1> pop word [rc] 13136 0000CE96 C3 <1> retn 13137 <1> 13138 <1> 13139 <1> %include "serialp.asm" 13140 <2> 13141 <2> %if 0 13142 <2> 13143 <2> Serial port handling code 13144 <2> 13145 <2> 2019 by C. Masloch 13146 <2> based on http://www.sci.muni.cz/docs/pc/serport.txt The Serial Port rel. 14 13147 <2> 13148 <2> Usage of the works is permitted provided that this 13149 <2> instrument is retained with the works, so that any entity 13150 <2> that uses the works is notified of this instrument. 13151 <2> 13152 <2> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 13153 <2> 13154 <2> %endif 13155 <2> 13156 <2> 13157 <2> usesection lDEBUG_DATA_ENTRY 13158 <2> 13159 000095D6 CB <2> iisphwreset serial_interrupt_handler 13160 <2> 13161 000095D7 00 <2> align 2, db 0 13162 000095D8 EB10000000004B4280- <2> iispentry serial_interrupt_handler, 80h, serial_interrupt_handler 13162 000095E1 EBF300 <2> 13163 000095EA 2EF606[EB0B]01 <2> testopt [cs:serial_flags], sf_init_done 13164 000095F0 7505 <2> jnz @F 13165 000095F2 2EFF2E[DA95] <2> jmp far [cs:.next] 13166 <2> @@: 13167 000095F7 50 <2> push ax 13168 000095F8 51 <2> push cx 13169 000095F9 52 <2> push dx ; first save the regs we need to change 13170 000095FA 1E <2> push ds 13171 000095FB 56 <2> push si 13172 <2> 13173 000095FC 0E <2> push cs 13174 000095FD 1F <2> pop ds 13175 000095FE B020 <2> mov al, 20h ; acknowledge interrupt 13176 00009600 803E[2B09]00 <2> cmp byte [serial_use_irqmask + 1], 0 13177 00009605 7402 <2> je @F 13178 00009607 E6A0 <2> out 0A0h, al ; to secondary PIC 13179 <2> @@: 13180 00009609 E620 <2> out 20h, al ; to primary PIC 13181 0000960B FC <2> cld 13182 <2> ih_continue: 13183 0000960C 8B16[2609] <2> mov dx, [baseport] 13184 00009610 42 <2> inc dx 13185 00009611 42 <2> inc dx ; (base + 2) write FCR, read IIR 13186 <2> %if _USE_TX_FIFO 13187 00009612 A0[2109] <2> mov al, byte [serial_fcr_setting] 13188 00009615 24F9 <2> and al, ~ 0000_0110b 13189 00009617 EE <2> out dx, al ; (write FCR) configure FIFOs 13190 00009618 31C0 <2> xor ax, ax 13191 <2> %else 13192 <2> xor ax, ax 13193 <2> out dx, al ; (write FCR) configure FIFOs 13194 <2> nop 13195 <2> %endif 13196 0000961A EC <2> in al, dx ; (read IIR) get interrupt cause 13197 0000961B A801 <2> test al, 1 ; did the UART generate the int? 13198 0000961D 750C <2> jnz ih_sep ; no, then it's somebody else's problem 13199 0000961F 2406 <2> and al, 6 ; mask bits not needed 13200 00009621 89C6 <2> mov si, ax ; make a pointer out of it 13201 00009623 4A <2> dec dx 13202 00009624 4A <2> dec dx ; = base 13203 00009625 FF94[3296] <2> call near word [serial_interrupt_table + si] ; serve this int 13204 00009629 EBE1 <2> jmp ih_continue ; and look for more things to be done 13205 <2> ih_sep: 13206 0000962B 5E <2> pop si 13207 0000962C 1F <2> pop ds 13208 0000962D 5A <2> pop dx ; restore regs 13209 0000962E 59 <2> pop cx 13210 0000962F 58 <2> pop ax 13211 00009630 CF <2> iret 13212 <2> 13213 00009631 00 <2> align 2, db 0 13214 00009632 [3A96][3F96][8796]- <2> serial_interrupt_table: dw int_modem,int_tx,int_rx,int_status 13214 00009638 [DA96] <2> 13215 <2> 13216 <2> 13217 <2> int_modem: 13218 <2> ; just clear modem status, we are not interested in it 13219 0000963A 83C206 <2> add dx, 6 13220 0000963D EC <2> in al, dx ; read MSR 13221 0000963E C3 <2> retn 13222 <2> 13223 <2> 13224 <2> int_tx: 13225 0000963F 8B16[2609] <2> mov dx, [baseport] 13226 00009643 8B36[3209] <2> mov si, word [txtail] 13227 <2> 13228 00009647 52 <2> push dx 13229 00009648 83C205 <2> add dx, 5 13230 0000964B EC <2> in al, dx ; (base + 5) read LSR 13231 0000964C 5A <2> pop dx 13232 0000964D A820 <2> test al, 20h ; Transmitter Holding Register Empty ? 13233 0000964F 7421 <2> jz itx_setup_int ; no, it was a spurious interrupt --> 13234 <2> ; This conditional detects the condition specified in 13235 <2> ; the section "Known problems with several chips": 13236 <2> ; When a 1 is written to the bit 1 (Tx int enab) in the 13237 <2> ; IER, a Tx interrupt is generated. This is an erroneous 13238 <2> ; interrupt if the THRE bit is not set. [So don't set 13239 <2> ; this bit as long as the THRE bit isn't set. CB] 13240 <2> 13241 <2> ; check if there's something to be sent 13242 <2> %if _USE_TX_FIFO 13243 00009651 B90100 <2> mov cx, 1 13244 00009654 F606[EB0B]08 <2> test byte [serial_flags], sf_built_in_fifo 13245 00009659 7404 <2> jz @F 13246 0000965B 8A0E[EA0B] <2> mov cl, byte [serial_fifo_size] 13247 <2> @@: 13248 <2> %endif 13249 <2> itx_more: 13250 0000965F 3B36[3009] <2> cmp si, word [txhead] 13251 00009663 7419 <2> je itx_nothing 13252 00009665 AC <2> lodsb 13253 00009666 EE <2> out dx, al ; write it to the THR 13254 <2> ; check for wrap-around in our fifo 13255 <2> tx_checkwrap 181 00009667 81FE[400A] <3> cmp si, txfifo+_TXFIFOSIZE 182 0000966B 7203 <3> jb %%tx_nowrap 183 0000966D BE[C009] <3> mov si, txfifo 184 <3> %%tx_nowrap: 13256 <2> %if _USE_TX_FIFO 13257 <2> ; send as much bytes as the chip can take when available 13258 00009670 E2ED <2> loop itx_more 13259 <2> %endif 13260 <2> itx_setup_int: 13261 00009672 3B36[3009] <2> cmp si, word [txhead] 13262 00009676 7406 <2> je itx_nothing 13263 00009678 42 <2> inc dx 13264 00009679 B003 <2> mov al, 0000_0011b 13265 0000967B EE <2> out dx, al ; write to IER 13266 0000967C EB04 <2> jmp itx_dontstop 13267 <2> itx_nothing: 13268 <2> ; no more data in the fifo, so inhibit TX interrupts 13269 0000967E 42 <2> inc dx 13270 0000967F B001 <2> mov al, 0000_0001b 13271 00009681 EE <2> out dx, al ; write to IER 13272 <2> itx_dontstop: 13273 00009682 8936[3209] <2> mov word [txtail], si 13274 00009686 C3 <2> retn 13275 <2> 13276 <2> 13277 <2> int_rx: 13278 00009687 8B36[2C09] <2> mov si, word [rxhead] 13279 <2> irx_more: 13280 0000968B 8B16[2609] <2> mov dx, [baseport] 13281 0000968F EC <2> in al, dx ; read from RBR 13282 00009690 3C03 <2> cmp al, 3 13283 00009692 7511 <2> jne @FF 13284 00009694 F606[EB0B]02 <2> testopt [serial_flags], sf_ctrl_c 13285 00009699 7405 <2> jz @F 13286 0000969B 800E[EB0B]04 <2> setopt [serial_flags], sf_double_ctrl_c 13287 <2> @@: 13288 000096A0 800E[EB0B]02 <2> setopt [serial_flags], sf_ctrl_c 13289 <2> @@: 13290 000096A5 8804 <2> mov byte [si], al 13291 000096A7 89F0 <2> mov ax, si 13292 000096A9 46 <2> inc si 13293 <2> ; check for wrap-around 13294 <2> rx_checkwrap 174 000096AA 81FE[C009] <3> cmp si, rxfifo+_RXFIFOSIZE 175 000096AE 7203 <3> jb %%rx_nowrap 176 000096B0 BE[4009] <3> mov si, rxfifo 177 <3> %%rx_nowrap: 13295 000096B3 3936[2E09] <2> cmp word [rxtail], si 13296 000096B7 7415 <2> je @FF 13297 <2> ; see if there are more bytes to be read 13298 000096B9 83C205 <2> add dx, 5 13299 000096BC EC <2> in al, dx ; read LSR 13300 000096BD A801 <2> test al, 1 ; Data Available ? 13301 000096BF 75CA <2> jnz irx_more 13302 <2> .end: 13303 000096C1 8936[2C09] <2> mov word [rxhead], si 13304 <2> ; test al, 20h ; Transmitter Holding Register Empty ? 13305 <2> ; jnz int_tx ; yes, do transmit next --> 13306 <2> ; Sometimes when sending and receiving at the 13307 <2> ; same time, TX ints get lost. This is a cure. 13308 <2> ; retn 13309 000096C5 E977FF <2> jmp int_tx ; (this checks for THRE) 13310 <2> 13311 <2> @@: 13312 000096C8 8B16[2609] <2> mov dx, [baseport] 13313 000096CC EC <2> in al, dx ; read RBR (discard) 13314 000096CD A9 <2> db __TEST_IMM16 ; (skip mov) 13315 <2> @@: 13316 000096CE 89C6 <2> mov si, ax 13317 000096D0 83C205 <2> add dx, 5 13318 000096D3 EC <2> in al, dx ; read LSR 13319 000096D4 A801 <2> test al, 1 ; Data Available ? 13320 000096D6 75F0 <2> jnz @BB 13321 000096D8 EBE7 <2> jmp .end 13322 <2> 13323 <2> 13324 <2> int_status: 13325 <2> ; just clear the status ("this trivial task is left as an exercise 13326 <2> ; to the student") 13327 000096DA 83C205 <2> add dx, 5 13328 000096DD EC <2> in al, dx ; read LSR 13329 000096DE C3 <2> retn 13330 <2> 13331 <2> 13332 <2> usesection lDEBUG_CODE 13333 <2> 13334 <2> ; OUT: ZR if no new character in buffer 13335 <2> ; NZ if new character read, 13336 <2> ; al = character 13337 <2> ; STT: ds = debugger segment 13338 <2> serial_receive_char: 13339 0000CE97 56 <2> push si 13340 <2> ; see if there are bytes to be read from the fifo 13341 0000CE98 8B36[2E09] <2> mov si, word [rxtail] 13342 <2> 13343 0000CE9C 3B36[2C09] <2> cmp si, word [rxhead] 13344 0000CEA0 7412 <2> je .nodata 13345 0000CEA2 AC <2> lodsb 13346 <2> %if _ECHO_RX_TO_TX 13347 <2> %if _RX_TO_TX_ADD_LF 13348 <2> call serial_send_char_add_lf 13349 <2> %else 13350 <2> call serial_send_char 13351 <2> %endif 13352 <2> %endif 13353 <2> ; check for wrap-around 13354 <2> rx_checkwrap 174 0000CEA3 81FE[C009] <3> cmp si, rxfifo+_RXFIFOSIZE 175 0000CEA7 7203 <3> jb %%rx_nowrap 176 0000CEA9 BE[4009] <3> mov si, rxfifo 177 <3> %%rx_nowrap: 13355 0000CEAC 8936[2E09] <2> mov word [rxtail], si 13356 0000CEB0 85F6 <2> test si, si ; (NZ) 13357 0000CEB2 EB02 <2> jmp .return 13358 <2> 13359 <2> .nodata: 13360 0000CEB4 31C0 <2> xor ax, ax ; (ZR) 13361 <2> .return: 13362 0000CEB6 5E <2> pop si 13363 0000CEB7 C3 <2> retn 13364 <2> 13365 <2> 13366 <2> ; OUT: ZR if no new character in buffer 13367 <2> ; NZ if new character available, 13368 <2> ; al = character 13369 <2> ; STT: ds = debugger segment 13370 <2> serial_check_receive_char: 13371 0000CEB8 56 <2> push si 13372 <2> ; see if there are bytes to be read from the fifo 13373 0000CEB9 8B36[2E09] <2> mov si, word [rxtail] 13374 <2> 13375 0000CEBD 3B36[2C09] <2> cmp si, word [rxhead] 13376 0000CEC1 7405 <2> je .nodata 13377 0000CEC3 AC <2> lodsb 13378 0000CEC4 85F6 <2> test si, si ; (NZ) 13379 0000CEC6 EB02 <2> jmp .return 13380 <2> 13381 <2> .nodata: 13382 0000CEC8 31C0 <2> xor ax, ax ; (ZR) 13383 <2> .return: 13384 0000CECA 5E <2> pop si 13385 0000CECB C3 <2> retn 13386 <2> 13387 <2> 13388 <2> ; OUT: NC if successful 13389 <2> ; CY if handler hooked in different interrrupt 13390 <2> ; and couldn't unhook 13391 <2> serial_install_interrupt_handler: 13392 <2> ; install interrupt handler first 13393 0000CECC A0[2209] <2> mov al, byte [serial_use_intnum] 13394 0000CECF F606[A800]01 <2> testopt [internalflags4], dif4_int_serial_hooked 13395 0000CED4 740D <2> jz @F 13396 0000CED6 3A06[120C] <2> cmp al, byte [serial_installed_intnum] 13397 0000CEDA 7418 <2> je .ret ; --> (NC) 13398 0000CEDC 50 <2> push ax 13399 0000CEDD E84A01 <2> call serial_uninstall_interrupt_handler 13400 0000CEE0 58 <2> pop ax 13401 0000CEE1 7211 <2> jc .ret ; --> (CY) 13402 <2> @@: 13403 0000CEE3 A2[120C] <2> mov byte [serial_installed_intnum], al 13404 0000CEE6 BE[D895] <2> mov si, serial_interrupt_handler 13405 0000CEE9 E82802 <2> call install_86m_interrupt_handler 13406 0000CEEC 800E[A800]01 <2> setopt [internalflags4], dif4_int_serial_hooked 13407 0000CEF1 E8A704 <2> call update_inttab_optional 13408 <2> ; (NC) 13409 <2> .ret: 13410 0000CEF4 C3 <2> retn 13411 <2> 13412 <2> 13413 <2> %if 0 13414 <2> 13415 <2> If you do the following: 13416 <2> 13417 <2> r dspvi FF 13418 <2> r dco or= 4000 13419 <2> (wait for KEEP prompt to fail) 13420 <2> r dspvi 0B 13421 <2> r dco or= 4000 13422 <2> (try to reply to the KEEP prompt) 13423 <2> 13424 <2> In dosemu2 the default interrupt handler apparently 13425 <2> doesn't send an EOI to the PIC and thus the interrupts 13426 <2> get stuck when prompting with the correct handler. 13427 <2> Therefore, we should send an EOI to the PIC just in case. 13428 <2> 13429 <2> %endif 13430 <2> 13431 <2> ; INP: word [serial_use_irqmask] 13432 <2> ; CHG: ax 13433 <2> serial_eoi: 13434 0000CEF5 B020 <2> mov al, 20h ; acknowledge interrupt 13435 0000CEF7 803E[2B09]00 <2> cmp byte [serial_use_irqmask + 1], 0 13436 0000CEFC 7402 <2> je @F 13437 0000CEFE E6A0 <2> out 0A0h, al ; to secondary PIC 13438 <2> @@: 13439 0000CF00 E620 <2> out 20h, al ; to primary PIC 13440 0000CF02 C3 <2> retn 13441 <2> 13442 <2> 13443 <2> serial_clear_fifos: 13444 <2> ; clear fifos (not those in the 16550A, but ours) 13445 0000CF03 B8[4009] <2> mov ax, rxfifo 13446 0000CF06 A3[2C09] <2> mov word [rxhead], ax 13447 0000CF09 A3[2E09] <2> mov word [rxtail], ax 13448 0000CF0C B8[C009] <2> mov ax, txfifo 13449 0000CF0F A3[3009] <2> mov word [txhead], ax 13450 0000CF12 A3[3209] <2> mov word [txtail], ax 13451 0000CF15 C3 <2> retn 13452 <2> 13453 <2> 13454 <2> numdef SERIAL_DL_WORD, 0 13455 <2> 13456 <2> serial_init_UART: 13457 0000CF16 E8DCFF <2> call serial_eoi 13458 <2> ; initialize the UART 13459 0000CF19 8B16[2609] <2> mov dx, [baseport] 13460 0000CF1D 83C203 <2> add dx, 3 ; (base + 3) read/write LCR 13461 0000CF20 EC <2> in al, dx ; read LCR 13462 0000CF21 A2[1F09] <2> mov byte [serial_save_lcr], al 13463 0000CF24 B080 <2> mov al, 80h ; DLAB = 1 13464 0000CF26 EE <2> out dx, al ; write LCR, make DL register accessible 13465 0000CF27 52 <2> push dx 13466 0000CF28 8B16[2609] <2> mov dx, [baseport] ; (base) 13467 <2> %if _SERIAL_DL_WORD 13468 <2> in ax, dx ; read bps rate divisor (DL) 13469 <2> mov word [serial_save_dl], ax 13470 <2> mov ax, word [serial_use_dl] 13471 <2> out dx, ax ; write bps rate divisor (DL) 13472 <2> %else 13473 0000CF2C EC <2> in al, dx ; read bps rate divisor low byte (DL) 13474 0000CF2D 42 <2> inc dx 13475 0000CF2E A2[1C09] <2> mov byte [serial_save_dl], al 13476 0000CF31 EC <2> in al, dx ; read bps rate divisor high byte (DL) 13477 0000CF32 A2[1D09] <2> mov byte [serial_save_dl + 1], al 13478 0000CF35 A0[2909] <2> mov al, byte [serial_use_dl + 1] 13479 0000CF38 EE <2> out dx, al ; write bps rate divisor high byte (DL) 13480 0000CF39 4A <2> dec dx 13481 0000CF3A A0[2809] <2> mov al, byte [serial_use_dl] 13482 0000CF3D EE <2> out dx, al ; write bps rate divisor low byte (DL) 13483 <2> %endif 13484 0000CF3E 5A <2> pop dx ; (base + 3) write LCR 13485 0000CF3F A0[2309] <2> mov al, byte [serial_use_params] 13486 <2> ; DLAB = 0 and control parameters 13487 0000CF42 EE <2> out dx, al ; write parameters 13488 <2> 13489 <2> ; is it a 16550A? 13490 0000CF43 4A <2> dec dx ; (base + 2) write FCR, read IIR 13491 <2> %if _USE_TX_FIFO 13492 0000CF44 B007 <2> mov al, 0000_0111b 13493 0000CF46 0A06[2409] <2> or al, byte [serial_use_fifo] 13494 0000CF4A A2[2109] <2> mov byte [serial_fcr_setting], al 13495 0000CF4D EE <2> out dx, al ; (write FCR) try to clear and enable FIFOs 13496 0000CF4E 90 <2> nop 13497 0000CF4F EC <2> in al, dx ; read IIR 13498 0000CF50 800E[EB0B]08 <2> or byte [serial_flags], sf_built_in_fifo 13499 <2> ; in case of built-in tx FIFO 13500 0000CF55 24C0 <2> and al, 1100_0000b ; mask of FIFO functional bits 13501 0000CF57 3CC0 <2> cmp al, 1100_0000b ; both bits set ? 13502 0000CF59 740B <2> je @F ; yes --> 13503 0000CF5B 8026[EB0B]F7 <2> and byte [serial_flags], ~ sf_built_in_fifo 13504 <2> ; no built-in tx FIFO 13505 0000CF60 31C0 <2> xor ax, ax 13506 0000CF62 A2[2109] <2> mov byte [serial_fcr_setting], al 13507 0000CF65 EE <2> out dx, al ; (write FCR) disable the FIFOs 13508 <2> @@: 13509 <2> %else 13510 <2> xor ax, ax 13511 <2> out dx, al ; (write FCR) disable the FIFOs 13512 <2> %endif 13513 0000CF66 4A <2> dec dx ; (base + 1) 13514 0000CF67 EC <2> in al, dx ; read IER 13515 0000CF68 A2[1E09] <2> mov byte [serial_save_ier], al 13516 0000CF6B B001 <2> mov al, 0000_0001b ; allow RX interrupts 13517 0000CF6D EE <2> out dx, al ; write to IER 13518 0000CF6E 4A <2> dec dx ; (base + 0) read RBR 13519 0000CF6F EC <2> in al, dx ; clear receiver 13520 0000CF70 83C205 <2> add dx, 5 ; (base + 5) read LSR 13521 0000CF73 EC <2> in al, dx ; clear line status 13522 0000CF74 42 <2> inc dx ; (base + 6) read MSR 13523 0000CF75 EC <2> in al, dx ; clear modem status 13524 <2> ; free interrupt in the ICU 13525 0000CF76 8B0E[2A09] <2> mov cx, word [serial_use_irqmask] 13526 0000CF7A F7D1 <2> not cx ; negated mask of bits to change 13527 0000CF7C 31DB <2> xor bx, bx ; all bits clear (= IRQ ON) 13528 0000CF7E E81200 <2> call set_irq 13529 0000CF81 891E[1A09] <2> mov word [serial_save_irq_off], bx 13530 0000CF85 890E[1809] <2> mov word [serial_save_irq_mask], cx 13531 <2> ; and enable ints from the UART 13532 0000CF89 4A <2> dec dx 13533 0000CF8A 4A <2> dec dx ; (base + 4) 13534 0000CF8B EC <2> in al, dx ; read MCR 13535 0000CF8C A2[2009] <2> mov byte [serial_save_mcr], al 13536 0000CF8F B008 <2> mov al, 0000_1000b 13537 0000CF91 EE <2> out dx, al ; write MCR 13538 0000CF92 C3 <2> retn 13539 <2> 13540 <2> ; INP: cx = negated mask of bits to change 13541 <2> ; (if bit is clear, modify corresponding IRQ) 13542 <2> ; bx = mask of what to set bits to (0 = IRQ ON, 1 = IRQ OFF) 13543 <2> ; OUT: bx = mask of bits previously set 13544 <2> ; CHG: ax 13545 <2> set_irq: 13546 0000CF93 52 <2> push dx 13547 0000CF94 BA0100 <2> mov dx, 1 13548 <2> .loop: 13549 0000CF97 85CA <2> test dx, cx 13550 0000CF99 753E <2> jnz .next 13551 0000CF9B 84D2 <2> test dl, dl 13552 0000CF9D 741E <2> jz .high 13553 <2> 13554 <2> .low: 13555 0000CF9F E421 <2> in al, 21h ; get PIC configuration 13556 0000CFA1 50 <2> push ax 13557 0000CFA2 F7D2 <2> not dx ; dx = mask of bits to keep 13558 0000CFA4 20D0 <2> and al, dl ; mask to 0 the bit to set 13559 0000CFA6 53 <2> push bx 13560 0000CFA7 F7D2 <2> not dx ; dx = mask of bits to change 13561 0000CFA9 20D3 <2> and bl, dl ; get bit state to change to 13562 0000CFAB 08D8 <2> or al, bl ; set this bit state 13563 0000CFAD E621 <2> out 21h, al ; configure the PIC 13564 0000CFAF 5B <2> pop bx ; = saved states / still to set states 13565 0000CFB0 F7D2 <2> not dx ; dx = mask of bits to keep 13566 0000CFB2 58 <2> pop ax ; = prior config 13567 0000CFB3 20D3 <2> and bl, dl ; clear bits to change 13568 0000CFB5 F7D2 <2> not dx ; dx = mask of bits to change 13569 0000CFB7 20D0 <2> and al, dl ; separate out only bits to change 13570 0000CFB9 08C3 <2> or bl, al ; set in bx 13571 0000CFBB EB1C <2> jmp .next 13572 <2> 13573 <2> .high: 13574 0000CFBD E4A1 <2> in al, 0A1h ; get PIC configuration 13575 0000CFBF 50 <2> push ax 13576 0000CFC0 F7D2 <2> not dx ; dx = mask of bits to keep 13577 0000CFC2 20F0 <2> and al, dh ; mask to 0 the bit to set 13578 0000CFC4 53 <2> push bx 13579 0000CFC5 F7D2 <2> not dx ; dx = mask of bits to change 13580 0000CFC7 20F7 <2> and bh, dh ; get bit state to change to 13581 0000CFC9 08F8 <2> or al, bh ; set this bit state 13582 0000CFCB E6A1 <2> out 0A1h, al ; configure the PIC 13583 0000CFCD 5B <2> pop bx ; = saved states / still to set states 13584 0000CFCE F7D2 <2> not dx ; dx = mask of bits to keep 13585 0000CFD0 58 <2> pop ax ; = prior config 13586 0000CFD1 20F7 <2> and bh, dh ; clear bits to change 13587 0000CFD3 F7D2 <2> not dx ; dx = mask of bits to change 13588 0000CFD5 20F0 <2> and al, dh ; separate out only bits to change 13589 0000CFD7 08C7 <2> or bh, al ; set in bx 13590 <2> 13591 <2> .next: 13592 0000CFD9 01D2 <2> add dx, dx 13593 0000CFDB 75BA <2> jnz .loop 13594 0000CFDD 5A <2> pop dx 13595 0000CFDE C3 <2> retn 13596 <2> 13597 <2> 13598 <2> ; OUT: NC if successful 13599 <2> ; CY if couldn't unhook 13600 <2> serial_clean_up: 13601 0000CFDF E813FF <2> call serial_eoi 13602 0000CFE2 31C0 <2> xor ax, ax 13603 0000CFE4 8B16[2609] <2> mov dx, [baseport] 13604 0000CFE8 83C204 <2> add dx, 4 ; (base + 4) 13605 <2> ; disconnect the UART from the int line 13606 0000CFEB EE <2> out dx, al ; write MCR 13607 0000CFEC 4A <2> dec dx 13608 0000CFED 4A <2> dec dx 13609 0000CFEE 4A <2> dec dx ; (base + 1) disable UART ints 13610 0000CFEF EE <2> out dx, al ; write IER 13611 0000CFF0 42 <2> inc dx ; (base + 2) 13612 <2> ; disable the FIFOs (old software relies on it) 13613 0000CFF1 EE <2> out dx, al ; write FCR 13614 <2> 13615 <2> ; reset the UART 13616 0000CFF2 8B16[2609] <2> mov dx, [baseport] 13617 0000CFF6 83C203 <2> add dx, 3 ; (base + 3) read/write LCR 13618 0000CFF9 B080 <2> mov al, 80h ; DLAB = 1 13619 0000CFFB EE <2> out dx, al ; write LCR, make DL register accessible 13620 0000CFFC 52 <2> push dx 13621 0000CFFD 8B16[2609] <2> mov dx, [baseport] ; (base) 13622 <2> %if _SERIAL_DL_WORD 13623 <2> mov ax, word [serial_save_dl] 13624 <2> out dx, ax ; write bps rate divisor (DL) 13625 <2> %else 13626 0000D001 A0[1C09] <2> mov al, byte [serial_save_dl] 13627 0000D004 EE <2> out dx, al ; write bps rate divisor low byte (DL) 13628 0000D005 42 <2> inc dx 13629 0000D006 A0[1D09] <2> mov al, byte [serial_save_dl + 1] 13630 0000D009 EE <2> out dx, al ; write bps rate divisor high byte (DL) 13631 <2> %endif 13632 0000D00A 5A <2> pop dx ; (base + 3) write LCR 13633 0000D00B A0[1F09] <2> mov al, byte [serial_save_lcr] 13634 0000D00E EE <2> out dx, al ; write parameters 13635 <2> 13636 0000D00F 4A <2> dec dx ; (base + 2) write FCR, read IIR 13637 0000D010 31C0 <2> xor ax, ax 13638 0000D012 EE <2> out dx, al ; (write FCR) disable the FIFOs 13639 0000D013 4A <2> dec dx ; (base + 1) 13640 0000D014 A0[1E09] <2> mov al, byte [serial_save_ier] 13641 0000D017 EE <2> out dx, al ; write to IER 13642 0000D018 8B1E[1A09] <2> mov bx, [serial_save_irq_off] 13643 <2> ; bits clear for IRQ ON 13644 0000D01C 8B0E[1809] <2> mov cx, [serial_save_irq_mask] 13645 <2> ; negated mask of bits to change 13646 0000D020 E870FF <2> call set_irq 13647 0000D023 42 <2> inc dx 13648 0000D024 42 <2> inc dx 13649 0000D025 42 <2> inc dx ; (base + 4) 13650 0000D026 A0[2009] <2> mov al, byte [serial_save_mcr] 13651 0000D029 EE <2> out dx, al ; write MCR 13652 <2> 13653 <2> ; restore int vector 13654 <2> ; OUT: NC if successful 13655 <2> ; CY if couldn't unhook 13656 <2> serial_uninstall_interrupt_handler: 13657 0000D02A BE[D895] <2> mov si, serial_interrupt_handler 13658 0000D02D A0[120C] <2> mov al, byte [serial_installed_intnum] 13659 0000D030 BA0100 <2> mov dx, opt4_int_serial_force >> 16 13660 0000D033 E85802 <2> call UnhookInterruptForce 13661 0000D036 7208 <2> jc @F 13662 0000D038 8026[A800]FE <2> clropt [internalflags4], dif4_int_serial_hooked 13663 0000D03D E85B03 <2> call update_inttab_optional 13664 <2> ; (NC) 13665 <2> @@: 13666 0000D040 C3 <2> retn 13667 <2> 13668 <2> 13669 <2> serial_send_char_add_lf: 13670 0000D041 50 <2> push ax 13671 <2> .loop: 13672 0000D042 E80800 <2> call serial_send_char 13673 0000D045 3C0D <2> cmp al, 13 ; add LF after CR; change it if you don't like it 13674 0000D047 B00A <2> mov al, 10 13675 0000D049 74F7 <2> je .loop 13676 0000D04B 58 <2> pop ax 13677 0000D04C C3 <2> retn 13678 <2> 13679 <2> serial_send_char: 13680 0000D04D 56 <2> push si 13681 0000D04E 51 <2> push cx 13682 0000D04F 52 <2> push dx 13683 0000D050 06 <2> push es 13684 <2> 13685 0000D051 8B36[3009] <2> mov si, word [txhead] 13686 0000D055 8804 <2> mov byte [si],al 13687 0000D057 46 <2> inc si 13688 <2> ; check for wrap-around 13689 <2> tx_checkwrap 181 0000D058 81FE[400A] <3> cmp si, txfifo+_TXFIFOSIZE 182 0000D05C 7203 <3> jb %%tx_nowrap 183 0000D05E BE[C009] <3> mov si, txfifo 184 <3> %%tx_nowrap: 13690 <2> 13691 0000D061 50 <2> push ax 13692 <2> %if _PM 13693 0000D062 50 <2> push ax 13694 0000D063 E84F00 <2> call push_if 13695 <2> %else 13696 <2> pushf 13697 <2> %endif 13698 0000D066 3936[3209] <2> cmp word [txtail], si 13699 0000D06A 7537 <2> jne .no_wait 13700 <2> 13701 <2> ; Because we enable the tx empty interrupt 13702 <2> ; when putting data into the buffer, it 13703 <2> ; should still be enabled here when the 13704 <2> ; buffer is currently full. So we only 13705 <2> ; need to wait for the interrupt to 13706 <2> ; occur and be processed by our handler. 13707 <2> 13708 0000D06C 31C9 <2> xor cx, cx 13709 0000D06E BA4000 <2> mov dx, 40h ; 0040h is a bimodal segment/selector 13710 0000D071 8EC2 <2> mov es, dx 13711 <2> .wait_reset_dx: 13712 0000D073 268B166C00 <2> mov dx, word [es:6Ch] 13713 <2> 13714 <2> .wait: 13715 0000D078 E86CF0 <2> call idle 13716 <2> %if _PM 13717 0000D07B E85A00 <2> call pop_if 13718 0000D07E 50 <2> push ax 13719 0000D07F E83300 <2> call push_if 13720 <2> %else 13721 <2> popf 13722 <2> pushf 13723 <2> %endif 13724 <2> 13725 0000D082 3B36[3209] <2> cmp si, word [txtail] 13726 0000D086 751B <2> jne .no_wait 13727 <2> 13728 0000D088 263B166C00 <2> cmp dx, word [es:6Ch] 13729 0000D08D 74E9 <2> je .wait 13730 0000D08F 41 <2> inc cx 13731 0000D090 83F95A <2> cmp cx, 5 * 18 13732 0000D093 72DE <2> jb .wait_reset_dx 13733 <2> 13734 0000D095 8026[7D00]BF <2> clropt [options], enable_serial 13735 0000D09A BA[6969] <2> mov dx, msg.no_progress 13736 0000D09D E81CED <2> call putsz 13737 0000D0A0 E95D2F <2> jmp cmd3 13738 <2> 13739 <2> .no_wait: 13740 0000D0A3 8936[3009] <2> mov word [txhead], si 13741 0000D0A7 FA <2> cli ; try to avoid interrupt while emptying buffer 13742 <2> ; test if we can send a byte right away 13743 <2> %if 0 ; int_tx checks for THRE ...- 13744 <2> mov dx, [baseport] 13745 <2> add dx, 5 ; (base + 5) 13746 <2> in al, dx ; read LSR 13747 <2> test al, 20h ; Transmitter Holding Register Empty ? 13748 <2> jz .crank ; no, just enable the interrupt --> 13749 <2> %endif 13750 <2> 13751 <2> ; call int_tx ; send bytes, enables or disables the tx interrupt 13752 0000D0A8 0E <2> push cs 13753 0000D0A9 E84C00 <2> call code_to_int_tx 13754 <2> 13755 <2> %if 0 ; -... and sets up the interrupt accordingly 13756 <2> jmp .dontcrank 13757 <2> .crank: 13758 <2> ; crank it up 13759 <2> ; note that this might not work with some very old 8250s 13760 <2> add dx, 1 - 5 ; (base + 1) write IER 13761 <2> mov al, 0000_0011b 13762 <2> out dx, al ; enable tx empty interrupt 13763 <2> .dontcrank: 13764 <2> %endif 13765 <2> %if _PM 13766 0000D0AC E82900 <2> call pop_if 13767 <2> %else 13768 <2> popf 13769 <2> %endif 13770 0000D0AF 58 <2> pop ax 13771 0000D0B0 07 <2> pop es 13772 0000D0B1 5A <2> pop dx 13773 0000D0B2 59 <2> pop cx 13774 0000D0B3 5E <2> pop si 13775 0000D0B4 C3 <2> retn 13776 <2> 13777 <2> %if _PM 13778 <2> push_if: 13779 <2> lframe near 13780 <2> lpar word, flags 13781 <2> lpar_return 13782 0000D0B5 5589E5 <2> lenter 13783 0000D0B8 E80EC1 <2> call ispm 13784 0000D0BB 7515 <2> jnz .86m 13785 <2> .pm: 13786 0000D0BD 50 <2> push ax 13787 0000D0BE B80209 <2> mov ax, 0902h 13788 0000D0C1 CD31 <2> int 31h 13789 0000D0C3 84C0 <2> test al, al ; 0 = disabled ? 13790 0000D0C5 B80000 <2> mov ax, 0 ; initialise to IF=0 13791 0000D0C8 7402 <2> jz @F 13792 0000D0CA B402 <2> mov ah, 2 ; else, IF=1 13793 <2> @@: 13794 0000D0CC 894604 <2> mov word [bp + ?flags], ax 13795 0000D0CF 58 <2> pop ax 13796 0000D0D0 EB04 <2> jmp .end 13797 <2> .86m: 13798 0000D0D2 9C <2> pushf 13799 0000D0D3 8F4604 <2> pop word [bp + ?flags] 13800 <2> .end: 13801 0000D0D6 5D <2> lleave 13802 0000D0D7 C3 <2> lret 13803 <2> 13804 <2> pop_if: 13805 <2> lframe near 13806 <2> lpar word, flags 13807 0000D0D8 5589E5 <2> lenter 13808 0000D0DB E8EBC0 <2> call ispm 13809 0000D0DE 7510 <2> jnz .86m 13810 0000D0E0 50 <2> push ax 13811 0000D0E1 B80009 <2> mov ax, 0900h ; initialise to disable VIF = 0900h 13812 0000D0E4 F6460502 <2> test byte [bp + ?flags + 1], 2 13813 0000D0E8 7401 <2> jz @F ; if to disable --> 13814 0000D0EA 40 <2> inc ax ; else enable VIF = 0901h 13815 <2> @@: 13816 0000D0EB CD31 <2> int 31h 13817 0000D0ED 58 <2> pop ax 13818 0000D0EE EB04 <2> jmp .end 13819 <2> .86m: 13820 0000D0F0 FF7604 <2> push word [bp + ?flags] 13821 0000D0F3 9D <2> popf 13822 <2> .end: 13823 0000D0F4 5D <2> lleave 13824 0000D0F5 C20200 <2> lret 13825 <2> %endif 13826 <2> 13827 <2> code_to_int_tx: 13828 0000D0F8 2EFF36[12D1] <2> push word [cs:.entry_retf_word] 13829 <2> %if _PM 13830 <2> ; near return address 13831 0000D0FD E8C9C0 <2> call ispm 13832 0000D100 7506 <2> jnz .rm 13833 <2> 13834 0000D102 FF36[D688] <2> push word [cssel] 13835 0000D106 EB01 <2> jmp @F 13836 <2> 13837 <2> %endif 13838 <2> .rm: 13839 0000D108 16 <2> push ss 13840 <2> @@: 13841 0000D109 2EFF36[10D1] <2> push word [cs:.int_tx_word] 13842 0000D10E CB <2> retf ; jump to lDEBUG_DATA_ENTRY:int_tx 13843 <2> 13844 0000D10F 00 <2> align 2, db 0 13845 <2> .int_tx_word: 13846 0000D110 [3F96] <2> dw int_tx 13847 <2> .entry_retf_word: 13848 0000D112 [DF96] <2> dw entry_retf 13849 <2> 13850 <2> 13851 <2> usesection lDEBUG_DATA_ENTRY 13852 <2> 13853 <2> entry_retf: 13854 000096DF CB <2> retf 9306 9307 9308 %include "ints.asm" 9309 <1> 9310 <1> %if 0 9311 <1> 9312 <1> Interrupt hooking and unhooking 9313 <1> 9314 <1> 2021 by C. Masloch 9315 <1> 9316 <1> Usage of the works is permitted provided that this 9317 <1> instrument is retained with the works, so that any entity 9318 <1> that uses the works is notified of this instrument. 9319 <1> 9320 <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 9321 <1> 9322 <1> %endif 9323 <1> 9324 <1> usesection lDEBUG_CODE 9325 <1> 9326 <1> 9327 <1> ; INP: 86 Mode ss = word [pspdbg] = cs for handler 9328 <1> ; si -> handler entrypoint 9329 <1> ; dword [si + ieNext] = storage for next vector 9330 <1> ; al = interrupt number 9331 <1> ; CHG: ax, bx, cx, dx 9332 <1> ; STT: ss = ds (= word [pspdbg] if in 86 Mode) 9333 <1> install_86m_interrupt_handler: 9334 <1> %if _PM 9335 0000D114 E8B2C0 <1> call ispm 9336 0000D117 7518 <1> jnz .rm 9337 <1> 9338 0000D119 93 <1> xchg ax, bx ; bl = interrupt number 9339 0000D11A B80002 <1> mov ax, 0200h 9340 0000D11D CD31 <1> int 31h ; cx:dx = interrupt vector 9341 0000D11F 895402 <1> mov word [si + ieNext], dx 9342 0000D122 894C04 <1> mov word [si + ieNext + 2], cx 9343 <1> 9344 0000D125 B80102 <1> mov ax, 0201h 9345 <1> ; bl still = interrupt number 9346 0000D128 8B0E[A60A] <1> mov cx, word [pspdbg] ; cx => lDEBUG_DATA_ENTRY 9347 0000D12C 89F2 <1> mov dx, si ; cx:dx -> our entrypoint 9348 0000D12E CD31 <1> int 31h ; change vector to our handler 9349 0000D130 C3 <1> retn 9350 <1> 9351 <1> .rm: 9352 <1> %endif 9353 <1> 9354 0000D131 E876D5 <1> call InDos 9355 0000D134 741E <1> jz .notindos 9356 0000D136 06 <1> push es 9357 0000D137 1E <1> push ds 9358 0000D138 31DB <1> xor bx, bx 9359 0000D13A 8EDB <1> mov ds, bx 9360 0000D13C 88C3 <1> mov bl, al 9361 0000D13E 01DB <1> add bx, bx 9362 0000D140 01DB <1> add bx, bx ; ds:bx -> interrupt vector 9363 0000D142 C417 <1> les dx, [bx] ; es:dx = vector 9364 0000D144 36895402 <1> mov word [ss:si + ieNext], dx 9365 0000D148 368C4404 <1> mov word [ss:si + ieNext + 2], es 9366 <1> ; save prior vector 9367 0000D14C 8937 <1> mov word [bx], si 9368 0000D14E 8C5702 <1> mov word [bx + 2], ss ; ss => lDEBUG_DATA_ENTRY 9369 <1> ; change vector to our handler 9370 0000D151 1F <1> pop ds 9371 0000D152 07 <1> pop es 9372 0000D153 C3 <1> retn 9373 <1> 9374 <1> .notindos: 9375 0000D154 06 <1> push es 9376 0000D155 B435 <1> mov ah, 35h 9377 0000D157 CD21 <1> int 21h 9378 0000D159 895C02 <1> mov word [si + ieNext], bx 9379 0000D15C 8C4404 <1> mov word [si + ieNext + 2], es 9380 0000D15F 07 <1> pop es 9381 0000D160 B425 <1> mov ah, 25h 9382 0000D162 89F2 <1> mov dx, si ; ds => lDEBUG_DATA_ENTRY 9383 0000D164 CD21 <1> int 21h ; change vector to our handler 9384 0000D166 C3 <1> retn 9385 <1> 9386 <1> 9387 <1> %if _PM 9388 <1> get_86m_interrupt_handler_no_dos: 9389 0000D167 E85FC0 <1> call ispm 9390 0000D16A 7519 <1> jnz get_86m_interrupt_handler.rm_indos 9391 <1> %endif 9392 <1> 9393 <1> ; INP: al = interrupt number 9394 <1> ; OUT: dx:bx = 86 Mode far pointer 9395 <1> ; CHG: ah 9396 <1> get_86m_interrupt_handler: 9397 <1> %if _PM 9398 0000D16C E85AC0 <1> call ispm 9399 0000D16F 750F <1> jnz .rm 9400 <1> 9401 0000D171 50 <1> push ax 9402 0000D172 51 <1> push cx 9403 0000D173 93 <1> xchg ax, bx ; bl = interrupt number 9404 0000D174 B80002 <1> mov ax, 0200h 9405 0000D177 CD31 <1> int 31h ; cx:dx = interrupt vector 9406 0000D179 87CB <1> xchg cx, bx ; bx:dx 9407 0000D17B 87DA <1> xchg bx, dx ; dx:bx 9408 0000D17D 59 <1> pop cx 9409 0000D17E 58 <1> pop ax 9410 0000D17F C3 <1> retn 9411 <1> 9412 <1> .rm: 9413 <1> %endif 9414 <1> 9415 0000D180 E827D5 <1> call InDos 9416 0000D183 7412 <1> jz .notindos 9417 <1> %ifn _PM 9418 <1> get_86m_interrupt_handler_no_dos: equ $ 9419 <1> %endif 9420 <1> .rm_indos: 9421 0000D185 1E <1> push ds 9422 0000D186 31DB <1> xor bx, bx 9423 0000D188 8EDB <1> mov ds, bx 9424 0000D18A 88C3 <1> mov bl, al 9425 0000D18C 01DB <1> add bx, bx 9426 0000D18E 01DB <1> add bx, bx ; ds:bx -> interrupt vector 9427 0000D190 8B5702 <1> mov dx, word [bx + 2] 9428 0000D193 8B1F <1> mov bx, word [bx] 9429 0000D195 1F <1> pop ds 9430 0000D196 C3 <1> retn 9431 <1> 9432 <1> .notindos: 9433 0000D197 06 <1> push es 9434 0000D198 B435 <1> mov ah, 35h 9435 0000D19A CD21 <1> int 21h 9436 0000D19C 8CC2 <1> mov dx, es 9437 0000D19E 07 <1> pop es 9438 0000D19F C3 <1> retn 9439 <1> 9440 <1> 9441 <1> ; INP: al = interrupt number 9442 <1> ; OUT: ZR if offset = -1 or segment = 0 9443 <1> ; NZ else 9444 <1> ; CHG: ah, dx, bx 9445 <1> intchk: 9446 0000D1A0 E8C9FF <1> call get_86m_interrupt_handler 9447 0000D1A3 43 <1> inc bx 9448 0000D1A4 7402 <1> jz @F ; was 0FFFFh --> 9449 0000D1A6 85D2 <1> test dx, dx 9450 <1> ; jz @F ; was 0000h --> 9451 <1> @@: 9452 0000D1A8 C3 <1> retn 9453 <1> 9454 <1> 9455 <1> ; INP: al = interrupt number 9456 <1> ; dx:bx = 86 Mode far pointer 9457 <1> ; CHG: ah 9458 <1> set_86m_interrupt_handler: 9459 0000D1A9 50 <1> push ax 9460 0000D1AA 53 <1> push bx 9461 0000D1AB 51 <1> push cx 9462 0000D1AC 52 <1> push dx 9463 <1> %if _PM 9464 0000D1AD E819C0 <1> call ispm 9465 0000D1B0 750A <1> jnz .rm 9466 <1> 9467 0000D1B2 93 <1> xchg ax, bx ; bl = interrupt number, 9468 <1> ; dx:ax = vector 9469 0000D1B3 92 <1> xchg ax, dx ; ax:dx 9470 0000D1B4 91 <1> xchg cx, ax ; cx:dx 9471 0000D1B5 B80102 <1> mov ax, 0201h 9472 0000D1B8 CD31 <1> int 31h ; cx:dx = interrupt vector 9473 0000D1BA EB21 <1> jmp .ret 9474 <1> 9475 <1> .rm: 9476 <1> %endif 9477 <1> 9478 0000D1BC 1E <1> push ds 9479 0000D1BD E8EAD4 <1> call InDos 9480 0000D1C0 7412 <1> jz .notindos 9481 0000D1C2 53 <1> push bx 9482 0000D1C3 31DB <1> xor bx, bx 9483 0000D1C5 8EDB <1> mov ds, bx 9484 0000D1C7 88C3 <1> mov bl, al 9485 0000D1C9 01DB <1> add bx, bx 9486 0000D1CB 01DB <1> add bx, bx ; ds:bx -> interrupt vector 9487 0000D1CD 895702 <1> mov word [bx + 2], dx 9488 0000D1D0 8F07 <1> pop word [bx] 9489 0000D1D2 EB08 <1> jmp .ret_ds 9490 <1> 9491 <1> .notindos: 9492 0000D1D4 87DA <1> xchg bx, dx 9493 0000D1D6 8EDB <1> mov ds, bx ; ds:dx = vector 9494 0000D1D8 B425 <1> mov ah, 25h 9495 0000D1DA CD21 <1> int 21h 9496 <1> .ret_ds: 9497 0000D1DC 1F <1> pop ds 9498 <1> .ret: 9499 0000D1DD 5A <1> pop dx 9500 0000D1DE 59 <1> pop cx 9501 0000D1DF 5B <1> pop bx 9502 0000D1E0 58 <1> pop ax 9503 0000D1E1 C3 <1> retn 9504 <1> 9505 <1> 9506 <1> ; INP: dx = 86 Mode segment to access 9507 <1> ; OUT: es => segment 9508 <1> ; CHG: - 9509 <1> %if _PM 9510 <1> setes2dx: 9511 0000D1E2 E8E4BF <1> call ispm 9512 0000D1E5 7508 <1> jnz @F 9513 0000D1E7 53 <1> push bx 9514 0000D1E8 E8D8C6 <1> call setrmsegm 9515 0000D1EB 8EC3 <1> mov es, bx 9516 0000D1ED 5B <1> pop bx 9517 0000D1EE C3 <1> retn 9518 <1> 9519 <1> @@: 9520 0000D1EF 8EC2 <1> mov es, dx 9521 0000D1F1 C3 <1> retn 9522 <1> %endif ; _PM 9523 <1> 9524 <1> 9525 <1> ; INP: ds:si -> source IISP header (or pseudo header) 9526 <1> ; es:di -> destination IISP header 9527 <1> ; OUT: EI 9528 <1> ; si and di both incremented by 6 9529 <1> ; CHG: - 9530 <1> ; STT: UP 9531 <1> update_iisp_header: 9532 0000D1F2 50 <1> push ax 9533 0000D1F3 51 <1> push cx 9534 0000D1F4 52 <1> push dx 9535 0000D1F5 57 <1> push di 9536 0000D1F6 56 <1> push si 9537 0000D1F7 06 <1> push es 9538 <1> %if _PM 9539 0000D1F8 E8828B <1> call selector_to_segment 9540 <1> %endif 9541 0000D1FB 1E <1> push ds 9542 0000D1FC 16 <1> push ss 9543 0000D1FD 1F <1> pop ds 9544 <1> 9545 <1> findinstalleddebugger: 9546 0000D1FE B02D <1> mov al, 2Dh 9547 0000D200 53 <1> push bx 9548 0000D201 E89CFF <1> call intchk 9549 0000D204 5B <1> pop bx 9550 0000D205 741E <1> jz .zero 9551 <1> 9552 0000D207 F606[8700]08 <1> testopt [options3], opt3_no_call_update 9553 0000D20C 7517 <1> jnz .zero 9554 <1> 9555 0000D20E 8A26[4981] <1> mov ah, byte [try_debugger_amis_multiplex_number] 9556 0000D212 E81400 <1> call .check 9557 0000D215 7305 <1> jnc @F 9558 <1> 9559 0000D217 B4FF <1> mov ah, 0FFh ; start with multiplex number 0FFh 9560 <1> .loop: 9561 0000D219 E80D00 <1> call .check 9562 <1> @@: 9563 0000D21C B030 <1> mov al, 30h ; al = 30h to indicate found, ah = multiplex number 9564 0000D21E 732E <1> jnc .end 9565 0000D220 80EC01 <1> sub ah, 1 ; search is backward (to find latest installed first), from 0FFh to 00h including 9566 0000D223 73F4 <1> jnc .loop ; try next if we didn't check all yet --> 9567 <1> 9568 <1> .zero: 9569 0000D225 31C0 <1> xor ax, ax ; al = 0 to indicate none found 9570 0000D227 EB25 <1> jmp .end ; If not found, continue --> 9571 <1> 9572 <1> 9573 <1> ; INP: ah = multiplex number to check 9574 <1> ; ds = ss = cs 9575 <1> ; OUT: CY if multiplex number unused or no signature match, 9576 <1> ; bp, ah, ds unmodified 9577 <1> ; NC if match found, 9578 <1> ; ah = multiplex number (unmodified) 9579 <1> ; CHG: si, di, es, cx, dx 9580 <1> .check: 9581 0000D229 F606[A800]08 <1> testopt [internalflags4], dif4_int_2D_hooked 9582 0000D22E 7406 <1> jz @F 9583 0000D230 3A26[6081] <1> cmp ah, byte [amis_multiplex_number] 9584 0000D234 7416 <1> je .notfound ; do not use our own multiplexer --> 9585 <1> @@: 9586 0000D236 B000 <1> mov al, 00h ; AMIS installation check 9587 <1> %if _PM 9588 0000D238 E8F8C0 <1> call call_int2D 9589 <1> %else 9590 <1> int 2Dh ; AMIS (or "DOS reserved" = iret if no AMIS present) 9591 <1> %endif 9592 0000D23B 3CFF <1> cmp al, 0FFh 9593 0000D23D 750D <1> jne .notfound 9594 0000D23F BE[1881] <1> mov si, debuggeramissig ; ds:si -> our AMIS name strings 9595 <1> %if _PM 9596 0000D242 E89DFF <1> call setes2dx 9597 <1> %else 9598 <1> mov es, dx ; es:di -> name strings of AMIS multiplexer that just answered 9599 <1> %endif 9600 0000D245 B90800 <1> mov cx, 8 ; Ignore description, only compare vendor and program name 9601 0000D248 F3A7 <1> repe cmpsw 9602 0000D24A 7401 <1> je .checkret ; ZR, NC = match --> 9603 <1> .notfound: 9604 0000D24C F9 <1> stc ; NZ, CY no match 9605 <1> .checkret: 9606 0000D24D C3 <1> retn 9607 <1> 9608 <1> .end: 9609 0000D24E A3[1681] <1> mov word [debuggerfunction], ax 9610 <1> 9611 0000D251 1F <1> pop ds ; must be not using scratchsel ! 9612 <1> %if _PM 9613 0000D252 5A <1> pop dx 9614 0000D253 E88CFF <1> call setes2dx ; this one uses scratchsel 9615 <1> %else 9616 <1> pop es 9617 <1> %endif 9618 0000D256 5E <1> pop si 9619 0000D257 5F <1> pop di 9620 0000D258 5A <1> pop dx 9621 0000D259 59 <1> pop cx 9622 <1> ; push ax 9623 0000D25A 36A1[1681] <1> mov ax, word [ss:debuggerfunction] 9624 0000D25E 85C0 <1> test ax, ax ; found the debugger ? 9625 0000D260 741F <1> jz @F ; no --> 9626 <1> %if _PM 9627 0000D262 E864BF <1> call ispm 9628 0000D265 7512 <1> jnz .86m 9629 <1> [cpu 286] 9630 0000D267 06 <1> push es ; es 9631 0000D268 E8128B <1> call selector_to_segment ; convert to segment 9632 0000D26B 1E <1> push ds ; ds 9633 0000D26C E80E8B <1> call selector_to_segment ; convert to segment 9634 0000D26F 6A2D <1> push word 2Dh ; int 2Dh 9635 0000D271 55 <1> push bp ; bp 9636 0000D272 E829C0 <1> call intcall_return_parameter_es_parameter_ds 9637 0000D275 83C404 <1> add sp, 4 ; discard returned ds, es 9638 <1> __CPU__ 9639 0000D278 A9 <1> db __TEST_IMM16 ; (skip int) 9640 <1> %endif 9641 <1> .86m: 9642 0000D279 CD2D <1> int 2Dh ; call its Update IISP Header function 9643 0000D27B 3CFF <1> cmp al, 0FFh ; supported ? 9644 0000D27D 58 <1> pop ax 9645 0000D27E 740D <1> je .ret ; yes. done --> 9646 0000D280 A8 <1> db __TEST_IMM8 ; (skip pop) 9647 <1> @@: 9648 0000D281 58 <1> pop ax ; restore ax, then do manual update 9649 <1> %if _PM 9650 0000D282 50 <1> push ax 9651 0000D283 E82FFE <1> call push_if 9652 <1> %else 9653 <1> pushf 9654 <1> %endif 9655 0000D286 FA <1> cli ; try to rest while updating chain 9656 0000D287 A7 <1> cmpsw ; skip over first word (entrypoint) 9657 <1> ; (generally xxEBh or 0EA90h) 9658 0000D288 A5 <1> movsw 9659 0000D289 A5 <1> movsw ; transfer source ieNext to dest ieNext 9660 <1> %if _PM 9661 0000D28A E84BFE <1> call pop_if 9662 <1> %else 9663 <1> popf 9664 <1> %endif 9665 <1> .ret: 9666 0000D28D C3 <1> retn 9667 <1> 9668 <1> 9669 <1> ; INP: al = interrupt number 9670 <1> ; ds:si-> interrupt entry 9671 <1> ; dx = flag in word [options4 + 2] to force 9672 <1> ; dx = -1 to force unconditionally 9673 <1> ; OUT: es = ss 9674 <1> ; CY if unhooking failed, 9675 <1> ; ds:si preserved 9676 <1> ; NC if unhooking successful 9677 <1> ; CHG: ah, di, si 9678 <1> ; STT: ds = ss => data entry segment/selector 9679 <1> ; word [pspdbg] = data entry 86 Mode segment 9680 <1> UnhookInterruptForce: 9681 0000D28E E80F00 <1> call UnhookInterrupt 9682 0000D291 730C <1> jnc .ret 9683 0000D293 83FAFF <1> cmp dx, -1 9684 0000D296 7414 <1> je UnhookInterrupt.easy 9685 0000D298 8516[8A00] <1> test word [options4 + 2], dx 9686 0000D29C 750E <1> jnz UnhookInterrupt.easy 9687 0000D29E F9 <1> stc 9688 <1> .ret: 9689 0000D29F C3 <1> retn 9690 <1> 9691 <1> 9692 <1> ; INP: al = interrupt number 9693 <1> ; ds:si-> interrupt entry 9694 <1> ; OUT: es = ss 9695 <1> ; CY if unhooking failed, 9696 <1> ; ds:si preserved 9697 <1> ; NC if unhooking successful 9698 <1> ; CHG: ah, di, si 9699 <1> ; STT: ds = ss => data entry segment/selector 9700 <1> ; word [pspdbg] = data entry 86 Mode segment 9701 <1> UnhookInterrupt: 9702 <1> ; UnhookInterruptSim (below) only checks if it's possible to unhook this interrupt. 9703 <1> ; This function really unhooks the interrupt if possible. 9704 <1> ; 9705 <1> ; This is to cover the situation when some of the hooked interrupts can unhook, 9706 <1> ; but some can't. If the uninstaller would start to unhook the interrupts and then 9707 <1> ; catch the interrupt that can't be unhooked the user would end up with a dead TSR 9708 <1> ; that's uninstalled halfway. Very bad. 9709 <1> ; 9710 <1> ; "Simulating" the unhooking first and checking if all interrupts can unhook 9711 <1> ; usually will not return such a state. 9712 0000D2A0 E82000 <1> call UnhookInterruptSim 9713 0000D2A3 7215 <1> jc .ret ; bad. --> (CY) 9714 0000D2A5 7405 <1> jz .easy 9715 <1> .hard: 9716 <1> ; "hard" case: UnhookInterruptSim has however already done the work, 9717 <1> ; so the hard case is here indeed easier than the easy case. 9718 0000D2A7 E848FF <1> call update_iisp_header ; copies our stored pointer into the other's entry 9719 0000D2AA EB0D <1> jmp .ret_NC 9720 <1> .easy: 9721 0000D2AC 52 <1> push dx 9722 0000D2AD 53 <1> push bx 9723 0000D2AE 8B5404 <1> mov dx, word [si + ieNext + 2] 9724 0000D2B1 8B5C02 <1> mov bx, word [si + ieNext] ; get what we stored in the entry 9725 0000D2B4 E8F2FE <1> call set_86m_interrupt_handler ; easy case - just reset to the value stored 9726 0000D2B7 5B <1> pop bx 9727 0000D2B8 5A <1> pop dx 9728 <1> .ret_NC: 9729 0000D2B9 F8 <1> clc 9730 <1> .ret: 9731 0000D2BA 16 <1> push ss 9732 0000D2BB 07 <1> pop es 9733 0000D2BC C3 <1> retn 9734 <1> 9735 <1> 9736 <1> ; INP: al = interrupt number 9737 <1> ; ds:si-> interrupt entry 9738 <1> ; dx = flag in word [options4 + 2] to force 9739 <1> ; OUT: NC if no error (hard, easy, or forced case) 9740 <1> ; CY if error 9741 <1> ; CHG: ah, es, di 9742 <1> ; STT: ds = ss => data entry segment/selector 9743 <1> ; word [pspdbg] = data entry 86 Mode segment 9744 <1> UnhookInterruptForceSim: 9745 0000D2BD 8516[8A00] <1> test word [options4 + 2], dx 9746 0000D2C1 751D <1> jnz UnhookInterruptSim.retn ; --> (NC) 9747 <1> 9748 <1> 9749 <1> ; INP: ds:si-> IISP entry 9750 <1> ; al = interrupt number 9751 <1> ; OUT: NC if no error (either hard or easy case), 9752 <1> ; ZR if easy case, 9753 <1> ; ds:si-> our IISP entry, containing stored interrupt 9754 <1> ; NZ if hard case, 9755 <1> ; ds:si-> our IISP entry 9756 <1> ; es:di-> IISP entry to modify 9757 <1> ; implies dword [es:di + 2] = far pointer to ours 9758 <1> ; CY if error (not first handler and no IISP chain to this handler) 9759 <1> ; CHG: ah, es, di 9760 <1> ; STT: ds = ss => data entry segment/selector 9761 <1> ; word [pspdbg] = data entry 86 Mode segment 9762 <1> UnhookInterruptSim: 9763 0000D2C3 52 <1> push dx 9764 0000D2C4 53 <1> push bx 9765 <1> 9766 <1> ; harden this, check we are an IISP entry 9767 0000D2C5 1E <1> push ds 9768 0000D2C6 07 <1> pop es ; es => our handler segment 9769 0000D2C7 89F3 <1> mov bx, si ; es:bx -> our handler 9770 0000D2C9 E8A100 <1> call IsIISPEntry? ; does it have an IISP header ? 9771 0000D2CC 753D <1> jne .fail ; fail if not 9772 <1> 9773 0000D2CE E89BFE <1> call get_86m_interrupt_handler ; get current vector 9774 0000D2D1 39DE <1> cmp si, bx ; our pointer ? 9775 0000D2D3 750C <1> jne .hard 9776 0000D2D5 3916[A60A] <1> cmp word [pspdbg], dx ; our segment ? 9777 0000D2D9 7506 <1> jne .hard 9778 <1> 9779 0000D2DB 80E400 <1> and ah, 00h ; NC, ZR 9780 0000D2DE 5B <1> pop bx 9781 0000D2DF 5A <1> pop dx 9782 <1> .retn: 9783 0000D2E0 C3 <1> retn 9784 <1> 9785 <1> .hard: 9786 <1> %if _PM 9787 0000D2E1 E8FEFE <1> call setes2dx 9788 <1> %else 9789 <1> mov es, dx 9790 <1> %endif 9791 <1> 9792 <1> ; INP: ds:si-> IISP entry 9793 <1> ; es:bx-> current interrupt entry 9794 <1> ; OUT: CY if error 9795 <1> ; NC, NZ if no error, 9796 <1> ; ds:si-> our IISP entry 9797 <1> ; es:di-> IISP entry to modify 9798 <1> ; implies dword [es:di + 2] = far pointer to ours 9799 <1> ; CHG: ah, es, di, (bx, dx) 9800 <1> ; STT: ds = ss => data entry segment/selector 9801 <1> ; word [pspdbg] = data entry 86 Mode segment 9802 0000D2E4 E87000 <1> call SearchIISPChain 9803 0000D2E7 7508 <1> jne .harder 9804 <1> .found: ; found reference to our interrupt handler 9805 0000D2E9 89DF <1> mov di, bx ; es:di-> IISP entry that references our's 9806 0000D2EB 80CCFF <1> or ah, 0FFh ; NC, NZ 9807 0000D2EE 5B <1> pop bx 9808 0000D2EF 5A <1> pop dx 9809 0000D2F0 C3 <1> retn 9810 <1> 9811 <1> .harder: ; Desperate attempt to find IISP entry that references ours by 9812 <1> ; searching through the interrupts hooked by other AMIS TSRs. Note 9813 <1> ; that the plexer loop will find and search through the list of 9814 <1> ; hooked interrupts of the uninstalling TSR itself, but this causes 9815 <1> ; no trouble. 9816 <1> ; INP: ds:si-> IISP entry 9817 <1> ; OUT: CY if error 9818 <1> ; NC, NZ if no error, 9819 <1> ; ds:si-> our IISP entry 9820 <1> ; es:di-> IISP entry to modify 9821 <1> ; implies dword [es:di + 2] = far pointer to ours 9822 <1> ; CHG: ah, es, di, (bx, dx) 9823 <1> ; STT: ds = ss => data entry segment/selector 9824 <1> ; word [pspdbg] = data entry 86 Mode segment 9825 0000D2F1 50 <1> push ax ; register with interrupt number last 9826 <1> 9827 0000D2F2 B02D <1> mov al, 2Dh 9828 0000D2F4 E8A9FE <1> call intchk ; ZR if offset = -1 or segment = 0 9829 <1> ; CHG: ax, dx, bx 9830 0000D2F7 7411 <1> jz .fail_ax 9831 <1> 9832 0000D2F9 31C0 <1> xor ax, ax 9833 <1> .loopplex: 9834 0000D2FB B000 <1> mov al, 00h ; AMIS installation check 9835 0000D2FD 51 <1> push cx 9836 <1> ; function 0 changes dx, di, cx, al 9837 <1> %if _PM 9838 0000D2FE E832C0 <1> call call_int2D 9839 <1> %else 9840 <1> int 2Dh ; enquire whether there's anyone 9841 <1> %endif 9842 0000D301 59 <1> pop cx ; but we don't care who it might be 9843 0000D302 FEC0 <1> inc al ; = FFh ? 9844 0000D304 7409 <1> jz .search ; yes, it is in use --> 9845 <1> .nextplex: 9846 0000D306 FEC4 <1> inc ah 9847 0000D308 75F1 <1> jnz .loopplex ; try next multiplexer --> 9848 <1> .fail_ax: 9849 0000D30A 58 <1> pop ax 9850 <1> .fail: ; IISP incompatible TSR between current interrupt entry and our entry 9851 <1> ; and no AMIS compatible TSR installed on top of our entry 9852 0000D30B F9 <1> stc 9853 0000D30C 5B <1> pop bx 9854 0000D30D 5A <1> pop dx 9855 0000D30E C3 <1> retn 9856 <1> 9857 <1> ; INP: ah = multiplex number of AMIS TSR to search through 9858 <1> ; ss:sp-> interrupt number (byte), must be preserved 9859 <1> ; CHG: es, di, dx, bx 9860 <1> .search: 9861 0000D30F B004 <1> mov al, 04h 9862 0000D311 5B <1> pop bx 9863 0000D312 53 <1> push bx ; low byte is the interrupt number 9864 <1> ; function 4 changes dx, bx, al 9865 <1> %if _PM 9866 0000D313 E81DC0 <1> call call_int2D 9867 <1> %else 9868 <1> int 2Dh 9869 <1> %endif 9870 0000D316 3C03 <1> cmp al, 03h ; returned its interrupt entry ? 9871 <1> ; RBIL doesn't explicitly state that this interrupt entry has to 9872 <1> ; be IISP compatible. But I'm too lazy to look up the older AMIS, 9873 <1> ; and SearchIISPChain checks the interrupt entry anyway. 9874 0000D318 742B <1> je .search_dxbx 9875 0000D31A 3C04 <1> cmp al, 04h ; returned list of hooked interrupts ? 9876 0000D31C 75E8 <1> jne .nextplex ; no, try next multiplexer --> 9877 0000D31E 89DF <1> mov di, bx 9878 0000D320 5B <1> pop bx 9879 0000D321 53 <1> push bx ; bl = interrupt number 9880 0000D322 88D8 <1> mov al, bl 9881 <1> .search_intlist_seg: 9882 <1> %if _PM 9883 0000D324 E8BBFE <1> call setes2dx 9884 <1> %else 9885 <1> mov es, dx ; es:di-> list 9886 <1> %endif 9887 <1> .search_intlist: ; Search the returned list for the required interrupt number. 9888 0000D327 AE <1> scasb ; our interrupt number ? 9889 0000D328 740A <1> je .search_found_intlist 9890 0000D32A 26807DFF2D <1> cmp byte [es:di-1], 2Dh ; was last in list ? 9891 0000D32F 74D5 <1> je .nextplex 9892 0000D331 AF <1> scasw ; skip pointer 9893 0000D332 EBF3 <1> jmp short .search_intlist ; try next entry --> 9894 <1> 9895 <1> .search_found_intlist: 9896 0000D334 268B1D <1> mov bx, word [es:di] ; dx:bx = es:bx -> IISP entry 9897 0000D337 AF <1> scasw ; skip pointer 9898 0000D338 52 <1> push dx ; preserve dx for .search_intlist_seg 9899 0000D339 E81B00 <1> call SearchIISPChain 9900 0000D33C 5A <1> pop dx 9901 0000D33D 740E <1> je .search_found ; found entry --> 9902 <1> ; This specific jump supports TSRs that hook the same 9903 <1> ; interrupt more than once; jumping to .nextplex instead 9904 <1> ; (as previously) aborts the search after the first match 9905 <1> ; in the interrupt list. This support might become useful. 9906 0000D33F 3C2D <1> cmp al, 2Dh ; was last in list ? 9907 0000D341 74C3 <1> je .nextplex 9908 0000D343 EBDF <1> jmp short .search_intlist_seg 9909 <1> 9910 <1> .search_dxbx: 9911 <1> %if _PM 9912 0000D345 E89AFE <1> call setes2dx 9913 <1> %else 9914 <1> mov es, dx ; es:bx-> (IISP) interrupt entry 9915 <1> %endif 9916 <1> ; The entry we found now is possibly behind the non-IISP entry that 9917 <1> ; terminated our first SearchIISPChain call (at .hard). We then 9918 <1> ; possibly might find our entry in this hidden part of the chain. 9919 0000D348 E80C00 <1> call SearchIISPChain 9920 0000D34B 75B9 <1> jne .nextplex ; didn't find our entry in the chain --> 9921 <1> .search_found: 9922 0000D34D 58 <1> pop ax 9923 0000D34E EB99 <1> jmp short .found 9924 <1> 9925 <1> 9926 <1> SearchIISPChain.next: 9927 <1> %if _PM 9928 <1> ; dx already next segment 9929 0000D350 268B5F02 <1> mov bx, word [es:bx + ieNext] ; get next offset 9930 0000D354 E88BFE <1> call setes2dx ; point es:bx -> next handler 9931 <1> %else 9932 <1> les bx, [es:bx + ieNext] ; get next interrupt entry 9933 <1> %endif 9934 <1> 9935 <1> ; INP: ds:si-> IISP entry 9936 <1> ; es:bx-> current interrupt entry 9937 <1> ; OUT: NZ if reference to ds:si not found in IISP chain es:bx-> 9938 <1> ; ZR if reference found, 9939 <1> ; es:bx-> IISP (or uninstalled iHPFS) interrupt entry with reference 9940 <1> ; CHG: es, bx, dx 9941 <1> SearchIISPChain: 9942 0000D357 E81300 <1> call IsIISPEntry? ; that an IISP entry ? 9943 0000D35A 7510 <1> jnz .return ; nope --> (NZ) 9944 0000D35C 268B5704 <1> mov dx, word [es:bx + ieNext + 2] ; (for _PM: dx = next segment) 9945 0000D360 263B7702 <1> cmp si, word [es:bx + ieNext] ; our offset ? 9946 0000D364 75EA <1> jne .next ; no, try next --> 9947 0000D366 3B16[A60A] <1> cmp dx, word [pspdbg] ; our segment ? 9948 0000D36A 75E4 <1> jne .next ; no, try next --> 9949 <1> .return: ; yes, found (ZR) 9950 0000D36C C3 <1> retn 9951 <1> 9952 <1> 9953 <1> ; INP: es:bx-> interrupt entry 9954 <1> ; OUT: NZ if non-IISP entry 9955 <1> ; ZR if IISP entry 9956 <1> IsIISPEntry?: 9957 0000D36D 83FBF8 <1> cmp bx, - (ieSignature + 2) ; may access word at offset FFFFh ? 9958 0000D370 7728 <1> ja .return ; yes, avoid --> (NZ) 9959 0000D372 26817F064B42 <1> cmp word [ es:bx + ieSignature ], "KB" ; "KB"/424Bh ? ("BK" in MASM) 9960 0000D378 7520 <1> jne .return 9961 0000D37A 26813F90EA <1> cmp word [ es:bx + ieEntry ], 0EA90h ; nop\jmp far imm16:imm16 ? 9962 0000D37F 7419 <1> je .return ; unused IISP entry (created by iHPFS) --> 9963 0000D381 26803FEB <1> cmp byte [ es:bx + ieEntry ], 0EBh ; jmp short ... ? 9964 <1> ; (This opcode should strictly be jmp short $+18 but there's programs 9965 <1> ; that save an additional jmp opcode by jumping directly into their 9966 <1> ; code even though it's not right behind the header.) 9967 0000D385 7513 <1> jne .return 9968 0000D387 26807F09EB <1> cmp byte [ es:bx + ieJmphwreset ], 0EBh ; jmp short ... ? 9969 0000D38C 740C <1> je .return ; usual IISP entry --> 9970 0000D38E 26807F09CB <1> cmp byte [ es:bx + ieJmphwreset ], 0CBh ; retf ? 9971 0000D393 7405 <1> je .return ; a shorter variant --> 9972 0000D395 26807F09CF <1> cmp byte [ es:bx + ieJmphwreset ], 0CFh ; iret ? 9973 <1> .return: 9974 0000D39A C3 <1> retn 9975 <1> 9976 <1> 9977 <1> update_inttab_optional: 9978 0000D39B 50 <1> push ax 9979 0000D39C 53 <1> push bx 9980 0000D39D 51 <1> push cx 9981 0000D39E 52 <1> push dx 9982 0000D39F 56 <1> push si 9983 0000D3A0 BE[120C] <1> mov si, inttab_optional 9984 0000D3A3 BB[310C] <1> mov bx, inttab 9985 <1> .loop: 9986 0000D3A6 AD <1> lodsw 9987 0000D3A7 83F8FF <1> cmp ax, -1 9988 0000D3AA 7415 <1> je .end 9989 0000D3AC 91 <1> xchg ax, cx 9990 0000D3AD AD <1> lodsw 9991 0000D3AE 91 <1> xchg ax, cx 9992 0000D3AF 92 <1> xchg ax, dx 9993 0000D3B0 AD <1> lodsw 9994 0000D3B1 92 <1> xchg ax, dx 9995 0000D3B2 8516[A800] <1> test word [internalflags4], dx 9996 0000D3B6 7407 <1> jz .next 9997 0000D3B8 4B <1> dec bx 9998 0000D3B9 4B <1> dec bx 9999 0000D3BA 890F <1> mov word [bx], cx 10000 0000D3BC 4B <1> dec bx 10001 0000D3BD 8807 <1> mov byte [bx], al 10002 <1> .next: 10003 0000D3BF EBE5 <1> jmp .loop 10004 <1> 10005 <1> .end: 10006 0000D3C1 891E[260C] <1> mov word [amisintr_offset], bx 10007 0000D3C5 5E <1> pop si 10008 0000D3C6 5A <1> pop dx 10009 0000D3C7 59 <1> pop cx 10010 0000D3C8 5B <1> pop bx 10011 0000D3C9 58 <1> pop ax 10012 0000D3CA C3 <1> retn 9309 9310 9311 usesection lDEBUG_CODE 9312 9313 %if _BOOTLDR 9314 ; Determine the amount of actual memory 9315 ; 9316 ; This is important to call at the time we need the size, 9317 ; not just save the size initially. Loading other pre-boot 9318 ; installers or RPLs will change the size. 9319 ; 9320 ; INP: - 9321 ; OUT: dx = segment behind usable memory (taking EBDAs & RPLs into account) 9322 ; ds = ss 9323 ; CHG: ax, cx, di, si, ds 9324 bootgetmemorysize: 9325 0000D3CB 06 push es 9326 0000D3CC 31C0 xor ax, ax 9327 0000D3CE 8ED8 mov ds, ax 9328 0000D3D0 CD12 int 12h ; get memory size in KiB 9329 0000D3D2 B106 mov cl, 6 9330 0000D3D4 D3E0 shl ax, cl ; *64, convert to paragraphs 9331 0000D3D6 50 push ax 9332 0000D3D7 C536BC00 lds si, [ 2Fh *4 ] ; get current Int2F 9333 0000D3DB 46 inc si ; pointer valid (not 0FFFFh) ? (left increased!) 9334 0000D3DC 741B jz .norpl ; no --> 9335 0000D3DE 8CD8 mov ax, ds 9336 0000D3E0 85C0 test ax, ax ; segment valid (not zero) ? 9337 0000D3E2 7415 jz .norpl ; no --> 9338 0000D3E4 46 times 2 inc si ; +3 with above inc 9339 0000D3E6 0E push cs 9340 0000D3E7 07 pop es 9341 0000D3E8 BF[FED3] mov di, .rpl 9342 0000D3EB B90300 mov cx, .rpl_size 9343 0000D3EE F3A6 repe cmpsb ; "RPL" signature ? 9344 0000D3F0 7507 jne .norpl ; no --> 9345 0000D3F2 5A pop dx 9346 0000D3F3 B8064A mov ax, 4A06h 9347 0000D3F6 CD2F int 2Fh ; adjust usable memory size for RPL 9348 0000D3F8 A8 db __TEST_IMM8 ; (skip pop) 9349 .norpl: 9350 0000D3F9 5A pop dx 9351 ; dx = segment behind last available memory 9352 0000D3FA 16 push ss 9353 0000D3FB 1F pop ds 9354 0000D3FC 07 pop es 9355 0000D3FD C3 retn 9356 9357 0000D3FE 52504C .rpl: db "RPL" 9358 endarea .rpl 9359 %endif 9360 9361 9362 ;--- ensure a debuggee is loaded 9363 ;--- set SI:DI to CS:IP, preserve AX, BX, DX 9364 9365 ensuredebuggeeloaded: 9366 0000D401 50 push ax 9367 0000D402 F606[9E00]80 testopt [internalflags], attachedterm 9368 0000D407 7502 jnz @F ; not loaded, create --> 9369 0000D409 58 pop ax 9370 0000D40A C3 retn ; done 9371 9372 @@: 9373 0000D40B 53 push bx 9374 0000D40C 52 push dx 9375 9376 0000D40D E81101 call set_efl_to_fl ; initialize EFL, and ax = 0 9377 0000D410 BF[640C] mov di, regs 9378 0000D413 B91E00 mov cx, 15*2 ; (8 standard + 6 seg + eip) * 2 9379 0000D416 F3AB rep stosw ; initialize all regs 9380 %if _BOOTLDR 9381 0000D418 F606[9D00]40 testopt [internalflags], nodosloaded 9382 0000D41D 7444 jz .dos 9383 0000D41F B86000 mov ax, 60h 9384 0000D422 50 push ax 9385 0000D423 BF[840C] mov di, reg_ds 9386 0000D426 AB stosw 9387 0000D427 AF scasw ; (skip dummy high word) 9388 0000D428 AB stosw 9389 0000D429 AF scasw 9390 0000D42A AB stosw 9391 0000D42B AF scasw 9392 0000D42C AB stosw 9393 0000D42D E851C1 call adusetup 9394 0000D430 E898FF call bootgetmemorysize 9395 0000D433 83EA60 sub dx, 60h 9396 0000D436 81FA0010 cmp dx, 1000h 9397 0000D43A 7602 jbe .bootbelow64kib ; if memory left <= 64 KiB 9398 0000D43C 31D2 xor dx, dx ; dx = 1000h (same thing, after shifting) 9399 .bootbelow64kib: 9400 0000D43E B104 mov cl, 4 9401 0000D440 D3E2 shl dx, cl 9402 0000D442 4A dec dx 9403 0000D443 4A dec dx 9404 0000D444 8916[740C] mov word [reg_esp], dx 9405 0000D448 07 pop es 9406 0000D449 87D7 xchg dx, di ; es:di = child stack pointer 9407 0000D44B 31C0 xor ax, ax 9408 0000D44D AB stosw ; push 0 on client's stack 9409 9410 0000D44E 803E[DC0B]00 cmp byte [bInit], 0 9411 0000D453 750B jnz .bootnomemtouch 9412 0000D455 FE06[DC0B] inc byte [bInit] 9413 0000D459 26C7060000CD19 mov word [es:0], 019CDh ; place opcode for int 19h at cs:ip 9414 .bootnomemtouch: 9415 0000D460 E9AB00 jmp .return 9416 9417 .dos: 9418 %endif 9419 0000D463 C606[9D0C]01 mov byte [reg_eip+1], 100h>>8 9420 0000D468 B448 mov ah, 48h ; get size of largest free block 9421 0000D46A BBFFFF mov bx, -1 9422 0000D46D CD21 int 21h 9423 0000D46F 83FB11 cmp bx, 11h ; enough for PSP + one paragraph for code/stack ? 9424 0000D472 7303E99700 jb .return ; no --> 9425 0000D477 B448 mov ah, 48h ; allocate it 9426 0000D479 CD21 int 21h 9427 0000D47B 7303E98E00 jc .return ; (memory taken between the calls) 9428 9429 0000D480 53 push bx 9430 0000D481 BF[840C] mov di, reg_ds ; fill segment registers ds,es,ss,cs 9431 0000D484 AB stosw 9432 0000D485 AF scasw ; (skip dummy high word) 9433 0000D486 AB stosw 9434 0000D487 AF scasw 9435 0000D488 AB stosw 9436 0000D489 AF scasw 9437 0000D48A AB stosw 9438 0000D48B E8F3C0 call adusetup 9439 0000D48E 8B1E[900C] mov bx, word [reg_cs] ; bx:dx = where to load program 9440 0000D492 8EC3 mov es, bx 9441 0000D494 58 pop ax ; get size of memory block 9442 0000D495 89C2 mov dx, ax 9443 0000D497 01DA add dx, bx 9444 0000D499 2689160200 mov word [es:ALASAP], dx 9445 0000D49E 3D0010 cmp ax, 1000h 9446 0000D4A1 7602 jbe .below64kib ; if memory left <= 64 KiB 9447 0000D4A3 31C0 xor ax, ax ; ax = 1000h (same thing, after shifting) 9448 .below64kib: 9449 0000D4A5 B104 mov cl, 4 9450 0000D4A7 D3E0 shl ax, cl 9451 0000D4A9 48 dec ax 9452 0000D4AA 48 dec ax 9453 0000D4AB A3[740C] mov word [reg_esp], ax 9454 0000D4AE 97 xchg ax, di ; es:di = child stack pointer 9455 0000D4AF 31C0 xor ax, ax 9456 0000D4B1 AB stosw ; push 0 on client's stack 9457 9458 ; Create a PSP 9459 0000D4B2 B455 mov ah, 55h ; create child PSP 9460 0000D4B4 8CC2 mov dx, es 9461 0000D4B6 268B360200 mov si, word [es:ALASAP] 9462 0000D4BB F8 clc ; works around OS/2 bug 9463 0000D4BC CD21 int 21h 9464 0000D4BE E813BD call setpspdbg ; reset PSP to ours 9465 9466 ; Finish up. Set termination address. 9467 0000D4C1 B82225 mov ax, 2522h ; set interrupt vector 22h 9468 0000D4C4 BA[D085] mov dx, int22 9469 0000D4C7 CD21 int 21h 9470 0000D4C9 2689160A00 mov word [es:TPIV], dx 9471 0000D4CE 268C1E0C00 mov word [es:TPIV+2], ds 9472 9473 0000D4D3 803E[DC0B]00 cmp byte [bInit], 0 9474 0000D4D8 750A jnz .nomemtouch 9475 0000D4DA FE06[DC0B] inc byte [bInit] 9476 0000D4DE 26C6060001C3 mov byte [es:100h], 0C3h ; place opcode for retn at cs:ip 9477 .nomemtouch: 9478 9479 0000D4E4 8C06[A40A] mov word [pspdbe], es 9480 0000D4E8 8CC0 mov ax, es 9481 0000D4EA 48 dec ax 9482 0000D4EB 8EC0 mov es, ax 9483 0000D4ED 40 inc ax 9484 0000D4EE 26C70608004445 mov word [es:8+0], "DE" 9485 0000D4F5 26C7060A004255 mov word [es:8+2], "BU" 9486 0000D4FC 26C7060C004747 mov word [es:8+4], "GG" 9487 0000D503 26C7060E004545 mov word [es:8+6], "EE" ; set MCB name 9488 0000D50A 26A30100 mov word [es:1], ax ; set MCB owner 9489 .return: 9490 0000D50E 8026[9E00]7F clropt [internalflags], attachedterm 9491 0000D513 16 push ss 9492 0000D514 07 pop es 9493 9494 0000D515 8B36[900C] mov si, word [reg_cs] 9495 0000D519 8B3E[9C0C] mov di, word [reg_eip] 9496 0000D51D 5A pop dx 9497 0000D51E 5B pop bx 9498 0000D51F 58 pop ax 9499 0000D520 C3 retn 9500 9501 9502 set_efl_to_fl: 9503 0000D521 31C0 xor ax, ax ; initialize ax = 0 and FL = ZR NC etc 9504 0000D523 50 _no386 push ax ; dummy high word 9505 0000D524 66 _386_o32 ; pushfd 9506 0000D525 9C pushf 9507 0000D526 8F06[A00C] pop word [reg_efl] ; set to FL 9508 0000D52A 8F06[A20C] pop word [reg_efl+2] ; set to high word of EFL, or zero 9509 0000D52E C3 retn 9510 9511 9512 %if _PM 9513 ; Hook Int2F if a DPMI host is found. However for Win9x and DosEmu 9514 ; Int2F.1687 is not hooked because it doesn't work. Debugging in 9515 ; protected mode may still work, but the initial switch must be 9516 ; single-stepped. 9517 ; 9518 ; CHG: ax, bx, cx, dx, di, es 9519 ; STT: V86/RM 9520 ; ss = ds = debugger data segment 9521 hook2F: 9522 0000D52F E878D1 call InDos 9523 0000D532 7403E99A00 jnz .return 9524 0000D537 F606[9D00]01 testopt [internalflags], hooked2F 9525 0000D53C 7403E99000 jnz .return ; don't hook now --> 9526 .loop: 9527 %if _GUARD_86M_INT2F 9528 0000D541 06 push es 9529 0000D542 31C0 xor ax, ax 9530 0000D544 8EC0 mov es, ax ; (only used in 86 Mode) 9531 0000D546 26A1BC00 mov ax, [es:2Fh * 4] 9532 0000D54A 83F8FF cmp ax, -1 9533 0000D54D 7405 je @F ; --> (ZR) 9534 0000D54F 260B06BE00 or ax, [es:2Fh * 4 + 2] 9535 @@: 9536 0000D554 07 pop es 9537 0000D555 747A jz .return 9538 %endif 9539 0000D557 B88716 mov ax, 1687h ; DPMI host installed? 9540 0000D55A CD2F int 2Fh 9541 0000D55C 85C0 test ax, ax 9542 0000D55E 7571 jnz .return 9543 0000D560 893E[B888] mov word [dpmientry+0], di ; true host DPMI entry 9544 0000D564 8C06[BA88] mov word [dpmientry+2], es 9545 0000D568 893E[BC88] mov word [dpmiwatch+0], di 9546 0000D56C 8C06[BE88] mov word [dpmiwatch+2], es 9547 0000D570 F606[9D00]02 testopt [internalflags], nohook2F 9548 0000D575 755A jnz .return ; can't hook Int2F --> 9549 0000D577 F606[8800]02 testopt [options4], opt4_int_2F_hook 9550 0000D57C 7453 jz .return ; requested to not hook --> 9551 0000D57E B82F35 mov ax, 352Fh 9552 0000D581 CD21 int 21h 9553 0000D583 891E[4289] mov word [oldi2F+0], bx 9554 0000D587 8C06[4489] mov word [oldi2F+2], es 9555 0000D58B BA[4089] mov dx, debug2F ; ds => lDEBUG_DATA_ENTRY 9556 0000D58E B82F25 mov ax, 252Fh 9557 0000D591 CD21 int 21h 9558 9559 ; Test whether we can hook the DPMI entrypoint call. 9560 0000D593 B88716 mov ax, 1687h 9561 0000D596 CD2F int 2Fh 9562 0000D598 85C0 test ax, ax 9563 0000D59A 7538 jnz .nohost 9564 0000D59C 81FF[7689] cmp di, mydpmientry ; our entrypoint returned ? 9565 0000D5A0 7532 jne .nohook 9566 0000D5A2 8CC0 mov ax, es 9567 0000D5A4 8CDB mov bx, ds ; bx => lDEBUG_DATA_ENTRY 9568 0000D5A6 39D8 cmp ax, bx 9569 0000D5A8 752A jne .nohook ; no --> 9570 9571 0000D5AA C706[BC88][7689] mov word [dpmiwatch+0], mydpmientry 9572 0000D5B0 8C1E[BE88] mov word [dpmiwatch+2], ds ; => lDEBUG_DATA_ENTRY 9573 9574 0000D5B4 800E[9D00]01 setopt [internalflags], hooked2F 9575 0000D5B9 800E[A800]02 setopt [internalflags4], dif4_int_2F_hooked 9576 0000D5BE E8DAFD call update_inttab_optional 9577 %if _DISPHOOK 9578 0000D5C1 8CD8 mov ax, ds ; ax => lDEBUG_DATA_ENTRY 9579 0000D5C3 1E push ds 9580 0000D5C4 07 pop es 9581 0000D5C5 BF[617C] mov di, dpmihookcs 9582 0000D5C8 E83BE4 call hexword 9583 0000D5CB BA[447C] mov dx, dpmihook 9584 0000D5CE E8EBE7 call putsz 9585 %endif 9586 .return: 9587 0000D5D1 1E push ds 9588 0000D5D2 07 pop es 9589 0000D5D3 C3 retn 9590 9591 .nohost: 9592 .nohook: 9593 0000D5D4 C516[4289] lds dx, [oldi2F] 9594 0000D5D8 B82F25 mov ax, 252Fh 9595 0000D5DB CD21 int 21h ; unhook 9596 0000D5DD 16 push ss 9597 0000D5DE 1F pop ds 9598 0000D5DF 16 push ss 9599 0000D5E0 07 pop es ; restore segregs 9600 0000D5E1 800E[9D00]02 setopt [internalflags], nohook2F 9601 ; note that we cannot hook 9602 0000D5E6 BA[6D7C] mov dx, msg.dpmi_no_hook 9603 0000D5E9 E8D0E7 call putsz ; display message about it 9604 0000D5EC E952FF jmp .loop 9605 %endif 9606 9607 9608 usesection lDEBUG_DATA_ENTRY 9609 align 16, db 0 9610 ldebug_data_entry_size equ $-section.lDEBUG_DATA_ENTRY.vstart 9611 endarea ldebug_data_entry, 1 9612 9613 usesection ASMTABLE1 9614 000016BA 00 align 16, db 0 9615 asmtable1_size equ $-section.ASMTABLE1.vstart 9616 endarea asmtable1, 1 9617 9618 usesection ASMTABLE2 9619 00000897 00 align 16, db 0 9620 asmtable2_size equ $-section.ASMTABLE2.vstart 9621 endarea asmtable2, 1 9622 9623 9624 numdef SHOWASMTABLESIZE, 0 9625 %if _SHOWASMTABLESIZE 9626 %assign ASMTABLESIZE asmtable1_size + asmtable2_size 9627 %warning asmtables hold ASMTABLESIZE bytes 9628 %endif 9629 9630 9631 usesection DATASTACK 9632 %define SECTIONFIXUP -$$+100h+ldebug_data_entry_size +asmtable1_size+asmtable2_size 9634 9635 ; I/O buffers 9636 alignb 2 9637 00000000 ?? line_in: resb 1 ; maximal length of input line 9638 00000001 ?? resb 1 ; actual length (must be one less than previous byte) 9639 00000002 resb 255 ; buffer for 13-terminated input line 9640 .end: 9641 ; zero-initialisation starts here 9642 ..@init_first: 9643 ; b_bplist and g_bplist are expected in that order by initcont 9644 %if _BREAKPOINTS 9645 00000101 ?? alignb 2 9646 b_bplist: 9647 00000102 ???? .used_mask: resb (_NUM_B_BP+7)>>3 ; bitmask of used points 9648 00000104 ???? .disabled_mask: resb (_NUM_B_BP+7)>>3 ; bitmask of disabled points 9649 %if _BREAKPOINTS_STICKY 9650 .sticky_mask: resb (_NUM_B_BP+7)>>3 ; bitmask of sticky points 9651 ; desc: stay around during DEBUG's operation unless 9652 ; explicitly removed/un-stickified. This allows 9653 ; to keep breakpoints around while changing from PM. 9654 ; Hits while in DEBUG are ignored though, use DDEBUG. 9655 ; Disabling won't remove them, just ignores hits. 9656 %endif 9657 alignb 2 9658 00000106 .bp: resb _NUM_B_BP*BPSIZE 9659 alignb 2 9660 00000196 .counter: resw _NUM_B_BP 9661 alignb 2 9662 000001B6 .id: resw _NUM_B_BP ; array of lengths/offsets, 0 = unused 9663 ; low 10 bits = offset into .idbuffer (0..1023) 9664 ; high 6 bits = length (0..63, 0 if unused) 9665 alignb 2 9666 000001D6 .when: resw _NUM_B_BP ; array of pointers, 0 = unused 9667 9668 .idbuffer.length: equ _NUM_B_ID_BYTES 9669 .idbuffer.free: 9670 000001F6 ???? resw 1 ; offset into .idbuffer of free space 9671 ; (0..1024) 9672 9673 .whenbuffer.length: equ _NUM_B_WHEN_BYTES 9674 .whenbuffer.free: 9675 000001F8 ???? resw 1 ; *offset* into .whenbuffer 9676 ; (not a pointer) 9677 9678 .idbuffer: 9679 000001FA resb .idbuffer.length ; buffer holding ID strings 9680 .whenbuffer: 9681 0000037A resb .whenbuffer.length ; buffer holding condition strings 9682 %endif 9683 %if _NUM_G_BP 9684 0000077A ?? resb 1 - (($-$$) % 2) ; make g_bplist.bp aligned 9685 g_bplist: 9686 0000077B ?? .used_count: resb 1 ; for the byte counter of saved breakpoints 9687 0000077C .bp: resb _NUM_G_BP*BPSIZE 9688 .end: 9689 %endif 9690 %if _HISTORY && ! _HISTORY_SEPARATE_FIXED 9691 historybuffer: resb _HISTORY_SIZE 9692 .end: 9693 %endif 9694 9695 ; $ - $$ = offset into section 9696 ; % 2 = 1 if odd offset, 0 if even 9697 ; 2 - = 1 if odd, 2 if even 9698 ; % 2 = 1 if odd, 0 if even 9699 ; resb (2 - (($-$$) % 2)) % 2 9700 ; $ - $$ = offset into section 9701 ; % 2 = 1 if odd offset, 0 if even 9702 ; 1 - = 0 if odd, 1 if even 9703 0000080C ?? resb 1 - (($-$$) % 2) ; make line_out aligned 9704 0000080D ?? trim_overflow: resb 1 ; actually part of line_out to avoid overflow of trimputs loop 9705 0000080E line_out: resb 263 9706 00000915 ?? resb 1 ; reserved for terminating zero 9707 line_out_end: 9708 alignb 2 9709 00000916 ???? line_out_overflow: resw 1 ; 2642h if line_out didn't overflow 9710 9711 alignb 2 9712 00000918 ???? serial_save_irq_mask: resw 1 9713 0000091A ???? serial_save_irq_off: resw 1 9714 0000091C ???? serial_save_dl: resw 1 9715 0000091E ?? serial_save_ier: resb 1 9716 0000091F ?? serial_save_lcr: resb 1 9717 00000920 ?? serial_save_mcr: resb 1 9718 %if _USE_TX_FIFO 9719 00000921 ?? serial_fcr_setting: resb 1 9720 %endif 9721 00000922 ?? serial_use_intnum: resb 1 9722 00000923 ?? serial_use_params: resb 1 9723 00000924 ?? serial_use_fifo: resb 1 9724 00000925 ?? alignb 2 9725 baseport: 9726 00000926 ???? serial_use_baseport: resw 1 9727 00000928 ???? serial_use_dl: resw 1 9728 0000092A ???? serial_use_irqmask: resw 1 9729 9730 alignb 2 9731 0000092C ???? rxhead: resw 1 9732 0000092E ???? rxtail: resw 1 9733 00000930 ???? txhead: resw 1 9734 00000932 ???? txtail: resw 1 9735 00000934 alignb 16 9736 00000940 rxfifo: resb _RXFIFOSIZE 9737 alignb 16 9738 000009C0 txfifo: resb _TXFIFOSIZE 9739 9740 ; zero-initialisation ends here 9741 ..@init_behind: 9742 9743 alignb 16 ; stack might be re-used as GDT, so align it on a paragraph 9744 00000A40 stack: resb _STACKSIZE 9745 alignb 2 ; ensure stack aligned 9746 stack_end: 9747 9748 datastack_size equ $-section.DATASTACK.vstart 9749 endarea datastack, 1 9750 9751 9752 usesection INIT 9753 initstart: 9754 9755 %include "init.asm" 9756 <1> 9757 <1> %if 0 9758 <1> 9759 <1> lDebug initialisation 9760 <1> 9761 <1> Copyright (C) 1995-2003 Paul Vojta 9762 <1> Copyright (C) 2008-2012 C. Masloch 9763 <1> 9764 <1> Usage of the works is permitted provided that this 9765 <1> instrument is retained with the works, so that any entity 9766 <1> that uses the works is notified of this instrument. 9767 <1> 9768 <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 9769 <1> 9770 <1> %endif 9771 <1> 9772 <1> 9773 <1> usesection INIT 9774 <1> 9775 <1> initcode: 9776 <1> %if ($ - $$) != 0 9777 <1> %fatal initcode expected at start of section 9778 <1> %endif 9779 <1> 9780 00000000 8CD0 <1> mov ax, ss 9781 00000002 8CDA <1> mov dx, ds 9782 00000004 29D0 <1> sub ax, dx 9783 00000006 31D2 <1> xor dx, dx 9784 00000008 B90400 <1> mov cx, 4 9785 <1> @@: 9786 0000000B D1E0 <1> shl ax, 1 9787 0000000D D1D2 <1> rcl dx, 1 9788 0000000F E2FA <1> loop @B 9789 <1> 9790 00000011 50 <1> push ax ; (if sp was zero) 9791 <1> 9792 00000012 01E0 <1> add ax, sp 9793 00000014 83D200 <1> adc dx, 0 9794 00000017 83C00F <1> add ax, 15 9795 0000001A 83D200 <1> adc dx, 0 9796 <1> 9797 0000001D 24F0 <1> and al, ~15 9798 <1> 9799 0000001F 83FA02 <1> cmp dx, NONBOOTINITSTACK_END >> 16 9800 00000022 771B <1> ja .stackdownfirst 9801 00000024 7205 <1> jb .memupfirst 9802 00000026 3D500E <1> cmp ax, NONBOOTINITSTACK_END & 0FFFFh 9803 00000029 7314 <1> jae .stackdownfirst 9804 <1> .memupfirst: 9805 0000002B BBE520 <1> mov bx, paras(NONBOOTINITSTACK_END) 9806 0000002E B44A <1> mov ah, 4Ah 9807 00000030 CD21 <1> int 21h 9808 00000032 730B <1> jnc @F 9809 <1> .memfail: 9810 00000034 BA[0D08] <1> mov dx, imsg.early_mem_fail 9811 <1> .earlyfail: 9812 00000037 E8A70C <1> call init_putsz_cs 9813 0000003A B8FF4C <1> mov ax, 4CFFh 9814 0000003D CD21 <1> int 21h 9815 <1> 9816 <1> @@: 9817 <1> .stackdownfirst: 9818 0000003F 8CD8 <1> mov ax, ds 9819 00000041 05C520 <1> add ax, paras(NONBOOTINITSTACK_START) 9820 00000044 FA <1> cli 9821 00000045 8ED0 <1> mov ss, ax 9822 00000047 BC0002 <1> mov sp, NONBOOTINITSTACK_SIZE 9823 0000004A FB <1> sti 9824 <1> 9825 <1> ; if jumped to .stackdownfirst: now, shrink our memory block 9826 <1> ; else: no-op (already grew or shrunk block) 9827 0000004B BBE520 <1> mov bx, paras(NONBOOTINITSTACK_END) 9828 0000004E B44A <1> mov ah, 4Ah 9829 00000050 CD21 <1> int 21h 9830 00000052 72E0 <1> jc .memfail 9831 <1> 9832 <1> 9833 00000054 8CD8 <1> mov ax, ds 9834 00000056 05D518 <1> add ax, paras(INITSECTIONOFFSET) 9835 00000059 8CDA <1> mov dx, ds 9836 0000005B 81C29B1F <1> add dx, paras(NONBOOTINITTARGET) 9837 0000005F B92A01 <1> mov cx, init_size_p 9838 00000062 E8EB0B <1> call init_movp 9839 <1> 9840 00000065 52 <1> push dx 9841 00000066 E89100 <1> call init_retf 9842 <1> 9843 00000069 8CDB <1> mov bx, ds 9844 0000006B 89DA <1> mov dx, bx 9845 0000006D 81C39919 <1> add bx, paras(AUXTARGET1) 9846 00000071 81C2380C <1> add dx, paras(CODETARGET1) 9847 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 9848 00000075 89D8 <1> mov ax, bx 9849 00000077 050102 <1> add ax, paras(auxbuff_size) 9850 <1> CODETARGET1_equ equ CODETARGET1 9851 <1> CODETARGET2_equ equ CODETARGET2 9852 <1> AUXTARGET1_equ equ AUXTARGET1 9853 <1> AUXTARGET2_equ equ AUXTARGET2 9854 <1> %if AUXTARGET1_equ <= CODETARGET1_equ 9855 <1> %assign nn AUXTARGET1_equ 9856 <1> %assign mm CODETARGET1_equ 9857 <1> %error Unexpected layout aux = nn code = mm 9858 <1> %endif 9859 <1> %endif 9860 0000007A 89D1 <1> mov cx, dx 9861 0000007C E87C00 <1> call init_check_auxbuff 9862 0000007F 742F <1> jz @F 9863 <1> 9864 00000081 8CDB <1> mov bx, ds 9865 00000083 89DA <1> mov dx, bx 9866 00000085 81C3380C <1> add bx, paras(AUXTARGET2) 9867 00000089 81C2390E <1> add dx, paras(CODETARGET2) 9868 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 9869 <1> ldebug_code_size_equ equ ldebug_code_size 9870 <1> auxbuff_size_equ equ auxbuff_size 9871 <1> %if (paras(AUXTARGET1_equ) + paras(auxbuff_size_equ)) != (paras(CODETARGET2_equ) + paras(ldebug_code_size_equ)) 9873 <1> %error Unexpected layout 9874 <1> %endif 9875 <1> %endif 9876 0000008D E86B00 <1> call init_check_auxbuff 9877 00000090 741E <1> jz @F 9878 <1> 9879 <1> ; If both prior attempts failed, we allocate 9880 <1> ; an additional 8 KiB and move the buffer to 9881 <1> ; that. This should always succeed. 9882 00000092 2EC706[0008]9B1F <1> mov word [cs:memsize], paras(AUXTARGET3 + auxbuff_size + historysegment_size) 9885 <1> ; enlarge the final memory block size 9886 <1> 9887 00000099 8CDB <1> mov bx, ds 9888 0000009B 81C39A1B <1> add bx, paras(AUXTARGET3) 9889 0000009F 89CA <1> mov dx, cx 9890 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 9891 000000A1 89D8 <1> mov ax, bx 9892 000000A3 050102 <1> add ax, paras(auxbuff_size) 9893 <1> %endif 9894 000000A6 E85200 <1> call init_check_auxbuff 9895 000000A9 7405 <1> jz @F 9896 <1> 9897 <1> ; Because this shouldn't happen, this is 9898 <1> ; considered an internal error. 9899 000000AB BA[3308] <1> mov dx, imsg.early_reloc_fail 9900 000000AE EB87 <1> jmp .earlyfail 9901 <1> 9902 <1> @@: 9903 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 9904 000000B0 50 <1> push ax 9905 <1> %endif 9906 000000B1 8CD8 <1> mov ax, ds 9907 000000B3 05740B <1> add ax, paras(CODESECTIONOFFSET) 9908 000000B6 B9610D <1> mov cx, ldebug_code_size_p 9909 000000B9 E8940B <1> call init_movp 9910 <1> 9911 000000BC 8916[CE00] <1> mov word [code_seg], dx ; initialise code segment reference 9912 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 9913 000000C0 58 <1> pop ax 9914 000000C1 A3[F60A] <1> mov word [history.segorsel + soaSegSel], ax 9915 <1> %if _PM 9916 000000C4 A3[F80A] <1> mov word [history.segorsel + soaSegment], ax 9917 <1> %endif 9918 000000C7 8EC0 <1> mov es, ax 9919 000000C9 31FF <1> xor di, di 9920 000000CB B90010 <1> mov cx, historysegment_size >> 1 9921 000000CE 31C0 <1> xor ax, ax 9922 000000D0 F3AB <1> rep stosw 9923 <1> %endif 9924 <1> 9925 000000D2 89D8 <1> mov ax, bx 9926 <1> 9927 000000D4 A3[F209] <1> mov word [auxbuff_segorsel + soaSegSel], ax 9928 <1> %if _PM 9929 000000D7 A3[F409] <1> mov word [auxbuff_segorsel + soaSegment], ax 9930 <1> ; initialise auxbuff references 9931 <1> %endif 9932 000000DA 8EC0 <1> mov es, ax 9933 000000DC 31FF <1> xor di, di 9934 000000DE B90810 <1> mov cx, _AUXBUFFSIZE >> 1 9935 000000E1 31C0 <1> xor ax, ax 9936 000000E3 F3AB <1> rep stosw ; initialise auxbuff 9937 <1> 9938 000000E5 FA <1> cli 9939 000000E6 8CD8 <1> mov ax, ds 9940 000000E8 8EC0 <1> mov es, ax 9941 000000EA 8ED0 <1> mov ss, ax 9942 000000EC BC[400C] <1> mov sp, stack_end 9943 000000EF FB <1> sti 9944 <1> 9945 000000F0 B44A <1> mov ah, 4Ah 9946 000000F2 BBC520 <1> mov bx, paras(NONBOOTINITSTACK_START) 9947 000000F5 CD21 <1> int 21h ; shrink to drop init stack 9948 <1> 9949 000000F7 E9610C <1> jmp old_initcode 9950 <1> 9951 <1> 9952 <1> init_retf: 9953 000000FA CB <1> retf 9954 <1> 9955 <1> 9956 <1> ; INP: bx => destination for auxbuff 9957 <1> ; (The following are not actually used by this function, 9958 <1> ; they're just what is passed in and preserved to 9959 <1> ; be used by the caller after returning.) 9960 <1> ; dx => destination for code image 9961 <1> ; (if boot-loaded:) cx => destination for pseudo-PSP 9962 <1> ; (implies cx+10h => destination for data_entry) 9963 <1> ; ax => segment for history buffer 9964 <1> ; OUT: ZR if this destination for auxbuff doesn't cross 9965 <1> ; a 64 KiB boundary 9966 <1> ; NZ else 9967 <1> ; CHG: si, di 9968 <1> init_check_auxbuff: 9969 000000FB 89DE <1> mov si, bx ; => auxbuff 9970 <1> %if _AUXBUFFSIZE < 8192 9971 <1> %error Expected full sector length auxbuff 9972 <1> %endif 9973 000000FD 8DBC0002 <1> lea di, [si + (8192 >> 4)]; => behind auxbuff (at additional paragraph) 9974 00000101 81E600F0 <1> and si, 0F000h ; => 64 KiB chunk of first paragraph of auxbuff 9975 00000105 81E700F0 <1> and di, 0F000h ; => 64 KiB chunk of additional paragraph 9976 00000109 39F7 <1> cmp di, si ; same ? 9977 <1> ; ZR if they are the same 9978 0000010B C3 <1> retn 9979 <1> 9980 <1> 9981 <1> %if _BOOTLDR 9982 <1> ; Our loader transfers control to us with these registers: 9983 <1> ; INP: ss:bp -> BPB 9984 <1> ; ss:bp - 16 -> loadstackvars 9985 <1> ; ss:bp - 32 -> loaddata 9986 <1> ; cs:0 -> loaded payload 9987 <1> ; cs:32 -> entry point 9988 <1> ; STT: EI, UP 9989 <1> ; all interrupts left from BIOS 9990 <1> boot_initcode: 9991 0000010C FC <1> cld 9992 <1> 9993 <1> d4 call init_d4message 9994 <1> d4 asciz "In boot_initcode",13,10 9995 <1> 9996 0000010D 8B56E0 <1> mov dx, word [bp + ldMemoryTop] 9997 <1> 9998 <1> ; initialise sdp 9999 00000110 8B461E <1> mov ax, word [bp + bsBPB + bpbHiddenSectors + 2] 10000 00000113 A3[AE8C] <1> mov word [load_data - LOADDATA2 + bsBPB + bpbHiddenSectors + 2], ax 10001 00000116 8B461C <1> mov ax, word [bp + bsBPB + bpbHiddenSectors] 10002 00000119 A3[AC8C] <1> mov word [load_data - LOADDATA2 + bsBPB + bpbHiddenSectors], ax 10003 0000011C 8A4640 <1> mov al, byte [bp + bsBPB + ebpbNew + bpbnBootUnit] 10004 0000011F A2[D08C] <1> mov byte [load_data - LOADDATA2 + bsBPB + ebpbNew + bpbnBootUnit], al 10005 <1> 10006 00000122 8CDB <1> mov bx, ds 10007 00000124 8EC3 <1> mov es, bx ; => data entry image 10008 00000126 BF[D08B] <1> mov di, loaddata_loadedfrom ; -> loaded from data (ldp) 10009 <1> 10010 <1> ; initialise LOADDATA, LOADSTACKVARS, and BPB 10011 00000129 16 <1> push ss 10012 0000012A 1F <1> pop ds 10013 0000012B 8D76E0 <1> lea si, [bp + LOADDATA] ; -> LOADDATA on stack 10014 0000012E B97A00 <1> mov cx, (-LOADDATA + bsBPB + ebpbNew + BPBN_size) 10015 00000131 F3A4 <1> rep movsb 10016 <1> 10017 <1> ; initialise cmdline_buffer from below LOADDATA 10018 00000133 8DB6E0FE <1> lea si, [bp + ldCommandLine.start] 10019 00000137 BF[E000] <1> mov di, cmdline_buffer ; -> our buffer in data entry 10020 <1> 10021 0000013A 813C00FF <1> cmp word [si], 0FF00h 10022 0000013E 7505 <1> jne @F 10023 <1> 10024 00000140 0E <1> push cs 10025 00000141 1F <1> pop ds 10026 00000142 BE[F209] <1> mov si, imsg.default_cmdline 10027 <1> 10028 <1> @@: 10029 00000145 AC <1> lodsb 10030 00000146 84C0 <1> test al, al 10031 00000148 741F <1> jz @FF 10032 <1> 10033 0000014A 26800E[A500]01 <1> setopt [es:internalflags3], dif3_input_cmdline 10034 00000150 A9 <1> db __TEST_IMM16 10035 <1> .switch_c_loop: 10036 00000151 AA <1> stosb 10037 00000152 AC <1> lodsb 10038 00000153 3C00 <1> cmp al, 0 10039 00000155 7411 <1> je @F 10040 00000157 3C3B <1> cmp al, ';' 10041 00000159 7504 <1> jne .switch_c_not_semicolon 10042 0000015B B00D <1> mov al, 13 10043 0000015D EBF2 <1> jmp .switch_c_loop 10044 <1> 10045 <1> .switch_c_not_semicolon: 10046 0000015F 3C5C <1> cmp al, '\' 10047 00000161 75EE <1> jne .switch_c_loop 10048 00000163 AC <1> lodsb 10049 00000164 3C00 <1> cmp al, 0 10050 00000166 75E9 <1> jne .switch_c_loop 10051 <1> 10052 <1> @@: 10053 00000168 AA <1> stosb 10054 <1> @@: 10055 <1> 10056 00000169 89D0 <1> mov ax, dx 10057 0000016B 2DC01F <1> sub ax, paras(BOOTDELTA) 10058 0000016E 7303E9E900 <1> jc .error_out_of_memory 10059 <1> ; We exaggerate the target size (BOOTDELTA) for the 10060 <1> ; worst case, thus we do not need to check for narrower 10061 <1> ; fits later on. BOOTDELTA includes the pseudo-PSP size, 10062 <1> ; data_entry size, asmtable1_size, asmtable2_size, 10063 <1> ; datastack_size, code_size, 2 times auxbuff_size, 10064 <1> ; historysegment_size, 10065 <1> ; plus 16 bytes for the image ident prefix paragraph, 10066 <1> ; and all of that rounded to a kibibyte boundary. 10067 <1> 10068 00000173 8CC9 <1> mov cx, cs 10069 00000175 81C14A01 <1> add cx, paras(init_size + BOOTINITSTACK_SIZE) 10070 00000179 7303E9DE00 <1> jc .error_out_of_memory 10071 0000017E 39D1 <1> cmp cx, dx 10072 00000180 7603E9D700 <1> ja .error_out_of_memory 10073 <1> 10074 00000185 8CCF <1> mov di, cs 10075 00000187 FA <1> cli 10076 00000188 8ED7 <1> mov ss, di 10077 0000018A BCA014 <1> mov sp, init_size + BOOTINITSTACK_SIZE 10078 0000018D FB <1> sti 10079 <1> 10080 <1> d4 call init_d4message 10081 <1> d4 asciz "Switched to init stack",13,10 10082 <1> 10083 <1> lframe none 10084 <1> lvar word, relocatedparas 10085 <1> lvar word, target 10086 0000018E 5589E55050 <1> lenter 10087 <1> lvar word, targetstart 10088 00000193 50 <1> push ax 10089 <1> lvar word, memtop 10090 00000194 52 <1> push dx 10091 00000195 8D7F10 <1> lea di, [bx + 10h] 10092 <1> lvar word, data 10093 00000198 57 <1> push di 10094 00000199 8DBF740B <1> lea di, [bx + paras(CODESECTIONOFFSET)] 10095 <1> lvar word, code 10096 0000019D 57 <1> push di 10097 <1> 10098 0000019E 39C1 <1> cmp cx, ax ; does init end below-or-equal target ? 10099 000001A0 7703E9C500 <1> jbe .no_relocation ; yes, no relocation needed --> 10100 <1> 10101 <1> d4 call init_d4message 10102 <1> d4 asciz "Needs relocation of init segment",13,10 10103 <1> 10104 000001A5 8B46F6 <1> mov ax, word [bp + ?data] 10105 000001A8 2D4A01 <1> sub ax, paras(init_size + BOOTINITSTACK_SIZE) 10106 000001AB 7303E9AC00 <1> jc .error_out_of_memory ; already at start of memory --> 10107 000001B0 83F860 <1> cmp ax, 60h 10108 000001B3 7303E9A400 <1> jb .error_out_of_memory ; already at start of memory --> 10109 <1> 10110 000001B8 0E <1> push cs 10111 000001B9 1F <1> pop ds 10112 000001BA 31F6 <1> xor si, si ; -> init source 10113 000001BC 8EC0 <1> mov es, ax 10114 000001BE 31FF <1> xor di, di ; -> init destination 10115 000001C0 B9500A <1> mov cx, words(init_size + BOOTINITSTACK_SIZE) 10116 000001C3 F3A5 <1> rep movsw ; relocate only init 10117 <1> ; Must not modify the data already on the stack here, 10118 <1> ; until after .done_relocation (which relocates ss). 10119 <1> 10120 000001C5 50 <1> push ax 10121 000001C6 E831FF <1> call init_retf ; jump to new init 10122 <1> 10123 000001C9 8ED0 <1> mov ss, ax 10124 000001CB 8B4EF4 <1> mov cx, word [bp + ?code] 10125 000001CE 81C1610D <1> add cx, paras(ldebug_code_size) 10126 000001D2 3B4EFA <1> cmp cx, word [bp + ?targetstart] 10127 <1> ; does code end below-or-equal target ? 10128 000001D5 7703E99000 <1> jbe .done_relocation ; yes, relocated enough --> 10129 <1> 10130 <1> d4 call init_d4message 10131 <1> d4 asciz "Needs relocation of entire load image",13,10 10132 <1> 10133 000001DA BA6000 <1> mov dx, 60h 10134 000001DD 8EC2 <1> mov es, dx 10135 000001DF 8CC8 <1> mov ax, cs 10136 000001E1 39C2 <1> cmp dx, ax ; already at start of memory ? 10137 000001E3 7377 <1> jae .error_out_of_memory ; then error --> 10138 <1> 10139 000001E5 42 <1> inc dx 10140 <1> ; cmp dx, ax 10141 <1> ; ja .error_out_of_memory 10142 000001E6 52 <1> push dx 10143 000001E7 2EFF36[1202] <1> push word [cs:.word_relocated] ; on stack: far address of .relocated 10144 <1> 10145 000001EC 89C1 <1> mov cx, ax ; source 10146 000001EE 29D1 <1> sub cx, dx ; source - target = how far to relocate 10147 000001F0 894EFE <1> mov word [bp + ?relocatedparas], cx 10148 <1> ; save away this value 10149 <1> 10150 000001F3 31FF <1> xor di, di ; es:di -> where to put relocator 10151 000001F5 06 <1> push es 10152 000001F6 57 <1> push di ; on stack: relocator destination 10153 000001F7 0E <1> push cs 10154 000001F8 1F <1> pop ds 10155 000001F9 BE[1402] <1> mov si, .relocator ; -> relocator source 10156 000001FC B90800 <1> mov cx, 8 10157 000001FF F3A5 <1> rep movsw ; put relocator stub 10158 <1> 10159 00000201 8EC2 <1> mov es, dx 10160 00000203 31FF <1> xor di, di ; -> where to relocate to 10161 00000205 31F6 <1> xor si, si ; -> relocate start 10162 <1> 10163 <1> BOOTRELOC1 equ paras( init_size + BOOTINITSTACK_SIZE + ldebug_data_entry_size + asmtable1_size + asmtable2_size + ldebug_code_size) 10166 <1> 10167 <1> %if 0 10168 <1> mov cx, BOOTRELOC1 ; how much to relocate 10169 <1> mov bx, 1000h 10170 <1> mov ax, cx 10171 <1> cmp ax, bx ; > 64 KiB? 10172 <1> jbe @F 10173 <1> mov cx, bx ; first relocate the first 64 KiB 10174 <1> @@: 10175 <1> sub ax, cx ; how much to relocate later 10176 <1> shl cx, 1 10177 <1> shl cx, 1 10178 <1> shl cx, 1 ; how much to relocate first, 10179 <1> ; << 3 == convert paragraphs to words 10180 <1> %else 10181 00000207 BB0010 <1> mov bx, 1000h 10182 <1> %if BOOTRELOC1 > 1000h 10183 0000020A B90080 <1> mov cx, 8000h 10184 0000020D B80F0A <1> mov ax, BOOTRELOC1 - 1000h 10185 <1> %else 10186 <1> mov cx, BOOTRELOC1 << 3 10187 <1> xor ax, ax 10188 <1> %endif 10189 <1> %endif 10190 00000210 CB <1> retf ; jump to relocator 10191 <1> 10192 00000211 00 <1> align 2, db 0 10193 <1> .word_relocated: 10194 00000212 [1702] <1> dw .relocated 10195 <1> 10196 <1> ; ds:si -> first chunk of to be relocated data 10197 <1> ; es:di -> first chunk of relocation destination 10198 <1> ; cx = number of words in first chunk 10199 <1> .relocator: 10200 00000214 F3A5 <1> rep movsw 10201 00000216 CB <1> retf ; jump to relocated cs : .relocated 10202 <1> 10203 <1> .relocated: 10204 <1> @@: 10205 00000217 8CC2 <1> mov dx, es 10206 00000219 01DA <1> add dx, bx 10207 0000021B 8EC2 <1> mov es, dx ; next segment 10208 <1> 10209 0000021D 8CDA <1> mov dx, ds 10210 0000021F 01DA <1> add dx, bx 10211 00000221 8EDA <1> mov ds, dx ; next segment 10212 <1> 10213 00000223 29D8 <1> sub ax, bx ; = how much to relocate after this round 10214 00000225 B90080 <1> mov cx, 1000h << 3 ; in case another full 64 KiB to relocate 10215 00000228 730B <1> jae @F ; another full 64 KiB to relocate --> 10216 0000022A 01D8 <1> add ax, bx ; restore 10217 0000022C D1E0 <1> shl ax, 1 10218 0000022E D1E0 <1> shl ax, 1 10219 00000230 D1E0 <1> shl ax, 1 ; convert paragraphs to words 10220 00000232 91 <1> xchg cx, ax ; cx = that many words 10221 00000233 31C0 <1> xor ax, ax ; no more to relocate after this round 10222 <1> 10223 <1> @@: 10224 00000235 31F6 <1> xor si, si 10225 00000237 31FF <1> xor di, di 10226 00000239 F3A5 <1> rep movsw ; relocate next chunk 10227 0000023B 85C0 <1> test ax, ax ; another round needed? 10228 0000023D 75D8 <1> jnz @BB ; yes --> 10229 <1> 10230 0000023F 8CC8 <1> mov ax, cs 10231 00000241 8ED0 <1> mov ss, ax ; relocate the stack 10232 <1> ; The stack frame variables have been relocated here 10233 <1> ; along with the INIT segment data. 10234 <1> 10235 00000243 8B46FE <1> mov ax, word [bp + ?relocatedparas] 10236 00000246 2946F6 <1> sub word [bp + ?data], ax 10237 00000249 721A <1> jc .error_internal 10238 0000024B 2946F4 <1> sub word [bp + ?code], ax 10239 0000024E 7215 <1> jc .error_internal 10240 <1> 10241 00000250 8B4EF4 <1> mov cx, word [bp + ?code] 10242 00000253 81C1610D <1> add cx, paras(ldebug_code_size) 10243 00000257 3B4EFA <1> cmp cx, word [bp + ?targetstart] 10244 <1> ; does code end below-or-equal target ? 10245 0000025A 760E <1> jbe .done_relocation ; yes --> 10246 <1> 10247 <1> .error_out_of_memory: 10248 0000025C BA[B80A] <1> mov dx, imsg.boot_error_out_of_memory 10249 <1> .putsz_error: 10250 0000025F E8A20A <1> call init_putsz_cs_bootldr 10251 00000262 E90C02 <1> jmp init_booterror.soft 10252 <1> 10253 <1> .error_internal: 10254 00000265 BA[C90A] <1> mov dx, imsg.boot_error_internal 10255 00000268 EBF5 <1> jmp .putsz_error 10256 <1> 10257 <1> 10258 <1> .done_relocation: 10259 <1> .no_relocation: 10260 0000026A 8CC8 <1> mov ax, cs 10261 0000026C 8ED0 <1> mov ss, ax ; relocate the stack 10262 <1> ; The stack frame variables have been relocated here 10263 <1> ; along with the INIT segment data. 10264 <1> 10265 0000026E 2EC606[7604]A8 <1> mov byte [cs:init_booterror.patch_switch_stack], __TEST_IMM8 10266 <1> ; SMC in section INIT 10267 <1> 10268 <1> d4 call init_d4message 10269 <1> d4 asciz "Relocated enough",13,10 10270 <1> 10271 <1> 10272 00000274 CD12 <1> int 12h 10273 00000276 B106 <1> mov cl, 6 10274 00000278 D3E0 <1> shl ax, cl 10275 <1> 10276 0000027A 50 <1> push ax 10277 0000027B 1E <1> push ds 10278 0000027C 31F6 <1> xor si, si 10279 0000027E 92 <1> xchg dx, ax 10280 0000027F 8EDE <1> mov ds, si 10281 00000281 C536BC00 <1> lds si, [4 * 2Fh] 10282 00000285 83C603 <1> add si, 3 10283 00000288 AC <1> lodsb 10284 00000289 3C52 <1> cmp al, 'R' 10285 0000028B 750F <1> jne .no_rpl 10286 0000028D AC <1> lodsb 10287 0000028E 3C50 <1> cmp al, 'P' 10288 00000290 750A <1> jne .no_rpl 10289 00000292 AC <1> lodsb 10290 00000293 3C4C <1> cmp al, 'L' 10291 00000295 7505 <1> jne .no_rpl 10292 00000297 B8064A <1> mov ax, 4A06h 10293 0000029A CD2F <1> int 2Fh 10294 <1> .no_rpl: 10295 0000029C 92 <1> xchg ax, dx 10296 0000029D 1F <1> pop ds 10297 0000029E 5A <1> pop dx 10298 <1> 10299 0000029F 39D0 <1> cmp ax, dx 10300 000002A1 7405 <1> je .no_error_rpl 10301 <1> ; in case RPL is present, error out (for now) 10302 <1> 10303 <1> ; notes for +RPL installation: 10304 <1> ; 1. Allocate enough memory for our MCB + an PSP + our image + the last and the RPL MCB 10305 <1> ; 2. Create the RPL's MCB + a last MCB 10306 <1> ; 3. Relocate, initialise PSP 10307 <1> ; 4. Hook Int2F as RPLOADER to report DOS our new size 10308 <1> 10309 000002A3 BA[3E0A] <1> mov dx, imsg.rpl_detected 10310 000002A6 EBB7 <1> jmp .putsz_error 10311 <1> 10312 <1> .no_error_rpl: 10313 <1> d4 call init_d4message 10314 <1> d4 asciz "Loader past RPL detection",13,10 10315 <1> 10316 000002A8 8B5EF8 <1> mov bx, word [bp + ?memtop] 10317 000002AB 39C3 <1> cmp bx, ax 10318 000002AD 7405 <1> je @F 10319 <1> 10320 000002AF BA[650A] <1> mov dx, imsg.mismatch_detected 10321 000002B2 EBAB <1> jmp .putsz_error 10322 <1> 10323 <1> @@: ; bx => behind usable memory 10324 <1> %if 0 10325 <1> mov ah, 0C1h 10326 <1> stc 10327 <1> int 15h ; BIOS, do you have an EBDA? 10328 <1> mov ax, es 10329 <1> jnc .ebda ; segment in ax --> 10330 <1> ; I don't believe you, let's check 10331 <1> %endif ; Enabling this would enable the BIOS to return an EBDA even if it isn't 10332 <1> ; noted at 40h:0Eh, which would be useless because we have to relocate it. 10333 <1> 10334 000002B4 31D2 <1> xor dx, dx ; initialise dx to zero if no EBDA 10335 000002B6 B84000 <1> mov ax, 40h 10336 000002B9 8EC0 <1> mov es, ax 10337 000002BB 26A10E00 <1> mov ax, word [ es:0Eh ] ; EBDA segment (unless zero) or LPT4 base I/O address (200h..3FCh) 10338 000002BF 3D0004 <1> cmp ax, 400h 10339 000002C2 7223 <1> jb .noebda ; --> 10340 <1> .ebda: 10341 <1> d4 call init_d4message 10342 <1> d4 asciz "EBDA detected",13,10 10343 <1> 10344 000002C4 2EFE06[0C08] <1> inc byte [cs:init_boot_ebdaflag] 10345 000002C9 39D8 <1> cmp ax, bx 10346 <1> ;jb init_booterror.soft ; uhh, the EBDA is inside our memory? 10347 <1> ;ja init_booterror.soft ; EBDA higher than top of memory. This is just as unexpected. 10348 000002CB 7405 <1> je @F 10349 000002CD BA[990A] <1> mov dx, imsg.boot_ebda_unexpected 10350 000002D0 EB8D <1> jmp .putsz_error 10351 <1> 10352 <1> @@: 10353 000002D2 8ED8 <1> mov ds, ax 10354 000002D4 31D2 <1> xor dx, dx 10355 000002D6 8A160000 <1> mov dl, byte [ 0 ] ; EBDA size in KiB 10356 000002DA B106 <1> mov cl, 6 10357 000002DC D3E2 <1> shl dx, cl ; *64, to paragraphs 10358 000002DE 2E8916[0608] <1> mov word [cs:init_boot_ebdasize], dx 10359 000002E3 2EA3[0808] <1> mov word [cs:init_boot_ebdasource], ax 10360 <1> d4 jmp @F 10361 <1> .noebda: 10362 <1> d4 call init_d4message 10363 <1> d4 asciz "No EBDA detected",13,10 10364 <1> @@: 10365 <1> 10366 <1> 10367 000002E7 8B4EF8 <1> mov cx, word [bp + ?memtop] 10368 000002EA 2E030E[0608] <1> add cx, [cs:init_boot_ebdasize] 10369 000002EF 81E99A1D <1> sub cx, paras(INITSECTIONOFFSET + datastack_size + auxbuff_size + historysegment_size) 10370 <1> ; cx = paragraph of pseudo-PSP if here 10371 000002F3 49 <1> dec cx ; => paragraph of image ident 10372 000002F4 83E1C0 <1> and cx, ~ (paras(1024) - 1) ; round down to kibibyte boundary 10373 000002F7 41 <1> inc cx ; => paragraph of pseudo-PSP if here 10374 <1> 10375 000002F8 89CB <1> mov bx, cx 10376 000002FA 89DA <1> mov dx, bx 10377 000002FC 81C39919 <1> add bx, paras(AUXTARGET1) ; => auxbuff target if here 10378 00000300 81C2380C <1> add dx, paras(CODETARGET1) ; => code target if here 10379 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 10380 00000304 89D8 <1> mov ax, bx 10381 00000306 050102 <1> add ax, paras(auxbuff_size) 10382 <1> %if AUXTARGET1_equ <= CODETARGET1_equ 10383 <1> %error Unexpected layout 10384 <1> %endif 10385 <1> %endif 10386 00000309 E8EFFD <1> call init_check_auxbuff 10387 0000030C 743E <1> jz @F 10388 <1> 10389 <1> d4 call init_d4message 10390 <1> d4 asciz "First layout rejected",13,10 10391 <1> 10392 0000030E 89CB <1> mov bx, cx ; attempt same target again 10393 00000310 89DA <1> mov dx, bx 10394 00000312 81C3380C <1> add bx, paras(AUXTARGET2) ; => auxbuff target if here 10395 00000316 81C2390E <1> add dx, paras(CODETARGET2) ; => code target if here 10396 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 10397 <1> %if (paras(AUXTARGET1_equ) + paras(auxbuff_size_equ)) != (paras(CODETARGET2_equ) + paras(ldebug_code_size_equ)) 10399 <1> %error Unexpected layout 10400 <1> %endif 10401 <1> %endif 10402 0000031A E8DEFD <1> call init_check_auxbuff 10403 0000031D 742D <1> jz @F 10404 <1> 10405 <1> d4 call init_d4message 10406 <1> d4 asciz "Second layout rejected",13,10 10407 <1> 10408 <1> ; If both prior attempts failed, we allocate 10409 <1> ; an additional 8 KiB and move the buffer to 10410 <1> ; that. This should always succeed. 10411 0000031F 8B4EF8 <1> mov cx, word [bp + ?memtop] 10412 00000322 2E030E[0608] <1> add cx, [cs:init_boot_ebdasize] 10413 00000327 81E99B1F <1> sub cx, paras(INITSECTIONOFFSET + datastack_size + auxbuff_size*2 + historysegment_size) 10414 <1> ; cx = paragraph of pseudo-PSP if here 10415 0000032B 49 <1> dec cx ; => paragraph of image ident 10416 0000032C 83E1C0 <1> and cx, ~ (paras(1024) - 1) ; round down to kibibyte boundary 10417 0000032F 41 <1> inc cx ; => paragraph of pseudo-PSP if here 10418 <1> 10419 00000330 89CB <1> mov bx, cx 10420 00000332 89DA <1> mov dx, bx 10421 00000334 81C39919 <1> add bx, paras(AUXTARGET1) ; => auxbuff target if here 10422 <1> ; Note that we use AUXTARGET1 here, not AUXTARGET3, because 10423 <1> ; we move where the debugger starts rather than where it ends. 10424 00000338 81C2380C <1> add dx, paras(CODETARGET1) ; => code target if here 10425 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 10426 0000033C 89D8 <1> mov ax, bx 10427 0000033E 050102 <1> add ax, paras(auxbuff_size) 10428 <1> %endif 10429 00000341 E8B7FD <1> call init_check_auxbuff 10430 00000344 7406 <1> jz @F 10431 <1> 10432 <1> ; Because this shouldn't happen, this is 10433 <1> ; considered an internal error. 10434 00000346 BA[3308] <1> mov dx, imsg.early_reloc_fail 10435 00000349 E913FF <1> jmp .putsz_error 10436 <1> 10437 <1> 10438 <1> ; cx => data_entry target 10439 <1> ; dx => code target 10440 <1> ; bx => auxbuff target 10441 <1> ; ax => history segment 10442 <1> @@: 10443 <1> d4 call init_d4message 10444 <1> d4 asciz "Layout found" 10445 <1> d4 call init_d4dumpregs 10446 <1> d4 call init_d4message 10447 <1> d4 asciz 13,10 10448 <1> 10449 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 10450 0000034C 50 <1> push ax 10451 <1> %endif 10452 0000034D 894EFC <1> mov word [bp + ?target], cx 10453 00000350 52 <1> push dx 10454 00000351 2E803E[0C08]00 <1> cmp byte [cs:init_boot_ebdaflag], 0 10455 00000357 742E <1> jz .reloc_memtop_no_ebda 10456 00000359 49 <1> dec cx 10457 0000035A 2E2B0E[0608] <1> sub cx, word [cs:init_boot_ebdasize] 10458 0000035F 2EA1[0808] <1> mov ax, word [cs:init_boot_ebdasource] 10459 00000363 89CA <1> mov dx, cx 10460 00000365 2E890E[0A08] <1> mov word [cs:init_boot_ebdadest], cx 10461 0000036A 2E8B0E[0608] <1> mov cx, word [cs:init_boot_ebdasize] 10462 0000036F E8DE08 <1> call init_movp 10463 00000372 014EF8 <1> add word [bp + ?memtop], cx 10464 00000375 2E800E[0C08]02 <1> or byte [cs:init_boot_ebdaflag], 2 10465 0000037B B84000 <1> mov ax, 40h 10466 0000037E 8EC0 <1> mov es, ax 10467 00000380 2689160E00 <1> mov word [es:0Eh], dx ; relocate EBDA 10468 <1> 10469 <1> d4 call init_d4message 10470 <1> d4 asciz "EBDA relocated",13,10 10471 <1> 10472 00000385 EB02 <1> jmp @F 10473 <1> 10474 <1> .reloc_memtop_no_ebda: 10475 00000387 89CA <1> mov dx, cx 10476 <1> @@: 10477 00000389 B106 <1> mov cl, 6 10478 0000038B D3EA <1> shr dx, cl 10479 0000038D B84000 <1> mov ax, 40h 10480 00000390 8EC0 <1> mov es, ax 10481 00000392 2E8916[0208] <1> mov word [ cs:init_boot_new_memsizekib ], dx 10482 00000397 2687161300 <1> xchg word [es:13h], dx 10483 0000039C 2E8916[0408] <1> mov word [ cs:init_boot_old_memsizekib ], dx 10484 000003A1 5A <1> pop dx 10485 <1> d4 call init_d4message 10486 <1> d4 asciz "Memory top relocated",13,10 10487 <1> 10488 000003A2 8B4EFC <1> mov cx, word [bp + ?target] 10489 000003A5 8ED9 <1> mov ds, cx 10490 000003A7 8B7EF8 <1> mov di, word [bp + ?memtop] ; => memory top 10491 000003AA 81EF4002 <1> sub di, paras(1024+8192) 10492 000003AE 8EC7 <1> mov es, di 10493 000003B0 39CF <1> cmp di, cx ; max padding starts below target PSP ? 10494 000003B2 7209 <1> jb @F ; yes, do not initialise padding 10495 000003B4 31FF <1> xor di, di ; -> padding 10496 000003B6 B90012 <1> mov cx, words(1024+8192) 10497 000003B9 31C0 <1> xor ax, ax 10498 000003BB F3AB <1> rep stosw ; initialise padding 10499 <1> @@: 10500 <1> 10501 000003BD 8B46F4 <1> mov ax, word [bp + ?code] ; => code source 10502 <1> ; dx => code target 10503 000003C0 B9610D <1> mov cx, ldebug_code_size_p ; = size 10504 000003C3 E88A08 <1> call init_movp ; relocate code to target 10505 <1> d4 call init_d4message 10506 <1> d4 asciz "Code segment relocated",13,10 10507 <1> 10508 000003C6 52 <1> push dx ; (code segment) 10509 000003C7 8B46F6 <1> mov ax, word [bp + ?data] ; => data_entry source 10510 000003CA 8CDA <1> mov dx, ds 10511 000003CC 83C210 <1> add dx, paras(100h) ; => data_entry target 10512 000003CF B9640B <1> mov cx, paras(ldebug_data_entry_size + asmtable1_size + asmtable2_size) 10513 000003D2 E87B08 <1> call init_movp ; relocate data_entry to target 10514 000003D5 8F06[CE00] <1> pop word [code_seg] ; initialise code reference 10515 <1> d4 call init_d4message 10516 <1> d4 asciz "Data segment relocated",13,10 10517 <1> 10518 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 10519 000003D9 58 <1> pop ax 10520 000003DA A3[F60A] <1> mov word [history.segorsel + soaSegSel], ax 10521 <1> %if _PM 10522 000003DD A3[F80A] <1> mov word [history.segorsel + soaSegment], ax 10523 <1> %endif 10524 000003E0 8EC0 <1> mov es, ax 10525 000003E2 31FF <1> xor di, di 10526 000003E4 B90010 <1> mov cx, historysegment_size >> 1 10527 000003E7 31C0 <1> xor ax, ax 10528 000003E9 F3AB <1> rep stosw 10529 <1> %endif 10530 <1> 10531 000003EB 89D8 <1> mov ax, bx 10532 000003ED A3[F209] <1> mov word [auxbuff_segorsel + soaSegSel], ax 10533 <1> %if _PM 10534 000003F0 A3[F409] <1> mov word [auxbuff_segorsel + soaSegment], ax 10535 <1> ; initialise auxbuff references 10536 <1> %endif 10537 000003F3 8EC0 <1> mov es, ax 10538 000003F5 31FF <1> xor di, di 10539 000003F7 B90810 <1> mov cx, _AUXBUFFSIZE >> 1 10540 000003FA 31C0 <1> xor ax, ax 10541 000003FC F3AB <1> rep stosw ; initialise auxbuff 10542 <1> d4 call init_d4message 10543 <1> d4 asciz "auxbuff initialised",13,10 10544 <1> 10545 000003FE 1E <1> push ds 10546 000003FF 07 <1> pop es 10547 00000400 31FF <1> xor di, di 10548 00000402 B98000 <1> mov cx, words(100h) 10549 00000405 F3AB <1> rep stosw ; initialise pseudo-PSP 10550 <1> 10551 <1> init_boot_imageident: 10552 00000407 8CD8 <1> mov ax, ds 10553 00000409 48 <1> dec ax 10554 0000040A 8EC0 <1> mov es, ax ; => paragraph for imageident 10555 0000040C 31FF <1> xor di, di ; -> imageident target 10556 0000040E 8B5EF8 <1> mov bx, word [bp + ?memtop] 10557 00000411 29C3 <1> sub bx, ax ; = how many paragraphs do we use ? 10558 <1> 10559 00000413 0E <1> push cs 10560 00000414 1F <1> pop ds 10561 00000415 891E[F807] <1> mov word [imageident.size], bx ; set image ident size 10562 <1> 10563 00000419 BE[F007] <1> mov si, imageident 10564 0000041C 56 <1> push si 10565 0000041D B90800 <1> mov cx, 8 10566 00000420 31D2 <1> xor dx, dx 10567 <1> .loop: 10568 00000422 AD <1> lodsw 10569 00000423 01C2 <1> add dx, ax 10570 00000425 E2FB <1> loop .loop 10571 00000427 5E <1> pop si 10572 <1> 10573 00000428 F7DA <1> neg dx 10574 0000042A 8916[F607] <1> mov word [imageident.check], dx ; set image ident checksum 10575 <1> 10576 0000042E B108 <1> mov cl, 8 10577 00000430 F3A5 <1> rep movsw ; write image ident paragraph 10578 <1> 10579 00000432 8B46FC <1> mov ax, word [bp + ?target] 10580 <1> 10581 <1> lleave ctx ; dropping this frame for stack switch 10582 <1> 10583 00000435 FA <1> cli 10584 00000436 8ED8 <1> mov ds, ax 10585 00000438 8ED0 <1> mov ss, ax 10586 0000043A BC[400C] <1> mov sp, stack_end ; switch stacks 10587 0000043D FB <1> sti 10588 <1> 10589 0000043E 2EFF36[0408] <1> push word [cs:init_boot_old_memsizekib] 10590 00000443 8F06[E48F] <1> pop word [boot_old_memsizekib] 10591 00000447 2EFF36[0208] <1> push word [cs:init_boot_new_memsizekib] 10592 0000044C 8F06[E28F] <1> pop word [boot_new_memsizekib] 10593 00000450 2EA0[0C08] <1> mov al, byte [cs:init_boot_ebdaflag] 10594 00000454 2401 <1> and al, 1 10595 00000456 A2[E68F] <1> mov byte [boot_ebdaflag], al 10596 <1> 10597 00000459 800E[9D00]40 <1> setopt [internalflags], nodosloaded 10598 0000045E 8026[9C00]0F <1> clropt [internalflags], notstdinput|inputfile|notstdoutput|outputfile 10599 00000463 C606[E70A]00 <1> mov byte [notatty], 0 ; it _is_ a tty 10600 <1> 10601 00000468 BA[3008] <1> mov dx, imsg.crlf 10602 0000046B E87308 <1> call init_putsz_cs 10603 <1> 10604 <1> d4 call init_d4message 10605 <1> d4 asciz "New boot_initcode done",13,10 10606 <1> 10607 0000046E E9D908 <1> jmp boot_old_initcode 10608 <1> 10609 <1> 10610 <1> init_booterror: 10611 <1> .soft: 10612 00000471 31C0 <1> xor ax, ax 10613 00000473 A9 <1> db __TEST_IMM16 ; (skip mov) 10614 <1> .hard: 10615 00000474 B001 <1> mov al, 1 10616 <1> 10617 <1> ;d4 call init_d4pocketdosmemdump 10618 <1> d4 call init_d4dumpregs 10619 <1> 10620 <1> .patch_switch_stack: 10621 00000476 EB09 <1> jmp strict short .no_switch_stack 10622 <1> 10623 00000478 8CCB <1> mov bx, cs 10624 0000047A FA <1> cli 10625 0000047B 8ED3 <1> mov ss, bx 10626 0000047D BCA014 <1> mov sp, init_size + BOOTINITSTACK_SIZE 10627 00000480 FB <1> sti 10628 <1> 10629 <1> .no_switch_stack: 10630 00000481 50 <1> push ax 10631 <1> 10632 00000482 B84000 <1> mov ax, 40h 10633 00000485 8EC0 <1> mov es, ax 10634 <1> 10635 00000487 2EF606[0C08]02 <1> test byte [cs:init_boot_ebdaflag], 2 10636 0000048D 7416 <1> jz @F 10637 <1> 10638 0000048F 2E8B16[0808] <1> mov dx, [cs:init_boot_ebdasource] 10639 00000494 2EA1[0A08] <1> mov ax, [cs:init_boot_ebdadest] 10640 00000498 2E8B0E[0608] <1> mov cx, [cs:init_boot_ebdasize] 10641 0000049D E8B007 <1> call init_movp 10642 <1> 10643 000004A0 2689160E00 <1> mov word [es:0Eh], dx 10644 <1> @@: 10645 <1> 10646 000004A5 2E8B16[0408] <1> mov dx, [cs:init_boot_old_memsizekib] 10647 000004AA 85D2 <1> test dx, dx 10648 000004AC 7405 <1> jz @F 10649 000004AE 2689161300 <1> mov word [es:13h], dx 10650 <1> @@: 10651 <1> 10652 000004B3 BA[F70A] <1> mov dx, imsg.booterror 10653 000004B6 E84B08 <1> call init_putsz_cs_bootldr 10654 000004B9 E82008 <1> call init_getc_bootldr 10655 000004BC 58 <1> pop ax 10656 000004BD 85C0 <1> test ax, ax 10657 000004BF 7502 <1> jnz @F 10658 000004C1 CD19 <1> int 19h 10659 <1> @@: 10660 000004C3 EA0000FFFF <1> jmp 0FFFFh:0 10661 <1> %endif ; _BOOTLDR 10662 <1> 10663 <1> 10664 <1> %if _DEBUG4 || _DEBUG5 10665 <1> %define _DEB_ASM_PREFIX init_ 10666 <1> %include "deb.asm" 10667 <1> %endif 10668 <1> 10669 <1> 10670 <1> %macro __writepatchtable2 0-*.nolist 10671 <1> %if %0 & 1 10672 <1> %fatal Expected even number of arguments 10673 <1> %endif 10674 <1> %rep %0 >> 1 10675 <1> %1 %2 10676 <1> %rotate 2 10677 <1> %endrep 10678 <1> %endmacro 10679 <1> 10680 <1> %macro __patchtable2_entry 0.nolist 10681 <1> ; only if this isn't the first (pseudo-)entry 10682 <1> %if %$lastcount != 0 10683 <1> %assign %$runscount %[%$runscount]+1 10684 <1> ; if the offset from %$previous is less than 255 10685 <1> %if (%$last-%$previous) < 255 10686 <1> %assign %$$method2tablesize %$$method2tablesize+1 10687 <1> ; then write a single byte (number of bytes not to patch between) 10688 <1> %xdefine %$$method2list %$$method2list,db,%$last-%$previous 10689 <1> %else 10690 <1> ; otherwise write a 255 ("reposition") and write the 16-bit address afterwards 10691 <1> %assign %$$method2tablesize %$$method2tablesize+3 10692 <1> %xdefine %$$method2list %$$method2list,db,255,dw,%$last 10693 <1> %assign %$reposcount %[%$reposcount]+1 10694 <1> %endif 10695 <1> %if %$lastcount == 1 10696 <1> %assign %$onecount %[%$onecount]+1 10697 <1> %endif 10698 <1> %assign %$$method2tablesize %$$method2tablesize+1 10699 <1> ; and write the number of bytes to be patched 10700 <1> %xdefine %$$method2list %$$method2list,db,%$lastcount 10701 <1> ; define %$previous for the next entry: it points to the next non-patched byte 10702 <1> %define %$previous (%[%$last]+%[%$lastcount]) 10703 <1> %endif 10704 <1> %endmacro 10705 <1> 10706 <1> %macro writepatchtable 2-*.nolist 10707 <1> 10708 <1> numdef %{1}_FORCE_METHOD, 0 10709 <1> %push 10710 <1> ; Determine length of simple table: 10711 <1> %assign %$method1tablesize (%0 - 2)*2 10712 <1> 10713 <1> %if !_%{1}_FORCE_METHOD || _%{1}_FORCE_METHOD == 2 10714 <1> ; Determine length of complicated table: 10715 <1> %assign %$method2tablesize 0 10716 <1> %define %$method2list db,"" 10717 <1> %push 10718 <1> %if _WPT_LABELS 10719 <1> %define %$previous code_start ; if list contains labels 10720 <1> %else 10721 <1> %define %$previous 0 10722 <1> %endif 10723 <1> %define %$last %[%$previous] 10724 <1> %assign %$lastcount 0 10725 <1> %assign %$onecount 0 10726 <1> %assign %$reposcount 0 10727 <1> %assign %$bytescount %0 - 2 10728 <1> %assign %$runscount 0 10729 <1> %rotate 1 10730 <1> %rep %0 - 2 10731 <1> %rotate 1 10732 <1> ;if it continues the previous patch and not too long and this isn't the first 10733 <1> %if ((%$last+%$lastcount) == %1) && (%$lastcount < 255) && (%$lastcount != 0) 10734 <1> ; then do not write an entry, just increase the patch's size 10735 <1> %assign %$lastcount %[%$lastcount]+1 10736 <1> %else 10737 <1> ; otherwise write the last entry 10738 <1> __patchtable2_entry 10739 <1> ; define new %$last to this parameter, %$lastcount to one 10740 <1> %define %$last %1 10741 <1> %assign %$lastcount 1 10742 <1> %endif 10743 <1> %endrep 10744 <1> __patchtable2_entry 10745 <1> 10746 <1> ; at the end, there's a patch with offset 0, size 0 10747 <1> %assign %$$method2tablesize %$$method2tablesize+2 10748 <1> %xdefine %$$method2list %$$method2list,db,0,db,0 10749 <1> 10750 <1> %assign %$$onecount %$onecount 10751 <1> %assign %$$reposcount %$reposcount 10752 <1> %assign %$$bytescount %$bytescount 10753 <1> %assign %$$runscount %$runscount 10754 <1> %pop 10755 <1> %rotate 1 10756 <1> %endif 10757 <1> 10758 <1> %if _%{1}_FORCE_METHOD == 2 10759 <1> %define __%{1}_method 2 10760 <1> %elif _%{1}_FORCE_METHOD == 1 10761 <1> %define __%{1}_method 1 10762 <1> %else 10763 <1> %if _%{1}_FORCE_METHOD 10764 <1> %fatal Invalid forced method selected: _%{1}_FORCE_METHOD 10765 <1> %endif 10766 <1> %if %$method1tablesize > (%$method2tablesize+20) 10767 <1> %define __%{1}_method 2 10768 <1> %else 10769 <1> %define __%{1}_method 1 10770 <1> %endif 10771 <1> %endif 10772 <1> 10773 <1> 10774 <1> %1: 10775 <1> %if __%{1}_method == 2 10776 <1> __writepatchtable2 %$method2list 10777 <1> endarea %1 10778 <1> %assign %$size %1_size 10779 <1> %warning %1: %$size bytes (Method 2) 10780 <1> %warning 1B=%$onecount repo=%$reposcount run=%$runscount byte=%$bytescount 10781 <1> %else 10782 <1> %rotate 1 10783 <1> %rep %0 - 2 10784 <1> %rotate 1 10785 <1> dw %1 10786 <1> %endrep 10787 <1> %rotate 1 10788 <1> endarea %1 10789 <1> %assign %$size %1_size 10790 <1> %warning %1: %$size bytes (Method 1) 10791 <1> %endif 10792 <1> %pop 10793 <1> %endmacro 10794 <1> 10795 <1> align 2, db 0 ; align on word boundary 10796 <1> ; Table of patches that are to be set NOP if not running on a 386. 10797 000004C8 020104040201010101- <1> writepatchtable patch_no386_table, PATCH_NO386_TABLE 10797 000004D1 04FF75030104040201- <1> 10797 000004DA 01010104FF270501FF- <1> 10797 000004E3 D3070104090201FFA4- <1> 10797 000004EC 0C011101080116011D- <1> 10797 000004F5 0108014A0106010B01- <1> 10797 000004FE 0A010901050103010A- <1> 10797 00000507 01060103010A010301- <1> 10797 00000510 030101010401FFFD0E- <1> 10797 00000519 01030101012F010504- <1> 10797 00000522 FFE612042F01040106- <1> 10797 0000052B 053B010201FF8B1401- <1> 10797 00000534 020105013D01160104- <1> 10797 0000053D 012101040123010101- <1> 10797 00000546 0201060A010110010C- <1> 10797 0000054F 120C010401FF9E1601- <1> 10797 00000558 2D011B010801050124- <1> 10797 00000561 010F01FF8C1801FF6E- <1> 10797 0000056A 20049C0137016101FF- <1> 10797 00000573 802301FFBB2410FFFF- <1> 10797 0000057C 2701FF872901120124- <1> 10797 00000585 011D01010102011401- <1> 10797 0000058E 020503010208B701EB- <1> 10797 00000597 0AFFE42E010B01FF47- <1> 10797 000005A0 310126030709F80A28- <1> 10797 000005A9 01FF4E370107010401- <1> 10797 000005B2 150B31013F012F0302- <1> 10797 000005BB 032201110115010F01- <1> 10797 000005C4 110718011101010101- <1> 10797 000005CD 010101180101010101- <1> 10797 000005D6 01012B04B301260307- <1> 10797 000005DF 09FF1D3D013F04040A- <1> 10797 000005E8 340104019F0127030C- <1> 10797 000005F1 0504034B0101010101- <1> 10797 000005FA 01010109FF844101FF- <1> 10797 00000603 C7420827023A010401- <1> 10797 0000060C 040116061D02FF0D45- <1> 10797 00000615 020901010120010101- <1> 10797 0000061E FF9C46010B01A10104- <1> 10797 00000627 010201050125010401- <1> 10797 00000630 040101010901010101- <1> 10797 00000639 010301020102010201- <1> 10797 00000642 1F010201E709FFEF49- <1> 10797 0000064B 0DFF034B01FFF04C01- <1> 10797 00000654 FF644E01040104011A- <1> 10797 0000065D 01140B9B012E020301- <1> 10797 00000666 030103020301030103- <1> 10797 0000066F 020301030103020301- <1> 10797 00000678 0301FFA0540105011A- <1> 10797 00000681 01FF85560EE1010201- <1> 10797 0000068A 2301FF555901010104- <1> 10797 00000693 010801010102010601- <1> 10797 0000069C 010104010801010102- <1> 10797 000006A5 010601080109015301- <1> 10797 000006AE 570507027F01090314- <1> 10797 000006B7 010906090306010601- <1> 10797 000006C0 01010A011C03050101- <1> 10797 000006C9 010B0311046F010601- <1> 10797 000006D2 02030A0125010801FF- <1> 10797 000006DB 345D051505FF785E01- <1> 10797 000006E4 0D0102012D01020129- <1> 10797 000006ED 01FFAB600B140BFF78- <1> 10797 000006F6 8C01A6065C06250102- <1> 10797 000006FF 01020101011A010201- <1> 10797 00000708 1604020303010101FF- <1> 10797 00000711 969104FFE492046604- <1> 10797 0000071A FF5A96011001020103- <1> 10797 00000723 010201050101010201- <1> 10797 0000072C 0201FF909801090421- <1> 10797 00000735 01FF2C9E0108010101- <1> 10797 0000073E 29010201220105041D- <1> 10797 00000747 03FF98A50147010C01- <1> 10797 00000750 0F0107031201470104- <1> 10797 00000759 011301950102010101- <1> 10797 00000762 0E010101020109010A- <1> 10797 0000076B 03AD032D040C050B05- <1> 10797 00000774 0E010A0104200D030A- <1> 10797 0000077D 01070102011A042F03- <1> 10797 00000786 0B0101011C034609FF- <1> 10797 0000078F 30AC02FF7FAE011201- <1> 10797 00000798 05018C028501051EFF- <1> 10797 000007A1 66B40707070201BA07- <1> 10797 000007AA 30010A07FF21C10101- <1> 10797 000007B3 032701FFEAC3010404- <1> 10797 000007BC 020101010104FF24D5- <1> 10797 000007C5 010000 <1> 10797 ****************** <1> warning: patch_no386_table: 768 (Method 2) [-w+user] 10797 ****************** <1> warning: 1B=249 repo=45 run=338 byte=785 [-w+user] 10798 <1> %undef PATCH_NO386_TABLE 10799 <1> 10800 <1> align 2, db 0 10801 <1> ; Table of patches that are to be set NOP if running on a 386. 10802 000007C8 FF1E1602FFB22905FF- <1> writepatchtable patch_386_table, PATCH_386_TABLE 10802 000007D1 E83705FFCE3D02FFAE- <1> 10802 000007DA 4B0E4D0EFFB84E07FF- <1> 10802 000007E3 ADAF04FF23D5010000 <1> 10802 ****************** <1> warning: patch_386_table: 36 (Method 2) [-w+user] 10802 ****************** <1> warning: 1B=1 repo=8 run=9 byte=54 [-w+user] 10803 <1> %undef PATCH_386_TABLE 10804 <1> 10805 <1> %unmacro __writepatchtable2 0-*.nolist 10806 <1> %unmacro __patchtable2_entry 0.nolist 10807 <1> %unmacro writepatchtable 2-*.nolist 10808 <1> 10809 <1> 10810 <1> %if _BOOTLDR 10811 000007EC 00 <1> align 16, db 0 10812 <1> ; Image identification 10813 <1> ; First dword: signature 10814 <1> ; Next word: version, two ASCII digits 10815 <1> ; Next word: checksum. adding up all words of the paragraph gives zero 10816 <1> ; Next word: size of image (including this paragraph) 10817 <1> ; Three words reserved, zero. 10818 <1> imageident: 10819 000007F0 4E4445423030 <1> db "NDEB00" 10820 000007F6 0000 <1> .check: dw 0 10821 000007F8 0000 <1> .size: dw 0 10822 000007FA 0000 <1> times 3 dw 0 10823 <1> %endif 10824 <1> align 2, db 0 10825 00000800 9A1D <1> memsize: dw paras(CODETARGET2 + ldebug_code_size + historysegment_size) 10828 <1> ; same as paras(AUXTARGET1 + auxbuff_size + historysegment_size) 10829 <1> 10830 <1> %if _BOOTLDR 10831 00000802 0000 <1> init_boot_new_memsizekib: dw 0 10832 00000804 0000 <1> init_boot_old_memsizekib: dw 0 10833 <1> 10834 00000806 0000 <1> init_boot_ebdasize: dw 0 10835 00000808 0000 <1> init_boot_ebdasource: dw 0 10836 0000080A 0000 <1> init_boot_ebdadest: dw 0 10837 0000080C 00 <1> init_boot_ebdaflag: db 0 10838 <1> %endif 10839 <1> 10840 <1> 10841 <1> imsg: 10842 <1> .early_mem_fail: 10843 0000080D 6C4465627567583A20- <1> db _PROGNAME,": Failed to allocate memory!" 10843 00000816 4661696C656420746F- <1> 10843 0000081F 20616C6C6F63617465- <1> 10843 00000828 206D656D6F727921 <1> 10844 <1> .crlf: 10845 00000830 0D0A00 <1> asciz 13,10 10846 <1> .early_reloc_fail: 10847 00000833 6C4465627567583A20- <1> asciz _PROGNAME,": Failed to relocate, internal error!",13,10 10847 0000083C 4661696C656420746F- <1> 10847 00000845 2072656C6F63617465- <1> 10847 0000084E 2C20696E7465726E61- <1> 10847 00000857 6C206572726F72210D- <1> 10847 00000860 0A00 <1> 10848 <1> .help.defaultfilename: 10849 00000862 444542554758 <1> db _FILENAME 10850 <1> .help.defaultfilename.length equ $ - .help.defaultfilename 10851 <1> .help.1: 10852 00000868 6C4465627567582028- <1> db _PROGNAME,_VERSION,", debugger.",13,10 10852 00000871 323032322D30342D32- <1> 10852 0000087A 31292C206465627567- <1> 10852 00000883 6765722E0D0A <1> 10853 00000889 0D0A <1> db 13,10 10854 0000088B 55736167653A20 <1> db "Usage: " 10855 00000892 00 <1> asciz 10856 <1> .help.2: 10857 00000893 5B2E434F4D5D205B2F- <1> db "[.COM] [/C=commands] [[drive:][path]progname.ext [parameters]]",13,10 10857 0000089C 433D636F6D6D616E64- <1> 10857 000008A5 735D205B5B64726976- <1> 10857 000008AE 653A5D5B706174685D- <1> 10857 000008B7 70726F676E616D652E- <1> 10857 000008C0 657874205B70617261- <1> 10857 000008C9 6D65746572735D5D0D- <1> 10857 000008D2 0A <1> 10858 000008D3 0D0A <1> db 13,10 10859 000008D5 20202F433D636F6D6D- <1> db " /C=commands",9,9, "semicolon-separated list of commands (quote spaces)",13,10 10859 000008DE 616E6473090973656D- <1> 10859 000008E7 69636F6C6F6E2D7365- <1> 10859 000008F0 70617261746564206C- <1> 10859 000008F9 697374206F6620636F- <1> 10859 00000902 6D6D616E6473202871- <1> 10859 0000090B 756F74652073706163- <1> 10859 00000914 6573290D0A <1> 10860 00000919 202070726F676E616D- <1> db " progname.ext",9,9,"(executable) file to debug or examine",13,10 10860 00000922 652E65787409092865- <1> 10860 0000092B 786563757461626C65- <1> 10860 00000934 292066696C6520746F- <1> 10860 0000093D 206465627567206F72- <1> 10860 00000946 206578616D696E650D- <1> 10860 0000094F 0A <1> 10861 00000950 2020706172616D6574- <1> db " parameters",9,9, "parameters given to program",13,10 10861 00000959 657273090970617261- <1> 10861 00000962 6D6574657273206769- <1> 10861 0000096B 76656E20746F207072- <1> 10861 00000974 6F6772616D0D0A <1> 10862 0000097B 0D0A <1> db 13,10 10863 0000097D 466F722061206C6973- <1> db "For a list of debugging commands, run " 10863 00000986 74206F662064656275- <1> 10863 0000098F 6767696E6720636F6D- <1> 10863 00000998 6D616E64732C207275- <1> 10863 000009A1 6E20 <1> 10864 000009A3 00 <1> asciz 10865 <1> .help.3: 10866 000009A4 20616E642074797065- <1> db " and type ? at the prompt.",13,10 10866 000009AD 203F20617420746865- <1> 10866 000009B6 2070726F6D70742E0D- <1> 10866 000009BF 0A <1> 10867 000009C0 00 <1> asciz 10868 <1> %if _ONLY386 10869 <1> .no386: ascizline "Error: This ",_PROGNAME," build requires a 386 CPU or higher." 10870 <1> %elif _ONLYNON386 10871 <1> .386: asciiline "Warning: This ",_PROGNAME," build is ignorant of 386 CPU specifics." 10872 <1> ascizline 9," It does not allow access to the available 386-specific registers!" 10873 <1> %endif 10874 <1> 10875 <1> .invalidswitch: 10876 000009C1 496E76616C69642073- <1> db "Invalid switch - " 10876 000009CA 7769746368202D20 <1> 10877 <1> .invalidswitch_a: 10878 000009D2 780D0A00 <1> asciz "x",13,10 10879 <1> .switch_c_error: 10880 000009D6 537769746368202F43- <1> asciz "Switch /C invalid content",13,10 10880 000009DF 20696E76616C696420- <1> 10880 000009E8 636F6E74656E740D0A- <1> 10880 000009F1 00 <1> 10881 <1> %if _BOOTLDR 10882 <1> .default_cmdline: 10883 <1> db _BOOTSCRIPTPREFIX 10884 000009F2 406966206578697374- <1> db "@if exists y ldp/",_BOOTSCRIPTNAME," :",_BOOTSCRIPTLABEL 10884 000009FB 732079206C64702F4C- <1> 10884 00000A04 44454255472E534C44- <1> 10884 00000A0D 203A626F6F74737461- <1> 10884 00000A16 72747570 <1> 10885 00000A1A 207468656E2079206C- <1> db " then y ldp/",_BOOTSCRIPTNAME," :",_BOOTSCRIPTLABEL 10885 00000A23 64702F4C4445425547- <1> 10885 00000A2C 2E534C44203A626F6F- <1> 10885 00000A35 7473746172747570 <1> 10886 00000A3D 00 <1> asciz 10887 <1> .rpl_detected: 10888 00000A3E 52504C206465746563- <1> asciz "RPL detected! Currently unsupported.",13,10 10888 00000A47 746564212043757272- <1> 10888 00000A50 656E746C7920756E73- <1> 10888 00000A59 7570706F727465642E- <1> 10888 00000A62 0D0A00 <1> 10889 <1> .mismatch_detected: 10890 00000A65 4D69736D6174636820- <1> asciz "Mismatch in memory size detected! Internal error!",13,10 10890 00000A6E 696E206D656D6F7279- <1> 10890 00000A77 2073697A6520646574- <1> 10890 00000A80 65637465642120496E- <1> 10890 00000A89 7465726E616C206572- <1> 10890 00000A92 726F72210D0A00 <1> 10891 <1> .boot_ebda_unexpected: 10892 00000A99 454244412061742075- <1> asciz "EBDA at unexpected position.",13,10 10892 00000AA2 6E6578706563746564- <1> 10892 00000AAB 20706F736974696F6E- <1> 10892 00000AB4 2E0D0A00 <1> 10893 <1> .boot_error_out_of_memory: 10894 00000AB8 4F7574206F66206D65- <1> asciz "Out of memory!",13,10 10894 00000AC1 6D6F7279210D0A00 <1> 10895 <1> .boot_error_internal: 10896 00000AC9 496E7465726E616C20- <1> asciz "Internal error while relocating load image!",13,10 10896 00000AD2 6572726F7220776869- <1> 10896 00000ADB 6C652072656C6F6361- <1> 10896 00000AE4 74696E67206C6F6164- <1> 10896 00000AED 20696D616765210D0A- <1> 10896 00000AF6 00 <1> 10897 <1> .booterror: 10898 00000AF7 0D0A6C446562756758- <1> asciz 13,10,_PROGNAME," boot error. Press any key to reboot.",13,10 10898 00000B00 20626F6F7420657272- <1> 10898 00000B09 6F722E205072657373- <1> 10898 00000B12 20616E79206B657920- <1> 10898 00000B1B 746F207265626F6F74- <1> 10898 00000B24 2E0D0A00 <1> 10899 <1> %endif 10900 <1> %if _DOSEMU 10901 00000B28 30322F32352F3933 <1> .dosemudate: db "02/25/93" 10902 <1> %endif 10903 <1> %if _VDD 10904 00000B30 44454258585644442E- <1> .vdd: asciz "DEBXXVDD.DLL" 10904 00000B39 444C4C00 <1> 10905 00000B3D 446973706174636800 <1> .dispatch: asciz "Dispatch" 10906 00000B46 496E697400 <1> .init: asciz "Init" 10907 00000B4B 4D4F555345202020 <1> .mouse: db "MOUSE",32,32,32 ; Looks like a device name 10908 00000B53 416E64792057617473- <1> .andy: db "Andy Watson" ; I don't know him and why he's inside the NTVDM mouse driver 10908 00000B5C 6F6E <1> 10909 <1> endarea .andy 10910 00000B5E 57696E646F7773204E- <1> .ntdos: db "Windows NT MS-DOS subsystem Mouse Driver" ; Int33.004D mouse driver copyright string (not ASCIZ) 10910 00000B67 54204D532D444F5320- <1> 10910 00000B70 73756273797374656D- <1> 10910 00000B79 204D6F757365204472- <1> 10910 00000B82 69766572 <1> 10911 <1> endarea .ntdos 10912 <1> 10913 <1> ; INP: - 10914 <1> ; OUT: CY if not NTVDM 10915 <1> ; NC if NTVDM 10916 <1> ; ds = es = cs 10917 <1> ; CHG: ax, bx, cx, dx, di, si, bp, es, ds 10918 <1> isnt: 10919 00000B86 B80258 <1> mov ax, 5802h ; Get UMB link state 10920 00000B89 CD21 <1> int 21h 10921 00000B8B 30E4 <1> xor ah, ah 10922 00000B8D 50 <1> push ax ; Save UMB link state 10923 00000B8E B80358 <1> mov ax, 5803h ; Set UMB link state: 10924 00000B91 BB0100 <1> mov bx, 1 ; Add UMBs to memory chain 10925 00000B94 CD21 <1> int 21h 10926 00000B96 B452 <1> mov ah, 52h 10927 00000B98 BBFFFF <1> mov bx, -1 10928 00000B9B CD21 <1> int 21h ; Get list of lists 10929 00000B9D 43 <1> inc bx ; 0FFFFh ? 10930 00000B9E 7503E98600 <1> jz .notnt ; invalid --> 10931 00000BA3 268B47FD <1> mov ax, word [es:bx-3] ; First MCB 10932 00000BA7 0E <1> push cs 10933 00000BA8 07 <1> pop es ; reset es 10934 <1> .loop: 10935 00000BA9 8ED8 <1> mov ds, ax ; ds = MCB 10936 00000BAB 40 <1> inc ax ; Now segment of memory block itself 10937 00000BAC 31D2 <1> xor dx, dx 10938 00000BAE 31DB <1> xor bx, bx 10939 00000BB0 803F5A <1> cmp byte [bx], 'Z' ; End of MCB chain? 10940 00000BB3 7503 <1> jne .notlast 10941 00000BB5 42 <1> inc dx 10942 00000BB6 EB05 <1> jmp short .notchain 10943 <1> .notlast: 10944 00000BB8 803F4D <1> cmp byte [bx], 'M' ; Valid MCB chain? 10945 00000BBB 756C <1> jne .error 10946 <1> .notchain: 10947 00000BBD 8B4F03 <1> mov cx, [bx+3] ; MCB size in paragraphs 10948 <1> ; ax = current memory block 10949 <1> ; cx = size of current memory block in paragraphs 10950 <1> ; dx = flag whether this is the last MCB 10951 <1> ; ds = current MCB (before memory block) 10952 00000BC0 837F0108 <1> cmp word [bx+1], 8 ; MCB owner DOS? 10953 00000BC4 755D <1> jne .notfound_1 10954 00000BC6 817F085344 <1> cmp word [bx+8], "SD" ; MCB name "SD"? 10955 00000BCB 7556 <1> jne .notfound_1 10956 <1> .loopsub: 10957 00000BCD 8ED8 <1> mov ds, ax ; SD sub-segment inside memory block 10958 00000BCF 40 <1> inc ax 10959 00000BD0 49 <1> dec cx 10960 00000BD1 8B6F03 <1> mov bp, word [bx+3] ; Paragraphs 'til end of SD sub-segment 10961 <1> ; ax = current SD sub-segment 10962 <1> ; cx = paragraphs from SD sub-segment start (ax) to current memory block end 10963 <1> ; ds = current SD sub-MCB (like MCB, but for SD sub-segment) 10964 <1> ; bp = current SD sub-segment size in paragraphs 10965 00000BD4 39E9 <1> cmp cx, bp 10966 00000BD6 724B <1> jb .notfound_1 ; Goes beyond memory block, invalid --> 10967 00000BD8 803F51 <1> cmp byte [bx], 'Q' ; NTVDM type 51h sub-segment ? 10968 00000BDB 753C <1> jne .notfound_2 ; no --> 10969 00000BDD BE0800 <1> mov si, 8 ; Offset of device name (if SD device driver sub-segment) 10970 00000BE0 BF[4B0B] <1> mov di, imsg.mouse 10971 00000BE3 51 <1> push cx 10972 00000BE4 89F1 <1> mov cx, si ; length of name 10973 00000BE6 F3A6 <1> repe cmpsb ; blank-padded device name "MOUSE" ? 10974 00000BE8 59 <1> pop cx 10975 00000BE9 752E <1> jne .notfound_2 ; Device name doesn't match, try next SD sub-segment 10976 00000BEB 8CD8 <1> mov ax, ds 10977 00000BED 40 <1> inc ax 10978 00000BEE 8ED8 <1> mov ds, ax ; Segment of SD sub-segment 10979 <1> ; ds = current SD sub-segment 10980 00000BF0 89E8 <1> mov ax, bp ; Leave paragraph value in bp 10981 00000BF2 A900F0 <1> test ax, 0F000h ; Would *16 cause an overflow? 10982 00000BF5 7520 <1> jnz .notfound_3 ; Then too large --> 10983 00000BF7 51 <1> push cx 10984 00000BF8 B104 <1> mov cl, 4 10985 00000BFA D3E0 <1> shl ax, cl ; *16 10986 00000BFC 59 <1> pop cx 10987 <1> ; ax = current SD sub-segment size in byte 10988 <1> .andy: 10989 00000BFD BF[530B] <1> mov di, imsg.andy 10990 00000C00 51 <1> push cx 10991 00000C01 B90B00 <1> mov cx, imsg.andy_size 10992 00000C04 E82E00 <1> call findstring ; String "Andy Watson"? 10993 00000C07 59 <1> pop cx 10994 00000C08 720D <1> jc .notfound_3 10995 <1> .ntdos: 10996 00000C0A BF[5E0B] <1> mov di, imsg.ntdos 10997 00000C0D 51 <1> push cx 10998 00000C0E B92800 <1> mov cx, imsg.ntdos_size 10999 00000C11 E82100 <1> call findstring ; String "Windows NT MS-DOS subsystem Mouse Driver"? 11000 00000C14 59 <1> pop cx 11001 00000C15 7313 <1> jnc .found ; (NC) 11002 <1> .notfound_3: 11003 00000C17 8CD8 <1> mov ax, ds 11004 <1> .notfound_2: 11005 00000C19 39E9 <1> cmp cx, bp 11006 00000C1B 7406 <1> je .notfound_1 ; End of SD memory block, get next MCB 11007 00000C1D 01E8 <1> add ax, bp ; Address next SD sub-MCB 11008 00000C1F 29E9 <1> sub cx, bp 11009 00000C21 EBAA <1> jmp short .loopsub ; Try next SD sub-segment 11010 <1> .notfound_1: 11011 00000C23 01C8 <1> add ax, cx ; Address next MCB 11012 00000C25 85D2 <1> test dx, dx ; Non-zero if 'Z' MCB 11013 00000C27 7480 <1> jz .loop ; If not at end of MCB chain, try next 11014 <1> ; jmp short .notnt ; Otherwise, not found 11015 <1> .error: 11016 <1> .notnt: 11017 00000C29 F9 <1> stc 11018 <1> .found: 11019 00000C2A 0E <1> push cs 11020 00000C2B 1F <1> pop ds ; restore ds 11021 <1> 11022 00000C2C 5B <1> pop bx ; saved UMB link state 11023 00000C2D B80358 <1> mov ax, 5803h 11024 00000C30 9C <1> pushf 11025 00000C31 CD21 <1> int 21h ; Set UMB link state 11026 00000C33 9D <1> popf 11027 00000C34 C3 <1> retn 11028 <1> 11029 <1> findstring: 11030 00000C35 31F6 <1> xor si, si 11031 <1> .loop: 11032 00000C37 56 <1> push si 11033 00000C38 01CE <1> add si, cx 11034 00000C3A 7203 <1> jc .notfound_c 11035 00000C3C 4E <1> dec si ; The largest offset we need for this compare 11036 00000C3D 39F0 <1> cmp ax, si 11037 <1> .notfound_c: 11038 00000C3F 5E <1> pop si 11039 00000C40 720D <1> jb .return ; Not found if at top of memory block --> 11040 00000C42 57 <1> push di 11041 00000C43 56 <1> push si 11042 00000C44 51 <1> push cx 11043 00000C45 F3A6 <1> repe cmpsb ; String somewhere inside program? 11044 00000C47 59 <1> pop cx 11045 00000C48 5E <1> pop si 11046 00000C49 5F <1> pop di 11047 00000C4A 7403 <1> je .return ; Yes, proceed --> (if ZR, NC) 11048 00000C4C 46 <1> inc si ; Increase pointer by one 11049 00000C4D EBE8 <1> jmp short .loop ; Try next address 11050 <1> .return: 11051 00000C4F C3 <1> retn 11052 <1> %endif 11053 <1> 11054 <1> 11055 <1> ; Move paragraphs 11056 <1> ; 11057 <1> ; INP: ax:0-> source 11058 <1> ; dx:0-> destination 11059 <1> ; cx = number of paragraphs 11060 <1> ; CHG: - 11061 <1> ; Note: Doesn't work correctly on HMA; doesn't always wrap to LMA either. 11062 <1> ; Do not provide a wrapped/HMA source or destination! 11063 <1> init_movp: 11064 00000C50 51 <1> push cx 11065 00000C51 1E <1> push ds 11066 00000C52 56 <1> push si 11067 00000C53 06 <1> push es 11068 00000C54 57 <1> push di 11069 <1> 11070 00000C55 39D0 <1> cmp ax, dx ; source above destination ? 11071 00000C57 770A <1> ja .up ; yes, move up (forwards) --> 11072 00000C59 747B <1> je .return ; same, no need to move --> 11073 00000C5B 50 <1> push ax 11074 00000C5C 01C8 <1> add ax, cx ; (expected not to carry) 11075 00000C5E 39D0 <1> cmp ax, dx ; end of source is above destination ? 11076 00000C60 58 <1> pop ax 11077 00000C61 7730 <1> ja .down ; yes, move from top down --> 11078 <1> ; Here, the end of source is below-or-equal the destination, 11079 <1> ; so they do not overlap. In this case we prefer moving up. 11080 <1> 11081 <1> .up: 11082 00000C63 50 <1> push ax 11083 00000C64 52 <1> push dx 11084 <1> .uploop: 11085 00000C65 8ED8 <1> mov ds, ax 11086 00000C67 8EC2 <1> mov es, dx 11087 00000C69 31FF <1> xor di, di 11088 00000C6B 31F6 <1> xor si, si ; -> start of segment 11089 00000C6D 81E90010 <1> sub cx, 1000h ; 64 KiB left ? 11090 00000C71 7610 <1> jbe .uplast ; no --> 11091 00000C73 51 <1> push cx 11092 00000C74 B90080 <1> mov cx, 10000h /2 11093 00000C77 F3A5 <1> rep movsw ; move 64 KiB 11094 00000C79 59 <1> pop cx 11095 00000C7A 050010 <1> add ax, 1000h 11096 00000C7D 81C20010 <1> add dx, 1000h ; -> next segment 11097 00000C81 EBE2 <1> jmp short .uploop ; proceed for more --> 11098 <1> .uplast: 11099 00000C83 81C10010 <1> add cx, 1000h ; restore counter 11100 00000C87 D1E1 <1> shl cx, 1 11101 00000C89 D1E1 <1> shl cx, 1 11102 00000C8B D1E1 <1> shl cx, 1 ; *8, paragraphs to words 11103 00000C8D F3A5 <1> rep movsw ; move last part 11104 00000C8F 5A <1> pop dx 11105 00000C90 58 <1> pop ax 11106 00000C91 EB43 <1> jmp short .return 11107 <1> 11108 <1> .down: 11109 00000C93 FD <1> std ; _AMD_ERRATUM_109_WORKAROUND as below 11110 <1> .dnloop: 11111 00000C94 81E90010 <1> sub cx, 1000h ; 64 KiB left ? 11112 00000C98 761A <1> jbe .dnlast ; no --> 11113 00000C9A 50 <1> push ax 11114 00000C9B 52 <1> push dx 11115 00000C9C 01C8 <1> add ax, cx 11116 00000C9E 01CA <1> add dx, cx 11117 00000CA0 8ED8 <1> mov ds, ax ; -> 64 KiB not yet moved 11118 00000CA2 8EC2 <1> mov es, dx 11119 00000CA4 5A <1> pop dx 11120 00000CA5 58 <1> pop ax 11121 00000CA6 BFFEFF <1> mov di, -2 11122 00000CA9 89FE <1> mov si, di ; moved from last word down 11123 00000CAB 51 <1> push cx 11124 00000CAC B90080 <1> mov cx, 10000h /2 11125 00000CAF F3A5 <1> rep movsw ; move 64 KiB 11126 00000CB1 59 <1> pop cx 11127 00000CB2 EBE0 <1> jmp short .dnloop ; proceed for more --> 11128 <1> .dnlast: 11129 00000CB4 81C10010 <1> add cx, 1000h ; restore counter 11130 00000CB8 D1E1 <1> shl cx, 1 11131 00000CBA D1E1 <1> shl cx, 1 11132 00000CBC D1E1 <1> shl cx, 1 ; *8, paragraphs to words 11133 00000CBE 89CF <1> mov di, cx 11134 00000CC0 4F <1> dec di 11135 00000CC1 D1E7 <1> shl di, 1 ; words to offset, -> last word 11136 00000CC3 89FE <1> mov si, di 11137 00000CC5 8ED8 <1> mov ds, ax 11138 00000CC7 8EC2 <1> mov es, dx ; first segment correct 11139 <1> 11140 <1> 11141 <1> numdef AMD_ERRATUM_109_WORKAROUND, 1 11142 <1> %if 0 11143 <1> 11144 <1> Jack R. Ellis pointed out this erratum: 11145 <1> 11146 <1> Quoting from https://www.amd.com/system/files/TechDocs/25759.pdf page 69: 11147 <1> 11148 <1> 109 Certain Reverse REP MOVS May Produce Unpredictable Behavior 11149 <1> 11150 <1> Description 11151 <1> 11152 <1> In certain situations a REP MOVS instruction may lead to 11153 <1> incorrect results. An incorrect address size, data size 11154 <1> or source operand segment may be used or a succeeding 11155 <1> instruction may be skipped. This may occur under the 11156 <1> following conditions: 11157 <1> 11158 <1> * EFLAGS.DF=1 (the string is being moved in the reverse direction). 11159 <1> 11160 <1> * The number of items being moved (RCX) is between 1 and 20. 11161 <1> 11162 <1> * The REP MOVS instruction is preceded by some microcoded instruction 11163 <1> that has not completely retired by the time the REP MOVS begins 11164 <1> execution. The set of such instructions includes BOUND, CLI, LDS, 11165 <1> LES, LFS, LGS, LSS, IDIV, and most microcoded x87 instructions. 11166 <1> 11167 <1> Potential Effect on System 11168 <1> 11169 <1> Incorrect results may be produced or the system may hang. 11170 <1> 11171 <1> Suggested Workaround 11172 <1> 11173 <1> Contact your AMD representative for information on a BIOS update. 11174 <1> 11175 <1> %endif 11176 <1> 11177 <1> %if _AMD_ERRATUM_109_WORKAROUND 11178 00000CC9 E308 <1> jcxz @FF 11179 00000CCB 83F914 <1> cmp cx, 20 11180 00000CCE 7703 <1> ja @FF 11181 <1> @@: 11182 00000CD0 A5 <1> movsw 11183 00000CD1 E2FD <1> loop @B 11184 <1> @@: 11185 <1> %endif 11186 00000CD3 F3A5 <1> rep movsw ; move first part 11187 00000CD5 FC <1> cld 11188 <1> .return: 11189 00000CD6 5F <1> pop di 11190 00000CD7 07 <1> pop es 11191 00000CD8 5E <1> pop si 11192 00000CD9 1F <1> pop ds 11193 00000CDA 59 <1> pop cx 11194 00000CDB C3 <1> retn 11195 <1> 11196 <1> 11197 <1> %if _BOOTLDR 11198 <1> ; only called for boot-loaded mode 11199 <1> init_getc_bootldr: 11200 00000CDC 31C0 <1> xor ax, ax 11201 00000CDE CD16 <1> int 16h 11202 00000CE0 C3 <1> retn 11203 <1> %endif 11204 <1> 11205 <1> init_putsz_cs: 11206 00000CE1 50 <1> push ax 11207 00000CE2 53 <1> push bx 11208 00000CE3 51 <1> push cx 11209 00000CE4 52 <1> push dx 11210 00000CE5 1E <1> push ds 11211 00000CE6 06 <1> push es 11212 00000CE7 57 <1> push di 11213 00000CE8 0E <1> push cs 11214 00000CE9 07 <1> pop es 11215 00000CEA 0E <1> push cs 11216 00000CEB 1F <1> pop ds 11217 00000CEC 89D7 <1> mov di, dx ; es:di-> string 11218 00000CEE 30C0 <1> xor al, al 11219 00000CF0 B9FFFF <1> mov cx, -1 11220 00000CF3 F2AE <1> repne scasb ; search zero 11221 00000CF5 F7D9 <1> neg cx 11222 00000CF7 49 <1> dec cx 11223 00000CF8 49 <1> dec cx ; cx = length of message 11224 00000CF9 5F <1> pop di 11225 00000CFA E82A00 <1> call init_puts_ds 11226 00000CFD 07 <1> pop es 11227 00000CFE 1F <1> pop ds 11228 00000CFF 5A <1> pop dx 11229 00000D00 59 <1> pop cx 11230 00000D01 5B <1> pop bx 11231 00000D02 58 <1> pop ax 11232 00000D03 C3 <1> retn 11233 <1> 11234 <1> %if _BOOTLDR 11235 <1> init_putsz_cs_bootldr: 11236 00000D04 50 <1> push ax 11237 00000D05 53 <1> push bx 11238 00000D06 51 <1> push cx 11239 00000D07 52 <1> push dx 11240 00000D08 1E <1> push ds 11241 00000D09 06 <1> push es 11242 00000D0A 57 <1> push di 11243 00000D0B 0E <1> push cs 11244 00000D0C 07 <1> pop es 11245 00000D0D 0E <1> push cs 11246 00000D0E 1F <1> pop ds 11247 00000D0F 89D7 <1> mov di, dx ; es:di-> string 11248 00000D11 30C0 <1> xor al, al 11249 00000D13 B9FFFF <1> mov cx, -1 11250 00000D16 F2AE <1> repne scasb ; search zero 11251 00000D18 F7D9 <1> neg cx 11252 00000D1A 49 <1> dec cx 11253 00000D1B 49 <1> dec cx ; cx = length of message 11254 00000D1C 5F <1> pop di 11255 00000D1D E80F00 <1> call init_puts_ds_bootldr 11256 00000D20 07 <1> pop es 11257 00000D21 1F <1> pop ds 11258 00000D22 5A <1> pop dx 11259 00000D23 59 <1> pop cx 11260 00000D24 5B <1> pop bx 11261 00000D25 58 <1> pop ax 11262 00000D26 C3 <1> retn 11263 <1> %endif 11264 <1> 11265 <1> init_puts_ds: 11266 <1> %if _BOOTLDR 11267 00000D27 36F606[9D00]40 <1> testopt [ss:internalflags], nodosloaded 11268 00000D2D 7413 <1> jz @F 11269 <1> 11270 <1> init_puts_ds_bootldr: 11271 00000D2F 56 <1> push si 11272 00000D30 55 <1> push bp 11273 00000D31 89D6 <1> mov si, dx 11274 00000D33 E30A <1> jcxz .return 11275 <1> .loop: 11276 00000D35 AC <1> lodsb 11277 00000D36 BB0700 <1> mov bx, 0007 11278 00000D39 B40E <1> mov ah, 0Eh 11279 00000D3B CD10 <1> int 10h 11280 00000D3D E2F6 <1> loop .loop 11281 <1> .return: 11282 00000D3F 5D <1> pop bp 11283 00000D40 5E <1> pop si 11284 00000D41 C3 <1> retn 11285 <1> 11286 <1> @@: 11287 <1> %endif 11288 00000D42 BB0100 <1> mov bx, 1 ; standard output 11289 00000D45 B440 <1> mov ah, 40h ; write to file 11290 00000D47 CD21 <1> int 21h 11291 00000D49 C3 <1> retn 11292 <1> 11293 <1> 11294 <1> 11295 <1> %if _BOOTLDR 11296 <1> ; Initial entry when boot loading. 11297 <1> 11298 <1> ; ds = ss = debugger data segment 11299 <1> ; (ds - 1) = image ident prefix paragraph 11300 <1> boot_old_initcode: 11301 00000D4A FC <1> cld 11302 <1> 11303 <1> d4 call init_d4message 11304 <1> d4 asciz "In boot loader; press any key",13,10 11305 <1> d4 call init_d4pauseforkey 11306 <1> 11307 00000D4B C706[4E0C]8000 <1> mov word [execblk+2], 80h 11308 00000D51 C60681000D <1> mov byte [81h], 0Dh 11309 00000D56 C606[DD0B]01 <1> mov byte [fileext], EXT_OTHER ; empty file name and command line as per N 11310 <1> %endif ; _BOOTLDR 11311 <1> 11312 <1> old_initcode: 11313 00000D5B FC <1> cld 11314 <1> d0bp 11315 00000D5C 8CD8 <1> mov ax, ds 11316 00000D5E A3[500C] <1> mov word [ execblk+4 ], ax 11317 00000D61 A3[540C] <1> mov word [ execblk+8 ], ax 11318 00000D64 A3[580C] <1> mov word [ execblk+12 ], ax ; set up parameter block for exec command 11319 00000D67 A3[A60A] <1> mov word [ pspdbg ], ax 11320 <1> 11321 00000D6A 1E <1> push ds 11322 00000D6B B84000 <1> mov ax, 40h 11323 00000D6E 8ED8 <1> mov ds, ax 11324 00000D70 A18200 <1> mov ax, word [82h] ; end of circular keypress buffer 11325 00000D73 8B168000 <1> mov dx, word [80h] ; start of circular buffer 11326 00000D77 85C0 <1> test ax, ax 11327 00000D79 7431 <1> jz .forcekeybuffer 11328 00000D7B 85D2 <1> test dx, dx 11329 00000D7D 742D <1> jz .forcekeybuffer 11330 00000D7F 89C3 <1> mov bx, ax 11331 00000D81 29D3 <1> sub bx, dx ; cmp end, start 11332 00000D83 7627 <1> jbe .forcekeybuffer ; below or equal is invalid --> 11333 00000D85 F6C301 <1> test bl, 1 ; even amount of bytes ? 11334 00000D88 7522 <1> jnz .forcekeybuffer ; no, invalid --> 11335 00000D8A 8B1E1A00 <1> mov bx, word [1Ah] ; current head of circular buffer 11336 00000D8E 39C3 <1> cmp bx, ax 11337 00000D90 731A <1> jae .forcekeybuffer 11338 00000D92 29D3 <1> sub bx, dx 11339 00000D94 7216 <1> jb .forcekeybuffer 11340 00000D96 F6C301 <1> test bl, 1 11341 00000D99 7511 <1> jnz .forcekeybuffer ; invalid --> 11342 00000D9B 8B1E1C00 <1> mov bx, word [1Ch] ; current tail of circular buffer 11343 00000D9F 39C3 <1> cmp bx, ax 11344 00000DA1 7309 <1> jae .forcekeybuffer 11345 00000DA3 29D3 <1> sub bx, dx 11346 00000DA5 7205 <1> jb .forcekeybuffer 11347 00000DA7 F6C301 <1> test bl, 1 11348 00000DAA 740E <1> jz @F ; valid --> 11349 <1> .forcekeybuffer: 11350 00000DAC 1F <1> pop ds 11351 00000DAD C706[FA0B]3E00 <1> mov word [io_end_buffer], 3Eh 11352 00000DB3 C706[F80B]1E00 <1> mov word [io_start_buffer], 1Eh 11353 00000DB9 A8 <1> db __TEST_IMM8 ; (skip pop) 11354 <1> @@: 11355 00000DBA 1F <1> pop ds 11356 <1> 11357 <1> %if _BOOTLDR 11358 00000DBB F606[9D00]40 <1> testopt [internalflags], nodosloaded 11359 00000DC0 7403 <1> jz .checkio 11360 <1> d4 call init_d4message 11361 <1> d4 asciz "Common initialisation, determining processor type now",13,10 11362 00000DC2 E9A700 <1> jmp .determineprocessor 11363 <1> .checkio: 11364 <1> %endif 11365 <1> ; Check for console input vs. input from a file or other device. 11366 <1> ; This has to be done early because MS-DOS seems to switch CON 11367 <1> ; to cooked I/O mode only then. 11368 00000DC5 B80044 <1> mov ax, 4400h ; IOCTL get device information 11369 00000DC8 31DB <1> xor bx, bx ; StdIn 11370 00000DCA B283 <1> mov dl, 83h ; default if 21.4400 fails 11371 00000DCC CD21 <1> int 21h 11372 00000DCE F6C280 <1> test dl, 80h 11373 00000DD1 7414 <1> jz .inputfile 11374 00000DD3 8026[9C00]DF <1> clropt [internalflags], inputfile 11375 00000DD8 F6C203 <1> test dl, 3 11376 00000DDB 740A <1> jz .inputdevice ; if not the console input 11377 00000DDD 8026[9C00]EF <1> clropt [internalflags], notstdinput 11378 00000DE2 C606[E70A]00 <1> mov byte [notatty], 0 ; it _is_ a tty 11379 <1> .inputdevice: 11380 <1> .inputfile: 11381 00000DE7 B80044 <1> mov ax, 4400h ; IOCTL get device information 11382 00000DEA 43 <1> inc bx ; StdOut 11383 00000DEB B283 <1> mov dl, 83h ; default if 21.4400 fails 11384 00000DED CD21 <1> int 21h 11385 00000DEF F6C280 <1> test dl, 80h 11386 00000DF2 740F <1> jz .outputfile 11387 00000DF4 8026[9C00]7F <1> clropt [internalflags], outputfile 11388 00000DF9 F6C203 <1> test dl, 3 11389 00000DFC 7405 <1> jz .outputdevice ; if not the console output 11390 00000DFE 8026[9C00]BF <1> clropt [internalflags], notstdoutput 11391 <1> .outputdevice: 11392 <1> .outputfile: 11393 <1> 11394 <1> ; Check DOS version 11395 <1> %if _VDD 11396 00000E03 1E <1> push ds 11397 00000E04 0E <1> push cs 11398 00000E05 1F <1> pop ds 11399 00000E06 0E <1> push cs 11400 00000E07 07 <1> pop es 11401 00000E08 E87BFD <1> call isnt ; NTVDM ? 11402 00000E0B 1F <1> pop ds 11403 00000E0C 7205 <1> jc .isnotnt ; no --> 11404 00000E0E 800E[9E00]02 <1> setopt [internalflags], runningnt 11405 <1> .isnotnt: 11406 <1> %endif 11407 <1> 11408 00000E13 B80030 <1> mov ax, 3000h ; check DOS version 11409 00000E16 CD21 <1> int 21h 11410 00000E18 86C4 <1> xchg al, ah 11411 00000E1A 3D1F03 <1> cmp ax, ver(3,31) ; MS-DOS version > 3.30 ? 11412 00000E1D 7205 <1> jb .notoldpacket ; no --> 11413 00000E1F 800E[9C00]01 <1> setopt [internalflags], oldpacket ; assume Int25/Int26 packet method available 11414 <1> .notoldpacket: 11415 00000E24 50 <1> push ax 11416 00000E25 31DB <1> xor bx, bx ; preset to invalid value 11417 00000E27 B80633 <1> mov ax, 3306h 11418 00000E2A CD21 <1> int 21h 11419 00000E2C 08C0 <1> or al, al ; invalid, DOS 1.x error --> 11420 00000E2E 7402 <1> jz .213306invalid 11421 00000E30 3CFF <1> cmp al, -1 ; invalid 11422 <1> .213306invalid: 11423 00000E32 58 <1> pop ax 11424 00000E33 7407 <1> je .useoldver 11425 00000E35 85DB <1> test bx, bx ; 0.0 ? 11426 00000E37 7403 <1> jz .useoldver ; assume invalid --> 11427 00000E39 93 <1> xchg ax, bx ; get version to ax 11428 00000E3A 86C4 <1> xchg al, ah ; strange Microsoft version format 11429 <1> .useoldver: 11430 00000E3C 3D0107 <1> cmp ax, ver(7,01) ; MS-DOS version > 7.00 ? 11431 00000E3F 7205 <1> jb .notnewpacket ; no --> 11432 00000E41 800E[9C00]03 <1> setopt [internalflags], newpacket| oldpacket ; assume both packet methods available 11433 <1> .notnewpacket: 11434 <1> %if _VDD 11435 00000E46 F606[9E00]02 <1> testopt [internalflags], runningnt 11436 00000E4B 741F <1> jz .novdd 11437 00000E4D 1E <1> push ds 11438 00000E4E 0E <1> push cs 11439 00000E4F 1F <1> pop ds 11440 00000E50 0E <1> push cs 11441 00000E51 07 <1> pop es 11442 00000E52 BE[300B] <1> mov si, imsg.vdd ; ds:si-> ASCIZ VDD filename 11443 00000E55 BB[3D0B] <1> mov bx, imsg.dispatch ; ds:bx-> ASCIZ dispatching entry 11444 00000E58 BF[460B] <1> mov di, imsg.init ; es:di-> ASCIZ init entry 11445 00000E5B F8 <1> clc ; ! 11446 00000E5C C4C4580090 <1> RegisterModule ; register VDD 11447 00000E61 1F <1> pop ds 11448 00000E62 7208 <1> jc .novdd ; error ? --> 11449 00000E64 A3[B80A] <1> mov word [hVdd], ax 11450 00000E67 800E[9C00]05 <1> setopt [internalflags], ntpacket| oldpacket ; assume old packet method also available 11451 <1> .novdd: 11452 <1> %endif 11453 <1> .determineprocessor: 11454 <1> d4 call init_d4message 11455 <1> d4 asciz "Determining processor type",13,10 11456 <1> 11457 00000E6C B92101 <1> mov cx, 0121h 11458 00000E6F D2E5 <1> shl ch, cl 11459 00000E71 7510 <1> jnz .found_186_plus ; normal 186 masks shift count with 31 --> 11460 <1> 11461 <1> ; The NEC V20/V30 processors do support the 186 extensions 11462 <1> ; to the instruction set but do not mask the shift count. 11463 <1> ; Therefore, specifically detect them here. Based on the 11464 <1> ; text in http://www.textfiles.com/hamradio/v20_bug.txt 11465 00000E73 89E0 <1> mov ax, sp 11466 00000E75 B90100 <1> mov cx, 1 ; = 1 if on actual 8088/8086 11467 00000E78 51 <1> push cx 11468 00000E79 49 <1> dec cx ; = 0 if on NEC V20/V30 11469 00000E7A 8FC1 <1> db 8Fh, 0C1h ; pop r/m16 with cx as operand 11470 <1> ; (reportedly a nop on the NECs) 11471 00000E7C 89C4 <1> mov sp, ax ; reset stack to known state 11472 00000E7E E303 <1> jcxz .found_186_plus ; if it was a nop --> 11473 00000E80 E9A100 <1> jmp .cpudone ; is an actual 8088/8086 --> 11474 <1> 11475 <1> .found_186_plus: 11476 <1> d4 call init_d4message 11477 <1> d4 asciz "Found 186+ processor",13,10 11478 00000E83 FE06[E20A] <1> inc byte [ machine ] ; 1 11479 00000E87 54 <1> push sp 11480 00000E88 58 <1> pop ax 11481 00000E89 39E0 <1> cmp ax, sp 11482 00000E8B 7403E99400 <1> jne .cpudone ; 80186 pushes the adjusted value of sp --> 11483 <1> 11484 <1> d4 call init_d4message 11485 <1> d4 asciz "Found 286+ processor",13,10 11486 <1> ; Determine the processor type. This is adapted from code in the 11487 <1> ; Pentium Family User's Manual, Volume 3: Architecture and 11488 <1> ; Programming Manual, Intel Corp., 1994, Chapter 5. That code contains 11489 <1> ; the following comment: 11490 <1> ; 11491 <1> ; This program has been developed by Intel Corporation. 11492 <1> ; Software developers have Intel's permission to incorporate 11493 <1> ; this source code into your software royalty free. 11494 <1> ; 11495 <1> ; Intel 286 CPU check. 11496 <1> ; Bits 12-15 of the flags register are always clear on the 11497 <1> ; 286 processor in real-address mode. 11498 <1> ; Bits 12-15 of the FLAGS register are always set on the 11499 <1> ; 8086 and 186 processor. 11500 00000E90 FE06[E20A] <1> inc byte [ machine ] ; 2 11501 00000E94 9C <1> pushf ; save IF 11502 00000E95 9C <1> pushf ; get original flags into ax 11503 00000E96 58 <1> pop ax 11504 00000E97 0D00F0 <1> or ax, 0F000h ; try to set bits 12-15 11505 00000E9A 25FFFD <1> and ax, ~0200h ; clear IF 11506 00000E9D 50 <1> push ax ; save new flags value on stack 11507 00000E9E 9D <1> popf ; replace current flags value; DI 11508 00000E9F 9C <1> pushf ; get new flags 11509 00000EA0 58 <1> pop ax ; store new flags in ax 11510 00000EA1 9D <1> popf ; restore IF (in 86 Mode) 11511 00000EA2 A900F0 <1> test ax, 0F000h ; if bits 12-15 clear, CPU = 80286 11512 00000EA5 747D <1> jz .cpudone ; if 80286 --> 11513 <1> 11514 <1> d4 call init_d4message 11515 <1> d4 asciz "Found 386+ processor",13,10 11516 <1> ; Intel 386 CPU check. 11517 <1> ; The AC bit, bit #18, is a new bit introduced in the EFLAGS 11518 <1> ; register on the Intel486 DX cpu to generate alignment faults. 11519 <1> ; This bit cannot be set on the Intel386 CPU. 11520 <1> ; 11521 <1> ; It is now safe to use 32-bit opcode/operands. 11522 <1> subcpu 386 11523 00000EA7 800E[9D00]80 <1> setopt [internalflags], has386 11524 00000EAC FE06[E20A] <1> inc byte [ machine ] ; 3 11525 <1> 11526 00000EB0 89E3 <1> mov bx, sp ; save current stack pointer to align 11527 00000EB2 83E4FC <1> and sp, ~3 ; align stack to avoid AC fault 11528 00000EB5 669C <1> pushfd ; push original EFLAGS 11529 00000EB7 6658 <1> pop eax ; get original EFLAGS 11530 00000EB9 6689C1 <1> mov ecx, eax ; save original EFLAGS in ECX (including IF) 11531 <1> 11532 00000EBC 663500000400 <1> xor eax, 40000h ; flip AC bit in EFLAGS 11533 00000EC2 25FFFD <1> and ax, ~0200h ; clear IF 11534 00000EC5 6650 <1> push eax ; put new EFLAGS value on stack 11535 00000EC7 669D <1> popfd ; replace EFLAGS value; DI 11536 00000EC9 669C <1> pushfd ; get new EFLAGS 11537 00000ECB 6658 <1> pop eax ; store new EFLAGS value in EAX 11538 00000ECD 89C8 <1> mov ax, cx ; ignore low bits (including IF) 11539 00000ECF 6639C8 <1> cmp eax, ecx 11540 00000ED2 741A <1> je .cpudone_stack_eax_equals_ecx ; if 80386 --> 11541 <1> 11542 <1> d4 call init_d4message 11543 <1> d4 asciz "Found 486+ processor",13,10 11544 <1> ; Intel486 DX CPU, Intel487 SX NDP, and Intel486 SX CPU check. 11545 <1> ; Checking for ability to set/clear ID flag (bit 21) in EFLAGS 11546 <1> ; which indicates the presence of a processor with the ability 11547 <1> ; to use the CPUID instruction. 11548 00000ED4 FE06[E20A] <1> inc byte [ machine ] ; 4 11549 00000ED8 6689C8 <1> mov eax, ecx ; get original EFLAGS 11550 00000EDB 663500002000 <1> xor eax, 200000h ; flip ID bit in EFLAGS 11551 00000EE1 25FFFD <1> and ax, ~0200h ; clear IF 11552 00000EE4 6650 <1> push eax ; save new EFLAGS value on stack 11553 00000EE6 669D <1> popfd ; replace current EFLAGS value; DI 11554 00000EE8 669C <1> pushfd ; get new EFLAGS 11555 00000EEA 6658 <1> pop eax ; store new EFLAGS in EAX 11556 00000EEC 89C8 <1> mov ax, cx ; ignore low bits (including IF) 11557 <1> 11558 <1> .cpudone_stack_eax_equals_ecx: 11559 00000EEE 6651 <1> push ecx 11560 00000EF0 669D <1> popfd ; restore AC,ID bits and IF in EFLAGS (86 Mode) 11561 00000EF2 89DC <1> mov sp, bx ; restore sp 11562 <1> 11563 00000EF4 6639C8 <1> cmp eax, ecx ; check if it's changed 11564 00000EF7 742B <1> je .cpudone ; if it's a 486 (can't toggle ID bit) --> 11565 <1> 11566 <1> d4 call init_d4message 11567 <1> d4 asciz "Found processor with CPUID support",13,10 11568 <1> ; Execute CPUID instruction. 11569 <1> subcpu 486 ; NASM (at least 2.10rc1) handles cpuid itself as a 11570 <1> ; 586+ instruction, but we know better. So this 11571 <1> ; part is declared for 486 compatibility, and only 11572 <1> ; the cpuid instructions are emitted with 586 11573 <1> ; compatibility to appease NASM. 11574 <1> %if 0 11575 <1> d4 call init_d4message 11576 <1> d4 asciz "CPUID will NOT be executed, to work around official DOSBox releases",13,10 11577 <1> d4 jmp .cpudone 11578 <1> %endif 11579 00000EF9 6631C0 <1> xor eax, eax ; set up input for CPUID instruction 11580 <1> d4 call init_d4message 11581 <1> d4 asciz "Executing CPUID 0",13,10 11582 <1> [cpu 586] 11583 00000EFC 0FA2 <1> cpuid 11584 <1> __CPU__ 11585 <1> d4 call init_d4message 11586 <1> d4 asciz "CPUID 0 executed",13,10 11587 00000EFE 6683F801 <1> cmp eax, byte 1 11588 00000F02 7220 <1> jb .cpudone ; if 1 is not a valid input value for CPUID 11589 00000F04 6631C0 <1> xor eax, eax ; otherwise, run CPUID with eax = 1 11590 00000F07 6640 <1> inc eax 11591 <1> d4 call init_d4message 11592 <1> d4 asciz "Executing CPUID 1",13,10 11593 <1> [cpu 586] 11594 00000F09 0FA2 <1> cpuid 11595 <1> __CPU__ 11596 <1> d4 call init_d4message 11597 <1> d4 asciz "CPUID 1 executed",13,10 11598 <1> %if _MMXSUPP 11599 00000F0B 66F7C200008000 <1> test edx, 80_0000h 11600 00000F12 0F9506[E50A] <1> setnz byte [has_mmx] 11601 <1> %endif 11602 <1> 11603 00000F17 88E0 <1> mov al, ah 11604 00000F19 240F <1> and al, 0Fh ; bits 8..11 are the model number 11605 00000F1B 3C06 <1> cmp al, 6 11606 00000F1D 7202 <1> jb .below686 ; if < 6 11607 00000F1F B006 <1> mov al, 6 ; if >= 6, set it to 6 11608 <1> .below686: 11609 00000F21 A2[E20A] <1> mov byte [ machine ], al; save machine type (486, 586, 686+) 11610 <1> 11611 <1> .cpudone: 11612 <1> subcpureset ; subcpu 486 11613 <1> subcpureset ; subcpu 386 11614 <1> d4 call init_d4message 11615 <1> d4 asciz "Determining floating-point unit",13,10 11616 <1> 11617 <1> ; Next determine the type of FPU in a system and set the mach_87 11618 <1> ; variable with the appropriate value. All registers are used by 11619 <1> ; this code; none are preserved. 11620 <1> ; 11621 <1> ; Coprocessor check. 11622 <1> ; The algorithm is to determine whether the floating-point 11623 <1> ; status and control words can be written to. If not, no 11624 <1> ; coprocessor exists. If the status and control words can be 11625 <1> ; written to, the correct coprocessor is then determined 11626 <1> ; depending on the processor ID. The Intel 386 CPU can 11627 <1> ; work with either an Intel 287 NDP or an Intel 387 NDP. 11628 <1> ; The infinity of the coprocessor must be checked 11629 <1> ; to determine the correct coprocessor ID. 11630 00000F24 A0[E20A] <1> mov al, byte [ machine ] 11631 00000F27 A2[E40A] <1> mov byte [ mach_87 ], al ; by default, set mach_87 to machine 11632 00000F2A FE06[E30A] <1> inc byte [ has_87 ] 11633 00000F2E 3C05 <1> cmp al, 5 ; a Pentium or above always will have a FPU 11634 00000F30 7341 <1> jae .fpudone 11635 00000F32 FE0E[E30A] <1> dec byte [ has_87 ] ; assume no FPU 11636 <1> 11637 00000F36 DBE3 <1> fninit ; reset FPU 11638 00000F38 B0FF <1> mov al, -1 ; initialise with a non-zero value 11639 00000F3A 50 <1> push ax 11640 00000F3B 89E3 <1> mov bx, sp 11641 00000F3D 36DD3F <1> fnstsw word [ss:bx] ; save FP status word 11642 00000F40 58 <1> pop ax ; retrieve it 11643 00000F41 84C0 <1> test al, al 11644 00000F43 752E <1> jnz .fpudone ; if no FPU present 11645 <1> 11646 <1> ; al = 0 here 11647 00000F45 50 <1> push ax 11648 00000F46 36D93F <1> fnstcw word [ss:bx] ; save FP control word 11649 00000F49 58 <1> pop ax ; retrieve it 11650 00000F4A 253F10 <1> and ax, 103Fh ; see if selected parts look OK 11651 00000F4D 83F83F <1> cmp ax, byte 3Fh 11652 00000F50 7521 <1> jne .fpudone ; if no FPU present 11653 00000F52 FE06[E30A] <1> inc byte [ has_87 ] ; there's an FPU 11654 <1> 11655 <1> ; If we're using a 386, check for 287 vs. 387 by checking whether 11656 <1> ; +infinity = -infinity. 11657 00000F56 803E[E20A]03 <1> cmp byte [ machine ], 3 11658 00000F5B 7516 <1> jne .fpudone ; if not a 386 11659 <1> [cpu 386] 11660 00000F5D D9E8 <1> fld1 ; must use default control from FNINIT 11661 00000F5F D9EE <1> fldz ; form infinity 11662 00000F61 DEF9 <1> fdivp ST1 ; 1 / 0 = infinity 11663 00000F63 D9C0 <1> fld ST0 11664 00000F65 D9E0 <1> fchs ; form negative infinity 11665 00000F67 DED9 <1> fcompp ; see if they are the same and remove them 11666 00000F69 9BDFE0 <1> fstsw ax 11667 00000F6C 9E <1> sahf ; look at status from FCOMPP 11668 00000F6D 7504 <1> jne .fpudone ; if they are different, then it's a 387 11669 00000F6F FE0E[E40A] <1> dec byte [ mach_87 ] ; otherwise, it's a 287 11670 <1> __CPU__ 11671 <1> .fpudone: 11672 <1> 11673 <1> %if _ONLY386 11674 <1> testopt [internalflags], has386 11675 <1> jnz @F ; okay --> 11676 <1> %if _BOOTLDR 11677 <1> testopt [internalflags], nodosloaded 11678 <1> lahf ; remember status 11679 <1> %endif 11680 <1> mov dx, imsg.no386 11681 <1> call init_putsz_cs ; display the error 11682 <1> %if _BOOTLDR 11683 <1> sahf 11684 <1> jnz init_booterror.soft ; abort for loader --> 11685 <1> %endif 11686 <1> mov ax, 4C01h 11687 <1> int 21h ; abort our process 11688 <1> 11689 <1> @@: 11690 <1> %elif _ONLYNON386 11691 <1> testopt [internalflags], has386 11692 <1> jz @F ; okay --> 11693 <1> mov dx, imsg.386 11694 <1> call init_putsz_cs ; display the warning 11695 <1> @@: 11696 <1> %endif 11697 <1> 11698 <1> ; Determine which patch table to use, then patch 11699 <1> ; out either the 386+ or non-386 code as appropriate. 11700 00000F73 8E06[CE00] <1> mov es, [code_seg] 11701 00000F77 BE[C807] <1> mov si, patch_386_table ; table of patches to set for 386+ 11702 <1> %if __patch_386_table_method == 1 11703 <1> mov cx, patch_386_table_size_w 11704 <1> %endif 11705 00000F7A F606[9D00]80 <1> testopt [internalflags], has386 11706 <1> %if __patch_386_table_method == 1 11707 <1> jnz .patch1 ; set these patches (CPU is 386+) --> 11708 <1> %else 11709 00000F7F 7521 <1> jnz .patch2 ; set these patches (CPU is 386+) --> 11710 <1> %endif 11711 <1> %ifn _ONLYNON386 11712 00000F81 26C606[2843]3E <1> mov byte [es:..@patch_no386_ds], 3Eh ; write a ds prefix 11713 00000F87 26C606[4D43]CF <1> mov byte [es:..@patch_no386_iret], 0CFh ; write an iret instruction 11714 <1> %if _PM && _CATCHPMINT214C 11715 00000F8D 26C606[FD5B]3E <1> mov byte [es:..@patch_no386_ds_2], 3Eh 11716 00000F93 26C606[2C5C]3E <1> mov byte [es:..@patch_no386_ds_3], 3Eh 11717 00000F99 36C606[1F8A]90 <1> mov byte [ss:..@patch_no386_nop_DATA_ENTRY], 90h 11718 <1> ; write a nop (note the segment!) 11719 <1> %endif 11720 <1> %endif 11721 00000F9F BE[C804] <1> mov si, patch_no386_table ; table of patches to set for 16-bit CPU 11722 <1> %if __patch_no386_table_method == 1 11723 <1> mov cx, patch_no386_table_size_w 11724 <1> %if __patch_386_table_method == 2 11725 <1> jmp short .patch1 ; skip .patch2 code --> 11726 <1> %endif 11727 <1> %endif 11728 <1> 11729 <1> ; Complicated table patch code. 11730 <1> %if __patch_no386_table_method == 2 || __patch_386_table_method == 2 11731 <1> .patch2: 11732 00000FA2 BF[0000] <1> mov di, code_start ; initialise offset 11733 00000FA5 31C0 <1> xor ax, ax ; initialise ah 11734 <1> .looppatch2: 11735 00000FA7 2EAC <1> cs lodsb 11736 00000FA9 01C7 <1> add di, ax ; skip number of bytes to skip 11737 00000FAB 3CFF <1> cmp al, 255 ; really repositioning? 11738 00000FAD 7504 <1> jne .l2patch ; no --> 11739 00000FAF 97 <1> xchg ax, di ; (to preserve ah) 11740 00000FB0 2EAD <1> cs lodsw ; ax = new address 11741 00000FB2 97 <1> xchg ax, di ; di = new address 11742 <1> .l2patch: 11743 00000FB3 2EAC <1> cs lodsb 11744 00000FB5 89C1 <1> mov cx, ax ; cx = number of bytes to patch 11745 00000FB7 E306 <1> jcxz .patchesdone ; end of table --> 11746 00000FB9 B090 <1> mov al, 90h ; patch to NOP 11747 00000FBB F3AA <1> rep stosb ; patch as many bytes as specified 11748 00000FBD EBE8 <1> jmp short .looppatch2 11749 <1> %endif 11750 <1> 11751 <1> ; Simple table patch code. 11752 <1> %if __patch_386_table_method == 1 || __patch_no386_table_method == 1 11753 <1> .patch1: 11754 <1> jcxz .patchesdone 11755 <1> .looppatch1: 11756 <1> cs lodsw ; load address of patch 11757 <1> xchg bx, ax ; (set bx = ax, CHG ax) 11758 <1> mov byte [es:bx], 90h ; patch 11759 <1> loop .looppatch1 11760 <1> %endif 11761 <1> .patchesdone: 11762 <1> 11763 <1> ; Check for dosemu. This is done for the boot loaded instance 11764 <1> ; too, as we might be running as DOS inside dosemu. 11765 <1> %if _DOSEMU 11766 00000FBF B800F0 <1> mov ax, 0F000h 11767 00000FC2 8EC0 <1> mov es, ax 11768 00000FC4 1E <1> push ds 11769 00000FC5 0E <1> push cs 11770 00000FC6 1F <1> pop ds ; avoid "repe cs cmpsw" (8086 bug) 11771 00000FC7 BFF5FF <1> mov di, 0FFF5h 11772 00000FCA BE[280B] <1> mov si, imsg.dosemudate 11773 00000FCD B90400 <1> mov cx, 4 11774 00000FD0 F3A7 <1> repe cmpsw ; running in DosEmu? 11775 00000FD2 1F <1> pop ds 11776 00000FD3 7505 <1> jne .dosemuchecked 11777 00000FD5 800E[9F00]01 <1> setopt [internalflags], runningdosemu 11778 <1> .dosemuchecked: 11779 <1> %endif 11780 <1> 11781 00000FDA 1E <1> push ds 11782 00000FDB 07 <1> pop es ; => lDEBUG_DATA_ENTRY 11783 <1> 11784 00000FDC BF[0000] <1> mov di, line_in 11785 00000FDF B0FF <1> mov al, 255 11786 00000FE1 AA <1> stosb 11787 00000FE2 B000 <1> mov al, 0 11788 00000FE4 AA <1> stosb 11789 00000FE5 B00D <1> mov al, 13 11790 00000FE7 AA <1> stosb ; overwrite line_in beginning 11791 <1> 11792 00000FE8 BC[400C] <1> mov sp, stack_end ; stack pointer (paragraph aligned) 11793 00000FEB C706[940A][3E0C] <1> mov word [ savesp ], stack_end-2; save new SP minus two (for the word we'll push) 11794 00000FF1 BF[0101] <1> mov di, ..@init_first 11795 00000FF4 B93F09 <1> mov cx, ..@init_behind - ..@init_first 11796 00000FF7 31C0 <1> xor ax, ax 11797 00000FF9 F3AA <1> rep stosb ; initialise breakpoint lists, line_out 11798 <1> %if 1 11799 <1> %if ..@init_behind != stack 11800 <1> mov di, stack 11801 <1> %endif 11802 00000FFB B90002 <1> mov cx, stack_end - stack 11803 00000FFE B05E <1> mov al, 5Eh 11804 00001000 F3AA <1> rep stosb ; initialise the stack 11805 <1> %endif 11806 <1> 11807 00001002 C606[0D08]30 <1> mov byte [ trim_overflow ], '0' ; initialise line_out so the trimputs loop doesn't overflow 11808 00001007 C706[1609]4226 <1> mov word [line_out_overflow], 2642h 11809 <1> 11810 <1> 11811 <1> %if _BOOTLDR 11812 0000100D F606[9D00]40 <1> testopt [internalflags], nodosloaded 11813 00001012 743A <1> jz initdos 11814 <1> d4 call init_d4message 11815 <1> d4 asciz "386-related patches applied, boot initialisation proceeding",13,10 11816 <1> 11817 <1> 11818 <1> %if CATCHINTAMOUNT 11819 <1> ; Set up interrupt vectors. 11820 00001014 B90600 <1> mov cx, inttab_number 11821 00001017 BE[310C] <1> mov si, inttab 11822 <1> .bootintloop: 11823 <1> 11824 <1> ; assumes ss = lDEBUG_DATA_ENTRY 11825 0000101A 36AC <1> ss lodsb 11826 0000101C 31DB <1> xor bx, bx 11827 0000101E 8EDB <1> mov ds, bx 11828 00001020 88C3 <1> mov bl, al 11829 00001022 01DB <1> add bx, bx 11830 00001024 01DB <1> add bx, bx 11831 00001026 FF7702 <1> push word [ bx+2 ] 11832 00001029 FF37 <1> push word [ bx ] ; get vector 11833 0000102B 97 <1> xchg ax, di 11834 0000102C 36AD <1> ss lodsw ; get address of IISP header 11835 0000102E 97 <1> xchg ax, di 11836 0000102F 368F4502 <1> pop word [ ss:di + ieNext ] 11837 00001033 368F4504 <1> pop word [ ss:di + ieNext + 2 ] 11838 <1> ; store it 11839 <1> %ifn _DEBUG ; vectors are set only when debuggee runs 11840 00001037 8C5702 <1> mov word [ bx+2 ], ss 11841 0000103A 893F <1> mov word [ bx ], di ; set interrupt vector 11842 <1> %endif 11843 0000103C E2DC <1> loop .bootintloop 11844 <1> %endif 11845 <1> 11846 <1> 11847 0000103E 16 <1> push ss 11848 0000103F 1F <1> pop ds 11849 00001040 16 <1> push ss 11850 00001041 07 <1> pop es 11851 <1> 11852 <1> d4 call init_d4message 11853 <1> d4 asciz "Jumping to final boot initialisation code",13,10 11854 00001042 FF36[CE00] <1> push word [code_seg] 11855 00001046 2EFF36[4C10] <1> push word [cs:.word_initcont.boot_entry] 11856 0000104B CB <1> retf 11857 <1> 11858 <1> align 2, db 0 11859 <1> .word_initcont.boot_entry: 11860 0000104C [FDD5] <1> dw initcont.boot_entry 11861 <1> %endif 11862 <1> 11863 <1> initdos: 11864 <1> %if _MCB || _INT 11865 0000104E B80258 <1> mov ax, 5802h 11866 00001051 CD21 <1> int 21h 11867 00001053 30E4 <1> xor ah, ah ; some "DOS" only return al 11868 00001055 50 <1> push ax ; save UMB link 11869 <1> 11870 <1> getfirstmcb: 11871 00001056 B452 <1> mov ah, 52h ; get list of lists 11872 00001058 CD21 <1> int 21h 11873 0000105A 268B47FE <1> mov ax, word [ es:bx-2 ]; start of MCBs 11874 0000105E A3[CE0A] <1> mov word [firstmcb], ax 11875 <1> 11876 <1> getfirstumcb: 11877 <1> ; We try to get the first UMCB for gateout 11878 <1> ; for now. To harden our code it should 11879 <1> ; not be assumed that the address is of 11880 <1> ; a valid MCB. However, it is fine to 11881 <1> ; compare an actual MCB address with it. 11882 00001061 B86112 <1> mov ax, 1261h ; PTS-DOS: Get first UMCB 11883 00001064 F9 <1> stc 11884 00001065 CD2F <1> int 2Fh 11885 00001067 720C <1> jc .determine ; not supported --> 11886 00001069 40 <1> inc ax 11887 0000106A 83F802 <1> cmp ax, byte 2 ; -1, 0, 1 ? 11888 0000106D 7606 <1> jbe .determine ; not supported (or none) --> 11889 0000106F 48 <1> dec ax 11890 00001070 A3[D00A] <1> mov word [ firstumcb ], ax ; set UMB 11891 00001073 EB4D <1> jmp short .got ; got it --> 11892 <1> 11893 <1> .determine: 11894 00001075 B80358 <1> mov ax, 5803h 11895 00001078 31DB <1> xor bx, bx 11896 0000107A CD21 <1> int 21h ; disable UMB link, leave only LMA chain 11897 0000107C 7244 <1> jc .none ; that isn't supported either --> 11898 <1> 11899 0000107E A1[CE0A] <1> mov ax, word [firstmcb] 11900 00001081 1E <1> push ds 11901 00001082 89C2 <1> mov dx, ax ; first MCB 11902 00001084 31DB <1> xor bx, bx ; use offsets from bx, not addresses 11903 <1> .looplmb: 11904 00001086 8ED8 <1> mov ds, ax 11905 00001088 40 <1> inc ax 11906 00001089 034703 <1> add ax, word [ bx + 3 ] ; next MCB's address 11907 0000108C 803F4D <1> cmp byte [ bx ], 'M' 11908 0000108F 74F5 <1> je .looplmb ; not last --> 11909 00001091 803F5A <1> cmp byte [ bx ], 'Z' 11910 00001094 752C <1> jne .none ; corrupted --> 11911 00001096 92 <1> xchg ax, dx ; dx = what we assume to be the first UMA chain MCB 11912 <1> ; ax = first MCB 11913 <1> 11914 00001097 50 <1> push ax 11915 00001098 43 <1> inc bx ; = 1 11916 00001099 B80358 <1> mov ax, 5803h 11917 0000109C CD21 <1> int 21h ; enable UMB link, include UMA chain 11918 0000109E 58 <1> pop ax 11919 0000109F 7221 <1> jc .none ; so we can disable it but not enable? --> 11920 <1> 11921 000010A1 4B <1> dec bx ; = 0 11922 000010A2 31C9 <1> xor cx, cx ; flag if assumed first UMCB found 11923 <1> .loopumb: 11924 000010A4 39D0 <1> cmp ax, dx 11925 000010A6 7501 <1> jne .notlastlmb 11926 000010A8 41 <1> inc cx ; there it is 11927 <1> .notlastlmb: 11928 000010A9 8ED8 <1> mov ds, ax 11929 000010AB 803F4D <1> cmp byte [ bx ], 'M' 11930 000010AE 7506 <1> jne .islastumb? ; last or corrupted --> 11931 000010B0 40 <1> inc ax 11932 000010B1 034703 <1> add ax, word [ bx + 3 ] 11933 000010B4 EBEE <1> jmp short .loopumb ; process next --> 11934 <1> .islastumb?: 11935 000010B6 803F5A <1> cmp byte [ bx ], 'Z' 11936 000010B9 7507 <1> jne .none ; corrupted --> 11937 000010BB E305 <1> jcxz .none ; didn't find that UMCB --> 11938 <1> ; The MCB at dx which was behind the one that contained the 'Z' 11939 <1> ; signature when we disabled the UMB link is now a valid MCB in 11940 <1> ; the MCB chain after we enabled the UMB link. All previous MCBs 11941 <1> ; are now 'M'. 11942 000010BD 1F <1> pop ds 11943 000010BE 8916[D00A] <1> mov word [ firstumcb ], dx 11944 <1> .none: 11945 <1> .got: 11946 000010C2 5B <1> pop bx 11947 000010C3 B80358 <1> mov ax, 5803h 11948 000010C6 CD21 <1> int 21h ; restore UMB link 11949 <1> %endif 11950 <1> 11951 000010C8 B434 <1> mov ah, 34h 11952 000010CA CD21 <1> int 21h 11953 000010CC 891E[D20A] <1> mov word [pInDOS + so16aOffset], bx 11954 000010D0 8C06[D40A] <1> mov word [pInDOS + so16aSegSel], es 11955 <1> %if _PM 11956 000010D4 8C06[D60A] <1> mov word [pInDOS + so16aSegment], es 11957 <1> %endif 11958 <1> 11959 <1> ; get address of DOS swappable DATA area 11960 <1> ; to be used to get/set PSP and thus avoid DOS calls 11961 <1> ; will not work for DOS < 3 11962 <1> %if _USESDA 11963 000010D8 1E <1> push ds 11964 000010D9 B8065D <1> mov ax, 5D06h 11965 000010DC F9 <1> stc ; initialise to CY 11966 000010DD CD21 <1> int 21h 11967 000010DF 8CD8 <1> mov ax, ds 11968 000010E1 1F <1> pop ds 11969 000010E2 7214 <1> jc .noSDA ; if CY returned, not supported --> 11970 000010E4 8EC0 <1> mov es, ax ; es:si -> SDA 11971 000010E6 8CDB <1> mov bx, ds ; bx = our PSP 11972 000010E8 26395C10 <1> cmp word [es:si + 10h], bx ; does this seem like the current PSP field ? 11973 000010EC 750A <1> jne .noSDA ; no --> 11974 000010EE 8936[DA0A] <1> mov word [pSDA + so16aOffset], si 11975 000010F2 A3[DC0A] <1> mov word [pSDA + so16aSegSel], ax 11976 <1> %if _PM 11977 000010F5 A3[DE0A] <1> mov word [pSDA + so16aSegment], ax 11978 <1> %endif 11979 <1> .noSDA: 11980 <1> %endif 11981 <1> 11982 000010F8 B83135 <1> mov ax, 3531h 11983 000010FB CD21 <1> int 21h 11984 000010FD 8CC3 <1> mov bx, es 11985 <1> %if _USESDA 11986 000010FF 3B1E[DC0A] <1> cmp bx, word [pSDA + so16aSegSel] 11987 00001103 750B <1> jne @F 11988 <1> %endif 11989 00001105 3B1E[D40A] <1> cmp bx, word [pInDOS + so16aSegSel] 11990 00001109 7505 <1> jne @F 11991 <1> 11992 0000110B 800E[A300]20 <1> setopt [internalflags2], dif2_int31_segment 11993 <1> @@: 11994 <1> 11995 <1> 11996 <1> commandline: 11997 00001110 16 <1> push ss 11998 00001111 07 <1> pop es 11999 <1> 12000 <1> ; Interpret switches and erase them from the command line. 12001 00001112 B80037 <1> mov ax, 3700h ; get switch character 12002 00001115 B22F <1> mov dl, '/' ; preset with default value 12003 00001117 CD21 <1> int 21h 12004 00001119 8816[E80A] <1> mov byte [ switchar ], dl 12005 0000111D 80FA2F <1> cmp dl, '/' 12006 00001120 7504 <1> jne .notslash 12007 00001122 8816[E90A] <1> mov byte [ swch1 ], dl 12008 <1> .notslash: 12009 00001126 BE8100 <1> mov si, DTA+1 12010 <1> .blankloop: 12011 00001129 AC <1> lodsb 12012 0000112A 3C20 <1> cmp al, 32 12013 0000112C 74FB <1> je .blankloop 12014 0000112E 3C09 <1> cmp al, 9 12015 00001130 74F7 <1> je .blankloop 12016 <1> 12017 <1> ; Process the /? switch (or the [switchar]? switch). 12018 <1> ; If switchar != / and /? occurs, make sure nothing follows. 12019 00001132 38D0 <1> cmp al, dl 12020 00001134 7503E99800 <1> je .switch ; if switch character --> 12021 00001139 3C2F <1> cmp al, '/' 12022 0000113B 7403E90C01 <1> jne .noswitches ; if not the help switch --> 12023 00001140 8A04 <1> mov al, byte [ si ] 12024 00001142 3C3F <1> cmp al, '?' 12025 00001144 7403E90301 <1> jne .noswitches ; if not /? 12026 00001149 8A4401 <1> mov al, byte [ si+1 ] 12027 0000114C 3C20 <1> cmp al, 32 12028 0000114E 740B <1> je .help ; if nothing after /? 12029 00001150 3C09 <1> cmp al, 9 12030 00001152 7407 <1> je .help ; ditto 12031 00001154 3C0D <1> cmp al, 13 12032 00001156 7403E9F100 <1> jne .noswitches ; if something after /? --> 12033 <1> 12034 <1> ; Print a help message 12035 <1> .help: 12036 0000115B A12C00 <1> mov ax, word [2Ch] ; => environment 12037 0000115E 85C0 <1> test ax, ax 12038 00001160 7465 <1> jz .help.no_name 12039 00001162 8ED8 <1> mov ds, ax 12040 00001164 31F6 <1> xor si, si 12041 <1> @@: 12042 00001166 AC <1> lodsb 12043 00001167 84C0 <1> test al, al 12044 00001169 75FB <1> jnz @B 12045 0000116B AC <1> lodsb 12046 0000116C 84C0 <1> test al, al 12047 0000116E 75F6 <1> jnz @B 12048 00001170 AD <1> lodsw 12049 00001171 83F801 <1> cmp ax, 1 12050 00001174 7551 <1> jne .help.no_name 12051 <1> @@: 12052 00001176 89F3 <1> mov bx, si 12053 <1> @@: 12054 00001178 AC <1> lodsb 12055 00001179 3C61 <1> cmp al, 'a' 12056 0000117B 7208 <1> jb @F 12057 0000117D 3C7A <1> cmp al, 'z' 12058 0000117F 7704 <1> ja @F 12059 00001181 806CFF20 <1> sub byte [si - 1], 'a' - 'A' 12060 <1> @@: 12061 00001185 3C5C <1> cmp al, '\' 12062 00001187 74ED <1> je @BBB 12063 00001189 3C2F <1> cmp al, '/' 12064 0000118B 74E9 <1> je @BBB 12065 0000118D 84C0 <1> test al, al 12066 0000118F 75E7 <1> jnz @BB 12067 <1> 12068 00001191 89F1 <1> mov cx, si 12069 00001193 49 <1> dec cx 12070 00001194 29D9 <1> sub cx, bx 12071 <1> 12072 <1> @@: 12073 00001196 4E <1> dec si 12074 00001197 39DE <1> cmp si, bx 12075 00001199 7209 <1> jb @F 12076 0000119B 803C2E <1> cmp byte [si], '.' 12077 0000119E 75F6 <1> jne @B 12078 <1> 12079 000011A0 89F1 <1> mov cx, si 12080 000011A2 29D9 <1> sub cx, bx 12081 <1> @@: 12082 000011A4 E321 <1> jcxz .help.no_name 12083 <1> @@: 12084 000011A6 BA[6808] <1> mov dx, imsg.help.1 ; command-line help message 12085 000011A9 E835FB <1> call init_putsz_cs 12086 000011AC 53 <1> push bx 12087 000011AD 89DA <1> mov dx, bx 12088 000011AF E875FB <1> call init_puts_ds 12089 000011B2 BA[9308] <1> mov dx, imsg.help.2 12090 000011B5 E829FB <1> call init_putsz_cs 12091 000011B8 5A <1> pop dx 12092 000011B9 E86BFB <1> call init_puts_ds 12093 000011BC BA[A409] <1> mov dx, imsg.help.3 12094 000011BF E81FFB <1> call init_putsz_cs 12095 000011C2 B8004C <1> mov ax, 4C00h 12096 000011C5 CD21 <1> int 21h ; done 12097 <1> 12098 <1> .help.no_name: 12099 000011C7 0E <1> push cs 12100 000011C8 1F <1> pop ds 12101 000011C9 BB[6208] <1> mov bx, imsg.help.defaultfilename 12102 000011CC B90600 <1> mov cx, imsg.help.defaultfilename.length 12103 000011CF EBD5 <1> jmp @B 12104 <1> 12105 <1> 12106 <1> ; Do the (proper) switches. 12107 000011D1 AC <1> .switch:lodsb 12108 000011D2 3C3F <1> cmp al,'?' 12109 000011D4 7485 <1> je .help ; if -? 12110 000011D6 3C63 <1> cmp al, 'c' 12111 000011D8 7413 <1> je .switch_c 12112 000011DA 3C43 <1> cmp al, 'C' 12113 000011DC 740F <1> je .switch_c 12114 <1> 12115 <1> ; Other switches may go here. 12116 000011DE 2EA2[D209] <1> mov [ cs:imsg.invalidswitch_a ], al 12117 000011E2 BA[C109] <1> mov dx, imsg.invalidswitch ; Invalid switch 12118 <1> ..@init_cmdline_error: 12119 000011E5 E8F9FA <1> call init_putsz_cs ; print string 12120 000011E8 B8014C <1> mov ax, 4C01h ; Quit and return error status 12121 000011EB CD21 <1> int 21h 12122 <1> 12123 <1> .switch_c: 12124 <1> @@: 12125 000011ED AC <1> lodsb 12126 000011EE 3C3D <1> cmp al, '=' 12127 000011F0 74FB <1> je @B 12128 000011F2 3C3A <1> cmp al, ':' 12129 000011F4 74F7 <1> je @B 12130 <1> 12131 000011F6 BF[E000] <1> mov di, cmdline_buffer 12132 000011F9 B400 <1> mov ah, 0 ; initialise to 0 = unquoted 12133 000011FB A9 <1> db __TEST_IMM16 12134 <1> .switch_c_loop: 12135 000011FC AA <1> stosb 12136 <1> .switch_c_quoted: 12137 000011FD AC <1> lodsb 12138 <1> 12139 000011FE 3C0D <1> cmp al, 13 12140 00001200 743A <1> je .switch_c_eol 12141 00001202 38E0 <1> cmp al, ah ; close quote mark ? 12142 00001204 7508 <1> jne @F ; no --> 12143 00001206 3C00 <1> cmp al, 0 12144 00001208 7432 <1> je .switch_c_eol 12145 0000120A B400 <1> mov ah, 0 ; continue unquoted 12146 0000120C EBEF <1> jmp .switch_c_quoted ; and load next character --> 12147 <1> 12148 <1> @@: 12149 0000120E 84E4 <1> test ah, ah ; currently quoted ? 12150 00001210 7514 <1> jnz .switch_c_not_blank ; yes --> 12151 <1> 12152 00001212 3C22 <1> cmp al, '"' ; open quote mark ? 12153 00001214 7404 <1> je @F 12154 00001216 3C27 <1> cmp al, "'" 12155 00001218 7504 <1> jne @FF ; no --> 12156 <1> @@: 12157 0000121A 88C4 <1> mov ah, al ; remember quoted state 12158 0000121C EBDF <1> jmp .switch_c_quoted ; and load next character --> 12159 <1> 12160 <1> @@: 12161 0000121E 3C20 <1> cmp al, 32 ; blank while unquoted ? 12162 00001220 741E <1> je .unquoted_blank 12163 00001222 3C09 <1> cmp al, 9 12164 00001224 741A <1> je .unquoted_blank ; yes --> 12165 <1> .switch_c_not_blank: 12166 00001226 3C3B <1> cmp al, ';' ; unescaped semicolon ? 12167 00001228 7504 <1> jne .switch_c_not_semicolon 12168 0000122A B00D <1> mov al, 13 ; yes, replace by CR 12169 0000122C EBCE <1> jmp .switch_c_loop 12170 <1> 12171 <1> .switch_c_not_semicolon: 12172 0000122E 3C5C <1> cmp al, '\' ; escape ? 12173 00001230 75CA <1> jne .switch_c_loop ; no, store literal --> 12174 00001232 AC <1> lodsb ; load escaped character 12175 <1> ; (may be backslash, semicolon, quote) 12176 00001233 3C0D <1> cmp al, 13 ; guard against EOL 12177 00001235 75C5 <1> jne .switch_c_loop 12178 <1> .switch_c_error: 12179 00001237 BA[D609] <1> mov dx, imsg.switch_c_error 12180 0000123A EBA9 <1> jmp ..@init_cmdline_error 12181 <1> 12182 <1> .switch_c_eol: 12183 0000123C 84E4 <1> test ah, ah ; in quoted state ? 12184 0000123E 75F7 <1> jnz .switch_c_error ; yes, error --> 12185 <1> .unquoted_blank: 12186 00001240 B000 <1> mov al, 0 12187 00001242 AA <1> stosb ; terminate command line buffer 12188 00001243 800E[A500]01 <1> setopt [internalflags3], dif3_input_cmdline 12189 00001248 4E <1> dec si 12190 00001249 E9DDFE <1> jmp .blankloop 12191 <1> 12192 <1> 12193 <1> .noswitches: 12194 <1> ; Feed the remaining command line to the 'n' command. 12195 0000124C 4E <1> dec si 12196 0000124D 56 <1> push si 12197 <1> 12198 <1> 12199 <1> %if CATCHINTAMOUNT 12200 <1> ; Set up interrupt vectors. 12201 0000124E B90600 <1> mov cx, inttab_number 12202 00001251 BE[310C] <1> mov si, inttab 12203 <1> .intloop: 12204 00001254 AC <1> lodsb 12205 00001255 B435 <1> mov ah, 35h 12206 00001257 CD21 <1> int 21h ; get vector 12207 00001259 97 <1> xchg ax, di 12208 0000125A AD <1> lodsw 12209 0000125B 97 <1> xchg ax, di 12210 0000125C 895D02 <1> mov word [ di + ieNext ], bx 12211 0000125F 8C4504 <1> mov word [ di + ieNext + 2 ], es 12212 <1> ; store it 12213 <1> %ifn _DEBUG ; vectors are set only when debuggee runs 12214 00001262 89FA <1> mov dx, di 12215 00001264 B425 <1> mov ah, 25h ; set interrupt vector 12216 00001266 CD21 <1> int 21h ; ds => lDEBUG_DATA_ENTRY 12217 <1> %endif 12218 00001268 E2EA <1> loop .intloop 12219 <1> %endif 12220 <1> 12221 <1> 12222 <1> ; Disabled this. hook2F (debug.asm) now detects this condition. 12223 <1> %if _PM && 0 12224 <1> ; Windows 9x and DosEmu are among those hosts which handle some 12225 <1> ; V86 Ints internally without first calling the interrupt chain. 12226 <1> ; This causes various sorts of troubles and incompatibilities; 12227 <1> ; in our case, hooking interrupt 2Fh would not intercept calls 12228 <1> ; made to the DPMI interface because the host sees them first. 12229 <1> %if _WIN9XSUPP 12230 <1> %if _GUARD_86M_INT2F 12231 <1> push es 12232 <1> xor ax, ax 12233 <1> mov es, ax ; (only used in 86 Mode) 12234 <1> mov ax, [es:2Fh * 4] 12235 <1> cmp ax, -1 12236 <1> je @F ; --> (ZR) 12237 <1> or ax, [es:2Fh * 4 + 2] 12238 <1> @@: 12239 <1> pop es 12240 <1> jz @F 12241 <1> %endif 12242 <1> mov ax, 1600h ; running in a Win9x DOS box? 12243 <1> int 2Fh 12244 <1> cmp al, 4 12245 <1> jge .no2Fhook ; this is intentionally a signed comparison! 12246 <1> @@: 12247 <1> %endif 12248 <1> %if _DOSEMU 12249 <1> testopt [internalflags], runningdosemu 12250 <1> jnz .no2Fhook 12251 <1> %endif 12252 <1> %if _WIN9XSUPP || _DOSEMU 12253 <1> jmp short .dpmihostchecked 12254 <1> .no2Fhook: 12255 <1> setopt [internalflags], nohook2F 12256 <1> .dpmihostchecked: 12257 <1> %endif 12258 <1> %endif 12259 0000126A 1E <1> push ds 12260 0000126B 07 <1> pop es 12261 <1> 12262 <1> ; Save, then modify termination address and parent PSP. 12263 0000126C BE0A00 <1> mov si, TPIV 12264 0000126F BF[C80A] <1> mov di, psp22 12265 00001272 A5 <1> movsw 12266 00001273 A5 <1> movsw ; save Int22 12267 00001274 BA[FF80] <1> mov dx, debug22 12268 00001277 8954FC <1> mov word [ si-4 ], dx 12269 0000127A 8C5CFE <1> mov word [ si-2 ], ds ; set pspInt22 (required) 12270 0000127D BE1600 <1> mov si, 16h 12271 00001280 A5 <1> movsw ; save parent 12272 00001281 8C5CFE <1> mov word [ si-2 ], ds ; set pspParent 12273 00001284 B82225 <1> mov ax, 2522h ; set Int22 12274 00001287 CD21 <1> int 21h ; (not really required) 12275 <1> 12276 <1> ; shrink to required resident size 12277 00001289 1E <1> push ds 12278 0000128A 07 <1> pop es 12279 0000128B B44A <1> mov ah, 4Ah 12280 0000128D 2E8B1E[0008] <1> mov bx, word [cs:memsize] 12281 <1> 12282 00001292 FF36[CE00] <1> push word [code_seg] 12283 00001296 2EFF36[9C12] <1> push word [cs:.word_initcont] 12284 0000129B CB <1> retf 12285 <1> 12286 <1> align 2, db 0 12287 <1> .word_initcont: 12288 0000129C [EFD5] <1> dw initcont 12289 <1> 12290 <1> 12291 <1> usesection lDEBUG_CODE 12292 <1> initcont: 12293 0000D5EF CD21 <1> int 21h ; resize to required 12294 <1> ; jc ... ; (expected to work since it had to be larger. also we hooked ints) 12295 <1> 12296 0000D5F1 1E <1> push ds 12297 0000D5F2 07 <1> pop es 12298 0000D5F3 E8B8CF <1> call getint2324 ; init run2324 to avoid using or displaying NUL vectors 12299 <1> 12300 0000D5F6 1E <1> push ds 12301 0000D5F7 07 <1> pop es 12302 0000D5F8 5E <1> pop si 12303 0000D5F9 AC <1> lodsb 12304 0000D5FA E820C1 <1> call nn ; process the rest of the command line 12305 <1> 12306 <1> .boot_entry: 12307 0000D5FD 1E <1> push ds 12308 0000D5FE 07 <1> pop es ; => lDEBUG_DATA_ENTRY 12309 <1> 12310 0000D5FF BE[0000] <1> mov si, cmd3 12311 <1> %if _BOOTLDR 12312 0000D602 F606[9D00]40 <1> testopt [internalflags], nodosloaded 12313 0000D607 7402 <1> jz @F 12314 0000D609 FFE6 <1> jmp si ; directly jump to cmd3 of the installed image 12315 <1> @@: 12316 <1> %endif 12317 0000D60B 56 <1> push si 12318 0000D60C E9D4BD <1> jmp ll3 ; load a program if one has been given at the command line 9756 9757 usesection INIT 9758 0000129E 00 align 16, db 0 9759 init_size equ $-section.INIT.vstart 9760 endarea init, 1 9761 9762 9763 numdef SHOWINITSIZE, 0 9764 %if _SHOWINITSIZE 9765 %assign INITSIZE init_size 9766 %warning init holds INITSIZE bytes 9767 %endif 9768 9769 9770 usesection lDEBUG_CODE 9771 0000D60F 00 align 16, db 0 9772 ldebug_code_size equ $-section.lDEBUG_CODE.vstart 9773 endarea ldebug_code, 1 9774 9775 9776 auxbuff_size: equ (_AUXBUFFSIZE+15) & ~15 9777 endarea auxbuff, 1 9778 9779 transimagepsp_size: equ 100h+ldebug_data_entry_size +asmtable1_size+asmtable2_size +datastack_size+ldebug_code_size+init_size 9782 endarea transimagepsp, 1 ; size of PSP and image during installation 9783 9784 pspsegment_size: equ 100h+ldebug_data_entry_size +asmtable1_size+asmtable2_size +datastack_size 9787 endarea pspsegment, 1 ; size of PSP and image when installed 9788 9789 resimagepsp_size: equ pspsegment_size+ldebug_code_size+auxbuff_size 9790 endarea resimagepsp, 1 ; size of PSP and image when installed 9791 9792 9793 %if transimagepsp_size > resimagepsp_size 9794 %fatal "resimagepsp_size assumed larger" 9795 %endif 9796 9797 %assign __CHECK_RESIDENTSIZE pspsegment_size 9798 %if __CHECK_RESIDENTSIZE > (64 * 1024) 9799 %error resident size of PSP segment too large (%[__CHECK_RESIDENTSIZE]) 9800 %endif 9801 9802 %if CODE_INSURE_COUNT 9803 %warning code_insure_low_byte_not_0CCh needed CODE_INSURE_COUNT times 9804 %endif