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 05D418 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][D383][2B5E]- cmdlist: dw aa,bb,cc,ddd,ee,ff,gg,hh,ii,error,error,ll,mm,nn,oo 195 00000050 [9712][218C][A78D]- 195 00000056 [8B2E][818E][AD90]- 195 0000005C [DCA4][DCA4][6493]- 195 00000062 [AF95][1B97][1B90] 196 00000068 [303E][7C99][0820]- dw pp,qq,rr,sss,tt,uu,error,ww,xx,yy 196 0000006E [129E][1A39][4147]- 196 00000074 [DCA4][3BA1][BDA2]- 196 0000007A [B6C9] 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 [FBA4] 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 597 00000BD0 0000 rrmask: dw 0 598 00000BD2 00 rrtype: db 0 599 00000BD3 00 eqflag: db 0 ; flag indicating presence of `=' operand 600 align 2, db 0 601 00000BD4 000000000000 eqladdr: dw 0,0,0 ; address of `=' operand in G, P and T command 602 align 2, db 0 603 00000BDA 0000 run_int: dw 0 ; interrupt type that stopped the running 604 00000BDC [E003] lastcmd: dw dmycmd 605 00000BDE 00 bInit: db 0 ; 0=ensure a valid opcode is at debuggee's CS:IP 606 00000BDF 00 fileext: db 0 ; file extension (0 if no file name) 607 EXT_OTHER equ 1 608 EXT_COM equ 2 609 EXT_EXE equ 4 610 EXT_HEX equ 8 611 612 align 4, db 0 613 00000BE0 00000000 mmxbuff: dd 0 ; buffer with a (read-only) part of MMX register 614 ; for access from within expressions 615 %if _CATCHINT08 616 00000BE4 0000 intr8_counter: dw 0 617 %endif 618 00000BE6 00 maxmachinetype: db 0 619 serial_rows: 620 00000BE7 18 db 24 621 serial_columns: 622 00000BE8 50 db 80 623 serial_keep_timeout: 624 00000BE9 0F db 15 625 %if _USE_TX_FIFO 626 serial_fifo_size: 627 00000BEA 10 db _BI_TX_FIFO_SIZE 628 ; size of built-in TX fifo (1 is as if no FIFO) 629 %endif 630 serial_flags: 631 00000BEB 00 db 0 632 sf_init_done: equ 1 633 sf_ctrl_c: equ 2 634 sf_double_ctrl_c: equ 4 635 sf_built_in_fifo: equ 8 636 637 00000BEC 0B serial_var_intnum: db _INTNUM 638 00000BED 03 serial_var_params: db _UART_PARAMS 639 00000BEE 00 serial_var_fifo: db _UART_FIFO 640 00000BEF 00 align 2, db 0 641 00000BF0 F802 serial_var_baseport: dw _UART_BASE 642 00000BF2 0C00 serial_var_dl: dw _UART_RATE 643 00000BF4 0800 serial_var_irqmask: dw _OFFMASK 644 645 00000BF6 01 io_rows: db 1 646 00000BF7 01 io_columns: db 1 647 align 2, db 0 648 00000BF8 0000 io_start_buffer: dw 0 649 00000BFA 0000 io_end_buffer: dw 0 650 00000BFC FF00 io_levels: dw 255 651 00000BFE 0100 io_flags: dw DEFAULTIOFLAGS 652 iof_extra_iol_for_tpg_re: equ 1 653 DEFAULTIOFLAGS equ iof_extra_iol_for_tpg_re 654 655 align 2, db 0 656 00000C00 0000 getline_timer_count: dw 0 657 00000C02 0000 getline_timer_last: dw 0 658 00000C04 [E003] getline_timer_func: dw dmycmd 659 660 %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 661 align 2, db 0 662 00000C06 0000 if_exists_then_address: dw 0 663 00000C08 0000 if_exists_si: dw 0 664 00000C0A 0000 if_exists_sp: dw 0 665 00000C0C 0000 if_exists_length: dw 0 666 %endif 667 668 align 2, db 0 669 terminator_in_line_in: 670 00000C0E 0000 .offset: dw 0 671 00000C10 00 .value: db 0 672 673 00000C11 00 termcode: db 0 674 675 align 2, db 0 676 inttab_optional: 677 .: 678 serial_installed_intnum: equ $ 679 00000C12 0000 dw 0 680 00000C14 [D895] dw serial_interrupt_handler 681 00000C16 0100 dw dif4_int_serial_hooked 682 %if _PM 683 00000C18 2F00 dw 2Fh 684 00000C1A [4089] dw debug2F 685 00000C1C 0200 dw dif4_int_2F_hooked 686 %endif 687 %if _CATCHINT08 688 00000C1E 0800 dw 8 689 00000C20 [5685] dw intr8 690 00000C22 0400 dw dif4_int_08_hooked 691 %endif 692 .amount: equ ($ - .) / 6 693 00000C24 FFFF dw -1 694 695 696 amisintr_offset: 697 00000C26 [310C] dw inttab 698 699 inttab_pre: 700 00000C28 00 times 3 * inttab_optional.amount db 0 701 702 inttab: 703 %if _CATCHINT00 704 00000C31 00 db 0 705 00000C32 [3686] dw intr0 ; table of interrupt initialization stuff 706 %endif 707 %if _CATCHINT01 708 00000C34 01 db 1 709 00000C35 [F285] dw intr1 710 %endif 711 %if _CATCHINT03 712 00000C37 03 db 3 713 00000C38 [5286] dw intr3 714 %endif 715 %if _CATCHINT06 716 00000C3A 06 db 6 717 00000C3B [6E86] dw intr6 718 %endif 719 %if _CATCHINT18 720 00000C3D 18 db 18h 721 00000C3E [8A86] dw intr18 722 %endif 723 %if _CATCHINT19 724 00000C40 19 db 19h 725 00000C41 [A686] dw intr19 726 %endif 727 endarea inttab 728 inttab_number equ inttab_size / 3 729 %if _CATCHINT2D 730 00000C43 2D .i2D: db 2Dh 731 00000C44 [4C81] dw int2D 732 %endif 733 734 735 intforcetab: 736 %if _CATCHINT00 737 00000C46 01 db opt4_int_00_force >> 24 738 %endif 739 %if _CATCHINT01 740 00000C47 02 db opt4_int_01_force >> 24 741 %endif 742 %if _CATCHINT03 743 00000C48 04 db opt4_int_03_force >> 24 744 %endif 745 %if _CATCHINT06 746 00000C49 08 db opt4_int_06_force >> 24 747 %endif 748 %if _CATCHINT18 749 00000C4A 10 db opt4_int_18_force >> 24 750 %endif 751 %if _CATCHINT19 752 00000C4B 20 db opt4_int_19_force >> 24 753 %endif 754 755 756 align 2, db 0 757 ; Parameter block for EXEC call 758 00000C4C 0000 execblk:dw 0 ;(00) zero: copy the parent's environment 759 00000C4E 00000000 dw 0,0 ;(02) address of command tail to copy 760 00000C52 5C000000 dw 5Ch,0 ;(06) address of first FCB to copy 761 00000C56 6C000000 dw 6Ch,0 ;(10) address of second FCB to copy 762 00000C5A 00000000 dw 0,0 ;(14) initial SS:SP 763 00000C5E 00000000 dw 0,0 ;(18) initial CS:IP 764 765 766 ; Register save area (32 words). 767 ; must be DWORD aligned, used as stack 768 00000C62 00 align 4, db 0 769 regs: 770 00000C64 00000000 reg_eax: dd 0 ;+00 eax 771 00000C68 00000000 reg_ebx: dd 0 ;+04 ebx 772 00000C6C 00000000 reg_ecx: dd 0 ;+08 ecx 773 00000C70 00000000 reg_edx: dd 0 ;+12 edx 774 00000C74 00000000 reg_esp: dd 0 ;+16 esp 775 00000C78 00000000 reg_ebp: dd 0 ;+20 ebp 776 00000C7C 00000000 reg_esi: dd 0 ;+24 esi 777 00000C80 00000000 reg_edi: dd 0 ;+28 edi 778 00000C84 00000000 reg_ds: dd 0 ;+32 ds (high word unused) 779 00000C88 00000000 reg_es: dd 0 ;+36 es (high word unused) 780 00000C8C 00000000 reg_ss: dd 0 ;+40 ss (high word unused) 781 00000C90 00000000 reg_cs: dd 0 ;+44 cs (high word unused) 782 00000C94 00000000 reg_fs: dd 0 ;+48 fs (high word unused) 783 00000C98 00000000 reg_gs: dd 0 ;+52 gs (high word unused) 784 00000C9C 00000000 reg_eip: dd 0 ;+56 eip 785 00000CA0 00000000 reg_efl: dd 0 ;+60 efl(ags) 786 regs.end: 787 regs.size: equ regs.end - regs 788 789 regs_prior: 790 .: 791 00000CA4 00000000 times 16 dd 0 792 .end: 793 .size: equ .end - . 794 795 %if .size != regs.size 796 %error regs prior save area size mismatch 797 %endif 798 799 %if _VARIABLES 800 00000CE4 00000000 vregs: times 256 dd 0 ; internal v0..vff 801 %endif 802 803 ; possible byte encoding of lDebug variables for dynamic computations: 804 ; xxxxyyyy 805 ; 10: register 806 ; xx: size (0 = 1, 1 = 2, 2 = 4) 807 ; yyyy: 0..15: register as stored in the register save area 808 ; as SIL, DIL, BPL, SPL aren't supported these map to xH 809 ; xSL, IPL and FLL are invalid, ExS are invalid 810 ; 1011: variable 811 ; yyyy: which variable. variables are always dword-sized 812 ; 11000000: 32-bit compound, next byte stores: xxxxyyyy first, second 16-bit reg 813 ; 11000001..11111111: available for encoding other compound regs, vars, indirection, 814 ; symbols, types etc 815 ; 0xxxxxxx: operators 816 817 818 ; Instruction set information needed for the 'p' command. 819 ; ppbytes and ppinfo needs to be consecutive. 820 000010E4 6667262E363E6465F2- ppbytes:db 66h,67h,26h,2Eh,36h,3Eh,64h,65h,0F2h,0F3h ; prefixes 820 000010ED F3 821 .string: 822 000010EE ACADAAABA4A5 db 0ACh,0ADh,0AAh,0ABh,0A4h,0A5h ; lods,stos,movs 823 000010F4 6C6D6E6F db 6Ch,6Dh,6Eh,6Fh ; ins,outs 824 000010F8 A6A7AEAF db 0A6h,0A7h,0AEh,0AFh ; cmps,scas 825 PPLEN_ONLY_STRING equ $-ppbytes 826 .string_amount: equ $ - .string 827 000010FC CCCD db 0CCh,0CDh ; int instructions 828 000010FE E0E1E2 db 0E0h,0E1h,0E2h ; loop instructions 829 00001101 E8 db 0E8h ; call rel16/32 830 00001102 9A db 09Ah ; call far seg16:16/32 831 ; (This last one is done explicitly by the code.) 832 ; db 0FFh ; FF/2 or FF/3: indirect call 833 834 PPLEN equ $-ppbytes ; size of the above table 835 836 ; Info for the above, respectively. This MUST follow 837 ; immediately after ppbytes, as we add + PPLEN - 1 to 838 ; di after repne scasb to index into this (ppinfo). 839 ; 80h = prefix; 82h = operand size prefix; 81h = address size prefix. 840 ; If the high bit is not set, the next highest bit (40h) indicates 841 ; that the instruction size depends on whether there is an operand 842 ; size prefix; if set, under o32 two bytes are added to the size. 843 ; (This is only used for direct near and far call.) 844 ; If both the two highest bits are clear, then PP_STRDEST, 845 ; PP_STRSRC, or PP_STRSRC2 may be set. This only happens for 846 ; string instructions, which always are neither prefixes nor 847 ; use additional bytes. 848 ; The remaining bits tell the number of additional bytes in the 849 ; instruction. This is at most 4. It must be below-or-equal to 850 ; 7, or if PP_VARSIZ is used, 5 (so the sum stays below 8). 851 852 PP_ADRSIZ equ 01h 853 PP_OPSIZ equ 02h 854 PP_PREFIX equ 80h 855 PP_VARSIZ equ 40h 856 PP_STRDEST equ 20h 857 PP_STRSRC equ 10h 858 PP_STRSRC2 equ 08h 859 PP_SIZ_MASK equ 07h 860 861 00001103 8281 ppinfo: db PP_PREFIX | PP_OPSIZ, PP_PREFIX | PP_ADRSIZ 862 00001105 80 times 8 db PP_PREFIX ; prefixes 863 0000110D 1010 db PP_STRSRC, PP_STRSRC ; lods 864 0000110F 2020 db PP_STRDEST, PP_STRDEST ; stos 865 00001111 3030 db PP_STRDEST | PP_STRSRC, PP_STRDEST | PP_STRSRC 866 ; movs 867 00001113 2020 db PP_STRDEST, PP_STRDEST ; ins 868 00001115 1010 db PP_STRSRC, PP_STRSRC ; outs 869 00001117 1818 db PP_STRSRC2 | PP_STRSRC, PP_STRSRC2 | PP_STRSRC 870 ; cmps 871 00001119 0808 db PP_STRSRC2, PP_STRSRC2 ; scas 872 0000111B 0001 db 0,1 ; int 873 0000111D 010101 db 1,1,1 ; loop 874 00001120 42 db PP_VARSIZ | 2 ; call rel16/32 with displacement 875 00001121 44 db PP_VARSIZ | 4 ; call far 16:16 or 16:32 immediate 876 877 %if PPLEN != $-ppinfo 878 %error "ppinfo table has wrong size" 879 %endif 880 881 882 ; Equates for instruction operands. 883 ; First the sizes. 884 885 OP_ALL equ 40h ; byte/word/dword operand (could be 30h but ...) 886 OP_1632 equ 50h ; word or dword operand 887 OP_8 equ 60h ; byte operand 888 OP_16 equ 70h ; word operand 889 OP_32 equ 80h ; dword operand 890 OP_64 equ 90h ; qword operand 891 OP_1632_DEFAULT equ 0A0h ; word or dword or default opsize 892 893 OP_SIZE equ OP_ALL ; the lowest of these 894 895 ; These operand types need to be combined with a size. 896 ; Bits 0 to 3 give one of these types (maximum 15), 897 ; and bits 4 to 7 specify the size. Table entries 898 ; for these are identified by detecting that they 899 ; are above-or-equal OP_SIZE. 900 ; The first parameter to the opsizeditem macro is the 901 ; name of the item. It has to match the names used in 902 ; the instr.key and debugtbl.inc files. 903 ; The second parameter is the entry for bittab that 904 ; is used by aa.asm (the assembler). 905 ; The third parameter is the suffix used to create the 906 ; entry for asmjmp (prefix aop_) and disjmp2 (dop_). 907 908 %macro opsizeditem 3.nolist 909 %1 equ nextindex 910 %xdefine BITTAB_OPSIZEDITEMS BITTAB_OPSIZEDITEMS,%2 911 %xdefine ASMJMP_OPSIZEDITEMS ASMJMP_OPSIZEDITEMS,aop_%3 912 %xdefine DISJMP2_OPSIZEDITEMS DISJMP2_OPSIZEDITEMS,dop_%3 913 %assign nextindex nextindex + 1 914 %endmacro 915 %assign nextindex 0 916 %define BITTAB_OPSIZEDITEMS "" 917 %define ASMJMP_OPSIZEDITEMS "" 918 %define DISJMP2_OPSIZEDITEMS "" 919 opsizeditem OP_IMM, ARG_IMMED, imm ; immediate 920 opsizeditem OP_RM,ARG_DEREF+ARG_JUSTREG,rm ; reg/mem 921 opsizeditem OP_M, ARG_DEREF, m ; mem (but not reg) 922 opsizeditem OP_R_MOD, ARG_JUSTREG, r_mod ; register, determined from MOD R/M part 923 opsizeditem OP_MOFFS, ARG_DEREF, moffs ; memory offset; e.g., [1234] 924 opsizeditem OP_R, ARG_JUSTREG, r ; reg part of reg/mem byte 925 opsizeditem OP_R_ADD, ARG_JUSTREG, r_add ; register, determined from instruction byte 926 opsizeditem OP_AX, ARG_JUSTREG, ax ; al or ax or eax 927 %if nextindex > 16 928 %error Too many op sized items 929 %endif 930 931 ; These don't need a size. 932 ; Because the size needs to be clear to indicate 933 ; that one of these is to be used, the maximum 934 ; value for these is 63 (as 64 is OP_SIZE). 935 ; The minimum value for these is 1 because a 0 936 ; without size means the end of an op list (OP_END). 937 ; The first parameter to the opitem macro is the name 938 ; of the item. It has to match the names used in the 939 ; instr.key and debugtbl.inc files. 940 ; The second parameter is the entry for bittab that 941 ; is used by aa.asm (the assembler). The third 942 ; parameter is the entry for asmjmp. 943 ; The fourth parameter is the entry for optab as used 944 ; by uu.asm (the disassembler). 945 ; 946 ; asm_siznum contains entries for OP_M64 to OP_MXX. 947 ; (The order has to match their opitem order.) 948 ; asm_regnum contains entries for OP_DX to OP_GS. 949 ; (The order has to match their opitem order.) 950 951 %macro opitem 4.nolist 952 %1 equ nextindex 953 %xdefine BITTAB_OPITEMS BITTAB_OPITEMS,%2 954 %xdefine ASMJMP_OPITEMS ASMJMP_OPITEMS,%3 955 %xdefine OPTAB_OPITEMS OPTAB_OPITEMS,%4 956 %assign nextindex nextindex + 1 957 %endmacro 958 OP_END equ 0 959 %assign nextindex 1 960 %define BITTAB_OPITEMS "" 961 %define ASMJMP_OPITEMS "" 962 %define OPTAB_OPITEMS "" 963 ; order of the following (ao17 entries) must match asm_siznum in aa.asm 964 OP_FIRST_ASM_SIZNUM equ nextindex ; corresponding to asm_siznum start 965 opitem OP_M64, ARG_DEREF, ao17,dop_m64 ; qword memory (obsolete?) 966 opitem OP_MFLOAT, ARG_DEREF, ao17,dop_mfloat ; float memory 967 opitem OP_MDOUBLE, ARG_DEREF, ao17,dop_mdouble; double-precision floating memory 968 opitem OP_M80, ARG_DEREF, ao17,dop_m80 ; tbyte memory 969 opitem OP_MXX, ARG_DEREF, ao17,dop_mxx ; memory (size unknown) 970 opitem OP_FARIMM, ARG_FARADDR, ao21,dop_farimm ; far16/far32 immediate 971 opitem OP_REL8, ARG_IMMED, ao23,dop_rel8 ; byte address relative to IP 972 opitem OP_REL1632, ARG_IMMED, ao25,dop_rel1632; word or dword address relative to IP 973 opitem OP_1CHK, ARG_WEIRDREG, ao29,dop49 ; check for ST(1) 974 opitem OP_STI, ARG_WEIRDREG, aop_sti,dop_sti ; ST(I) 975 opitem OP_CR, ARG_WEIRDREG, aop_cr,dop_cr ; CRx 976 opitem OP_DR, ARG_WEIRDREG, ao34,dop_dr ; DRx 977 opitem OP_TR, ARG_WEIRDREG, ao35,dop_tr ; TRx 978 opitem OP_SEGREG, ARG_WEIRDREG, ao39,dop_segreg ; segment register 979 opitem OP_IMMS8, ARG_IMMED, ao41,dop_imms8 ; sign extended immediate byte 980 opitem OP_IMMS8_EXTEND, ARG_IMMED, ao41_extend,dop_imms8 ; add etc word/dword r/m, imms8 981 opitem OP_IMM8, ARG_IMMED, ao42,dop_imm8 ; immediate byte (other args may be (d)word) 982 opitem OP_IMM8_INT, ARG_IMMED, ao42,dop_imm8_int ; immediate byte for int 983 opitem OP_MMX, ARG_WEIRDREG, aop_mmx,dop_mmx ; MMx 984 opitem OP_MMX_MOD, ARG_WEIRDREG, aop_mmx_mod,dop_mmx_mod ; MMx, but in ModR/M part 985 opitem OP_SHOSIZ, 0FFh, ao44, dop_shosiz ; set flag to always show the size 986 opitem OP_SHORT, 0FFh, ao_short,dop_short ; allow short keyword 987 opitem OP_NEAR, 0FFh, ao_near,dop_near ; allow near keyword 988 opitem OP_FAR, 0FFh, ao_far, dop_far ; allow far keyword 989 opitem OP_FAR_REQUIRED, 0FFh, ao_far_required,dop_far_required ; require far keyword 990 opitem OP_FAR_M, 0FFh, ao_modifier_continue,dop_far_m ; les, lds, lss, lfs, lgs, or jmp/call far mem 991 opitem OP_DOUBLE_M, 0FFh, ao_modifier_continue,dop_double_m ; bound 992 opitem OP_M_SRC, 0FFh, ao_modifier_continue,dop_m_src 993 opitem OP_M_DST, 0FFh, ao_modifier_continue,dop_m_dst 994 opitem OP_M_SRC_DST, 0FFh, ao_modifier_continue,dop_m_src_dst 995 opitem OP_STACK_PUSH, 0FFh, ac09_internal_error,dop_stack_push 996 opitem OP_STACK_POP, 0FFh, ac09_internal_error,dop_stack_pop 997 opitem OP_STACK_SPECIAL,0FFh, ac09_internal_error,dop_stack_special 998 opitem OP_E_CX, ARG_JUSTREG, aop_e_cx, da_internal_error ; (E)CX 999 OP_FIRST_STRING equ nextindex 1000 opitem OP_1, ARG_IMMED, ao46, "1" ; 1 (simple "string" ops from here on) 1001 opitem OP_3, ARG_IMMED, ao47, "3" ; 3 1002 ; order of the following (ao48 entries) must match asm_regnum in aa.asm 1003 OP_FIRST_ASM_REGNUM equ nextindex ; corresponding to asm_regnum start 1004 opitem OP_DX, ARG_JUSTREG, ao48, "DX" ; DX 1005 opitem OP_CL, ARG_JUSTREG, ao48, "CL" ; CL 1006 opitem OP_ST, ARG_WEIRDREG, ao48, "ST" ; ST (top of coprocessor stack) 1007 opitem OP_CS, ARG_WEIRDREG, ao48, "CS" ; CS 1008 opitem OP_DS, ARG_WEIRDREG, ao48, "DS" ; DS 1009 opitem OP_ES, ARG_WEIRDREG, ao48, "ES" ; ES 1010 opitem OP_FS, ARG_WEIRDREG, ao48, "FS" ; FS 1011 opitem OP_GS, ARG_WEIRDREG, ao48, "GS" ; GS 1012 opitem OP_SS, ARG_WEIRDREG, ao48, "SS" ; SS 1013 OP_AFTER_LAST equ nextindex 1014 %if nextindex > OP_SIZE 1015 %error Too many op items 1016 %endif 1017 OP_AMOUNT_TABLE equ nextindex + 16 - 1 1018 ; nextindex: amount sizeless types 1019 ; 16: OP_SIZE combined types 1020 ; -1: OP_END does not occur in tables 1021 1022 ; Instructions that have an implicit operand subject to a segment prefix. 1023 ; This means a prefixed segment is allowed by the strict assembler, and 1024 ; the disassembler treats a segment prefix as part of the instruction and 1025 ; displays it in front of the instruction's mnemonic. 1026 ; (outs, movs, cmps, lods, xlat). 1027 segprfxtab: 1028 00001122 6E6FA4A5A6A7ACAD db 06Eh,06Fh,0A4h,0A5h,0A6h,0A7h,0ACh,0ADh 1029 a32prfxtab: 1030 0000112A D7 db 0D7h ; xlat, last in segprfxtab, first in a32prfxtab 1031 SEGP_LEN equ $-segprfxtab 1032 1033 ; Instructions that can be used with REPE/REPNE. 1034 ; (ins, outs, movs, stos, lods; cmps, scas) 1035 0000112B 6C6EA4AAAC replist:db 06Ch,06Eh,0A4h,0AAh,0ACh ; REP (no difference) 1036 REP_SAME_LEN equ $-replist ; number of indifferent replist entries 1037 00001130 A6AE db 0A6h,0AEh ; REPE/REPNE 1038 REP_LEN equ $-replist 1039 REP_DIFF_LEN equ REP_LEN-REP_SAME_LEN ; number of replist entries with difference 1040 1041 A32P_LEN equ $-a32prfxtab 1042 1043 ; prfxtab P_LEN REP_LEN REPE_REPNE_LEN 1044 1045 ; All the instructions in replist also have an implicit operand 1046 ; subject to ASIZE (similar to segprfxtab). Additionally, the 1047 ; xlat instruction (0D7h) has such an implicit operand too. 1048 ; maskmovq too. 1049 1050 1051 %include "asmtabs.asm" 1052 <1> [list -] 1407 <1> usesection ASMTABLE2 1408 <1> asmtab: 1409 <1> usesection ASMTABLE1 1410 <1> %include "debugtbl.inc" 1411 <2> 1412 <2> ;--- This file was generated by mktables.exe. 1413 <2> 1414 <2> OPTYPES_BASE EQU 0Ch 1415 <2> 1416 <2> ;--- Operand type lists. 1417 <2> ;--- They were read from file INSTR.KEY. 1418 <2> 1419 <2> oplists label byte 1420 00000000 00 <2> opl OP_END ; idx=0, ofs=Ch, used=99 1421 00000001 474000 <2> opl OP_ALL+OP_AX, OP_ALL+OP_IMM, OP_END ; idx=1, ofs=Dh, used=18 1422 00000004 1E414000 <2> opl OP_M_SRC_DST, OP_ALL+OP_RM, OP_ALL+OP_IMM, OP_END ; idx=2, ofs=10h, used=7 1423 00000008 1C414000 <2> opl OP_M_SRC, OP_ALL+OP_RM, OP_ALL+OP_IMM, OP_END ; idx=3, ofs=14h, used=3 1424 0000000C 1D414000 <2> opl OP_M_DST, OP_ALL+OP_RM, OP_ALL+OP_IMM, OP_END ; idx=4, ofs=18h, used=1 1425 00000010 1E511000 <2> opl OP_M_SRC_DST, OP_1632+OP_RM, OP_IMMS8_EXTEND, OP_END ; idx=5, ofs=1Ch, used=7 1426 00000014 1C511000 <2> opl OP_M_SRC, OP_1632+OP_RM, OP_IMMS8_EXTEND, OP_END ; idx=6, ofs=20h, used=1 1427 00000018 1E414500 <2> opl OP_M_SRC_DST, OP_ALL+OP_RM, OP_ALL+OP_R, OP_END ; idx=7, ofs=24h, used=19 1428 0000001C 1C414500 <2> opl OP_M_SRC, OP_ALL+OP_RM, OP_ALL+OP_R, OP_END ; idx=8, ofs=28h, used=4 1429 00000020 1D414500 <2> opl OP_M_DST, OP_ALL+OP_RM, OP_ALL+OP_R, OP_END ; idx=9, ofs=2Ch, used=2 1430 00000024 45 <2> opl OP_ALL+OP_R ; idx=10, ofs=30h, used=19 1431 00000025 1C4100 <2> opl OP_M_SRC, OP_ALL+OP_RM, OP_END ; idx=11, ofs=31h, used=4 + 19 1432 00000028 45 <2> opl OP_ALL+OP_R ; idx=12, ofs=34h, used=2 1433 00000029 1E4100 <2> opl OP_M_SRC_DST, OP_ALL+OP_RM, OP_END ; idx=13, ofs=35h, used=6 + 2 1434 0000002C 1E717500 <2> opl OP_M_SRC_DST, OP_16+OP_RM, OP_16+OP_R, OP_END ; idx=14, ofs=38h, used=1 1435 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 1436 00000035 551C5100 <2> opl OP_1632+OP_R, OP_M_SRC, OP_1632+OP_RM, OP_END ; idx=16, ofs=41h, used=35 1437 00000039 8600 <2> opl OP_32+OP_R_ADD, OP_END ; idx=17, ofs=45h, used=8 1438 0000003B 1E515500 <2> opl OP_M_SRC_DST, OP_1632+OP_RM, OP_1632+OP_R, OP_END ; idx=18, ofs=47h, used=3 1439 0000003F 1C515500 <2> opl OP_M_SRC, OP_1632+OP_RM, OP_1632+OP_R, OP_END ; idx=19, ofs=4Bh, used=1 1440 00000043 1E51 <2> opl OP_M_SRC_DST, OP_1632+OP_RM ; idx=20, ofs=4Fh, used=3 1441 00000045 1100 <2> opl OP_IMM8, OP_END ; idx=21, ofs=51h, used=2 + 3 1442 00000047 1C511100 <2> opl OP_M_SRC, OP_1632+OP_RM, OP_IMM8, OP_END ; idx=22, ofs=53h, used=1 1443 0000004B 1F <2> opl OP_STACK_PUSH ; idx=23, ofs=57h, used=1 1444 0000004C 170800 <2> opl OP_NEAR, OP_REL1632, OP_END ; idx=24, ofs=58h, used=31 + 1 1445 0000004F 21 <2> opl OP_STACK_SPECIAL ; idx=25, ofs=5Bh, used=1 1446 00000050 180600 <2> opl OP_FAR, OP_FARIMM, OP_END ; idx=26, ofs=5Ch, used=1 + 1 1447 00000053 21 <2> opl OP_STACK_SPECIAL ; idx=27, ofs=5Fh, used=1 1448 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 1449 00000059 1E0100 <2> opl OP_M_SRC_DST, OP_M64, OP_END ; idx=29, ofs=65h, used=1 1450 0000005C 1C0100 <2> opl OP_M_SRC, OP_M64, OP_END ; idx=30, ofs=68h, used=1 1451 0000005F 1D0100 <2> opl OP_M_DST, OP_M64, OP_END ; idx=31, ofs=6Bh, used=1 1452 00000062 1F <2> opl OP_STACK_PUSH ; idx=32, ofs=6Eh, used=8 1453 00000063 5600 <2> opl OP_1632+OP_R_ADD, OP_END ; idx=33, ofs=6Fh, used=16 + 8 1454 00000065 205600 <2> opl OP_STACK_POP, OP_1632+OP_R_ADD, OP_END ; idx=34, ofs=71h, used=8 1455 00000068 1F701100 <2> opl OP_STACK_PUSH, OP_16+OP_IMM, OP_IMM8, OP_END ; idx=35, ofs=74h, used=1 1456 0000006C 1C0200 <2> opl OP_M_SRC, OP_MFLOAT, OP_END ; idx=36, ofs=78h, used=9 1457 0000006F 1D0200 <2> opl OP_M_DST, OP_MFLOAT, OP_END ; idx=37, ofs=7Bh, used=2 1458 00000072 1C0300 <2> opl OP_M_SRC, OP_MDOUBLE, OP_END ; idx=38, ofs=7Eh, used=9 1459 00000075 1D0300 <2> opl OP_M_DST, OP_MDOUBLE, OP_END ; idx=39, ofs=81h, used=2 1460 00000078 27 <2> opl OP_ST ; idx=40, ofs=84h, used=20 1461 00000079 0A00 <2> opl OP_STI, OP_END ; idx=41, ofs=85h, used=4 + 20 1462 0000007B 09 <2> opl OP_1CHK ; idx=42, ofs=87h, used=6 1463 0000007C 0A2700 <2> opl OP_STI, OP_ST, OP_END ; idx=43, ofs=88h, used=6 + 6 1464 0000007F 1C8200 <2> opl OP_M_SRC, OP_32+OP_M, OP_END ; idx=44, ofs=8Bh, used=9 1465 00000082 1D8200 <2> opl OP_M_DST, OP_32+OP_M, OP_END ; idx=45, ofs=8Eh, used=2 1466 00000085 1C7200 <2> opl OP_M_SRC, OP_16+OP_M, OP_END ; idx=46, ofs=91h, used=10 1467 00000088 1D7200 <2> opl OP_M_DST, OP_16+OP_M, OP_END ; idx=47, ofs=94h, used=4 1468 0000008B 1C0400 <2> opl OP_M_SRC, OP_M80, OP_END ; idx=48, ofs=97h, used=2 1469 0000008E 1D0400 <2> opl OP_M_DST, OP_M80, OP_END ; idx=49, ofs=9Ah, used=2 1470 00000091 090A00 <2> opl OP_1CHK, OP_STI, OP_END ; idx=50, ofs=9Dh, used=9 1471 00000094 1C <2> opl OP_M_SRC ; idx=51, ofs=A0h, used=4 1472 00000095 0500 <2> opl OP_MXX, OP_END ; idx=52, ofs=A1h, used=1 + 4 1473 00000097 1D0500 <2> opl OP_M_DST, OP_MXX, OP_END ; idx=53, ofs=A3h, used=4 1474 0000009A 7700 <2> opl OP_16+OP_AX, OP_END ; idx=54, ofs=A6h, used=1 1475 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 1476 000000A1 53550F00 <2> opl OP_1632+OP_R_MOD, OP_1632+OP_R, OP_IMMS8, OP_END ; idx=56, ofs=ADh, used=1 1477 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 1478 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 1479 000000AE 471100 <2> opl OP_ALL+OP_AX, OP_IMM8, OP_END ; idx=59, ofs=BAh, used=2 1480 000000B1 472500 <2> opl OP_ALL+OP_AX, OP_DX, OP_END ; idx=60, ofs=BDh, used=2 1481 000000B4 212400 <2> opl OP_STACK_SPECIAL, OP_3, OP_END ; idx=61, ofs=C0h, used=1 1482 000000B7 160700 <2> opl OP_SHORT, OP_REL8, OP_END ; idx=62, ofs=C3h, used=42 1483 000000BA 1F1C5100 <2> opl OP_STACK_PUSH, OP_M_SRC, OP_1632+OP_RM, OP_END ; idx=63, ofs=C6h, used=1 1484 000000BE 1D7100 <2> opl OP_M_DST, OP_16+OP_RM, OP_END ; idx=64, ofs=CAh, used=1 1485 000000C1 1D510E00 <2> opl OP_M_DST, OP_1632+OP_RM, OP_SEGREG, OP_END ; idx=65, ofs=CDh, used=1 1486 000000C5 0E1C5100 <2> opl OP_SEGREG, OP_M_SRC, OP_1632+OP_RM, OP_END ; idx=66, ofs=D1h, used=1 1487 000000C9 471C4400 <2> opl OP_ALL+OP_AX, OP_M_SRC, OP_ALL+OP_MOFFS, OP_END ; idx=67, ofs=D5h, used=2 1488 000000CD 1D444700 <2> opl OP_M_DST, OP_ALL+OP_MOFFS, OP_ALL+OP_AX, OP_END ; idx=68, ofs=D9h, used=2 1489 000000D1 666000 <2> opl OP_8+OP_R_ADD, OP_8+OP_IMM, OP_END ; idx=69, ofs=DDh, used=8 1490 000000D4 565000 <2> opl OP_1632+OP_R_ADD, OP_1632+OP_IMM, OP_END ; idx=70, ofs=E0h, used=8 1491 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 1492 000000DC 5515 <2> opl OP_1632+OP_R, OP_SHOSIZ ; idx=72, ofs=E8h, used=2 1493 000000DE 1C7100 <2> opl OP_M_SRC, OP_16+OP_RM, OP_END ; idx=73, ofs=EAh, used=5 + 2 1494 000000E1 114700 <2> opl OP_IMM8, OP_ALL+OP_AX, OP_END ; idx=74, ofs=EDh, used=2 1495 000000E4 254700 <2> opl OP_DX, OP_ALL+OP_AX, OP_END ; idx=75, ofs=F0h, used=2 1496 000000E7 20 <2> opl OP_STACK_POP ; idx=76, ofs=F3h, used=1 1497 000000E8 1D5100 <2> opl OP_M_DST, OP_1632+OP_RM, OP_END ; idx=77, ofs=F4h, used=2 + 1 1498 000000EB 1F15A000 <2> opl OP_STACK_PUSH, OP_SHOSIZ, OP_1632_DEFAULT+OP_IMM, OP_END ; idx=78, ofs=F7h, used=2 1499 000000EF 1F150F00 <2> opl OP_STACK_PUSH, OP_SHOSIZ, OP_IMMS8, OP_END ; idx=79, ofs=FBh, used=2 1500 000000F3 1E412300 <2> opl OP_M_SRC_DST, OP_ALL+OP_RM, OP_1, OP_END ; idx=80, ofs=FFh, used=9 1501 000000F7 1E412600 <2> opl OP_M_SRC_DST, OP_ALL+OP_RM, OP_CL, OP_END ; idx=81, ofs=103h, used=9 1502 000000FB 1E411100 <2> opl OP_M_SRC_DST, OP_ALL+OP_RM, OP_IMM8, OP_END ; idx=82, ofs=107h, used=9 1503 000000FF 20 <2> opl OP_STACK_POP ; idx=83, ofs=10Bh, used=2 1504 00000100 7000 <2> opl OP_16+OP_IMM, OP_END ; idx=84, ofs=10Ch, used=1 + 2 1505 00000102 217000 <2> opl OP_STACK_SPECIAL, OP_16+OP_IMM, OP_END ; idx=85, ofs=10Eh, used=1 1506 00000105 1D6100 <2> opl OP_M_DST, OP_8+OP_RM, OP_END ; idx=86, ofs=111h, used=30 1507 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 1508 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 1509 00000112 575600 <2> opl OP_1632+OP_AX, OP_1632+OP_R_ADD, OP_END ; idx=89, ofs=11Eh, used=7 1510 00000115 565700 <2> opl OP_1632+OP_R_ADD, OP_1632+OP_AX, OP_END ; idx=90, ofs=121h, used=1 1511 00000118 1F <2> opl OP_STACK_PUSH ; idx=91, ofs=124h, used=1 1512 00000119 2A00 <2> opl OP_ES, OP_END ; idx=92, ofs=125h, used=1 + 1 1513 0000011B 1F <2> opl OP_STACK_PUSH ; idx=93, ofs=127h, used=1 1514 0000011C 2800 <2> opl OP_CS, OP_END ; idx=94, ofs=128h, used=1 + 1 1515 0000011E 1F <2> opl OP_STACK_PUSH ; idx=95, ofs=12Ah, used=1 1516 0000011F 2D00 <2> opl OP_SS, OP_END ; idx=96, ofs=12Bh, used=1 + 1 1517 00000121 1F <2> opl OP_STACK_PUSH ; idx=97, ofs=12Dh, used=1 1518 00000122 2900 <2> opl OP_DS, OP_END ; idx=98, ofs=12Eh, used=1 + 1 1519 00000124 1F <2> opl OP_STACK_PUSH ; idx=99, ofs=130h, used=1 1520 00000125 2B00 <2> opl OP_FS, OP_END ; idx=100, ofs=131h, used=1 + 1 1521 00000127 1F <2> opl OP_STACK_PUSH ; idx=101, ofs=133h, used=1 1522 00000128 2C00 <2> opl OP_GS, OP_END ; idx=102, ofs=134h, used=1 + 1 1523 0000012A 202A00 <2> opl OP_STACK_POP, OP_ES, OP_END ; idx=103, ofs=136h, used=1 1524 0000012D 202D00 <2> opl OP_STACK_POP, OP_SS, OP_END ; idx=104, ofs=139h, used=1 1525 00000130 202900 <2> opl OP_STACK_POP, OP_DS, OP_END ; idx=105, ofs=13Ch, used=1 1526 00000133 202B00 <2> opl OP_STACK_POP, OP_FS, OP_END ; idx=106, ofs=13Fh, used=1 1527 00000136 202C00 <2> opl OP_STACK_POP, OP_GS, OP_END ; idx=107, ofs=142h, used=1 1528 00000139 830B00 <2> opl OP_32+OP_R_MOD, OP_CR, OP_END ; idx=108, ofs=145h, used=1 1529 0000013C 0B8300 <2> opl OP_CR, OP_32+OP_R_MOD, OP_END ; idx=109, ofs=148h, used=1 1530 0000013F 830C00 <2> opl OP_32+OP_R_MOD, OP_DR, OP_END ; idx=110, ofs=14Bh, used=1 1531 00000142 0C8300 <2> opl OP_DR, OP_32+OP_R_MOD, OP_END ; idx=111, ofs=14Eh, used=1 1532 00000145 830D00 <2> opl OP_32+OP_R_MOD, OP_TR, OP_END ; idx=112, ofs=151h, used=1 1533 00000148 0D8300 <2> opl OP_TR, OP_32+OP_R_MOD, OP_END ; idx=113, ofs=154h, used=1 1534 0000014B 131C8100 <2> opl OP_MMX, OP_M_SRC, OP_32+OP_RM, OP_END ; idx=114, ofs=157h, used=1 1535 0000014F 1D811300 <2> opl OP_M_DST, OP_32+OP_RM, OP_MMX, OP_END ; idx=115, ofs=15Bh, used=1 1536 00000153 131C9100 <2> opl OP_MMX, OP_M_SRC, OP_64+OP_RM, OP_END ; idx=116, ofs=15Fh, used=45 1537 00000157 1D911300 <2> opl OP_M_DST, OP_64+OP_RM, OP_MMX, OP_END ; idx=117, ofs=163h, used=1 1538 0000015B 141100 <2> opl OP_MMX_MOD, OP_IMM8, OP_END ; idx=118, ofs=167h, used=8 1539 0000015E 550500 <2> opl OP_1632+OP_R, OP_MXX, OP_END ; idx=119, ofs=16Ah, used=1 1540 00000161 1F <2> opl OP_STACK_PUSH ; idx=120, ofs=16Dh, used=1 1541 00000162 171CA100 <2> opl OP_NEAR, OP_M_SRC, OP_1632_DEFAULT+OP_RM, OP_END ; idx=121, ofs=16Eh, used=1 + 1 1542 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 1543 0000016B 211200 <2> opl OP_STACK_SPECIAL, OP_IMM8_INT, OP_END ; idx=123, ofs=177h, used=1 1544 0000016E 16072200 <2> opl OP_SHORT, OP_REL8, OP_E_CX, OP_END ; idx=124, ofs=17Ah, used=5 1545 00000172 2000 <2> opl OP_STACK_POP, OP_END ; idx=125, ofs=17Eh, used=3 1546 00000174 1F00 <2> opl OP_STACK_PUSH, OP_END ; idx=126, ofs=180h, used=1 1547 00000176 2100 <2> opl OP_STACK_SPECIAL, OP_END ; idx=127, ofs=182h, used=11 1548 <2> 1549 <2> ASMMOD EQU opidx 1550 <2> 1551 <2> ;--- Assembler: data on groups. 1552 <2> ;--- If > 100h, it's a "0F-prefix" group. 1553 <2> 1554 <2> align 2, db 0 1555 <2> agroups label word 1556 00000178 FE00 <2> dw 0FEh ; 0 1557 0000017A 8300 <2> dw 083h ; 1 1558 0000017C 8000 <2> dw 080h ; 2 1559 0000017E BA01 <2> dw 1BAh ; 3 1560 00000180 FF00 <2> dw 0FFh ; 4 1561 00000182 C701 <2> dw 1C7h ; 5 1562 00000184 F600 <2> dw 0F6h ; 6 1563 00000186 0101 <2> dw 101h ; 7 1564 00000188 0001 <2> dw 100h ; 8 1565 0000018A C600 <2> dw 0C6h ; 9 1566 0000018C 7101 <2> dw 171h ; 10 1567 0000018E 7201 <2> dw 172h ; 11 1568 00000190 7301 <2> dw 173h ; 12 1569 00000192 8F00 <2> dw 08Fh ; 13 1570 00000194 D000 <2> dw 0D0h ; 14 1571 00000196 D200 <2> dw 0D2h ; 15 1572 00000198 C000 <2> dw 0C0h ; 16 1573 <2> 1574 <2> ;--- List of assembler mnemonics and data. 1575 <2> ;--- variant's 1. argument (=a): 1576 <2> ;--- if a < 0x100: one byte opcode. 1577 <2> ;--- if a >= 0x100 && a < 0x200: two byte "0F"-opcode. 1578 <2> ;--- if a >= 0x200 && a < 0x240: fp instruction. 1579 <2> ;--- if a >= 0x240: refers to agroups [macro AGRP() is used]. 1580 <2> ;--- variant's 2. argument is index into array opindex. 1581 <2> 1582 <2> mnlist label near 1583 <2> mnsuffix 1584 <2> 1585 <2> mne A32, ASM_SPECIAL ; ofs=0h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 00000000 FF <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 0000019A 0300 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 0000019C 413332 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1586 <2> mne A16, ASM_SPECIAL ; ofs=2h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 00000001 FF <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 0000019F 1300 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000001A1 413136 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1587 <2> mne O32, ASM_SPECIAL ; ofs=4h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 00000002 FF <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000001A4 2300 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000001A6 4F3332 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1588 <2> mne O16, ASM_SPECIAL ; ofs=6h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 00000003 FF <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000001A9 3300 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000001AB 4F3136 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1589 <2> mne BOXCB ; ofs=8h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000001AE 4500 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000001B0 424F584342 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1590 00000004 F42FD4 <2> variant AGRP(0,7), 84 1591 00000007 FF <2> endvariant 1592 <2> mne AAA ; ofs=Ch 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000001B5 8300 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000001B7 414141 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1593 00000008 1B80 <2> variant 037h, 0 1594 0000000A FF <2> endvariant 1595 <2> mne AAD, ASM_SPECIAL ; ofs=Fh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 0000000B FF <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000001BA B300 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000001BC 414144 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1596 0000000C 6A95 <2> variant 0D5h, 21 1597 0000000E FF <2> endvariant 1598 <2> mne AAM, ASM_SPECIAL ; ofs=13h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 0000000F FF <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000001BF F300 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000001C1 41414D <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1599 00000010 6A15 <2> variant 0D4h, 21 1600 00000012 FF <2> endvariant 1601 <2> mne AAS ; ofs=17h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000001C4 3301 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000001C6 414153 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1602 00000013 1F80 <2> variant 03Fh, 0 1603 00000015 FF <2> endvariant 1604 <2> mne ADC ; ofs=1Ah 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000001C9 6301 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000001CB 414443 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1605 00000016 FBF43105 <2> variant AGRP(1,2), 5, ASM_LOCKABLE 1606 0000001A 0A01 <2> variant 014h, 1 1607 0000001C FBF43502 <2> variant AGRP(2,2), 2, ASM_LOCKABLE 1608 00000020 FB0807 <2> variant 010h, 7, ASM_LOCKABLE 1609 00000023 090A <2> variant 012h, 10 1610 00000025 FF <2> endvariant 1611 <2> mne ADD ; ofs=2Ah 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000001CE 6302 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000001D0 414444 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1612 00000026 FBF43005 <2> variant AGRP(1,0), 5, ASM_LOCKABLE 1613 0000002A 0201 <2> variant 004h, 1 1614 0000002C FBF43402 <2> variant AGRP(2,0), 2, ASM_LOCKABLE 1615 00000030 FB0007 <2> variant 000h, 7, ASM_LOCKABLE 1616 00000033 010A <2> variant 002h, 10 1617 00000035 FF <2> endvariant 1618 <2> mne AND ; ofs=3Ah 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000001D3 6303 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000001D5 414E44 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1619 00000036 FBF43205 <2> variant AGRP(1,4), 5, ASM_LOCKABLE 1620 0000003A 1201 <2> variant 024h, 1 1621 0000003C FBF43602 <2> variant AGRP(2,4), 2, ASM_LOCKABLE 1622 00000040 FB1007 <2> variant 020h, 7, ASM_LOCKABLE 1623 00000043 110A <2> variant 022h, 10 1624 00000045 FF <2> endvariant 1625 <2> mne ARPL ; ofs=4Ah 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000001D8 6404 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000001DA 4152504C <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1626 00000046 F6318E <2> variant 063h, 14, ASM_MACH2 1627 00000049 FF <2> endvariant 1628 <2> mne BOUND ; ofs=4Eh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000001DE A504 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000001E0 424F554E44 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1629 0000004A F5317A <2> variant 062h, 122, ASM_MACH1 1630 0000004D FF <2> endvariant 1631 <2> mne BSF ; ofs=52h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000001E5 E304 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000001E7 425346 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1632 0000004E F7DE10 <2> variant 1BCh, 16, ASM_MACH3 1633 00000051 FF <2> endvariant 1634 <2> mne BSR ; ofs=56h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000001EA 2305 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000001EC 425352 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1635 00000052 F7DE90 <2> variant 1BDh, 16, ASM_MACH3 1636 00000055 FF <2> endvariant 1637 <2> mne BSWAP, ASM_D32 ; ofs=5Ah 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 00000056 FD <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000001EF 6505 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000001F1 4253574150 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1638 00000057 F8E411 <2> variant 1C8h, 17, ASM_MACH4 1639 0000005A FF <2> endvariant 1640 <2> mne BT ; ofs=5Fh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000001F6 B205 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000001F8 4254 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1641 0000005B F7D193 <2> variant 1A3h, 19, ASM_MACH3 1642 0000005E F7F43A16 <2> variant AGRP(3,4), 22, ASM_MACH3 1643 00000062 FF <2> endvariant 1644 <2> mne BTC ; ofs=67h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000001FA 3306 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000001FC 425443 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1645 00000063 FBF7DD92 <2> variant 1BBh, 18, ASM_LOCKABLE, ASM_MACH3 1646 00000067 FBF7F43B94 <2> variant AGRP(3,7), 20, ASM_LOCKABLE, ASM_MACH3 1647 0000006C FF <2> endvariant 1648 <2> mne BTR ; ofs=71h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000001FF D306 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000201 425452 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1649 0000006D FBF7D992 <2> variant 1B3h, 18, ASM_LOCKABLE, ASM_MACH3 1650 00000071 FBF7F43B14 <2> variant AGRP(3,6), 20, ASM_LOCKABLE, ASM_MACH3 1651 00000076 FF <2> endvariant 1652 <2> mne BTS ; ofs=7Bh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000204 7307 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000206 425453 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1653 00000077 FBF7D592 <2> variant 1ABh, 18, ASM_LOCKABLE, ASM_MACH3 1654 0000007B FBF7F43A94 <2> variant AGRP(3,5), 20, ASM_LOCKABLE, ASM_MACH3 1655 00000080 FF <2> endvariant 1656 <2> mne CALL ; ofs=85h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000209 1408 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 0000020B 43414C4C <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1657 00000081 7417 <2> variant 0E8h, 23 1658 00000083 F43D78 <2> variant AGRP(4,2), 120 1659 00000086 F43D9B <2> variant AGRP(4,3), 27 1660 00000089 4D19 <2> variant 09Ah, 25 1661 0000008B FF <2> endvariant 1662 <2> mne CBW, ASM_D16 ; ofs=90h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 0000008C FC <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 0000020F C308 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000211 434257 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1663 <2> mne CWDE, ASM_D32 ; ofs=91h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 0000008D FD <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000214 D408 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000216 43574445 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1664 0000008E 4C00 <2> variant 098h, 0 1665 00000090 FF <2> endvariant 1666 <2> mne CLC ; ofs=95h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 0000021A 1309 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 0000021C 434C43 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1667 00000091 7C00 <2> variant 0F8h, 0 1668 00000093 FF <2> endvariant 1669 <2> mne CLD ; ofs=98h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 0000021F 4309 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000221 434C44 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1670 00000094 7E00 <2> variant 0FCh, 0 1671 00000096 FF <2> endvariant 1672 <2> mne CLI ; ofs=9Bh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000224 7309 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000226 434C49 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1673 00000097 7D00 <2> variant 0FAh, 0 1674 00000099 FF <2> endvariant 1675 <2> mne CLTS ; ofs=9Eh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000229 A409 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 0000022B 434C5453 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1676 0000009A F68300 <2> variant 106h, 0, ASM_MACH2 1677 0000009D FF <2> endvariant 1678 <2> mne CMC ; ofs=A2h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 0000022F E309 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000231 434D43 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1679 0000009E 7A80 <2> variant 0F5h, 0 1680 000000A0 FF <2> endvariant 1681 <2> mne CMOVA ; ofs=A5h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000234 150A <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000236 434D4F5641 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1682 000000A1 FAA390 <2> variant 147h, 16, ASM_MACH6 1683 000000A4 FF <2> endvariant 1684 <2> mne CMOVAE ; ofs=A9h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 0000023B 560A <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 0000023D 434D4F564145 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1685 000000A5 FAA190 <2> variant 143h, 16, ASM_MACH6 1686 000000A8 FF <2> endvariant 1687 <2> mne CMOVB ; ofs=ADh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000243 950A <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000245 434D4F5642 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1688 000000A9 FAA110 <2> variant 142h, 16, ASM_MACH6 1689 000000AC FF <2> endvariant 1690 <2> mne CMOVBE ; ofs=B1h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 0000024A D60A <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 0000024C 434D4F564245 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1691 000000AD FAA310 <2> variant 146h, 16, ASM_MACH6 1692 000000B0 FF <2> endvariant 1693 <2> mne CMOVC ; ofs=B5h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000252 150B <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000254 434D4F5643 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1694 000000B1 FAA110 <2> variant 142h, 16, ASM_MACH6 1695 000000B4 FF <2> endvariant 1696 <2> mne CMOVE ; ofs=B9h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000259 550B <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 0000025B 434D4F5645 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1697 000000B5 FAA210 <2> variant 144h, 16, ASM_MACH6 1698 000000B8 FF <2> endvariant 1699 <2> mne CMOVG ; ofs=BDh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000260 950B <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000262 434D4F5647 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1700 000000B9 FAA790 <2> variant 14Fh, 16, ASM_MACH6 1701 000000BC FF <2> endvariant 1702 <2> mne CMOVGE ; ofs=C1h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000267 D60B <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000269 434D4F564745 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1703 000000BD FAA690 <2> variant 14Dh, 16, ASM_MACH6 1704 000000C0 FF <2> endvariant 1705 <2> mne CMOVL ; ofs=C5h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 0000026F 150C <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000271 434D4F564C <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1706 000000C1 FAA610 <2> variant 14Ch, 16, ASM_MACH6 1707 000000C4 FF <2> endvariant 1708 <2> mne CMOVLE ; ofs=C9h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000276 560C <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000278 434D4F564C45 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1709 000000C5 FAA710 <2> variant 14Eh, 16, ASM_MACH6 1710 000000C8 FF <2> endvariant 1711 <2> mne CMOVNA ; ofs=CDh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 0000027E 960C <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000280 434D4F564E41 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1712 000000C9 FAA310 <2> variant 146h, 16, ASM_MACH6 1713 000000CC FF <2> endvariant 1714 <2> mne CMOVNAE ; ofs=D1h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000286 D70C <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000288 434D4F564E4145 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1715 000000CD FAA110 <2> variant 142h, 16, ASM_MACH6 1716 000000D0 FF <2> endvariant 1717 <2> mne CMOVNB ; ofs=D5h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 0000028F 160D <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000291 434D4F564E42 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1718 000000D1 FAA190 <2> variant 143h, 16, ASM_MACH6 1719 000000D4 FF <2> endvariant 1720 <2> mne CMOVNBE ; ofs=D9h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000297 570D <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000299 434D4F564E4245 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1721 000000D5 FAA390 <2> variant 147h, 16, ASM_MACH6 1722 000000D8 FF <2> endvariant 1723 <2> mne CMOVNC ; ofs=DDh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000002A0 960D <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000002A2 434D4F564E43 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1724 000000D9 FAA190 <2> variant 143h, 16, ASM_MACH6 1725 000000DC FF <2> endvariant 1726 <2> mne CMOVNE ; ofs=E1h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000002A8 D60D <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000002AA 434D4F564E45 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1727 000000DD FAA290 <2> variant 145h, 16, ASM_MACH6 1728 000000E0 FF <2> endvariant 1729 <2> mne CMOVNG ; ofs=E5h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000002B0 160E <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000002B2 434D4F564E47 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1730 000000E1 FAA710 <2> variant 14Eh, 16, ASM_MACH6 1731 000000E4 FF <2> endvariant 1732 <2> mne CMOVNGE ; ofs=E9h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000002B8 570E <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000002BA 434D4F564E4745 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1733 000000E5 FAA610 <2> variant 14Ch, 16, ASM_MACH6 1734 000000E8 FF <2> endvariant 1735 <2> mne CMOVNL ; ofs=EDh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000002C1 960E <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000002C3 434D4F564E4C <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1736 000000E9 FAA690 <2> variant 14Dh, 16, ASM_MACH6 1737 000000EC FF <2> endvariant 1738 <2> mne CMOVNLE ; ofs=F1h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000002C9 D70E <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000002CB 434D4F564E4C45 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1739 000000ED FAA790 <2> variant 14Fh, 16, ASM_MACH6 1740 000000F0 FF <2> endvariant 1741 <2> mne CMOVNO ; ofs=F5h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000002D2 160F <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000002D4 434D4F564E4F <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1742 000000F1 FAA090 <2> variant 141h, 16, ASM_MACH6 1743 000000F4 FF <2> endvariant 1744 <2> mne CMOVNP ; ofs=F9h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000002DA 560F <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000002DC 434D4F564E50 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1745 000000F5 FAA590 <2> variant 14Bh, 16, ASM_MACH6 1746 000000F8 FF <2> endvariant 1747 <2> mne CMOVNS ; ofs=FDh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000002E2 960F <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000002E4 434D4F564E53 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1748 000000F9 FAA490 <2> variant 149h, 16, ASM_MACH6 1749 000000FC FF <2> endvariant 1750 <2> mne CMOVNZ ; ofs=101h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000002EA D60F <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000002EC 434D4F564E5A <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1751 000000FD FAA290 <2> variant 145h, 16, ASM_MACH6 1752 00000100 FF <2> endvariant 1753 <2> mne CMOVO ; ofs=105h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000002F2 1510 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000002F4 434D4F564F <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1754 00000101 FAA010 <2> variant 140h, 16, ASM_MACH6 1755 00000104 FF <2> endvariant 1756 <2> mne CMOVP ; ofs=109h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000002F9 5510 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000002FB 434D4F5650 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1757 00000105 FAA510 <2> variant 14Ah, 16, ASM_MACH6 1758 00000108 FF <2> endvariant 1759 <2> mne CMOVPE ; ofs=10Dh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000300 9610 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000302 434D4F565045 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1760 00000109 FAA510 <2> variant 14Ah, 16, ASM_MACH6 1761 0000010C FF <2> endvariant 1762 <2> mne CMOVPO ; ofs=111h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000308 D610 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 0000030A 434D4F56504F <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1763 0000010D FAA590 <2> variant 14Bh, 16, ASM_MACH6 1764 00000110 FF <2> endvariant 1765 <2> mne CMOVS ; ofs=115h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000310 1511 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000312 434D4F5653 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1766 00000111 FAA410 <2> variant 148h, 16, ASM_MACH6 1767 00000114 FF <2> endvariant 1768 <2> mne CMOVZ ; ofs=119h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000317 5511 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000319 434D4F565A <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1769 00000115 FAA210 <2> variant 144h, 16, ASM_MACH6 1770 00000118 FF <2> endvariant 1771 <2> mne CMP ; ofs=11Dh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 0000031E 9311 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000320 434D50 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1772 00000119 F43386 <2> variant AGRP(1,7), 6 1773 0000011C 1E01 <2> variant 03Ch, 1 1774 0000011E F43783 <2> variant AGRP(2,7), 3 1775 00000121 1C08 <2> variant 038h, 8 1776 00000123 1D0A <2> variant 03Ah, 10 1777 00000125 FF <2> endvariant 1778 <2> mne CMPSB ; ofs=12Ah 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000323 6512 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000325 434D505342 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1779 00000126 5300 <2> variant 0A6h, 0 1780 00000128 FF <2> endvariant 1781 <2> mne CMPXCHG ; ofs=130h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 0000032A 9712 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 0000032C 434D5058434847 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1782 00000129 FBF8D807 <2> variant 1B0h, 7, ASM_LOCKABLE, ASM_MACH4 1783 0000012D FF <2> endvariant 1784 <2> mne CMPXCHG8B ; ofs=135h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000333 E912 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000335 434D50584348473842 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1785 0000012E F9F4409D <2> variant AGRP(5,1), 29, ASM_MACH5 1786 00000132 FF <2> endvariant 1787 <2> mne CPUID ; ofs=13Ah 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 0000033E 3513 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000340 4350554944 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1788 00000133 F9D100 <2> variant 1A2h, 0, ASM_MACH5 1789 00000136 FF <2> endvariant 1790 <2> mne CWD, ASM_D16 ; ofs=13Eh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 00000137 FC <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000345 7313 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000347 435744 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1791 <2> mne CDQ, ASM_D32 ; ofs=13Fh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 00000138 FD <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 0000034A 8313 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 0000034C 434451 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1792 00000139 4C80 <2> variant 099h, 0 1793 0000013B FF <2> endvariant 1794 <2> mne DAA ; ofs=143h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 0000034F C313 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000351 444141 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1795 0000013C 1380 <2> variant 027h, 0 1796 0000013E FF <2> endvariant 1797 <2> mne DAS ; ofs=146h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000354 F313 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000356 444153 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1798 0000013F 1780 <2> variant 02Fh, 0 1799 00000141 FF <2> endvariant 1800 <2> mne DB, ASM_SPECIAL ; ofs=149h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 00000142 FF <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000359 2214 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 0000035B 4442 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1801 <2> mne DD, ASM_SPECIAL ; ofs=14Bh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 00000143 FF <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 0000035D 3214 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 0000035F 4444 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1802 <2> mne DEC ; ofs=14Dh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000361 4314 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000363 444543 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1803 00000144 2421 <2> variant 048h, 33 1804 00000146 FBF42C8D <2> variant AGRP(0,1), 13, ASM_LOCKABLE 1805 0000014A FF <2> endvariant 1806 <2> mne DIV ; ofs=154h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000366 B314 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000368 444956 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1807 0000014B F4470B <2> variant AGRP(6,6), 11 1808 0000014E FF <2> endvariant 1809 <2> mne DW, ASM_SPECIAL ; ofs=158h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 0000014F FF <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 0000036B F214 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 0000036D 4457 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1810 <2> mne EMMS ; ofs=15Ah 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 0000036F 0415 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000371 454D4D53 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1811 00000150 F9BB80 <2> variant 177h, 0, ASM_MACH5 1812 00000153 FF <2> endvariant 1813 <2> mne F2XM1 ; ofs=162h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000375 4515 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000377 4632584D31 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1814 00000154 6C80F0 <2> fpvariant 0D9h, 0, 0F0h 1815 00000157 FF <2> endvariant 1816 <2> mne FABS ; ofs=166h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 0000037C 8415 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 0000037E 46414253 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1817 00000158 6C80E1 <2> fpvariant 0D9h, 0, 0E1h 1818 0000015B FF <2> endvariant 1819 <2> mne FADD ; ofs=16Ah 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000382 C415 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000384 46414444 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1820 0000015C F40C24 <2> variant 200h, 36 1821 0000015F F40E26 <2> variant 204h, 38 1822 00000162 6C28C0 <2> fpvariant 0D8h, 40, 0C0h 1823 00000165 6E2BC0 <2> fpvariant 0DCh, 43, 0C0h 1824 00000168 FF <2> endvariant 1825 <2> mne FADDP ; ofs=177h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000388 9516 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 0000038A 4641444450 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1826 00000169 6F2AC0 <2> fpvariant 0DEh, 42, 0C0h 1827 0000016C 6F00C1 <2> fpvariant 0DEh, 0, 0C1h 1828 0000016F FF <2> endvariant 1829 <2> mne FIADD ; ofs=17Eh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 0000038F 0517 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000391 4649414444 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1830 00000170 F40D2C <2> variant 202h, 44 1831 00000173 F40F2E <2> variant 206h, 46 1832 00000176 FF <2> endvariant 1833 <2> mne FBLD ; ofs=185h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000396 7417 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000398 46424C44 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1834 00000177 F41FB0 <2> variant 227h, 48 1835 0000017A FF <2> endvariant 1836 <2> mne FBSTP ; ofs=189h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 0000039C B517 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 0000039E 4642535450 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1837 0000017B F427B1 <2> variant 237h, 49 1838 0000017E FF <2> endvariant 1839 <2> mne FCHS ; ofs=18Dh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000003A3 F417 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000003A5 46434853 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1840 0000017F 6C80E0 <2> fpvariant 0D9h, 0, 0E0h 1841 00000182 FF <2> endvariant 1842 <2> mne FCLEX, ASM_WAIT ; ofs=191h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 00000183 FE <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000003A9 3518 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000003AB 46434C4558 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1843 <2> mne FNCLEX ; ofs=192h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000003B0 4618 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000003B2 464E434C4558 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1844 00000184 6D80E2 <2> fpvariant 0DBh, 0, 0E2h 1845 00000187 FF <2> endvariant 1846 <2> mne FCMOVA ; ofs=196h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000003B8 8618 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000003BA 46434D4F5641 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1847 00000188 FA6DA8D0 <2> fpvariant 0DBh, 40, 0D0h, ASM_MACH6 1848 0000018C FF <2> endvariant 1849 <2> mne FCMOVAE ; ofs=19Bh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000003C0 D718 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000003C2 46434D4F564145 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1850 0000018D FA6DA8C0 <2> fpvariant 0DBh, 40, 0C0h, ASM_MACH6 1851 00000191 FF <2> endvariant 1852 <2> mne FCMOVB ; ofs=1A0h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000003C9 2619 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000003CB 46434D4F5642 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1853 00000192 FA6D28C0 <2> fpvariant 0DAh, 40, 0C0h, ASM_MACH6 1854 00000196 FF <2> endvariant 1855 <2> mne FCMOVBE ; ofs=1A5h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000003D1 7719 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000003D3 46434D4F564245 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1856 00000197 FA6D28D0 <2> fpvariant 0DAh, 40, 0D0h, ASM_MACH6 1857 0000019B FF <2> endvariant 1858 <2> mne FCMOVE ; ofs=1AAh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000003DA C619 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000003DC 46434D4F5645 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1859 0000019C FA6D28C8 <2> fpvariant 0DAh, 40, 0C8h, ASM_MACH6 1860 000001A0 FF <2> endvariant 1861 <2> mne FCMOVNA ; ofs=1AFh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000003E2 171A <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000003E4 46434D4F564E41 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1862 000001A1 FA6D28D0 <2> fpvariant 0DAh, 40, 0D0h, ASM_MACH6 1863 000001A5 FF <2> endvariant 1864 <2> mne FCMOVNAE ; ofs=1B4h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000003EB 681A <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000003ED 46434D4F564E4145 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1865 000001A6 FA6D28C0 <2> fpvariant 0DAh, 40, 0C0h, ASM_MACH6 1866 000001AA FF <2> endvariant 1867 <2> mne FCMOVNB ; ofs=1B9h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000003F5 B71A <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000003F7 46434D4F564E42 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1868 000001AB FA6DA8C0 <2> fpvariant 0DBh, 40, 0C0h, ASM_MACH6 1869 000001AF FF <2> endvariant 1870 <2> mne FCMOVNBE ; ofs=1BEh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000003FE 081B <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000400 46434D4F564E4245 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1871 000001B0 FA6DA8D0 <2> fpvariant 0DBh, 40, 0D0h, ASM_MACH6 1872 000001B4 FF <2> endvariant 1873 <2> mne FCMOVNE ; ofs=1C3h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000408 571B <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 0000040A 46434D4F564E45 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1874 000001B5 FA6DA8C8 <2> fpvariant 0DBh, 40, 0C8h, ASM_MACH6 1875 000001B9 FF <2> endvariant 1876 <2> mne FCMOVNU ; ofs=1C8h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000411 A71B <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000413 46434D4F564E55 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1877 000001BA FA6DA8D8 <2> fpvariant 0DBh, 40, 0D8h, ASM_MACH6 1878 000001BE FF <2> endvariant 1879 <2> mne FCMOVNZ ; ofs=1CDh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 0000041A F71B <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 0000041C 46434D4F564E5A <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1880 000001BF FA6DA8C8 <2> fpvariant 0DBh, 40, 0C8h, ASM_MACH6 1881 000001C3 FF <2> endvariant 1882 <2> mne FCMOVU ; ofs=1D2h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000423 461C <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000425 46434D4F5655 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1883 000001C4 FA6D28D8 <2> fpvariant 0DAh, 40, 0D8h, ASM_MACH6 1884 000001C8 FF <2> endvariant 1885 <2> mne FCMOVZ ; ofs=1D7h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 0000042B 961C <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 0000042D 46434D4F565A <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1886 000001C9 FA6D28C8 <2> fpvariant 0DAh, 40, 0C8h, ASM_MACH6 1887 000001CD FF <2> endvariant 1888 <2> mne FCOM ; ofs=1DCh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000433 E41C <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000435 46434F4D <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1889 000001CE F41424 <2> variant 210h, 36 1890 000001D1 F41626 <2> variant 214h, 38 1891 000001D4 6C32D0 <2> fpvariant 0D8h, 50, 0D0h 1892 000001D7 6C00D1 <2> fpvariant 0D8h, 0, 0D1h 1893 000001DA FF <2> endvariant 1894 <2> mne FCOMI ; ofs=1E9h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000439 B51D <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 0000043B 46434F4D49 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1895 000001DB FA6DB2F0 <2> fpvariant 0DBh, 50, 0F0h, ASM_MACH6 1896 000001DF FA6D80F1 <2> fpvariant 0DBh, 0, 0F1h, ASM_MACH6 1897 000001E3 FF <2> endvariant 1898 <2> mne FCOMIP ; ofs=1F2h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000440 461E <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000442 46434F4D4950 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1899 000001E4 FA6FB2F0 <2> fpvariant 0DFh, 50, 0F0h, ASM_MACH6 1900 000001E8 FA6F80F1 <2> fpvariant 0DFh, 0, 0F1h, ASM_MACH6 1901 000001EC FF <2> endvariant 1902 <2> mne FCOMP ; ofs=1FBh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000448 D51E <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 0000044A 46434F4D50 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1903 000001ED F41824 <2> variant 218h, 36 1904 000001F0 F41A26 <2> variant 21Ch, 38 1905 000001F3 6C32D8 <2> fpvariant 0D8h, 50, 0D8h 1906 000001F6 6C00D9 <2> fpvariant 0D8h, 0, 0D9h 1907 000001F9 FF <2> endvariant 1908 <2> mne FCOMPP ; ofs=208h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 0000044F A61F <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000451 46434F4D5050 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1909 000001FA 6F00D9 <2> fpvariant 0DEh, 0, 0D9h 1910 000001FD FF <2> endvariant 1911 <2> mne FCOS ; ofs=20Ch 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000457 E41F <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000459 46434F53 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1912 000001FE F76C80FF <2> fpvariant 0D9h, 0, 0FFh, ASM_MACH3 1913 00000202 FF <2> endvariant 1914 <2> mne FDECSTP ; ofs=211h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 0000045D 3720 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 0000045F 46444543535450 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1915 00000203 6C80F6 <2> fpvariant 0D9h, 0, 0F6h 1916 00000206 FF <2> endvariant 1917 <2> mne FDISI, ASM_WAIT ; ofs=215h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 00000207 FE <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000466 7520 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000468 4644495349 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1918 <2> mne FNDISI ; ofs=216h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 0000046D 8620 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 0000046F 464E44495349 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1919 00000208 6D80E1 <2> fpvariant 0DBh, 0, 0E1h 1920 0000020B FF <2> endvariant 1921 <2> mne FDIV ; ofs=21Ah 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000475 C420 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000477 46444956 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1922 0000020C F42424 <2> variant 230h, 36 1923 0000020F F42626 <2> variant 234h, 38 1924 00000212 6C28F0 <2> fpvariant 0D8h, 40, 0F0h 1925 00000215 6E2BF8 <2> fpvariant 0DCh, 43, 0F8h 1926 00000218 FF <2> endvariant 1927 <2> mne FDIVP ; ofs=227h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 0000047B 9521 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 0000047D 4644495650 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1928 00000219 6F2AF8 <2> fpvariant 0DEh, 42, 0F8h 1929 0000021C 6F00F9 <2> fpvariant 0DEh, 0, 0F9h 1930 0000021F FF <2> endvariant 1931 <2> mne FIDIV ; ofs=22Eh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000482 0522 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000484 4649444956 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1932 00000220 F4252C <2> variant 232h, 44 1933 00000223 F4272E <2> variant 236h, 46 1934 00000226 FF <2> endvariant 1935 <2> mne FDIVR ; ofs=235h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000489 7522 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 0000048B 4644495652 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1936 00000227 F42824 <2> variant 238h, 36 1937 0000022A F42A26 <2> variant 23Ch, 38 1938 0000022D 6C28F8 <2> fpvariant 0D8h, 40, 0F8h 1939 00000230 6E2BF0 <2> fpvariant 0DCh, 43, 0F0h 1940 00000233 FF <2> endvariant 1941 <2> mne FDIVRP ; ofs=242h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000490 4623 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000492 464449565250 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1942 00000234 6F2AF0 <2> fpvariant 0DEh, 42, 0F0h 1943 00000237 6F00F1 <2> fpvariant 0DEh, 0, 0F1h 1944 0000023A FF <2> endvariant 1945 <2> mne FIDIVR ; ofs=249h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000498 B623 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 0000049A 464944495652 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1946 0000023B F4292C <2> variant 23Ah, 44 1947 0000023E F42B2E <2> variant 23Eh, 46 1948 00000241 FF <2> endvariant 1949 <2> mne FENI, ASM_WAIT ; ofs=250h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 00000242 FE <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000004A0 2424 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000004A2 46454E49 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1950 <2> mne FNENI ; ofs=251h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000004A6 3524 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000004A8 464E454E49 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1951 00000243 6D80E0 <2> fpvariant 0DBh, 0, 0E0h 1952 00000246 FF <2> endvariant 1953 <2> mne FFREE ; ofs=255h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000004AD 7524 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000004AF 4646524545 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1954 00000247 6EA9C0 <2> fpvariant 0DDh, 41, 0C0h 1955 0000024A FF <2> endvariant 1956 <2> mne FICOM ; ofs=259h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000004B4 B524 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000004B6 4649434F4D <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1957 0000024B F4152C <2> variant 212h, 44 1958 0000024E F4172E <2> variant 216h, 46 1959 00000251 FF <2> endvariant 1960 <2> mne FICOMP ; ofs=260h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000004BB 2625 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000004BD 4649434F4D50 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1961 00000252 F4192C <2> variant 21Ah, 44 1962 00000255 F41B2E <2> variant 21Eh, 46 1963 00000258 FF <2> endvariant 1964 <2> mne FILD ; ofs=267h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000004C3 9425 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000004C5 46494C44 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1965 00000259 F40DAC <2> variant 203h, 44 1966 0000025C F40FAE <2> variant 207h, 46 1967 0000025F F4239E <2> variant 22Fh, 30 1968 00000262 FF <2> endvariant 1969 <2> mne FINCSTP ; ofs=271h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000004C9 3726 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000004CB 46494E43535450 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1970 00000263 6C80F7 <2> fpvariant 0D9h, 0, 0F7h 1971 00000266 FF <2> endvariant 1972 <2> mne FINIT, ASM_WAIT ; ofs=275h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 00000267 FE <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000004D2 7526 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000004D4 46494E4954 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1973 <2> mne FNINIT ; ofs=276h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000004D9 8626 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000004DB 464E494E4954 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1974 00000268 6D80E3 <2> fpvariant 0DBh, 0, 0E3h 1975 0000026B FF <2> endvariant 1976 <2> mne FIST ; ofs=27Ah 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000004E1 C426 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000004E3 46495354 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1977 0000026C F415AD <2> variant 213h, 45 1978 0000026F F417AF <2> variant 217h, 47 1979 00000272 FF <2> endvariant 1980 <2> mne FISTP ; ofs=281h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000004E7 3527 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000004E9 4649535450 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1981 00000273 F419AD <2> variant 21Bh, 45 1982 00000276 F41BAF <2> variant 21Fh, 47 1983 00000279 F42B9F <2> variant 23Fh, 31 1984 0000027C FF <2> endvariant 1985 <2> mne FLD ; ofs=28Bh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000004EE D327 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000004F0 464C44 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1986 0000027D F40CA4 <2> variant 201h, 36 1987 00000280 F40EA6 <2> variant 205h, 38 1988 00000283 F421B0 <2> variant 22Bh, 48 1989 00000286 6CA9C0 <2> fpvariant 0D9h, 41, 0C0h 1990 00000289 FF <2> endvariant 1991 <2> mne FLD1 ; ofs=298h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000004F3 A428 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000004F5 464C4431 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1992 0000028A 6C80E8 <2> fpvariant 0D9h, 0, 0E8h 1993 0000028D FF <2> endvariant 1994 <2> mne FLDL2T ; ofs=29Ch 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000004F9 E628 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000004FB 464C444C3254 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1995 0000028E 6C80E9 <2> fpvariant 0D9h, 0, 0E9h 1996 00000291 FF <2> endvariant 1997 <2> mne FLDL2E ; ofs=2A0h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000501 2629 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000503 464C444C3245 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 1998 00000292 6C80EA <2> fpvariant 0D9h, 0, 0EAh 1999 00000295 FF <2> endvariant 2000 <2> mne FLDPI ; ofs=2A4h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000509 6529 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 0000050B 464C445049 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2001 00000296 6C80EB <2> fpvariant 0D9h, 0, 0EBh 2002 00000299 FF <2> endvariant 2003 <2> mne FLDLG2 ; ofs=2A8h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000510 A629 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000512 464C444C4732 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2004 0000029A 6C80EC <2> fpvariant 0D9h, 0, 0ECh 2005 0000029D FF <2> endvariant 2006 <2> mne FLDLN2 ; ofs=2ACh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000518 E629 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 0000051A 464C444C4E32 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2007 0000029E 6C80ED <2> fpvariant 0D9h, 0, 0EDh 2008 000002A1 FF <2> endvariant 2009 <2> mne FLDZ ; ofs=2B0h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000520 242A <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000522 464C445A <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2010 000002A2 6C80EE <2> fpvariant 0D9h, 0, 0EEh 2011 000002A5 FF <2> endvariant 2012 <2> mne FLDCW, ASM_WAIT ; ofs=2B4h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 000002A6 FE <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000526 652A <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000528 464C444357 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2013 <2> mne FNLDCW ; ofs=2B5h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 0000052D 762A <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 0000052F 464E4C444357 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2014 000002A7 F420AE <2> variant 229h, 46 2015 000002AA FF <2> endvariant 2016 <2> mne FMUL ; ofs=2BDh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000535 B42A <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000537 464D554C <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2017 000002AB F41024 <2> variant 208h, 36 2018 000002AE F41226 <2> variant 20Ch, 38 2019 000002B1 6C28C8 <2> fpvariant 0D8h, 40, 0C8h 2020 000002B4 6E2BC8 <2> fpvariant 0DCh, 43, 0C8h 2021 000002B7 FF <2> endvariant 2022 <2> mne FMULP ; ofs=2CAh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 0000053B 852B <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 0000053D 464D554C50 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2023 000002B8 6F2AC8 <2> fpvariant 0DEh, 42, 0C8h 2024 000002BB 6F00C9 <2> fpvariant 0DEh, 0, 0C9h 2025 000002BE FF <2> endvariant 2026 <2> mne FIMUL ; ofs=2D1h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000542 F52B <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000544 46494D554C <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2027 000002BF F4112C <2> variant 20Ah, 44 2028 000002C2 F4132E <2> variant 20Eh, 46 2029 000002C5 FF <2> endvariant 2030 <2> mne FNOP ; ofs=2D8h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000549 642C <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 0000054B 464E4F50 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2031 000002C6 6C80D0 <2> fpvariant 0D9h, 0, 0D0h 2032 000002C9 FF <2> endvariant 2033 <2> mne FPATAN ; ofs=2DCh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 0000054F A62C <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000551 46504154414E <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2034 000002CA 6C80F3 <2> fpvariant 0D9h, 0, 0F3h 2035 000002CD FF <2> endvariant 2036 <2> mne FPREM ; ofs=2E0h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000557 E52C <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000559 465052454D <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2037 000002CE 6C80F8 <2> fpvariant 0D9h, 0, 0F8h 2038 000002D1 FF <2> endvariant 2039 <2> mne FPREM1 ; ofs=2E4h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 0000055E 262D <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000560 465052454D31 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2040 000002D2 F76C80F5 <2> fpvariant 0D9h, 0, 0F5h, ASM_MACH3 2041 000002D6 FF <2> endvariant 2042 <2> mne FPTAN ; ofs=2E9h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000566 752D <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000568 465054414E <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2043 000002D7 6C80F2 <2> fpvariant 0D9h, 0, 0F2h 2044 000002DA FF <2> endvariant 2045 <2> mne FRNDINT ; ofs=2EDh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 0000056D B72D <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 0000056F 46524E44494E54 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2046 000002DB 6C80FC <2> fpvariant 0D9h, 0, 0FCh 2047 000002DE FF <2> endvariant 2048 <2> mne FSCALE ; ofs=2FAh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000576 F62D <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000578 465343414C45 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2049 000002DF 6C80FD <2> fpvariant 0D9h, 0, 0FDh 2050 000002E2 FF <2> endvariant 2051 <2> mne FSETPM, ASM_WAIT ; ofs=2FEh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 000002E3 FE <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 0000057E 362E <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000580 46534554504D <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2052 <2> mne FNSETPM ; ofs=2FFh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000586 472E <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000588 464E534554504D <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2053 000002E4 F66D80E4 <2> fpvariant 0DBh, 0, 0E4h, ASM_MACH2 2054 000002E8 FF <2> endvariant 2055 <2> mne FSIN ; ofs=304h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 0000058F 942E <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000591 4653494E <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2056 000002E9 F76C80FE <2> fpvariant 0D9h, 0, 0FEh, ASM_MACH3 2057 000002ED FF <2> endvariant 2058 <2> mne FSINCOS ; ofs=309h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000595 E72E <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000597 4653494E434F53 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2059 000002EE F76C80FB <2> fpvariant 0D9h, 0, 0FBh, ASM_MACH3 2060 000002F2 FF <2> endvariant 2061 <2> mne FSQRT ; ofs=30Eh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 0000059E 352F <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000005A0 4653515254 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2062 000002F3 6C80FA <2> fpvariant 0D9h, 0, 0FAh 2063 000002F6 FF <2> endvariant 2064 <2> mne FST ; ofs=312h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000005A5 732F <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000005A7 465354 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2065 000002F7 F414A5 <2> variant 211h, 37 2066 000002FA F416A7 <2> variant 215h, 39 2067 000002FD 6EA9D0 <2> fpvariant 0DDh, 41, 0D0h 2068 00000300 FF <2> endvariant 2069 <2> mne FSTP ; ofs=31Ch 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000005AA 1430 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000005AC 46535450 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2070 00000301 F418A5 <2> variant 219h, 37 2071 00000304 F41AA7 <2> variant 21Dh, 39 2072 00000307 F429B1 <2> variant 23Bh, 49 2073 0000030A 6EA9D8 <2> fpvariant 0DDh, 41, 0D8h 2074 0000030D FF <2> endvariant 2075 <2> mne FSTCW, ASM_WAIT ; ofs=329h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 0000030E FE <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000005B0 E530 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000005B2 4653544357 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2076 <2> mne FNSTCW ; ofs=32Ah 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000005B7 F630 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000005B9 464E53544357 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2077 0000030F F428AF <2> variant 239h, 47 2078 00000312 FF <2> endvariant 2079 <2> mne FSTSW, ASM_WAIT ; ofs=333h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 00000313 FE <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000005BF 3531 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000005C1 4653545357 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2080 <2> mne FNSTSW ; ofs=334h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000005C6 4631 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000005C8 464E53545357 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2081 00000314 6FB6E0 <2> fpvariant 0DFh, 54, 0E0h 2082 00000317 F42AAF <2> variant 23Dh, 47 2083 0000031A FF <2> endvariant 2084 <2> mne FSUB ; ofs=33Bh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000005CE B431 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000005D0 46535542 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2085 0000031B F41C24 <2> variant 220h, 36 2086 0000031E F41E26 <2> variant 224h, 38 2087 00000321 6C28E0 <2> fpvariant 0D8h, 40, 0E0h 2088 00000324 6E2BE8 <2> fpvariant 0DCh, 43, 0E8h 2089 00000327 FF <2> endvariant 2090 <2> mne FSUBP ; ofs=348h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000005D4 8532 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000005D6 4653554250 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2091 00000328 6F2AE8 <2> fpvariant 0DEh, 42, 0E8h 2092 0000032B 6F00E9 <2> fpvariant 0DEh, 0, 0E9h 2093 0000032E FF <2> endvariant 2094 <2> mne FISUB ; ofs=34Fh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000005DB F532 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000005DD 4649535542 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2095 0000032F F41D2C <2> variant 222h, 44 2096 00000332 F41F2E <2> variant 226h, 46 2097 00000335 FF <2> endvariant 2098 <2> mne FSUBR ; ofs=356h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000005E2 6533 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000005E4 4653554252 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2099 00000336 F42024 <2> variant 228h, 36 2100 00000339 F42226 <2> variant 22Ch, 38 2101 0000033C 6C28E8 <2> fpvariant 0D8h, 40, 0E8h 2102 0000033F 6E2BE0 <2> fpvariant 0DCh, 43, 0E0h 2103 00000342 FF <2> endvariant 2104 <2> mne FSUBRP ; ofs=363h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000005E9 3634 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000005EB 465355425250 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2105 00000343 6F2AE0 <2> fpvariant 0DEh, 42, 0E0h 2106 00000346 6F00E1 <2> fpvariant 0DEh, 0, 0E1h 2107 00000349 FF <2> endvariant 2108 <2> mne FISUBR ; ofs=36Ah 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000005F1 A634 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000005F3 464953554252 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2109 0000034A F4212C <2> variant 22Ah, 44 2110 0000034D F4232E <2> variant 22Eh, 46 2111 00000350 FF <2> endvariant 2112 <2> mne FTST ; ofs=371h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000005F9 1435 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000005FB 46545354 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2113 00000351 6C80E4 <2> fpvariant 0D9h, 0, 0E4h 2114 00000354 FF <2> endvariant 2115 <2> mne FUCOM ; ofs=375h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000005FF 5535 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000601 4655434F4D <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2116 00000355 F76EB2E0 <2> fpvariant 0DDh, 50, 0E0h, ASM_MACH3 2117 00000359 F76E80E1 <2> fpvariant 0DDh, 0, 0E1h, ASM_MACH3 2118 0000035D FF <2> endvariant 2119 <2> mne FUCOMI ; ofs=37Eh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000606 E635 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000608 4655434F4D49 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2120 0000035E FA6DB2E8 <2> fpvariant 0DBh, 50, 0E8h, ASM_MACH6 2121 00000362 FA6D80E9 <2> fpvariant 0DBh, 0, 0E9h, ASM_MACH6 2122 00000366 FF <2> endvariant 2123 <2> mne FUCOMIP ; ofs=387h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 0000060E 7736 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000610 4655434F4D4950 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2124 00000367 FA6FB2E8 <2> fpvariant 0DFh, 50, 0E8h, ASM_MACH6 2125 0000036B FA6F80E9 <2> fpvariant 0DFh, 0, 0E9h, ASM_MACH6 2126 0000036F FF <2> endvariant 2127 <2> mne FUCOMP ; ofs=390h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000617 0637 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000619 4655434F4D50 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2128 00000370 F76EB2E8 <2> fpvariant 0DDh, 50, 0E8h, ASM_MACH3 2129 00000374 F76E80E9 <2> fpvariant 0DDh, 0, 0E9h, ASM_MACH3 2130 00000378 FF <2> endvariant 2131 <2> mne FUCOMPP ; ofs=399h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 0000061F 9737 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000621 4655434F4D5050 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2132 00000379 F76D00E9 <2> fpvariant 0DAh, 0, 0E9h, ASM_MACH3 2133 0000037D FF <2> endvariant 2134 <2> mne FWAIT ; ofs=39Eh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000628 E537 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 0000062A 4657414954 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2135 0000037E 4D80 <2> variant 09Bh, 0 2136 00000380 FF <2> endvariant 2137 <2> mne FXAM ; ofs=3A1h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 0000062F 1438 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000631 4658414D <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2138 00000381 6C80E5 <2> fpvariant 0D9h, 0, 0E5h 2139 00000384 FF <2> endvariant 2140 <2> mne FXCH ; ofs=3A5h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000635 5438 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000637 46584348 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2141 00000385 6CB2C8 <2> fpvariant 0D9h, 50, 0C8h 2142 00000388 6C80C9 <2> fpvariant 0D9h, 0, 0C9h 2143 0000038B FF <2> endvariant 2144 <2> mne FXTRACT ; ofs=3ACh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 0000063B C738 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 0000063D 46585452414354 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2145 0000038C 6C80F4 <2> fpvariant 0D9h, 0, 0F4h 2146 0000038F FF <2> endvariant 2147 <2> mne FYL2X ; ofs=3B0h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000644 0539 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000646 46594C3258 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2148 00000390 6C80F1 <2> fpvariant 0D9h, 0, 0F1h 2149 00000393 FF <2> endvariant 2150 <2> mne FYL2XP1 ; ofs=3B4h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 0000064B 4739 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 0000064D 46594C32585031 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2151 00000394 6C80F9 <2> fpvariant 0D9h, 0, 0F9h 2152 00000397 FF <2> endvariant 2153 <2> mne HLT ; ofs=3B8h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000654 8339 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000656 484C54 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2154 00000398 7A00 <2> variant 0F4h, 0 2155 0000039A FF <2> endvariant 2156 <2> mne IDIV ; ofs=3BBh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000659 B439 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 0000065B 49444956 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2157 0000039B F4478B <2> variant AGRP(6,7), 11 2158 0000039E FF <2> endvariant 2159 <2> mne IMUL ; ofs=3BFh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 0000065F F439 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000661 494D554C <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2160 0000039F F4468B <2> variant AGRP(6,5), 11 2161 000003A2 F7D790 <2> variant 1AFh, 16, ASM_MACH3 2162 000003A5 F535B7 <2> variant 06Bh, 55, ASM_MACH1 2163 000003A8 F535B8 <2> variant 06Bh, 56, ASM_MACH1 2164 000003AB F534B9 <2> variant 069h, 57, ASM_MACH1 2165 000003AE F534BA <2> variant 069h, 58, ASM_MACH1 2166 000003B1 FF <2> endvariant 2167 <2> mne IN ; ofs=3D2h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000665 223B <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000667 494E <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2168 000003B2 723B <2> variant 0E4h, 59 2169 000003B4 763C <2> variant 0ECh, 60 2170 000003B6 FF <2> endvariant 2171 <2> mne INC ; ofs=3D7h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000669 733B <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 0000066B 494E43 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2172 000003B7 2021 <2> variant 040h, 33 2173 000003B9 FBF42C0D <2> variant AGRP(0,0), 13, ASM_LOCKABLE 2174 000003BD FF <2> endvariant 2175 <2> mne INSB ; ofs=3DEh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 0000066E E43B <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000670 494E5342 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2176 000003BE F53600 <2> variant 06Ch, 0, ASM_MACH1 2177 000003C1 FF <2> endvariant 2178 <2> mne INT ; ofs=3E6h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000674 233C <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000676 494E54 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2179 000003C2 663D <2> variant 0CCh, 61 2180 000003C4 66FB <2> variant 0CDh, 123 2181 000003C6 FF <2> endvariant 2182 <2> mne INT1 ; ofs=3EBh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000679 743C <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 0000067B 494E5431 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2183 000003C7 FA78FF <2> variant 0F1h, 127, ASM_MACH6 2184 000003CA FF <2> endvariant 2185 <2> mne INT01 ; ofs=3EFh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 0000067F B53C <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000681 494E543031 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2186 000003CB FA78FF <2> variant 0F1h, 127, ASM_MACH6 2187 000003CE FF <2> endvariant 2188 <2> mne ICEBP ; ofs=3F3h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000686 F53C <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000688 4943454250 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2189 000003CF FA78FF <2> variant 0F1h, 127, ASM_MACH6 2190 000003D2 FF <2> endvariant 2191 <2> mne INT3 ; ofs=3F7h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 0000068D 343D <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 0000068F 494E5433 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2192 000003D3 667F <2> variant 0CCh, 127 2193 000003D5 FF <2> endvariant 2194 <2> mne INT03 ; ofs=3FAh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000693 653D <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000695 494E543033 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2195 000003D6 667F <2> variant 0CCh, 127 2196 000003D8 FF <2> endvariant 2197 <2> mne INTO ; ofs=3FDh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 0000069A 943D <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 0000069C 494E544F <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2198 000003D9 677F <2> variant 0CEh, 127 2199 000003DB FF <2> endvariant 2200 <2> mne INVD ; ofs=400h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000006A0 C43D <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000006A2 494E5644 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2201 000003DC F88400 <2> variant 108h, 0, ASM_MACH4 2202 000003DF FF <2> endvariant 2203 <2> mne INVLPG ; ofs=404h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000006A6 063E <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000006A8 494E564C5047 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2204 000003E0 F8F44BB4 <2> variant AGRP(7,7), 52, ASM_MACH4 2205 000003E4 FF <2> endvariant 2206 <2> mne JA ; ofs=40Ch 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000006AE 523E <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000006B0 4A41 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2207 000003E5 3BBE <2> variant 077h, 62 2208 000003E7 F7C398 <2> variant 187h, 24, ASM_MACH3 2209 000003EA FF <2> endvariant 2210 <2> mne JAE ; ofs=412h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000006B2 B33E <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000006B4 4A4145 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2211 000003EB 39BE <2> variant 073h, 62 2212 000003ED F7C198 <2> variant 183h, 24, ASM_MACH3 2213 000003F0 FF <2> endvariant 2214 <2> mne JB ; ofs=418h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000006B7 123F <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000006B9 4A42 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2215 000003F1 393E <2> variant 072h, 62 2216 000003F3 F7C118 <2> variant 182h, 24, ASM_MACH3 2217 000003F6 FF <2> endvariant 2218 <2> mne JBE ; ofs=41Eh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000006BB 733F <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000006BD 4A4245 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2219 000003F7 3B3E <2> variant 076h, 62 2220 000003F9 F7C318 <2> variant 186h, 24, ASM_MACH3 2221 000003FC FF <2> endvariant 2222 <2> mne JC ; ofs=424h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000006C0 D23F <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000006C2 4A43 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2223 000003FD 393E <2> variant 072h, 62 2224 000003FF F7C118 <2> variant 182h, 24, ASM_MACH3 2225 00000402 FF <2> endvariant 2226 <2> mne JCXZ, ASM_D16 ; ofs=42Ah 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 00000403 FC <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000006C4 3440 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000006C6 4A43585A <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2227 <2> mne JECXZ, ASM_D32 ; ofs=42Bh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 00000404 FD <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000006CA 4540 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000006CC 4A4543585A <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2228 00000405 71BE <2> variant 0E3h, 62 2229 00000407 FF <2> endvariant 2230 <2> mne JE ; ofs=42Fh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000006D1 8240 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000006D3 4A45 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2231 00000408 3A3E <2> variant 074h, 62 2232 0000040A F7C218 <2> variant 184h, 24, ASM_MACH3 2233 0000040D FF <2> endvariant 2234 <2> mne JG ; ofs=435h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000006D5 E240 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000006D7 4A47 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2235 0000040E 3FBE <2> variant 07Fh, 62 2236 00000410 F7C798 <2> variant 18Fh, 24, ASM_MACH3 2237 00000413 FF <2> endvariant 2238 <2> mne JGE ; ofs=43Bh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000006D9 4341 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000006DB 4A4745 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2239 00000414 3EBE <2> variant 07Dh, 62 2240 00000416 F7C698 <2> variant 18Dh, 24, ASM_MACH3 2241 00000419 FF <2> endvariant 2242 <2> mne JL ; ofs=441h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000006DE A241 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000006E0 4A4C <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2243 0000041A 3E3E <2> variant 07Ch, 62 2244 0000041C F7C618 <2> variant 18Ch, 24, ASM_MACH3 2245 0000041F FF <2> endvariant 2246 <2> mne JLE ; ofs=447h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000006E2 0342 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000006E4 4A4C45 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2247 00000420 3F3E <2> variant 07Eh, 62 2248 00000422 F7C718 <2> variant 18Eh, 24, ASM_MACH3 2249 00000425 FF <2> endvariant 2250 <2> mne JNA ; ofs=44Dh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000006E7 6342 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000006E9 4A4E41 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2251 00000426 3B3E <2> variant 076h, 62 2252 00000428 F7C318 <2> variant 186h, 24, ASM_MACH3 2253 0000042B FF <2> endvariant 2254 <2> mne JNAE ; ofs=453h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000006EC C442 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000006EE 4A4E4145 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2255 0000042C 393E <2> variant 072h, 62 2256 0000042E F7C118 <2> variant 182h, 24, ASM_MACH3 2257 00000431 FF <2> endvariant 2258 <2> mne JNB ; ofs=459h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000006F2 2343 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000006F4 4A4E42 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2259 00000432 39BE <2> variant 073h, 62 2260 00000434 F7C198 <2> variant 183h, 24, ASM_MACH3 2261 00000437 FF <2> endvariant 2262 <2> mne JNBE ; ofs=45Fh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000006F7 8443 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000006F9 4A4E4245 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2263 00000438 3BBE <2> variant 077h, 62 2264 0000043A F7C398 <2> variant 187h, 24, ASM_MACH3 2265 0000043D FF <2> endvariant 2266 <2> mne JNC ; ofs=465h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000006FD E343 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000006FF 4A4E43 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2267 0000043E 39BE <2> variant 073h, 62 2268 00000440 F7C198 <2> variant 183h, 24, ASM_MACH3 2269 00000443 FF <2> endvariant 2270 <2> mne JNE ; ofs=46Bh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000702 4344 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000704 4A4E45 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2271 00000444 3ABE <2> variant 075h, 62 2272 00000446 F7C298 <2> variant 185h, 24, ASM_MACH3 2273 00000449 FF <2> endvariant 2274 <2> mne JNG ; ofs=471h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000707 A344 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000709 4A4E47 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2275 0000044A 3F3E <2> variant 07Eh, 62 2276 0000044C F7C718 <2> variant 18Eh, 24, ASM_MACH3 2277 0000044F FF <2> endvariant 2278 <2> mne JNGE ; ofs=477h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 0000070C 0445 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 0000070E 4A4E4745 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2279 00000450 3E3E <2> variant 07Ch, 62 2280 00000452 F7C618 <2> variant 18Ch, 24, ASM_MACH3 2281 00000455 FF <2> endvariant 2282 <2> mne JNL ; ofs=47Dh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000712 6345 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000714 4A4E4C <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2283 00000456 3EBE <2> variant 07Dh, 62 2284 00000458 F7C698 <2> variant 18Dh, 24, ASM_MACH3 2285 0000045B FF <2> endvariant 2286 <2> mne JNLE ; ofs=483h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000717 C445 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000719 4A4E4C45 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2287 0000045C 3FBE <2> variant 07Fh, 62 2288 0000045E F7C798 <2> variant 18Fh, 24, ASM_MACH3 2289 00000461 FF <2> endvariant 2290 <2> mne JNO ; ofs=489h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 0000071D 2346 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 0000071F 4A4E4F <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2291 00000462 38BE <2> variant 071h, 62 2292 00000464 F7C098 <2> variant 181h, 24, ASM_MACH3 2293 00000467 FF <2> endvariant 2294 <2> mne JNP ; ofs=48Fh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000722 8346 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000724 4A4E50 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2295 00000468 3DBE <2> variant 07Bh, 62 2296 0000046A F7C598 <2> variant 18Bh, 24, ASM_MACH3 2297 0000046D FF <2> endvariant 2298 <2> mne JNS ; ofs=495h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000727 E346 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000729 4A4E53 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2299 0000046E 3CBE <2> variant 079h, 62 2300 00000470 F7C498 <2> variant 189h, 24, ASM_MACH3 2301 00000473 FF <2> endvariant 2302 <2> mne JNZ ; ofs=49Bh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 0000072C 4347 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 0000072E 4A4E5A <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2303 00000474 3ABE <2> variant 075h, 62 2304 00000476 F7C298 <2> variant 185h, 24, ASM_MACH3 2305 00000479 FF <2> endvariant 2306 <2> mne JO ; ofs=4A1h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000731 A247 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000733 4A4F <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2307 0000047A 383E <2> variant 070h, 62 2308 0000047C F7C018 <2> variant 180h, 24, ASM_MACH3 2309 0000047F FF <2> endvariant 2310 <2> mne JP ; ofs=4A7h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000735 0248 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000737 4A50 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2311 00000480 3D3E <2> variant 07Ah, 62 2312 00000482 F7C518 <2> variant 18Ah, 24, ASM_MACH3 2313 00000485 FF <2> endvariant 2314 <2> mne JPE ; ofs=4ADh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000739 6348 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 0000073B 4A5045 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2315 00000486 3D3E <2> variant 07Ah, 62 2316 00000488 F7C518 <2> variant 18Ah, 24, ASM_MACH3 2317 0000048B FF <2> endvariant 2318 <2> mne JPO ; ofs=4B3h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 0000073E C348 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000740 4A504F <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2319 0000048C 3DBE <2> variant 07Bh, 62 2320 0000048E F7C598 <2> variant 18Bh, 24, ASM_MACH3 2321 00000491 FF <2> endvariant 2322 <2> mne JS ; ofs=4B9h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000743 2249 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000745 4A53 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2323 00000492 3C3E <2> variant 078h, 62 2324 00000494 F7C418 <2> variant 188h, 24, ASM_MACH3 2325 00000497 FF <2> endvariant 2326 <2> mne JZ ; ofs=4BFh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000747 8249 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000749 4A5A <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2327 00000498 3A3E <2> variant 074h, 62 2328 0000049A F7C218 <2> variant 184h, 24, ASM_MACH3 2329 0000049D FF <2> endvariant 2330 <2> mne JMP ; ofs=4C5h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 0000074B E349 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 0000074D 4A4D50 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2331 0000049E 75BE <2> variant 0EBh, 62 2332 000004A0 7498 <2> variant 0E9h, 24 2333 000004A2 F43E79 <2> variant AGRP(4,4), 121 2334 000004A5 F43E9C <2> variant AGRP(4,5), 28 2335 000004A8 751A <2> variant 0EAh, 26 2336 000004AA FF <2> endvariant 2337 <2> mne LAHF ; ofs=4D2h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000750 B44A <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000752 4C414846 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2338 000004AB 4F80 <2> variant 09Fh, 0 2339 000004AD FF <2> endvariant 2340 <2> mne LAR ; ofs=4D5h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000756 E34A <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000758 4C4152 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2341 000004AE F68110 <2> variant 102h, 16, ASM_MACH2 2342 000004B1 FF <2> endvariant 2343 <2> mne LDS ; ofs=4D9h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 0000075B 234B <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 0000075D 4C4453 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2344 000004B2 628F <2> variant 0C5h, 15 2345 000004B4 FF <2> endvariant 2346 <2> mne LSS ; ofs=4DCh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000760 534B <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000762 4C5353 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2347 000004B5 F7D90F <2> variant 1B2h, 15, ASM_MACH3 2348 000004B8 FF <2> endvariant 2349 <2> mne LES ; ofs=4E0h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000765 934B <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000767 4C4553 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2350 000004B9 620F <2> variant 0C4h, 15 2351 000004BB FF <2> endvariant 2352 <2> mne LFS ; ofs=4E3h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 0000076A C34B <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 0000076C 4C4653 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2353 000004BC F7DA0F <2> variant 1B4h, 15, ASM_MACH3 2354 000004BF FF <2> endvariant 2355 <2> mne LGS ; ofs=4E7h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 0000076F 034C <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000771 4C4753 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2356 000004C0 F7DA8F <2> variant 1B5h, 15, ASM_MACH3 2357 000004C3 FF <2> endvariant 2358 <2> mne LEA ; ofs=4EBh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000774 434C <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000776 4C4541 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2359 000004C4 46F7 <2> variant 08Dh, 119 2360 000004C6 FF <2> endvariant 2361 <2> mne LGDT ; ofs=4F2h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000779 744C <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 0000077B 4C474454 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2362 000004C7 F6F44933 <2> variant AGRP(7,2), 51, ASM_MACH2 2363 000004CB FF <2> endvariant 2364 <2> mne LIDT ; ofs=4F7h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 0000077F C44C <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000781 4C494454 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2365 000004CC F6F449B3 <2> variant AGRP(7,3), 51, ASM_MACH2 2366 000004D0 FF <2> endvariant 2367 <2> mne LLDT ; ofs=4FCh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000785 144D <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000787 4C4C4454 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2368 000004D1 F6F44D49 <2> variant AGRP(8,2), 73, ASM_MACH2 2369 000004D5 FF <2> endvariant 2370 <2> mne LMSW ; ofs=501h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 0000078B 644D <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 0000078D 4C4D5357 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2371 000004D6 F6F44B49 <2> variant AGRP(7,6), 73, ASM_MACH2 2372 000004DA FF <2> endvariant 2373 <2> mne LOCK, ASM_SPECIAL, 0F0h ; ofs=506h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 000004DB FFF0 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000791 B44D <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000793 4C4F434B <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2374 <2> mne LODSB ; ofs=508h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000797 D54D <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000799 4C4F445342 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2375 000004DD 5600 <2> variant 0ACh, 0 2376 000004DF FF <2> endvariant 2377 <2> mne LOOP ; ofs=51Dh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 0000079E 044E <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000007A0 4C4F4F50 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2378 000004E0 717C <2> variant 0E2h, 124 2379 000004E2 713E <2> variant 0E2h, 62 2380 000004E4 FF <2> endvariant 2381 <2> mne LOOPZ ; ofs=522h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000007A4 554E <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000007A6 4C4F4F505A <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2382 000004E5 70FC <2> variant 0E1h, 124 2383 000004E7 70BE <2> variant 0E1h, 62 2384 000004E9 FF <2> endvariant 2385 <2> mne LOOPE ; ofs=527h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000007AB A54E <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000007AD 4C4F4F5045 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2386 000004EA 70FC <2> variant 0E1h, 124 2387 000004EC 70BE <2> variant 0E1h, 62 2388 000004EE FF <2> endvariant 2389 <2> mne LOOPNZ ; ofs=52Ch 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000007B2 F64E <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000007B4 4C4F4F504E5A <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2390 000004EF 707C <2> variant 0E0h, 124 2391 000004F1 703E <2> variant 0E0h, 62 2392 000004F3 FF <2> endvariant 2393 <2> mne LOOPNE ; ofs=531h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000007BA 464F <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000007BC 4C4F4F504E45 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2394 000004F4 707C <2> variant 0E0h, 124 2395 000004F6 703E <2> variant 0E0h, 62 2396 000004F8 FF <2> endvariant 2397 <2> mne LSL ; ofs=536h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000007C2 934F <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000007C4 4C534C <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2398 000004F9 F68190 <2> variant 103h, 16, ASM_MACH2 2399 000004FC FF <2> endvariant 2400 <2> mne LTR ; ofs=53Ah 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000007C7 D34F <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000007C9 4C5452 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2401 000004FD F6F44DC9 <2> variant AGRP(8,3), 73, ASM_MACH2 2402 00000501 FF <2> endvariant 2403 <2> mne MOV ; ofs=53Fh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000007CC 2350 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000007CE 4D4F56 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2404 00000502 5043 <2> variant 0A0h, 67 2405 00000504 5144 <2> variant 0A2h, 68 2406 00000506 4409 <2> variant 088h, 9 2407 00000508 450A <2> variant 08Ah, 10 2408 0000050A 4641 <2> variant 08Ch, 65 2409 0000050C 4742 <2> variant 08Eh, 66 2410 0000050E 5845 <2> variant 0B0h, 69 2411 00000510 5C46 <2> variant 0B8h, 70 2412 00000512 F45004 <2> variant AGRP(9,0), 4 2413 00000515 F7906C <2> variant 120h, 108, ASM_MACH3 2414 00000518 F7916D <2> variant 122h, 109, ASM_MACH3 2415 0000051B F790EE <2> variant 121h, 110, ASM_MACH3 2416 0000051E F791EF <2> variant 123h, 111, ASM_MACH3 2417 00000521 F79270 <2> variant 124h, 112, ASM_MACH3 2418 00000524 F79371 <2> variant 126h, 113, ASM_MACH3 2419 00000527 FF <2> endvariant 2420 <2> mne MOVD ; ofs=565h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000007D1 8452 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000007D3 4D4F5644 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2421 00000528 F9B772 <2> variant 16Eh, 114, ASM_MACH5 2422 0000052B F9BF73 <2> variant 17Eh, 115, ASM_MACH5 2423 0000052E FF <2> endvariant 2424 <2> mne MOVQ ; ofs=56Ch 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000007D7 F452 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000007D9 4D4F5651 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2425 0000052F F9B7F4 <2> variant 16Fh, 116, ASM_MACH5 2426 00000532 F9BFF5 <2> variant 17Fh, 117, ASM_MACH5 2427 00000535 FF <2> endvariant 2428 <2> mne PACKSSDW ; ofs=573h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000007DD 6853 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000007DF 5041434B53534457 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2429 00000536 F9B5F4 <2> variant 16Bh, 116, ASM_MACH5 2430 00000539 FF <2> endvariant 2431 <2> mne PACKSSWB ; ofs=577h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000007E7 A853 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000007E9 5041434B53535742 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2432 0000053A F9B1F4 <2> variant 163h, 116, ASM_MACH5 2433 0000053D FF <2> endvariant 2434 <2> mne PACKUSWB ; ofs=57Bh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000007F1 E853 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000007F3 5041434B55535742 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2435 0000053E F9B3F4 <2> variant 167h, 116, ASM_MACH5 2436 00000541 FF <2> endvariant 2437 <2> mne PADDB ; ofs=57Fh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000007FB 2554 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000007FD 5041444442 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2438 00000542 F9F40A74 <2> variant 1FCh, 116, ASM_MACH5 2439 00000546 FF <2> endvariant 2440 <2> mne PADDW ; ofs=584h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000802 7554 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000804 5041444457 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2441 00000547 F9F40AF4 <2> variant 1FDh, 116, ASM_MACH5 2442 0000054B FF <2> endvariant 2443 <2> mne PADDD ; ofs=589h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000809 C554 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 0000080B 5041444444 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2444 0000054C F9F40B74 <2> variant 1FEh, 116, ASM_MACH5 2445 00000550 FF <2> endvariant 2446 <2> mne PADDSB ; ofs=58Eh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000810 1655 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000812 504144445342 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2447 00000551 F9F40274 <2> variant 1ECh, 116, ASM_MACH5 2448 00000555 FF <2> endvariant 2449 <2> mne PADDSW ; ofs=593h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000818 6655 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 0000081A 504144445357 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2450 00000556 F9F402F4 <2> variant 1EDh, 116, ASM_MACH5 2451 0000055A FF <2> endvariant 2452 <2> mne PADDUSB ; ofs=598h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000820 B755 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000822 50414444555342 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2453 0000055B F9EE74 <2> variant 1DCh, 116, ASM_MACH5 2454 0000055E FF <2> endvariant 2455 <2> mne PADDUSW ; ofs=59Ch 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000829 F755 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 0000082B 50414444555357 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2456 0000055F F9EEF4 <2> variant 1DDh, 116, ASM_MACH5 2457 00000562 FF <2> endvariant 2458 <2> mne PAND ; ofs=5A0h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000832 3456 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000834 50414E44 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2459 00000563 F9EDF4 <2> variant 1DBh, 116, ASM_MACH5 2460 00000566 FF <2> endvariant 2461 <2> mne PANDN ; ofs=5A4h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000838 7556 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 0000083A 50414E444E <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2462 00000567 F9EFF4 <2> variant 1DFh, 116, ASM_MACH5 2463 0000056A FF <2> endvariant 2464 <2> mne PCMPEQB ; ofs=5A8h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 0000083F B756 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000841 50434D50455142 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2465 0000056B F9BA74 <2> variant 174h, 116, ASM_MACH5 2466 0000056E FF <2> endvariant 2467 <2> mne PCMPEQW ; ofs=5ACh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000848 F756 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 0000084A 50434D50455157 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2468 0000056F F9BAF4 <2> variant 175h, 116, ASM_MACH5 2469 00000572 FF <2> endvariant 2470 <2> mne PCMPEQD ; ofs=5B0h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000851 3757 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000853 50434D50455144 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2471 00000573 F9BB74 <2> variant 176h, 116, ASM_MACH5 2472 00000576 FF <2> endvariant 2473 <2> mne PCMPGTB ; ofs=5B4h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 0000085A 7757 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 0000085C 50434D50475442 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2474 00000577 F9B274 <2> variant 164h, 116, ASM_MACH5 2475 0000057A FF <2> endvariant 2476 <2> mne PCMPGTW ; ofs=5B8h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000863 B757 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000865 50434D50475457 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2477 0000057B F9B2F4 <2> variant 165h, 116, ASM_MACH5 2478 0000057E FF <2> endvariant 2479 <2> mne PCMPGTD ; ofs=5BCh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 0000086C F757 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 0000086E 50434D50475444 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2480 0000057F F9B374 <2> variant 166h, 116, ASM_MACH5 2481 00000582 FF <2> endvariant 2482 <2> mne PMADDWD ; ofs=5C0h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000875 3758 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000877 504D4144445744 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2483 00000583 F9F406F4 <2> variant 1F5h, 116, ASM_MACH5 2484 00000587 FF <2> endvariant 2485 <2> mne PMULHW ; ofs=5C5h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 0000087E 8658 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000880 504D554C4857 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2486 00000588 F9F2F4 <2> variant 1E5h, 116, ASM_MACH5 2487 0000058B FF <2> endvariant 2488 <2> mne PMULLW ; ofs=5C9h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000886 C658 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000888 504D554C4C57 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2489 0000058C F9EAF4 <2> variant 1D5h, 116, ASM_MACH5 2490 0000058F FF <2> endvariant 2491 <2> mne POR ; ofs=5CDh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 0000088E 0359 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000890 504F52 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2492 00000590 F9F401F4 <2> variant 1EBh, 116, ASM_MACH5 2493 00000594 FF <2> endvariant 2494 <2> mne PSLLW ; ofs=5D2h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000893 5559 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000895 50534C4C57 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2495 00000595 F9F404F4 <2> variant 1F1h, 116, ASM_MACH5 2496 00000599 F9F45776 <2> variant AGRP(10,6), 118, ASM_MACH5 2497 0000059D FF <2> endvariant 2498 <2> mne PSLLD ; ofs=5DBh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 0000089A E559 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 0000089C 50534C4C44 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2499 0000059E F9F40574 <2> variant 1F2h, 116, ASM_MACH5 2500 000005A2 F9F45B76 <2> variant AGRP(11,6), 118, ASM_MACH5 2501 000005A6 FF <2> endvariant 2502 <2> mne PSLLQ ; ofs=5E4h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000008A1 755A <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000008A3 50534C4C51 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2503 000005A7 F9F405F4 <2> variant 1F3h, 116, ASM_MACH5 2504 000005AB F9F45F76 <2> variant AGRP(12,6), 118, ASM_MACH5 2505 000005AF FF <2> endvariant 2506 <2> mne PSRAW ; ofs=5EDh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000008A8 055B <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000008AA 5053524157 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2507 000005B0 F9F0F4 <2> variant 1E1h, 116, ASM_MACH5 2508 000005B3 F9F45676 <2> variant AGRP(10,4), 118, ASM_MACH5 2509 000005B7 FF <2> endvariant 2510 <2> mne PSRAD ; ofs=5F5h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000008AF 855B <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000008B1 5053524144 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2511 000005B8 F9F174 <2> variant 1E2h, 116, ASM_MACH5 2512 000005BB F9F45A76 <2> variant AGRP(11,4), 118, ASM_MACH5 2513 000005BF FF <2> endvariant 2514 <2> mne PSRLW ; ofs=5FDh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000008B6 055C <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000008B8 5053524C57 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2515 000005C0 F9E8F4 <2> variant 1D1h, 116, ASM_MACH5 2516 000005C3 F9F45576 <2> variant AGRP(10,2), 118, ASM_MACH5 2517 000005C7 FF <2> endvariant 2518 <2> mne PSRLD ; ofs=605h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000008BD 855C <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000008BF 5053524C44 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2519 000005C8 F9E974 <2> variant 1D2h, 116, ASM_MACH5 2520 000005CB F9F45976 <2> variant AGRP(11,2), 118, ASM_MACH5 2521 000005CF FF <2> endvariant 2522 <2> mne PSRLQ ; ofs=60Dh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000008C4 055D <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000008C6 5053524C51 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2523 000005D0 F9E9F4 <2> variant 1D3h, 116, ASM_MACH5 2524 000005D3 F9F45D76 <2> variant AGRP(12,2), 118, ASM_MACH5 2525 000005D7 FF <2> endvariant 2526 <2> mne PSUBB ; ofs=615h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000008CB 855D <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000008CD 5053554242 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2527 000005D8 F9F40874 <2> variant 1F8h, 116, ASM_MACH5 2528 000005DC FF <2> endvariant 2529 <2> mne PSUBW ; ofs=61Ah 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000008D2 D55D <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000008D4 5053554257 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2530 000005DD F9F408F4 <2> variant 1F9h, 116, ASM_MACH5 2531 000005E1 FF <2> endvariant 2532 <2> mne PSUBD ; ofs=61Fh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000008D9 255E <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000008DB 5053554244 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2533 000005E2 F9F40974 <2> variant 1FAh, 116, ASM_MACH5 2534 000005E6 FF <2> endvariant 2535 <2> mne PSUBSB ; ofs=624h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000008E0 765E <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000008E2 505355425342 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2536 000005E7 F9F40074 <2> variant 1E8h, 116, ASM_MACH5 2537 000005EB FF <2> endvariant 2538 <2> mne PSUBSW ; ofs=629h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000008E8 C65E <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000008EA 505355425357 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2539 000005EC F9F400F4 <2> variant 1E9h, 116, ASM_MACH5 2540 000005F0 FF <2> endvariant 2541 <2> mne PSUBUSB ; ofs=62Eh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000008F0 175F <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000008F2 50535542555342 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2542 000005F1 F9EC74 <2> variant 1D8h, 116, ASM_MACH5 2543 000005F4 FF <2> endvariant 2544 <2> mne PSUBUSW ; ofs=632h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000008F9 575F <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000008FB 50535542555357 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2545 000005F5 F9ECF4 <2> variant 1D9h, 116, ASM_MACH5 2546 000005F8 FF <2> endvariant 2547 <2> mne PUNPCKHBW ; ofs=636h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000902 995F <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000904 50554E50434B484257 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2548 000005F9 F9B474 <2> variant 168h, 116, ASM_MACH5 2549 000005FC FF <2> endvariant 2550 <2> mne PUNPCKHWD ; ofs=63Ah 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 0000090D D95F <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 0000090F 50554E50434B485744 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2551 000005FD F9B4F4 <2> variant 169h, 116, ASM_MACH5 2552 00000600 FF <2> endvariant 2553 <2> mne PUNPCKHDQ ; ofs=63Eh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000918 1960 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 0000091A 50554E50434B484451 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2554 00000601 F9B574 <2> variant 16Ah, 116, ASM_MACH5 2555 00000604 FF <2> endvariant 2556 <2> mne PUNPCKLBW ; ofs=642h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000923 5960 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000925 50554E50434B4C4257 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2557 00000605 F9B074 <2> variant 160h, 116, ASM_MACH5 2558 00000608 FF <2> endvariant 2559 <2> mne PUNPCKLWD ; ofs=646h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 0000092E 9960 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000930 50554E50434B4C5744 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2560 00000609 F9B0F4 <2> variant 161h, 116, ASM_MACH5 2561 0000060C FF <2> endvariant 2562 <2> mne PUNPCKLDQ ; ofs=64Ah 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000939 D960 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 0000093B 50554E50434B4C4451 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2563 0000060D F9B174 <2> variant 162h, 116, ASM_MACH5 2564 00000610 FF <2> endvariant 2565 <2> mne PXOR ; ofs=64Eh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000944 1461 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000946 50584F52 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2566 00000611 F9F403F4 <2> variant 1EFh, 116, ASM_MACH5 2567 00000615 FF <2> endvariant 2568 <2> mne MOVSB ; ofs=653h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 0000094A 6561 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 0000094C 4D4F565342 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2569 00000616 5200 <2> variant 0A4h, 0 2570 00000618 FF <2> endvariant 2571 <2> mne MOVSX ; ofs=659h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000951 9561 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000953 4D4F565358 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2572 00000619 F7DF47 <2> variant 1BEh, 71, ASM_MACH3 2573 0000061C F7DFC8 <2> variant 1BFh, 72, ASM_MACH3 2574 0000061F FF <2> endvariant 2575 <2> mne MOVZX ; ofs=660h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000958 0562 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 0000095A 4D4F565A58 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2576 00000620 F7DB47 <2> variant 1B6h, 71, ASM_MACH3 2577 00000623 F7DBC8 <2> variant 1B7h, 72, ASM_MACH3 2578 00000626 FF <2> endvariant 2579 <2> mne MUL ; ofs=667h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 0000095F 7362 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000961 4D554C <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2580 00000627 F4460B <2> variant AGRP(6,4), 11 2581 0000062A FF <2> endvariant 2582 <2> mne NEG ; ofs=66Bh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000964 B362 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000966 4E4547 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2583 0000062B FBF4458D <2> variant AGRP(6,3), 13, ASM_LOCKABLE 2584 0000062F FF <2> endvariant 2585 <2> mne NOP ; ofs=670h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000969 0363 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 0000096B 4E4F50 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2586 00000630 4800 <2> variant 090h, 0 2587 00000632 FF <2> endvariant 2588 <2> mne NOT ; ofs=673h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 0000096E 3363 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000970 4E4F54 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2589 00000633 FBF4450D <2> variant AGRP(6,2), 13, ASM_LOCKABLE 2590 00000637 FF <2> endvariant 2591 <2> mne OR ; ofs=678h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000973 8263 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000975 4F52 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2592 00000638 FBF43085 <2> variant AGRP(1,1), 5, ASM_LOCKABLE 2593 0000063C 0601 <2> variant 00Ch, 1 2594 0000063E FBF43482 <2> variant AGRP(2,1), 2, ASM_LOCKABLE 2595 00000642 FB0407 <2> variant 008h, 7, ASM_LOCKABLE 2596 00000645 050A <2> variant 00Ah, 10 2597 00000647 FF <2> endvariant 2598 <2> mne ORG, ASM_SPECIAL ; ofs=688h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 00000648 FF <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000977 8364 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000979 4F5247 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2599 <2> mne OUT ; ofs=68Ah 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 0000097C 9364 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 0000097E 4F5554 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2600 00000649 734A <2> variant 0E6h, 74 2601 0000064B 774B <2> variant 0EEh, 75 2602 0000064D FF <2> endvariant 2603 <2> mne OUTSB ; ofs=68Fh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000981 E564 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000983 4F55545342 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2604 0000064E F53700 <2> variant 06Eh, 0, ASM_MACH1 2605 00000651 FF <2> endvariant 2606 <2> mne POP ; ofs=697h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000988 2365 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 0000098A 504F50 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2607 00000652 2C22 <2> variant 058h, 34 2608 00000654 F4604C <2> variant AGRP(13,0), 76 2609 00000657 0FE9 <2> variant 01Fh, 105 2610 00000659 03E7 <2> variant 007h, 103 2611 0000065B 0BE8 <2> variant 017h, 104 2612 0000065D F7D0EA <2> variant 1A1h, 106, ASM_MACH3 2613 00000660 F7D4EB <2> variant 1A9h, 107, ASM_MACH3 2614 00000663 FF <2> endvariant 2615 <2> mne PUSH ; ofs=6B0h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 0000098D 4466 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 0000098F 50555348 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2616 00000664 2820 <2> variant 050h, 32 2617 00000666 F43F3F <2> variant AGRP(4,6), 63 2618 00000669 F5354F <2> variant 06Ah, 79, ASM_MACH1 2619 0000066C F5344E <2> variant 068h, 78, ASM_MACH1 2620 0000066F 075D <2> variant 00Eh, 93 2621 00000671 0B5F <2> variant 016h, 95 2622 00000673 0F61 <2> variant 01Eh, 97 2623 00000675 035B <2> variant 006h, 91 2624 00000677 F7D063 <2> variant 1A0h, 99, ASM_MACH3 2625 0000067A F7D465 <2> variant 1A8h, 101, ASM_MACH3 2626 0000067D FF <2> endvariant 2627 <2> mne RCL ; ofs=6D8h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000993 E367 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000995 52434C <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2628 0000067E F46550 <2> variant AGRP(14,2), 80 2629 00000681 F46951 <2> variant AGRP(15,2), 81 2630 00000684 F5F46D52 <2> variant AGRP(16,2), 82, ASM_MACH1 2631 00000688 FF <2> endvariant 2632 <2> mne RCR ; ofs=6E3h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000998 9368 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 0000099A 524352 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2633 00000689 F465D0 <2> variant AGRP(14,3), 80 2634 0000068C F469D1 <2> variant AGRP(15,3), 81 2635 0000068F F5F46DD2 <2> variant AGRP(16,3), 82, ASM_MACH1 2636 00000693 FF <2> endvariant 2637 <2> mne ROL ; ofs=6EEh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 0000099D 4369 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 0000099F 524F4C <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2638 00000694 F46450 <2> variant AGRP(14,0), 80 2639 00000697 F46851 <2> variant AGRP(15,0), 81 2640 0000069A F5F46C52 <2> variant AGRP(16,0), 82, ASM_MACH1 2641 0000069E FF <2> endvariant 2642 <2> mne ROR ; ofs=6F9h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000009A2 F369 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000009A4 524F52 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2643 0000069F F464D0 <2> variant AGRP(14,1), 80 2644 000006A2 F468D1 <2> variant AGRP(15,1), 81 2645 000006A5 F5F46CD2 <2> variant AGRP(16,1), 82, ASM_MACH1 2646 000006A9 FF <2> endvariant 2647 <2> mne RDMSR ; ofs=704h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000009A7 A56A <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000009A9 52444D5352 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2648 000006AA F99900 <2> variant 132h, 0, ASM_MACH5 2649 000006AD FF <2> endvariant 2650 <2> mne RDTSC ; ofs=708h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000009AE E56A <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000009B0 5244545343 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2651 000006AE F99880 <2> variant 131h, 0, ASM_MACH5 2652 000006B1 FF <2> endvariant 2653 <2> mne REP, ASM_SPECIAL, 0F3h ; ofs=70Ch 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 000006B2 FFF3 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000009B5 236B <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000009B7 524550 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2654 <2> mne REPZ, ASM_SPECIAL, 0F3h ; ofs=70Eh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 000006B4 FFF3 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000009BA 446B <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000009BC 5245505A <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2655 <2> mne REPNZ, ASM_SPECIAL, 0F2h ; ofs=710h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 000006B6 FFF2 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000009C0 656B <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000009C2 5245504E5A <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2656 <2> mne REPE, ASM_SPECIAL, 0F3h ; ofs=712h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 000006B8 FFF3 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000009C7 846B <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000009C9 52455045 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2657 <2> mne REPNE, ASM_SPECIAL, 0F2h ; ofs=714h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 000006BA FFF2 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000009CD A56B <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000009CF 5245504E45 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2658 <2> mne RSM ; ofs=725h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000009D4 C36B <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000009D6 52534D <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2659 000006BC F9D500 <2> variant 1AAh, 0, ASM_MACH5 2660 000006BF FF <2> endvariant 2661 <2> mne SAHF ; ofs=729h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000009D9 046C <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000009DB 53414846 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2662 000006C0 4F00 <2> variant 09Eh, 0 2663 000006C2 FF <2> endvariant 2664 <2> mne SAL ; ofs=72Ch 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000009DF 336C <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000009E1 53414C <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2665 000006C3 F46650 <2> variant AGRP(14,4), 80 2666 000006C6 F46A51 <2> variant AGRP(15,4), 81 2667 000006C9 F5F46E52 <2> variant AGRP(16,4), 82, ASM_MACH1 2668 000006CD FF <2> endvariant 2669 <2> mne SAR ; ofs=737h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000009E4 E36C <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000009E6 534152 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2670 000006CE F467D0 <2> variant AGRP(14,7), 80 2671 000006D1 F46BD1 <2> variant AGRP(15,7), 81 2672 000006D4 F5F46FD2 <2> variant AGRP(16,7), 82, ASM_MACH1 2673 000006D8 FF <2> endvariant 2674 <2> mne SEG ; ofs=742h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000009E9 936D <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000009EB 534547 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2675 000006D9 135C <2> variant 026h, 92 2676 000006DB 175E <2> variant 02Eh, 94 2677 000006DD 1B60 <2> variant 036h, 96 2678 000006DF 1F62 <2> variant 03Eh, 98 2679 000006E1 3264 <2> variant 064h, 100 2680 000006E3 32E6 <2> variant 065h, 102 2681 000006E5 FF <2> endvariant 2682 <2> mne ES, ASM_SPECIAL, 026h ; ofs=74Fh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 000006E6 FF26 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000009EE 626E <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000009F0 4553 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2683 <2> mne CS, ASM_SPECIAL, 02Eh ; ofs=751h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 000006E8 FF2E <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000009F2 826E <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000009F4 4353 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2684 <2> mne SS, ASM_SPECIAL, 036h ; ofs=753h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 000006EA FF36 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000009F6 A26E <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000009F8 5353 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2685 <2> mne DS, ASM_SPECIAL, 03Eh ; ofs=755h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 000006EC FF3E <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000009FA C26E <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 000009FC 4453 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2686 <2> mne FS, ASM_SPECIAL, 064h ; ofs=757h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 000006EE FF64 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 000009FE E26E <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000A00 4653 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2687 <2> mne GS, ASM_SPECIAL, 065h ; ofs=759h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 000006F0 FF65 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000A02 026F <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000A04 4753 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2688 <2> mne SHL ; ofs=75Bh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000A06 236F <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000A08 53484C <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2689 000006F2 F46650 <2> variant AGRP(14,4), 80 2690 000006F5 F46A51 <2> variant AGRP(15,4), 81 2691 000006F8 F5F46E52 <2> variant AGRP(16,4), 82, ASM_MACH1 2692 000006FC FF <2> endvariant 2693 <2> mne SHR ; ofs=766h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000A0B D36F <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000A0D 534852 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2694 000006FD F466D0 <2> variant AGRP(14,5), 80 2695 00000700 F46AD1 <2> variant AGRP(15,5), 81 2696 00000703 F5F46ED2 <2> variant AGRP(16,5), 82, ASM_MACH1 2697 00000707 FF <2> endvariant 2698 <2> mne SBB ; ofs=771h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000A10 8370 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000A12 534242 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2699 00000708 FBF43185 <2> variant AGRP(1,3), 5, ASM_LOCKABLE 2700 0000070C 0E01 <2> variant 01Ch, 1 2701 0000070E FBF43582 <2> variant AGRP(2,3), 2, ASM_LOCKABLE 2702 00000712 FB0C07 <2> variant 018h, 7, ASM_LOCKABLE 2703 00000715 0D0A <2> variant 01Ah, 10 2704 00000717 FF <2> endvariant 2705 <2> mne SCASB ; ofs=781h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000A15 8571 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000A17 5343415342 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2706 00000718 5700 <2> variant 0AEh, 0 2707 0000071A FF <2> endvariant 2708 <2> mne SETA ; ofs=787h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000A1C B471 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000A1E 53455441 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2709 0000071B F7CBD6 <2> variant 197h, 86, ASM_MACH3 2710 0000071E FF <2> endvariant 2711 <2> mne SETAE ; ofs=78Bh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000A22 F571 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000A24 5345544145 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2712 0000071F F7C9D6 <2> variant 193h, 86, ASM_MACH3 2713 00000722 FF <2> endvariant 2714 <2> mne SETB ; ofs=78Fh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000A29 3472 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000A2B 53455442 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2715 00000723 F7C956 <2> variant 192h, 86, ASM_MACH3 2716 00000726 FF <2> endvariant 2717 <2> mne SETBE ; ofs=793h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000A2F 7572 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000A31 5345544245 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2718 00000727 F7CB56 <2> variant 196h, 86, ASM_MACH3 2719 0000072A FF <2> endvariant 2720 <2> mne SETC ; ofs=797h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000A36 B472 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000A38 53455443 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2721 0000072B F7C956 <2> variant 192h, 86, ASM_MACH3 2722 0000072E FF <2> endvariant 2723 <2> mne SETE ; ofs=79Bh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000A3C F472 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000A3E 53455445 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2724 0000072F F7CA56 <2> variant 194h, 86, ASM_MACH3 2725 00000732 FF <2> endvariant 2726 <2> mne SETG ; ofs=79Fh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000A42 3473 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000A44 53455447 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2727 00000733 F7CFD6 <2> variant 19Fh, 86, ASM_MACH3 2728 00000736 FF <2> endvariant 2729 <2> mne SETGE ; ofs=7A3h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000A48 7573 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000A4A 5345544745 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2730 00000737 F7CED6 <2> variant 19Dh, 86, ASM_MACH3 2731 0000073A FF <2> endvariant 2732 <2> mne SETL ; ofs=7A7h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000A4F B473 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000A51 5345544C <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2733 0000073B F7CE56 <2> variant 19Ch, 86, ASM_MACH3 2734 0000073E FF <2> endvariant 2735 <2> mne SETLE ; ofs=7ABh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000A55 F573 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000A57 5345544C45 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2736 0000073F F7CF56 <2> variant 19Eh, 86, ASM_MACH3 2737 00000742 FF <2> endvariant 2738 <2> mne SETNA ; ofs=7AFh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000A5C 3574 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000A5E 5345544E41 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2739 00000743 F7CB56 <2> variant 196h, 86, ASM_MACH3 2740 00000746 FF <2> endvariant 2741 <2> mne SETNAE ; ofs=7B3h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000A63 7674 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000A65 5345544E4145 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2742 00000747 F7C956 <2> variant 192h, 86, ASM_MACH3 2743 0000074A FF <2> endvariant 2744 <2> mne SETNB ; ofs=7B7h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000A6B B574 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000A6D 5345544E42 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2745 0000074B F7C9D6 <2> variant 193h, 86, ASM_MACH3 2746 0000074E FF <2> endvariant 2747 <2> mne SETNBE ; ofs=7BBh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000A72 F674 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000A74 5345544E4245 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2748 0000074F F7CBD6 <2> variant 197h, 86, ASM_MACH3 2749 00000752 FF <2> endvariant 2750 <2> mne SETNC ; ofs=7BFh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000A7A 3575 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000A7C 5345544E43 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2751 00000753 F7C9D6 <2> variant 193h, 86, ASM_MACH3 2752 00000756 FF <2> endvariant 2753 <2> mne SETNE ; ofs=7C3h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000A81 7575 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000A83 5345544E45 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2754 00000757 F7CAD6 <2> variant 195h, 86, ASM_MACH3 2755 0000075A FF <2> endvariant 2756 <2> mne SETNG ; ofs=7C7h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000A88 B575 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000A8A 5345544E47 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2757 0000075B F7CF56 <2> variant 19Eh, 86, ASM_MACH3 2758 0000075E FF <2> endvariant 2759 <2> mne SETNGE ; ofs=7CBh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000A8F F675 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000A91 5345544E4745 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2760 0000075F F7CE56 <2> variant 19Ch, 86, ASM_MACH3 2761 00000762 FF <2> endvariant 2762 <2> mne SETNL ; ofs=7CFh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000A97 3576 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000A99 5345544E4C <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2763 00000763 F7CED6 <2> variant 19Dh, 86, ASM_MACH3 2764 00000766 FF <2> endvariant 2765 <2> mne SETNLE ; ofs=7D3h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000A9E 7676 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000AA0 5345544E4C45 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2766 00000767 F7CFD6 <2> variant 19Fh, 86, ASM_MACH3 2767 0000076A FF <2> endvariant 2768 <2> mne SETNO ; ofs=7D7h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000AA6 B576 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000AA8 5345544E4F <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2769 0000076B F7C8D6 <2> variant 191h, 86, ASM_MACH3 2770 0000076E FF <2> endvariant 2771 <2> mne SETNP ; ofs=7DBh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000AAD F576 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000AAF 5345544E50 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2772 0000076F F7CDD6 <2> variant 19Bh, 86, ASM_MACH3 2773 00000772 FF <2> endvariant 2774 <2> mne SETNS ; ofs=7DFh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000AB4 3577 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000AB6 5345544E53 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2775 00000773 F7CCD6 <2> variant 199h, 86, ASM_MACH3 2776 00000776 FF <2> endvariant 2777 <2> mne SETNZ ; ofs=7E3h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000ABB 7577 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000ABD 5345544E5A <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2778 00000777 F7CAD6 <2> variant 195h, 86, ASM_MACH3 2779 0000077A FF <2> endvariant 2780 <2> mne SETO ; ofs=7E7h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000AC2 B477 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000AC4 5345544F <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2781 0000077B F7C856 <2> variant 190h, 86, ASM_MACH3 2782 0000077E FF <2> endvariant 2783 <2> mne SETP ; ofs=7EBh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000AC8 F477 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000ACA 53455450 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2784 0000077F F7CD56 <2> variant 19Ah, 86, ASM_MACH3 2785 00000782 FF <2> endvariant 2786 <2> mne SETPE ; ofs=7EFh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000ACE 3578 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000AD0 5345545045 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2787 00000783 F7CD56 <2> variant 19Ah, 86, ASM_MACH3 2788 00000786 FF <2> endvariant 2789 <2> mne SETPO ; ofs=7F3h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000AD5 7578 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000AD7 534554504F <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2790 00000787 F7CDD6 <2> variant 19Bh, 86, ASM_MACH3 2791 0000078A FF <2> endvariant 2792 <2> mne SETS ; ofs=7F7h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000ADC B478 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000ADE 53455453 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2793 0000078B F7CC56 <2> variant 198h, 86, ASM_MACH3 2794 0000078E FF <2> endvariant 2795 <2> mne SETZ ; ofs=7FBh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000AE2 F478 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000AE4 5345545A <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2796 0000078F F7CA56 <2> variant 194h, 86, ASM_MACH3 2797 00000792 FF <2> endvariant 2798 <2> mne SGDT ; ofs=7FFh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000AE8 3479 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000AEA 53474454 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2799 00000793 F6F44835 <2> variant AGRP(7,0), 53, ASM_MACH2 2800 00000797 FF <2> endvariant 2801 <2> mne SIDT ; ofs=804h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000AEE 8479 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000AF0 53494454 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2802 00000798 F6F448B5 <2> variant AGRP(7,1), 53, ASM_MACH2 2803 0000079C FF <2> endvariant 2804 <2> mne SHLD ; ofs=809h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000AF4 D479 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000AF6 53484C44 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2805 0000079D F7D257 <2> variant 1A4h, 87, ASM_MACH3 2806 000007A0 F7D2D8 <2> variant 1A5h, 88, ASM_MACH3 2807 000007A3 FF <2> endvariant 2808 <2> mne SHRD ; ofs=810h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000AFA 447A <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000AFC 53485244 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2809 000007A4 F7D657 <2> variant 1ACh, 87, ASM_MACH3 2810 000007A7 F7D6D8 <2> variant 1ADh, 88, ASM_MACH3 2811 000007AA FF <2> endvariant 2812 <2> mne SLDT ; ofs=817h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000B00 B47A <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000B02 534C4454 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2813 000007AB F6F44C4D <2> variant AGRP(8,0), 77, ASM_MACH2 2814 000007AF FF <2> endvariant 2815 <2> mne SMSW ; ofs=81Ch 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000B06 047B <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000B08 534D5357 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2816 000007B0 F6F44A4D <2> variant AGRP(7,4), 77, ASM_MACH2 2817 000007B4 FF <2> endvariant 2818 <2> mne STC ; ofs=821h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000B0C 537B <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000B0E 535443 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2819 000007B5 7C80 <2> variant 0F9h, 0 2820 000007B7 FF <2> endvariant 2821 <2> mne STD ; ofs=824h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000B11 837B <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000B13 535444 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2822 000007B8 7E80 <2> variant 0FDh, 0 2823 000007BA FF <2> endvariant 2824 <2> mne STI ; ofs=827h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000B16 B37B <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000B18 535449 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2825 000007BB 7D80 <2> variant 0FBh, 0 2826 000007BD FF <2> endvariant 2827 <2> mne STOSB ; ofs=82Ah 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000B1B E57B <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000B1D 53544F5342 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2828 000007BE 5500 <2> variant 0AAh, 0 2829 000007C0 FF <2> endvariant 2830 <2> mne STR ; ofs=830h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000B22 137C <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000B24 535452 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2831 000007C1 F6F44CC0 <2> variant AGRP(8,1), 64, ASM_MACH2 2832 000007C5 FF <2> endvariant 2833 <2> mne SUB ; ofs=835h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000B27 637C <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000B29 535542 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2834 000007C6 FBF43285 <2> variant AGRP(1,5), 5, ASM_LOCKABLE 2835 000007CA 1601 <2> variant 02Ch, 1 2836 000007CC FBF43682 <2> variant AGRP(2,5), 2, ASM_LOCKABLE 2837 000007D0 FB1407 <2> variant 028h, 7, ASM_LOCKABLE 2838 000007D3 150A <2> variant 02Ah, 10 2839 000007D5 FF <2> endvariant 2840 <2> mne SALC ; ofs=845h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000B2C 647D <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000B2E 53414C43 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2841 000007D6 F66B00 <2> variant 0D6h, 0, ASM_MACH2 2842 000007D9 FF <2> endvariant 2843 <2> mne SETALC ; ofs=849h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000B32 A67D <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000B34 534554414C43 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2844 000007DA F66B00 <2> variant 0D6h, 0, ASM_MACH2 2845 000007DD FF <2> endvariant 2846 <2> mne TEST ; ofs=84Dh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000B3A E47D <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000B3C 54455354 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2847 000007DE 5401 <2> variant 0A8h, 1 2848 000007E0 F44403 <2> variant AGRP(6,0), 3 2849 000007E3 4208 <2> variant 084h, 8 2850 000007E5 420A <2> variant 084h, 10 2851 000007E7 FF <2> endvariant 2852 <2> mne UD0 ; ofs=857h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000B40 837E <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000B42 554430 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2853 000007E8 F5F40B80 <2> variant 1FFh, 0, ASM_MACH1 2854 000007EC FF <2> endvariant 2855 <2> mne UD1 ; ofs=85Ch 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000B45 D37E <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000B47 554431 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2856 000007ED F5DC80 <2> variant 1B9h, 0, ASM_MACH1 2857 000007F0 FF <2> endvariant 2858 <2> mne UD2 ; ofs=860h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000B4A 137F <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000B4C 554432 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2859 000007F1 F58580 <2> variant 10Bh, 0, ASM_MACH1 2860 000007F4 FF <2> endvariant 2861 <2> mne VERR ; ofs=864h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000B4F 547F <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000B51 56455252 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2862 000007F5 F6F44E49 <2> variant AGRP(8,4), 73, ASM_MACH2 2863 000007F9 FF <2> endvariant 2864 <2> mne VERW ; ofs=869h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000B55 A47F <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000B57 56455257 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2865 000007FA F6F44EC9 <2> variant AGRP(8,5), 73, ASM_MACH2 2866 000007FE FF <2> endvariant 2867 <2> mne WAIT ; ofs=86Eh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000B5B F47F <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000B5D 57414954 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2868 000007FF 4D80 <2> variant 09Bh, 0 2869 00000801 FF <2> endvariant 2870 <2> mne WBINVD ; ofs=871h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000B61 2680 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000B63 5742494E5644 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2871 00000802 F88480 <2> variant 109h, 0, ASM_MACH4 2872 00000805 FF <2> endvariant 2873 <2> mne WRMSR ; ofs=875h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000B69 6580 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000B6B 57524D5352 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2874 00000806 F99800 <2> variant 130h, 0, ASM_MACH5 2875 00000809 FF <2> endvariant 2876 <2> mne XADD ; ofs=879h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000B70 A480 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000B72 58414444 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2877 0000080A FBF8E007 <2> variant 1C0h, 7, ASM_LOCKABLE, ASM_MACH4 2878 0000080E FF <2> endvariant 2879 <2> mne XCHG ; ofs=87Eh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000B76 F480 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000B78 58434847 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2880 0000080F 4859 <2> variant 090h, 89 2881 00000811 485A <2> variant 090h, 90 2882 00000813 FB4307 <2> variant 086h, 7, ASM_LOCKABLE 2883 00000816 FB430C <2> variant 086h, 12, ASM_LOCKABLE 2884 00000819 FF <2> endvariant 2885 <2> mne XLAT ; ofs=889h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000B7C A481 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000B7E 584C4154 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2886 0000081A 6B80 <2> variant 0D7h, 0 2887 0000081C FF <2> endvariant 2888 <2> mne XLATB ; ofs=88Ch 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000B82 D581 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000B84 584C415442 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2889 0000081D 6B80 <2> variant 0D7h, 0 2890 0000081F FF <2> endvariant 2891 <2> mne XOR ; ofs=88Fh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000B89 0382 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000B8B 584F52 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2892 00000820 FBF43305 <2> variant AGRP(1,6), 5, ASM_LOCKABLE 2893 00000824 1A01 <2> variant 034h, 1 2894 00000826 FBF43702 <2> variant AGRP(2,6), 2, ASM_LOCKABLE 2895 0000082A FB1807 <2> variant 030h, 7, ASM_LOCKABLE 2896 0000082D 190A <2> variant 032h, 10 2897 0000082F FF <2> endvariant 2898 <2> 2899 <2> ; The following mnemonics allow an address size suffix 2900 <2> ; but do not require it. 2901 <2> 2902 <2> mnlist_a_suffix_allowed label near 2903 <2> mnsuffix _ASA 2904 <2> 2905 <2> mne LOOP ; ofs=50Eh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000B8E 0483 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000B90 4C4F4F50 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2906 00000830 713E <2> variant 0E2h, 62 2907 00000832 FF <2> endvariant 2908 <2> mne LOOPZ ; ofs=511h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000B94 3583 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000B96 4C4F4F505A <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2909 00000833 70BE <2> variant 0E1h, 62 2910 00000835 FF <2> endvariant 2911 <2> mne LOOPE ; ofs=514h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000B9B 6583 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000B9D 4C4F4F5045 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2912 00000836 70BE <2> variant 0E1h, 62 2913 00000838 FF <2> endvariant 2914 <2> mne LOOPNZ ; ofs=517h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000BA2 9683 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000BA4 4C4F4F504E5A <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2915 00000839 703E <2> variant 0E0h, 62 2916 0000083B FF <2> endvariant 2917 <2> mne LOOPNE ; ofs=51Ah 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000BAA C683 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000BAC 4C4F4F504E45 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2918 0000083C 703E <2> variant 0E0h, 62 2919 0000083E FF <2> endvariant 2920 <2> 2921 <2> ; The following mnemonics allow an operand size suffix 2922 <2> ; but do not require it. 2923 <2> 2924 <2> mnlist_o_suffix_allowed label near 2925 <2> mnsuffix _OSA 2926 <2> 2927 <2> mne ENTER ; ofs=15Eh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000BB2 F583 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000BB4 454E544552 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2928 0000083F F56423 <2> variant 0C8h, 35, ASM_MACH1 2929 00000842 FF <2> endvariant 2930 <2> mne FLDENV ; ofs=2B9h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000BB9 3684 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000BBB 464C44454E56 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2931 00000843 F41CB3 <2> variant 221h, 51 2932 00000846 FF <2> endvariant 2933 <2> mne FRSTOR ; ofs=2F1h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000BC1 7684 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000BC3 465253544F52 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2934 00000847 F41EB3 <2> variant 225h, 51 2935 0000084A FF <2> endvariant 2936 <2> mne FSAVE, ASM_WAIT ; ofs=2F5h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 0000084B FE <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000BC9 B584 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000BCB 4653415645 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2937 <2> mne FNSAVE ; ofs=2F6h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000BD0 C684 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000BD2 464E53415645 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2938 0000084C F426B5 <2> variant 235h, 53 2939 0000084F FF <2> endvariant 2940 <2> mne FSTENV, ASM_WAIT ; ofs=32Eh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 00000850 FE <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000BD8 0685 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000BDA 465354454E56 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2941 <2> mne FNSTENV ; ofs=32Fh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000BE0 1785 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000BE2 464E5354454E56 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2942 00000851 F424B5 <2> variant 231h, 53 2943 00000854 FF <2> endvariant 2944 <2> mne IRET ; ofs=409h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000BE9 5485 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000BEB 49524554 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2945 00000855 67FF <2> variant 0CFh, 127 2946 00000857 FF <2> endvariant 2947 <2> mne LEAVE ; ofs=4EEh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000BEF 8585 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000BF1 4C45415645 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2948 00000858 F564FF <2> variant 0C9h, 127, ASM_MACH1 2949 0000085B FF <2> endvariant 2950 <2> mne POPA ; ofs=6A9h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000BF6 C485 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000BF8 504F5041 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2951 0000085C F530FF <2> variant 061h, 127, ASM_MACH1 2952 0000085F FF <2> endvariant 2953 <2> mne POPF ; ofs=6ADh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000BFC 0486 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000BFE 504F5046 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2954 00000860 4EFD <2> variant 09Dh, 125 2955 00000862 FF <2> endvariant 2956 <2> mne PUSH ; ofs=6CAh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000C02 3486 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000C04 50555348 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2957 00000863 F5354F <2> variant 06Ah, 79, ASM_MACH1 2958 00000866 F5344E <2> variant 068h, 78, ASM_MACH1 2959 00000869 FF <2> endvariant 2960 <2> mne PUSHA ; ofs=6D1h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000C08 A586 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000C0A 5055534841 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2961 0000086A F5307F <2> variant 060h, 127, ASM_MACH1 2962 0000086D FF <2> endvariant 2963 <2> mne PUSHF ; ofs=6D5h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000C0F E586 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000C11 5055534846 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2964 0000086E 4E7E <2> variant 09Ch, 126 2965 00000870 FF <2> endvariant 2966 <2> mne RETN ; ofs=716h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000C16 1487 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000C18 5245544E <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2967 00000871 61FD <2> variant 0C3h, 125 2968 00000873 6153 <2> variant 0C2h, 83 2969 00000875 FF <2> endvariant 2970 <2> mne RET ; ofs=71Bh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000C1C 6387 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000C1E 524554 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2971 00000876 61FD <2> variant 0C3h, 125 2972 00000878 6153 <2> variant 0C2h, 83 2973 0000087A FF <2> endvariant 2974 <2> mne RETF ; ofs=720h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000C21 B487 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000C23 52455446 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2975 0000087B 65FF <2> variant 0CBh, 127 2976 0000087D 6555 <2> variant 0CAh, 85 2977 0000087F FF <2> endvariant 2978 <2> 2979 <2> ; The following mnemonics require an operand size suffix. 2980 <2> 2981 <2> mnlist_o_suffix_required label near 2982 <2> mnsuffix _OSR 2983 <2> 2984 <2> mne CMPS ; ofs=12Dh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000C27 0488 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000C29 434D5053 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2985 00000880 5380 <2> variant 0A7h, 0 2986 00000882 FF <2> endvariant 2987 <2> mne INS ; ofs=3E2h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000C2D 3388 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000C2F 494E53 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2988 00000883 F53680 <2> variant 06Dh, 0, ASM_MACH1 2989 00000886 FF <2> endvariant 2990 <2> mne LODS ; ofs=50Bh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000C32 7488 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000C34 4C4F4453 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2991 00000887 5680 <2> variant 0ADh, 0 2992 00000889 FF <2> endvariant 2993 <2> mne MOVS ; ofs=656h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000C38 A488 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000C3A 4D4F5653 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2994 0000088A 5280 <2> variant 0A5h, 0 2995 0000088C FF <2> endvariant 2996 <2> mne OUTS ; ofs=693h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000C3E D488 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000C40 4F555453 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 2997 0000088D F53780 <2> variant 06Fh, 0, ASM_MACH1 2998 00000890 FF <2> endvariant 2999 <2> mne SCAS ; ofs=784h 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000C44 1489 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000C46 53434153 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 3000 00000891 5780 <2> variant 0AFh, 0 3001 00000893 FF <2> endvariant 3002 <2> mne STOS ; ofs=82Dh 1137 <3> %push 1138 <3> usesection ASMTABLE2, 1 1139 <3> %assign %$currofs $ - asmtab 1140 <3> %ifnempty %2 1141 <3> db %2 1142 <3> %endif 1143 <3> __SECT__ 1144 <3> %defstr %$string %1 1145 <3> %strlen %$string_size %$string 1146 <3> %if %$string_size > 15 1147 <3> %error Mnemonic %1 is too long! 1148 <3> %endif 1149 00000C4A 4489 <3> dw (%$currofs)<<4|%$string_size 1150 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1151 00000C4C 53544F53 <3> db %$string 1152 <3> %pop 1153 <3> %define MNCURRENT %1%[MNSUFFIX] 3003 00000894 5580 <2> variant 0ABh, 0 3004 00000896 FF <2> endvariant 3005 <2> 3006 <2> end_mnlist label near 3007 <2> 3008 <2> ;--- Disassembler: compressed table of the opcode types. 3009 <2> ;--- If the item has the format OT(xx), it refers to table 'oplists'. 3010 <2> ;--- Otherwise it's an offset for internal table 'disjmp'. 3011 <2> 3012 <2> align 8, db 0 3013 <2> optypes label byte 3014 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) 3015 00000C58 131316160D0D6902 <2> db OT(07),OT(07),OT(0A),OT(0A),OT(01),OT(01),OT(5D), 002h ; 08 - 0F 3016 00000C60 131316160D0D6B74 <2> db OT(07),OT(07),OT(0A),OT(0A),OT(01),OT(01),OT(5F),OT(68) ; 10 - 17 3017 00000C68 131316160D0D6D75 <2> db OT(07),OT(07),OT(0A),OT(0A),OT(01),OT(01),OT(61),OT(69) ; 18 - 1F 3018 00000C70 131316160D0D0A0C <2> db OT(07),OT(07),OT(0A),OT(0A),OT(01),OT(01), 00Ah,OT(00) ; 20 - 27 3019 00000C78 131316160D0D0A0C <2> db OT(07),OT(07),OT(0A),OT(0A),OT(01),OT(01), 00Ah,OT(00) ; 28 - 2F 3020 00000C80 131316160D0D0A0C <2> db OT(07),OT(07),OT(0A),OT(0A),OT(01),OT(01), 00Ah,OT(00) ; 30 - 37 3021 00000C88 141416160D0D0A0C <2> db OT(08),OT(08),OT(0A),OT(0A),OT(01),OT(01), 00Ah,OT(00) ; 38 - 3F 3022 00000C90 2D2D2D2D2D2D2D2D <2> db OT(21),OT(21),OT(21),OT(21),OT(21),OT(21),OT(21),OT(21) ; 40 - 47 3023 00000C98 2D2D2D2D2D2D2D2D <2> db OT(21),OT(21),OT(21),OT(21),OT(21),OT(21),OT(21),OT(21) ; 48 - 4F 3024 00000CA0 2C2C2C2C2C2C2C2C <2> db OT(20),OT(20),OT(20),OT(20),OT(20),OT(20),OT(20),OT(20) ; 50 - 57 3025 00000CA8 2E2E2E2E2E2E2E2E <2> db OT(22),OT(22),OT(22),OT(22),OT(22),OT(22),OT(22),OT(22) ; 58 - 5F 3026 00000CB0 8B8B861A0A0A0A0A <2> db OT(7F),OT(7F),OT(7A),OT(0E), 00Ah, 00Ah, 00Ah, 00Ah ; 60 - 67 3027 00000CB8 5A455B430C0C0C0C <2> db OT(4E),OT(39),OT(4F),OT(37),OT(00),OT(00),OT(00),OT(00) ; 68 - 6F 3028 00000CC0 4A4A4A4A4A4A4A4A <2> db OT(3E),OT(3E),OT(3E),OT(3E),OT(3E),OT(3E),OT(3E),OT(3E) ; 70 - 77 3029 00000CC8 4A4A4A4A4A4A4A4A <2> db OT(3E),OT(3E),OT(3E),OT(3E),OT(3E),OT(3E),OT(3E),OT(3E) ; 78 - 7F 3030 00000CD0 0404040414141818 <2> db 004h, 004h, 004h, 004h,OT(08),OT(08),OT(0C),OT(0C) ; 80 - 87 3031 00000CD8 151516164D834E04 <2> db OT(09),OT(09),OT(0A),OT(0A),OT(41),OT(77),OT(42), 004h ; 88 - 8F 3032 00000CE0 0C65656565656565 <2> db OT(00),OT(59),OT(59),OT(59),OT(59),OT(59),OT(59),OT(59) ; 90 - 97 3033 00000CE8 0C0C250C8A890C0C <2> db OT(00),OT(00),OT(19),OT(00),OT(7E),OT(7D),OT(00),OT(00) ; 98 - 9F 3034 00000CF0 4F4F50500C0C0C0C <2> db OT(43),OT(43),OT(44),OT(44),OT(00),OT(00),OT(00),OT(00) ; A0 - A7 3035 00000CF8 0D0D0C0C0C0C0C0C <2> db OT(01),OT(01),OT(00),OT(00),OT(00),OT(00),OT(00),OT(00) ; A8 - AF 3036 00000D00 5151515151515151 <2> db OT(45),OT(45),OT(45),OT(45),OT(45),OT(45),OT(45),OT(45) ; B0 - B7 3037 00000D08 5252525252525252 <2> db OT(46),OT(46),OT(46),OT(46),OT(46),OT(46),OT(46),OT(46) ; B8 - BF 3038 00000D10 04045F891B1B0404 <2> db 004h, 004h,OT(53),OT(7D),OT(0F),OT(0F), 004h, 004h ; C0 - C7 3039 00000D18 2F8B618B8B878B8B <2> db OT(23),OT(7F),OT(55),OT(7F),OT(7F),OT(7B),OT(7F),OT(7F) ; C8 - CF 3040 00000D20 0404040421210C0C <2> db 004h, 004h, 004h, 004h,OT(15),OT(15),OT(00),OT(00) ; D0 - D7 3041 00000D28 0606060606060606 <2> db 006h, 006h, 006h, 006h, 006h, 006h, 006h, 006h ; D8 - DF 3042 00000D30 4A4A4A4A47475656 <2> db OT(3E),OT(3E),OT(3E),OT(3E),OT(3B),OT(3B),OT(4A),OT(4A) ; E0 - E7 3043 00000D38 2324264A48485757 <2> db OT(17),OT(18),OT(1A),OT(3E),OT(3C),OT(3C),OT(4B),OT(4B) ; E8 - EF 3044 00000D40 0A8B0A0A0C0C0404 <2> db 00Ah,OT(7F), 00Ah, 00Ah,OT(00),OT(00), 004h, 004h ; F0 - F7 3045 00000D48 0C0C0C0C0C0C0404 <2> db OT(00),OT(00),OT(00),OT(00),OT(00),OT(00), 004h, 004h ; F8 - FF 3046 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) 3047 00000D58 1111111111111112 <2> db OT(05),OT(05),OT(05),OT(05),OT(05),OT(05),OT(05),OT(06) ; 108 - 10F 3048 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) 3049 00000D68 5D5D5D5D5D5D5D5D <2> db OT(51),OT(51),OT(51),OT(51),OT(51),OT(51),OT(51),OT(51) ; 118 - 11F 3050 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) 3051 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) 3052 00000D80 1919842785284B00 <2> db OT(0D),OT(0D),OT(78),OT(1B),OT(79),OT(1C),OT(3F), 000h ; 130 - 137 (Intel group 5) 3053 00000D88 594C555555550000 <2> db OT(4D),OT(40),OT(49),OT(49),OT(49),OT(49), 000h, 000h ; 138 - 13F (Intel group 6) 3054 00000D90 41413F3F59005540 <2> db OT(35),OT(35),OT(33),OT(33),OT(4D), 000h,OT(49),OT(34) ; 140 - 147 (Intel group 7) 3055 00000D98 3030303030303030 <2> db OT(24),OT(24),OT(24),OT(24),OT(24),OT(24),OT(24),OT(24) ; 148 - 14F (Coprocessor d8) 3056 00000DA0 34343E3E34343434 <2> db OT(28),OT(28),OT(32),OT(32),OT(28),OT(28),OT(28),OT(28) ; 150 - 157 3057 00000DA8 300031313F3A413B <2> db OT(24), 000h,OT(25),OT(25),OT(33),OT(2E),OT(35),OT(2F) ; 158 - 15F (Coprocessor d9) 3058 00000DB0 353E080008080808 <2> db OT(29),OT(32), 008h, 000h, 008h, 008h, 008h, 008h ; 160 - 167 3059 00000DB8 3838383838383838 <2> db OT(2C),OT(2C),OT(2C),OT(2C),OT(2C),OT(2C),OT(2C),OT(2C) ; 168 - 16F (Coprocessor da) 3060 00000DC0 3434343400080000 <2> db OT(28),OT(28),OT(28),OT(28), 000h, 008h, 000h, 000h ; 170 - 177 3061 00000DC8 38003939003C003D <2> db OT(2C), 000h,OT(2D),OT(2D), 000h,OT(30), 000h,OT(31) ; 178 - 17F (Coprocessor db) 3062 00000DD0 34343434083E3E00 <2> db OT(28),OT(28),OT(28),OT(28), 008h,OT(32),OT(32), 000h ; 180 - 187 3063 00000DD8 3232323232323232 <2> db OT(26),OT(26),OT(26),OT(26),OT(26),OT(26),OT(26),OT(26) ; 188 - 18F (Coprocessor dc) 3064 00000DE0 3737000037373737 <2> db OT(2B),OT(2B), 000h, 000h,OT(2B),OT(2B),OT(2B),OT(2B) ; 190 - 197 3065 00000DE8 320033333F00413B <2> db OT(26), 000h,OT(27),OT(27),OT(33), 000h,OT(35),OT(2F) ; 198 - 19F (Coprocessor dd) 3066 00000DF0 350035353E3E0000 <2> db OT(29), 000h,OT(29),OT(29),OT(32),OT(32), 000h, 000h ; 1A0 - 1A7 3067 00000DF8 3A3A3A3A3A3A3A3A <2> db OT(2E),OT(2E),OT(2E),OT(2E),OT(2E),OT(2E),OT(2E),OT(2E) ; 1A8 - 1AF (Coprocessor de) 3068 00000E00 3636000836363636 <2> db OT(2A),OT(2A), 000h, 008h,OT(2A),OT(2A),OT(2A),OT(2A) ; 1B0 - 1B7 3069 00000E08 3A003B3B3C2A3D2B <2> db OT(2E), 000h,OT(2F),OT(2F),OT(30),OT(1E),OT(31),OT(1F) ; 1B8 - 1BF (Coprocessor df) 3070 00000E10 00000000083E3E00 <2> db 000h, 000h, 000h, 000h, 008h,OT(32),OT(32), 000h ; 1C0 - 1C7 3071 00000E18 0C0C0C0C0C0C0C00 <2> db OT(00),OT(00),OT(00),OT(00),OT(00),OT(00),OT(00), 000h ; 1C8 - 1CF (Coprocessor groups) 3072 00000E20 0C0C0C0C0C0C0C0C <2> db OT(00),OT(00),OT(00),OT(00),OT(00),OT(00),OT(00),OT(00) ; 1D0 - 1D7 3073 00000E28 0C0C0C0C0C0C0C0C <2> db OT(00),OT(00),OT(00),OT(00),OT(00),OT(00),OT(00),OT(00) ; 1D8 - 1DF 3074 <2> ;--- The rest of these are squeezed. 3075 00000E30 0004041C1C0C0C0C <2> db 0, 004h, 004h,OT(10),OT(10),OT(00),OT(00),OT(00) ; 00 3076 00000E38 0C787A797B7C7D0C <2> db OT(00),OT(6C),OT(6E),OT(6D),OT(6F),OT(70),OT(71),OT(00) ; 08 3077 00000E40 0C0C1C1C1C1C1C1C <2> db OT(00),OT(00),OT(10),OT(10),OT(10),OT(10),OT(10),OT(10) ; 10 3078 00000E48 1C1C1C1C1C1C1C1C <2> db OT(10),OT(10),OT(10),OT(10),OT(10),OT(10),OT(10),OT(10) ; 18 3079 00000E50 1C1C808080808080 <2> db OT(10),OT(10),OT(74),OT(74),OT(74),OT(74),OT(74),OT(74) ; 20 3080 00000E58 8080808080807E80 <2> db OT(74),OT(74),OT(74),OT(74),OT(74),OT(74),OT(72),OT(74) ; 28 3081 00000E60 0404048080800C7F <2> db 004h, 004h, 004h,OT(74),OT(74),OT(74),OT(00),OT(73) ; 30 3082 00000E68 8124242424242424 <2> db OT(75),OT(18),OT(18),OT(18),OT(18),OT(18),OT(18),OT(18) ; 38 3083 00000E70 2424242424242424 <2> db OT(18),OT(18),OT(18),OT(18),OT(18),OT(18),OT(18),OT(18) ; 40 3084 00000E78 2462626262626262 <2> db OT(18),OT(56),OT(56),OT(56),OT(56),OT(56),OT(56),OT(56) ; 48 3085 00000E80 6262626262626262 <2> db OT(56),OT(56),OT(56),OT(56),OT(56),OT(56),OT(56),OT(56) ; 50 3086 00000E88 626F760C1F636471 <2> db OT(56),OT(63),OT(6A),OT(00),OT(13),OT(57),OT(58),OT(65) ; 58 3087 00000E90 770C1E63641C1313 <2> db OT(6B),OT(00),OT(12),OT(57),OT(58),OT(10),OT(07),OT(07) ; 60 3088 00000E98 1B1E1B1B53540C04 <2> db OT(0F),OT(12),OT(0F),OT(0F),OT(47),OT(48),OT(00), 004h ; 68 3089 00000EA0 1E1C1C5354131304 <2> db OT(12),OT(10),OT(10),OT(47),OT(48),OT(07),OT(07), 004h ; 70 3090 00000EA8 1D1D1D1D1D1D1D1D <2> db OT(11),OT(11),OT(11),OT(11),OT(11),OT(11),OT(11),OT(11) ; 78 3091 00000EB0 8080808080808080 <2> db OT(74),OT(74),OT(74),OT(74),OT(74),OT(74),OT(74),OT(74) ; 80 3092 00000EB8 8080808080808080 <2> db OT(74),OT(74),OT(74),OT(74),OT(74),OT(74),OT(74),OT(74) ; 88 3093 00000EC0 8080808080808080 <2> db OT(74),OT(74),OT(74),OT(74),OT(74),OT(74),OT(74),OT(74) ; 90 3094 00000EC8 80808080800C1919 <2> db OT(74),OT(74),OT(74),OT(74),OT(74),OT(00),OT(0D),OT(0D) ; 98 3095 00000ED0 6022202020295810 <2> db OT(54),OT(16),OT(14),OT(14),OT(14),OT(1D),OT(4C),OT(04) ; A0 3096 00000ED8 8282828282828282 <2> db OT(76),OT(76),OT(76),OT(76),OT(76),OT(76),OT(76),OT(76) ; A8 3097 00000EE0 0C0C0C0C0C0C0C0C <2> db OT(00),OT(00),OT(00),OT(00),OT(00),OT(00),OT(00),OT(00) ; B0 3098 00000EE8 0C0C0C0C42 <2> db OT(00),OT(00),OT(00),OT(00),OT(36) 3099 <2> 3100 <2> P186 equ 1000h 3101 <2> P286 equ 2000h 3102 <2> P386 equ 3000h 3103 <2> P486 equ 4000h 3104 <2> P586 equ 5000h 3105 <2> P686 equ 6000h 3106 <2> 3107 <2> ;--- Disassembler: compressed table of additional information. 3108 <2> ;--- Bits 0-11 usually are the offset of the mnemonics table. 3109 <2> ;--- Bits 12-15 are the CPU which introduced this opcode. 3110 <2> 3111 00000EED 00 <2> align 2, db 0 3112 <2> opinfo label word 3113 00000EEE 3600360036003600 <2> dw MN_ADD, MN_ADD, MN_ADD, MN_ADD ; 00 3114 00000EF6 36003600F507F007 <2> dw MN_ADD, MN_ADD, MN_PUSH, MN_POP ; 04 3115 00000EFE DB07DB07DB07DB07 <2> dw MN_OR, MN_OR, MN_OR, MN_OR ; 08 3116 00000F06 DB07DB07F507E001 <2> dw MN_OR, MN_OR, MN_PUSH, 01E0h ; 0C 3117 00000F0E 3100310031003100 <2> dw MN_ADC, MN_ADC, MN_ADC, MN_ADC ; 10 3118 00000F16 31003100F507F007 <2> dw MN_ADC, MN_ADC, MN_PUSH, MN_POP ; 14 3119 00000F1E 7808780878087808 <2> dw MN_SBB, MN_SBB, MN_SBB, MN_SBB ; 18 3120 00000F26 78087808F507F007 <2> dw MN_SBB, MN_SBB, MN_PUSH, MN_POP ; 1C 3121 00000F2E 3B003B003B003B00 <2> dw MN_AND, MN_AND, MN_AND, MN_AND ; 20 3122 00000F36 3B003B000100B701 <2> dw MN_AND, MN_AND, 0001h, MN_DAA ; 24 3123 00000F3E 8F098F098F098F09 <2> dw MN_SUB, MN_SUB, MN_SUB, MN_SUB ; 28 3124 00000F46 8F098F090101BC01 <2> dw MN_SUB, MN_SUB, 0101h, MN_DAS ; 2C 3125 00000F4E F109F109F109F109 <2> dw MN_XOR, MN_XOR, MN_XOR, MN_XOR ; 30 3126 00000F56 F109F10901021D00 <2> dw MN_XOR, MN_XOR, 0201h, MN_AAA ; 34 3127 00000F5E 8601860186018601 <2> dw MN_CMP, MN_CMP, MN_CMP, MN_CMP ; 38 3128 00000F66 8601860101032C00 <2> dw MN_CMP, MN_CMP, 0301h, MN_AAS ; 3C 3129 00000F6E D104D104D104D104 <2> dw MN_INC, MN_INC, MN_INC, MN_INC ; 40 3130 00000F76 D104D104D104D104 <2> dw MN_INC, MN_INC, MN_INC, MN_INC ; 44 3131 00000F7E C901C901C901C901 <2> dw MN_DEC, MN_DEC, MN_DEC, MN_DEC ; 48 3132 00000F86 C901C901C901C901 <2> dw MN_DEC, MN_DEC, MN_DEC, MN_DEC ; 4C 3133 00000F8E F507F507F507F507 <2> dw MN_PUSH, MN_PUSH, MN_PUSH, MN_PUSH ; 50 3134 00000F96 F507F507F507F507 <2> dw MN_PUSH, MN_PUSH, MN_PUSH, MN_PUSH ; 54 3135 00000F9E F007F007F007F007 <2> dw MN_POP, MN_POP, MN_POP, MN_POP ; 58 3136 00000FA6 F007F007F007F007 <2> dw MN_POP, MN_POP, MN_POP, MN_POP ; 5C 3137 00000FAE 701A5E1A46104020 <2> dw P186 + MN_PUSHA_OSA, P186 + MN_POPA_OSA, P186 + MN_BOUND, P286 + MN_ARPL ; 60 3138 00000FB6 0134013510302030 <2> dw P386 + 0401h, P386 + 0501h, P386 + 0010h, P386 + 0020h ; 64 3139 00000FBE 6A1AC7146A1AC714 <2> dw P186 + MN_PUSH_OSA, P186 + MN_IMUL, P186 + MN_PUSH_OSA, P186 + MN_IMUL ; 68 3140 00000FC6 D614951AE917A61A <2> dw P186 + MN_INSB, P186 + MN_INS_OSR, P186 + MN_OUTSB, P186 + MN_OUTS_OSR ; 6C 3141 00000FCE 990585051F051A05 <2> dw MN_JO, MN_JNO, MN_JB, MN_JAE ; 70 3142 00000FD6 AF05940523051605 <2> dw MN_JZ, MN_JNZ, MN_JBE, MN_JA ; 74 3143 00000FDE AB058F05A105A605 <2> dw MN_JS, MN_JNS, MN_JPE, MN_JPO ; 78 3144 00000FE6 460541054A053D05 <2> dw MN_JL, MN_JGE, MN_JLE, MN_JG ; 7C 3145 00000FEE 0001000100010801 <2> dw 0100h, 0100h, 0100h, 0108h ; 80 3146 00000FF6 A209A209DE09DE09 <2> dw MN_TEST, MN_TEST, MN_XCHG, MN_XCHG ; 84 3147 00000FFE 3406340634063406 <2> dw MN_MOV, MN_MOV, MN_MOV, MN_MOV ; 88 3148 00001006 3406DC053406F802 <2> dw MN_MOV, MN_LEA, MN_MOV, 02F8h ; 8C 3149 0000100E D107DE09DE09DE09 <2> dw MN_NOP, MN_XCHG, MN_XCHG, MN_XCHG ; 90 3150 00001016 DE09DE09DE09DE09 <2> dw MN_XCHG, MN_XCHG, MN_XCHG, MN_XCHG ; 94 3151 0000101E 7700AD017100C309 <2> dw MN_CBW, MN_CWD, MN_CALL, MN_WAIT ; 98 3152 00001026 770A640A4108B805 <2> dw MN_PUSHF_OSA, MN_POPF_OSA, MN_SAHF, MN_LAHF ; 9C 3153 0000102E 3406340634063406 <2> dw MN_MOV, MN_MOV, MN_MOV, MN_MOV ; A0 3154 00001036 B207A00A8B018F0A <2> dw MN_MOVSB, MN_MOVS_OSR, MN_CMPSB, MN_CMPS_OSR ; A4 3155 0000103E A209A2098309B20A <2> dw MN_TEST, MN_TEST, MN_STOSB, MN_STOS_OSR ; A8 3156 00001046 FF059A0A7D08AC0A <2> dw MN_LODSB, MN_LODS_OSR, MN_SCASB, MN_SCAS_OSR ; AC 3157 0000104E 3406340634063406 <2> dw MN_MOV, MN_MOV, MN_MOV, MN_MOV ; B0 3158 00001056 3406340634063406 <2> dw MN_MOV, MN_MOV, MN_MOV, MN_MOV ; B4 3159 0000105E 3406340634063406 <2> dw MN_MOV, MN_MOV, MN_MOV, MN_MOV ; B8 3160 00001066 3406340634063406 <2> dw MN_MOV, MN_MOV, MN_MOV, MN_MOV ; BC 3161 0000106E 200120017E0A7E0A <2> dw 0120h, 0120h, MN_RETN_OSA, MN_RETN_OSA ; C0 3162 00001076 CD05C30500030003 <2> dw MN_LES, MN_LDS, 0300h, 0300h ; C4 3163 0000107E 1A1A571A890A890A <2> dw P186 + MN_ENTER_OSA, P186 + MN_LEAVE_OSA, MN_RETF_OSA, MN_RETF_OSA ; C8 3164 00001086 F504DC040205510A <2> dw MN_INT3, MN_INT, MN_INTO, MN_IRET_OSA ; CC 3165 0000108E 1001100118011801 <2> dw 0110h, 0110h, 0118h, 0118h ; D0 3166 00001096 270022009A29EA09 <2> dw MN_AAM, MN_AAD, P286 + MN_SETALC, MN_XLATB ; D4 3167 0000109E 4801580168017801 <2> dw 0148h, 0158h, 0168h, 0178h ; D8 3168 000010A6 88019801A801B801 <2> dw 0188h, 0198h, 01A8h, 01B8h ; DC 3169 000010AE 0A0AFC09F6092C05 <2> dw MN_LOOPNZ_ASA, MN_LOOPZ_ASA, MN_LOOP_ASA, MN_JCXZ ; E0 3170 000010B6 CD04CD04E407E407 <2> dw MN_IN, MN_IN, MN_OUT, MN_OUT ; E4 3171 000010BE 7100B305B305B305 <2> dw MN_CALL, MN_JMP, MN_JMP, MN_JMP ; E8 3172 000010C6 CD04CD04E407E407 <2> dw MN_IN, MN_IN, MN_OUT, MN_OUT ; EC 3173 000010CE 0800E16402000600 <2> dw 0008h, P686 + MN_INT1, 0002h, 0006h ; F0 3174 000010D6 BC04970028012801 <2> dw MN_HLT, MN_CMC, 0128h, 0128h ; F4 3175 000010DE 820074098C007E09 <2> dw MN_CLC, MN_STC, MN_CLI, MN_STI ; F8 3176 000010E6 87007909E0023001 <2> dw MN_CLD, MN_STD, 02E0h, 0130h ; FC 3177 000010EE 3600DB0731007808 <2> dw MN_ADD, MN_OR, MN_ADC, MN_SBB ; 100 3178 000010F6 3B008F09F1098601 <2> dw MN_AND, MN_SUB, MN_XOR, MN_CMP ; 104 3179 000010FE 3600DB0731007808 <2> dw MN_ADD, MN_OR, MN_ADC, MN_SBB ; 108 3180 00001106 3B008F09F1098601 <2> dw MN_AND, MN_SUB, MN_XOR, MN_CMP ; 10C 3181 0000110E 05080A08FB070008 <2> dw MN_ROL, MN_ROR, MN_RCL, MN_RCR ; 110 3182 00001116 6E0873086E084C08 <2> dw MN_SHL, MN_SHR, MN_SHL, MN_SAR ; 114 3183 0000111E 05080A08FB070008 <2> dw MN_ROL, MN_ROR, MN_RCL, MN_RCR ; 118 3184 00001126 6E0873086E084C08 <2> dw MN_SHL, MN_SHR, MN_SHL, MN_SAR ; 11C 3185 0000112E 05180A18FB170018 <2> dw P186 + MN_ROL, P186 + MN_ROR, P186 + MN_RCL, P186 + MN_RCR ; 120 3186 00001136 6E1873186E184C18 <2> dw P186 + MN_SHL, P186 + MN_SHR, P186 + MN_SHL, P186 + MN_SAR ; 124 3187 0000113E A209A209D607CC07 <2> dw MN_TEST, MN_TEST, MN_NOT, MN_NEG ; 128 3188 00001146 C707C704CE01C104 <2> dw MN_MUL, MN_IMUL, MN_DIV, MN_IDIV ; 12C 3189 0000114E D104C90171007100 <2> dw MN_INC, MN_DEC, MN_CALL, MN_CALL ; 130 3190 00001156 B305B305F5070000 <2> dw MN_JMP, MN_JMP, MN_PUSH, 0000h ; 134 3191 0000115E 68298A29ED252F26 <2> dw P286 + MN_SLDT, P286 + MN_STR, P286 + MN_LLDT, P286 + MN_LTR ; 138 3192 00001166 B729BD2900000000 <2> dw P286 + MN_VERR, P286 + MN_VERW, 0000h, 0000h ; 13C 3193 0000116E 50295629E125E725 <2> dw P286 + MN_SGDT, P286 + MN_SIDT, P286 + MN_LGDT, P286 + MN_LIDT ; 140 3194 00001176 6E290000F3250E45 <2> dw P286 + MN_SMSW, 0000h, P286 + MN_LMSW, P486 + MN_INVLPG ; 144 3195 0000117E EA019D039B02B002 <2> dw MN_FADD, MN_FMUL, MN_FCOM, MN_FCOMP ; 148 3196 00001186 36044A04DD02F102 <2> dw MN_FSUB, MN_FSUBR, MN_FDIV, MN_FDIVR ; 14C 3197 0000118E EA019D039B02B002 <2> dw MN_FADD, MN_FMUL, MN_FCOM, MN_FCOMP ; 150 3198 00001196 36044A04DD02F102 <2> dw MN_FSUB, MN_FSUBR, MN_FDIV, MN_FDIVR ; 154 3199 0000119E 560300000D041204 <2> dw MN_FLD, 0000h, MN_FST, MN_FSTP ; 158 3200 000011A6 210A9503480A1F04 <2> dw MN_FLDENV_OSA, MN_FNLDCW, MN_FNSTENV_OSA, MN_FNSTCW ; 15C 3201 000011AE 56039D0420030000 <2> dw MN_FLD, MN_FXCH, 0320h, 0000h ; 160 3202 000011B6 2803C801D001D801 <2> dw 0328h, 01C8h, 01D0h, 01D8h ; 164 3203 000011BE F701AA031C032303 <2> dw MN_FIADD, MN_FIMUL, MN_FICOM, MN_FICOMP ; 168 3204 000011C6 43045904EA020003 <2> dw MN_FISUB, MN_FISUBR, MN_FIDIV, MN_FIDIVR ; 16C 3205 000011CE 3162426239628B62 <2> dw P686 + MN_FCMOVB, P686 + MN_FCMOVE, P686 + MN_FCMOVBE, P686 + MN_FCMOVU ; 170 3206 000011D6 0000300300000000 <2> dw 0000h, 0330h, 0000h, 0000h ; 174 3207 000011DE 2B03000049034F03 <2> dw MN_FILD, 0000h, MN_FIST, MN_FISTP ; 178 3208 000011E6 0000560300001204 <2> dw 0000h, MN_FLD, 0000h, MN_FSTP ; 17C 3209 000011EE 5D62706266627962 <2> dw P686 + MN_FCMOVNB, P686 + MN_FCMOVNE, P686 + MN_FCMOVNBE, P686 + MN_FCMOVNU ; 180 3210 000011F6 38036E64A1620000 <2> dw 0338h, P686 + MN_FUCOMI, P686 + MN_FCOMI, 0000h ; 184 3211 000011FE EA019D039B02B002 <2> dw MN_FADD, MN_FMUL, MN_FCOM, MN_FCOMP ; 188 3212 00001206 36044A04DD02F102 <2> dw MN_FSUB, MN_FSUBR, MN_FDIV, MN_FDIVR ; 18C 3213 0000120E EA019D0300000000 <2> dw MN_FADD, MN_FMUL, 0000h, 0000h ; 190 3214 00001216 4A043604F102DD02 <2> dw MN_FSUBR, MN_FSUB, MN_FDIVR, MN_FDIV ; 194 3215 0000121E 560300000D041204 <2> dw MN_FLD, 0000h, MN_FST, MN_FSTP ; 198 3216 00001226 290A0000380A2E04 <2> dw MN_FRSTOR_OSA, 0000h, MN_FNSAVE_OSA, MN_FNSTSW ; 19C 3217 0000122E 150300000D041204 <2> dw MN_FFREE, 0000h, MN_FST, MN_FSTP ; 1A0 3218 00001236 67347F3400000000 <2> dw P386 + MN_FUCOM, P386 + MN_FUCOMP, 0000h, 0000h ; 1A4 3219 0000123E F701AA031C032303 <2> dw MN_FIADD, MN_FIMUL, MN_FICOM, MN_FICOMP ; 1A8 3220 00001246 43045904EA020003 <2> dw MN_FISUB, MN_FISUBR, MN_FIDIV, MN_FIDIVR ; 1AC 3221 0000124E F001A30300004003 <2> dw MN_FADDP, MN_FMULP, 0000h, 0340h ; 1B0 3222 00001256 51043C04F802E302 <2> dw MN_FSUBRP, MN_FSUBP, MN_FDIVRP, MN_FDIVP ; 1B4 3223 0000125E 2B03000049034F03 <2> dw MN_FILD, 0000h, MN_FIST, MN_FISTP ; 1B8 3224 00001266 FE012B0304024F03 <2> dw MN_FBLD, MN_FILD, MN_FBSTP, MN_FISTP ; 1BC 3225 0000126E 0000000000000000 <2> dw 0000h, 0000h, 0000h, 0000h ; 1C0 3226 00001276 48037664A8620000 <2> dw 0348h, P686 + MN_FUCOMIP, P686 + MN_FCOMIP, 0000h ; 1C4 3227 0000127E 5B03610369037103 <2> dw MN_FLD1, MN_FLDL2T, MN_FLDL2E, MN_FLDPI ; 1C8 3228 00001286 7803800388030000 <2> dw MN_FLDLG2, MN_FLDLN2, MN_FLDZ, 0000h ; 1CC 3229 0000128E DD01AC04CE03B703 <2> dw MN_F2XM1, MN_FYL2X, MN_FPTAN, MN_FPATAN ; 1D0 3230 00001296 A304C633C5023103 <2> dw MN_FXTRACT, P386 + MN_FPREM1, MN_FDECSTP, MN_FINCSTP ; 1D4 3231 0000129E BF03B3040604FD33 <2> dw MN_FPREM, MN_FYL2XP1, MN_FSQRT, P386 + MN_FSINCOS ; 1D8 3232 000012A6 D503DE03F733BF32 <2> dw MN_FRNDINT, MN_FSCALE, P386 + MN_FSIN, P386 + MN_FCOS ; 1DC 3233 <2> ;--- The rest of these are squeezed. 3234 000012AE 000038014001BE25 <2> dw 0, 0138h, 0140h, P286 + MN_LAR ; 00 3235 000012B6 2A2691200845C949 <2> dw P286 + MN_LSL, P286 + MN_CLTS, P486 + MN_INVD, P486 + MN_WBINVD ; 04 3236 000012BE B219343634363436 <2> dw P186 + MN_UD2, P386 + MN_MOV, P386 + MN_MOV, P386 + MN_MOV ; 08 3237 000012C6 343634363436D159 <2> dw P386 + MN_MOV, P386 + MN_MOV, P386 + MN_MOV, P586 + MN_WRMSR ; 0C 3238 000012CE 16580F585A613A61 <2> dw P586 + MN_RDTSC, P586 + MN_RDMSR, P686 + MN_CMOVO, P686 + MN_CMOVNO ; 10 3239 000012D6 AB60A3607F615261 <2> dw P686 + MN_CMOVB, P686 + MN_CMOVAE, P686 + MN_CMOVZ, P686 + MN_CMOVNZ ; 14 3240 000012DE B2609C6078614A61 <2> dw P686 + MN_CMOVBE, P686 + MN_CMOVA, P686 + MN_CMOVS, P686 + MN_CMOVNS ; 18 3241 000012E6 68617061D760CF60 <2> dw P686 + MN_CMOVPE, P686 + MN_CMOVPO, P686 + MN_CMOVL, P686 + MN_CMOVGE ; 1C 3242 000012EE DE60C8608B579657 <2> dw P686 + MN_CMOVLE, P686 + MN_CMOVG, P586 + MN_PUNPCKLBW, P586 + MN_PUNPCKLWD ; 20 3243 000012F6 A1574F56C256CB56 <2> dw P586 + MN_PUNPCKLDQ, P586 + MN_PACKSSWB, P586 + MN_PCMPGTB, P586 + MN_PCMPGTW ; 24 3244 000012FE D45659566A577557 <2> dw P586 + MN_PCMPGTD, P586 + MN_PACKUSWB, P586 + MN_PUNPCKHBW, P586 + MN_PUNPCKHWD ; 28 3245 00001306 8057455639563F56 <2> dw P586 + MN_PUNPCKHDQ, P586 + MN_PACKSSDW, P586 + MN_MOVD, P586 + MN_MOVQ ; 2C 3246 0000130E 080310031803A756 <2> dw 0308h, 0310h, 0318h, P586 + MN_PCMPEQB ; 30 3247 00001316 B056B956D7513956 <2> dw P586 + MN_PCMPEQW, P586 + MN_PCMPEQD, P586 + MN_EMMS, P586 + MN_MOVD ; 34 3248 0000131E 3F56993585351F35 <2> dw P586 + MN_MOVQ, P386 + MN_JO, P386 + MN_JNO, P386 + MN_JB ; 38 3249 00001326 1A35AF3594352335 <2> dw P386 + MN_JAE, P386 + MN_JZ, P386 + MN_JNZ, P386 + MN_JBE ; 3C 3250 0000132E 1635AB358F35A135 <2> dw P386 + MN_JA, P386 + MN_JS, P386 + MN_JNS, P386 + MN_JPE ; 40 3251 00001336 A635463541354A35 <2> dw P386 + MN_JPO, P386 + MN_JL, P386 + MN_JGE, P386 + MN_JLE ; 44 3252 0000133E 3D352A390E399138 <2> dw P386 + MN_JG, P386 + MN_SETO, P386 + MN_SETNO, P386 + MN_SETB ; 48 3253 00001346 8A384A3923399738 <2> dw P386 + MN_SETAE, P386 + MN_SETZ, P386 + MN_SETNZ, P386 + MN_SETBE ; 4C 3254 0000134E 843844391C393639 <2> dw P386 + MN_SETA, P386 + MN_SETS, P386 + MN_SETNS, P386 + MN_SETPE ; 50 3255 00001356 3D39B738B038BD38 <2> dw P386 + MN_SETPO, P386 + MN_SETL, P386 + MN_SETGE, P386 + MN_SETLE ; 54 3256 0000135E AA38F537F037A651 <2> dw P386 + MN_SETG, P386 + MN_PUSH, P386 + MN_POP, P586 + MN_CPUID ; 58 3257 00001366 5E305C395C39F537 <2> dw P386 + MN_BT, P386 + MN_SHLD, P386 + MN_SHLD, P386 + MN_PUSH ; 5C 3258 0000136E F0373C586C306239 <2> dw P386 + MN_POP, P586 + MN_RSM, P386 + MN_BTS, P386 + MN_SHRD ; 60 3259 00001376 6239C73492419241 <2> dw P386 + MN_SHRD, P386 + MN_IMUL, P486 + MN_CMPXCHG, P486 + MN_CMPXCHG ; 64 3260 0000137E C8356730D235D735 <2> dw P386 + MN_LSS, P386 + MN_BTR, P386 + MN_LFS, P386 + MN_LGS ; 68 3261 00001386 C037C037AD19E802 <2> dw P386 + MN_MOVZX, P386 + MN_MOVZX, P186 + MN_UD1, 02E8h ; 6C 3262 0000138E 62304D305230B937 <2> dw P386 + MN_BTC, P386 + MN_BSF, P386 + MN_BSR, P386 + MN_MOVSX ; 70 3263 00001396 B937D849D849F002 <2> dw P386 + MN_MOVSX, P486 + MN_XADD, P486 + MN_XADD, 02F0h ; 74 3264 0000139E 5740574057405740 <2> dw P486 + MN_BSWAP, P486 + MN_BSWAP, P486 + MN_BSWAP, P486 + MN_BSWAP ; 78 3265 000013A6 5740574057405740 <2> dw P486 + MN_BSWAP, P486 + MN_BSWAP, P486 + MN_BSWAP, P486 + MN_BSWAP ; 7C 3266 000013AE 1E5725572C57EE56 <2> dw P586 + MN_PSRLW, P586 + MN_PSRLD, P586 + MN_PSRLQ, P586 + MN_PMULLW ; 80 3267 000013B6 585761579A568856 <2> dw P586 + MN_PSUBUSB, P586 + MN_PSUBUSW, P586 + MN_PAND, P586 + MN_PADDUSB ; 84 3268 000013BE 9156A05610571757 <2> dw P586 + MN_PADDUSW, P586 + MN_PANDN, P586 + MN_PSRAW, P586 + MN_PSRAD ; 88 3269 000013C6 E65648575057F656 <2> dw P586 + MN_PMULHW, P586 + MN_PSUBSB, P586 + MN_PSUBSW, P586 + MN_POR ; 8C 3270 000013CE 78568056AC57FB56 <2> dw P586 + MN_PADDSB, P586 + MN_PADDSW, P586 + MN_PXOR, P586 + MN_PSLLW ; 90 3271 000013D6 02570957DD563357 <2> dw P586 + MN_PSLLD, P586 + MN_PSLLQ, P586 + MN_PMADDWD, P586 + MN_PSUBB ; 94 3272 000013DE 3A57415763566A56 <2> dw P586 + MN_PSUBW, P586 + MN_PSUBD, P586 + MN_PADDB, P586 + MN_PADDW ; 98 3273 000013E6 7156A819D104C901 <2> dw P586 + MN_PADDD, P186 + MN_UD0, MN_INC, MN_DEC ; 9C 3274 000013EE 16005E306C306730 <2> dw MN_BOXCB, P386 + MN_BT, P386 + MN_BTS, P386 + MN_BTR ; A0 3275 000013F6 62309B51F0073406 <2> dw P386 + MN_BTC, P586 + MN_CMPXCHG8B, MN_POP, MN_MOV ; A4 3276 000013FE 1E571057FB562557 <2> dw P586 + MN_PSRLW, P586 + MN_PSRAW, P586 + MN_PSLLW, P586 + MN_PSRLD ; A8 3277 00001406 175702572C570957 <2> dw P586 + MN_PSRAD, P586 + MN_PSLLD, P586 + MN_PSRLQ, P586 + MN_PSLLQ ; AC 3278 0000140E B1030B02E4016104 <2> dw MN_FNOP, MN_FCHS, MN_FABS, MN_FTST ; B0 3279 00001416 970487340E03D502 <2> dw MN_FXAM, P386 + MN_FUCOMPP, MN_FNENI, MN_FNDISI ; B4 3280 0000141E 18024103EE23B702 <2> dw MN_FNCLEX, MN_FNINIT, P286 + MN_FNSETPM, MN_FCOMPP ; B8 3281 00001426 2E04 <2> dw MN_FNSTSW 3282 <2> 3283 <2> ;--- Disassembler: table converts unsqueezed numbers to squeezed. 3284 <2> 3285 <2> align 8, db 0 3286 <2> sqztab label byte 3287 00001428 0102030400000500 <2> db 1, 2, 3, 4, 0, 0, 5, 0 ; 1E0 3288 00001430 0607000800000000 <2> db 6, 7, 0, 8, 0, 0, 0, 0 ; 1E8 3289 00001438 0000000000000000 <2> db 0, 0, 0, 0, 0, 0, 0, 0 ; 1F0 3290 00001440 0000000000000000 <2> db 0, 0, 0, 0, 0, 0, 0, 0 ; 1F8 3291 00001448 090A0B0C0D000E00 <2> db 9, 10, 11, 12, 13, 0, 14, 0 ; 200 3292 00001450 0000000000000000 <2> db 0, 0, 0, 0, 0, 0, 0, 0 ; 208 3293 00001458 0F10110000000000 <2> db 15, 16, 17, 0, 0, 0, 0, 0 ; 210 3294 00001460 0000000000000000 <2> db 0, 0, 0, 0, 0, 0, 0, 0 ; 218 3295 00001468 1213141516171819 <2> db 18, 19, 20, 21, 22, 23, 24, 25 ; 220 3296 00001470 1A1B1C1D1E1F2021 <2> db 26, 27, 28, 29, 30, 31, 32, 33 ; 228 3297 00001478 0000000000000000 <2> db 0, 0, 0, 0, 0, 0, 0, 0 ; 230 3298 00001480 0000000000000000 <2> db 0, 0, 0, 0, 0, 0, 0, 0 ; 238 3299 00001488 2223242526272829 <2> db 34, 35, 36, 37, 38, 39, 40, 41 ; 240 3300 00001490 2A2B2C2D00002E2F <2> db 42, 43, 44, 45, 0, 0, 46, 47 ; 248 3301 00001498 0030313233343536 <2> db 0, 48, 49, 50, 51, 52, 53, 54 ; 250 3302 000014A0 0000000000003738 <2> db 0, 0, 0, 0, 0, 0, 55, 56 ; 258 3303 000014A8 393A3B3C3D3E3F40 <2> db 57, 58, 59, 60, 61, 62, 63, 64 ; 260 3304 000014B0 4142434445464748 <2> db 65, 66, 67, 68, 69, 70, 71, 72 ; 268 3305 000014B8 494A4B4C4D4E4F50 <2> db 73, 74, 75, 76, 77, 78, 79, 80 ; 270 3306 000014C0 5152535455565758 <2> db 81, 82, 83, 84, 85, 86, 87, 88 ; 278 3307 000014C8 595A5B5C5D5E0000 <2> db 89, 90, 91, 92, 93, 94, 0, 0 ; 280 3308 000014D0 5F60616263640065 <2> db 95, 96, 97, 98, 99,100, 0,101 ; 288 3309 000014D8 666768696A6B6C6D <2> db 102,103,104,105,106,107,108,109 ; 290 3310 000014E0 006E6F7071727374 <2> db 0,110,111,112,113,114,115,116 ; 298 3311 000014E8 7576000000000077 <2> db 117,118, 0, 0, 0, 0, 0,119 ; 2A0 3312 000014F0 78797A7B7C7D7E7F <2> db 120,121,122,123,124,125,126,127 ; 2A8 3313 000014F8 0080818200830000 <2> db 0,128,129,130, 0,131, 0, 0 ; 2B0 3314 00001500 8485008687880089 <2> db 132,133, 0,134,135,136, 0,137 ; 2B8 3315 00001508 008A8B00008C0000 <2> db 0,138,139, 0, 0,140, 0, 0 ; 2C0 3316 00001510 8D8E008F90910092 <2> db 141,142, 0,143,144,145, 0,146 ; 2C8 3317 00001518 0093949500960000 <2> db 0,147,148,149, 0,150, 0, 0 ; 2D0 3318 00001520 979899009A9B9C9D <2> db 151,152,153, 0,154,155,156,157 ; 2D8 3319 00001528 9E9F0000000000A0 <2> db 158,159, 0, 0, 0, 0, 0,160 ; 2E0 3320 00001530 00000000A1A2A3A4 <2> db 0, 0, 0, 0,161,162,163,164 ; 2E8 3321 00001538 00A5000000000000 <2> db 0,165, 0, 0, 0, 0, 0, 0 ; 2F0 3322 00001540 A600000000000000 <2> db 166, 0, 0, 0, 0, 0, 0, 0 ; 2F8 3323 00001548 A700000000000000 <2> db 167, 0, 0, 0, 0, 0, 0, 0 ; 300 3324 00001550 0000A800A900AA00 <2> db 0, 0,168, 0,169, 0,170, 0 ; 308 3325 00001558 0000AB00AC00AD00 <2> db 0, 0,171, 0,172, 0,173, 0 ; 310 3326 00001560 0000AE000000AF00 <2> db 0, 0,174, 0, 0, 0,175, 0 ; 318 3327 00001568 B000000000000000 <2> db 176, 0, 0, 0, 0, 0, 0, 0 ; 320 3328 00001570 B1B20000B3B40000 <2> db 177,178, 0, 0,179,180, 0, 0 ; 328 3329 00001578 00B5000000000000 <2> db 0,181, 0, 0, 0, 0, 0, 0 ; 330 3330 00001580 B6B7B8B9BA000000 <2> db 182,183,184,185,186, 0, 0, 0 ; 338 3331 00001588 00BB000000000000 <2> db 0,187, 0, 0, 0, 0, 0, 0 ; 340 3332 00001590 BC00000000000000 <2> db 188, 0, 0, 0, 0, 0, 0, 0 ; 348 3333 <2> 3334 <2> ;--- Disassembler: table of mnemonics that change in the presence of a WAIT 3335 <2> ;--- instruction. 3336 <2> 3337 <2> align 2, db 0 3338 <2> wtab1 label word 3339 00001598 3A03390338033B035D- <2> dw 033Ah,0339h,0338h,033Bh,015Dh,019Eh,033Ch,015Fh 3339 000015A1 019E013C035F01 <2> 3340 000015A8 5E0148039F01 <2> dw 015Eh,0348h,019Fh 3341 <2> wtab2 label word 3342 000015AE 1102 <2> dw MN_FCLEX 3343 000015B0 CE02 <2> dw MN_FDISI 3344 000015B2 0803 <2> dw MN_FENI 3345 000015B4 3A03 <2> dw MN_FINIT 3346 000015B6 8E03 <2> dw MN_FLDCW 3347 000015B8 310A <2> dw MN_FSAVE_OSA 3348 000015BA E603 <2> dw MN_FSETPM 3349 000015BC 1804 <2> dw MN_FSTCW 3350 000015BE 400A <2> dw MN_FSTENV_OSA 3351 000015C0 2704 <2> dw MN_FSTSW 3352 000015C2 2704 <2> dw MN_FSTSW 3353 <2> N_WTAB equ ($ - wtab2) / 2 3354 <2> 3355 <2> ;--- Disassembler: table for operands which have a different mnemonic for 3356 <2> ;--- their 32 bit versions (66h prefix). 3357 <2> 3358 <2> align 2, db 0 3359 <2> ltabo1 label word 3360 000015C4 98009900 <2> dw 098h,099h 3361 <2> ltabo2 label word 3362 000015C8 7C00 <2> dw MN_CWDE 3363 000015CA B201 <2> dw MN_CDQ 3364 <2> N_LTABO equ ($ - ltabo2) / 2 3365 <2> 3366 <2> ;--- Disassembler: table for operands which have a different mnemonic for 3367 <2> ;--- their 32 bit versions (67h prefix). 3368 <2> 3369 <2> align 2, db 0 3370 <2> ltaba1 label word 3371 000015CC E300 <2> dw 0E3h 3372 <2> ltaba2 label word 3373 000015CE 3205 <2> dw MN_JECXZ 3374 <2> N_LTABA equ ($ - ltaba2) / 2 3375 <2> 3376 <2> ;--- Disassembler: table of lockable instructions 3377 <2> 3378 <2> align 2, db 0 3379 <2> locktab label word 3380 000015D0 0A0102011000110008- <2> dw 010Ah,0102h,010h,011h,0108h,0100h,00h,01h 3380 000015D9 01000100000100 <2> 3381 000015E0 0C010401200021009B- <2> dw 010Ch,0104h,020h,021h,029Bh,02EFh,0293h,02EEh 3381 000015E9 02EF029302EE02 <2> 3382 000015F0 8B02ED0290029102E1- <2> dw 028Bh,02EDh,0290h,0291h,02E1h,0131h,02E0h,0130h 3382 000015F9 023101E0023001 <2> 3383 00001600 2B012A010901010108- <2> dw 012Bh,012Ah,0109h,0101h,08h,09h,010Bh,0103h 3383 00001609 0009000B010301 <2> 3384 00001610 180019000D01050128- <2> dw 018h,019h,010Dh,0105h,028h,029h,02A0h,02A1h 3384 00001619 002900A002A102 <2> 3385 00001620 860087000E01060130- <2> dw 086h,087h,010Eh,0106h,030h,031h 3385 00001629 003100 <2> 3386 <2> N_LOCK equ ($ - locktab) / 2 3387 <2> 3388 <2> ;--- Equates used in the assembly-language code. 3389 <2> 3390 <2> SPARSE_BASE equ 01E0h 3391 <2> SFPGROUP3 equ 0338h 3392 <2> GROUP7 equ 0130h 1411 <1> [list +] 1412 <1> opindex: 1413 <1> [list -] 1430 0000162C 01 <2> db %$index 1431 <2> [list -] 1430 0000162D 00 <2> db %$index 1431 <2> [list -] 1430 0000162E 01 <2> db %$index 1431 <2> [list -] 1430 0000162F 03 <2> db %$index 1431 <2> [list -] 1430 00001630 05 <2> db %$index 1431 <2> [list -] 1430 00001631 07 <2> db %$index 1431 <2> [list -] 1430 00001632 09 <2> db %$index 1431 <2> [list -] 1430 00001633 0B <2> db %$index 1431 <2> [list -] 1430 00001634 0D <2> db %$index 1431 <2> [list -] 1430 00001635 0F <2> db %$index 1431 <2> [list -] 1430 00001636 11 <2> db %$index 1431 <2> [list -] 1430 00001637 10 <2> db %$index 1431 <2> [list -] 1430 00001638 11 <2> db %$index 1431 <2> [list -] 1430 00001639 10 <2> db %$index 1431 <2> [list -] 1430 0000163A 11 <2> db %$index 1431 <2> [list -] 1430 0000163B 13 <2> db %$index 1431 <2> [list -] 1430 0000163C 16 <2> db %$index 1431 <2> [list -] 1430 0000163D 18 <2> db %$index 1431 <2> [list -] 1430 0000163E 18 <2> db %$index 1431 <2> [list -] 1430 0000163F 1A <2> db %$index 1431 <2> [list -] 1430 00001640 1C <2> db %$index 1431 <2> [list -] 1430 00001641 1C <2> db %$index 1431 <2> [list -] 1430 00001642 1C <2> db %$index 1431 <2> [list -] 1430 00001643 1E <2> db %$index 1431 <2> [list -] 1430 00001644 1D <2> db %$index 1431 <2> [list -] 1430 00001645 1E <2> db %$index 1431 <2> [list -] 1430 00001646 1D <2> db %$index 1431 <2> [list -] 1430 00001647 1E <2> db %$index 1431 <2> [list -] 1430 00001648 1D <2> db %$index 1431 <2> [list -] 1430 00001649 20 <2> db %$index 1431 <2> [list -] 1430 0000164A 21 <2> db %$index 1431 <2> [list -] 1430 0000164B 22 <2> db %$index 1431 <2> [list -] 1430 0000164C 23 <2> db %$index 1431 <2> [list -] 1430 0000164D 22 <2> db %$index 1431 <2> [list -] 1430 0000164E 22 <2> db %$index 1431 <2> [list -] 1430 0000164F 23 <2> db %$index 1431 <2> [list -] 1430 00001650 25 <2> db %$index 1431 <2> [list -] 1430 00001651 26 <2> db %$index 1431 <2> [list -] 1430 00001652 27 <2> db %$index 1431 <2> [list -] 1430 00001653 28 <2> db %$index 1431 <2> [list -] 1430 00001654 29 <2> db %$index 1431 <2> [list -] 1430 00001655 28 <2> db %$index 1431 <2> [list -] 1430 00001656 28 <2> db %$index 1431 <2> [list -] 1430 00001657 27 <2> db %$index 1431 <2> [list -] 1430 00001658 28 <2> db %$index 1431 <2> [list -] 1430 00001659 29 <2> db %$index 1431 <2> [list -] 1430 0000165A 2A <2> db %$index 1431 <2> [list -] 1430 0000165B 2B <2> db %$index 1431 <2> [list -] 1430 0000165C 2C <2> db %$index 1431 <2> [list -] 1430 0000165D 2D <2> db %$index 1431 <2> [list -] 1430 0000165E 2E <2> db %$index 1431 <2> [list -] 1430 0000165F 2F <2> db %$index 1431 <2> [list -] 1430 00001660 2E <2> db %$index 1431 <2> [list -] 1430 00001661 2E <2> db %$index 1431 <2> [list -] 1430 00001662 2F <2> db %$index 1431 <2> [list -] 1430 00001663 2F <2> db %$index 1431 <2> [list -] 1430 00001664 32 <2> db %$index 1431 <2> [list -] 1430 00001665 34 <2> db %$index 1431 <2> [list -] 1430 00001666 37 <2> db %$index 1431 <2> [list -] 1430 00001667 39 <2> db %$index 1431 <2> [list -] 1430 00001668 3A <2> db %$index 1431 <2> [list -] 1430 00001669 3B <2> db %$index 1431 <2> [list -] 1430 0000166A 3C <2> db %$index 1431 <2> [list -] 1430 0000166B 3D <2> db %$index 1431 <2> [list -] 1430 0000166C 3F <2> db %$index 1431 <2> [list -] 1430 0000166D 40 <2> db %$index 1431 <2> [list -] 1430 0000166E 42 <2> db %$index 1431 <2> [list -] 1430 0000166F 44 <2> db %$index 1431 <2> [list -] 1430 00001670 46 <2> db %$index 1431 <2> [list -] 1430 00001671 48 <2> db %$index 1431 <2> [list -] 1430 00001672 49 <2> db %$index 1431 <2> [list -] 1430 00001673 4A <2> db %$index 1431 <2> [list -] 1430 00001674 4D <2> db %$index 1431 <2> [list -] 1430 00001675 4D <2> db %$index 1431 <2> [list -] 1430 00001676 4E <2> db %$index 1431 <2> [list -] 1430 00001677 4F <2> db %$index 1431 <2> [list -] 1430 00001678 50 <2> db %$index 1431 <2> [list -] 1430 00001679 4F <2> db %$index 1431 <2> [list -] 1430 0000167A 50 <2> db %$index 1431 <2> [list -] 1430 0000167B 52 <2> db %$index 1431 <2> [list -] 1430 0000167C 54 <2> db %$index 1431 <2> [list -] 1430 0000167D 56 <2> db %$index 1431 <2> [list -] 1430 0000167E 58 <2> db %$index 1431 <2> [list -] 1430 0000167F 5A <2> db %$index 1431 <2> [list -] 1430 00001680 59 <2> db %$index 1431 <2> [list -] 1430 00001681 59 <2> db %$index 1431 <2> [list -] 1430 00001682 5A <2> db %$index 1431 <2> [list -] 1430 00001683 5B <2> db %$index 1431 <2> [list -] 1430 00001684 5E <2> db %$index 1431 <2> [list -] 1430 00001685 61 <2> db %$index 1431 <2> [list -] 1430 00001686 62 <2> db %$index 1431 <2> [list -] 1430 00001687 63 <2> db %$index 1431 <2> [list -] 1430 00001688 62 <2> db %$index 1431 <2> [list -] 1430 00001689 62 <2> db %$index 1431 <2> [list -] 1430 0000168A 61 <2> db %$index 1431 <2> [list -] 1430 0000168B 61 <2> db %$index 1431 <2> [list -] 1430 0000168C 60 <2> db %$index 1431 <2> [list -] 1430 0000168D 60 <2> db %$index 1431 <2> [list -] 1430 0000168E 5F <2> db %$index 1431 <2> [list -] 1430 0000168F 5F <2> db %$index 1431 <2> [list -] 1430 00001690 5E <2> db %$index 1431 <2> [list -] 1430 00001691 5E <2> db %$index 1431 <2> [list -] 1430 00001692 5D <2> db %$index 1431 <2> [list -] 1430 00001693 5D <2> db %$index 1431 <2> [list -] 1430 00001694 5E <2> db %$index 1431 <2> [list -] 1430 00001695 5F <2> db %$index 1431 <2> [list -] 1430 00001696 60 <2> db %$index 1431 <2> [list -] 1430 00001697 61 <2> db %$index 1431 <2> [list -] 1430 00001698 62 <2> db %$index 1431 <2> [list -] 1430 00001699 63 <2> db %$index 1431 <2> [list -] 1430 0000169A 64 <2> db %$index 1431 <2> [list -] 1430 0000169B 65 <2> db %$index 1431 <2> [list -] 1430 0000169C 66 <2> db %$index 1431 <2> [list -] 1430 0000169D 67 <2> db %$index 1431 <2> [list -] 1430 0000169E 68 <2> db %$index 1431 <2> [list -] 1430 0000169F 6A <2> db %$index 1431 <2> [list -] 1430 000016A0 6C <2> db %$index 1431 <2> [list -] 1430 000016A1 6E <2> db %$index 1431 <2> [list -] 1430 000016A2 70 <2> db %$index 1431 <2> [list -] 1430 000016A3 71 <2> db %$index 1431 <2> [list -] 1430 000016A4 72 <2> db %$index 1431 <2> [list -] 1430 000016A5 71 <2> db %$index 1431 <2> [list -] 1430 000016A6 73 <2> db %$index 1431 <2> [list -] 1430 000016A7 76 <2> db %$index 1431 <2> [list -] 1430 000016A8 77 <2> db %$index 1431 <2> [list -] 1430 000016A9 79 <2> db %$index 1431 <2> [list -] 1430 000016AA 79 <2> db %$index 1431 <2> [list -] 1430 000016AB 79 <2> db %$index 1431 <2> [list -] 1431 ****************** <2> warning: Most assembler table prefix bytes: 1 (ofs 4h) mne BOXCB variant (240h + 0*8 + 7),84,, [-w+user] 1495 <1> 1496 <1> usesection lDEBUG_DATA_ENTRY 1052 1053 1054 usesection lDEBUG_DATA_ENTRY 1055 1056 msg_start: 1057 %include "msg.asm" 1058 <1> 1059 <1> %if 0 1060 <1> 1061 <1> lDebug messages 1062 <1> 1063 <1> Copyright (C) 1995-2003 Paul Vojta 1064 <1> Copyright (C) 2008-2012 C. Masloch 1065 <1> 1066 <1> Usage of the works is permitted provided that this 1067 <1> instrument is retained with the works, so that any entity 1068 <1> that uses the works is notified of this instrument. 1069 <1> 1070 <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 1071 <1> 1072 <1> %endif 1073 <1> 1074 <1> 1075 <1> usesection lDEBUG_DATA_ENTRY 1076 <1> 1077 <1> msg: 1078 <1> .help: 1079 00001132 6C4465627567582028- <1> db _PROGNAME,_VERSION," help screen",13,10 1079 0000113B 323032322D30342D31- <1> 1079 00001144 38292068656C702073- <1> 1079 0000114D 637265656E0D0A <1> 1080 00001154 617373656D626C6509- <1> db "assemble",9, "A [address]",13,10 1080 0000115D 41205B616464726573- <1> 1080 00001166 735D0D0A <1> 1081 <1> %if 0 1082 <1> db "set option bits",9, "BS value",13,10 1083 <1> db "unset opt bits",9, "BU value",13,10 1084 <1> db "reset opt bits",9, "BR value",13,10 1085 <1> %endif 1086 <1> %if _BREAKPOINTS 1087 0000116A 73657420627265616B- <1> db "set breakpoint",9, "BP index|AT|NEW address [[NUMBER=]number] [WHEN=cond] [ID=id]",13,10 1087 00001173 706F696E7409425020- <1> 1087 0000117C 696E6465787C41547C- <1> 1087 00001185 4E4557206164647265- <1> 1087 0000118E 7373205B5B4E554D42- <1> 1087 00001197 45523D5D6E756D6265- <1> 1087 000011A0 725D205B5748454E3D- <1> 1087 000011A9 636F6E645D205B4944- <1> 1087 000011B2 3D69645D0D0A <1> 1088 000011B8 207365742049440909- <1> db " set ID",9,9, "BI index|AT address [ID=]id",13,10 1088 000011C1 424920696E6465787C- <1> 1088 000011CA 415420616464726573- <1> 1088 000011D3 73205B49443D5D6964- <1> 1088 000011DC 0D0A <1> 1089 000011DE 2073657420636F6E64- <1> db " set condition",9, "BW index|AT address [WHEN=]cond",13,10 1089 000011E7 6974696F6E09425720- <1> 1089 000011F0 696E6465787C415420- <1> 1089 000011F9 61646472657373205B- <1> 1089 00001202 5748454E3D5D636F6E- <1> 1089 0000120B 640D0A <1> 1090 0000120E 20736574206F666673- <1> db " set offset",9, "BO index|AT address [OFFSET=]number",13,10 1090 00001217 657409424F20696E64- <1> 1090 00001220 65787C415420616464- <1> 1090 00001229 72657373205B4F4646- <1> 1090 00001232 5345543D5D6E756D62- <1> 1090 0000123B 65720D0A <1> 1091 0000123F 20736574206E756D62- <1> db " set number",9, "BN index|AT address|ALL number",13,10 1091 00001248 657209424E20696E64- <1> 1091 00001251 65787C415420616464- <1> 1091 0000125A 726573737C414C4C20- <1> 1091 00001263 6E756D6265720D0A <1> 1092 0000126B 20636C656172090942- <1> db " clear",9,9, "BC index|AT address|ALL",13,10 1092 00001274 4320696E6465787C41- <1> 1092 0000127D 542061646472657373- <1> 1092 00001286 7C414C4C0D0A <1> 1093 0000128C 2064697361626C6509- <1> db " disable",9, "BD index|AT address|ALL",13,10 1093 00001295 424420696E6465787C- <1> 1093 0000129E 415420616464726573- <1> 1093 000012A7 737C414C4C0D0A <1> 1094 000012AE 20656E61626C650909- <1> db " enable",9,9, "BE index|AT address|ALL",13,10 1094 000012B7 424520696E6465787C- <1> 1094 000012C0 415420616464726573- <1> 1094 000012C9 737C414C4C0D0A <1> 1095 000012D0 20746F67676C650909- <1> db " toggle",9,9, "BT index|AT address|ALL",13,10 1095 000012D9 425420696E6465787C- <1> 1095 000012E2 415420616464726573- <1> 1095 000012EB 737C414C4C0D0A <1> 1096 000012F2 206C6973740909424C- <1> db " list",9,9, "BL [index|AT address|ALL]",13,10 1096 000012FB 205B696E6465787C41- <1> 1096 00001304 542061646472657373- <1> 1096 0000130D 7C414C4C5D0D0A <1> 1097 <1> %endif 1098 <1> %if _DEBUG 1099 <1> db "break upwards",9, "BU",13,10 1100 <1> %endif 1101 00001314 636F6D706172650909- <1> db "compare",9,9, "C range address",13,10 1101 0000131D 432072616E67652061- <1> 1101 00001326 6464726573730D0A <1> 1102 0000132E 64756D70090944205B- <1> db "dump",9,9, "D [range]",13,10 1102 00001337 72616E67655D0D0A <1> 1103 0000133F 64756D702062797465- <1> db "dump bytes",9, "DB [range]",13,10 1103 00001348 73094442205B72616E- <1> 1103 00001351 67655D0D0A <1> 1104 00001356 64756D7020776F7264- <1> db "dump words",9, "DW [range]",13,10 1104 0000135F 73094457205B72616E- <1> 1104 00001368 67655D0D0A <1> 1105 0000136D 64756D702064776F72- <1> db "dump dwords",9, "DD [range]",13,10 1105 00001376 6473094444205B7261- <1> 1105 0000137F 6E67655D0D0A <1> 1106 <1> %if _INT 1107 00001385 64756D7020696E7465- <1> db "dump interrupts",9, "DI[R][M][L] interrupt [count]",13,10 1107 0000138E 727275707473094449- <1> 1107 00001397 5B525D5B4D5D5B4C5D- <1> 1107 000013A0 20696E746572727570- <1> 1107 000013A9 74205B636F756E745D- <1> 1107 000013B2 0D0A <1> 1108 <1> %endif 1109 <1> %if _PM 1110 000013B4 64756D70204C445409- <1> db "dump LDT",9, "DL selector [count]",13,10 1110 000013BD 444C2073656C656374- <1> 1110 000013C6 6F72205B636F756E74- <1> 1110 000013CF 5D0D0A <1> 1111 <1> %endif 1112 <1> %if _MCB 1113 000013D2 64756D70204D434220- <1> db "dump MCB chain",9, "DM [segment]",13,10 1113 000013DB 636861696E09444D20- <1> 1113 000013E4 5B7365676D656E745D- <1> 1113 000013ED 0D0A <1> 1114 <1> ;db "dump S/SD MCBs",9, "DS",13,10 1115 <1> %endif 1116 <1> %if _DSTRINGS 1117 000013EF 646973706C61792073- <1> db "display strings",9, "DZ/D$/D[W]# [address]",13,10 1117 000013F8 7472696E677309445A- <1> 1117 00001401 2F44242F445B575D23- <1> 1117 0000140A 205B61646472657373- <1> 1117 00001413 5D0D0A <1> 1118 <1> %endif 1119 <1> %if _PM 1120 00001416 64756D702065787420- <1> db "dump ext memory",9, "DX physical_address",13,10 1120 0000141F 6D656D6F7279094458- <1> 1120 00001428 20706879736963616C- <1> 1120 00001431 5F616464726573730D- <1> 1120 0000143A 0A <1> 1121 <1> %endif 1122 0000143B 656E74657209094520- <1> db "enter",9,9, "E address [list]",13,10 1122 00001444 61646472657373205B- <1> 1122 0000144D 6C6973745D0D0A <1> 1123 00001454 66696C6C0909462072- <1> db "fill",9,9, "F range [RANGE range|list]",13,10 1123 0000145D 616E6765205B52414E- <1> 1123 00001466 47452072616E67657C- <1> 1123 0000146F 6C6973745D0D0A <1> 1124 00001476 676F090947205B3D61- <1> db "go",9,9, "G [=address] [breakpts]",13,10 1124 0000147F 6464726573735D205B- <1> 1124 00001488 627265616B7074735D- <1> 1124 00001491 0D0A <1> 1125 00001493 676F746F0909474F54- <1> db "goto",9,9, "GOTO :label",13,10 1125 0000149C 4F203A6C6162656C0D- <1> 1125 000014A5 0A <1> 1126 000014A6 686578206164642F73- <1> db "hex add/sub",9, "H value1 [value2 [...]]",13,10 1126 000014AF 756209482076616C75- <1> 1126 000014B8 6531205B76616C7565- <1> 1126 000014C1 32205B2E2E2E5D5D0D- <1> 1126 000014CA 0A <1> 1127 000014CB 626173652064697370- <1> db "base display",9, "H BASE=number [GROUP=number] [WIDTH=number] value",13,10 1127 000014D4 6C6179094820424153- <1> 1127 000014DD 453D6E756D62657220- <1> 1127 000014E6 5B47524F55503D6E75- <1> 1127 000014EF 6D6265725D205B5749- <1> 1127 000014F8 4454483D6E756D6265- <1> 1127 00001501 725D2076616C75650D- <1> 1127 0000150A 0A <1> 1128 0000150B 696E7075740909495B- <1> db "input",9,9, "I[W|D] port",13,10 1128 00001514 577C445D20706F7274- <1> 1128 0000151D 0D0A <1> 1129 0000151F 6966206E756D657269- <1> db "if numeric",9, "IF [NOT] (cond) THEN cmd",13,10 1129 00001528 63094946205B4E4F54- <1> 1129 00001531 5D2028636F6E642920- <1> 1129 0000153A 5448454E20636D640D- <1> 1129 00001543 0A <1> 1130 00001544 696620736372697074- <1> db "if script file",9, "IF [NOT] EXISTS Y file [:label] THEN cmd",13,10 1130 0000154D 2066696C6509494620- <1> 1130 00001556 5B4E4F545D20455849- <1> 1130 0000155F 53545320592066696C- <1> 1130 00001568 65205B3A6C6162656C- <1> 1130 00001571 5D205448454E20636D- <1> 1130 0000157A 640D0A <1> 1131 0000157D 6C6F61642070726F67- <1> db "load program",9, "L [address]",13,10 1131 00001586 72616D094C205B6164- <1> 1131 0000158F 64726573735D0D0A <1> 1132 00001597 6C6F61642073656374- <1> db "load sectors",9, "L address drive sector count",13,10 1132 000015A0 6F7273094C20616464- <1> 1132 000015A9 726573732064726976- <1> 1132 000015B2 6520736563746F7220- <1> 1132 000015BB 636F756E740D0A <1> 1133 000015C2 6D6F766509094D2072- <1> db "move",9,9, "M range address",13,10 1133 000015CB 616E67652061646472- <1> 1133 000015D4 6573730D0A <1> 1134 000015D9 38307838362F783837- <1> db "80x86/x87 mode",9, "M [0..6|C|NC|C2|?]",13,10 1134 000015E2 206D6F6465094D205B- <1> 1134 000015EB 302E2E367C437C4E43- <1> 1134 000015F4 7C43327C3F5D0D0A <1> 1135 000015FC 736574206E616D6509- <1> db "set name",9, "N [[drive:][path]progname.ext [parameters]]",13,10 1135 00001605 4E205B5B6472697665- <1> 1135 0000160E 3A5D5B706174685D70- <1> 1135 00001617 726F676E616D652E65- <1> 1135 00001620 7874205B706172616D- <1> 1135 00001629 65746572735D5D0D0A <1> 1136 00001632 6F757470757409094F- <1> db "output",9,9, "O[W|D] port value",13,10 1136 0000163B 5B577C445D20706F72- <1> 1136 00001644 742076616C75650D0A <1> 1137 0000164D 70726F636565640909- <1> db "proceed",9,9, "P [=address] [count [WHILE cond] [SILENT [count]]]",13,10 1137 00001656 50205B3D6164647265- <1> 1137 0000165F 73735D205B636F756E- <1> 1137 00001668 74205B5748494C4520- <1> 1137 00001671 636F6E645D205B5349- <1> 1137 0000167A 4C454E54205B636F75- <1> 1137 00001683 6E745D5D5D0D0A <1> 1138 0000168A 717569740909510D0A <1> db "quit",9,9, "Q",13,10 1139 00001693 726567697374657209- <1> db "register",9, "R [register [value]]",13,10 1139 0000169C 52205B726567697374- <1> 1139 000016A5 6572205B76616C7565- <1> 1139 000016AE 5D5D0D0A <1> 1140 000016B2 5220657874656E6465- <1> db "R extended",9, "RE",13,10 1140 000016BB 640952450D0A <1> 1141 000016C1 524520636F6D6D616E- <1> db "RE commands",9, "RE.LIST|APPEND|REPLACE [commands]",13,10 1141 000016CA 64730952452E4C4953- <1> 1141 000016D3 547C415050454E447C- <1> 1141 000016DC 5245504C414345205B- <1> 1141 000016E5 636F6D6D616E64735D- <1> 1141 000016EE 0D0A <1> 1142 <1> %if _MMXSUPP 1143 000016F0 4D4D58207265676973- <1> db "MMX register",9, "RM",13,10 1143 000016F9 74657209524D0D0A <1> 1144 <1> %endif 1145 <1> %if _RN 1146 00001701 465055207265676973- <1> db "FPU register",9, "RN",13,10 1146 0000170A 74657209524E0D0A <1> 1147 <1> %endif 1148 00001712 746F67676C65203338- <1> db "toggle 386 regs",9, "RX",13,10 1148 0000171B 362072656773095258- <1> 1148 00001724 0D0A <1> 1149 00001726 736561726368090953- <1> db "search",9,9, "S range [REVERSE] [RANGE range|list]",13,10 1149 0000172F 2072616E6765205B52- <1> 1149 00001738 4556455253455D205B- <1> 1149 00001741 52414E47452072616E- <1> 1149 0000174A 67657C6C6973745D0D- <1> 1149 00001753 0A <1> 1150 00001754 736C6565700909534C- <1> db "sleep",9,9, "SLEEP count [SECONDS|TICKS]",13,10 1150 0000175D 45455020636F756E74- <1> 1150 00001766 205B5345434F4E4453- <1> 1150 0000176F 7C5449434B535D0D0A <1> 1151 00001778 747261636509095420- <1> db "trace",9,9, "T [=address] [count [WHILE cond] [SILENT [count]]]",13,10 1151 00001781 5B3D61646472657373- <1> 1151 0000178A 5D205B636F756E7420- <1> 1151 00001793 5B5748494C4520636F- <1> 1151 0000179C 6E645D205B53494C45- <1> 1151 000017A5 4E54205B636F756E74- <1> 1151 000017AE 5D5D5D0D0A <1> 1152 000017B3 747261636520286578- <1> db "trace (exc str)",9 1152 000017BC 63207374722909 <1> 1153 000017C3 5450205B3D61646472- <1> db "TP [=address] [count [WHILE cond] [SILENT [count]]]",13,10 1153 000017CC 6573735D205B636F75- <1> 1153 000017D5 6E74205B5748494C45- <1> 1153 000017DE 20636F6E645D205B53- <1> 1153 000017E7 494C454E54205B636F- <1> 1153 000017F0 756E745D5D5D0D0A <1> 1154 000017F8 7472616365206D6F64- <1> db "trace mode",9, "TM [0|1]",13,10 1154 00001801 6509544D205B307C31- <1> 1154 0000180A 5D0D0A <1> 1155 <1> %if _TSR 1156 0000180D 656E74657220545352- <1> db "enter TSR mode",9, "TSR",13,10 1156 00001816 206D6F646509545352- <1> 1156 0000181F 0D0A <1> 1157 <1> %endif 1158 00001821 756E617373656D626C- <1> db "unassemble",9, "U [range]",13,10 1158 0000182A 650955205B72616E67- <1> 1158 00001833 655D0D0A <1> 1159 00001837 77726974652070726F- <1> db "write program",9, "W [address]",13,10 1159 00001840 6772616D0957205B61- <1> 1159 00001849 6464726573735D0D0A <1> 1160 00001852 777269746520736563- <1> db "write sectors",9, "W address drive sector count",13,10 1160 0000185B 746F72730957206164- <1> 1160 00001864 647265737320647269- <1> 1160 0000186D 766520736563746F72- <1> 1160 00001876 20636F756E740D0A <1> 1161 <1> %if _EMS 1162 0000187E 657870616E64656420- <1> db "expanded mem",9, "XA/XD/XM/XR/XS, X? for help",13,10 1162 00001887 6D656D0958412F5844- <1> 1162 00001890 2F584D2F58522F5853- <1> 1162 00001899 2C20583F20666F7220- <1> 1162 000018A2 68656C700D0A <1> 1163 <1> %endif 1164 000018A8 72756E207363726970- <1> db "run script",9, "Y [partition/][scriptfile] [:label]",13,10 1164 000018B1 740959205B70617274- <1> 1164 000018BA 6974696F6E2F5D5B73- <1> 1164 000018C3 637269707466696C65- <1> 1164 000018CC 5D205B3A6C6162656C- <1> 1164 000018D5 5D0D0A <1> 1165 000018D8 0D0A <1> db 13,10 1166 000018DA 4164646974696F6E61- <1> db "Additional help topics:",13,10 1166 000018E3 6C2068656C7020746F- <1> 1166 000018EC 706963733A0D0A <1> 1167 <1> %if _EXTHELP 1168 000018F3 205265676973746572- <1> db " Registers",9, "?R",13,10 1168 000018FC 73093F520D0A <1> 1169 00001902 20466C61677309093F- <1> db " Flags",9,9, "?F",13,10 1169 0000190B 460D0A <1> 1170 <1> %if _COND 1171 0000190E 20436F6E646974696F- <1> db " Conditionals",9, "?C",13,10 1171 00001917 6E616C73093F430D0A <1> 1172 <1> %endif 1173 <1> %if _EXPRESSIONS 1174 00001920 204578707265737369- <1> db " Expressions",9, "?E",13,10 1174 00001929 6F6E73093F450D0A <1> 1175 <1> %endif 1176 <1> %if _VARIABLES || _OPTIONS || _PSPVARIABLES 1177 00001931 205661726961626C65- <1> db " Variables",9, "?V",13,10 1177 0000193A 73093F560D0A <1> 1178 <1> %endif 1179 00001940 205220457874656E64- <1> db " R Extended",9, "?RE",13,10 1179 00001949 6564093F52450D0A <1> 1180 00001951 2052756E206B657977- <1> db " Run keywords",9, "?RUN",13,10 1180 0000195A 6F726473093F52554E- <1> 1180 00001963 0D0A <1> 1181 <1> %if _OPTIONS 1182 00001965 204F7074696F6E7309- <1> db " Options",9, "?O",13,10 1182 0000196E 3F4F0D0A <1> 1183 <1> %endif 1184 <1> %if _BOOTLDR 1185 00001972 20426F6F74206C6F61- <1> db " Boot loading",9, "?BOOT",13,10 1185 0000197B 64696E67093F424F4F- <1> 1185 00001984 540D0A <1> 1186 <1> %endif 1187 <1> %endif 1188 00001987 206C44656275672062- <1> db " lDebug build",9, "?BUILD",13,10 1188 00001990 75696C64093F425549- <1> 1188 00001999 4C440D0A <1> 1189 0000199D 206C44656275672062- <1> db " lDebug build",9, "?B",13,10 1189 000019A6 75696C64093F420D0A <1> 1190 <1> %if _EXTHELP 1191 000019AF 206C44656275672073- <1> db " lDebug sources",9, "?SOURCE",13,10 1191 000019B8 6F7572636573093F53- <1> 1191 000019C1 4F555243450D0A <1> 1192 000019C8 206C4465627567206C- <1> db " lDebug license",9, "?L",13,10 1192 000019D1 6963656E7365093F4C- <1> 1192 000019DA 0D0A <1> 1193 <1> %endif 1194 <1> %if _PM 1195 000019DC 0D0A <1> db 13,10 1196 000019DE 50726F6D7074733A20- <1> db "Prompts: '-' = real or V86 mode; '#' = protected mode",13,10 1196 000019E7 272D27203D20726561- <1> 1196 000019F0 6C206F722056383620- <1> 1196 000019F9 6D6F64653B20272327- <1> 1196 00001A02 203D2070726F746563- <1> 1196 00001A0B 746564206D6F64650D- <1> 1196 00001A14 0A <1> 1197 <1> %endif 1198 00001A15 00 <1> asciz 1199 <1> 1200 <1> %if _EXTHELP 1201 00001A16 534F5552434500 <1> .source:asciz "SOURCE" 1202 <1> .help_source: 1203 00001A1D 546865206F72696769- <1> db "The original lDebug sources can be obtained from the repo located at",13,10 1203 00001A26 6E616C206C44656275- <1> 1203 00001A2F 6720736F7572636573- <1> 1203 00001A38 2063616E206265206F- <1> 1203 00001A41 627461696E65642066- <1> 1203 00001A4A 726F6D207468652072- <1> 1203 00001A53 65706F206C6F636174- <1> 1203 00001A5C 65642061740D0A <1> 1204 00001A63 68747470733A2F2F68- <1> db "https://hg.pushbx.org/ecm/ldebug (E. C. Masloch's repo)",13,10 1204 00001A6C 672E7075736862782E- <1> 1204 00001A75 6F72672F65636D2F6C- <1> 1204 00001A7E 64656275672028452E- <1> 1204 00001A87 20432E204D61736C6F- <1> 1204 00001A90 63682773207265706F- <1> 1204 00001A99 290D0A <1> 1205 00001A9C 0D0A <1> db 13,10 1206 00001A9E 52656C656173657320- <1> db "Releases of lDebug are available via the website at",13,10 1206 00001AA7 6F66206C4465627567- <1> 1206 00001AB0 206172652061766169- <1> 1206 00001AB9 6C61626C6520766961- <1> 1206 00001AC2 207468652077656273- <1> 1206 00001ACB 6974652061740D0A <1> 1207 00001AD3 68747470733A2F2F70- <1> db "https://pushbx.org/ecm/web/#projects-ldebug",13,10 1207 00001ADC 75736862782E6F7267- <1> 1207 00001AE5 2F65636D2F7765622F- <1> 1207 00001AEE 2370726F6A65637473- <1> 1207 00001AF7 2D6C64656275670D0A <1> 1208 00001B00 0D0A <1> db 13,10 1209 00001B02 546865206D6F737420- <1> db "The most recent manual is hosted at https://pushbx.org/ecm/doc/ in the",13,10 1209 00001B0B 726563656E74206D61- <1> 1209 00001B14 6E75616C2069732068- <1> 1209 00001B1D 6F7374656420617420- <1> 1209 00001B26 68747470733A2F2F70- <1> 1209 00001B2F 75736862782E6F7267- <1> 1209 00001B38 2F65636D2F646F632F- <1> 1209 00001B41 20696E207468650D0A <1> 1210 00001B4A 66696C6573206C6465- <1> db "files ldebug.htm, ldebug.txt, and ldebug.pdf",13,10 1210 00001B53 6275672E68746D2C20- <1> 1210 00001B5C 6C64656275672E7478- <1> 1210 00001B65 742C20616E64206C64- <1> 1210 00001B6E 656275672E7064660D- <1> 1210 00001B77 0A <1> 1211 00001B78 00 <1> asciz 1212 <1> %endif 1213 <1> 1214 <1> .re: 1215 00001B79 524500 <1> asciz "RE" 1216 <1> .help_re: 1217 00001B7C 5468652052554E2063- <1> db "The RUN commands (T, TP, P, G) and the RE command use the RE command",13,10 1217 00001B85 6F6D6D616E64732028- <1> 1217 00001B8E 542C2054502C20502C- <1> 1217 00001B97 20472920616E642074- <1> 1217 00001BA0 686520524520636F6D- <1> 1217 00001BA9 6D616E642075736520- <1> 1217 00001BB2 74686520524520636F- <1> 1217 00001BBB 6D6D616E640D0A <1> 1218 00001BC2 62756666657220746F- <1> db "buffer to run commands. Most commands are allowed to be run from the",13,10 1218 00001BCB 2072756E20636F6D6D- <1> 1218 00001BD4 616E64732E204D6F73- <1> 1218 00001BDD 7420636F6D6D616E64- <1> 1218 00001BE6 732061726520616C6C- <1> 1218 00001BEF 6F77656420746F2062- <1> 1218 00001BF8 652072756E2066726F- <1> 1218 00001C01 6D207468650D0A <1> 1219 00001C08 524520627566666572- <1> db "RE buffer. Disallowed commands include program-loading L, A, E that",13,10 1219 00001C11 2E20446973616C6C6F- <1> 1219 00001C1A 77656420636F6D6D61- <1> 1219 00001C23 6E647320696E636C75- <1> 1219 00001C2C 64652070726F677261- <1> 1219 00001C35 6D2D6C6F6164696E67- <1> 1219 00001C3E 204C2C20412C204520- <1> 1219 00001C47 746861740D0A <1> 1220 00001C4D 737769746368657320- <1> db "switches the line input mode, TSR, Q, Y, RE, and further RUN commands.",13,10 1220 00001C56 746865206C696E6520- <1> 1220 00001C5F 696E707574206D6F64- <1> 1220 00001C68 652C205453522C2051- <1> 1220 00001C71 2C20592C2052452C20- <1> 1220 00001C7A 616E64206675727468- <1> 1220 00001C83 65722052554E20636F- <1> 1220 00001C8C 6D6D616E64732E0D0A <1> 1221 00001C95 5768656E2074686520- <1> db "When the RE buffer is used as input during T, TP, or P with either",13,10 1221 00001C9E 524520627566666572- <1> 1221 00001CA7 206973207573656420- <1> 1221 00001CB0 617320696E70757420- <1> 1221 00001CB9 647572696E6720542C- <1> 1221 00001CC2 2054502C206F722050- <1> 1221 00001CCB 207769746820656974- <1> 1221 00001CD4 6865720D0A <1> 1222 00001CD9 6F6620746865205748- <1> db "of the WHILE or SILENT keywords, commands that use the auxbuff are",13,10 1222 00001CE2 494C45206F72205349- <1> 1222 00001CEB 4C454E54206B657977- <1> 1222 00001CF4 6F7264732C20636F6D- <1> 1222 00001CFD 6D616E647320746861- <1> 1222 00001D06 742075736520746865- <1> 1222 00001D0F 206175786275666620- <1> 1222 00001D18 6172650D0A <1> 1223 00001D1D 616C736F2064697361- <1> db "also disallowed and will emit an error noting the conflict.",13,10 1223 00001D26 6C6C6F77656420616E- <1> 1223 00001D2F 642077696C6C20656D- <1> 1223 00001D38 697420616E20657272- <1> 1223 00001D41 6F72206E6F74696E67- <1> 1223 00001D4A 2074686520636F6E66- <1> 1223 00001D53 6C6963742E0D0A <1> 1224 00001D5A 0D0A <1> db 13,10 1225 00001D5C 52452E4C4953542073- <1> db "RE.LIST shows the current RE buffer contents in a format usable by",13,10 1225 00001D65 686F77732074686520- <1> 1225 00001D6E 63757272656E742052- <1> 1225 00001D77 452062756666657220- <1> 1225 00001D80 636F6E74656E747320- <1> 1225 00001D89 696E206120666F726D- <1> 1225 00001D92 617420757361626C65- <1> 1225 00001D9B 2062790D0A <1> 1226 00001DA0 746865206F74686572- <1> db "the other RE commands. RE.APPEND appends the following commands to",13,10 1226 00001DA9 20524520636F6D6D61- <1> 1226 00001DB2 6E64732E2052452E41- <1> 1226 00001DBB 5050454E4420617070- <1> 1226 00001DC4 656E64732074686520- <1> 1226 00001DCD 666F6C6C6F77696E67- <1> 1226 00001DD6 20636F6D6D616E6473- <1> 1226 00001DDF 20746F0D0A <1> 1227 00001DE4 746865206275666665- <1> db "the buffer, if they fit. RE.REPLACE appends to the start of the",13,10 1227 00001DED 722C20696620746865- <1> 1227 00001DF6 79206669742E205245- <1> 1227 00001DFF 2E5245504C41434520- <1> 1227 00001E08 617070656E64732074- <1> 1227 00001E11 6F2074686520737461- <1> 1227 00001E1A 7274206F6620746865- <1> 1227 00001E23 0D0A <1> 1228 00001E25 6275666665722E2057- <1> db "buffer. When specifying commands, an unescaped semicolon is parsed",13,10 1228 00001E2E 68656E207370656369- <1> 1228 00001E37 6679696E6720636F6D- <1> 1228 00001E40 6D616E64732C20616E- <1> 1228 00001E49 20756E657363617065- <1> 1228 00001E52 642073656D69636F6C- <1> 1228 00001E5B 6F6E20697320706172- <1> 1228 00001E64 7365640D0A <1> 1229 00001E69 61732061206C696E65- <1> db "as a linebreak to break apart individual commands. Backslashes can",13,10 1229 00001E72 627265616B20746F20- <1> 1229 00001E7B 627265616B20617061- <1> 1229 00001E84 727420696E64697669- <1> 1229 00001E8D 6475616C20636F6D6D- <1> 1229 00001E96 616E64732E20426163- <1> 1229 00001E9F 6B736C617368657320- <1> 1229 00001EA8 63616E0D0A <1> 1230 00001EAD 626520757365642074- <1> db "be used to escape semicolons and backslashes themselves.",13,10 1230 00001EB6 6F2065736361706520- <1> 1230 00001EBF 73656D69636F6C6F6E- <1> 1230 00001EC8 7320616E6420626163- <1> 1230 00001ED1 6B736C617368657320- <1> 1230 00001EDA 7468656D73656C7665- <1> 1230 00001EE3 732E0D0A <1> 1231 00001EE7 0D0A <1> db 13,10 1232 00001EE9 507265666978696E67- <1> db "Prefixing a line with an @ (AT sign) causes the command not to be",13,10 1232 00001EF2 2061206C696E652077- <1> 1232 00001EFB 69746820616E204020- <1> 1232 00001F04 284154207369676E29- <1> 1232 00001F0D 206361757365732074- <1> 1232 00001F16 686520636F6D6D616E- <1> 1232 00001F1F 64206E6F7420746F20- <1> 1232 00001F28 62650D0A <1> 1233 00001F2C 73686F776E20746F20- <1> db "shown to the standard output of the debugger when run. Otherwise,",13,10 1233 00001F35 746865207374616E64- <1> 1233 00001F3E 617264206F75747075- <1> 1233 00001F47 74206F662074686520- <1> 1233 00001F50 646562756767657220- <1> 1233 00001F59 7768656E2072756E2E- <1> 1233 00001F62 204F74686572776973- <1> 1233 00001F6B 652C0D0A <1> 1234 00001F6F 74686520636F6D6D61- <1> db "the command will be shown with a percent sign % or ~% prompt.",13,10 1234 00001F78 6E642077696C6C2062- <1> 1234 00001F81 652073686F776E2077- <1> 1234 00001F8A 697468206120706572- <1> 1234 00001F93 63656E74207369676E- <1> 1234 00001F9C 2025206F72207E2520- <1> 1234 00001FA5 70726F6D70742E0D0A <1> 1235 00001FAE 0D0A <1> db 13,10 1236 00001FB0 546865206465666175- <1> db "The default RE buffer content is @R. This content is also",13,10 1236 00001FB9 6C7420524520627566- <1> 1236 00001FC2 66657220636F6E7465- <1> 1236 00001FCB 6E742069732040522E- <1> 1236 00001FD4 205468697320636F6E- <1> 1236 00001FDD 74656E742069732061- <1> 1236 00001FE6 6C736F0D0A <1> 1237 00001FEB 646574656374656420- <1> db "detected and handled specifically; if found as the only command",13,10 1237 00001FF4 616E642068616E646C- <1> 1237 00001FFD 656420737065636966- <1> 1237 00002006 6963616C6C793B2069- <1> 1237 0000200F 6620666F756E642061- <1> 1237 00002018 7320746865206F6E6C- <1> 1237 00002021 7920636F6D6D616E64- <1> 1237 0000202A 0D0A <1> 1238 0000202C 7468652068616E646C- <1> db "the handler directly calls the register dump implementation",13,10 1238 00002035 657220646972656374- <1> 1238 0000203E 6C792063616C6C7320- <1> 1238 00002047 746865207265676973- <1> 1238 00002050 7465722064756D7020- <1> 1238 00002059 696D706C656D656E74- <1> 1238 00002062 6174696F6E0D0A <1> 1239 00002069 776974686F75742073- <1> db "without setting up and tearing down the special execution",13,10 1239 00002072 657474696E67207570- <1> 1239 0000207B 20616E642074656172- <1> 1239 00002084 696E6720646F776E20- <1> 1239 0000208D 746865207370656369- <1> 1239 00002096 616C20657865637574- <1> 1239 0000209F 696F6E0D0A <1> 1240 000020A4 656E7669726F6E6D65- <1> db "environment used to run arbitrary commands from the RE buffer.",13,10 1240 000020AD 6E7420757365642074- <1> 1240 000020B6 6F2072756E20617262- <1> 1240 000020BF 69747261727920636F- <1> 1240 000020C8 6D6D616E6473206672- <1> 1240 000020D1 6F6D20746865205245- <1> 1240 000020DA 206275666665722E0D- <1> 1240 000020E3 0A <1> 1241 000020E4 00 <1> asciz 1242 <1> 1243 <1> .run: 1244 000020E5 52554E00 <1> asciz "RUN" 1245 <1> .help_run: 1246 000020E9 542028747261636529- <1> db "T (trace), TP (trace except proceed past string operations), and P (proceed)",13,10 1246 000020F2 2C2054502028747261- <1> 1246 000020FB 636520657863657074- <1> 1246 00002104 2070726F6365656420- <1> 1246 0000210D 706173742073747269- <1> 1246 00002116 6E67206F7065726174- <1> 1246 0000211F 696F6E73292C20616E- <1> 1246 00002128 642050202870726F63- <1> 1246 00002131 656564290D0A <1> 1247 00002137 63616E20626520666F- <1> db "can be followed by a number of repetitions and then the keyword WHILE,",13,10 1247 00002140 6C6C6F776564206279- <1> 1247 00002149 2061206E756D626572- <1> 1247 00002152 206F66207265706574- <1> 1247 0000215B 6974696F6E7320616E- <1> 1247 00002164 64207468656E207468- <1> 1247 0000216D 65206B6579776F7264- <1> 1247 00002176 205748494C452C0D0A <1> 1248 0000217F 7768696368206D7573- <1> db "which must be followed by a conditional expression.",13,10 1248 00002188 7420626520666F6C6C- <1> 1248 00002191 6F7765642062792061- <1> 1248 0000219A 20636F6E646974696F- <1> 1248 000021A3 6E616C206578707265- <1> 1248 000021AC 7373696F6E2E0D0A <1> 1249 000021B4 0D0A <1> db 13,10 1250 000021B6 5468652073656C6563- <1> db "The selected run command is repeated as many times as specified by the",13,10 1250 000021BF 7465642072756E2063- <1> 1250 000021C8 6F6D6D616E64206973- <1> 1250 000021D1 207265706561746564- <1> 1250 000021DA 206173206D616E7920- <1> 1250 000021E3 74696D657320617320- <1> 1250 000021EC 737065636966696564- <1> 1250 000021F5 206279207468650D0A <1> 1251 000021FE 6E756D6265722C206F- <1> db "number, or until the WHILE condition evaluates no longer to true.",13,10 1251 00002207 7220756E74696C2074- <1> 1251 00002210 6865205748494C4520- <1> 1251 00002219 636F6E646974696F6E- <1> 1251 00002222 206576616C75617465- <1> 1251 0000222B 73206E6F206C6F6E67- <1> 1251 00002234 657220746F20747275- <1> 1251 0000223D 652E0D0A <1> 1252 00002241 0D0A <1> db 13,10 1253 00002243 416674657220746865- <1> db "After the number of repetitions or (if present) after the WHILE condition",13,10 1253 0000224C 206E756D626572206F- <1> 1253 00002255 662072657065746974- <1> 1253 0000225E 696F6E73206F722028- <1> 1253 00002267 69662070726573656E- <1> 1253 00002270 742920616674657220- <1> 1253 00002279 746865205748494C45- <1> 1253 00002282 20636F6E646974696F- <1> 1253 0000228B 6E0D0A <1> 1254 0000228E 746865206B6579776F- <1> db "the keyword SILENT may follow. If that is the case, all register dumps",13,10 1254 00002297 72642053494C454E54- <1> 1254 000022A0 206D617920666F6C6C- <1> 1254 000022A9 6F772E204966207468- <1> 1254 000022B2 617420697320746865- <1> 1254 000022BB 20636173652C20616C- <1> 1254 000022C4 6C2072656769737465- <1> 1254 000022CD 722064756D70730D0A <1> 1255 000022D6 646F6E652064757269- <1> db "done during the run are buffered by the debugger and the run remains",13,10 1255 000022DF 6E6720746865207275- <1> 1255 000022E8 6E2061726520627566- <1> 1255 000022F1 666572656420627920- <1> 1255 000022FA 746865206465627567- <1> 1255 00002303 67657220616E642074- <1> 1255 0000230C 68652072756E207265- <1> 1255 00002315 6D61696E730D0A <1> 1256 0000231C 73696C656E742E2041- <1> db "silent. After the run, the last dumps are replayed from the buffer",13,10 1256 00002325 667465722074686520- <1> 1256 0000232E 72756E2C2074686520- <1> 1256 00002337 6C6173742064756D70- <1> 1256 00002340 732061726520726570- <1> 1256 00002349 6C617965642066726F- <1> 1256 00002352 6D2074686520627566- <1> 1256 0000235B 6665720D0A <1> 1257 00002360 616E6420646973706C- <1> db "and displayed. At most as many dumps as fit into the buffer are",13,10 1257 00002369 617965642E20417420- <1> 1257 00002372 6D6F7374206173206D- <1> 1257 0000237B 616E792064756D7073- <1> 1257 00002384 206173206669742069- <1> 1257 0000238D 6E746F207468652062- <1> 1257 00002396 756666657220617265- <1> 1257 0000239F 0D0A <1> 1258 000023A1 646973706C61796564- <1> db "displayed. (The buffer is currently up to 8 KiB sized.)",13,10 1258 000023AA 2E2028546865206275- <1> 1258 000023B3 666665722069732063- <1> 1258 000023BC 757272656E746C7920- <1> 1258 000023C5 757020746F2038204B- <1> 1258 000023CE 69422073697A65642E- <1> 1258 000023D7 290D0A <1> 1259 000023DA 0D0A <1> db 13,10 1260 000023DC 49662061206E756D62- <1> db "If a number follows behind the SILENT keyword, only at most that many",13,10 1260 000023E5 657220666F6C6C6F77- <1> 1260 000023EE 7320626568696E6420- <1> 1260 000023F7 7468652053494C454E- <1> 1260 00002400 54206B6579776F7264- <1> 1260 00002409 2C206F6E6C79206174- <1> 1260 00002412 206D6F737420746861- <1> 1260 0000241B 74206D616E790D0A <1> 1261 00002423 64756D707320617265- <1> db "dumps are displayed from the buffer. The dumps that are displayed",13,10 1261 0000242C 20646973706C617965- <1> 1261 00002435 642066726F6D207468- <1> 1261 0000243E 65206275666665722E- <1> 1261 00002447 205468652064756D70- <1> 1261 00002450 732074686174206172- <1> 1261 00002459 6520646973706C6179- <1> 1261 00002462 65640D0A <1> 1262 00002466 61726520616C776179- <1> db "are always those last written into the buffer, thus last occurred.",13,10 1262 0000246F 732074686F7365206C- <1> 1262 00002478 617374207772697474- <1> 1262 00002481 656E20696E746F2074- <1> 1262 0000248A 686520627566666572- <1> 1262 00002493 2C2074687573206C61- <1> 1262 0000249C 7374206F6363757272- <1> 1262 000024A5 65642E0D0A <1> 1263 000024AA 00 <1> asciz 1264 <1> 1265 000024AB 00 <1> align 2, db 0 1266 <1> .build_array: 1267 000024AC [BE24] <1> dw .build_nameversion 1268 000024AE [3E25] <1> dw .build_lmacros 1269 000024B0 [7E25] <1> dw .build_scanptab 1270 000024B2 [BE25] <1> dw .build_inicomp 1271 <1> %if _CHECKSUM 1272 <1> dw .build_inicheck 1273 <1> %endif 1274 000024B4 [FE25] <1> dw .build_ldosboot 1275 <1> .build_short_amount: equ ($ - .build_array) / 2 1276 000024B6 [3E26] <1> dw .build_long 1277 <1> .build_long_amount: equ ($ - .build_array) / 2 1278 <1> 1279 <1> .string_build: 1280 000024B8 4255494C4400 <1> asciz "BUILD" 1281 <1> 1282 <1> .build_nameversion: 1283 000024BE 6C4465627567582028- <1> db _PROGNAME,_VERSION,13,10 1283 000024C7 323032322D30342D31- <1> 1283 000024D0 38290D0A <1> 1284 <1> %ifnidn _REVISIONID,"" 1285 000024D4 536F7572636520436F- <1> db "Source Control Revision ID: ",_REVISIONID,13,10 1285 000024DD 6E74726F6C20526576- <1> 1285 000024E6 6973696F6E2049443A- <1> 1285 000024EF 206867206636363936- <1> 1285 000024F8 363061663261312028- <1> 1285 00002501 3236373920616E6365- <1> 1285 0000250A 73746F7273290D0A <1> 1286 <1> %endif 1287 00002512 00 <1> asciz 1288 00002513 00 <1> _fill 128, 0, .build_nameversion 1289 <1> .build_lmacros: 1290 0000253E 55736573206C6D6163- <1> fill 64, 0, asciz _REVISIONID_LMACROS 1290 00002547 726F733A2020526576- <1> 1290 00002550 6973696F6E20494420- <1> 1290 00002559 686720396661306536- <1> 1290 00002562 343033346364202831- <1> 1290 0000256B 353020616E63657374- <1> 1290 00002574 6F7273290D0A0000- <1> 1290 00002574 <1> 1291 <1> .build_scanptab: 1292 0000257E 55736573207363616E- <1> fill 64, 0, asciz _REVISIONID_SCANPTAB 1292 00002587 707461623A20526576- <1> 1292 00002590 6973696F6E20494420- <1> 1292 00002599 686720306535333038- <1> 1292 000025A2 316331353331202831- <1> 1292 000025AB 3020616E636573746F- <1> 1292 000025B4 7273290D0A0000- <1> 1292 000025B4 <1> 1293 <1> .build_inicomp: 1294 000025BE 5573657320696E6963- <1> fill 64, 0, asciz _REVISIONID_INICOMP 1294 000025C7 6F6D703A2020526576- <1> 1294 000025D0 6973696F6E20494420- <1> 1294 000025D9 686720363433313030- <1> 1294 000025E2 646533363934202835- <1> 1294 000025EB 333220616E63657374- <1> 1294 000025F4 6F7273290D0A0000- <1> 1294 000025F4 <1> 1295 <1> %if _CHECKSUM 1296 <1> .build_inicheck: 1297 <1> fill 64, 0, asciz _REVISIONID_INICHECK 1298 <1> %endif 1299 <1> .build_ldosboot: 1300 000025FE 55736573206C646F73- <1> fill 64, 0, asciz _REVISIONID_LDOSBOOT 1300 00002607 626F6F743A20526576- <1> 1300 00002610 6973696F6E20494420- <1> 1300 00002619 686720306435346665- <1> 1300 00002622 346161613036202835- <1> 1300 0000262B 373120616E63657374- <1> 1300 00002634 6F7273290D0A0000- <1> 1300 00002634 <1> 1301 <1> 1302 <1> .build_long: 1303 <1> %if _EXTHELP 1304 0000263E 0D0A <1> db 13,10 1305 <1> %if _PM 1306 00002640 44504D492D63617061- <1> db "DPMI-capable",13,10 1306 00002649 626C650D0A <1> 1307 <1> %if _NOEXTENDER 1308 0000264E 2044504D4920686F73- <1> db " DPMI host without extender",13,10 1308 00002657 7420776974686F7574- <1> 1308 00002660 20657874656E646572- <1> 1308 00002669 0D0A <1> 1309 <1> %endif 1310 <1> %if 0 1311 <1> %if _WIN9XSUPP 1312 <1> db " No Windows 4 DPMI hook",13,10 1313 <1> %endif 1314 <1> %if _PM && _DOSEMU 1315 <1> db " No DOSEMU DPMI hook",13,10 1316 <1> %endif 1317 <1> %else 1318 0000266B 204175746F6D617469- <1> db " Automatic DPMI entrypoint hook detection",13,10 1318 00002674 632044504D4920656E- <1> 1318 0000267D 747279706F696E7420- <1> 1318 00002686 686F6F6B2064657465- <1> 1318 0000268F 6374696F6E0D0A <1> 1319 <1> %endif 1320 <1> %if _EXCCSIP 1321 00002696 20446973706C617920- <1> db " Display exception address",13,10 1321 0000269F 657863657074696F6E- <1> 1321 000026A8 20616464726573730D- <1> 1321 000026B1 0A <1> 1322 <1> %endif 1323 <1> %if _DISPHOOK 1324 000026B2 20446973706C617920- <1> db " Display hooking DPMI entry",13,10 1324 000026BB 686F6F6B696E672044- <1> 1324 000026C4 504D4920656E747279- <1> 1324 000026CD 0D0A <1> 1325 <1> %endif 1326 <1> %endif 1327 <1> %if _DEBUG 1328 <1> db "Debuggable",13,10 1329 <1> %endif 1330 <1> %if _INT 1331 000026CF 444920636F6D6D616E- <1> db "DI command",13,10 1331 000026D8 640D0A <1> 1332 <1> %endif 1333 <1> %if _MCB 1334 000026DB 444D20636F6D6D616E- <1> db "DM command",13,10 1334 000026E4 640D0A <1> 1335 <1> %endif 1336 <1> %if _DSTRINGS 1337 000026E7 4420737472696E6720- <1> db "D string commands",13,10 1337 000026F0 636F6D6D616E64730D- <1> 1337 000026F9 0A <1> 1338 <1> %endif 1339 <1> %if _SDUMP 1340 000026FA 53206D617463682064- <1> db "S match dumps line of following data",13,10 1340 00002703 756D7073206C696E65- <1> 1340 0000270C 206F6620666F6C6C6F- <1> 1340 00002715 77696E672064617461- <1> 1340 0000271E 0D0A <1> 1341 <1> %endif 1342 <1> %if _RN 1343 00002720 524E20636F6D6D616E- <1> db "RN command",13,10 1343 00002729 640D0A <1> 1344 <1> %endif 1345 <1> %if _USESDA 1346 0000272C 416363657373205344- <1> db "Access SDA current PSP field",13,10 1346 00002735 412063757272656E74- <1> 1346 0000273E 20505350206669656C- <1> 1346 00002747 640D0A <1> 1347 <1> %endif 1348 <1> %if _VDD 1349 0000274A 4C6F6164204E545644- <1> db "Load NTVDM VDD for sector access",13,10 1349 00002753 4D2056444420666F72- <1> 1349 0000275C 20736563746F722061- <1> 1349 00002765 63636573730D0A <1> 1350 <1> %endif 1351 <1> %if _EMS 1352 0000276C 5820636F6D6D616E64- <1> db "X commands for EMS access",13,10 1352 00002775 7320666F7220454D53- <1> 1352 0000277E 206163636573730D0A <1> 1353 <1> %endif 1354 <1> %if _MMXSUPP 1355 00002787 524D20636F6D6D616E- <1> db "RM command and reading MMX registers as variables",13,10 1355 00002790 6420616E6420726561- <1> 1355 00002799 64696E67204D4D5820- <1> 1355 000027A2 726567697374657273- <1> 1355 000027AB 206173207661726961- <1> 1355 000027B4 626C65730D0A <1> 1356 <1> %endif 1357 <1> %if _EXPRESSIONS 1358 000027BA 45787072657373696F- <1> db "Expression evaluator",13,10 1358 000027C3 6E206576616C756174- <1> 1358 000027CC 6F720D0A <1> 1359 <1> %endif 1360 <1> %if _INDIRECTION 1361 000027D0 20496E646972656374- <1> db " Indirection in expressions",13,10 1361 000027D9 696F6E20696E206578- <1> 1361 000027E2 7072657373696F6E73- <1> 1361 000027EB 0D0A <1> 1362 <1> %endif 1363 <1> %if _VARIABLES 1364 000027ED 5661726961626C6573- <1> db "Variables with user-defined purpose",13,10 1364 000027F6 207769746820757365- <1> 1364 000027FF 722D646566696E6564- <1> 1364 00002808 20707572706F73650D- <1> 1364 00002811 0A <1> 1365 <1> %endif 1366 <1> %if _OPTIONS 1367 00002812 446562756767657220- <1> db "Debugger option and status variables",13,10 1367 0000281B 6F7074696F6E20616E- <1> 1367 00002824 642073746174757320- <1> 1367 0000282D 7661726961626C6573- <1> 1367 00002836 0D0A <1> 1368 <1> %endif 1369 <1> %if _PSPVARIABLES 1370 00002838 505350207661726961- <1> db "PSP variables",13,10 1370 00002841 626C65730D0A <1> 1371 <1> %endif 1372 <1> %if _COND 1373 00002847 436F6E646974696F6E- <1> db "Conditional jump notice in register dump",13,10 1373 00002850 616C206A756D70206E- <1> 1373 00002859 6F7469636520696E20- <1> 1373 00002862 726567697374657220- <1> 1373 0000286B 64756D700D0A <1> 1374 <1> %endif 1375 <1> %if _TSR 1376 00002871 545352206D6F646520- <1> db "TSR mode (Process detachment)",13,10 1376 0000287A 2850726F6365737320- <1> 1376 00002883 6465746163686D656E- <1> 1376 0000288C 74290D0A <1> 1377 <1> %endif 1378 <1> %if _DEVICE 1379 <1> db "Loadable device driver",13,10 1380 <1> %endif 1381 <1> %if _BOOTLDR 1382 00002890 426F6F74206C6F6164- <1> db "Boot loader",13,10 1382 00002899 65720D0A <1> 1383 <1> %endif 1384 <1> %if _BREAKPOINTS 1385 0000289D 5065726D616E656E74- <1> db "Permanent breakpoints",13,10 1385 000028A6 20627265616B706F69- <1> 1385 000028AF 6E74730D0A <1> 1386 <1> %endif 1387 <1> %push 1388 000028B4 496E74657263657074- <1> db "Intercepted" 1388 000028BD 6564 <1> 1389 <1> %if _PM 1390 000028BF 2038364D <1> db " 86M" 1391 <1> %endif 1392 000028C3 20696E746572727570- <1> db " interrupts:" 1392 000028CC 74733A <1> 1393 <1> %define %$pref " " 1394 <1> %macro dispint 2.nolist 1395 <1> %if %1 1396 <1> db %$pref, %2 1397 <1> %define %$pref ", " 1398 <1> %endif 1399 <1> %endmacro 1400 000028CF 203030 <1> dispint _CATCHINT00, "00" 1401 000028D2 2C203031 <1> dispint _CATCHINT01, "01" 1402 000028D6 2C203033 <1> dispint _CATCHINT03, "03" 1403 000028DA 2C203036 <1> dispint _CATCHINT06, "06" 1404 000028DE 2C203138 <1> dispint _CATCHINT18, "18" 1405 000028E2 2C203139 <1> dispint _CATCHINT19, "19" 1406 <1> %ifidn %$pref," " 1407 <1> db " none" 1408 <1> %endif 1409 000028E6 0D0A <1> db 13,10 1410 <1> %if _PM || _CATCHINT08 1411 000028E8 50726F636573736564 <1> db "Processed" 1412 <1> %if _PM 1413 000028F1 2038364D <1> db " 86M" 1414 <1> %endif 1415 000028F5 20696E746572727570- <1> db " interrupts:" 1415 000028FE 74733A <1> 1416 <1> %define %$pref " " 1417 00002901 203038 <1> dispint _CATCHINT08, "08" 1418 00002904 2C2032462E31363837 <1> dispint _PM, "2F.1687" 1419 <1> %ifidn %$pref," " 1420 <1> db " none" 1421 <1> %endif 1422 0000290D 0D0A <1> db 13,10 1423 <1> %endif 1424 <1> %if _PM 1425 0000290F 496E74657263657074- <1> db "Intercepted DPMI exceptions:" 1425 00002918 65642044504D492065- <1> 1425 00002921 7863657074696F6E73- <1> 1425 0000292A 3A <1> 1426 <1> %define %$pref " " 1427 0000292B 203030 <1> dispint _CATCHEXC00, "00" 1428 0000292E 2C203031 <1> dispint _CATCHEXC01, "01" 1429 00002932 2C203033 <1> dispint _CATCHEXC03, "03" 1430 00002936 2C203036 <1> dispint _CATCHEXC06, "06" 1431 0000293A 2C203043 <1> dispint _CATCHEXC0C, "0C" 1432 0000293E 2C203044 <1> dispint _CATCHEXC0D, "0D" 1433 00002942 2C203045 <1> dispint _CATCHEXC0E, "0E" 1434 <1> %ifidn %$pref," " 1435 <1> db " none" 1436 <1> %endif 1437 00002946 0D0A <1> db 13,10 1438 <1> %endif 1439 <1> %unmacro dispint 2.nolist 1440 <1> %pop 1441 <1> %if _PM && _CATCHPMINT214C 1442 00002948 50726F636573736564- <1> db "Processed DPMI interrupts: 21.4C",13,10 1442 00002951 2044504D4920696E74- <1> 1442 0000295A 657272757074733A20- <1> 1442 00002963 32312E34430D0A <1> 1443 <1> %endif 1444 <1> %if _EXTHELP 1445 0000296A 457874656E64656420- <1> db "Extended built-in help pages",13,10 1445 00002973 6275696C742D696E20- <1> 1445 0000297C 68656C702070616765- <1> 1445 00002985 730D0A <1> 1446 <1> %endif 1447 <1> %if _ONLYNON386 1448 <1> db "Only supports non-386 operation",13,10 1449 <1> %endif 1450 <1> %if _ONLY386 1451 <1> db "Only supports 386+ operation",13,10 1452 <1> %endif 1453 <1> %else 1454 <1> %if _BOOTLDR 1455 <1> asciz 1456 <1> ; This message is used by mak.sh to detect that we 1457 <1> ; are building with boot load support. 1458 <1> db 13,10,"Boot loader",13,10 1459 <1> %endif 1460 <1> %endif 1461 00002988 00 <1> asciz 1462 <1> 1463 <1> %if _EXTHELP 1464 <1> .license: 1465 00002989 6C4465627567202D20- <1> db "lDebug - libre 86-DOS debugger",13,10 1465 00002992 6C696272652038362D- <1> 1465 0000299B 444F53206465627567- <1> 1465 000029A4 6765720D0A <1> 1466 000029A9 0D0A <1> db 13,10 1467 000029AB 436F70797269676874- <1> db "Copyright (C) 1995-2003 Paul Vojta",13,10 1467 000029B4 202843292031393935- <1> 1467 000029BD 2D3230303320506175- <1> 1467 000029C6 6C20566F6A74610D0A <1> 1468 000029CF 436F70797269676874- <1> db "Copyright (C) 2008-2021 C. Masloch",13,10 1468 000029D8 202843292032303038- <1> 1468 000029E1 2D3230323120432E20- <1> 1468 000029EA 4D61736C6F63680D0A <1> 1469 000029F3 0D0A <1> db 13,10 1470 000029F5 5573616765206F6620- <1> db "Usage of the works is permitted provided that this",13,10 1470 000029FE 74686520776F726B73- <1> 1470 00002A07 206973207065726D69- <1> 1470 00002A10 747465642070726F76- <1> 1470 00002A19 696465642074686174- <1> 1470 00002A22 20746869730D0A <1> 1471 00002A29 696E737472756D656E- <1> db "instrument is retained with the works, so that any entity",13,10 1471 00002A32 742069732072657461- <1> 1471 00002A3B 696E65642077697468- <1> 1471 00002A44 2074686520776F726B- <1> 1471 00002A4D 732C20736F20746861- <1> 1471 00002A56 7420616E7920656E74- <1> 1471 00002A5F 6974790D0A <1> 1472 00002A64 746861742075736573- <1> db "that uses the works is notified of this instrument.",13,10 1472 00002A6D 2074686520776F726B- <1> 1472 00002A76 73206973206E6F7469- <1> 1472 00002A7F 66696564206F662074- <1> 1472 00002A88 68697320696E737472- <1> 1472 00002A91 756D656E742E0D0A <1> 1473 00002A99 0D0A <1> db 13,10 1474 00002A9B 444953434C41494D45- <1> db "DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY.",13,10 1474 00002AA4 523A2054484520574F- <1> 1474 00002AAD 524B53204152452057- <1> 1474 00002AB6 4954484F5554205741- <1> 1474 00002ABF 5252414E54592E0D0A <1> 1475 00002AC8 0D0A <1> db 13,10 1476 00002ACA 0D0A <1> db 13,10 1477 00002ACC 416C6C20636F6E7472- <1> db "All contributions by Paul Vojta or C. Masloch to the debugger are available",13,10 1477 00002AD5 69627574696F6E7320- <1> 1477 00002ADE 6279205061756C2056- <1> 1477 00002AE7 6F6A7461206F722043- <1> 1477 00002AF0 2E204D61736C6F6368- <1> 1477 00002AF9 20746F207468652064- <1> 1477 00002B02 656275676765722061- <1> 1477 00002B0B 726520617661696C61- <1> 1477 00002B14 626C650D0A <1> 1478 00002B19 756E64657220612063- <1> db "under a choice of three different licenses. These are the Fair License, the",13,10 1478 00002B22 686F696365206F6620- <1> 1478 00002B2B 746872656520646966- <1> 1478 00002B34 666572656E74206C69- <1> 1478 00002B3D 63656E7365732E2054- <1> 1478 00002B46 686573652061726520- <1> 1478 00002B4F 746865204661697220- <1> 1478 00002B58 4C6963656E73652C20- <1> 1478 00002B61 7468650D0A <1> 1479 00002B66 53696D706C69666965- <1> db "Simplified 2-Clause BSD License, or the MIT License.",13,10 1479 00002B6F 6420322D436C617573- <1> 1479 00002B78 6520425344204C6963- <1> 1479 00002B81 656E73652C206F7220- <1> 1479 00002B8A 746865204D4954204C- <1> 1479 00002B93 6963656E73652E0D0A <1> 1480 00002B9C 0D0A <1> db 13,10 1481 00002B9E 546869732069732074- <1> db "This is the license and copyright information that applies to lDebug; but note",13,10 1481 00002BA7 6865206C6963656E73- <1> 1481 00002BB0 6520616E6420636F70- <1> 1481 00002BB9 79726967687420696E- <1> 1481 00002BC2 666F726D6174696F6E- <1> 1481 00002BCB 207468617420617070- <1> 1481 00002BD4 6C69657320746F206C- <1> 1481 00002BDD 44656275673B206275- <1> 1481 00002BE6 74206E6F74650D0A <1> 1482 00002BEE 746861742074686572- <1> db "that there have been substantial contributions to the code base that are not",13,10 1482 00002BF7 652068617665206265- <1> 1482 00002C00 656E20737562737461- <1> 1482 00002C09 6E7469616C20636F6E- <1> 1482 00002C12 747269627574696F6E- <1> 1482 00002C1B 7320746F2074686520- <1> 1482 00002C24 636F64652062617365- <1> 1482 00002C2D 207468617420617265- <1> 1482 00002C36 206E6F740D0A <1> 1483 00002C3C 636F70797269676874- <1> db "copyrighted (public domain).",13,10 1483 00002C45 656420287075626C69- <1> 1483 00002C4E 6320646F6D61696E29- <1> 1483 00002C57 2E0D0A <1> 1484 00002C5A 00 <1> asciz 1485 <1> 1486 <1> .reghelp: 1487 00002C5B 417661696C61626C65- <1> db "Available 16-bit registers:",9,9,"Available 32-bit registers: (386+)",13,10 1487 00002C64 2031362D6269742072- <1> 1487 00002C6D 65676973746572733A- <1> 1487 00002C76 0909417661696C6162- <1> 1487 00002C7F 6C652033322D626974- <1> 1487 00002C88 207265676973746572- <1> 1487 00002C91 733A20283338362B29- <1> 1487 00002C9A 0D0A <1> 1488 00002C9C 415809416363756D75- <1> db "AX",9,"Accumulator",9,9,9,"EAX",13,10 1488 00002CA5 6C61746F7209090945- <1> 1488 00002CAE 41580D0A <1> 1489 00002CB2 425809426173652072- <1> db "BX",9,"Base register",9,9,9,"EBX",13,10 1489 00002CBB 656769737465720909- <1> 1489 00002CC4 094542580D0A <1> 1490 00002CCA 435809436F756E7465- <1> db "CX",9,"Counter",9,9,9,9,"ECX",13,10 1490 00002CD3 72090909094543580D- <1> 1490 00002CDC 0A <1> 1491 00002CDD 445809446174612072- <1> db "DX",9,"Data register",9,9,9,"EDX",13,10 1491 00002CE6 656769737465720909- <1> 1491 00002CEF 094544580D0A <1> 1492 00002CF5 535009537461636B20- <1> db "SP",9,"Stack pointer",9,9,9,"ESP",13,10 1492 00002CFE 706F696E7465720909- <1> 1492 00002D07 094553500D0A <1> 1493 00002D0D 425009426173652070- <1> db "BP",9,"Base pointer",9,9,9,"EBP",13,10 1493 00002D16 6F696E746572090909- <1> 1493 00002D1F 4542500D0A <1> 1494 00002D24 534909536F75726365- <1> db "SI",9,"Source index",9,9,9,"ESI",13,10 1494 00002D2D 20696E646578090909- <1> 1494 00002D36 4553490D0A <1> 1495 00002D3B 44490944657374696E- <1> db "DI",9,"Destination index",9,9,"EDI",13,10 1495 00002D44 6174696F6E20696E64- <1> 1495 00002D4D 657809094544490D0A <1> 1496 00002D56 445309446174612073- <1> db "DS",9,"Data segment",13,10 1496 00002D5F 65676D656E740D0A <1> 1497 00002D67 455309457874726120- <1> db "ES",9,"Extra segment",13,10 1497 00002D70 7365676D656E740D0A <1> 1498 00002D79 535309537461636B20- <1> db "SS",9,"Stack segment",13,10 1498 00002D82 7365676D656E740D0A <1> 1499 00002D8B 435309436F64652073- <1> db "CS",9,"Code segment",13,10 1499 00002D94 65676D656E740D0A <1> 1500 00002D9C 465309457874726120- <1> db "FS",9,"Extra segment 2 (386+)",13,10 1500 00002DA5 7365676D656E742032- <1> 1500 00002DAE 20283338362B290D0A <1> 1501 00002DB7 475309457874726120- <1> db "GS",9,"Extra segment 3 (386+)",13,10 1501 00002DC0 7365676D656E742033- <1> 1501 00002DC9 20283338362B290D0A <1> 1502 00002DD2 495009496E73747275- <1> db "IP",9,"Instruction pointer",9,9,"EIP",13,10 1502 00002DDB 6374696F6E20706F69- <1> 1502 00002DE4 6E7465720909454950- <1> 1502 00002DED 0D0A <1> 1503 00002DEF 464C09466C61677309- <1> db "FL",9,"Flags",9,9,9,9,"EFL",13,10 1503 00002DF8 09090945464C0D0A <1> 1504 00002E00 0D0A <1> db 13,10 1505 <1> %if _MMXSUPP && 0 1506 <1> db "Available 64-bit Matrix Math Extension (MMX) registers: (if supported)",13,10 1507 <1> db "MMx",9,"MM(x)",9,"MMX register x, where x is 0 to 7",13,10 1508 <1> db 13,10 1509 <1> %endif 1510 00002E02 456E746572203F4620- <1> db "Enter ?F to display the recognized flags.",13,10 1510 00002E0B 746F20646973706C61- <1> 1510 00002E14 792074686520726563- <1> 1510 00002E1D 6F676E697A65642066- <1> 1510 00002E26 6C6167732E0D0A <1> 1511 00002E2D 00 <1> asciz 1512 <1> 1513 <1> .flaghelp: 1514 00002E2E 5265636F676E697A65- <1> db "Recognized flags:",13,10 1514 00002E37 6420666C6167733A0D- <1> 1514 00002E40 0A <1> 1515 00002E41 56616C7565094E616D- <1> db "Value",9,"Name",9,9,9, " Set",9,9,9, " Clear",13,10 1515 00002E4A 650909092020536574- <1> 1515 00002E53 0909092020436C6561- <1> 1515 00002E5C 720D0A <1> 1516 00002E5F 3038303020204F4620- <1> db "0800 OF Overflow Flag",9,9,"OV Overflow",9,9, "NV No overflow",13,10 1516 00002E68 204F766572666C6F77- <1> 1516 00002E71 20466C616709094F56- <1> 1516 00002E7A 20204F766572666C6F- <1> 1516 00002E83 7709094E5620204E6F- <1> 1516 00002E8C 206F766572666C6F77- <1> 1516 00002E95 0D0A <1> 1517 00002E97 303430302020444620- <1> db "0400 DF Direction Flag",9,"DN Down",9,9, "UP Up",13,10 1517 00002EA0 20446972656374696F- <1> 1517 00002EA9 6E20466C616709444E- <1> 1517 00002EB2 2020446F776E090955- <1> 1517 00002EBB 50202055700D0A <1> 1518 00002EC2 303230302020494620- <1> db "0200 IF Interrupt Flag",9,"EI Enable interrupts",9,"DI Disable interrupts",13,10 1518 00002ECB 20496E746572727570- <1> 1518 00002ED4 7420466C6167094549- <1> 1518 00002EDD 2020456E61626C6520- <1> 1518 00002EE6 696E74657272757074- <1> 1518 00002EEF 730944492020446973- <1> 1518 00002EF8 61626C6520696E7465- <1> 1518 00002F01 7272757074730D0A <1> 1519 00002F09 303038302020534620- <1> db "0080 SF Sign Flag",9,9, "NG Negative",9,9, "PL Plus",13,10 1519 00002F12 205369676E20466C61- <1> 1519 00002F1B 6709094E4720204E65- <1> 1519 00002F24 676174697665090950- <1> 1519 00002F2D 4C2020506C75730D0A <1> 1520 00002F36 3030343020205A4620- <1> db "0040 ZF Zero Flag",9,9, "ZR Zero",9,9, "NZ Not zero",13,10 1520 00002F3F 205A65726F20466C61- <1> 1520 00002F48 6709095A5220205A65- <1> 1520 00002F51 726F09094E5A20204E- <1> 1520 00002F5A 6F74207A65726F0D0A <1> 1521 00002F63 303031302020414620- <1> db "0010 AF Auxiliary Flag",9,"AC Auxiliary carry",9,"NA No auxiliary carry",13,10 1521 00002F6C 20417578696C696172- <1> 1521 00002F75 7920466C6167094143- <1> 1521 00002F7E 2020417578696C6961- <1> 1521 00002F87 727920636172727909- <1> 1521 00002F90 4E4120204E6F206175- <1> 1521 00002F99 78696C696172792063- <1> 1521 00002FA2 617272790D0A <1> 1522 00002FA8 303030342020504620- <1> db "0004 PF Parity Flag",9,9, "PE Parity even",9,9, "PO Parity odd",13,10 1522 00002FB1 205061726974792046- <1> 1522 00002FBA 6C6167090950452020- <1> 1522 00002FC3 506172697479206576- <1> 1522 00002FCC 656E0909504F202050- <1> 1522 00002FD5 6172697479206F6464- <1> 1522 00002FDE 0D0A <1> 1523 00002FE0 303030312020434620- <1> db "0001 CF Carry Flag",9,9, "CY Carry",9,9, "NC No carry",13,10 1523 00002FE9 20436172727920466C- <1> 1523 00002FF2 616709094359202043- <1> 1523 00002FFB 6172727909094E4320- <1> 1523 00003004 204E6F206361727279- <1> 1523 0000300D 0D0A <1> 1524 0000300F 0D0A <1> db 13,10 1525 00003011 5468652073686F7274- <1> db "The short names of the flag states are displayed when dumping registers",13,10 1525 0000301A 206E616D6573206F66- <1> 1525 00003023 2074686520666C6167- <1> 1525 0000302C 207374617465732061- <1> 1525 00003035 726520646973706C61- <1> 1525 0000303E 796564207768656E20- <1> 1525 00003047 64756D70696E672072- <1> 1525 00003050 65676973746572730D- <1> 1525 00003059 0A <1> 1526 0000305A 616E642063616E2062- <1> db "and can be entered to modify the symbolic F register with R. The short",13,10 1526 00003063 6520656E7465726564- <1> 1526 0000306C 20746F206D6F646966- <1> 1526 00003075 79207468652073796D- <1> 1526 0000307E 626F6C696320462072- <1> 1526 00003087 656769737465722077- <1> 1526 00003090 69746820522E205468- <1> 1526 00003099 652073686F72740D0A <1> 1527 000030A2 6E616D6573206F6620- <1> db "names of the flags can be modified by R.",13,10 1527 000030AB 74686520666C616773- <1> 1527 000030B4 2063616E206265206D- <1> 1527 000030BD 6F6469666965642062- <1> 1527 000030C6 7920522E0D0A <1> 1528 000030CC 00 <1> asciz 1529 <1> 1530 <1> %if _COND 1531 <1> .condhelp: 1532 000030CD 496E20746865207265- <1> db "In the register dump displayed by the R, T, P and G commands, conditional",13,10 1532 000030D6 676973746572206475- <1> 1532 000030DF 6D7020646973706C61- <1> 1532 000030E8 796564206279207468- <1> 1532 000030F1 6520522C20542C2050- <1> 1532 000030FA 20616E64204720636F- <1> 1532 00003103 6D6D616E64732C2063- <1> 1532 0000310C 6F6E646974696F6E61- <1> 1532 00003115 6C0D0A <1> 1533 00003118 6A756D707320617265- <1> db "jumps are displayed with a notice that shows whether the instruction will",13,10 1533 00003121 20646973706C617965- <1> 1533 0000312A 642077697468206120- <1> 1533 00003133 6E6F74696365207468- <1> 1533 0000313C 61742073686F777320- <1> 1533 00003145 776865746865722074- <1> 1533 0000314E 686520696E73747275- <1> 1533 00003157 6374696F6E2077696C- <1> 1533 00003160 6C0D0A <1> 1534 00003163 63617573652061206A- <1> db "cause a jump depending on its condition and the current register and flag",13,10 1534 0000316C 756D7020646570656E- <1> 1534 00003175 64696E67206F6E2069- <1> 1534 0000317E 747320636F6E646974- <1> 1534 00003187 696F6E20616E642074- <1> 1534 00003190 68652063757272656E- <1> 1534 00003199 742072656769737465- <1> 1534 000031A2 7220616E6420666C61- <1> 1534 000031AB 670D0A <1> 1535 000031AE 636F6E74656E74732E- <1> db 'contents. This notice shows either "jumping" or "not jumping" as appropriate.',13,10 1535 000031B7 2054686973206E6F74- <1> 1535 000031C0 6963652073686F7773- <1> 1535 000031C9 206569746865722022- <1> 1535 000031D2 6A756D70696E672220- <1> 1535 000031DB 6F7220226E6F74206A- <1> 1535 000031E4 756D70696E67222061- <1> 1535 000031ED 7320617070726F7072- <1> 1535 000031F6 696174652E0D0A <1> 1536 000031FD 0D0A <1> db 13,10 1537 000031FF 54686520636F6E6469- <1> db "The conditional jumps use these conditions: (second column negates)",13,10 1537 00003208 74696F6E616C206A75- <1> 1537 00003211 6D7073207573652074- <1> 1537 0000321A 6865736520636F6E64- <1> 1537 00003223 6974696F6E733A2028- <1> 1537 0000322C 7365636F6E6420636F- <1> 1537 00003235 6C756D6E206E656761- <1> 1537 0000323E 746573290D0A <1> 1538 00003244 206A6F09096A6E6F09- <1> db " jo",9,9,"jno",9,9,"OF",13,10 1538 0000324D 094F460D0A <1> 1539 00003252 206A63206A62206A6E- <1> db " jc jb jnae",9,"jnc jnb jae",9,"CF",13,10 1539 0000325B 6165096A6E63206A6E- <1> 1539 00003264 62206A61650943460D- <1> 1539 0000326D 0A <1> 1540 0000326E 206A7A206A6509096A- <1> db " jz je",9,9,"jnz jne",9,9,"ZF",13,10 1540 00003277 6E7A206A6E6509095A- <1> 1540 00003280 460D0A <1> 1541 00003283 206A6265206A6E6109- <1> db " jbe jna",9,"jnbe ja",9,9,"ZF||CF",13,10 1541 0000328C 6A6E6265206A610909- <1> 1541 00003295 5A467C7C43460D0A <1> 1542 0000329D 206A7309096A6E7309- <1> db " js",9,9,"jns",9,9,"SF",13,10 1542 000032A6 0953460D0A <1> 1543 000032AB 206A70206A70650909- <1> db " jp jpe",9,9,"jnp jpo",9,9,"PF",13,10 1543 000032B4 6A6E70206A706F0909- <1> 1543 000032BD 50460D0A <1> 1544 000032C1 206A6C206A6E676509- <1> db " jl jnge",9,"jnl jge",9,9,"OF^^SF",13,10 1544 000032CA 6A6E6C206A67650909- <1> 1544 000032D3 4F465E5E53460D0A <1> 1545 000032DB 206A6C65206A6E6709- <1> db " jle jng",9,"jnle jg",9,9,"OF^^SF || ZF",13,10 1545 000032E4 6A6E6C65206A670909- <1> 1545 000032ED 4F465E5E5346207C7C- <1> 1545 000032F6 205A460D0A <1> 1546 000032FB 206A28652963787A09- <1> db " j(e)cxz",9,9,9,"(e)cx==0",13,10 1546 00003304 090928652963783D3D- <1> 1546 0000330D 300D0A <1> 1547 00003310 206C6F6F7009090909- <1> db " loop",9,9,9,9,"(e)cx!=1",13,10 1547 00003319 2865296378213D310D- <1> 1547 00003322 0A <1> 1548 00003323 206C6F6F707A206C6F- <1> db " loopz loope",9,9,9,"(e)cx!=1 && ZF",13,10 1548 0000332C 6F7065090909286529- <1> 1548 00003335 6378213D3120262620- <1> 1548 0000333E 5A460D0A <1> 1549 00003342 206C6F6F706E7A206C- <1> db " loopnz loopne",9,9,9,"(e)cx!=1 && !ZF",13,10 1549 0000334B 6F6F706E6509090928- <1> 1549 00003354 65296378213D312026- <1> 1549 0000335D 2620215A460D0A <1> 1550 00003364 0D0A <1> db 13,10 1551 00003366 456E746572203F4620- <1> db "Enter ?F to display a description of the flag names.",13,10 1551 0000336F 746F20646973706C61- <1> 1551 00003378 792061206465736372- <1> 1551 00003381 697074696F6E206F66- <1> 1551 0000338A 2074686520666C6167- <1> 1551 00003393 206E616D65732E0D0A <1> 1552 0000339C 00 <1> asciz 1553 <1> %endif 1554 <1> 1555 <1> %if _EXPRESSIONS 1556 <1> .expressionhelp: 1557 0000339D 5265636F676E697A65- <1> db "Recognized operators in expressions:",13,10 1557 000033A6 64206F70657261746F- <1> 1557 000033AF 727320696E20657870- <1> 1557 000033B8 72657373696F6E733A- <1> 1557 000033C1 0D0A <1> 1558 000033C3 7C0962697477697365- <1> db "|",9, "bitwise OR",9,9, "||",9, "boolean OR",13,10 1558 000033CC 204F5209097C7C0962- <1> 1558 000033D5 6F6F6C65616E204F52- <1> 1558 000033DE 0D0A <1> 1559 000033E0 5E0962697477697365- <1> db "^",9, "bitwise XOR",9,9, "^^",9, "boolean XOR",13,10 1559 000033E9 20584F5209095E5E09- <1> 1559 000033F2 626F6F6C65616E2058- <1> 1559 000033FB 4F520D0A <1> 1560 000033FF 260962697477697365- <1> db "&",9, "bitwise AND",9,9, "&&",9, "boolean AND",13,10 1560 00003408 20414E440909262609- <1> 1560 00003411 626F6F6C65616E2041- <1> 1560 0000341A 4E440D0A <1> 1561 0000341E 3E3E096269742D7368- <1> db ">>",9, "bit-shift right",9,9, ">",9,"test if above",13,10 1561 00003427 696674207269676874- <1> 1561 00003430 09093E097465737420- <1> 1561 00003439 69662061626F76650D- <1> 1561 00003442 0A <1> 1562 00003443 3E3E3E097369676E65- <1> db ">>>",9, "signed bit-shift right",9, "<",9,"test if below",13,10 1562 0000344C 64206269742D736869- <1> 1562 00003455 667420726967687409- <1> 1562 0000345E 3C0974657374206966- <1> 1562 00003467 2062656C6F770D0A <1> 1563 0000346F 3C3C096269742D7368- <1> db "<<",9, "bit-shift left",9,9, ">=",9,"test if above-or-equal",13,10 1563 00003478 696674206C65667409- <1> 1563 00003481 093E3D097465737420- <1> 1563 0000348A 69662061626F76652D- <1> 1563 00003493 6F722D657175616C0D- <1> 1563 0000349C 0A <1> 1564 0000349D 3E3C096269742D6D69- <1> db "><",9, "bit-mirror",9,9, "<=",9,"test if below-or-equal",13,10 1564 000034A6 72726F7209093C3D09- <1> 1564 000034AF 746573742069662062- <1> 1564 000034B8 656C6F772D6F722D65- <1> 1564 000034C1 7175616C0D0A <1> 1565 000034C7 2B096164646974696F- <1> db "+",9, "addition",9,9, "==",9,"test if equal",13,10 1565 000034D0 6E09093D3D09746573- <1> 1565 000034D9 742069662065717561- <1> 1565 000034E2 6C0D0A <1> 1566 000034E5 2D0973756274726163- <1> db "-",9, "subtraction",9,9, "!=",9,"test if not equal",13,10 1566 000034EE 74696F6E0909213D09- <1> 1566 000034F7 74657374206966206E- <1> 1566 00003500 6F7420657175616C0D- <1> 1566 00003509 0A <1> 1567 0000350A 2A096D756C7469706C- <1> db "*",9, "multiplication",9,9, "=>",9,"same as >=",13,10 1567 00003513 69636174696F6E0909- <1> 1567 0000351C 3D3E0973616D652061- <1> 1567 00003525 73203E3D0D0A <1> 1568 0000352B 2F096469766973696F- <1> db "/",9, "division",9,9, "=<",9,"same as <=",13,10 1568 00003534 6E09093D3C0973616D- <1> 1568 0000353D 65206173203C3D0D0A <1> 1569 00003546 25096D6F64756C6F20- <1> db "%",9, "modulo (A-(A/B*B))",9, "<>",9,"same as !=",13,10 1569 0000354F 28412D28412F422A42- <1> 1569 00003558 2929093C3E0973616D- <1> 1569 00003561 6520617320213D0D0A <1> 1570 0000356A 2A2A09706F7765720D- <1> db "**",9, "power",13,10 1570 00003573 0A <1> 1571 00003574 0D0A <1> db 13,10 1572 00003576 496D706C6963697420- <1> db "Implicit operater precedence is handled in the listed order, with increasing",13,10 1572 0000357F 6F7065726174657220- <1> 1572 00003588 707265636564656E63- <1> 1572 00003591 652069732068616E64- <1> 1572 0000359A 6C656420696E207468- <1> 1572 000035A3 65206C697374656420- <1> 1572 000035AC 6F726465722C207769- <1> 1572 000035B5 746820696E63726561- <1> 1572 000035BE 73696E670D0A <1> 1573 000035C4 707265636564656E63- <1> db "precedence: (Brackets specify explicit precedence of an expression.)",13,10 1573 000035CD 653A2028427261636B- <1> 1573 000035D6 657473207370656369- <1> 1573 000035DF 6679206578706C6963- <1> 1573 000035E8 697420707265636564- <1> 1573 000035F1 656E6365206F662061- <1> 1573 000035FA 6E2065787072657373- <1> 1573 00003603 696F6E2E290D0A <1> 1574 0000360A 20626F6F6C65616E20- <1> db " boolean operators OR, XOR, AND (each has a different precedence)",13,10 1574 00003613 6F70657261746F7273- <1> 1574 0000361C 204F522C20584F522C- <1> 1574 00003625 20414E442028656163- <1> 1574 0000362E 682068617320612064- <1> 1574 00003637 6966666572656E7420- <1> 1574 00003640 707265636564656E63- <1> 1574 00003649 65290D0A <1> 1575 0000364D 20636F6D7061726973- <1> db " comparison operators",13,10 1575 00003656 6F6E206F7065726174- <1> 1575 0000365F 6F72730D0A <1> 1576 00003664 206269747769736520- <1> db " bitwise operators OR, XOR, AND (each has a different precedence)",13,10 1576 0000366D 6F70657261746F7273- <1> 1576 00003676 204F522C20584F522C- <1> 1576 0000367F 20414E442028656163- <1> 1576 00003688 682068617320612064- <1> 1576 00003691 6966666572656E7420- <1> 1576 0000369A 707265636564656E63- <1> 1576 000036A3 65290D0A <1> 1577 000036A7 20736869667420616E- <1> db " shift and bit-mirror operators",13,10 1577 000036B0 64206269742D6D6972- <1> 1577 000036B9 726F72206F70657261- <1> 1577 000036C2 746F72730D0A <1> 1578 000036C8 206164646974696F6E- <1> db " addition and subtraction operators",13,10 1578 000036D1 20616E642073756274- <1> 1578 000036DA 72616374696F6E206F- <1> 1578 000036E3 70657261746F72730D- <1> 1578 000036EC 0A <1> 1579 000036ED 206D756C7469706C69- <1> db " multiplication, division and modulo operators",13,10 1579 000036F6 636174696F6E2C2064- <1> 1579 000036FF 69766973696F6E2061- <1> 1579 00003708 6E64206D6F64756C6F- <1> 1579 00003711 206F70657261746F72- <1> 1579 0000371A 730D0A <1> 1580 0000371D 20706F776572206F70- <1> db " power operator",13,10 1580 00003726 657261746F720D0A <1> 1581 0000372E 0D0A <1> db 13,10 1582 00003730 5265636F676E697A65- <1> db "Recognized unary operators: (modifying the next number)",13,10 1582 00003739 6420756E617279206F- <1> 1582 00003742 70657261746F72733A- <1> 1582 0000374B 20286D6F6469667969- <1> 1582 00003754 6E6720746865206E65- <1> 1582 0000375D 7874206E756D626572- <1> 1582 00003766 290D0A <1> 1583 00003769 2B09706F7369746976- <1> db "+",9, "positive (does nothing)",13,10 1583 00003772 652028646F6573206E- <1> 1583 0000377B 6F7468696E67290D0A <1> 1584 00003784 2D096E656761746976- <1> db "-",9, "negative",13,10 1584 0000378D 650D0A <1> 1585 00003790 7E0962697477697365- <1> db "~",9, "bitwise NOT",13,10 1585 00003799 204E4F540D0A <1> 1586 0000379F 2109626F6F6C65616E- <1> db "!",9, "boolean NOT",13,10 1586 000037A8 204E4F540D0A <1> 1587 000037AE 3F096162736F6C7574- <1> db "?",9, "absolute value",13,10 1587 000037B7 652076616C75650D0A <1> 1588 000037C0 212109636F6E766572- <1> db "!!",9, "convert to boolean",13,10 1588 000037C9 7420746F20626F6F6C- <1> 1588 000037D2 65616E0D0A <1> 1589 000037D7 0D0A <1> db 13,10 1590 000037D9 4E6F74652074686174- <1> db "Note that the power operator does not affect unary operator handling.",13,10 1590 000037E2 2074686520706F7765- <1> 1590 000037EB 72206F70657261746F- <1> 1590 000037F4 7220646F6573206E6F- <1> 1590 000037FD 742061666665637420- <1> 1590 00003806 756E617279206F7065- <1> 1590 0000380F 7261746F722068616E- <1> 1590 00003818 646C696E672E0D0A <1> 1591 00003820 466F7220696E737461- <1> db 'For instance, "- 2 ** 2" is parsed as "(-2) ** 2" and evaluates to 4.',13,10 1591 00003829 6E63652C20222D2032- <1> 1591 00003832 202A2A203222206973- <1> 1591 0000383B 207061727365642061- <1> 1591 00003844 732022282D3229202A- <1> 1591 0000384D 2A20322220616E6420- <1> 1591 00003856 6576616C7561746573- <1> 1591 0000385F 20746F20342E0D0A <1> 1592 00003867 0D0A <1> db 13,10 1593 00003869 416C74686F75676820- <1> db "Although a negative unary and signed bit-shift right operator are provided",13,10 1593 00003872 61206E656761746976- <1> 1593 0000387B 6520756E6172792061- <1> 1593 00003884 6E64207369676E6564- <1> 1593 0000388D 206269742D73686966- <1> 1593 00003896 74207269676874206F- <1> 1593 0000389F 70657261746F722061- <1> 1593 000038A8 72652070726F766964- <1> 1593 000038B1 65640D0A <1> 1594 000038B5 746865206578707265- <1> db "the expression evaluator is intrinsically unsigned. Particularly the division,",13,10 1594 000038BE 7373696F6E20657661- <1> 1594 000038C7 6C7561746F72206973- <1> 1594 000038D0 20696E7472696E7369- <1> 1594 000038D9 63616C6C7920756E73- <1> 1594 000038E2 69676E65642E205061- <1> 1594 000038EB 72746963756C61726C- <1> 1594 000038F4 792074686520646976- <1> 1594 000038FD 6973696F6E2C0D0A <1> 1595 00003905 6D756C7469706C6963- <1> db "multiplication, modulo and all comparison operators operate unsigned. Due to",13,10 1595 0000390E 6174696F6E2C206D6F- <1> 1595 00003917 64756C6F20616E6420- <1> 1595 00003920 616C6C20636F6D7061- <1> 1595 00003929 7269736F6E206F7065- <1> 1595 00003932 7261746F7273206F70- <1> 1595 0000393B 657261746520756E73- <1> 1595 00003944 69676E65642E204475- <1> 1595 0000394D 6520746F0D0A <1> 1596 00003953 746869732C20746865- <1> db 'this, the expression "-1 < 0" evaluates to zero.',13,10 1596 0000395C 206578707265737369- <1> 1596 00003965 6F6E20222D31203C20- <1> 1596 0000396E 3022206576616C7561- <1> 1596 00003977 74657320746F207A65- <1> 1596 00003980 726F2E0D0A <1> 1597 00003985 0D0A <1> db 13,10 1598 00003987 5265636F676E697A65- <1> db "Recognized terms in an expression:",13,10 1598 00003990 64207465726D732069- <1> 1598 00003999 6E20616E2065787072- <1> 1598 000039A2 657373696F6E3A0D0A <1> 1599 000039AB 2033322D6269742069- <1> db " 32-bit immediates",13,10 1599 000039B4 6D6D65646961746573- <1> 1599 000039BD 0D0A <1> 1600 000039BF 20382D626974207265- <1> db " 8-bit registers",13,10 1600 000039C8 676973746572730D0A <1> 1601 000039D1 2031362D6269742072- <1> db " 16-bit registers including segment registers (except FS, GS)",13,10 1601 000039DA 656769737465727320- <1> 1601 000039E3 696E636C7564696E67- <1> 1601 000039EC 207365676D656E7420- <1> 1601 000039F5 726567697374657273- <1> 1601 000039FE 202865786365707420- <1> 1601 00003A07 46532C204753290D0A <1> 1602 00003A10 2033322D6269742063- <1> db " 32-bit compound registers made of two 16-bit registers (eg DXAX)",13,10 1602 00003A19 6F6D706F756E642072- <1> 1602 00003A22 656769737465727320- <1> 1602 00003A2B 6D616465206F662074- <1> 1602 00003A34 776F2031362D626974- <1> 1602 00003A3D 207265676973746572- <1> 1602 00003A46 732028656720445841- <1> 1602 00003A4F 58290D0A <1> 1603 00003A53 2033322D6269742072- <1> db " 32-bit registers and FS, GS only if running on a 386+",13,10 1603 00003A5C 656769737465727320- <1> 1603 00003A65 616E642046532C2047- <1> 1603 00003A6E 53206F6E6C79206966- <1> 1603 00003A77 2072756E6E696E6720- <1> 1603 00003A80 6F6E2061203338362B- <1> 1603 00003A89 0D0A <1> 1604 <1> %if 0 && _MMXSUPP 1605 <1> db " 64-bit MMX registers only if running on a CPU with MMX (r/o for now)",13,10 1606 <1> db " MM0L, MM(0)L accesses the low 32 bits of the register",13,10 1607 <1> db " MM0H, MM(0)H accesses the high 32 bits of the register",13,10 1608 <1> db " MM0Z, MM(0)Z reads the low 32 bits; writes the full register (zero-extend)",13,10 1609 <1> db " MM0S, MM(0)S reads the low 32 bits; writes the full register (sign-extend)",13,10 1610 <1> db " MM0, MM(0) is an alias for the MM0Z syntax",13,10 1611 <1> %endif 1612 <1> %if _VARIABLES 1613 00003A8B 2033322D6269742076- <1> db " 32-bit variables V00..VFF",13,10 1613 00003A94 61726961626C657320- <1> 1613 00003A9D 5630302E2E5646460D- <1> 1613 00003AA6 0A <1> 1614 <1> %endif 1615 <1> %if _OPTIONS || _PSPVARIABLES 1616 00003AA7 2033322D6269742073- <1> db " 32-bit special variable" 1616 00003AB0 70656369616C207661- <1> 1616 00003AB9 726961626C65 <1> 1617 <1> %if _OPTIONS 1618 00003ABF 732044434F2C204443- <1> db "s DCO, DCS, DAO, DAS, DIF, DPI" 1618 00003AC8 532C2044414F2C2044- <1> 1618 00003AD1 41532C204449462C20- <1> 1618 00003ADA 445049 <1> 1619 <1> %if _PSPVARIABLES 1620 00003ADD 2C <1> db "," 1621 <1> %endif 1622 <1> %endif 1623 <1> %if _PSPVARIABLES 1624 00003ADE 20505049 <1> db " PPI" 1625 <1> %endif 1626 00003AE2 0D0A <1> db 13,10 1627 00003AE4 2031362D6269742073- <1> db " 16-bit special variables" 1627 00003AED 70656369616C207661- <1> 1627 00003AF6 726961626C6573 <1> 1628 <1> %if _OPTIONS 1629 00003AFD 204450522C20445050 <1> db " DPR, DPP" 1630 <1> %if _PM 1631 00003B06 2C20445053 <1> db ", DPS" 1632 <1> %endif 1633 <1> %if _PSPVARIABLES 1634 00003B0B 2C <1> db "," 1635 <1> %endif 1636 <1> %endif 1637 <1> %if _PSPVARIABLES 1638 00003B0C 205053502C20505052 <1> db " PSP, PPR" 1639 <1> %endif 1640 00003B15 0D0A <1> db 13,10 1641 00003B17 20202866756C6C6572- <1> db " (fuller variable reference in the manual)",13,10 1641 00003B20 207661726961626C65- <1> 1641 00003B29 207265666572656E63- <1> 1641 00003B32 6520696E2074686520- <1> 1641 00003B3B 6D616E75616C290D0A <1> 1642 <1> %endif 1643 <1> %if _INDIRECTION 1644 00003B44 20627974652F776F72- <1> db " byte/word/3byte/dword memory content (eg byte [seg:ofs], where both the",13,10 1644 00003B4D 642F33627974652F64- <1> 1644 00003B56 776F7264206D656D6F- <1> 1644 00003B5F 727920636F6E74656E- <1> 1644 00003B68 742028656720627974- <1> 1644 00003B71 65205B7365673A6F66- <1> 1644 00003B7A 735D2C207768657265- <1> 1644 00003B83 20626F746820746865- <1> 1644 00003B8C 0D0A <1> 1645 00003B8E 20206F7074696F6E61- <1> db " optional segment as well as the offset are expressions too)",13,10 1645 00003B97 6C207365676D656E74- <1> 1645 00003BA0 2061732077656C6C20- <1> 1645 00003BA9 617320746865206F66- <1> 1645 00003BB2 667365742061726520- <1> 1645 00003BBB 65787072657373696F- <1> 1645 00003BC4 6E7320746F6F290D0A <1> 1646 <1> %endif 1647 00003BCD 546865206578707265- <1> db "The expression evaluator case-insensitively checks for names of variables",13,10 1647 00003BD6 7373696F6E20657661- <1> 1647 00003BDF 6C7561746F72206361- <1> 1647 00003BE8 73652D696E73656E73- <1> 1647 00003BF1 69746976656C792063- <1> 1647 00003BFA 6865636B7320666F72- <1> 1647 00003C03 206E616D6573206F66- <1> 1647 00003C0C 207661726961626C65- <1> 1647 00003C15 730D0A <1> 1648 00003C18 616E64207265676973- <1> db "and registers" 1648 00003C21 74657273 <1> 1649 <1> %if _INDIRECTION 1650 00003C25 2061732077656C6C20- <1> db " as well as size specifiers" 1650 00003C2E 61732073697A652073- <1> 1650 00003C37 706563696669657273 <1> 1651 <1> %endif 1652 00003C40 2E0D0A <1> db '.',13,10 1653 00003C43 0D0A <1> db 13,10 1654 00003C45 456E746572203F5220- <1> db "Enter ?R to display the recognized register names.",13,10 1654 00003C4E 746F20646973706C61- <1> 1654 00003C57 792074686520726563- <1> 1654 00003C60 6F676E697A65642072- <1> 1654 00003C69 65676973746572206E- <1> 1654 00003C72 616D65732E0D0A <1> 1655 <1> %if _VARIABLES || _OPTIONS || _PSPVARIABLES 1656 00003C79 456E746572203F5620- <1> db "Enter ?V to display the recognized variables.",13,10 1656 00003C82 746F20646973706C61- <1> 1656 00003C8B 792074686520726563- <1> 1656 00003C94 6F676E697A65642076- <1> 1656 00003C9D 61726961626C65732E- <1> 1656 00003CA6 0D0A <1> 1657 <1> %endif 1658 00003CA8 00 <1> asciz 1659 <1> %endif 1660 <1> 1661 <1> %if _OPTIONS 1662 <1> .ophelp: 1663 00003CA9 417661696C61626C65- <1> db "Available options: (read/write DCO, read DCS)",13,10 1663 00003CB2 206F7074696F6E733A- <1> 1663 00003CBB 2028726561642F7772- <1> 1663 00003CC4 6974652044434F2C20- <1> 1663 00003CCD 726561642044435329- <1> 1663 00003CD6 0D0A <1> 1664 00003CD8 303030312052583A20- <1> db _4digitshex(dispregs32), " RX: 32-bit register display",13,10 1664 00003CE1 33322D626974207265- <1> 1664 00003CEA 676973746572206469- <1> 1664 00003CF3 73706C61790D0A <1> 1665 00003CFA 3030303220544D3A20- <1> db _4digitshex(traceints), " TM: trace into interrupts",13,10 1665 00003D03 747261636520696E74- <1> 1665 00003D0C 6F20696E7465727275- <1> 1665 00003D15 7074730D0A <1> 1666 00003D1A 3030303420616C6C6F- <1> db _4digitshex(cpdepchars), " allow dumping of CP-dependant characters",13,10 1666 00003D23 772064756D70696E67- <1> 1666 00003D2C 206F662043502D6465- <1> 1666 00003D35 70656E64616E742063- <1> 1666 00003D3E 686172616374657273- <1> 1666 00003D47 0D0A <1> 1667 00003D49 3030303820616C7761- <1> db _4digitshex(fakeindos), " always assume InDOS flag non-zero, to debug DOS or TSRs",13,10 1667 00003D52 797320617373756D65- <1> 1667 00003D5B 20496E444F5320666C- <1> 1667 00003D64 6167206E6F6E2D7A65- <1> 1667 00003D6D 726F2C20746F206465- <1> 1667 00003D76 62756720444F53206F- <1> 1667 00003D7F 7220545352730D0A <1> 1668 00003D87 303031302064697361- <1> db _4digitshex(nonpagingdevice)," disallow paged output to StdOut",13,10 1668 00003D90 6C6C6F772070616765- <1> 1668 00003D99 64206F757470757420- <1> 1668 00003DA2 746F205374644F7574- <1> 1668 00003DAB 0D0A <1> 1669 00003DAD 3030323020616C6C6F- <1> db _4digitshex(pagingdevice), " allow paged output to non-StdOut",13,10 1669 00003DB6 77207061676564206F- <1> 1669 00003DBF 757470757420746F20- <1> 1669 00003DC8 6E6F6E2D5374644F75- <1> 1669 00003DD1 740D0A <1> 1670 00003DD4 303034302064697370- <1> db _4digitshex(hexrn), " display raw hexadecimal content of FPU registers",13,10 1670 00003DDD 6C6179207261772068- <1> 1670 00003DE6 657861646563696D61- <1> 1670 00003DEF 6C20636F6E74656E74- <1> 1670 00003DF8 206F66204650552072- <1> 1670 00003E01 65676973746572730D- <1> 1670 00003E0A 0A <1> 1671 00003E0B 30313030207768656E- <1> db _4digitshex(nondospaging), " when prompting during paging, do not use DOS for input",13,10 1671 00003E14 2070726F6D7074696E- <1> 1671 00003E1D 6720647572696E6720- <1> 1671 00003E26 706167696E672C2064- <1> 1671 00003E2F 6F206E6F7420757365- <1> 1671 00003E38 20444F5320666F7220- <1> 1671 00003E41 696E7075740D0A <1> 1672 00003E48 3032303020646F206E- <1> db _4digitshex(nohlt), " do not execute HLT instruction to idle",13,10 1672 00003E51 6F7420657865637574- <1> 1672 00003E5A 6520484C5420696E73- <1> 1672 00003E63 7472756374696F6E20- <1> 1672 00003E6C 746F2069646C650D0A <1> 1673 00003E75 3034303020646F206E- <1> db _4digitshex(biosidles), " do not idle, the keyboard BIOS idles itself",13,10 1673 00003E7E 6F742069646C652C20- <1> 1673 00003E87 746865206B6579626F- <1> 1673 00003E90 6172642042494F5320- <1> 1673 00003E99 69646C657320697473- <1> 1673 00003EA2 656C660D0A <1> 1674 00003EA7 303830302075736520- <1> db _4digitshex(opt_userawinput)," use rawinput for int 21h interactive input",13,10 1674 00003EB0 726177696E70757420- <1> 1674 00003EB9 666F7220696E742032- <1> 1674 00003EC2 316820696E74657261- <1> 1674 00003ECB 637469766520696E70- <1> 1674 00003ED4 75740D0A <1> 1675 00003ED8 3130303020696E2064- <1> db _4digitshex(use_si_units), " in disp_*_size use SI units (kB = 1000, etc)." 1675 00003EE1 6973705F2A5F73697A- <1> 1675 00003EEA 652075736520534920- <1> 1675 00003EF3 756E69747320286B42- <1> 1675 00003EFC 203D20313030302C20- <1> 1675 00003F05 657463292E <1> 1676 00003F0A 206F76657272696465- <1> db " overrides ",_4digitshex(use_jedec_units),"!",13,10 1676 00003F13 732032303030210D0A <1> 1677 00003F1C 3230303020696E2064- <1> db _4digitshex(use_jedec_units)," in disp_*_size use JEDEC units (KB = 1024)",13,10 1677 00003F25 6973705F2A5F73697A- <1> 1677 00003F2E 6520757365204A4544- <1> 1677 00003F37 454320756E69747320- <1> 1677 00003F40 284B42203D20313032- <1> 1677 00003F49 34290D0A <1> 1678 00003F4D 3430303020656E6162- <1> db _4digitshex(enable_serial), " enable serial I/O (port ",_4digitshex(_UART_BASE),"h interrupt ",_2digitshex(_INTNUM),"h)",13,10 1678 00003F56 6C652073657269616C- <1> 1678 00003F5F 20492F4F2028706F72- <1> 1678 00003F68 742030324638682069- <1> 1678 00003F71 6E7465727275707420- <1> 1678 00003F7A 304268290D0A <1> 1679 00003F80 383030302064697361- <1> db _4digitshex(int8_disable_serial), " disable serial I/O when breaking after 5 seconds Ctrl pressed",13,10 1679 00003F89 626C65207365726961- <1> 1679 00003F92 6C20492F4F20776865- <1> 1679 00003F9B 6E20627265616B696E- <1> 1679 00003FA4 672061667465722035- <1> 1679 00003FAD 207365636F6E647320- <1> 1679 00003FB6 4374726C2070726573- <1> 1679 00003FBF 7365640D0A <1> 1680 00003FC4 303030313030303020- <1> db _8digitshex(gg_do_not_skip_bp), " gg: do not skip a breakpoint (bb or gg)",13,10 1680 00003FCD 67673A20646F206E6F- <1> 1680 00003FD6 7420736B6970206120- <1> 1680 00003FDF 627265616B706F696E- <1> 1680 00003FE8 7420286262206F7220- <1> 1680 00003FF1 6767290D0A <1> 1681 00003FF6 303030323030303020- <1> db _8digitshex(gg_no_autorepeat), " gg: do not auto-repeat",13,10 1681 00003FFF 67673A20646F206E6F- <1> 1681 00004008 74206175746F2D7265- <1> 1681 00004011 706561740D0A <1> 1682 00004017 303030343030303020- <1> db _8digitshex(tp_do_not_skip_bp), " T/TP/P: do not skip a (bb) breakpoint",13,10 1682 00004020 542F54502F503A2064- <1> 1682 00004029 6F206E6F7420736B69- <1> 1682 00004032 702061202862622920- <1> 1682 0000403B 627265616B706F696E- <1> 1682 00004044 740D0A <1> 1683 00004047 303030383030303020- <1> db _8digitshex(gg_bb_hit_no_repeat), " gg: do not auto-repeat after bb hit",13,10 1683 00004050 67673A20646F206E6F- <1> 1683 00004059 74206175746F2D7265- <1> 1683 00004062 706561742061667465- <1> 1683 0000406B 72206262206869740D- <1> 1683 00004074 0A <1> 1684 00004075 303031303030303020- <1> db _8digitshex(tp_bb_hit_no_repeat), " T/TP/P: do not auto-repeat after bb hit",13,10 1684 0000407E 542F54502F503A2064- <1> 1684 00004087 6F206E6F7420617574- <1> 1684 00004090 6F2D72657065617420- <1> 1684 00004099 616674657220626220- <1> 1684 000040A2 6869740D0A <1> 1685 000040A7 303032303030303020- <1> db _8digitshex(gg_unexpected_no_repeat)," gg: do not auto-repeat after unexpectedinterrupt",13,10 1685 000040B0 67673A20646F206E6F- <1> 1685 000040B9 74206175746F2D7265- <1> 1685 000040C2 706561742061667465- <1> 1685 000040CB 7220756E6578706563- <1> 1685 000040D4 746564696E74657272- <1> 1685 000040DD 7570740D0A <1> 1686 000040E2 303034303030303020- <1> db _8digitshex(tp_unexpected_no_repeat)," T/TP/P: do not auto-repeat after unexpectedinterrupt",13,10 1686 000040EB 542F54502F503A2064- <1> 1686 000040F4 6F206E6F7420617574- <1> 1686 000040FD 6F2D72657065617420- <1> 1686 00004106 616674657220756E65- <1> 1686 0000410F 78706563746564696E- <1> 1686 00004118 746572727570740D0A <1> 1687 00004121 303038303030303020- <1> db _8digitshex(ss_no_dump), " S: do not dump data after matches",13,10 1687 0000412A 533A20646F206E6F74- <1> 1687 00004133 2064756D7020646174- <1> 1687 0000413C 61206166746572206D- <1> 1687 00004145 6174636865730D0A <1> 1688 0000414D 313030303030303020- <1> db _8digitshex(rr_disasm_no_rept), " R: do not repeat disassembly",13,10 1688 00004156 523A20646F206E6F74- <1> 1688 0000415F 207265706561742064- <1> 1688 00004168 6973617373656D626C- <1> 1688 00004171 790D0A <1> 1689 00004174 323030303030303020- <1> db _8digitshex(rr_disasm_no_show), " R: do not show memory reference in disassembly",13,10 1689 0000417D 523A20646F206E6F74- <1> 1689 00004186 2073686F77206D656D- <1> 1689 0000418F 6F7279207265666572- <1> 1689 00004198 656E636520696E2064- <1> 1689 000041A1 6973617373656D626C- <1> 1689 000041AA 790D0A <1> 1690 000041AD 343030303030303020- <1> db _8digitshex(opt_cmdline_quiet_input)," quiet command line buffer input",13,10 1690 000041B6 717569657420636F6D- <1> 1690 000041BF 6D616E64206C696E65- <1> 1690 000041C8 206275666665722069- <1> 1690 000041D1 6E7075740D0A <1> 1691 000041D7 383030303030303020- <1> db _8digitshex(opt_cmdline_quiet_output)," quiet command line buffer output",13,10 1691 000041E0 717569657420636F6D- <1> 1691 000041E9 6D616E64206C696E65- <1> 1691 000041F2 20627566666572206F- <1> 1691 000041FB 75747075740D0A <1> 1692 00004202 0D0A <1> db 13,10 1693 00004204 4D6F7265206F707469- <1> db "More options: (read/write DCO2, read DCS2)",13,10 1693 0000420D 6F6E733A2028726561- <1> 1693 00004216 642F77726974652044- <1> 1693 0000421F 434F322C2072656164- <1> 1693 00004228 2044435332290D0A <1> 1694 00004230 303030312044423A20- <1> db _4digitshex(opt2_db_header), " DB: show header",13,10 1694 00004239 73686F772068656164- <1> 1694 00004242 65720D0A <1> 1695 00004246 303030322044423A20- <1> db _4digitshex(opt2_db_trailer)," DB: show trailer",13,10 1695 0000424F 73686F772074726169- <1> 1695 00004258 6C65720D0A <1> 1696 0000425D 303031302044573A20- <1> db _4digitshex(opt2_dw_header), " DW: show header",13,10 1696 00004266 73686F772068656164- <1> 1696 0000426F 65720D0A <1> 1697 00004273 303032302044573A20- <1> db _4digitshex(opt2_dw_trailer)," DW: show trailer",13,10 1697 0000427C 73686F772074726169- <1> 1697 00004285 6C65720D0A <1> 1698 0000428A 303130302044443A20- <1> db _4digitshex(opt2_dd_header), " DD: show header",13,10 1698 00004293 73686F772068656164- <1> 1698 0000429C 65720D0A <1> 1699 000042A0 303230302044443A20- <1> db _4digitshex(opt2_dd_trailer)," DD: show trailer",13,10 1699 000042A9 73686F772074726169- <1> 1699 000042B2 6C65720D0A <1> 1700 000042B7 303830302075736520- <1> db _4digitshex(opt2_rawinput_dpmi)," use rawinput for int 21h interactive input in DPMI",13,10 1700 000042C0 726177696E70757420- <1> 1700 000042C9 666F7220696E742032- <1> 1700 000042D2 316820696E74657261- <1> 1700 000042DB 637469766520696E70- <1> 1700 000042E4 757420696E2044504D- <1> 1700 000042ED 490D0A <1> 1701 000042F0 3130303020483A2073- <1> db _4digitshex(opt2_hh_compat), " H: stay compatible to MS-DOS Debug",13,10 1701 000042F9 74617920636F6D7061- <1> 1701 00004302 7469626C6520746F20- <1> 1701 0000430B 4D532D444F53204465- <1> 1701 00004314 6275670D0A <1> 1702 00004319 323030302069646C65- <1> db _4digitshex(opt2_getc_idle), " idle and check for Ctrl-C in getc",13,10 1702 00004322 20616E642063686563- <1> 1702 0000432B 6B20666F7220437472- <1> 1702 00004334 6C2D4320696E206765- <1> 1702 0000433D 74630D0A <1> 1703 00004341 343030302069646C65- <1> db _4digitshex(opt2_getc_idle_dpmi)," idle and check for Ctrl-C in getc in DPMI",13,10 1703 0000434A 20616E642063686563- <1> 1703 00004353 6B20666F7220437472- <1> 1703 0000435C 6C2D4320696E206765- <1> 1703 00004365 746320696E2044504D- <1> 1703 0000436E 490D0A <1> 1704 00004371 3830303020542F5450- <1> db _4digitshex(opt2_re_cancel_tpg)," T/TP/P/G: cancel run after RE command buffer execution",13,10 1704 0000437A 2F502F473A2063616E- <1> 1704 00004383 63656C2072756E2061- <1> 1704 0000438C 667465722052452063- <1> 1704 00004395 6F6D6D616E64206275- <1> 1704 0000439E 666665722065786563- <1> 1704 000043A7 7574696F6E0D0A <1> 1705 000043AE 0D0A <1> db 13,10 1706 000043B0 4D6F7265206F707469- <1> db "More options: (read/write DCO3, read DCS3)",13,10 1706 000043B9 6F6E733A2028726561- <1> 1706 000043C2 642F77726974652044- <1> 1706 000043CB 434F332C2072656164- <1> 1706 000043D4 2044435333290D0A <1> 1707 000043DC 3030303120543A2064- <1> db _4digitshex(opt3_tt_no_paging)," T: do not page output",13,10 1707 000043E5 6F206E6F7420706167- <1> 1707 000043EE 65206F75747075740D- <1> 1707 000043F7 0A <1> 1708 000043F8 303030322054503A20- <1> db _4digitshex(opt3_tp_no_paging)," TP: do not page output",13,10 1708 00004401 646F206E6F74207061- <1> 1708 0000440A 6765206F7574707574- <1> 1708 00004413 0D0A <1> 1709 00004415 3030303420503A2064- <1> db _4digitshex(opt3_pp_no_paging)," P: do not page output",13,10 1709 0000441E 6F206E6F7420706167- <1> 1709 00004427 65206F75747075740D- <1> 1709 00004430 0A <1> 1710 00004431 3030303820473A2064- <1> db _4digitshex(opt3_gg_no_paging)," G: do not page output",13,10 1710 0000443A 6F206E6F7420706167- <1> 1710 00004443 65206F75747075740D- <1> 1710 0000444C 0A <1> 1711 0000444D 3031303020542F5450- <1> db _4digitshex(opt3_silence_paging_set), " T/TP/P: modify paging for silent dump",13,10 1711 00004456 2F503A206D6F646966- <1> 1711 0000445F 7920706167696E6720- <1> 1711 00004468 666F722073696C656E- <1> 1711 00004471 742064756D700D0A <1> 1712 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 1712 00004482 2F503A206966203031- <1> 1712 0000448B 3030207365743A2074- <1> 1712 00004494 75726E20706167696E- <1> 1712 0000449D 67206F6E2C20656C73- <1> 1712 000044A6 65206F66660D0A <1> 1713 000044AD 30313030303020523A- <1> db _6digitshex(opt3_r_highlight_diff), " R: highlight changed digits (needs ANSI for DOS output)",13,10 1713 000044B6 20686967686C696768- <1> 1713 000044BF 74206368616E676564- <1> 1713 000044C8 206469676974732028- <1> 1713 000044D1 6E6565647320414E53- <1> 1713 000044DA 4920666F7220444F53- <1> 1713 000044E3 206F7574707574290D- <1> 1713 000044EC 0A <1> 1714 000044ED 30323030303020523A- <1> db _6digitshex(opt3_r_highlight_dumb), " R: highlight escape sequences to int 10h, else video attributes",13,10 1714 000044F6 20686967686C696768- <1> 1714 000044FF 742065736361706520- <1> 1714 00004508 73657175656E636573- <1> 1714 00004511 20746F20696E742031- <1> 1714 0000451A 30682C20656C736520- <1> 1714 00004523 766964656F20617474- <1> 1714 0000452C 726962757465730D0A <1> 1715 00004535 30343030303020523A- <1> db _6digitshex(opt3_r_highlight_full), " R: highlight changed registers (overrides ",_6digitshex(opt3_r_highlight_diff),")",13,10 1715 0000453E 20686967686C696768- <1> 1715 00004547 74206368616E676564- <1> 1715 00004550 207265676973746572- <1> 1715 00004559 7320286F7665727269- <1> 1715 00004562 646573203031303030- <1> 1715 0000456B 30290D0A <1> 1716 0000456F 30383030303020523A- <1> db _6digitshex(opt3_r_highlight_eip), " R: include highlighting of EIP",13,10 1716 00004578 20696E636C75646520- <1> 1716 00004581 686967686C69676874- <1> 1716 0000458A 696E67206F66204549- <1> 1716 00004593 500D0A <1> 1717 00004596 303230303030303020- <1> db _8digitshex(opt3_no_idle_2F), " do not call int 2F.1680 for idling",13,10 1717 0000459F 646F206E6F74206361- <1> 1717 000045A8 6C6C20696E74203246- <1> 1717 000045B1 2E3136383020666F72- <1> 1717 000045BA 2069646C696E670D0A <1> 1718 <1> %if _DELAY_BEFORE_BP 1719 000045C3 303430303030303020- <1> db _8digitshex(opt3_delay_before_bp), " delay for a tick before writing breakpoints",13,10 1719 000045CC 64656C617920666F72- <1> 1719 000045D5 2061207469636B2062- <1> 1719 000045DE 65666F726520777269- <1> 1719 000045E7 74696E672062726561- <1> 1719 000045F0 6B706F696E74730D0A <1> 1720 <1> %endif 1721 000045F9 303830303030303020- <1> db _8digitshex(opt3_no_call_update), " do not call other lDebug instance's Update IISP Header call",13,10 1721 00004602 646F206E6F74206361- <1> 1721 0000460B 6C6C206F7468657220- <1> 1721 00004614 6C446562756720696E- <1> 1721 0000461D 7374616E6365277320- <1> 1721 00004626 557064617465204949- <1> 1721 0000462F 535020486561646572- <1> 1721 00004638 2063616C6C0D0A <1> 1722 0000463F 313030303030303020- <1> db _8digitshex(opt3_disable_autorepeat), " disable auto-repeat",13,10 1722 00004648 64697361626C652061- <1> 1722 00004651 75746F2D7265706561- <1> 1722 0000465A 740D0A <1> 1723 0000465D 323030303030303020- <1> db _8digitshex(opt3_check_ctrlc_keyb), " check int 16h buffer for Control-C if inputting from int 16h",13,10 1723 00004666 636865636B20696E74- <1> 1723 0000466F 203136682062756666- <1> 1723 00004678 657220666F7220436F- <1> 1723 00004681 6E74726F6C2D432069- <1> 1723 0000468A 6620696E7075747469- <1> 1723 00004693 6E672066726F6D2069- <1> 1723 0000469C 6E74203136680D0A <1> 1724 000046A4 343030303030303020- <1> db _8digitshex(opt3_check_ctrlc_0bh), " call DOS service 0Bh to check for Control-C",13,10 1724 000046AD 63616C6C20444F5320- <1> 1724 000046B6 736572766963652030- <1> 1724 000046BF 426820746F20636865- <1> 1724 000046C8 636B20666F7220436F- <1> 1724 000046D1 6E74726F6C2D430D0A <1> 1725 000046DA 383030303030303020- <1> db _8digitshex(opt3_tsr_quit_leave_tf), " when Q command is used while TSR, leave TF as is",13,10 1725 000046E3 7768656E205120636F- <1> 1725 000046EC 6D6D616E6420697320- <1> 1725 000046F5 75736564207768696C- <1> 1725 000046FE 65205453522C206C65- <1> 1725 00004707 617665205446206173- <1> 1725 00004710 2069730D0A <1> 1726 00004715 0D0A <1> db 13,10 1727 00004717 4D6F7265206F707469- <1> db "More options: (read/write DCO4, read DCS4)",13,10 1727 00004720 6F6E733A2028726561- <1> 1727 00004729 642F77726974652044- <1> 1727 00004732 434F342C2072656164- <1> 1727 0000473B 2044435334290D0A <1> 1728 <1> %if _PM 1729 00004743 3030303220656E6162- <1> db _4digitshex(opt4_int_2F_hook)," enable interrupt 2Fh hook while in 86 Mode",13,10 1729 0000474C 6C6520696E74657272- <1> 1729 00004755 757074203246682068- <1> 1729 0000475E 6F6F6B207768696C65- <1> 1729 00004767 20696E203836204D6F- <1> 1729 00004770 64650D0A <1> 1730 <1> %endif 1731 00004774 3030303420656E6162- <1> db _4digitshex(opt4_int_08_hook)," enable interrupt 8 hook",13,10 1731 0000477D 6C6520696E74657272- <1> 1731 00004786 757074203820686F6F- <1> 1731 0000478F 6B0D0A <1> 1732 00004792 3030303820656E6162- <1> db _4digitshex(opt4_int_2D_hook)," enable interrupt 2Dh hook",13,10 1732 0000479B 6C6520696E74657272- <1> 1732 000047A4 757074203244682068- <1> 1732 000047AD 6F6F6B0D0A <1> 1733 000047B2 303030313030303020- <1> db _8digitshex(opt4_int_serial_force)," force serial interrupt unhooking",13,10 1733 000047BB 666F72636520736572- <1> 1733 000047C4 69616C20696E746572- <1> 1733 000047CD 7275707420756E686F- <1> 1733 000047D6 6F6B696E670D0A <1> 1734 <1> %if _PM 1735 000047DD 303030323030303020- <1> db _8digitshex(opt4_int_2F_force)," force interrupt 2Fh unhooking",13,10 1735 000047E6 666F72636520696E74- <1> 1735 000047EF 657272757074203246- <1> 1735 000047F8 6820756E686F6F6B69- <1> 1735 00004801 6E670D0A <1> 1736 <1> %endif 1737 00004805 303030343030303020- <1> db _8digitshex(opt4_int_08_force)," force interrupt 8 unhooking",13,10 1737 0000480E 666F72636520696E74- <1> 1737 00004817 657272757074203820- <1> 1737 00004820 756E686F6F6B696E67- <1> 1737 00004829 0D0A <1> 1738 0000482B 303030383030303020- <1> db _8digitshex(opt4_int_2D_force)," force interrupt 2Dh unhooking",13,10 1738 00004834 666F72636520696E74- <1> 1738 0000483D 657272757074203244- <1> 1738 00004846 6820756E686F6F6B69- <1> 1738 0000484F 6E670D0A <1> 1739 00004853 303130303030303020- <1> db _8digitshex(opt4_int_00_force)," force interrupt 0 unhooking",13,10 1739 0000485C 666F72636520696E74- <1> 1739 00004865 657272757074203020- <1> 1739 0000486E 756E686F6F6B696E67- <1> 1739 00004877 0D0A <1> 1740 00004879 303230303030303020- <1> db _8digitshex(opt4_int_01_force)," force interrupt 1 unhooking",13,10 1740 00004882 666F72636520696E74- <1> 1740 0000488B 657272757074203120- <1> 1740 00004894 756E686F6F6B696E67- <1> 1740 0000489D 0D0A <1> 1741 0000489F 303430303030303020- <1> db _8digitshex(opt4_int_03_force)," force interrupt 3 unhooking",13,10 1741 000048A8 666F72636520696E74- <1> 1741 000048B1 657272757074203320- <1> 1741 000048BA 756E686F6F6B696E67- <1> 1741 000048C3 0D0A <1> 1742 000048C5 303830303030303020- <1> db _8digitshex(opt4_int_06_force)," force interrupt 6 unhooking",13,10 1742 000048CE 666F72636520696E74- <1> 1742 000048D7 657272757074203620- <1> 1742 000048E0 756E686F6F6B696E67- <1> 1742 000048E9 0D0A <1> 1743 000048EB 313030303030303020- <1> db _8digitshex(opt4_int_18_force)," force interrupt 18h unhooking",13,10 1743 000048F4 666F72636520696E74- <1> 1743 000048FD 657272757074203138- <1> 1743 00004906 6820756E686F6F6B69- <1> 1743 0000490F 6E670D0A <1> 1744 00004913 323030303030303020- <1> db _8digitshex(opt4_int_19_force)," force interrupt 19h unhooking",13,10 1744 0000491C 666F72636520696E74- <1> 1744 00004925 657272757074203139- <1> 1744 0000492E 6820756E686F6F6B69- <1> 1744 00004937 6E670D0A <1> 1745 0000493B 0D0A <1> db 13,10 1746 0000493D 496E7465726E616C20- <1> db "Internal flags: (read DIF)",13,10 1746 00004946 666C6167733A202872- <1> 1746 0000494F 65616420444946290D- <1> 1746 00004958 0A <1> 1747 00004959 30303030303120496E- <1> db _6digitshex(oldpacket), " Int25/Int26 packet method available",13,10 1747 00004962 7432352F496E743236- <1> 1747 0000496B 207061636B6574206D- <1> 1747 00004974 6574686F6420617661- <1> 1747 0000497D 696C61626C650D0A <1> 1748 00004985 30303030303220496E- <1> db _6digitshex(newpacket), " Int21.7305 packet method available",13,10 1748 0000498E 7432312E3733303520- <1> 1748 00004997 7061636B6574206D65- <1> 1748 000049A0 74686F642061766169- <1> 1748 000049A9 6C61626C650D0A <1> 1749 <1> %if _VDD 1750 000049B0 303030303034205644- <1> db _6digitshex(ntpacket), " VDD registered and usable",13,10 1750 000049B9 442072656769737465- <1> 1750 000049C2 72656420616E642075- <1> 1750 000049CB 7361626C650D0A <1> 1751 <1> %endif 1752 000049D2 30303030303820696E- <1> db _6digitshex(pagedcommand), " internal flag for paged output",13,10 1752 000049DB 7465726E616C20666C- <1> 1752 000049E4 616720666F72207061- <1> 1752 000049ED 676564206F75747075- <1> 1752 000049F6 740D0A <1> 1753 000049F9 303030303130204445- <1> db _6digitshex(notstdinput), " DEBUG's input isn't StdIn",13,10 1753 00004A02 425547277320696E70- <1> 1753 00004A0B 75742069736E277420- <1> 1753 00004A14 537464496E0D0A <1> 1754 00004A1B 303030303230204445- <1> db _6digitshex(inputfile), " DEBUG's input is a file",13,10 1754 00004A24 425547277320696E70- <1> 1754 00004A2D 757420697320612066- <1> 1754 00004A36 696C650D0A <1> 1755 00004A3B 303030303430204445- <1> db _6digitshex(notstdoutput), " DEBUG's output isn't StdOut",13,10 1755 00004A44 4255472773206F7574- <1> 1755 00004A4D 7075742069736E2774- <1> 1755 00004A56 205374644F75740D0A <1> 1756 00004A5F 303030303830204445- <1> db _6digitshex(outputfile), " DEBUG's output is a file",13,10 1756 00004A68 4255472773206F7574- <1> 1756 00004A71 707574206973206120- <1> 1756 00004A7A 66696C650D0A <1> 1757 <1> %if _PM 1758 00004A80 30303031303020496E- <1> db _6digitshex(hooked2F), " Int2F.1687 hooked",13,10 1758 00004A89 7432462E3136383720- <1> 1758 00004A92 686F6F6B65640D0A <1> 1759 00004A9A 30303032303020496E- <1> db _6digitshex(nohook2F), " Int2F.1687 won't be hooked",13,10 1759 00004AA3 7432462E3136383720- <1> 1759 00004AAC 776F6E277420626520- <1> 1759 00004AB5 686F6F6B65640D0A <1> 1760 00004ABD 30303034303020646F- <1> db _6digitshex(dpminohlt), " do not execute HLT to idle in PM",13,10 1760 00004AC6 206E6F742065786563- <1> 1760 00004ACF 75746520484C542074- <1> 1760 00004AD8 6F2069646C6520696E- <1> 1760 00004AE1 20504D0D0A <1> 1761 00004AE6 30303038303020696E- <1> db _6digitshex(protectedmode), " in protected mode",13,10 1761 00004AEF 2070726F7465637465- <1> 1761 00004AF8 64206D6F64650D0A <1> 1762 <1> %endif 1763 00004B00 303031303030207374- <1> db _6digitshex(debuggeeA20), " state of debuggee's A20",13,10 1763 00004B09 617465206F66206465- <1> 1763 00004B12 627567676565277320- <1> 1763 00004B1B 4132300D0A <1> 1764 00004B20 303032303030207374- <1> db _6digitshex(debuggerA20), " state of debugger's A20 (not implemented: same as previous)",13,10 1764 00004B29 617465206F66206465- <1> 1764 00004B32 627567676572277320- <1> 1764 00004B3B 41323020286E6F7420- <1> 1764 00004B44 696D706C656D656E74- <1> 1764 00004B4D 65643A2073616D6520- <1> 1764 00004B56 61732070726576696F- <1> 1764 00004B5F 7573290D0A <1> 1765 <1> %if _BOOTLDR 1766 00004B64 303034303030206465- <1> db _6digitshex(nodosloaded), " debugger booted independent of a DOS",13,10 1766 00004B6D 62756767657220626F- <1> 1766 00004B76 6F74656420696E6465- <1> 1766 00004B7F 70656E64656E74206F- <1> 1766 00004B88 66206120444F530D0A <1> 1767 <1> %endif 1768 00004B91 303038303030204350- <1> db _6digitshex(has386), " CPU is at least a 386 (32-bit CPU)",13,10 1768 00004B9A 55206973206174206C- <1> 1768 00004BA3 656173742061203338- <1> 1768 00004BAC 36202833322D626974- <1> 1768 00004BB5 20435055290D0A <1> 1769 00004BBC 30313030303020696E- <1> db _6digitshex(usecharcounter), " internal flag for tab output processing",13,10 1769 00004BC5 7465726E616C20666C- <1> 1769 00004BCE 616720666F72207461- <1> 1769 00004BD7 62206F757470757420- <1> 1769 00004BE0 70726F63657373696E- <1> 1769 00004BE9 670D0A <1> 1770 <1> %if _VDD 1771 00004BEC 303230303030207275- <1> db _6digitshex(runningnt), " running inside NTVDM",13,10 1771 00004BF5 6E6E696E6720696E73- <1> 1771 00004BFE 696465204E5456444D- <1> 1771 00004C07 0D0A <1> 1772 <1> %endif 1773 <1> %if _PM 1774 00004C09 303430303030204450- <1> db _6digitshex(canswitchmode), " DPMI raw mode switch usable to set breakpoints",13,10 1774 00004C12 4D4920726177206D6F- <1> 1774 00004C1B 646520737769746368- <1> 1774 00004C24 20757361626C652074- <1> 1774 00004C2D 6F2073657420627265- <1> 1774 00004C36 616B706F696E74730D- <1> 1774 00004C3F 0A <1> 1775 00004C40 30383030303020696E- <1> db _6digitshex(modeswitched), " internal flag for mode switching",13,10 1775 00004C49 7465726E616C20666C- <1> 1775 00004C52 616720666F72206D6F- <1> 1775 00004C5B 646520737769746368- <1> 1775 00004C64 696E670D0A <1> 1776 <1> %endif 1777 00004C69 31303030303020696E- <1> db _6digitshex(promptwaiting), " internal flag for paged output",13,10 1777 00004C72 7465726E616C20666C- <1> 1777 00004C7B 616720666F72207061- <1> 1777 00004C84 676564206F75747075- <1> 1777 00004C8D 740D0A <1> 1778 <1> %if _PM 1779 00004C90 32303030303020696E- <1> db _6digitshex(switchbuffer), " internal flag for mode switching",13,10 1779 00004C99 7465726E616C20666C- <1> 1779 00004CA2 616720666F72206D6F- <1> 1779 00004CAB 646520737769746368- <1> 1779 00004CB4 696E670D0A <1> 1780 <1> %endif 1781 <1> %if _TSR 1782 00004CB9 34303030303020696E- <1> db _6digitshex(tsrmode), " in TSR mode (detached debugger process)",13,10 1782 00004CC2 20545352206D6F6465- <1> 1782 00004CCB 202864657461636865- <1> 1782 00004CD4 642064656275676765- <1> 1782 00004CDD 722070726F63657373- <1> 1782 00004CE6 290D0A <1> 1783 <1> %endif 1784 <1> %if _DOSEMU 1785 00004CE9 303130303030303020- <1> db _8digitshex(runningdosemu), " running inside dosemu",13,10 1785 00004CF2 72756E6E696E672069- <1> 1785 00004CFB 6E7369646520646F73- <1> 1785 00004D04 656D750D0A <1> 1786 <1> %endif 1787 00004D09 3034303030303030 <1> db _8digitshex(tt_while) 1788 00004D11 20542F54502F503A20- <1> db " T/TP/P: while condition specified",13,10 1788 00004D1A 7768696C6520636F6E- <1> 1788 00004D23 646974696F6E207370- <1> 1788 00004D2C 656369666965640D0A <1> 1789 00004D35 3038303030303030 <1> db _8digitshex(tt_p) 1790 00004D3D 2054503A2050207370- <1> db " TP: P specified (proceed past string ops)",13,10 1790 00004D46 656369666965642028- <1> 1790 00004D4F 70726F636565642070- <1> 1790 00004D58 61737420737472696E- <1> 1790 00004D61 67206F7073290D0A <1> 1791 00004D69 3130303030303030 <1> db _8digitshex(tt_silent_mode) 1792 00004D71 20542F54502F503A20- <1> db " T/TP/P: silent mode (SILENT specified)",13,10 1792 00004D7A 73696C656E74206D6F- <1> 1792 00004D83 6465202853494C454E- <1> 1792 00004D8C 542073706563696669- <1> 1792 00004D95 6564290D0A <1> 1793 00004D9A 3230303030303030 <1> db _8digitshex(tt_silence) 1794 00004DA2 20542F54502F503A20- <1> db " T/TP/P: silent mode is active, writing to silent buffer",13,10 1794 00004DAB 73696C656E74206D6F- <1> 1794 00004DB4 646520697320616374- <1> 1794 00004DBD 6976652C2077726974- <1> 1794 00004DC6 696E6720746F207369- <1> 1794 00004DCF 6C656E742062756666- <1> 1794 00004DD8 65720D0A <1> 1795 00004DDC 0D0A <1> db 13,10 1796 00004DDE 417661696C61626C65- <1> db "Available assembler/disassembler options: (read/write DAO, read DAS)",13,10 1796 00004DE7 20617373656D626C65- <1> 1796 00004DF0 722F64697361737365- <1> 1796 00004DF9 6D626C6572206F7074- <1> 1796 00004E02 696F6E733A20287265- <1> 1796 00004E0B 61642F777269746520- <1> 1796 00004E14 44414F2C2072656164- <1> 1796 00004E1D 20444153290D0A <1> 1797 00004E24 303120446973617373- <1> db _2digitshex(disasm_lowercase), " Disassembler: lowercase output",13,10 1797 00004E2D 656D626C65723A206C- <1> 1797 00004E36 6F7765726361736520- <1> 1797 00004E3F 6F75747075740D0A <1> 1798 00004E47 303220446973617373- <1> db _2digitshex(disasm_commablank)," Disassembler: output blank behind comma",13,10 1798 00004E50 656D626C65723A206F- <1> 1798 00004E59 757470757420626C61- <1> 1798 00004E62 6E6B20626568696E64- <1> 1798 00004E6B 20636F6D6D610D0A <1> 1799 00004E73 303420446973617373- <1> db _2digitshex(disasm_nasm), " Disassembler: output addresses in NASM syntax",13,10 1799 00004E7C 656D626C65723A206F- <1> 1799 00004E85 757470757420616464- <1> 1799 00004E8E 72657373657320696E- <1> 1799 00004E97 204E41534D2073796E- <1> 1799 00004EA0 7461780D0A <1> 1800 00004EA5 3038 <1> db _2digitshex(disasm_lowercase_refmem) 1801 00004EA7 20446973617373656D- <1> db " Disassembler: lowercase referenced memory location segreg",13,10 1801 00004EB0 626C65723A206C6F77- <1> 1801 00004EB9 657263617365207265- <1> 1801 00004EC2 666572656E63656420- <1> 1801 00004ECB 6D656D6F7279206C6F- <1> 1801 00004ED4 636174696F6E207365- <1> 1801 00004EDD 677265670D0A <1> 1802 00004EE3 313020446973617373- <1> db _2digitshex(disasm_show_short)," Disassembler: always show SHORT keyword",13,10 1802 00004EEC 656D626C65723A2061- <1> 1802 00004EF5 6C776179732073686F- <1> 1802 00004EFE 772053484F5254206B- <1> 1802 00004F07 6579776F72640D0A <1> 1803 00004F0F 323020446973617373- <1> db _2digitshex(disasm_show_near), " Disassembler: always show NEAR keyword",13,10 1803 00004F18 656D626C65723A2061- <1> 1803 00004F21 6C776179732073686F- <1> 1803 00004F2A 77204E454152206B65- <1> 1803 00004F33 79776F72640D0A <1> 1804 00004F3A 343020446973617373- <1> db _2digitshex(disasm_show_far), " Disassembler: always show FAR keyword",13,10 1804 00004F43 656D626C65723A2061- <1> 1804 00004F4C 6C776179732073686F- <1> 1804 00004F55 7720464152206B6579- <1> 1804 00004F5E 776F72640D0A <1> 1805 00004F64 00 <1> asciz 1806 <1> %endif 1807 <1> 1808 <1> %if _VARIABLES || _OPTIONS || _PSPVARIABLES 1809 <1> .varhelp: 1810 00004F65 417661696C61626C65- <1> db "Available " 1810 00004F6E 20 <1> 1811 <1> %if _PSPVARIABLES && !(_VARIABLES || _OPTIONS) 1812 <1> db "read-only " 1813 <1> %endif 1814 00004F6F 6C4465627567207661- <1> db "lDebug variables:",13,10 1814 00004F78 726961626C65733A0D- <1> 1814 00004F81 0A <1> 1815 <1> %if _VARIABLES 1816 00004F82 56302E2E5646095573- <1> db "V0..VF",9,"User-specified usage",13,10 1816 00004F8B 65722D737065636966- <1> 1816 00004F94 696564207573616765- <1> 1816 00004F9D 0D0A <1> 1817 <1> %endif 1818 <1> %if _OPTIONS 1819 00004F9F 44434F094465627567- <1> db "DCO",9,"Debugger Common Options",13,10 1819 00004FA8 67657220436F6D6D6F- <1> 1819 00004FB1 6E204F7074696F6E73- <1> 1819 00004FBA 0D0A <1> 1820 00004FBC 44414F094465627567- <1> db "DAO",9,"Debugger Assembler/disassembler Options",13,10 1820 00004FC5 67657220417373656D- <1> 1820 00004FCE 626C65722F64697361- <1> 1820 00004FD7 7373656D626C657220- <1> 1820 00004FE0 4F7074696F6E730D0A <1> 1821 <1> %endif 1822 <1> %if _OPTIONS || _PSPVARIABLES && (_OPTIONS || _VARIABLES) 1823 00004FE9 2054686520666F6C6C- <1> db " The following variables cannot be written:",13,10 1823 00004FF2 6F77696E6720766172- <1> 1823 00004FFB 6961626C6573206361- <1> 1823 00005004 6E6E6F742062652077- <1> 1823 0000500D 72697474656E3A0D0A <1> 1824 <1> %endif 1825 <1> %if _PSPVARIABLES 1826 00005016 505350094465627567- <1> db "PSP",9,"Debuggee Process" 1826 0000501F 6765652050726F6365- <1> 1826 00005028 7373 <1> 1827 <1> %if _PM 1828 0000502A 20286173207265616C- <1> db " (as real mode segment)" 1828 00005033 206D6F646520736567- <1> 1828 0000503C 6D656E7429 <1> 1829 <1> %endif 1830 00005041 0D0A <1> db 13,10 1831 00005043 505052094465627567- <1> db "PPR",9,"Debuggee's Parent Process",13,10 1831 0000504C 676565277320506172- <1> 1831 00005055 656E742050726F6365- <1> 1831 0000505E 73730D0A <1> 1832 00005062 505049094465627567- <1> db "PPI",9,"Debuggee's Parent Process Interrupt 22h",13,10 1832 0000506B 676565277320506172- <1> 1832 00005074 656E742050726F6365- <1> 1832 0000507D 737320496E74657272- <1> 1832 00005086 757074203232680D0A <1> 1833 <1> %endif 1834 <1> %if _OPTIONS 1835 0000508F 444946094465627567- <1> db "DIF",9,"Debugger Internal Flags",13,10 1835 00005098 67657220496E746572- <1> 1835 000050A1 6E616C20466C616773- <1> 1835 000050AA 0D0A <1> 1836 000050AC 444353094465627567- <1> db "DCS",9,"Debugger Common Startup options",13,10 1836 000050B5 67657220436F6D6D6F- <1> 1836 000050BE 6E2053746172747570- <1> 1836 000050C7 206F7074696F6E730D- <1> 1836 000050D0 0A <1> 1837 000050D1 444153094465627567- <1> db "DAS",9,"Debugger Assembler/disassembler Startup options",13,10 1837 000050DA 67657220417373656D- <1> 1837 000050E3 626C65722F64697361- <1> 1837 000050EC 7373656D626C657220- <1> 1837 000050F5 53746172747570206F- <1> 1837 000050FE 7074696F6E730D0A <1> 1838 00005106 445052094465627567- <1> db "DPR",9,"Debugger Process" 1838 0000510F 6765722050726F6365- <1> 1838 00005118 7373 <1> 1839 <1> %if _PM 1840 0000511A 20286173205265616C- <1> db " (as Real mode segment)",13,10 1840 00005123 206D6F646520736567- <1> 1840 0000512C 6D656E74290D0A <1> 1841 00005133 445053094465627567- <1> db "DPS",9,"Debugger Process Selector (zero in real mode)" 1841 0000513C 6765722050726F6365- <1> 1841 00005145 73732053656C656374- <1> 1841 0000514E 6F7220287A65726F20- <1> 1841 00005157 696E207265616C206D- <1> 1841 00005160 6F646529 <1> 1842 <1> %endif 1843 00005164 0D0A <1> db 13,10 1844 00005166 445050094465627567- <1> db "DPP",9,"Debugger's Parent Process" 1844 0000516F 676572277320506172- <1> 1844 00005178 656E742050726F6365- <1> 1844 00005181 7373 <1> 1845 <1> %if _TSR 1846 00005183 20287A65726F20696E- <1> db " (zero in TSR mode)" 1846 0000518C 20545352206D6F6465- <1> 1846 00005195 29 <1> 1847 <1> %endif 1848 00005196 0D0A <1> db 13,10 1849 00005198 445049094465627567- <1> db "DPI",9,"Debugger's Parent process Interrupt 22h" 1849 000051A1 676572277320506172- <1> 1849 000051AA 656E742070726F6365- <1> 1849 000051B3 737320496E74657272- <1> 1849 000051BC 75707420323268 <1> 1850 <1> %if _TSR 1851 000051C3 20287A65726F20696E- <1> db " (zero in TSR mode)" 1851 000051CC 20545352206D6F6465- <1> 1851 000051D5 29 <1> 1852 <1> %endif 1853 000051D6 0D0A <1> db 13,10 1854 000051D8 0D0A <1> db 13,10 1855 000051DA 456E746572203F4F20- <1> db "Enter ?O to display the options and internal flags.",13,10 1855 000051E3 746F20646973706C61- <1> 1855 000051EC 7920746865206F7074- <1> 1855 000051F5 696F6E7320616E6420- <1> 1855 000051FE 696E7465726E616C20- <1> 1855 00005207 666C6167732E0D0A <1> 1856 <1> %endif 1857 0000520F 00 <1> asciz 1858 <1> %endif 1859 <1> %if _BOOTLDR 1860 <1> .boothelp: 1861 00005210 426F6F74206C6F6164- <1> db "Boot loading commands:",13,10 1861 00005219 696E6720636F6D6D61- <1> 1861 00005222 6E64733A0D0A <1> 1862 00005228 424F4F54204C495354- <1> db "BOOT LIST HDA",13,10 1862 00005231 204844410D0A <1> 1863 00005237 424F4F542044495220- <1> db "BOOT DIR [partition] [dirname]",13,10 1863 00005240 5B706172746974696F- <1> 1863 00005249 6E5D205B6469726E61- <1> 1863 00005252 6D655D0D0A <1> 1864 00005257 424F4F542052454144- <1> db "BOOT READ|WRITE [partition] segment [[HIDDEN=sector] sector] [count]",13,10 1864 00005260 7C5752495445205B70- <1> 1864 00005269 6172746974696F6E5D- <1> 1864 00005272 207365676D656E7420- <1> 1864 0000527B 5B5B48494444454E3D- <1> 1864 00005284 736563746F725D2073- <1> 1864 0000528D 6563746F725D205B63- <1> 1864 00005296 6F756E745D0D0A <1> 1865 <1> %if _DOSEMU 1866 0000529D 424F4F542051554954- <1> db "BOOT QUIT",9,"[exits dosemu or shuts down using APM]",13,10 1866 000052A6 095B65786974732064- <1> 1866 000052AF 6F73656D75206F7220- <1> 1866 000052B8 736875747320646F77- <1> 1866 000052C1 6E207573696E672041- <1> 1866 000052CA 504D5D0D0A <1> 1867 <1> %else 1868 <1> db "BOOT QUIT",9,"[shuts down using APM]",13,10 1869 <1> %endif 1870 000052CF 424F4F54205B50524F- <1> db "BOOT [PROTOCOL=SECTOR] partition",13,10 1870 000052D8 544F434F4C3D534543- <1> 1870 000052E1 544F525D2070617274- <1> 1870 000052EA 6974696F6E0D0A <1> 1871 000052F1 424F4F542050524F54- <1> db "BOOT PROTOCOL=proto [opt] [partition] [filename1] [filename2] [cmdline]",13,10 1871 000052FA 4F434F4C3D70726F74- <1> 1871 00005303 6F205B6F70745D205B- <1> 1871 0000530C 706172746974696F6E- <1> 1871 00005315 5D205B66696C656E61- <1> 1871 0000531E 6D65315D205B66696C- <1> 1871 00005327 656E616D65325D205B- <1> 1871 00005330 636D646C696E655D0D- <1> 1871 00005339 0A <1> 1872 0000533A 0974686520666F6C6C- <1> db 9,"the following partitions may be specified:",13,10 1872 00005343 6F77696E6720706172- <1> 1872 0000534C 746974696F6E73206D- <1> 1872 00005355 617920626520737065- <1> 1872 0000535E 6369666965643A0D0A <1> 1873 00005367 09204844416E756D09- <1> db 9," HDAnum",9,"first hard disk, num = partition (1-4 primary, 5+ logical)",13,10 1873 00005370 666972737420686172- <1> 1873 00005379 64206469736B2C206E- <1> 1873 00005382 756D203D2070617274- <1> 1873 0000538B 6974696F6E2028312D- <1> 1873 00005394 34207072696D617279- <1> 1873 0000539D 2C20352B206C6F6769- <1> 1873 000053A6 63616C290D0A <1> 1874 000053AC 09204844426E756D09- <1> db 9," HDBnum",9,"second hard disk (etc), num = partition",13,10 1874 000053B5 7365636F6E64206861- <1> 1874 000053BE 7264206469736B2028- <1> 1874 000053C7 657463292C206E756D- <1> 1874 000053D0 203D20706172746974- <1> 1874 000053D9 696F6E0D0A <1> 1875 000053DE 092048444109666972- <1> db 9," HDA",9,"first hard disk (only valid for READ|WRITE|PROTOCOL=SECTOR)",13,10 1875 000053E7 737420686172642064- <1> 1875 000053F0 69736B20286F6E6C79- <1> 1875 000053F9 2076616C696420666F- <1> 1875 00005402 7220524541447C5752- <1> 1875 0000540B 4954457C50524F544F- <1> 1875 00005414 434F4C3D534543544F- <1> 1875 0000541D 52290D0A <1> 1876 00005421 092046444109666972- <1> db 9," FDA",9,"first floppy disk",13,10 1876 0000542A 737420666C6F707079- <1> 1876 00005433 206469736B0D0A <1> 1877 0000543A 092046444209736563- <1> db 9," FDB",9,"second floppy disk (etc)",13,10 1877 00005443 6F6E6420666C6F7070- <1> 1877 0000544C 79206469736B202865- <1> 1877 00005455 7463290D0A <1> 1878 0000545A 09204C445009706172- <1> db 9," LDP",9,"partition the debugger loaded from",13,10 1878 00005463 746974696F6E207468- <1> 1878 0000546C 652064656275676765- <1> 1878 00005475 72206C6F6164656420- <1> 1878 0000547E 66726F6D0D0A <1> 1879 00005484 092059445009706172- <1> db 9," YDP",9,"partition the most recent Y command loaded from",13,10 1879 0000548D 746974696F6E207468- <1> 1879 00005496 65206D6F7374207265- <1> 1879 0000549F 63656E74205920636F- <1> 1879 000054A8 6D6D616E64206C6F61- <1> 1879 000054B1 6465642066726F6D0D- <1> 1879 000054BA 0A <1> 1880 000054BB 0920534450096C6173- <1> db 9," SDP",9,"last used partition (default if no partition specified)",13,10 1880 000054C4 742075736564207061- <1> 1880 000054CD 72746974696F6E2028- <1> 1880 000054D6 64656661756C742069- <1> 1880 000054DF 66206E6F2070617274- <1> 1880 000054E8 6974696F6E20737065- <1> 1880 000054F1 636966696564290D0A <1> 1881 000054FA 0966696C656E616D65- <1> db 9,"filename2 may be double-slash // for none",13,10 1881 00005503 32206D617920626520- <1> 1881 0000550C 646F75626C652D736C- <1> 1881 00005515 617368202F2F20666F- <1> 1881 0000551E 72206E6F6E650D0A <1> 1882 00005526 09636D646C696E6520- <1> db 9,"cmdline is only valid for lDOS, RxDOS.2, RxDOS.3 protocols",13,10 1882 0000552F 6973206F6E6C792076- <1> 1882 00005538 616C696420666F7220- <1> 1882 00005541 6C444F532C20527844- <1> 1882 0000554A 4F532E322C20527844- <1> 1882 00005553 4F532E332070726F74- <1> 1882 0000555C 6F636F6C730D0A <1> 1883 00005563 0966696C6573272064- <1> db 9,"files' directory entries are loaded to 500h and 520h",13,10 1883 0000556C 69726563746F727920- <1> 1883 00005575 656E74726965732061- <1> 1883 0000557E 7265206C6F61646564- <1> 1883 00005587 20746F203530306820- <1> 1883 00005590 616E6420353230680D- <1> 1883 00005599 0A <1> 1884 0000559A 0D0A <1> db 13,10 1885 0000559C 417661696C61626C65- <1> db "Available protocols: (default filenames, load segment, then entrypoint)",13,10 1885 000055A5 2070726F746F636F6C- <1> 1885 000055AE 733A20286465666175- <1> 1885 000055B7 6C742066696C656E61- <1> 1885 000055C0 6D65732C206C6F6164- <1> 1885 000055C9 207365676D656E742C- <1> 1885 000055D2 207468656E20656E74- <1> 1885 000055DB 7279706F696E74290D- <1> 1885 000055E4 0A <1> 1886 000055E5 204C444F5309094C44- <1> db " LDOS",9,9, "LDOS.COM or L[D]DEBUG.COM at 200h, 0:400h",13,10 1886 000055EE 4F532E434F4D206F72- <1> 1886 000055F7 204C5B445D44454255- <1> 1886 00005600 472E434F4D20617420- <1> 1886 00005609 323030682C20303A34- <1> 1886 00005612 3030680D0A <1> 1887 00005617 2046524545444F5309- <1> db " FREEDOS",9,"KERNEL.SYS or METAKERN.SYS at 60h, 0:0",13,10 1887 00005620 4B45524E454C2E5359- <1> 1887 00005629 53206F72204D455441- <1> 1887 00005632 4B45524E2E53595320- <1> 1887 0000563B 6174203630682C2030- <1> 1887 00005644 3A300D0A <1> 1888 00005648 20444F534309094950- <1> db " DOSC",9,9, "IPL.SYS at 2000h, 0:0",13,10 1888 00005651 4C2E53595320617420- <1> 1888 0000565A 32303030682C20303A- <1> 1888 00005663 300D0A <1> 1889 00005666 20454452444F530909- <1> db " EDRDOS",9,9,"DRBIO.SYS at 70h, 0:0",13,10 1889 0000566F 445242494F2E535953- <1> 1889 00005678 206174203730682C20- <1> 1889 00005681 303A300D0A <1> 1890 00005686 204D53444F53360909- <1> db " MSDOS6",9,9, "IO.SYS + MSDOS.SYS at 70h, 0:0",13,10 1890 0000568F 494F2E535953202B20- <1> 1890 00005698 4D53444F532E535953- <1> 1890 000056A1 206174203730682C20- <1> 1890 000056AA 303A300D0A <1> 1891 000056AF 204D53444F53370909- <1> db " MSDOS7",9,9, "IO.SYS at 70h, 0:200h",13,10 1891 000056B8 494F2E535953206174- <1> 1891 000056C1 203730682C20303A32- <1> 1891 000056CA 3030680D0A <1> 1892 000056CF 2049424D444F530909- <1> db " IBMDOS",9,9, "IBMBIO.COM + IBMDOS.COM at 70h, 0:0",13,10 1892 000056D8 49424D42494F2E434F- <1> 1892 000056E1 4D202B2049424D444F- <1> 1892 000056EA 532E434F4D20617420- <1> 1892 000056F3 3730682C20303A300D- <1> 1892 000056FC 0A <1> 1893 000056FD 204E544C445209094E- <1> db " NTLDR",9,9, "NTLDR at 2000h, 0:0",13,10 1893 00005706 544C44522061742032- <1> 1893 0000570F 303030682C20303A30- <1> 1893 00005718 0D0A <1> 1894 0000571A 20424F4F544D475209- <1> db " BOOTMGR",9, "BOOTMGR at 2000h, 0:0",13,10 1894 00005723 424F4F544D47522061- <1> 1894 0000572C 742032303030682C20- <1> 1894 00005735 303A300D0A <1> 1895 0000573A 205258444F532E3009- <1> db " RXDOS.0",9,"RXDOSBIO.SYS + RXDOS.SYS at 70h, 0:0",13,10 1895 00005743 5258444F5342494F2E- <1> 1895 0000574C 535953202B20525844- <1> 1895 00005755 4F532E535953206174- <1> 1895 0000575E 203730682C20303A30- <1> 1895 00005767 0D0A <1> 1896 00005769 205258444F532E3109- <1> db " RXDOS.1",9,"RXBIO.SYS + RXDOS.SYS at 70h, 0:0",13,10 1896 00005772 525842494F2E535953- <1> 1896 0000577B 202B205258444F532E- <1> 1896 00005784 535953206174203730- <1> 1896 0000578D 682C20303A300D0A <1> 1897 00005795 205258444F532E3209- <1> db " RXDOS.2",9,"RXDOS.COM at 70h, 0:400h",13,10 1897 0000579E 5258444F532E434F4D- <1> 1897 000057A7 206174203730682C20- <1> 1897 000057B0 303A343030680D0A <1> 1898 000057B8 205258444F532E3309- <1> db " RXDOS.3",9,"RXDOS.COM at 200h, 0:400h",13,10 1898 000057C1 5258444F532E434F4D- <1> 1898 000057CA 20617420323030682C- <1> 1898 000057D3 20303A343030680D0A <1> 1899 000057DC 20434841494E090942- <1> db " CHAIN",9,9,"BOOTSECT.DOS at 7C0h, -7C0h:7C00h",13,10 1899 000057E5 4F4F54534543542E44- <1> 1899 000057EE 4F5320617420374330- <1> 1899 000057F7 682C202D374330683A- <1> 1899 00005800 37433030680D0A <1> 1900 00005807 20534543544F520909- <1> db " SECTOR",9,9,"(default) load partition boot sector or MBR",13,10 1900 00005810 2864656661756C7429- <1> 1900 00005819 206C6F616420706172- <1> 1900 00005822 746974696F6E20626F- <1> 1900 0000582B 6F7420736563746F72- <1> 1900 00005834 206F72204D42520D0A <1> 1901 0000583D 20534543544F52414C- <1> db " SECTORALT",9,"as SECTOR, but entry at 07C0h:0",13,10 1901 00005846 540961732053454354- <1> 1901 0000584F 4F522C206275742065- <1> 1901 00005858 6E7472792061742030- <1> 1901 00005861 374330683A300D0A <1> 1902 00005869 0D0A <1> db 13,10 1903 0000586B 417661696C61626C65- <1> db "Available options:",13,10 1903 00005874 206F7074696F6E733A- <1> 1903 0000587D 0D0A <1> 1904 0000587F 204D494E504152413D- <1> db " MINPARA=num",9,9, "load at least that many paragraphs",13,10 1904 00005888 6E756D09096C6F6164- <1> 1904 00005891 206174206C65617374- <1> 1904 0000589A 2074686174206D616E- <1> 1904 000058A3 792070617261677261- <1> 1904 000058AC 7068730D0A <1> 1905 000058B1 204D4158504152413D- <1> db " MAXPARA=num",9,9, "load at most that many paragraphs (0 = as many as fit)",13,10 1905 000058BA 6E756D09096C6F6164- <1> 1905 000058C3 206174206D6F737420- <1> 1905 000058CC 74686174206D616E79- <1> 1905 000058D5 207061726167726170- <1> 1905 000058DE 6873202830203D2061- <1> 1905 000058E7 73206D616E79206173- <1> 1905 000058F0 20666974290D0A <1> 1906 000058F7 205345474D454E543D- <1> db " SEGMENT=num",9,9, "change segment at that the kernel loads",13,10 1906 00005900 6E756D09096368616E- <1> 1906 00005909 6765207365676D656E- <1> 1906 00005912 742061742074686174- <1> 1906 0000591B 20746865206B65726E- <1> 1906 00005924 656C206C6F6164730D- <1> 1906 0000592D 0A <1> 1907 0000592E 20454E5452593D5B6E- <1> db " ENTRY=[num:]num",9,"change entrypoint (CS (relative) : IP)",13,10 1907 00005937 756D3A5D6E756D0963- <1> 1907 00005940 68616E676520656E74- <1> 1907 00005949 7279706F696E742028- <1> 1907 00005952 4353202872656C6174- <1> 1907 0000595B 69766529203A204950- <1> 1907 00005964 290D0A <1> 1908 00005967 204250423D5B6E756D- <1> db " BPB=[num:]num",9,9, "change BPB load address (segment -1 = auto-BPB)",13,10 1908 00005970 3A5D6E756D09096368- <1> 1908 00005979 616E67652042504220- <1> 1908 00005982 6C6F61642061646472- <1> 1908 0000598B 65737320287365676D- <1> 1908 00005994 656E74202D31203D20- <1> 1908 0000599D 6175746F2D42504229- <1> 1908 000059A6 0D0A <1> 1910 000059A8 20434845434B4F4646- <1> db " CHECKOFFSET=num",9,"set address of word to check, must be even",13,10 1910 000059B1 5345543D6E756D0973- <1> 1910 000059BA 657420616464726573- <1> 1910 000059C3 73206F6620776F7264- <1> 1910 000059CC 20746F20636865636B- <1> 1910 000059D5 2C206D757374206265- <1> 1910 000059DE 206576656E0D0A <1> 1911 000059E5 20434845434B56414C- <1> db " CHECKVALUE=num",9,9,"set value of word to check (0 = no check)",13,10 1911 000059EE 55453D6E756D090973- <1> 1911 000059F7 65742076616C756520- <1> 1911 00005A00 6F6620776F72642074- <1> 1911 00005A09 6F20636865636B2028- <1> 1911 00005A12 30203D206E6F206368- <1> 1911 00005A1B 65636B290D0A <1> 1912 00005A21 426F6F6C65616E206F- <1> db "Boolean options: [opt=bool]",13,10 1912 00005A2A 7074696F6E733A205B- <1> 1912 00005A33 6F70743D626F6F6C5D- <1> 1912 00005A3C 0D0A <1> 1913 00005A3E 205345545F444C5F55- <1> db " SET_DL_UNIT",9,9,"set dl to load unit",13,10 1913 00005A47 4E4954090973657420- <1> 1913 00005A50 646C20746F206C6F61- <1> 1913 00005A59 6420756E69740D0A <1> 1914 00005A61 205345545F424C5F55- <1> db " SET_BL_UNIT",9,9,"set bl to load unit",13,10 1914 00005A6A 4E4954090973657420- <1> 1914 00005A73 626C20746F206C6F61- <1> 1914 00005A7C 6420756E69740D0A <1> 1915 00005A84 205345545F53494449- <1> db " SET_SIDI_CLUSTER",9,"set si:di to first cluster",13,10 1915 00005A8D 5F434C555354455209- <1> 1915 00005A96 7365742073693A6469- <1> 1915 00005A9F 20746F206669727374- <1> 1915 00005AA8 20636C75737465720D- <1> 1915 00005AB1 0A <1> 1916 00005AB2 205345545F44535349- <1> db " SET_DSSI_DPT",9,9,"set ds:si to DPT address",13,10 1916 00005ABB 5F4450540909736574- <1> 1916 00005AC4 2064733A736920746F- <1> 1916 00005ACD 204450542061646472- <1> 1916 00005AD6 6573730D0A <1> 1917 00005ADB 20505553485F445054- <1> db " PUSH_DPT",9,9,"push DPT address and DPT entry address",13,10 1917 00005AE4 090970757368204450- <1> 1917 00005AED 542061646472657373- <1> 1917 00005AF6 20616E642044505420- <1> 1917 00005AFF 656E74727920616464- <1> 1917 00005B08 726573730D0A <1> 1918 00005B0E 204441544153544152- <1> db " DATASTART_HIDDEN",9,"add hidden sectors to datastart var",13,10 1918 00005B17 545F48494444454E09- <1> 1918 00005B20 616464206869646465- <1> 1918 00005B29 6E20736563746F7273- <1> 1918 00005B32 20746F206461746173- <1> 1918 00005B3B 74617274207661720D- <1> 1918 00005B44 0A <1> 1919 00005B45 205345545F41584258- <1> db " SET_AXBX_DATASTART",9,"set ax:bx to datastart var",13,10 1919 00005B4E 5F4441544153544152- <1> 1919 00005B57 54097365742061783A- <1> 1919 00005B60 627820746F20646174- <1> 1919 00005B69 617374617274207661- <1> 1919 00005B72 720D0A <1> 1920 00005B75 205345545F44534250- <1> db " SET_DSBP_BPB",9,9,"set ds:bp to BPB address",13,10 1920 00005B7E 5F4250420909736574- <1> 1920 00005B87 2064733A627020746F- <1> 1920 00005B90 204250422061646472- <1> 1920 00005B99 6573730D0A <1> 1921 00005B9E 204C42415F5345545F- <1> db " LBA_SET_TYPE",9,9,"set LBA partition type in BPB",13,10 1921 00005BA7 545950450909736574- <1> 1921 00005BB0 204C42412070617274- <1> 1921 00005BB9 6974696F6E20747970- <1> 1921 00005BC2 6520696E204250420D- <1> 1921 00005BCB 0A <1> 1922 00005BCC 204D4553534147455F- <1> db " MESSAGE_TABLE",9,9, "provide message table pointed to at 1EEh",13,10 1922 00005BD5 5441424C4509097072- <1> 1922 00005BDE 6F76696465206D6573- <1> 1922 00005BE7 73616765207461626C- <1> 1922 00005BF0 6520706F696E746564- <1> 1922 00005BF9 20746F206174203145- <1> 1922 00005C02 45680D0A <1> 1924 00005C06 205345545F41584258- <1> db " SET_AXBX_ROOT_HIDDEN",9, "set ax:bx to root start with hidden sectors",13,10 1924 00005C0F 5F524F4F545F484944- <1> 1924 00005C18 44454E097365742061- <1> 1924 00005C21 783A627820746F2072- <1> 1924 00005C2A 6F6F74207374617274- <1> 1924 00005C33 207769746820686964- <1> 1924 00005C3C 64656E20736563746F- <1> 1924 00005C45 72730D0A <1> 1926 00005C49 204E4F5F4250420909- <1> db " NO_BPB",9,9,9, "do not load BPB",13,10 1926 00005C52 09646F206E6F74206C- <1> 1926 00005C5B 6F6164204250420D0A <1> 1927 00005C64 205345545F44535349- <1> db " SET_DSSI_PARTINFO",9, "load part table to 600h, point ds:si + ds:bp to it",13,10 1927 00005C6D 5F50415254494E464F- <1> 1927 00005C76 096C6F616420706172- <1> 1927 00005C7F 74207461626C652074- <1> 1927 00005C88 6F20363030682C2070- <1> 1927 00005C91 6F696E742064733A73- <1> 1927 00005C9A 69202B2064733A6270- <1> 1927 00005CA3 20746F2069740D0A <1> 1928 00005CAB 00 <1> asciz 1929 <1> %endif 1930 <1> %endif 1931 <1> 1932 00005CAC 54686973206C446562- <1> .readonly: asciz "This lDebug variable cannot be written to. See ?V.",13,10 1932 00005CB5 756720766172696162- <1> 1932 00005CBE 6C652063616E6E6F74- <1> 1932 00005CC7 206265207772697474- <1> 1932 00005CD0 656E20746F2E205365- <1> 1932 00005CD9 65203F562E0D0A00 <1> 1933 00005CE1 54686973206D656D6F- <1> .readonly_mem: asciz "This memory variable cannot be written to.",13,10 1933 00005CEA 727920766172696162- <1> 1933 00005CF3 6C652063616E6E6F74- <1> 1933 00005CFC 206265207772697474- <1> 1933 00005D05 656E20746F2E0D0A00 <1> 1934 00005D0E 5B6D6F72655D <1> .more: db "[more]" 1935 <1> .more_size equ $-.more 1936 00005D14 0D2020202020200D <1> .more_over: db 13," ",13 ; to overwrite previous prompt 1937 <1> .more_over_size equ $-.more_over 1938 00005D1C 5E430D0A <1> .ctrlc: db "^C",13,10 1939 <1> .ctrlc_size equ $-.ctrlc 1940 00005D20 00 <1> asciz 1941 <1> .freedos_ctrlc_workaround: 1942 00005D21 20284F6C6420467265- <1> asciz " (Old FreeDOS kernel Ctrl-C work around happened)",13,10 1942 00005D2A 65444F53206B65726E- <1> 1942 00005D33 656C204374726C2D43- <1> 1942 00005D3C 20776F726B2061726F- <1> 1942 00005D45 756E64206861707065- <1> 1942 00005D4E 6E6564290D0A00 <1> 1943 <1> .not_while_indos: 1944 00005D55 436F6D6D616E64206E- <1> asciz "Command not supported while in InDOS mode.",13,10 1944 00005D5E 6F7420737570706F72- <1> 1944 00005D67 746564207768696C65- <1> 1944 00005D70 20696E20496E444F53- <1> 1944 00005D79 206D6F64652E0D0A00 <1> 1945 00005D82 43757272656E74206D- <1> .rv_mode.before: asciz "Current mode: " 1945 00005D8B 6F64653A2000 <1> 1946 <1> %if _PM 1947 00005D91 44504D492031362D62- <1> .rv_mode_dpmi_16: asciz "DPMI 16-bit CS",13,10 1947 00005D9A 69742043530D0A00 <1> 1948 00005DA2 44504D492033322D62- <1> .rv_mode_dpmi_32: asciz "DPMI 32-bit CS",13,10 1948 00005DAB 69742043530D0A00 <1> 1949 <1> %endif 1950 00005DB3 5265616C203836204D- <1> .rv_mode_r86m: asciz "Real 86 Mode",13,10 1950 00005DBC 6F64650D0A00 <1> 1951 00005DC2 5669727475616C2038- <1> .rv_mode_v86m: asciz "Virtual 86 Mode",13,10 1951 00005DCB 36204D6F64650D0A00 <1> 1952 <1> 1953 00005DD4 333836207265676973- <1> .regs386: asciz "386 registers are " 1953 00005DDD 746572732061726520- <1> 1953 00005DE6 00 <1> 1954 00005DE7 6E6F7420 <1> .regs386_off:db "not " 1955 00005DEB 646973706C61796564- <1> .regs386_on: asciz "displayed",13,10 1955 00005DF4 0D0A00 <1> 1956 <1> 1957 <1> %if _EMS 1958 <1> .xhelp: 1959 00005DF7 457870616E64656420- <1> db "Expanded memory (EMS) commands:",13,10 1959 00005E00 6D656D6F7279202845- <1> 1959 00005E09 4D532920636F6D6D61- <1> 1959 00005E12 6E64733A0D0A <1> 1960 00005E18 2020416C6C6F636174- <1> db " Allocate",9, "XA count",13,10 1960 00005E21 6509584120636F756E- <1> 1960 00005E2A 740D0A <1> 1961 00005E2D 20204465616C6C6F63- <1> db " Deallocate",9, "XD handle",13,10 1961 00005E36 617465095844206861- <1> 1961 00005E3F 6E646C650D0A <1> 1962 00005E45 20204D6170206D656D- <1> db " Map memory",9, "XM logical-page physical-page handle",13,10 1962 00005E4E 6F727909584D206C6F- <1> 1962 00005E57 676963616C2D706167- <1> 1962 00005E60 652070687973696361- <1> 1962 00005E69 6C2D70616765206861- <1> 1962 00005E72 6E646C650D0A <1> 1963 00005E78 20205265616C6C6F63- <1> db " Reallocate",9, "XR handle count",13,10 1963 00005E81 617465095852206861- <1> 1963 00005E8A 6E646C6520636F756E- <1> 1963 00005E93 740D0A <1> 1964 00005E96 202053686F77207374- <1> db " Show status",9, "XS",13,10 1964 00005E9F 617475730958530D0A <1> 1965 00005EA8 00 <1> asciz 1966 <1> %endif 1967 <1> 1968 <1> %if _MCB 1969 00005EA9 456E64206F66206368- <1> .invmcbadr: asciz "End of chain: invalid MCB address.",13,10 1969 00005EB2 61696E3A20696E7661- <1> 1969 00005EBB 6C6964204D43422061- <1> 1969 00005EC4 6464726573732E0D0A- <1> 1969 00005ECD 00 <1> 1970 <1> %endif 1971 <1> 1972 <1> %if _TSR 1973 00005ECE 43616E6E6F7420676F- <1> .pspnotfound: asciz "Cannot go resident, child PSP not found.",13,10 1973 00005ED7 207265736964656E74- <1> 1973 00005EE0 2C206368696C642050- <1> 1973 00005EE9 5350206E6F7420666F- <1> 1973 00005EF2 756E642E0D0A00 <1> 1974 00005EF9 43616E6E6F7420676F- <1> .psphooked: asciz "Cannot go resident, child PSP parent return address hooked.",13,10 1974 00005F02 207265736964656E74- <1> 1974 00005F0B 2C206368696C642050- <1> 1974 00005F14 535020706172656E74- <1> 1974 00005F1D 2072657475726E2061- <1> 1974 00005F26 64647265737320686F- <1> 1974 00005F2F 6F6B65642E0D0A00 <1> 1975 00005F37 506174636865642050- <1> .nowtsr1: asciz "Patched PSP at " 1975 00005F40 53502061742000 <1> 1976 00005F47 2C206E6F7720726573- <1> .nowtsr2: asciz ", now resident.",13,10 1976 00005F50 6964656E742E0D0A00 <1> 1977 00005F59 416C72656164792072- <1> .alreadytsr: asciz "Already resident.",13,10 1977 00005F62 65736964656E742E0D- <1> 1977 00005F6B 0A00 <1> 1978 <1> %endif 1979 <1> %if _PM && (_TSR || _BOOTLDR) 1980 00005F6D 43616E6E6F74207175- <1> .cannotpmquit: asciz "Cannot quit, still in protected mode.",13,10 1980 00005F76 69742C207374696C6C- <1> 1980 00005F7F 20696E2070726F7465- <1> 1980 00005F88 63746564206D6F6465- <1> 1980 00005F91 2E0D0A00 <1> 1981 <1> %endif 1982 <1> %if _BOOTLDR 1983 00005F95 436F6D6D616E64206E- <1> .nobootsupp: asciz "Command not supported in boot loaded mode.",13,10 1983 00005F9E 6F7420737570706F72- <1> 1983 00005FA7 74656420696E20626F- <1> 1983 00005FB0 6F74206C6F61646564- <1> 1983 00005FB9 206D6F64652E0D0A00 <1> 1984 00005FC2 53687574646F776E20- <1> .boot_quit_fail:asciz "Shutdown not supported.",13,10 1984 00005FCB 6E6F7420737570706F- <1> 1984 00005FD4 727465642E0D0A00 <1> 1985 00005FDC 426F6F74206661696C- <1> .bootfail: asciz "Boot failure: " 1985 00005FE5 7572653A2000 <1> 1986 00005FEB 52656164696E672073- <1> .bootfail_read: db "Reading sector failed (error " 1986 00005FF4 6563746F7220666169- <1> 1986 00005FFD 6C656420286572726F- <1> 1986 00006006 7220 <1> 1987 00006008 5F5F68292E0D0A00 <1> .bootfail_read_errorcode: asciz "__h).",13,10 1988 00006010 426F6F742073656374- <1> .bootfail_sig: asciz "Boot sector signature missing (is not AA55h).",13,10 1988 00006019 6F72207369676E6174- <1> 1988 00006022 757265206D69737369- <1> 1988 0000602B 6E6720286973206E6F- <1> 1988 00006034 74204141353568292E- <1> 1988 0000603D 0D0A00 <1> 1989 00006040 506172746974696F6E- <1> .bootfail_sig_parttable: ascii "Partition table signature missing" 1989 00006049 207461626C65207369- <1> 1989 00006052 676E6174757265206D- <1> 1989 0000605B 697373696E67 <1> 1990 00006061 20286973206E6F7420- <1> asciz " (is not AA55h).",13,10 1990 0000606A 4141353568292E0D0A- <1> 1990 00006073 00 <1> 1991 00006074 426F6F742073656374- <1> .bootfail_code: asciz "Boot sector code invalid (is 0000h).",13,10 1991 0000607D 6F7220636F64652069- <1> 1991 00006086 6E76616C6964202869- <1> 1991 0000608F 73203030303068292E- <1> 1991 00006098 0D0A00 <1> 1992 <1> .bootfail_secsizediffer: 1993 0000609B 425042204270532064- <1> asciz "BPB BpS differs from actual sector size.",13,10 1993 000060A4 696666657273206672- <1> 1993 000060AD 6F6D2061637475616C- <1> 1993 000060B6 20736563746F722073- <1> 1993 000060BF 697A652E0D0A00 <1> 1994 <1> .bootfail_stack_underflow: 1995 000060C6 426F6F742073746163- <1> asciz "Boot stack underflowed.",13,10 1995 000060CF 6B20756E646572666C- <1> 1995 000060D8 6F7765642E0D0A00 <1> 1996 <1> .bootfail_check_mismatch: 1997 000060E0 436865636B206D6973- <1> db "Check mismatch, expected " 1997 000060E9 6D617463682C206578- <1> 1997 000060F2 70656374656420 <1> 1998 <1> .bootfail_check_mismatch.check_value: 1999 000060F9 5F5F5F5F6820617420- <1> db "____h at offset " 1999 00006102 6F666673657420 <1> 2000 <1> .bootfail_check_mismatch.check_offset: 2001 00006109 5F5F5F5F6820627574- <1> db "____h but has " 2001 00006112 2068617320 <1> 2002 <1> .bootfail_check_mismatch.check_got: 2003 00006117 5F5F5F5F682E0D0A00 <1> asciz "____h.",13,10 2004 00006120 4F7574206F66206D65- <1> .boot_out_of_memory_error: asciz "Out of memory.", 13,10 2004 00006129 6D6F72792E0D0A00 <1> 2005 00006131 546F6F206D616E7920- <1> .boot_too_many_partitions_error:asciz "Too many partitions (or a loop).",13,10 2005 0000613A 706172746974696F6E- <1> 2005 00006143 7320286F722061206C- <1> 2005 0000614C 6F6F70292E0D0A00 <1> 2006 00006154 506172746974696F6E- <1> .boot_partition_cycle_error: asciz "Partition table cycle detected.",13,10 2006 0000615D 207461626C65206379- <1> 2006 00006166 636C65206465746563- <1> 2006 0000616F 7465642E0D0A00 <1> 2007 00006176 506172746974696F6E- <1> .boot_partition_not_found: asciz "Partition not found.",13,10 2007 0000617F 206E6F7420666F756E- <1> 2007 00006188 642E0D0A00 <1> 2008 0000618D 52656164206572726F- <1> .boot_access_error: asciz "Read error.", 13,10 2008 00006196 722E0D0A00 <1> 2009 0000619B 536563746F72207369- <1> .boot_sector_too_large: asciz "Sector size too small (< 32 bytes).", 13,10 2009 000061A4 7A6520746F6F20736D- <1> 2009 000061AD 616C6C20283C203332- <1> 2009 000061B6 206279746573292E0D- <1> 2009 000061BF 0A00 <1> 2010 000061C1 536563746F72207369- <1> .boot_sector_too_small: asciz "Sector size too large (> 8192 bytes).", 13,10 2010 000061CA 7A6520746F6F206C61- <1> 2010 000061D3 72676520283E203831- <1> 2010 000061DC 393220627974657329- <1> 2010 000061E5 2E0D0A00 <1> 2011 000061E9 536563746F72207369- <1> .boot_sector_not_power: asciz "Sector size not a power of two.", 13,10 2011 000061F2 7A65206E6F74206120- <1> 2011 000061FB 706F776572206F6620- <1> 2011 00006204 74776F2E0D0A00 <1> 2012 0000620B 496E76616C69642067- <1> .boot_invalid_sectors: asciz "Invalid geometry sectors.", 13,10 2012 00006214 656F6D657472792073- <1> 2012 0000621D 6563746F72732E0D0A- <1> 2012 00006226 00 <1> 2013 00006227 496E76616C69642067- <1> .boot_invalid_heads: asciz "Invalid geometry heads.", 13,10 2013 00006230 656F6D657472792068- <1> 2013 00006239 656164732E0D0A00 <1> 2014 00006241 46696C65206E6F7420- <1> .boot_file_not_found: asciz "File not found.",13,10 2014 0000624A 666F756E642E0D0A00 <1> 2015 00006253 46696C6520746F6F20- <1> .boot_file_too_big_error: asciz "File too big.",13,10 2015 0000625C 6269672E0D0A00 <1> 2016 00006263 46696C6520746F6F20- <1> .boot_file_too_small_error: asciz "File too small.",13,10 2016 0000626C 736D616C6C2E0D0A00 <1> 2017 00006275 42616420616D6F756E- <1> .boot_badclusters: asciz "Bad amount of clusters.",13,10 2017 0000627E 74206F6620636C7573- <1> 2017 00006287 746572732E0D0A00 <1> 2018 0000628F 42616420636C757374- <1> .boot_badchain: asciz "Bad cluster chain.",13,10 2018 00006298 657220636861696E2E- <1> 2018 000062A1 0D0A00 <1> 2019 000062A4 4261642046696C6520- <1> .boot_badfat: asciz "Bad File Allocation Table.",13,10 2019 000062AD 416C6C6F636174696F- <1> 2019 000062B6 6E205461626C652E0D- <1> 2019 000062BF 0A00 <1> 2020 000062C1 496E76616C69642066- <1> .boot_invalid_filename: asciz "Invalid filename.",13,10 2020 000062CA 696C656E616D652E0D- <1> 2020 000062D3 0A00 <1> 2021 000062D5 43616E6E6F74207365- <1> .boot_cannot_set_both: asciz "Cannot set both " 2021 000062DE 7420626F74682000 <1> 2022 000062E6 20616E642000 <1> .boot_and: asciz " and " 2023 000062EC 2E0D0A00 <1> .boot_dot_crlf: asciz ".",13,10 2024 000062F0 2120496E7465726E61- <1> .boot_internal_error: asciz "! Internal error !",13,10 2024 000062F9 6C206572726F722021- <1> 2024 00006302 0D0A00 <1> 2025 00006305 42504220616E64206C- <1> .boot_bpb_load_overlap: asciz "BPB and load area overlap.",13,10 2025 0000630E 6F6164206172656120- <1> 2025 00006317 6F7665726C61702E0D- <1> 2025 00006320 0A00 <1> 2026 00006322 5365676D656E742074- <1> .boot_segment_too_low: asciz "Segment too low.",13,10 2026 0000632B 6F6F206C6F772E0D0A- <1> 2026 00006334 00 <1> 2027 00006335 42504220746F6F206C- <1> .boot_bpb_too_low: asciz "BPB too low.",13,10 2027 0000633E 6F772E0D0A00 <1> 2028 00006344 2120496E7465726E61- <1> .boot_auxbuff_crossing: db "! Internal error !, " 2028 0000634D 6C206572726F722021- <1> 2028 00006356 2C20 <1> 2029 00006358 617578627566662063- <1> asciz "auxbuff crosses 64 KiB boundary.",13,10 2029 00006361 726F73736573203634- <1> 2029 0000636A 204B694220626F756E- <1> 2029 00006373 646172792E0D0A00 <1> 2030 0000637B 5245414400 <1> .read: asciz "READ" 2031 00006380 575249544500 <1> .write: asciz "WRITE" 2032 00006386 48494444454E00 <1> .hidden: asciz "HIDDEN" 2033 0000638D 44495200 <1> .dir: asciz "DIR" 2034 00006391 082020205B4449525D <1> .dirinsteadsize:countedb " [DIR]" 2035 0000639A 2F00 <1> .emptydirname: asciz "/" 2036 0000639C 424F4F5400 <1> .boot: asciz "BOOT" 2037 000063A1 5155495400 <1> .quit: asciz "QUIT" 2038 000063A6 50524F544F434F4C00 <1> .protocol: asciz "PROTOCOL" 2039 000063AF 5345474D454E5400 <1> .segment: asciz "SEGMENT" 2040 000063B7 454E54525900 <1> .entry: asciz "ENTRY" 2041 000063BD 42504200 <1> .bpb: asciz "BPB" 2042 000063C1 4D494E5041524100 <1> .minpara: asciz "MINPARA" 2043 000063C9 4D41585041524100 <1> .maxpara: asciz "MAXPARA" 2044 000063D1 434845434B4F464653- <1> .checkoffset: asciz "CHECKOFFSET" 2044 000063DA 455400 <1> 2045 000063DD 434845434B56414C55- <1> .checkvalue: asciz "CHECKVALUE" 2045 000063E6 4500 <1> 2046 000063E8 534543544F5200 <1> .sector: asciz "SECTOR" 2047 000063EF 534543544F52414C54- <1> .sector_alt: asciz "SECTORALT" 2047 000063F8 00 <1> 2048 000063F9 4B45524E454C2E5359- <1> .freedos_kernel_name: asciz "KERNEL.SYS" 2048 00006402 5300 <1> 2049 00006404 49504C2E53595300 <1> .dosc_kernel_name: asciz "IPL.SYS" 2050 0000640C 445242494F2E535953- <1> .edrdos_kernel_name: asciz "DRBIO.SYS" 2050 00006415 00 <1> 2051 00006416 4C444F532E434F4D00 <1> .ldos_kernel_name: asciz "LDOS.COM" 2052 <1> .msdos7_kernel_name: 2053 0000641F 494F2E53595300 <1> .msdos6_kernel_name: asciz "IO.SYS" 2054 00006426 4D53444F532E535953- <1> .msdos6_add_name: asciz "MSDOS.SYS" 2054 0000642F 00 <1> 2055 00006430 49424D42494F2E434F- <1> .ibmdos_kernel_name: asciz "IBMBIO.COM" 2055 00006439 4D00 <1> 2056 0000643B 49424D444F532E434F- <1> .ibmdos_add_name: asciz "IBMDOS.COM" 2056 00006444 4D00 <1> 2057 00006446 4E544C445200 <1> .ntldr_kernel_name: asciz "NTLDR" 2058 0000644C 424F4F544D475200 <1> .bootmgr_kernel_name: asciz "BOOTMGR" 2059 00006454 424F4F54534543542E- <1> .chain_kernel_name: asciz "BOOTSECT.DOS" 2059 0000645D 444F5300 <1> 2060 00006461 5258444F5342494F2E- <1> .rxdos.0_kernel_name: asciz "RXDOSBIO.SYS" 2060 0000646A 53595300 <1> 2061 0000646E 525842494F2E535953- <1> .rxdos.1_kernel_name: asciz "RXBIO.SYS" 2061 00006477 00 <1> 2062 <1> .rxdos.0_add_name: 2063 00006478 5258444F532E535953- <1> .rxdos.1_add_name: asciz "RXDOS.SYS" 2063 00006481 00 <1> 2064 00006482 5258444F532E434F4D- <1> .rxdos.2_kernel_name: asciz "RXDOS.COM" 2064 0000648B 00 <1> 2065 0000648C 00 <1> .addname_empty: asciz 2066 0000648D 43616E6E6F74207175- <1> .cannotbootquit_memsizes: asciz "Cannot quit, memory size changed.",13,10 2066 00006496 69742C206D656D6F72- <1> 2066 0000649F 792073697A65206368- <1> 2066 000064A8 616E6765642E0D0A00 <1> 2067 <1> %endif 2068 000064B1 5448454E00 <1> .then: asciz "THEN" 2069 000064B6 4E4F5400 <1> .not: asciz "NOT" 2070 000064BA 565600 <1> .vv: asciz "VV" 2071 000064BD 564D00 <1> .vm: asciz "VM" 2072 000064C0 0D436F646520736567- <1> .vm_codeseg: counted "Code segment=" 2072 000064C9 6D656E743D <1> 2073 000064CE 0D4461746120736567- <1> .vm_dataseg: counted "Data segment=" 2073 000064D7 6D656E743D <1> 2074 000064DC 0E456E747279207365- <1> .vm_entryseg: counted "Entry segment=" 2074 000064E5 676D656E743D <1> 2075 000064EB 104175786275666620- <1> .vm_auxseg: counted "Auxbuff segment=" 2075 000064F4 7365676D656E743D <1> 2076 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 2077 000064FC 10486973746F727920- <1> .vm_hisseg: counted "History segment=" 2077 00006505 7365676D656E743D <1> 2078 <1> %endif 2079 <1> %if _PM 2080 0000650D 0A2073656C6563746F- <1> .vm_selector: counted " selector=" 2080 00006516 723D <1> 2081 <1> %endif 2082 00006518 546F6F206C6F6E6720- <1> .n_toolongtail: asciz "Too long N command tail!",13,10 2082 00006521 4E20636F6D6D616E64- <1> 2082 0000652A 207461696C210D0A00 <1> 2083 00006533 546F6F206C6F6E6720- <1> .n_toolongname: asciz "Too long N command name!",13,10 2083 0000653C 4E20636F6D6D616E64- <1> 2083 00006545 206E616D65210D0A00 <1> 2084 0000654E 4E554D42455200 <1> .number: asciz "NUMBER" 2085 00006555 434F554E54455200 <1> .counter: asciz "COUNTER" 2086 0000655D 494400 <1> .id: asciz "ID" 2087 00006560 5748454E00 <1> .when: asciz "WHEN" 2088 00006565 4F464653455400 <1> .offset: asciz "OFFSET" 2089 0000656C 3F00 <1> .questionmark: asciz "?" 2090 0000656E 4F <1> .or: db "O" 2091 0000656F 5200 <1> .r: asciz "R" 2092 00006571 4E4400 <1> .nd: asciz "ND" 2093 00006574 52454D454D42455200 <1> .remember: asciz "REMEMBER" 2094 0000657D 474F544F00 <1> .goto: asciz "GOTO" 2095 00006582 534F4600 <1> .sof: asciz "SOF" 2096 00006586 454F4600 <1> .eof: asciz "EOF" 2097 0000658A 4572726F723A20474F- <1> .goto_not_file: asciz "Error: GOTO command not supported when not reading a script.",13,10 2097 00006593 544F20636F6D6D616E- <1> 2097 0000659C 64206E6F7420737570- <1> 2097 000065A5 706F72746564207768- <1> 2097 000065AE 656E206E6F74207265- <1> 2097 000065B7 6164696E6720612073- <1> 2097 000065C0 63726970742E0D0A00 <1> 2098 000065C9 4572726F723A20474F- <1> .goto_empty: asciz "Error: GOTO needs a destination label.",13,10 2098 000065D2 544F206E6565647320- <1> 2098 000065DB 612064657374696E61- <1> 2098 000065E4 74696F6E206C616265- <1> 2098 000065ED 6C2E0D0A00 <1> 2099 000065F2 4572726F723A20474F- <1> .goto_not_found.1: asciz "Error: GOTO destination label ",'"' 2099 000065FB 544F2064657374696E- <1> 2099 00006604 6174696F6E206C6162- <1> 2099 0000660D 656C202200 <1> 2100 00006612 22206E6F7420666F75- <1> .goto_not_found.2: asciz '"'," not found.",13,10 2100 0000661B 6E642E0D0A00 <1> 2101 00006621 4572726F723A206175- <1> .guard_auxbuff_error: asciz "Error: auxbuff already guarded!",13,10 2101 0000662A 786275666620616C72- <1> 2101 00006633 656164792067756172- <1> 2101 0000663C 646564210D0A00 <1> 2102 00006643 4572726F723A20436F- <1> .guard_re_error: asciz "Error: Command not supported while reading from RE buffer.",13,10 2102 0000664C 6D6D616E64206E6F74- <1> 2102 00006655 20737570706F727465- <1> 2102 0000665E 64207768696C652072- <1> 2102 00006667 656164696E67206672- <1> 2102 00006670 6F6D20524520627566- <1> 2102 00006679 6665722E0D0A00 <1> 2103 00006680 4572726F723A20556E- <1> .unexpected_auxbuff_guard: asciz "Error: Unexpected auxbuff guard!",13,10 2103 00006689 657870656374656420- <1> 2103 00006692 617578627566662067- <1> 2103 0000669B 75617264210D0A00 <1> 2104 000066A3 4572726F723A20556E- <1> .unexpected_noneol_re: asciz "Error: Unexpected non-EOL in RE processing!",13,10 2104 000066AC 657870656374656420- <1> 2104 000066B5 6E6F6E2D454F4C2069- <1> 2104 000066BE 6E2052452070726F63- <1> 2104 000066C7 657373696E67210D0A- <1> 2104 000066D0 00 <1> 2105 000066D1 5245504C41434500 <1> .replace: asciz "REPLACE" 2106 000066D9 415050454E4400 <1> .append: asciz "APPEND" 2107 000066E0 44 <1> .dword: db "D" 2108 000066E1 574F524400 <1> .word: asciz "WORD" 2109 000066E6 33 <1> .3byte: db "3" 2110 000066E7 4259544500 <1> .byte: asciz "BYTE" 2111 000066EC 44 <1> .dwords: db "D" 2112 000066ED 574F52445300 <1> .words: asciz "WORDS" 2113 000066F3 425954455300 <1> .bytes: asciz "BYTES" 2114 000066F9 4C454E47544800 <1> .length: asciz "LENGTH" 2115 00006700 52414E474500 <1> .range: asciz "RANGE" 2116 00006706 5245564552534500 <1> .reverse: asciz "REVERSE" 2117 0000670E 56414C554500 <1> .value: asciz "VALUE" 2118 00006714 494E00 <1> .in: asciz "IN" 2119 00006717 46524F4D00 <1> .from: asciz "FROM" 2120 0000671C 544F00 <1> .to: asciz "TO" 2121 0000671F 455845435554494E47- <1> .executing: asciz "EXECUTING" 2121 00006728 00 <1> 2122 00006729 46524F4D204C494E45- <1> .executing_value_range: asciz "FROM LINEAR cs:eip LENGTH abo - eip" 2122 00006732 41522063733A656970- <1> 2122 0000673B 204C454E4754482061- <1> 2122 00006744 626F202D2065697000 <1> 2123 0000674D 4C494E45415200 <1> .linear: asciz "LINEAR" 2124 00006754 4241534500 <1> .base: asciz "BASE" 2125 00006759 47524F555000 <1> .group: asciz "GROUP" 2126 0000675F 574944544800 <1> .width: asciz "WIDTH" 2127 <1> %if _HISTORY 2128 <1> .history_internal_error: 2129 00006765 0D0A496E7465726E61- <1> asciz 13,10,"Internal error in history handling!",13,10 2129 0000676E 6C206572726F722069- <1> 2129 00006777 6E20686973746F7279- <1> 2129 00006780 2068616E646C696E67- <1> 2129 00006789 210D0A00 <1> 2130 <1> %endif 2131 0000678D 07204572726F7221 <1> .di_error: counted " Error!" 2132 00006795 0768696464656E20 <1> .di_hidden: counted "hidden " 2133 0000679D 0720284949535029 <1> .di_iisp: counted " (IISP)" 2134 000067A5 1320286E6F6E737461- <1> .di_nonstd_iisp:counted " (nonstandard IISP)" 2134 000067AE 6E6461726420494953- <1> 2134 000067B7 5029 <1> 2135 000067B9 132028756E696E7374- <1> .di_uninst_iisp:counted " (uninstalled IISP)" 2135 000067C2 616C6C656420494953- <1> 2135 000067CB 5029 <1> 2136 <1> .di_freedos_reloc: 2137 000067CD 1220284644206B6572- <1> counted " (FD kernel reloc)" 2137 000067D6 6E656C2072656C6F63- <1> 2137 000067DF 29 <1> 2138 000067E0 0E2028666172206A6D- <1> .di_jmpfar: counted " (far jmp imm)" 2138 000067E9 7020696D6D29 <1> 2139 <1> .di_jmpfarindirect: 2140 000067EF 132028666172206A6D- <1> counted " (far jmp indirect)" 2140 000067F8 7020696E6469726563- <1> 2140 00006801 7429 <1> 2141 00006803 0C2028746573742068- <1> .di_testhook: counted " (test hook)" 2141 0000680C 6F6F6B29 <1> 2142 00006810 1C2028746F6F206D61- <1> .di_toomany: counted " (too many chained handlers)" 2142 00006819 6E7920636861696E65- <1> 2142 00006822 642068616E646C6572- <1> 2142 0000682B 7329 <1> 2143 0000682D 0F20656D707479204D- <1> .di_empty: counted " empty MCB name" 2143 00006836 4342206E616D65 <1> 2144 0000683D 0B2073797374656D20- <1> .di_system_mcb: counted " system MCB" 2144 00006846 4D4342 <1> 2145 <1> .di_system_upper: 2146 00006849 0E2073797374656D20- <1> counted " system in UMA" 2146 00006852 696E20554D41 <1> 2147 00006858 0E2073797374656D20- <1> .di_system_low: counted " system in LMA" 2147 00006861 696E204C4D41 <1> 2148 00006867 112068696768206D65- <1> .di_hma: counted " high memory area" 2148 00006870 6D6F72792061726561 <1> 2149 00006879 06205B6D70783A <1> .di_multiplex.1:counted " [mpx:" 2150 00006880 0768206C6973743A <1> .di_multiplex.2:counted "h list:" 2151 00006888 02685D <1> .di_multiplex.3:counted "h]" 2152 0000688B 68656164657200 <1> .header: asciz "header" 2153 <1> .header.length: equ $ - 1 - .header 2154 00006892 747261696C657200 <1> .trailer: asciz "trailer" 2155 <1> .trailer.length:equ $ - 1 - .trailer 2156 0000689A 415400 <1> .at: asciz "AT" 2157 0000689D 5748494C4500 <1> .while: asciz "WHILE" 2158 000068A3 53494C454E5400 <1> .silent: asciz "SILENT" 2159 000068AA 534C45455000 <1> .sleep: asciz "SLEEP" 2160 000068B0 5345434F4E445300 <1> .seconds: asciz "SECONDS" 2161 000068B8 5449434B5300 <1> .ticks: asciz "TICKS" 2162 000068BE 52452070726F636573- <1> .re_limit_reached: asciz "RE processing reached RELIMIT, aborting.",13,10 2162 000068C7 73696E672072656163- <1> 2162 000068D0 6865642052454C494D- <1> 2162 000068D9 49542C2061626F7274- <1> 2162 000068E2 696E672E0D0A00 <1> 2163 000068E9 2120496E7465726E61- <1> .silent_error: asciz "! Internal error during silent buffer handling !",13,10 2163 000068F2 6C206572726F722064- <1> 2163 000068FB 7572696E672073696C- <1> 2163 00006904 656E74206275666665- <1> 2163 0000690D 722068616E646C696E- <1> 2163 00006916 6720210D0A00 <1> 2164 0000691C 5768696C6520636F6E- <1> .while_not_true:asciz "While condition not true, returning.",13,10 2164 00006925 646974696F6E206E6F- <1> 2164 0000692E 7420747275652C2072- <1> 2164 00006937 657475726E696E672E- <1> 2164 00006940 0D0A00 <1> 2165 00006943 5768696C6520636F6E- <1> .while_terminated_before: asciz "While condition ",'"' 2165 0000694C 646974696F6E202200 <1> 2166 00006955 22206E6F206C6F6E67- <1> .while_terminated_after: asciz '"'," no longer true.",13,10 2166 0000695E 657220747275652E0D- <1> 2166 00006967 0A00 <1> 2167 00006969 4E6F2073657269616C- <1> .no_progress: asciz "No serial comm progress after 5 seconds, giving up. (Keyboard enabled.)",13,10 2167 00006972 20636F6D6D2070726F- <1> 2167 0000697B 677265737320616674- <1> 2167 00006984 65722035207365636F- <1> 2167 0000698D 6E64732C2067697669- <1> 2167 00006996 6E672075702E20284B- <1> 2167 0000699F 6579626F6172642065- <1> 2167 000069A8 6E61626C65642E290D- <1> 2167 000069B1 0A00 <1> 2168 000069B3 0D0A6C446562756758- <1> .serial_request_keep: asciz 13,10,_PROGNAME," connected to serial port. Enter KEEP to confirm.",13,10 2168 000069BC 20636F6E6E65637465- <1> 2168 000069C5 6420746F2073657269- <1> 2168 000069CE 616C20706F72742E20- <1> 2168 000069D7 456E746572204B4545- <1> 2168 000069E0 5020746F20636F6E66- <1> 2168 000069E9 69726D2E0D0A00 <1> 2169 000069F0 4E6F204B454550206B- <1> .serial_no_keep_timer: asciz "No KEEP keyword confirmation after timeout, giving up. (Keyboard enabled.)",13,10 2169 000069F9 6579776F726420636F- <1> 2169 00006A02 6E6669726D6174696F- <1> 2169 00006A0B 6E2061667465722074- <1> 2169 00006A14 696D656F75742C2067- <1> 2169 00006A1D 6976696E672075702E- <1> 2169 00006A26 20284B6579626F6172- <1> 2169 00006A2F 6420656E61626C6564- <1> 2169 00006A38 2E290D0A00 <1> 2170 00006A3D 4E6F204B454550206B- <1> .serial_no_keep_enter: asciz "No KEEP keyword confirmation, enabling keyboard.",13,10 2170 00006A46 6579776F726420636F- <1> 2170 00006A4F 6E6669726D6174696F- <1> 2170 00006A58 6E2C20656E61626C69- <1> 2170 00006A61 6E67206B6579626F61- <1> 2170 00006A6A 72642E0D0A00 <1> 2171 00006A70 4B45455000 <1> .keep: asciz "KEEP" 2172 00006A75 4572726F723A20556E- <1> .cannot_hook_2D.invalid: asciz "Error: Unable to hook interrupt 2Dh due to invalid handler.",13,10 2172 00006A7E 61626C6520746F2068- <1> 2172 00006A87 6F6F6B20696E746572- <1> 2172 00006A90 727570742032446820- <1> 2172 00006A99 64756520746F20696E- <1> 2172 00006AA2 76616C69642068616E- <1> 2172 00006AAB 646C65722E0D0A00 <1> 2173 00006AB3 4572726F723A20556E- <1> .cannot_hook_2D.nofree: asciz "Error: Unable to hook interrupt 2Dh, no free multiplex number.",13,10 2173 00006ABC 61626C6520746F2068- <1> 2173 00006AC5 6F6F6B20696E746572- <1> 2173 00006ACE 72757074203244682C- <1> 2173 00006AD7 206E6F206672656520- <1> 2173 00006AE0 6D756C7469706C6578- <1> 2173 00006AE9 206E756D6265722E0D- <1> 2173 00006AF2 0A00 <1> 2174 00006AF4 5761726E696E673A20 <1> .serial_cannot_unhook: db "Warning: " 2175 00006AFD 556E61626C6520746F- <1> .serial_cannot_unhook.nowarn: db "Unable to unhook interrupt " 2175 00006B06 20756E686F6F6B2069- <1> 2175 00006B0F 6E7465727275707420 <1> 2176 00006B18 2D2D682E0D0A00 <1> .serial_cannot_unhook.int: asciz "--h.",13,10 2177 00006B1F 4572726F723A20556E- <1> .serial_cannot_hook: db "Error: Unable to hook interrupt " 2177 00006B28 61626C6520746F2068- <1> 2177 00006B31 6F6F6B20696E746572- <1> 2177 00006B3A 7275707420 <1> 2178 00006B3F 2D2D68206265636175- <1> .serial_cannot_hook.new_int: db "--h because interrupt " 2178 00006B48 736520696E74657272- <1> 2178 00006B51 75707420 <1> 2179 00006B55 2D2D68207374696C6C- <1> .serial_cannot_hook.old_int: asciz "--h still hooked.",13,10 2179 00006B5E 20686F6F6B65642E0D- <1> 2179 00006B67 0A00 <1> 2180 00006B69 537563636565646564- <1> .serial_late_unhook: db "Succeeded in unhooking interrupt " 2180 00006B72 20696E20756E686F6F- <1> 2180 00006B7B 6B696E6720696E7465- <1> 2180 00006B84 727275707420 <1> 2181 00006B8A 2D2D682E0D0A00 <1> .serial_late_unhook.int: asciz "--h.",13,10 2182 00006B91 496E7465726E616C20- <1> .line_out_overflow: asciz "Internal error, line_out buffer overflowed!",13,10 2182 00006B9A 6572726F722C206C69- <1> 2182 00006BA3 6E655F6F7574206275- <1> 2182 00006BAC 66666572206F766572- <1> 2182 00006BB5 666C6F776564210D0A- <1> 2182 00006BBE 00 <1> 2183 00006BBF 041B5B376D <1> .highlight: counted 27,"[7m" 2184 00006BC4 031B5B6D <1> .unhighlight: counted 27,"[m" 2185 00006BC8 206B4D475400 <1> .prefixes: asciz " kMGT" 2186 00006BCE 50726F63657373206C- <1> .ll_unterm: ascizline "Process loading aborted: Attached process didn't terminate!" 2186 00006BD7 6F6164696E67206162- <1> 2186 00006BE0 6F727465643A204174- <1> 2186 00006BE9 746163686564207072- <1> 2186 00006BF2 6F6365737320646964- <1> 2186 00006BFB 6E2774207465726D69- <1> 2186 00006C04 6E617465210D0A00 <1> 2187 00006C0C 43616E6E6F74207175- <1> .qq_unterm: ascizline "Cannot quit, attached process didn't terminate!" 2187 00006C15 69742C206174746163- <1> 2187 00006C1E 6865642070726F6365- <1> 2187 00006C27 7373206469646E2774- <1> 2187 00006C30 207465726D696E6174- <1> 2187 00006C39 65210D0A00 <1> 2188 00006C3E 43616E6E6F74207175- <1> .qq_still_pm: ascizline "Cannot quit, still in PM after attached process terminated!" 2188 00006C47 69742C207374696C6C- <1> 2188 00006C50 20696E20504D206166- <1> 2188 00006C59 746572206174746163- <1> 2188 00006C62 6865642070726F6365- <1> 2188 00006C6B 7373207465726D696E- <1> 2188 00006C74 61746564210D0A00 <1> 2189 <1> 2190 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 2191 00006C7C 45584953545300 <1> .exists: asciz "EXISTS" 2192 00006C83 5900 <1> .y: asciz "Y" 2193 00006C85 5920636F6D6D616E64- <1> .yy_requires_filename: asciz "Y command requires a filename.",13,10 2193 00006C8E 207265717569726573- <1> 2193 00006C97 20612066696C656E61- <1> 2193 00006CA0 6D652E0D0A00 <1> 2194 00006CA6 5920636F6D6D616E64- <1> .yy_filename_empty: asciz "Y command filename is empty.",13,10 2194 00006CAF 2066696C656E616D65- <1> 2194 00006CB8 20697320656D707479- <1> 2194 00006CC1 2E0D0A00 <1> 2195 00006CC5 5920636F6D6D616E64- <1> .yy_too_many_handles: asciz "Y command has too many open files.",13,10 2195 00006CCE 2068617320746F6F20- <1> 2195 00006CD7 6D616E79206F70656E- <1> 2195 00006CE0 2066696C65732E0D0A- <1> 2195 00006CE9 00 <1> 2196 00006CEA 5920636F6D6D616E64- <1> .yy_error_file_open: asciz "Y command failed to open file.",13,10 2196 00006CF3 206661696C65642074- <1> 2196 00006CFC 6F206F70656E206669- <1> 2196 00006D05 6C652E0D0A00 <1> 2197 00006D0B 5920636F6D6D616E64- <1> .yy_no_file: asciz "Y command limited to label only valid in script file.",13,10 2197 00006D14 206C696D6974656420- <1> 2197 00006D1D 746F206C6162656C20- <1> 2197 00006D26 6F6E6C792076616C69- <1> 2197 00006D2F 6420696E2073637269- <1> 2197 00006D38 70742066696C652E0D- <1> 2197 00006D41 0A00 <1> 2198 <1> %endif 2199 <1> %if _INPUT_FILE_HANDLES 2200 00006D43 5920636F6D6D616E64- <1> .yy_no_dos: asciz "Y command requires DOS to be available.",13,10 2200 00006D4C 207265717569726573- <1> 2200 00006D55 20444F5320746F2062- <1> 2200 00006D5E 6520617661696C6162- <1> 2200 00006D67 6C652E0D0A00 <1> 2201 <1> .yy_filename_missing_unquote: 2202 00006D6D 5920636F6D6D616E64- <1> asciz "Y command filename missing ending quote.",13,10 2202 00006D76 2066696C656E616D65- <1> 2202 00006D7F 206D697373696E6720- <1> 2202 00006D88 656E64696E67207175- <1> 2202 00006D91 6F74652E0D0A00 <1> 2203 <1> %endif 2204 <1> %if _INPUT_FILE_BOOT 2205 00006D98 5920636F6D6D616E64- <1> .yy_too_large: asciz "Y command file too large.",13,10 2205 00006DA1 2066696C6520746F6F- <1> 2205 00006DAA 206C617267652E0D0A- <1> 2205 00006DB3 00 <1> 2206 00006DB4 5920636F6D6D616E64- <1> .yy_empty: asciz "Y command file empty.",13,10 2206 00006DBD 2066696C6520656D70- <1> 2206 00006DC6 74792E0D0A00 <1> 2207 <1> %endif 2208 <1> 2209 <1> %if _BREAKPOINTS 2210 00006DCC 414C4C00 <1> .all: asciz "ALL" 2211 00006DD0 4E455700 <1> .new: asciz "NEW" 2212 00006DD4 4E6F20756E75736564- <1> .bb_no_new: asciz "No unused breakpoint left!",13,10 2212 00006DDD 20627265616B706F69- <1> 2212 00006DE6 6E74206C656674210D- <1> 2212 00006DEF 0A00 <1> 2213 00006DF1 19486974207065726D- <1> .bb_hit.1: counted "Hit permanent breakpoint " 2213 00006DFA 616E656E7420627265- <1> 2213 00006E03 616B706F696E7420 <1> 2214 <1> .bb_hit.2.nocounter: 2215 00006E0B 020D0A <1> counted 13,10 2216 00006E0E 1C5061737365642070- <1> .bb_pass.1: counted "Passed permanent breakpoint " 2216 00006E17 65726D616E656E7420- <1> 2216 00006E20 627265616B706F696E- <1> 2216 00006E29 7420 <1> 2217 <1> .bb_hit.2.counter: 2218 00006E2B 0A2C20636F756E7465- <1> .bb_pass.2: counted ", counter=" 2218 00006E34 723D <1> 2219 <1> .bb_hit.3.counter.no_id: 2220 <1> .bb_pass.3.no_id: 2221 <1> .bb_hitpass_id.after: 2222 00006E36 020D0A <1> counted 13,10 2223 <1> .bb_hitpass_id.long: 2224 00006E39 070D0A2049443A20 <1> counted 13,10," ID: " 2225 <1> .bb_hitpass_id.short: 2226 00006E41 062C2049443A20 <1> counted ", ID: " 2227 00006E48 205748454E2000 <1> .bb_when: asciz " WHEN " 2228 <1> 2229 00006E4F 42502000 <1> .bp: asciz "BP " 2230 00006E53 202B00 <1> .bpenabled: asciz " +" 2231 00006E56 202D00 <1> .bpdisabled: asciz " -" 2232 00006E59 20556E7573656400 <1> .bpunused: asciz " Unused" 2233 00006E61 204C696E3D00 <1> .bpaddress: asciz " Lin=" 2234 00006E67 202800 <1> .bpcontent: asciz " (" 2235 00006E6A 2920436F756E746572- <1> .bpcounter: asciz ") Counter=" 2235 00006E73 3D00 <1> 2236 <1> %if 0 2237 <1> BP 00 Unused 2238 <1> BP 00 + Lin=12345678 (CC) Counter=8000 2239 <1> 1234567890123456789012345678901234567890 2240 <1> %endif 2241 00006E75 4E6F20627265616B70- <1> .bpnone: asciz "No breakpoints set currently.",13,10 2241 00006E7E 6F696E747320736574- <1> 2241 00006E87 2063757272656E746C- <1> 2241 00006E90 792E0D0A00 <1> 2242 00006E95 4E6F20627265616B70- <1> .bpnone_at: asciz "No breakpoint set at given address currently.",13,10 2242 00006E9E 6F696E742073657420- <1> 2242 00006EA7 617420676976656E20- <1> 2242 00006EB0 616464726573732063- <1> 2242 00006EB9 757272656E746C792E- <1> 2242 00006EC2 0D0A00 <1> 2243 <1> %endif 2244 00006EC5 5468652000 <1> .cant_bp_the: asciz "The " 2245 00006ECA 70726F636565642062- <1> .cant_bp_type_proceed: asciz "proceed breakpoint" 2245 00006ED3 7265616B706F696E74- <1> 2245 00006EDC 00 <1> 2246 00006EDD 7065726D616E656E74- <1> .cant_bp_type_permanent: db "permanent breakpoint " 2246 00006EE6 20627265616B706F69- <1> 2246 00006EEF 6E7420 <1> 2247 00006EF2 5F5F00 <1> .cant_bp_type_permanent.index: asciz "__" 2248 00006EF5 204720627265616B70- <1> .cant_bp_type_gg: asciz " G breakpoint" 2248 00006EFE 6F696E7400 <1> 2249 00006F03 20286C696E65617220 <1> .cant_bp_linear: db " (linear " 2250 00006F0C 2D2D2D2D5F <1> .cant_bp_linear.address1: db "----_" 2251 00006F11 2D2D2D2D292000 <1> .cant_bp_linear.address2: asciz "----) " 2252 00006F18 63616E6E6F74206265- <1> .cant_bp_write: asciz "cannot be written." 2252 00006F21 207772697474656E2E- <1> 2252 00006F2A 00 <1> 2253 00006F2B 63616E6E6F74206265- <1> .cant_bp_restore: db "cannot be restored to " 2253 00006F34 20726573746F726564- <1> 2253 00006F3D 20746F20 <1> 2254 00006F41 5F5F2E00 <1> .cant_bp_restore.value: asciz "__." 2255 <1> %if 0 2256 <1> The 15th G breakpoint (linear 0010_FFFF) cannot be written. 2257 <1> The proceed breakpoint (linear 0010_FFFF) cannot be written. 2258 <1> The permanent breakpoint 0F (linear 0010_FFFF) cannot be written. 2259 <1> The permanent breakpoint 0F (linear 0010_FFFF) cannot be restored to __. 2260 <1> 12345678901234567890123456789012345678901234567890123456789012345678901234567890 2261 <1> %endif 2262 00006F45 0D0A20526561736F6E- <1> .cant_bp_reason: asciz 13,10," Reason: " 2262 00006F4E 3A2000 <1> 2263 00006F51 4E6F206572726F722E- <1> .cant_bp_reason0: asciz "No error. (Internal error, report!)",13,10 2263 00006F5A 2028496E7465726E61- <1> 2263 00006F63 6C206572726F722C20- <1> 2263 00006F6C 7265706F727421290D- <1> 2263 00006F75 0A00 <1> 2264 00006F77 497420697320726561- <1> .cant_bp_reason1: asciz "It is read-only.",13,10 2264 00006F80 642D6F6E6C792E0D0A- <1> 2264 00006F89 00 <1> 2265 00006F8A 497420697320756E72- <1> .cant_bp_reason2: asciz "It is unreachable.",13,10 2265 00006F93 6561636861626C652E- <1> 2265 00006F9C 0D0A00 <1> 2266 00006F9F 497420686173206265- <1> .cant_bp_reason3: db "It has been overwritten with " 2266 00006FA8 656E206F7665727772- <1> 2266 00006FB1 697474656E20776974- <1> 2266 00006FBA 6820 <1> 2267 00006FBC 5F5F2E0D0A00 <1> .cant_bp_reason3.value: asciz "__.",13,10 2268 00006FC2 556E6B6E6F776E2065- <1> .cant_bp_reasonu: asciz "Unknown error. (Internal error, report!)",13,10 2268 00006FCB 72726F722E2028496E- <1> 2268 00006FD4 7465726E616C206572- <1> 2268 00006FDD 726F722C207265706F- <1> 2268 00006FE6 727421290D0A00 <1> 2269 <1> 2270 00006FED 20202000 <1> .list_bp.first: asciz " " 2271 00006FF1 204720627265616B70- <1> .list_bp.second:db " G breakpoint, linear " 2271 00006FFA 6F696E742C206C696E- <1> 2271 00007003 65617220 <1> 2272 <1> .list_bp.address1: 2273 00007007 2D2D2D2D5F <1> db "----_" 2274 <1> .list_bp.address2: 2275 0000700C 2D2D2D2D00 <1> asciz "----" 2276 00007011 2C20636F6E74656E74- <1> .list_bp.third: db ", content " 2276 0000701A 20 <1> 2277 <1> .list_bp.value: 2278 0000701B 5F5F00 <1> asciz "__" 2279 <1> .list_bp_not_cseip: equ crlf 2280 <1> %if _PM 2281 <1> .list_bp_cseip_32: 2282 0000701E 202869732061742043- <1> asciz " (is at CS:EIP)",13,10 2282 00007027 533A454950290D0A00 <1> 2283 <1> %endif 2284 <1> .list_bp_csip_16: 2285 00007030 202869732061742043- <1> asciz " (is at CS:IP)",13,10 2285 00007039 533A4950290D0A00 <1> 2286 <1> .list_bp_none: 2287 00007041 546865204720627265- <1> asciz "The G breakpoint list is empty.",13,10 2287 0000704A 616B706F696E74206C- <1> 2287 00007053 69737420697320656D- <1> 2287 0000705C 7074792E0D0A00 <1> 2288 <1> %if 0 2289 <1> 2nd G breakpoint, linear 0003_28D3 $3600:12345678, content CC (is at CS:EIP) 2290 <1> 12345678901234567890123456789012345678901234567890123456789012345678901234567890 2291 <1> %endif 2292 00007063 00 <1> .empty_message: asciz 2293 00007064 4C49535400 <1> .list: asciz "LIST" 2294 00007069 414741494E00 <1> .again: asciz "AGAIN" 2295 0000706F 52656163686564206C- <1> .uu_too_many_repeat: asciz "Reached limit of repeating disassembly.",13,10 2295 00007078 696D6974206F662072- <1> 2295 00007081 6570656174696E6720- <1> 2295 0000708A 646973617373656D62- <1> 2295 00007093 6C792E0D0A00 <1> 2296 00007099 496E7465726E616C20- <1> .uu_internal_error: asciz "Internal error in disassembler!",13,10 2296 000070A2 6572726F7220696E20- <1> 2296 000070AB 646973617373656D62- <1> 2296 000070B4 6C6572210D0A00 <1> 2297 000070BB 496E7465726E616C20- <1> .aa_internal_error: asciz "Internal error in assembler!",13,10 2297 000070C4 6572726F7220696E20- <1> 2297 000070CD 617373656D626C6572- <1> 2297 000070D6 210D0A00 <1> 2298 000070DA 537461636B206F7665- <1> .stack_overflow: db "Stack overflow occurred, IP=" 2298 000070E3 72666C6F77206F6363- <1> 2298 000070EC 75727265642C204950- <1> 2298 000070F5 3D <1> 2299 000070F6 5F5F5F5F682C206475- <1> .stack_overflow.caller: asciz "____h, due to " 2299 000070FF 6520746F2000 <1> 2300 00007105 65787072657373696F- <1> .stack_overflow.indirection: asciz "expression indirection.",13,10 2300 0000710E 6E20696E6469726563- <1> 2300 00007117 74696F6E2E0D0A00 <1> 2301 0000711F 65787072657373696F- <1> .stack_overflow.parens: asciz "expression parentheses.",13,10 2301 00007128 6E20706172656E7468- <1> 2301 00007131 657365732E0D0A00 <1> 2302 00007139 65787072657373696F- <1> .stack_overflow.precedence: asciz "expression precedence.",13,10 2302 00007142 6E2070726563656465- <1> 2302 0000714B 6E63652E0D0A00 <1> 2303 00007152 65787072657373696F- <1> .stack_overflow.value_in: asciz "expression VALUE x IN y.",13,10 2303 0000715B 6E2056414C55452078- <1> 2303 00007164 20494E20792E0D0A00 <1> 2304 0000716D 65787072657373696F- <1> .stack_overflow.linear: asciz "expression LINEAR.",13,10 2304 00007176 6E204C494E4541522E- <1> 2304 0000717F 0D0A00 <1> 2305 00007182 65787072657373696F- <1> .stack_overflow.cond: asciz "expression conditional ?? x :: y.",13,10 2305 0000718B 6E20636F6E64697469- <1> 2305 00007194 6F6E616C203F3F2078- <1> 2305 0000719D 203A3A20792E0D0A00 <1> 2306 <1> %if _MEMREF_AMOUNT 2307 <1> %if _DEBUG2 2308 <1> .memrefs_branchdirect: asciz 9, "direct branch target = " 2309 <1> .memrefs_stringsource: asciz 9, "string source = " 2310 <1> .memrefs_stringdest: asciz 9, "string destination = " 2311 <1> .memrefs_memsource: asciz 9, "memory source = " 2312 <1> .memrefs_memdest: asciz 9, "memory destination = " 2313 <1> .memrefs_memsourcedest: asciz 9, "memory source/dest = " 2314 <1> .memrefs_mem_unknown: asciz 9, "memory (unknown) = " 2315 <1> .memrefs_unknown: asciz 9, "unknown mem ref type = " 2316 <1> .memrefs_length: counted " length=" 2317 <1> %endif 2318 <1> .memrefs_invalid_internal: 2319 000071A6 496E7465726E616C20- <1> asciz "Internal error, invalid use of too many memrefs!",13,10 2319 000071AF 6572726F722C20696E- <1> 2319 000071B8 76616C696420757365- <1> 2319 000071C1 206F6620746F6F206D- <1> 2319 000071CA 616E79206D656D7265- <1> 2319 000071D3 6673210D0A00 <1> 2320 <1> %endif 2321 <1> 2322 <1> %if 0 2323 <1> align 2, db 0 2324 <1> .optiontable: dw dispregs32, .r32off, .r32on 2325 <1> dw traceints, .traceoff, .traceon 2326 <1> dw cpdepchars, .cpoff, .cpon 2327 <1> dw fakeindos, .dosoff, .doson 2328 <1> dw nonpagingdevice, .nonpageoff, .nonpageon 2329 <1> dw pagingdevice, .pageoff, .pageon 2330 <1> dw hexrn, .readrnoff, .readrnon 2331 <1> dw 0 2332 <1> 2333 <1> .r32off: asciz "Dump 16-bit register set" 2334 <1> .r32on: asciz "Dump 32-bit register set" 2335 <1> .traceoff: asciz "Interrupts are traced" 2336 <1> .traceon: asciz "Interrupts are processed" 2337 <1> .cpoff: asciz "Extended ASCII characters replaced" 2338 <1> .cpon: asciz "Extended ASCII characters displayed" 2339 <1> .dosoff: asciz "InDOS is checked" 2340 <1> .doson: asciz "InDOS assumed on" 2341 <1> ;asciz "InDOS assumed off" 2342 <1> .nonpageoff: asciz 2343 <1> .nonpageon: asciz "Paging disabled" 2344 <1> .pageoff: asciz 2345 <1> .pageon: asciz "Paging enabled" 2346 <1> .readrnoff: asciz "Readable RN enabled" 2347 <1> .readrnon: asciz "Readable RN disabled" 2348 <1> %endif 2349 <1> 2350 000071D9 5761726E696E673A20- <1> .warnprefix: asciz "Warning: Prefixes in excess of 14, using trace flag.",13,10 2350 000071E2 507265666978657320- <1> 2350 000071EB 696E20657863657373- <1> 2350 000071F4 206F662031342C2075- <1> 2350 000071FD 73696E672074726163- <1> 2350 00007206 6520666C61672E0D0A- <1> 2350 0000720F 00 <1> 2351 <1> 2352 <1> %if _DEBUG 2353 <1> .bu: asciz "Breaking to next instance.",13,10 2354 <1> %else 2355 00007210 416C72656164792069- <1> .notbu: asciz "Already in topmost instance. (This is no debugging build of lDebug.)",13,10 2355 00007219 6E20746F706D6F7374- <1> 2355 00007222 20696E7374616E6365- <1> 2355 0000722B 2E2028546869732069- <1> 2355 00007234 73206E6F2064656275- <1> 2355 0000723D 6767696E6720627569- <1> 2355 00007246 6C64206F66206C4465- <1> 2355 0000724F 6275672E290D0A00 <1> 2356 <1> %endif 2357 <1> 2358 <1> %if _PM 2359 00007257 43616E6E6F74206163- <1> .ofs32: asciz "Cannot access 16-bit segment with 32-bit offset.",13,10 2359 00007260 636573732031362D62- <1> 2359 00007269 6974207365676D656E- <1> 2359 00007272 742077697468203332- <1> 2359 0000727B 2D626974206F666673- <1> 2359 00007284 65742E0D0A00 <1> 2360 <1> %endif 2361 <1> 2362 <1> 2363 <1> %define smcb_messages ..@notype,"" 2364 <1> 2365 <1> %imacro smcbtype 2.nolist 2366 <1> dw %2, %%label 2367 <1> %defstr %%str %1 2368 <1> %xdefine smcb_messages smcb_messages,%%label,%%str 2369 <1> %endmacro 2370 <1> 2371 <1> %imacro smcbmsg 2-*.nolist 2372 <1> %if %0 & 1 2373 <1> %error Expected even number of parameters 2374 <1> %endif 2375 <1> %rotate 2 2376 <1> %rep (%0 - 2) / 2 2377 <1> %1: asciz %2 2378 <1> %rotate 2 2379 <1> %endrep 2380 <1> %endmacro 2381 <1> 2382 0000728A 00 <1> align 4, db 0 2383 <1> smcbtypes: 2384 0000728C 0000[0873] <1> smcbtype S_OTHER, 00h 2385 00007290 0100[1073] <1> smcbtype S_DOSENTRY, 01h 2386 00007294 0200[1B73] <1> smcbtype S_DOSCODE, 02h 2387 00007298 0300[2573] <1> smcbtype S_DOSDATA, 03h 2388 0000729C 0400[2F73] <1> smcbtype S_IRQSCODE, 04h 2389 000072A0 0500[3A73] <1> smcbtype S_IRQSDATA, 05h 2390 000072A4 0600[4573] <1> smcbtype S_CDS, 06h 2391 000072A8 0700[4B73] <1> smcbtype S_LFNCDS, 07h 2392 000072AC 0800[5473] <1> smcbtype S_DPB, 08h 2393 000072B0 0900[5A73] <1> smcbtype S_UPB, 09h 2394 000072B4 0A00[6073] <1> smcbtype S_SFT, 0Ah 2395 000072B8 0B00[6673] <1> smcbtype S_FCBSFT, 0Bh 2396 000072BC 0C00[6F73] <1> smcbtype S_CCB, 0Ch 2397 000072C0 0D00[7573] <1> smcbtype S_IRT, 0Dh 2398 000072C4 0E00[7B73] <1> smcbtype S_SECTOR, 0Eh 2399 000072C8 0F00[8473] <1> smcbtype S_NLS, 0Fh 2400 000072CC 1000[8A73] <1> smcbtype S_EBDA, 10h 2401 000072D0 1900[9173] <1> smcbtype S_INITCONFIG, 19h 2402 000072D4 1A00[9E73] <1> smcbtype S_INITFATSEG, 1Ah 2403 000072D8 1B00[AB73] <1> smcbtype S_INITSECTORSEG, 1Bh 2404 000072DC 1C00[BB73] <1> smcbtype S_INITSTACKBPB,1Ch 2405 000072E0 1D00[CA73] <1> smcbtype S_INITPSP, 1Dh 2406 000072E4 1E00[D473] <1> smcbtype S_ENVIRONMENT, 1Eh 2407 000072E8 1F00[E273] <1> smcbtype S_INITIALIZE, 1Fh 2408 000072EC 2000[EF73] <1> smcbtype S_DEVICE, 20h ; Device 2409 000072F0 2100[F873] <1> smcbtype S_DEVICEMEMORY,21h ; Allocated by device 2410 000072F4 3000[0774] <1> smcbtype S_EXCLDUMA, 30h ; Excluded UMA 2411 000072F8 3100[1274] <1> smcbtype S_EXCLDUMASUB, 31h ; Excluded UMA with sub-chain of used MCBs 2412 000072FC 3200[2074] <1> smcbtype S_EXCLDLH, 32h ; Excluded by LH 2413 00007300 3300[2A74] <1> smcbtype S_EXCLDDOS, 33h 2414 00007304 FFFFFFFF <1> dw -1, -1 2415 <1> 2416 00007308 535F4F544845520053- <1> smcbmsg smcb_messages 2416 00007311 5F444F53454E545259- <1> 2416 0000731A 00535F444F53434F44- <1> 2416 00007323 4500535F444F534441- <1> 2416 0000732C 544100535F49525153- <1> 2416 00007335 434F444500535F4952- <1> 2416 0000733E 51534441544100535F- <1> 2416 00007347 43445300535F4C464E- <1> 2416 00007350 43445300535F445042- <1> 2416 00007359 00535F55504200535F- <1> 2416 00007362 53465400535F464342- <1> 2416 0000736B 53465400535F434342- <1> 2416 00007374 00535F49525400535F- <1> 2416 0000737D 534543544F5200535F- <1> 2416 00007386 4E4C5300535F454244- <1> 2416 0000738F 4100535F494E495443- <1> 2416 00007398 4F4E46494700535F49- <1> 2416 000073A1 4E4954464154534547- <1> 2416 000073AA 00535F494E49545345- <1> 2416 000073B3 43544F525345470053- <1> 2416 000073BC 5F494E495453544143- <1> 2416 000073C5 4B42504200535F494E- <1> 2416 000073CE 495450535000535F45- <1> 2416 000073D7 4E5649524F4E4D454E- <1> 2416 000073E0 5400535F494E495449- <1> 2416 000073E9 414C495A4500535F44- <1> 2416 000073F2 455649434500535F44- <1> 2416 000073FB 45564943454D454D4F- <1> 2416 00007404 525900535F4558434C- <1> 2416 0000740D 44554D4100535F4558- <1> 2416 00007416 434C44554D41535542- <1> 2416 0000741F 00535F4558434C444C- <1> 2416 00007428 4800535F4558434C44- <1> 2416 00007431 444F5300 <1> 2417 <1> 2418 00007435 756E6B6E6F776E00 <1> smcbmsg_unknown: asciz "unknown" 2419 <1> 2420 <1> %undef smcb_messages 2421 <1> %unimacro smcbtype 2.nolist 2422 <1> %unimacro smcbmsg 2-*.nolist 2423 <1> 2424 0000743D 5E204572726F7207 <1> errcarat: db "^ Error",7 2425 00007445 0D0A00 <1> crlf: asciz 13,10 2426 <1> 2427 <1> 2428 <1> align 4, db 0 2429 <1> msgtable_value_range: 2430 00007448 [1F67][2967] <1> dw msg.executing, msg.executing_value_range 2431 <1> %if _ACCESS_VARIABLES_AMOUNT 2432 0000744C [5E74][6674] <1> dw .reading, .reading_range 2433 00007450 [E174][E974] <1> dw .writing, .writing_range 2434 00007454 [6475][6F75] <1> dw .memoperand, .memoperand_range 2435 00007458 [8075][8A75] <1> dw .accessing, .accessing_range 2436 <1> %endif 2437 0000745C 0000 <1> dw 0 2438 <1> 2439 <1> %if _ACCESS_VARIABLES_AMOUNT 2440 0000745E 52454144494E4700 <1> .reading: asciz "READING" 2441 <1> .reading_range: 2442 <1> %assign iicounter 0 2443 <1> %define iiprefix "" 2444 <1> %rep _ACCESS_VARIABLES_AMOUNT 2445 <1> _autohexitsstrdef IIDEF, iicounter 2446 <1> db iiprefix,"FROM readadr",_IIDEF," LENGTH readlen",_IIDEF 2447 <1> %assign iicounter iicounter + 1 2448 <1> %define iiprefix ", " 2449 <1> %endrep 2445 <2> _autohexitsstrdef IIDEF, iicounter 2446 00007466 46524F4D2072656164- <2> db iiprefix,"FROM readadr",_IIDEF," LENGTH readlen",_IIDEF 2446 0000746F 61647230204C454E47- <2> 2446 00007478 544820726561646C65- <2> 2446 00007481 6E30 <2> 2447 <2> %assign iicounter iicounter + 1 2448 <2> %define iiprefix ", " 2445 <2> _autohexitsstrdef IIDEF, iicounter 2446 00007483 2C2046524F4D207265- <2> db iiprefix,"FROM readadr",_IIDEF," LENGTH readlen",_IIDEF 2446 0000748C 616461647231204C45- <2> 2446 00007495 4E4754482072656164- <2> 2446 0000749E 6C656E31 <2> 2447 <2> %assign iicounter iicounter + 1 2448 <2> %define iiprefix ", " 2445 <2> _autohexitsstrdef IIDEF, iicounter 2446 000074A2 2C2046524F4D207265- <2> db iiprefix,"FROM readadr",_IIDEF," LENGTH readlen",_IIDEF 2446 000074AB 616461647232204C45- <2> 2446 000074B4 4E4754482072656164- <2> 2446 000074BD 6C656E32 <2> 2447 <2> %assign iicounter iicounter + 1 2448 <2> %define iiprefix ", " 2445 <2> _autohexitsstrdef IIDEF, iicounter 2446 000074C1 2C2046524F4D207265- <2> db iiprefix,"FROM readadr",_IIDEF," LENGTH readlen",_IIDEF 2446 000074CA 616461647233204C45- <2> 2446 000074D3 4E4754482072656164- <2> 2446 000074DC 6C656E33 <2> 2447 <2> %assign iicounter iicounter + 1 2448 <2> %define iiprefix ", " 2450 000074E0 00 <1> asciz 2451 000074E1 57524954494E4700 <1> .writing: asciz "WRITING" 2452 <1> .writing_range: 2453 <1> %assign iicounter 0 2454 <1> %define iiprefix "" 2455 <1> %rep _ACCESS_VARIABLES_AMOUNT 2456 <1> _autohexitsstrdef IIDEF, iicounter 2457 <1> db iiprefix,"FROM writadr",_IIDEF," LENGTH writlen",_IIDEF 2458 <1> %assign iicounter iicounter + 1 2459 <1> %define iiprefix ", " 2460 <1> %endrep 2456 <2> _autohexitsstrdef IIDEF, iicounter 2457 000074E9 46524F4D2077726974- <2> db iiprefix,"FROM writadr",_IIDEF," LENGTH writlen",_IIDEF 2457 000074F2 61647230204C454E47- <2> 2457 000074FB 544820777269746C65- <2> 2457 00007504 6E30 <2> 2458 <2> %assign iicounter iicounter + 1 2459 <2> %define iiprefix ", " 2456 <2> _autohexitsstrdef IIDEF, iicounter 2457 00007506 2C2046524F4D207772- <2> db iiprefix,"FROM writadr",_IIDEF," LENGTH writlen",_IIDEF 2457 0000750F 697461647231204C45- <2> 2457 00007518 4E4754482077726974- <2> 2457 00007521 6C656E31 <2> 2458 <2> %assign iicounter iicounter + 1 2459 <2> %define iiprefix ", " 2456 <2> _autohexitsstrdef IIDEF, iicounter 2457 00007525 2C2046524F4D207772- <2> db iiprefix,"FROM writadr",_IIDEF," LENGTH writlen",_IIDEF 2457 0000752E 697461647232204C45- <2> 2457 00007537 4E4754482077726974- <2> 2457 00007540 6C656E32 <2> 2458 <2> %assign iicounter iicounter + 1 2459 <2> %define iiprefix ", " 2456 <2> _autohexitsstrdef IIDEF, iicounter 2457 00007544 2C2046524F4D207772- <2> db iiprefix,"FROM writadr",_IIDEF," LENGTH writlen",_IIDEF 2457 0000754D 697461647233204C45- <2> 2457 00007556 4E4754482077726974- <2> 2457 0000755F 6C656E33 <2> 2458 <2> %assign iicounter iicounter + 1 2459 <2> %define iiprefix ", " 2461 00007563 00 <1> asciz 2462 <1> 2463 00007564 4D454D4F504552414E- <1> .memoperand: asciz "MEMOPERAND" 2463 0000756D 4400 <1> 2464 0000756F 52454144494E472C20- <1> .memoperand_range: asciz "READING, WRITING" 2464 00007578 57524954494E4700 <1> 2465 00007580 414343455353494E47- <1> .accessing: asciz "ACCESSING" 2465 00007589 00 <1> 2466 0000758A 52454144494E472C20- <1> .accessing_range: asciz "READING, WRITING, EXECUTING" 2466 00007593 57524954494E472C20- <1> 2466 0000759C 455845435554494E47- <1> 2466 000075A5 00 <1> 2467 <1> %endif 2468 <1> 2469 <1> 2470 <1> %if _BOOTLDR 2471 <1> %define lot_list 2472 <1> %define lot_comma 2473 <1> %macro lot_entry 2.nolist 2474 <1> LOAD_%2 equ %1 2475 <1> dw LOAD_%2, .%2 2476 <1> %defstr %%string %2 2477 <1> %xdefine lot_list lot_list lot_comma .%2:, db %%string, db 0 2478 <1> %define lot_comma , 2479 <1> %endmacro 2480 <1> 2481 <1> %macro lot_messages 0-*.nolist 2482 <1> %rep (%0 / 3) 2483 <1> %1 2484 <1> %2 2485 <1> %3 2486 <1> %rotate 3 2487 <1> %endrep 2488 <1> %endmacro 2489 <1> 2490 000075A6 00 <1> align 4, db 0 2491 <1> loadoptiontable: 2492 000075A8 0100[1476] <1> lot_entry 1, SET_DL_UNIT 2493 000075AC 0200[2076] <1> lot_entry 2, SET_BL_UNIT 2494 000075B0 0400[2C76] <1> lot_entry 4, SET_SIDI_CLUSTER 2495 000075B4 1000[3D76] <1> lot_entry 10h, SET_DSSI_DPT 2496 000075B8 2000[4A76] <1> lot_entry 20h, PUSH_DPT 2497 000075BC 4000[5376] <1> lot_entry 40h, DATASTART_HIDDEN 2498 000075C0 8000[6476] <1> lot_entry 80h, SET_AXBX_DATASTART 2499 000075C4 0001[7776] <1> lot_entry 100h, SET_DSBP_BPB 2500 000075C8 0002[8476] <1> lot_entry 200h, LBA_SET_TYPE 2501 000075CC 0004[9176] <1> lot_entry 400h, MESSAGE_TABLE 2502 000075D0 0008[9F76] <1> lot_entry 800h, SET_AXBX_ROOT_HIDDEN 2503 000075D4 0010[B476] <1> lot_entry 1000h, CMDLINE 2504 000075D8 0020[BC76] <1> lot_entry 2000h, NO_BPB 2505 000075DC 0040[C376] <1> lot_entry 4000h, SET_DSSI_PARTINFO 2506 000075E0 00000000 <1> dw 0, 0 2507 <1> 2508 <1> .incompatible: 2509 000075E4 02008000 <1> dw LOAD_SET_BL_UNIT, LOAD_SET_AXBX_DATASTART 2510 000075E8 02000008 <1> dw LOAD_SET_BL_UNIT, LOAD_SET_AXBX_ROOT_HIDDEN 2511 000075EC 80000008 <1> dw LOAD_SET_AXBX_DATASTART, LOAD_SET_AXBX_ROOT_HIDDEN 2512 000075F0 04001000 <1> dw LOAD_SET_SIDI_CLUSTER, LOAD_SET_DSSI_DPT 2513 000075F4 00011000 <1> dw LOAD_SET_DSBP_BPB, LOAD_SET_DSSI_DPT 2514 000075F8 00200001 <1> dw LOAD_NO_BPB, LOAD_SET_DSBP_BPB 2515 000075FC 00200002 <1> dw LOAD_NO_BPB, LOAD_LBA_SET_TYPE 2516 00007600 00200004 <1> dw LOAD_NO_BPB, LOAD_MESSAGE_TABLE 2517 00007604 00400400 <1> dw LOAD_SET_DSSI_PARTINFO, LOAD_SET_SIDI_CLUSTER 2518 00007608 00401000 <1> dw LOAD_SET_DSSI_PARTINFO, LOAD_SET_DSSI_DPT 2519 0000760C 00400001 <1> dw LOAD_SET_DSSI_PARTINFO, LOAD_SET_DSBP_BPB 2520 00007610 00000000 <1> dw 0, 0 2521 <1> 2522 00007614 5345545F444C5F554E- <1> lot_messages lot_list 2522 0000761D 4954005345545F424C- <1> 2522 00007626 5F554E495400534554- <1> 2522 0000762F 5F534944495F434C55- <1> 2522 00007638 53544552005345545F- <1> 2522 00007641 445353495F44505400- <1> 2522 0000764A 505553485F44505400- <1> 2522 00007653 444154415354415254- <1> 2522 0000765C 5F48494444454E0053- <1> 2522 00007665 45545F415842585F44- <1> 2522 0000766E 415441535441525400- <1> 2522 00007677 5345545F445342505F- <1> 2522 00007680 425042004C42415F53- <1> 2522 00007689 45545F54595045004D- <1> 2522 00007692 4553534147455F5441- <1> 2522 0000769B 424C45005345545F41- <1> 2522 000076A4 5842585F524F4F545F- <1> 2522 000076AD 48494444454E00434D- <1> 2522 000076B6 444C494E45004E4F5F- <1> 2522 000076BF 425042005345545F44- <1> 2522 000076C8 5353495F5041525449- <1> 2522 000076D1 4E464F00 <1> 2523 <1> 2524 <1> %unmacro lot_entry 2.nolist 2525 <1> %unmacro lot_messages 0-*.nolist 2526 <1> 2527 <1> 2528 <1> msdos7_message_table: 2529 <1> ; the first four bytes give displacements to the various 2530 <1> ; messages. an ASCIZ message indicates that this was the 2531 <1> ; last message. a message terminated by 0FFh indicates 2532 <1> ; that the last message (displacement at table + 3) is 2533 <1> ; to follow after this message. 2534 <1> ; the maximum allowed displacement is 7Fh. the minimum 2535 <1> ; allowed displacement is 1, to avoid a zero displacement. 2536 <1> ; only the last message is terminated by a zero byte, 2537 <1> ; as that zero byte indicates the end of the message table. 2538 <1> ; (the entire table is treated as one ASCIZ string.) 2539 <1> ; MS-DOS 7.10 from MSW 98 SE seems to have at least 167h (359) 2540 <1> ; bytes allocated to its buffer for these. 2541 <1> ; 2542 <1> ; this message table was discussed in a dosemu2 repo at 2543 <1> ; https://github.com/stsp/dosemu2/issues/681 2544 000076D5 03 <1> .: db .msg_invalid_system - ($ + 1) 2545 000076D6 13 <1> db .msg_io_error - ($ + 1) 2546 000076D7 01 <1> db .msg_invalid_system - ($ + 1) 2547 000076D8 1D <1> db .msg_press_any_key - ($ + 1) 2548 <1> 2549 <1> .msg_invalid_system: 2550 000076D9 0D0A496E76616C6964- <1> db 13,10,"Invalid system", -1 2550 000076E2 2073797374656DFF <1> 2551 <1> 2552 <1> .msg_io_error: 2553 000076EA 0D0A492F4F20657272- <1> db 13,10,"I/O error", -1 2553 000076F3 6F72FF <1> 2554 <1> 2555 <1> .msg_press_any_key: 2556 000076F6 0D0A4368616E676520- <1> db 13,10,"Change disk and press any key",13,10,0 2556 000076FF 6469736B20616E6420- <1> 2556 00007708 707265737320616E79- <1> 2556 00007711 206B65790D0A00 <1> 2557 <1> .end: 2558 <1> .size: equ .end - . 2559 <1> 2560 <1> %if .size > 150h 2561 <1> %error Message table too large! 2562 <1> %endif 2563 <1> 2564 <1> 2565 <1> 2566 <1> align 4, db 0 2567 <1> loadsettings: 2568 <1> istruc LOADSETTINGS 2569 00007718 [1664] <1> at lsKernelName, dw msg.ldos_kernel_name 2570 0000771A [8C64] <1> at lsAddName, dw msg.addname_empty 2571 0000771C 6000 <1> at lsMinPara, dw 60h 2572 0000771E 0000 <1> at lsMaxPara, dw 0 2573 00007720 0010 <1> at lsOptions, dw LOAD_CMDLINE 2574 00007722 0002 <1> at lsSegment, dw 200h 2575 00007724 00040000 <1> at lsEntry, dd 400h 2576 00007728 007CFFFF <1> at lsBPB, dw 7C00h, -1 2577 0000772C FC03 <1> at lsCheckOffset, dw 1020 2578 0000772E 6C44 <1> at lsCheckValue, db "lD" 2579 00007730 4C444F5300 <1> at lsName, asciz "LDOS" 2580 00007735 00 <1> iend 2581 <1> istruc LOADSETTINGS 2582 00007738 [F963] <1> at lsKernelName, dw msg.freedos_kernel_name 2583 0000773A [8C64] <1> at lsAddName, dw msg.addname_empty 2584 0000773C 2000 <1> at lsMinPara, dw 20h 2585 0000773E FFFF <1> at lsMaxPara, dw -1 2586 00007740 0300 <1> at lsOptions, dw LOAD_SET_DL_UNIT | LOAD_SET_BL_UNIT 2587 00007742 6000 <1> at lsSegment, dw 60h 2588 00007744 00000000 <1> at lsEntry, dd 0 2589 00007748 007CFFFF <1> at lsBPB, dw 7C00h, -1 2590 0000774C 0046524545- <1> at lsName, asciz "FREEDOS" 2590 00007754 444F5300 <1> 2591 <1> iend 2592 <1> istruc LOADSETTINGS 2593 00007758 [0464] <1> at lsKernelName, dw msg.dosc_kernel_name 2594 0000775A [8C64] <1> at lsAddName, dw msg.addname_empty 2595 0000775C 2000 <1> at lsMinPara, dw 20h 2596 0000775E FFFF <1> at lsMaxPara, dw -1 2597 00007760 0300 <1> at lsOptions, dw LOAD_SET_DL_UNIT | LOAD_SET_BL_UNIT 2598 00007762 0020 <1> at lsSegment, dw 2000h 2599 00007764 00000000 <1> at lsEntry, dd 0 2600 00007768 007C0000 <1> at lsBPB, dw 7C00h, 0 2601 0000776C 00444F5343- <1> at lsName, asciz "DOSC" 2601 00007774 00 <1> 2602 00007775 00 <1> iend 2603 <1> istruc LOADSETTINGS 2604 00007778 [0C64] <1> at lsKernelName, dw msg.edrdos_kernel_name 2605 0000777A [8C64] <1> at lsAddName, dw msg.addname_empty 2606 0000777C 2000 <1> at lsMinPara, dw 20h 2607 0000777E FFFF <1> at lsMaxPara, dw -1 2608 00007780 0301 <1> at lsOptions, dw LOAD_SET_DL_UNIT | LOAD_SET_BL_UNIT | LOAD_SET_DSBP_BPB 2610 00007782 7000 <1> at lsSegment, dw 70h 2611 00007784 00000000 <1> at lsEntry, dd 0 2612 00007788 007CFFFF <1> at lsBPB, dw 7C00h, -1 2613 0000778C 0045445244- <1> at lsName, asciz "EDRDOS" 2613 00007794 4F5300 <1> 2614 00007797 00 <1> iend 2615 <1> istruc LOADSETTINGS 2616 00007798 [1F64] <1> at lsKernelName, dw msg.msdos6_kernel_name 2617 0000779A [2664] <1> at lsAddName, dw msg.msdos6_add_name 2618 0000779C 2000 <1> at lsMinPara, dw 20h 2619 0000779E 6000 <1> at lsMaxPara, dw 60h 2620 000077A0 F100 <1> at lsOptions, dw LOAD_SET_DL_UNIT | LOAD_SET_AXBX_DATASTART | LOAD_DATASTART_HIDDEN | LOAD_SET_DSSI_DPT | LOAD_PUSH_DPT 2623 000077A2 7000 <1> at lsSegment, dw 70h 2624 000077A4 00000000 <1> at lsEntry, dd 0 2625 000077A8 007C0000 <1> at lsBPB, dw 7C00h, 0 2626 000077AC 004D53444F- <1> at lsName, asciz "MSDOS6" 2626 000077B4 533600 <1> 2627 000077B7 00 <1> iend 2628 <1> istruc LOADSETTINGS 2629 000077B8 [6164] <1> at lsKernelName, dw msg.rxdos.0_kernel_name 2630 000077BA [7864] <1> at lsAddName, dw msg.rxdos.0_add_name 2631 000077BC 2000 <1> at lsMinPara, dw 20h 2632 000077BE 6000 <1> at lsMaxPara, dw 60h 2633 000077C0 3108 <1> at lsOptions, dw LOAD_SET_DL_UNIT | LOAD_SET_AXBX_ROOT_HIDDEN | LOAD_SET_DSSI_DPT | LOAD_PUSH_DPT 2635 000077C2 7000 <1> at lsSegment, dw 70h 2636 000077C4 00000000 <1> at lsEntry, dd 0 2637 000077C8 007C0000 <1> at lsBPB, dw 7C00h, 0 2638 000077CC 005258444F- <1> at lsName, asciz "RXDOS.0" 2638 000077D4 532E3000 <1> 2639 <1> iend 2640 <1> istruc LOADSETTINGS 2641 000077D8 [6E64] <1> at lsKernelName, dw msg.rxdos.1_kernel_name 2642 000077DA [7864] <1> at lsAddName, dw msg.rxdos.1_add_name 2643 000077DC 2000 <1> at lsMinPara, dw 20h 2644 000077DE 6000 <1> at lsMaxPara, dw 60h 2645 000077E0 3108 <1> at lsOptions, dw LOAD_SET_DL_UNIT | LOAD_SET_AXBX_ROOT_HIDDEN | LOAD_SET_DSSI_DPT | LOAD_PUSH_DPT 2647 000077E2 7000 <1> at lsSegment, dw 70h 2648 000077E4 00000000 <1> at lsEntry, dd 0 2649 000077E8 007C0000 <1> at lsBPB, dw 7C00h, 0 2650 000077EC 005258444F- <1> at lsName, asciz "RXDOS.1" 2650 000077F4 532E3100 <1> 2651 <1> iend 2652 <1> istruc LOADSETTINGS 2653 000077F8 [8264] <1> at lsKernelName, dw msg.rxdos.2_kernel_name 2654 000077FA [8C64] <1> at lsAddName, dw msg.addname_empty 2655 000077FC 6000 <1> at lsMinPara, dw 60h 2656 000077FE 0000 <1> at lsMaxPara, dw 0 2657 00007800 0010 <1> at lsOptions, dw LOAD_CMDLINE 2658 00007802 7000 <1> at lsSegment, dw 70h 2659 00007804 00040000 <1> at lsEntry, dd 400h 2660 00007808 007CFFFF <1> at lsBPB, dw 7C00h, -1 2661 0000780C 005258444F- <1> at lsName, asciz "RXDOS.2" 2661 00007814 532E3200 <1> 2662 <1> iend 2663 <1> istruc LOADSETTINGS 2664 00007818 [8264] <1> at lsKernelName, dw msg.rxdos.2_kernel_name 2665 0000781A [8C64] <1> at lsAddName, dw msg.addname_empty 2666 0000781C 6000 <1> at lsMinPara, dw 60h 2667 0000781E 0000 <1> at lsMaxPara, dw 0 2668 00007820 0010 <1> at lsOptions, dw LOAD_CMDLINE 2669 00007822 0002 <1> at lsSegment, dw 200h 2670 00007824 00040000 <1> at lsEntry, dd 400h 2671 00007828 007CFFFF <1> at lsBPB, dw 7C00h, -1 2672 0000782C FC03 <1> at lsCheckOffset, dw 1020 2673 0000782E 6C44 <1> at lsCheckValue, db "lD" 2674 00007830 5258444F532E3300 <1> at lsName, asciz "RXDOS.3" 2675 <1> iend 2676 <1> istruc LOADSETTINGS 2677 00007838 [3064] <1> at lsKernelName, dw msg.ibmdos_kernel_name 2678 0000783A [3B64] <1> at lsAddName, dw msg.ibmdos_add_name 2679 0000783C 2000 <1> at lsMinPara, dw 20h 2680 0000783E 8000 <1> at lsMaxPara, dw 80h 2681 00007840 F100 <1> at lsOptions, dw LOAD_SET_DL_UNIT | LOAD_SET_AXBX_DATASTART | LOAD_DATASTART_HIDDEN | LOAD_SET_DSSI_DPT | LOAD_PUSH_DPT 2684 00007842 7000 <1> at lsSegment, dw 70h 2685 00007844 00000000 <1> at lsEntry, dd 0 2686 00007848 007C0000 <1> at lsBPB, dw 7C00h, 0 2687 0000784C 0049424D44- <1> at lsName, asciz "IBMDOS" 2687 00007854 4F5300 <1> 2688 00007857 00 <1> iend 2689 <1> istruc LOADSETTINGS 2690 00007858 [1F64] <1> at lsKernelName, dw msg.msdos7_kernel_name 2691 0000785A [8C64] <1> at lsAddName, dw msg.addname_empty 2692 0000785C 4000 <1> at lsMinPara, dw 40h 2693 0000785E 8000 <1> at lsMaxPara, dw 80h 2694 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 2697 00007862 7000 <1> at lsSegment, dw 70h 2698 00007864 00020000 <1> at lsEntry, dd 200h 2699 00007868 007CFFFF <1> at lsBPB, dw 7C00h, -1 2700 0000786C 0002 <1> at lsCheckOffset, dw 200h 2701 0000786E 424A <1> at lsCheckValue, db "BJ" 2702 00007870 4D53444F533700 <1> at lsName, asciz "MSDOS7" 2703 00007877 00 <1> iend 2704 <1> istruc LOADSETTINGS 2705 00007878 [4664] <1> at lsKernelName, dw msg.ntldr_kernel_name 2706 0000787A [8C64] <1> at lsAddName, dw msg.addname_empty 2707 0000787C 2000 <1> at lsMinPara, dw 20h 2708 0000787E FFFF <1> at lsMaxPara, dw -1 2709 00007880 4100 <1> at lsOptions, dw LOAD_SET_DL_UNIT | LOAD_DATASTART_HIDDEN 2711 00007882 0020 <1> at lsSegment, dw 2000h 2712 00007884 00000000 <1> at lsEntry, dd 0 2713 00007888 007C0000 <1> at lsBPB, dw 7C00h, 0 2714 0000788C 004E544C44- <1> at lsName, asciz "NTLDR" 2714 00007894 5200 <1> 2715 00007896 00 <1> iend 2716 <1> istruc LOADSETTINGS 2717 00007898 [4C64] <1> at lsKernelName, dw msg.bootmgr_kernel_name 2718 0000789A [8C64] <1> at lsAddName, dw msg.addname_empty 2719 0000789C 2000 <1> at lsMinPara, dw 20h 2720 0000789E FFFF <1> at lsMaxPara, dw -1 2721 000078A0 4100 <1> at lsOptions, dw LOAD_SET_DL_UNIT | LOAD_DATASTART_HIDDEN 2723 000078A2 0020 <1> at lsSegment, dw 2000h 2724 000078A4 00000000 <1> at lsEntry, dd 0 2725 000078A8 007C0000 <1> at lsBPB, dw 7C00h, 0 2726 000078AC 00424F4F54- <1> at lsName, asciz "BOOTMGR" 2726 000078B4 4D475200 <1> 2727 <1> iend 2728 <1> istruc LOADSETTINGS 2729 000078B8 [5464] <1> at lsKernelName, dw msg.chain_kernel_name 2730 000078BA [8C64] <1> at lsAddName, dw msg.addname_empty 2731 000078BC 2000 <1> at lsMinPara, dw paras(512) 2732 000078BE 0002 <1> at lsMaxPara, dw paras(8192) 2733 000078C0 0160 <1> at lsOptions, dw LOAD_SET_DL_UNIT | LOAD_SET_DSSI_PARTINFO | LOAD_NO_BPB 2735 000078C2 C007 <1> at lsSegment, dw 7C0h 2736 000078C4 007C40F8 <1> at lsEntry, dw 7C00h, -7C0h 2737 000078C8 007C0000 <1> at lsBPB, dw 7C00h, 0 2738 000078CC FE01 <1> at lsCheckOffset, dw 510 2739 000078CE 55AA <1> at lsCheckValue, dw 0AA55h 2740 000078D0 434841494E00 <1> at lsName, asciz "CHAIN" 2741 000078D6 00 <1> iend 2742 000078D8 0000 <1> dw 0 2743 <1> %endif 2744 <1> 2745 <1> 2746 000078DA 0D21 <1> dskerrs: db dskerr0-dskerrs,dskerr1-dskerrs 2747 000078DC 3444 <1> db dskerr2-dskerrs,dskerr3-dskerrs 2748 000078DE 5494 <1> db dskerr4-dskerrs,dskerr9-dskerrs 2749 000078E0 6570 <1> db dskerr6-dskerrs,dskerr7-dskerrs 2750 000078E2 8394 <1> db dskerr8-dskerrs,dskerr9-dskerrs 2751 000078E4 A2AE <1> db dskerra-dskerrs,dskerrb-dskerrs 2752 000078E6 B9 <1> db dskerrc-dskerrs 2753 000078E7 57726974652070726F- <1> dskerr0: asciz "Write protect error" 2753 000078F0 74656374206572726F- <1> 2753 000078F9 7200 <1> 2754 000078FB 556E6B6E6F776E2075- <1> dskerr1: asciz "Unknown unit error" 2754 00007904 6E6974206572726F72- <1> 2754 0000790D 00 <1> 2755 0000790E 4472697665206E6F74- <1> dskerr2: asciz "Drive not ready" 2755 00007917 20726561647900 <1> 2756 0000791E 556E6B6E6F776E2063- <1> dskerr3: asciz "Unknown command" 2756 00007927 6F6D6D616E6400 <1> 2757 0000792E 44617461206572726F- <1> dskerr4: asciz "Data error (CRC)" 2757 00007937 7220284352432900 <1> 2758 0000793F 5365656B206572726F- <1> dskerr6: asciz "Seek error" 2758 00007948 7200 <1> 2759 0000794A 556E6B6E6F776E206D- <1> dskerr7: asciz "Unknown media type" 2759 00007953 656469612074797065- <1> 2759 0000795C 00 <1> 2760 0000795D 536563746F72206E6F- <1> dskerr8: asciz "Sector not found" 2760 00007966 7420666F756E6400 <1> 2761 0000796E 556E6B6E6F776E2065- <1> dskerr9: asciz "Unknown error" 2761 00007977 72726F7200 <1> 2762 0000797C 577269746520666175- <1> dskerra: asciz "Write fault" 2762 00007985 6C7400 <1> 2763 00007988 52656164206661756C- <1> dskerrb: asciz "Read fault" 2763 00007991 7400 <1> 2764 00007993 47656E6572616C2066- <1> dskerrc: asciz "General failure" 2764 0000799C 61696C75726500 <1> 2765 000079A3 207265616400 <1> reading: asciz " read" 2766 000079A9 207772697400 <1> writing: asciz " writ" 2767 000079AF 696E67206472697665- <1> drive: db "ing drive " 2767 000079B8 20 <1> 2768 000079B9 5F00 <1> driveno: asciz "_" 2769 000079BB 383038362F383800 <1> msg8088: asciz "8086/88" 2770 000079C3 78383600 <1> msgx86: asciz "x86" 2771 000079C7 20776974686F757420- <1> no_copr: asciz " without coprocessor" 2771 000079D0 636F70726F63657373- <1> 2771 000079D9 6F7200 <1> 2772 000079DC 207769746820636F70- <1> has_copr: asciz " with coprocessor" 2772 000079E5 726F636573736F7200 <1> 2773 000079EE 207769746820323837- <1> has_287: asciz " with 287" 2773 000079F7 00 <1> 2774 000079F8 7472616365206D6F64- <1> tmodes: db "trace mode is " 2774 00007A01 6520697320 <1> 2775 00007A06 5F202D20696E746572- <1> tmodev: asciz "_ - interrupts are " 2775 00007A0F 727570747320617265- <1> 2775 00007A18 2000 <1> 2776 00007A1A 74726163656400 <1> tmode1: asciz "traced" 2777 00007A21 70726F636573736564- <1> tmode0: asciz "processed" 2777 00007A2A 00 <1> 2778 00007A2B 2028756E7573656429- <1> unused: asciz " (unused)" 2778 00007A34 00 <1> 2779 <1> needsmsg: 2780 00007A35 5B6E6565647320 <1> .: db "[needs " 2781 <1> .digit_x_ofs: equ $ - . 2782 00007A3C 7838 <1> db "x8" 2783 <1> .digit_6_ofs: equ $ - . 2784 00007A3E 365D <1> db "6]" 2785 <1> needsmsg_L: equ $-needsmsg 2786 00007A40 5B6E65656473206D61- <1> needsmath: db "[needs math coprocessor]" 2786 00007A49 746820636F70726F63- <1> 2786 00007A52 6573736F725D <1> 2787 <1> needsmath_L: equ $-needsmath 2788 00007A58 5B6F62736F6C657465- <1> obsolete: db "[obsolete]" 2788 00007A61 5D <1> 2789 <1> obsolete_L: equ $-obsolete 2790 00007A62 446976696465206572- <1> int0msg: asciz "Divide error",13,10 2790 00007A6B 726F720D0A00 <1> 2791 00007A71 556E65787065637465- <1> int1msg: asciz "Unexpected single-step interrupt",13,10 2791 00007A7A 642073696E676C652D- <1> 2791 00007A83 7374657020696E7465- <1> 2791 00007A8C 72727570740D0A00 <1> 2792 00007A94 556E65787065637465- <1> int3msg: asciz "Unexpected breakpoint interrupt",13,10 2792 00007A9D 6420627265616B706F- <1> 2792 00007AA6 696E7420696E746572- <1> 2792 00007AAF 727570740D0A00 <1> 2793 <1> %if _CATCHINT06 2794 00007AB6 496E76616C6964206F- <1> int6msg: asciz "Invalid opcode",13,10 2794 00007ABF 70636F64650D0A00 <1> 2795 <1> %endif 2796 <1> %if _CATCHINT08 2797 00007AC7 446574656374656420- <1> int8msg: asciz "Detected Control pressed 5 seconds",13,10 2797 00007AD0 436F6E74726F6C2070- <1> 2797 00007AD9 726573736564203520- <1> 2797 00007AE2 7365636F6E64730D0A- <1> 2797 00007AEB 00 <1> 2798 00007AEC 446574656374656420- <1> int8_kbd_msg: asciz "Detected Control pressed 5 seconds (Keyboard enabled)",13,10 2798 00007AF5 436F6E74726F6C2070- <1> 2798 00007AFE 726573736564203520- <1> 2798 00007B07 7365636F6E64732028- <1> 2798 00007B10 4B6579626F61726420- <1> 2798 00007B19 656E61626C6564290D- <1> 2798 00007B22 0A00 <1> 2799 <1> runint_ctrlc_msg: 2800 00007B24 446574656374656420- <1> asciz "Detected double Control-C via serial",13,10 2800 00007B2D 646F75626C6520436F- <1> 2800 00007B36 6E74726F6C2D432076- <1> 2800 00007B3F 69612073657269616C- <1> 2800 00007B48 0D0A00 <1> 2801 <1> %endif 2802 <1> %if _CATCHINT18 2803 00007B4B 4469736B6C65737320- <1> int18msg: asciz "Diskless boot hook called",13,10 2803 00007B54 626F6F7420686F6F6B- <1> 2803 00007B5D 2063616C6C65640D0A- <1> 2803 00007B66 00 <1> 2804 <1> %endif 2805 <1> %if _CATCHINT19 2806 00007B67 426F6F74206C6F6164- <1> int19msg: asciz "Boot load called",13,10 2806 00007B70 2063616C6C65640D0A- <1> 2806 00007B79 00 <1> 2807 <1> %endif 2808 <1> %if _PM 2809 <1> %if _CATCHEXC06 2810 00007B7A 496E76616C6964206F- <1> exc6msg: asciz "Invalid opcode fault",13,10 2810 00007B83 70636F646520666175- <1> 2810 00007B8C 6C740D0A00 <1> 2811 <1> %endif 2812 <1> %if _CATCHEXC0C 2813 00007B91 537461636B20666175- <1> excCmsg: asciz "Stack fault",13,10 2813 00007B9A 6C740D0A00 <1> 2814 <1> %endif 2815 00007B9F 47656E6572616C2070- <1> excDmsg: asciz "General protection fault",13,10 2815 00007BA8 726F74656374696F6E- <1> 2815 00007BB1 206661756C740D0A00 <1> 2816 <1> %if _EXCCSIP 2817 00007BBA 43533A49503D <1> excloc: db "CS:IP=" 2818 00007BC0 202020203A20202020- <1> exccsip: asciz " : ",13,10 2818 00007BC9 0D0A00 <1> 2819 <1> %endif 2820 00007BCC 50616765206661756C- <1> excEmsg: asciz "Page fault",13,10 2820 00007BD5 740D0A00 <1> 2821 00007BD9 436F6D6D616E64206E- <1> nodosext: asciz "Command not supported in protected mode without a DOS extender",13,10 2821 00007BE2 6F7420737570706F72- <1> 2821 00007BEB 74656420696E207072- <1> 2821 00007BF4 6F746563746564206D- <1> 2821 00007BFD 6F646520776974686F- <1> 2821 00007C06 7574206120444F5320- <1> 2821 00007C0F 657874656E6465720D- <1> 2821 00007C18 0A00 <1> 2822 00007C1A 436F6D6D616E64206E- <1> nopmsupp: asciz "Command not supported in protected mode",13,10 2822 00007C23 6F7420737570706F72- <1> 2822 00007C2C 74656420696E207072- <1> 2822 00007C35 6F746563746564206D- <1> 2822 00007C3E 6F64650D0A00 <1> 2823 <1> %if _DISPHOOK 2824 00007C44 44504D4920656E7472- <1> dpmihook: db "DPMI entry hooked, new entry=" 2824 00007C4D 7920686F6F6B65642C- <1> 2824 00007C56 206E657720656E7472- <1> 2824 00007C5F 793D <1> 2825 00007C61 5F5F5F5F3A38413736- <1> dpmihookcs: asciz "____:",_4digitshex(mydpmientry+DATASECTIONFIXUP),13,10 2825 00007C6A 0D0A00 <1> 2826 <1> %endif 2827 00007C6D 44504D4920656E7472- <1> msg.dpmi_no_hook: asciz "DPMI entry cannot be hooked!",13,10 2827 00007C76 792063616E6E6F7420- <1> 2827 00007C7F 626520686F6F6B6564- <1> 2827 00007C88 210D0A00 <1> 2828 00007C8C 7265736F7572636520- <1> nodesc: asciz "resource not accessible in real mode",13,10 2828 00007C95 6E6F74206163636573- <1> 2828 00007C9E 7369626C6520696E20- <1> 2828 00007CA7 7265616C206D6F6465- <1> 2828 00007CB0 0D0A00 <1> 2829 <1> ;descwrong: asciz "descriptor not accessible",13,10 2830 00007CB3 67617465206E6F7420- <1> gatewrong: asciz "gate not accessible",13,10 2830 00007CBC 61636365737369626C- <1> 2830 00007CC5 650D0A00 <1> 2831 00007CC9 4D532D444F5300 <1> msg.msdos: asciz "MS-DOS" 2832 00007CD0 5F5F5F5F2062617365- <1> descr: db "____ base=" 2832 00007CD9 3D <1> 2833 00007CDA 5F5F5F5F5F5F5F5F20- <1> descbase: db "________ limit=" 2833 00007CE3 6C696D69743D <1> 2834 00007CE9 5F5F5F5F5F5F5F5F20- <1> desclim: db "________ attr=" 2834 00007CF2 617474723D <1> 2835 00007CF7 5F5F5F5F0D0A <1> descattr: db "____",13,10 2836 00007CFD 00 <1> asciz 2837 <1> %endif ; _PM 2838 00007CFE 4572726F7220696E20- <1> ph_msg: asciz "Error in sequence of calls to hack.",13,10 2838 00007D07 73657175656E636520- <1> 2838 00007D10 6F662063616C6C7320- <1> 2838 00007D19 746F206861636B2E0D- <1> 2838 00007D22 0A00 <1> 2839 <1> 2840 00007D24 0D0A50726F6772616D- <1> progtrm: db 13,10,"Program terminated normally (" 2840 00007D2D 207465726D696E6174- <1> 2840 00007D36 6564206E6F726D616C- <1> 2840 00007D3F 6C792028 <1> 2841 00007D43 5F5F5F5F290D0A00 <1> progexit: asciz "____)",13,10 2842 00007D4B 45584520616E642048- <1> nowhexe: asciz "EXE and HEX files cannot be written",13,10 2842 00007D54 45582066696C657320- <1> 2842 00007D5D 63616E6E6F74206265- <1> 2842 00007D66 207772697474656E0D- <1> 2842 00007D6F 0A00 <1> 2843 00007D71 43616E6E6F74207772- <1> nownull: asciz "Cannot write: no file name given",13,10 2843 00007D7A 6974653A206E6F2066- <1> 2843 00007D83 696C65206E616D6520- <1> 2843 00007D8C 676976656E0D0A00 <1> 2844 00007D94 57726974696E672000 <1> wwmsg1: asciz "Writing " 2845 00007D9D 2062797465730D0A00 <1> wwmsg2: asciz " bytes",13,10 2846 00007DA6 4469736B2066756C6C- <1> diskful: asciz "Disk full",13,10 2846 00007DAF 0D0A00 <1> 2847 00007DB2 4572726F7220 <1> openerr: db "Error " 2848 00007DB8 5F5F5F5F206F70656E- <1> openerr1: asciz "____ opening file",13,10 2848 00007DC1 696E672066696C650D- <1> 2848 00007DCA 0A00 <1> 2849 00007DCC 46696C65206E6F7420- <1> doserr2: asciz "File not found",13,10 2849 00007DD5 666F756E640D0A00 <1> 2850 00007DDD 50617468206E6F7420- <1> doserr3: asciz "Path not found",13,10 2850 00007DE6 666F756E640D0A00 <1> 2851 00007DEE 416363657373206465- <1> doserr5: asciz "Access denied",13,10 2851 00007DF7 6E6965640D0A00 <1> 2852 00007DFE 496E73756666696369- <1> doserr8: asciz "Insufficient memory",13,10 2852 00007E07 656E74206D656D6F72- <1> 2852 00007E10 790D0A00 <1> 2853 <1> 2854 <1> %if _EMS 2855 <1> ;emmname: db "EMMXXXX0" 2856 00007E14 454D53206E6F742069- <1> emsnot: asciz "EMS not installed",13,10 2856 00007E1D 6E7374616C6C65640D- <1> 2856 00007E26 0A00 <1> 2857 00007E28 454D5320696E746572- <1> emserr1: asciz "EMS internal error",13,10 2857 00007E31 6E616C206572726F72- <1> 2857 00007E3A 0D0A00 <1> 2858 00007E3D 48616E646C65206E6F- <1> emserr3: asciz "Handle not found",13,10 2858 00007E46 7420666F756E640D0A- <1> 2858 00007E4F 00 <1> 2859 00007E50 4E6F20667265652068- <1> emserr5: asciz "No free handles",13,10 2859 00007E59 616E646C65730D0A00 <1> 2860 00007E62 546F74616C20706167- <1> emserr7: asciz "Total pages exceeded",13,10 2860 00007E6B 657320657863656564- <1> 2860 00007E74 65640D0A00 <1> 2861 00007E79 467265652070616765- <1> emserr8: asciz "Free pages exceeded",13,10 2861 00007E82 732065786365656465- <1> 2861 00007E8B 640D0A00 <1> 2862 00007E8F 506172616D65746572- <1> emserr9: asciz "Parameter error",13,10 2862 00007E98 206572726F720D0A00 <1> 2863 00007EA1 4C6F676963616C2070- <1> emserra: asciz "Logical page out of range",13,10 2863 00007EAA 616765206F7574206F- <1> 2863 00007EB3 662072616E67650D0A- <1> 2863 00007EBC 00 <1> 2864 00007EBD 506879736963616C20- <1> emserrb: asciz "Physical page out of range",13,10 2864 00007EC6 70616765206F757420- <1> 2864 00007ECF 6F662072616E67650D- <1> 2864 00007ED8 0A00 <1> 2865 <1> align 2, db 0 2866 00007EDA [287E][287E]0000- <1> emserrs: dw emserr1,emserr1,0,emserr3,0,emserr5,0,emserr7 2866 00007EE0 [3D7E]0000[507E]00- <1> 2866 00007EE7 00[627E] <1> 2867 00007EEA [797E][8F7E][A17E]- <1> dw emserr8,emserr9,emserra,emserrb 2867 00007EF0 [BD7E] <1> 2868 00007EF2 454D53206572726F72- <1> emserrx: asciz "EMS error " 2868 00007EFB 2000 <1> 2869 00007EFD 48616E646C65206372- <1> xaans: db "Handle created = " 2869 00007F06 6561746564203D20 <1> 2870 00007F0E 5F5F5F5F0D0A00 <1> xaans1: asciz "____",13,10 2871 00007F15 48616E646C6520 <1> xdans: db "Handle " 2872 00007F1C 5F5F5F5F206465616C- <1> xdans1: asciz "____ deallocated",13,10 2872 00007F25 6C6F63617465640D0A- <1> 2872 00007F2E 00 <1> 2873 00007F2F 48616E646C65207265- <1> xrans: asciz "Handle reallocated",13,10 2873 00007F38 616C6C6F6361746564- <1> 2873 00007F41 0D0A00 <1> 2874 00007F44 4C6F676963616C2070- <1> xmans: db "Logical page " 2874 00007F4D 61676520 <1> 2875 00007F51 5F5F5F5F206D617070- <1> xmans1: db "____ mapped to physical page " 2875 00007F5A 656420746F20706879- <1> 2875 00007F63 736963616C20706167- <1> 2875 00007F6C 6520 <1> 2876 00007F6E 5F5F0D0A00 <1> xmans2: asciz "__",13,10 2877 00007F73 48616E646C6520 <1> xsstr1: db "Handle " 2878 00007F7A 5F5F5F5F2068617320 <1> xsstr1a: db "____ has " 2879 00007F83 5F5F5F5F2070616765- <1> xsstr1b: asciz "____ pages allocated",13,10 2879 00007F8C 7320616C6C6F636174- <1> 2879 00007F95 65640D0A00 <1> 2880 00007F9A 706879732E20706167- <1> xsstr2: db "phys. page " 2880 00007FA3 6520 <1> 2881 00007FA5 5F5F203D207365676D- <1> xsstr2a: db "__ = segment " 2881 00007FAE 656E7420 <1> 2882 00007FB2 5F5F5F5F202000 <1> xsstr2b: asciz "____ " 2883 00007FB9 5F5F5F5F206F662061- <1> xsstr3: db "____ of a total " 2883 00007FC2 20746F74616C20 <1> 2884 00007FC9 5F5F5F5F20454D5320- <1> xsstr3a: asciz "____ EMS " 2884 00007FD2 00 <1> 2885 00007FD3 657320686176652062- <1> xsstr4: asciz "es have been allocated",13,10 2885 00007FDC 65656E20616C6C6F63- <1> 2885 00007FE5 617465640D0A00 <1> 2886 00007FEC 70616700 <1> xsstrpg: asciz "pag" 2887 00007FF0 68616E646C00 <1> xsstrhd: asciz "handl" 2888 00007FF6 6E6F206D6170706162- <1> xsnopgs: asciz "no mappable pages",13,10,13,10 2888 00007FFF 6C652070616765730D- <1> 2888 00008008 0A0D0A00 <1> 2889 <1> %endif 2890 <1> 2891 <1> align 4, db 0 2892 0000800C 000800040002800040- <1> flagbits: dw 800h,400h,200h, 80h,040h,010h,004h,001h 2892 00008015 00100004000100 <1> 2893 0000801C 4F56444E45494E475A- <1> flagson: dw "OV","DN","EI","NG","ZR","AC","PE","CY" 2893 00008025 52414350454359 <1> 2894 0000802C 4E5655504449504C4E- <1> flagsoff: dw "NV","UP","DI","PL","NZ","NA","PO","NC" 2894 00008035 5A4E41504F4E43 <1> 2895 0000803C 4F464446494653465A- <1> flagnames: dw "OF","DF","IF","SF","ZF","AF","PF","CF" 2895 00008045 46414650464346 <1> 2896 <1> 2897 <1> %if _COND 2898 0000804C 6E6F7420 <1> msg.condnotjump:db "not " 2899 00008050 6A756D70696E6700 <1> msg.condjump: asciz "jumping" 2900 <1> %endif 2901 <1> 2902 00008058 206D6174636865730D- <1> msg.matches: asciz " matches",13,10 2902 00008061 0A00 <1> 2903 <1> 2904 00008063 00 <1> align 4, db 0 2905 00008064 414C4148424C424843- <1> reg8names: dw "AL","AH","BL","BH","CL","CH","DL","DH" 2905 0000806D 4C4348444C4448 <1> 2906 <1> ; Even entries are xL registers, odd ones the xH ones. 2907 <1> ; Order matches that of the first four regs entries. 2908 <1> 2909 00008074 415842584358445853- <1> reg16names: dw "AX","BX","CX","DX","SP","BP","SI","DI" 2909 0000807D 50425053494449 <1> 2910 00008084 445345535353435346- <1> dw "DS","ES","SS","CS","FS","GS","IP","FL" 2910 0000808D 5347534950464C <1> 2911 <1> ; 32-bit registers are the first eight and last two entries of 2912 <1> ; reg16names with 'E', which are all non-segment registers. 2913 <1> ; Segment registers can be detected by the 'S' as second letter. 2914 <1> ; FS and GS are the fourth- and third-to-last entries. 2915 <1> ; Order matches that of the sixteen regs entries. 2916 <1> 2917 <1> 2918 <1> ; Table of recognised default (unsigned) types. 2919 <1> ; 2920 <1> ; If any number of characters match, use the type. 2921 <1> ; If an additional "S" is found in front of a valid 2922 <1> ; type, the type is set to signed. (Word and byte 2923 <1> ; types are sign-extended to a dword value.) 2924 <1> ; 2925 <1> ; Each odd entry is an alternative name for the even 2926 <1> ; entry preceding it. 2927 <1> types: 2928 00008094 0442595445 <1> countedb "BYTE" ; ("B" is hexadecimal) 2929 00008099 0443484152 <1> countedb "CHAR" ; ("C" is hexadecimal) 2930 0000809E 04574F5244 <1> countedb "WORD" 2931 000080A3 0553484F5254 <1> countedb "SHORT" 2932 000080A9 053342595445 <1> countedb "3BYTE" ; ("3" and "3B" are numeric) 2933 000080AF 053342595445 <1> countedb "3BYTE" 2934 000080B5 0544574F5244 <1> countedb "DWORD" ; ("D" is hexadecimal) 2935 000080BB 044C4F4E47 <1> countedb "LONG" 2936 <1> .addresses: 2937 000080C0 07504F494E544552 <1> countedb "POINTER" 2938 000080C8 03505452 <1> countedb "PTR" 2939 000080CC 064F4646534554 <1> countedb "OFFSET" 2940 000080D3 034F4653 <1> countedb "OFS" 2941 000080D7 075345474D454E54 <1> countedb "SEGMENT" 2942 <1> .end: 2943 <1> 2944 <1> maxtypesize equ 7 ; size of "SEGMENT" and "POINTER" 1058 1059 msg_end: 1060 1061 numdef SHOWMSGSIZE, 0 1062 %if _SHOWMSGSIZE 1063 %assign MSGSIZE msg_end - msg_start 1064 %warning msg holds MSGSIZE bytes 1065 %endif 1066 1067 1068 usesection lDEBUG_DATA_ENTRY 1069 ; INP: word [cs:ip] = near address to jump to in other segment 1070 ..@symhint_trace_caller_entry_to_code_seg: 1071 entry_to_code_seg: 1072 000080DF 50 push ax ; word space for ?jumpaddress_ip, is ax 1073 000080E0 2EA1[CE00] mov ax, word [cs:code_seg] 1074 %if _PM 1075 000080E4 EB05 jmp entry_to_code_common 1076 1077 ..@symhint_trace_caller_entry_to_code_sel: 1078 entry_to_code_sel: 1079 000080E6 50 push ax 1080 000080E7 2EA1[D000] mov ax, word [cs:code_sel] 1081 %endif 1082 1083 entry_to_code_common: 1084 lframe 0 1085 lpar word, jumpaddress_cs_and_orig_ip 1086 lpar word, jumpaddress_ip 1087 000080EB 5589E5 lenter 1088 1089 000080EE 56 push si 1090 000080EF 9C pushf 1091 000080F0 FC cld 1092 1093 000080F1 874604 xchg word [bp + ?jumpaddress_cs_and_orig_ip], ax ; fill function segment 1094 000080F4 89C6 mov si, ax 1095 000080F6 2EAD cs lodsw 1096 %if _DEBUG 1097 cmp al, 0CCh ; debugger breakpoint ? 1098 jne @F ; no --> 1099 int3 ; break to make it remove the breakpoint 1100 dec si 1101 dec si 1102 cs lodsw ; reload the word 1103 cmp al, 0CCh 1104 jne @F 1105 1106 .l: 1107 int3 1108 jmp .l 1109 1110 @@: 1111 %endif 1112 000080F8 874602 xchg word [bp + ?jumpaddress_ip], ax ; fill function offset 1113 ; (and restore ax) 1114 1115 000080FB 9D popf 1116 000080FC 5E pop si 1117 1118 000080FD 5D lleave 1119 000080FE CB retf ; jump to dword [bp + ?jumpaddress] 1120 1121 1122 1123 ; debug22 - Interrupt 22h handler 1124 ; 1125 ; This is for DEBUG itself: it's a catch-all for the various Int23 1126 ; and Int24 calls that may occur unpredictably at any time. What we 1127 ; do is pretend to be a command interpreter (which we are, in a sense, 1128 ; just with different sort of commands) by setting our parent PSP 1129 ; value equal to our own PSP so that DOS does not free our memory when 1130 ; we quit. Therefore control ends up here when DOS detects Control-C 1131 ; or an Abort in the critical error prompt is selected. 1132 debug22: 1133 000080FF FA cli 1134 .cleartraceflag: 1135 00008100 FC cld ; reestablish things 1136 00008101 8CC8 mov ax, cs 1137 00008103 8ED8 mov ds, ax 1138 00008105 8ED0 mov ss, ax 1139 00008107 8B26[940A] mov sp, word [ savesp ] ; restore stack 1140 %if _PM 1141 0000810B 8026[9D00]F7 clropt [internalflags], protectedmode ; reset PM flag 1142 %endif 1143 00008110 90 times 1 - (($ - $$) & 1) nop ; align in-code parameter 1144 00008111 E8CBFF call entry_to_code_seg 1145 00008114 [7503] dw cmd2_reset_re_maybe_pm 1146 1147 1148 usesection lDEBUG_CODE 1149 1150 %if $ - $$ 1151 %error cmd3 is not at offset 0 in lDEBUG_CODE 1152 %endif 1153 1154 code_insure_low_byte_not_0CCh 1155 ; Begin main command loop. 1156 cmd3: 1157 00000000 16 push ss 1158 00000001 1F pop ds 1159 00000002 66 _386_o32 ; mov esp 1160 00000003 8B26[940A] mov sp, word [ savesp ] ; restore stack 1161 00000007 83E4FC _386 and sp, ~3 ; align stack 1162 0000000A 66 _386_o32 1163 0000000B 31C0 xor ax, ax 1164 0000000D 66 _386_o32 1165 0000000E 50 push ax 1166 0000000F 66 _386_o32 1167 00000010 9D popf 1168 00000011 8B26[940A] _386 mov sp, word [ savesp ] ; restore stack 1169 00000015 FC cld 1170 00000016 FB sti 1171 00000017 C706[9A0A][0000] mov word [ errret ], cmd3 1172 0000001D C706[9C0A][FBA4] mov word [ throwret ], errhandler 1173 00000023 8926[9E0A] mov word [ throwsp ], sp 1174 00000027 1E push ds 1175 00000028 07 pop es 1176 1177 00000029 31FF xor di, di 1178 0000002B 873E[0E0C] xchg di, word [terminator_in_line_in.offset] 1179 0000002F 85FF test di, di 1180 00000031 7409 jz @F 1181 00000033 803D00 cmp byte [di], 0 1182 00000036 7504 jne @F 1183 00000038 A0[100C] mov al, byte [terminator_in_line_in.value] 1184 0000003B AA stosb 1185 @@: 1186 1187 0000003C 8026[A500]DF clropt [internalflags3], dif3_unquiet_error 1188 00000041 8026[A600]FD clropt [internalflags3], dif3_do_not_highlight 1189 %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 1190 00000046 8026[A700]E7 clropt [internalflags3], dif3_auxbuff_guarded_1 | dif3_in_if 1191 %else 1192 clropt [internalflags3], dif3_auxbuff_guarded_1 1193 %endif 1194 0000004B 8026[A400]CF clropt [internalflags3], dif3_input_serial_override | dif3_input_terminal_override 1196 00000050 8026[A300]EF clropt [internalflags2], dif2_in_silence_dump 1197 %if _PM 1198 00000055 E82138 call resetmode 1199 %endif 1200 1201 1202 %if _PM 1203 cmd3_int2F_init: 1204 00000058 B02F mov al, 2Fh ; interrupt number 1205 0000005A BE[4089] mov si, debug2F ; -> IISP entry header 1206 1207 0000005D F606[8800]02 testopt [options4], opt4_int_2F_hook 1208 00000062 751C jnz .done 1209 .check_disable: 1210 00000064 F606[A800]02 testopt [internalflags4], dif4_int_2F_hooked 1211 00000069 7415 jz .done 1212 1213 0000006B BA0200 mov dx, opt4_int_2F_force >> 16 1214 0000006E E805D2 call UnhookInterruptForce 1215 00000071 720D jc .done 1216 1217 00000073 8026[9D00]FE clropt [internalflags], hooked2F 1218 00000078 8026[A800]FD clropt [internalflags4], dif4_int_2F_hooked 1219 0000007D E803D3 call update_inttab_optional 1220 1221 .done: 1222 %endif 1223 1224 1225 %if _CATCHINT08 1226 cmd3_int08_init: 1227 00000080 B008 mov al, 08h ; interrupt number 1228 00000082 BE[5685] mov si, intr8 ; -> IISP entry header 1229 1230 00000085 F606[8800]04 testopt [options4], opt4_int_08_hook 1231 0000008A 7414 jz .check_disable 1232 .check_enable: 1233 0000008C F606[A800]04 testopt [internalflags4], dif4_int_08_hooked 1234 00000091 7524 jnz .done 1235 1236 00000093 E866D0 call install_86m_interrupt_handler 1237 00000096 800E[A800]04 setopt [internalflags4], dif4_int_08_hooked 1238 0000009B E8E5D2 call update_inttab_optional 1239 0000009E EB17 jmp .done 1240 1241 .check_disable: 1242 000000A0 F606[A800]04 testopt [internalflags4], dif4_int_08_hooked 1243 000000A5 7410 jz .done 1244 1245 000000A7 BA0400 mov dx, opt4_int_08_force >> 16 1246 000000AA E8C9D1 call UnhookInterruptForce 1247 000000AD 7208 jc .done 1248 1249 000000AF 8026[A800]FB clropt [internalflags4], dif4_int_08_hooked 1250 000000B4 E8CCD2 call update_inttab_optional 1251 1252 .done: 1253 %endif 1254 1255 1256 %if _CATCHINT2D 1257 cmd3_int2D_init: 1258 000000B7 B02D mov al, 2Dh ; interrupt number 1259 000000B9 BE[4C81] mov si, int2D ; -> IISP entry header 1260 1261 000000BC F606[8800]08 testopt [options4], opt4_int_2D_hook 1262 000000C1 744A jz .check_disable 1263 .check_enable: 1264 000000C3 F606[A800]08 testopt [internalflags4], dif4_int_2D_hooked 1265 000000C8 7557 jnz .done 1266 1267 000000CA E8BBD0 call intchk ; ZR if offset = -1 or segment = 0 1268 ; CHG: ax, dx, bx 1269 000000CD 7431 jz .fail 1270 1271 000000CF 8A26[4881] mov ah, byte [try_amis_multiplex_number] 1272 000000D3 B000 mov al, 00h 1273 ; function 0 changes dx, di, cx, al 1274 %if _PM 1275 000000D5 E85992 call call_int2D 1276 %else 1277 int 2Dh ; enquire whether there's anyone 1278 %endif 1279 000000D8 84C0 test al, al 1280 000000DA 7414 jz .got 1281 1282 000000DC 31C0 xor ax, ax ; start with multiplex number 0 1283 .loopplex: 1284 000000DE B000 mov al, 00h ; AMIS installation check 1285 ; function 0 changes dx, di, cx, al 1286 %if _PM 1287 000000E0 E84E92 call call_int2D 1288 %else 1289 int 2Dh ; enquire whether there's anyone 1290 %endif 1291 000000E3 84C0 test al, al ; free ? 1292 000000E5 7409 jz .got ; yes, put it to use --> 1293 000000E7 FEC4 inc ah 1294 000000E9 75F3 jnz .loopplex ; try next multiplexer --> 1295 1296 000000EB BA[B36A] mov dx, msg.cannot_hook_2D.nofree 1297 000000EE EB13 jmp .fail_putsz 1298 1299 .got: 1300 000000F0 8826[6081] mov byte [amis_multiplex_number], ah 1301 1302 000000F4 B02D mov al, 2Dh ; interrupt number 1303 000000F6 E803D0 call install_86m_interrupt_handler 1304 000000F9 800E[A800]08 setopt [internalflags4], dif4_int_2D_hooked 1305 000000FE EB21 jmp .done 1306 1307 .fail: 1308 00000100 BA[756A] mov dx, msg.cannot_hook_2D.invalid 1309 .fail_putsz: 1310 00000103 E89EBC call putsz 1311 00000106 8026[8800]F7 clropt [options4], opt4_int_2D_hook 1312 0000010B EB14 jmp .done 1313 1314 .check_disable: 1315 0000010D F606[A800]08 testopt [internalflags4], dif4_int_2D_hooked 1316 00000112 740D jz .done 1317 1318 00000114 BA0800 mov dx, opt4_int_2D_force >> 16 1319 00000117 E85CD1 call UnhookInterruptForce 1320 0000011A 7205 jc .done 1321 1322 0000011C 8026[A800]F7 clropt [internalflags4], dif4_int_2D_hooked 1323 1324 .done: 1325 %endif 1326 1327 1328 00000121 F606[A700]01 testopt [internalflags3], dif3_input_re 1329 00000126 7403E93701 jnz cmd3_continue_1_re 1330 0000012B 8026[8100]7F clropt [options2], opt2_re_cancel_tpg 1331 00000130 E8B1BB call silence_dump 1332 1333 1334 cmd3_serial_init: 1335 00000133 F606[7D00]40 testopt [options], enable_serial 1336 00000138 7503E9E000 jz .check_disable_serial 1337 .check_enable_serial: 1338 0000013D F606[EB0B]01 testopt [serial_flags], sf_init_done 1339 00000142 7403E91801 jnz .done_serial 1340 .enable_serial: 1341 1342 00000147 A0[EC0B] mov al, byte [serial_var_intnum] 1343 0000014A A2[2209] mov byte [serial_use_intnum], al 1344 0000014D A0[ED0B] mov al, byte [serial_var_params] 1345 00000150 A2[2309] mov byte [serial_use_params], al 1346 00000153 A0[EE0B] mov al, byte [serial_var_fifo] 1347 00000156 A2[2409] mov byte [serial_use_fifo], al 1348 00000159 A1[F00B] mov ax, word [serial_var_baseport] 1349 0000015C A3[2609] mov word [serial_use_baseport], ax 1350 0000015F A1[F20B] mov ax, word [serial_var_dl] 1351 00000162 A3[2809] mov word [serial_use_dl], ax 1352 00000165 A1[F40B] mov ax, word [serial_var_irqmask] 1353 00000168 A3[2A09] mov word [serial_use_irqmask], ax 1354 0000016B E87DCD call serial_clear_fifos 1355 0000016E E843CD call serial_install_interrupt_handler 1356 00000171 7317 jnc @F 1357 00000173 BF[556B] mov di, msg.serial_cannot_hook.old_int 1358 00000176 A0[120C] mov al, byte [serial_installed_intnum] 1359 00000179 E879B8 call hexbyte 1360 0000017C BF[3F6B] mov di, msg.serial_cannot_hook.new_int 1361 0000017F A0[2209] mov al, byte [serial_use_intnum] 1362 00000182 E870B8 call hexbyte 1363 00000185 BA[1F6B] mov dx, msg.serial_cannot_hook 1364 00000188 EB49 jmp .no_keep 1365 1366 @@: 1367 0000018A C606[E095]80 mov byte [serial_interrupt_handler + ieEOI], 80h 1368 0000018F E86CCD call serial_init_UART 1369 1370 00000192 800E[EB0B]01 setopt [serial_flags], sf_init_done 1371 1372 00000197 BA[B369] mov dx, msg.serial_request_keep 1373 0000019A E807BC call putsz 1374 1375 0000019D BF[0E08] mov di, line_out 1376 %if _DEBUG 1377 mov al, '~' ; indicate instance is to be debugged 1378 stosb 1379 %endif 1380 000001A0 B03D mov al, '=' 1381 000001A2 AA stosb 1382 000001A3 B020 mov al, 32 1383 000001A5 AA stosb 1384 1385 000001A6 31C0 xor ax, ax 1386 000001A8 A3[000C] mov word [getline_timer_count], ax 1387 000001AB A3[020C] mov word [getline_timer_last], ax 1388 000001AE C706[040C][DE01] mov word [getline_timer_func], .timer 1389 1390 ; if we're executing from the command line 1391 ; buffer or a Y file then we want to 1392 ; override input to be from serial for the 1393 ; KEEP confirmation prompt. 1394 ; output is always to serial if we're here. 1395 000001B4 800E[A400]20 setopt [internalflags3], dif3_input_serial_override 1396 000001B9 E89DBF call getline00 1397 000001BC 8026[A400]DF clropt [internalflags3], dif3_input_serial_override 1398 1399 000001C1 E851B7 call skipcomm0 1400 000001C4 4E dec si 1401 000001C5 BA[706A] mov dx, msg.keep 1402 000001C8 E8C4B6 call isstring? 1403 000001CB 7503E98F00 je .done_serial 1404 1405 000001D0 BA[3D6A] mov dx, msg.serial_no_keep_enter 1406 .no_keep: 1407 000001D3 8026[7D00]BF clropt [options], enable_serial 1408 000001D8 E8C9BB call putsz 1409 000001DB E922FE jmp cmd3 1410 1411 1412 .timer: 1413 000001DE 50 push ax 1414 000001DF 52 push dx 1415 000001E0 51 push cx 1416 000001E1 06 push es 1417 1418 000001E2 BA4000 mov dx, 40h 1419 000001E5 8EC2 mov es, dx 1420 1421 000001E7 8B0E[000C] mov cx, word [getline_timer_count] 1422 000001EB 8B16[020C] mov dx, word [getline_timer_last] 1423 1424 000001EF 263B166C00 cmp dx, word [es:6Ch] 1425 000001F4 741A je .timer_next 1426 000001F6 268B166C00 mov dx, word [es:6Ch] 1427 000001FB 41 inc cx 1428 000001FC B012 mov al, 18 1429 000001FE F626[E90B] mul byte [serial_keep_timeout] 1430 00000202 85C0 test ax, ax 1431 00000204 740A jz .timer_next 1432 00000206 39C1 cmp cx, ax 1433 00000208 7206 jb .timer_next 1434 1435 0000020A 07 pop es 1436 0000020B BA[F069] mov dx, msg.serial_no_keep_timer 1437 0000020E EBC3 jmp .no_keep 1438 1439 .timer_next: 1440 00000210 890E[000C] mov word [getline_timer_count], cx 1441 00000214 8916[020C] mov word [getline_timer_last], dx 1442 00000218 07 pop es 1443 00000219 59 pop cx 1444 0000021A 5A pop dx 1445 0000021B 58 pop ax 1446 0000021C C3 retn 1447 1448 1449 .check_disable_serial: 1450 ; If serial is initialised, uninstall it. 1451 0000021D F606[EB0B]01 testopt [serial_flags], sf_init_done 1452 00000222 751D jnz .disable_serial 1453 ; Not initialised. Is the interrupt still hooked? 1454 00000224 F606[A800]01 testopt [internalflags4], dif4_int_serial_hooked 1455 00000229 7434 jz .done_serial 1456 ; Try unhooking the interrupt handler. 1457 0000022B E8E4CD call serial_uninstall_interrupt_handler 1458 0000022E 722F jc .done_serial ; if it failed again --> 1459 00000230 BF[8A6B] mov di, msg.serial_late_unhook.int 1460 00000233 A0[120C] mov al, byte [serial_installed_intnum] 1461 00000236 E8BCB7 call hexbyte 1462 00000239 BA[696B] mov dx, msg.serial_late_unhook 1463 0000023C E865BB call putsz 1464 0000023F EB1E jmp .done_serial 1465 1466 .disable_serial: 1467 1468 00000241 E883CD call serial_clean_up 1469 00000244 7314 jnc @F 1470 00000246 BF[186B] mov di, msg.serial_cannot_unhook.int 1471 00000249 A0[120C] mov al, byte [serial_installed_intnum] 1472 0000024C E8A6B7 call hexbyte 1473 0000024F BA[F46A] mov dx, msg.serial_cannot_unhook 1474 00000252 E84FBB call putsz 1475 00000255 C606[E095]00 mov byte [serial_interrupt_handler + ieEOI], 0 1476 ; we do not issue EOI any longer 1477 @@: 1478 0000025A 8026[EB0B]FE clropt [serial_flags], sf_init_done 1479 .done_serial: 1480 1481 0000025F E887D1 call ensuredebuggeeloaded ; if no task is active, create a dummy one 1482 1483 cmd3_continue_1_re: 1484 00000262 BF[0E08] mov di, line_out ; build prompt 1485 %if _DEBUG 1486 mov al, '~' ; indicate instance is to be debugged 1487 stosb 1488 %endif 1489 %if _INDOS_PROMPT 1490 00000265 E840A4 call InDos 1491 00000268 740F jz @F 1492 %if _BOOTLDR 1493 0000026A F606[9D00]40 testopt [internalflags], nodosloaded 1494 ; boot mode ? 1495 %if _INDOS_PROMPT_NOBOOT 1496 0000026F 7508 jnz @F ; yes, do not show special prompt --> 1497 %elif _INDOS_PROMPT_NOFLAG 1498 jnz .indos_prompt ; yes, show special prompt --> 1499 ; (do not call .real_indos check) 1500 %endif 1501 %endif 1502 %if _INDOS_PROMPT_NOFLAG 1503 00000271 E842A4 call InDos.real_indos ; real InDOS set ? 1504 00000274 7403 jz @F ; no, do not show special prompt --> 1505 %endif 1506 .indos_prompt: 1507 00000276 B021 mov al, '!' 1508 00000278 AA stosb 1509 @@: 1510 %endif 1511 00000279 B02D mov al, '-' ; main prompt 1512 %if _PM 1513 0000027B E84F8F call ispm 1514 0000027E 7502 jnz .realmode 1515 00000280 B023 mov al, '#' ; PM main prompt 1516 .realmode: 1517 %endif 1518 00000282 F606[A700]01 testopt [internalflags3], dif3_input_re 1519 00000287 7402 jz @F 1520 00000289 B025 mov al, '%' 1521 @@: 1522 0000028B AA stosb 1523 1524 0000028C C606[AC95]00 mov byte [hhflag], 0 1525 00000291 8326[A895]00 and word [hh_depth], 0 1526 00000296 8326[AA95]00 and word [hh_depth_of_single_term], 0 1527 0000029B C706[040C][E003] mov word [getline_timer_func], dmycmd 1528 000002A1 8026[9E00]FE clropt [internalflags], usecharcounter ; reset this automatically 1529 1530 000002A6 F606[A700]01 testopt [internalflags3], dif3_input_re 1531 000002AB 7515 jnz cmd3_continue_2_re 1532 1533 000002AD 800E[9C00]08 setopt [internalflags], pagedcommand ; 2009-02-21: default to page all commands 1534 000002B2 8026[9F00]CF clropt [internalflags], tt_silence | tt_silent_mode 1535 ; reset, in case it's still set 1536 000002B7 8126[A000]3FF7 clropt [internalflags2], dif2_tpg_proceed_bp_set | dif2_bp_failure | dif2_tpg_keep_proceed_bp, 1 1538 %if _INPUT_FILE_HANDLES 1539 000002BD 8026[A200]DF clropt [internalflags2], dif2_closed_input_file 1540 %endif 1541 1542 cmd3_continue_2_re: 1543 000002C2 E8C001 call determine_quiet_output 1544 1545 000002C5 31C9 xor cx, cx 1546 000002C7 870E[F00A] xchg cx, word [rc] ; reset rc 1547 000002CB 890E[F20A] mov word [priorrc], cx ; make prior value available 1548 000002CF E304 jcxz @F 1549 000002D1 890E[F40A] mov word [erc], cx ; update to last non-zero value 1550 @@: 1551 1552 000002D5 F606[A700]01 testopt [internalflags3], dif3_input_re 1553 000002DA 7431 jz cmd3_continue_not_re 1554 1555 000002DC 8306[E809]01 add word [re_count], 1 1556 000002E1 8316[EA09]00 adc word [re_count + 2], 0 1557 000002E6 8B16[EE09] mov dx, word [re_limit + 2] 1558 000002EA A1[EC09] mov ax, word [re_limit] 1559 000002ED 3916[EA09] cmp word [re_count + 2], dx 1560 000002F1 7504 jne @F 1561 000002F3 3906[E809] cmp word [re_count], ax 1562 @@: 1563 000002F7 7614 jbe cmd3_continue_not_re 1564 1565 000002F9 BA[BE68] mov dx, msg.re_limit_reached 1566 000002FC E89FBA call putsz_error 1567 000002FF B80401 mov ax, 0104h 1568 00000302 E81EA2 call setrc 1569 00000305 800E[A500]04 setopt [internalflags3], dif3_at_line_end 1570 0000030A E919C1 jmp getline_close_file 1571 1572 cmd3_continue_not_re: 1573 1574 cmd3_check_line_out_overflow: 1575 0000030D 813E[1609]4226 cmp word [line_out_overflow], 2642h 1576 00000313 740C je @F 1577 00000315 C706[1609]4226 mov word [line_out_overflow], 2642h 1578 0000031B BA[916B] mov dx, msg.line_out_overflow 1579 0000031E E87DBA call putsz_error 1580 @@: 1581 1582 cmd3_getline: 1583 00000321 E835BE call getline00 ; prompted input, also resets linecounter 1584 1585 00000324 E8CBB5 call iseol?.notsemicolon 1586 00000327 7518 jne cmd3_notblank 1587 00000329 F606[8700]10 testopt [options3], opt3_disable_autorepeat 1588 0000032E 7508 jnz @F 1589 00000330 8B16[DC0B] mov dx, word [lastcmd] 1590 00000334 8804 mov byte [si], al 1591 00000336 EB35 jmp short cmd4 1592 1593 @@: 1594 00000338 C706[DC0B][E003] mov word [lastcmd], dmycmd 1595 0000033E E9BFFC jmp cmd3 1596 1597 cmd3_notblank: 1598 00000341 C706[DC0B][E003] mov word [lastcmd], dmycmd 1599 00000347 3C3B cmp al, ';' 1600 00000349 7427 je cmd3_j1 ; if comment --> 1601 0000034B 3C3A cmp al, ':' 1602 0000034D 7423 je cmd3_j1 ; if jump label --> 1603 0000034F 3C3F cmp al, '?' 1604 00000351 7503E98B00 je help ; if request for help --> 1605 00000356 E8BA88 call uppercase 1606 00000359 2C41 sub al, 'A' 1607 0000035B 3C18 cmp al, 'Y'-'A' 1608 0000035D 7603E97AA1 ja error ; if not recognized 1609 00000362 98 cbw 1610 00000363 93 xchg bx, ax 1611 00000364 E8ADB5 call skipcomma 1612 00000367 D1E3 shl bx, 1 1613 00000369 8B97[4A00] mov dx, word [ cmdlist+bx ] 1614 cmd4: 1615 0000036D BF[0E08] mov di, line_out 1616 00000370 FFD2 call dx 1617 cmd3_j1: 1618 00000372 E98BFC jmp cmd3 ; back to the top 1619 1620 1621 code_insure_low_byte_not_0CCh 1622 cmd2_reset_re_maybe_pm: 1623 1624 00000375 66 _386_o32 ; mov esp 1625 00000376 8B26[940A] mov sp, word [ savesp ] ; restore stack 1626 0000037A 83E4FC _386 and sp, ~3 ; align stack 1627 0000037D 66 _386_o32 1628 0000037E 31C0 xor ax, ax 1629 00000380 66 _386_o32 1630 00000381 50 push ax 1631 00000382 66 _386_o32 1632 00000383 9D popf 1633 00000384 8B26[940A] _386 mov sp, word [ savesp ] ; restore stack 1634 00000388 FC cld 1635 00000389 FB sti 1636 1637 %if _PM 1638 0000038A E89D40 call handle_mode_changed 1639 %endif 1640 1641 code_insure_low_byte_not_0CCh 1642 cmd2_reset_re: 1643 0000038D 8B1E[FC0B] mov bx, word [io_levels] 1644 .entry_bx_levels: 1645 00000391 31C9 xor cx, cx 1646 .entry_bx_levels_cx_cmdline: 1647 00000393 31D2 xor dx, dx 1648 %if _INPUT_FILE_HANDLES 1649 00000395 F606[A200]10 testopt [internalflags2], dif2_input_file 1650 0000039A 7405 jz @F 1651 0000039C 030E[800A] add cx, word [input_file_handles.active] 1652 000003A0 41 inc cx 1653 @@: 1654 %endif 1655 %if _INPUT_FILE_BOOT 1656 000003A1 F606[A300]02 testopt [internalflags2], dif2_input_file_boot 1657 000003A6 7405 jz @F 1658 000003A8 030E[B08F] add cx, word [load_input_file.active] 1659 000003AC 41 inc cx 1660 @@: 1661 %endif 1662 000003AD F606[A700]01 testopt [internalflags3], dif3_input_re 1663 000003B2 740D jz @F 1664 000003B4 41 inc cx 1665 000003B5 42 inc dx 1666 000003B6 F606[FE0B]01 testopt [io_flags], iof_extra_iol_for_tpg_re 1667 000003BB 7404 jz @F 1668 000003BD 43 inc bx 1669 000003BE 7501 jnz @F 1670 000003C0 4B dec bx 1671 @@: 1672 000003C1 39D9 cmp cx, bx 1673 000003C3 7602 jbe @F 1674 000003C5 89D9 mov cx, bx 1675 @@: 1676 000003C7 E3A9 jcxz cmd3_j1 1677 000003C9 1E push ds 1678 000003CA 07 pop es 1679 @@: 1680 000003CB 51 push cx 1681 000003CC 52 push dx 1682 000003CD E8A4C0 call getline_close_file.resetstuff 1683 000003D0 5A pop dx 1684 000003D1 59 pop cx 1685 000003D2 E2F7 loop @B 1686 000003D4 85D2 test dx, dx 1687 000003D6 749A jz cmd3_j1 1688 000003D8 800E[8100]80 setopt [options2], opt2_re_cancel_tpg 1689 000003DD E94523 jmp dumpregs_extended.exit 1690 1691 1692 dmycmd: 1693 000003E0 C3 retn 1694 1695 help: 1696 000003E1 E830B5 call skipcomma 1697 000003E4 E82C88 call uppercase 1698 %if _EXTHELP 1699 %if _COND 1700 000003E7 BA[CD30] mov dx, msg.condhelp 1701 000003EA 3C43 cmp al, 'C' 1702 000003EC 747B je .spec 1703 %endif 1704 %if _OPTIONS 1705 000003EE BA[A93C] mov dx, msg.ophelp 1706 000003F1 3C4F cmp al, 'O' 1707 000003F3 7474 je .spec ; option help --> 1708 %endif 1709 %if _EXPRESSIONS 1710 000003F5 BA[9D33] mov dx, msg.expressionhelp 1711 000003F8 3C45 cmp al, 'E' 1712 000003FA 746D je .spec 1713 %endif 1714 %endif 1715 %if _EMS 1716 000003FC BA[F75D] mov dx, msg.xhelp 1717 000003FF 3C58 cmp al, 'X' 1718 00000401 7466 je .spec 1719 %endif 1720 00000403 4E dec si 1721 %if _BOOTLDR && _EXTHELP 1722 00000404 BA[9C63] mov dx, msg.boot 1723 00000407 E885B4 call isstring? 1724 0000040A BA[1052] mov dx, msg.boothelp 1725 0000040D 745A je .spec 1726 %endif 1727 %if _EXTHELP 1728 0000040F BA[161A] mov dx, msg.source 1729 00000412 E87AB4 call isstring? 1730 00000415 BA[1D1A] mov dx, msg.help_source 1731 00000418 744F je .spec 1732 %endif 1733 0000041A BA[791B] mov dx, msg.re 1734 0000041D E86FB4 call isstring? 1735 00000420 BA[7C1B] mov dx, msg.help_re 1736 00000423 7444 je .spec 1737 00000425 BA[E520] mov dx, msg.run 1738 00000428 E864B4 call isstring? 1739 0000042B BA[E920] mov dx, msg.help_run 1740 0000042E 7439 je .spec 1741 00000430 BA[B824] mov dx, msg.string_build 1742 00000433 E859B4 call isstring? 1743 00000436 BB[AC24] mov bx, msg.build_array 1744 00000439 B90500 mov cx, msg.build_short_amount 1745 0000043C 7438 je .spec_multi 1746 0000043E AC lodsb 1747 0000043F E8D187 call uppercase 1748 00000442 B90600 mov cx, msg.build_long_amount 1749 00000445 3C42 cmp al, 'B' 1750 00000447 742D je .spec_multi ; build info --> 1751 %if _EXTHELP 1752 00000449 BA[8929] mov dx, msg.license 1753 0000044C 3C4C cmp al, 'L' 1754 0000044E 7419 je .spec ; licence --> 1755 00000450 BA[2E2E] mov dx, msg.flaghelp 1756 00000453 3C46 cmp al, 'F' 1757 00000455 7412 je .spec ; flag help --> 1758 00000457 BA[5B2C] mov dx, msg.reghelp 1759 0000045A 3C52 cmp al, 'R' 1760 0000045C 740B je .spec ; register help --> 1761 %if _VARIABLES || _OPTIONS || _PSPVARIABLES 1762 0000045E BA[654F] mov dx, msg.varhelp 1763 00000461 3C56 cmp al, 'V' 1764 00000463 7404 je .spec ; variable help --> 1765 %endif 1766 %endif 1767 00000465 BA[3211] mov dx, msg.help ; default help 1768 00000468 A8 db __TEST_IMM8 ; (skip lodsb) 1769 .spec: 1770 00000469 AC lodsb 1771 0000046A E896B4 call chkeol 1772 prnquit: 1773 0000046D E834B9 call putsz ; print string 1774 cmd3_j1a: 1775 00000470 E9FFFE jmp cmd3_j1 ; done 1776 1777 00000473 E966A0 errorj1:jmp error 1778 1779 help.spec_multi: 1780 00000476 AC lodsb 1781 00000477 E889B4 call chkeol 1782 .loop: 1783 0000047A 8B17 mov dx, word [bx] 1784 0000047C E825B9 call putsz 1785 0000047F 43 inc bx 1786 00000480 43 inc bx 1787 00000481 E2F7 loop .loop 1788 00000483 EBEB jmp short cmd3_j1a 1789 1790 1791 determine_quiet_output: 1792 00000485 8026[A500]EF clropt [internalflags3], dif3_quiet_output 1793 1794 0000048A 57 push di 1795 0000048B 50 push ax 1796 0000048C F606[A700]01 testopt [internalflags3], dif3_input_re 1797 00000491 7549 jnz .notquiet 1798 1799 %if _INPUT_FILE_BOOT 1800 00000493 F606[A300]02 testopt [internalflags2], dif2_input_file_boot 1801 00000498 7412 jz @F 1802 0000049A B8A000 mov ax, LOAD_INPUT_FILE_SIZE 1803 0000049D 52 push dx 1804 0000049E F726[B08F] mul word [load_input_file.active] 1805 000004A2 5A pop dx 1806 000004A3 89C7 mov di, ax 1807 000004A5 F685[578D]80 testopt [load_input_file + di - LOADDATA3 + ldFATType], ifhfQuietOutput 1808 000004AA EB29 jmp .quiet_if_nz 1809 1810 @@: 1811 %endif 1812 %if _INPUT_FILE_HANDLES 1813 000004AC E8F9A1 call InDos 1814 000004AF 7518 jnz @F 1815 1816 000004B1 F606[A200]10 testopt [internalflags2], dif2_input_file 1817 000004B6 7411 jz @F 1818 000004B8 8B3E[800A] mov di, word [input_file_handles.active] 1819 000004BC D1E7 shl di, 1 1820 000004BE D1E7 shl di, 1 1821 000004C0 D1E7 shl di, 1 ; to qword array index 1822 %if INPUTFILEHANDLE_size != 8 1823 %error Unexpected structure size 1824 %endif 1825 000004C2 F685[030A]80 testopt [input_file_handles + di + ifhFlags], ifhfQuietOutput 1826 000004C7 EB0C jmp .quiet_if_nz 1827 1828 @@: 1829 %endif 1830 000004C9 F606[A500]01 testopt [internalflags3], dif3_input_cmdline 1831 000004CE 740C jz @F 1832 000004D0 F606[7F00]80 testopt [options], opt_cmdline_quiet_output 1833 ; jmp .quiet_if_nz 1834 1835 .quiet_if_nz: 1836 000004D5 7405 jz @F 1837 .quiet: 1838 000004D7 800E[A500]10 setopt [internalflags3], dif3_quiet_output 1839 .notquiet: 1840 @@: 1841 000004DC 58 pop ax 1842 000004DD 5F pop di 1843 000004DE C3 retn 1844 1845 1846 guard_auxbuff: 1847 000004DF F606[A700]30 testopt [internalflags3], dif3_auxbuff_guarded_1 | dif3_auxbuff_guarded_2 1848 000004E4 7506 jnz @F 1849 000004E6 800E[A700]10 setopt [internalflags3], dif3_auxbuff_guarded_1 1850 000004EB C3 retn 1851 1852 @@: 1853 000004EC B80101 mov ax, 0101h 1854 000004EF E831A0 call setrc 1855 000004F2 BA[2166] mov dx, msg.guard_auxbuff_error 1856 .putsz_error: 1857 000004F5 E8ACB8 call putsz 1858 000004F8 E905FB jmp cmd3 1859 1860 1861 ; This is used to disallow commands 1862 ; while reading from the RE buffer. 1863 guard_re: 1864 000004FB F606[A700]01 testopt [internalflags3], dif3_input_re 1865 00000500 7501 jnz @F 1866 00000502 C3 retn 1867 1868 @@: 1869 00000503 B80201 mov ax, 0102h 1870 00000506 E81AA0 call setrc 1871 00000509 BA[4366] mov dx, msg.guard_re_error 1872 0000050C EBE7 jmp guard_auxbuff.putsz_error 1873 1874 1875 usesection lDEBUG_DATA_ENTRY 1876 1877 align 2, db 0 1878 00008116 0000 debuggerfunction: dw 0 1879 1880 %if ! _CATCHINT2D 1881 align 2, db 0 1882 debuggeramissig: 1883 .ven: fill 8,32,db "ecm" ; vendor 1884 .prod: fill 8,32,db "lDebug" ; product 1885 db 0, 0 1886 1887 try_debugger_amis_multiplex_number: 1888 db -1 1889 %else 1890 %if 0 1891 1892 Supported Int2D functions: 1893 1894 AMIS - Installation check 1895 INP: al = 00h 1896 OUT: al = 0FFh 1897 cx = Private version number (currently 0100h) 1898 dx:di-> signature: "ecm ", "lDebug " 1899 1900 AMIS - Get private entry point - NOP: no private entry point 1901 INP: al = 01h 1902 OUT: al = 00h 1903 1904 AMIS - Uninstall - NOP: can't uninstall 1905 INP: al = 02h 1906 OUT: al = 00h (not implemented) 1907 1908 AMIS - Request pop-up - NOP: no pop-up 1909 INP: al = 03h 1910 OUT: al = 00h 1911 1912 AMIS - Determine chained interrupts 1913 INP: al = 04h 1914 OUT: al = 04h 1915 dx:bx -> interrupt hook list (Int2D always.) 1916 1917 AMIS - Get hotkeys - NOP: no hotkeys 1918 INP: al = 05h 1919 OUT: al = 00h 1920 1921 AMIS - Get device driver information - NOP: no device 1922 INP: al = 06h 1923 OUT: al = 00h 1924 1925 AMIS - Reserved for AMIS 1926 INP: al = 07h..0Fh 1927 OUT: al = 00h 1928 1929 TSR - Reserved for TSR 1930 INP: al = 10h..2Fh 1931 OUT: al = 00h 1932 1933 lDebug - Update IISP Header 1934 INP: al = 30h 1935 ds:si -> source IISP header (or pseudo header) 1936 es:di -> destination IISP header 1937 OUT: al = FFh to indicate suppported, 1938 si and di both incremented by 6 1939 destination's ieNext field updated from source 1940 al != FFh if not supported, 1941 si and di unchanged 1942 CHG: - 1943 REM: This function is intended to aid in debugging 1944 handler re-ordering, removal, or insertion. 1945 The 32-bit far pointer needs to be updated 1946 as atomically as possible to avoid using 1947 an incorrect pointer. 1948 Test case: Run a program such as our TSRs' 1949 uninstaller or SHUFHOOK and step through it 1950 with "tp fffff" when operating on something 1951 crucial such as interrupt 21h. Without this 1952 function the machine will crash! 1953 To enable this function to be called, enter 1954 the command "r dco4 or= 8" first (install our 1955 AMIS multiplexer handler). 1956 Other workaround: Use SILENT for TP and disable 1957 DCO3 flag 4000_0000 (do not call int 21.0B to 1958 check for Ctrl-C status). 1959 Yet another workaround: Set flag DCO 8 (enable 1960 fake InDOS mode, avoid calling int 21h). 1961 REM: The source may be a pseudo IISP header. In this 1962 case the ieEntry field should hold 0FEEBh 1963 (jmp short $) and the ieSignature field 1964 should indicate the source, eg "VT" for the IVT 1965 or "NH" for inserting a New Handler. 1966 1967 TSR - Reserved for TSR 1968 INP: al = 31h..FFh 1969 OUT: al = 00h 1970 1971 %endif 1972 1973 align 2, db 0 1974 debuggeramissig: 1975 amissig: 1976 00008118 65636D20 .ven: fill 8,32,db "ecm" ; vendor 1977 00008120 6C446562756720- .prod: fill 8,32,db "lDebug" ; product 1977 00008120 1978 00008128 6C4465627567582028- .desc: asciz _PROGNAME,_VERSION,", debugger." 1978 00008131 323032322D30342D31- 1978 0000813A 38292C206465627567- 1978 00008143 6765722E00 1979 ; description 1980 %if $ - .desc > 64 1981 %error AMIS description too long 1982 %endif 1983 1984 try_amis_multiplex_number: 1985 00008148 00 db 0 1986 try_debugger_amis_multiplex_number: 1987 00008149 FF db -1 1988 1989 1990 0000814A CB90EB10000000004B- iispentry int2D 1990 00008153 4200EBF300 1991 0000815E 80FC00 cmp ah, 0 1992 amis_multiplex_number equ $-1 ; AMIS multiplex number (data for cmp opcode) 1993 00008161 7405 je .handle ; our multiplex number --> 1994 00008163 2EFF2E[4E81] jmp far [cs:.next] ; else go to next handler --> 1995 1996 .handle: 1997 00008168 84C0 test al, al 1998 0000816A 740B jz .installationcheck ; installation check --> 1999 ; cmp al, 02h 2000 ; je .uninstall ; uninstallation --> 2001 0000816C 3C04 cmp al, 04h 2002 0000816E 7412 je .determineinterrupts ; determine hooked interrupts --> 2003 00008170 3C30 cmp al, 30h 2004 00008172 7415 je .updateiispheader 2005 ; all other functions are reserved or not supported by TSR 2006 .uninstall: 2007 .nop: 2008 00008174 B000 mov al, 0 ; show not implemented 2009 00008176 CF iret 2010 2011 .installationcheck: 2012 00008177 FEC8 dec al ; (= FFh) show we're here 2013 00008179 B90001 mov cx, 0100h ; = version 2014 0000817C BF[1881] mov di, amissig ; dx:di -> AMIS signature strings of this program 2015 .iret_dx_cs: 2016 0000817F 8CCA mov dx, cs 2017 .iret: 2018 00008181 CF iret 2019 2020 .determineinterrupts: ; al = 04h, always returns list 2021 00008182 2E8B1E[260C] mov bx, word [cs:amisintr_offset] 2022 ; dx:bx -> hooked interrupts list 2023 00008187 EBF6 jmp short .iret_dx_cs 2024 2025 .updateiispheader: 2026 00008189 B0FF mov al, 0FFh ; show supported 2027 0000818B FC cld 2028 0000818C FA cli ; try to rest while updating chain 2029 0000818D A7 cmpsw ; skip over first word (entrypoint) 2030 ; (generally xxEBh or 0EA90h) 2031 0000818E A5 movsw 2032 0000818F A5 movsw ; transfer source ieNext to dest ieNext 2033 00008190 CF iret 2034 %endif 2035 2036 2037 ; doscall is used by symbols.asm and run.asm, so define it prior 2038 %if _PM && _NOEXTENDER 2039 %macro doscall 0 2040 call _doscall 2041 %endmacro 2042 %else 2043 ; When we don't support non-extended DPMI all Int21 calls 2044 ; are either in Real Mode or extended (all are real Int21 2045 ; instructions). 2046 %macro doscall 0 2047 int 21h 2048 %endmacro 2049 %endif 2050 2051 2052 usesection lDEBUG_CODE 2053 2054 %if _DEBUG4 || _DEBUG5 2055 %define _DEB_ASM_PREFIX 2056 %include "deb.asm" 2057 %endif 2058 2059 2060 %include "aa.asm" 2061 <1> 2062 <1> %if 0 2063 <1> 2064 <1> lDebug A command - Assembler 2065 <1> 2066 <1> Copyright (C) 1995-2003 Paul Vojta 2067 <1> Copyright (C) 2008-2012 C. Masloch 2068 <1> 2069 <1> Usage of the works is permitted provided that this 2070 <1> instrument is retained with the works, so that any entity 2071 <1> that uses the works is notified of this instrument. 2072 <1> 2073 <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 2074 <1> 2075 <1> %endif 2076 <1> 2077 <1> 2078 <1> usesection lDEBUG_DATA_ENTRY 2079 <1> 2080 00008191 00 <1> align 2, db 0 2081 00008192 0000 <1> aa13a_mnemposition: dw 0 ; -> mnemonic, to display error 2082 00008194 00 <1> aa_mnemsuffix: db 0 ; 0 = normal, 1 = 'W' suffix, 2 = 'D' suffix 2083 <1> 2084 00008195 00 <1> asm_mn_flags: db 0 ; flags for the mnemonic 2085 <1> AMF_D32 equ 1 ; 32-bit opcode/data operand 2086 <1> AMF_WAIT equ 2 2087 <1> AMF_A32 equ 4 ; address operand is 32-bit 2088 <1> AMF_SIB equ 8 ; there's a SIB in the arguments 2089 <1> AMF_MSEG equ 10h ; if a seg prefix was given before mnemonic 2090 <1> AMF_FSGS equ 20h ; if FS or GS was encountered 2091 <1> AMF_D16 equ 40h ; 16-bit opcode/data operand 2092 <1> AMF_ADDR equ 80h ; address operand is given (write address size prefix) 2093 <1> 2094 00008196 00 <1> aa_saved_prefix:db 0 ; WAIT or REP... prefix 2095 <1> ; aa_saved_prefix and aa_seg_pre must be consecutive. 2096 00008197 00 <1> aa_seg_pre: db 0 ; segment prefix 2097 <1> 2098 <1> align 2, db 0 2099 00008198 0000 <1> mneminfo: dw 0 ; address associated with the mnemonic 2100 <1> 2101 <1> ; The following 7 words (including alloweddist) must all be consecutive. 2102 0000819A 0000 <1> rmaddr: dw 0 ; address of operand giving the R/M byte 2103 <1> ; regmem and sibbyte must be consecutive 2104 0000819C 00 <1> regmem: db 0 ; mod reg r/m part of instruction 2105 0000819D 00 <1> sibbyte: db 0 ; SIB byte 2106 0000819E 0000 <1> immaddr: dw 0 ; address of operand giving the immed stf 2107 000081A0 0000 <1> xxaddr: dw 0 ; address of additional stuff 2108 <1> ; dismach and dmflags must be consecutive 2109 000081A2 00 <1> dismach: db 0 ; type of processor needed 2110 000081A3 00 <1> dmflags: db 0 ; flags for extra processor features 2111 <1> 2112 <1> DM_COPR equ 1 ; math coprocessor 2113 <1> DM_MMX equ 2 ; MMX extensions 2114 <1> 2115 000081A4 00 <1> opcode_or: db 0 ; extra bits in the op code 2116 000081A5 00 <1> opsize: db 0 ; size of this operation (2 or 4) 2117 000081A6 00 <1> varflags: db 0 ; flags for this variant 2118 <1> 2119 <1> VAR_LOCKABLE equ 1 ; variant is lockable 2120 <1> VAR_MODRM equ 2 ; if there's a MOD R/M here 2121 <1> VAR_SIZ_GIVN equ 4 ; if a size was given 2122 <1> VAR_SIZ_FORCD equ 8 ; if only one size is permitted 2123 <1> VAR_SIZ_NEED equ 10h ; if we need the size 2124 <1> VAR_D16 equ 20h ; if operand size is WORD 2125 <1> VAR_D32 equ 40h ; if operand size is DWORD 2126 000081A7 00 <1> alloweddist: db 0 2127 <1> 2128 000081A8 00 <1> a_reqsize: db 0 ; size that this arg should be 2129 000081A9 00 <1> align 2, db 0 2130 000081AA 0000 <1> a_opcode: dw 0 ; op code info for this variant 2131 <1> 2132 <1> align 2, db 0 2133 000081AC 0000 <1> a_opcode2: dw 0 ; copy of a_opcode for obs-instruction 2134 000081AE E0DBE1DBE4DB240126- <1> a_obstab: dw 0DBE0h,0DBE1h,0DBE4h,124h,126h ; obs. instruction codes 2134 000081B7 01 <1> 2135 000081B8 0101020404 <1> obsmach: db 1,1,2,4,4 ; max permissible machine for the above 2136 <1> ; This is used to search for obsolete instructions: 2137 <1> ; DBE0h: feni 2138 <1> ; DBE1h: fdisi 2139 <1> ; DBE4h: fsetpm 2140 <1> ; 124h: mov trX, reg 2141 <1> ; 126h: mov reg, trX 2142 <1> 2143 000081BD 00040201 <1> aadbsiz: db 0,4,2,1 ; table for max size of db operand 2144 000081C1 00 <1> align 2, db 0 2145 000081C2 0000[EB07][ED07]- <1> aadbsto: dw 0,aa28,aa29,aa30 ; table for routine to store a number 2145 000081C8 [EF07] <1> 2146 <1> 2147 <1> align 2, db 0 ; (modrmtab really is an array of words) 2148 000081CA 0B000D00 <1> modrmtab: db REG_BX,0,REG_BP,0 ; [bx], [bp] 2149 000081CE 0F000E00 <1> db REG_DI,0,REG_SI,0 ; [di], [si] 2150 000081D2 0F0D0E0D <1> db REG_DI,REG_BP,REG_SI,REG_BP ; [bp+di],[bp+si] 2151 000081D6 0F0B0E0B <1> db REG_DI,REG_BX,REG_SI,REG_BX ; [bx+di],[bx+si] 2152 <1> 2153 000081DA 610D <1> aam_args: db 'a',13 2154 <1> 2155 <1> ; Equates for parsed arguments, stored in OPRND.flags 2156 <1> ARG_DEREF equ 1 ; non-immediate memory reference 2157 <1> ARG_MODRM equ 2 ; if we've computed the MOD R/M byte 2158 <1> ARG_JUSTREG equ 4 ; a solo register 2159 <1> ARG_WEIRDREG equ 8 ; if it's a segment register or CR, etc. 2160 <1> ARG_IMMED equ 10h ; if it's just a number 2161 <1> ARG_FARADDR equ 20h ; if it's of the form xxxx:yyyyyyyy 2162 <1> ARG_ECX_SPECIAL equ 80h ; have to overflow loop displacement 2163 <1> 2164 <1> ; For each operand type in the following table, the value 2165 <1> ; is the bits at least one of which must be present. 2166 <1> ; For each entry in bittab, there's an entry in asmjmp. 2167 <1> ; Entries are defined in the debug.asm opsizeditem list. 2168 <1> bittab: 2169 000081DC 1005010401040404 <1> db BITTAB_OPSIZEDITEMS 2170 000081E4 00 <1> times 16 - ($ - bittab) db 0 ; unused OP_SIZE combined types 2171 <1> 2172 <1> ; OP_END does not have a table entry. Subsequent 2173 <1> ; entries are defined in the debug.asm opitem list. 2174 000081EC 010101010120101008- <1> db BITTAB_OPITEMS 2174 000081F5 080808080810101010- <1> 2174 000081FE 0808FFFFFFFFFFFFFF- <1> 2174 00008207 FFFFFFFFFFFF041010- <1> 2174 00008210 040408080808080808 <1> 2175 <1> %if ($ - bittab) != OP_AMOUNT_TABLE 2176 <1> %error bittab has wrong size 2177 <1> %endif 2178 <1> 2179 <1> ; Jump table for operand types. 2180 <1> ; Entries are defined in the debug.asm opsizeditem list. 2181 00008219 00 <1> align 2, db 0 2182 <1> asmjmp: 2183 0000821A [FE0D][E00D][E00D]- <1> dw ASMJMP_OPSIZEDITEMS 2183 00008220 [E00D][040E][E50D]- <1> 2183 00008226 [F40D][0F0E] <1> 2184 0000822A [3911] <1> times 16 - (($ - asmjmp) / 2) dw ao50 ; unused size-combined types (reject) 2185 <1> 2186 <1> ; OP_END does not have a table entry. Subsequent 2187 <1> ; entries are defined in the debug.asm opitem list. 2188 0000823A [A90E][A90E][A90E]- <1> dw ASMJMP_OPITEMS 2188 00008240 [A90E][A90E][B30E]- <1> 2188 00008246 [F70E][6F0F][DD0F]- <1> 2188 0000824C [E10F][F60F][1210]- <1> 2188 00008252 [1610][4010][5710]- <1> 2188 00008258 [5C10][6510][6510]- <1> 2188 0000825E [E80F][EC0F][CD10]- <1> 2188 00008264 [0511][0D11][1711]- <1> 2188 0000826A [1111][0111][0111]- <1> 2188 00008270 [0111][0111][0111]- <1> 2188 00008276 [260C][260C][260C]- <1> 2188 0000827C [8910][1B11][2211]- <1> 2188 00008282 [2F11][2F11][2F11]- <1> 2188 00008288 [2F11][2F11][2F11]- <1> 2188 0000828E [2F11][2F11][2F11] <1> 2189 <1> %if ($ - asmjmp) / 2 != OP_AMOUNT_TABLE 2190 <1> %error asmjmp has wrong size 2191 <1> %endif 2192 <1> 2193 <1> ; special ops DX, CL, ST, CS, DS, ES, FS, GS, SS 2194 <1> ; entry required if ao48 is used in the opitem list 2195 <1> ; order has to match opitem order 2196 <1> ; refer to aagetreg comment for the number assignments 2197 00008294 0A011E <1> asm_regnum: db REG_DX, REG_CL, REG_ST 2198 00008297 191B181C1D1A <1> db REG_CS, REG_DS, REG_ES, REG_FS, REG_GS, REG_SS 2199 <1> 2200 <1> ; sizes for OP_M64, OP_MFLOAT, OP_MDOUBLE, OP_M80, OP_MXX 2201 <1> ; entry required if ao17 is used in the opitem list 2202 <1> ; order has to match opitem order 2203 0000829D 05060708 <1> asm_siznum: db SIZ_QWORD, SIZ_FLOAT, SIZ_DOUBLE, SIZ_TBYTE 2204 000082A1 FF <1> db -1 ; none 2205 <1> 2206 <1> ; size qualifier 2207 <1> ; 1 BY = BYTE 2208 <1> ; 2 WO = WORD 2209 <1> ; 3 unused 2210 <1> ; 4 DW = DWORD 2211 <1> ; 5 QW = QWORD 2212 <1> ; 6 FL = FLOAT (REAL4) 2213 <1> ; 7 DO = DOUBLE (REAL8) 2214 <1> ; 8 TB = TBYTE (REAL10) 2215 <1> 2216 <1> SIZ_NONE equ 0 2217 <1> SIZ_BYTE equ 1 2218 <1> SIZ_WORD equ 2 2219 <1> SIZ_DWORD equ 4 2220 <1> SIZ_QWORD equ 5 2221 <1> SIZ_FLOAT equ 6 2222 <1> SIZ_DOUBLE equ 7 2223 <1> SIZ_TBYTE equ 8 2224 <1> 2225 <1> align 2, db 0 2226 000082A2 4259574F574F445751- <1> sizetcnam: db "BY","WO","WO","DW","QW","FL","DO","TB" 2226 000082AB 57464C444F5442 <1> 2227 <1> endarea sizetcnam 2228 <1> 2229 <1> align 2, db 0 2230 000082B2 53484E454641 <1> distnam: db "SH","NE","FA" 2231 <1> endarea distnam 2232 <1> 2233 <1> 2234 <1> usesection lDEBUG_CODE 2235 <1> 2236 <1> %if 0 2237 <1> ; write byte in al to bx:(e)dx, then increment (e)dx 2238 <1> writeasm: 2239 <1> call writemem 2240 <1> _386_PM_o32 ; inc edx 2241 <1> inc dx 2242 <1> retn 2243 <1> 2244 <1> ; write cx bytes from ds:si to bx:(e)dx 2245 <1> writeasmn: 2246 <1> jcxz .nowrite 2247 <1> .loop: 2248 <1> lodsb 2249 <1> call writeasm 2250 <1> loop .loop 2251 <1> .nowrite: 2252 <1> retn 2253 <1> %endif 2254 <1> 2255 <1> 2256 <1> aa_cmd3_check: 2257 0000050E AC <1> lodsb 2258 0000050F E8F1B3 <1> call chkeol 2259 <1> aa_cmd3: 2260 00000512 E9EBFA <1> jmp cmd3 ; exit assembler mode --> 2261 <1> 2262 <1> 2263 <1> aa: 2264 00000515 E8E3FF <1> call guard_re 2265 00000518 8B1E[900C] <1> mov bx, word [ reg_cs ] ; default segment to use 2266 <1> aa00a: 2267 0000051C E8CFB3 <1> call iseol? 2268 0000051F 741E <1> je aa01 ; if end of line --> 2269 00000521 E8EBA3 <1> call getaddr ; get address into bx:(e)dx 2270 00000524 E8DCB3 <1> call chkeol ; expect end of line here 2271 00000527 66 <1> _386_PM_o32 ; mov dword [ a_addr ], edx 2272 00000528 8916[000B] <1> mov word [ a_addr ], dx ; save the address 2273 0000052C 891E[040B] <1> mov word [a_addr + saSegSel], bx 2274 <1> %if _PM 2275 00000530 E89A8C <1> call ispm 2276 00000533 7506 <1> jnz .86m 2277 <1> .pm: 2278 00000535 891E[080B] <1> mov word [a_addr + saSelector], bx 2279 00000539 EB04 <1> jmp @F 2280 <1> .86m: 2281 0000053B 891E[060B] <1> mov word [a_addr + saSegment], bx 2282 <1> @@: 2283 <1> %endif 2284 <1> 2285 <1> ; Begin loop over input lines. 2286 <1> aa01: 2287 0000053F C706[9A0A][3F05] <1> mov word [ errret ], aa01 2288 00000545 8B26[940A] <1> mov sp, word [ savesp ] ; restore the stack (this implies no "retn") 2289 00000549 BF[0E08] <1> mov di, line_out 2290 0000054C A1[040B] <1> mov ax, word [a_addr + saSegSel] 2291 <1> %if _PM 2292 0000054F 89C3 <1> mov bx, ax 2293 <1> %endif 2294 00000551 E89AB4 <1> call hexword 2295 00000554 B03A <1> mov al, ':' 2296 00000556 AA <1> stosb 2297 00000557 C606[9581]00 <1> mov byte [ asm_mn_flags ], 0 2298 <1> %if _PM 2299 0000055C C606[DB88]00 <1> mov byte [ bCSAttr ], 0 2300 00000561 E8D257 <1> call test_d_b_bit 2301 00000564 740B <1> jz .16 2302 00000566 C606[DB88]40 <1> mov byte [ bCSAttr ], 40h ; set 32-bit attrib for later checks here 2303 0000056B A1[020B] <1> mov ax, word [ a_addr+2 ] 2304 0000056E E87DB4 <1> call hexword 2305 <1> .16: 2306 <1> %endif 2307 00000571 A1[000B] <1> mov ax, word [ a_addr+0 ] 2308 00000574 E877B4 <1> call hexword 2309 00000577 B020 <1> mov al, 32 2310 00000579 AA <1> stosb 2311 0000057A E8DCBB <1> call getline00 2312 0000057D 3C2E <1> cmp al, '.' 2313 0000057F 748D <1> je aa_cmd3_check 2314 00000581 3C3B <1> cmp al, ';' 2315 00000583 74BA <1> je aa01 ; if comment 2316 00000585 E86AB3 <1> call iseol?.notsemicolon 2317 00000588 7488 <1> je aa_cmd3 ; if done, return to command line --> 2318 0000058A C706[9681]0000 <1> mov word [ aa_saved_prefix ], 0 ; clear aa_saved_prefix and aa_seg_pre 2319 <1> 2320 <1> ; Get mnemonic and look it up. 2321 <1> ; (At this point, it has been determined that it is not empty.) 2322 <1> ; 2323 <1> ; INP: al = first character 2324 <1> ; si-> remaining string (al isn't EOL) 2325 <1> aa02: 2326 00000590 BF[0E08] <1> mov di, line_out ; -> buffer 2327 00000593 31C9 <1> xor cx, cx ; = 0 2328 00000595 8936[9281] <1> mov [ aa13a_mnemposition ], si 2329 <1> 2330 00000599 A9 <1> db __TEST_IMM16 ; skip stosb,lodsb initially 2331 <1> @@: 2332 0000059A AA <1> stosb 2333 0000059B AC <1> lodsb 2334 0000059C 41 <1> inc cx ; count length 2335 0000059D E87386 <1> call uppercase 2336 000005A0 E84BB3 <1> call iseol? ; end of mnemonic ? 2337 000005A3 740C <1> je @F 2338 000005A5 3C3A <1> cmp al, ':' 2339 000005A7 7408 <1> je @F ; (for prefixes, else will be an error later) 2340 000005A9 3C20 <1> cmp al, 32 2341 000005AB 7404 <1> je @F 2342 000005AD 3C09 <1> cmp al, 9 2343 000005AF 75E9 <1> jne @B ; not yet --> 2344 <1> @@: 2345 <1> 2346 000005B1 49 <1> dec cx ; = length of input 2347 000005B2 E88FB3 <1> call skipwh0 ; skip to next field 2348 000005B5 4E <1> dec si 2349 <1> 2350 000005B6 8A45FF <1> mov al, [di-1] ; get last stored character 2351 000005B9 3C57 <1> cmp al, 'W' ; possible suffix? 2352 000005BB 7406 <1> je @F 2353 000005BD 3C44 <1> cmp al, 'D' 2354 000005BF 7402 <1> je @F ; yes --> 2355 000005C1 30C0 <1> xor al, al 2356 <1> @@: 2357 000005C3 A2[9481] <1> mov [aa_mnemsuffix], al ; store 'D', 'W', or 0 2358 <1> 2359 000005C6 56 <1> push si ; save position in input line 2360 <1> 2361 000005C7 BE[9A01] <1> mov si, mnlist ; -> first area: no or optional suffix 2362 000005CA BA[270C] <1> mov dx, mnlist_o_suffix_required; -> end of first area 2363 <1> 2364 <1> ; [line_out] = name to search 2365 <1> ; cx = length of name to search 2366 <1> ; si-> next mnlist entry 2367 <1> ; dx-> behind last mnlist entry of this area 2368 <1> ; w[ss:sp]-> next field in input line (operand or EOL) 2369 <1> aa_mnemlistloop: 2370 000005CD AD <1> lodsw ; load combined word, si-> name 2371 000005CE 83E00F <1> and ax, 0Fh ; separate mnemonic length 2372 000005D1 39C8 <1> cmp ax, cx ; length matches ? 2373 000005D3 741D <1> je .length_match ; yes, check name --> 2374 <1> .cmps_mismatch: 2375 000005D5 01C6 <1> add si, ax ; -> behind entry 2376 000005D7 39D6 <1> cmp si, dx ; at end of this list area ? 2377 000005D9 72F2 <1> jb aa_mnemlistloop ; not yet, check next entry --> 2378 <1> 2379 000005DB 81FA[270C] <1> cmp dx, mnlist_o_suffix_required; was first or second area ? 2380 000005DF 750D <1> jne .mnem_invalid ; second, not found --> 2381 <1> 2382 000005E1 BE[8E0B] <1> mov si, mnlist_a_suffix_allowed ; -> second area: optional or required suffix 2383 000005E4 BA[500C] <1> mov dx, end_mnlist ; -> end of second area 2384 <1> 2385 000005E7 49 <1> dec cx ; prepare for second look-up 2386 000005E8 3826[9481] <1> cmp [aa_mnemsuffix], ah ; is there a valid suffix ? (ah still 0) 2387 000005EC 75DF <1> jne aa_mnemlistloop ; yes, check for suffixed instruction --> 2388 <1> 2389 <1> .mnem_invalid: 2390 000005EE 58 <1> pop ax ; (discard) 2391 000005EF E96901 <1> jmp aa13a ; complain --> 2392 <1> 2393 <1> .length_match: ; found a name of correct length 2394 000005F2 BF[0E08] <1> mov di, line_out ; -> all-capitals input 2395 000005F5 89F3 <1> mov bx, si ; -> name 2396 000005F7 F3A6 <1> repe cmpsb ; compare names 2397 000005F9 89DE <1> mov si, bx 2398 000005FB 89C1 <1> mov cx, ax ; restore length 2399 000005FD 75D6 <1> jne .cmps_mismatch ; not this, continue --> 2400 <1> 2401 <1> ; We found the mnemonic. 2402 <1> ; (bx=si)-> entry's mnemonic 2403 <1> ; dx-> behind last mnlist entry of this area 2404 <1> ; w[ss:sp]-> next field in input line (operand or EOL) 2405 000005FF 89F0 <1> mov ax, si ; -> mnemonic's name 2406 <1> 2407 00000601 81FA[500C] <1> cmp dx, end_mnlist ; was first or second area ? 2408 00000605 740B <1> je .handlesuffix ; second, there's a suffix to handle --> 2409 <1> 2410 00000607 3D[8E0B] <1> cmp ax, mnlist_a_suffix_allowed ; optional suffix that was not specified? 2411 0000060A 7234 <1> jb aa_mnemonic_found ; no, done with the suffixes already --> 2412 <1> 2413 <1> %if _PM 2414 0000060C 8A16[DB88] <1> mov dl, byte [ bCSAttr ] ; dl = whether a 32-bit CS 2415 <1> %else 2416 <1> xor dl, dl ; 86 Mode is always 16-bit 2417 <1> %endif 2418 00000610 EB09 <1> jmp sho .suffix_decide 2419 <1> 2420 <1> .handlesuffix: 2421 <1> 2422 00000612 8A16[9481] <1> mov dl, byte [ aa_mnemsuffix ] ; dl = 'W' or 'D'. 'W' is odd, 'D' is even 2423 00000616 F6D2 <1> not dl ; make 'W' an even value, 'D' an odd one 2424 00000618 80E201 <1> and dl, 1 ; 'W' results in 0, 'D' in 1 2425 <1> 2426 <1> .suffix_decide: 2427 0000061B 3D[B20B] <1> cmp ax, mnlist_o_suffix_allowed ; address size suffix ? 2428 0000061E 7212 <1> jb .a_suffix ; yes --> 2429 <1> 2430 <1> ; Operand size suffix. 2431 00000620 84D2 <1> test dl, dl ; which ? 2432 00000622 7407 <1> jz .o_suffix_w 2433 00000624 800E[9581]01 <1> or byte [asm_mn_flags], AMF_D32 ; o32 2434 00000629 EB15 <1> jmp sho aa_mnemonic_found 2435 <1> 2436 <1> .o_suffix_w: 2437 0000062B 800E[9581]40 <1> or byte [asm_mn_flags], AMF_D16 ; o16 2438 00000630 EB0E <1> jmp sho aa_mnemonic_found 2439 <1> 2440 <1> ; Address size suffix. 2441 <1> .a_suffix: 2442 00000632 84D2 <1> test dl, dl ; which ? 2443 00000634 7405 <1> jz .a_suffix_w 2444 00000636 800E[9581]84 <1> or byte [asm_mn_flags], AMF_ADDR|AMF_A32; a32 2445 <1> .a_suffix_w: 2446 0000063B 800E[9581]80 <1> or byte [asm_mn_flags], AMF_ADDR ; a16 (AMF_A32 still clear) 2447 <1> 2448 <1> aa_mnemonic_found: 2449 00000640 B104 <1> mov cl, 4 2450 00000642 8B74FE <1> mov si, [si-2] ; get the combined word 2451 00000645 D3EE <1> shr si, cl ; extract offset into asmtab 2452 00000647 81C6[0000] <1> add si, asmtab ; -> asmtab sequence 2453 <1> 2454 <1> ; bx-> name of matching mnlist entry 2455 <1> ; If this mnemonic is suffixable/suffixed, 2456 <1> ; AMF_D32,AMF_D16,AMF_ADDR,AMF_A32 show suffix status 2457 <1> ; si-> associated asmtab sequence 2458 <1> ; w[ss:sp]-> next field in input line (operand or EOL) 2459 <1> 2460 <1> %if 0 2461 <1> 2462 <1> Now si points to the spot in asmtab corresponding to this mnemonic. 2463 <1> The format of the assembler table is as follows. 2464 <1> First, there is optionally one of the following bytes: 2465 <1> 2466 <1> ASM_SPECIAL This is a special mnemonic (directive or AAx). 2467 <1> ASM_WAIT The instruction is prefixed by a WAIT. 2468 <1> ASM_D32 This is a 32-bit instruction variant. 2469 <1> ASM_D16 This is a 16-bit instruction variant. 2470 <1> 2471 <1> Then, except for non-AAx ASM_SPECIAL, this is followed by one or 2472 <1> more of the following sequences, indicating an instruction variant. 2473 <1> 2474 <1> ASM_LOCKABLE Indicates that this instruction can follow a LOCK prefix. 2475 <1> ASM_MACHx Indicates the CPU this instruction requires, 1..6 (186..686). 2476 <1> ASM_ESCAPE Escapes a large following word. The assembler table contains 2477 <1> as many escapes as necessary; each escape means to add the 2478 <1> value of ASM_ESCAPE to the following high byte of the info 2479 <1> word. This will easily overflow the word, so a dword is 2480 <1> required to process the info word. ASM_ESCAPE currently 2481 <1> needs to be equal to ASM_FIRST (ie. the lowest assembler 2482 <1> table prefix byte) because otherwise some values would have 2483 <1> no valid encoding. _ASM_ESCAPE_USED is a preprocessor 2484 <1> variable which will be 0 in case there are no ASM_ESCAPE 2485 <1> bytes to be found in the table. 2486 <1> [word] This is a 16-bit integer, most significant byte first, giving 2487 <1> ASMMOD * a + b, where b is an index into the array opindex 2488 <1> (indicating the operand list), and a is as follows (hex): 2489 <1> 0..FF The (one-byte) instruction. 2490 <1> 100..1FF The lower 8 bits give the second byte of 2491 <1> a two-byte instruction beginning with 0Fh. 2492 <1> 200..23F Bits 2-0 say which floating point instruction 2493 <1> this is (D8h-DFh), and 5-3 give the /r field. 2494 <1> 240..1247 (a-240h)/8 is the index in the array agroups 2495 <1> (which gives the real value of a), and the 2496 <1> low-order 3 bits gives the /r field. 2497 <1> [byte] This gives the second byte of a floating point 2498 <1> instruction if 0D8h <= a <= 0DFh. 2499 <1> 2500 <1> Following these is an ASM_END byte. (ASM_SPECIAL has the same value as 2501 <1> ASM_END, but the context allows to decide which one is meant.) 2502 <1> 2503 <1> Exceptions: 2504 <1> ASM_SPECIAL are not followed by this opcode information (except AAx). 2505 <1> ASM_SPECIAL segment, LOCK and REP prefixes are followed by the literal 2506 <1> prefix byte. 2507 <1> ASM_SPECIAL for all mnemonics except AAx and the prefixes are not 2508 <1> followed by anything at all. 2509 <1> 2510 <1> The ASM_ symbols are defined where debugtbl.inc is included in debug.asm. 2511 <1> 2512 <1> %endif 2513 <1> 2514 <1> ; To do: BITS, USE16, USE32, USEAUTO, CPU 2515 0000064B AC <1> lodsb ; get a possible prefix 2516 <1> .checkprefix: 2517 <1> %if 1 2518 0000064C 3CFF <1> cmp al, ASM_SPECIAL ; a special mnemonic ? 2519 0000064E 7403E99900 <1> jne .notspecial ; no --> 2520 <1> 2521 <1> ; Dispatch based on mnemonic. 2522 00000653 31C0 <1> xor ax, ax 2523 00000655 81FB[AB01] <1> cmp bx, mnlist+MN_O16 2524 00000659 7503E9A500 <1> je aa_sizeprefix ; o16 (ax = 0) --> 2525 0000065E 40 <1> inc ax 2526 0000065F 81FB[A101] <1> cmp bx, mnlist+MN_A16 2527 00000663 7503E99B00 <1> je aa_sizeprefix ; a16 (ax = 1) --> 2528 00000668 B402 <1> mov ah, 2 2529 0000066A 81FB[9C01] <1> cmp bx, mnlist+MN_A32 2530 0000066E 7503E99000 <1> je aa_sizeprefix ; a32 (ax = 201h) --> 2531 00000673 48 <1> dec ax 2532 00000674 81FB[A601] <1> cmp bx, mnlist+MN_O32 2533 00000678 7503E98600 <1> je aa_sizeprefix ; o32 (ax = 200h) --> 2534 0000067D 81FB[9307] <1> cmp bx, mnlist+MN_LOCK 2535 00000681 7503E9CC00 <1> je aa18 ; lock --> 2536 00000686 81FB[B709] <1> cmp bx, mnlist+MN_REP 2537 0000068A 7209 <1> jb .notreplock 2538 0000068C 81FB[CF09] <1> cmp bx, mnlist+MN_REPNE 2539 00000690 7703E9BD00 <1> jbe aa18 ; rep, repe, repne --> 2540 <1> .notreplock: 2541 00000695 81FB[F009] <1> cmp bx, mnlist+MN_ES 2542 00000699 7209 <1> jb .notseg 2543 0000069B 81FB[040A] <1> cmp bx, mnlist+MN_GS 2544 0000069F 7703E9A300 <1> jbe aa17 ; single segment prefix --> 2545 <1> .notseg: 2546 000006A4 81FB[BC01] <1> cmp bx, mnlist+MN_AAD 2547 000006A8 7503E94401 <1> je aa_aax ; aad --> 2548 000006AD 81FB[C101] <1> cmp bx, mnlist+MN_AAM 2549 000006B1 7503E93B01 <1> je aa_aax ; aam --> 2550 000006B6 833E[9681]00 <1> cmp word [ aa_saved_prefix ], byte 0 2551 000006BB 7403E99B00 <1> jne aa13a ; if there was a prefix or a segment, error --> 2552 000006C0 5E <1> pop si ; get position in input line 2553 <1> ;cmp bx, mnlist+MN_SEG 2554 <1> ;je aa_seg ; SEG mnemonic, process --> 2555 000006C1 81FB[7909] <1> cmp bx, mnlist+MN_ORG 2556 000006C5 7503E99800 <1> je aa_org 2557 000006CA B80100 <1> mov ax, 1 2558 000006CD 81FB[5F03] <1> cmp bx, mnlist+MN_DD 2559 000006D1 7503E99400 <1> je aa20m ; dd (ax = 1) --> 2560 000006D6 40 <1> inc ax 2561 000006D7 81FB[6D03] <1> cmp bx, mnlist+MN_DW 2562 000006DB 7503E98A00 <1> je aa20m ; dw (ax = 2) --> 2563 000006E0 40 <1> inc ax 2564 000006E1 81FB[5B03] <1> cmp bx, mnlist+MN_DB 2565 000006E5 7503E98000 <1> je aa20m ; db (ax = 3) --> 2566 000006EA EB6F <1> jmp short aa13a ; unhandled special mnemonic --> 2567 <1> 2568 <1> .notspecial: 2569 000006EC 2CFC <1> sub al, ASM_D16 ; mnemonic has a prefix ? 2570 000006EE 7207 <1> jb .normal ; no --> 2571 000006F0 7409 <1> je .d16 ; it is a 16-bit mnemonic form --> 2572 <1> %else 2573 <1> cmp al, ASM_O16PREF 2574 <1> jb .normal ; no special mnemonic --> 2575 <1> cmp al, ASM_A32PREF 2576 <1> jbe aa_sizeprefix ; 386 address/operand size prefix --> 2577 <1> 2578 <1> sub al, ASM_LOCKREP ; check for mnemonic flag byte, 2579 <1> ; and convert it to 0..9 if one 2580 <1> jb .normal ; if none --> 2581 <1> je aa18 ; if LOCK/REP --> 2582 <1> cbw 2583 <1> dec ax 2584 <1> jz aa17 ; if segment prefix (ASM_SEG) --> 2585 <1> dec ax 2586 <1> jz aa_aax ; if aad or aam (ASM_AAX) --> 2587 <1> dec ax 2588 <1> jz .d16 ; if ASM_D16 --> 2589 <1> cmp al, 3 2590 <1> jae aa20 ; if ASM_ORG or ASM_DD or ASM_DW or ASM_DB --> 2591 <1> %endif 2592 000006F2 0806[9581] <1> or [ asm_mn_flags ], al ; save AMF_D32 or AMF_WAIT (1 or 2) 2593 000006F6 A8 <1> db __TEST_IMM8 ; (skip dec) 2594 <1> .normal: 2595 000006F7 4E <1> dec si ; -> first byte of mnemonic info 2596 <1> .ab01: 2597 000006F8 E90601 <1> jmp ab01 ; now process the arguments 2598 <1> .d16: 2599 000006FB 800E[9581]40 <1> or byte [ asm_mn_flags ], AMF_D16 2600 00000700 46 <1> inc si ; skip the ASM_D32 byte 2601 00000701 EBF5 <1> jmp short .ab01 ; now process the arguments 2602 <1> 2603 <1> aa_sizeprefix: 2604 <1> %if 0 2605 <1> sub al, ASM_O16PREF ; 0 = o16, 1 = a16, 2 = o32, 3 = a32 2606 <1> mov ah, al 2607 <1> and ax, (2<<8)|1 ; ah = 2 if 32-bit prefix, al = 1 if ASIZE 2608 <1> %endif 2609 <1> %if _PM 2610 00000703 0A26[DB88] <1> or ah, byte [ bCSAttr ] 2611 00000707 740E <1> jz .nobyte ; 16-bit CS and 16-bit prefix, no output --> 2612 00000709 80FC42 <1> cmp ah, 40h| 2 2613 0000070C 7409 <1> je .nobyte ; 32-bit CS and 32-bit prefix, no output --> 2614 <1> %else 2615 <1> test ah, ah 2616 <1> jz .nobyte ; 16-bit CS and 16-bit prefix --> 2617 <1> %endif 2618 <1> 2619 <1> ; CS differs from the prefix's type. 2620 <1> ; Output a prefix byte. 2621 0000070E 0466 <1> add al, 66h ; 66h if OSIZE, 67h if ASIZE 2622 00000710 BF[0E08] <1> mov di, line_out 2623 00000713 AA <1> stosb 2624 00000714 E8B100 <1> call aa_copymem 2625 <1> .nobyte: 2626 <1> aa_handleprefixes: 2627 00000717 5E <1> pop si 2628 00000718 AC <1> lodsb ; get character 2629 00000719 3C3A <1> cmp al, ':' 2630 0000071B 7503 <1> jne .nocolon 2631 0000071D E823B2 <1> call skipwhite ; skip a colon 2632 <1> .nocolon: 2633 00000720 E8CBB1 <1> call iseol? ; end of line? 2634 00000723 7403E968FE <1> jne aa02 ; no, process instruction --> 2635 <1> 2636 <1> ; No instruction follows. 2637 <1> ; Write out saved LOCK/REP and/or segment prefix. 2638 00000728 A0[9781] <1> mov al, byte [ aa_seg_pre ] 2639 0000072B 84C0 <1> test al, al 2640 0000072D 7407 <1> jz .noseg 2641 0000072F BF[0E08] <1> mov di, line_out 2642 00000732 AA <1> stosb 2643 00000733 E89200 <1> call aa_copymem 2644 <1> .noseg: 2645 00000736 A0[9681] <1> mov al, byte [ aa_saved_prefix ] 2646 00000739 84C0 <1> test al, al 2647 0000073B 7407 <1> jz .noreplock 2648 0000073D BF[0E08] <1> mov di, line_out 2649 00000740 AA <1> stosb 2650 00000741 E88400 <1> call aa_copymem 2651 <1> .noreplock: 2652 <1> aa01_j1: 2653 00000744 E9F8FD <1> jmp aa01 ; return to prompt 2654 <1> 2655 <1> %if 0 2656 <1> ; SEG directive (segment prefix follows) 2657 <1> aa_seg: 2658 <1> call skipwhite 2659 <1> mov ah, byte [si] 2660 <1> and ax, ~2020h 2661 <1> mov di, segrgnam 2662 <1> mov cx, 6 2663 <1> repne scasw 2664 <1> jne aa24 ; if not found 2665 <1> push si ; save si in case there's no colon 2666 <1> inc si ; skip "?s" 2667 <1> call skipwhite 2668 <1> pop si 2669 <1> call chkeol 2670 <1> mov bx, prefixlist + 5 2671 <1> sub bx, cx 2672 <1> mov al, byte [ bx ] ; look up the prefix byte 2673 <1> mov di, line_out 2674 <1> stosb 2675 <1> call aa_copymem 2676 <1> jmp short aa01_j1 2677 <1> %endif 2678 <1> 2679 <1> ; segment prefix 2680 <1> aa17: 2681 00000747 AC <1> lodsb ; get prefix value 2682 00000748 A2[9781] <1> mov byte [ aa_seg_pre ], al 2683 0000074B 800E[9581]10 <1> or byte [ asm_mn_flags ], AMF_MSEG 2684 00000750 EBC5 <1> jmp short aa_handleprefixes 2685 <1> 2686 <1> ; LOCK or REP prefix 2687 <1> aa18: 2688 00000752 AC <1> lodsb ; get prefix value 2689 00000753 8606[9681] <1> xchg al, byte [ aa_saved_prefix ] 2690 00000757 84C0 <1> test al, al 2691 00000759 74BC <1> jz aa_handleprefixes 2692 <1> ; if there already was a saved prefix: 2693 <1> aa13a: 2694 0000075B 8B36[9281] <1> mov si, [ aa13a_mnemposition ] 2695 0000075F E97A9D <1> jmp error 2696 <1> 2697 <1> %if 0 2698 <1> ; Pseudo ops (org or db/dw/dd). 2699 <1> aa20: 2700 <1> cmp word [ aa_saved_prefix ], byte 0 2701 <1> jne aa13a ; if there was a prefix or a segment, error --> 2702 <1> pop si ; get position in input line 2703 <1> sub al, 3 ; AX=0 if org, 1 if dd, 2 if dw, 3 if db. 2704 <1> jne aa20m ; if not ORG 2705 <1> %endif 2706 <1> 2707 <1> aa_org: 2708 <1> ; Process ORG pseudo op. 2709 00000762 AC <1> lodsb 2710 00000763 8B1E[040B] <1> mov bx, word [a_addr + saSegSel]; default segment 2711 00000767 E9B2FD <1> jmp aa00a ; go to top, set address if any given 2712 <1> 2713 <1> ; Data instructions (DB/DW/DD). 2714 <1> aa20m: 2715 0000076A BF[0E08] <1> mov di, line_out ; put the bytes here when we get them 2716 0000076D 93 <1> xchg ax, bx ; mov bx,ax 2717 0000076E 8A87[BD81] <1> mov al, byte [ aadbsiz+bx ] ; move maximum size 2718 00000772 A2[BD81] <1> mov byte [ aadbsiz ], al 2719 00000775 D1E3 <1> shl bx, 1 2720 00000777 8B87[C281] <1> mov ax, word [ aadbsto+bx ] ; move address of storage routine 2721 0000077B A3[C281] <1> mov word [ aadbsto ],ax 2722 0000077E E8C2B1 <1> call skipwhite 2723 00000781 E86AB1 <1> call iseol? 2724 00000784 743E <1> je aa27 ; if end of line 2725 <1> 2726 <1> aa21: 2727 00000786 3C22 <1> cmp al, '"' 2728 00000788 741B <1> je aa22 ; if string 2729 0000078A 3C27 <1> cmp al, "'" 2730 0000078C 7417 <1> je aa22 ; if string 2731 0000078E E8160A <1> call aageti ; get a numerical value into dx:bx, size into cl 2732 00000791 3A0E[BD81] <1> cmp cl, byte [ aadbsiz ] 2733 00000795 7721 <1> ja aa24 ; if overflow 2734 00000797 93 <1> xchg ax, bx 2735 00000798 FF16[C281] <1> call near [ aadbsto ] ; store the value 2736 0000079C 81FF[1609] <1> cmp di, line_out_end 2737 000007A0 7716 <1> ja aa24 ; if output line overflow 2738 000007A2 93 <1> xchg ax, bx 2739 000007A3 EB17 <1> jmp short aa26 ; done with this one 2740 <1> 2741 <1> aa22: 2742 000007A5 88C4 <1> mov ah, al 2743 <1> aa23: 2744 000007A7 AC <1> lodsb 2745 000007A8 E847B1 <1> call iseol?.notsemicolon 2746 000007AB 740B <1> je aa24 ; if end of line (closing quote missing) --> 2747 000007AD 38E0 <1> cmp al, ah 2748 000007AF 740A <1> je aa25 ; if end of string 2749 000007B1 AA <1> stosb 2750 000007B2 81FF[1609] <1> cmp di, line_out_end 2751 000007B6 76EF <1> jbe aa23 ; if output line not overflowing 2752 <1> aa24: 2753 000007B8 E9219D <1> jmp error ; error 2754 <1> aa25: 2755 000007BB AC <1> lodsb 2756 <1> aa26: 2757 000007BC E856B1 <1> call skipcomm0 2758 000007BF E82CB1 <1> call iseol? 2759 000007C2 75C2 <1> jne aa21 ; if not end of line 2760 <1> 2761 <1> ; End of line. Copy it to debuggee's memory. 2762 <1> aa27: 2763 000007C4 B8[3F05] <1> mov ax, aa01 2764 000007C7 50 <1> push ax 2765 <1> 2766 <1> ; INP: di-> behind memory to copy (starts at line_out) 2767 <1> ; [a_addr]-> destination 2768 <1> ; OUT: memory copied 2769 <1> ; a_addr offset updated 2770 <1> ; es set to ss 2771 <1> ; CHG: (e)si, (e)cx, (e)di 2772 <1> aa_copymem: 2773 000007C8 BE[0E08] <1> mov si, line_out ; ds:si-> data 2774 000007CB 89F9 <1> mov cx, di ; -> behind data 2775 000007CD 29F1 <1> sub cx, si ; = size of data 2776 000007CF 8E06[040B] <1> mov es, word [a_addr + saSegSel] 2777 000007D3 66 <1> _386_PM_o32 ; mov edi, dword [ a_addr+0 ] 2778 000007D4 8B3E[000B] <1> mov di, word [ a_addr+0 ] ; es:(e)di-> destination 2779 000007D8 660FB7C9 <1> _386_PM movzx ecx, cx 2780 000007DC 660FB7F6 <1> _386_PM movzx esi, si ; fix high words 2781 000007E0 67 <1> _386_PM_a32 2782 000007E1 F3A4 <1> rep movsb ; copy it 2783 000007E3 66 <1> _386_PM_o32 ; mov dword [ a_addr+0 ], edi 2784 000007E4 893E[000B] <1> mov word [ a_addr+0 ], di ; save new address 2785 000007E8 16 <1> push ss 2786 000007E9 07 <1> pop es 2787 000007EA C3 <1> retn 2788 <1> 2789 <1> ; Routines to store a byte/word/dword, 2790 <1> ; into a buffer in our memory. 2791 <1> aa28: 2792 000007EB AB <1> stosw ; store a dword value 2793 000007EC 92 <1> xchg ax, dx 2794 <1> aa29: 2795 000007ED AB <1> stosw ; store a word value 2796 000007EE C3 <1> retn 2797 <1> 2798 <1> aa30: 2799 000007EF AA <1> stosb ; store a byte value 2800 000007F0 C3 <1> retn 2801 <1> 2802 <1> %if _PM && 0 2803 <1> aa_use16: 2804 <1> cmp word [ aa_saved_prefix ], byte 0 2805 <1> jne aa13a 2806 <1> pop si 2807 <1> lodsb 2808 <1> call chkeol 2809 <1> mov dl, 16 2810 <1> jmp short aa_bits.parse 2811 <1> 2812 <1> aa_use32: 2813 <1> cmp word [ aa_saved_prefix ], byte 0 2814 <1> jne aa13a 2815 <1> pop si 2816 <1> lodsb 2817 <1> call chkeol 2818 <1> mov dl, 32 2819 <1> jmp short aa_bits.parse 2820 <1> 2821 <1> aa_useauto: 2822 <1> cmp word [ aa_saved_prefix ], byte 0 2823 <1> jne aa13a 2824 <1> pop si 2825 <1> lodsb 2826 <1> call chkeol 2827 <1> jmp short aa_bits.auto 2828 <1> 2829 <1> aa_bits: 2830 <1> cmp word [ aa_saved_prefix ], byte 0 2831 <1> jne aa13a ; if there was a prefix or a segment, error --> 2832 <1> pop si ; get position in input line 2833 <1> 2834 <1> ; Check whether "AUTO" requested. 2835 <1> push si 2836 <1> lodsw 2837 <1> and ax, ~2020h 2838 <1> cmp ax, "AU" 2839 <1> jne .notauto 2840 <1> lodsw 2841 <1> and ax, ~2020h 2842 <1> cmp ax, "TO" 2843 <1> jne .notauto 2844 <1> lodsb 2845 <1> call iseol? 2846 <1> jne .notauto 2847 <1> pop ax 2848 <1> .auto: 2849 <1> xor ax, ax 2850 <1> mov al, byte [ bCSAttr+1 ] 2851 <1> test al, al ; any saved ? 2852 <1> jz aa01_j1 ; no --> 2853 <1> mov word [ bCSAttr ], ax ; restore 2854 <1> jmp short aa01_j1 2855 <1> 2856 <1> .notauto: 2857 <1> pop si 2858 <1> lodsb 2859 <1> push si 2860 <1> call getbyte 2861 <1> call chkeol 2862 <1> pop si 2863 <1> .parse: 2864 <1> mov ax, word [ bCSAttr ] 2865 <1> or al, 1 2866 <1> cmp dl, 16 2867 <1> je .16 2868 <1> cmp dl, 16h 2869 <1> je .16 2870 <1> cmp dl, 32 2871 <1> je .32 2872 <1> cmp dl, 32h 2873 <1> jne aa24 2874 <1> .32: 2875 <1> _no386 jmp aa24 2876 <1> test ah, ah 2877 <1> mov ah, al 2878 <1> mov al, 40h 2879 <1> jmp short .save 2880 <1> 2881 <1> .16: 2882 <1> test ah, ah 2883 <1> mov ah, al 2884 <1> mov al, 0 2885 <1> .save: 2886 <1> jnz .saved 2887 <1> mov byte [ bCSAttr+1 ], ah 2888 <1> .saved: 2889 <1> mov byte [ bCSAttr ], al 2890 <1> jmp short aa01_j1 2891 <1> %endif 2892 <1> 2893 <1> ; Here we process the AAD and AAM instructions. They are special 2894 <1> ; in that they may take a one-byte argument, or none (in which case 2895 <1> ; the argument defaults to 0Ah = ten). 2896 <1> aa_aax: 2897 000007F1 8936[9881] <1> mov word [ mneminfo ], si ; save this address 2898 000007F5 5E <1> pop si 2899 000007F6 AC <1> lodsb 2900 000007F7 E8F4B0 <1> call iseol? 2901 000007FA 750B <1> jne ab01b ; if not end of line --> 2902 000007FC BE[DA81] <1> mov si, aam_args ; fake a 0Ah argument if none given 2903 000007FF EB05 <1> jmp short ab01a 2904 <1> 2905 <1> 2906 <1> ; Process normal instructions. 2907 <1> 2908 <1> ; First we parse each argument into the following structure, 2909 <1> ; stored consecutively at line_out, line_out+OPRND_size, etc. 2910 <1> ; 2911 <1> ; For arguments of the form xxxx:yyyyyyyy, xxxx is stored in 2912 <1> ; OPRND.num2, and yyyyyyyy in OPRND.num. The number of bytes 2913 <1> ; in yyyyyyyy is stored in opaddr, 2 is stored in OPRND.numadd, 2914 <1> ; and di is stored in xxaddr. 2915 <1> struc OPRND 2916 00000000 ?? <1> .flags: resb 1 ; 0 flags (ARG_DEREF, etc) 2917 00000001 ?? <1> .distflags: resb 1 ; 1 distance flags 2918 <1> ; (short = 1, near = 2, far = 4) 2919 00000002 ?? <1> .sizearg: resb 1 ; 2 size argument, if any 2920 <1> ; (1=byte, 2=word, 4=dword, 5=qword, 6=float, 7=double, 8=tbyte) 2921 <1> ; (refer to SIZ_ equs, sizetcnam, and asm_siznum) 2922 00000003 ?? <1> .sizedis: resb 1 ; 3 size of ModR/M displacement 2923 <1> .reg1: ; 4 ModR/M byte or first register (byte) 2924 00000004 ?? <1> .numadd: resb 1 ; 4 number of additional bytes at num2 (up to 4) 2925 <1> .num2: ; 5 second number (word) 2926 00000005 ?? <1> .reg2: resb 1 ; 5 index register, second register or SIB byte 2927 <1> ; reg2 needs to follow reg1 immediately 2928 00000006 ?? <1> .index: resb 1 ; 6 index factor 2929 00000007 ?? <1> .orednum: resb 1 ; 7 sizes of numbers are ORed here 2930 00000008 ???????? <1> .num: resd 1 ; 8 number 2931 <1> endstruc 1 2932 <1> 2933 <1> odfShort: equ 1 2934 <1> odfNear: equ 2 2935 <1> odfFar: equ 4 2936 <1> 2937 <1> 2938 <1> ab01: 2939 00000801 8936[9881] <1> mov word [ mneminfo ], si ; save this address 2940 00000805 5E <1> pop si ; get position in line 2941 <1> ab01a: 2942 00000806 AC <1> lodsb 2943 <1> ab01b: 2944 00000807 BF[0E08] <1> mov di, line_out 2945 <1> 2946 <1> ; Loop over operands. 2947 <1> ab02: 2948 0000080A E8E1B0 <1> call iseol? 2949 0000080D 7503 <1> jne ab04 ; if not end of line 2950 <1> ab99_j1: 2951 0000080F E93503 <1> jmp ab99 ; to next phase 2952 <1> 2953 <1> ab04: 2954 00000812 57 <1> push di ; clear out the next storage area 2955 00000813 B90600 <1> mov cx, OPRND_size_w 2956 00000816 31C0 <1> xor ax, ax 2957 00000818 F3AB <1> rep stosw 2958 0000081A 5F <1> pop di 2959 <1> 2960 <1> ; Small loop over "BYTE PTR" and segment prefixes. 2961 <1> ab05: 2962 0000081B 4E <1> dec si 2963 0000081C 8B04 <1> mov ax, word [ si ] 2964 0000081E 25DFDF <1> and ax, TOUPPER_W 2965 <1> .checksize: 2966 00000821 807D0200 <1> cmp byte [ di+OPRND.sizearg ], SIZ_NONE 2967 00000825 750C <1> jne .notsize ; if already have a size qualifier ("BYTE PTR",...) 2968 00000827 57 <1> push di 2969 00000828 BF[A282] <1> mov di, sizetcnam 2970 0000082B B90800 <1> mov cx, sizetcnam_size_w 2971 0000082E F2AF <1> repne scasw 2972 00000830 5F <1> pop di 2973 00000831 742D <1> je .size ; if found --> 2974 <1> .notsize: 2975 <1> .checkdist: 2976 00000833 F64501FF <1> test byte [ di + OPRND.distflags ], -1 2977 00000837 7541 <1> jnz .notdist 2978 00000839 57 <1> push di 2979 0000083A BF[B282] <1> mov di, distnam 2980 0000083D B90300 <1> mov cx, distnam_size_w 2981 00000840 F2AF <1> repne scasw 2982 00000842 5F <1> pop di 2983 00000843 7535 <1> jne .notdist 2984 00000845 85C9 <1> test cx, cx 2985 00000847 7509 <1> jnz .dist ; if not "FA" 2986 00000849 8A4402 <1> mov al, byte [ si+2 ] 2987 0000084C 24DF <1> and al, TOUPPER 2988 0000084E 3C52 <1> cmp al, 'R' 2989 00000850 7528 <1> jne .notdist ; if not "FAR" (could be hexadecimal) --> 2990 <1> .dist: 2991 <1> ; 0 = far, 1 = near, 2 = short 2992 00000852 80E902 <1> sub cl, distnam_size_w - 1 2993 <1> ; -2 = far, -1 = near, -0 = short 2994 00000855 F6D9 <1> neg cl 2995 <1> ; 2 = far, 1 = near, 0 = short 2996 00000857 B501 <1> mov ch, 1 2997 00000859 D2E5 <1> shl ch, cl 2998 <1> ; 4 = far, 2 = near, 1 = short 2999 <1> ; 3000 <1> ; This matches odfFar = 4, odfNear = 2, odfShort = 1 3001 0000085B 886D01 <1> mov byte [ di + OPRND.distflags ], ch 3002 0000085E EB08 <1> jmp .skipptr 3003 <1> 3004 <1> .size: 3005 00000860 80E908 <1> sub cl, sizetcnam_size_w 3006 00000863 F6D9 <1> neg cl ; convert to 1..8 3007 00000865 884D02 <1> mov byte [ di+OPRND.sizearg ], cl 3008 <1> .skipptr: 3009 00000868 E8CEB0 <1> call skipalpha ; go to next token 3010 0000086B 8A24 <1> mov ah, byte [si] 3011 0000086D 25DFDF <1> and ax, TOUPPER_W 3012 00000870 3D5054 <1> cmp ax, "PT" 3013 00000873 7503 <1> jne ab05_j1 ; if not "PTR" 3014 00000875 E8C1B0 <1> call skipalpha ; go to next token (ignore "PTR") 3015 <1> ab05_j1: equ $ 3016 00000878 EBA1 <1> jmp ab05 3017 <1> 3018 <1> .notdist: 3019 <1> ab07: 3020 0000087A E80400 <1> call ab08 3021 0000087D 7531 <1> jne ab09 ; not a segment prefix --> 3022 0000087F EBF7 <1> jmp short ab05_j1 ; if it was a segment prefix --> 3023 <1> 3024 <1> ; Test for and process segment prefix 3025 <1> ; 3026 <1> ; INP: b[aa_seg_pre] 3027 <1> ; si-> string 3028 <1> ; ax = w[si] (uppercased) 3029 <1> ; OUT: NZ if no segment prefix, 3030 <1> ; si unchanged 3031 <1> ; ZR if segment prefix, 3032 <1> ; si-> behind prefix + 1 3033 <1> ; al = character behind prefix 3034 <1> ; CHG: ax, bx, cx 3035 <1> ab08: 3036 00000881 803E[9781]00 <1> cmp byte [ aa_seg_pre ], 0 3037 00000886 7525 <1> jne .ret ; if we already have a segment prefix 3038 00000888 57 <1> push di 3039 00000889 BF[1288] <1> mov di, segrgnam 3040 0000088C B90600 <1> mov cx, N_SEGREGS 3041 0000088F F2AF <1> repne scasw 3042 00000891 5F <1> pop di 3043 00000892 7519 <1> jne .ret ; if not found 3044 00000894 56 <1> push si ; save si in case there's no colon 3045 00000895 AD <1> lodsw ; skip "?s" 3046 00000896 E8AAB0 <1> call skipwhite 3047 00000899 3C3A <1> cmp al, ':' 3048 0000089B 7511 <1> jne .retpopsi ; if not followed by ':' 3049 0000089D 58 <1> pop ax ; discard saved si 3050 0000089E E8A2B0 <1> call skipwhite ; skip it 3051 000008A1 BB[4988] <1> mov bx, prefixlist + 5 3052 000008A4 29CB <1> sub bx, cx 3053 000008A6 8A07 <1> mov al, byte [ bx ] ; look up the prefix byte 3054 000008A8 A2[9781] <1> mov byte [ aa_seg_pre ], al ; save it away 3055 000008AB 38C0 <1> cmp al, al ; ZR, valid segment prefix 3056 <1> .ret: 3057 000008AD C3 <1> retn 3058 <1> 3059 <1> .retpopsi: 3060 000008AE 5E <1> pop si 3061 000008AF C3 <1> retn 3062 <1> 3063 <1> ; Begin parsing main part of argument. 3064 <1> 3065 <1> ; First check registers. 3066 <1> ab09: 3067 000008B0 57 <1> push di ; check for solo registers 3068 000008B1 BF[F287] <1> mov di, rgnam816 3069 000008B4 B91B00 <1> mov cx, N_ALLREGS ; 27 3070 000008B7 E89B09 <1> call aagetreg 3071 000008BA 5F <1> pop di 3072 000008BB 727F <1> jc ab14 ; if not a register 3073 000008BD 800D04 <1> or byte [di+OPRND.flags], ARG_JUSTREG 3074 000008C0 885D04 <1> mov byte [di+OPRND.reg1], bl ; save register number 3075 000008C3 80FB18 <1> cmp bl, 24 ; 0..23 = AL..DH, AX..DI, EAX..EDI 3076 000008C6 730B <1> jae ab09a ; if it's not a normal register 3077 000008C8 93 <1> xchg ax, bx ; mov al, bl 3078 000008C9 B103 <1> mov cl, 3 3079 000008CB D2E8 <1> shr al, cl ; al = size: 0 -> byte, 1 -> word, 2 -> dword 3080 000008CD 04FE <1> add al, -2 3081 000008CF 1403 <1> adc al, 3 ; convert to 1, 2, 4 (respectively) 3082 <1> ; matching SIZ_BYTE, SIZ_WORD, SIZ_DWORD 3083 000008D1 EB5A <1> jmp short ab13 3084 <1> 3085 <1> ab09a: 3086 000008D3 80350C <1> xor byte [di+OPRND.flags], ARG_JUSTREG|ARG_WEIRDREG 3087 000008D6 B002 <1> mov al, SIZ_WORD ; register size 3088 000008D8 80FB1E <1> cmp bl, REG_ST ; 24..29 = segment registers 3089 000008DB 7737 <1> ja ab11 ; if it's MM, CR, DR, or TR --> 3090 000008DD 740C <1> je ab09b ; if it's ST --> 3091 000008DF 80FB1C <1> cmp bl, 28 3092 000008E2 7249 <1> jb ab13 ; if it's a non-386 segment register --> 3093 000008E4 800E[9581]20 <1> or byte [asm_mn_flags], AMF_FSGS ; else flag it 3094 000008E9 EB42 <1> jmp short ab13 3095 <1> 3096 <1> ; ST registers 3097 <1> ab09b: 3098 000008EB AC <1> lodsb 3099 <1> ; Check for NASM FPU register notation: ST0..ST7 3100 000008EC 3C30 <1> cmp al, '0' ; digit following ? 3101 000008EE 720B <1> jb .par 3102 000008F0 3C37 <1> cmp al, '7' 3103 000008F2 7707 <1> ja .par ; no --> 3104 000008F4 2C30 <1> sub al, '0' 3105 000008F6 884505 <1> mov byte [di+OPRND.reg2], al ; save number 3106 000008F9 EB30 <1> jmp short ab12 ; --> 3107 <1> 3108 <1> .par: 3109 <1> ; Check for MASM FPU register notation: ST(0)..ST(7) 3110 000008FB 3C28 <1> cmp al, '(' ; parenthesis following ? 3111 000008FD 7403 <1> je .ispar ; yes --> 3112 <1> ; Plain ST (= ST0) 3113 000008FF 4E <1> dec si 3114 00000900 EB29 <1> jmp short ab12 3115 <1> 3116 <1> .ispar: 3117 00000902 AC <1> lodsb ; get digit 3118 00000903 2C30 <1> sub al, '0' 3119 00000905 3C07 <1> cmp al, 7 3120 00000907 7708 <1> ja ab10 ; if not 0..7 3121 00000909 884505 <1> mov byte [di+OPRND.reg2], al ; save the number 3122 0000090C AC <1> lodsb 3123 0000090D 3C29 <1> cmp al, ')' ; validate that there's a closing parenthesis 3124 0000090F 741A <1> je ab12 ; okay --> 3125 <1> ab10: 3126 <1> aa24_j2: 3127 00000911 E9A4FE <1> jmp aa24 ; error 3128 <1> 3129 <1> ; other registers: 31..34 (MM, CR, DR, TR) 3130 <1> ab11: 3131 00000914 AC <1> lodsb 3132 00000915 2C30 <1> sub al, '0' ; get digit 3133 00000917 3C07 <1> cmp al, 7 3134 00000919 77F6 <1> ja ab10 ; if error --> 3135 0000091B 884505 <1> mov byte [di+OPRND.reg2], al ; save the number 3136 0000091E B004 <1> mov al, SIZ_DWORD ; register size 3137 00000920 80FB1F <1> cmp bl, REG_MM 3138 00000923 7508 <1> jne ab13 ; if not MM register 3139 00000925 800D04 <1> or byte [di+OPRND.flags], ARG_JUSTREG 3140 00000928 B005 <1> mov al, SIZ_QWORD 3141 0000092A A9 <1> db __TEST_IMM16 ; (skip mov) 3142 <1> ab12: 3143 0000092B B000 <1> mov al, 0 ; size for ST registers 3144 <1> ab13: 3145 0000092D 3A4502 <1> cmp al, byte [di+OPRND.sizearg] ; compare with stated size 3146 00000930 7407 <1> je ab13a ; if same 3147 00000932 864502 <1> xchg al, byte [di+OPRND.sizearg] 3148 00000935 84C0 <1> test al, al ; SIZ_NONE ? 3149 00000937 75D8 <1> jnz ab10 ; if wrong size given, error --> 3150 <1> ab13a: 3151 00000939 E9ED01 <1> jmp ab44 ; done with this operand 3152 <1> 3153 <1> ; It's not a register reference. Try for a number. 3154 <1> ab14: 3155 0000093C AC <1> lodsb 3156 0000093D E84308 <1> call aaifnum 3157 00000940 7236 <1> jc ab17 ; it's not a number 3158 <1> ab14a: 3159 00000942 E86208 <1> call aageti ; get the number 3160 00000945 884D07 <1> mov byte [di+OPRND.orednum], cl 3161 00000948 895D08 <1> mov word [di+OPRND.num+0], bx 3162 0000094B 89550A <1> mov word [di+OPRND.num+2], dx 3163 0000094E E8F3AF <1> call skipwh0 3164 00000951 80F902 <1> cmp cl, 2 3165 00000954 7F22 <1> jg ab17 ; if we can't have a colon here 3166 00000956 3C3A <1> cmp al, ':' 3167 00000958 751E <1> jne ab17 ; if not xxxx:yyyy 3168 0000095A E8E6AF <1> call skipwhite 3169 0000095D E84708 <1> call aageti 3170 00000960 8B4D08 <1> mov cx, word [di+OPRND.num+0] 3171 00000963 894D05 <1> mov word [di+OPRND.num2], cx 3172 00000966 895D08 <1> mov word [di+OPRND.num+0], bx 3173 00000969 89550A <1> mov word [di+OPRND.num+2], dx 3174 0000096C 800D20 <1> or byte [di+OPRND.flags], ARG_FARADDR 3175 0000096F E9B601 <1> jmp ab43 ; done with this operand 3176 <1> 3177 <1> ab15: 3178 00000972 E9B300 <1> jmp ab30 ; do post-processing 3179 <1> 3180 <1> ; Check for [...]. 3181 <1> ab16: 3182 00000975 E8CBAF <1> call skipwhite 3183 <1> ab17: 3184 00000978 3C5B <1> cmp al, '[' ; begin loop over sets of [] 3185 0000097A 75F6 <1> jne ab15 ; if not [ 3186 0000097C 800D01 <1> or byte [di+OPRND.flags], ARG_DEREF ; set the flag 3187 <1> 3188 <1> ; Process NASM segment prefix inside brackets if any 3189 0000097F E8C1AF <1> call skipwhite 3190 00000982 8A24 <1> mov ah, byte [si] 3191 00000984 25DFDF <1> and ax, TOUPPER_W 3192 00000987 4E <1> dec si ; set up for ab08 3193 00000988 E8F6FE <1> call ab08 3194 0000098B 7403 <1> jz ab19 ; if segment prefix (called skipwhite) 3195 <1> ab18: 3196 0000098D E8B3AF <1> call skipwhite 3197 <1> ab19: 3198 00000990 3C5D <1> cmp al, ']' ; begin loop within [] 3199 00000992 74E1 <1> je ab16 ; if done 3200 <1> 3201 <1> ; Check for a register (within []). 3202 00000994 4E <1> dec si 3203 00000995 57 <1> push di 3204 00000996 BF[0288] <1> mov di, rgnam16 3205 00000999 B90800 <1> mov cx, N_REGS16 3206 0000099C E8B608 <1> call aagetreg 3207 0000099F 5F <1> pop di 3208 000009A0 7243 <1> jc ab25 ; if not a register 3209 000009A2 80FB10 <1> cmp bl, 16 3210 000009A5 7305 <1> jae ab20 ; if 32-bit register 3211 000009A7 80C308 <1> add bl, 8 ; adjust 0..7 to 8..15 3212 000009AA EB1D <1> jmp short ab21 3213 <1> ab20: 3214 000009AC 807D0500 <1> cmp byte [di+OPRND.reg2], 0 3215 000009B0 7517 <1> jnz ab21 ; if we already have an index 3216 000009B2 E88EAF <1> call skipwhite 3217 000009B5 4E <1> dec si 3218 000009B6 3C2A <1> cmp al, '*' 3219 000009B8 750F <1> jne ab21 ; if not followed by '*' 3220 000009BA 46 <1> inc si 3221 000009BB 885D05 <1> mov byte [di+OPRND.reg2], bl ; save index register 3222 000009BE E882AF <1> call skipwhite 3223 000009C1 E8E307 <1> call aageti 3224 000009C4 E86C08 <1> call aaconvindex 3225 000009C7 EB51 <1> jmp short ab28 ; ready for next part 3226 <1> 3227 <1> ab21: 3228 000009C9 807D0400 <1> cmp byte [di+OPRND.reg1], 0 3229 000009CD 7505 <1> jne ab22 ; if there's already a register 3230 000009CF 885D04 <1> mov byte [di+OPRND.reg1], bl 3231 000009D2 EB09 <1> jmp ab23 3232 <1> ab22: 3233 000009D4 807D0500 <1> cmp byte [di+OPRND.reg2], 0 3234 000009D8 7508 <1> jne ab24 ; if too many registers 3235 000009DA 885D05 <1> mov byte [di+OPRND.reg2], bl 3236 <1> ab23: 3237 000009DD E863AF <1> call skipwhite 3238 000009E0 EB38 <1> jmp short ab28 ; ready for next part 3239 <1> 3240 <1> ab24: 3241 <1> aa24_j3: 3242 000009E2 E9D3FD <1> jmp aa24 ; error 3243 <1> 3244 <1> ; Try for a number (within []). 3245 <1> ab25: 3246 000009E5 AC <1> lodsb 3247 <1> ab26: 3248 000009E6 E8BE07 <1> call aageti ; get a number (or flag an error) 3249 000009E9 E858AF <1> call skipwh0 3250 000009EC 3C2A <1> cmp al, '*' 3251 000009EE 740B <1> je ab27 ; if it's an index factor 3252 000009F0 084D07 <1> or byte [di+OPRND.orednum], cl 3253 000009F3 015D08 <1> add word [di+OPRND.num+0], bx 3254 000009F6 11550A <1> adc word [di+OPRND.num+2], dx 3255 000009F9 EB1F <1> jmp short ab28 ; next part ... 3256 <1> 3257 <1> ab27: 3258 000009FB E83508 <1> call aaconvindex 3259 000009FE E842AF <1> call skipwhite 3260 00000A01 4E <1> dec si 3261 00000A02 57 <1> push di 3262 00000A03 BF[0288] <1> mov di, rgnam16 3263 00000A06 31C9 <1> xor cx, cx 3264 00000A08 E84A08 <1> call aagetreg 3265 00000A0B 5F <1> pop di 3266 00000A0C 72D4 <1> jc ab24 ; if error 3267 00000A0E 807D0500 <1> cmp byte [di+OPRND.reg2], 0 3268 00000A12 75CE <1> jne ab24 ; if there is already a register 3269 00000A14 885D05 <1> mov byte [di+OPRND.reg2], bl 3270 00000A17 E829AF <1> call skipwhite 3271 <1> 3272 <1> ; Ready for the next term within []. 3273 <1> ab28: 3274 00000A1A 3C2D <1> cmp al, '-' 3275 00000A1C 74C8 <1> je ab26 ; if a (negative) number is next 3276 00000A1E 3C2B <1> cmp al, '+' 3277 00000A20 7503 <1> jne ab29 ; if no next term (presumably) 3278 00000A22 E968FF <1> jmp ab18 3279 <1> ab29: 3280 00000A25 E968FF <1> jmp ab19 ; back for more 3281 <1> 3282 <1> ; Post-processing for complicated arguments. 3283 <1> ab30: 3284 00000A28 837D0400 <1> cmp word [di+OPRND.reg1], 0 3285 00000A2C 752C <1> jne ab32 ; if registers were given ( ==> create MOD R/M) 3286 00000A2E 807D0700 <1> cmp byte [di+OPRND.orednum], 0 3287 00000A32 7424 <1> je ab31 ; if nothing was given ( ==> error) 3288 00000A34 803D00 <1> cmp byte [di+OPRND.flags], 0 3289 00000A37 7506 <1> jne ab30b ; if it was not immediate 3290 00000A39 800D10 <1> or byte [di+OPRND.flags], ARG_IMMED 3291 <1> ab30a: 3292 00000A3C E9E900 <1> jmp ab43 ; done with this argument 3293 <1> ab30b: 3294 00000A3F 800E[9581]80 <1> or byte [asm_mn_flags], AMF_ADDR 3295 00000A44 B002 <1> mov al, 2 ; size of the displacement 3296 00000A46 F6450704 <1> test byte [di+OPRND.orednum], 4 3297 00000A4A 7407 <1> jz ab30c ; if no 32-bit displacement --> 3298 00000A4C 40 <1> inc ax 3299 00000A4D 40 <1> inc ax ; al = 4 3300 00000A4E 800E[9581]04 <1> or byte [asm_mn_flags], AMF_A32 ; 32-bit addressing 3301 <1> ab30c: 3302 00000A53 884503 <1> mov byte [di+OPRND.sizedis], al ; save displacement size 3303 00000A56 EBE4 <1> jmp short ab30a ; done with this argument 3304 <1> ab31: 3305 00000A58 EB88 <1> jmp short aa24_j3 ; flag an error 3306 <1> 3307 <1> ; Create the MOD R/M byte. 3308 <1> ; (For disp-only or register, this will be done later as needed.) 3309 <1> ab32: 3310 00000A5A 800D02 <1> or byte [di+OPRND.flags], ARG_MODRM 3311 00000A5D 8A4504 <1> mov al, byte [di+OPRND.reg1] 3312 00000A60 0A4505 <1> or al, byte [di+OPRND.reg2] 3313 00000A63 A810 <1> test al, 10h 3314 00000A65 7525 <1> jnz ab34 ; if 32-bit addressing 3315 00000A67 F6450704 <1> test byte [di+OPRND.orednum], 4 3316 00000A6B 751F <1> jnz ab34 ; if 32-bit addressing 3317 00000A6D 800E[9581]80 <1> or byte [asm_mn_flags], AMF_ADDR 3318 00000A72 8B4504 <1> mov ax, word [di+OPRND.reg1] ; get reg1 and reg2 3319 00000A75 38E0 <1> cmp al, ah 3320 00000A77 7702 <1> ja ab33 ; make sure al >= ah 3321 00000A79 86C4 <1> xchg al, ah 3322 <1> ab33: 3323 00000A7B 57 <1> push di 3324 00000A7C BF[CA81] <1> mov di, modrmtab 3325 00000A7F B90800 <1> mov cx, 8 3326 00000A82 F2AF <1> repne scasw 3327 00000A84 5F <1> pop di 3328 00000A85 75D1 <1> jne ab31 ; if not among the possibilities (error) 3329 00000A87 BB0602 <1> mov bx, 206h ; max disp = 2 bytes; 6 ==> (non-existent) [bp] 3330 00000A8A EB6A <1> jmp short ab39 ; done (just about) 3331 <1> 3332 <1> ; 32-bit addressing 3333 <1> ab34: 3334 00000A8C 800E[9581]84 <1> or byte [asm_mn_flags], AMF_A32 | AMF_ADDR ; 32-bit addressing 3335 00000A91 8A4504 <1> mov al, byte [di+OPRND.reg1] 3336 00000A94 0A4506 <1> or al, byte [di+OPRND.index] 3337 00000A97 7508 <1> jnz ab35 ; if we can't optimize [Exx*1] to [Exx] 3338 00000A99 8B4504 <1> mov ax, word [di+OPRND.reg1] 3339 00000A9C 86C4 <1> xchg al, ah 3340 00000A9E 894504 <1> mov word [di+OPRND.reg1], ax 3341 <1> ab35: 3342 00000AA1 BB0504 <1> mov bx, 405h ; max disp = 4 bytes; 5 ==> (non-existent) [bp] 3343 00000AA4 807D0500 <1> cmp byte [di+OPRND.reg2], 0 3344 00000AA8 7510 <1> jne ab36 ; if there's a SIB 3345 00000AAA 8A4D04 <1> mov cl, byte [di+OPRND.reg1] 3346 00000AAD 80F910 <1> cmp cl, 16 3347 00000AB0 7CA6 <1> jl ab31 ; if wrong register type 3348 00000AB2 80E107 <1> and cl, 7 3349 00000AB5 80F904 <1> cmp cl, 4 ; check for ESP 3350 00000AB8 753C <1> jne ab39 ; if not, then we're done (otherwise do SIB) 3351 <1> 3352 <1> ab36: 3353 00000ABA 800E[9581]08 <1> or byte [asm_mn_flags], AMF_SIB ; form SIB 3354 00000ABF 8A6D06 <1> mov ch, byte [di+OPRND.index] ; get SS bits 3355 00000AC2 B103 <1> mov cl, 3 3356 00000AC4 D2E5 <1> shl ch, cl ; shift them halfway into place 3357 00000AC6 8A4505 <1> mov al, byte [di+OPRND.reg2] ; index register 3358 00000AC9 3C14 <1> cmp al, 20 3359 00000ACB 748B <1> je ab31 ; if ESP ( ==> error) 3360 00000ACD 3C00 <1> cmp al, 0 3361 00000ACF 7502 <1> jne ab37 ; if not zero 3362 00000AD1 B014 <1> mov al, 20 ; set it for index byte 4 3363 <1> ab37: 3364 00000AD3 3C10 <1> cmp al, 16 3365 00000AD5 7C81 <1> jl ab31 ; if wrong register type 3366 00000AD7 2407 <1> and al, 7 3367 00000AD9 08C5 <1> or ch, al ; put it into the SIB 3368 00000ADB D2E5 <1> shl ch, cl ; shift it into place 3369 00000ADD 41 <1> inc cx ; R/M for SIB = 4 3370 00000ADE 8A4504 <1> mov al, byte [di+OPRND.reg1] ; now get the low 3 bits 3371 00000AE1 84C0 <1> test al, al 3372 00000AE3 7505 <1> jnz ab38 ; if there was a first register 3373 00000AE5 80CD05 <1> or ch, 5 3374 00000AE8 EB38 <1> jmp short ab42 ; MOD = 0, disp is 4 bytes 3375 <1> 3376 <1> ab38: 3377 00000AEA 3C10 <1> cmp al, 16 3378 00000AEC 7C56 <1> jl ab45 ; if wrong register type 3379 00000AEE 2407 <1> and al, 7 ; first register 3380 00000AF0 08C5 <1> or ch, al ; put it into the SIB 3381 00000AF2 3C05 <1> cmp al, 5 3382 00000AF4 7406 <1> je ab40 ; if it's EBP, then we don't recognize disp=0 3383 <1> ; otherwise bl will be set to 0 3384 <1> 3385 <1> ; Find the size of the displacement. 3386 <1> ab39: 3387 00000AF6 38D9 <1> cmp cl, bl 3388 00000AF8 7402 <1> je ab40 ; if it's [(E)BP], then disp=0 is still 1 byte 3389 00000AFA B300 <1> mov bl, 0 ; allow 0-byte disp 3390 <1> 3391 <1> ab40: 3392 00000AFC 51 <1> push cx 3393 00000AFD 8A4508 <1> mov al, byte [di+OPRND.num+0] 3394 00000B00 B107 <1> mov cl, 7 3395 00000B02 D2F8 <1> sar al, cl 3396 00000B04 59 <1> pop cx 3397 00000B05 8A6509 <1> mov ah, byte [di+OPRND.num+1] 3398 00000B08 38E0 <1> cmp al, ah 3399 00000B0A 7513 <1> jne ab41 ; if it's bigger than 1 byte 3400 00000B0C 3B450A <1> cmp ax, word [di+OPRND.num+2] 3401 00000B0F 750E <1> jne ab41 ; ditto 3402 00000B11 B700 <1> mov bh, 0 ; no displacement 3403 00000B13 0A5D08 <1> or bl, byte [di+OPRND.num+0] 3404 00000B16 740A <1> jz ab42 ; if disp = 0 and it's not (E)BP 3405 00000B18 FEC7 <1> inc bh ; disp = 1 byte 3406 00000B1A 80C940 <1> or cl, 40h ; set MOD = 1 3407 00000B1D EB03 <1> jmp short ab42 ; done 3408 <1> 3409 <1> ab41: 3410 00000B1F 80C980 <1> or cl, 80h ; set MOD = 2 3411 <1> 3412 <1> ab42: 3413 00000B22 887D03 <1> mov byte [di+OPRND.sizedis], bh ; store displacement size 3414 00000B25 894D04 <1> mov word [di+OPRND.reg1], cx ; store MOD R/M and maybe SIB 3415 <1> 3416 <1> ; Finish up with the operand. 3417 <1> ab43: 3418 00000B28 4E <1> dec si 3419 <1> ab44: 3420 00000B29 E817AE <1> call skipwhite 3421 00000B2C 83C70C <1> add di, byte OPRND_size 3422 00000B2F E8BCAD <1> call iseol? 3423 00000B32 7413 <1> je ab99 ; if end of line --> 3424 00000B34 3C2C <1> cmp al, ',' 3425 00000B36 750C <1> jne ab45 ; if not comma ( ==> error) 3426 00000B38 81FF[3208] <1> cmp di, line_out+3*OPRND_size 3427 00000B3C 7306 <1> jae ab45 ; if too many operands 3428 00000B3E E802AE <1> call skipwhite 3429 00000B41 E9C6FC <1> jmp ab02 3430 <1> 3431 <1> ab45: 3432 00000B44 E971FC <1> jmp aa24 ; error jump 3433 <1> 3434 <1> ab99: 3435 00000B47 C605FF <1> mov byte [di+OPRND.flags], -1 ; end of parsing phase 3436 <1> 3437 <1> %if 0 3438 <1> For the next phase, we match the parsed arguments with the set of 3439 <1> permissible argument lists for the opcode. The first match wins. 3440 <1> Therefore the argument lists should be ordered such that the 3441 <1> cheaper ones come first. 3442 <1> 3443 <1> There is a tricky issue regarding sizes of memory references. 3444 <1> Here are the rules: 3445 <1> 1. If a memory reference is given with a size, then it's OK. 3446 <1> 2. If a memory reference is given without a size, but some 3447 <1> other argument is a register (which implies a size), 3448 <1> then the memory reference inherits that size. 3449 <1> Exceptions: OP_CL does not imply a size (it's the shift counter) 3450 <1> OP_SHOSIZ 3451 <1> 3. If 1 and 2 do not apply, but this is the last possible argument 3452 <1> list, and if the argument list requires a particular size, then 3453 <1> that size is used. 3454 <1> 4. In all other cases, flag an error. 3455 <1> %endif 3456 <1> 3457 <1> ac01: 3458 00000B4A 31C0 <1> xor ax, ax 3459 00000B4C BF[9A81] <1> mov di, rmaddr 3460 00000B4F B90700 <1> mov cx, 7 3461 00000B52 F3AB <1> rep stosw ; clear variant-specific variables 3462 <1> ; cx = 0 3463 00000B54 8B36[9881] <1> mov si, word [mneminfo] 3464 <1> ; -> the next argument variant 3465 <1> %if _ASM_ESCAPE_USED 3466 00000B58 31DB <1> xor bx, bx ; cx:bx = counter of ASM_ESCAPEs 3467 <1> %endif 3468 <1> ; Parse the variant's assembler table entry 3469 <1> ; si-> next argument variant 3470 <1> ; variant-specific variables cleared 3471 <1> ; cx:bx = 0 3472 <1> 3473 <1> ac02: 3474 00000B5A AC <1> lodsb 3475 <1> %if _ASM_ESCAPE_USED 3476 00000B5B 3CF4 <1> cmp al, ASM_ESCAPE 3477 00000B5D 750B <1> jne .notescape 3478 00000B5F 81C300F4 <1> add bx, ASM_ESCAPE << 8 3479 00000B63 83D100 <1> adc cx, byte 0 3480 00000B66 7219 <1> jc ac04 ; if this branches, too many escapes --> 3481 00000B68 EBF0 <1> jmp short ac02 3482 <1> .notescape: 3483 <1> %endif 3484 00000B6A 2CF5 <1> sub al, ASM_MACH1 3485 00000B6C 7216 <1> jb ac05 ; if no more special bytes 3486 00000B6E 3C06 <1> cmp al, ASM_LOCKABLE-ASM_MACH1 3487 00000B70 7408 <1> je ac03 ; if ASM_LOCKABLE 3488 00000B72 770D <1> ja ac04 ; if ASM_END or another (--> error) 3489 00000B74 40 <1> inc ax 3490 00000B75 A2[A281] <1> mov byte [dismach], al ; save machine type 3491 00000B78 EBE0 <1> jmp short ac02 ; back for next byte 3492 <1> ac03: 3493 00000B7A 800E[A681]01 <1> or byte [varflags], VAR_LOCKABLE 3494 00000B7F EBD9 <1> jmp short ac02 ; back for next byte 3495 <1> 3496 <1> ac04: 3497 00000B81 E9D7FB <1> jmp aa13a ; error 3498 <1> 3499 <1> ; Get and unpack the word. 3500 <1> ac05: 3501 00000B84 4E <1> dec si 3502 00000B85 AD <1> lodsw 3503 00000B86 86C4 <1> xchg al, ah ; put into little-endian order 3504 00000B88 31D2 <1> xor dx, dx 3505 <1> %if _ASM_ESCAPE_USED 3506 00000B8A 01D8 <1> add ax, bx ; add in the ASM_ESCAPE adjustment 3507 00000B8C 11CA <1> adc dx, cx ; account for overflow (cx = 0) 3508 <1> %endif 3509 00000B8E BB8000 <1> mov bx, ASMMOD 3510 00000B91 F7F3 <1> div bx ; ax = a_opcode; dx = index into opindex 3511 00000B93 A3[AA81] <1> mov word [a_opcode], ax ; save ax 3512 00000B96 A3[AC81] <1> mov word [a_opcode2], ax ; save the second copy 3513 00000B99 3DDF00 <1> cmp ax, 0DFh ; a coprocessor instruction ? 3514 00000B9C 7717 <1> ja ac05a 3515 00000B9E 3CD8 <1> cmp al, 0D8h 3516 00000BA0 7213 <1> jb ac05a ; if no coprocessor instruction --> 3517 00000BA2 800E[A381]01 <1> or byte [dmflags], DM_COPR ; flag it as an x87 instruction 3518 00000BA7 88C4 <1> mov ah, al ; ah = low order byte of opcode 3519 00000BA9 AC <1> lodsb ; get extra byte 3520 00000BAA A2[9C81] <1> mov byte [regmem], al ; save it in regmem 3521 00000BAD A3[AC81] <1> mov word [a_opcode2], ax ; save this for obsolete-instruction detection 3522 00000BB0 800E[A681]02 <1> or byte [varflags], VAR_MODRM ; flag its presence 3523 <1> ac05a: 3524 00000BB5 8936[9881] <1> mov [mneminfo], si ; save si back again 3525 00000BB9 89D6 <1> mov si, dx 3526 <1> %if ASMMOD > 0FFh 3527 <1> xor bx, bx 3528 <1> %endif 3529 00000BBB 8A9C[2C16] <1> mov bl, byte [opindex+si] 3530 00000BBF 01D2 <1> add dx, dx 3531 00000BC1 4A <1> dec dx 3532 00000BC2 01D3 <1> add bx, dx ; adjust to get correct index into oplists 3533 00000BC4 8DB7[0000] <1> lea si, [oplists+bx] ; si = the address of our operand list 3534 00000BC8 BF[0E08] <1> mov di, line_out 3535 <1> 3536 <1> ; Begin loop over operands. 3537 <1> ; [a_opcode] etc set for opcode 3538 <1> ; si-> operand list 3539 <1> ; di-> next parsed operand 3540 <1> ; [mneminfo]-> mnemonic's next variant in assembler table 3541 <1> ac06: 3542 00000BCB AC <1> lodsb ; get next operand byte 3543 00000BCC 3C00 <1> cmp al, OP_END 3544 00000BCE 745F <1> je ac10 ; if end of list 3545 <1> 3546 <1> ; The OP_STACK_* operand types don't really need another 3547 <1> ; operand structure. So handle them before checking for 3548 <1> ; a valid operand structure. This is required for the 3549 <1> ; cases with no regular operands following the stack hint. 3550 <1> ; Because they aren't needed by the assembler anyway we 3551 <1> ; just loop back to ac06 to load the next operand type. 3552 00000BD0 3C1F <1> cmp al, OP_STACK_PUSH 3553 00000BD2 74F7 <1> je ac06 3554 00000BD4 3C20 <1> cmp al, OP_STACK_POP 3555 00000BD6 74F3 <1> je ac06 3556 00000BD8 3C21 <1> cmp al, OP_STACK_SPECIAL 3557 00000BDA 74EF <1> je ac06 3558 <1> 3559 <1> ; Actual operand, or one of these always followed by one 3560 <1> ; or more actual operands (OP_M_*, OP_SHORT|NEAR|FAR), 3561 <1> ; so check for another valid operand structure. 3562 00000BDC 803DFF <1> cmp byte [di+OPRND.flags], -1 3563 00000BDF 744B <1> je ac01_j1 ; if too few operands were given 3564 00000BE1 3C40 <1> cmp al, OP_SIZE 3565 00000BE3 720E <1> jb ac07 ; if no size needed 3566 <1> %if 1 3567 00000BE5 B400 <1> mov ah, 0 3568 00000BE7 B104 <1> mov cl, 4 3569 00000BE9 D3E0 <1> shl ax, cl ; move bits 4..7 (size) to ah (OP_1632=5, OP_8=6, OP_16=7, ...) 3570 00000BEB D2E8 <1> shr al, cl ; move bits 0..3 back 3571 <1> %else 3572 <1> aam 16 ; ax=00XY -> ax=0X0Y 3573 <1> %endif 3574 00000BED 8826[A881] <1> mov byte [a_reqsize], ah ; save it away 3575 00000BF1 EB02 <1> jmp short ac08 3576 <1> 3577 <1> ac07: ; al = OP_M64.. 3578 <1> ; have al = 1..x 3579 <1> ; want al = 16..y 3580 00000BF3 040F <1> add al, 16-1 ; adjust for the 16 start entries in asmjmp 3581 <1> 3582 <1> ac08: 3583 00000BF5 98 <1> cbw ; al = 0..7 or 16..y, 3584 <1> ; al < 128, thus ax = al 3585 00000BF6 93 <1> xchg ax, bx ; now bx contains the index 3586 00000BF7 8A87[DC81] <1> mov al, byte [bittab+bx] 3587 00000BFB D1E3 <1> shl bx, 1 ; = offset into word array 3588 00000BFD 8B8F[1A82] <1> mov cx, word [asmjmp + bx] 3589 <1> ; subroutine address 3590 00000C01 D1EB <1> shr bx, 1 ; return to index 3591 00000C03 83FB3D <1> cmp bx, OP_AMOUNT_TABLE 3592 00000C06 731E <1> jae ac09_internal_error ; internal error 3593 00000C08 8405 <1> test al, byte [di+OPRND.flags] 3594 00000C0A 7420 <1> jz ac09 ; if no required bits are present 3595 00000C0C B400 <1> mov ah, 0 ; (insure ah = 0 for ao90) 3596 00000C0E FFD1 <1> call cx ; call its specific routine 3597 00000C10 A0[A781] <1> mov al, [alloweddist] 3598 00000C13 F6D0 <1> not al 3599 00000C15 844501 <1> test byte [di + OPRND.distflags], al 3600 00000C18 7512 <1> jnz ac09 ; if invalid distance specified --> 3601 00000C1A 817CFF5355 <1> cmp word [si-1], (OP_1632|OP_R)<<8|(OP_1632|OP_R_MOD) 3602 00000C1F 7403 <1> je ac06_j1 ; (hack) for IMUL instruction 3603 00000C21 83C70C <1> add di, byte OPRND_size 3604 <1> ; -> next operand 3605 <1> ac06_j1: 3606 00000C24 EBA5 <1> jmp ac06 ; back for more 3607 <1> 3608 <1> ac09_internal_error: 3609 00000C26 BA[BB70] <1> mov dx, msg.aa_internal_error 3610 00000C29 E878B1 <1> call putsz 3611 <1> ac09: 3612 <1> ac01_j1: 3613 00000C2C E91BFF <1> jmp ac01 ; back to next possibility 3614 <1> 3615 <1> ; End of operand list. 3616 <1> ac10: 3617 00000C2F 803DFF <1> cmp byte [di+OPRND.flags], -1 3618 00000C32 75F8 <1> jne ac09 ; if too many operands were given 3619 <1> 3620 <1> ; Final check on sizes 3621 00000C34 A0[A681] <1> mov al, byte [varflags] 3622 00000C37 A810 <1> test al, VAR_SIZ_NEED 3623 00000C39 7414 <1> jz ac12 ; if no size needed 3624 00000C3B A804 <1> test al, VAR_SIZ_GIVN 3625 00000C3D 7510 <1> jnz ac12 ; if a size was given 3626 00000C3F A808 <1> test al, VAR_SIZ_FORCD 3627 00000C41 74E9 <1> jz ac09 ; if the size was not forced ( ==> reject) 3628 00000C43 8B36[9881] <1> mov si, word [mneminfo] 3629 00000C47 803CFF <1> cmp byte [si], ASM_END 3630 00000C4A 7403 <1> je ac12 ; if this is the last one 3631 <1> ac11: 3632 00000C4C E90CFB <1> jmp aa13a ; it was not, error --> (not a retry) 3633 <1> 3634 <1> ; Check other prefixes. 3635 <1> ac12: 3636 00000C4F A0[9681] <1> mov al, byte [aa_saved_prefix] 3637 00000C52 3C00 <1> cmp al, 0 3638 00000C54 7421 <1> je ac14 ; if no saved prefixes to check 3639 00000C56 3CF0 <1> cmp al, 0F0h 3640 00000C58 7509 <1> jne ac13 ; if it's a rep prefix 3641 00000C5A F606[A681]01 <1> test byte [varflags], VAR_LOCKABLE 3642 00000C5F 74EB <1> jz ac11 ; if this variant is not lockable, error --> 3643 00000C61 EB14 <1> jmp short ac14 ; done 3644 <1> 3645 <1> ac13: 3646 00000C63 A1[AA81] <1> mov ax, word [a_opcode] ; check if opcode is OK for rep{,z,nz} 3647 00000C66 24FE <1> and al, ~1 ; clear low order bit (MOVSW -> MOVSB) 3648 <1> 3649 00000C68 3DFF00 <1> cmp ax, 0FFh 3650 00000C6B 77DF <1> ja ac11 ; if it's not a 1-byte instruction, error --> 3651 00000C6D BF[2B11] <1> mov di, replist ; list of instructions that go with rep 3652 00000C70 B90700 <1> mov cx, REP_LEN ; scan all (REP + REPxx) 3653 00000C73 F2AE <1> repne scasb 3654 00000C75 75D5 <1> jne ac11 ; if it's not among them, error --> 3655 <1> 3656 <1> ac14: 3657 00000C77 F606[9581]10 <1> test byte [asm_mn_flags], AMF_MSEG 3658 00000C7C 7412 <1> jz ac15 ; if no segment prefix before mnemonic --> 3659 00000C7E A1[AA81] <1> mov ax, word [a_opcode] ; check if opcode allows this 3660 00000C81 3DFF00 <1> cmp ax, 0FFh 3661 00000C84 77C6 <1> ja ac11 ; if it's not a 1-byte instruction, error --> 3662 00000C86 BF[2211] <1> mov di, segprfxtab 3663 00000C89 B90900 <1> mov cx, SEGP_LEN 3664 00000C8C F2AE <1> repne scasb 3665 00000C8E 75BC <1> jne ac11 ; if it's not in the list, error --> 3666 <1> 3667 <1> ac15: 3668 00000C90 8B1E[9E81] <1> mov bx, word [immaddr] 3669 00000C94 09DB <1> or bx, bx 3670 00000C96 740C <1> jz ac16 ; if no immediate data 3671 00000C98 A0[A581] <1> mov al, byte [opsize] 3672 00000C9B F6D8 <1> neg al 3673 00000C9D D0E0 <1> shl al, 1 3674 00000C9F 844707 <1> test al, byte [bx+7] 3675 00000CA2 75A8 <1> jnz ac11 ; if the immediate data was too big, error --> 3676 <1> 3677 <1> ; Put the instruction together 3678 <1> ; (maybe is this why they call it an assembler) 3679 <1> 3680 <1> ; First, the prefixes (including preceding WAIT instruction) 3681 <1> ac16: 3682 00000CA4 66 <1> _386_PM_o32 ; mov edi, dword [a_addr] 3683 00000CA5 8B3E[000B] <1> mov di, word [a_addr] 3684 00000CA9 8E06[040B] <1> mov es, word [a_addr + saSegSel] 3685 00000CAD F606[9581]02 <1> test byte [asm_mn_flags], AMF_WAIT 3686 00000CB2 7404 <1> jz .nowaitprefix ; if no wait instruction beforehand 3687 00000CB4 B09B <1> mov al, 9Bh 3688 00000CB6 67 <1> _386_PM_a32 3689 00000CB7 AA <1> stosb 3690 <1> .nowaitprefix: 3691 <1> 3692 00000CB8 A0[9681] <1> mov al,[aa_saved_prefix] 3693 00000CBB 84C0 <1> test al, al 3694 00000CBD 7402 <1> jz .noprefix ; if no LOCK or REP prefix 3695 00000CBF 67 <1> _386_PM_a32 3696 00000CC0 AA <1> stosb 3697 <1> .noprefix: 3698 <1> 3699 <1> ;--- a 67h address size prefix is needed 3700 <1> ;--- 1. for CS16: if AMF_ADDR=1 and AMF_A32=1 3701 <1> ;--- 2. for CS32: if AMF_ADDR=1 and AMF_A32=0 3702 <1> 3703 00000CC1 A0[9581] <1> mov al, byte [asm_mn_flags] 3704 00000CC4 A880 <1> test al, AMF_ADDR 3705 00000CC6 7410 <1> jz .noaddressprefix 3706 00000CC8 2404 <1> and al, AMF_A32 3707 <1> %if _PM 3708 00000CCA 0A06[DB88] <1> or al, byte [bCSAttr] 3709 00000CCE 7408 <1> jz .noaddressprefix ; if 16-bit CS and 16-bit addressing --> 3710 00000CD0 3C44 <1> cmp al, AMF_A32| 40h 3711 00000CD2 7404 <1> jz .noaddressprefix ; if 32-bit CS and 32-bit addressing --> 3712 <1> %else 3713 <1> jz .noaddressprefix ; 16-bit addressing in RM --> 3714 <1> %endif 3715 <1> ; Otherwise, the CS and addressing bitness mismatch. Write a prefix. 3716 00000CD4 B067 <1> mov al, 67h 3717 00000CD6 67 <1> _386_PM_a32 3718 00000CD7 AA <1> stosb ; store address size prefix 3719 <1> .noaddressprefix: 3720 <1> 3721 <1> ;--- a 66h data size prefix is needed 3722 <1> ;--- for CS16: if VAR_D32 == 1 or AMF_D32 == 1 3723 <1> ;--- for CS32: if VAR_D16 == 1 or AMF_D16 == 1 3724 <1> 3725 00000CD8 8A26[9581] <1> mov ah, byte [asm_mn_flags] 3726 00000CDC A0[A681] <1> mov al, byte [varflags] 3727 <1> %if _PM 3728 00000CDF F606[DB88]40 <1> test byte [bCSAttr], 40h 3729 00000CE4 7407 <1> jz .dataprefix_rm 3730 00000CE6 A92040 <1> test ax, VAR_D16|(AMF_D16<<8) 3731 00000CE9 7507 <1> jnz .dataprefix 3732 00000CEB EB09 <1> jmp short .nodataprefix 3733 <1> .dataprefix_rm: 3734 <1> %endif 3735 00000CED A94001 <1> test ax, VAR_D32|(AMF_D32<<8) 3736 00000CF0 7404 <1> jz .nodataprefix 3737 <1> .dataprefix: 3738 00000CF2 B066 <1> mov al, 66h 3739 00000CF4 67 <1> _386_PM_a32 3740 00000CF5 AA <1> stosb ; store operand size prefix 3741 <1> .nodataprefix: 3742 <1> 3743 00000CF6 A0[9781] <1> mov al, [aa_seg_pre] 3744 00000CF9 3C00 <1> cmp al, 0 3745 00000CFB 740B <1> je ac22 ; if no segment prefix 3746 00000CFD 67 <1> _386_PM_a32 3747 00000CFE AA <1> stosb 3748 00000CFF 3C64 <1> cmp al, 64h 3749 00000D01 7205 <1> jb ac22 ; if not 64 or 65 (FS or GS) --> 3750 00000D03 800E[9581]20 <1> or byte [asm_mn_flags], AMF_FSGS ; flag it 3751 <1> ac22: 3752 <1> 3753 <1> ; Now emit the instruction itself. 3754 00000D08 A1[AA81] <1> mov ax, word [a_opcode] 3755 00000D0B 89C3 <1> mov bx, ax 3756 00000D0D 81EB4002 <1> sub bx, 240h 3757 00000D11 7317 <1> jae ac23 ; if 576.. (AGRP) --> 3758 00000D13 3D0002 <1> cmp ax, 200h 3759 00000D16 7229 <1> jb ac24 ; if regular instruction --> 3760 00000D18 800E[A381]01 <1> or byte [dmflags], DM_COPR ; flag it as an x87 instruction 3761 00000D1D 2438 <1> and al, 38h ; get register part 3762 00000D1F 0806[9C81] <1> or byte [regmem], al 3763 00000D23 93 <1> xchg ax, bx ; mov ax, bx (the low bits of bx are good) 3764 00000D24 2407 <1> and al, 7 3765 00000D26 0CD8 <1> or al, 0D8h 3766 00000D28 EB21 <1> jmp short ac25 ; on to decoding the instruction 3767 <1> 3768 <1> ac23: 3769 00000D2A 800E[A681]02 <1> or byte [varflags], VAR_MODRM ; flag presence of ModR/M byte 3770 00000D2F B103 <1> mov cl, 3 ; one instruction of a group 3771 00000D31 D3EB <1> shr bx, cl ; separate AGRP()'s num part 3772 00000D33 2407 <1> and al, 7 ; separate ModR/M register value 3773 00000D35 D2E0 <1> shl al, cl 3774 00000D37 0806[9C81] <1> or byte [regmem], al ; fix ModR/M byte 3775 00000D3B D1E3 <1> shl bx, 1 3776 00000D3D 8B87[7801] <1> mov ax, word [agroups+bx] ; get actual opcode 3777 <1> 3778 <1> ac24: 3779 00000D41 84E4 <1> test ah, ah 3780 00000D43 7406 <1> jz ac25 ; if no 0Fh first --> 3781 00000D45 50 <1> push ax ; store a 0Fh 3782 00000D46 B00F <1> mov al, 0Fh 3783 00000D48 67 <1> _386_PM_a32 3784 00000D49 AA <1> stosb 3785 00000D4A 58 <1> pop ax 3786 <1> ac25: 3787 00000D4B 0A06[A481] <1> or al, byte [opcode_or] ; put additional bits into the opcode 3788 00000D4F 67 <1> _386_PM_a32 3789 00000D50 AA <1> stosb ; store the op code itself 3790 <1> 3791 <1> ; Now store the extra stuff that comes with the instruction. 3792 00000D51 A1[9C81] <1> mov ax, word [regmem] 3793 00000D54 F606[A681]02 <1> test byte [varflags], VAR_MODRM 3794 00000D59 740D <1> jz ac26 ; if no ModR/M --> 3795 00000D5B 67 <1> _386_PM_a32 3796 00000D5C AA <1> stosb ; store the ModR/M byte 3797 00000D5D F606[9581]08 <1> test byte [asm_mn_flags], AMF_SIB 3798 00000D62 7404 <1> jz ac26 ; if no SIB --> 3799 00000D64 88E0 <1> mov al, ah 3800 00000D66 67 <1> _386_PM_a32 3801 00000D67 AA <1> stosb ; store the SIB byte, too 3802 <1> ac26: 3803 <1> 3804 00000D68 8B1E[9A81] <1> mov bx, word [rmaddr] 3805 00000D6C 85DB <1> test bx, bx 3806 00000D6E 740D <1> jz ac27 ; if no offset associated with the R/M --> 3807 00000D70 66 <1> _386_PM_o32 ; xor ecx, ecx 3808 00000D71 31C9 <1> xor cx, cx 3809 00000D73 8A4F03 <1> mov cl, byte [bx+OPRND.sizedis] 3810 00000D76 66 <1> _386_PM_o32 ; lea esi, [bx+OPRND.num] 3811 00000D77 8D7708 <1> lea si, [bx+OPRND.num] 3812 00000D7A 67 <1> _386_PM_a32 3813 00000D7B F3A4 <1> rep movsb ; store the R/M offset (or memory offset) 3814 <1> ac27: 3815 <1> 3816 <1> ; Now store immediate data 3817 00000D7D 8B1E[9E81] <1> mov bx, word [immaddr] 3818 00000D81 85DB <1> test bx, bx 3819 00000D83 740E <1> jz ac28 ; if no immediate data --> 3820 00000D85 66 <1> _386_PM_o32 ; xor ecx, ecx 3821 00000D86 31C9 <1> xor cx, cx 3822 00000D88 8A0E[A581] <1> mov cl, byte [opsize] 3823 00000D8C 66 <1> _386_PM_o32 ; lea esi, [bx+OPRND.num] 3824 00000D8D 8D7708 <1> lea si, [bx+OPRND.num] 3825 00000D90 67 <1> _386_PM_a32 3826 00000D91 F3A4 <1> rep movsb 3827 <1> ac28: 3828 <1> 3829 <1> ; Now store additional bytes (needed for, e.g., enter instruction 3830 <1> ; and far memory address) 3831 00000D93 8B1E[A081] <1> mov bx, word [xxaddr] 3832 00000D97 85DB <1> test bx, bx 3833 00000D99 740D <1> jz ac29 ; if no additional data --> 3834 00000D9B 66 <1> _386_PM_o32 ; lea esi, [bx+OPRND.numadd] 3835 00000D9C 8D7704 <1> lea si, [bx+OPRND.numadd] 3836 00000D9F 66 <1> _386_PM_o32 ; xor eax, eax 3837 00000DA0 31C0 <1> xor ax, ax 3838 00000DA2 AC <1> lodsb 3839 00000DA3 66 <1> _386_PM_o32 ; xchg eax, ecx 3840 00000DA4 91 <1> xchg ax, cx ; (mov cx, ax) 3841 00000DA5 67 <1> _386_PM_a32 3842 00000DA6 F3A4 <1> rep movsb 3843 <1> ac29: 3844 <1> 3845 <1> ; Done emitting. Update assembler address offset. 3846 00000DA8 16 <1> push ss 3847 00000DA9 07 <1> pop es ; restore es 3848 00000DAA 66 <1> _386_PM_o32 ; mov dword [a_addr], edi 3849 00000DAB 893E[000B] <1> mov word [a_addr], di 3850 <1> 3851 <1> ; Compute machine type. 3852 00000DAF 803E[A281]03 <1> cmp byte [dismach], 3 3853 00000DB4 7313 <1> jae ac31 ; if we already know a 386 is needed 3854 00000DB6 F606[9581]25 <1> test byte [asm_mn_flags], AMF_D32 | AMF_A32 | AMF_FSGS 3855 00000DBB 7507 <1> jnz ac30 ; if 386 --> 3856 00000DBD F606[A681]40 <1> test byte [varflags], VAR_D32 3857 00000DC2 7405 <1> jz ac31 ; if not 386 --> 3858 <1> ac30: 3859 00000DC4 C606[A281]03 <1> mov byte [dismach], 3 3860 <1> ac31: 3861 00000DC9 BF[AE81] <1> mov di, a_obstab ; info on this instruction 3862 00000DCC 8B0E[AC81] <1> mov cx, word [a_opcode2] 3863 00000DD0 E8244B <1> call showmach ; get machine message into si, length into cx 3864 00000DD3 E308 <1> jcxz ac33 ; if no message 3865 <1> 3866 <1> ac32: 3867 00000DD5 BF[0E08] <1> mov di, line_out 3868 00000DD8 F3A4 <1> rep movsb ; copy the line to line_out 3869 00000DDA E849AC <1> call putsline_crlf 3870 <1> 3871 <1> ac33: 3872 00000DDD E95FF7 <1> jmp aa01 ; back for the next input line 3873 <1> 3874 <1> %if 0 3875 <1> ; This is debugging code. It assumes that the original value 3876 <1> ; of a_addr is on the top of the stack. 3877 <1> pop si ; get orig. a_addr 3878 <1> mov ax, word [a_addr + saSegSel] 3879 <1> mov word [u_addr], si 3880 <1> mov word [u_addr + saSegSel], ax ; (doesn't work with 32-bit CS) 3881 <1> %if _PM 3882 <1> mov ax, word [a_addr + saSegment] 3883 <1> mov word [u_addr + saSegment], ax 3884 <1> mov ax, word [a_addr + saSelector] 3885 <1> mov word [u_addr + saSelector], ax 3886 <1> %endif 3887 <1> mov bx, word [a_addr] 3888 <1> sub bx, si 3889 <1> mov di, line_out 3890 <1> mov cx, 10 3891 <1> mov al, ' ' 3892 <1> rep stosb 3893 <1> mov ds, word [a_addr + saSegSel] 3894 <1> 3895 <1> ax1: lodsb 3896 <1> call hexbyte ; display the generated bytes 3897 <1> dec bx 3898 <1> jnz ax1 3899 <1> push ss 3900 <1> pop ds 3901 <1> call putsline_crlf 3902 <1> and word [disflags], 0 3903 <1> call disasm ; disassemble the new instruction 3904 <1> jmp aa01 ; back to next input line 3905 <1> %endif 3906 <1> 3907 <1> ; Routines to check for specific operand types. 3908 <1> ; Upon success, the routine returns. 3909 <1> ; Upon failure, it pops the return address and jumps to ac01. 3910 <1> ; The routines must preserve si and di. 3911 <1> 3912 <1> ; OP_RM, OP_M, OP_R_MOD: form MOD R/M byte. 3913 <1> aop_rm: 3914 <1> aop_m: 3915 <1> aop_r_mod: 3916 00000DE0 E86903 <1> call ao90 ; form reg/mem byte 3917 00000DE3 EB30 <1> jmp short ao07 ; go to the size check 3918 <1> 3919 <1> ; OP_R: register. 3920 <1> aop_r: 3921 00000DE5 8A4504 <1> mov al, byte [di+OPRND.reg1] ; register number 3922 00000DE8 2407 <1> and al, 7 3923 00000DEA B103 <1> mov cl, 3 3924 00000DEC D2E0 <1> shl al, cl ; shift it into place 3925 00000DEE 0806[9C81] <1> or byte [regmem], al ; put it into the reg/mem byte 3926 00000DF2 EB21 <1> jmp short ao07 ; go to the size check 3927 <1> 3928 <1> ; OP_R_ADD: register, added to the instruction. 3929 <1> aop_r_add: 3930 00000DF4 8A4504 <1> mov al, byte [di+OPRND.reg1] 3931 00000DF7 2407 <1> and al, 7 3932 00000DF9 A2[A481] <1> mov byte [opcode_or], al ; put it there 3933 00000DFC EB17 <1> jmp short ao07 ; go to the size check 3934 <1> 3935 <1> ; OP_IMM: immediate data. 3936 <1> aop_imm: 3937 00000DFE 893E[9E81] <1> mov word [immaddr], di ; save the location of this 3938 00000E02 EB11 <1> jmp short ao07 ; go to the size check 3939 <1> 3940 <1> ; OP_MOFFS: just the memory offset 3941 <1> aop_moffs: 3942 00000E04 F60502 <1> test byte [di+OPRND.flags], ARG_MODRM 3943 00000E07 754F <1> jnz ao11 ; if MOD R/M byte ( ==> reject) 3944 00000E09 893E[9A81] <1> mov word [rmaddr], di ; save the operand pointer 3945 00000E0D EB06 <1> jmp short ao07 ; go to the size check 3946 <1> 3947 <1> ; OP_AX: check for AL/AX/EAX 3948 <1> aop_ax: 3949 00000E0F F6450407 <1> test byte [di+OPRND.reg1], 7 3950 00000E13 7543 <1> jnz ao11 ; if wrong register, reject --> 3951 <1> ; jmp short ao07 ; go to the size check 3952 <1> 3953 <1> ; Size check 3954 <1> ao07: 3955 00000E15 800E[A681]10 <1> or byte [varflags], VAR_SIZ_NEED 3956 00000E1A A0[A881] <1> mov al, byte [a_reqsize] 3957 00000E1D 2C05 <1> sub al, 5 ; OP_1632 >> 4 3958 00000E1F 7C3A <1> jl ao12 ; if OP_ALL 3959 00000E21 7463 <1> je ao13 ; if OP_1632 3960 00000E23 3C05 <1> cmp al, 5 ; OP_1632_DEFAULT ? 3961 00000E25 7444 <1> je ao_1632_default 3962 <1> ; OP_8 = 1, OP_16 = 2, OP_32 = 3, OP_64 = 4 3963 00000E27 04FD <1> add al, -3 3964 00000E29 1403 <1> adc al, 3 ; convert 3 --> 4 and 4 --> 5 3965 <1> ao08: 3966 00000E2B 800E[A681]18 <1> or byte [varflags], VAR_SIZ_FORCD| VAR_SIZ_NEED 3967 <1> ao08_1: 3968 00000E30 8A5D02 <1> mov bl, byte [di+OPRND.sizearg] 3969 00000E33 84DB <1> test bl, bl ; SIZ_NONE ? 3970 00000E35 7409 <1> jz ao09 ; yes, if no size given --> 3971 00000E37 800E[A681]04 <1> or byte [varflags], VAR_SIZ_GIVN 3972 00000E3C 38D8 <1> cmp al, bl 3973 00000E3E 7518 <1> jne ao11 ; if sizes conflict, reject --> 3974 <1> ao09: 3975 00000E40 3A06[A581] <1> cmp al, byte [opsize] 3976 00000E44 7411 <1> je ao10 ; if sizes agree --> 3977 00000E46 3CFF <1> cmp al, -1 ; is it OP_MXX (for lea) ? 3978 00000E48 740D <1> je ao10 3979 00000E4A 8606[A581] <1> xchg al, byte [opsize] 3980 00000E4E 3C00 <1> cmp al, SIZ_NONE 3981 00000E50 7506 <1> jne ao11 ; if sizes disagree, reject --> 3982 00000E52 800E[A681]04 <1> or byte [varflags], VAR_SIZ_GIVN ; added in DEBUG/X 1.18 3983 <1> ao10: 3984 00000E57 C3 <1> retn 3985 <1> 3986 <1> ao11: 3987 <1> ao50_j1: 3988 00000E58 E9DE02 <1> jmp ao50 ; reject 3989 <1> 3990 <1> ; OP_ALL - Allow all sizes. 3991 <1> ao12: 3992 00000E5B 8A4502 <1> mov al, byte [di+OPRND.sizearg] 3993 00000E5E 3C01 <1> cmp al, SIZ_BYTE 3994 00000E60 743F <1> je ao15 ; if byte 3995 00000E62 7225 <1> jb ao14 ; if unknown (SIZ_NONE) --> 3996 00000E64 800E[A481]01 <1> or byte [opcode_or], 1 ; set bit in instruction 3997 00000E69 EB1E <1> jmp short ao14 ; if size is 16 or 32 3998 <1> 3999 <1> ; OP_1632_DEFAULT 4000 <1> ao_1632_default: 4001 00000E6B 8A4502 <1> mov al, byte [di+OPRND.sizearg] 4002 00000E6E 84C0 <1> test al, al ; SIZ_NONE ? 4003 00000E70 751B <1> jnz @F ; no --> 4004 00000E72 A0[A581] <1> mov al, byte [opsize] ; (for push imm16/32) 4005 00000E75 84C0 <1> test al, al ; SIZ_NONE ? 4006 00000E77 7514 <1> jnz @F ; no --> 4007 00000E79 B002 <1> mov al, SIZ_WORD 4008 <1> %if _PM 4009 00000E7B F606[DB88]40 <1> test byte [bCSAttr], 40h 4010 00000E80 740B <1> jz @F 4011 00000E82 B004 <1> mov al, SIZ_DWORD 4012 <1> %endif 4013 00000E84 EB07 <1> jmp @F 4014 <1> 4015 <1> ; OP_1632 - word or dword. 4016 <1> ao13: 4017 00000E86 8A4502 <1> mov al, byte [di+OPRND.sizearg] 4018 <1> ao14: 4019 00000E89 84C0 <1> test al, al ; SIZ_NONE ? 4020 00000E8B 741B <1> jz ao16 ; yes, if still unknown --> 4021 <1> @@: 4022 00000E8D 3C02 <1> cmp al, SIZ_WORD 4023 00000E8F 7507 <1> jne ao15_1 ; if word 4024 00000E91 800E[A681]20 <1> or byte [varflags], VAR_D16 4025 00000E96 EB09 <1> jmp short ao15 4026 <1> ao15_1: 4027 00000E98 3C04 <1> cmp al, SIZ_DWORD 4028 00000E9A 75BC <1> jne ao11 ; if not dword 4029 00000E9C 800E[A681]40 <1> or byte [varflags], VAR_D32 ; set flag 4030 <1> ao15: 4031 00000EA1 800E[A681]04 <1> or byte [varflags], VAR_SIZ_GIVN 4032 <1> ; hack for pushd/pushw imm: check for match 4033 00000EA6 EB98 <1> jmp ao09 4034 <1> ao16: 4035 00000EA8 C3 <1> retn 4036 <1> 4037 <1> ; OP_M64 - 64-bit memory reference. 4038 <1> ; OP_MFLOAT - single-precision floating point memory reference. 4039 <1> ; OP_MDOUBLE - double-precision floating point memory reference. 4040 <1> ; OP_M80 - 80-bit memory reference. 4041 <1> ; OP_MXX - memory reference, size unknown. 4042 <1> ; INP: (from ac08 calling this:) 4043 <1> ; bx = index into bittab 4044 <1> ao17: 4045 00000EA9 E8A002 <1> call ao90 ; form reg/mem byte 4046 00000EAC 8A87[8D82] <1> mov al, byte [asm_siznum + bx - (OP_FIRST_ASM_SIZNUM + 16 - 1)] 4047 00000EB0 E978FF <1> jmp ao08 ; check size 4048 <1> 4049 <1> ; OP_FARIMM - far address contained in instruction 4050 <1> ao21: 4051 00000EB3 8A4502 <1> mov al, byte [di+OPRND.sizearg] 4052 00000EB6 84C0 <1> test al, al ; have a size ? (check for not SIZ_NONE) 4053 00000EB8 750B <1> jnz @F ; yes --> 4054 00000EBA B002 <1> mov al, SIZ_WORD ; default to word, assuming 16-bit CS 4055 <1> %if _PM 4056 00000EBC F606[DB88]40 <1> test byte [bCSAttr], 40h; is it a 32-bit CS ? 4057 00000EC1 7402 <1> jz @F ; no --> 4058 00000EC3 B004 <1> mov al, SIZ_DWORD ; yes, default to dword 4059 <1> %endif 4060 <1> 4061 <1> @@: 4062 00000EC5 3C02 <1> cmp al, SIZ_WORD ; is it word ? 4063 00000EC7 750D <1> jne .o32_check ; no, check for dword size --> 4064 <1> .o16: 4065 00000EC9 800E[A681]20 <1> or byte [varflags], VAR_D16 4066 <1> ; mark flag for o16 prefix if needed 4067 <1> 4068 00000ECE 837D0A00 <1> cmp word [di+OPRND.num+2], byte 0 4069 00000ED2 7504 <1> jne ..@ao50_j_NZ ; if not a 16-bit offset --> 4070 <1> 4071 00000ED4 EB0C <1> jmp short .common 4072 <1> 4073 <1> .o32_check: 4074 00000ED6 3C04 <1> cmp al, SIZ_DWORD ; is it dword ? 4075 <1> ..@ao50_j_NZ: 4076 00000ED8 7403E95C02 <1> jne ao50 ; no, invalid --> 4077 <1> .o32: 4078 00000EDD 800E[A681]40 <1> or byte [varflags], VAR_D32 4079 <1> ; mark flag for o32 prefix if needed 4080 <1> 4081 <1> .common: 4082 00000EE2 800E[A681]04 <1> or byte [varflags], VAR_SIZ_GIVN 4083 <1> 4084 00000EE7 C6450402 <1> mov byte [di+OPRND.numadd], 2 ; 2 additional bytes (segment part) 4085 00000EEB 893E[9E81] <1> mov word [immaddr], di 4086 00000EEF A2[A581] <1> mov byte [opsize], al ; size of offset, 2 or 4 4087 <1> ao22a: 4088 00000EF2 893E[A081] <1> mov word [xxaddr], di 4089 00000EF6 C3 <1> retn 4090 <1> 4091 <1> ; OP_REL8 - relative address 4092 <1> ao23: 4093 00000EF7 807D0200 <1> cmp byte [di+OPRND.sizearg], SIZ_NONE 4094 00000EFB 75DB <1> jne ..@ao50_j_NZ 4095 <1> 4096 00000EFD 66 <1> _386_PM_o32 4097 00000EFE A1[000B] <1> mov ax, word [a_addr] ; offset 4098 00000F01 66 <1> _386_PM_o32 4099 00000F02 40 <1> inc ax 4100 00000F03 66 <1> _386_PM_o32 4101 00000F04 40 <1> inc ax ; $ 4102 00000F05 8A0E[9581] <1> mov cl, byte [asm_mn_flags] 4103 <1> 4104 00000F09 F6C180 <1> test cl, AMF_ADDR 4105 00000F0C 7517 <1> jnz ao23aa 4106 <1> ; JxCXZ, LOOPx, LOOPZx and LOOPNZx need a 67h, not a 66h prefix 4107 00000F0E F6C141 <1> test cl, AMF_D32 | AMF_D16 4108 00000F11 7422 <1> jz ao23b ; if not JxCXZ, LOOPx 4109 00000F13 F6C101 <1> test cl, AMF_D32 4110 00000F16 7403 <1> jz ao23a 4111 00000F18 80C904 <1> or cl, AMF_A32 4112 <1> ao23a: 4113 00000F1B 80E1BE <1> and cl, ~(AMF_D32 | AMF_D16) 4114 00000F1E 80C980 <1> or cl, AMF_ADDR 4115 00000F21 880E[9581] <1> mov byte [asm_mn_flags], cl 4116 <1> ao23aa: 4117 00000F25 80E104 <1> and cl, AMF_A32 4118 <1> %if _PM 4119 00000F28 0A0E[DB88] <1> or cl, byte [bCSAttr] 4120 00000F2C 7407 <1> jz ao23b ; 16-bit CS and addressing --> 4121 00000F2E 80F944 <1> cmp cl, AMF_A32| 40h 4122 00000F31 7402 <1> je ao23b ; 32-bit CS and addressing --> 4123 <1> %else 4124 <1> jz ao23b ; RM CS and 16-bit addressing --> 4125 <1> %endif 4126 00000F33 66 <1> _386_PM_o32 4127 00000F34 40 <1> inc ax ; adjust $ for the prefix that will be used 4128 <1> ao23b: 4129 00000F35 89C3 <1> mov bx, ax 4130 00000F37 31C9 <1> xor cx, cx 4131 00000F39 6650 <1> _386_PM push eax 4132 00000F3B 58 <1> _386_PM pop ax 4133 00000F3C 59 <1> _386_PM pop cx 4134 00000F3D 8B4508 <1> mov ax, word [di+OPRND.num+0] 4135 00000F40 8B550A <1> mov dx, word [di+OPRND.num+2] 4136 00000F43 29D8 <1> sub ax, bx 4137 00000F45 19CA <1> sbb dx, cx 4138 <1> 4139 00000F47 884505 <1> mov byte [di+OPRND.num2], al 4140 00000F4A 3D8000 <1> cmp ax, 80h ; just one byte beyond range ? 4141 00000F4D 750E <1> jne @F 4142 00000F4F 85D2 <1> test dx, dx 4143 00000F51 750A <1> jnz @F ; no --> 4144 00000F53 803C22 <1> cmp byte [si], OP_E_CX ; we're trying for loop with (e)cx explicit ? 4145 00000F56 7505 <1> jne @F ; no --> 4146 00000F58 800D80 <1> setopt [di + OPRND.flags], ARG_ECX_SPECIAL 4147 <1> ; remember that we have to overflow 4148 00000F5B EB0C <1> jmp @FF 4149 <1> @@: 4150 00000F5D B107 <1> mov cl, 7 4151 00000F5F D2F8 <1> sar al, cl 4152 00000F61 38E0 <1> cmp al, ah 4153 00000F63 7575 <1> jne ao24 ; if too big, reject --> 4154 00000F65 39D0 <1> cmp ax, dx 4155 00000F67 7571 <1> jne ao24 ; if too big, reject --> 4156 <1> @@: 4157 00000F69 C6450401 <1> mov byte [di+OPRND.numadd], 1 ; save the length 4158 00000F6D EB83 <1> jmp short ao22a ; save it away 4159 <1> 4160 <1> 4161 <1> ; OP_REL1632: relative jump/call to a longer address. 4162 <1> ; 4163 <1> ; size of instruction is 4164 <1> ; a) CS 16-bit: 4165 <1> ; 3 (xx xxxx, near jmp/call E9/E8) or 4166 <1> ; 4 (0F xx xxxx, near jcc 0F 80+cc) 4167 <1> ; 6 (66 xx xxxxxxxx, near 32-bit jmp/call E9/E8) 4168 <1> ; 7 (66 0F xx xxxxxxxx, near 32-bit jcc 0F 80+cc) 4169 <1> ; 4170 <1> ; b) CS 32-bit: 4171 <1> ; 5 (xx xxxxxxxx, near jmp/call E9/E8) or 4172 <1> ; 6 (0F xx xxxxxxxx, near jcc 0F 80+cc) 4173 <1> ; 4 (66 xx xxxx, near 16-bit jmp/call E9/E8) 4174 <1> ; 5 (66 0F xx xxxx, near 16-bit jcc 0F 80+cc) 4175 <1> ao25: 4176 00000F6F 8B1E[000B] <1> mov bx, word [a_addr+0] 4177 <1> %if _PM 4178 00000F73 8B0E[020B] <1> mov cx, word [a_addr+2] 4179 <1> %else 4180 <1> xor cx, cx 4181 <1> %endif 4182 <1> 4183 00000F77 31C0 <1> xor ax, ax 4184 00000F79 8A4502 <1> mov al, byte [di+OPRND.sizearg] 4185 00000F7C 84C0 <1> test al, al ; SIZ_NONE ? 4186 00000F7E 750B <1> jnz @F ; no --> 4187 00000F80 B002 <1> mov al, SIZ_WORD ; in 16-bit CS default to word (2) 4188 <1> %if _PM 4189 00000F82 F606[DB88]40 <1> test byte [bCSAttr], 40h 4190 00000F87 7402 <1> jz @F 4191 00000F89 B004 <1> mov al, SIZ_DWORD ; in 32-bit CS default to dword (4) 4192 <1> %endif 4193 <1> @@: 4194 00000F8B 50 <1> push ax ; preserve size 4195 <1> 4196 <1> %if _PM 4197 00000F8C F606[DB88]40 <1> test byte [bCSAttr], 40h 4198 00000F91 7404 <1> jz .adjust_16bitcs 4199 <1> .adjust_32bitcs: 4200 00000F93 3C04 <1> cmp al, SIZ_DWORD ; default size ? 4201 00000F95 EB02 <1> jmp .adjust_common 4202 <1> %endif 4203 <1> 4204 <1> .adjust_16bitcs: 4205 00000F97 3C02 <1> cmp al, SIZ_WORD ; default size ? 4206 <1> .adjust_common: 4207 00000F99 7401 <1> je .adjust_done 4208 00000F9B 40 <1> inc ax ; no, increment for 66h prefix (osize) 4209 <1> .adjust_done: 4210 <1> 4211 00000F9C 40 <1> inc ax ; add size of opcode (E8h/E9h/80h+cc) 4212 <1> 4213 00000F9D 813E[AA81]0001 <1> cmp word [a_opcode], 100h 4214 <1> ; is it a 0Fh-prefixed opcode ? 4215 <1> ; (that is, a 0Fh 80h+cc conditional jump) 4216 00000FA3 7201 <1> jb @F 4217 00000FA5 40 <1> inc ax ; add size of 0Fh prefix opcode 4218 <1> @@: 4219 00000FA6 01C3 <1> add bx, ax 4220 00000FA8 83D100 <1> adc cx, byte 0 4221 00000FAB 58 <1> pop ax ; restore size (2 or 4) 4222 00000FAC 8B550A <1> mov dx, word [di+OPRND.num+2] 4223 <1> 4224 00000FAF 3C04 <1> cmp al, SIZ_DWORD 4225 00000FB1 740B <1> je ao27_1 ; if the size given was "dword" --> 4226 <1> 4227 <1> ao27: 4228 00000FB3 85D2 <1> test dx, dx 4229 00000FB5 7523 <1> jnz ao24 ; if operand is too big, reject --> 4230 00000FB7 800E[A681]20 <1> or byte [varflags], VAR_D16 4231 00000FBC EB05 <1> jmp short ao28 4232 <1> 4233 <1> ao27_1: 4234 00000FBE 800E[A681]40 <1> or byte [varflags], VAR_D32 4235 <1> 4236 <1> ao28: 4237 00000FC3 884504 <1> mov byte [di+OPRND.numadd], al ; store the size 4238 00000FC6 8B4508 <1> mov ax, word [di+OPRND.num+0] 4239 00000FC9 31C9 <1> xor cx, cx 4240 00000FCB 29D8 <1> sub ax, bx 4241 00000FCD 19CA <1> sbb dx, cx ; compute DX:AX - CX:BX 4242 00000FCF 894505 <1> mov word [di+OPRND.num2+0], ax 4243 00000FD2 895507 <1> mov word [di+OPRND.num2+2], dx 4244 00000FD5 893E[A081] <1> mov word [xxaddr], di 4245 00000FD9 C3 <1> retn 4246 <1> 4247 <1> ao24: 4248 <1> ao50_j2: 4249 00000FDA E95C01 <1> jmp ao50 ; reject 4250 <1> 4251 <1> ; OP_1CHK - The assembler can ignore this one. 4252 <1> ao29: 4253 00000FDD 58 <1> pop ax ; discard return address 4254 <1> ac06_j2: 4255 00000FDE E943FC <1> jmp ac06_j1 ; next operand 4256 <1> 4257 <1> ; OP_STI - ST(I). 4258 <1> aop_sti: 4259 00000FE1 B01E <1> mov al, REG_ST ; code for ST 4260 00000FE3 8A5D05 <1> mov bl, byte [di+OPRND.reg2] 4261 00000FE6 EB47 <1> jmp short ao38 ; to common code --> 4262 <1> 4263 <1> ; OP_MMX (previously was OP_ECX (used for LOOPx)) 4264 <1> aop_mmx: 4265 00000FE8 B01F <1> mov al, REG_MM 4266 00000FEA EB3C <1> jmp short ao37 ; to common code --> 4267 <1> 4268 <1> ; OP_MMX_MOD 4269 <1> aop_mmx_mod: 4270 00000FEC B01F <1> mov al, REG_MM 4271 00000FEE 8A5D05 <1> mov bl, byte [di+OPRND.reg2] 4272 00000FF1 80CBC0 <1> or bl, 0C0h 4273 00000FF4 EB39 <1> jmp short ao38 4274 <1> 4275 <1> ; OP_CR 4276 <1> aop_cr: 4277 00000FF6 8A4505 <1> mov al, byte [di+OPRND.reg2] ; get the index 4278 00000FF9 3C04 <1> cmp al, 4 4279 00000FFB 77DD <1> ja ao24 ; if too big, reject --> 4280 00000FFD 7505 <1> jne ao32 ; if not CR4 4281 00000FFF C606[A281]05 <1> mov byte [dismach], 5 ; CR4 is new to the 586 4282 <1> ao32: 4283 00001004 3C01 <1> cmp al, 1 4284 00001006 7506 <1> jne ao33 4285 00001008 807D0CFF <1> cmp byte [di+OPRND_size+OPRND.flags], -1 4286 0000100C 75CC <1> jne ao24 ; reject if no other arg (can't mov CR1,xx) 4287 <1> ao33: 4288 0000100E B020 <1> mov al, REG_CR ; code for CR 4289 00001010 EB16 <1> jmp short ao37 ; to common code 4290 <1> 4291 <1> ; OP_DR 4292 <1> ao34: 4293 00001012 B021 <1> mov al, REG_DR ; code for DR 4294 00001014 EB12 <1> jmp short ao37 ; to common code 4295 <1> 4296 <1> ; OP_TR 4297 <1> ao35: 4298 00001016 8A4505 <1> mov al, byte [di+OPRND.reg2] ; get the index 4299 00001019 3C03 <1> cmp al, 3 4300 0000101B 72BD <1> jb ao24 ; if too small, reject --> 4301 0000101D 3C06 <1> cmp al, 6 4302 0000101F 7305 <1> jae ao36 4303 00001021 C606[A281]04 <1> mov byte [dismach], 4 ; TR3-5 are new to the 486 4304 <1> ao36: 4305 00001026 B022 <1> mov al, REG_TR ; code for TR 4306 <1> 4307 <1> ; Common code for these weird registers. 4308 <1> ao37: 4309 00001028 8A5D05 <1> mov bl, byte [di+OPRND.reg2] 4310 0000102B B103 <1> mov cl, 3 4311 0000102D D2E3 <1> shl bl, cl 4312 <1> ao38: 4313 0000102F 081E[9C81] <1> or byte [regmem], bl 4314 00001033 800E[A681]02 <1> or byte [varflags], VAR_MODRM 4315 00001038 3A4504 <1> cmp al, byte [di+OPRND.reg1] ; check for the right numbered register 4316 0000103B 7419 <1> je ao40 ; if yes, then return 4317 <1> ao38a: 4318 0000103D E9F900 <1> jmp ao50 ; reject --> 4319 <1> 4320 <1> ; OP_SEGREG 4321 <1> ao39: 4322 00001040 8A4504 <1> mov al, byte [di+OPRND.reg1] 4323 00001043 2C18 <1> sub al, 24 4324 00001045 3C06 <1> cmp al, 6 4325 00001047 73F4 <1> jae ao38a ; if not a segment register, reject --> 4326 00001049 B103 <1> mov cl, 3 4327 0000104B D2E0 <1> shl al, cl 4328 0000104D 0806[9C81] <1> or byte [regmem], al 4329 <1> ;--- v1.26: don't force size for MOV sreg, mxx / MOV mxx, sreg 4330 00001051 800E[A681]04 <1> or byte [varflags], VAR_SIZ_GIVN 4331 <1> ao40: 4332 00001056 C3 <1> retn 4333 <1> 4334 <1> ; OP_IMMS8 - Sign-extended immediate byte (PUSH xx) 4335 <1> ao41: 4336 00001057 8026[A681]EF <1> and byte [varflags], ~VAR_SIZ_NEED ; added for v1.09. Ok? 4337 <1> ao41_extend: 4338 0000105C 8B4508 <1> mov ax, word [di+OPRND.num+0] 4339 0000105F B107 <1> mov cl, 7 4340 00001061 D2F8 <1> sar al, cl 4341 00001063 EB05 <1> jmp short ao43 ; common code 4342 <1> 4343 <1> ; OP_IMM8 - Immediate byte 4344 <1> ao42: 4345 00001065 8B4508 <1> mov ax, word [di+OPRND.num+0] 4346 00001068 B000 <1> mov al, 0 4347 <1> ao43: 4348 0000106A 38E0 <1> cmp al, ah 4349 0000106C 7403E9C800 <1> jne ao50 ; if too big, reject --> 4350 00001071 3B450A <1> cmp ax, word [di+OPRND.num+2] 4351 00001074 7403E9C000 <1> jne ao50 ; if too big, reject --> 4352 00001079 B001 <1> mov al, SIZ_BYTE 4353 0000107B E8C000 <1> call aasizchk ; check that size == 0 or 1 4354 0000107E 8A6508 <1> mov ah, byte [di+OPRND.num+0] ; store the byte, length 1 4355 00001081 894504 <1> mov word [di+OPRND.numadd], ax ; store length (0/1) + the byte 4356 00001084 893E[A081] <1> mov word [xxaddr], di 4357 <1> ao43r: 4358 00001088 C3 <1> retn 4359 <1> 4360 <1> 4361 <1> aop_e_cx: 4362 00001089 B980FB <1> mov cx, AMF_ADDR | 0 | (~AMF_A32 << 8) 4363 0000108C 837D0409 <1> cmp word [di + OPRND.reg1], REG_CX 4364 00001090 740B <1> je .a16 4365 <1> .a32: 4366 00001092 B984FF <1> mov cx, AMF_ADDR | AMF_A32 | (~0 << 8) 4367 00001095 E80500 <1> call .common 4368 00001098 B011 <1> mov al, REG_CX + 8 4369 0000109A E99600 <1> jmp ao48a 4370 <1> 4371 <1> .a16: 4372 <1> .common: 4373 0000109D 202E[9581] <1> and byte [asm_mn_flags], ch 4374 000010A1 080E[9581] <1> or byte [asm_mn_flags], cl 4375 <1> 4376 000010A5 8B1E[A081] <1> mov bx, word [xxaddr] 4377 000010A9 8A0E[9581] <1> mov cl, byte [asm_mn_flags] 4378 000010AD 80E104 <1> and cl, AMF_A32 4379 <1> %if _PM 4380 000010B0 0A0E[DB88] <1> or cl, byte [bCSAttr] 4381 000010B4 7410 <1> jz .noprefix ; 16-bit CS and addressing --> 4382 000010B6 80F944 <1> cmp cl, AMF_A32| 40h 4383 000010B9 740B <1> je .noprefix ; 32-bit CS and addressing --> 4384 <1> %else 4385 <1> jz .noprefix ; 86 Mode CS and 16-bit addressing --> 4386 <1> %endif 4387 000010BB FE4F05 <1> dec byte [bx + OPRND.num2] 4388 000010BE 7105 <1> jno .ret ; (no need to check special flag) 4389 <1> .prefix_overflow: 4390 000010C0 F60780 <1> testopt [bx + OPRND.flags], ARG_ECX_SPECIAL 4391 000010C3 7406 <1> jz .ao50 ; not special, overflow -128 to +127 4392 <1> ; special, accept +128 to +127 4393 <1> .ret: 4394 000010C5 C3 <1> retn 4395 <1> 4396 <1> .noprefix: 4397 000010C6 F60780 <1> testopt [bx + OPRND.flags], ARG_ECX_SPECIAL 4398 000010C9 74FA <1> jz .ret ; not special, no prefix 4399 <1> ; special and no prefix: reject 4400 <1> .ao50: 4401 000010CB EB6C <1> jmp ao50 4402 <1> 4403 <1> 4404 <1> ; OP_SHOSIZ - force the user to declare the size of the next operand 4405 <1> ao44: 4406 000010CD F606[A681]10 <1> test byte [varflags], VAR_SIZ_NEED 4407 000010D2 7407 <1> jz ao45 ; if no testing needs to be done 4408 000010D4 F606[A681]04 <1> test byte [varflags], VAR_SIZ_GIVN 4409 000010D9 745E <1> jz ao50 ; if size was given ( ==> reject) 4410 <1> ao45: 4411 000010DB 8026[A681]FB <1> and byte [varflags], ~VAR_SIZ_GIVN ; clear the flag 4412 000010E0 803C11 <1> cmp byte [si], OP_IMM8 4413 000010E3 7405 <1> je ao45a ; if OP_IMM8 is next, then don't set VAR_SIZ_NEED 4414 000010E5 800E[A681]10 <1> or byte [varflags], VAR_SIZ_NEED 4415 <1> ao45a: 4416 <1> 4417 <1> ; hack for pushd/pushw imm (the only OP_SHOSIZ with suffix), 4418 <1> ; set operand size to 2 for pushw, 4 for pushd. 4419 <1> ; this is checked by ao15 later so as to match. 4420 000010EA B002 <1> mov al, 2 4421 000010EC 8A26[9481] <1> mov ah, byte [aa_mnemsuffix] 4422 <1> ; 0 = normal, 'W' suffix, or 'D' suffix 4423 000010F0 80FC44 <1> cmp ah, 'D' 4424 000010F3 7407 <1> je @F ; if D, al = 2 --> 4425 000010F5 48 <1> dec ax ; al = 1 4426 000010F6 80FC57 <1> cmp ah, 'W' 4427 000010F9 7401 <1> je @F ; if W, al = 1 --> 4428 000010FB 48 <1> dec ax ; al = 0 4429 <1> @@: 4430 000010FC 00C0 <1> add al, al ; 0 = no suffix, 2 = 'W' suffix, 4 = 'D' suffix 4431 <1> ; as 0 = SIZ_NONE, 2 = SIZ_WORD, 4 = SIZ_DWORD 4432 000010FE A2[A581] <1> mov byte [opsize], al 4433 <1> ao_modifier_continue: 4434 00001101 58 <1> pop ax ; discard return address 4435 00001102 E9D9FE <1> jmp ac06_j2 ; next operand 4436 <1> 4437 <1> 4438 <1> ao_short: 4439 00001105 B001 <1> mov al, odfShort 4440 <1> ao_distance: 4441 00001107 0806[A781] <1> or byte [alloweddist], al 4442 0000110B EBF4 <1> jmp ao_modifier_continue 4443 <1> 4444 <1> ao_near: 4445 0000110D B002 <1> mov al, odfNear 4446 0000110F EBF6 <1> jmp ao_distance 4447 <1> 4448 <1> ao_far_required: 4449 00001111 F6450104 <1> test byte [di + OPRND.distflags], odfFar 4450 00001115 7422 <1> jz ao50 ; if not far, reject --> 4451 <1> ao_far: 4452 00001117 B004 <1> mov al, odfFar 4453 00001119 EBEC <1> jmp ao_distance 4454 <1> 4455 <1> 4456 <1> ; OP_1 4457 <1> ao46: 4458 0000111B 817D070101 <1> cmp word [di+OPRND.orednum], 101h 4459 <1> ; check both size and value (OPRND.num) 4460 00001120 EB15 <1> jmp short ao49 ; test it later 4461 <1> 4462 <1> ; OP_3 4463 <1> ao47: 4464 00001122 807D0200 <1> cmp byte [di + OPRND.sizearg], SIZ_NONE 4465 00001126 7511 <1> jne ao50 ; if BYTE is specified, reject this --> 4466 00001128 817D070103 <1> cmp word [di+OPRND.orednum], 301h 4467 <1> ; check both size and value (OPRND.num) 4468 0000112D EB08 <1> jmp short ao49 ; test it later 4469 <1> 4470 <1> ; OP_DX, OP_CL, OP_ST, OP_ES, ..., OP_GS 4471 <1> ; INP: (from ac08 calling this:) 4472 <1> ; bx = index into bittab 4473 <1> ao48: 4474 0000112F 8A87[6082] <1> mov al, [asm_regnum + bx - (OP_FIRST_ASM_REGNUM + 16 - 1)] 4475 <1> ao48a: 4476 00001133 98 <1> cbw 4477 00001134 3B4504 <1> cmp ax, word [di+OPRND.reg1] 4478 <1> 4479 <1> ao49: 4480 00001137 7404 <1> je ao51 4481 <1> 4482 <1> ; Reject this operand list. 4483 <1> ao50: 4484 00001139 58 <1> pop ax ; discard return address 4485 0000113A E90DFA <1> jmp ac01 ; go back to try the next alternative 4486 <1> 4487 <1> ao51: 4488 0000113D C3 <1> retn 4489 <1> 4490 <1> ; AASIZCHK - Check that the size given is 0 or AL. 4491 <1> aasizchk: 4492 0000113E 807D0200 <1> cmp byte [di+OPRND.sizearg], SIZ_NONE 4493 00001142 74F9 <1> je ao51 4494 00001144 384502 <1> cmp byte [di+OPRND.sizearg], al 4495 00001147 74F4 <1> je ao51 4496 00001149 58 <1> pop ax ; discard return address 4497 0000114A EBED <1> jmp short ao50 ; reject this list --> 4498 <1> 4499 <1> ; Do reg/mem processing. 4500 <1> ; 4501 <1> ; INP: di-> OPRND structure 4502 <1> ; CHG: ax 4503 <1> ao90: 4504 0000114C F60504 <1> test byte [di+OPRND.flags], ARG_JUSTREG 4505 0000114F 7516 <1> jnz ao92 ; if just register 4506 00001151 F60502 <1> test byte [di+OPRND.flags], ARG_MODRM 4507 00001154 7405 <1> jz ao91 ; if no precomputed MOD R/M byte 4508 00001156 8B4504 <1> mov ax, word [di+OPRND.reg1] ; get the precomputed bytes 4509 00001159 EB1A <1> jmp short ao93 ; done 4510 <1> 4511 <1> ao91: 4512 0000115B B006 <1> mov al, 6 ; convert plain displacement to MOD R/M 4513 0000115D F606[9581]04 <1> test byte [asm_mn_flags], AMF_A32 4514 00001162 7411 <1> jz ao93 ; if 16-bit addressing 4515 00001164 48 <1> dec ax 4516 00001165 EB0E <1> jmp short ao93 ; done 4517 <1> 4518 <1> ao92: 4519 00001167 8A4504 <1> mov al, byte [di+OPRND.reg1] ; convert register to MOD R/M 4520 <1> %if 1 4521 0000116A 3C1F <1> cmp al, REG_MM 4522 0000116C 7503 <1> jne .notmm 4523 0000116E 8A4505 <1> mov al, byte [di+OPRND.reg2] 4524 <1> .notmm: 4525 <1> %endif 4526 00001171 2407 <1> and al, 7 ; get low 3 bits 4527 00001173 0CC0 <1> or al, 0C0h 4528 <1> 4529 <1> ao93: 4530 00001175 0906[9C81] <1> or word [regmem], ax ; store the MOD R/M and SIB 4531 00001179 800E[A681]02 <1> or byte [varflags], VAR_MODRM ; flag its presence 4532 0000117E 893E[9A81] <1> mov word [rmaddr], di ; save a pointer 4533 00001182 C3 <1> retn ; done 4534 <1> 4535 <1> ; AAIFNUM - Determine if a number starts here 4536 <1> ; 4537 <1> ; INP: al = first character 4538 <1> ; si-> next character 4539 <1> ; OUT: CY if no number starts there 4540 <1> ; NC if a number starts there 4541 <1> ; CHG: - 4542 <1> ; 4543 <1> ; Note: Actually checks for a plus or minus sign that 4544 <1> ; is followed by a valid (hexadecimal) digit, 4545 <1> ; or just a digit without specified sign. 4546 <1> aaifnum: 4547 00001183 56 <1> push si 4548 00001184 50 <1> push ax 4549 00001185 3C2D <1> cmp al, '-' ; minus or plus sign ? 4550 00001187 7404 <1> je @F 4551 00001189 3C2B <1> cmp al, '+' 4552 0000118B 7503 <1> jne @FF ; no --> 4553 <1> @@: 4554 0000118D E8B3A7 <1> call skipwhite ; skip sign, and (if any) blanks 4555 <1> @@: 4556 00001190 3C28 <1> cmp al, '(' 4557 00001192 F9 <1> stc 4558 00001193 7404 <1> je @F 4559 00001195 2C30 <1> sub al, '0' 4560 00001197 3C0A <1> cmp al, 10 4561 <1> @@: 4562 00001199 58 <1> pop ax 4563 0000119A 7208 <1> jb @F ; if a decimal digit --> 4564 <1> 4565 0000119C 50 <1> push ax 4566 0000119D 24DF <1> and al, TOUPPER 4567 0000119F 2C41 <1> sub al, 'A' 4568 000011A1 3C06 <1> cmp al, 6 4569 000011A3 58 <1> pop ax 4570 <1> @@: 4571 000011A4 F5 <1> cmc ; carry clear <==> it's a number 4572 000011A5 5E <1> pop si 4573 000011A6 C3 <1> retn 4574 <1> 4575 <1> 4576 <1> ; AAGETI - Get a number from the input line. 4577 <1> ; 4578 <1> ; Entry AL First character of number 4579 <1> ; SI Address of next character of number 4580 <1> ; Exit DX:BX Resulting number 4581 <1> ; CL 1 if it's a byte, 2 if a word, 4 if a dword 4582 <1> ; AL Next character not in number 4583 <1> ; SI Address of next character after that 4584 <1> ; Uses AH, CH 4585 <1> aageti: 4586 <1> ; Incorporate expression evaluator here. 4587 000011A7 3C2D <1> cmp al, '-' 4588 000011A9 7416 <1> je aag1 ; if negative number --> 4589 000011AB 3C2B <1> cmp al, '+' ; (unnecessary) plus sign ? 4590 000011AD 7503 <1> jne @F ; no --> 4591 000011AF E891A7 <1> call skipwhite ; skip it, plus blanks 4592 <1> @@: 4593 000011B2 E84100 <1> call aag4 ; get the bare number 4594 000011B5 B90100 <1> mov cx, 1 ; set up cx 4595 000011B8 09D2 <1> or dx, dx 4596 000011BA 7536 <1> jnz aag2 ; if dword 4597 000011BC 08FF <1> or bh, bh 4598 000011BE 7534 <1> jnz aag3 ; if word 4599 000011C0 C3 <1> retn ; it's a byte 4600 <1> 4601 <1> aag1: 4602 000011C1 E87FA7 <1> call skipwhite 4603 000011C4 E82F00 <1> call aag4 ; get the bare number 4604 000011C7 89D9 <1> mov cx, bx 4605 000011C9 09D1 <1> or cx, dx 4606 000011CB B90100 <1> mov cx, 1 4607 000011CE 7421 <1> jz aag1a ; if -0 4608 000011D0 F7D2 <1> not dx ; negate the answer 4609 000011D2 F7DB <1> neg bx 4610 000011D4 F5 <1> cmc 4611 000011D5 83D200 <1> adc dx, byte 0 4612 000011D8 F6C680 <1> test dh, 80h 4613 000011DB 7453 <1> jz aag7 ; if error 4614 000011DD 83FAFF <1> cmp dx, byte -1 4615 000011E0 7510 <1> jne aag2 ; if dword 4616 000011E2 F6C780 <1> test bh, 80h 4617 000011E5 740B <1> jz aag2 ; if dword 4618 000011E7 80FFFF <1> cmp bh, -1 4619 000011EA 7508 <1> jne aag3 ; if word 4620 000011EC F6C380 <1> test bl, 80h 4621 000011EF 7403 <1> jz aag3 ; if word 4622 <1> aag1a: 4623 <1> aag4.got_expr: 4624 000011F1 C3 <1> retn ; it's a byte 4625 <1> 4626 <1> aag2: 4627 000011F2 41 <1> inc cx ;return: it's a dword 4628 000011F3 41 <1> inc cx 4629 <1> aag3: 4630 000011F4 41 <1> inc cx ;return: it's a word 4631 000011F5 C3 <1> retn 4632 <1> 4633 <1> aag4: 4634 000011F6 3C28 <1> cmp al, '(' 4635 000011F8 7511 <1> jne .not_expr 4636 000011FA AC <1> lodsb ; skip opening paren 4637 000011FB E8E9A0 <1> call getexpression ; returns bx:dx = numerical value 4638 000011FE 87DA <1> xchg bx, dx ; dx:bx = number 4639 00001200 E841A7 <1> call skipwh0 4640 00001203 3C29 <1> cmp al, ')' 4641 00001205 AC <1> lodsb 4642 00001206 74E9 <1> je .got_expr 4643 00001208 4E <1> dec si 4644 00001209 EB25 <1> jmp aag7 4645 <1> 4646 <1> .not_expr: 4647 0000120B 31DB <1> xor bx, bx ; get the basic integer 4648 0000120D 31D2 <1> xor dx, dx 4649 0000120F E8E0A5 <1> call getnyb 4650 00001212 721C <1> jc aag7 ; if not a hex digit 4651 <1> aag5: 4652 00001214 08C3 <1> or bl, al ; add it to the number 4653 <1> @@: 4654 00001216 AC <1> lodsb 4655 00001217 3C5F <1> cmp al, '_' 4656 00001219 74FB <1> je @B 4657 0000121B E8D4A5 <1> call getnyb 4658 0000121E 72D1 <1> jc aag1a ; if done 4659 00001220 F6C6F0 <1> test dh, 0F0h 4660 00001223 750B <1> jnz aag7 ; if overflow 4661 00001225 B90400 <1> mov cx, 4 4662 <1> aag6: 4663 00001228 D1E3 <1> shl bx, 1 ; shift it by 4 4664 0000122A D1D2 <1> rcl dx, 1 4665 0000122C E2FA <1> loop aag6 4666 0000122E EBE4 <1> jmp short aag5 4667 <1> 4668 <1> aag7: 4669 00001230 E9A992 <1> jmp error 4670 <1> 4671 <1> ; AACONVINDEX - Convert results from AAGETI and store index value 4672 <1> ; 4673 <1> ; Entry DX:BX,CL As in exit from AAGETI 4674 <1> ; DI Points to information record for this arg 4675 <1> ; Exit SS bits stored in [di+OPRND.index] 4676 <1> ; Uses DL 4677 <1> aaconvindex: 4678 00001233 80F901 <1> cmp cl, 1 4679 00001236 7517 <1> jne aacv1 ; if the number is too large 4680 00001238 80FB01 <1> cmp bl, 1 4681 0000123B 7414 <1> je aacv2 ; if 1 4682 0000123D 42 <1> inc dx 4683 0000123E 80FB02 <1> cmp bl, 2 4684 00001241 740E <1> je aacv2 ; if 2 4685 00001243 42 <1> inc dx 4686 00001244 80FB04 <1> cmp bl, 4 4687 00001247 7408 <1> je aacv2 ; if 4 4688 00001249 42 <1> inc dx 4689 0000124A 80FB08 <1> cmp bl, 8 4690 0000124D 7402 <1> je aacv2 ; if 8 4691 <1> aacv1: 4692 0000124F EBDF <1> jmp short aag7 ; error 4693 <1> 4694 <1> aacv2: 4695 00001251 885506 <1> mov byte [di+OPRND.index], dl ; save the value 4696 00001254 C3 <1> retn 4697 <1> 4698 <1> ; AAGETREG - Get register for the assembler. 4699 <1> ; 4700 <1> ; Entry DI Start of register table 4701 <1> ; CX Length of register table (or 0) 4702 <1> ; SI Address of first character in register name 4703 <1> ; Exit NC if a register was found, 4704 <1> ; SI Updated if a register was found 4705 <1> ; BX Register number, defined as in the table below 4706 <1> ; Uses AX, CX, DI 4707 <1> ; 4708 <1> ; Exit value of BX: 4709 <1> ; DI = rgnam816, CX = 27 DI = rgnam16, CX = 8 4710 <1> ; ---------------------- -------------------- 4711 <1> ; 0 .. 7: AL .. BH 0 .. 7: AX .. DI 4712 <1> ; 8 .. 15: AX .. DI 4713 <1> ; 16 .. 23: EAX..EDI 16 .. 23: EAX..EDI 4714 <1> ; 24 .. 29: ES .. GS 4715 <1> ; 30 .. 34: ST .. TR 4716 <1> ; (This has to match the REG_ equs defined in uu.asm 4717 <1> ; around rgnam816 and following.) 4718 <1> aagetreg: 4719 00001255 8B04 <1> mov ax, word [si] 4720 00001257 25DFDF <1> and ax, TOUPPER_W ; convert to upper case 4721 0000125A 3C45 <1> cmp al, 'E' ; check for EAX, etc. 4722 0000125C 7522 <1> jne aagr1 ; if not 'E' --> (NZ) 4723 0000125E 50 <1> push ax 4724 0000125F 88E0 <1> mov al, ah 4725 00001261 8A6402 <1> mov ah, byte [si+2] 4726 00001264 80E4DF <1> and ah, TOUPPER 4727 00001267 57 <1> push di 4728 00001268 BF[0288] <1> mov di, rgnam16 4729 0000126B 51 <1> push cx 4730 0000126C B90800 <1> mov cx, N_REGS16 4731 0000126F F2AF <1> repne scasw 4732 00001271 89CB <1> mov bx, cx 4733 00001273 59 <1> pop cx 4734 00001274 5F <1> pop di 4735 00001275 58 <1> pop ax 4736 00001276 7508 <1> jne aagr1 ; if no match --> (NZ) 4737 00001278 46 <1> inc si 4738 00001279 F7D3 <1> not bx 4739 0000127B 80C318 <1> add bl, 8+16 ; adjust BX 4740 0000127E EB11 <1> jmp short aagr2 ; finish up 4741 <1> 4742 <1> aagr1: ; (entered with NZ) 4743 00001280 89CB <1> mov bx, cx ; (if cx = 0, this is always reached with 4744 00001282 F2AF <1> repne scasw ; ZF clear, that is, NZ) 4745 00001284 750F <1> jne aagr3 ; if no match 4746 00001286 29CB <1> sub bx, cx 4747 00001288 4B <1> dec bx 4748 00001289 80FB10 <1> cmp bl, 16 4749 0000128C 7203 <1> jb aagr2 ; if AL .. BH or AX .. DI 4750 0000128E 80C308 <1> add bl, 8 4751 <1> aagr2: 4752 00001291 46 <1> inc si ; skip the register name 4753 00001292 46 <1> inc si 4754 00001293 F8 <1> clc 4755 00001294 C3 <1> retn 4756 <1> aagr3: 4757 00001295 F9 <1> stc ; not found 4758 00001296 C3 <1> retn 2061 %include "dd.asm" 2062 <1> 2063 <1> %if 0 2064 <1> 2065 <1> lDebug D commands - Dump data 2066 <1> 2067 <1> Copyright (C) 1995-2003 Paul Vojta 2068 <1> Copyright (C) 2008-2012 C. Masloch 2069 <1> 2070 <1> Usage of the works is permitted provided that this 2071 <1> instrument is retained with the works, so that any entity 2072 <1> that uses the works is notified of this instrument. 2073 <1> 2074 <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 2075 <1> 2076 <1> %endif 2077 <1> 2078 <1> 2079 <1> usesection lDEBUG_DATA_ENTRY 2080 <1> align 4, db 0 2081 000082B8 0000 <1> ddoffset: dw 0 ; offset word for dd 2082 <1> ; (number of skipped bytes at start of line) 2083 <1> %if _PM 2084 000082BA 0000 <1> dw 0 ; high word initialised to and fixed at zero 2085 <1> %endif 2086 000082BC 0000 <1> ddskipped: dw 0 2087 <1> %if _PM 2088 000082BE 0000 <1> dw 0 ; high word initialised to and fixed at zero 2089 <1> %endif 2090 000082C0 0100 <1> ddsize: dw 1 ; size of dd item 2091 000082C2 00 <1> ddoffset2: db 0 2092 <1> 2093 <1> 2094 <1> usesection lDEBUG_CODE 2095 <1> 2096 <1> ; D command - hex/ASCII dump. 2097 <1> ddd: 2098 <1> %if _INT || _PM || _MCB || _DSTRINGS 2099 00001297 E87979 <1> call uppercase 2100 <1> %endif 2101 0000129A 86C4 <1> xchg al, ah 2102 0000129C 8A44FE <1> mov al, byte [si - 2] 2103 0000129F E87179 <1> call uppercase 2104 000012A2 3C44 <1> cmp al, 'D' 2105 000012A4 86C4 <1> xchg al, ah 2106 000012A6 7569 <1> jne .not_d_suffix 2107 <1> %if _DSTRINGS 2108 000012A8 3C5A <1> cmp al, 'Z' ; DZ command ? 2109 000012AA 7503E9D803 <1> je dz ; yes --> 2110 000012AF 3C24 <1> cmp al, '$' ; D$ command ? 2111 000012B1 7503E9AA03 <1> je dcpm ; yes --> 2112 000012B6 3C23 <1> cmp al, '#' ; D# command ? 2113 000012B8 7503E9BD03 <1> je dcounted ; yes --> 2114 000012BD 3C57 <1> cmp al, 'W' 2115 000012BF 750B <1> jne .notstring 2116 000012C1 50 <1> push ax 2117 000012C2 AC <1> lodsb 2118 000012C3 3C23 <1> cmp al, '#' ; DW# command ? 2119 000012C5 58 <1> pop ax 2120 000012C6 7503E9A203 <1> je dwcounted ; yes --> 2121 000012CB 4E <1> dec si 2122 <1> .notstring: 2123 <1> %endif 2124 <1> %if _INT 2125 000012CC 3C49 <1> cmp al, 'I' ; DI command ? 2126 000012CE 750D <1> jne .notdi 2127 <1> %if 1 2128 000012D0 50 <1> push ax 2129 000012D1 AC <1> lodsb 2130 000012D2 4E <1> dec si 2131 000012D3 24DF <1> and al, TOUPPER 2132 000012D5 3C50 <1> cmp al, 'P' ; distinguish 'di ...' and 'd ip' 2133 000012D7 58 <1> pop ax 2134 000012D8 7403 <1> je .notdi 2135 <1> %endif 2136 000012DA E96004 <1> jmp gateout ; yes --> 2137 <1> .notdi: 2138 <1> %endif 2139 <1> %if _PM 2140 000012DD 3C4C <1> cmp al, 'L' ; DL command ? 2141 000012DF 7503 <1> jne .notdl 2142 000012E1 E9D102 <1> jmp descout ; yes --> 2143 <1> .notdl: 2144 000012E4 3C58 <1> cmp al, 'X' ; DX command ? 2145 000012E6 0F846F0B <1> _386 je extmem ; yes --> 2146 <1> .notdx: 2147 <1> %endif 2148 <1> %if _MCB 2149 000012EA 3C4D <1> cmp al, 'M' ; DM command ? 2150 000012EC 7503 <1> jne .notdm 2151 000012EE E93F0A <1> jmp mcbout ; yes --> 2152 <1> .notdm: 2153 <1> %endif 2154 000012F1 B90100 <1> mov cx, 1 2155 000012F4 3C42 <1> cmp al, 'B' 2156 000012F6 740B <1> je .d_suffix_size 2157 000012F8 41 <1> inc cx ; = 2 2158 000012F9 3C57 <1> cmp al, 'W' 2159 000012FB 7406 <1> je .d_suffix_size 2160 000012FD 41 <1> inc cx 2161 000012FE 41 <1> inc cx ; = 4 2162 000012FF 3C44 <1> cmp al, 'D' 2163 00001301 750E <1> jne .not_d_suffix 2164 <1> .d_suffix_size: 2165 00001303 880E[C082] <1> mov byte [ddsize], cl 2166 00001307 E839A6 <1> call skipwhite 2167 0000130A E8E1A5 <1> call iseol? 2168 0000130D 7536 <1> jne dd1 ; jump to getting range --> (with new size) 2169 0000130F EB08 <1> jmp lastddd ; default range (ADS:ADO length 128), 2170 <1> ; but with new size --> 2171 <1> 2172 <1> .not_d_suffix: 2173 00001311 E830A6 <1> call skipwh0 2174 00001314 E8D7A5 <1> call iseol? 2175 00001317 7527 <1> jne dd1_bytes ; if an address was given --> (set byte size) 2176 <1> 2177 <1> lastddd: 2178 <1> ; byte [ddsize] = size already set 2179 00001319 66 <1> _386_PM_o32 ; mov edx, dword [d_addr] 2180 0000131A 8B16[0A0B] <1> mov dx, word [d_addr] ; compute range of 80h or until end of segment 2181 0000131E 66 <1> _386_PM_o32 ; mov esi, edx 2182 0000131F 89D6 <1> mov si, dx 2183 00001321 8B1E[0E0B] <1> mov bx, [d_addr + saSegSel] 2184 00001325 E80E4A <1> _386_PM call test_d_b_bit 2185 00001328 750A <1> _386_PM jnz .32 2186 0000132A 83C27F <1> add dx, byte 7Fh 2187 0000132D 733C <1> jnc dd2_0 2188 0000132F 83CAFF <1> or dx, byte -1 2189 00001332 EB37 <1> jmp short dd2_0 2190 <1> 2191 <1> %if _PM 2192 <1> [cpu 386] 2193 <1> .32: 2194 00001334 6683C27F <1> add edx, byte 7Fh 2195 00001338 7331 <1> jnc dd2_0 ; if no overflow 2196 0000133A 6683CAFF <1> or edx, byte -1 2197 0000133E EB2B <1> jmp short dd2_0 2198 <1> __CPU__ 2199 <1> %endif 2200 <1> 2201 <1> dd1_bytes: 2202 00001340 C606[C082]01 <1> mov byte [ddsize], 1 2203 <1> dd1: 2204 00001345 B98000 <1> mov cx, 80h ; default length (128 bytes) 2205 00001348 8B1E[840C] <1> mov bx, word [reg_ds] 2206 0000134C E8D994 <1> call getrangeX ; get address range into bx:(e)dx 2207 0000134F E8B1A5 <1> call chkeol ; expect end of line here 2208 <1> 2209 00001352 891E[0E0B] <1> mov word [d_addr + saSegSel], bx 2210 <1> ; save segment (offset is saved later) 2211 <1> %if _PM 2212 00001356 E8747E <1> call ispm 2213 00001359 7506 <1> jnz .86m 2214 <1> .pm: 2215 0000135B 891E[120B] <1> mov word [d_addr + saSelector], bx 2216 0000135F EB04 <1> jmp @F 2217 <1> .86m: 2218 00001361 891E[100B] <1> mov word [d_addr + saSegment], bx 2219 <1> @@: 2220 <1> %endif 2221 00001365 66 <1> _386_PM_o32 ; mov esi, edx 2222 00001366 89D6 <1> mov si, dx ; bx:(e)si = start 2223 00001368 66 <1> _386_PM_o32 ; mov edx, ecx 2224 00001369 89CA <1> mov dx, cx ; bx:(e)dx = last 2225 <1> %if _PM && 0 2226 <1> jmp short dd2_1 2227 <1> %endif 2228 <1> 2229 <1> ; Parsing is done. Print first line. 2230 <1> dd2_0: 2231 <1> %if _PM 2232 0000136B E85F7E <1> call ispm 2233 0000136E 750B <1> jnz dd2_1 2234 <1> [cpu 286] 2235 00001370 0F00E3 <1> verr bx ; readable ? 2236 <1> __CPU__ 2237 00001373 7406 <1> jz dd2_1 2238 <1> %if 1 2239 00001375 BA[C382] <1> mov dx, .errmsg 2240 00001378 E923AA <1> jmp putsz_error 2241 <1> usesection lDEBUG_DATA_ENTRY 2242 000082C3 5365676D656E742069- <1> .errmsg:asciz "Segment is not readable.",13,10 2242 000082CC 73206E6F7420726561- <1> 2242 000082D5 6461626C652E0D0A00 <1> 2243 <1> usesection lDEBUG_CODE 2244 <1> %else 2245 <1> mov bx, word [reg_ds] 2246 <1> mov word [d_addr + saSegSel], bx 2247 <1> %if _PM 2248 <1> call ispm 2249 <1> jnz .86m 2250 <1> .pm: 2251 <1> mov word [d_addr + saSelector], bx 2252 <1> jmp @F 2253 <1> .86m: 2254 <1> mov word [d_addr + saSegment], bx 2255 <1> @@: 2256 <1> %endif 2257 <1> %endif 2258 <1> dd2_1: 2259 <1> %endif 2260 <1> 2261 0000137B A1[C082] <1> mov ax, word [ddsize] 2262 0000137E 48 <1> dec ax ; 0 = byte, 1 = word, 3 = dword 2263 0000137F 21F0 <1> and ax, si ; how many bytes to skip at the beginning 2264 00001381 A2[C282] <1> mov byte [ddoffset2], al 2265 <1> 2266 00001384 B80100 <1> mov ax, opt2_db_header 2267 00001387 803E[C082]02 <1> cmp byte [ddsize], 2 2268 0000138C 7207 <1> jb @F 2269 0000138E B010 <1> mov al, opt2_dw_header 2270 00001390 7403 <1> je @F 2271 00001392 B80001 <1> mov ax, opt2_dd_header 2272 <1> @@: 2273 00001395 E81400 <1> call dd_header_or_trailer 2274 <1> 2275 00001398 E88700 <1> call dd_display 2276 <1> 2277 0000139B B80200 <1> mov ax, opt2_db_trailer 2278 0000139E 803E[C082]02 <1> cmp byte [ddsize], 2 2279 000013A3 7207 <1> jb @F 2280 000013A5 B020 <1> mov al, opt2_dw_trailer 2281 000013A7 7403 <1> je @F 2282 000013A9 B80002 <1> mov ax, opt2_dd_trailer 2283 <1> @@: 2284 <1> ; fall through 2285 <1> 2286 <1> 2287 <1> ; INP: ax = flag value to check 2288 <1> ; (determines whether "header" or "trailer" is written, 2289 <1> ; and which flag must be set in word [options2]) 2290 <1> ; byte [ddoffset2] = how many bytes to skip at the start 2291 <1> ; CHG: ax, cx, di 2292 <1> ; STT: ds = es = ss 2293 <1> dd_header_or_trailer: 2294 000013AC 8506[8000] <1> test word [options2], ax 2295 000013B0 746F <1> jz .ret 2296 000013B2 53 <1> push bx 2297 000013B3 56 <1> push si 2298 000013B4 52 <1> push dx 2299 <1> 2300 000013B5 B90600 <1> mov cx, msg.header.length 2301 000013B8 BA[8B68] <1> mov dx, msg.header 2302 000013BB A91101 <1> test ax, opt2_db_header | opt2_dw_header | opt2_dd_header 2303 000013BE 7506 <1> jnz @F 2304 000013C0 B90700 <1> mov cx, msg.trailer.length 2305 000013C3 BA[9268] <1> mov dx, msg.trailer 2306 <1> @@: 2307 000013C6 E8DBA9 <1> call putsz ; put initial word 2308 000013C9 F7D9 <1> neg cx ; minus length of initial word 2309 000013CB B80B00 <1> mov ax, 4 + 1 + 4 + 2 ; length of address with 16-bit offset 2310 <1> %if _PM 2311 000013CE 8B1E[0E0B] <1> mov bx, word [d_addr + saSegSel] 2312 000013D2 E86149 <1> call test_d_b_bit ; 32-bit segment ? 2313 000013D5 7403 <1> jz .16 ; no --> 2314 000013D7 B80F00 <1> mov ax, 4 + 1 + 8 + 2 ; length of address with 32-bit offset 2315 <1> .16: 2316 <1> %endif 2317 000013DA 01C1 <1> add cx, ax ; length of address minus length of word 2318 <1> ; = length to pad 2319 000013DC B020 <1> mov al, 32 2320 000013DE BF[0E08] <1> mov di, line_out 2321 000013E1 F3AA <1> rep stosb ; pad 2322 <1> ; ch = 0 2323 <1> 2324 000013E3 B83020 <1> mov ax, '0 ' ; al = '0', ah = blank 2325 000013E6 8A0E[C282] <1> mov cl, byte [ddoffset2]; cx = ddoffset2 2326 000013EA E304 <1> jcxz @FF ; if none to skip --> 2327 <1> @@: 2328 000013EC AB <1> stosw 2329 000013ED 40 <1> inc ax ; increment the number (up to '3') 2330 000013EE E2FC <1> loop @B ; loop for skipping --> 2331 <1> @@: 2332 000013F0 2C30 <1> sub al, '0' ; = back to numerical (0 .. 3) 2333 000013F2 89C2 <1> mov dx, ax ; dl = numerical offset 2334 <1> 2335 000013F4 52 <1> push dx 2336 000013F5 BE1000 <1> mov si, 16 ; loop counter 2337 000013F8 8B1E[C082] <1> mov bx, [ddsize] ; ddsize 2338 <1> @@: 2339 000013FC 88D0 <1> mov al, dl ; next numerical offset 2340 000013FE E8FFA5 <1> call hexnyb ; display it 2341 00001401 89D9 <1> mov cx, bx 2342 00001403 01C9 <1> add cx, cx ; cx = 2 * ddsize 2343 00001405 B020 <1> mov al, 32 2344 00001407 F3AA <1> rep stosb ; pad to next position 2345 00001409 01DA <1> add dx, bx ; increment dl by how many positions we use 2346 0000140B 29DE <1> sub si, bx ; decrement loop counter 2347 0000140D 77ED <1> ja @B ; don't jump if si was below-or-equal-to bx 2348 0000140F 5A <1> pop dx 2349 <1> 2350 00001410 B91000 <1> mov cx, 16 ; loop counter 2351 <1> @@: 2352 00001413 88D0 <1> mov al, dl 2353 00001415 E8E8A5 <1> call hexnyb ; display an offset 2354 <1> ; Note that this will wrap around for the last 1, 2, or 3 2355 <1> ; characters if byte [ddoffset2] is non-zero. 2356 00001418 42 <1> inc dx ; increment offset 2357 00001419 E2F8 <1> loop @B ; loop 2358 <1> 2359 0000141B E808A6 <1> call putsline_crlf 2360 <1> 2361 0000141E 5A <1> pop dx 2362 0000141F 5E <1> pop si 2363 00001420 5B <1> pop bx 2364 <1> .ret: 2365 00001421 C3 <1> retn 2366 <1> 2367 <1> 2368 <1> ; INP: word [d_addr + saSegSel] = segment/selector to dump 2369 <1> ; (e)si = start offset 2370 <1> ; (e)dx = end offset 2371 <1> ; byte [ddsize] = 1, 2, or 4 (for byte, word, or dword) 2372 <1> ; OUT: (d)word [d_addr] updated 2373 <1> ; (e)dx = (d)word [d_addr] 2374 <1> ; displayed 2375 <1> dd_display: 2376 00001422 16 <1> push ss 2377 00001423 07 <1> pop es 2378 <1> dd2_loop: 2379 00001424 E87E2B <1> call handle_serial_flags_ctrl_c 2380 <1> 2381 00001427 C706[DC0B][1913] <1> mov word [lastcmd], lastddd 2382 <1> 2383 0000142D BF[0E08] <1> mov di, line_out ; reset di for next line 2384 00001430 E85501 <1> call dd_display_offset.masklownybble 2385 <1> ; ax = offset & ~ 0Fh 2386 <1> 2387 00001433 8B0E[C082] <1> mov cx, word [ddsize] 2388 00001437 51 <1> push cx 2389 00001438 49 <1> dec cx ; 0 = byte, 1 = word, 3 = dword 2390 00001439 21F1 <1> and cx, si ; how many bytes to skip at the beginning 2391 <1> ; eg: si = 101h, cx = 1, skip 1 byte, ax = 101h 2392 <1> ; si = 102h, cx = 3, skip 2 bytes, ax = 102h 2393 <1> ; si = 103h, cx = 3, skip 3 bytes, ax = 103h 2394 <1> ; si = 103h, cx = 1, skip 1 byte, ax = 101h 2395 <1> ; si = 10Fh, cx = 1, skip 1 byte, ax = 101h 2396 <1> ; si = 10Fh, cx = 3, skip 3 bytes, ax = 103h 2397 0000143B 01C8 <1> add ax, cx ; = where to start 2398 0000143D 890E[B882] <1> mov word [ddoffset], cx 2399 00001441 50 <1> push ax 2400 00001442 B82020 <1> mov ax, 32 << 8 | 32 2401 00001445 F3AB <1> rep stosw 2402 00001447 58 <1> pop ax 2403 00001448 59 <1> pop cx 2404 <1> 2405 00001449 BB3000 <1> mov bx, (2+1)*16 ; 16 bytes (2 digits each) 2406 0000144C 80F902 <1> cmp cl, 2 2407 0000144F 7206 <1> jb @F ; if it is 1 --> 2408 00001451 B328 <1> mov bl, (4+1)*8 ; 8 words (4 digits each) 2409 00001453 7402 <1> je @F ; if it is 2 --> 2410 <1> ; it is 4 2411 00001455 B324 <1> mov bl, (8+1)*4 ; 4 dwords (8 digits each) 2412 <1> @@: 2413 00001457 01FB <1> add bx, di 2414 00001459 E8BF91 <1> call prephack ; set up for faking int vectors 23 and 24 2415 <1> 2416 0000145C 50 <1> push ax 2417 <1> ; blank the start of the line if offset isn't paragraph aligned 2418 <1> dd3: 2419 0000145D 39F0 <1> cmp ax, si ; skip to position in line 2420 0000145F 7429 <1> je dd4 ; if we're there yet 2421 00001461 7718 <1> ja .error 2422 00001463 50 <1> push ax 2423 00001464 B82020 <1> mov ax, 32 << 8| 32 2424 00001467 51 <1> push cx 2425 00001468 F3AB <1> rep stosw ; store two blanks (2 * 1) if byte, 2426 <1> ; four blanks (2 * 2) if word, 2427 <1> ; eight blanks (2 * 4) if dword 2428 0000146A 59 <1> pop cx 2429 0000146B AA <1> stosb ; store additional blank as separator 2430 0000146C 51 <1> push cx 2431 <1> @@: 2432 0000146D 268807 <1> mov byte [es:bx], al 2433 00001470 43 <1> inc bx 2434 00001471 E2FA <1> loop @B ; store as many blanks in text dump as bytes 2435 00001473 59 <1> pop cx 2436 00001474 58 <1> pop ax 2437 00001475 0306[C082] <1> add ax, word [ddsize] ; -> behind the byte/word/dword just written 2438 00001479 EBE2 <1> jmp short dd3 2439 <1> 2440 <1> 2441 <1> .error: 2442 0000147B BA[DE82] <1> mov dx, .msg_internal_error 2443 0000147E E81DA9 <1> call putsz_error 2444 00001481 B80106 <1> mov ax, 0601h 2445 00001484 E89C90 <1> call setrc 2446 00001487 E976EB <1> jmp cmd3 2447 <1> 2448 <1> usesection lDEBUG_DATA_ENTRY 2449 <1> .msg_internal_error: 2450 000082DE 496E7465726E616C20- <1> asciz "Internal error in dd3.",13,10 2450 000082E7 6572726F7220696E20- <1> 2450 000082F0 6464332E0D0A00 <1> 2451 <1> usesection lDEBUG_CODE 2452 <1> 2453 <1> 2454 <1> ; Begin main loop over lines of output. 2455 <1> dd4: 2456 0000148A 58 <1> pop ax 2457 0000148B 66 <1> _386_PM_o32 ; mov ecx, eax 2458 0000148C 89C1 <1> mov cx, ax 2459 0000148E 66 <1> _386_PM_o32 2460 0000148F 83C10F <1> add cx, strict byte 0Fh 2461 00001492 7205 <1> jc @F 2462 00001494 66 <1> _386_PM_o32 ; cmp ecx, edx 2463 00001495 39D1 <1> cmp cx, dx ; compare with end address 2464 00001497 7202 <1> jb dd5 ; if we write to the end of the line --> 2465 <1> @@: 2466 <1> ;_386_PM_o32 ; mov ecx, edx 2467 00001499 89D1 <1> mov cx, dx ; only write until (e)dx, inclusive 2468 <1> dd5: 2469 <1> ;_386_PM_o32 ; sub ecx, esi 2470 0000149B 29F1 <1> sub cx, si 2471 <1> ;_386_PM_o32 ; inc ecx 2472 0000149D 41 <1> inc cx ; cx = number of bytes to print this line 2473 <1> ; up to 16. no 32-bit register required 2474 0000149E 8326[BC82]00 <1> and word [ddskipped], 0 2475 <1> 2476 000014A3 E8A391 <1> call dohack ; substitute interrupt vectors 2477 000014A6 8E1E[0E0B] <1> mov ds, word [d_addr + saSegSel] 2478 <1> 2479 <1> dd6: 2480 000014AA 36A1[C082] <1> mov ax, word [ss:ddsize] 2481 000014AE 39C8 <1> cmp ax, cx ; ddsize <= left bytes ? 2482 000014B0 7617 <1> jbe dd6_simple ; yes, display ddsize bytes --> 2483 <1> 2484 000014B2 50 <1> push ax 2485 000014B3 51 <1> push cx 2486 000014B4 57 <1> push di 2487 000014B5 F7D9 <1> neg cx ; - left bytes 2488 000014B7 01C1 <1> add cx, ax ; ddsize - left bytes = how many skipped 2489 000014B9 36890E[BC82] <1> mov word [ss:ddskipped], cx 2490 <1> 2491 000014BE 89C1 <1> mov cx, ax ; 1 = bytes, 2 = words, 4 = dwords 2492 000014C0 49 <1> dec cx ; 0 = bytes, 1 = words, 3 = dwords 2493 000014C1 B85858 <1> mov ax, 'XX' 2494 000014C4 F3AB <1> rep stosw ; fill filler digits not to be written 2495 000014C6 5F <1> pop di 2496 000014C7 59 <1> pop cx 2497 000014C8 58 <1> pop ax 2498 <1> 2499 <1> dd6_simple: 2500 000014C9 01C0 <1> add ax, ax ; 2 = bytes, 4 = words, 8 = dwords 2501 000014CB 50 <1> push ax 2502 <1> @@: 2503 000014CC 48 <1> dec ax 2504 000014CD 48 <1> dec ax 2505 <1> ; first iteration: 0 = bytes, 2 = words, 6 = dwords 2506 <1> ; second iteration: 0 = words, 4 = dwords 2507 <1> ; third iteration: (0 = 3byte,) 2 = dwords 2508 <1> ; fourth iteration: 0 = dwords 2509 000014CE 57 <1> push di 2510 000014CF 01C7 <1> add di, ax ; -> where to write next 2 hex digits 2511 000014D1 50 <1> push ax 2512 000014D2 67 <1> _386_PM_a32 2513 000014D3 AC <1> lodsb ; al = data 2514 000014D4 E8BE00 <1> call dd_store ; stores number at es:di->, char at es:bx-> 2515 000014D7 58 <1> pop ax 2516 000014D8 5F <1> pop di ; -> start of hex digits space 2517 000014D9 85C0 <1> test ax, ax ; did we write the left-most digits? 2518 000014DB E0EF <1> loopnz @B ; not yet --> (or no more bytes to display) 2519 000014DD 58 <1> pop ax ; = how many digits we wrote 2520 000014DE 01C7 <1> add di, ax ; -> after right-most digit 2521 000014E0 B020 <1> mov al, 32 2522 000014E2 AA <1> stosb ; store a blank 2523 000014E3 85C9 <1> test cx, cx 2524 000014E5 75C3 <1> jnz dd6 ; (16-bit. cx <= 16) 2525 <1> 2526 000014E7 16 <1> push ss ; restore ds 2527 000014E8 1F <1> pop ds 2528 000014E9 66 <1> _386_PM_o32 2529 000014EA 2B36[B882] <1> sub si, word [ddoffset] 2530 000014EE 66 <1> _386_PM_o32 2531 000014EF 0336[BC82] <1> add si, word [ddskipped] 2532 <1> 2533 <1> dd9: 2534 000014F3 F7C60F00 <1> test si, 0Fh ; space out till end of line 2535 000014F7 7417 <1> jz dd10 2536 000014F9 B82020 <1> mov ax, 32 << 8 | 32 2537 000014FC 8B0E[C082] <1> mov cx, word [ddsize] 2538 00001500 51 <1> push cx 2539 00001501 F3AB <1> rep stosw ; store blanks for the number 2540 00001503 AA <1> stosb ; store additional blank as separator 2541 00001504 59 <1> pop cx 2542 <1> @@: 2543 00001505 46 <1> inc si ; skip as many bytes 2544 00001506 F7C60F00 <1> test si, 0Fh 2545 0000150A 7404 <1> jz dd10 2546 0000150C E2F7 <1> loop @B 2547 0000150E EBE3 <1> jmp short dd9 2548 <1> 2549 <1> dd10: 2550 00001510 66 <1> _386_PM_o32 2551 00001511 0336[B882] <1> add si, word [ddoffset] 2552 00001515 66 <1> _386_PM_o32 2553 00001516 2B36[BC82] <1> sub si, word [ddskipped] 2554 <1> 2555 0000151A B91900 <1> mov cx, (1 + 8 * (2 + 1)) ; go back 8 bytes (2 digits each) 2556 0000151D 803E[C082]02 <1> cmp byte [ddsize], 2 2557 00001522 7206 <1> jb @F ; if it is 1 --> 2558 00001524 B115 <1> mov cl, (1 + 4 * (4 + 1)) ; go back 4 words (4 digits each) 2559 00001526 7402 <1> je @F ; if it is 2 --> 2560 <1> ; it is 4 2561 00001528 B113 <1> mov cl, (1 + 2 * (8 + 1)) ; go back 2 dwords (8 digits each) 2562 <1> @@: 2563 0000152A 29CF <1> sub di, cx 2564 0000152C C6052D <1> mov byte [di], '-' 2565 0000152F E84B91 <1> call unhack 2566 00001532 89DF <1> mov di, bx 2567 00001534 52 <1> push dx 2568 00001535 E8EEA4 <1> call putsline_crlf 2569 00001538 5A <1> pop dx 2570 00001539 66 <1> _386_PM_o32 ; dec esi 2571 0000153A 4E <1> dec si 2572 0000153B 66 <1> _386_PM_o32 ; cmp esi, edx 2573 0000153C 39D6 <1> cmp si, dx 2574 0000153E 66 <1> _386_PM_o32 ; inc esi 2575 0000153F 46 <1> inc si 2576 00001540 7303E9DFFE <1> jb dd2_loop ; display next line --> 2577 <1> dd11: 2578 <1> ; This check is necessary to wrap around at FFFFh (64 KiB) 2579 <1> ; for 16-bit segments instead of at FFFFFFFFh (4 GiB). 2580 00001545 8B1E[0E0B] <1> _386_PM mov bx, word [d_addr + saSegSel] 2581 <1> ; reset bx 2582 00001549 E8EA47 <1> _386_PM call test_d_b_bit ; 32-bit segment ? 2583 0000154C 7401 <1> _386_PM jz .16 ; no --> 2584 0000154E 66 <1> _386_PM_o32 ; inc edx 2585 <1> .16: 2586 0000154F 42 <1> inc dx ; set up the address for the next 'D' command. 2587 00001550 66 <1> _386_PM_o32 ; mov dword [d_addr], edx 2588 00001551 8916[0A0B] <1> mov word [d_addr], dx 2589 00001555 C3 <1> retn 2590 <1> 2591 <1> 2592 <1> ; INP: (e)si = offset (to display) 2593 <1> ; (e)dx = end offset (for range check of 16-bit segment) 2594 <1> ; word [d_addr + saSegSel] = segment/selector 2595 <1> ; es:di -> where to write to 2596 <1> ; OUT: bx = segment/selector 2597 <1> dd_display_offset: 2598 <1> .: 2599 00001556 A1[0E0B] <1> mov ax, word [d_addr + saSegSel] 2600 00001559 89C3 <1> mov bx, ax 2601 0000155B E890A4 <1> call hexword 2602 0000155E B03A <1> mov al, ':' 2603 00001560 AA <1> stosb 2604 00001561 66 <1> _386_PM_o32 ; mov eax, esi 2605 00001562 89F0 <1> mov ax, si 2606 <1> %if _PM 2607 00001564 E8CF47 <1> call test_d_b_bit ; 32-bit segment ? 2608 00001567 7405 <1> jz .16 ; no --> (don't display zero high word) 2609 00001569 E876A4 <1> call hexword_high ; yes, display high word of address 2610 0000156C EB12 <1> jmp short .common 2611 <1> 2612 <1> ; Insure that the high word is zero. 2613 <1> .16: 2614 <1> ;_386 test esi, ~0FFFFh 2615 <1> ;_386 jnz .error 2616 0000156E 66F7C20000FFFF <1> _386 test edx, ~0FFFFh 2617 00001575 7409 <1> _386 jz .common 2618 <1> ;.error: 2619 00001577 BA[5772] <1> _386 mov dx, msg.ofs32 2620 0000157A E821A8 <1> _386 call putsz_error 2621 0000157D E980EA <1> _386 jmp cmd3 2622 <1> .common: 2623 <1> %endif 2624 00001580 E86BA4 <1> call hexword 2625 00001583 B82020 <1> mov ax, 32<<8|32 2626 00001586 AB <1> stosw 2627 00001587 C3 <1> retn 2628 <1> 2629 <1> ; INP: (e)si = offset (to display) 2630 <1> ; (e)dx = end offset (for range check of 16-bit segment) 2631 <1> ; word [d_addr + saSegSel] = segment/selector 2632 <1> ; es:di -> where to write to 2633 <1> ; OUT: bx = segment/selector 2634 <1> ; (e)ax = offset & ~0Fh 2635 <1> .masklownybble: 2636 00001588 56 <1> push si 2637 00001589 83E6F0 <1> and si, ~0Fh 2638 0000158C 66 <1> _386_PM_o32 2639 0000158D 56 <1> push si 2640 0000158E E8C5FF <1> call . 2641 00001591 66 <1> _386_PM_o32 2642 00001592 58 <1> pop ax 2643 00001593 5E <1> pop si 2644 00001594 C3 <1> retn 2645 <1> 2646 <1> 2647 <1> ; Store a character into the buffer. Characters that can't 2648 <1> ; be displayed are replaced by a dot. 2649 <1> ; 2650 <1> ; INP: al = character 2651 <1> ; es:bx-> buffer for displayed characters 2652 <1> ; es:di-> buffer for hexadecimal number 2653 <1> ; OUT: es:bx-> behind displayed character 2654 <1> ; es:di-> behind hexadecimal number and space 2655 <1> ; CHG: ax 2656 <1> ; STT: ds unknown 2657 <1> dd_store: 2658 00001595 88C4 <1> mov ah, al 2659 00001597 3C20 <1> cmp al, 32 ; below blank ? 2660 00001599 720E <1> jb .ctrl ; control char --> 2661 0000159B 3C7F <1> cmp al, 127 ; DEL ? 2662 0000159D 740A <1> je .ctrl ; yes, control char --> 2663 0000159F 720A <1> jb .noctrl ; below, not a control char --> 2664 000015A1 36F606[7C00]04 <1> testopt [ss:options], cpdepchars ; allow CP-dependant characters ? 2665 000015A7 7502 <1> jnz .noctrl ; yes --> 2666 <1> .ctrl: 2667 000015A9 B42E <1> mov ah, '.' 2668 <1> .noctrl: 2669 000015AB 268827 <1> mov byte [es:bx], ah 2670 000015AE 43 <1> inc bx 2671 000015AF 51 <1> push cx 2672 000015B0 E842A4 <1> call hexbyte 2673 000015B3 59 <1> pop cx 2674 000015B4 C3 <1> retn 2675 <1> 2676 <1> 2677 <1> %if _PM 2678 <1> ; DL command 2679 <1> descout: 2680 000015B5 E88BA3 <1> call skipwhite 2681 000015B8 E812A2 <1> call getword ; get word into DX 2682 000015BB 89D3 <1> mov bx, dx 2683 000015BD E855A3 <1> call skipcomm0 2684 000015C0 BA0100 <1> mov dx, 1 2685 000015C3 E828A3 <1> call iseol? 2686 000015C6 7410 <1> je .onlyone 2687 000015C8 E84876 <1> call uppercase 2688 000015CB 3C4C <1> cmp al, 'L' 2689 000015CD 7503 <1> jne .notlength 2690 000015CF E842A3 <1> call skipcomma 2691 <1> .notlength: 2692 000015D2 E8F8A1 <1> call getword 2693 000015D5 E82BA3 <1> call chkeol 2694 <1> .onlyone: 2695 000015D8 42 <1> inc dx ; (note js at nextdesc changed to jz) 2696 000015D9 89D6 <1> mov si, dx ; save count 2697 000015DB E8EF7B <1> call ispm 2698 000015DE 7407 <1> je nextdesc 2699 000015E0 BA[8C7C] <1> mov dx, nodesc 2700 000015E3 E9BEA7 <1> jmp putsz 2701 <1> desc_done: 2702 000015E6 C3 <1> retn 2703 <1> subcpu 286 2704 <1> nextdesc: 2705 000015E7 4E <1> dec si 2706 000015E8 74FC <1> jz desc_done 2707 000015EA BF[D07C] <1> mov di, descr 2708 000015ED 89D8 <1> mov ax, bx 2709 000015EF E8FCA3 <1> call hexword 2710 000015F2 BF[DA7C] <1> mov di, descbase 2711 000015F5 57 <1> push di 2712 000015F6 B83F3F <1> mov ax, "??" 2713 000015F9 AB <1> stosw 2714 000015FA AB <1> stosw 2715 000015FB AB <1> stosw 2716 000015FC AB <1> stosw 2717 000015FD 83C707 <1> add di, byte (desclim-(descbase+8)) 2718 00001600 AB <1> stosw 2719 00001601 AB <1> stosw 2720 00001602 AB <1> stosw 2721 00001603 AB <1> stosw 2722 00001604 83C706 <1> add di, byte (descattr-(desclim+8)) 2723 00001607 AB <1> stosw 2724 00001608 AB <1> stosw 2725 00001609 5F <1> pop di 2726 <1> ; lar ax, bx 2727 <1> ; jnz skipdesc ; tell that this descriptor is invalid 2728 0000160A B80600 <1> mov ax, 6 2729 0000160D CD31 <1> int 31h 2730 0000160F 720A <1> jc desc_o1 2731 00001611 89C8 <1> mov ax, cx 2732 00001613 E8D8A3 <1> call hexword 2733 00001616 89D0 <1> mov ax, dx 2734 00001618 E8D3A3 <1> call hexword 2735 <1> desc_o1: 2736 0000161B BF[E97C] <1> mov di, desclim 2737 0000161E EB2B <1> _no386_jmps use16desc 2738 <1> subcpu 386 2739 00001620 660F03C3 <1> lsl eax, ebx 2740 00001624 751A <1> jnz desc_out 2741 00001626 50 <1> push ax 2742 00001627 66C1E810 <1> shr eax, 16 2743 0000162B E8C0A3 <1> call hexword 2744 0000162E 58 <1> pop ax 2745 0000162F E8BCA3 <1> call hexword 2746 00001632 660F02C3 <1> lar eax, ebx 2747 00001636 66C1E808 <1> shr eax, 8 2748 <1> desc_o2: 2749 0000163A BF[F77C] <1> mov di, descattr 2750 0000163D E8AEA3 <1> call hexword 2751 <1> desc_out: 2752 00001640 BA[D07C] <1> mov dx, descr 2753 00001643 E85EA7 <1> call putsz 2754 00001646 83C308 <1> add bx, byte 8 2755 00001649 EB9C <1> jmp short nextdesc 2756 <1> subcpureset ; subcpu 386 2757 <1> use16desc: 2758 0000164B 0F03C3 <1> lsl ax, bx 2759 0000164E 75F0 <1> jnz desc_out 2760 00001650 E89BA3 <1> call hexword 2761 00001653 B82020 <1> mov ax, 32<<8|32 2762 00001656 AB <1> stosw 2763 00001657 AB <1> stosw 2764 00001658 0F02C3 <1> lar ax, bx 2765 0000165B C1E808 <1> shr ax, 8 2766 0000165E EBDA <1> jmp short desc_o2 2767 <1> subcpureset ; subcpu 286 2768 <1> %endif 2769 <1> 2770 <1> %if _DSTRINGS 2771 <1> ; D$ command 2772 <1> dcpm: 2773 00001660 C606[5E0B]24 <1> mov byte [dstringtype], 36 2774 00001665 C706[600B][3C0B] <1> mov word [dstringaddr], dcpm_addr 2775 0000166B EB25 <1> jmp short dstring 2776 <1> 2777 <1> ; DW# command 2778 <1> dwcounted: 2779 0000166D C606[5E0B]FE <1> mov byte [dstringtype], 0FEh 2780 00001672 C706[600B][500B] <1> mov word [dstringaddr], dwcount_addr 2781 00001678 EB18 <1> jmp short dstring 2782 <1> 2783 <1> ; D# command 2784 <1> dcounted: 2785 0000167A C606[5E0B]FF <1> mov byte [dstringtype], 0FFh 2786 0000167F C706[600B][460B] <1> mov word [dstringaddr], dcount_addr 2787 00001685 EB0B <1> jmp short dstring 2788 <1> 2789 <1> ; DZ command 2790 <1> dz: 2791 00001687 C606[5E0B]00 <1> mov byte [dstringtype], 0 2792 0000168C C706[600B][320B] <1> mov word [dstringaddr], dz_addr 2793 <1> 2794 <1> ; common code for all string commands 2795 <1> dstring: 2796 00001692 E8AEA2 <1> call skipwhite 2797 00001695 E856A2 <1> call iseol? 2798 00001698 7509 <1> jne .getaddr ; if an address was given 2799 <1> .last: 2800 0000169A 8B1E[600B] <1> mov bx, word [dstringaddr] 2801 0000169E 66 <1> _386_PM_o32 ; mov edx, dword [bx] 2802 0000169F 8B17 <1> mov dx, word [bx] 2803 000016A1 EB20 <1> jmp short .haveaddr ; edx = offset, [bx + saSegSel] = segment 2804 <1> .getaddr: 2805 000016A3 8B1E[840C] <1> mov bx, word [reg_ds] 2806 000016A7 E86B92 <1> call getaddrX ; get address into bx:(e)dx 2807 000016AA E856A2 <1> call chkeol ; expect end of line here 2808 <1> %if _PM 2809 000016AD 53 <1> push bx 2810 <1> %endif 2811 000016AE 53 <1> push bx 2812 000016AF 8B1E[600B] <1> mov bx, word [dstringaddr] 2813 000016B3 8F4704 <1> pop word [bx + saSegSel]; save segment (offset behind string is saved later) 2814 <1> %if _PM 2815 000016B6 E8147B <1> call ispm 2816 000016B9 7505 <1> jnz .86m 2817 <1> .pm: 2818 000016BB 8F4708 <1> pop word [bx + saSelector] 2819 000016BE EB03 <1> jmp @F 2820 <1> .86m: 2821 000016C0 8F4706 <1> pop word [bx + saSegment] 2822 <1> @@: 2823 <1> %endif 2824 <1> .haveaddr: 2825 000016C3 C706[DC0B][9A16] <1> mov word [lastcmd], dstring.last 2826 000016C9 E84F8F <1> call prephack 2827 000016CC 66 <1> _386_PM_o32 ; mov esi, edx 2828 000016CD 89D6 <1> mov si, dx 2829 000016CF 800E[9E00]01 <1> setopt [internalflags], usecharcounter 2830 000016D4 C606[920A]01 <1> mov byte [ charcounter ], 1 2831 <1> ; initialize 2832 000016D9 E86D8F <1> call dohack 2833 000016DC 8E5F04 <1> mov ds, word [bx + saSegSel] 2834 <1> ; ds:(e)si-> string 2835 000016DF 36803E[5E0B]FE <1> cmp byte [ss:dstringtype], 0FEh 2836 000016E5 7235 <1> jb .terminated ; terminated string --> 2837 000016E7 9F <1> lahf 2838 000016E8 67 <1> _386_PM_a32 2839 000016E9 AC <1> lodsb ; load first byte 2840 000016EA 31C9 <1> xor cx, cx 2841 000016EC 88C1 <1> mov cl, al ; low byte of count 2842 000016EE 9E <1> sahf 2843 000016EF 7504 <1> jne .counted ; only byte count --> 2844 000016F1 67 <1> _386_PM_a32 2845 000016F2 AC <1> lodsb ; load second byte 2846 000016F3 88C5 <1> mov ch, al ; high byte of count 2847 <1> .counted: 2848 000016F5 E333 <1> jcxz .done ; length zero --> 2849 <1> .loop: 2850 000016F7 67 <1> _386_PM_a32 2851 000016F8 AC <1> lodsb ; get character 2852 000016F9 E80400 <1> call .char ; display 2853 000016FC E2F9 <1> loop .loop ; until done --> 2854 000016FE EB2A <1> jmp short .done 2855 <1> 2856 <1> .char: 2857 00001700 16 <1> push ss 2858 00001701 1F <1> pop ds 2859 00001702 50 <1> push ax 2860 00001703 E8778F <1> call unhack ; restore state 2861 00001706 58 <1> pop ax 2862 00001707 56 <1> push si 2863 00001708 51 <1> push cx 2864 00001709 E8BBA6 <1> call putc ; display 2865 0000170C 59 <1> pop cx 2866 0000170D 5E <1> pop si 2867 0000170E E89428 <1> call handle_serial_flags_ctrl_c 2868 00001711 E8358F <1> call dohack 2869 00001714 8B1E[600B] <1> mov bx, word [dstringaddr] 2870 00001718 8E5F04 <1> mov ds, word [bx + saSegSel] 2871 <1> ; go back to special state 2872 0000171B C3 <1> retn 2873 <1> 2874 <1> .terminated: 2875 0000171C 67 <1> _386_PM_a32 2876 0000171D AC <1> lodsb ; load character 2877 0000171E 363A06[5E0B] <1> cmp al, byte [ss:dstringtype] 2878 00001723 7405 <1> je .done ; it's the terminator --> 2879 00001725 E8D8FF <1> call .char ; display 2880 00001728 EBF2 <1> jmp short .terminated ; and get next --> 2881 <1> 2882 <1> .done: 2883 0000172A 16 <1> push ss 2884 0000172B 1F <1> pop ds ; restore ds 2885 0000172C 66 <1> _386_PM_o32 ; mov dword [bx], esi 2886 0000172D 8937 <1> mov word [bx], si 2887 0000172F E84B8F <1> call unhack 2888 00001732 B00D <1> mov al, 13 2889 00001734 E890A6 <1> call putc 2890 00001737 B00A <1> mov al, 10 2891 00001739 E88BA6 <1> call putc 2892 0000173C C3 <1> retn 2893 <1> %endif 2894 <1> 2895 <1> %if _INT 2896 <1> ; DI command 2897 <1> gateout: 2898 0000173D 31C9 <1> xor cx, cx 2899 0000173F AC <1> lodsb 2900 00001740 E8D074 <1> call uppercase 2901 00001743 3C52 <1> cmp al, 'R' 2902 00001745 7502 <1> jne @F 2903 00001747 41 <1> inc cx ; always 86 Mode 2904 00001748 AC <1> lodsb 2905 <1> @@: 2906 00001749 E8C774 <1> call uppercase 2907 0000174C 3C4D <1> cmp al, 'M' 2908 0000174E 7503 <1> jne @F 2909 00001750 FEC5 <1> inc ch ; show MCB names 2910 00001752 AC <1> lodsb 2911 <1> @@: 2912 00001753 E8BD74 <1> call uppercase 2913 00001756 3C4C <1> cmp al, 'L' 2914 00001758 7504 <1> jne @F 2915 0000175A 80CD02 <1> or ch, 2 ; follow AMIS interrupt lists 2916 0000175D AC <1> lodsb 2917 <1> @@: 2918 0000175E E8E3A1 <1> call skipwh0 2919 <1> 2920 00001761 4E <1> dec si 2921 00001762 BA[1467] <1> mov dx, msg.in 2922 00001765 E827A1 <1> call isstring? 2923 00001768 755C <1> jne .not_in 2924 <1> 2925 0000176A 56 <1> push si 2926 0000176B 51 <1> push cx 2927 <1> .in.loop: 2928 0000176C E8D4A1 <1> call skipwhite 2929 0000176F 4E <1> dec si 2930 <1> 2931 00001770 E89AA0 <1> call get_value_range ; OUT: cx:di = from, bx:dx = to 2932 00001773 730D <1> jnc @F 2933 00001775 7508 <1> jnz .error 2934 00001777 81FFFF00 <1> cmp di, 255 2935 0000177B 7702 <1> ja .error 2936 0000177D E317 <1> jcxz .in.next 2937 <1> .error: 2938 0000177F E95A8D <1> jmp error 2939 <1> 2940 <1> @@: 2941 00001782 81FFFF00 <1> cmp di, 255 2942 00001786 77F7 <1> ja .error 2943 00001788 E302 <1> jcxz @F 2944 0000178A EBF3 <1> jmp .error 2945 <1> 2946 <1> @@: 2947 0000178C 85DB <1> test bx, bx 2948 0000178E 75EF <1> jnz .error 2949 00001790 81FAFF00 <1> cmp dx, 255 2950 00001794 77E9 <1> ja .error 2951 <1> 2952 <1> .in.next: 2953 <1> @@: 2954 00001796 E8ABA1 <1> call skipwh0 2955 00001799 3C2C <1> cmp al, ',' 2956 0000179B 74CF <1> je .in.loop 2957 0000179D E863A1 <1> call chkeol 2958 000017A0 59 <1> pop cx 2959 000017A1 E89300 <1> call .prepare 2960 000017A4 5E <1> pop si 2961 <1> 2962 <1> .indo.loop: 2963 000017A5 E89BA1 <1> call skipwhite 2964 000017A8 4E <1> dec si 2965 <1> 2966 000017A9 51 <1> push cx 2967 000017AA E860A0 <1> call get_value_range ; OUT: cx:di = from, bx:dx = to 2968 000017AD 59 <1> pop cx 2969 000017AE 720D <1> jc .indo.next 2970 <1> 2971 000017B0 89FB <1> mov bx, di 2972 000017B2 A8 <1> db __TEST_IMM8 ; (skip inc) 2973 <1> @@: 2974 000017B3 43 <1> inc bx 2975 000017B4 52 <1> push dx 2976 000017B5 E89400 <1> call .do 2977 000017B8 5A <1> pop dx 2978 000017B9 39D3 <1> cmp bx, dx 2979 000017BB 72F6 <1> jb @B 2980 <1> 2981 <1> .indo.next: 2982 000017BD 4E <1> dec si 2983 000017BE E882A1 <1> call skipwhite 2984 000017C1 3C2C <1> cmp al, ',' 2985 000017C3 74E0 <1> je .indo.loop 2986 000017C5 C3 <1> retn 2987 <1> 2988 <1> 2989 <1> 2990 <1> .not_in: 2991 000017C6 AC <1> lodsb 2992 000017C7 E811A0 <1> call getbyte ; get byte into DL 2993 000017CA 30F6 <1> xor dh, dh 2994 000017CC 89D3 <1> mov bx, dx 2995 000017CE E844A1 <1> call skipcomm0 2996 000017D1 BA0100 <1> mov dx, 1 2997 000017D4 E817A1 <1> call iseol? 2998 000017D7 7451 <1> je .onlyone 2999 000017D9 E83774 <1> call uppercase 3000 000017DC 3C4C <1> cmp al, 'L' 3001 000017DE 753F <1> jne .notlength 3002 000017E0 E831A1 <1> call skipcomma 3003 000017E3 E8E79F <1> call getword ; get byte into DL 3004 000017E6 85D2 <1> test dx, dx 3005 000017E8 741A <1> jz .err 3006 000017EA 81FA0001 <1> cmp dx, 100h 3007 000017EE 740A <1> je .checkrange 3008 000017F0 50 <1> push ax 3009 000017F1 80E41F <1> and ah, 1Fh 3010 000017F4 80FC08 <1> cmp ah, 8 3011 000017F7 58 <1> pop ax 3012 000017F8 770A <1> ja .err 3013 <1> .checkrange: 3014 000017FA 52 <1> push dx 3015 000017FB 01DA <1> add dx, bx 3016 000017FD 81FA0001 <1> cmp dx, 100h 3017 00001801 5A <1> pop dx 3018 00001802 7623 <1> jna .rangeok 3019 <1> .err: 3020 00001804 E9D58C <1> jmp error 3021 <1> 3022 <1> .last: 3023 00001807 31DB <1> xor bx, bx 3024 00001809 8A1E[6A0B] <1> mov bl, byte [lastint] 3025 0000180D 8B0E[680B] <1> mov cx, word [lastint_is_86m_and_mcb] 3026 00001811 BA0100 <1> mov dx, 1 3027 00001814 FEC3 <1> inc bl 3028 00001816 7512 <1> jnz .onlyone 3029 00001818 C706[DC0B][E003] <1> mov word [lastcmd], dmycmd 3030 0000181E C3 <1> retn 3031 <1> 3032 <1> .notlength: 3033 0000181F E8B99F <1> call getbyte 3034 00001822 30F6 <1> xor dh, dh 3035 00001824 28DA <1> sub dl, bl 3036 00001826 42 <1> inc dx 3037 <1> .rangeok: 3038 00001827 E8D9A0 <1> call chkeol 3039 <1> .onlyone: 3040 0000182A E80A00 <1> call .prepare 3041 0000182D 89D6 <1> mov si, dx ; save count 3042 <1> .next: 3043 0000182F E81A00 <1> call .do 3044 00001832 43 <1> inc bx 3045 00001833 4E <1> dec si 3046 00001834 75F9 <1> jnz .next 3047 00001836 C3 <1> retn 3048 <1> 3049 <1> 3050 <1> .prepare: 3051 00001837 F6C502 <1> test ch, 2 3052 0000183A 7403 <1> jz @F 3053 0000183C E8A0EC <1> call guard_auxbuff 3054 <1> @@: 3055 0000183F C706[DC0B][0718] <1> mov word [lastcmd], .last 3056 00001845 890E[680B] <1> mov word [lastint_is_86m_and_mcb], cx 3057 00001849 E9CF8D <1> jmp prephack 3058 <1> 3059 <1> 3060 <1> ; INP: bx = interrupt number 3061 <1> ; cx = options 3062 <1> ; CHG: di, eax. edx, bp 3063 <1> ; STT: ds = es = ss 3064 <1> ; prephack called 3065 <1> .do: 3066 0000184C 881E[6A0B] <1> mov byte [lastint], bl 3067 00001850 E85227 <1> call handle_serial_flags_ctrl_c 3068 00001853 E8F38D <1> call dohack 3069 00001856 BF[0E08] <1> mov di, line_out 3070 00001859 B8696E <1> mov ax, "in" 3071 0000185C AB <1> stosw 3072 0000185D B87420 <1> mov ax, "t " 3073 00001860 AB <1> stosw 3074 00001861 88D8 <1> mov al, bl 3075 00001863 E88FA1 <1> call hexbyte 3076 00001866 B020 <1> mov al, 32 3077 00001868 AA <1> stosb 3078 <1> %if _PM 3079 00001869 84C9 <1> test cl, cl 3080 0000186B 7545 <1> jnz .rm 3081 0000186D E85D79 <1> call ispm 3082 00001870 7540 <1> jnz .rm 3083 <1> 3084 00001872 B80402 <1> mov ax, 0204h 3085 00001875 80FB20 <1> cmp bl, 20h 3086 00001878 80D701 <1> adc bh, 1 ; if below, bh = 2 3087 <1> .loopexception: 3088 0000187B 51 <1> push cx 3089 0000187C CD31 <1> int 31h 3090 0000187E 89C8 <1> mov ax, cx 3091 00001880 59 <1> pop cx 3092 00001881 7303E9B000 <1> jc .failed 3093 00001886 E865A1 <1> call hexword 3094 00001889 B03A <1> mov al, ':' 3095 0000188B AA <1> stosb 3096 0000188C 66 <1> _386_PM_o32 ; mov eax, edx 3097 0000188D 89D0 <1> mov ax, dx 3098 0000188F 803E[DA88]00 <1> cmp byte [dpmi32], 0 3099 00001894 7403 <1> jz .gate16 3100 00001896 E849A1 <1> call hexword_high 3101 <1> .gate16: 3102 00001899 E852A1 <1> call hexword 3103 0000189C B020 <1> mov al, 32 3104 0000189E AA <1> stosb 3105 0000189F B80202 <1> mov ax, 0202h 3106 000018A2 FECF <1> dec bh 3107 000018A4 75D5 <1> jnz .loopexception 3108 000018A6 4F <1> dec di 3109 000018A7 E8D38D <1> call unhack 3110 000018AA 53 <1> push bx 3111 000018AB 51 <1> push cx 3112 000018AC E877A1 <1> call putsline_crlf 3113 000018AF 59 <1> pop cx 3114 000018B0 5B <1> pop bx 3115 000018B1 C3 <1> retn 3116 <1> 3117 <1> .rm: 3118 <1> %endif 3119 000018B2 53 <1> push bx 3120 000018B3 51 <1> push cx 3121 000018B4 56 <1> push si 3122 <1> 3123 000018B5 53 <1> push bx 3124 000018B6 31ED <1> xor bp, bp 3125 000018B8 D1E3 <1> shl bx, 1 3126 000018BA D1E3 <1> shl bx, 1 3127 000018BC 31D2 <1> xor dx, dx 3128 <1> %if _PM 3129 000018BE E809B9 <1> call setes2dx 3130 <1> %else 3131 <1> mov es, dx ; es => IVT 3132 <1> %endif 3133 000018C1 268B4702 <1> mov ax, word [es:bx + 2] ; ax = segment 3134 000018C5 268B17 <1> mov dx, word [es:bx] 3135 000018C8 5B <1> pop bx 3136 <1> 3137 000018C9 F6C502 <1> test ch, 2 3138 000018CC 7572 <1> jnz int_list 3139 <1> 3140 <1> .loop_chain: 3141 000018CE 50 <1> push ax ; segment 3142 000018CF 52 <1> push dx 3143 <1> 3144 000018D0 16 <1> push ss 3145 000018D1 07 <1> pop es 3146 000018D2 E819A1 <1> call hexword 3147 000018D5 B03A <1> mov al, ':' 3148 000018D7 AA <1> stosb 3149 000018D8 89D0 <1> mov ax, dx 3150 000018DA E811A1 <1> call hexword 3151 <1> 3152 000018DD 5B <1> pop bx 3153 000018DE 5A <1> pop dx ; segment 3154 <1> 3155 000018DF 8916[660B] <1> mov word [intaddress + 2], dx 3156 000018E3 891E[640B] <1> mov word [intaddress], bx 3157 <1> 3158 000018E7 45 <1> inc bp 3159 000018E8 81FD0001 <1> cmp bp, 256 3160 000018EC 7740 <1> ja .toomany 3161 <1> 3162 000018EE E80003 <1> call check_int_chain 3163 000018F1 722C <1> jc .end_chain 3164 <1> 3165 000018F3 52 <1> push dx ; segment 3166 000018F4 50 <1> push ax 3167 000018F5 16 <1> push ss 3168 000018F6 07 <1> pop es 3169 000018F7 E8838D <1> call unhack 3170 000018FA 51 <1> push cx 3171 000018FB E8061B <1> call copy_single_counted_string 3172 000018FE 59 <1> pop cx 3173 000018FF E88B03 <1> call .mcbname 3174 00001902 51 <1> push cx 3175 00001903 E820A1 <1> call putsline_crlf 3176 00001906 59 <1> pop cx 3177 00001907 E89B26 <1> call handle_serial_flags_ctrl_c 3178 0000190A E83C8D <1> call dohack 3179 0000190D BF[0E08] <1> mov di, line_out 3180 00001910 B8202D <1> mov ax, " -" 3181 00001913 AB <1> stosw 3182 00001914 B82D3E <1> mov ax, "->" 3183 00001917 AB <1> stosw 3184 00001918 B020 <1> mov al, 32 3185 0000191A AA <1> stosb 3186 <1> 3187 0000191B 5A <1> pop dx 3188 0000191C 58 <1> pop ax ; (ax = segment) 3189 0000191D EBAF <1> jmp .loop_chain 3190 <1> 3191 <1> .end_chain: 3192 0000191F 16 <1> push ss 3193 00001920 07 <1> pop es 3194 00001921 E8598D <1> call unhack 3195 00001924 E86603 <1> call .mcbname 3196 00001927 E8FCA0 <1> call putsline_crlf 3197 <1> .86next: 3198 0000192A 5E <1> pop si 3199 0000192B 59 <1> pop cx 3200 0000192C 5B <1> pop bx 3201 0000192D C3 <1> retn 3202 <1> 3203 <1> .toomany: 3204 0000192E BE[1068] <1> mov si, msg.di_toomany 3205 00001931 E8D01A <1> call copy_single_counted_string 3206 00001934 EBE9 <1> jmp .end_chain 3207 <1> 3208 <1> %if _PM 3209 <1> .failed: 3210 00001936 E8448D <1> call unhack 3211 00001939 5A <1> pop dx ; discard a near return address 3212 0000193A BA[B37C] <1> mov dx, gatewrong 3213 0000193D E964A4 <1> jmp putsz 3214 <1> %endif 3215 <1> 3216 <1> 3217 <1> int_list: 3218 00001940 57 <1> push di 3219 00001941 51 <1> push cx 3220 00001942 53 <1> push bx 3221 00001943 92 <1> xchg ax, dx ; dx = segment 3222 <1> 3223 00001944 368E06[F209] <1> mov es, word [ss:auxbuff_segorsel] 3224 00001949 31FF <1> xor di, di ; -> auxbuff 3225 0000194B AB <1> stosw ; store offset 3226 0000194C 92 <1> xchg ax, dx ; dx = offset 3227 0000194D AB <1> stosw ; store segment 3228 0000194E 92 <1> xchg ax, dx ; dx = segment 3229 0000194F 93 <1> xchg bx, ax ; bx = offset 3230 00001950 B80003 <1> mov ax, 300h ; flag for IVT | unused 3231 00001953 AB <1> stosw ; which multiplex number 3232 00001954 31C0 <1> xor ax, ax 3233 00001956 AB <1> stosw ; which int list entry = none = 0 3234 <1> 3235 <1> .loop_ivt_chain: 3236 00001957 E89702 <1> call check_int_chain 3237 0000195A 7219 <1> jc .end_ivt_chain 3238 <1> 3239 0000195C 81FFF81F <1> cmp di, _AUXBUFFSIZE - 3 * 8 3240 00001960 7735 <1> ja .error 3241 00001962 368E06[F209] <1> mov es, word [ss:auxbuff_segorsel] 3242 00001967 AB <1> stosw ; store offset 3243 00001968 92 <1> xchg ax, dx 3244 00001969 AB <1> stosw ; store segment 3245 0000196A 92 <1> xchg ax, dx 3246 0000196B 93 <1> xchg bx, ax 3247 0000196C B80002 <1> mov ax, 200h ; flag for unused 3248 0000196F AB <1> stosw ; found in chain = 200h 3249 00001970 31C0 <1> xor ax, ax 3250 00001972 AB <1> stosw 3251 00001973 EBE2 <1> jmp .loop_ivt_chain 3252 <1> 3253 <1> .end_ivt_chain: 3254 00001975 83C8FF <1> or ax, -1 3255 00001978 368E06[F209] <1> mov es, word [ss:auxbuff_segorsel] 3256 0000197D B90800 <1> mov cx, 8 3257 00001980 F3AB <1> rep stosw ; terminator is all-ones 3258 <1> ; (two terminators actually) 3259 <1> 3260 00001982 31C0 <1> xor ax, ax 3261 <1> .loopplex: 3262 00001984 B000 <1> mov al, 00h ; AMIS installation check 3263 00001986 51 <1> push cx 3264 <1> ; function 0 changes dx, di, cx, al 3265 <1> %if _PM 3266 00001987 E8A779 <1> call call_int2D 3267 <1> %else 3268 <1> int 2Dh ; enquire whether there's anyone 3269 <1> %endif 3270 0000198A 59 <1> pop cx ; but we don't care who it might be 3271 0000198B FEC0 <1> inc al ; = FFh ? 3272 0000198D 7503E90201 <1> jz .search ; yes, it is in use --> 3273 <1> .nextplex: 3274 00001992 FEC4 <1> inc ah 3275 00001994 75EE <1> jnz .loopplex ; try next multiplexer --> 3276 <1> 3277 <1> .done: 3278 00001996 A8 <1> db __TEST_IMM8 ; (NC) 3279 <1> .error: 3280 00001997 F9 <1> stc 3281 <1> 3282 00001998 5B <1> pop bx 3283 00001999 59 <1> pop cx 3284 0000199A 5F <1> pop di 3285 0000199B 16 <1> push ss 3286 0000199C 1F <1> pop ds 3287 0000199D 16 <1> push ss 3288 0000199E 07 <1> pop es 3289 <1> 3290 0000199F BE[8D67] <1> mov si, msg.di_error 3291 000019A2 7303E9B000 <1> jc .error_string 3292 <1> 3293 000019A7 31F6 <1> xor si, si 3294 <1> 3295 <1> .loop_chain: 3296 000019A9 8E1E[F209] <1> mov ds, word [auxbuff_segorsel] 3297 000019AD AD <1> lodsw 3298 000019AE 92 <1> xchg ax, dx 3299 000019AF AD <1> lodsw 3300 000019B0 83C604 <1> add si, 4 3301 <1> 3302 000019B3 89C3 <1> mov bx, ax 3303 000019B5 21D3 <1> and bx, dx 3304 000019B7 43 <1> inc bx 3305 000019B8 746D <1> jz .next_seq 3306 <1> 3307 <1> .next_chain: 3308 000019BA 16 <1> push ss 3309 000019BB 1F <1> pop ds 3310 <1> 3311 000019BC 50 <1> push ax ; segment 3312 000019BD 52 <1> push dx 3313 <1> 3314 000019BE 16 <1> push ss 3315 000019BF 07 <1> pop es 3316 000019C0 E82BA0 <1> call hexword 3317 000019C3 B03A <1> mov al, ':' 3318 000019C5 AA <1> stosb 3319 000019C6 89D0 <1> mov ax, dx 3320 000019C8 E823A0 <1> call hexword 3321 <1> 3322 000019CB 5B <1> pop bx 3323 000019CC 5A <1> pop dx ; segment 3324 <1> 3325 000019CD 8916[660B] <1> mov word [intaddress + 2], dx 3326 000019D1 891E[640B] <1> mov word [intaddress], bx 3327 <1> 3328 000019D5 56 <1> push si 3329 000019D6 E81802 <1> call check_int_chain 3330 000019D9 722E <1> jc .end_chain 3331 <1> 3332 000019DB 16 <1> push ss 3333 000019DC 07 <1> pop es 3334 000019DD E89D8C <1> call unhack 3335 000019E0 51 <1> push cx 3336 000019E1 E8201A <1> call copy_single_counted_string 3337 000019E4 59 <1> pop cx 3338 000019E5 5E <1> pop si 3339 000019E6 E87A00 <1> call .mpx 3340 000019E9 56 <1> push si 3341 000019EA E8A002 <1> call gateout.mcbname 3342 000019ED 51 <1> push cx 3343 000019EE E835A0 <1> call putsline_crlf 3344 000019F1 59 <1> pop cx 3345 000019F2 E8B025 <1> call handle_serial_flags_ctrl_c 3346 000019F5 E8518C <1> call dohack 3347 000019F8 BF[0E08] <1> mov di, line_out 3348 000019FB B8202D <1> mov ax, " -" 3349 000019FE AB <1> stosw 3350 000019FF B82D3E <1> mov ax, "->" 3351 00001A02 AB <1> stosw 3352 00001A03 B020 <1> mov al, 32 3353 00001A05 AA <1> stosb 3354 <1> 3355 00001A06 5E <1> pop si 3356 00001A07 EBA0 <1> jmp .loop_chain 3357 <1> 3358 <1> .end_chain: 3359 00001A09 16 <1> push ss 3360 00001A0A 07 <1> pop es 3361 00001A0B E86F8C <1> call unhack 3362 00001A0E 5E <1> pop si 3363 00001A0F E85100 <1> call .mpx 3364 00001A12 56 <1> push si 3365 00001A13 E87702 <1> call gateout.mcbname 3366 00001A16 51 <1> push cx 3367 00001A17 E80CA0 <1> call putsline_crlf 3368 00001A1A 59 <1> pop cx 3369 00001A1B BF[0E08] <1> mov di, line_out 3370 00001A1E E88425 <1> call handle_serial_flags_ctrl_c 3371 00001A21 E8258C <1> call dohack 3372 00001A24 5E <1> pop si 3373 00001A25 EB82 <1> jmp .loop_chain 3374 <1> 3375 <1> .next_seq: 3376 00001A27 AD <1> lodsw 3377 00001A28 92 <1> xchg ax, dx 3378 00001A29 AD <1> lodsw 3379 00001A2A 83C604 <1> add si, 4 3380 <1> 3381 00001A2D 89C3 <1> mov bx, ax 3382 00001A2F 21D3 <1> and bx, dx 3383 00001A31 43 <1> inc bx 3384 00001A32 741A <1> jz @F 3385 <1> 3386 00001A34 16 <1> push ss 3387 00001A35 1F <1> pop ds 3388 00001A36 16 <1> push ss 3389 00001A37 07 <1> pop es 3390 00001A38 E8428C <1> call unhack 3391 00001A3B 51 <1> push cx 3392 00001A3C 56 <1> push si 3393 00001A3D BE[9567] <1> mov si, msg.di_hidden 3394 00001A40 E8C119 <1> call copy_single_counted_string 3395 00001A43 5E <1> pop si 3396 00001A44 59 <1> pop cx 3397 00001A45 E85D25 <1> call handle_serial_flags_ctrl_c 3398 00001A48 E8FE8B <1> call dohack 3399 <1> 3400 00001A4B E96CFF <1> jmp .next_chain 3401 <1> 3402 <1> @@: 3403 00001A4E 16 <1> push ss 3404 00001A4F 1F <1> pop ds 3405 00001A50 16 <1> push ss 3406 00001A51 07 <1> pop es 3407 00001A52 E8288C <1> call unhack 3408 00001A55 EB09 <1> jmp @F 3409 <1> 3410 <1> 3411 <1> .error_string: 3412 00001A57 E8AA19 <1> call copy_single_counted_string 3413 <1> 3414 00001A5A E8208C <1> call unhack 3415 00001A5D E8C69F <1> call putsline_crlf 3416 <1> @@: 3417 <1> %if 0 ; _DEBUG 3418 <1> mov es, word [auxbuff_segorsel] 3419 <1> int3 3420 <1> push ss 3421 <1> pop es 3422 <1> %endif 3423 00001A60 E9C7FE <1> jmp gateout.86next 3424 <1> 3425 <1> 3426 <1> .mpx: 3427 00001A63 8E06[F209] <1> mov es, word [auxbuff_segorsel] 3428 00001A67 268B44FC <1> mov ax, word [es:si - 4] 3429 00001A6B 268B54FE <1> mov dx, word [es:si - 2] 3430 00001A6F 16 <1> push ss 3431 00001A70 07 <1> pop es 3432 00001A71 F6C402 <1> test ah, 2 3433 00001A74 751D <1> jnz @F 3434 00001A76 56 <1> push si 3435 00001A77 51 <1> push cx 3436 00001A78 BE[7968] <1> mov si, msg.di_multiplex.1 3437 00001A7B E88619 <1> call copy_single_counted_string 3438 00001A7E E8749F <1> call hexbyte 3439 00001A81 BE[8068] <1> mov si, msg.di_multiplex.2 3440 00001A84 E87D19 <1> call copy_single_counted_string 3441 00001A87 92 <1> xchg ax, dx 3442 00001A88 E8639F <1> call hexword 3443 00001A8B BE[8868] <1> mov si, msg.di_multiplex.3 3444 00001A8E E87319 <1> call copy_single_counted_string 3445 00001A91 59 <1> pop cx 3446 00001A92 5E <1> pop si 3447 <1> @@: 3448 00001A93 C3 <1> retn 3449 <1> 3450 <1> 3451 <1> ; INP: ah = multiplex number of AMIS TSR to search through 3452 <1> ; ss:sp-> interrupt number (byte), must be preserved 3453 <1> ; CHG: es, di, dx, bx 3454 <1> .search: 3455 00001A94 B004 <1> mov al, 04h 3456 00001A96 5B <1> pop bx 3457 00001A97 53 <1> push bx ; low byte is the interrupt number 3458 <1> ; function 4 changes dx, bx, al 3459 <1> %if _PM 3460 00001A98 E89678 <1> call call_int2D 3461 <1> %else 3462 <1> int 2Dh 3463 <1> %endif 3464 00001A9B 3C03 <1> cmp al, 03h ; returned its interrupt entry ? 3465 <1> ; RBIL doesn't explicitly state that this interrupt entry has to 3466 <1> ; be IISP compatible. But I'm too lazy to look up the older AMIS, 3467 <1> ; and SearchIISPChain checks the interrupt entry anyway. 3468 00001A9D 743D <1> je .search_dxbx 3469 00001A9F 3C04 <1> cmp al, 04h ; returned list of hooked interrupts ? 3470 00001AA1 7403E9ECFE <1> jne .nextplex ; no, try next multiplexer --> 3471 00001AA6 89DF <1> mov di, bx 3472 00001AA8 5B <1> pop bx 3473 00001AA9 53 <1> push bx ; bl = interrupt number 3474 00001AAA 31C9 <1> xor cx, cx ; = index into list 3475 00001AAC 88D8 <1> mov al, bl 3476 <1> .search_intlist_seg: 3477 <1> %if _PM 3478 00001AAE E819B7 <1> call setes2dx 3479 <1> %else 3480 <1> mov es, dx ; es:di-> list 3481 <1> %endif 3482 <1> .search_intlist: ; Search the returned list for the required interrupt number. 3483 00001AB1 AE <1> scasb ; our interrupt number ? 3484 00001AB2 740E <1> je .search_found_intlist 3485 00001AB4 26807DFF2D <1> cmp byte [es:di-1], 2Dh ; was last in list ? 3486 00001AB9 7503E9D4FE <1> je .nextplex 3487 00001ABE AF <1> scasw ; skip pointer 3488 00001ABF 41 <1> inc cx 3489 00001AC0 EBEF <1> jmp short .search_intlist ; try next entry --> 3490 <1> 3491 <1> .search_found_intlist: 3492 00001AC2 268B1D <1> mov bx, word [es:di] ; dx:bx = es:bx -> IISP entry 3493 00001AC5 AF <1> scasw ; skip pointer 3494 00001AC6 52 <1> push dx ; preserve dx for .search_intlist_seg 3495 00001AC7 57 <1> push di 3496 00001AC8 E82200 <1> call .add 3497 00001ACB 5F <1> pop di 3498 00001ACC 5A <1> pop dx 3499 00001ACD 7303E9C5FE <1> jc .error 3500 <1> ; je .search_found ; found entry --> 3501 <1> ; This specific jump supports TSRs that hook the same 3502 <1> ; interrupt more than once; jumping to .nextplex instead 3503 <1> ; (as previously) aborts the search after the first match 3504 <1> ; in the interrupt list. This support might become useful. 3505 00001AD2 3C2D <1> cmp al, 2Dh ; was last in list ? 3506 00001AD4 7503E9B9FE <1> je .nextplex 3507 00001AD9 41 <1> inc cx 3508 00001ADA EBD2 <1> jmp short .search_intlist_seg 3509 <1> 3510 <1> .search_dxbx: 3511 <1> %if _PM 3512 00001ADC E8EBB6 <1> call setes2dx 3513 <1> %else 3514 <1> mov es, dx ; es:bx-> (IISP) interrupt entry 3515 <1> %endif 3516 <1> ; The entry we found now is possibly behind the non-IISP entry that 3517 <1> ; terminated our first SearchIISPChain call (at .hard). We then 3518 <1> ; possibly might find our entry in this hidden part of the chain. 3519 00001ADF 83C9FF <1> or cx, -1 3520 00001AE2 E80800 <1> call .add 3521 00001AE5 7303E9ADFE <1> jc .error 3522 <1> ; jne .nextplex ; didn't find our entry in the chain --> 3523 00001AEA E9A5FE <1> jmp .nextplex 3524 <1> 3525 <1> 3526 <1> int_list.add: 3527 00001AED 31FF <1> xor di, di 3528 00001AEF 368E1E[F209] <1> mov ds, word [ss:auxbuff_segorsel] 3529 00001AF4 83CEFF <1> or si, -1 3530 00001AF7 E8D400 <1> call .check 3531 00001AFA 7516 <1> jne @F 3532 00001AFC F6450502 <1> testopt [di + 4], 200h 3533 00001B00 7503E9C700 <1> jz .error 3534 00001B05 886504 <1> mov byte [di + 4], ah 3535 00001B08 806505FD <1> clropt [di + 4], 200h 3536 00001B0C 894D06 <1> mov word [di + 6], cx 3537 00001B0F E9B900 <1> jmp .done 3538 <1> 3539 <1> @@: 3540 <1> ; ds:di -> second terminator 3541 00001B12 81FFF81F <1> cmp di, _AUXBUFFSIZE - 8 * 3 3542 00001B16 7603E9B100 <1> ja .error 3543 00001B1B 8D75F8 <1> lea si, [di - 8] 3544 <1> 3545 00001B1E 93 <1> xchg ax, bx 3546 00001B1F 368E06[F209] <1> mov es, word [ss:auxbuff_segorsel] 3547 <1> ; => auxbuff 3548 00001B24 AB <1> stosw ; store offset 3549 00001B25 92 <1> xchg ax, dx ; dx = offset 3550 00001B26 AB <1> stosw ; store segment 3551 00001B27 92 <1> xchg ax, dx ; dx = segment 3552 00001B28 93 <1> xchg ax, bx 3553 00001B29 50 <1> push ax 3554 00001B2A B000 <1> mov al, 0 3555 00001B2C 86C4 <1> xchg al, ah 3556 00001B2E AB <1> stosw ; which multiplex number 3557 00001B2F 89C8 <1> mov ax, cx 3558 00001B31 AB <1> stosw ; which int list entry = none = 0 3559 00001B32 58 <1> pop ax 3560 <1> 3561 <1> .loop_chain: 3562 00001B33 50 <1> push ax 3563 00001B34 56 <1> push si 3564 00001B35 E8B900 <1> call check_int_chain 3565 00001B38 5E <1> pop si 3566 00001B39 5B <1> pop bx 3567 00001B3A 727E <1> jc .end_chain 3568 <1> 3569 00001B3C 81FFF81F <1> cmp di, _AUXBUFFSIZE - 3 * 8 3570 00001B40 7603E98700 <1> ja .error 3571 00001B45 368E06[F209] <1> mov es, word [ss:auxbuff_segorsel] 3572 00001B4A AB <1> stosw ; store offset 3573 00001B4B 92 <1> xchg ax, dx 3574 00001B4C AB <1> stosw ; store segment 3575 00001B4D 92 <1> xchg ax, dx 3576 00001B4E 93 <1> xchg bx, ax ; ah = multiplex number, bx = offset 3577 00001B4F 50 <1> push ax 3578 00001B50 B80002 <1> mov ax, 200h 3579 00001B53 AB <1> stosw ; found in chain = 200h 3580 00001B54 31C0 <1> xor ax, ax 3581 00001B56 AB <1> stosw 3582 00001B57 58 <1> pop ax 3583 00001B58 57 <1> push di 3584 00001B59 31FF <1> xor di, di 3585 00001B5B E87000 <1> call .check 3586 00001B5E 7403 <1> je @F 3587 00001B60 5F <1> pop di 3588 00001B61 EBD0 <1> jmp .loop_chain 3589 <1> 3590 <1> @@: 3591 00001B63 5B <1> pop bx 3592 00001B64 F6450501 <1> testopt [di + 4], 100h 3593 00001B68 7562 <1> jnz .error 3594 00001B6A 837DFCFF <1> cmp word [di - 8 + 4], -1 3595 00001B6E 755C <1> jne .error 3596 <1> ; di -> match (insert to move here) 3597 <1> ; bx -> after repeat 3598 <1> ; bx - 8 -> repeat 3599 <1> ; bx - 16 -> last entry to move 3600 <1> ; si -> single terminator 3601 <1> ; si + 8 -> first entry to move 3602 <1> 3603 00001B70 83EB10 <1> sub bx, 16 ; -> last entry to move 3604 <1> 3605 <1> .insert: 3606 <1> ; di -> match (insert to move here) 3607 <1> ; bx + 8 -> repeat 3608 <1> ; bx -> last entry to move 3609 <1> ; si -> single terminator 3610 <1> ; si + 8 -> first entry to move 3611 <1> 3612 00001B73 FF7706 <1> push word [bx + 6] 3613 00001B76 FF7704 <1> push word [bx + 4] 3614 00001B79 FF7702 <1> push word [bx + 2] 3615 00001B7C FF37 <1> push word [bx] ; get the last entry 3616 00001B7E 57 <1> push di 3617 00001B7F 56 <1> push si 3618 00001B80 51 <1> push cx 3619 00001B81 368E06[F209] <1> mov es, word [ss:auxbuff_segorsel] 3620 00001B86 89F9 <1> mov cx, di ; = where to insert 3621 <1> ; -> first to displace 3622 00001B88 F7D9 <1> neg cx 3623 00001B8A 89DE <1> mov si, bx ; -> after end of source 3624 00001B8C 8D7F08 <1> lea di, [bx + 8] ; -> after end of dest 3625 00001B8F 01F1 <1> add cx, si ; after end of source - first to displace 3626 <1> ; = how many bytes to displace 3627 00001B91 D1E9 <1> shr cx, 1 3628 00001B93 FD <1> std ; _AMD_ERRATUM_109_WORKAROUND as below 3629 00001B94 A7 <1> cmpsw ; si -= 2, di -= 2 3630 <1> 3631 <1> numdef AMD_ERRATUM_109_WORKAROUND, 1 3632 <1> ; Refer to comment in init.asm init_movp. 3633 <1> 3634 <1> %if _AMD_ERRATUM_109_WORKAROUND 3635 00001B95 E308 <1> jcxz @FF 3636 00001B97 83F914 <1> cmp cx, 20 3637 00001B9A 7703 <1> ja @FF 3638 <1> @@: 3639 00001B9C A5 <1> movsw 3640 00001B9D E2FD <1> loop @B 3641 <1> @@: 3642 <1> %endif 3643 00001B9F F3A5 <1> rep movsw 3644 00001BA1 FC <1> cld 3645 00001BA2 59 <1> pop cx 3646 00001BA3 5E <1> pop si 3647 00001BA4 5F <1> pop di 3648 00001BA5 8F05 <1> pop word [di] 3649 00001BA7 8F4502 <1> pop word [di + 2] 3650 00001BAA 8F4504 <1> pop word [di + 4] 3651 00001BAD 8F4506 <1> pop word [di + 6] ; insert moved entry 3652 00001BB0 83C608 <1> add si, 8 3653 <1> 3654 <1> ; di -> match (inserted here, insert next here) 3655 <1> ; bx + 8 -> repeat 3656 <1> ; bx -> last entry to move 3657 <1> ; si -> single terminator 3658 <1> ; si + 8 -> first entry to move 3659 00001BB3 39DE <1> cmp si, bx ; if last to move != terminator 3660 00001BB5 75BC <1> jne .insert ; then move another -> 3661 00001BB7 89F7 <1> mov di, si ; where to put double terminator 3662 <1> 3663 00001BB9 93 <1> xchg ax, bx 3664 <1> .end_chain: 3665 00001BBA 53 <1> push bx 3666 00001BBB 51 <1> push cx 3667 00001BBC 83C8FF <1> or ax, -1 3668 00001BBF 368E06[F209] <1> mov es, word [ss:auxbuff_segorsel] 3669 00001BC4 B90800 <1> mov cx, 8 3670 00001BC7 F3AB <1> rep stosw ; terminator is all-ones 3671 <1> ; (two terminators actually) 3672 00001BC9 59 <1> pop cx 3673 00001BCA 58 <1> pop ax 3674 <1> 3675 <1> .done: 3676 00001BCB A8 <1> db __TEST_IMM8 ; (NC) 3677 <1> .error: 3678 00001BCC F9 <1> stc 3679 <1> 3680 00001BCD C3 <1> retn 3681 <1> 3682 <1> 3683 <1> ; INP: dx:bx = 86 Mode far pointer to handler 3684 <1> ; di -> to check 3685 <1> ; si = end of area to check 3686 <1> 3687 <1> .check: 3688 00001BCE 391D <1> cmp word [di + 0], bx 3689 00001BD0 7506 <1> jne .mismatch 3690 00001BD2 395502 <1> cmp word [di + 2], dx 3691 00001BD5 7501 <1> jne .mismatch 3692 <1> .match: 3693 00001BD7 C3 <1> retn 3694 <1> 3695 <1> .mismatch: 3696 00001BD8 83C708 <1> add di, 8 3697 <1> 3698 00001BDB 39F7 <1> cmp di, si 3699 00001BDD 730F <1> jae .checkret 3700 <1> 3701 00001BDF 837D04FF <1> cmp word [di + 4], -1 3702 00001BE3 75E9 <1> jne .check 3703 <1> 3704 00001BE5 83C708 <1> add di, 8 3705 00001BE8 837D04FF <1> cmp word [di + 4], -1 3706 00001BEC 75E0 <1> jne .check 3707 <1> .checkret: 3708 00001BEE 85FF <1> test di, di 3709 00001BF0 C3 <1> retn 3710 <1> 3711 <1> 3712 <1> ; INP: dx:bx = 86 Mode far pointer to int handler 3713 <1> ; OUT: NC if chain found, 3714 <1> ; dx:ax = 86 Mode far pointer to next 3715 <1> ; ss:si -> type message (counted) 3716 <1> ; STT: es != ss, ds != ss 3717 <1> check_int_chain: 3718 <1> %if _PM 3719 00001BF1 E8D6B5 <1> call setes2dx 3720 <1> %else 3721 <1> mov es, dx ; es:bx -> entrypoint 3722 <1> %endif 3723 00001BF4 E85EB7 <1> call IsIISPEntry? 3724 00001BF7 752A <1> jnz .not_iisp 3725 <1> 3726 00001BF9 26FF7704 <1> push word [es:bx + ieNext + 2] 3727 00001BFD 26FF7702 <1> push word [es:bx + ieNext] 3728 <1> 3729 00001C01 BE[B967] <1> mov si, msg.di_uninst_iisp 3730 00001C04 26813F90EA <1> cmp word [ es:bx + ieEntry ], 0EA90h ; nop\jmp far imm16:imm16 ? 3731 00001C09 7414 <1> je @F 3732 00001C0B BE[9D67] <1> mov si, msg.di_iisp 3733 00001C0E 26807F09EB <1> cmp byte [ es:bx + ieJmphwreset ], 0EBh ; jmp short ? 3734 00001C13 7507 <1> jne .nonstd 3735 00001C15 26813FEB10 <1> cmp word [ es:bx + ieEntry ], 010EBh ; jmp short $+18 ? 3736 00001C1A 7403 <1> je @F 3737 <1> .nonstd: 3738 00001C1C BE[A567] <1> mov si, msg.di_nonstd_iisp 3739 <1> @@: 3740 00001C1F 58 <1> pop ax 3741 00001C20 5A <1> pop dx ; segment 3742 00001C21 F8 <1> clc 3743 00001C22 C3 <1> retn 3744 <1> 3745 <1> 3746 <1> .not_iisp: 3747 00001C23 26803FE8 <1> cmp byte [es:bx], 0E8h 3748 00001C27 7514 <1> jne .not_fd 3749 00001C29 26807F03EA <1> cmp byte [es:bx + 3], 0EAh 3750 00001C2E 750D <1> jne .not_fd 3751 00001C30 26FF7706 <1> push word [es:bx + 4 + 2] 3752 00001C34 26FF7704 <1> push word [es:bx + 4] 3753 00001C38 BE[CD67] <1> mov si, msg.di_freedos_reloc 3754 00001C3B EBE2 <1> jmp @B 3755 <1> 3756 <1> .not_fd: 3757 00001C3D BE[E067] <1> mov si, msg.di_jmpfar 3758 00001C40 26803FEA <1> cmp byte [es:bx], 0EAh 3759 00001C44 750A <1> jne .not_jmpfar 3760 00001C46 26FF7703 <1> push word [es:bx + 1 + 2] 3761 00001C4A 26FF7701 <1> push word [es:bx + 1] 3762 00001C4E EBCF <1> jmp @B 3763 <1> 3764 <1> .not_jmpfar: 3765 00001C50 BE[EF67] <1> mov si, msg.di_jmpfarindirect 3766 00001C53 26803FEB <1> cmp byte [es:bx], 0EBh 3767 00001C57 750D <1> jne .not_testhook_try_jmpfarindirect 3768 00001C59 BE[0368] <1> mov si, msg.di_testhook 3769 00001C5C 268A4701 <1> mov al, byte [es:bx + 1] 3770 00001C60 98 <1> cbw 3771 00001C61 83C002 <1> add ax, 2 3772 00001C64 01C3 <1> add bx, ax 3773 <1> .not_testhook_try_jmpfarindirect: 3774 00001C66 83FBFA <1> cmp bx, -6 3775 00001C69 7720 <1> ja .not_testhook_or_jmpfarindirect 3776 00001C6B 26813F2EFF <1> cmp word [es:bx], 0FF2Eh 3777 00001C70 7519 <1> jne .not_testhook_or_jmpfarindirect 3778 00001C72 26807F022E <1> cmp byte [es:bx + 2], 2Eh 3779 00001C77 7512 <1> jne .not_testhook_or_jmpfarindirect 3780 00001C79 268B5F03 <1> mov bx, word [es:bx + 3] 3781 00001C7D 83FBFC <1> cmp bx, -4 3782 00001C80 7709 <1> ja .not_testhook_or_jmpfarindirect 3783 00001C82 26FF7702 <1> push word [es:bx + 2] 3784 00001C86 26FF37 <1> push word [es:bx] 3785 00001C89 EB94 <1> jmp @B 3786 <1> 3787 <1> .not_testhook_or_jmpfarindirect: 3788 00001C8B F9 <1> stc 3789 00001C8C C3 <1> retn 3790 <1> 3791 <1> 3792 <1> gateout.mcbname: 3793 00001C8D F6C501 <1> test ch, 1 3794 00001C90 7503E99A00 <1> jz .ret 3795 00001C95 8B16[CE0A] <1> mov dx, word [firstmcb] 3796 00001C99 83FAFF <1> cmp dx, -1 3797 00001C9C 7503E98E00 <1> je .ret 3798 00001CA1 51 <1> push cx 3799 00001CA2 A1[640B] <1> mov ax, word [intaddress] 3800 00001CA5 B104 <1> mov cl, 4 3801 00001CA7 D3E8 <1> shr ax, cl 3802 00001CA9 0306[660B] <1> add ax, word [intaddress + 2] ; => segment of handler 3803 00001CAD 7251 <1> jc .hma 3804 <1> .loop: 3805 <1> %if _PM 3806 00001CAF E818B5 <1> call setes2dx 3807 <1> %else 3808 <1> mov es, dx 3809 <1> %endif 3810 00001CB2 89D1 <1> mov cx, dx 3811 00001CB4 26030E0300 <1> add cx, word [es:3] 3812 00001CB9 41 <1> inc cx 3813 00001CBA 39D0 <1> cmp ax, dx 3814 00001CBC 7247 <1> jb .next 3815 00001CBE 39C8 <1> cmp ax, cx 3816 00001CC0 7343 <1> jae .next 3817 00001CC2 268B160100 <1> mov dx, word [es:1] 3818 00001CC7 BE[3D68] <1> mov si, msg.di_system_mcb 3819 00001CCA 83FA50 <1> cmp dx, 50h 3820 00001CCD 725A <1> jb .copy 3821 00001CCF 4A <1> dec dx 3822 <1> %if _PM 3823 00001CD0 E8F7B4 <1> call setes2dx 3824 <1> %else 3825 <1> mov es, dx 3826 <1> %endif 3827 00001CD3 06 <1> push es 3828 00001CD4 1F <1> pop ds 3829 00001CD5 16 <1> push ss 3830 00001CD6 07 <1> pop es 3831 00001CD7 B020 <1> mov al, 32 3832 00001CD9 AA <1> stosb 3833 00001CDA 89F8 <1> mov ax, di 3834 00001CDC BE0800 <1> mov si, 8 3835 00001CDF 89F1 <1> mov cx, si 3836 00001CE1 57 <1> push di 3837 00001CE2 F3A4 <1> rep movsb 3838 00001CE4 B000 <1> mov al, 0 3839 00001CE6 AA <1> stosb ; append zero-value byte 3840 00001CE7 5F <1> pop di ; -> name in buffer 3841 00001CE8 16 <1> push ss 3842 00001CE9 1F <1> pop ds 3843 <1> @@: 3844 00001CEA AE <1> scasb ; is it zero ? 3845 00001CEB 75FD <1> jne @B ; no, continue --> 3846 <1> ; first dec makes it -> at the zero 3847 <1> @@: 3848 00001CED 4F <1> dec di 3849 00001CEE 39F8 <1> cmp ax, di 3850 00001CF0 7408 <1> je .empty 3851 00001CF2 807DFF20 <1> cmp byte [di - 1], 32 3852 00001CF6 74F5 <1> je @B 3853 00001CF8 EB34 <1> jmp .ret_cx 3854 <1> 3855 <1> .empty: 3856 00001CFA 4F <1> dec di 3857 00001CFB BE[2D68] <1> mov si, msg.di_empty 3858 00001CFE EB29 <1> jmp .copy 3859 <1> 3860 <1> .hma: 3861 00001D00 BE[6768] <1> mov si, msg.di_hma 3862 00001D03 EB24 <1> jmp .copy 3863 <1> 3864 <1> .next: 3865 00001D05 89CA <1> mov dx, cx 3866 00001D07 3B16[D00A] <1> cmp dx, word [firstumcb]; is next one the first UMCB ? 3867 00001D0B 74A2 <1> je .loop ; yes, ignore the "Z" (if any) --> 3868 00001D0D 26803E00004D <1> cmp byte [es:0], "M" ; check current signature 3869 00001D13 749A <1> je .loop ; if "M" then loop to next --> 3870 <1> 3871 00001D15 8B36[D00A] <1> mov si, word [firstumcb] 3872 00001D19 46 <1> inc si 3873 00001D1A 7503 <1> jnz @F 3874 00001D1C BE00A0 <1> mov si, 0A000h 3875 <1> @@: 3876 00001D1F 39F0 <1> cmp ax, si 3877 00001D21 BE[4968] <1> mov si, msg.di_system_upper 3878 00001D24 7303 <1> jae @F 3879 00001D26 BE[5868] <1> mov si, msg.di_system_low 3880 <1> @@: 3881 <1> .copy: 3882 00001D29 16 <1> push ss 3883 00001D2A 07 <1> pop es 3884 00001D2B E8D616 <1> call copy_single_counted_string 3885 <1> .ret_cx: 3886 00001D2E 59 <1> pop cx 3887 <1> .ret: 3888 00001D2F C3 <1> retn 3889 <1> 3890 <1> %endif 3891 <1> 3892 <1> %if _MCB 3893 <1> ; DM command 3894 <1> mcbout: 3895 00001D30 E8109C <1> call skipwhite 3896 00001D33 8B16[CE0A] <1> mov dx, word [firstmcb] 3897 00001D37 E8B49B <1> call iseol? 3898 00001D3A 7406 <1> je .lolmcb 3899 00001D3C E88E9A <1> call getword 3900 00001D3F E8C19B <1> call chkeol 3901 <1> .lolmcb: 3902 00001D42 89D6 <1> mov si, dx 3903 00001D44 BF[0E08] <1> mov di, line_out 3904 00001D47 B85053 <1> mov ax, "PS" 3905 00001D4A AB <1> stosw 3906 00001D4B B8503A <1> mov ax, "P:" 3907 00001D4E AB <1> stosw 3908 00001D4F B020 <1> mov al, 32 3909 00001D51 AA <1> stosb 3910 00001D52 A1[A40A] <1> mov ax, word [pspdbe] 3911 00001D55 E8969C <1> call hexword 3912 00001D58 E8CB9C <1> call putsline_crlf ; destroys cx,dx,bx 3913 00001D5B B14D <1> mov cl, 'M' 3914 <1> .next: 3915 00001D5D 83FEFF <1> cmp si, byte -1 3916 00001D60 7405 <1> je .invmcb 3917 00001D62 83FE50 <1> cmp si, byte 50h 3918 00001D65 7306 <1> jae .valmcb 3919 <1> .invmcb: 3920 00001D67 BA[A95E] <1> mov dx, msg.invmcbadr 3921 00001D6A E937A0 <1> jmp putsz 3922 <1> .valmcb: 3923 00001D6D BF[0E08] <1> mov di, line_out 3924 00001D70 1E <1> push ds 3925 <1> %if _PM 3926 00001D71 E8D600 <1> call setds2si 3927 <1> %else 3928 <1> mov ds, si 3929 <1> %endif 3930 00001D74 8A2E0000 <1> mov ch, byte [0000] 3931 00001D78 8B1E0100 <1> mov bx, word [0001] 3932 00001D7C 8B160300 <1> mov dx, word [0003] 3933 <1> 3934 00001D80 89F0 <1> mov ax, si 3935 00001D82 E8699C <1> call hexword ; segment address of MCB 3936 00001D85 B020 <1> mov al, 32 3937 00001D87 AA <1> stosb 3938 00001D88 88E8 <1> mov al, ch 3939 00001D8A E8689C <1> call hexbyte ; 'M' or 'Z' 3940 00001D8D B020 <1> mov al, 32 3941 00001D8F AA <1> stosb 3942 00001D90 89D8 <1> mov ax, bx 3943 00001D92 E8599C <1> call hexword ; MCB owner 3944 00001D95 B020 <1> mov al, 32 3945 00001D97 AA <1> stosb 3946 00001D98 89D0 <1> mov ax, dx 3947 00001D9A E8519C <1> call hexword ; MCB size in paragraphs 3948 <1> 3949 00001D9D B020 <1> mov al, 32 3950 00001D9F AA <1> stosb 3951 00001DA0 89D0 <1> mov ax, dx ; ax = size in paragraphs 3952 00001DA2 53 <1> push bx 3953 00001DA3 50 <1> push ax 3954 00001DA4 52 <1> push dx 3955 00001DA5 51 <1> push cx 3956 00001DA6 31D2 <1> xor dx, dx ; dx:ax = size in paragraphs 3957 00001DA8 B91000 <1> mov cx, 16 ; cx = 16, multiplier (get size in bytes) 3958 00001DAB BB0800 <1> mov bx, 4+4 ; bx = 4+4, width 3959 <1> 3960 00001DAE E87801 <1> call disp_dxax_times_cx_width_bx_size.store 3961 00001DB1 59 <1> pop cx 3962 00001DB2 5A <1> pop dx 3963 00001DB3 58 <1> pop ax 3964 00001DB4 5B <1> pop bx 3965 <1> 3966 00001DB5 85DB <1> test bx, bx 3967 00001DB7 7472 <1> jz .freemcb ; free MCBs have no name --> 3968 00001DB9 B020 <1> mov al, 32 3969 00001DBB AA <1> stosb 3970 00001DBC 56 <1> push si 3971 00001DBD 51 <1> push cx 3972 00001DBE 52 <1> push dx 3973 <1> 3974 00001DBF 1E <1> push ds 3975 00001DC0 BE0800 <1> mov si, 8 3976 00001DC3 B90200 <1> mov cx, 2 3977 00001DC6 39F3 <1> cmp bx, si ; is it a "system" MCB? (owner 0008h or 0007h) 3978 00001DC8 7707 <1> ja @F 3979 00001DCA 803C53 <1> cmp byte [si], "S" ; "S", "SD", "SC" ? 3980 00001DCD 7408 <1> je .nextmcbchar ; yes, limit name to two characters --> 3981 00001DCF EB04 <1> jmp .nextmcbchar_cx_si ; no, assume full name given 3982 <1> @@: 3983 00001DD1 4B <1> dec bx ; => owner block's MCB 3984 <1> %if _PM 3985 00001DD2 E87700 <1> call setds2bx 3986 <1> %else 3987 <1> mov ds, bx 3988 <1> %endif 3989 <1> .nextmcbchar_cx_si: 3990 00001DD5 89F1 <1> mov cx, si ; = 8 3991 <1> .nextmcbchar: ; copy name of owner MCB 3992 00001DD7 AC <1> lodsb 3993 00001DD8 AA <1> stosb 3994 00001DD9 08C0 <1> or al, al 3995 00001DDB E0FA <1> loopnz .nextmcbchar ; was not NUL and more bytes left ? 3996 00001DDD 84C0 <1> test al, al 3997 00001DDF 7501 <1> jnz @F 3998 00001DE1 4F <1> dec di 3999 <1> @@: 4000 00001DE2 1F <1> pop ds 4001 <1> 4002 00001DE3 833E010008 <1> cmp word [1], 8 4003 00001DE8 753E <1> jne .not_s_mcb 4004 00001DEA 833E080053 <1> cmp word [8], "S" ; S MCB ? 4005 00001DEF 7537 <1> jne .not_s_mcb 4006 <1> 4007 00001DF1 B82074 <1> mov ax, " t" 4008 00001DF4 AB <1> stosw 4009 00001DF5 B87970 <1> mov ax, "yp" 4010 00001DF8 AB <1> stosw 4011 00001DF9 B86520 <1> mov ax, "e " 4012 00001DFC AB <1> stosw 4013 <1> 4014 00001DFD 31C0 <1> xor ax, ax 4015 00001DFF A00A00 <1> mov al, [10] 4016 00001E02 E8F09B <1> call hexbyte 4017 <1> 4018 00001E05 16 <1> push ss 4019 00001E06 1F <1> pop ds 4020 00001E07 BE[8C72] <1> mov si, smcbtypes 4021 <1> .s_mcb_loop: 4022 00001E0A 833CFF <1> cmp word [si], -1 4023 00001E0D 740E <1> je .s_mcb_unknown 4024 00001E0F 3904 <1> cmp word [si], ax 4025 00001E11 7405 <1> je .s_mcb_known 4026 00001E13 83C604 <1> add si, 4 4027 00001E16 EBF2 <1> jmp .s_mcb_loop 4028 <1> 4029 <1> .s_mcb_known: 4030 00001E18 8B7402 <1> mov si, word [si + 2] 4031 00001E1B EB03 <1> jmp .s_mcb_common 4032 <1> 4033 <1> .s_mcb_unknown: 4034 00001E1D BE[3574] <1> mov si, smcbmsg_unknown 4035 <1> .s_mcb_common: 4036 00001E20 B020 <1> mov al, 32 4037 <1> @@: 4038 00001E22 AA <1> stosb 4039 00001E23 AC <1> lodsb 4040 00001E24 84C0 <1> test al, al 4041 00001E26 75FA <1> jnz @B 4042 <1> 4043 <1> .not_s_mcb: 4044 00001E28 5A <1> pop dx 4045 00001E29 59 <1> pop cx 4046 00001E2A 5E <1> pop si 4047 <1> .freemcb: 4048 <1> 4049 00001E2B 1F <1> pop ds 4050 00001E2C 80FD4D <1> cmp ch, 'M' 4051 00001E2F 7406 <1> je .disp 4052 00001E31 80FD5A <1> cmp ch, 'Z' 4053 00001E34 7401 <1> je .disp 4054 <1> .ret: 4055 00001E36 C3 <1> retn 4056 <1> 4057 <1> .disp: 4058 00001E37 88E9 <1> mov cl, ch 4059 00001E39 52 <1> push dx 4060 00001E3A 51 <1> push cx 4061 00001E3B E8E89B <1> call putsline_crlf ; destroys cx,dx,bx 4062 00001E3E 59 <1> pop cx 4063 00001E3F 5A <1> pop dx 4064 00001E40 01D6 <1> add si, dx 4065 00001E42 72F2 <1> jc .ret ; over FFFFh, must be end of chain --> (hmm) 4066 00001E44 46 <1> inc si 4067 00001E45 74EF <1> jz .ret 4068 00001E47 E913FF <1> jmp .next 4069 <1> 4070 <1> %if _PM 4071 <1> setds2si: 4072 00001E4A 89F3 <1> mov bx, si 4073 <1> setds2bx: 4074 00001E4C E87E73 <1> call ispm 4075 00001E4F 7505 <1> jnz sd2s_ex 4076 00001E51 89DA <1> mov dx, bx 4077 00001E53 E86B7A <1> call setrmsegm 4078 <1> sd2s_ex: 4079 00001E56 8EDB <1> mov ds, bx 4080 00001E58 C3 <1> retn 4081 <1> %endif ; _PM 4082 <1> %endif ; _MCB 4083 <1> 4084 <1> ;--- DX command. Display extended memory 4085 <1> 4086 <1> %if _PM 4087 <1> [cpu 386] 4088 <1> extmem: 4089 00001E59 8B16[5A0B] <1> mov dx, word [x_addr+0] 4090 00001E5D 8B1E[5C0B] <1> mov bx, word [x_addr+2] 4091 00001E61 E8DF9A <1> call skipwhite 4092 00001E64 E8879A <1> call iseol? 4093 00001E67 7406 <1> je extmem_1 4094 00001E69 E87B94 <1> call getdword ; get linear address into bx:dx 4095 00001E6C E8949A <1> call chkeol ; expect end of line here 4096 <1> extmem_1: 4097 00001E6F C706[DC0B][591E] <1> mov word [lastcmd], extmem 4098 00001E75 53 <1> push bx 4099 00001E76 52 <1> push dx 4100 00001E77 665D <1> pop ebp 4101 <1> 4102 00001E79 BF[400A] <1> mov di, stack ; create a GDT for Int15.87 4103 00001E7C 31C0 <1> xor ax, ax 4104 00001E7E B90800 <1> mov cx, 8 4105 00001E81 F3AB <1> rep stosw 4106 00001E83 B87F00 <1> mov ax, 007Fh 4107 00001E86 AB <1> stosw 4108 00001E87 89D0 <1> mov ax, dx 4109 00001E89 AB <1> stosw 4110 00001E8A 88D8 <1> mov al, bl 4111 00001E8C AA <1> stosb 4112 00001E8D B89300 <1> mov ax, 0093h 4113 00001E90 AB <1> stosw 4114 00001E91 88F8 <1> mov al, bh 4115 00001E93 AA <1> stosb 4116 00001E94 B87F00 <1> mov ax, 007Fh 4117 00001E97 AB <1> stosw 4118 00001E98 B8[8000] <1> mov ax, line_in+128 4119 00001E9B 8B1E[A60A] <1> mov bx, word [pspdbg] 4120 00001E9F 660FB7DB <1> movzx ebx, bx 4121 00001EA3 66C1E304 <1> shl ebx, 4 4122 00001EA7 660FB7C0 <1> movzx eax, ax 4123 00001EAB 6601D8 <1> add eax, ebx ; eax = flat address of line_in+128 4124 00001EAE AB <1> stosw 4125 00001EAF 66C1E810 <1> shr eax, 16 4126 00001EB3 AA <1> stosb 4127 00001EB4 88E3 <1> mov bl, ah 4128 00001EB6 B89300 <1> mov ax, 0093h 4129 00001EB9 AB <1> stosw 4130 00001EBA 88D8 <1> mov al, bl 4131 00001EBC AA <1> stosb 4132 00001EBD B90800 <1> mov cx, 8 4133 00001EC0 31C0 <1> xor ax, ax 4134 00001EC2 F3AB <1> rep stosw 4135 <1> 4136 00001EC4 E80673 <1> call ispm 4137 00001EC7 BE[400A] <1> mov si, stack 4138 00001ECA B94000 <1> mov cx, 0040h 4139 00001ECD B487 <1> mov ah, 87h 4140 00001ECF 750B <1> jnz extmem_rm 4141 00001ED1 FF36[A60A] <1> push word [pspdbg] 4142 00001ED5 6A15 <1> push 15h 4143 00001ED7 E83F74 <1> call intcall 4144 00001EDA EB02 <1> jmp short i15ok 4145 <1> extmem_rm: 4146 00001EDC CD15 <1> int 15h 4147 <1> i15ok: 4148 00001EDE 7247 <1> jc extmem_exit 4149 00001EE0 BE[8000] <1> mov si, line_in+128 4150 00001EE3 B508 <1> mov ch, 8h 4151 <1> nexti15l: 4152 00001EE5 E8BD20 <1> call handle_serial_flags_ctrl_c 4153 00001EE8 BF[0E08] <1> mov di, line_out 4154 00001EEB 6689E8 <1> mov eax, ebp 4155 00001EEE 66C1E810 <1> shr eax, 16 4156 00001EF2 E8F99A <1> call hexword 4157 00001EF5 89E8 <1> mov ax, bp 4158 00001EF7 E8F49A <1> call hexword 4159 00001EFA B82020 <1> mov ax, 32<<8|32 4160 00001EFD AB <1> stosw 4161 00001EFE BB[4808] <1> mov bx, line_out+10+3*16 4162 00001F01 B110 <1> mov cl, 10h 4163 <1> nexti15b: 4164 00001F03 AC <1> lodsb 4165 00001F04 E88EF6 <1> call dd_store 4166 00001F07 B020 <1> mov al, 32 4167 00001F09 AA <1> stosb 4168 00001F0A FEC9 <1> dec cl 4169 00001F0C 75F5 <1> jnz nexti15b 4170 00001F0E C645E72D <1> mov byte [di-(8*3+1)], '-' ; display a '-' after 8 bytes 4171 00001F12 83C710 <1> add di, 16 4172 00001F15 51 <1> push cx 4173 00001F16 E80D9B <1> call putsline_crlf 4174 00001F19 59 <1> pop cx 4175 00001F1A 6683C510 <1> add ebp, byte 10h 4176 00001F1E FECD <1> dec ch 4177 00001F20 75C3 <1> jnz nexti15l 4178 00001F22 66892E[5A0B] <1> mov dword [x_addr], ebp 4179 <1> extmem_exit: 4180 00001F27 C3 <1> retn 4181 <1> __CPU__ 4182 <1> %endif 4183 <1> 4184 <1> ; INP: dx:ax = numerator 4185 <1> ; cx = multiplier (0 to take si:dx:ax as numerator) 4186 <1> ; bx = field width 4187 <1> ; es:di -> buffer where to store 4188 <1> ; STT: UP, ds = ss 4189 <1> ; OUT: written to buffer, es:di -> behind written string 4190 <1> disp_dxax_times_cx_width_bx_size: 4191 00001F28 A8 <1> db __TEST_IMM8 ; (skip stc, NC) 4192 <1> .store: 4193 00001F29 F9 <1> stc 4194 <1> 4195 <1> lframe near 4196 <1> lequ 4 + 4 + 2, buffer_size 4197 <1> ; 4: "2048" (maximum number) 4198 <1> ; 4: " ?iB" (IEC prefixed unit) 4199 <1> ; 2: ??? 4200 <1> lvar ?buffer_size, buffer 4201 <1> lvar 6, dividend 4202 00001F2A 5589E58D66F0 <1> lenter 4203 <1> lvar word, bit_0_is_store 4204 00001F30 9C <1> pushf 4205 <1> lvar word, width 4206 00001F31 53 <1> push bx 4207 00001F32 56 <1> push si 4208 00001F33 1E <1> push ds 4209 00001F34 51 <1> push cx 4210 00001F35 50 <1> push ax 4211 00001F36 52 <1> push dx 4212 00001F37 06 <1> push es 4213 00001F38 57 <1> push di 4214 <1> 4215 00001F39 16 <1> push ss ; push cs 4216 00001F3A 1F <1> pop ds 4217 00001F3B 16 <1> push ss 4218 00001F3C 07 <1> pop es 4219 <1> 4220 00001F3D E310 <1> jcxz .use_si 4221 <1> 4222 00001F3F 52 <1> push dx 4223 00001F40 F7E1 <1> mul cx 4224 00001F42 97 <1> xchg ax, di 4225 00001F43 87D6 <1> xchg dx, si ; si:di = first mul 4226 <1> 4227 00001F45 58 <1> pop ax 4228 00001F46 F7E1 <1> mul cx 4229 00001F48 01F0 <1> add ax, si 4230 00001F4A 83D200 <1> adc dx, 0 ; dx:ax = second mul + adj, dx:ax:di = mul 4231 <1> 4232 00001F4D EB05 <1> jmp @F 4233 <1> 4234 <1> .use_si: 4235 00001F4F 89C7 <1> mov di, ax 4236 00001F51 92 <1> xchg ax, dx 4237 00001F52 89F2 <1> mov dx, si 4238 <1> 4239 <1> @@: 4240 00001F54 897EF0 <1> mov word [bp + ?dividend], di 4241 00001F57 8946F2 <1> mov word [bp + ?dividend + 2], ax 4242 00001F5A 8956F4 <1> mov word [bp + ?dividend + 4], dx 4243 <1> 4244 <1> ; set up divisor for the unit prefixes 4245 00001F5D B90004 <1> mov cx, 1024 ; 1000 here if SI units 4246 00001F60 F606[7D00]10 <1> testopt [options], use_si_units ; SI units ? 4247 00001F65 7403 <1> jz @F ; no --> 4248 00001F67 B9E803 <1> mov cx, 1000 ; yes, use 1000 4249 <1> @@: 4250 <1> 4251 00001F6A BE[C86B] <1> mov si, msg.prefixes ; -> first prefix (blank) 4252 <1> .loop: 4253 00001F6D 837EF400 <1> cmp word [bp + ?dividend + 4], 0 4254 00001F71 750D <1> jnz .divide 4255 00001F73 837EF200 <1> cmp word [bp + ?dividend + 2], 0 4256 00001F77 7507 <1> jnz .divide 4257 00001F79 817EF00008 <1> cmp word [bp + ?dividend], 2048 4258 00001F7E 7614 <1> jbe .end 4259 <1> .divide: 4260 00001F80 46 <1> inc si ; -> next prefix 4261 <1> 4262 00001F81 31D2 <1> xor dx, dx 4263 00001F83 BF0600 <1> mov di, 6 4264 <1> .loop_divide: 4265 00001F86 8B43EE <1> mov ax, [bp + ?dividend - 2 + di] 4266 00001F89 F7F1 <1> div cx 4267 00001F8B 8943EE <1> mov word [bp + ?dividend - 2 + di], ax 4268 00001F8E 4F <1> dec di 4269 00001F8F 4F <1> dec di 4270 00001F90 75F4 <1> jnz .loop_divide 4271 <1> ; dx = last remainder 4272 00001F92 EBD9 <1> jmp .loop 4273 <1> 4274 <1> .end: 4275 00001F94 8D7EFF <1> lea di, [bp + ?buffer + ?buffer_size - 1] 4276 00001F97 FD <1> std ; _AMD_ERRATUM_109_WORKAROUND does not apply 4277 00001F98 B042 <1> mov al, "B" 4278 00001F9A AA <1> stosb 4279 00001F9B 8A04 <1> mov al, [si] 4280 00001F9D 3C20 <1> cmp al, 32 4281 00001F9F 7416 <1> je @FF 4282 <1> 4283 00001FA1 F606[7D00]10 <1> testopt [options], use_si_units 4284 <1> ; SI units ? 4285 00001FA6 750E <1> jnz @F ; yes --> 4286 00001FA8 24DF <1> and al, ~20h ; uppercase, don't do this if SI units 4287 00001FAA F606[7D00]20 <1> testopt [options], use_jedec_units 4288 <1> ; JEDEC units ? 4289 00001FAF 7505 <1> jnz @F ; yes --> 4290 00001FB1 50 <1> push ax 4291 00001FB2 B069 <1> mov al, "i" 4292 00001FB4 AA <1> stosb ; don't store this if SI or JEDEC units 4293 00001FB5 58 <1> pop ax 4294 <1> @@: 4295 00001FB6 AA <1> stosb 4296 <1> @@: 4297 00001FB7 B020 <1> mov al, 32 4298 00001FB9 AA <1> stosb 4299 <1> 4300 00001FBA 8B46F0 <1> mov ax, word [bp + ?dividend] 4301 00001FBD B90A00 <1> mov cx, 10 4302 <1> .loop_write: 4303 00001FC0 31D2 <1> xor dx, dx 4304 00001FC2 F7F1 <1> div cx 4305 00001FC4 92 <1> xchg ax, dx 4306 <1> ; ax = remainder (next digit) 4307 <1> ; dx = result of div 4308 00001FC5 0430 <1> add al, '0' 4309 00001FC7 AA <1> stosb 4310 00001FC8 92 <1> xchg ax, dx ; ax = result of div 4311 00001FC9 85C0 <1> test ax, ax ; any more ? 4312 00001FCB 75F3 <1> jnz .loop_write ; loop --> 4313 <1> 4314 00001FCD FC <1> cld 4315 <1> 4316 00001FCE 47 <1> inc di ; -> first digit 4317 00001FCF 8D5E00 <1> lea bx, [bp + ?buffer + ?buffer_size] 4318 <1> ; -> behind 'B' 4319 00001FD2 29FB <1> sub bx, di ; = length of string 4320 00001FD4 89FE <1> mov si, di 4321 <1> 4322 00001FD6 5F <1> pop di 4323 00001FD7 07 <1> pop es ; restore es:di 4324 <1> ; -> where to store (if storing) 4325 <1> 4326 00001FD8 8B4EEC <1> mov cx, [bp + ?width] 4327 00001FDB 29D9 <1> sub cx, bx 4328 00001FDD 760F <1> jbe .none_blank 4329 00001FDF B020 <1> mov al, 32 4330 00001FE1 F646EE01 <1> test byte [bp + ?bit_0_is_store], 1 4331 00001FE5 7505 <1> jnz @F 4332 <1> .loop_blank_disp: 4333 00001FE7 E8DD9D <1> call disp_al 4334 00001FEA E2FB <1> loop .loop_blank_disp 4335 <1> ; now cx = 0 so the rep stosb is a nop 4336 <1> @@: 4337 00001FEC F3AA <1> rep stosb 4338 <1> .none_blank: 4339 <1> 4340 <1> 4341 00001FEE 89D9 <1> mov cx, bx 4342 00001FF0 F646EE01 <1> test byte [bp + ?bit_0_is_store], 1 4343 00001FF4 7506 <1> jnz @F 4344 <1> 4345 <1> ; ! note ss = ds 4346 00001FF6 89F2 <1> mov dx, si ; ds:dx -> string 4347 00001FF8 E8A93D <1> call disp_message_length_cx 4348 00001FFB A9 <1> db __TEST_IMM16 ; (skip rep movsb) 4349 <1> @@: 4350 <1> ; ! note ss = ds 4351 <1> ; ds:si -> string, cx = length 4352 00001FFC F3A4 <1> rep movsb 4353 <1> 4354 00001FFE 5A <1> pop dx 4355 00001FFF 58 <1> pop ax 4356 00002000 59 <1> pop cx 4357 00002001 1F <1> pop ds 4358 00002002 5E <1> pop si 4359 00002003 5B <1> pop bx 4360 00002004 89EC5D <1> lleave 4361 00002007 C3 <1> lret 4362 <1> 2062 %include "rr.asm" 2063 <1> 2064 <1> %if 0 2065 <1> 2066 <1> lDebug R commands - Register access 2067 <1> 2068 <1> Copyright (C) 1995-2003 Paul Vojta 2069 <1> Copyright (C) 2008-2012 C. Masloch 2070 <1> 2071 <1> Usage of the works is permitted provided that this 2072 <1> instrument is retained with the works, so that any entity 2073 <1> that uses the works is notified of this instrument. 2074 <1> 2075 <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 2076 <1> 2077 <1> %endif 2078 <1> 2079 <1> 2080 <1> usesection lDEBUG_CODE 2081 <1> 2082 <1> ; R command - dump and manipulate registers. 2083 <1> rr: 2084 00002008 E8E398 <1> call iseol? 2085 0000200B 7503E94C07 <1> je dumpregs ; if no parameters --> 2086 <1> 2087 00002010 E8006C <1> call uppercase 2088 00002013 3C45 <1> cmp al, 'E' 2089 00002015 7514 <1> jne @F 2090 <1> 2091 00002017 50 <1> push ax 2092 00002018 56 <1> push si 2093 00002019 AC <1> lodsb 2094 0000201A 3C2E <1> cmp al, '.' 2095 0000201C 7503E9A005 <1> je re_cmd 2096 00002021 E8CA98 <1> call iseol? 2097 00002024 5E <1> pop si 2098 00002025 58 <1> pop ax 2099 00002026 7503E98606 <1> je dumpregs_extended 2100 <1> @@: 2101 <1> 2102 <1> %if !_ONLYNON386 || (_OPTIONS || _VARIABLES) || _MMXSUPP || _RN 2103 0000202B 4E <1> dec si 2104 0000202C BA[BA64] <1> mov dx, msg.vv 2105 0000202F E85D98 <1> call isstring? 2106 00002032 7503E9BB0B <1> je dumpallvars 2107 00002037 BA[BD64] <1> mov dx, msg.vm 2108 0000203A E85298 <1> call isstring? 2109 0000203D 7503E9F50B <1> je dumpmemory 2110 00002042 AC <1> lodsb 2111 00002043 E8CD6B <1> call uppercase 2112 <1> 2113 00002046 50 <1> push ax 2114 00002047 56 <1> push si 2115 00002048 E8F898 <1> call skipwhite 2116 0000204B E8A098 <1> call iseol? ; line ends after single character ? 2117 0000204E 5E <1> pop si 2118 0000204F 58 <1> pop ax 2119 00002050 7550 <1> jne short rr1 ; no, not other kinds of dumps --> 2120 <1> 2121 00002052 3C46 <1> cmp al, 'F' ; only valid input to a later check 2122 00002054 7503E9D903 <1> je rr2.writeprompt ; so go there --> 2123 <1> ; (note that byte [si-1] must != '.') 2124 <1> %if _OPTIONS || _VARIABLES 2125 00002059 3C56 <1> cmp al, 'V' 2126 0000205B 7503E9AE0A <1> je dumpvars 2127 <1> %endif 2128 <1> %if _MMXSUPP 2129 00002060 3C4D <1> cmp al, 'M' 2130 00002062 750A <1> jne .notrm 2131 00002064 803E[E50A]00 <1> cmp byte [has_mmx], 0 2132 00002069 7403 <1> je .notrm 2133 0000206B E9240C <1> jmp dumpregsMMX 2134 <1> .notrm: 2135 <1> %endif 2136 0000206E 3C58 <1> _386 cmp al, 'X' 2137 00002070 7411 <1> _386 je short rrx 2138 <1> %if _RN 2139 00002072 3C4E <1> cmp al, 'N' 2140 00002074 750A <1> jne .notrn 2141 00002076 803E[E30A]00 <1> cmp byte [has_87], 0 2142 0000207B 7403 <1> je .notrn 2143 0000207D E9F108 <1> jmp dumpregsFPU 2144 <1> .notrn: 2145 <1> %endif 2146 00002080 E95984 <1> jmp error ; all other single characters are invalid 2147 <1> %endif 2148 <1> 2149 <1> %ifn _ONLYNON386 2150 <1> rrx: 2151 00002083 AC <1> lodsb 2152 00002084 E87C98 <1> call chkeol 2153 00002087 8036[7C00]01 <1> xoropt [options], dispregs32 2154 0000208C BA[D45D] <1> mov dx, msg.regs386 2155 0000208F E8129D <1> call putsz 2156 00002092 BA[EB5D] <1> mov dx, msg.regs386_on 2157 00002095 F606[7C00]01 <1> testopt [options], dispregs32 2158 0000209A 7503 <1> jnz .on 2159 0000209C BA[E75D] <1> mov dx, msg.regs386_off 2160 <1> .on: 2161 0000209F E9029D <1> jmp putsz 2162 <1> %endif 2163 <1> 2164 <1> rr1: 2165 <1> lframe 2166 <1> lvar dword, offset 2167 <1> lvar word, segsel 2168 <1> lvar word, memsizestring 2169 <1> lvar word, ismem_high_size_low 2170 <1> lequ ?ismem_high_size_low, size 2171 <1> lequ ?ismem_high_size_low + 1, ismem 2172 <1> lvar word, hhtype 2173 <1> lvar word, hhoffset 2174 <1> lequ 16, namebufferlength 2175 <1> lvar ?namebufferlength, namebuffer 2176 000020A2 5589E58D66E2 <1> lenter 2177 000020A8 89E7 <1> mov di, sp ; -> ?namebuffer 2178 000020AA E83F8E <1> call isvariable?.return_name 2179 000020AD 7203E93501 <1> jnc rr1_variable 2180 <1> 2181 000020B2 4E <1> dec si 2182 000020B3 BA[E766] <1> mov dx, msg.byte 2183 000020B6 BB0101 <1> mov bx, 101h 2184 000020B9 52 <1> push dx 2185 000020BA E8D297 <1> call isstring? 2186 000020BD 7428 <1> je rr1_memory 2187 000020BF 5A <1> pop dx 2188 000020C0 BA[E166] <1> mov dx, msg.word 2189 000020C3 43 <1> inc bx ; = 102h 2190 000020C4 52 <1> push dx 2191 000020C5 E8C797 <1> call isstring? 2192 000020C8 741D <1> je rr1_memory 2193 000020CA 5A <1> pop dx 2194 000020CB BA[E666] <1> mov dx, msg.3byte 2195 000020CE 43 <1> inc bx ; = 103h 2196 000020CF 52 <1> push dx 2197 000020D0 E8BC97 <1> call isstring? 2198 000020D3 7412 <1> je rr1_memory 2199 000020D5 5A <1> pop dx 2200 000020D6 BA[E066] <1> mov dx, msg.dword 2201 000020D9 43 <1> inc bx ; = 104h 2202 000020DA 52 <1> push dx 2203 000020DB E8B197 <1> call isstring? 2204 000020DE 7407 <1> je rr1_memory 2205 <1> ; pop dx 2206 000020E0 89EC5D <1> lleave code 2207 000020E3 AC <1> lodsb 2208 000020E4 E92903 <1> jmp rr2 2209 <1> 2210 <1> rr1_memory: 2211 000020E7 8F46F8 <1> pop word [bp + ?memsizestring] 2212 000020EA 895EF6 <1> mov word [bp + ?ismem_high_size_low], bx 2213 <1> 2214 000020ED 31C0 <1> xor ax, ax 2215 000020EF 88D8 <1> mov al, bl 2216 000020F1 F7D8 <1> neg ax 2217 000020F3 05[8895] <1> add ax, masks + 4 ; 4 - size = offset into masks 2218 000020F6 A3[D00B] <1> mov word [rrmask], ax ; -> mask 2219 000020F9 E81898 <1> call skipcomma 2220 000020FC 3C5B <1> cmp al, '[' 2221 000020FE 7403E9D983 <1> jne error 2222 00002103 AC <1> lodsb 2223 00002104 8B1E[840C] <1> mov bx, word [reg_ds] 2224 00002108 E80A88 <1> call getaddrX 2225 0000210B 895EFA <1> mov word [bp + ?segsel], bx 2226 0000210E 66 <1> _386_PM_o32 2227 0000210F 8956FC <1> mov word [bp + ?offset], dx 2228 00002112 E80098 <1> call skipcomm0 2229 00002115 3C5D <1> cmp al, ']' 2230 00002117 7403E9C083 <1> jne error 2231 <1> 2232 0000211C E8F597 <1> call skipcomma 2233 0000211F 3C2E <1> cmp al, '.' ; special ? 2234 00002121 7405 <1> je short .writeprompt ; yes --> 2235 00002123 E8C897 <1> call iseol? 2236 00002126 7566 <1> jne short .noprompt 2237 <1> .writeprompt: 2238 <1> ; si -> behind dot if any 2239 00002128 BF[0E08] <1> mov di, line_out 2240 0000212B 56 <1> push si 2241 0000212C 8B76F8 <1> mov si, word [bp + ?memsizestring] 2242 <1> ; si -> size string (ASCIZ) 2243 0000212F A8 <1> db __TEST_IMM8 ; (skip stosb) 2244 <1> @@: 2245 00002130 AA <1> stosb ; store next byte 2246 00002131 AC <1> lodsb ; load next byte 2247 00002132 84C0 <1> test al, al ; is zero ? 2248 00002134 75FA <1> jnz @B ; not yet, loop --> 2249 00002136 5E <1> pop si ; (preserve si) 2250 00002137 B8205B <1> mov ax, " [" 2251 0000213A AB <1> stosw 2252 0000213B 8B46FA <1> mov ax, word [bp + ?segsel] 2253 0000213E 89C3 <1> mov bx, ax 2254 00002140 E8AB98 <1> call hexword 2255 00002143 B03A <1> mov al, ':' 2256 00002145 AA <1> stosb 2257 00002146 66 <1> _386_PM_o32 2258 00002147 8B46FC <1> mov ax, word [bp + ?offset] 2259 <1> %if _PM 2260 0000214A E8E93B <1> call test_d_b_bit 2261 0000214D 7403 <1> jz .16 2262 0000214F E89098 <1> call hexword_high 2263 <1> .16: 2264 <1> %endif 2265 00002152 E89998 <1> call hexword 2266 00002155 B85D20 <1> mov ax, "] " 2267 00002158 AB <1> stosw 2268 <1> 2269 00002159 E8BF84 <1> call prephack 2270 0000215C E83700 <1> call rr1_read_mem_dxax 2271 <1> 2272 0000215F 80F904 <1> cmp cl, 4 2273 00002162 7207 <1> jb .pnohigh 2274 00002164 92 <1> xchg ax, dx 2275 00002165 E88698 <1> call hexword ; display high word 2276 00002168 92 <1> xchg ax, dx 2277 00002169 EB0C <1> jmp @F 2278 <1> .pnohigh: 2279 0000216B 80F903 <1> cmp cl, 3 2280 0000216E 7207 <1> jb @F 2281 00002170 86C2 <1> xchg al, dl 2282 00002172 E88098 <1> call hexbyte 2283 00002175 86C2 <1> xchg al, dl 2284 <1> @@: 2285 00002177 80F902 <1> cmp cl, 2 2286 0000217A 7207 <1> jb .pnobyte 2287 0000217C 86C4 <1> xchg al, ah 2288 0000217E E87498 <1> call hexbyte ; display high byte 2289 00002181 86C4 <1> xchg al, ah 2290 <1> .pnobyte: 2291 00002183 E86F98 <1> call hexbyte ; display low byte 2292 <1> 2293 00002186 E8FE03 <1> call dot_prompt 2294 00002189 7503E9CE01 <1> je .return 2295 <1> .noprompt: 2296 0000218E 31C9 <1> xor cx, cx 2297 00002190 8A4EF6 <1> mov cl, byte [bp + ?size] 2298 00002193 E9BA00 <1> jmp rr1_common 2299 <1> 2300 <1> 2301 <1> ; OUT: cl = ?size 2302 <1> ; dx:ax = value read from memory 2303 <1> ; CHG: bx 2304 <1> rr1_read_mem_dxax: 2305 00002196 E8B084 <1> call dohack 2306 00002199 31C0 <1> xor ax, ax 2307 0000219B 31D2 <1> xor dx, dx 2308 0000219D 8A4EF6 <1> mov cl, byte [bp + ?size] 2309 <1> %if _PM 2310 000021A0 8B5EFA <1> mov bx, word [bp + ?segsel] 2311 000021A3 E8903B <1> call test_d_b_bit 2312 000021A6 8EDB <1> mov ds, bx 2313 <1> %else 2314 <1> mov ds, word [bp + ?segsel] 2315 <1> %endif 2316 000021A8 66 <1> _386_PM_o32 2317 000021A9 8B5EFC <1> mov bx, word [bp + ?offset] 2318 <1> %if _PM 2319 000021AC 741D <1> jz .16 2320 <1> 2321 <1> [cpu 386] 2322 <1> .32: 2323 000021AE 80F902 <1> cmp cl, 2 2324 000021B1 7213 <1> jb .32_1 2325 000021B3 740D <1> je .32_2 2326 000021B5 80F904 <1> cmp cl, 4 2327 000021B8 7204 <1> jb .32_3 2328 <1> .32_4: 2329 000021BA 678A7303 <1> mov dh, byte [ebx + 3] 2330 <1> .32_3: 2331 000021BE 678A5302 <1> mov dl, byte [ebx + 2] 2332 <1> .32_2: 2333 000021C2 678A6301 <1> mov ah, byte [ebx + 1] 2334 <1> .32_1: 2335 000021C6 678A03 <1> mov al, byte [ebx] 2336 000021C9 EB17 <1> jmp .ret 2337 <1> __CPU__ 2338 <1> %endif 2339 <1> 2340 <1> .16: 2341 000021CB 80F902 <1> cmp cl, 2 2342 000021CE 7210 <1> jb .16_1 2343 000021D0 740B <1> je .16_2 2344 000021D2 80F904 <1> cmp cl, 4 2345 000021D5 7203 <1> jb .16_3 2346 <1> .16_4: 2347 000021D7 8A7703 <1> mov dh, byte [bx + 3] 2348 <1> .16_3: 2349 000021DA 8A5702 <1> mov dl, byte [bx + 2] 2350 <1> .16_2: 2351 000021DD 8A6701 <1> mov ah, byte [bx + 1] 2352 <1> .16_1: 2353 000021E0 8A07 <1> mov al, byte [bx] 2354 <1> .ret: 2355 000021E2 16 <1> push ss 2356 000021E3 1F <1> pop ds 2357 000021E4 E99684 <1> jmp unhack 2358 <1> 2359 <1> 2360 <1> rr1_variable: 2361 000021E7 893E[D00B] <1> mov word [rrmask], di ; -> mask of read-only bits 2362 000021EB 88C8 <1> mov al, cl 2363 000021ED B100 <1> mov cl, 0 2364 000021EF 4E <1> dec si ; (to reload al) 2365 000021F0 50 <1> push ax ; h = variable's field type, l = its size 2366 000021F1 B400 <1> mov ah, 0 2367 000021F3 8946F6 <1> mov word [bp + ?ismem_high_size_low], ax 2368 000021F6 86CD <1> xchg cl, ch ; cx = variable's name's length 2369 <1> 2370 000021F8 E81997 <1> call skipcomma 2371 000021FB 3C2E <1> cmp al, '.' ; special ? 2372 000021FD 7405 <1> je short .writeprompt ; yes --> 2373 000021FF E8EC96 <1> call iseol? 2374 00002202 7542 <1> jne short .noprompt 2375 <1> .writeprompt: 2376 00002204 56 <1> push si ; -> behind dot if any 2377 00002205 8D76E2 <1> lea si, [bp + ?namebuffer] 2378 <1> ; -> name 2379 00002208 BF[0E08] <1> mov di, line_out 2380 0000220B F3A4 <1> rep movsb 2381 0000220D 5E <1> pop si ; -> behind dot if any 2382 0000220E B020 <1> mov al, 32 2383 00002210 AA <1> stosb 2384 00002211 59 <1> pop cx ; h = variable's field type, l = its size 2385 00002212 87DA <1> xchg bx, dx 2386 00002214 8B07 <1> mov ax, word [bx] 2387 00002216 87DA <1> xchg bx, dx 2388 00002218 51 <1> push cx 2389 00002219 80F904 <1> cmp cl, 4 2390 0000221C 7205 <1> jb .pnohigh 2391 0000221E E8CD97 <1> call hexword ; display high word 2392 00002221 EB08 <1> jmp @F 2393 <1> .pnohigh: 2394 00002223 80F903 <1> cmp cl, 3 2395 00002226 7203 <1> jb @F 2396 00002228 E8CA97 <1> call hexbyte 2397 <1> @@: 2398 0000222B 8B07 <1> mov ax, word [bx] 2399 0000222D 80F902 <1> cmp cl, 2 2400 00002230 7207 <1> jb .pnobyte 2401 00002232 86C4 <1> xchg al, ah 2402 00002234 E8BE97 <1> call hexbyte ; display high byte 2403 00002237 86C4 <1> xchg al, ah 2404 <1> .pnobyte: 2405 00002239 E8B997 <1> call hexbyte ; display low byte 2406 0000223C E84803 <1> call dot_prompt 2407 0000223F 59 <1> pop cx ; h = variable's field type, l = its size 2408 00002240 7503E91701 <1> je .return 2409 00002245 A8 <1> db __TEST_IMM8 ; (skip pop) 2410 <1> .noprompt: 2411 00002246 59 <1> pop cx ; h = variable's field type, l = its size 2412 00002247 84ED <1> test ch, ch 2413 00002249 7403E91201 <1> jnz rr1_readonly 2414 0000224E 53 <1> push bx 2415 0000224F 52 <1> push dx 2416 <1> rr1_common: 2417 00002250 880E[D20B] <1> mov byte [rrtype], cl 2418 00002254 51 <1> push cx 2419 00002255 50 <1> push ax 2420 00002256 56 <1> push si 2421 00002257 E85987 <1> call isoperator? 2422 0000225A 750E <1> jne .nooperator 2423 0000225C 89CB <1> mov bx, cx 2424 0000225E 01DB <1> add bx, bx ; bh = 0 ! 2425 00002260 50 <1> push ax 2426 00002261 FF97[B090] <1> call near [operatordispatchers+bx] 2427 00002265 58 <1> pop ax 2428 00002266 85DB <1> test bx, bx 2429 00002268 7504 <1> jnz .gotoperator 2430 <1> .nooperator: 2431 0000226A BB1800 <1> mov bx, OPERATOR_RIGHTOP; set default computation function 2432 0000226D A8 <1> db __TEST_IMM8 2433 <1> .gotoperator: 2434 0000226E AC <1> lodsb 2435 <1> 2436 0000226F E83803 <1> call isassignmentoperator? 2437 00002272 7317 <1> jnc .assign_op_done ; found an assignment operator --> 2438 00002274 83FB18 <1> cmp bx, OPERATOR_RIGHTOP; dummy (no operator specified) ? 2439 00002277 7412 <1> je .assign_op_done ; yes, assignment operator not required --> 2440 00002279 59 <1> pop cx 2441 0000227A 58 <1> pop ax ; restore al, si in front of operator 2442 0000227B 50 <1> push ax 2443 0000227C 51 <1> push cx 2444 0000227D 87F1 <1> xchg si, cx 2445 0000227F 51 <1> push cx 2446 00002280 E82A87 <1> call isunaryoperator? ; is this a valid unary operator too ? 2447 00002283 59 <1> pop cx 2448 00002284 74E4 <1> je .nooperator ; yes --> 2449 00002286 87F1 <1> xchg si, cx 2450 <1> errorj9: equ $ 2451 00002288 E95182 <1> jmp error ; error where the assignment operator needs to be 2452 <1> .assign_op_done: 2453 0000228B 59 <1> pop cx 2454 0000228C 59 <1> pop cx 2455 0000228D 59 <1> pop cx 2456 0000228E 53 <1> push bx 2457 0000228F 80FB17 <1> cmp bl, OPERATOR_COND 2458 00002292 7503E94582 <1> je error 2459 00002297 E87B96 <1> call skipcomm0 2460 <1> 2461 0000229A E84A90 <1> call getexpression ; bx:dx = expression result 2462 0000229D 8866F4 <1> mov byte [bp + ?hhtype], ah 2463 000022A0 8976F2 <1> mov word [bp + ?hhoffset], si 2464 000022A3 E85D96 <1> call chkeol 2465 000022A6 59 <1> pop cx ; operator computation function 2466 <1> 2467 000022A7 807EF700 <1> cmp byte [bp + ?ismem], 0 2468 000022AB 7413 <1> je .var_hhvar 2469 <1> 2470 <1> .mem_hhvar: 2471 000022AD 89C7 <1> mov di, ax 2472 000022AF 89D6 <1> mov si, dx 2473 000022B1 53 <1> push bx 2474 000022B2 51 <1> push cx 2475 000022B3 E8E0FE <1> call rr1_read_mem_dxax 2476 000022B6 59 <1> pop cx 2477 000022B7 5B <1> pop bx 2478 000022B8 52 <1> push dx 2479 000022B9 50 <1> push ax 2480 000022BA 89F8 <1> mov ax, di 2481 000022BC 89F2 <1> mov dx, si 2482 000022BE EB06 <1> jmp .common_hhvar 2483 <1> 2484 <1> .var_hhvar: 2485 000022C0 5E <1> pop si ; si-> high word 2486 000022C1 5F <1> pop di ; di-> low word 2487 000022C2 FF34 <1> push word [si] 2488 000022C4 FF35 <1> push word [di] 2489 <1> 2490 <1> .common_hhvar: 2491 000022C6 8F06[A495] <1> pop word [hhvar] 2492 000022CA 8F06[A695] <1> pop word [hhvar+2] ; save variable's current value (as left operand) 2493 <1> 2494 000022CE C606[AD95]00 <1> mov byte [hhtype], 0 ; type info signed=0 pointer=0 2495 000022D3 803E[D20B]04 <1> cmp byte [rrtype], 4 2496 000022D8 7318 <1> jae .cleardword 2497 000022DA 803E[D20B]02 <1> cmp byte [rrtype], 2 2498 000022DF 770C <1> ja .clearthreebyte 2499 000022E1 7405 <1> je .clearword 2500 <1> .clearbyte: 2501 000022E3 C606[A595]00 <1> mov byte [hhvar + 1], 0 ; clear second byte 2502 <1> .clearword: 2503 000022E8 C606[A695]00 <1> mov byte [hhvar + 2], 0 ; clear third byte 2504 <1> .clearthreebyte: 2505 000022ED C606[A795]00 <1> mov byte [hhvar + 3], 0 ; clear fourth byte 2506 <1> .cleardword: 2507 000022F2 87CB <1> xchg cx, bx 2508 000022F4 01DB <1> add bx, bx 2509 000022F6 8B9F[F090] <1> mov bx, word [bx + operatorfunctions] 2510 000022FA 87CB <1> xchg cx, bx ; cx = operator function 2511 000022FC 8A66F4 <1> mov ah, byte [bp + ?hhtype] 2512 000022FF FFD1 <1> call cx ; compute 2513 <1> 2514 00002301 E8E993 <1> call getexpression.countsignificantbits 2515 00002304 53 <1> push bx 2516 00002305 56 <1> push si 2517 00002306 31DB <1> xor bx, bx 2518 00002308 8A1E[D20B] <1> mov bl, byte [rrtype] 2519 0000230C 01DB <1> add bx, bx 2520 0000230E 8B76F2 <1> mov si, word [bp + ?hhoffset] 2521 00002311 FF97[F882] <1> call near word [checksignificantbits_table + bx] 2522 00002315 5E <1> pop si 2523 00002316 5B <1> pop bx 2524 <1> 2525 00002317 97 <1> xchg ax, di ; ax -> low word of variable 2526 00002318 8B3E[D00B] <1> mov di, word [rrmask] ; di -> mask dword 2527 0000231C 53 <1> push bx ; use bx as a scratch space 2528 0000231D 8B0D <1> mov cx, word [di] ; = low word of mask 2529 0000231F 51 <1> push cx ; preserve low word of mask 2530 00002320 97 <1> xchg ax, di ; di -> low word of variable 2531 00002321 230D <1> and cx, word [di] ; cx = low word value to preserve 2532 00002323 5B <1> pop bx ; = low word of mask 2533 00002324 F7D3 <1> not bx ; = bitmask of bits to use from result 2534 00002326 21DA <1> and dx, bx ; dx = bits to use from result low word 2535 00002328 09CA <1> or dx, cx ; dx = low word compound 2536 0000232A 5B <1> pop bx ; restore high word after scratch use 2537 0000232B 97 <1> xchg ax, di ; di -> mask dword 2538 0000232C 52 <1> push dx ; use dx as a scratch space 2539 0000232D 8B4D02 <1> mov cx, word [di + 2] ; = high word of mask 2540 00002330 51 <1> push cx ; preserve high word of mask 2541 00002331 230C <1> and cx, word [si] ; cx = high word value to preserve 2542 00002333 5A <1> pop dx ; = high word of mask 2543 00002334 F7D2 <1> not dx ; = bitmask of bits to use from result 2544 00002336 21D3 <1> and bx, dx ; bx = bits to use from result high word 2545 00002338 09CB <1> or bx, cx 2546 0000233A 5A <1> pop dx ; restore low word after scratch use 2547 0000233B 97 <1> xchg ax, di ; di -> low word of variable 2548 <1> 2549 0000233C 807EF700 <1> cmp byte [bp + ?ismem], 0 2550 00002340 7526 <1> jne rr1_mem_set 2551 <1> 2552 <1> .var_set: 2553 00002342 803E[D20B]02 <1> cmp byte [rrtype], 2 2554 00002347 7211 <1> jb .setbyte 2555 00002349 740C <1> je .setword 2556 0000234B 803E[D20B]04 <1> cmp byte [rrtype], 4 2557 00002350 7203 <1> jb .setthreebyte 2558 <1> .setdword: 2559 00002352 887C01 <1> mov byte [si + 1], bh ; set fourth byte 2560 <1> .setthreebyte: 2561 00002355 881C <1> mov byte [si], bl ; set third byte 2562 <1> .setword: 2563 00002357 887501 <1> mov byte [di + 1], dh ; set second byte 2564 <1> .setbyte: 2565 0000235A 8815 <1> mov byte [di], dl ; set first byte 2566 <1> .return: 2567 <1> rr1_memory.return: 2568 <1> rr1_variable.return: 2569 0000235C 89EC5D <1> lleave code 2570 <1> rr1b: 2571 0000235F C3 <1> retn 2572 <1> 2573 <1> 2574 <1> rr1_readonly: 2575 00002360 BA[AC5C] <1> mov dx, msg.readonly 2576 00002363 E8389A <1> call putsz_error 2577 00002366 EBF4 <1> jmp rr1_variable.return 2578 <1> 2579 <1> 2580 <1> rr1_mem_set: 2581 00002368 89D0 <1> mov ax, dx 2582 0000236A 89DA <1> mov dx, bx 2583 <1> 2584 0000236C E8DA82 <1> call dohack 2585 0000236F 8A4EF6 <1> mov cl, byte [bp + ?size] 2586 <1> %if _PM 2587 00002372 8B5EFA <1> mov bx, word [bp + ?segsel] 2588 00002375 E81075 <1> call verifysegm 2589 00002378 7303E98700 <1> jc .ro 2590 0000237D E8B639 <1> call test_d_b_bit 2591 00002380 8EDB <1> mov ds, bx 2592 <1> %else 2593 <1> mov ds, word [bp + ?segsel] 2594 <1> %endif 2595 00002382 66 <1> _386_PM_o32 2596 00002383 8B5EFC <1> mov bx, word [bp + ?offset] 2597 <1> %if _PM 2598 00002386 7440 <1> jz .16 2599 <1> 2600 <1> [cpu 386] 2601 <1> .32: 2602 00002388 80F902 <1> cmp cl, 2 2603 0000238B 7213 <1> jb .32_1 2604 0000238D 740D <1> je .32_2 2605 0000238F 80F904 <1> cmp cl, 4 2606 00002392 7204 <1> jb .32_3 2607 <1> .32_4: 2608 00002394 67887303 <1> mov byte [ebx + 3], dh 2609 <1> .32_3: 2610 00002398 67885302 <1> mov byte [ebx + 2], dl 2611 <1> .32_2: 2612 0000239C 67886301 <1> mov byte [ebx + 1], ah 2613 <1> .32_1: 2614 000023A0 678803 <1> mov byte [ebx], al 2615 <1> 2616 <1> .32_check: 2617 000023A3 80F902 <1> cmp cl, 2 2618 000023A6 7219 <1> jb .32_check_1 2619 000023A8 7411 <1> je .32_check_2 2620 000023AA 80F904 <1> cmp cl, 4 2621 000023AD 7206 <1> jb .32_check_3 2622 <1> .32_check_4: 2623 000023AF 673A7303 <1> cmp dh, byte [ebx + 3] 2624 000023B3 754F <1> jne .ro 2625 <1> .32_check_3: 2626 000023B5 673A5302 <1> cmp dl, byte [ebx + 2] 2627 000023B9 7549 <1> jne .ro 2628 <1> .32_check_2: 2629 000023BB 673A6301 <1> cmp ah, byte [ebx + 1] 2630 000023BF 7543 <1> jne .ro 2631 <1> .32_check_1: 2632 000023C1 673A03 <1> cmp al, byte [ebx] 2633 000023C4 753E <1> jne .ro 2634 000023C6 EB36 <1> jmp .ret 2635 <1> __CPU__ 2636 <1> %endif 2637 <1> 2638 <1> .16: 2639 000023C8 80F902 <1> cmp cl, 2 2640 000023CB 7210 <1> jb .16_1 2641 000023CD 740B <1> je .16_2 2642 000023CF 80F904 <1> cmp cl, 4 2643 000023D2 7203 <1> jb .16_3 2644 <1> .16_4: 2645 000023D4 887703 <1> mov byte [bx + 3], dh 2646 <1> .16_3: 2647 000023D7 885702 <1> mov byte [bx + 2], dl 2648 <1> .16_2: 2649 000023DA 886701 <1> mov byte [bx + 1], ah 2650 <1> .16_1: 2651 000023DD 8807 <1> mov byte [bx], al 2652 <1> 2653 <1> .16_check: 2654 000023DF 80F902 <1> cmp cl, 2 2655 000023E2 7216 <1> jb .16_check_1 2656 000023E4 740F <1> je .16_check_2 2657 000023E6 80F904 <1> cmp cl, 4 2658 000023E9 7205 <1> jb .16_check_3 2659 <1> .16_check_4: 2660 000023EB 3A7703 <1> cmp dh, byte [bx + 3] 2661 000023EE 7514 <1> jne .ro 2662 <1> .16_check_3: 2663 000023F0 3A5702 <1> cmp dl, byte [bx + 2] 2664 000023F3 750F <1> jne .ro 2665 <1> .16_check_2: 2666 000023F5 3A6701 <1> cmp ah, byte [bx + 1] 2667 000023F8 750A <1> jne .ro 2668 <1> .16_check_1: 2669 000023FA 3A07 <1> cmp al, byte [bx] 2670 000023FC 7506 <1> jne .ro 2671 <1> .ret: 2672 000023FE E86368 <1> call ee0a 2673 00002401 E958FF <1> jmp rr1_memory.return 2674 <1> 2675 <1> .ro: 2676 00002404 E85D68 <1> call ee0a 2677 00002407 BA[E15C] <1> mov dx, msg.readonly_mem 2678 0000240A E89199 <1> call putsz_error 2679 0000240D E94CFF <1> jmp rr1_memory.return 2680 <1> 2681 <1> lleave ctx 2682 <1> 2683 <1> 2684 <1> usesection lDEBUG_DATA_ENTRY 2685 000082F7 00 <1> align 2, db 0 2686 <1> checksignificantbits_table: 2687 000082F8 [DCA4] <1> dw error 2688 000082FA [E4B7] <1> dw getbyte.checksignificantbits 2689 000082FC [D2B7] <1> dw getword.checksignificantbits 2690 000082FE [C4B7] <1> dw get3byte.checksignificantbits 2691 00008300 [E003] <1> dw dmycmd 2692 <1> 2693 <1> usesection lDEBUG_CODE 2694 <1> 2695 <1> 2696 <1> ; Change flag register with mnemonics - F 2697 <1> rr2: 2698 00002410 E80068 <1> call uppercase 2699 00002413 3C46 <1> cmp al, 'F' 2700 00002415 7403E99B00 <1> jne rr3 ; if not 'F' --> 2701 0000241A 50 <1> push ax 2702 0000241B 8A04 <1> mov al, byte [si] 2703 0000241D E8A985 <1> call isseparator? ; valid separator ? 2704 00002420 58 <1> pop ax 2705 00002421 7403E98F00 <1> jne rr3 ; no --> 2706 <1> .ef: 2707 00002426 E8EB94 <1> call skipcomma 2708 00002429 3C2E <1> cmp al, '.' ; special ? 2709 0000242B 7405 <1> je .writeprompt ; yes --> 2710 0000242D E8BE94 <1> call iseol? ; end of line ? 2711 00002430 7512 <1> jne .noprompt ; no --> 2712 <1> .writeprompt: 2713 00002432 800E[A600]02 <1> setopt [internalflags3], dif3_do_not_highlight 2714 00002437 56 <1> push si 2715 00002438 E89206 <1> call dmpflags 2716 0000243B 5E <1> pop si ; -> behind dot if any 2717 0000243C E84801 <1> call dot_prompt 2718 0000243F 7503E91BFF <1> je rr1b ; if no change 2719 <1> .noprompt: 2720 <1> 2721 00002444 E86301 <1> call isassignmentoperator? 2722 00002447 56 <1> push si 2723 00002448 7308 <1> jnc .noteol ; at least one value is required --> 2724 <1> .check_loop: 2725 0000244A E8C894 <1> call skipcomm0 2726 0000244D E89E94 <1> call iseol? 2727 00002450 7420 <1> je .really ; return if done 2728 <1> .noteol: 2729 00002452 E8BE67 <1> call uppercase 2730 00002455 86C4 <1> xchg al, ah 2731 00002457 AC <1> lodsb 2732 00002458 E8B867 <1> call uppercase 2733 0000245B 86C4 <1> xchg al, ah ; ax = mnemonic 2734 0000245D BF[1C80] <1> mov di, flagson 2735 00002460 B91000 <1> mov cx, 16 2736 00002463 F2AF <1> repne scasw 2737 00002465 7507 <1> jne short .errordec ; if no match 2738 00002467 AC <1> lodsb 2739 00002468 E85E85 <1> call isseparator? 2740 0000246B 74DD <1> je .check_loop 2741 <1> .errordec2: 2742 0000246D 4E <1> dec si 2743 <1> .errordec: 2744 <1> errordec: equ $ 2745 0000246E 4E <1> dec si ; back up one before flagging an error 2746 0000246F E96A80 <1> jmp error 2747 <1> 2748 <1> .really: 2749 00002472 5E <1> pop si 2750 00002473 4E <1> dec si 2751 00002474 AC <1> lodsb 2752 <1> .loop: 2753 00002475 E87694 <1> call iseol? 2754 00002478 7503E9E2FE <1> je rr1b ; return if done 2755 <1> 2756 0000247D E89367 <1> call uppercase 2757 00002480 86C4 <1> xchg al, ah 2758 00002482 AC <1> lodsb 2759 00002483 E88D67 <1> call uppercase 2760 00002486 86C4 <1> xchg al, ah ; ax = mnemonic 2761 <1> 2762 00002488 BF[1C80] <1> mov di, flagson 2763 0000248B B91000 <1> mov cx, 16 2764 0000248E F2AF <1> repne scasw 2765 00002490 75DC <1> jne short .errordec ; if no match 2766 00002492 81FF[2C80] <1> cmp di, flagsoff 2767 00002496 7709 <1> ja .clear ; if we're clearing 2768 00002498 8B45EE <1> mov ax, word [di-(flagson-flagbits)-2] 2769 0000249B 0906[A00C] <1> or word [reg_efl], ax ; set the bit 2770 0000249F EB09 <1> jmp short .common 2771 <1> .clear: 2772 000024A1 8B45DE <1> mov ax, word [di-(flagsoff-flagbits)-2] 2773 000024A4 F7D0 <1> not ax 2774 000024A6 2106[A00C] <1> and word [reg_efl], ax ; clear the bit 2775 <1> .common: 2776 000024AA AC <1> lodsb 2777 000024AB E81B85 <1> call isseparator? 2778 000024AE 75BD <1> jne short .errordec2 2779 000024B0 E86294 <1> call skipcomm0 2780 000024B3 EBC0 <1> jmp short .loop 2781 <1> 2782 <1> ; Change flag register with mnemonics - EF 2783 <1> rr3: 2784 000024B5 86C4 <1> xchg al, ah 2785 000024B7 AC <1> lodsb 2786 000024B8 E85867 <1> call uppercase 2787 000024BB 86C4 <1> xchg al, ah ; ax = next two characters 2788 000024BD 3D4546 <1> _386 cmp ax, "EF" 2789 000024C0 750B <1> _386 jne rr4 ; if not "EF" --> 2790 000024C2 50 <1> _386 push ax 2791 000024C3 8A04 <1> _386 mov al, byte [si] 2792 000024C5 E80185 <1> _386 call isseparator? ; valid separator ? 2793 000024C8 58 <1> _386 pop ax 2794 000024C9 0F8459FF <1> _386 je rr2.ef 2795 <1> 2796 <1> ; Change a single flag with mnemonic 2797 <1> rr4: 2798 000024CD BF[3C80] <1> mov di, flagnames 2799 000024D0 B90800 <1> mov cx, 8 2800 000024D3 F2AF <1> repne scasw 2801 000024D5 7597 <1> jne short rr2.errordec 2802 000024D7 89C2 <1> mov dx, ax 2803 000024D9 AC <1> lodsb 2804 000024DA E8EC84 <1> call isseparator? 2805 000024DD 758E <1> jne short rr2.errordec2 2806 000024DF FF75CE <1> push word [di-(flagnames-flagbits)-2] 2807 000024E2 E83094 <1> call skipcomm0 2808 000024E5 3C2E <1> cmp al, '.' ; special ? 2809 000024E7 7405 <1> je .writeprompt ; yes --> 2810 000024E9 E80294 <1> call iseol? 2811 000024EC 7519 <1> jne .noprompt 2812 <1> .writeprompt: 2813 000024EE BF[0E08] <1> mov di, line_out 2814 000024F1 89D0 <1> mov ax, dx 2815 000024F3 AB <1> stosw 2816 000024F4 58 <1> pop ax 2817 000024F5 50 <1> push ax 2818 000024F6 8506[A00C] <1> test word [reg_efl], ax ; is it off ? 2819 000024FA B82030 <1> mov ax, " 0" ; assume so 2820 000024FD 7402 <1> jz .off ; it is off --> 2821 000024FF FEC4 <1> inc ah ; is on, set to '1' 2822 <1> .off: 2823 00002501 AB <1> stosw 2824 00002502 E88200 <1> call dot_prompt 2825 00002505 747E <1> je .ret_pop ; if no change --> 2826 <1> .noprompt: 2827 00002507 E8E493 <1> call iseol? ; end of line ? 2828 0000250A 7479 <1> je .ret_pop ; yes, no change requested --> 2829 0000250C 51 <1> push cx 2830 0000250D 50 <1> push ax 2831 0000250E 56 <1> push si 2832 0000250F E8A184 <1> call isoperator? 2833 00002512 7520 <1> jne .nooperator 2834 00002514 89CB <1> mov bx, cx 2835 00002516 01DB <1> add bx, bx ; bh = 0 ! 2836 00002518 50 <1> push ax 2837 00002519 FF97[B090] <1> call near [operatordispatchers+bx] 2838 0000251D 58 <1> pop ax 2839 0000251E 85DB <1> test bx, bx 2840 00002520 7412 <1> jz .nooperator 2841 00002522 80FB16 <1> cmp bl, OPERATOR_BOOL_AND 2842 00002525 770D <1> ja .nooperator 2843 00002527 80FB14 <1> cmp bl, OPERATOR_BOOL_OR 2844 0000252A 730C <1> jae .gotoperator 2845 0000252C 80C303 <1> add bl, OPERATOR_BOOL_OR - OPERATOR_BIT_OR 2846 0000252F 80FB14 <1> cmp bl, OPERATOR_BOOL_OR 2847 00002532 7304 <1> jae .gotoperator 2848 <1> .nooperator: 2849 00002534 BB1800 <1> mov bx, OPERATOR_RIGHTOP; set default computation function 2850 00002537 A8 <1> db __TEST_IMM8 2851 <1> .gotoperator: 2852 00002538 AC <1> lodsb 2853 <1> 2854 00002539 E86E00 <1> call isassignmentoperator? 2855 0000253C 7308 <1> jnc .assign_op_done ; found an assignment operator --> 2856 0000253E 83FB18 <1> cmp bx, OPERATOR_RIGHTOP; dummy (no operator specified) ? 2857 <1> %if 1 ; since | ^ & are never unary operators 2858 00002541 7403E9967F <1> jne error 2859 <1> %else 2860 <1> je .assign_op_done ; yes, assignment operator not required --> 2861 <1> pop cx 2862 <1> pop ax ; restore al, si in front of operator 2863 <1> push ax 2864 <1> push cx 2865 <1> xchg si, cx 2866 <1> push cx 2867 <1> call isunaryoperator? ; is this a valid unary operator too ? 2868 <1> pop cx 2869 <1> je .nooperator ; yes --> 2870 <1> xchg si, cx 2871 <1> jmp error ; error where the assignment operator needs to be 2872 <1> %endif 2873 <1> .assign_op_done: 2874 00002546 59 <1> pop cx 2875 00002547 59 <1> pop cx 2876 00002548 59 <1> pop cx 2877 00002549 53 <1> push bx 2878 0000254A E89A8D <1> call getexpression 2879 0000254D E8B393 <1> call chkeol 2880 00002550 E8A687 <1> call toboolean 2881 00002553 59 <1> pop cx ; operator index 2882 00002554 31C0 <1> xor ax, ax 2883 00002556 A2[AD95] <1> mov byte [hhtype], al 2884 00002559 A3[A695] <1> mov word [hhvar+2], ax 2885 0000255C 5E <1> pop si 2886 0000255D 56 <1> push si ; flag 2887 0000255E 8536[A00C] <1> test word [reg_efl], si 2888 00002562 7401 <1> jz .notset 2889 00002564 40 <1> inc ax 2890 <1> .notset: 2891 00002565 A3[A495] <1> mov word [hhvar], ax 2892 00002568 87CB <1> xchg cx, bx 2893 0000256A 01DB <1> add bx, bx 2894 0000256C 8B9F[F090] <1> mov bx, word [bx+operatorfunctions] 2895 00002570 87CB <1> xchg cx, bx ; cx = operator function 2896 00002572 FFD1 <1> call cx ; compute 2897 00002574 58 <1> pop ax 2898 00002575 85D2 <1> test dx, dx 2899 00002577 7405 <1> jz .clear 2900 00002579 0906[A00C] <1> or word [reg_efl], ax ; set the bit 2901 0000257D C3 <1> retn 2902 <1> .clear: 2903 0000257E F7D0 <1> not ax 2904 00002580 2106[A00C] <1> and word [reg_efl], ax ; clear the bit 2905 00002584 C3 <1> retn 2906 <1> 2907 <1> .ret_pop: 2908 00002585 58 <1> pop ax 2909 00002586 C3 <1> retn 2910 <1> 2911 <1> 2912 <1> ; INP: di-> behind prompt to display (in line_out) 2913 <1> ; Iff byte[si-1] == '.', 2914 <1> ; only display without actual prompting 2915 <1> ; si-> line to check for EOL 2916 <1> ; OUT: NZ iff actually prompted and got non-empty line, 2917 <1> ; al = first character 2918 <1> ; si-> next character 2919 <1> ; dx, bx preserved 2920 <1> ; CHG: ax, cx, si, di, dx, bx 2921 <1> dot_prompt: 2922 00002587 807CFF2E <1> cmp byte [si-1], '.' ; syntax for display without prompt ? 2923 0000258B 7414 <1> je .onlydisplay ; yes --> 2924 0000258D 53 <1> push bx 2925 0000258E 52 <1> push dx 2926 0000258F E8C09B <1> call getline0 2927 00002592 5A <1> pop dx 2928 00002593 5B <1> pop bx 2929 00002594 E85793 <1> call iseol? ; no change requested ? 2930 00002597 7410 <1> je .ret ; yes --> (ZR) 2931 00002599 3C2E <1> cmp al, '.' ; other syntax for no change ? 2932 0000259B 750C <1> jne .ret ; no --> (NZ) 2933 <1> .chkeol1: 2934 0000259D AC <1> lodsb 2935 0000259E E96293 <1> jmp chkeol ; (ZR) 2936 <1> 2937 <1> .onlydisplay: 2938 000025A1 E8F9FF <1> call .chkeol1 2939 000025A4 E87F94 <1> call putsline_crlf 2940 000025A7 38C0 <1> cmp al, al ; ZR 2941 <1> .ret: 2942 000025A9 C3 <1> retn 2943 <1> 2944 <1> 2945 <1> ; INP: al = first character 2946 <1> ; si-> remaining string 2947 <1> ; OUT: CY if no assignment operator was found 2948 <1> ; NC if an assignment operator was found, 2949 <1> ; al = first character behind it (skipcomma called) 2950 <1> ; si-> remaining string behind character al 2951 <1> isassignmentoperator?: 2952 000025AA 3C3A <1> cmp al, ':' 2953 000025AC 750A <1> jne .checksingleequality 2954 000025AE AC <1> lodsb 2955 000025AF 3C3D <1> cmp al, '=' 2956 000025B1 7409 <1> je .skip ; long form assignment operator --> 2957 <1> ; A single colon. Report "no assignment operator" here. 2958 000025B3 4E <1> dec si 2959 000025B4 B03A <1> mov al, ':' ; restore si, al 2960 <1> .return_cy: 2961 000025B6 F9 <1> stc 2962 000025B7 C3 <1> retn 2963 <1> 2964 <1> .checksingleequality: 2965 000025B8 3C3D <1> cmp al, '=' 2966 000025BA 75FA <1> jne .return_cy ; no assignment operator --> 2967 <1> .skip: 2968 000025BC E85593 <1> call skipcomma 2969 000025BF F8 <1> clc 2970 000025C0 C3 <1> retn 2971 <1> 2972 <1> 2973 <1> ; INP: al = '.' 2974 <1> ; si -> next character 2975 <1> re_cmd: 2976 000025C1 5B <1> pop bx 2977 000025C2 5B <1> pop bx ; discard si and ax on stack 2978 000025C3 BA[6470] <1> mov dx, msg.list 2979 000025C6 E8C692 <1> call isstring? 2980 000025C9 7503E98900 <1> je .list 2981 <1> 2982 000025CE E82ADF <1> call guard_re 2983 000025D1 BF[E401] <1> mov di, re_buffer 2984 <1> 2985 000025D4 BA[D966] <1> mov dx, msg.append 2986 000025D7 E8B592 <1> call isstring? 2987 000025DA 740D <1> je .append 2988 000025DC BA[D166] <1> mov dx, msg.replace 2989 000025DF E8AD92 <1> call isstring? 2990 000025E2 740D <1> je .common ; di -> at first byte (where to append) 2991 000025E4 B80401 <1> mov ax, 0104h 2992 000025E7 EB68 <1> jmp .error_common 2993 <1> 2994 <1> .append: 2995 000025E9 30C0 <1> xor al, al 2996 000025EB B9FFFF <1> mov cx, -1 2997 000025EE F2AE <1> repne scasb ; di -> after zero byte 2998 000025F0 4F <1> dec di ; -> at zero byte 2999 <1> 3000 <1> .common: 3001 000025F1 E84F93 <1> call skipwhite 3002 000025F4 E8E8DE <1> call guard_auxbuff 3003 <1> 3004 000025F7 31DB <1> xor bx, bx 3005 <1> 3006 000025F9 50 <1> push ax 3007 000025FA B00D <1> mov al, 13 3008 000025FC 3845FF <1> cmp byte [di - 1], al ; is there an EOL in front of us? 3009 000025FF 8E06[F209] <1> mov es, word [auxbuff_segorsel] 3010 00002603 87DF <1> xchg bx, di ; es:di -> auxbuff, bx -> at zero byte 3011 00002605 7401 <1> je @F ; yes --> 3012 <1> 3013 00002607 AA <1> stosb ; first store a CR 3014 <1> @@: 3015 00002608 58 <1> pop ax 3016 <1> .loop: 3017 00002609 3C5C <1> cmp al, '\' 3018 0000260B 750A <1> jne .literal 3019 <1> 3020 0000260D AC <1> lodsb ; load escaped character 3021 0000260E E8E192 <1> call iseol?.notsemicolon; EOL ? 3022 00002611 7436 <1> je .error_escaped_cr ; yes, error --> 3023 00002613 AA <1> stosb ; store escaped literal 3024 00002614 AC <1> lodsb ; load next 3025 00002615 EBF2 <1> jmp .loop 3026 <1> 3027 <1> .literal: 3028 00002617 E8D892 <1> call iseol?.notsemicolon; EOL ? 3029 0000261A 7410 <1> je .end ; got all --> 3030 0000261C 3C3B <1> cmp al, ';' ; semicolon ? 3031 0000261E 7508 <1> jne @F 3032 00002620 B00D <1> mov al, 13 3033 00002622 AA <1> stosb ; store linebreak 3034 00002623 E81D93 <1> call skipwhite ; skip leading blanks 3035 00002626 EBE1 <1> jmp .loop 3036 <1> 3037 <1> @@: 3038 00002628 AA <1> stosb ; store character 3039 00002629 AC <1> lodsb 3040 0000262A EBDD <1> jmp .loop 3041 <1> 3042 <1> .end: 3043 <1> ; di -> behind last character 3044 0000262C 31C0 <1> xor ax, ax 3045 0000262E AA <1> stosb 3046 0000262F 89D8 <1> mov ax, bx 3047 00002631 01F8 <1> add ax, di 3048 00002633 7219 <1> jc .error_too_much 3049 00002635 3D[E409] <1> cmp ax, re_buffer.end 3050 00002638 7714 <1> ja .error_too_much 3051 0000263A 31F6 <1> xor si, si 3052 0000263C 06 <1> push es 3053 0000263D 1F <1> pop ds 3054 0000263E 16 <1> push ss 3055 0000263F 07 <1> pop es 3056 00002640 89F9 <1> mov cx, di 3057 00002642 89DF <1> mov di, bx 3058 00002644 F3A4 <1> rep movsb 3059 00002646 16 <1> push ss 3060 00002647 1F <1> pop ds 3061 00002648 C3 <1> retn 3062 <1> 3063 <1> .error_escaped_cr: 3064 00002649 B80501 <1> mov ax, 0105h 3065 0000264C EB03 <1> jmp .error_common 3066 <1> 3067 <1> .error_too_much: 3068 0000264E B80601 <1> mov ax, 0106h 3069 <1> 3070 <1> .error_common: 3071 00002651 E8CF7E <1> call setrc 3072 00002654 E9857E <1> jmp error 3073 <1> 3074 <1> re_cmd.list: 3075 00002657 AC <1> lodsb 3076 00002658 E8A892 <1> call chkeol 3077 <1> 3078 0000265B BE[E401] <1> mov si, re_buffer 3079 0000265E B400 <1> mov ah, 0 ; ah = 0 (flag to escape blanks) 3080 <1> .loop: 3081 00002660 AC <1> lodsb 3082 00002661 84C0 <1> test al, al 3083 00002663 7442 <1> jz .end 3084 00002665 3C0D <1> cmp al, 13 ; (intentionally not iseol?) 3085 00002667 742E <1> je .cr 3086 00002669 3C20 <1> cmp al, 32 3087 0000266B 741B <1> je .escapeif 3088 0000266D 3C09 <1> cmp al, 9 3089 0000266F 7417 <1> je .escapeif 3090 00002671 B401 <1> mov ah, 1 ; ah = 1 3091 00002673 3C3B <1> cmp al, ';' 3092 00002675 7417 <1> je .escape 3093 00002677 3C22 <1> cmp al, '"' 3094 00002679 7413 <1> je .escape 3095 0000267B 3C27 <1> cmp al, "'" 3096 0000267D 740F <1> je .escape 3097 0000267F 3C5C <1> cmp al, '\' 3098 00002681 740B <1> je .escape 3099 <1> .put: 3100 00002683 E84197 <1> call putc 3101 00002686 EBD8 <1> jmp .loop 3102 <1> 3103 <1> .escapeif: 3104 00002688 84E4 <1> test ah, ah 3105 0000268A 75F7 <1> jnz .put 3106 0000268C B401 <1> mov ah, 1 ; ah = 1 3107 <1> .escape: 3108 0000268E 50 <1> push ax 3109 0000268F B05C <1> mov al, '\' 3110 00002691 E83397 <1> call putc 3111 00002694 58 <1> pop ax 3112 00002695 EBEC <1> jmp .put 3113 <1> 3114 <1> .cr: 3115 00002697 AC <1> lodsb 3116 00002698 84C0 <1> test al, al 3117 0000269A 740B <1> jz .end 3118 0000269C 4E <1> dec si 3119 0000269D B03B <1> mov al, ';' 3120 0000269F E82597 <1> call putc 3121 000026A2 B82000 <1> mov ax, 32 ; ah = 0 3122 000026A5 EBDC <1> jmp .put 3123 <1> 3124 <1> .end: 3125 000026A7 B00D <1> mov al, 13 3126 000026A9 E81B97 <1> call putc 3127 000026AC B00A <1> mov al, 10 3128 000026AE E91697 <1> jmp putc 3129 <1> 3130 <1> 3131 <1> dumpregs_extended: 3132 000026B1 E847DE <1> call guard_re 3133 000026B4 813E[E401]4052 <1> cmp word [re_buffer], "@R" 3134 000026BA 7408 <1> je @F 3135 000026BC 813E[E401]4072 <1> cmp word [re_buffer], "@r" 3136 000026C2 750A <1> jne .complex 3137 <1> @@: 3138 000026C4 803E[E601]00 <1> cmp byte [re_buffer + 2], 0 3139 000026C9 7503E98E00 <1> je .just_dumpregs 3140 <1> 3141 <1> .complex: 3142 000026CE F606[A700]20 <1> testopt [internalflags3], dif3_auxbuff_guarded_2 3143 000026D3 740C <1> jz @F 3144 <1> 3145 000026D5 B80301 <1> mov ax, 0103h 3146 000026D8 E8487E <1> call setrc 3147 000026DB BA[8066] <1> mov dx, msg.unexpected_auxbuff_guard 3148 000026DE E9C396 <1> jmp putsz 3149 <1> 3150 <1> @@: 3151 000026E1 E818A5 <1> call yy_reset_buf 3152 <1> 3153 000026E4 C706[E409][E401] <1> mov word [re_buffer.position], re_buffer 3154 000026EA 8326[E809]00 <1> and word [re_count], 0 3155 000026EF 8326[EA09]00 <1> and word [re_count + 2], 0 3156 <1> 3157 000026F4 FF36[F00A] <1> push word [rc] 3158 000026F8 FF36[940A] <1> push word [savesp] 3159 000026FC FF36[9E0A] <1> push word [throwsp] 3160 00002700 FF36[DC0B] <1> push word [lastcmd] 3161 00002704 55 <1> push bp 3162 00002705 8926[940A] <1> mov word [savesp], sp 3163 00002709 8926[9E0A] <1> mov word [throwsp], sp 3164 0000270D 8926[980A] <1> mov word [re_sp], sp 3165 <1> 3166 00002711 800E[A700]01 <1> setopt [internalflags3], dif3_input_re 3167 <1> 3168 00002716 F606[A700]10 <1> testopt [internalflags3], dif3_auxbuff_guarded_1 3169 0000271B 7405 <1> jz @F 3170 0000271D 8036[A700]30 <1> xoropt [internalflags3], dif3_auxbuff_guarded_1 | dif3_auxbuff_guarded_2 3171 <1> @@: 3172 <1> .cmd3: 3173 00002722 E9DBD8 <1> jmp cmd3 3174 <1> 3175 <1> .exit: 3176 00002725 8B26[980A] <1> mov sp, word [re_sp] 3177 00002729 5D <1> pop bp 3178 0000272A 8F06[DC0B] <1> pop word [lastcmd] 3179 0000272E 8F06[9E0A] <1> pop word [throwsp] 3180 00002732 8F06[940A] <1> pop word [savesp] 3181 00002736 58 <1> pop ax 3182 00002737 85C0 <1> test ax, ax 3183 00002739 7403 <1> jz @F 3184 0000273B A3[F00A] <1> mov word [rc], ax 3185 <1> @@: 3186 0000273E 8026[A700]FE <1> clropt [internalflags3], dif3_input_re 3187 <1> 3188 00002743 F606[A700]20 <1> testopt [internalflags3], dif3_auxbuff_guarded_2 3189 00002748 7405 <1> jz @F 3190 0000274A 8036[A700]30 <1> xoropt [internalflags3], dif3_auxbuff_guarded_1 | dif3_auxbuff_guarded_2 3191 <1> @@: 3192 <1> 3193 0000274F F606[8100]80 <1> testopt [options2], opt2_re_cancel_tpg 3194 00002754 7501 <1> jnz @F 3195 <1> 3196 00002756 C3 <1> retn 3197 <1> 3198 <1> @@: 3199 00002757 E8ED17 <1> call terminate_silent_dump.if_nonnull 3200 0000275A EBC6 <1> jmp .cmd3 3201 <1> 3202 <1> 3203 <1> .just_dumpregs: 3204 <1> ; DUMPREGS - Dump registers. 3205 <1> ; 3206 <1> ; 16 bit: 8 regs, line break, first 4 segment regs, IP, flags 3207 <1> ; 32 bit: 6 regs, line break, 2 regs, flags, line break, 6 segment regs, EIP 3208 <1> ; 3209 <1> ; CHG: ax, bx, cx, dx, di, si 3210 <1> dumpregs: 3211 0000275C F606[8600]08 <1> testopt [options3], opt3_r_highlight_eip 3212 00002761 750C <1> jnz @F 3213 00002763 A1[9C0C] <1> mov ax, word [reg_eip] 3214 00002766 A3[DC0C] <1> mov word [reg_eip - regs + regs_prior], ax 3215 <1> %if _PM 3216 00002769 A1[9E0C] <1> mov ax, word [reg_eip + 2] 3217 0000276C A3[DE0C] <1> mov word [reg_eip + 2 - regs + regs_prior], ax 3218 <1> %endif 3219 <1> @@: 3220 <1> 3221 0000276F BE[7480] <1> mov si, reg16names 3222 00002772 BF[0E08] <1> mov di, line_out 3223 00002775 B90800 <1> mov cx, 8 ; display all 8 standard regs (16-bit) 3224 00002778 F606[7C00]01 <1> testopt [options], dispregs32 3225 0000277D 7402 <1> jz .firstrow16 3226 0000277F B106 <1> mov cl, 6 ; room for 6 standard regs (32-bit) only 3227 <1> .firstrow16: 3228 00002781 9C <1> pushf 3229 00002782 57 <1> push di 3230 00002783 E81101 <1> call dmpr1 ; display first row 3231 00002786 E89592 <1> call trimputs 3232 00002789 5F <1> pop di ; (reset di) 3233 0000278A 9D <1> popf ; (reset ZF) 3234 0000278B 7511 <1> jnz .secondrow32 3235 0000278D B104 <1> mov cl, 4 ; display 4 segment regs 3236 0000278F E80501 <1> call dmpr1 3237 00002792 83C604 <1> add si, byte 2*2 ; skip FS+GS 3238 00002795 41 <1> inc cx ; (= 1) 3239 00002796 E8FE00 <1> call dmpr1 ; display IP 3240 00002799 E83103 <1> call dmpflags ; display flags in 16-bit display 3241 0000279C EB18 <1> jmp short .lastrowdone 3242 <1> .secondrow32: 3243 0000279E 57 <1> push di 3244 0000279F B102 <1> mov cl, 2 ; display rest of 32-bit standard regs 3245 000027A1 E8F300 <1> call dmpr1 3246 000027A4 56 <1> push si 3247 000027A5 E82503 <1> call dmpflags ; display flags in 32-bit display 3248 000027A8 E87B92 <1> call putsline_crlf 3249 000027AB 5E <1> pop si 3250 000027AC 5F <1> pop di ; (reset di) 3251 000027AD B106 <1> mov cl, 6 ; display all segment registers 3252 000027AF E8E500 <1> call dmpr1 3253 000027B2 41 <1> inc cx ; (= 1) 3254 000027B3 E8E100 <1> call dmpr1 ; display EIP 3255 <1> .lastrowdone: 3256 000027B6 E86592 <1> call trimputs 3257 <1> 3258 000027B9 BE[640C] <1> mov si, regs 3259 000027BC BF[A40C] <1> mov di, regs_prior 3260 000027BF B92000 <1> mov cx, words(regs_prior.size) 3261 000027C2 F3A5 <1> rep movsw ; update prior regs save area 3262 <1> 3263 <1> ; Set U address to CS:(E)IP. 3264 000027C4 BE[9C0C] <1> mov si, reg_eip 3265 000027C7 BF[1E0B] <1> mov di, u_addr 3266 000027CA A5 <1> movsw ; first word of saOffset 3267 <1> %if saSegSel == 4 3268 000027CB A5 <1> movsw ; second word of saOffset 3269 <1> %endif 3270 000027CC A1[900C] <1> mov ax, word [reg_cs] 3271 000027CF AB <1> stosw ; saSegSel 3272 <1> %if _PM 3273 000027D0 E8FA69 <1> call ispm 3274 000027D3 7501 <1> jnz .86m 3275 <1> .pm: 3276 000027D5 AF <1> scasw ; skip saSegment, sto to saSelector 3277 <1> .86m: 3278 000027D6 AB <1> stosw ; (if jumped to .86m) saSegment 3279 <1> @@: 3280 <1> %endif 3281 <1> 3282 000027D7 B80300 <1> mov ax, DIS_F_REPT | DIS_F_SHOW 3283 000027DA F606[7F00]10 <1> testopt [options], rr_disasm_no_rept 3284 000027DF 7402 <1> jz @F 3285 000027E1 24FE <1> and al, ~ DIS_F_REPT 3286 <1> @@: 3287 000027E3 F606[7F00]20 <1> testopt [options], rr_disasm_no_show 3288 000027E8 7402 <1> jz @F 3289 000027EA 24FD <1> and al, ~ DIS_F_SHOW 3290 <1> @@: 3291 000027EC A3[D687] <1> mov word [disflags], ax 3292 000027EF E8BB1F <1> call disasm 3293 <1> 3294 <1> ; Set ABO to address after the dumpregs disassembly. 3295 000027F2 BF[140B] <1> mov di, behind_r_u_addr 3296 000027F5 BE[1E0B] <1> mov si, u_addr 3297 000027F8 A5 <1> movsw ; first word of saOffset 3298 <1> %if saSegSel == 4 3299 000027F9 A5 <1> movsw ; second word of saOffset 3300 <1> %endif 3301 000027FA A5 <1> movsw ; saSegSel 3302 <1> %if _PM 3303 000027FB A5 <1> movsw ; saSegment 3304 000027FC A5 <1> movsw ; saSelector 3305 <1> %endif 3306 <1> %if (behind_r_u_addr + SEGADR_size) != u_addr 3307 <1> %error Expected u_addr behind behind_r_u_addr 3308 <1> ; mov di, u_addr 3309 <1> %endif 3310 <1> ; Reset U offset to (E)IP. 3311 000027FD BE[9C0C] <1> mov si, reg_eip 3312 00002800 A5 <1> movsw ; first word of saOffset 3313 00002801 A5 <1> _386_PM movsw ; second word of saOffset 3314 <1> 3315 <1> 3316 <1> %if _ACCESS_VARIABLES_AMOUNT 3317 <1> dumpregs_set_access_variables: 3318 00002802 31C0 <1> xor ax, ax 3319 00002804 BF[0483] <1> mov di, reading_access_variables 3320 00002807 B92000 <1> mov cx, words(_ACCESS_VARIABLES_AMOUNT * 8 * 2) 3321 0000280A F3AB <1> rep stosw 3322 <1> 3323 0000280C 8B0E[B087] <1> mov cx, [memrefs.free] 3324 00002810 85C9 <1> test cx, cx 3325 00002812 744A <1> jz .none 3326 00002814 31F6 <1> xor si, si 3327 <1> .loop: 3328 00002816 89F3 <1> mov bx, si 3329 00002818 E86E2C <1> call get_memref_index_bx 3330 0000281B 8B87[7A87] <1> mov ax, word [memrefs + bx + mrFlags] 3331 0000281F A801 <1> test al, mrfBranchDirect 3332 00002821 7537 <1> jnz .next 3333 00002823 31D2 <1> xor dx, dx ; 0 = reading 3334 00002825 A840 <1> test al, mrfStringSource 3335 00002827 751C <1> jnz .gotmsg 3336 00002829 42 <1> inc dx ; 1 = writing 3337 0000282A A880 <1> test al, mrfStringDest 3338 0000282C 7517 <1> jnz .gotmsg 3339 0000282E 88C2 <1> mov dl, al 3340 00002830 80E20C <1> and dl, mrfMemSource | mrfMemDest 3341 00002833 80FA0C <1> cmp dl, mrfMemSource | mrfMemDest 3342 00002836 B202 <1> mov dl, 2 ; 2 = r/w 3343 00002838 740B <1> je .gotmsg 3344 0000283A 31D2 <1> xor dx, dx ; 0 = reading 3345 0000283C A804 <1> test al, mrfMemSource 3346 0000283E 7505 <1> jnz .gotmsg 3347 00002840 42 <1> inc dx ; 1 = writing 3348 00002841 A808 <1> test al, mrfMemDest 3349 <1> ; jnz .gotmsg 3350 00002843 7415 <1> jz .next 3351 <1> .gotmsg: 3352 <1> 3353 00002845 84D2 <1> test dl, dl 3354 00002847 740B <1> jz .read 3355 <1> 3356 <1> .write: 3357 00002849 BF[2483] <1> mov di, writing_access_variables 3358 0000284C E81000 <1> call add_access_variable 3359 0000284F 80FA01 <1> cmp dl, 1 3360 00002852 7406 <1> je .next 3361 <1> 3362 <1> .read: 3363 00002854 BF[0483] <1> mov di, reading_access_variables 3364 00002857 E80500 <1> call add_access_variable 3365 <1> 3366 <1> .next: 3367 0000285A 46 <1> inc si 3368 0000285B 49 <1> dec cx 3369 0000285C 75B8 <1> jnz .loop 3370 <1> .none: 3371 <1> %endif 3372 0000285E C3 <1> retn 3373 <1> 3374 <1> 3375 <1> %if _ACCESS_VARIABLES_AMOUNT 3376 <1> add_access_variable: 3377 0000285F 93 <1> xchg ax, bx 3378 00002860 31DB <1> xor bx, bx 3379 <1> .loop: 3380 00002862 83790400 <1> cmp word [di + bx + 4], 0 3381 00002866 7525 <1> jne .next 3382 00002868 83790600 <1> cmp word [di + bx + 4 + 2], 0 3383 0000286C 751F <1> jne .next 3384 0000286E 93 <1> xchg ax, bx 3385 0000286F FFB7[7287] <1> push word [memrefs + bx + mrLinear + 2] 3386 00002873 FFB7[7087] <1> push word [memrefs + bx + mrLinear] 3387 00002877 FFB7[7E87] <1> push word [memrefs + bx + mrLength + 2] 3388 0000287B FFB7[7C87] <1> push word [memrefs + bx + mrLength] 3389 0000287F 93 <1> xchg ax, bx 3390 00002880 8F4104 <1> pop word [di + bx + 4] 3391 00002883 8F4106 <1> pop word [di + bx + 4 + 2] 3392 00002886 8F01 <1> pop word [di + bx] 3393 00002888 8F4102 <1> pop word [di + bx + 2] 3394 0000288B 93 <1> xchg ax, bx 3395 0000288C C3 <1> retn 3396 <1> 3397 <1> .next: 3398 0000288D 83C308 <1> add bx, 8 3399 00002890 83FB20 <1> cmp bx, _ACCESS_VARIABLES_AMOUNT * 8 3400 00002893 72CD <1> jb .loop 3401 00002895 93 <1> xchg ax, bx 3402 00002896 C3 <1> retn 3403 <1> 3404 <1> 3405 <1> usesection lDEBUG_DATA_ENTRY 3406 00008302 00 <1> align 4, db 0 3407 <1> reading_access_variables: 3408 00008304 00 <1> times _ACCESS_VARIABLES_AMOUNT * 8 db 0 3409 <1> 3410 <1> writing_access_variables: 3411 00008324 00 <1> times _ACCESS_VARIABLES_AMOUNT * 8 db 0 3412 <1> 3413 <1> usesection lDEBUG_CODE 3414 <1> %endif 3415 <1> 3416 <1> 3417 <1> ; Function to display multiple register entries. 3418 <1> ; 3419 <1> ; INP: [options]&dispregs32 = whether to display 32-bit registers, 3420 <1> ; except segment registers which are always 16-bit 3421 <1> ; si-> 2-byte register name in table 3422 <1> ; cx = number of registers to display 3423 <1> ; OUT: si-> register name in table after the last one displayed 3424 <1> ; cx = 0 3425 <1> ; CHG: bx, ax, dx 3426 <1> dmpr1: 3427 <1> .: 3428 00002897 8D9C8C7E <1> lea bx, [si-(reg16names+DATASECTIONFIXUP)] 3429 0000289B 01DB <1> add bx, bx ; index * 4 3430 0000289D 807C0153 <1> cmp byte [si+1], 'S' ; segment register ? 3431 000028A1 740A <1> je .no_e ; always 16-bit --> (ZR) 3432 000028A3 F606[7C00]01 <1> testopt [options], dispregs32 ; display 32-bit register ? 3433 000028A8 7403 <1> jz .no_e ; no --> (ZR) 3434 000028AA B045 <1> mov al, 'E' 3435 000028AC AA <1> stosb ; store E for Exx register name 3436 <1> .no_e: 3437 000028AD A5 <1> movsw ; store register name, increase pointer 3438 000028AE B03D <1> mov al, '=' 3439 000028B0 AA <1> stosb ; store equality sign 3440 000028B1 742E <1> jz .no_high ; (ZF left from before) 3441 <1> 3442 000028B3 8026[A600]FE <1> clropt [internalflags3], dif3_highlighting 3443 000028B8 8B87[660C] <1> mov ax, word [regs + bx + 2] 3444 000028BC 8B97[A60C] <1> mov dx, word [regs_prior + bx + 2] 3445 000028C0 F606[8600]04 <1> testopt [options3], opt3_r_highlight_full 3446 000028C5 7417 <1> jz @F 3447 000028C7 39C2 <1> cmp dx, ax 3448 000028C9 7510 <1> jne .highlighthigh 3449 000028CB 52 <1> push dx 3450 000028CC 50 <1> push ax 3451 000028CD 8B87[640C] <1> mov ax, word [regs + bx] 3452 000028D1 8B97[A40C] <1> mov dx, word [regs_prior + bx] 3453 000028D5 39C2 <1> cmp dx, ax 3454 000028D7 58 <1> pop ax 3455 000028D8 5A <1> pop dx 3456 000028D9 7403 <1> je @F 3457 <1> .highlighthigh: 3458 000028DB E82500 <1> call highlight 3459 <1> @@: 3460 000028DE E85000 <1> call hexword_diff ; store high word (only if 32-bit register) 3461 <1> .no_high: 3462 000028E1 8B87[640C] <1> mov ax, word [regs + bx] 3463 000028E5 8B97[A40C] <1> mov dx, word [regs_prior + bx] 3464 000028E9 F606[8600]04 <1> testopt [options3], opt3_r_highlight_full 3465 000028EE 7407 <1> jz @F 3466 000028F0 39C2 <1> cmp dx, ax 3467 000028F2 7403 <1> je @F 3468 000028F4 E80C00 <1> call highlight 3469 <1> @@: 3470 000028F7 E83700 <1> call hexword_diff ; store low word 3471 <1> 3472 000028FA E81D00 <1> call unhighlight 3473 <1> 3474 000028FD B020 <1> mov al, 32 3475 000028FF AA <1> stosb ; store space 3476 00002900 E295 <1> loop . 3477 00002902 C3 <1> retn 3478 <1> ; Note: This code doesn't use 386+ registers to display our internal 3479 <1> ; variables for these. Currently, setting the RX bit of options 3480 <1> ; will display the 32-bit variables even on non-386 machines. 3481 <1> ; Changing this code to require EAX would require changes to our 3482 <1> ; check too. 3483 <1> ; 32-bit code probably wouldn't be much shorter than the current 3484 <1> ; implementation as well. 3485 <1> 3486 <1> highlight: 3487 00002903 F606[A600]01 <1> testopt [internalflags3], dif3_highlighting 3488 00002908 750F <1> jnz @F 3489 0000290A 800E[A600]01 <1> setopt [internalflags3], dif3_highlighting 3490 0000290F 56 <1> push si 3491 00002910 51 <1> push cx 3492 00002911 BE[BF6B] <1> mov si, msg.highlight 3493 00002914 E8ED0A <1> call copy_single_counted_string 3494 00002917 59 <1> pop cx 3495 00002918 5E <1> pop si 3496 <1> @@: 3497 00002919 C3 <1> retn 3498 <1> 3499 <1> unhighlight: 3500 0000291A F606[A600]01 <1> testopt [internalflags3], dif3_highlighting 3501 0000291F 740F <1> jz @F 3502 00002921 8026[A600]FE <1> clropt [internalflags3], dif3_highlighting 3503 00002926 56 <1> push si 3504 00002927 51 <1> push cx 3505 00002928 BE[C46B] <1> mov si, msg.unhighlight 3506 0000292B E8D60A <1> call copy_single_counted_string 3507 0000292E 59 <1> pop cx 3508 0000292F 5E <1> pop si 3509 <1> @@: 3510 00002930 C3 <1> retn 3511 <1> 3512 <1> hexword_diff: 3513 00002931 F606[8600]01 <1> testopt [options3], opt3_r_highlight_diff 3514 00002936 7407 <1> jz @F 3515 00002938 F606[8600]04 <1> testopt [options3], opt3_r_highlight_full 3516 0000293D 7403 <1> jz @FF 3517 <1> @@: 3518 0000293F E9AC90 <1> jmp hexword 3519 <1> 3520 <1> @@: 3521 <1> .hexword: 3522 00002942 86C4 <1> xchg al, ah 3523 00002944 86D6 <1> xchg dl, dh 3524 00002946 E80400 <1> call .hexbyte 3525 00002949 86C4 <1> xchg al, ah 3526 0000294B 86D6 <1> xchg dl, dh 3527 <1> 3528 <1> .hexbyte: 3529 0000294D 51 <1> push cx 3530 0000294E B104 <1> mov cl, 4 3531 00002950 D2C0 <1> rol al, cl 3532 00002952 D2C2 <1> rol dl, cl 3533 00002954 E80500 <1> call .hexnyb 3534 00002957 D2C0 <1> rol al, cl 3535 00002959 D2C2 <1> rol dl, cl 3536 0000295B 59 <1> pop cx 3537 <1> 3538 <1> .hexnyb: 3539 0000295C 50 <1> push ax 3540 0000295D 88D4 <1> mov ah, dl 3541 0000295F 250F0F <1> and ax, 0F0Fh 3542 00002962 38E0 <1> cmp al, ah 3543 00002964 7405 <1> je .unhighlight 3544 <1> .highlight: 3545 00002966 E89AFF <1> call highlight 3546 00002969 EB03 <1> jmp .common 3547 <1> 3548 <1> .unhighlight: 3549 0000296B E8ACFF <1> call unhighlight 3550 <1> .common: 3551 <1> ; INP: original ax on stack, then return near address 3552 <1> ; al = nybble value to display, 0..15 3553 <1> ; es:di -> where to store 3554 <1> ; OUT: es:di incremented 3555 <1> ; ax restored 3556 <1> ; return to near address that was on stack 3557 0000296E E99290 <1> jmp hexnyb.common 3558 <1> 3559 <1> 3560 <1> %if _RN 3561 <1> ; The layout for FSAVE/FRSTOR depends on mode and 16-/32-bit. 3562 <1> 3563 <1> %if 0 3564 <1> struc FPENV16 3565 <1> .cw: resw 1 ; 00h 3566 <1> .sw: resw 1 ; 02h 3567 <1> .tw: resw 1 ; 04h 3568 <1> .fip: resw 1 ; 06h IP offset 3569 <1> .opc: ; 08h RM: opcode (0-10), IP 16-19 in high bits 3570 <1> .fcs: resw 1 ; 08h PM: IP selector 3571 <1> .fop: resw 1 ; 0Ah operand pointer offset 3572 <1> .foph: ; 0Ch RM: operand pointer 16-19 in high bits 3573 <1> .fos: resw 1 ; 0Ch PM: operand pointer selector 3574 <1> endstruc; 0Eh 3575 <1> 3576 <1> struc FPENV32 3577 <1> .cw: resd 1 ; 00h 3578 <1> .sw: resd 1 ; 04h 3579 <1> .tw: resd 1 ; 08h 3580 <1> .fip: resd 1 ; 0Ch ip offset (RM: bits 0-15 only) 3581 <1> .fopcr: ; 10h (dword) RM: opcode (0-10), ip (12-27) 3582 <1> .fcs: resw 1 ; 10h PM: ip selector 3583 <1> .fopcp: resw 1 ; 12h PM: opcode (bits 0-10) 3584 <1> .foo: resd 1 ; 14h operand pointer offset (RM: bits 0-15 only) 3585 <1> .fooh: ; 18h (dword) RM: operand pointer (12-27) 3586 <1> .fos: resw 1 ; 18h PM: operand pointer selector 3587 <1> resw 1 ; 1Ah PM: not used 3588 <1> endstruc; 1Ch 3589 <1> %endif 3590 <1> 3591 <1> 3592 <1> usesection lDEBUG_DATA_ENTRY 3593 <1> 3594 <1> ; dumpregsFPU - Dump Floating Point Registers 3595 <1> fregnames: 3596 00008344 435753575457 <1> db "CW", "SW", "TW" 3597 0000834A 4F50433D49503D4450- <1> db "OPC=", "IP=", "DP=" 3597 00008353 3D <1> 3598 00008354 656D707479 <1> msg.empty: db "empty" 3599 <1> endarea msg.empty 3600 00008359 4E614E <1> msg.nan: db "NaN" 3601 <1> endarea msg.nan 3602 <1> 3603 <1> 3604 <1> usesection lDEBUG_CODE 3605 <1> 3606 <1> dumpregsFPU: 3607 00002971 E86BDB <1> call guard_auxbuff 3608 00002974 8E06[F209] <1> mov es, word [auxbuff_segorsel] 3609 <1> ; => auxbuff 3610 00002978 31FF <1> xor di, di ; -> auxbuff 3611 0000297A B98000 <1> mov cx, 128 3612 0000297D 31C0 <1> xor ax, ax 3613 0000297F F3AB <1> rep stosw ; initialise auxbuff 3614 <1> %if _AUXBUFFSIZE < (128 * 2) 3615 <1> %error auxbuff not large enough for dumpregsFPU 3616 <1> %endif 3617 00002981 BF[0E08] <1> mov di, line_out 3618 00002984 BE[4483] <1> mov si, fregnames 3619 00002987 31DB <1> xor bx, bx ; es:bx -> auxbuff 3620 00002989 66 <1> _386_o32 3621 0000298A 26DD37 <1> fnsave [es:bx] 3622 <1> 3623 <1> ; display CW, SW and TW 3624 0000298D 16 <1> push ss 3625 0000298E 07 <1> pop es ; es:di -> line_out 3626 0000298F B90300 <1> mov cx, 3 3627 <1> .nextfpr: 3628 00002992 A5 <1> movsw 3629 00002993 B03D <1> mov al, '=' 3630 00002995 AA <1> stosb 3631 00002996 87F3 <1> xchg si, bx 3632 00002998 8E1E[F209] <1> mov ds, word [auxbuff_segorsel] 3633 <1> ; ds:si -> auxbuff entry 3634 0000299C 66 <1> _386_o32 ; lodsd 3635 0000299D AD <1> lodsw 3636 0000299E 16 <1> push ss 3637 0000299F 1F <1> pop ds ; ds:si -> fregnames entry 3638 000029A0 87F3 <1> xchg si, bx 3639 000029A2 50 <1> push ax 3640 000029A3 E84890 <1> call hexword 3641 000029A6 B020 <1> mov al, 32 3642 000029A8 AA <1> stosb 3643 000029A9 E2E7 <1> loop .nextfpr 3644 <1> 3645 <1> ; display OPC 3646 <1> ; in 16-bit PM, there's no OPC 3647 <1> ; in 32-bit PM, there's one, but the location differs from RM 3648 000029AB 53 <1> push bx 3649 <1> %if _PM 3650 000029AC E81E68 <1> call ispm 3651 000029AF 7408 <1> jz .notpm_opc 3652 000029B1 83C302 <1> add bx, byte 2 ; location of OPC in PM differs from RM 3653 000029B4 83C604 <1> _no386 add si, byte 4 ; no OPC in 16-bit PM 3654 000029B7 EB18 <1> _no386 jmp short .no_opc 3655 <1> .notpm_opc: 3656 <1> %endif 3657 000029B9 A5 <1> movsw 3658 000029BA A5 <1> movsw 3659 000029BB 87F3 <1> xchg si, bx 3660 000029BD 8E1E[F209] <1> mov ds, word [auxbuff_segorsel] 3661 <1> ; ds:si -> auxbuff entry 3662 000029C1 66 <1> _386_o32 ; lodsd 3663 000029C2 AD <1> lodsw ; skip word/dword 3664 000029C3 AD <1> lodsw 3665 000029C4 16 <1> push ss 3666 000029C5 1F <1> pop ds ; ds:si -> fregnames entry 3667 000029C6 87F3 <1> xchg si, bx 3668 000029C8 25FF07 <1> and ax, 07FFh ; bits 0-10 only 3669 000029CB E82090 <1> call hexword 3670 000029CE B020 <1> mov al, 32 3671 000029D0 AA <1> stosb 3672 <1> .no_opc: 3673 000029D1 5B <1> pop bx 3674 <1> 3675 <1> ; display IP and DP 3676 000029D2 B102 <1> mov cl, 2 3677 <1> .nextfp: 3678 000029D4 51 <1> push cx 3679 000029D5 16 <1> push ss 3680 000029D6 1F <1> pop ds ; ds:si -> fregnames entry 3681 000029D7 A5 <1> movsw 3682 000029D8 A4 <1> movsb 3683 000029D9 87F3 <1> xchg si, bx 3684 000029DB 8E1E[F209] <1> mov ds, word [auxbuff_segorsel] 3685 <1> ; ds:si -> auxbuff entry 3686 000029DF 66 <1> _386_o32 ; lodsd 3687 000029E0 AD <1> lodsw 3688 000029E1 66 <1> _386_o32 ; mov edx, eax 3689 000029E2 89C2 <1> mov dx, ax 3690 000029E4 66 <1> _386_o32 ; lodsd 3691 000029E5 AD <1> lodsw 3692 000029E6 87F3 <1> xchg si, bx 3693 000029E8 16 <1> push ss 3694 000029E9 1F <1> pop ds ; ds:si -> fregnames entry 3695 <1> %if _PM 3696 000029EA E8E067 <1> call ispm 3697 000029ED 7408 <1> jz .notpm_ipdp 3698 000029EF E8FC8F <1> call hexword 3699 000029F2 B03A <1> mov al, ':' 3700 000029F4 AA <1> stosb 3701 000029F5 EB0D <1> jmp short .fppm 3702 <1> .notpm_ipdp: 3703 <1> %endif 3704 000029F7 B10C <1> mov cl, 12 3705 000029F9 66 <1> _386_o32 ; shr eax, cl 3706 000029FA D3E8 <1> shr ax, cl 3707 000029FC E8EF8F <1> _386 call hexword 3708 000029FF EB03 <1> _386 jmp short .fppm 3709 00002A01 E8FC8F <1> call hexnyb 3710 <1> .fppm: 3711 00002A04 66 <1> _386_PM_o32 ; mov eax, edx 3712 00002A05 89D0 <1> mov ax, dx 3713 00002A07 E8C367 <1> _386_PM call ispm 3714 00002A0A 7403 <1> _386_PM jz .notpm_fppm 3715 00002A0C E8D38F <1> _386_PM call hexword_high 3716 <1> .notpm_fppm: 3717 00002A0F E8DC8F <1> call hexword 3718 00002A12 B020 <1> mov al, 32 3719 00002A14 AA <1> stosb 3720 00002A15 59 <1> pop cx 3721 00002A16 E2BC <1> loop .nextfp 3722 <1> 3723 00002A18 87F3 <1> xchg si, bx 3724 00002A1A 16 <1> push ss 3725 00002A1B 1F <1> pop ds ; ds = es = ss 3726 00002A1C E8FF8F <1> call trimputs 3727 <1> 3728 <1> ; display ST0..7 3729 00002A1F 5D <1> pop bp ; TW 3730 00002A20 58 <1> pop ax ; SW 3731 00002A21 5A <1> pop dx ; CW (discarded here) 3732 <1> 3733 00002A22 B10A <1> mov cl, 10 3734 00002A24 D3E8 <1> shr ax, cl ; move TOP to bits 1..3 3735 00002A26 240E <1> and al, 1110b ; separate TOP 3736 00002A28 88C1 <1> mov cl, al 3737 00002A2A D3CD <1> ror bp, cl ; adjust TW 3738 <1> 3739 00002A2C B130 <1> mov cl, '0' 3740 <1> .nextst: 3741 00002A2E BF[0E08] <1> mov di, line_out 3742 00002A31 51 <1> push cx 3743 00002A32 B85354 <1> mov ax, "ST" 3744 00002A35 AB <1> stosw 3745 00002A36 88C8 <1> mov al, cl 3746 00002A38 B43D <1> mov ah, '=' 3747 00002A3A AB <1> stosw 3748 00002A3B 57 <1> push di 3749 00002A3C A801 <1> test al, 1 3750 00002A3E B020 <1> mov al, 32 3751 00002A40 B91600 <1> mov cx, 22 3752 00002A43 F3AA <1> rep stosb 3753 00002A45 7404 <1> jz .oddst 3754 00002A47 B80D0A <1> mov ax, 10<<8|13 3755 00002A4A AB <1> stosw 3756 <1> .oddst: 3757 00002A4B B000 <1> mov al, 0 3758 00002A4D AA <1> stosb ; make it an ASCIZ string 3759 00002A4E 5F <1> pop di 3760 <1> 3761 00002A4F 89E8 <1> mov ax, bp 3762 00002A51 D1CD <1> ror bp, 1 3763 00002A53 D1CD <1> ror bp, 1 3764 00002A55 2403 <1> and al, 3 ; 00b = valid, 01b = zero, 10b = NaN, 11b = empty 3765 00002A57 741F <1> jz .isvalid 3766 00002A59 56 <1> push si 3767 00002A5A 16 <1> push ss 3768 00002A5B 1F <1> pop ds ; ds = es = ss 3769 00002A5C BE[5483] <1> mov si, msg.empty 3770 00002A5F B105 <1> mov cl, msg.empty_size 3771 00002A61 3C03 <1> cmp al, 3 3772 00002A63 740E <1> je .gotst 3773 00002A65 BE[5983] <1> mov si, msg.nan 3774 00002A68 B103 <1> mov cl, msg.nan_size 3775 00002A6A 3C02 <1> cmp al, 2 3776 00002A6C 7405 <1> je .gotst 3777 00002A6E B030 <1> mov al, '0' 3778 00002A70 AA <1> stosb 3779 00002A71 31C9 <1> xor cx, cx 3780 <1> .gotst: 3781 00002A73 F3A4 <1> rep movsb 3782 00002A75 5E <1> pop si 3783 00002A76 EB34 <1> jmp short .regoutdone 3784 <1> 3785 <1> .isvalid: 3786 00002A78 8E1E[F209] <1> mov ds, word [auxbuff_segorsel] 3787 <1> ; ds:si -> auxbuff entry 3788 00002A7C 36F606[7C00]40 <1> testopt [ss:options], hexrn 3789 00002A82 7508 <1> jnz .hex 3790 00002A84 57 <1> push di ; -> buffer (first parameter; in es = ss) 3791 00002A85 1E <1> push ds 3792 00002A86 56 <1> push si ; -> auxbuff entry (second parameter) 3793 00002A87 E8E402 <1> call FloatToStr 3794 00002A8A EB20 <1> jmp short .regoutdone 3795 <1> 3796 <1> .hex: 3797 00002A8C 8B4408 <1> mov ax, word [si+8] 3798 00002A8F E85C8F <1> call hexword 3799 00002A92 B02E <1> mov al, '.' 3800 00002A94 AA <1> stosb 3801 00002A95 8B4406 <1> mov ax, word [si+6] 3802 00002A98 E8538F <1> call hexword 3803 00002A9B 8B4404 <1> mov ax, word [si+4] 3804 00002A9E E84D8F <1> call hexword 3805 00002AA1 8B4402 <1> mov ax, word [si+2] 3806 00002AA4 E8478F <1> call hexword 3807 00002AA7 8B04 <1> mov ax, word [si+0] 3808 00002AA9 E8428F <1> call hexword 3809 <1> 3810 <1> .regoutdone: 3811 00002AAC BA[0E08] <1> mov dx, line_out 3812 00002AAF 16 <1> push ss 3813 00002AB0 1F <1> pop ds ; ds = es = ss 3814 00002AB1 E8F092 <1> call putsz 3815 00002AB4 59 <1> pop cx 3816 <1> 3817 00002AB5 83C60A <1> add si, byte 10 ; -> next ST 3818 00002AB8 FEC1 <1> inc cl 3819 00002ABA 80F938 <1> cmp cl, '8' 3820 00002ABD 7403E96CFF <1> jne .nextst 3821 00002AC2 8E06[F209] <1> mov es, word [auxbuff_segorsel] 3822 <1> ; es => auxbuff 3823 00002AC6 66 <1> _386_o32 3824 00002AC7 26DD260000 <1> frstor [es:0] 3825 00002ACC C3 <1> retn 3826 <1> %endif 3827 <1> 3828 <1> 3829 <1> ; DMPFLAGS - Dump flags output. 3830 <1> dmpflags: 3831 00002ACD 52 <1> push dx 3832 00002ACE 53 <1> push bx 3833 00002ACF BE[0C80] <1> mov si, flagbits 3834 00002AD2 B90800 <1> mov cx, 8 3835 00002AD5 AD <1> .loop: lodsw 3836 00002AD6 8B16[E00C] <1> mov dx, word [reg_efl - regs + regs_prior] 3837 00002ADA 21C2 <1> and dx, ax 3838 00002ADC 8B1E[A00C] <1> mov bx, word [reg_efl] 3839 00002AE0 21C3 <1> and bx, ax 3840 00002AE2 39DA <1> cmp dx, bx 3841 00002AE4 7411 <1> je @F 3842 00002AE6 F606[8600]05 <1> testopt [options3], opt3_r_highlight_diff | opt3_r_highlight_full 3843 00002AEB 740A <1> jz @F 3844 00002AED F606[A600]02 <1> testopt [internalflags3], dif3_do_not_highlight 3845 00002AF2 7503 <1> jnz @F 3846 00002AF4 E80CFE <1> call highlight 3847 <1> @@: 3848 00002AF7 85DB <1> test bx, bx 3849 00002AF9 8B441E <1> mov ax, word [si+(flagsoff-flagbits)-2] 3850 00002AFC 7403 <1> jz .off ; if not set 3851 00002AFE 8B440E <1> mov ax, word [si+(flagson-flagbits)-2] 3852 00002B01 AB <1> .off: stosw 3853 00002B02 E815FE <1> call unhighlight 3854 00002B05 B020 <1> mov al, 32 3855 00002B07 AA <1> stosb 3856 00002B08 E2CB <1> loop .loop 3857 00002B0A 4F <1> dec di ; -> last (unnecessary) blank 3858 00002B0B 5B <1> pop bx 3859 00002B0C 5A <1> pop dx 3860 00002B0D C3 <1> retn 3861 <1> 3862 <1> 3863 <1> %if _OPTIONS || _VARIABLES 3864 <1> dumpvars: 3865 <1> %if _VARIABLES 3866 00002B0E BE[E40C] <1> mov si, vregs 3867 <1> %endif 3868 00002B11 31DB <1> xor bx, bx 3869 <1> .loop: 3870 00002B13 BF[0E08] <1> mov di, line_out 3871 00002B16 31D2 <1> xor dx, dx 3872 <1> %if _VARIABLES 3873 00002B18 B90400 <1> mov cx, 4 3874 00002B1B E8B000 <1> call .dump ; display four variables 3875 00002B1E 43 <1> inc bx ; (would be one off here) 3876 00002B1F 56 <1> push si 3877 <1> %else 3878 <1> add bx, byte 4 ; (no motivation to optimize that) 3879 <1> %endif 3880 <1> %if _OPTIONS 3881 <1> %if _VARIABLES 3882 00002B20 B82020 <1> mov ax, 32<<8|32 3883 00002B23 AB <1> stosw ; more blanks inbetween 3884 <1> %endif 3885 00002B24 80FB10 <1> cmp bl, 16 3886 00002B27 7439 <1> je .3 3887 00002B29 80FB08 <1> cmp bl, 8 3888 00002B2C 7721 <1> ja .2 3889 00002B2E 7411 <1> je .1 3890 <1> 3891 <1> ; First line, display DCO and DCS 3892 <1> .0: 3893 00002B30 B8434F <1> mov ax, "CO" 3894 00002B33 BE[7C00] <1> mov si, options 3895 00002B36 E88600 <1> call .dump_option 3896 00002B39 B84353 <1> mov ax, "CS" 3897 00002B3C BE[8C00] <1> mov si, startoptions 3898 00002B3F EB44 <1> jmp short .next 3899 <1> 3900 <1> ; Second line, DAO and DAS 3901 <1> .1: 3902 00002B41 B8414F <1> mov ax, "AO" 3903 00002B44 BE[AC00] <1> mov si, asm_options 3904 00002B47 E87500 <1> call .dump_option 3905 00002B4A B84153 <1> mov ax, "AS" 3906 <1> ; asm_startoptions follows directly behind asm_options 3907 00002B4D EB36 <1> jmp short .next 3908 <1> 3909 <1> ; Third line, DIF and DPI 3910 <1> .2: 3911 00002B4F B84946 <1> mov ax, "IF" 3912 00002B52 BE[9C00] <1> mov si, internalflags 3913 00002B55 E86700 <1> call .dump_option 3914 00002B58 B85049 <1> mov ax, "PI" 3915 00002B5B BE[C80A] <1> mov si, psp22 3916 00002B5E 42 <1> inc dx 3917 00002B5F 42 <1> inc dx 3918 00002B60 EB23 <1> jmp short .next 3919 <1> 3920 <1> ; Fourth line, DPR, DPS (if _PM) and DPP 3921 <1> .3: 3922 00002B62 42 <1> inc dx 3923 00002B63 B85052 <1> mov ax, "PR" 3924 00002B66 BE[A60A] <1> mov si, pspdbg 3925 00002B69 E85300 <1> call .dump_option 3926 <1> %if _PM 3927 00002B6C 31C0 <1> xor ax, ax 3928 00002B6E E85C66 <1> call ispm 3929 00002B71 7502 <1> jnz .3_rm 3930 00002B73 1E <1> push ds 3931 00002B74 A8 <1> db __TEST_IMM8 ; (skip push) 3932 <1> .3_rm: 3933 00002B75 50 <1> push ax 3934 00002B76 B85053 <1> mov ax, "PS" 3935 00002B79 89E6 <1> mov si, sp 3936 00002B7B E84100 <1> call .dump_options 3937 00002B7E 58 <1> pop ax 3938 <1> %else 3939 <1> mov ax, 32<<8|32 3940 <1> stosw 3941 <1> stosw 3942 <1> %endif 3943 00002B7F B85050 <1> mov ax, "PP" 3944 00002B82 BE[CC0A] <1> mov si, parent 3945 <1> 3946 <1> .next: 3947 00002B85 E83700 <1> call .dump_options 3948 <1> %endif 3949 00002B88 53 <1> push bx 3950 00002B89 E89A8E <1> call putsline_crlf ; display line 3951 00002B8C 5B <1> pop bx ; (retain counter) 3952 <1> %if _VARIABLES 3953 00002B8D 5E <1> pop si ; (retain pointer to next variable) 3954 <1> %endif 3955 00002B8E 80FB10 <1> cmp bl, 16 ; was end ? 3956 00002B91 7580 <1> jne .loop ; no, loop --> 3957 <1> 3958 <1> ; done 3959 <1> .mode: 3960 00002B93 BA[825D] <1> mov dx, msg.rv_mode.before 3961 00002B96 E80B92 <1> call putsz 3962 <1> %if _PM 3963 00002B99 E83166 <1> call ispm 3964 00002B9C 7511 <1> jnz .mode_86m 3965 00002B9E BA[915D] <1> mov dx, msg.rv_mode_dpmi_16 3966 00002BA1 8B1E[900C] <1> mov bx, word [reg_cs] 3967 00002BA5 E88E31 <1> call test_d_b_bit 3968 00002BA8 7412 <1> jz @F 3969 00002BAA BA[A25D] <1> mov dx, msg.rv_mode_dpmi_32 3970 00002BAD EB0D <1> jmp @F 3971 <1> 3972 <1> .mode_86m: 3973 <1> %endif 3974 00002BAF BA[B35D] <1> mov dx, msg.rv_mode_r86m 3975 <1> ; (only 386+ has the V86M so even though smsw ax is a 3976 <1> ; 286 level instruction, so could be used without a 386, 3977 <1> ; we only really need it on a 386+.) 3978 00002BB2 0F01E0 <1> _386 smsw ax 3979 00002BB5 A801 <1> _386 test al, 1 3980 00002BB7 7403 <1> _386 jz @F 3981 00002BB9 BA[C25D] <1> _386 mov dx, msg.rv_mode_v86m 3982 <1> @@: 3983 00002BBC E9E591 <1> jmp putsz 3984 <1> 3985 <1> 3986 <1> ; INP: ax = 2-byte option name ('N' will precede this) 3987 <1> ; d[si] = value 3988 <1> ; OUT: si-> behind value 3989 <1> ; cx = 0 3990 <1> ; CHG: ax 3991 <1> .dump_options: 3992 <1> %if _VARIABLES 3993 <1> .dump_option: 3994 00002BBF C7052044 <1> mov word [di], " D" 3995 00002BC3 AF <1> scasw 3996 <1> %else 3997 <1> mov byte [di], ' ' 3998 <1> inc di 3999 <1> .dump_option: 4000 <1> mov byte [di], 'D' 4001 <1> inc di 4002 <1> %endif 4003 00002BC4 AB <1> stosw 4004 <1> %if _VARIABLES ; falls through otherwise, always count 1 4005 00002BC5 B90100 <1> mov cx, 1 4006 00002BC8 EB0C <1> jmp short .dump_one 4007 <1> %endif 4008 <1> 4009 <1> %if 0 4010 <1> PM && OPTIONS && VARIABLES 4011 <1> V0=00000000 V1=00000000 V2=00000000 V3=00000000 DCO=00000000 DCS=00000000 4012 <1> V4=00000000 V5=00000000 V6=00000000 V7=00000000 DAO=00000000 DAS=00000000 4013 <1> V8=00000000 V9=00000000 VA=00000000 VB=00000000 DIF=0000840D DPI=0616:01DE 4014 <1> VC=00000000 VD=00000000 VE=00000000 VF=00000000 DPR=0984 DPS=0000 DPP=0616 4015 <1> 4016 <1> !PM && OPTIONS && VARIABLES 4017 <1> V0=00000000 V1=00000000 V2=00000000 V3=00000000 DCO=00000000 DCS=00000000 4018 <1> V4=00000000 V5=00000000 V6=00000000 V7=00000000 DAO=00000000 DAS=00000000 4019 <1> V8=00000000 V9=00000000 VA=00000000 VB=00000000 DIF=0000840D DPI=0616:01DE 4020 <1> VC=00000000 VD=00000000 VE=00000000 VF=00000000 DPR=0984 DPP=0616 4021 <1> 4022 <1> !OPTIONS && VARIABLES 4023 <1> V0=00000000 V1=00000000 V2=00000000 V3=00000000 4024 <1> V4=00000000 V5=00000000 V6=00000000 V7=00000000 4025 <1> V8=00000000 V9=00000000 VA=00000000 VB=00000000 4026 <1> VC=00000000 VD=00000000 VE=00000000 VF=00000000 4027 <1> 4028 <1> !PM && OPTIONS && !VARIABLES 4029 <1> DCO=00000000 DCS=00000000 4030 <1> DAO=00000000 DAS=00000000 4031 <1> DIF=0000840D DPI=0616:01DE 4032 <1> DPR=0984 DPP=0616 4033 <1> 4034 <1> PM && OPTIONS && !VARIABLES 4035 <1> DCO=00000000 DCS=00000000 4036 <1> DAO=00000000 DAS=00000000 4037 <1> DIF=0000840D DPI=0616:01DE 4038 <1> DPR=0984 DPS=0000 DPP=0616 4039 <1> 4040 <1> !OPTIONS && !VARIABLES 4041 <1> %endif 4042 <1> %if 0 4043 <1> DCO Debugger Common Options 4044 <1> DCS Debugger Common Startup options 4045 <1> DIF Debugger Internal Flags 4046 <1> DPR Debugger Process (Real-mode segment) 4047 <1> DPS Debugger Process Selector, or zero 4048 <1> DPP Debugger Parent Process 4049 <1> DPI Debugger Parent Interrupt 22h 4050 <1> DAO Debugger Assembler/disassembler Options 4051 <1> DAS Debugger Assembler/disassembler Startup options 4052 <1> %endif 4053 <1> 4054 <1> %if _VARIABLES 4055 <1> .dump_loop: 4056 00002BCA 43 <1> inc bx 4057 00002BCB B020 <1> mov al, 32 4058 00002BCD AA <1> stosb 4059 <1> .dump: 4060 00002BCE B056 <1> mov al, 'V' 4061 00002BD0 AA <1> stosb 4062 00002BD1 88D8 <1> mov al, bl 4063 00002BD3 E82A8E <1> call hexnyb 4064 <1> %endif 4065 <1> .dump_one: 4066 00002BD6 B03D <1> mov al, '=' 4067 00002BD8 AA <1> stosb 4068 00002BD9 AD <1> lodsw 4069 00002BDA 80FA01 <1> cmp dl, 1 4070 00002BDD 740D <1> je .dumpw 4071 00002BDF 50 <1> push ax 4072 00002BE0 AD <1> lodsw 4073 00002BE1 9C <1> pushf 4074 00002BE2 E8098E <1> call hexword 4075 00002BE5 9D <1> popf ; CF 4076 00002BE6 7203 <1> jb .nocolon 4077 00002BE8 B03A <1> mov al, ':' 4078 00002BEA AA <1> stosb 4079 <1> .nocolon: 4080 00002BEB 58 <1> pop ax 4081 <1> .dumpw: 4082 00002BEC E8FF8D <1> call hexword 4083 <1> %if _VARIABLES 4084 00002BEF E2D9 <1> loop .dump_loop 4085 <1> %endif 4086 00002BF1 C3 <1> retn 4087 <1> %endif 4088 <1> 4089 <1> 4090 <1> dumpallvars: 4091 00002BF2 AC <1> lodsb 4092 00002BF3 E80D8D <1> call chkeol 4093 00002BF6 BE[E40C] <1> mov si, vregs 4094 00002BF9 31DB <1> xor bx, bx 4095 <1> .loop: 4096 00002BFB BF[0E08] <1> mov di, line_out 4097 00002BFE B90400 <1> mov cx, 4 4098 00002C01 31D2 <1> xor dx, dx 4099 00002C03 E81500 <1> call .dump ; display four variables 4100 00002C06 43 <1> inc bx ; (would be one off here) 4101 00002C07 85D2 <1> test dx, dx 4102 00002C09 7407 <1> jz @F 4103 00002C0B 56 <1> push si 4104 00002C0C 53 <1> push bx 4105 00002C0D E8168E <1> call putsline_crlf ; display line 4106 00002C10 5B <1> pop bx ; (retain counter) 4107 00002C11 5E <1> pop si ; (retain pointer to next variable) 4108 <1> @@: 4109 00002C12 84DB <1> test bl, bl ; was end ? 4110 00002C14 75E5 <1> jnz .loop ; no, loop --> 4111 00002C16 C3 <1> retn 4112 <1> 4113 <1> .dump_loop: 4114 00002C17 43 <1> inc bx 4115 00002C18 B020 <1> mov al, 32 4116 00002C1A AA <1> stosb 4117 <1> .dump: 4118 00002C1B B056 <1> mov al, 'V' 4119 00002C1D AA <1> stosb 4120 00002C1E 88D8 <1> mov al, bl 4121 00002C20 E8D28D <1> call hexbyte 4122 <1> .dump_one: 4123 00002C23 B03D <1> mov al, '=' 4124 00002C25 AA <1> stosb 4125 00002C26 AD <1> lodsw 4126 00002C27 09C2 <1> or dx, ax 4127 00002C29 50 <1> push ax 4128 00002C2A AD <1> lodsw 4129 00002C2B 09C2 <1> or dx, ax 4130 00002C2D E8BE8D <1> call hexword 4131 00002C30 58 <1> pop ax 4132 00002C31 E8BA8D <1> call hexword 4133 00002C34 E2E1 <1> loop .dump_loop 4134 00002C36 C3 <1> retn 4135 <1> 4136 <1> 4137 <1> dumpmemory: 4138 00002C37 AC <1> lodsb 4139 00002C38 E8C88C <1> call chkeol 4140 <1> 4141 00002C3B A1[CE00] <1> mov ax, word [code_seg] 4142 <1> %if _PM 4143 00002C3E 8B16[D000] <1> mov dx, word [code_sel] 4144 <1> %endif 4145 00002C42 BE[C064] <1> mov si, msg.vm_codeseg 4146 00002C45 E82F00 <1> call .line 4147 <1> 4148 <1> %if _PM 4149 00002C48 A1[A60A] <1> mov ax, word [pspdbg] 4150 00002C4B 8CD2 <1> mov dx, ss 4151 <1> %else 4152 <1> mov ax, ss 4153 <1> %endif 4154 00002C4D BE[CE64] <1> mov si, msg.vm_dataseg 4155 00002C50 E82400 <1> call .line 4156 <1> 4157 <1> %if _PM 4158 00002C53 A1[A60A] <1> mov ax, word [pspdbg] 4159 00002C56 8B16[D688] <1> mov dx, word [cssel] 4160 <1> %else 4161 <1> mov ax, ss 4162 <1> %endif 4163 00002C5A BE[DC64] <1> mov si, msg.vm_entryseg 4164 00002C5D E81700 <1> call .line 4165 <1> 4166 <1> %if _PM 4167 00002C60 A1[F409] <1> mov ax, word [auxbuff_segorsel + soaSegment] 4168 00002C63 8B16[F609] <1> mov dx, word [auxbuff_segorsel + soaSelector] 4169 <1> %else 4170 <1> mov ax, word [auxbuff_segorsel] 4171 <1> %endif 4172 00002C67 BE[EB64] <1> mov si, msg.vm_auxseg 4173 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 4174 00002C6A E80A00 <1> call .line 4175 <1> 4176 <1> %if _PM 4177 00002C6D A1[F80A] <1> mov ax, word [history.segorsel + soaSegment] 4178 00002C70 8B16[FA0A] <1> mov dx, word [history.segorsel + soaSelector] 4179 <1> %else 4180 <1> mov ax, word [history.segorsel] 4181 <1> %endif 4182 00002C74 BE[FC64] <1> mov si, msg.vm_hisseg 4183 <1> %endif 4184 <1> 4185 <1> .line: 4186 00002C77 BF[0E08] <1> mov di, line_out 4187 00002C7A E88707 <1> call copy_single_counted_string 4188 00002C7D E86E8D <1> call hexword 4189 <1> %if _PM 4190 00002C80 E84A65 <1> call ispm 4191 00002C83 750A <1> jnz @F 4192 00002C85 BE[0D65] <1> mov si, msg.vm_selector 4193 00002C88 E87907 <1> call copy_single_counted_string 4194 00002C8B 92 <1> xchg ax, dx 4195 00002C8C E85F8D <1> call hexword 4196 <1> @@: 4197 <1> %endif 4198 00002C8F E9948D <1> jmp putsline_crlf 4199 <1> 4200 <1> 4201 <1> %if _MMXSUPP 4202 <1> subcpu 586 4203 <1> dumpregsMMX: 4204 00002C92 E84AD8 <1> call guard_auxbuff 4205 00002C95 8E1E[F209] <1> mov ds, word [auxbuff_segorsel] ; => auxbuff 4206 00002C99 66 <1> o32 4207 00002C9A DD360000 <1> fnsave [0] 4208 00002C9E BE1C00 <1> mov si, 7*4 4209 00002CA1 B130 <1> mov cl, '0' 4210 00002CA3 BF[0E08] <1> mov di, line_out 4211 <1> .nextreg: 4212 00002CA6 8E1E[F209] <1> mov ds, word [auxbuff_segorsel] ; => auxbuff 4213 00002CAA B84D4D <1> mov ax, "MM" 4214 00002CAD AB <1> stosw 4215 00002CAE 88C8 <1> mov al, cl 4216 00002CB0 B43D <1> mov ah, '=' 4217 00002CB2 AB <1> stosw 4218 00002CB3 51 <1> push cx 4219 00002CB4 B208 <1> mov dl, 8 4220 <1> .nextbyte: 4221 00002CB6 AC <1> lodsb 4222 00002CB7 E83B8D <1> call hexbyte 4223 00002CBA B020 <1> mov al, 32 4224 00002CBC F6C201 <1> test dl, 1 4225 00002CBF 7402 <1> jz .oddbyte 4226 00002CC1 B02D <1> mov al, '-' 4227 <1> .oddbyte: 4228 00002CC3 AA <1> stosb 4229 00002CC4 FECA <1> dec dl 4230 00002CC6 75EE <1> jnz .nextbyte 4231 00002CC8 4F <1> dec di 4232 00002CC9 B82020 <1> mov ax, 32<<8|32 4233 00002CCC AB <1> stosw 4234 00002CCD 83C602 <1> add si, byte 2 4235 00002CD0 59 <1> pop cx 4236 00002CD1 F6C101 <1> test cl, 1 4237 00002CD4 740A <1> jz .oddreg 4238 00002CD6 51 <1> push cx 4239 00002CD7 16 <1> push ss 4240 00002CD8 1F <1> pop ds ; ds = es = ss 4241 00002CD9 E8428D <1> call trimputs 4242 00002CDC 59 <1> pop cx 4243 00002CDD BF[0E08] <1> mov di, line_out 4244 <1> .oddreg: 4245 00002CE0 FEC1 <1> inc cl 4246 00002CE2 80F938 <1> cmp cl, '8' 4247 00002CE5 75BF <1> jne .nextreg 4248 00002CE7 8E1E[F209] <1> mov ds, word [auxbuff_segorsel] ; => auxbuff 4249 00002CEB 66 <1> o32 4250 00002CEC D9260000 <1> fldenv [0] 4251 00002CF0 C3 <1> retn 4252 <1> subcpureset 4253 <1> %endif 2063 %if _RN 2064 %include "fptostr.asm" 2065 <1> 2066 <1> %if 0 2067 <1> 2068 <1> Copyright (C) 2008-2012 C. Masloch 2069 <1> 2070 <1> Usage of the works is permitted provided that this 2071 <1> instrument is retained with the works, so that any entity 2072 <1> that uses the works is notified of this instrument. 2073 <1> 2074 <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 2075 <1> 2076 <1> %endif 2077 <1> 2078 <1> 2079 <1> usesection lDEBUG_DATA_ENTRY 2080 <1> 2081 <1> ;--- defines procedures 2082 <1> ;--- PowerOf10 2083 <1> ;--- FloatToBCD 2084 <1> ;--- FloatToStr 2085 <1> 2086 <1> ; These are bits in the FP status word. 2087 <1> 2088 <1> FP_LESSTHAN equ 01h 2089 <1> FP_EQUALTO equ 40h 2090 <1> 2091 0000835C 00 <1> align 8, db 0 2092 00008360 0000000000002440 <1> ten: dq 10.0 2093 00008368 0080E03779C34143 <1> ten16: dq 1.0e16 2094 <1> ;rounder:dq 5.0e10 2095 <1> 2096 00008370 00000000000000A002- <1> ten_1: dt 1.0e1 ; 10.0 2096 00008379 40 <1> 2097 0000837A 00000000000000C805- <1> dt 1.0e2 ; 100.0 2097 00008383 40 <1> 2098 00008384 00000000000000FA08- <1> dt 1.0e3 ; 1,000.0 2098 0000838D 40 <1> 2099 0000838E 000000000000409C0C- <1> dt 1.0e4 ; 10,000.0 2099 00008397 40 <1> 2100 00008398 00000000000050C30F- <1> dt 1.0e5 ; 100,000.0 2100 000083A1 40 <1> 2101 000083A2 00000000000024F412- <1> dt 1.0e6 ; 1,000,000.0 2101 000083AB 40 <1> 2102 000083AC 000000000080969816- <1> dt 1.0e7 ; 10,000,000.0 2102 000083B5 40 <1> 2103 000083B6 000000000020BCBE19- <1> dt 1.0e8 ; 100,000,000.0 2103 000083BF 40 <1> 2104 000083C0 0000000000286BEE1C- <1> dt 1.0e9 ; 1,000,000,000.0 2104 000083C9 40 <1> 2105 000083CA 0000000000F9029520- <1> dt 1.0e10 ; 10,000,000,000.0 2105 000083D3 40 <1> 2106 000083D4 0000000040B743BA23- <1> dt 1.0e11 ; 100,000,000,000.0 2106 000083DD 40 <1> 2107 000083DE 0000000010A5D4E826- <1> dt 1.0e12 ; 1,000,000,000,000.0 2107 000083E7 40 <1> 2108 000083E8 000000002AE784912A- <1> dt 1.0e13 ; 10,000,000,000,000.0 2108 000083F1 40 <1> 2109 000083F2 00000080F420E6B52D- <1> dt 1.0e14 ; 100,000,000,000,000.0 2109 000083FB 40 <1> 2110 000083FC 000000A031A95FE330- <1> dt 1.0e15 ; 1,000,000,000,000,000.0 2110 00008405 40 <1> 2111 <1> 2112 00008406 00000004BFC91B8E34- <1> ten_16: dt 1.0e16 2112 0000840F 40 <1> 2113 00008410 9EB5702BA8ADC59D69- <1> dt 1.0e32 2113 00008419 40 <1> 2114 0000841A D795430E058D29AF9E- <1> dt 1.0e48 2114 00008423 40 <1> 2115 00008424 D5A6CFFF491F78C2D3- <1> dt 1.0e64 2115 0000842D 40 <1> 2116 0000842E FCF7DA878F7AE7D708- <1> dt 1.0e80 2116 00008437 41 <1> 2117 00008438 A3149BC516ABB3EF3D- <1> dt 1.0e96 2117 00008441 41 <1> 2118 00008442 9E322399C0AD0F8573- <1> dt 1.0e112 2118 0000844B 41 <1> 2119 0000844C E08CE980C947BA93A8- <1> dt 1.0e128 2119 00008455 41 <1> 2120 00008456 E7A6D3A8C5B902A4DD- <1> dt 1.0e144 2120 0000845F 41 <1> 2121 00008460 AA17E67F2BA116B612- <1> dt 1.0e160 2121 00008469 42 <1> 2122 0000846A 93BF9B8591A228CA47- <1> dt 1.0e176 2122 00008473 42 <1> 2123 00008474 6B5527398DF770E07C- <1> dt 1.0e192 2123 0000847D 42 <1> 2124 0000847E 46618237350C2EF9B1- <1> dt 1.0e208 2124 00008487 42 <1> 2125 00008488 30C93CE3FF96528AE7- <1> dt 1.0e224 2125 00008491 42 <1> 2126 00008492 6617BFD6F3A691991C- <1> dt 1.0e240 2126 0000849B 43 <1> 2127 <1> 2128 0000849C 8EDEF99DFBEB7EAA51- <1> ten_256:dt 1.0e256 2128 000084A5 43 <1> 2129 <1> 2130 <1> ; The remaining exponents are only necessary for 10-byte doubles. 2131 <1> 2132 000084A6 C7910EA6AEA019E3A3- <1> dt 1.0e512 2132 000084AF 46 <1> 2133 000084B0 8CA600CDA89C3F97F6- <1> dt 1.0e768 2133 000084B9 49 <1> 2134 000084BA 170C7581867576C948- <1> dt 1.0e1024 2134 000084C3 4D <1> 2135 000084C4 CB6E85EB0E8C2C869B- <1> dt 1.0e1280 2135 000084CD 50 <1> 2136 000084CE E4A793393B35B8B2ED- <1> dt 1.0e1536 2136 000084D7 53 <1> 2137 000084D8 8CB84A9284DD0DEE3F- <1> dt 1.0e1792 2137 000084E1 57 <1> 2138 000084E2 E55D3DC55D3B8B9E92- <1> dt 1.0e2048 2138 000084EB 5A <1> 2139 000084EC 6F80F44132202ED3E4- <1> dt 1.0e2304 2139 000084F5 5D <1> 2140 000084F6 A6F0A120C054A58C37- <1> dt 1.0e2560 2140 000084FF 61 <1> 2141 00008500 CC77D99B9A0A57BB89- <1> dt 1.0e2816 2141 00008509 64 <1> 2142 0000850A 8B5A8BD8255D89F9DB- <1> dt 1.0e3072 2142 00008513 67 <1> 2143 00008514 45FE99567DEF30A62E- <1> dt 1.0e3328 2143 0000851D 6B <1> 2144 0000851E F8F327BFA2C85DDD80- <1> dt 1.0e3584 2144 00008527 6E <1> 2145 00008528 9B97208A025260C425- <1> dt 1.0e4096 2145 00008531 75 <1> 2146 00008532 B41CE17BE352C98278- <1> dt 1.0e4352 2146 0000853B 78 <1> 2147 0000853C F059D56E621135AECA- <1> dt 1.0e4608 2147 00008545 7B <1> 2148 00008546 6D6D14B97F380BE81C- <1> dt 1.0e4864 2148 0000854F 7F <1> 2149 <1> 2150 <1> 2151 <1> usesection lDEBUG_CODE 2152 <1> 2153 <1> ; Divide or multiply st0 to normalize it 2154 <1> ; 2155 <1> ; INP: ax = exponent word 2156 <1> ; CHG: bx, dx, cl 2157 <1> PowerOf10: 2158 00002CF1 56 <1> push si 2159 00002CF2 50 <1> push ax 2160 00002CF3 85C0 <1> test ax, ax 2161 00002CF5 7902 <1> jns .notnegative 2162 00002CF7 F7D8 <1> neg ax 2163 <1> .notnegative: 2164 00002CF9 D9E8 <1> fld1 2165 00002CFB 88C3 <1> mov bl, al 2166 00002CFD 80E30F <1> and bl, 0Fh ; bits 0..3 2167 00002D00 7406 <1> je .0..3zero 2168 00002D02 BE[7083] <1> mov si, ten_1 2169 00002D05 E82B00 <1> call mul10 2170 <1> .0..3zero: 2171 00002D08 88C3 <1> mov bl, al 2172 00002D0A B104 <1> mov cl, 4 2173 00002D0C D2EB <1> shr bl, cl 2174 00002D0E 80E30F <1> and bl, 0Fh ; bits 4..7 2175 00002D11 7406 <1> je .4..7zero 2176 00002D13 BE[0684] <1> mov si, ten_16 2177 00002D16 E81A00 <1> call mul10 2178 <1> .4..7zero: 2179 00002D19 88E3 <1> mov bl, ah 2180 00002D1B 80E31F <1> and bl, 1Fh ; bits 8..12 2181 00002D1E 7406 <1> jz .8..12zero 2182 00002D20 BE[9C84] <1> mov si, ten_256 2183 00002D23 E80D00 <1> call mul10 2184 <1> .8..12zero: 2185 00002D26 58 <1> pop ax 2186 00002D27 85C0 <1> test ax, ax 2187 00002D29 7904 <1> jns .notnegative2 2188 00002D2B DEF9 <1> fdivp st1 2189 00002D2D 5E <1> pop si 2190 00002D2E C3 <1> retn 2191 <1> 2192 <1> .notnegative2: 2193 00002D2F DEC9 <1> fmulp st1 2194 00002D31 5E <1> pop si 2195 00002D32 C3 <1> retn 2196 <1> 2197 <1> mul10: 2198 00002D33 FECB <1> dec bl 2199 00002D35 B700 <1> mov bh, 0 2200 00002D37 50 <1> push ax 2201 00002D38 89D8 <1> mov ax, bx 2202 00002D3A 01C0 <1> add ax, ax 2203 00002D3C 01C0 <1> add ax, ax ; *4 2204 00002D3E 01C3 <1> add bx, ax ; *5 2205 00002D40 01DB <1> add bx, bx ; *10 2206 00002D42 58 <1> pop ax 2207 00002D43 DB28 <1> fld tword [bx + si] 2208 00002D45 DEC9 <1> fmulp st1 2209 00002D47 C3 <1> retn 2210 <1> 2211 <1> 2212 <1> ; Convert a floating point register to ASCII. For internal use. 2213 <1> ; The result always has exactly 18 digits, with zero padding 2214 <1> ; on the left if required. 2215 <1> ; 2216 <1> ; INP: st0 = number to convert, 0 <= st0 < 1.0E19 2217 <1> ; di-> 18-character output buffer 2218 <1> ; CHG: si, di, cx, ax 2219 <1> FloatToBCD: 2220 00002D48 55 <1> push bp 2221 00002D49 89E5 <1> mov bp, sp 2222 00002D4B 83EC0C <1> sub sp, 12 2223 <1> 2224 <1> ; The fbstp instruction converts the top of the stack to 2225 <1> ; a packed BCD form in ten bytes, with two digits per 2226 <1> ; byte. The top byte has the sign, which we ignore. 2227 00002D4E DF76F4 <1> fbstp [ bp-12 ] 2228 <1> 2229 <1> ; Now we need to unpack the BCD to ASCII. 2230 00002D51 8D76FC <1> lea si, [ bp-4 ] 2231 00002D54 B90900 <1> mov cx, 9 2232 <1> .nextdigits: 2233 00002D57 8A04 <1> mov al, byte [ si ] ; xxxx xxxx AAAA BBBB 2234 00002D59 4E <1> dec si 2235 <1> %if 1 2236 00002D5A B400 <1> mov ah, 0 ; 0000 0000 AAAA BBBB 2237 00002D5C 51 <1> push cx 2238 00002D5D B104 <1> mov cl, 4 2239 00002D5F D3C8 <1> ror ax, cl ; BBBB xxxx xxxx AAAA 2240 00002D61 D2C4 <1> rol ah, cl ; xxxx BBBB xxxx AAAA 2241 00002D63 59 <1> pop cx 2242 <1> ;and ax, 0F0Fh ; 0000 BBBB 0000 AAAA 2243 <1> %else 2244 <1> aam 16 ; 0000 AAAA 0000 BBBB 2245 <1> xchg al, ah ; 0000 BBBB 0000 AAAA 2246 <1> %endif 2247 00002D64 053030 <1> add ax, "00" 2248 00002D67 AB <1> stosw 2249 00002D68 E2ED <1> loop .nextdigits 2250 00002D6A 89EC <1> mov sp, bp 2251 00002D6C 5D <1> pop bp 2252 00002D6D C3 <1> retn 2253 <1> 2254 <1> 2255 <1> ; Convert a double precision number to a string. 2256 <1> ; 2257 <1> ; Entry: dword [far pfpin] -> 8-byte double to convert, non-zero 2258 <1> ; es = ss : word [pszDbl] -> character buffer 2259 <1> ; 2260 <1> ; Exit: es = ss : word [pszDbl] -> converted value 2261 <1> ; 2262 <1> ; CHG: ax, bx, cx, dx 2263 <1> ; 2264 <1> ; The buffer at pszDbl should be at least 19 bytes long. 2265 <1> ; The buffer needs to be initialized with blanks. 2266 <1> 2267 <1> ;FloatToStr PROC stdcall public USES si di pfpin: ptr TBYTE, pszDbl: PTR BYTE 2268 <1> FloatToStr: 2269 <1> lframe near 2270 <1> lpar word, ??pszDbl ; pszDbl: PTR BYTE, near 2271 <1> lpar dword, ??pfpin ; pfpin: ptr TBYTE, but far 2272 <1> lvar word, ??iExp ; LOCAL iExp: WORD 2273 <1> lvar word, ??mystat ; LOCAL mystat: WORD 2274 <1> lvar 10, ??fpin ; LOCAL fpin: TBYTE 2275 <1> lvar 22, ??szTemp ; LOCAL szTemp[22]: BYTE 2276 00002D6E 5589E58D66DC <1> lenter 2277 <1> 2278 <1> %define iExp bp+???%+%? 2279 <1> %define mystat bp+???%+%? 2280 <1> %define fpin bp+???%+%? 2281 <1> %define szTemp bp+???%+%? 2282 <1> %define pfpin bp+???%+%? 2283 <1> %define pszDbl bp+???%+%? 2284 <1> 2285 00002D74 1E <1> push ds 2286 00002D75 56 <1> push si ; USES si 2287 00002D76 06 <1> push es 2288 00002D77 57 <1> push di ; USES di 2289 <1> 2290 <1> ; Special case zero has been filtered already. (fxtract fails for zero.) 2291 00002D78 C57604 <1> lds si, [pfpin] 2292 00002D7B 16 <1> push ss 2293 00002D7C 07 <1> pop es 2294 00002D7D 8D7EF2 <1> lea di, [fpin] 2295 00002D80 B90500 <1> mov cx, 5 2296 00002D83 F3A5 <1> rep movsw ; store number in local buffer 2297 00002D85 16 <1> push ss 2298 00002D86 1F <1> pop ds 2299 <1> 2300 00002D87 8B7E08 <1> mov di, [pszDbl] ; -> output buffer 2301 <1> 2302 <1> ; Check for a negative number. 2303 00002D8A F646FB80 <1> test byte [fpin+9], 80h 2304 00002D8E 7407 <1> jz .ispositive 2305 00002D90 8066FB7F <1> and byte [fpin+9], ~80h ; change to positive 2306 00002D94 B02D <1> mov al, '-' ; store a minus sign 2307 00002D96 AA <1> stosb 2308 <1> .ispositive: 2309 <1> 2310 <1> ; Load our value onto the stack two times. 2311 00002D97 DB6EF2 <1> fld tword [fpin] 2312 00002D9A D9C0 <1> fld st0 2313 <1> 2314 <1> ; Compute the closest power of 10 below the number. We can't get an 2315 <1> ; exact value because of rounding. We could get close by adding in 2316 <1> ; log10(mantissa), but it still wouldn't be exact. Since we'll have to 2317 <1> ; check the result anyway, it's silly to waste cycles worrying about 2318 <1> ; the mantissa. 2319 <1> ; 2320 <1> ; The exponent is basically log2(fpin). Those of you who remember 2321 <1> ; algebra realize that log2(fpin) x log10(2) = log10(fpin), which is 2322 <1> ; what we want. 2323 <1> 2324 00002D9C D9F4 <1> fxtract ; ST = mantissa, exponent, fpin 2325 00002D9E DDD8 <1> fstp st0 ; discard the mantissa 2326 00002DA0 D9EC <1> fldlg2 ; push log10(2) 2327 00002DA2 DEC9 <1> fmulp st1, st0 ; ST = log10(fpin), fpin 2328 00002DA4 DF5EFE <1> fistp word [iExp] ; ST = fpin 2329 <1> 2330 <1> ; An 8-byte double can carry almost 16 digits of precision. Actually, it's 2331 <1> ; 15.9 digits, so some numbers close to 1E17 will be wrong in the bottom 2332 <1> ; digit. If this is a concern, change the 18 or 16 to a 15. 2333 <1> ; 2334 <1> ; A 10-byte double can carry almost 19 digits, but fbstp only stores the 2335 <1> ; guaranteed 18. Since we're doing 10-byte doubles, we check for 18 instead of 16. 2336 <1> 2337 00002DA7 837EFE12 <1> cmp word [iExp], 18 2338 00002DAB 7332 <1> jae .notbelow18 2339 00002DAD D9C0 <1> fld st0 ; ST = fpin, fpin 2340 00002DAF D9FC <1> frndint ; ST = int(fpin), fpin 2341 00002DB1 D8D9 <1> fcomp st1 ; ST = fpin, status set 2342 00002DB3 9BDD7EFC <1> fstsw word [mystat] 2343 00002DB7 8B46FC <1> mov ax, word [mystat] 2344 00002DBA 9E <1> sahf 2345 00002DBB 7522 <1> jne .notequal 2346 <1> 2347 <1> ; We have an integer! Lucky day. Go convert it into a temp buffer. 2348 <1> 2349 00002DBD 57 <1> push di 2350 00002DBE 8D7EDC <1> lea di, [szTemp] 2351 00002DC1 E884FF <1> call FloatToBCD 2352 00002DC4 5F <1> pop di 2353 <1> 2354 00002DC5 B81100 <1> mov ax, 16+1 2355 00002DC8 8B4EFE <1> mov cx, word [iExp] 2356 00002DCB 29C8 <1> sub ax, cx 2357 00002DCD 41 <1> inc cx 2358 00002DCE 8D76DC <1> lea si, [szTemp] 2359 00002DD1 01C6 <1> add si, ax 2360 <1> 2361 <1> ; The off-by-one order of magnitude problem below can hit us here. 2362 <1> ; We just trim off the possible leading zero. 2363 <1> 2364 00002DD3 803C30 <1> cmp byte [si], '0' 2365 00002DD6 7502 <1> jnz .not0digit 2366 00002DD8 46 <1> inc si 2367 00002DD9 49 <1> dec cx 2368 <1> .not0digit: 2369 <1> 2370 <1> ; Copy the rest of the converted BCD value to our buffer. 2371 <1> 2372 00002DDA F3A4 <1> rep movsb 2373 00002DDC E99800 <1> jmp .ftsExit 2374 <1> 2375 <1> .notequal: 2376 <1> .notbelow18: 2377 <1> 2378 <1> ; Have fbstp round to 17 places. 2379 <1> 2380 00002DDF B81000 <1> mov ax, 16 ; experiment 2381 00002DE2 2B46FE <1> sub ax, word [iExp] ; adjust exponent to 17 2382 00002DE5 E809FF <1> call PowerOf10 2383 <1> 2384 <1> ; Either we have exactly 17 digits, or we have exactly 16 digits. We can 2385 <1> ; detect that condition and adjust now. 2386 <1> 2387 00002DE8 DC16[6883] <1> fcom qword [ten16] 2388 <1> ; x0xxxx00 means top of stack > ten16 2389 <1> ; x0xxxx01 means top of stack < ten16 2390 <1> ; x1xxxx00 means top of stack = ten16 2391 00002DEC 9BDD7EFC <1> fstsw word [mystat] 2392 00002DF0 8B46FC <1> mov ax, word [mystat] 2393 00002DF3 F6C401 <1> test ah, 1 2394 00002DF6 7407 <1> jz .notset1 2395 00002DF8 DC0E[6083] <1> fmul qword [ten] 2396 00002DFC FF4EFE <1> dec word [iExp] 2397 <1> .notset1: 2398 <1> 2399 <1> ; Go convert to BCD. 2400 <1> 2401 00002DFF 57 <1> push di 2402 00002E00 8D7EDC <1> lea di, [szTemp] 2403 00002E03 E842FF <1> call FloatToBCD 2404 00002E06 5F <1> pop di 2405 <1> 2406 00002E07 8D76DD <1> lea si, [szTemp+1] ; point to converted buffer 2407 <1> 2408 <1> ; If the exponent is between -15 and 16, we should express this as a number 2409 <1> ; without scientific notation. 2410 <1> 2411 00002E0A 8B4EFE <1> mov cx, word [iExp] 2412 00002E0D 51 <1> push cx 2413 00002E0E 83C10F <1> add cx, 15 2414 00002E11 83F91F <1> cmp cx, 15+16 2415 00002E14 59 <1> pop cx 2416 00002E15 7734 <1> ja .fts6 2417 <1> 2418 <1> ; If the exponent is less than zero, we insert '0.', then -cx 2419 <1> ; leading zeros, then 16 digits of mantissa. If the exponent is 2420 <1> ; positive, we copy cx+1 digits, then a decimal point (maybe), then 2421 <1> ; the remaining 16-cx digits. 2422 <1> 2423 00002E17 41 <1> inc cx 2424 00002E18 83F900 <1> cmp cx, byte 0 2425 00002E1B 7F0F <1> jg .ispos1 2426 00002E1D B8302E <1> mov ax, "0." 2427 00002E20 AB <1> stosw 2428 00002E21 F7D9 <1> neg cx 2429 00002E23 B030 <1> mov al, '0' 2430 00002E25 F3AA <1> rep stosb 2431 00002E27 B91000 <1> mov cx, 16 2432 00002E2A EB0B <1> jmp short .fts3 2433 <1> .ispos1: 2434 00002E2C F3A4 <1> rep movsb 2435 00002E2E B02E <1> mov al, '.' 2436 00002E30 AA <1> stosb 2437 00002E31 B91000 <1> mov cx, 16 2438 00002E34 2B4EFE <1> sub cx, word [iExp] 2439 <1> .fts3: 2440 00002E37 F3A4 <1> rep movsb 2441 <1> 2442 <1> ; Trim off trailing zeros. 2443 <1> 2444 <1> .nextitem2: 2445 00002E39 807DFF30 <1> cmp byte [di-1], '0' 2446 00002E3D 7503 <1> jne .fts1 2447 00002E3F 4F <1> dec di 2448 00002E40 EBF7 <1> jmp short .nextitem2 2449 <1> .fts1: 2450 <1> 2451 <1> ; If we cleared out all the decimal digits, kill the decimal point, too. 2452 <1> 2453 00002E42 807DFF2E <1> cmp byte [di-1], '.' 2454 00002E46 7501 <1> jnz .fts2 2455 00002E48 4F <1> dec di 2456 <1> .fts2: 2457 <1> 2458 <1> ; That's it. 2459 <1> 2460 00002E49 EB2C <1> jmp short .ftsExit 2461 <1> .fts6: 2462 <1> 2463 <1> ; Now convert this to a standard, usable format. If needed, a minus 2464 <1> ; sign is already present in the outgoing buffer, and di already points 2465 <1> ; past it. 2466 <1> 2467 00002E4B A4 <1> movsb ; copy the first digit 2468 00002E4C B02E <1> mov al, '.' 2469 00002E4E AA <1> stosb ; plop in a decimal point 2470 00002E4F A5 <1> movsw 2471 00002E50 A5 <1> movsw 2472 00002E51 A5 <1> movsw ; copy six more digits 2473 <1> 2474 <1> %if 0 2475 <1> 2476 <1> ; The printf %g specified trims off trailing zeros here. I dislike 2477 <1> ; this, so I've disabled it. Comment out the %if 0 and %endif if you 2478 <1> ; want this. 2479 <1> 2480 <1> .fts61: 2481 <1> cmp byte [di-1], '0' 2482 <1> je .fts62 2483 <1> dec di 2484 <1> jmp short .fts61 2485 <1> .fts62: 2486 <1> %endif 2487 <1> 2488 <1> ; Shove in the exponent. If you support 10-byte reals, remember to 2489 <1> ; allow 4 digits for the exponent. 2490 <1> 2491 00002E52 B8652B <1> mov ax, "e+" 2492 00002E55 8B56FE <1> mov dx, word [iExp] 2493 00002E58 85D2 <1> test dx, dx 2494 00002E5A 7904 <1> jns .fts7 2495 00002E5C F7DA <1> neg dx 2496 00002E5E B42D <1> mov ah, '-' 2497 <1> .fts7: 2498 00002E60 AB <1> stosw 2499 <1> 2500 00002E61 92 <1> xchg ax, dx 2501 00002E62 BE0A00 <1> mov si, 10 2502 00002E65 B90400 <1> mov cx, 4 2503 <1> .fts8: 2504 00002E68 31D2 <1> xor dx, dx 2505 00002E6A F7F6 <1> div si 2506 00002E6C 52 <1> push dx 2507 00002E6D E2F9 <1> loop .fts8 2508 00002E6F B104 <1> mov cl, 4 2509 <1> .fts9: 2510 00002E71 58 <1> pop ax 2511 00002E72 0430 <1> add al, '0' 2512 00002E74 AA <1> stosb 2513 00002E75 E2FA <1> loop .fts9 2514 <1> 2515 <1> %if 0 2516 <1> add di, byte 4 ; -> terminator 2517 <1> %endif 2518 <1> 2519 <1> ; Clean up and go home. 2520 <1> 2521 <1> .ftsExit: 2522 <1> ; fldcw [stat] ; restore control word 2523 <1> ; fwait 2524 <1> %if 0 2525 <1> mov ax, di 2526 <1> sub ax, word [pszDbl] 2527 <1> mov cx, 21 2528 <1> sub cx, ax 2529 <1> mov al, 32 2530 <1> rep stosb 2531 <1> %endif 2532 00002E77 5F <1> pop di 2533 00002E78 07 <1> pop es 2534 00002E79 5E <1> pop si 2535 00002E7A 1F <1> pop ds 2536 <1> 2537 00002E7B 89EC5D <1> lleave 2538 00002E7E C20600 <1> lret 2539 <1> 2540 <1> %undef pfpin 2541 <1> %undef pszDbl 2542 <1> %undef iExp 2543 <1> %undef mystat 2544 <1> %undef fpin 2545 <1> %undef szTemp 2065 %endif 2066 %include "run.asm" 2067 <1> 2068 <1> %if 0 2069 <1> 2070 <1> lDebug code and commands (P, T, G) to run debuggee code 2071 <1> 2072 <1> Copyright (C) 1995-2003 Paul Vojta 2073 <1> Copyright (C) 2008-2012 C. Masloch 2074 <1> 2075 <1> Usage of the works is permitted provided that this 2076 <1> instrument is retained with the works, so that any entity 2077 <1> that uses the works is notified of this instrument. 2078 <1> 2079 <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 2080 <1> 2081 <1> %endif 2082 <1> 2083 <1> 2084 <1> usesection lDEBUG_CODE 2085 <1> 2086 <1> gg_repeat: 2087 00002E81 E877D6 <1> call guard_re 2088 00002E84 800E[A000]20 <1> setopt [internalflags2], dif2_gg_again 2089 00002E89 EB17 <1> jmp @F 2090 <1> 2091 <1> ; G command - go. 2092 <1> gg: 2093 00002E8B 4E <1> dec si 2094 00002E8C 4E <1> dec si 2095 00002E8D BA[7D65] <1> mov dx, msg.goto 2096 00002E90 E8FC89 <1> call isstring? 2097 00002E93 7503E9D09E <1> je cmd_goto 2098 00002E98 46 <1> inc si 2099 00002E99 AC <1> lodsb 2100 <1> 2101 00002E9A E85ED6 <1> call guard_re 2102 <1> 2103 00002E9D 8026[A000]DF <1> clropt [internalflags2], dif2_gg_again 2104 <1> @@: 2105 00002EA2 C706[C000][6370] <1> mov word [gg_deferred_message], msg.empty_message 2106 00002EA8 8326[C200]00 <1> and word [bb_deferred_message_in_lineout_behind], 0 2107 <1> 2108 00002EAD BB[E003] <1> mov bx, dmycmd 2109 00002EB0 F606[7E00]02 <1> testopt [options], gg_no_autorepeat 2110 00002EB5 7503 <1> jnz @F 2111 00002EB7 BB[812E] <1> mov bx, gg_repeat 2112 <1> @@: 2113 00002EBA 891E[DC0B] <1> mov word [lastcmd], bx 2114 <1> 2115 00002EBE 800E[A000]08 <1> setopt [internalflags2], dif2_gg_is_gg 2116 00002EC3 8026[A000]E8 <1> clropt [internalflags2], dif2_gg_is_first | dif2_gg_first_detected | dif2_gg_skip_cseip | dif2_gg_skip_non_cseip 2119 <1> 2120 00002EC8 FF36[900C] <1> push word [reg_cs] ; save original CS 2121 00002ECC 8F06[D80B] <1> pop word [eqladdr+4] 2122 00002ED0 E82118 <1> call parseql ; process =addr 2123 <1> 2124 00002ED3 F606[7E00]01 <1> testopt [options], gg_do_not_skip_bp 2125 00002ED8 752C <1> jnz .do_not_skip_cseip 2126 00002EDA 800E[A000]01 <1> setopt [internalflags2], dif2_gg_is_first 2127 <1> 2128 00002EDF 803E[D30B]00 <1> cmp byte [eqflag], 0 2129 00002EE4 7508 <1> jne .cseip_take_eql 2130 <1> 2131 00002EE6 66 <1> _386_PM_o32 ; xor ecx, ecx 2132 00002EE7 31C9 <1> xor cx, cx 2133 00002EE9 E86808 <1> call get_cseip_ecx_linear 2134 00002EEC EB0C <1> jmp .got_cseip 2135 <1> 2136 <1> .cseip_take_eql: 2137 00002EEE 8B1E[D80B] <1> mov bx, word [eqladdr + 4] 2138 00002EF2 66 <1> _386_PM_o32 ; mov edx, dword [eqladdr] 2139 00002EF3 8B16[D40B] <1> mov dx, word [eqladdr] 2140 00002EF7 E86608 <1> call getlinear 2141 <1> .got_cseip: 2142 00002EFA 7303E9DD75 <1> jc error 2143 00002EFF A3[B400] <1> mov word [gg_first_cseip_linear], ax 2144 00002F02 8916[B600] <1> mov word [gg_first_cseip_linear + 2], dx 2145 <1> .do_not_skip_cseip: 2146 <1> 2147 <1> %ifn _NUM_G_BP 2148 <1> call chkeol 2149 <1> 2150 <1> testopt [options3], opt3_gg_no_paging 2151 <1> jz @F 2152 <1> clropt [internalflags], pagedcommand 2153 <1> @@: 2154 <1> call tpg_initialise_empty_auxbuff 2155 <1> 2156 <1> %if _BREAKPOINTS 2157 <1> call bb_writepoints_init_reset 2158 <1> %endif 2159 <1> 2160 <1> %else 2161 00002F06 4E <1> dec si 2162 00002F07 E80A8A <1> call skipcomma 2163 00002F0A 4E <1> dec si 2164 00002F0B BA[6970] <1> mov dx, msg.again 2165 00002F0E E87E89 <1> call isstring? 2166 00002F11 7531 <1> jne @F ; (after this, do not dec si!) 2167 <1> 2168 <1> gg_again: 2169 <1> 2170 <1> %if _AUXBUFFSIZE < (BPSIZE * _NUM_G_BP + 1) 2171 <1> %error auxbuff not large enough for gg breakpoint list 2172 <1> %endif 2173 <1> 2174 00002F13 56 <1> push si 2175 00002F14 BE[7B07] <1> mov si, g_bplist.used_count 2176 00002F17 31C0 <1> xor ax, ax 2177 00002F19 AC <1> lodsb ; ax = number of breakpoints set yet 2178 00002F1A 4E <1> dec si ; -> gg breakpoint list 2179 00002F1B 89C1 <1> mov cx, ax 2180 00002F1D 01C9 <1> add cx, cx 2181 00002F1F 01C9 <1> add cx, cx ; * 4 2182 <1> %if BPSIZE == 4 2183 <1> %elif BPSIZE == 5 2184 <1> add cx, ax ; * 5 2185 <1> %elif BPSIZE == 6 2186 <1> add cx, ax ; * 5 2187 <1> add cx, ax ; * 6 2188 <1> %elif BPSIZE == 9 2189 00002F21 01C9 <1> add cx, cx ; * 8 2190 00002F23 01C1 <1> add cx, ax ; * 9 2191 <1> %else 2192 <1> %error Unexpected breakpoint size 2193 <1> %endif 2194 00002F25 41 <1> inc cx ; include the count 2195 00002F26 E8B6D5 <1> call guard_auxbuff 2196 00002F29 8E06[F209] <1> mov es, word [auxbuff_segorsel] 2197 00002F2D 31FF <1> xor di, di ; es:di -> auxbuff 2198 00002F2F F3A4 <1> rep movsb ; initialise auxbuff list 2199 <1> 2200 00002F31 5E <1> pop si ; si -> separator after "AGAIN" keyword 2201 00002F32 BF0100 <1> mov di, 1 ; -> first point 2202 00002F35 89C1 <1> mov cx, ax 2203 00002F37 B0CC <1> mov al, 0CCh 2204 00002F39 E306 <1> jcxz .end 2205 <1> .loop: 2206 00002F3B 83C708 <1> add di, BPSIZE - 1 ; -> point content 2207 00002F3E AA <1> stosb ; initialise breakpoint content 2208 00002F3F E2FA <1> loop .loop 2209 <1> .end: 2210 <1> ; es:di -> after last breakpoint in array 2211 00002F41 E9B200 <1> jmp gg3 ; parse additional points (do not dec si!) 2212 <1> 2213 <1> @@: 2214 00002F44 F606[A000]20 <1> testopt [internalflags2], dif2_gg_again 2215 00002F49 75C8 <1> jnz gg_again 2216 <1> 2217 <1> 2218 <1> gg_list: 2219 00002F4B BA[6470] <1> mov dx, msg.list 2220 00002F4E E83E89 <1> call isstring? 2221 00002F51 7403E99400 <1> jne .not 2222 <1> 2223 00002F56 AC <1> lodsb 2224 00002F57 E8A989 <1> call chkeol 2225 <1> 2226 00002F5A 800E[A000]05 <1> setopt [internalflags2], dif2_gg_is_first | dif2_gg_skip_cseip 2227 <1> 2228 00002F5F BE[7C07] <1> mov si, g_bplist.bp 2229 00002F62 31C9 <1> xor cx, cx 2230 00002F64 8A4CFF <1> mov cl, byte [si - 1] 2231 00002F67 31DB <1> xor bx, bx 2232 00002F69 E379 <1> jcxz .none 2233 <1> .loop: 2234 00002F6B 43 <1> inc bx 2235 00002F6C 51 <1> push cx 2236 00002F6D 53 <1> push bx 2237 <1> 2238 00002F6E 89D8 <1> mov ax, bx ; 1-based index 2239 00002F70 BF[0E08] <1> mov di, line_out 2240 00002F73 E84707 <1> call ordinalbyte 2241 <1> 2242 00002F76 57 <1> push di 2243 00002F77 81EF[1108] <1> sub di, line_out + 1 + 2 2244 <1> ; 1 = a digit, 2 = ordinal suffix, 2245 <1> ; result = how many additional digits are used 2246 00002F7B BA[ED6F] <1> mov dx, msg.list_bp.first 2247 00002F7E 01FA <1> add dx, di 2248 00002F80 E8218E <1> call putsz ; show blanks first 2249 00002F83 5F <1> pop di 2250 00002F84 E8A38A <1> call putsline 2251 <1> 2252 00002F87 E8A504 <1> call gg_bb_lods_bp_linear 2253 <1> ; BPSIZE implied 2254 <1> 2255 00002F8A BF[0770] <1> mov di, msg.list_bp.address1 2256 00002F8D 92 <1> xchg ax, dx 2257 00002F8E E85D8A <1> call hexword 2258 00002F91 47 <1> inc di 2259 <1> ; mov di, msg.list_bp.address2 2260 00002F92 92 <1> xchg ax, dx 2261 00002F93 E8588A <1> call hexword 2262 <1> 2263 00002F96 E8EA06 <1> call gg_bb_check_is_first 2264 <1> ; we set up the dif2_gg_skip_cseip flag, 2265 00002F99 B9[4574] <1> mov cx, msg.list_bp_not_cseip 2266 <1> ; so if CY (do not skip), initialise this 2267 00002F9C 721C <1> jc .not_cseip 2268 <1> ; if NC (do skip), use other string 2269 <1> %if _PM 2270 00002F9E 53 <1> push bx 2271 00002F9F 8B1E[900C] <1> mov bx, word [reg_cs] 2272 00002FA3 803E[D30B]00 <1> cmp byte [eqflag], 0 2273 00002FA8 7404 <1> je @F 2274 00002FAA 8B1E[D80B] <1> mov bx, word [eqladdr + 4] 2275 <1> @@: 2276 00002FAE E8852D <1> call test_d_b_bit 2277 00002FB1 5B <1> pop bx 2278 00002FB2 B9[1E70] <1> mov cx, msg.list_bp_cseip_32 2279 00002FB5 7503 <1> jnz @F ; if 32-bit cs --> 2280 <1> %endif 2281 00002FB7 B9[3070] <1> mov cx, msg.list_bp_csip_16 2282 <1> @@: 2283 <1> .not_cseip: 2284 <1> %if BPSIZE == 6 || BPSIZE == 9 2285 <1> ; INP: dx:ax = linear address 2286 <1> ; si -> (d)word offset 2287 <1> ; di -> where to store 2288 <1> ; OUT: cx = length displayed 2289 <1> ; si -> after offset 2290 <1> ; di -> after stored string 2291 <1> ; CHG: ax, dx 2292 00002FBA 51 <1> push cx 2293 00002FBB BF[0E08] <1> mov di, line_out 2294 00002FBE E8AE5B <1> call bp_display_offset ; BPSIZE implied 2295 00002FC1 57 <1> push di 2296 <1> %endif 2297 00002FC2 BF[1B70] <1> mov di, msg.list_bp.value 2298 00002FC5 AC <1> lodsb ; BPSIZE implied 2299 00002FC6 E82C8A <1> call hexbyte 2300 <1> 2301 00002FC9 BA[F16F] <1> mov dx, msg.list_bp.second 2302 00002FCC E8D58D <1> call putsz 2303 <1> 2304 <1> %if BPSIZE == 6 || BPSIZE == 9 2305 00002FCF 5F <1> pop di 2306 00002FD0 E8578A <1> call putsline 2307 00002FD3 59 <1> pop cx 2308 <1> %endif 2309 <1> 2310 00002FD4 BA[1170] <1> mov dx, msg.list_bp.third 2311 00002FD7 E8CA8D <1> call putsz 2312 <1> 2313 00002FDA 89CA <1> mov dx, cx 2314 00002FDC E8C58D <1> call putsz 2315 <1> 2316 00002FDF 5B <1> pop bx 2317 00002FE0 59 <1> pop cx 2318 00002FE1 E288 <1> loop .loop 2319 <1> .end: 2320 <1> ; mov dx, msg.list_bp_first_detected 2321 <1> ; testopt [internalflags2], dif2_gg_first_detected 2322 <1> ; jnz .putsz 2323 00002FE3 C3 <1> retn 2324 <1> 2325 <1> .none: 2326 00002FE4 BA[4170] <1> mov dx, msg.list_bp_none 2327 <1> .putsz: 2328 00002FE7 E9BA8D <1> jmp putsz 2329 <1> 2330 <1> .not: 2331 <1> 2332 <1> ; Store the address of each breakpoint into the buffer. We also 2333 <1> ; make sure that there aren't too many breakpoints. (The user can 2334 <1> ; specify them with 2 byte per breakpoints which gives about 128 2335 <1> ; breakpoints with a full command line.) The breakpoints will only 2336 <1> ; be set later when we have verified that the line contains no 2337 <1> ; syntax errors and that there aren't too many breakpoints. 2338 <1> ; 2339 <1> ; Note: With "G AGAIN" (or the gg_repeat handler), the user 2340 <1> ; can actually specify an arbitrary amount of 2341 <1> ; breakpoints. However, we limit the amount. 2342 <1> %if _AUXBUFFSIZE < (BPSIZE * _NUM_G_BP + 1) 2343 <1> %error auxbuff not large enough for gg breakpoint list 2344 <1> %endif 2345 00002FEA E8F2D4 <1> call guard_auxbuff 2346 00002FED 8E06[F209] <1> mov es, word [auxbuff_segorsel] 2347 00002FF1 31FF <1> xor di, di ; es:di -> auxbuff 2348 00002FF3 31C0 <1> xor ax, ax 2349 00002FF5 AA <1> stosb ; counter of saved breakpoints 2350 <1> gg3: 2351 <1> ; dec si ; don't use skipcomm0 instead - need to restore al 2352 00002FF6 E81B89 <1> call skipcomma 2353 00002FF9 E8F288 <1> call iseol? 2354 00002FFC 7453 <1> je gg4 ; if done --> 2355 <1> 2356 00002FFE 06 <1> push es 2357 00002FFF 16 <1> push ss 2358 00003000 07 <1> pop es ; set STT es = ds = ss 2359 00003001 4E <1> dec si 2360 00003002 BA[7465] <1> mov dx, msg.remember 2361 00003005 E88788 <1> call isstring? 2362 00003008 AC <1> lodsb 2363 00003009 7517 <1> jne @F 2364 <1> 2365 0000300B E8F588 <1> call chkeol 2366 0000300E 89F9 <1> mov cx, di ; -> after last point, = size of list 2367 00003010 1E <1> push ds 2368 00003011 07 <1> pop es 2369 00003012 1F <1> pop ds ; swap 2370 00003013 31F6 <1> xor si, si ; ds:si -> auxbuff 2371 00003015 BF[7B07] <1> mov di, g_bplist.used_count 2372 <1> ; es:di -> gg breakpoint list 2373 00003018 F3A4 <1> rep movsb ; copy list over 2374 0000301A 16 <1> push ss 2375 0000301B 1F <1> pop ds ; reset segregs 2376 0000301C 8026[A700]EF <1> clropt [internalflags3], dif3_auxbuff_guarded_1 2377 00003021 C3 <1> retn 2378 <1> 2379 <1> @@: 2380 00003022 8B1E[D80B] <1> mov bx, word [eqladdr+4]; default segment 2381 00003026 E88307 <1> call getlinearaddr ; get linear address into bx:dx (CHG edx) 2382 00003029 07 <1> pop es 2383 0000302A 7303E9AD74 <1> jc error 2384 0000302F 26803E000010 <1> cmp byte [es:0], _NUM_G_BP 2385 00003035 7203E9A274 <1> jae error ; can't store another breakpoint, g_bplist is full --> 2386 0000303A 92 <1> xchg ax, dx ; ax = low word 2387 0000303B AB <1> stosw 2388 0000303C 93 <1> xchg ax, bx ; to store high byte/word 2389 <1> %if _PM 2390 0000303D AB <1> stosw 2391 <1> %else 2392 <1> stosb ; bits 24-31 (dh) always zero in 21-bit addresses 2393 <1> %endif 2394 <1> ; BPSIZE implied 2395 <1> %if BPSIZE == 6 2396 <1> mov ax, word [bp_offset] 2397 <1> stosw ; write offset (R86M-only 16-bit) 2398 <1> %elif BPSIZE == 9 2399 0000303E A1[5085] <1> mov ax, word [bp_offset] 2400 00003041 AB <1> stosw 2401 00003042 A1[5285] <1> mov ax, word [bp_offset + 2] 2402 00003045 AB <1> stosw ; write offset (PM 32-bit) 2403 <1> %endif 2404 00003046 B0CC <1> mov al, 0CCh 2405 00003048 AA <1> stosb ; later filled with the byte read from this address 2406 00003049 26FE060000 <1> inc byte [es:0] ; increment count 2407 0000304E 4E <1> dec si 2408 0000304F EBA5 <1> jmp short gg3 2409 <1> 2410 <1> gg4: 2411 00003051 89F9 <1> mov cx, di ; -> after last point, = size of list 2412 00003053 06 <1> push es 2413 00003054 1E <1> push ds 2414 00003055 07 <1> pop es 2415 00003056 1F <1> pop ds ; swap 2416 00003057 31F6 <1> xor si, si ; ds:si -> auxbuff 2417 00003059 BF[7B07] <1> mov di, g_bplist.used_count 2418 <1> ; es:di -> gg breakpoint list 2419 0000305C F3A4 <1> rep movsb ; copy list over 2420 0000305E 16 <1> push ss 2421 0000305F 1F <1> pop ds ; reset segregs 2422 00003060 8026[A700]EF <1> clropt [internalflags3], dif3_auxbuff_guarded_1 2423 <1> 2424 00003065 F606[8400]08 <1> testopt [options3], opt3_gg_no_paging 2425 0000306A 7405 <1> jz @F 2426 0000306C 8026[9C00]F7 <1> clropt [internalflags], pagedcommand 2427 <1> @@: 2428 <1> 2429 <1> gg5: 2430 00003071 E87316 <1> call tpg_initialise_empty_auxbuff 2431 <1> %if _BREAKPOINTS 2432 00003074 E83804 <1> call bb_writepoints_init_reset 2433 <1> ; try to write bb points 2434 <1> ; (detect and write to cseip point too) 2435 <1> ; If this fails, it handles the errors and tries to restore 2436 <1> ; all its own points, then aborts the command. 2437 <1> 2438 <1> ; This call might return modeswitched. 2439 <1> %endif 2440 00003077 BE[7B07] <1> mov si, g_bplist.used_count 2441 0000307A 31C0 <1> xor ax, ax 2442 0000307C AC <1> lodsb ; si-> first point 2443 0000307D 89C1 <1> mov cx, ax ; cx = number of saved breakpoints 2444 0000307F 51 <1> push cx 2445 00003080 E8A305 <1> call gg_writepoints ; Store breakpoint bytes in the given locations. 2446 00003083 5A <1> pop dx 2447 <1> ; dx = number of points tried to write 2448 <1> ; cx = number of points not written 2449 00003084 7342 <1> jnc .points_set ; successful --> 2450 <1> 2451 <1> 2452 <1> ; Failure to write to a gg breakpoint. Now the fun starts! 2453 00003086 29CA <1> sub dx, cx ; = number of points written 2454 00003088 89D1 <1> mov cx, dx 2455 <1> ; We now first have to try restoring all the points we 2456 <1> ; already set because they might be inside the DOS or 2457 <1> ; BIOS handlers we would otherwise call. So instead of 2458 <1> ; displaying errors as we detect them, all the intel is 2459 <1> ; stored first until all points have been taken care of 2460 <1> ; (if possible). We then display error messages. 2461 <1> %if _BREAKPOINTS 2462 0000308A 83EC20 <1> sub sp, _NUM_B_BP * 2 ; reserve space for bb error info 2463 <1> %endif 2464 0000308D 89E5 <1> mov bp, sp ; -> behind gg error info, -> bb error info 2465 0000308F 01D2 <1> add dx, dx 2466 00003091 29D4 <1> sub sp, dx ; reserve space for gg error info 2467 00003093 50 <1> push ax ; store error info on point that failed to be written 2468 <1> 2469 <1> ; The gg points were written last, so restore them first. 2470 00003094 E89604 <1> call gg_restorepoints_and_init_error_info 2471 <1> %if _BREAKPOINTS 2472 00003097 51 <1> push cx 2473 <1> ; Next, restore the bb points. 2474 00003098 B91000 <1> mov cx, _NUM_B_BP ; = index above last one to restore 2475 0000309B E8DF04 <1> call bb_restorepoints_and_init_error_info 2476 0000309E 59 <1> pop cx ; (preserve index of failed gg point) 2477 <1> %endif 2478 0000309F 58 <1> pop ax 2479 <1> 2480 000030A0 E8AA01 <1> call put_deferred_message_silent 2481 <1> ; CHG: dx 2482 <1> 2483 <1> ; ax = info on initially failed point 2484 <1> ; cx = 0-based index of initially failed point 2485 <1> ; = number of points tried to restore 2486 000030A3 89CE <1> mov si, cx 2487 000030A5 01F6 <1> add si, si 2488 000030A7 01F6 <1> add si, si ; *4 2489 <1> %if BPSIZE == 4 2490 <1> %elif BPSIZE == 5 2491 <1> add si, cx ; * 5 2492 <1> %elif BPSIZE == 6 2493 <1> add si, cx ; * 5 2494 <1> add si, cx ; * 6 2495 <1> %elif BPSIZE == 9 2496 000030A9 01F6 <1> add si, si ; * 8 2497 000030AB 01CE <1> add si, cx ; * 9 2498 <1> %else 2499 <1> %error Unexpected breakpoint size 2500 <1> %endif 2501 000030AD 81C6[7C07] <1> add si, g_bplist.bp 2502 <1> 2503 <1> ; si-> point 2504 <1> ; ax = info (ah = reason, al = new value if reason 3) 2505 <1> ; cx = 0-based index of initially failed point 2506 000030B1 51 <1> push cx 2507 000030B2 FF7402 <1> push word [si + 2] 2508 000030B5 FF34 <1> push word [si] ; stack: linear address 2509 000030B7 BB0080 <1> mov bx, 8000h ; bh = 80h (gg), 2510 <1> ; bl = what we tried to restore (n/a) 2511 000030BA E8F20F <1> call display_breakpoint_failure 2512 000030BD 59 <1> pop cx 2513 000030BE E85606 <1> call gg_handlefailedrestore 2514 <1> %if _BREAKPOINTS 2515 000030C1 E82106 <1> call bb_handlefailedrestore 2516 000030C4 8D6620 <1> lea sp, [bp + _NUM_B_BP * 2] 2517 <1> %else 2518 <1> mov sp, bp 2519 <1> %endif 2520 <1> ; (discard bb + gg error info) 2521 000030C7 C3 <1> retn 2522 <1> 2523 <1> 2524 <1> .points_set: 2525 <1> ; All bb and gg points were successfully written. 2526 <1> ; Next: Handle cseip case, if such a point has been detected. 2527 <1> 2528 <1> 2529 <1> ; old cseip breakpoint handling comment: 2530 <1> ; interrupt ? emuint : .isstdtrace (including DPMI hack, pushf handling) 2531 <1> 2532 <1> %endif ; _NUM_G_BP 2533 <1> 2534 <1> 2535 <1> %if _NUM_G_BP || _BREAKPOINTS 2536 000030C8 F606[A000]10 <1> testopt [internalflags2], dif2_gg_first_detected 2537 000030CD 7503E91C01 <1> jz .only_run ; easy case, no cseip point detected --> 2538 <1> 2539 <1> 2540 <1> ; Enter special mode: Restore cseip breakpoint content. 2541 000030D2 800E[A000]02 <1> setopt [internalflags2], dif2_gg_skip_non_cseip 2542 <1> 2543 000030D7 89D1 <1> mov cx, dx ; = number of points set 2544 <1> %if _BREAKPOINTS 2545 000030D9 83EC20 <1> sub sp, _NUM_B_BP * 2 2546 <1> %endif 2547 000030DC 89E5 <1> mov bp, sp ; -> behind error info 2548 <1> %if _NUM_G_BP 2549 000030DE 89CA <1> mov dx, cx 2550 000030E0 01D2 <1> add dx, dx 2551 000030E2 29D4 <1> sub sp, dx 2552 000030E4 E84604 <1> call gg_restorepoints_and_init_error_info 2553 <1> 2554 000030E7 7326 <1> jnc .gg_restore_cseip_success 2555 <1> 2556 <1> 2557 <1> ; Error in gg_restorepoints. Try to restore other gg, all bb. 2558 <1> 2559 <1> ; Exit special mode: Handle non-cseip breakpoints again. 2560 000030E9 8026[A000]FD <1> clropt [internalflags2], dif2_gg_skip_non_cseip 2561 <1> 2562 <1> ; Enter special mode: Skip cseip breakpoints. 2563 000030EE 800E[A000]04 <1> setopt [internalflags2], dif2_gg_skip_cseip 2564 <1> 2565 <1> ; As we already tried to restore all cseip gg points, 2566 <1> ; here we skip these in the gg_restorepoints call. 2567 000030F3 E83A04 <1> call gg_restorepoints 2568 <1> 2569 <1> ; Exit special mode: No longer skip cseip breakpoints. 2570 000030F6 8026[A000]FB <1> clropt [internalflags2], dif2_gg_skip_cseip 2571 <1> 2572 <1> ; Any cseip bb points aren't yet restored, so do not skip them. 2573 <1> %if _BREAKPOINTS 2574 000030FB 51 <1> push cx 2575 000030FC B91000 <1> mov cx, _NUM_B_BP 2576 000030FF E87B04 <1> call bb_restorepoints_and_init_error_info 2577 00003102 59 <1> pop cx 2578 <1> %endif 2579 <1> %else 2580 <1> jmp .gg_restore_cseip_success 2581 <1> %endif 2582 <1> 2583 <1> .gg_bb_cseip_fail_common: 2584 <1> ; The failure that led us here is already noted in the info. 2585 <1> %if _NUM_G_BP 2586 00003103 E81106 <1> call gg_handlefailedrestore 2587 <1> %endif 2588 <1> %if _BREAKPOINTS 2589 00003106 E8DC05 <1> call bb_handlefailedrestore 2590 <1> %endif 2591 <1> %if _NUM_G_BP 2592 <1> %if _BREAKPOINTS 2593 00003109 8D6620 <1> lea sp, [bp + _NUM_B_BP * 2] 2594 <1> %else 2595 <1> mov sp, bp 2596 <1> %endif 2597 <1> %elif _BREAKPOINTS 2598 <1> add sp, _NUM_B_BP * 2 2599 <1> %endif 2600 0000310C E9F1CE <1> jmp cmd3 2601 <1> 2602 <1> .gg_restore_cseip_success: 2603 <1> %if _BREAKPOINTS 2604 0000310F B91000 <1> mov cx, _NUM_B_BP ; = index above last one to restore 2605 00003112 E86804 <1> call bb_restorepoints_and_init_error_info 2606 00003115 7322 <1> jnc @F ; no error ? --> 2607 <1> 2608 <1> ; Error in bb_restorepoints. Try to restore other gg, other bb. 2609 <1> 2610 <1> ; Exit special mode: Handle non-cseip breakpoints again. 2611 00003117 8026[A000]FD <1> clropt [internalflags2], dif2_gg_skip_non_cseip 2612 <1> 2613 <1> ; Enter special mode: Skip cseip breakpoints. 2614 0000311C 800E[A000]04 <1> setopt [internalflags2], dif2_gg_skip_cseip 2615 <1> 2616 <1> ; As we already tried to restore all cseip gg and bb points, 2617 <1> ; here we skip these in the bb_restorepoints call. 2618 <1> %if _NUM_G_BP 2619 00003121 31C9 <1> xor cx, cx 2620 00003123 8A0E[7B07] <1> mov cl, byte [g_bplist.used_count] 2621 00003127 E80604 <1> call gg_restorepoints 2622 0000312A 51 <1> push cx 2623 <1> %endif 2624 0000312B B91000 <1> mov cx, _NUM_B_BP 2625 0000312E E84F04 <1> call bb_restorepoints 2626 <1> %if _NUM_G_BP 2627 00003131 59 <1> pop cx 2628 <1> %endif 2629 <1> 2630 <1> ; Exit special mode: No longer skip cseip breakpoints. 2631 00003132 8026[A000]FB <1> clropt [internalflags2], dif2_gg_skip_cseip 2632 <1> 2633 00003137 EBCA <1> jmp .gg_bb_cseip_fail_common 2634 <1> 2635 <1> @@: 2636 <1> ; Success! Now discard the reserved error info. 2637 00003139 8D6620 <1> lea sp, [bp + _NUM_B_BP * 2] 2638 <1> %else 2639 <1> mov sp, bp 2640 <1> %endif 2641 <1> 2642 <1> ; Special mode restoration handled. Now trace one instruction. 2643 <1> ; (Proceed if repeated string op or interrupt.) 2644 <1> %if _PM 2645 0000313C E83A07 <1> call resetmode 2646 <1> %endif 2647 0000313F E8E015 <1> call seteq ; make the = operand take effect 2648 00003142 BA0F00 <1> mov dx, 15 ; DL = number of bytes to go; DH = prefix flags. 2649 00003145 8B1E[900C] <1> mov bx, word [reg_cs] 2650 00003149 66 <1> _386_PM_o32 ; mov esi, dword [reg_eip] 2651 0000314A 8B36[9C0C] <1> mov si, word [reg_eip] 2652 <1> .pp2: 2653 0000314E E8C410 <1> call pp16 ; get next instruction byte into AL 2654 00003151 BF[E410] <1> mov di, ppbytes 2655 00003154 B91800 <1> mov cx, PPLEN_ONLY_STRING 2656 00003157 F2AE <1> repne scasb 2657 00003159 752D <1> jne .not_p ; if not one of these --> 2658 0000315B 8A451E <1> mov al,byte [di+PPLEN-1]; get corresponding byte in ppinfo 2659 0000315E A880 <1> test al, PP_PREFIX ; prefix ? 2660 00003160 740E <1> jz .pp3 ; no --> 2661 00003162 08C6 <1> or dh, al ; set the OSIZE or ASIZE flags if either of these 2662 <1> ; Note: Multiple OSIZE in a 16-bit cs do not toggle 2663 <1> ; between decoding as O32 and O16, they're always 2664 <1> ; decoded as O32. The same is true for A32, and 2665 <1> ; in a 32-bit cs for O16 and A16. 2666 00003164 FECA <1> dec dl 2667 00003166 75E6 <1> jnz .pp2 ; if not out of bytes --> 2668 00003168 C706[C000][D971] <1> mov word [gg_deferred_message], msg.warnprefix 2669 0000316E EB18 <1> jmp .not_p 2670 <1> 2671 <1> ; A repeatable string instruction is to be decoded. 2672 <1> ; Finish the decoding and skip the appropriate number 2673 <1> ; of opcode bytes. 2674 <1> .pp3: 2675 00003170 E8B40C <1> _386_PM call pp_fix32bitflags 2676 00003173 A847 <1> test al, PP_VARSIZ | PP_SIZ_MASK 2677 00003175 7403E96273 <1> jnz error 2678 <1> %if 0 2679 <1> test al, PP_VARSIZ ; different opcode length depends on OSIZE ? 2680 <1> jz .ignoreosize ; no --> 2681 <1> and dh, 2 2682 <1> add al, dh 2683 <1> .ignoreosize: 2684 <1> and ax, PP_SIZ_MASK 2685 <1> _386_PM movzx eax, ax ; clear high word (in case it counts) 2686 <1> _386_PM_o32 ; add esi, eax 2687 <1> add si, ax 2688 <1> %endif 2689 <1> ; pp10: 2690 <1> ; jmp short pp11 ; we have a skippable instruction here 2691 <1> ; pp11: 2692 0000317A E8B92B <1> _386_PM call test_d_b_bit 2693 0000317D 7504 <1> _386_PM jnz .32 ; full 32-bit offset valid --> 2694 0000317F 660FB7F6 <1> _386_PM movzx esi, si ; clear high word here 2695 <1> .32: 2696 00003183 E8F90F <1> call proceedbreakpoint ; run until the breakpoint is hit 2697 <1> ; This call might return modeswitched. 2698 00003186 EB03 <1> jmp short @F 2699 <1> 2700 <1> .not_p: 2701 00003188 E8F80A <1> call traceone ; call common code 2702 <1> @@: 2703 0000318B 9C <1> pushf 2704 <1> 2705 <1> ; Exit special mode, do not skip non-cseip breakpoints anymore. 2706 0000318C 8026[A000]FD <1> clropt [internalflags2], dif2_gg_skip_non_cseip 2707 <1> 2708 <1> ; Enter special mode: Skip matching/restoring cseip breakpoint. 2709 00003191 800E[A000]04 <1> setopt [internalflags2], dif2_gg_skip_cseip 2710 <1> 2711 00003196 F6C47F <1> test ah, 7Fh ; error happened during proceedbreakpoint ? 2712 00003199 7440 <1> jz @F ; no --> 2713 <1> 2714 0000319B 59 <1> pop cx ; (discard flags on stack) 2715 <1> 2716 <1> %if _NUM_G_BP 2717 0000319C 31C9 <1> xor cx, cx 2718 0000319E 8A0E[7B07] <1> mov cl, byte [g_bplist.used_count] 2719 <1> %endif 2720 <1> 2721 <1> %if _BREAKPOINTS 2722 000031A2 83EC20 <1> sub sp, _NUM_B_BP * 2 ; reserve space for bb error info 2723 <1> %endif 2724 000031A5 89E5 <1> mov bp, sp ; -> behind gg error info, -> bb error info 2725 <1> %if _NUM_G_BP 2726 000031A7 89CA <1> mov dx, cx 2727 000031A9 01D2 <1> add dx, dx 2728 000031AB 29D4 <1> sub sp, dx ; reserve space for gg error info 2729 <1> %endif 2730 000031AD 50 <1> push ax 2731 <1> %if _NUM_G_BP 2732 000031AE E87C03 <1> call gg_restorepoints_and_init_error_info 2733 <1> %endif 2734 <1> %if _BREAKPOINTS 2735 000031B1 51 <1> push cx 2736 000031B2 B91000 <1> mov cx, _NUM_B_BP 2737 000031B5 E8C503 <1> call bb_restorepoints_and_init_error_info 2738 000031B8 59 <1> pop cx 2739 <1> %endif 2740 <1> ; Exit special mode: No longer skip cseip breakpoints. 2741 000031B9 8026[A000]FB <1> clropt [internalflags2], dif2_gg_skip_cseip 2742 000031BE 58 <1> pop ax 2743 000031BF 51 <1> push cx 2744 <1> 2745 <1> %if _PM 2746 000031C0 E8B606 <1> call resetmode 2747 <1> %endif 2748 000031C3 E88700 <1> call put_deferred_message_silent 2749 <1> 2750 000031C6 FF36[C600] <1> push word [tpg_proceed_bp + 2] 2751 000031CA FF36[C400] <1> push word [tpg_proceed_bp] 2752 000031CE 8A1E[CC00] <1> mov bl, [tpg_proceed_bp + BPSIZE - 1] 2753 000031D2 B700 <1> mov bh, 0 ; proceed breakpoint 2754 000031D4 E8D80E <1> call display_breakpoint_failure 2755 000031D7 59 <1> pop cx 2756 000031D8 E928FF <1> jmp .gg_bb_cseip_fail_common 2757 <1> 2758 <1> 2759 <1> @@: 2760 000031DB 9D <1> popf ; CF 2761 <1> 2762 000031DC 7218 <1> jc .after_run ; an unexpected interrupt occured --> 2763 <1> 2764 000031DE E84000 <1> call .after_run_restore ; restore stuff 2765 000031E1 E85002 <1> call gg_bb_check_hit ; expected interrupt matches our gg or bb ? 2766 000031E4 7321 <1> jnc .expectedinterrupt ; yes, handle expected interrupt --> 2767 <1> 2768 <1> 2769 <1> ; Clear all special modes. Stop specialcasing cseip breakpoint. 2770 000031E6 8026[A000]E8 <1> clropt [internalflags2], dif2_gg_is_first | dif2_gg_first_detected | dif2_gg_skip_cseip | dif2_gg_skip_non_cseip 2773 000031EB E983FE <1> jmp gg5 ; next write all points and run --> 2774 <1> %endif ; _NUM_G_BP || _BREAKPOINTS 2775 <1> 2776 <1> .only_run: 2777 <1> ; Clear all special modes. Stop specialcasing cseip breakpoint. 2778 000031EE 8026[A000]E8 <1> clropt [internalflags2], dif2_gg_is_first | dif2_gg_first_detected | dif2_gg_skip_cseip | dif2_gg_skip_non_cseip 2781 <1> 2782 000031F3 E8B510 <1> call run ; Now run the program. 2783 <1> .after_run: 2784 <1> %if _NUM_G_BP || _BREAKPOINTS 2785 000031F6 E82800 <1> call .after_run_restore 2786 <1> 2787 000031F9 E83802 <1> call gg_bb_check_hit 2788 <1> .after_gg_bb_check_hit: 2789 000031FC 7309 <1> jnc .expectedinterrupt 2790 <1> %endif ; _NUM_G_BP || _BREAKPOINTS 2791 <1> .unexpectedinterrupt: 2792 <1> %if _PM 2793 000031FE E87806 <1> call resetmode 2794 <1> %endif 2795 00003201 E84900 <1> call put_deferred_message_silent 2796 00003204 E9430A <1> jmp unexpectedinterrupt ; print messages for unexpected breakpoint and quit. 2797 <1> 2798 <1> %if _NUM_G_BP || _BREAKPOINTS 2799 <1> .expectedinterrupt: 2800 00003207 E86500 <1> call adjust_cseip_after_breakpoint 2801 <1> ; it's one of our breakpoints, adjust (e)ip 2802 <1> 2803 0000320A 89C1 <1> mov cx, ax ; handle_bb_* expects flags in cx 2804 0000320C 50 <1> push ax 2805 0000320D 50 <1> push ax ; handle_bb_* expects dword counter on stack 2806 0000320E E8DD08 <1> call handle_bb_hit_pass_match 2807 00003211 58 <1> pop ax 2808 00003212 58 <1> pop ax ; discard 2809 00003213 7203E959FE <1> jnc gg5 ; if it was a pass non-hit or non-pass non-hit 2810 <1> ; then jump back to do a subsequent G step 2811 <1> ; If jumping, the function has set up gg_first_cseip_linear 2812 <1> ; with the current CS:(E)IP so that the next step will start 2813 <1> ; out with skipping past the breakpoint(s) on that address. 2814 <1> ; Note that gg_bb_check_hit returns ax = 7 if a gg point is 2815 <1> ; hit, so we always fall through to .actual_hit here. 2816 <1> 2817 <1> .actual_hit: 2818 <1> %if _PM 2819 00003218 E85E06 <1> call resetmode 2820 <1> %endif 2821 0000321B E82F00 <1> call put_deferred_message_silent 2822 <1> ; (put bb message after gg_bb_check_hit call) 2823 0000321E E9630D <1> jmp dumpregs_extended_silent 2824 <1> ; (handles sf_(double_)ctrl_c) 2825 <1> %endif 2826 <1> 2827 <1> 2828 <1> .after_run_restore: 2829 <1> %if _NUM_G_BP || _BREAKPOINTS 2830 00003221 83EC20 <1> sub sp, _NUM_B_BP * 2 ; reserve space for bb error info 2831 00003224 89E5 <1> mov bp, sp ; -> behind gg error info, -> bb error info 2832 <1> %if _NUM_G_BP 2833 00003226 31C9 <1> xor cx, cx 2834 00003228 8A0E[7B07] <1> mov cl, byte [g_bplist.used_count] 2835 0000322C 89CA <1> mov dx, cx 2836 0000322E 01D2 <1> add dx, dx 2837 00003230 29D4 <1> sub sp, dx ; reserve space for gg error info 2838 00003232 E8F802 <1> call gg_restorepoints_and_init_error_info 2839 <1> ; try restoring gg points, and fill error info 2840 <1> %endif 2841 <1> %if _BREAKPOINTS 2842 00003235 51 <1> push cx 2843 00003236 B91000 <1> mov cx, _NUM_B_BP ; = index above last one to restore 2844 00003239 E84103 <1> call bb_restorepoints_and_init_error_info 2845 <1> ; try restoring bb points, and fill error info 2846 0000323C 59 <1> pop cx 2847 <1> %endif 2848 <1> 2849 <1> %if _PM 2850 0000323D E83906 <1> call resetmode 2851 <1> %endif 2852 00003240 E80A00 <1> call put_deferred_message_silent 2853 <1> 2854 <1> %if _NUM_G_BP 2855 00003243 E8D104 <1> call gg_handlefailedrestore 2856 <1> ; handle gg point restore failures 2857 <1> %endif 2858 <1> %if _BREAKPOINTS 2859 00003246 E89C04 <1> call bb_handlefailedrestore 2860 <1> ; handle bb point restore failures 2861 <1> %endif 2862 <1> %if _NUM_G_BP 2863 <1> %if _BREAKPOINTS 2864 00003249 8D6620 <1> lea sp, [bp + _NUM_B_BP * 2] 2865 <1> %else 2866 <1> mov sp, bp ; remove the stack frame 2867 <1> %endif 2868 <1> %else 2869 <1> add sp, _NUM_B_BP * 2 2870 <1> %endif 2871 <1> %endif ; _NUM_G_BP || _BREAKPOINTS 2872 0000324C C3 <1> retn 2873 <1> 2874 <1> 2875 <1> ; INP: word [gg_deferred_message] 2876 <1> ; word [bb_deferred_message_in_lineout_behind] 2877 <1> ; OUT: variables reset to msg.empty_message 2878 <1> ; messages displayed; first the gg one then the bb one 2879 <1> ; CHG: dx 2880 <1> ; STT: ds = es = ss 2881 <1> ; 2882 <1> ; Note: Uses putsz_silent and putsline_silent, meaning 2883 <1> ; if silent mode is enabled, the messages are 2884 <1> ; written to the silent buffer instead of displayed. 2885 <1> put_deferred_message_silent: 2886 0000324D BA[6370] <1> mov dx, msg.empty_message 2887 00003250 8716[C000] <1> xchg dx, word [gg_deferred_message] 2888 00003254 E89E09 <1> call putsz_silent 2889 00003257 BA[113C] <1> mov dx, putsline_silent 2890 <1> 2891 <1> ; INP: dx = puts function to call, CHG ax, bx, cx, dx, di 2892 <1> ; CHG: dx 2893 <1> ; STT: ds = es = ss 2894 <1> put_bb_deferred_message_calling_dx: 2895 0000325A 57 <1> push di 2896 0000325B 31FF <1> xor di, di 2897 0000325D 873E[C200] <1> xchg di, word [bb_deferred_message_in_lineout_behind] 2898 00003261 85FF <1> test di, di 2899 00003263 7408 <1> jz @F 2900 00003265 50 <1> push ax 2901 00003266 53 <1> push bx 2902 00003267 51 <1> push cx 2903 00003268 FFD2 <1> call dx 2904 0000326A 59 <1> pop cx 2905 0000326B 5B <1> pop bx 2906 0000326C 58 <1> pop ax 2907 <1> @@: 2908 0000326D 5F <1> pop di 2909 0000326E C3 <1> retn 2910 <1> 2911 <1> 2912 <1> ; INP: [internalflags2] & dif2_tpg_adjusted_cseip 2913 <1> ; [internalflags2] & dif2_tpg_do_not_adjust 2914 <1> ; word [reg_cs] 2915 <1> ; (d)word [reg_eip] 2916 <1> ; OUT: If both flags clear on input, 2917 <1> ; set [internalflags2] & dif2_tpg_adjusted_cseip 2918 <1> ; cs:(e)ip adjusted by decrementing (e)ip 2919 <1> ; (It is only decremented by the first call to this 2920 <1> ; function, which sets the flag in dif2.) 2921 <1> ; Else, 2922 <1> ; do nothing 2923 <1> ; CHG: bx 2924 <1> ; STT: ds = ss = debugger data selector 2925 <1> adjust_cseip_after_breakpoint: 2926 0000326F F606[A100]06 <1> testopt [internalflags2], dif2_tpg_adjusted_cseip | dif2_tpg_do_not_adjust 2928 00003274 7513 <1> jnz .retn 2929 00003276 800E[A100]02 <1> setopt [internalflags2], dif2_tpg_adjusted_cseip 2930 0000327B 8B1E[900C] <1> _386_PM mov bx, word [reg_cs] 2931 0000327F E8B12A <1> _386_PM call resetmode_and_test_d_b_bit 2932 00003282 7401 <1> _386_PM jz .16 ; 16-bit cs --> 2933 00003284 66 <1> _386_PM o32 ; dec dword [reg_eip] 2934 <1> .16: 2935 00003285 FF0E[9C0C] <1> dec word [reg_eip] ; re-execute (restored) opcode one byte in front of this 2936 <1> .retn: 2937 00003289 C3 <1> retn 2938 <1> 2939 <1> 2940 <1> %ifn _BREAKPOINTS 2941 <1> bb_check_hit: 2942 <1> xor ax, ax 2943 <1> stc 2944 <1> retn 2945 <1> %else 2946 <1> ; INP: word [run_int] 2947 <1> ; word [reg_cs] 2948 <1> ; (d)word [reg_eip] 2949 <1> ; bb breakpoints 2950 <1> ; OUT: NC if a breakpoint was hit, 2951 <1> ; (e)ip must be decremented by one 2952 <1> ; word [bb_deferred_message_in_lineout_behind] set 2953 <1> ; and line_out written if bb point matched 2954 <1> ; (The bb point's index is already written to this msg.) 2955 <1> ; ax & 1 set if non-pass match (actual hit), 2956 <1> ; else ax & 2 set if pass match (consider as hit first, 2957 <1> ; but dump registers next (not to silent buffer) 2958 <1> ; and then continue execution) 2959 <1> ; else ax & 4 always set, indicates any match 2960 <1> ; (including matches that should merely continue) 2961 <1> ; all pass points' counters stepped 2962 <1> ; CY if no breakpoint was hit, 2963 <1> ; ax = 0 2964 <1> ; CHG: all 2965 <1> ; STT: es = ds = ss 2966 <1> bb_check_hit: 2967 <1> lframe near 2968 0000328A 5589E5 <1> lenter 2969 0000328D 31C0 <1> xor ax, ax 2970 <1> lequ 1, flag_trigger 2971 <1> lequ 2, flag_pass 2972 <1> lequ 4, flag_match 2973 <1> lvar word, flags 2974 0000328F 50 <1> push ax 2975 <1> 2976 <1> ; Finish up. Check if it was one of _our_ breakpoints. 2977 00003290 813E[DA0B][947A] <1> cmp word [run_int], int3msg 2978 00003296 7505 <1> jne @F ; if not interrupt 03h --> 2979 <1> 2980 <1> ; Get previous cs:eip (where breakpoint was executed if any at all). 2981 00003298 E86405 <1> call get_cseip_of_possible_breakpoint 2982 <1> ; dx:ax = linear address of previous cs:eip 2983 <1> ; bx = reg_cs 2984 0000329B EB16 <1> jmp .check 2985 <1> 2986 <1> @@: 2987 <1> ; For T/TP/P: if trace interrupt fired just while 2988 <1> ; pointing at a bb point, do match. 2989 0000329D 813E[DA0B][717A] <1> cmp word [run_int], int1msg 2990 000032A3 7403E95501 <1> jne .gg9 2991 <1> 2992 000032A8 800E[A100]04 <1> setopt [internalflags2], dif2_tpg_do_not_adjust 2993 <1> ; remember that we should not adjust 2994 000032AD 66 <1> _386_PM_o32 2995 000032AE 31C9 <1> xor cx, cx 2996 000032B0 E8A104 <1> call get_cseip_ecx_linear 2997 <1> ; get linear of this cs:(e)ip 2998 <1> .check: 2999 000032B3 7303E94501 <1> jc .gg9 3000 <1> 3001 <1> ; Store the matched address (if any) here in case of non-hit 3002 <1> ; match. (Ie, non-hit pass match or non-hit non-pass match.) 3003 000032B8 A3[B800] <1> mov word [gg_next_cseip_linear], ax 3004 000032BB 8916[BA00] <1> mov word [gg_next_cseip_linear + 2], dx 3005 <1> 3006 000032BF 87DA <1> xchg bx, dx 3007 000032C1 91 <1> xchg cx, ax ; bx:cx = linear address of previous cs:eip 3008 000032C2 31C0 <1> xor ax, ax 3009 <1> .loop: 3010 000032C4 53 <1> push bx 3011 000032C5 50 <1> push ax 3012 000032C6 E81058 <1> call calcpointbit ; bx = index, ah = value 3013 000032C9 84A7[0201] <1> test byte [b_bplist.used_mask+bx], ah 3014 <1> ; (NC) 3015 000032CD 7503E91901 <1> jz .next 3016 000032D2 84A7[0401] <1> test byte [b_bplist.disabled_mask+bx], ah 3017 <1> ; (NC) 3018 000032D6 7403E91001 <1> jnz .next 3019 000032DB 58 <1> pop ax 3020 000032DC 5B <1> pop bx 3021 000032DD 53 <1> push bx 3022 000032DE 50 <1> push ax 3023 000032DF 89C6 <1> mov si, ax 3024 000032E1 01F6 <1> add si, si 3025 000032E3 01F6 <1> add si, si 3026 <1> %if BPSIZE == 4 3027 <1> %elif BPSIZE == 5 3028 <1> add si, ax 3029 <1> %elif BPSIZE == 6 3030 <1> add si, ax ; * 5 3031 <1> add si, ax ; * 6 3032 <1> %elif BPSIZE == 9 3033 000032E5 01F6 <1> add si, si ; * 8 3034 000032E7 01C6 <1> add si, ax ; * 9 3035 <1> %else 3036 <1> %error Unexpected breakpoint size 3037 <1> %endif 3038 000032E9 81C6[0601] <1> add si, b_bplist.bp ; -> point 3039 <1> 3040 000032ED E83F01 <1> call gg_bb_lods_bp_linear 3041 <1> 3042 000032F0 E89003 <1> call gg_bb_check_is_first 3043 000032F3 7203E9F300 <1> jnc .next 3044 <1> 3045 000032F8 39C8 <1> cmp ax, cx 3046 000032FA 7403E9EC00 <1> jne .next 3047 000032FF 39DA <1> cmp dx, bx 3048 00003301 7403E9E500 <1> jne .next 3049 <1> 3050 <1> .hit: 3051 00003306 58 <1> pop ax 3052 00003307 50 <1> push ax 3053 <1> 3054 00003308 804EFE04 <1> or byte [bp + ?flags], ?flag_match 3055 <1> 3056 0000330C 89C7 <1> mov di, ax 3057 0000330E 01FF <1> add di, di 3058 <1> 3059 00003310 8BB5[D601] <1> mov si, [b_bplist.when + di] 3060 <1> ; si -> condition 3061 00003314 85F6 <1> test si, si ; any ? 3062 00003316 741E <1> jz @F ; no --> 3063 <1> %if _PM 3064 00003318 E85E05 <1> call resetmode 3065 <1> %endif 3066 0000331B FF36[F00A] <1> push word [rc] 3067 0000331F 8F06[F20A] <1> pop word [priorrc] 3068 00003323 AC <1> lodsb 3069 00003324 E8C07F <1> call getexpression ; parse stored expression 3070 00003327 E8D985 <1> call chkeol 3071 0000332A E8CC79 <1> call toboolean ; get boolean 3072 0000332D 85D2 <1> test dx, dx ; true ? 3073 0000332F 7503E9B700 <1> jz .next ; no, skip --> 3074 00003334 58 <1> pop ax 3075 00003335 50 <1> push ax 3076 <1> @@: 3077 <1> 3078 00003336 8D9D[9601] <1> lea bx, [b_bplist.counter + di] 3079 <1> ; word [bx] = this matched point's counter 3080 <1> 3081 0000333A F646FE03 <1> test byte [bp + ?flags], ?flag_trigger | ?flag_pass 3082 0000333E 7413 <1> jz @F ; none set yet ? --> 3083 00003340 E8C900 <1> call step_pass_counter ; step counter even if already matched 3084 00003343 7203E9A300 <1> jnc .next ; (either is already set, so additional 3085 <1> ; setting of ?flag_pass is skipped) 3086 00003348 F646FE01 <1> test byte [bp + ?flags], ?flag_trigger 3087 0000334C 7403E99A00 <1> jnz .next ; (trigger is already set, so skip triggering) 3088 00003351 EB05 <1> jmp .setup_trigger ; triggered (after previous pass match) 3089 <1> 3090 <1> @@: 3091 00003353 E8B600 <1> call step_pass_counter ; step counter of matched point, no flag yet 3092 00003356 7340 <1> jnc .check_pass ; not triggered, check for pass match --> 3093 <1> 3094 <1> .setup_trigger: 3095 <1> ; Trigger! (And the first detected triggering point.) 3096 00003358 804EFE01 <1> or byte [bp + ?flags], ?flag_trigger 3097 <1> 3098 0000335C 51 <1> push cx 3099 0000335D BF[0E08] <1> mov di, line_out 3100 00003360 BE[F16D] <1> mov si, msg.bb_hit.1 3101 00003363 E89E00 <1> call copy_single_counted_string 3102 <1> ; Now si -> msg.bb_hit.2.nocounter 3103 <1> 3104 00003366 89C2 <1> mov dx, ax 3105 <1> ; Store breakpoint index in message. 3106 00003368 E88A86 <1> call hexbyte ; store index of this point 3107 <1> 3108 <1> ; Get counter of this breakpoint. 3109 0000336B 8B07 <1> mov ax, word [bx] 3110 <1> 3111 <1> ; Is it equal to default ? 3112 0000336D 3D0080 <1> cmp ax, 8000h 3113 00003370 7409 <1> je @F ; yes, skip --> 3114 <1> 3115 00003372 BE[2B6E] <1> mov si, msg.bb_hit.2.counter 3116 00003375 E88C00 <1> call copy_single_counted_string 3117 <1> ; Now si -> msg.bb_hit.3.counter.no_id 3118 <1> 3119 <1> ; Store counter in message. 3120 00003378 E87386 <1> call hexword 3121 <1> 3122 <1> @@: 3123 0000337B F606[A000]08 <1> testopt [internalflags2], dif2_gg_is_gg 3124 00003380 7407 <1> jz @F 3125 00003382 F606[7E00]08 <1> testopt [options], gg_bb_hit_no_repeat 3126 00003387 EB05 <1> jmp @FF 3127 <1> @@: 3128 00003389 F606[7E00]10 <1> testopt [options], tp_bb_hit_no_repeat 3129 <1> @@: 3130 0000338E 7406 <1> jz @F 3131 00003390 C706[DC0B][E003] <1> mov word [lastcmd], dmycmd 3132 <1> @@: 3133 00003396 EB1D <1> jmp .trigger_common 3134 <1> 3135 <1> 3136 <1> .check_pass: 3137 00003398 7451 <1> jz .next ; no pass match ? --> 3138 <1> 3139 0000339A 804EFE02 <1> or byte [bp + ?flags], ?flag_pass 3140 <1> 3141 0000339E 51 <1> push cx 3142 0000339F BF[0E08] <1> mov di, line_out 3143 000033A2 BE[0E6E] <1> mov si, msg.bb_pass.1 3144 000033A5 E85C00 <1> call copy_single_counted_string 3145 <1> ; Now si -> msg.bb_pass.2 3146 <1> 3147 000033A8 89C2 <1> mov dx, ax 3148 <1> ; Store breakpoint index in message. 3149 000033AA E84886 <1> call hexbyte ; store index of this point 3150 <1> 3151 000033AD E85400 <1> call copy_single_counted_string 3152 <1> ; Now si -> msg.bb_pass.3.no_id 3153 <1> 3154 <1> ; Get counter of this breakpoint. 3155 000033B0 8B07 <1> mov ax, word [bx] 3156 <1> ; Store counter in message. 3157 000033B2 E83986 <1> call hexword 3158 <1> 3159 <1> .trigger_common: 3160 000033B5 53 <1> push bx 3161 000033B6 BBFFFF <1> mov bx, -1 3162 000033B9 E82B53 <1> call get_set_id_offset_length 3163 000033BC F6C7FC <1> test bh, 63 << 2 ; length nonzero ? 3164 000033BF 7421 <1> jz @F ; no --> 3165 <1> 3166 <1> ; The maximum length of a short ID is based on 3167 <1> ; how much space there is after the longest message 3168 <1> ; ("Passed ..., counter=XXXX") assuming 80 columns. 3169 000033C1 BE[416E] <1> mov si, msg.bb_hitpass_id.short 3170 000033C4 80FF74 <1> cmp bh, 29 << 2 ; long ? 3171 000033C7 7203 <1> jb .trigger_short_id 3172 <1> ; This jump MUST be a jb, not jbe. The jbe 3173 <1> ; would not match ZR for words where the 3174 <1> ; idbuffer offset is a nonzero value. 3175 000033C9 BE[396E] <1> mov si, msg.bb_hitpass_id.long 3176 <1> .trigger_short_id: 3177 <1> 3178 000033CC E83500 <1> call copy_single_counted_string 3179 000033CF 88F9 <1> mov cl, bh 3180 000033D1 D0E9 <1> shr cl, 1 3181 000033D3 D0E9 <1> shr cl, 1 ; cx = length 3182 000033D5 81E3FF03 <1> and bx, 1023 ; bx = offset 3183 000033D9 8DB7[FA01] <1> lea si, [b_bplist.idbuffer + bx] 3184 000033DD F3A4 <1> rep movsb 3185 <1> 3186 000033DF BE[366E] <1> mov si, msg.bb_hitpass_id.after 3187 <1> 3188 <1> @@: 3189 000033E2 5B <1> pop bx 3190 000033E3 E81E00 <1> call copy_single_counted_string 3191 <1> 3192 000033E6 893E[C200] <1> mov word [bb_deferred_message_in_lineout_behind], di 3193 000033EA 59 <1> pop cx 3194 <1> 3195 <1> .next: 3196 000033EB 58 <1> pop ax 3197 000033EC 5B <1> pop bx 3198 <1> 3199 000033ED 40 <1> inc ax 3200 000033EE 83F810 <1> cmp ax, _NUM_B_BP 3201 000033F1 7303E9CEFE <1> jb .loop 3202 <1> 3203 000033F6 8B46FE <1> mov ax, word [bp + ?flags] 3204 000033F9 A807 <1> test al, ?flag_pass | ?flag_trigger | ?flag_match 3205 000033FB 7503 <1> jnz .return ; (NC) 3206 <1> 3207 <1> .gg9: 3208 000033FD 31C0 <1> xor ax, ax 3209 000033FF F9 <1> stc 3210 <1> .return: 3211 00003400 89EC5D <1> lleave 3212 00003403 C3 <1> retn 3213 <1> 3214 <1> 3215 <1> ; INP: byte [ds:si] = length of source string 3216 <1> ; ds:si + 1 -> source string 3217 <1> ; es:di -> destination buffer 3218 <1> ; OUT: cx = 0 3219 <1> ; ds:si -> after source string 3220 <1> ; es:di -> after written string 3221 <1> ; CHG: - 3222 <1> ; STT: UP 3223 <1> copy_single_counted_string: 3224 00003404 91 <1> xchg ax, cx 3225 00003405 31C0 <1> xor ax, ax 3226 00003407 AC <1> lodsb 3227 00003408 91 <1> xchg ax, cx 3228 00003409 F3A4 <1> rep movsb 3229 0000340B C3 <1> retn 3230 <1> 3231 <1> 3232 <1> ; INP: word [bx] = pass counter of this breakpoint 3233 <1> ; OUT: NC if to proceed (no trigger), 3234 <1> ; ZR if no pass message display 3235 <1> ; NZ if pass message display 3236 <1> ; CY if to trigger 3237 <1> step_pass_counter: 3238 0000340C F707FF3F <1> test word [bx], 3FFFh ; is it already at a terminal state ? 3239 00003410 740A <1> jz .no_decrement ; yes, do not further decrement --> 3240 00003412 FF0F <1> dec word [bx] ; decrement (to 0/4000h/8000h/C000h) 3241 00003414 7417 <1> jz .trigger ; case for decrementing 1 to 0 --> 3242 00003416 813F0040 <1> cmp word [bx], 4000h 3243 0000341A 7411 <1> je .trigger ; case for decrementing 4001h to 4000h 3244 <1> .no_decrement: 3245 0000341C 813F0080 <1> cmp word [bx], 8000h ; decrement resulted in 8000h 3246 00003420 740B <1> je .trigger ; or was already in that state? --> 3247 00003422 813F00C0 <1> cmp word [bx], 0_C000h 3248 00003426 7405 <1> je .trigger ; or C000h --> 3249 <1> .proceed: 3250 00003428 F6470140 <1> test byte [bx + 1], 40h ; (NC) ZR if no pass message 3251 0000342C C3 <1> retn 3252 <1> 3253 <1> .trigger: 3254 0000342D F9 <1> stc 3255 0000342E C3 <1> retn 3256 <1> %endif 3257 <1> 3258 <1> 3259 <1> ; INP: si -> linear address of breakpoint 3260 <1> ; (32 bits if _PM, else 24 bits) 3261 <1> ; OUT: dx:ax = linear address of breakpoint 3262 <1> ; si -> behind linear address 3263 <1> gg_bb_lods_bp_linear: 3264 0000342F AD <1> lodsw 3265 00003430 92 <1> xchg ax, dx 3266 <1> %if _PM 3267 00003431 AD <1> lodsw 3268 <1> %else 3269 <1> xor ax, ax 3270 <1> lodsb 3271 <1> %endif 3272 00003432 92 <1> xchg ax, dx 3273 00003433 C3 <1> retn 3274 <1> 3275 <1> 3276 <1> ; INP: word [run_int] 3277 <1> ; word [reg_cs] 3278 <1> ; (d)word [reg_eip] 3279 <1> ; gg/bb breakpoints 3280 <1> ; OUT: NC if a breakpoint was hit, 3281 <1> ; (e)ip must be decremented by one 3282 <1> ; word [bb_deferred_message_in_lineout_behind] set 3283 <1> ; and line_out written if bb point matched 3284 <1> ; (The bb point's index is already written to this msg.) 3285 <1> ; ax = 7 if non-bb match, else 3286 <1> ; ax & 1 set if non-pass match (actual hit), 3287 <1> ; else ax & 2 set if pass match (consider as hit first, 3288 <1> ; but dump registers next (not to silent buffer) 3289 <1> ; and then continue execution) 3290 <1> ; else ax & 4 always set, indicates any match 3291 <1> ; (including matches that should merely continue) 3292 <1> ; all pass points' counters stepped 3293 <1> ; CY if no breakpoint was hit, 3294 <1> ; ax = 0 3295 <1> ; CHG: all 3296 <1> ; STT: es = ds = ss 3297 <1> gg_bb_check_hit: 3298 00003434 E853FE <1> call bb_check_hit 3299 00003437 720D <1> jc .gg_check_hit 3300 <1> 3301 00003439 A801 <1> test al, 1 ; actual bb hit ? 3302 0000343B 7507 <1> jnz .ret_NC ; yes, return as hit 3303 <1> 3304 0000343D 50 <1> push ax ; bb is pass match or any other match, 3305 0000343E E80500 <1> call gg_check_hit ; is gg a match ? 3306 00003441 58 <1> pop ax 3307 00003442 732D <1> jnc gg_check_hit.hit ; yes --> (set NC, ax = 7) 3308 <1> 3309 <1> ; Here, we return the flags 2 (set if pass match) and 3310 <1> ; 4 (always set, indicating any match). 3311 <1> 3312 <1> .ret_NC: 3313 00003444 F8 <1> clc 3314 00003445 C3 <1> retn 3315 <1> 3316 <1> .gg_check_hit: 3317 <1> ; (fall through) 3318 <1> 3319 <1> %ifn _NUM_G_BP 3320 <1> gg_check_hit: 3321 <1> stc 3322 <1> retn 3323 <1> %else 3324 <1> ; INP: word [run_int] 3325 <1> ; word [reg_cs] 3326 <1> ; (d)word [reg_eip] 3327 <1> ; bb breakpoints 3328 <1> ; OUT: NC if a breakpoint was hit, 3329 <1> ; (e)ip must be decremented by one 3330 <1> ; ax = 7 3331 <1> ; CY if no breakpoint was hit, 3332 <1> ; ax = 0 3333 <1> ; CHG: all 3334 <1> ; STT: es = ds = ss 3335 <1> gg_check_hit: 3336 <1> ; Finish up. Check if it was one of _our_ breakpoints. 3337 00003446 813E[DA0B][947A] <1> cmp word [run_int], int3msg 3338 0000344C 752D <1> jne .gg9 ; if not interrupt 03h --> 3339 <1> 3340 <1> ; Get previous cs:eip (where breakpoint was executed if any at all). 3341 0000344E E8AE03 <1> call get_cseip_of_possible_breakpoint 3342 <1> ; dx:ax = linear address of previous cs:eip 3343 00003451 7228 <1> jc .gg9 3344 00003453 BE[7C07] <1> mov si, g_bplist.bp 3345 00003456 31C9 <1> xor cx, cx 3346 00003458 8A4CFF <1> mov cl, byte [si-1] ; number of saved breakpoints 3347 0000345B E31E <1> jcxz .gg9 ; none, so always unexpected --> 3348 <1> 3349 0000345D 89C7 <1> mov di, ax 3350 0000345F 89D3 <1> mov bx, dx ; bx:di = linear address of previous cs:(e)ip 3351 <1> 3352 <1> .loop_gg6: 3353 00003461 E8CBFF <1> call gg_bb_lods_bp_linear 3354 <1> 3355 00003464 E81C02 <1> call gg_bb_check_is_first 3356 00003467 730D <1> jnc .next 3357 <1> 3358 00003469 39DA <1> cmp dx, bx 3359 0000346B 7509 <1> jne .next 3360 0000346D 39F8 <1> cmp ax, di 3361 0000346F 7505 <1> jne .next 3362 <1> 3363 <1> .hit: 3364 00003471 B80700 <1> mov ax, 7 3365 00003474 F8 <1> clc 3366 00003475 C3 <1> retn 3367 <1> 3368 <1> .next: 3369 <1> 3370 <1> %if BPSIZE == 4 || BPSIZE == 5 3371 <1> inc si ; skip saved (actually CCh) byte 3372 <1> %elif BPSIZE == 6 3373 <1> add si, 3 ; skip word offset and byte content 3374 <1> %elif BPSIZE == 9 3375 00003476 83C605 <1> add si, 5 ; skip dword offset and byte content 3376 <1> %endif 3377 <1> ; BPSIZE implied 3378 00003479 E2E6 <1> loop .loop_gg6 ; try next if there's any 3379 <1> 3380 <1> .gg9: 3381 0000347B 31C0 <1> xor ax, ax 3382 0000347D F9 <1> stc 3383 0000347E C3 <1> retn 3384 <1> %endif 3385 <1> 3386 <1> 3387 <1> %if _DELAY_BEFORE_BP 3388 <1> delay_before_bp: 3389 0000347F F606[8700]04 <1> testopt [options3], opt3_delay_before_bp 3390 00003484 7428 <1> jz .ret 3391 00003486 F606[A600]80 <1> testopt [internalflags3], dif3_delayed 3392 0000348B 7521 <1> jnz .ret 3393 0000348D 800E[A600]80 <1> setopt [internalflags3], dif3_delayed 3394 00003492 06 <1> push es 3395 00003493 57 <1> push di 3396 00003494 50 <1> push ax 3397 00003495 BF4000 <1> mov di, 40h ; dual mode segment/selector 3398 00003498 8EC7 <1> mov es, di 3399 0000349A 268B3E6C00 <1> mov di, word [es:6Ch] 3400 <1> @@: 3401 0000349F 263B3E6C00 <1> cmp di, word [es:6Ch] 3402 000034A4 7505 <1> jne @F 3403 000034A6 E8268C <1> call idle 3404 000034A9 EBF4 <1> jmp @B 3405 <1> @@: 3406 000034AB 58 <1> pop ax 3407 000034AC 5F <1> pop di 3408 000034AD 07 <1> pop es 3409 <1> .ret: 3410 000034AE C3 <1> retn 3411 <1> %endif 3412 <1> 3413 <1> 3414 <1> %if _BREAKPOINTS 3415 <1> bb_writepoints_init_reset: 3416 000034AF BF[0601] <1> mov di, b_bplist.bp 3417 000034B2 B0CC <1> mov al, 0CCh 3418 000034B4 B91000 <1> mov cx, _NUM_B_BP 3419 <1> .loop: 3420 000034B7 83C708 <1> add di, BPSIZE - 1 3421 000034BA AA <1> stosb 3422 000034BB E2FA <1> loop .loop 3423 <1> 3424 <1> ; This is called first by gg before writing any of the 3425 <1> ; gg points. So, if it fails, it only needs to restore 3426 <1> ; its own points, not any of the gg points. 3427 <1> ; This is also called deep down in run_with_bb when called 3428 <1> ; from tt or pp. In this case, there may be a proceed 3429 <1> ; breakpoint already written. On failure, after having 3430 <1> ; restored all yet-written bb points, this proceed 3431 <1> ; breakpoint is restored too. 3432 <1> ; 3433 <1> ; INP: bb breakpoints 3434 <1> ; tpg_proceed_bp 3435 <1> ; OUT: does not return if an error occurred, 3436 <1> ; instead jumps to cmd3 3437 <1> ; STT: might return modeswitched 3438 <1> bb_writepoints_init: 3439 000034BD E8D500 <1> call bb_writepoints 3440 000034C0 735B <1> jnc .retn 3441 <1> 3442 000034C2 83EC20 <1> sub sp, _NUM_B_BP * 2 ; reserve space for bb error info 3443 000034C5 89E5 <1> mov bp, sp 3444 <1> ; cx = index of failed point 3445 <1> ; = index above last one to restore 3446 <1> ; ax = error info of failed point 3447 000034C7 50 <1> push ax 3448 000034C8 51 <1> push cx 3449 000034C9 E8B100 <1> call bb_restorepoints_and_init_error_info 3450 <1> 3451 <1> bb_restorepoints_exit: equ $ 3452 <1> ; If this is not gg and T/P wrote a proceed breakpoint, 3453 <1> ; restore it here (after having restored bb points). 3454 000034CC E8770B <1> call proceed_writepoint_restore 3455 <1> ; This call might return modeswitched. 3456 000034CF BB0000 <1> mov bx, 0 ; (preserve CF) 3457 000034D2 7305 <1> jnc @F 3458 000034D4 80CC80 <1> or ah, 80h ; mark error during restoration 3459 000034D7 89C3 <1> mov bx, ax ; bx & 80h set: error restoring pp 3460 <1> @@: 3461 <1> 3462 000034D9 59 <1> pop cx 3463 000034DA 58 <1> pop ax ; error info + index of failed point 3464 <1> 3465 000034DB 89CE <1> mov si, cx 3466 000034DD 01F6 <1> add si, si 3467 000034DF 01F6 <1> add si, si ; * 4 3468 <1> %if BPSIZE == 4 3469 <1> %elif BPSIZE == 5 3470 <1> add si, cx ; * 5 3471 <1> %elif BPSIZE == 6 3472 <1> add si, cx ; * 5 3473 <1> add si, cx ; * 6 3474 <1> %elif BPSIZE == 9 3475 000034E1 01F6 <1> add si, si ; * 8 3476 000034E3 01CE <1> add si, cx ; * 9 3477 <1> %else 3478 <1> %error Unexpected breakpoint size 3479 <1> %endif 3480 000034E5 81C6[0601] <1> add si, b_bplist.bp ; -> point 3481 <1> 3482 000034E9 53 <1> push bx 3483 <1> 3484 000034EA E860FD <1> call put_deferred_message_silent 3485 <1> ; CHG: dx 3486 <1> 3487 000034ED 83F9FF <1> cmp cx, -1 3488 000034F0 740B <1> je @F 3489 <1> 3490 <1> ; si-> point 3491 <1> ; ax = info (ah = reason, al = new value if reason 3) 3492 <1> ; cx = 0-based index of initially failed point 3493 000034F2 FF7402 <1> push word [si + 2] 3494 000034F5 FF34 <1> push word [si] ; stack: linear address 3495 000034F7 BB0040 <1> mov bx, 4000h ; bh = 40h (bb), 3496 <1> ; bl = what we tried to restore (n/a) 3497 000034FA E8B20B <1> call display_breakpoint_failure 3498 <1> ; This function calls resetmode. 3499 <1> 3500 <1> @@: 3501 000034FD E8E501 <1> call bb_handlefailedrestore 3502 <1> ; This function calls resetmode. 3503 <1> 3504 00003500 58 <1> pop ax 3505 00003501 F6C480 <1> test ah, 80h ; pp failed to restore ? 3506 00003504 7411 <1> jz @F 3507 <1> 3508 00003506 FF36[C600] <1> push word [tpg_proceed_bp + 2] 3509 0000350A FF36[C400] <1> push word [tpg_proceed_bp] 3510 0000350E 8A1E[CC00] <1> mov bl, [tpg_proceed_bp + BPSIZE - 1] 3511 00003512 B700 <1> mov bh, 0 ; proceed breakpoint 3512 00003514 E8980B <1> call display_breakpoint_failure 3513 <1> @@: 3514 00003517 83C420 <1> add sp, _NUM_B_BP * 2 ; discard bb error info 3515 0000351A E9E3CA <1> jmp cmd3 3516 <1> 3517 <1> .retn: 3518 0000351D C3 <1> retn 3519 <1> %endif 3520 <1> 3521 <1> 3522 <1> %if _NUM_G_BP 3523 <1> ; INP: ss:bp -> behind gg error info space 3524 <1> ; cx = number of error info words on stack 3525 <1> ; OUT: error info space initialised to all zeros 3526 <1> ; CHG: ax, di, es 3527 <1> ; STT: sets es to ss 3528 <1> gg_restorepoints_init_error_info: 3529 0000351E 16 <1> push ss 3530 0000351F 07 <1> pop es 3531 00003520 89EF <1> mov di, bp ; es:di -> behind error info 3532 00003522 51 <1> push cx 3533 00003523 4F <1> dec di 3534 00003524 4F <1> dec di 3535 00003525 31C0 <1> xor ax, ax 3536 00003527 FD <1> std ; _AMD_ERRATUM_109_WORKAROUND does not apply 3537 00003528 F3AB <1> rep stosw ; initialize error info 3538 0000352A FC <1> cld 3539 0000352B 59 <1> pop cx 3540 0000352C C3 <1> retn 3541 <1> 3542 <1> 3543 <1> gg_restorepoints_and_init_error_info: 3544 0000352D E8EEFF <1> call gg_restorepoints_init_error_info 3545 <1> 3546 <1> ; Restore gg breakpoints. 3547 <1> ; On errors remember failures but restore all remaining anyway. 3548 <1> ; 3549 <1> ; INP: cx = number of breakpoints to restore (<= 255), 3550 <1> ; assumed at beginning of g_bplist.bp 3551 <1> ; ss:bp -> behind cx words for error info 3552 <1> ; OUT: NC if all points restored successfully 3553 <1> ; CY if at least one point couldn't be restored, 3554 <1> ; error info filled, high byte: 3555 <1> ; reason = 0 = no error (this point didn't fail), 3556 <1> ; 1 = couldn't write, 3557 <1> ; 2 = unreachable, 3558 <1> ; 3 = overwritten), 3559 <1> ; low byte: new byte value (if reason 3) 3560 <1> ; CHG: ax, bx, (e)dx, si, di, es 3561 <1> ; STT: sets es to ss 3562 <1> ; might return modeswitched 3563 <1> ; 3564 <1> ; Note: The points are restored in reverse, from the last back 3565 <1> ; to the front. The first point is handled last. 3566 <1> gg_restorepoints: 3567 00003530 89CE <1> mov si, cx 3568 00003532 01F6 <1> add si, si 3569 00003534 01F6 <1> add si, si ; * 4 3570 <1> %if BPSIZE == 4 3571 <1> %elif BPSIZE == 5 3572 <1> add si, cx ; * 5 3573 <1> %elif BPSIZE == 6 3574 <1> add si, cx ; * 5 3575 <1> add si, cx ; * 6 3576 <1> %elif BPSIZE == 9 3577 00003536 01F6 <1> add si, si ; * 8 3578 00003538 01CE <1> add si, cx ; * 9 3579 <1> %else 3580 <1> %error Unexpected breakpoint size 3581 <1> %endif 3582 0000353A 81C6[7307] <1> add si, g_bplist.bp - BPSIZE ; -> last point in list (first to restore) 3583 <1> 3584 0000353E F8 <1> clc ; assume success 3585 0000353F 51 <1> push cx 3586 00003540 9C <1> pushf 3587 00003541 E329 <1> jcxz .done ; nothing to do --> 3588 <1> .loop: 3589 00003543 E8E400 <1> call gg_writepoints_restore ; Restore breakpoint bytes. 3590 00003546 7324 <1> jnc .done ; successful --> 3591 00003548 5A <1> pop dx ; discard flags 3592 00003549 5B <1> pop bx 3593 0000354A 53 <1> push bx 3594 0000354B 9C <1> pushf ; store (CY) flags 3595 <1> 3596 0000354C 50 <1> push ax 3597 0000354D 89F7 <1> mov di, si 3598 0000354F 81EF[8507] <1> sub di, BPSIZE+g_bplist.bp 3599 <1> %if BPSIZE == 5 || BPSIZE == 6 || BPSIZE == 9 3600 00003553 89F8 <1> mov ax, di 3601 00003555 31D2 <1> xor dx, dx 3602 00003557 BF0900 <1> mov di, BPSIZE 3603 0000355A F7F7 <1> div di 3604 0000355C 89C7 <1> mov di, ax ; di = 0-based point index 3605 0000355E D1E7 <1> shl di, 1 ; di = 0-based error info offset 3606 <1> %elif BPSIZE == 4 3607 <1> shr di, 1 ; di = 0-based error info offset 3608 <1> %else 3609 <1> %error "Unexpected BPSIZE" 3610 <1> %endif 3611 00003560 29DF <1> sub di, bx 3612 00003562 29DF <1> sub di, bx 3613 00003564 8F03 <1> pop word [bp+di] ; store error info 3614 00003566 49 <1> dec cx ; exclude the failed point 3615 00003567 83EE12 <1> sub si, 2*BPSIZE ; -> the point _before_ failed one 3616 0000356A EBD7 <1> jmp short .loop 3617 <1> .done: 3618 0000356C 9D <1> popf ; get flags. CY if any couldn't be restored 3619 0000356D 59 <1> pop cx ; restore cx 3620 0000356E C3 <1> retn 3621 <1> %endif 3622 <1> 3623 <1> 3624 <1> %if _BREAKPOINTS 3625 <1> ; INP: ss:bp -> error info space (one word per bb breakpoint) 3626 <1> ; OUT: error info space initialised to all zeros 3627 <1> ; CHG: ax, di, es 3628 <1> ; STT: sets es to ss 3629 <1> ; 3630 <1> ; Note: This initialises words for all bb points. 3631 <1> ; While the value in cx is preserved, it is 3632 <1> ; assumed that space for all points is allocated. 3633 <1> bb_restorepoints_init_error_info: 3634 0000356F 16 <1> push ss 3635 00003570 07 <1> pop es 3636 00003571 89EF <1> mov di, bp 3637 00003573 31C0 <1> xor ax, ax 3638 00003575 51 <1> push cx 3639 00003576 B91000 <1> mov cx, _NUM_B_BP 3640 00003579 F3AB <1> rep stosw 3641 0000357B 59 <1> pop cx 3642 0000357C C3 <1> retn 3643 <1> 3644 <1> 3645 <1> bb_restorepoints_and_init_error_info: 3646 0000357D E8EFFF <1> call bb_restorepoints_init_error_info 3647 <1> 3648 <1> ; Restore bb breakpoints. 3649 <1> ; On errors remember failures but restore all remaining anyway. 3650 <1> ; 3651 <1> ; INP: cx = index above last one to restore 3652 <1> ; ss:bp -> error info space (one word per bb breakpoint) 3653 <1> ; OUT: NC if all points restored successfully 3654 <1> ; CY if at least one point couldn't be restored, 3655 <1> ; error info filled, high byte: 3656 <1> ; reason = 0 = no error (this point didn't fail), 3657 <1> ; 1 = couldn't write, 3658 <1> ; 2 = unreachable, 3659 <1> ; 3 = overwritten), 3660 <1> ; low byte: new byte value (if reason 3) 3661 <1> ; CHG: ax, bx, cx, (e)dx, si, di, es 3662 <1> ; STT: sets es to ss 3663 <1> ; might return modeswitched 3664 <1> ; 3665 <1> ; Note: The points are restored in reverse, from the list back 3666 <1> ; to the front. The first point is handled last. 3667 <1> bb_restorepoints: 3668 <1> 3669 00003580 F8 <1> clc ; assume success 3670 00003581 9C <1> pushf 3671 00003582 E30F <1> jcxz .done 3672 <1> .loop: 3673 00003584 E81400 <1> call bb_writepoints_restore 3674 00003587 730A <1> jnc .done 3675 00003589 5A <1> pop dx ; (discard flags) 3676 0000358A 9C <1> pushf ; store (CY) flags 3677 <1> ; cx = index of point that failed to write 3678 <1> ; ah = reason, al = new byte value (reason 3) 3679 0000358B 89CF <1> mov di, cx 3680 0000358D 01FF <1> add di, di 3681 0000358F 8903 <1> mov word [bp + di], ax ; store error info 3682 00003591 EBF1 <1> jmp .loop 3683 <1> 3684 <1> .done: 3685 00003593 9D <1> popf ; CF 3686 00003594 C3 <1> retn 3687 <1> 3688 <1> 3689 <1> ; Loop through bb breakpoints and exchange the saved 3690 <1> ; byte with that one at the actual address. Used to write 3691 <1> ; the breakpoints. 3692 <1> ; 3693 <1> ; INP: - 3694 <1> ; OUT: NC if successful 3695 <1> ; CY if error writing a point, 3696 <1> ; cx = index of point that failed to write 3697 <1> ; (all PRIOR points were processed successfully, 3698 <1> ; either written successfully or skipped) 3699 <1> ; CHG: ax, bx, (e)dx, si, cx, di 3700 <1> ; STT: might return modeswitched 3701 <1> bb_writepoints: 3702 00003595 31C9 <1> xor cx, cx 3703 00003597 BF0100 <1> mov di, 1 3704 0000359A A9 <1> db __TEST_IMM16 ; (skip xor, NC) 3705 <1> 3706 <1> ; Same, but go through the breakpoints in reverse order 3707 <1> ; and check that what we overwrite is a 0CCh byte. If so, 3708 <1> ; restore the original value. (The 0CCh is discarded.) 3709 <1> ; 3710 <1> ; INP: cx = index *above* last to write (_NUM_B_BP for all) 3711 <1> ; OUT: NC if successful 3712 <1> ; CY if error writing a point, 3713 <1> ; cx = index of point that failed to write 3714 <1> ; ah = 1 if error because point could not be written 3715 <1> ; ah = 2 if error because address is unreachable 3716 <1> ; ah = 3 if error because point contained non-0CCh value, 3717 <1> ; al = new byte 3718 <1> ; CHG: ax, bx, (e)dx, si, cx, di 3719 <1> ; STT: might return modeswitched 3720 <1> bb_writepoints_restore: 3721 0000359B 31FF <1> xor di, di ; (NC) 3722 <1> bb_wp: 3723 <1> lframe near 3724 0000359D 5589E5 <1> lenter 3725 <1> lvar word, is_write 3726 000035A0 57 <1> push di 3727 <1> 3728 000035A1 F646FE01 <1> test byte [bp + ?is_write], 1 3729 <1> ; (NC) is it writing ? 3730 000035A5 7459 <1> jz .next ; no, is restoring, first decrement cx --> 3731 <1> 3732 <1> .loop: 3733 000035A7 89C8 <1> mov ax, cx 3734 000035A9 E82D55 <1> call calcpointbit ; bx = index, ah = value 3735 000035AC 84A7[0201] <1> test byte [b_bplist.used_mask+bx], ah 3736 <1> ; (NC) 3737 000035B0 744E <1> jz .next 3738 000035B2 84A7[0401] <1> test byte [b_bplist.disabled_mask+bx], ah 3739 <1> ; (NC) 3740 000035B6 7548 <1> jnz .next 3741 <1> 3742 000035B8 89CE <1> mov si, cx 3743 000035BA 01F6 <1> add si, si 3744 000035BC 01F6 <1> add si, si ; * 4 3745 <1> %if BPSIZE == 4 3746 <1> %elif BPSIZE == 5 3747 <1> add si, cx ; * 5 3748 <1> %elif BPSIZE == 6 3749 <1> add si, cx ; * 5 3750 <1> add si, cx ; * 6 3751 <1> %elif BPSIZE == 9 3752 000035BE 01F6 <1> add si, si ; * 8 3753 000035C0 01CE <1> add si, cx ; * 9 3754 <1> %else 3755 <1> %error Unexpected breakpoint size 3756 <1> %endif 3757 000035C2 81C6[0601] <1> add si, b_bplist.bp ; -> point 3758 <1> 3759 000035C6 E866FE <1> call gg_bb_lods_bp_linear 3760 <1> ; dx:ax = linear address 3761 <1> 3762 000035C9 E8B700 <1> call gg_bb_check_is_first 3763 000035CC 7332 <1> jnc .next ; (NC) 3764 <1> 3765 000035CE E8CD02 <1> call getsegmented ; bx:(e)dx = segmented address 3766 <1> %if BPSIZE == 6 3767 <1> lodsw ; skip word offset 3768 <1> %elif BPSIZE == 9 3769 000035D1 AD <1> lodsw 3770 000035D2 AD <1> lodsw ; skip dword offset 3771 <1> %endif 3772 000035D3 AC <1> lodsb ; get byte to write 3773 000035D4 B402 <1> mov ah, 2 3774 000035D6 723E <1> jc .return ; not in PM anymore/address not available --> (CY) 3775 000035D8 F646FE01 <1> test byte [bp + ?is_write], 1 3776 <1> ; writing? 3777 000035DC 7517 <1> jnz .forward_nocheck ; yes --> 3778 <1> 3779 <1> .backward_check: 3780 000035DE 50 <1> push ax 3781 000035DF E88263 <1> call readmem ; read current byte 3782 000035E2 3CCC <1> cmp al, 0CCh ; is this still what we wrote? 3783 000035E4 B483 <1> mov ah, 83h ; (80h = error occurred while restoring) 3784 000035E6 F9 <1> stc 3785 000035E7 752D <1> jne .return_discard ; nope --> (CY) 3786 000035E9 58 <1> pop ax 3787 000035EA E84A63 <1> call writemem ; return the byte to its original value 3788 000035ED 7211 <1> jc .next ; failed --> (CY, handled there) 3789 000035EF C644FFCC <1> mov byte [si-1], 0CCh ; reset stored point 3790 000035F3 EB0B <1> jmp short .next 3791 <1> 3792 <1> .forward_nocheck: 3793 <1> %if _DELAY_BEFORE_BP 3794 000035F5 E887FE <1> call delay_before_bp 3795 <1> %endif 3796 000035F8 E83C63 <1> call writemem 3797 000035FB 7203 <1> jc .next 3798 000035FD 8844FF <1> mov byte [si-1], al ; save the previous byte there 3799 <1> .next: 3800 00003600 B401 <1> mov ah, 1 ; (in case of error) 3801 00003602 7212 <1> jc .return ; failed to write --> (CY) 3802 <1> 3803 00003604 F646FE01 <1> test byte [bp + ?is_write], 1 3804 00003608 7505 <1> jnz .is_write_next 3805 0000360A 49 <1> dec cx ; restore: decrement index 3806 0000360B 799A <1> jns .loop ; decremented to 0FFFFh ? no, loop --> 3807 0000360D EB06 <1> jmp .return_NC 3808 <1> 3809 <1> .is_write_next: 3810 0000360F 41 <1> inc cx ; write: increment index 3811 00003610 83F910 <1> cmp cx, _NUM_B_BP ; above last ? 3812 00003613 7292 <1> jb .loop ; no, loop --> 3813 <1> .return_NC: 3814 00003615 F8 <1> clc 3815 <1> .return: 3816 <1> .return_discard: 3817 00003616 730A <1> jnc .ret 3818 <1> 3819 00003618 F646FE01 <1> test byte [bp + ?is_write], 1 3820 <1> ; restoring ? 3821 0000361C 7503 <1> jnz .ret_CY ; no --> 3822 0000361E 80CC80 <1> or ah, 80h ; error occurred while restoring 3823 <1> .ret_CY: 3824 00003621 F9 <1> stc 3825 <1> .ret: 3826 00003622 89EC5D <1> lleave 3827 00003625 C3 <1> lret 3828 <1> %endif 3829 <1> 3830 <1> 3831 <1> %if _NUM_G_BP 3832 <1> ; Loop through saved breakpoints and exchange the saved 3833 <1> ; byte with that one at the actual address. Used to write 3834 <1> ; the breakpoints. 3835 <1> ; 3836 <1> ; INP: si-> current point 3837 <1> ; cx = number of points to write (might be zero) 3838 <1> ; OUT: NC if successful 3839 <1> ; CY if error writing a point, 3840 <1> ; cx = number of points still to write (including failed one) 3841 <1> ; (si-BPSIZE)-> point that failed 3842 <1> ; CHG: ax, bx, (e)dx, si, cx, di 3843 <1> gg_writepoints: 3844 00003626 BF0100 <1> mov di, 1 3845 00003629 A9 <1> db __TEST_IMM16 ; (skip xor, NC) 3846 <1> 3847 <1> ; Same, but go through the breakpoints in reverse order 3848 <1> ; and check that what we overwrite is a 0CCh byte. If so, 3849 <1> ; restore the original value. (The 0CCh is discarded.) 3850 <1> ; 3851 <1> ; Additionally: 3852 <1> ; OUT: CY if error writing a point, 3853 <1> ; ah = 1 if error because point could not be written 3854 <1> ; ah = 2 if error because address is unreachable 3855 <1> ; ah = 3 if error because point contained non-0CCh value, 3856 <1> ; al = new byte 3857 <1> gg_writepoints_restore: 3858 0000362A 31FF <1> xor di, di ; (NC) 3859 <1> gg_wp: 3860 0000362C E348 <1> jcxz .return ;if nothing to do --> (still NC from xor/test) 3861 <1> .loop: 3862 0000362E E8FEFD <1> call gg_bb_lods_bp_linear 3863 <1> ; dx:ax = linear address 3864 <1> 3865 00003631 E84F00 <1> call gg_bb_check_is_first 3866 00003634 7209 <1> jc @F ; if to handle this breakpoint --> 3867 <1> 3868 <1> ; Skip to next breakpoint. 3869 <1> %if BPSIZE == 4 || BPSIZE == 5 3870 <1> inc si ; -> after point 3871 <1> %elif BPSIZE == 6 3872 <1> add si, 3 ; skip word offset and byte content 3873 <1> %elif BPSIZE == 9 3874 00003636 83C605 <1> add si, 5 ; skip dword offset and byte content 3875 <1> %endif 3876 <1> ; BPSIZE implied 3877 <1> 3878 00003639 85FF <1> test di, di ; (NC) 3879 0000363B 7533 <1> jnz .next ; going forward --> 3880 0000363D EB23 <1> jmp .next_lea_si ; (NC) 3881 <1> 3882 <1> ; Handle this breakpoint. 3883 <1> @@: 3884 0000363F E85C02 <1> call getsegmented ; bx:(e)dx = segmented address 3885 <1> %if BPSIZE == 6 3886 <1> lodsw ; skip word offset 3887 <1> %elif BPSIZE == 9 3888 00003642 AD <1> lodsw 3889 00003643 AD <1> lodsw ; skip dword offset 3890 <1> %endif 3891 00003644 AC <1> lodsb ; get byte to write 3892 00003645 B402 <1> mov ah, 2 3893 00003647 722D <1> jc .return ; not in PM anymore/address not available --> (CY) 3894 00003649 85FF <1> test di, di ; writing? 3895 0000364B 751A <1> jnz .forward_nocheck ; yes --> 3896 <1> 3897 <1> .backward_check: 3898 0000364D 50 <1> push ax 3899 0000364E E81363 <1> call readmem ; read current byte 3900 00003651 3CCC <1> cmp al, 0CCh ; is this still what we wrote? 3901 00003653 B483 <1> mov ah, 83h ; (80h = error occurred while restoring) 3902 00003655 F9 <1> stc 3903 00003656 7529 <1> jne .return_discard ; nope --> (CY) 3904 00003658 58 <1> pop ax 3905 00003659 E8DB62 <1> call writemem ; return the byte to its original value 3906 0000365C 7212 <1> jc .next ; failed --> (CY, handled there) 3907 0000365E C644FFCC <1> mov byte [si-1], 0CCh ; reset stored point 3908 <1> .next_lea_si: 3909 00003662 8D74EE <1> lea si, [si-2*BPSIZE] ; adjust (for reverse writing) 3910 00003665 EB09 <1> jmp short .next 3911 <1> 3912 <1> .forward_nocheck: 3913 <1> %if _DELAY_BEFORE_BP 3914 00003667 E815FE <1> call delay_before_bp 3915 <1> %endif 3916 0000366A E8CA62 <1> call writemem 3917 0000366D 8844FF <1> mov byte [si-1], al ; save the previous byte there 3918 <1> .next: 3919 00003670 B401 <1> mov ah, 1 ; (in case of error) 3920 00003672 7202 <1> jc .return ; failed to write --> (CY) 3921 00003674 E2B8 <1> loop .loop 3922 <1> .return: ; (NC) 3923 00003676 730A <1> jnc .ret 3924 <1> 3925 00003678 85FF <1> test di, di ; restoring ? 3926 0000367A 7503 <1> jnz .ret_CY ; no --> 3927 0000367C 80CC80 <1> or ah, 80h ; error occurred while restoring 3928 <1> .ret_CY: 3929 0000367F F9 <1> stc 3930 00003680 52 <1> push dx ; (counteract effect of pop) 3931 <1> .return_discard: 3932 00003681 5A <1> pop dx 3933 <1> .ret: 3934 00003682 C3 <1> retn 3935 <1> %endif 3936 <1> 3937 <1> 3938 <1> ; INP: dx:ax = linear address of point to be (re)set 3939 <1> ; dword [internalflags2] 3940 <1> ; dword [gg_first_cseip_linear] 3941 <1> ; OUT: CY if to (re)set breakpoint 3942 <1> ; if: no flag set 3943 <1> ; or: dx:ax doesn't match, dif2_gg_skip_non_cseip clear 3944 <1> ; (setting non-cseip point) 3945 <1> ; or: dx:ax matches, dif2_gg_skip_cseip clear 3946 <1> ; (setting cseip point afterwards) 3947 <1> ; NC if to not (re)set breakpoint 3948 <1> ; if: dx:ax doesn't match, dif2_gg_skip_non_cseip set 3949 <1> ; (not setting non-cseip point afterwards) 3950 <1> ; or: dx:ax matches, dif2_gg_skip_cseip set 3951 <1> ; (not setting cseip point) 3952 <1> gg_bb_check_is_first: 3953 00003683 F606[A000]07 <1> testopt [internalflags2], dif2_gg_is_first | dif2_gg_skip_cseip | dif2_gg_skip_non_cseip 3955 00003688 7418 <1> jz .continue 3956 <1> 3957 0000368A 3906[B400] <1> cmp [gg_first_cseip_linear], ax 3958 0000368E 7514 <1> jne .is_not_first 3959 00003690 3916[B600] <1> cmp [gg_first_cseip_linear + 2], dx 3960 00003694 750E <1> jne .is_not_first 3961 <1> 3962 <1> .is_first: 3963 00003696 800E[A000]10 <1> setopt [internalflags2], dif2_gg_first_detected 3964 0000369B F606[A000]04 <1> testopt [internalflags2], dif2_gg_skip_cseip 3965 000036A0 7509 <1> jnz .skip 3966 <1> .continue: 3967 000036A2 F9 <1> stc 3968 000036A3 C3 <1> retn 3969 <1> 3970 <1> .is_not_first: 3971 000036A4 F606[A000]02 <1> testopt [internalflags2], dif2_gg_skip_non_cseip 3972 000036A9 74F7 <1> jz .continue 3973 <1> .skip: 3974 000036AB F8 <1> clc 3975 000036AC C3 <1> retn 3976 <1> 3977 <1> 3978 <1> ; INP: al = number to put 3979 <1> ; OUT: putsline called with ordinal string 3980 <1> ; CHG: di, [line_out], ax 3981 <1> putordinalbyte: 3982 000036AD 53 <1> push bx 3983 000036AE 51 <1> push cx 3984 000036AF 52 <1> push dx 3985 <1> 3986 <1> ; Note that trim_overflow in front of line_out is 3987 <1> ; initialised to '0', which we depend on here. 3988 <1> ; With the output from decbyte, at least two decimal 3989 <1> ; digits are always valid in the buffer. 3990 000036B0 BF[0E08] <1> mov di, line_out 3991 000036B3 E80700 <1> call ordinalbyte 3992 000036B6 E87183 <1> call putsline 3993 000036B9 5A <1> pop dx 3994 000036BA 59 <1> pop cx 3995 000036BB 5B <1> pop bx 3996 000036BC C3 <1> retn 3997 <1> 3998 <1> 3999 <1> ordinalbyte: 4000 000036BD E89582 <1> call decbyte 4001 000036C0 8B45FE <1> mov ax, [di - 2] ; al = lower address, higher decimal digit 4002 <1> ; ah = higher address, lower decimal digit 4003 000036C3 3C31 <1> cmp al, '1' 4004 000036C5 7417 <1> je .gotsuf_th ; 11th, 12th, 13th or other teen --> 4005 000036C7 BA7374 <1> mov dx, "st" 4006 000036CA 80FC31 <1> cmp ah, '1' 4007 000036CD 7412 <1> je .gotsuf ; if low digit was one --> 4008 000036CF BA6E64 <1> mov dx, "nd" 4009 000036D2 80FC32 <1> cmp ah, '2' 4010 000036D5 740A <1> je .gotsuf ; if low digit was two --> 4011 000036D7 B272 <1> mov dl, 'r' 4012 000036D9 80FC33 <1> cmp ah, '3' 4013 000036DC 7403 <1> je .gotsuf ; if low digit was three --> 4014 <1> .gotsuf_th: 4015 000036DE BA7468 <1> mov dx, "th" 4016 <1> .gotsuf: 4017 000036E1 89D0 <1> mov ax, dx 4018 000036E3 AB <1> stosw 4019 000036E4 C3 <1> retn 4020 <1> 4021 <1> 4022 <1> %if _BREAKPOINTS 4023 <1> ; INP: ss:bp -> error info (points at first info word) 4024 <1> ; Each word provides information for one point we tried 4025 <1> ; to restore. The lowest info word corresponds to the 4026 <1> ; first bb breakpoint (bb 00), followed by the info word 4027 <1> ; for the second bb breakpoint (bb 01), and so on. 4028 <1> ; There are always as many info words as there are 4029 <1> ; bb breakpoints. 4030 <1> ; CHG: ax, bx, cx, dx, di, si 4031 <1> ; STT: sets es to ss 4032 <1> bb_handlefailedrestore: 4033 <1> %if _PM 4034 000036E5 E89101 <1> call resetmode 4035 <1> %endif 4036 000036E8 31FF <1> xor di, di 4037 000036EA 31C9 <1> xor cx, cx 4038 000036EC 16 <1> push ss 4039 000036ED 07 <1> pop es 4040 000036EE BE[0601] <1> mov si, b_bplist.bp 4041 <1> .loop: 4042 000036F1 8B03 <1> mov ax, word [bp + di] 4043 000036F3 F6C47F <1> test ah, 7Fh ; failed ? 4044 000036F6 7414 <1> jz .next 4045 000036F8 51 <1> push cx 4046 000036F9 57 <1> push di 4047 <1> ; cx = 0-based index 4048 000036FA FF7402 <1> push word [si + 2] 4049 000036FD FF34 <1> push word [si] ; stack: linear address 4050 000036FF 8A5C08 <1> mov bl, byte [si + BPSIZE - 1] 4051 <1> ; bl = what we tried to restore 4052 00003702 B740 <1> mov bh, 40h ; bh = 40h (bb) 4053 00003704 80CC80 <1> or ah, 80h ; ah & 80h = set (is restore) 4054 00003707 E8A509 <1> call display_breakpoint_failure 4055 0000370A 5F <1> pop di 4056 0000370B 59 <1> pop cx 4057 <1> .next: 4058 0000370C 83C609 <1> add si, BPSIZE 4059 0000370F AF <1> scasw ; di += 2 4060 00003710 41 <1> inc cx 4061 00003711 83F910 <1> cmp cx, _NUM_B_BP 4062 00003714 72DB <1> jb .loop 4063 <1> .end: 4064 00003716 C3 <1> retn 4065 <1> %endif 4066 <1> 4067 <1> 4068 <1> %if _NUM_G_BP 4069 <1> ; INP: cx = number of restored points (number of info words) 4070 <1> ; ss:bp-> error info (points *behind* last info word) 4071 <1> ; Each word provides information for one point we tried 4072 <1> ; to restore. The lowest info word corresponds to the 4073 <1> ; first gg breakpoint, followed by the info word for 4074 <1> ; the second gg breakpoint (if any), and so on. 4075 <1> ; CHG: ax, bx, cx, dx, di, si 4076 <1> ; STT: sets es to ss 4077 <1> gg_handlefailedrestore: 4078 <1> %if _PM 4079 00003717 E85F01 <1> call resetmode 4080 <1> %endif 4081 0000371A 89CF <1> mov di, cx 4082 0000371C 01FF <1> add di, di 4083 0000371E F7DF <1> neg di 4084 00003720 16 <1> push ss 4085 00003721 07 <1> pop es 4086 00003722 BB0000 <1> mov bx, 0 4087 00003725 BE[7C07] <1> mov si, g_bplist.bp 4088 00003728 E325 <1> jcxz .end 4089 <1> .loop: 4090 0000372A 8B03 <1> mov ax, word [bp+di] 4091 0000372C F6C47F <1> test ah, 7Fh ; failed? 4092 0000372F 7416 <1> jz .next ; no --> 4093 <1> 4094 <1> ; si-> point 4095 <1> ; ax = info (ah = reason, al = new value if reason 3) 4096 <1> ; bx = point's 0-based index 4097 <1> .display: 4098 00003731 53 <1> push bx 4099 00003732 57 <1> push di 4100 00003733 89D9 <1> mov cx, bx ; cx = 0-based index 4101 00003735 FF7402 <1> push word [si + 2] 4102 00003738 FF34 <1> push word [si] ; stack: linear address 4103 0000373A 8A5C08 <1> mov bl, byte [si + BPSIZE - 1] 4104 <1> ; bl = what we tried to restore 4105 0000373D B780 <1> mov bh, 80h ; bh = 80h (gg) 4106 0000373F 80CC80 <1> or ah, 80h ; ah & 80h = set (is restore) 4107 00003742 E86A09 <1> call display_breakpoint_failure 4108 00003745 5F <1> pop di 4109 00003746 5B <1> pop bx 4110 <1> .next: 4111 00003747 43 <1> inc bx ; increment counter 4112 00003748 83C609 <1> add si, BPSIZE ; -> next point 4113 0000374B 47 <1> inc di 4114 0000374C 47 <1> inc di ; di+bp-> next error info 4115 0000374D 75DB <1> jnz .loop ; not yet at end --> 4116 <1> .end: 4117 0000374F C3 <1> retn 4118 <1> %endif ; _NUM_G_BP 4119 <1> 4120 <1> 4121 <1> ; INP: word [reg_cs] 4122 <1> ; (d)word [reg_eip] 4123 <1> ; OUT: bx = word [reg_cs] 4124 <1> ; CY if invalid address 4125 <1> ; NC if address is valid, 4126 <1> ; dx:ax = linear address 4127 <1> ; CHG: edx, ax, ecx 4128 <1> get_cseip_minus_1_linear: 4129 00003750 66 <1> _386_PM_o32 ; or ecx, byte -1 4130 00003751 83C9FF <1> or cx, byte -1 4131 <1> 4132 <1> ; INP: word [reg_cs] 4133 <1> ; (d)word [reg_eip] 4134 <1> ; (e)cx = adjustment to (e)ip 4135 <1> ; OUT: bx = word [reg_cs] 4136 <1> ; CY if invalid address 4137 <1> ; NC if address is valid, 4138 <1> ; dx:ax = linear address 4139 <1> ; CHG: edx, ax 4140 <1> get_cseip_ecx_linear: 4141 00003754 8B1E[900C] <1> mov bx, [reg_cs] ; bx = cs 4142 00003758 66 <1> _386_PM_o32 4143 00003759 8B16[9C0C] <1> mov dx, [reg_eip] ; (e)dx = (e)ip 4144 0000375D 66 <1> _386_PM_o32 4145 0000375E 01CA <1> add dx, cx ; bx:(e)dx = adjusted cs:(e)ip 4146 <1> ; (getlinear doesn't use the high word of edx if it's a 16-bit cs) 4147 <1> ; call getlinear ; dx:ax = linear address of this cs:eip 4148 <1> ; (fall through) 4149 <1> 4150 <1> ; INP: If currently in RM, 4151 <1> ; bx:dx = segment:offset of address 4152 <1> ; If currently in PM, 4153 <1> ; bx:(e)dx = selector:offset of address 4154 <1> ; OUT: bx = unchanged (selector/segment) 4155 <1> ; CY if address is invalid, 4156 <1> ; because Int31.0006 failed for bx or 4157 <1> ; because 32-bit address overflowed or 4158 <1> ; because A20 could not be switched on 4159 <1> ; NC if address is valid, 4160 <1> ; dx:ax = linear address 4161 <1> ; dh is always zero if the address is in RM address space 4162 <1> ; CHG: dx, ax 4163 <1> getlinear: 4164 <1> %if _PM 4165 00003760 E81601 <1> call resetmode 4166 <1> ; This must execute in the correct mode, 4167 <1> ; because we get the input from whatever 4168 <1> ; mode we were originally entered in. 4169 <1> %endif 4170 <1> %if _DEBUG1 4171 <1> call .do_not_use_test ; get linear address 4172 <1> jc @F ; already an error ? then return --> 4173 <1> push bx 4174 <1> push cx 4175 <1> mov bx, test_records_getLinear 4176 <1> call handle_test_case_multiple_16 4177 <1> ; check whether this should testcase the error 4178 <1> ; CY to indicate error from this call 4179 <1> pop cx 4180 <1> pop bx 4181 <1> @@: 4182 <1> retn 4183 <1> 4184 <1> %endif 4185 <1> .do_not_use_test: 4186 00003763 53 <1> push bx 4187 <1> %if _PM 4188 00003764 E8665A <1> call ispm 4189 00003767 7521 <1> jnz .rm 4190 00003769 B80600 <1> mov ax, 0006h 4191 0000376C 51 <1> push cx 4192 0000376D 52 <1> push dx 4193 0000376E CD31 <1> int 31h ; get selector base address into cx:dx 4194 00003770 58 <1> pop ax ; (edxh:)ax = offset, cx:dx = base 4195 00003771 7214 <1> jc .return_cx_bx 4196 <1> 4197 00003773 E8C025 <1> _386 call test_d_b_bit 4198 00003776 7406 <1> _386 jz .16 4199 00003778 6652 <1> _386 push edx 4200 0000377A 5B <1> _386 pop bx 4201 0000377B 5B <1> _386 pop bx ; bx = high word edx (in 32-bit PM segment) 4202 0000377C EB02 <1> _386 jmp .32 4203 <1> .16: ; bx:ax = offset 4204 0000377E 31DB <1> xor bx, bx ; 16-bit PM segment, clear offset high word 4205 <1> .32: 4206 00003780 01D0 <1> add ax, dx 4207 00003782 11CB <1> adc bx, cx ; add the base 4208 00003784 87DA <1> xchg bx, dx ; dx:ax = 32-bit linear address 4209 00003786 F8 <1> clc 4210 <1> 4211 <1> .return_cx_bx: 4212 00003787 59 <1> pop cx 4213 00003788 5B <1> pop bx 4214 00003789 C3 <1> retn 4215 <1> .rm: 4216 <1> %endif 4217 0000378A 89D8 <1> mov ax, bx 4218 0000378C 51 <1> push cx 4219 0000378D B104 <1> mov cl, 4 4220 0000378F D3C0 <1> rol ax, cl 4221 00003791 59 <1> pop cx 4222 00003792 BBF0FF <1> mov bx, 0FFF0h 4223 00003795 21C3 <1> and bx, ax ; bx = low word adjustment 4224 00003797 83E00F <1> and ax, byte 0Fh ; ax = higher bits which don't fit in the low word 4225 0000379A 01DA <1> add dx, bx 4226 0000379C 83D000 <1> adc ax, byte 0 4227 0000379F 92 <1> xchg ax, dx ; dx:ax = 21-bit linear address 4228 000037A0 F606[9D00]10 <1> testopt [internalflags], debuggeeA20 4229 000037A5 7503 <1> jnz .return_bx ; A20 line enabled, no need to adjust (NC) 4230 000037A7 80E2EF <1> and dl, ~10h ; clear corresponding bit of the address if it was set (NC) 4231 <1> .return_bx: 4232 000037AA 5B <1> pop bx 4233 000037AB C3 <1> retn 4234 <1> 4235 <1> 4236 <1> ; INP: bx = segment/selector to use by default 4237 <1> ; al = next character in input 4238 <1> ; si -> following character in input 4239 <1> ; OUT: NC if successful, 4240 <1> ; bx:dx = linear address 4241 <1> ; (if not _PM, this always fits in 24 bits) 4242 <1> ; al = next character 4243 <1> ; si -> following character 4244 <1> ; (d)word [bp_offset] = preferred offset, -1 if none 4245 <1> ; CY if error 4246 <1> ; CHG: edx, bx, ax, si, (d)word [bp_offset] 4247 <1> getlinearaddr: 4248 <1> %if _PM 4249 000037AC E8CA00 <1> call resetmode 4250 <1> %endif 4251 000037AF 66 <1> _386_PM_o32 ; or dword 4252 000037B0 830E[5085]FF <1> or word [bp_offset], strict byte -1 4253 000037B5 E85D81 <1> call skipcomm0 4254 000037B8 3C40 <1> cmp al, '@' 4255 000037BA 752B <1> jne .at_not 4256 000037BC AC <1> lodsb ; insure we have a blank or opening parens 4257 000037BD 3C28 <1> cmp al, '(' 4258 000037BF 740A <1> je .at 4259 000037C1 3C09 <1> cmp al, 9 4260 000037C3 7406 <1> je .at 4261 000037C5 3C20 <1> cmp al, 32 4262 000037C7 7402 <1> je .at 4263 000037C9 EB19 <1> jmp .at_not_reload ; assume the @ is part of a symbol 4264 <1> 4265 <1> .at: 4266 000037CB E87681 <1> call skipwh0 4267 000037CE 3C28 <1> cmp al, '(' 4268 000037D0 750D <1> jne .at_not_paren 4269 <1> 4270 000037D2 E8127B <1> call getdword 4271 000037D5 E86C81 <1> call skipwh0 4272 000037D8 3C29 <1> cmp al, ')' 4273 000037DA 7521 <1> jne .error 4274 000037DC AC <1> lodsb 4275 <1> 4276 000037DD EB03 <1> jmp .at_got 4277 <1> 4278 <1> .at_not_paren: 4279 000037DF E8057B <1> call getdword 4280 <1> .at_got: 4281 <1> %ifn _PM 4282 <1> ; test bh, bh 4283 <1> ; jnz .error 4284 <1> cmp bx, 11h 4285 <1> jae .error 4286 <1> %endif 4287 000037E2 F8 <1> clc 4288 000037E3 C3 <1> retn 4289 <1> 4290 <1> .at_not_reload: 4291 000037E4 4E <1> dec si 4292 000037E5 4E <1> dec si 4293 000037E6 AC <1> lodsb 4294 <1> .at_not: 4295 000037E7 E82B71 <1> call getaddrX 4296 <1> %if _PM 4297 000037EA 8326[5285]00 <1> _no386 and word [bp_offset + 2], 0 4298 <1> %endif 4299 000037EF 66 <1> _386_PM_o32 ; mov dword [bp_offset], edx 4300 000037F0 8916[5085] <1> mov word [bp_offset], dx 4301 000037F4 50 <1> push ax 4302 000037F5 E868FF <1> call getlinear 4303 000037F8 93 <1> xchg bx, ax ; dx:bx = linear 4304 000037F9 87D3 <1> xchg dx, bx ; bx:dx = linear 4305 000037FB 58 <1> pop ax ; al = next character 4306 000037FC C3 <1> retn 4307 <1> 4308 <1> .error: 4309 000037FD F9 <1> stc 4310 000037FE C3 <1> retn 4311 <1> 4312 <1> 4313 <1> usesection lDEBUG_DATA_ENTRY 4314 <1> align 4, db 0 4315 00008550 0000 <1> bp_offset: dw 0 4316 <1> %if _PM 4317 00008552 0000 <1> dw 0 4318 <1> %endif 4319 <1> usesection lDEBUG_CODE 4320 <1> 4321 <1> 4322 <1> ; INP: word [reg_cs] 4323 <1> ; (d)word [reg_eip] 4324 <1> ; dword [tpg_possible_breakpoint] 4325 <1> ; [internalflags2] & dif2_tpg_have_bp 4326 <1> ; OUT: CY if invalid address 4327 <1> ; NC if address is valid, 4328 <1> ; dx:ax = linear address 4329 <1> ; CHG: edx, ax, ecx, bx 4330 <1> ; STT: ds = ss = debugger data selector 4331 <1> get_cseip_of_possible_breakpoint: 4332 000037FF A1[BC00] <1> mov ax, [tpg_possible_breakpoint] 4333 00003802 8B16[BE00] <1> mov dx, [tpg_possible_breakpoint + 2] 4334 <1> ; dx:ax = stored possible breakpoint address 4335 00003806 F606[A100]01 <1> testopt [internalflags2], dif2_tpg_have_bp 4336 0000380B 7511 <1> jnz .retn ; (NC) if already stored --> 4337 0000380D E840FF <1> call get_cseip_minus_1_linear 4338 <1> ; dx:ax = linear address at cs:(e)ip - 1 4339 00003810 720C <1> jc .retn ; (CY) if getlinear failed --> 4340 00003812 A3[BC00] <1> mov [tpg_possible_breakpoint], ax 4341 00003815 8916[BE00] <1> mov [tpg_possible_breakpoint + 2], dx 4342 <1> ; store for later use 4343 00003819 800E[A100]01 <1> setopt [internalflags2], dif2_tpg_have_bp 4344 <1> ; (NC) 4345 <1> .retn: 4346 0000381E C3 <1> retn 4347 <1> 4348 <1> 4349 <1> %if _PM 4350 <1> 4351 <1> ; DEBUGX: when a mode switch from PM to RM did occur in the debuggee, 4352 <1> ; breakpoint addresses in non-RM address space are unreachable. 4353 <1> ; To enable the debugger to reset the breakpoints, it has to switch 4354 <1> ; temporarily to PM. (In DEBUG/X 1.19, a switch from RM to PM in the 4355 <1> ; debuggee will temporarily switch the debugger back to RM too. We 4356 <1> ; handle this case without a switch as the linear RM address can be 4357 <1> ; accessed directly in PM, assuming that the DPMI hosts linear-to- 4358 <1> ; physical mapping for the RM address space is the same as the one 4359 <1> ; we get in PM.) 4360 <1> 4361 <1> ; (To use mode switching in any case, the format the breakpoints are 4362 <1> ; stored in needs to be modified. Additionally, the mode switching 4363 <1> ; needs to be done elsewhere instead of in getsegmented. resetmode 4364 <1> ; can be used as is, even if a mode switch from PM to RM occured.) 4365 <1> 4366 <1> switchmode: 4367 <1> ;--- raw switch: 4368 <1> ;--- si:e/di: new cs:e/ip 4369 <1> ;--- dx:e/bx: new ss:e/sp 4370 <1> ;--- ax: new ds 4371 <1> ;--- cx: new es 4372 0000381F 6631DB <1> _386 xor ebx, ebx ; clear ebxh 4373 00003822 89E3 <1> mov bx, sp 4374 00003824 6631FF <1> _386 xor edi, edi ; clear edih 4375 00003827 BF[4E38] <1> mov di, .back_after_switch 4376 0000382A E8A059 <1> call ispm 4377 0000382D 740F <1> jz .pm 4378 <1> .r86m: 4379 <1> d4 call d4message 4380 <1> d4 asciz "In switchmode.r86m",13,10 4381 0000382F A1[D488] <1> mov ax, [dssel] ; switch rm -> pm 4382 00003832 8B36[D000] <1> mov si, [code_sel] 4383 00003836 89C2 <1> mov dx, ax 4384 00003838 89C1 <1> mov cx, ax 4385 0000383A FF2E[C088] <1> jmp far [dpmi_rm2pm] 4386 <1> .pm: 4387 <1> d4 call d4message 4388 <1> d4 asciz "In switchmode.pm",13,10 4389 0000383E A1[A60A] <1> mov ax, [pspdbg] ; switch pm -> rm 4390 00003841 8B36[CE00] <1> mov si, [code_seg] 4391 00003845 89C2 <1> mov dx, ax 4392 00003847 89C1 <1> mov cx, ax 4393 00003849 66 <1> _386_o32 ; jmp far dword [dpmi_pm2rm] 4394 0000384A FF2E[C888] <1> jmp far [dpmi_pm2rm] 4395 <1> 4396 <1> .back_after_switch: 4397 0000384E 8036[9D00]08 <1> xoropt [internalflags], protectedmode 4398 <1> d4 call d4message 4399 <1> d4 asciz "In switchmode.back_after_switch",13,10 4400 00003853 C3 <1> retn 4401 <1> 4402 <1> 4403 <1> ; INP: al = direction, 0 = save state, 1 = restore state 4404 <1> ; [auxbuff] = state buffer 4405 <1> ; ES = debugger data selector 4406 <1> ; CHG: edi 4407 <1> sr_state: 4408 00003854 F606[9E00]20 <1> testopt [internalflags], switchbuffer 4409 00003859 741B <1> jz .return ; no need to call --> 4410 0000385B 66 <1> _386_o32 ; xor edi, edi 4411 0000385C 31FF <1> xor di, di 4412 0000385E E86C59 <1> call ispm 4413 00003861 740A <1> jz .pm 4414 <1> .r86m: 4415 <1> d4 call d4message 4416 <1> d4 asciz "In sr_state.r86m",13,10 4417 00003863 8E06[F409] <1> mov es, word [auxbuff_segorsel + soaSegment] 4418 00003867 FF1E[C488] <1> call far [dpmi_rmsav] 4419 0000386B EB09 <1> jmp .return 4420 <1> 4421 <1> .pm: 4422 <1> d4 call d4message 4423 <1> d4 asciz "In sr_state.pm",13,10 4424 0000386D 8E06[F609] <1> mov es, word [auxbuff_segorsel + soaSelector] 4425 00003871 66 <1> _386_o32 ; call far dword [dpmi_pmsav] 4426 00003872 FF1E[CE88] <1> call far [dpmi_pmsav] 4427 <1> .return: 4428 00003876 16 <1> push ss 4429 00003877 07 <1> pop es 4430 00003878 C3 <1> retn 4431 <1> 4432 <1> 4433 <1> ; INP: [internalflags] & modeswitched 4434 <1> ; OUT: flag cleared, mode switched back if had been switched 4435 <1> ; EI 4436 <1> ; CHG: - (not even flags!) 4437 <1> ; STT: es = ds = ss = gs = fs = debugger data segment/selector 4438 <1> ; 4439 <1> ; Switches back to RM if a mode switch to PM was done by getsegmented. 4440 <1> ; Does nothing otherwise. (Can be called multiple times.) 4441 <1> resetmode: 4442 00003879 9C <1> pushf 4443 0000387A F606[9E00]08 <1> testopt [internalflags], modeswitched ; switched mode previously ? 4444 0000387F 741A <1> jz .return ; no --> 4445 <1> d4 call d4message 4446 <1> d4 asciz "In resetmode (actually resetting)",13,10 4447 <1> subcpu 286 4448 00003881 66 <1> _386_o32 4449 00003882 60 <1> pusha 4450 00003883 E899FF <1> call switchmode ; switch back to the mode we were entered in (RM) 4451 00003886 B001 <1> mov al, 1 4452 00003888 E8C9FF <1> call sr_state ; restore state 4453 0000388B E89C0B <1> call handle_mode_changed ; ! called with flag set 4454 0000388E 8026[9E00]F7 <1> clropt [internalflags], modeswitched ; reset the flag 4455 00003893 16 <1> _386 push ss 4456 00003894 0FA9 <1> _386 pop gs 4457 00003896 16 <1> _386 push ss 4458 00003897 0FA1 <1> _386 pop fs 4459 00003899 66 <1> _386_o32 4460 0000389A 61 <1> popa 4461 <1> subcpureset 4462 <1> .return: 4463 0000389B 9D <1> popf 4464 0000389C FB <1> sti 4465 0000389D C3 <1> retn 4466 <1> %endif 4467 <1> 4468 <1> ; INP: dx:ax = linear address 4469 <1> ; OUT: CY if inaccessible 4470 <1> ; NC if accessible, 4471 <1> ; bx:(e)dx = segment:offset or selector:offset address 4472 <1> ; A temporary mode switch from RM to PM might have occured. 4473 <1> ; This has to be reset by calling resetmode. 4474 <1> ; CHG: (e)ax, (e)bx, (e)dx, fs, gs 4475 <1> ; STT: es = ds = ss = our segment/selector 4476 <1> ; 4477 <1> ; It is assumed that only one byte needs to be accessed. 4478 <1> ; (A workaround to access multiple bytes would be to access each 4479 <1> ; byte separately and call this function for each of the bytes.) 4480 <1> ; 4481 <1> ; The TSR command code assumes that getsegmented.pm does not switch 4482 <1> ; modes and that it will return an offset in (e)dx that allows 4483 <1> ; 16-bit access. Adjust that code if either is no longer true. 4484 <1> getsegmented: 4485 <1> %if _DEBUG1 4486 <1> push bx 4487 <1> push cx 4488 <1> mov bx, test_records_getSegmented 4489 <1> call handle_test_case_multiple_16 4490 <1> pop cx 4491 <1> pop bx 4492 <1> jnc @F 4493 <1> ; stc ; (already CY if the conditional didn't jump) 4494 <1> retn 4495 <1> 4496 <1> @@: 4497 <1> %endif 4498 <1> .do_not_use_test: 4499 <1> 4500 <1> %if _PM 4501 0000389E E82C59 <1> call ispm 4502 000038A1 7513 <1> jnz .rm 4503 <1> .pm: 4504 000038A3 51 <1> push cx 4505 000038A4 8B1E[D888] <1> mov bx, word [scratchsel] 4506 000038A8 92 <1> xchg ax, dx 4507 000038A9 91 <1> xchg ax, cx ; cx:dx = linear address 4508 000038AA B80700 <1> mov ax, 0007h 4509 000038AD CD31 <1> int 31h ; set base to the address 4510 000038AF 59 <1> pop cx 4511 000038B0 723B <1> jc .invalid 4512 <1> %if 0 ; scratchsel is expected by other code to access arbitrary data ?? 4513 <1> push cx 4514 <1> mov ax, 0008h 4515 <1> xor cx, cx 4516 <1> xor dx, dx 4517 <1> int 31h ; set limit to zero (access to one byte only) 4518 <1> pop cx 4519 <1> jc .invalid 4520 <1> %endif 4521 000038B2 66 <1> _386_o32 ; xor edx, edx 4522 000038B3 31D2 <1> xor dx, dx ; bx:(e)dx = selector:offset (using scratchsel with the address as base) 4523 000038B5 C3 <1> retn ; (NC) 4524 <1> %endif 4525 <1> .rm: 4526 000038B6 83FA10 <1> cmp dx, byte 10h ; check for address space 4527 000038B9 7249 <1> jb .nothma ; below HMA, normal access --> 4528 000038BB 7432 <1> je .checkhma ; possibly in HMA --> 4529 <1> .nonrmspace: ; above HMA 4530 <1> %if _PM 4531 <1> ; It's a PM address but we are in RM. 4532 000038BD F606[9E00]04 <1> testopt [internalflags], canswitchmode 4533 000038C2 7429 <1> jz .invalid ; can't switch to PM --> 4534 <1> .switchmodes: 4535 000038C4 66 <1> _386_o32 4536 000038C5 56 <1> push si 4537 000038C6 66 <1> _386_o32 4538 000038C7 57 <1> push di 4539 000038C8 66 <1> _386_o32 4540 000038C9 51 <1> push cx 4541 000038CA 66 <1> _386_o32 4542 000038CB 55 <1> push bp 4543 000038CC 52 <1> push dx 4544 000038CD 50 <1> push ax 4545 <1> d4 call d4message 4546 <1> d4 asciz "In getsegmented.switchmodes (switching to access memory beyond 1088 KiB)",13,10 4547 000038CE E82A0C <1> call remember_mode 4548 000038D1 800E[9E00]08 <1> setopt [internalflags], modeswitched ; set flag for resetmode 4549 000038D6 B000 <1> mov al, 0 4550 000038D8 E879FF <1> call sr_state ; save state 4551 000038DB E841FF <1> call switchmode ; switch to PM 4552 000038DE E8490B <1> call handle_mode_changed ; ! called with flag set 4553 000038E1 58 <1> pop ax 4554 000038E2 5A <1> pop dx 4555 000038E3 66 <1> _386_o32 4556 000038E4 5D <1> pop bp 4557 000038E5 66 <1> _386_o32 4558 000038E6 59 <1> pop cx 4559 000038E7 66 <1> _386_o32 4560 000038E8 5F <1> pop di 4561 000038E9 66 <1> _386_o32 4562 000038EA 5E <1> pop si 4563 000038EB EBB6 <1> jmp .pm 4564 <1> 4565 <1> .invalid: ; the address is inaccessible 4566 <1> %endif 4567 000038ED F9 <1> stc 4568 000038EE C3 <1> retn 4569 <1> 4570 <1> .checkhma: 4571 000038EF 83F8F0 <1> cmp ax, -10h ; valid offset for HMA ? 4572 000038F2 73C9 <1> jae .nonrmspace ; no, above HMA --> 4573 000038F4 F606[9D00]20 <1> testopt [internalflags], debuggerA20 ; A20 on, HMA accessible ? 4574 000038F9 74C2 <1> jz .nonrmspace ; no, treat as above HMA (DEBUGX) --> 4575 000038FB BBFFFF <1> mov bx, 0FFFFh ; the HMA must always be addressed by segment FFFFh 4576 000038FE 83C010 <1> add ax, byte 10h ; and the offset is always at least 0010h (FFFFh:0010h = 00100000h) 4577 <1> ; (NC because we checked that this won't overflow) 4578 00003901 92 <1> xchg ax, dx ; bx:dx = segment:offset 4579 00003902 EB11 <1> jmp .zero_edxh 4580 <1> 4581 <1> .nothma: 4582 00003904 51 <1> push cx 4583 00003905 B104 <1> mov cl, 4 4584 00003907 D3CA <1> ror dx, cl ; dx (high 4 bits) = high 4 bits of segment 4585 00003909 89C3 <1> mov bx, ax 4586 0000390B D3EB <1> shr bx, cl ; bx = low 12 bits of segment 4587 0000390D 09DA <1> or dx, bx ; dx = segment 4588 0000390F 83E00F <1> and ax, byte 0Fh ; ax = low 4 bits of linear, used as offset (NC) 4589 00003912 92 <1> xchg ax, dx 4590 00003913 93 <1> xchg ax, bx ; bx:dx = segment:offset 4591 00003914 59 <1> pop cx 4592 <1> .zero_edxh: 4593 00003915 660FB7D2 <1> _386_PM movzx edx, dx 4594 00003919 C3 <1> retn 4595 <1> 4596 <1> 4597 <1> ; T command - Trace. 4598 <1> tt: 4599 0000391A 88C4 <1> mov ah, al 4600 0000391C 80E4DF <1> and ah, TOUPPER 4601 0000391F 80FC4D <1> cmp ah, 'M' 4602 00003922 7548 <1> jnz isnotmodeset 4603 00003924 E8ED7F <1> call skipcomma 4604 00003927 E8C47F <1> call iseol? 4605 0000392A 741C <1> je ismodeget 4606 0000392C E89E7E <1> call getword 4607 0000392F E8D17F <1> call chkeol ; expect end of line here 4608 00003932 83FA01 <1> cmp dx, 1 4609 00003935 7603E9A26B <1> ja error 4610 0000393A 7407 <1> je .set ; selected 1 --> 4611 <1> .clear: ; selected 0 4612 0000393C 8026[7C00]FD <1> clropt [options], traceints 4613 00003941 EB05 <1> jmp short .get 4614 <1> .set: 4615 00003943 800E[7C00]02 <1> setopt [options], traceints 4616 <1> .get: 4617 <1> ismodeget: 4618 00003948 B030 <1> mov al, '0' 4619 0000394A BE[217A] <1> mov si, tmode0 4620 0000394D F606[7C00]02 <1> testopt [options], traceints 4621 00003952 7404 <1> jz .zero 4622 00003954 40 <1> inc ax 4623 00003955 BE[1A7A] <1> mov si, tmode1 4624 <1> .zero: 4625 00003958 A2[067A] <1> mov byte [tmodev], al 4626 0000395B BF[0E08] <1> mov di, line_out 4627 0000395E 56 <1> push si 4628 0000395F BE[F879] <1> mov si, tmodes 4629 00003962 E8EA7F <1> call showstring 4630 00003965 5E <1> pop si 4631 00003966 E8E67F <1> call showstring 4632 00003969 E9BA80 <1> jmp putsline_crlf 4633 <1> 4634 <1> isnotmodeset: 4635 <1> %if _TTEST 4636 0000396C 50 <1> push ax 4637 0000396D 80FC54 <1> cmp ah, 'T' 4638 00003970 7516 <1> jne @F 4639 00003972 8B04 <1> mov ax, word [si] 4640 00003974 25DFDF <1> and ax, TOUPPER_W 4641 00003977 3D4553 <1> cmp ax, "ES" 4642 0000397A 750C <1> jne @F 4643 0000397C 8A4402 <1> mov al, byte [si + 2] 4644 0000397F 24DF <1> and al, TOUPPER 4645 00003981 3C54 <1> cmp al, 'T' 4646 00003983 7503E9C900 <1> je ttestcmd 4647 <1> @@: 4648 00003988 58 <1> pop ax 4649 <1> %endif 4650 <1> %if _TSR 4651 00003989 80FC53 <1> cmp ah, 'S' 4652 0000398C 750D <1> jne @F 4653 0000398E 50 <1> push ax 4654 0000398F 8A04 <1> mov al, byte [si] 4655 00003991 24DF <1> and al, TOUPPER 4656 00003993 3C52 <1> cmp al, 'R' 4657 00003995 58 <1> pop ax 4658 00003996 7503E9C401 <1> je tsr 4659 <1> %endif 4660 <1> @@: 4661 0000399B 8026[9F00]F7 <1> clropt [internalflags], tt_p 4662 000039A0 80FC50 <1> cmp ah, 'P' 4663 000039A3 7506 <1> jne @F 4664 000039A5 AC <1> lodsb 4665 000039A6 800E[9F00]08 <1> setopt [internalflags], tt_p 4666 <1> @@: 4667 <1> tt0: 4668 000039AB C706[DC0B][AB39] <1> mov word [lastcmd], tt0 4669 000039B1 8026[A100]EF <1> clropt [internalflags2], dif2_is_pp 4670 000039B6 E89F0B <1> call parse_pt ; process arguments 4671 <1> 4672 <1> ; Do it times. 4673 <1> tt1: 4674 000039B9 53 <1> push bx 4675 000039BA 51 <1> push cx 4676 <1> 4677 000039BB F606[9F00]08 <1> testopt [internalflags], tt_p 4678 000039C0 7449 <1> jz .not_p 4679 <1> 4680 <1> %if _PM 4681 000039C2 E8B4FE <1> call resetmode 4682 <1> %endif 4683 000039C5 BA0F00 <1> mov dx, 15 ; DL = number of bytes to go; DH = prefix flags. 4684 000039C8 8B1E[900C] <1> mov bx, word [reg_cs] 4685 000039CC 66 <1> _386_PM_o32 ; mov esi, dword [reg_eip] 4686 000039CD 8B36[9C0C] <1> mov si, word [reg_eip] 4687 <1> .pp2: 4688 000039D1 E84108 <1> call pp16 ; get next instruction byte into AL 4689 000039D4 BF[E410] <1> mov di, ppbytes 4690 000039D7 B91800 <1> mov cx, PPLEN_ONLY_STRING 4691 000039DA F2AE <1> repne scasb 4692 000039DC 752D <1> jne .not_p ; if not one of these --> 4693 000039DE 8A451E <1> mov al,byte [di+PPLEN-1]; get corresponding byte in ppinfo 4694 000039E1 A880 <1> test al, PP_PREFIX ; prefix ? 4695 000039E3 740E <1> jz .pp3 ; no --> 4696 000039E5 08C6 <1> or dh, al ; set the OSIZE or ASIZE flags if either of these 4697 <1> ; Note: Multiple OSIZE in a 16-bit cs do not toggle 4698 <1> ; between decoding as O32 and O16, they're always 4699 <1> ; decoded as O32. The same is true for A32, and 4700 <1> ; in a 32-bit cs for O16 and A16. 4701 000039E7 FECA <1> dec dl 4702 000039E9 75E6 <1> jnz .pp2 ; if not out of bytes --> 4703 000039EB BA[D971] <1> mov dx, msg.warnprefix 4704 000039EE E8B383 <1> call putsz 4705 000039F1 EB18 <1> jmp .not_p 4706 <1> 4707 <1> ; A repeatable string instruction is to be decoded. 4708 <1> ; Finish the decoding and skip the appropriate number 4709 <1> ; of opcode bytes. 4710 <1> .pp3: 4711 000039F3 E83104 <1> _386_PM call pp_fix32bitflags 4712 000039F6 A847 <1> test al, PP_VARSIZ | PP_SIZ_MASK 4713 000039F8 7403E9DF6A <1> jnz error 4714 <1> %if 0 4715 <1> test al, PP_VARSIZ ; different opcode length depends on OSIZE ? 4716 <1> jz .ignoreosize ; no --> 4717 <1> and dh, 2 4718 <1> add al, dh 4719 <1> .ignoreosize: 4720 <1> and ax, PP_SIZ_MASK 4721 <1> _386_PM movzx eax, ax ; clear high word (in case it counts) 4722 <1> _386_PM_o32 ; add esi, eax 4723 <1> add si, ax 4724 <1> %endif 4725 <1> ; pp10: 4726 <1> ; jmp short pp11 ; we have a skippable instruction here 4727 <1> ; pp11: 4728 000039FD E83323 <1> _386_PM call resetmode_and_test_d_b_bit 4729 00003A00 7504 <1> _386_PM jnz .32 ; full 32-bit offset valid --> 4730 00003A02 660FB7F6 <1> _386_PM movzx esi, si ; clear high word here 4731 <1> .32: 4732 00003A06 E87607 <1> call proceedbreakpoint ; run until the breakpoint is hit 4733 <1> ; This call might return modeswitched. 4734 00003A09 EB03 <1> jmp short @F 4735 <1> 4736 <1> .not_p: 4737 00003A0B E87502 <1> call traceone ; call common code 4738 <1> @@: 4739 00003A0E 7303E93702 <1> jc unexpectedinterrupt ; an unexpected interrupt occured --> 4740 <1> %if _BREAKPOINTS 4741 00003A13 7416 <1> jz @F ; (breakpoint after instruction was hit) 4742 <1> 4743 <1> ; bb breakpoint was hit. dumpregs, then return 4744 00003A15 E8D600 <1> call handle_bb_hit_pass_match 4745 00003A18 7204 <1> jc .actual_hit ; actual match ? --> 4746 00003A1A 7418 <1> jz tt2.nodump ; non-silent mode ? --> 4747 00003A1C EB0D <1> jmp tt2 ; silent mode --> 4748 <1> 4749 <1> .actual_hit: 4750 <1> %if _PM 4751 00003A1E E858FE <1> call resetmode 4752 <1> %endif 4753 00003A21 E829F8 <1> call put_deferred_message_silent 4754 00003A24 E85D05 <1> call dumpregs_extended_silent 4755 00003A27 59 <1> pop cx 4756 00003A28 5B <1> pop bx ; (discard counter) 4757 00003A29 EB1C <1> jmp @FF 4758 <1> @@: 4759 <1> %endif 4760 <1> tt2: 4761 <1> %if _PM 4762 00003A2B E84BFE <1> call resetmode 4763 <1> %endif 4764 00003A2E E81CF8 <1> call put_deferred_message_silent 4765 00003A31 E85005 <1> call dumpregs_extended_silent 4766 <1> ; dump registers 4767 <1> .nodump: 4768 <1> 4769 00003A34 E85600 <1> call tt_handle_while 4770 00003A37 59 <1> pop cx 4771 00003A38 5B <1> pop bx 4772 <1> 4773 00003A39 83E901 <1> sub cx, 1 4774 00003A3C 83DB00 <1> sbb bx, 0 ; decrement loop counter 4775 <1> 4776 00003A3F 85DB <1> test bx, bx 4777 00003A41 750B <1> jnz tt1_jmp ; loop --> 4778 00003A43 85C9 <1> test cx, cx 4779 00003A45 7507 <1> jnz tt1_jmp ; loop --> 4780 <1> 4781 <1> @@: 4782 <1> %if _PM 4783 00003A47 E82FFE <1> call resetmode 4784 <1> %endif 4785 00003A4A E89782 <1> call silence_dump 4786 <1> 4787 00003A4D C3 <1> retn 4788 <1> 4789 <1> tt1_jmp: 4790 00003A4E E968FF <1> jmp tt1 4791 <1> 4792 <1> 4793 <1> %if _TTEST 4794 <1> ttestcmd: 4795 00003A51 58 <1> pop ax 4796 00003A52 46 <1> inc si 4797 00003A53 46 <1> inc si 4798 00003A54 46 <1> inc si 4799 00003A55 E8EB7E <1> call skipwhite 4800 <1> 4801 <1> .tt0: 4802 00003A58 C706[DC0B][583A] <1> mov word [lastcmd], .tt0 4803 00003A5E 8026[A100]EF <1> clropt [internalflags2], dif2_is_pp 4804 00003A63 E8F20A <1> call parse_pt ; process arguments 4805 <1> 4806 <1> ; Do it times. 4807 <1> .tt1: 4808 00003A66 53 <1> push bx 4809 00003A67 51 <1> push cx 4810 <1> 4811 <1> .tt2: 4812 <1> %if _PM 4813 00003A68 E80EFE <1> call resetmode 4814 <1> %endif 4815 00003A6B E8DFF7 <1> call put_deferred_message_silent 4816 00003A6E E81305 <1> call dumpregs_extended_silent 4817 <1> ; dump registers 4818 <1> .nodump: 4819 <1> 4820 00003A71 E81900 <1> call tt_handle_while 4821 00003A74 59 <1> pop cx 4822 00003A75 5B <1> pop bx 4823 <1> 4824 00003A76 83E901 <1> sub cx, 1 4825 00003A79 83DB00 <1> sbb bx, 0 ; decrement loop counter 4826 <1> 4827 00003A7C 85DB <1> test bx, bx 4828 00003A7E 750B <1> jnz .tt1_jmp ; loop --> 4829 00003A80 85C9 <1> test cx, cx 4830 00003A82 7507 <1> jnz .tt1_jmp ; loop --> 4831 <1> 4832 <1> @@: 4833 <1> %if _PM 4834 00003A84 E8F2FD <1> call resetmode 4835 <1> %endif 4836 00003A87 E85A82 <1> call silence_dump 4837 <1> 4838 00003A8A C3 <1> retn 4839 <1> 4840 <1> .tt1_jmp: 4841 00003A8B EBD9 <1> jmp .tt1 4842 <1> %endif 4843 <1> 4844 <1> 4845 <1> tt_handle_while: 4846 00003A8D F606[9F00]04 <1> testopt [internalflags], tt_while 4847 00003A92 7434 <1> jz @F 4848 <1> 4849 <1> %if _PM 4850 00003A94 E8E2FD <1> call resetmode 4851 <1> %endif 4852 00003A97 E82F00 <1> call .copy_condition_to_line_out 4853 <1> ; dx = si -> line_out with condition 4854 00003A9A FF36[F00A] <1> push word [rc] 4855 00003A9E 8F06[F20A] <1> pop word [priorrc] 4856 00003AA2 AC <1> lodsb 4857 00003AA3 E84178 <1> call getexpression ; parse stored expression 4858 00003AA6 E85A7E <1> call chkeol 4859 00003AA9 E84D72 <1> call toboolean ; get boolean 4860 00003AAC 85D2 <1> test dx, dx ; true ? 4861 00003AAE 7518 <1> jnz @F ; yes, continue --> 4862 <1> 4863 00003AB0 E83182 <1> call silence_dump 4864 <1> 4865 00003AB3 BA[4369] <1> mov dx, msg.while_terminated_before 4866 00003AB6 E8EB82 <1> call putsz 4867 00003AB9 E80D00 <1> call .copy_condition_to_line_out 4868 00003ABC E8E582 <1> call putsz ; display condition 4869 00003ABF BA[5569] <1> mov dx, msg.while_terminated_after 4870 00003AC2 E8DF82 <1> call putsz 4871 00003AC5 E938C5 <1> jmp cmd3 4872 <1> 4873 <1> @@: 4874 00003AC8 C3 <1> retn 4875 <1> 4876 <1> 4877 <1> .copy_condition_to_line_out: 4878 00003AC9 8E06[F209] <1> mov es, word [auxbuff_segorsel] 4879 00003ACD 31FF <1> xor di, di ; -> stored expression (if not PM) 4880 <1> %if _PM 4881 00003ACF 033E[F009] <1> add di, word [auxbuff_switchbuffer_size] 4882 <1> ; -> stored expression 4883 <1> %endif 4884 00003AD3 89FE <1> mov si, di 4885 00003AD5 B9FFFF <1> mov cx, -1 4886 00003AD8 B000 <1> mov al, 0 4887 00003ADA F2AE <1> repne scasb 4888 00003ADC F7D1 <1> not cx ; = length, including zero terminator 4889 00003ADE 06 <1> push es 4890 00003ADF 1F <1> pop ds ; ds:si -> auxbuff stored expression 4891 00003AE0 16 <1> push ss 4892 00003AE1 07 <1> pop es 4893 00003AE2 BF[0E08] <1> mov di, line_out ; -> line_out 4894 00003AE5 57 <1> push di 4895 00003AE6 F3A4 <1> rep movsb ; move over 4896 00003AE8 5E <1> pop si 4897 <1> 4898 00003AE9 89F2 <1> mov dx, si 4899 00003AEB 16 <1> push ss 4900 00003AEC 1F <1> pop ds ; -> line_out 4901 00003AED C3 <1> retn 4902 <1> 4903 <1> 4904 <1> ; INP: cl = flags indicating what kind of bb match occurred 4905 <1> ; cl & 1 set if actual hit, 4906 <1> ; else cl & 2 set if pass match, 4907 <1> ; else it is a non-pass non-hit match 4908 <1> ; (cl & 4 always set (indicates any bb match)) 4909 <1> ; cl & 8 set if pp/tt breakpoint hit 4910 <1> ; dword [ss:sp] = command repetition counter 4911 <1> ; OUT: NC if pass match or non-pass non-hit match, 4912 <1> ; if pass match: deferred message output, dumpregs output 4913 <1> ; if cl & 8 set (pass/nonpass bb, tt/pp hit): 4914 <1> ; ZR if [internalflags] & tt_silent_mode clear 4915 <1> ; NZ if [internalflags] & tt_silent_mode set 4916 <1> ; if cl & 8 clear (pass/nonpass bb, no tt/pp hit): 4917 <1> ; ZR 4918 <1> ; dword [ss:sp] increased by 1 4919 <1> ; CY if actual hit (hit bb) 4920 <1> ; ax = INP:cx 4921 <1> ; CHG: dx, bx, cx, si, di, all high words, fs, gs 4922 <1> ; STT: ds = es = ss 4923 <1> handle_bb_hit_pass_match: 4924 <1> d5 call d5message 4925 <1> d5 asciz "in handle_bb_hit_pass_match",13,10 4926 <1> 4927 00003AEE 91 <1> xchg ax, cx 4928 <1> 4929 00003AEF F606[A100]08 <1> testopt [internalflags2], dif2_bp_failure 4930 00003AF4 7567 <1> jnz .actual_hit ; after failure, handle as actual hit 4931 <1> 4932 00003AF6 A801 <1> test al, 1 ; actual hit ? else: non-hit, pass or non-pass 4933 00003AF8 7563 <1> jnz .actual_hit ; yes --> 4934 <1> 4935 00003AFA A802 <1> test al, 2 ; at least pass match ? 4936 00003AFC 7418 <1> jz .nonpassnonhit ; no --> 4937 <1> 4938 <1> .passnonhit: 4939 <1> 4940 <1> d5 call d5message 4941 <1> d5 asciz "bb pass non-hit",13,10 4942 <1> 4943 <1> %if _PM 4944 00003AFE E878FD <1> call resetmode 4945 <1> %endif 4946 <1> ; call put_deferred_message_loud 4947 00003B01 BA[6370] <1> mov dx, msg.empty_message 4948 00003B04 8716[C000] <1> xchg dx, word [gg_deferred_message] 4949 00003B08 E89982 <1> call putsz 4950 00003B0B BA[2ABA] <1> mov dx, putsline 4951 00003B0E E849F7 <1> call put_bb_deferred_message_calling_dx 4952 <1> 4953 00003B11 50 <1> push ax 4954 <1> ; call dumpregs_extended_loud 4955 <1> ; (includes handle_serial_flags_ctrl_c) 4956 00003B12 E89CEB <1> call dumpregs_extended 4957 00003B15 58 <1> pop ax ; (preserve so the test al, 8 can use it) 4958 <1> .nonpassnonhit: 4959 00003B16 E88C04 <1> call handle_serial_flags_ctrl_c 4960 <1> 4961 <1> ; al & 4 always set 4962 <1> 4963 00003B19 8026[A000]E9 <1> clropt [internalflags2], dif2_gg_skip_non_cseip | dif2_gg_skip_cseip | dif2_gg_first_detected 4965 00003B1E 800E[A000]01 <1> setopt [internalflags2], dif2_gg_is_first 4966 <1> 4967 00003B23 FF36[BA00] <1> push word [gg_next_cseip_linear + 2] 4968 00003B27 FF36[B800] <1> push word [gg_next_cseip_linear] 4969 00003B2B 8F06[B400] <1> pop word [gg_first_cseip_linear] 4970 00003B2F 8F06[B600] <1> pop word [gg_first_cseip_linear + 2] 4971 <1> 4972 00003B33 A808 <1> test al, 8 ; not bb hit, is tt/pp hit ? 4973 00003B35 7519 <1> jnz @FF ; yes --> 4974 <1> 4975 00003B37 F706[A000]8010 <1> testopt [internalflags2], dif2_is_pp | dif2_tpg_keep_proceed_bp, 1 4976 00003B3D 7502 <1> jnz @F 4977 00003B3F EB0F <1> jmp @FF 4978 <1> 4979 <1> @@: 4980 <1> lframe near 4981 <1> lpar dword, counter 4982 <1> lpar_return 4983 00003B41 5589E5 <1> lenter 4984 00003B44 83460401 <1> add word [bp + ?counter], 1 4985 00003B48 83560600 <1> adc word [bp + ?counter + 2], 0 4986 00003B4C 5D <1> lleave 4987 00003B4D 38C0 <1> cmp al, al ; (NC, ZR) 4988 00003B4F C3 <1> retn 4989 <1> 4990 <1> @@: 4991 00003B50 A802 <1> test al, 2 ; displayed pass point ? 4992 00003B52 7503 <1> jnz @F ; yes --> 4993 00003B54 A8FF <1> test al, -1 ; NC, NZ (do not skip dump) 4994 <1> ; al & 0Ch is set so this test is NZ 4995 00003B56 C3 <1> retn 4996 <1> 4997 <1> @@: 4998 00003B57 F606[9F00]10 <1> testopt [internalflags], tt_silent_mode 4999 <1> ; (NC, ZF is ZR if to skip dump) 5000 00003B5C C3 <1> retn 5001 <1> 5002 <1> .actual_hit: 5003 <1> d5 call d5message 5004 <1> d5 asciz "bb hit",13,10 5005 <1> 5006 00003B5D F9 <1> stc 5007 00003B5E C3 <1> retn 5008 <1> 5009 <1> 5010 <1> %if _TSR 5011 <1> tsr: 5012 00003B5F E899C9 <1> call guard_re 5013 00003B62 46 <1> inc si 5014 00003B63 AC <1> lodsb 5015 00003B64 E89C7D <1> call chkeol 5016 00003B67 F606[9E00]40 <1> testopt [internalflags], tsrmode 5017 00003B6C 7405 <1> jz .try ; not yet resident --> 5018 00003B6E BA[595F] <1> mov dx, msg.alreadytsr 5019 00003B71 EB53 <1> jmp short .putsz 5020 <1> .try: 5021 00003B73 8B16[A40A] <1> mov dx, word [pspdbe] 5022 00003B77 8B1E[A60A] <1> mov bx, word [pspdbg] 5023 00003B7B BF0A00 <1> mov di, 0Ah 5024 <1> .loop: 5025 <1> %if _PM 5026 00003B7E 89D1 <1> mov cx, dx ; = original segment address 5027 00003B80 E84A56 <1> call ispm 5028 00003B83 7514 <1> jnz .rm 5029 00003B85 53 <1> push bx 5030 00003B86 89D0 <1> mov ax, dx 5031 <1> [cpu 286] 5032 00003B88 C1EA0C <1> shr dx, 12 5033 00003B8B C1E004 <1> shl ax, 4 ; shift to get a 32-bit linear address 5034 <1> __CPU__ 5035 00003B8E E812FD <1> call getsegmented.pm ; set up selector for access 5036 <1> ; This call makes some assumptions: 5037 <1> ; - No mode switch occurs; we are still in PM. 5038 <1> ; Currently none is performed from PM. 5039 <1> ; - (e)dx isn't larger than about FFD0h. 5040 <1> ; Currently scratchsel with an offset of zero is returned. 5041 00003B91 89D7 <1> mov di, dx ; -> PSP 5042 00003B93 89DA <1> mov dx, bx 5043 00003B95 5B <1> pop bx 5044 00003B96 83C70A <1> add di, byte 0Ah ; -> PSP termination vector 5045 <1> .rm: 5046 <1> %endif 5047 00003B99 8EC2 <1> mov es, dx 5048 00003B9B 268B450C <1> mov ax, word [es:(di-0Ah)+16h] 5049 00003B9F 40 <1> inc ax 5050 00003BA0 741F <1> jz .pspnotfound 5051 00003BA2 48 <1> dec ax 5052 00003BA3 741C <1> jz .pspnotfound ; parent is invalid --> 5053 <1> %if _PM 5054 00003BA5 39C8 <1> cmp ax, cx 5055 <1> %else 5056 <1> cmp ax, dx 5057 <1> %endif 5058 00003BA7 7418 <1> je .pspnotfound ; parent is the process itself --> 5059 00003BA9 89C2 <1> mov dx, ax 5060 00003BAB 39D8 <1> cmp ax, bx 5061 00003BAD 75CF <1> jne .loop ; parent is not us --> 5062 00003BAF 26813D[D085] <1> cmp word [es:di], int22 5063 00003BB4 7506 <1> jne .psphooked 5064 00003BB6 26395D02 <1> cmp word [es:di+2], bx 5065 00003BBA 740D <1> je .found ; correct vector --> (otherwise: hooked) 5066 <1> .psphooked: 5067 00003BBC BA[F95E] <1> mov dx, msg.psphooked 5068 00003BBF EB03 <1> jmp short .putsz_es 5069 <1> .pspnotfound: 5070 00003BC1 BA[CE5E] <1> mov dx, msg.pspnotfound 5071 <1> .putsz_es: 5072 00003BC4 16 <1> push ss 5073 00003BC5 07 <1> pop es 5074 <1> .putsz: 5075 00003BC6 E9DB81 <1> jmp putsz 5076 <1> 5077 <1> .found: 5078 00003BC9 BE[C80A] <1> mov si, psp22 5079 00003BCC A5 <1> movsw 5080 00003BCD A5 <1> movsw ; write our parent's vector 5081 00003BCE 83C708 <1> add di, 16h-(0Ah+4) 5082 00003BD1 A5 <1> movsw ; write our parent 5083 00003BD2 800E[9E00]40 <1> setopt [internalflags], tsrmode ; note that we are resident 5084 <1> %if _PM 5085 00003BD7 51 <1> push cx 5086 <1> %else 5087 <1> push es 5088 <1> %endif 5089 00003BD8 BA[375F] <1> mov dx, msg.nowtsr1 5090 00003BDB E8E6FF <1> call .putsz_es 5091 00003BDE 58 <1> pop ax 5092 00003BDF BF[0E08] <1> mov di, line_out 5093 00003BE2 E8097E <1> call hexword 5094 00003BE5 E8427E <1> call putsline 5095 00003BE8 BF[C80A] <1> mov di, psp22 5096 00003BEB 31C0 <1> xor ax, ax 5097 00003BED AB <1> stosw 5098 00003BEE AB <1> stosw 5099 00003BEF AB <1> stosw ; clear our parent/int22 fields 5100 00003BF0 BA[475F] <1> mov dx, msg.nowtsr2 5101 00003BF3 EBD1 <1> jmp short .putsz 5102 <1> %endif 5103 <1> 5104 <1> 5105 <1> ; INP: dx -> message, zero-terminated 5106 <1> ; CHG: - 5107 <1> ; OUT: message displayed or put into silent buffer 5108 <1> ; STT: ds = es = ss = debugger data selector 5109 <1> putsz_silent: 5110 00003BF5 F606[9F00]10 <1> testopt [internalflags], tt_silent_mode 5111 00003BFA 7405 <1> jz @F 5112 00003BFC 800E[9F00]20 <1> setopt [internalflags], tt_silence 5113 <1> @@: 5114 00003C01 E8A081 <1> call putsz ; print string 5115 00003C04 F606[9F00]10 <1> testopt [internalflags], tt_silent_mode 5116 00003C09 7405 <1> jz @F 5117 00003C0B 8026[9F00]DF <1> clropt [internalflags], tt_silence 5118 <1> @@: 5119 00003C10 C3 <1> retn 5120 <1> 5121 <1> 5122 <1> ; INP: es:di -> behind message in line_out 5123 <1> ; CHG: ax, bx, cx, dx 5124 <1> ; OUT: message displayed or put into silent buffer 5125 <1> ; STT: ds = es = ss = debugger data selector 5126 <1> putsline_silent: 5127 00003C11 F606[9F00]10 <1> testopt [internalflags], tt_silent_mode 5128 00003C16 7405 <1> jz @F 5129 00003C18 800E[9F00]20 <1> setopt [internalflags], tt_silence 5130 <1> @@: 5131 00003C1D E80A7E <1> call putsline 5132 00003C20 F606[9F00]10 <1> testopt [internalflags], tt_silent_mode 5133 00003C25 7405 <1> jz @F 5134 00003C27 8026[9F00]DF <1> clropt [internalflags], tt_silence 5135 <1> @@: 5136 00003C2C C3 <1> retn 5137 <1> 5138 <1> 5139 <1> ; INP: word [run_int] 5140 <1> ; InDOS status 5141 <1> ; STT: es = ds = ss 5142 <1> ; OUT: dx -> message 5143 <1> ; CHG: ax, di 5144 <1> getrunint: 5145 00003C2D 8B16[DA0B] <1> mov dx, word [run_int] 5146 00003C31 81FA[247D] <1> cmp dx, progtrm 5147 00003C35 7512 <1> jne .ret 5148 <1> 5149 00003C37 B8FFFF <1> mov ax, -1 5150 00003C3A E86B6A <1> call InDos 5151 00003C3D 7504 <1> jnz .no_int21_4D 5152 <1> 5153 00003C3F B44D <1> mov ah, 4Dh 5154 00003C41 CD21 <1> int 21h 5155 <1> .no_int21_4D: 5156 00003C43 BF[437D] <1> mov di, progexit 5157 00003C46 E8A57D <1> call hexword 5158 <1> .ret: 5159 00003C49 C3 <1> retn 5160 <1> 5161 <1> 5162 <1> ; Print message about unexpected interrupt, dump registers, and 5163 <1> ; end command. This code is also used by the G and P commands. 5164 <1> unexpectedinterrupt: 5165 <1> %if _PM 5166 00003C4A E82CFC <1> call resetmode 5167 <1> %endif 5168 00003C4D E8DDFF <1> call getrunint 5169 00003C50 E8A2FF <1> call putsz_silent 5170 <1> %if _CATCHINT19 5171 00003C53 81FA[677B] <1> cmp dx, int19msg 5172 00003C57 7409 <1> je .noregs ; if it terminated, skip the registers 5173 <1> %endif 5174 00003C59 81FA[247D] <1> cmp dx, progtrm 5175 00003C5D 7403 <1> je .noregs ; if it terminated, skip the registers 5176 00003C5F E82203 <1> call dumpregs_extended_silent 5177 <1> .noregs: 5178 00003C62 E87F80 <1> call silence_dump 5179 <1> 5180 00003C65 F606[A000]08 <1> testopt [internalflags2], dif2_gg_is_gg 5181 00003C6A 7407 <1> jz @F 5182 00003C6C F606[7E00]20 <1> testopt [options], gg_unexpected_no_repeat 5183 00003C71 EB05 <1> jmp @FF 5184 <1> @@: 5185 00003C73 F606[7E00]40 <1> testopt [options], tp_unexpected_no_repeat 5186 <1> @@: 5187 00003C78 7406 <1> jz @F 5188 00003C7A C706[DC0B][E003] <1> mov word [lastcmd], dmycmd 5189 <1> @@: 5190 <1> 5191 00003C80 E97DC3 <1> jmp cmd3 ; back to the start 5192 <1> 5193 <1> 5194 <1> ; Trace an instruction. 5195 <1> ; INP: word [reg_cs], dword [reg_eip], other register values 5196 <1> ; OUT: NC if the breakpoint or trace interrupt was hit, 5197 <1> ; ah = 0 5198 <1> ; ch = 0 5199 <1> ; d[reg_eip] adjusted if a breakpoint (bb) hit 5200 <1> ; cx & 8 set if trace interrupt hit 5201 <1> ; (assumed to be the expected trace hit) 5202 <1> ; (ZF only set if _BREAKPOINTS) 5203 <1> ; ZR if trace interrupt was hit, 5204 <1> ; cx & 7 = 0 5205 <1> ; NZ if a breakpoint (bb) was hit (or both were hit), 5206 <1> ; cx & 1 set if non-pass match (actual hit), 5207 <1> ; else cx & 2 set if pass match (consider as hit first, 5208 <1> ; but dump registers next (not to silent buffer) 5209 <1> ; and then continue execution) 5210 <1> ; else cx & 4 always set, indicates any match 5211 <1> ; (including matches that should merely continue) 5212 <1> ; all pass points' counters stepped 5213 <1> ; CY if no breakpoint and no trace interrupt was hit, 5214 <1> ; cx = 0 5215 <1> ; If [internalflags2] & dif2_gg_is_gg is set: 5216 <1> ; ah & 7Fh = status = 0 = no error, 5217 <1> ; 1 = couldn't write, 5218 <1> ; 2 = unreachable, 5219 <1> ; 3 = overwritten, al = new value 5220 <1> ; ah & 80h = set if error restoring point, 5221 <1> ; else error writing point to begin with 5222 <1> ; If that flag is clear: 5223 <1> ; Does not return if a breakpoint cannot be written 5224 <1> ; or cannot be restored, jumps to cmd3 instead. 5225 <1> ; CHG: all 5226 <1> ; STT: ds = es = ss 5227 <1> ; might return modeswitched (if dif2_gg_is_gg) 5228 <1> ; might be called while modeswitched 5229 <1> traceone: 5230 00003C83 F606[A000]80 <1> testopt [internalflags2], dif2_tpg_keep_proceed_bp 5231 00003C88 7403E99A00 <1> jnz .proceedbreakpoint 5232 <1> 5233 <1> %if _PM 5234 00003C8D E8E9FB <1> call resetmode 5235 <1> %endif 5236 00003C90 31C9 <1> xor cx, cx 5237 00003C92 E8455C <1> call getcseipbyte 5238 00003C95 3CCD <1> cmp al, 0CDh ; int opcode? 5239 00003C97 7403E98E00 <1> jne .isstdtrace ; no --> 5240 00003C9C 41 <1> inc cx 5241 00003C9D E83A5C <1> call getcseipbyte 5242 00003CA0 3C03 <1> cmp al, 3 5243 00003CA2 7503E98300 <1> je .isstdtrace ; int 3 opcode --> 5244 00003CA7 F606[7C00]02 <1> testopt [options], traceints ; TM=1? 5245 00003CAC 7503E9E800 <1> jz isstdtraceX 5246 00003CB1 3C01 <1> cmp al, 1 5247 00003CB3 7475 <1> je .isstdtrace ; int 1 opcode --> 5248 <1> 5249 <1> ; TM==1, single-step into the INT 5250 00003CB5 88C3 <1> mov bl, al 5251 <1> %if _PM 5252 00003CB7 E81355 <1> call ispm 5253 00003CBA 745C <1> jz .singlestep_into_interrupt_pm 5254 <1> %endif 5255 00003CBC B700 <1> mov bh, 0 5256 00003CBE 1E <1> push ds 5257 00003CBF 31C0 <1> xor ax, ax 5258 00003CC1 8ED8 <1> mov ds, ax 5259 00003CC3 D1E3 <1> shl bx, 1 5260 00003CC5 D1E3 <1> shl bx, 1 5261 00003CC7 C537 <1> lds si, [bx] 5262 00003CC9 FA <1> cli 5263 00003CCA 8A04 <1> mov al, byte [si] 5264 00003CCC FE04 <1> inc byte [si] 5265 00003CCE 3804 <1> cmp byte [si], al 5266 00003CD0 8804 <1> mov byte [si], al 5267 00003CD2 FB <1> sti 5268 00003CD3 8CDB <1> mov bx, ds ; bx:si-> interrupt handler (RM, 16 bit) 5269 00003CD5 89D8 <1> mov ax, bx 5270 00003CD7 1F <1> pop ds 5271 00003CD8 754D <1> jne .singlestep_into_interrupt_setbp 5272 <1> 5273 <1> ; The interrupt handler is in a ROM. 5274 <1> %if 0 5275 <1> jmp short isstdtraceX 5276 <1> %else 5277 00003CDA 8736[9C0C] <1> xchg si, word [reg_eip] 5278 00003CDE 8706[900C] <1> xchg ax, word [reg_cs] ; get cs:ip, set interrupt handler address 5279 00003CE2 8B0E[A00C] <1> mov cx, word [reg_efl] ; get flags 5280 00003CE6 1E <1> push ds 5281 00003CE7 8B1E[740C] <1> mov bx, word [reg_esp] 5282 00003CEB 8E1E[8C0C] <1> mov ds, word [reg_ss] ; ds:bx-> debuggee stack 5283 00003CEF 83EB06 <1> sub bx, byte 6 ; reserve enough space for flags, cs, ip 5284 00003CF2 46 <1> inc si 5285 00003CF3 46 <1> inc si ; skip CDh xxh opcode 5286 00003CF4 894F04 <1> mov word [bx+4], cx 5287 00003CF7 894702 <1> mov word [bx+2], ax 5288 00003CFA 8937 <1> mov word [bx+0], si ; save flags, cs, ip on stack 5289 00003CFC 1F <1> pop ds 5290 00003CFD 891E[740C] <1> mov word [reg_esp], bx ; update sp 5291 00003D01 8026[A10C]FC <1> and byte [reg_efl+1], ~(2|1) ; clear IF and TF (NC) 5292 <1> ; Note: If invalid flag values were previously set by the user 5293 <1> ; by directly accessing the FL or EFL register, these won't be 5294 <1> ; fixed by us now. This could be worked around by executing a 5295 <1> ; NOP in debuggee's environment (or only with debuggee's flags) 5296 <1> ; first, but I don't think it's much of an issue. 5297 00003D06 C706[DA0B][717A] <1> mov word [run_int], int1msg 5298 00003D0C 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 5301 00003D12 B90800 <1> mov cx, 8 5302 00003D15 31C0 <1> xor ax, ax ; NC, ZR 5303 00003D17 C3 <1> retn 5304 <1> 5305 <1> %endif 5306 <1> %if _PM 5307 <1> .singlestep_into_interrupt_pm: 5308 00003D18 B80402 <1> mov ax, 0204h 5309 00003D1B CD31 <1> int 31h 5310 00003D1D 89CB <1> mov bx, cx 5311 00003D1F 66 <1> _386_o32 ; mov esi, edx 5312 00003D20 89D6 <1> mov si, dx ; bx:(e)si-> interrupt handler 5313 00003D22 F6C304 <1> test bl, 4 ; is it a LDT selector? (NC) 5314 00003D25 7472 <1> jz isstdtraceX ; no --> 5315 <1> %endif 5316 <1> .singlestep_into_interrupt_setbp: 5317 <1> .proceedbreakpoint: 5318 00003D27 E95504 <1> jmp proceedbreakpoint 5319 <1> 5320 <1> .isstdtrace: 5321 <1> %if _PM 5322 00003D2A E8A054 <1> call ispm 5323 00003D2D 7415 <1> jz .notdpmientry ; already in PM --> 5324 00003D2F A1[9C0C] <1> mov ax, w[reg_eip] ; is this a switch to protected mode ? 5325 00003D32 3B06[BC88] <1> cmp ax, w[dpmiwatch+0] 5326 00003D36 750C <1> jne .notdpmientry 5327 00003D38 A1[900C] <1> mov ax, w[reg_cs] 5328 00003D3B 3B06[BE88] <1> cmp ax, w[dpmiwatch+2] 5329 00003D3F 7503E91404 <1> je isdpmientry ; yes, catch it --> (this means really "go") 5330 <1> .notdpmientry: 5331 <1> %endif 5332 00003D44 800E[A10C]01 <1> or byte [reg_efl+1], 1 ; set single-step mode (cleared when returning into DEBUG) 5333 00003D49 31C9 <1> xor cx, cx 5334 00003D4B E86300 <1> call skipprefixes 5335 00003D4E 3C9C <1> cmp al, 9Ch ; opcode "PUSHF"? 5336 00003D50 7527 <1> jnz .notpushf 5337 <1> %if _BREAKPOINTS 5338 00003D52 E8CC04 <1> call run_with_bb 5339 00003D55 B400 <1> mov ah, 0 5340 00003D57 9C <1> pushf 5341 <1> %else 5342 <1> call run 5343 <1> xor cx, cx 5344 <1> xor ax, ax 5345 <1> %endif 5346 <1> ; Clear TF in the fl word or efl dword 5347 <1> ; pointed to by debuggee's ss:(e)sp 5348 00003D58 06 <1> push es 5349 <1> %if _PM 5350 00003D59 8B1E[8C0C] <1> mov bx, word [reg_ss] ; get ss selector into bx 5351 00003D5D 8EC3 <1> mov es, bx 5352 00003D5F E8D41F <1> _386 call test_d_b_bit ; check whether a 32-bit ss 5353 <1> %else 5354 <1> mov es, word [reg_ss] 5355 <1> %endif 5356 00003D62 66 <1> _386_PM_o32 ; mov ebx, dword [reg_esp] 5357 00003D63 8B1E[740C] <1> mov bx, word [reg_esp] ; es:(e)bx-> debuggee's stack 5358 00003D67 7408 <1> _386_PM jz .pushf_16 5359 00003D69 2667806301FE <1> _386_PM and byte [es:ebx+1], ~1 ; clear TF 5360 00003D6F EB05 <1> _386_PM jmp short .pushf_common 5361 <1> .pushf_16: 5362 00003D71 26806701FE <1> and byte [es:bx+1], ~1 ; clear TF 5363 <1> .pushf_common: 5364 00003D76 07 <1> pop es 5365 00003D77 EB06 <1> jmp short .checkreturn 5366 <1> .notpushf: 5367 <1> %if _BREAKPOINTS 5368 00003D79 E8A504 <1> call run_with_bb 5369 00003D7C B400 <1> mov ah, 0 5370 00003D7E 9C <1> pushf 5371 <1> %else 5372 <1> call run 5373 <1> xor cx, cx 5374 <1> xor ax, ax 5375 <1> %endif 5376 <1> .checkreturn: 5377 00003D7F 813E[DA0B][717A] <1> cmp word [run_int], int1msg 5378 00003D85 7509 <1> jne .nomatch 5379 00003D87 80C908 <1> or cl, 8 5380 <1> %if _BREAKPOINTS 5381 00003D8A 9D <1> popf ; CF 5382 00003D8B 7308 <1> jnc .ret_NZ_NC 5383 <1> %endif 5384 00003D8D 38C0 <1> cmp al, al ; if correct interrupt (ZR, NC) 5385 00003D8F C3 <1> retn 5386 <1> 5387 <1> .nomatch: 5388 <1> %if _BREAKPOINTS 5389 00003D90 9D <1> popf ; CF 5390 00003D91 7302 <1> jnc .ret_NZ_NC 5391 <1> %endif 5392 00003D93 F9 <1> stc 5393 00003D94 C3 <1> retn 5394 <1> 5395 <1> %if _BREAKPOINTS 5396 <1> .ret_NZ_NC: 5397 00003D95 80C904 <1> or cl, 4 ; (NZ, NC) 5398 00003D98 C3 <1> retn 5399 <1> %endif 5400 <1> 5401 <1> 5402 <1> ; an INT is to be processed (TM is 0) 5403 <1> ; to avoid the nasty x86 bug which makes IRET 5404 <1> ; cause a debug exception 1 instruction too late 5405 <1> ; a breakpoint is set behind the INT 5406 <1> 5407 <1> isstdtraceX: 5408 00003D99 B90200 <1> mov cx, 2 5409 00003D9C E84800 <1> call iswriteablecseip ; is it ROM ? 5410 00003D9F 7289 <1> jc traceone.isstdtrace ; is read-only --> 5411 00003DA1 8B1E[900C] <1> mov bx, word [reg_cs] 5412 <1> 5413 <1> ; (e)si = (e)ip + 2 5414 <1> ; We don't test whether it's a 32-bit code segment here. 5415 <1> ; The previous code would leave the high word of esi uninitialized then. 5416 00003DA5 66 <1> _386_PM_o32 ; mov esi, dword [reg_eip] 5417 00003DA6 8B36[9C0C] <1> mov si, word [reg_eip] 5418 00003DAA 66 <1> _386_PM_o32 ; add esi, byte 2 5419 00003DAB 83C602 <1> add si, byte 2 ; ! do not remove the byte override, else o32 won't work 5420 00003DAE E9CE03 <1> jmp proceedbreakpoint ; set BP at BX:(E)SI and run debuggee 5421 <1> 5422 <1> ; Call getcseipbyte and loop while increasing cx if the returned 5423 <1> ; byte was a prefix. Returns the first non-prefix byte (an opcode) 5424 <1> ; in al. (WAIT or FWAIT is not considered a prefix because it's 5425 <1> ; really an opcode and we also trace it without executing a 5426 <1> ; following FPU opcode.) 5427 <1> skipprefixes: 5428 <1> .: 5429 00003DB1 E8265B <1> call getcseipbyte 5430 00003DB4 3C26 <1> cmp al, 26h 5431 00003DB6 742A <1> je .prefix ; ES 5432 00003DB8 3C2E <1> cmp al, 2Eh 5433 00003DBA 7426 <1> je .prefix ; CS 5434 00003DBC 3C36 <1> cmp al, 36h 5435 00003DBE 7422 <1> je .prefix ; SS 5436 00003DC0 3C3E <1> cmp al, 3Eh 5437 00003DC2 741E <1> je .prefix ; DS 5438 00003DC4 3CF0 <1> cmp al, 0F0h 5439 00003DC6 741A <1> je .prefix ; LOCK 5440 00003DC8 3CF3 <1> cmp al, 0F3h 5441 00003DCA 7416 <1> je .prefix ; REPZ 5442 00003DCC 3CF2 <1> cmp al, 0F2h 5443 00003DCE 7412 <1> je .prefix ; REPNZ 5444 00003DD0 EB14 <1> _no386_jmps .noprefix ; no 386, following aren't prefixes (invalid opcodes on 186+) --> 5445 00003DD2 3C64 <1> cmp al, 64h 5446 00003DD4 740C <1> je .prefix ; FS 5447 00003DD6 3C65 <1> cmp al, 65h 5448 00003DD8 7408 <1> je .prefix ; GS 5449 00003DDA 3C66 <1> cmp al, 66h 5450 00003DDC 7404 <1> je .prefix ; o32/o16 5451 00003DDE 3C67 <1> cmp al, 67h 5452 00003DE0 7504 <1> jne .noprefix ; not a32/a16 5453 <1> .prefix: 5454 00003DE2 41 <1> inc cx 5455 <1> ; jmp short . 5456 00003DE3 79CC <1> jns . ; this is not correct but serves as hack to avoid an infinite loop 5457 <1> ; (note that getcseipbyte really uses cx as signed number) 5458 00003DE5 49 <1> dec cx ; back to 07FFFh 5459 <1> .noprefix: 5460 00003DE6 C3 <1> retn 5461 <1> 5462 <1> 5463 <1> ;--- test if memory at CS:E/IP can be written to 5464 <1> ;--- return C if not 5465 <1> 5466 <1> iswriteablecseip: 5467 00003DE7 E8F05A <1> call getcseipbyte ; get byte at CS:EIP+CX 5468 00003DEA 88C4 <1> mov ah, al 5469 00003DEC 34FF <1> xor al, 0FFh 5470 00003DEE E8165B <1> call setcseipbyte 5471 00003DF1 720E <1> jc .return 5472 00003DF3 E8E45A <1> call getcseipbyte 5473 00003DF6 38C4 <1> cmp ah, al ; is it ROM? 5474 00003DF8 F9 <1> stc 5475 00003DF9 7406 <1> jz .return 5476 00003DFB 88E0 <1> mov al, ah 5477 00003DFD E8075B <1> call setcseipbyte 5478 00003E00 F8 <1> clc 5479 <1> .return: 5480 00003E01 C3 <1> retn 5481 <1> 5482 <1> 5483 <1> %if _PM 5484 <1> debuggerexception: 5485 00003E02 FC <1> cld 5486 00003E03 16 <1> push ss 5487 00003E04 1F <1> pop ds 5488 00003E05 E87568 <1> call unhack ; sets es to ss 5489 00003E08 E822FE <1> call getrunint 5490 00003E0B E8967F <1> call putsz ; print string 5491 <1> %if _EXCCSIP 5492 00003E0E BF[C07B] <1> mov di, exccsip 5493 00003E11 A1[B688] <1> mov ax, word [exception_csip + 2] 5494 00003E14 E8D77B <1> call hexword 5495 00003E17 47 <1> inc di 5496 00003E18 A1[B488] <1> mov ax, word [exception_csip] 5497 00003E1B E8D07B <1> call hexword 5498 <1> 5499 00003E1E BA[BA7B] <1> mov dx, excloc 5500 00003E21 E8807F <1> call putsz 5501 <1> %endif 5502 00003E24 E9D9C1 <1> jmp cmd3 5503 <1> %endif 5504 <1> 5505 <1> 5506 <1> %if _PM 5507 <1> [cpu 386] 5508 <1> ; INP: dh = flags as for pp2,pp3,pp5 (1 = ASIZE, 2 = OSIZE) 5509 <1> ; OUT: dh = flags as used by pp3,pp5 (1 = A32, 2 = O32) 5510 <1> pp_fix32bitflags: 5511 00003E27 E80C1F <1> call test_d_b_bit 5512 00003E2A 7403 <1> jz .16 5513 00003E2C 80F603 <1> xor dh, 1|2 ; toggle OSIZE and ASIZE (once) 5514 <1> .16: 5515 00003E2F C3 <1> retn 5516 <1> __CPU__ 5517 <1> %endif 5518 <1> 5519 <1> ; P command - proceed (i.e., skip over call/int/loop/string instruction). 5520 <1> pp: 5521 00003E30 C706[DC0B][303E] <1> mov word [lastcmd], pp 5522 00003E36 800E[A100]10 <1> setopt [internalflags2], dif2_is_pp 5523 00003E3B E81A07 <1> call parse_pt ; process arguments 5524 <1> 5525 <1> ; Do it times. First check the type of instruction. 5526 <1> pp1: 5527 00003E3E 53 <1> push bx 5528 00003E3F 51 <1> push cx ; save bx:cx 5529 <1> %if _PM 5530 00003E40 E836FA <1> call resetmode 5531 <1> %endif 5532 00003E43 BA0F00 <1> mov dx, 15 ; DL = number of bytes to go; DH = prefix flags. 5533 00003E46 8B1E[900C] <1> mov bx, word [reg_cs] 5534 00003E4A 66 <1> _386_PM_o32 ; mov esi, dword [reg_eip] 5535 00003E4B 8B36[9C0C] <1> mov si, word [reg_eip] 5536 <1> pp2: 5537 00003E4F E8C303 <1> call pp16 ; get next instruction byte into AL 5538 00003E52 BF[E410] <1> mov di, ppbytes 5539 00003E55 B91F00 <1> mov cx, PPLEN 5540 00003E58 F2AE <1> repne scasb 5541 00003E5A 752E <1> jne pp5 ; if not one of these --> 5542 00003E5C 8A451E <1> mov al,byte [di+PPLEN-1]; get corresponding byte in ppinfo 5543 00003E5F A880 <1> test al, PP_PREFIX ; prefix ? 5544 00003E61 740F <1> jz pp3 ; no --> 5545 00003E63 08C6 <1> or dh, al ; set the OSIZE or ASIZE flags if either of these 5546 <1> ; Note: Multiple OSIZE in a 16-bit cs do not toggle 5547 <1> ; between decoding as O32 and O16, they're always 5548 <1> ; decoded as O32. The same is true for A32, and 5549 <1> ; in a 32-bit cs for O16 and A16. 5550 00003E65 FECA <1> dec dl 5551 00003E67 75E6 <1> jnz pp2 ; if not out of bytes --> 5552 00003E69 BA[D971] <1> mov dx, msg.warnprefix 5553 00003E6C E8357F <1> call putsz 5554 00003E6F E98000 <1> jmp pp12 5555 <1> 5556 <1> ; A repeatable string, interrupt, call immediate or loop 5557 <1> ; instruction is to be decoded. Finish the decoding and 5558 <1> ; skip the appropriate number of opcode bytes. 5559 <1> pp3: 5560 00003E72 E8B2FF <1> _386_PM call pp_fix32bitflags 5561 00003E75 A840 <1> test al, PP_VARSIZ ; different opcode length depends on OSIZE ? 5562 00003E77 7405 <1> jz .ignoreosize ; no --> 5563 00003E79 80E602 <1> and dh, 2 5564 00003E7C 00F0 <1> add al, dh 5565 <1> .ignoreosize: 5566 00003E7E 83E007 <1> and ax, PP_SIZ_MASK 5567 00003E81 660FB7C0 <1> _386_PM movzx eax, ax ; clear high word (in case it counts) 5568 00003E85 66 <1> _386_PM_o32 ; add esi, eax 5569 00003E86 01C6 <1> add si, ax 5570 00003E88 EB56 <1> jmp pp10 5571 <1> 5572 <1> 5573 <1> pp5: 5574 00003E8A E89AFF <1> _386_PM call pp_fix32bitflags 5575 00003E8D 3CFF <1> cmp al, 0FFh ; FF/2 or FF/3 indirect NEAR or FAR call ? 5576 00003E8F 7561 <1> jne pp12 ; no, just an ordinary instruction --> 5577 00003E91 E88103 <1> call pp16 ; get MOD REG R/M byte 5578 00003E94 24F7 <1> and al, ~ (1 << 3) ; clear lowest bit of REG field (/3 to /2) 5579 00003E96 3410 <1> xor al, 2 << 3 ; /3 or /2 to /0 5580 00003E98 A838 <1> test al, 7 << 3 5581 00003E9A 7556 <1> jnz pp12 ; if not FF/2 or FF/3 --> 5582 00003E9C 3CC0 <1> cmp al, 0C0h ; mod = 3 ? 5583 00003E9E 7340 <1> jae .adjust0 ; if just a register --> 5584 00003EA0 F6C601 <1> test dh, 1 5585 00003EA3 750E <1> jnz .a32 ; if 32-bit addressing --> 5586 00003EA5 3C06 <1> cmp al, 6 ; mod = 0 r/m = 6 would encode bp ? 5587 00003EA7 7433 <1> je .adjust2 ; if just plain disp16 --> 5588 00003EA9 3C40 <1> cmp al, 40h 5589 00003EAB 7233 <1> jb .adjust0 ; if indirect register --> 5590 00003EAD 3C80 <1> cmp al, 80h 5591 00003EAF 722D <1> jb .adjust1 ; if disp8[reg(s)] 5592 00003EB1 EB29 <1> jmp short .adjust2 ; it's disp16[reg(s)] 5593 <1> 5594 <1> ; Handle 32-bit addressing (A32 ModR/M referencing memory) 5595 <1> .a32: 5596 00003EB3 3C05 <1> cmp al, 5 ; mod = 0 and r/m = 5 (would encode ebp) ? 5597 00003EB5 7421 <1> je .adjust4 ; if just plain disp32 --> 5598 00003EB7 3404 <1> xor al, 4 ; 4 to 0 (r/m 4 would encode esp) 5599 00003EB9 A807 <1> test al, 7 ; 0 if r/m would encode esp 5600 00003EBB 7513 <1> jnz .a32_nosib ; if no SIB byte --> 5601 00003EBD 86C4 <1> xchg al, ah 5602 00003EBF E85303 <1> call pp16 5603 00003EC2 86C4 <1> xchg al, ah ; load and skip the SIB byte 5604 <1> ; The SIB byte is only used here to detect the 5605 <1> ; special case encoding of disp32 with mod=0 5606 <1> ; and base=5. index=4 is also special but it 5607 <1> ; does not alter the size of the displacement 5608 <1> ; that we have to skip. 5609 00003EC4 A8C0 <1> test al, 0C0h ; is it mod = 0 ? 5610 00003EC6 7508 <1> jnz @F ; no, not a special case --> 5611 00003EC8 80E407 <1> and ah, 7 5612 00003ECB 80FC05 <1> cmp ah, 5 ; is it base = 5 ? 5613 00003ECE 7408 <1> je .adjust4 ; yes, special case encoding of disp32 --> 5614 <1> @@: 5615 <1> .a32_nosib: 5616 00003ED0 3C40 <1> cmp al, 40h 5617 00003ED2 720C <1> jb .adjust0 ; if indirect register --> 5618 00003ED4 3C80 <1> cmp al, 80h 5619 00003ED6 7206 <1> jb .adjust1 ; if disp8[reg(s)] --> 5620 <1> ; otherwise, it's disp32[reg(s)] 5621 <1> .adjust4: 5622 00003ED8 66 <1> _386_PM_o32 ; inc esi 5623 00003ED9 46 <1> inc si ; skip an instruction byte 5624 00003EDA 66 <1> _386_PM_o32 ; inc esi 5625 00003EDB 46 <1> inc si ; skip an instruction byte 5626 <1> .adjust2: 5627 00003EDC 66 <1> _386_PM_o32 ; inc esi 5628 00003EDD 46 <1> inc si ; skip an instruction byte 5629 <1> .adjust1: 5630 00003EDE 66 <1> _386_PM_o32 ; inc esi 5631 00003EDF 46 <1> inc si ; skip an instruction byte 5632 <1> .adjust0: 5633 <1> 5634 <1> pp10: 5635 <1> ; jmp pp11 ; we have a skippable instruction here 5636 <1> pp11: 5637 00003EE0 E8531E <1> _386_PM call test_d_b_bit 5638 00003EE3 7504 <1> _386_PM jnz .32 ; full 32-bit offset valid --> 5639 00003EE5 660FB7F6 <1> _386_PM movzx esi, si ; clear high word here 5640 <1> .32: 5641 <1> @@: 5642 00003EE9 E89302 <1> call proceedbreakpoint ; run until the breakpoint is hit 5643 00003EEC 7256 <1> jc pp15 ; unexpected --> 5644 <1> %if _BREAKPOINTS 5645 00003EEE 7510 <1> jnz pp12.bb_hit 5646 <1> %endif 5647 00003EF0 EB2C <1> jmp short pp13 5648 <1> 5649 <1> pp12: 5650 00003EF2 F606[A000]80 <1> testopt [internalflags2], dif2_tpg_keep_proceed_bp 5651 00003EF7 75F0 <1> jnz @B 5652 <1> 5653 00003EF9 E887FD <1> call traceone 5654 00003EFC 7246 <1> jc pp15 5655 <1> ; jc unexpectedinterrupt 5656 <1> 5657 <1> %if _BREAKPOINTS 5658 00003EFE 7416 <1> jz @F 5659 <1> 5660 <1> .bb_hit: 5661 00003F00 E8EBFB <1> call handle_bb_hit_pass_match 5662 00003F03 7204 <1> jc .actual_hit 5663 <1> d5 call d5message 5664 <1> d5 asciz "in pp12.bb_hit after non-hit",13,10 5665 00003F05 7420 <1> jz pp13.nodump 5666 00003F07 EB15 <1> jmp pp13 5667 <1> 5668 <1> 5669 <1> .actual_hit: 5670 <1> %if _PM 5671 00003F09 E86DF9 <1> call resetmode 5672 <1> %endif 5673 00003F0C E83EF3 <1> call put_deferred_message_silent 5674 00003F0F E87200 <1> call dumpregs_extended_silent 5675 00003F12 59 <1> pop cx 5676 00003F13 5B <1> pop bx ; (discard counter) 5677 00003F14 EB24 <1> jmp @FF 5678 <1> 5679 <1> @@: 5680 <1> %endif 5681 <1> 5682 <1> ; We could check here for the correct address too, but that 5683 <1> ; would require disassembling the instruction and correctly so. 5684 <1> ; (Disassembling it incorrectly would only result in spurious 5685 <1> ; "Unexpected single-step interrupt" messages aborting multi- 5686 <1> ; traces though, so it won't be fatal.) 5687 <1> ; Wouldn't really be useful though: Only the "int1" or "int 01h" 5688 <1> ; instructions should cause this, and their operation means we 5689 <1> ; might as well behave as if the breakpoint was expected. 5690 00003F16 813E[DA0B][717A] <1> cmp word [run_int], int1msg 5691 00003F1C 7526 <1> jne pp15 ; if some other interrupt (unexpected) --> 5692 <1> 5693 <1> pp13: 5694 <1> %if _PM 5695 00003F1E E858F9 <1> call resetmode 5696 <1> %endif 5697 <1> ; An expected breakpoint. Dump registers, then loop. 5698 00003F21 E829F3 <1> call put_deferred_message_silent 5699 00003F24 E85D00 <1> call dumpregs_extended_silent 5700 <1> 5701 <1> .nodump: 5702 00003F27 E863FB <1> call tt_handle_while 5703 00003F2A 59 <1> pop cx 5704 00003F2B 5B <1> pop bx 5705 <1> 5706 00003F2C 83E901 <1> sub cx, 1 5707 00003F2F 83DB00 <1> sbb bx, 0 5708 <1> 5709 00003F32 85DB <1> test bx, bx 5710 00003F34 750B <1> jnz pp14 5711 00003F36 85C9 <1> test cx, cx 5712 00003F38 7507 <1> jnz pp14 ; back for more --> 5713 <1> 5714 <1> @@: 5715 <1> %if _PM 5716 00003F3A E83CF9 <1> call resetmode 5717 <1> %endif 5718 00003F3D E8A47D <1> call silence_dump 5719 <1> 5720 00003F40 C3 <1> retn 5721 <1> 5722 <1> %if ($ - pp1 - 1) < 128 5723 <1> pp14: equ pp1 5724 <1> %else 5725 00003F41 E9FAFE <1> pp14: jmp pp1 5726 <1> %endif 5727 <1> 5728 <1> pp15: 5729 00003F44 E903FD <1> jmp unexpectedinterrupt ; print message about unexpected interrupt 5730 <1> ; and quit 5731 <1> 5732 <1> 5733 <1> terminate_silent_dump.if_nonnull: 5734 00003F47 F606[9F00]10 <1> testopt [internalflags], tt_silent_mode 5735 00003F4C 7435 <1> jz terminate_silent_dump.ret 5736 00003F4E 06 <1> push es 5737 00003F4F 57 <1> push di 5738 00003F50 50 <1> push ax 5739 00003F51 8E06[F209] <1> mov es, word [auxbuff_segorsel] 5740 00003F55 8B3E[FA09] <1> mov di, word [auxbuff_behind_last_silent] 5741 00003F59 3B3E[F809] <1> cmp di, word [auxbuff_behind_while_condition] 5742 00003F5D 7421 <1> je terminate_silent_dump.done 5743 00003F5F 4F <1> dec di 5744 00003F60 B000 <1> mov al, 0 5745 00003F62 AE <1> scasb 5746 00003F63 741B <1> je terminate_silent_dump.done 5747 00003F65 EB14 <1> jmp @F 5748 <1> 5749 <1> terminate_silent_dump: 5750 00003F67 F606[9F00]10 <1> testopt [internalflags], tt_silent_mode 5751 00003F6C 7415 <1> jz .ret 5752 <1> .is_silent: 5753 00003F6E 06 <1> push es 5754 00003F6F 57 <1> push di 5755 00003F70 50 <1> push ax 5756 00003F71 8E06[F209] <1> mov es, word [auxbuff_segorsel] 5757 00003F75 8B3E[FA09] <1> mov di, word [auxbuff_behind_last_silent] 5758 00003F79 B000 <1> mov al, 0 5759 <1> @@: 5760 00003F7B AA <1> stosb 5761 00003F7C FF06[FA09] <1> inc word [auxbuff_behind_last_silent] 5762 <1> ; -> point past the NUL 5763 <1> .done: 5764 00003F80 58 <1> pop ax 5765 00003F81 5F <1> pop di 5766 00003F82 07 <1> pop es 5767 <1> .ret: 5768 00003F83 C3 <1> retn 5769 <1> 5770 <1> 5771 <1> dumpregs_extended_silent: 5772 <1> %if _PM 5773 00003F84 E8F2F8 <1> call resetmode 5774 <1> %endif 5775 00003F87 F606[9F00]10 <1> testopt [internalflags], tt_silent_mode 5776 00003F8C 7405 <1> jz @F 5777 00003F8E 800E[9F00]20 <1> setopt [internalflags], tt_silence 5778 <1> ; Call dumpregs (trimputs, puts, putsline, disasm) with 5779 <1> ; "silence" flag (writes to auxbuff instead of terminal). 5780 <1> @@: 5781 00003F93 E81BE7 <1> call dumpregs_extended 5782 00003F96 F606[9F00]10 <1> testopt [internalflags], tt_silent_mode 5783 00003F9B 7408 <1> jz @F 5784 <1> ; Terminate the last dump's output with a NUL byte. 5785 00003F9D E8CEFF <1> call terminate_silent_dump.is_silent 5786 00003FA0 8026[9F00]DF <1> clropt [internalflags], tt_silence 5787 <1> @@: 5788 <1> 5789 <1> handle_serial_flags_ctrl_c: 5790 00003FA5 1E <1> push ds 5791 00003FA6 50 <1> push ax 5792 00003FA7 16 <1> push ss 5793 00003FA8 1F <1> pop ds 5794 00003FA9 F606[8700]40 <1> testopt [options3], opt3_check_ctrlc_0bh 5795 00003FAE 740A <1> jz @FF 5796 <1> ; The following DOS call originated in sleepcmd. 5797 <1> ; However, it is useful for all callers of this 5798 <1> ; function so put it here. 5799 00003FB0 E8F566 <1> call InDos 5800 00003FB3 7505 <1> jnz @F 5801 00003FB5 B40B <1> mov ah, 0Bh 5802 <1> doscall ; allow to break with Ctrl-C 2040 00003FB7 E8AF1D <2> call _doscall 5803 <1> @@: 5804 <1> @@: 5805 00003FBA F606[EB0B]02 <1> testopt [serial_flags], sf_ctrl_c 5806 00003FBF 755B <1> jnz handle_ctrl_c 5807 00003FC1 F606[7D00]40 <1> testopt [options], enable_serial 5808 00003FC6 7551 <1> jnz .ret 5809 00003FC8 E8DD66 <1> call InDos 5810 00003FCB 744C <1> jz .ret 5811 00003FCD F606[8700]20 <1> testopt [options3], opt3_check_ctrlc_keyb 5812 00003FD2 7445 <1> jz .ret 5813 <1> 5814 <1> .check_rombios_buffer: 5815 00003FD4 53 <1> push bx 5816 00003FD5 52 <1> push dx 5817 00003FD6 B84000 <1> mov ax, 40h ; dual mode segment/selector 5818 00003FD9 50 <1> push ax 5819 00003FDA A1[FA0B] <1> mov ax, word [io_end_buffer] 5820 00003FDD 8B16[F80B] <1> mov dx, word [io_start_buffer] 5821 00003FE1 1F <1> pop ds 5822 00003FE2 85C0 <1> test ax, ax 5823 00003FE4 7503 <1> jnz @F 5824 00003FE6 A18200 <1> mov ax, word [82h] ; end of circular keypress buffer 5825 <1> @@: 5826 00003FE9 85D2 <1> test dx, dx 5827 00003FEB 7504 <1> jnz @F 5828 00003FED 8B168000 <1> mov dx, word [80h] ; start of circular buffer 5829 <1> @@: 5830 00003FF1 89C3 <1> mov bx, ax 5831 00003FF3 29D3 <1> sub bx, dx ; cmp end, start 5832 00003FF5 7620 <1> jbe .ret_dx_bx ; invalid --> 5833 00003FF7 F6C301 <1> test bl, 1 ; even amount of bytes ? 5834 00003FFA 751B <1> jnz .ret_dx_bx ; invalid --> 5835 00003FFC 8B1E1A00 <1> mov bx, word [1Ah] ; current head of circular buffer 5836 <1> .loop: 5837 00004000 3B1E1C00 <1> cmp bx, word [1Ch] ; equal to current tail ? 5838 00004004 7411 <1> je .ret_dx_bx ; yes, all entries checked --> 5839 00004006 803F03 <1> cmp byte [bx], 3 ; is it Ctrl-C ? 5840 00004009 7411 <1> je handle_ctrl_c ; yes, handle --> 5841 0000400B 43 <1> inc bx 5842 0000400C 43 <1> inc bx ; -> next entry 5843 0000400D 39C3 <1> cmp bx, ax ; at end of buffer ? 5844 0000400F 72EF <1> jb .loop ; no, loop --> 5845 00004011 7704 <1> ja .ret_dx_bx ; invalid --> 5846 00004013 89D3 <1> mov bx, dx ; reset to start of buffer 5847 00004015 EBE9 <1> jmp .loop ; then loop --> 5848 <1> 5849 <1> .ret_dx_bx: 5850 00004017 5A <1> pop dx 5851 00004018 5B <1> pop bx 5852 <1> 5853 <1> .ret: 5854 00004019 58 <1> pop ax 5855 0000401A 1F <1> pop ds 5856 0000401B C3 <1> retn 5857 <1> 5858 <1> 5859 <1> handle_ctrl_c: 5860 0000401C 16 <1> push ss 5861 0000401D 1F <1> pop ds 5862 0000401E 16 <1> push ss 5863 0000401F 07 <1> pop es 5864 00004020 8026[EB0B]F9 <1> clropt [serial_flags], sf_ctrl_c | sf_double_ctrl_c 5865 <1> %if _PM 5866 00004025 E851F8 <1> call resetmode 5867 <1> %endif 5868 00004028 E81CFF <1> call terminate_silent_dump.if_nonnull 5869 0000402B E8B67C <1> call silence_dump 5870 0000402E BA[1C5D] <1> mov dx, msg.ctrlc 5871 00004031 E8707D <1> call putsz 5872 <1> 5873 00004034 800E[A400]10 <1> setopt [internalflags3], dif3_input_terminal_override 5874 <1> ; make sure we drain terminal input 5875 <1> @@: 5876 00004039 E8B97F <1> call getc_if_any ; drain the buffer 5877 0000403C 75FB <1> jnz @B ; if any was available --> 5878 <1> 5879 0000403E 8026[A400]EF <1> clropt [internalflags3], dif3_input_terminal_override 5880 00004043 E947C3 <1> jmp cmd2_reset_re 5881 <1> 5882 <1> 5883 <1> ; INP: bp [tpg_proceed_bp], 5884 <1> ; linear address and point content to write 5885 <1> ; opt [internalflags2] & dif2_tpg_proceed_bp_set 5886 <1> ; set if a breakpoint was written 5887 <1> ; OUT: CY if error, 5888 <1> ; bp [tpg_proceed_bp] = has point content to restore 5889 <1> ; ah = reason = 0 = no error (never), 5890 <1> ; 1 = couldn't write, 5891 <1> ; 2 = unreachable, 5892 <1> ; 3 = overwritten, al = new byte value 5893 <1> ; NC if no error, 5894 <1> ; ah = 0 5895 <1> ; opt [internalflags2] & dif2_tpg_proceed_bp_set 5896 <1> ; cleared 5897 <1> ; CHG: di, (e)dx, ax, bx 5898 <1> ; STT: might switch modes due to getsegmented call 5899 <1> proceed_writepoint_restore: 5900 00004046 B400 <1> mov ah, 0 5901 00004048 F606[A000]40 <1> testopt [internalflags2], dif2_tpg_proceed_bp_set 5902 0000404D 745F <1> jz proceed_wp.retn ; (NC) 5903 0000404F BF0100 <1> mov di, 1 5904 00004052 EB05 <1> jmp proceed_wp 5905 <1> 5906 <1> ; INP: bp [tpg_proceed_bp], 5907 <1> ; linear address and point content to write (0CCh) 5908 <1> ; OUT: CY if error, 5909 <1> ; bp [tpg_proceed_bp] = has point content 0CCh 5910 <1> ; ah = reason = 0 = no error (never), 5911 <1> ; 1 = couldn't write, 5912 <1> ; 2 = unreachable, 5913 <1> ; 3 = overwritten (never) 5914 <1> ; NC if no error (either flag not set or point restored), 5915 <1> ; ah = 0 5916 <1> ; opt [internalflags2] & dif2_tpg_proceed_bp_set 5917 <1> ; set 5918 <1> ; CHG: di, (e)dx, ax, bx 5919 <1> ; STT: might switch modes due to getsegmented call 5920 <1> proceed_writepoint: 5921 <1> %if _DELAY_BEFORE_BP 5922 00004054 E828F4 <1> call delay_before_bp 5923 <1> %endif 5924 00004057 31FF <1> xor di, di 5925 <1> proceed_wp: 5926 <1> lframe near 5927 00004059 5589E5 <1> lenter 5928 0000405C 83F701 <1> xor di, 1 5929 <1> lvar word, is_write 5930 0000405F 57 <1> push di 5931 <1> 5932 00004060 A1[C400] <1> mov ax, word [tpg_proceed_bp] 5933 <1> %if _PM 5934 00004063 8B16[C600] <1> mov dx, word [tpg_proceed_bp + 2] 5935 <1> %else 5936 <1> xor dx, dx 5937 <1> mov dl, byte [tpg_proceed_bp + 2] 5938 <1> %endif 5939 00004067 E834F8 <1> call getsegmented 5940 0000406A A0[CC00] <1> mov al, byte [tpg_proceed_bp + BPSIZE - 1] 5941 <1> ; al = byte to restore 5942 0000406D B402 <1> mov ah, 2 ; error reason: unreachable 5943 0000406F 723A <1> jc .return 5944 <1> 5945 00004071 F646FE01 <1> test byte [bp + ?is_write], 1 5946 <1> ; (NC) is it writing ? 5947 00004075 7518 <1> jnz .write 5948 <1> .restore: 5949 00004077 50 <1> push ax 5950 00004078 E8E958 <1> call readmem ; read current byte 5951 0000407B 3CCC <1> cmp al, 0CCh ; is this still what we wrote? 5952 0000407D B403 <1> mov ah, 3 ; error reason: overwritten, al = new value 5953 0000407F F9 <1> stc 5954 00004080 7529 <1> jne .return_discard ; nope --> (CY) 5955 00004082 58 <1> pop ax 5956 00004083 E8B158 <1> call writemem ; return the byte to its original value 5957 00004086 720D <1> jc .next ; failed --> (CY, handled there) 5958 00004088 C606[CC00]CC <1> mov byte [tpg_proceed_bp + BPSIZE - 1], 0CCh 5959 <1> ; reset stored point 5960 0000408D EB06 <1> jmp short .next 5961 <1> 5962 <1> .write: 5963 0000408F E8A558 <1> call writemem 5964 00004092 A2[CC00] <1> mov byte [tpg_proceed_bp + BPSIZE - 1], al 5965 <1> ; save the previous byte there 5966 <1> .next: 5967 00004095 B401 <1> mov ah, 1 ; (in case of error) error reason: cannot write 5968 00004097 7212 <1> jc .return ; failed to write --> (CY) 5969 00004099 B400 <1> mov ah, 0 ; (no error) 5970 <1> 5971 0000409B 800E[A000]40 <1> setopt [internalflags2], dif2_tpg_proceed_bp_set 5972 <1> ; set flag in case of successful writing 5973 000040A0 F646FE01 <1> test byte [bp + ?is_write], 1 5974 <1> ; (NC) is it writing ? 5975 000040A4 7505 <1> jnz .return ; yes, leave flag set --> 5976 000040A6 8026[A000]BF <1> clropt [internalflags2], dif2_tpg_proceed_bp_set 5977 <1> ; (NC) clear flag in case of successful restoring 5978 <1> .return: 5979 <1> .return_discard: 5980 000040AB 89EC5D <1> lleave 5981 <1> .retn: 5982 000040AE C3 <1> retn 5983 <1> 5984 <1> 5985 <1> ; INP: ah & 7Fh = status = 0 = no error, 5986 <1> ; 1 = couldn't write, 5987 <1> ; 2 = unreachable, 5988 <1> ; 3 = overwritten, al = new value 5989 <1> ; ah & 80h = set if error restoring point, 5990 <1> ; else error writing point 5991 <1> ; bh & 80h = set if gg breakpoint, 5992 <1> ; cx = index (0-based) 5993 <1> ; bh & 40h = set if bb breakpoint, 5994 <1> ; cx = index (0-based) 5995 <1> ; bh & C0h = clear if proceed breakpoint 5996 <1> ; bl = what we tried to restore, only set if ah & 80h set 5997 <1> ; dword [ss:sp] = linear address (24 bit if non-_PM) 5998 <1> ; CHG: ax, bx, cx, dx, di 5999 <1> ; STT: ds = es = ss = debugger data selector 6000 <1> display_breakpoint_failure: 6001 <1> %if _PM 6002 000040AF E8C7F7 <1> call resetmode 6003 <1> %endif 6004 <1> 6005 000040B2 50 <1> push ax 6006 000040B3 53 <1> push bx 6007 000040B4 51 <1> push cx 6008 000040B5 56 <1> push si 6009 000040B6 E82B7C <1> call silence_dump ; do away with silent mode 6010 000040B9 5E <1> pop si 6011 000040BA 59 <1> pop cx 6012 000040BB 5B <1> pop bx 6013 000040BC 58 <1> pop ax 6014 <1> 6015 000040BD 800E[A100]08 <1> setopt [internalflags2], dif2_bp_failure 6016 <1> 6017 <1> lframe near 6018 <1> lpar dword, linear 6019 000040C2 5589E5 <1> lenter 6020 <1> lvar word, input_ax 6021 000040C5 50 <1> push ax 6022 <1> 6023 000040C6 BA[C56E] <1> mov dx, msg.cant_bp_the 6024 000040C9 E8D87C <1> call putsz 6025 000040CC F6C780 <1> test bh, 80h 6026 000040CF 740B <1> jz @F 6027 <1> 6028 000040D1 89C8 <1> mov ax, cx 6029 000040D3 40 <1> inc ax ; make it 1-based 6030 000040D4 E8D6F5 <1> call putordinalbyte 6031 <1> 6032 000040D7 BA[F56E] <1> mov dx, msg.cant_bp_type_gg 6033 000040DA EB15 <1> jmp .got_type 6034 <1> 6035 <1> @@: 6036 000040DC F6C740 <1> test bh, 40h 6037 000040DF 740D <1> jz @F 6038 <1> 6039 000040E1 89C8 <1> mov ax, cx 6040 000040E3 BF[F26E] <1> mov di, msg.cant_bp_type_permanent.index 6041 000040E6 E80C79 <1> call hexbyte ; (0-based index) 6042 <1> 6043 000040E9 BA[DD6E] <1> mov dx, msg.cant_bp_type_permanent 6044 000040EC EB03 <1> jmp .got_type 6045 <1> 6046 <1> @@: 6047 000040EE BA[CA6E] <1> mov dx, msg.cant_bp_type_proceed 6048 <1> 6049 <1> .got_type: 6050 000040F1 E8B07C <1> call putsz 6051 <1> 6052 000040F4 BF[0C6F] <1> mov di, msg.cant_bp_linear.address1 6053 000040F7 8B4606 <1> mov ax, word [bp + ?linear + 2] 6054 <1> %ifn _PM 6055 <1> mov ah, 0 6056 <1> %endif 6057 000040FA E8F178 <1> call hexword 6058 000040FD 47 <1> inc di 6059 <1> ; mov di, msg.cant_bp_linear.address2 6060 000040FE 8B4604 <1> mov ax, word [bp + ?linear] 6061 00004101 E8EA78 <1> call hexword 6062 <1> 6063 00004104 BA[036F] <1> mov dx, msg.cant_bp_linear 6064 00004107 E89A7C <1> call putsz 6065 <1> 6066 0000410A BF[416F] <1> mov di, msg.cant_bp_restore.value 6067 0000410D 89D8 <1> mov ax, bx 6068 0000410F E8E378 <1> call hexbyte 6069 <1> 6070 00004112 BA[186F] <1> mov dx, msg.cant_bp_write 6071 00004115 8B46FE <1> mov ax, word [bp + ?input_ax] 6072 00004118 F6C480 <1> test ah, 80h 6073 0000411B 7406 <1> jz @F 6074 0000411D 80E47F <1> and ah, ~80h 6075 00004120 BA[2B6F] <1> mov dx, msg.cant_bp_restore 6076 <1> @@: 6077 00004123 E87E7C <1> call putsz 6078 <1> 6079 00004126 BF[BC6F] <1> mov di, msg.cant_bp_reason3.value 6080 00004129 E8C978 <1> call hexbyte 6081 <1> 6082 0000412C BA[456F] <1> mov dx, msg.cant_bp_reason 6083 0000412F E8727C <1> call putsz 6084 <1> 6085 00004132 BA[516F] <1> mov dx, msg.cant_bp_reason0 6086 00004135 80FC01 <1> cmp ah, 1 6087 00004138 7215 <1> jb @F 6088 0000413A BA[776F] <1> mov dx, msg.cant_bp_reason1 6089 0000413D 7410 <1> je @F 6090 0000413F BA[8A6F] <1> mov dx, msg.cant_bp_reason2 6091 00004142 80FC03 <1> cmp ah, 3 6092 00004145 7208 <1> jb @F 6093 00004147 BA[9F6F] <1> mov dx, msg.cant_bp_reason3 6094 0000414A 7403 <1> je @F 6095 0000414C BA[C26F] <1> mov dx, msg.cant_bp_reasonu 6096 <1> @@: 6097 0000414F E8527C <1> call putsz 6098 <1> 6099 00004152 89EC5D <1> lleave 6100 00004155 C20400 <1> lret 6101 <1> 6102 <1> 6103 <1> %if _PM 6104 <1> isdpmientry: 6105 00004158 F606[A800]02 <1> testopt [internalflags4], dif4_int_2F_hooked 6106 0000415D 7407 <1> jz @F 6107 0000415F F606[9D00]02 <1> testopt [internalflags], nohook2F 6108 00004164 740A <1> jz .stdhook 6109 <1> @@: 6110 00004166 C706[9C0C][7689] <1> mov word [reg_eip], mydpmientry 6111 0000416C 8C1E[900C] <1> mov word [reg_cs], ds ; if Int2F not hooked, point to the hook here 6112 <1> ; ds => lDEBUG_DATA_ENTRY 6113 <1> .stdhook: 6114 <1> ; Run code until it returned far. 6115 00004170 8B1E[740C] <1> mov bx, word [reg_esp] 6116 00004174 1E <1> push ds 6117 00004175 8E1E[8C0C] <1> mov ds, word [reg_ss] ; ds:bx-> (16-bit) stack 6118 00004179 8B37 <1> mov si, word [bx+0] 6119 0000417B 8B5F02 <1> mov bx, word [bx+2] ; get (16-bit) far return address 6120 0000417E 1F <1> pop ds 6121 <1> %endif 6122 <1> ; Proceed over an instruction 6123 <1> ; INP: bx:(e)si-> where to write the breakpoint 6124 <1> ; OUT: NC if the breakpoint was hit, 6125 <1> ; ah = 0 6126 <1> ; ch = 0 6127 <1> ; d[reg_eip] adjusted 6128 <1> ; cx & 8 set if proceed point hit 6129 <1> ; (ZF only set if _BREAKPOINTS) 6130 <1> ; ZR if breakpoint after instruction was hit, 6131 <1> ; cx & 7 = 0 6132 <1> ; NZ if another breakpoint (bb) was hit (or both), 6133 <1> ; cx & 1 set if non-pass match (actual hit), 6134 <1> ; else cx & 2 set if pass match (consider as hit first, 6135 <1> ; but dump registers next (not to silent buffer) 6136 <1> ; and then continue execution) 6137 <1> ; else cx & 4 always set, indicates any match 6138 <1> ; (including matches that should merely continue) 6139 <1> ; all pass points' counters stepped 6140 <1> ; CY if the breakpoint was not hit, 6141 <1> ; cx = 0 6142 <1> ; If [internalflags2] & dif2_gg_is_gg is set: 6143 <1> ; ah & 7Fh = status = 0 = no error, 6144 <1> ; 1 = couldn't write, 6145 <1> ; 2 = unreachable, 6146 <1> ; 3 = overwritten, al = new value 6147 <1> ; ah & 80h = set if error restoring point, 6148 <1> ; else error writing point to begin with 6149 <1> ; If that flag is clear: 6150 <1> ; Does not return if a breakpoint cannot be written 6151 <1> ; or cannot be restored, jumps to cmd3 instead. 6152 <1> ; CHG: all 6153 <1> ; STT: ds = es = ss 6154 <1> ; might return modeswitched (if dif2_gg_is_gg) 6155 <1> ; might be called while modeswitched 6156 <1> proceedbreakpoint: 6157 0000417F F606[A000]80 <1> testopt [internalflags2], dif2_tpg_keep_proceed_bp 6158 00004184 750D <1> jnz @F 6159 <1> 6160 00004186 66 <1> _386_PM_o32 ; mov edx, esi 6161 00004187 89F2 <1> mov dx, si ; bx:(e)dx = segmented 6162 00004189 E8D4F5 <1> call getlinear ; dx:ax = linear 6163 <1> 6164 0000418C A3[C400] <1> mov word [tpg_proceed_bp], ax 6165 <1> ; The following two instructions must be in this order. 6166 <1> ; For the non-_PM build, writing to the second word 6167 <1> ; of the breakpoint also writes to the content byte. 6168 0000418F 8916[C600] <1> mov word [tpg_proceed_bp + 2], dx 6169 <1> ; store in point 6170 <1> @@: 6171 00004193 C606[CC00]CC <1> mov byte [tpg_proceed_bp + BPSIZE - 1], 0CCh 6172 <1> ; initialise content 6173 00004198 E8B9FE <1> call proceed_writepoint 6174 <1> ; This call might return modeswitched. 6175 0000419B 7308 <1> jnc @F 6176 <1> 6177 0000419D 80E47F <1> and ah, ~80h ; mark error during writing 6178 <1> 6179 000041A0 31C9 <1> xor cx, cx ; cx = 0 in case of branching 6180 000041A2 51 <1> push cx ; put the zero on the stack 6181 <1> 6182 000041A3 EB0E <1> jmp .failure 6183 <1> 6184 <1> @@: 6185 <1> ; The run functions call resetmode. 6186 <1> %if _BREAKPOINTS 6187 000041A5 E87900 <1> call run_with_bb 6188 000041A8 89C8 <1> mov ax, cx 6189 <1> %else 6190 <1> call run 6191 <1> xor ax, ax 6192 <1> %endif 6193 000041AA 50 <1> push ax 6194 <1> 6195 <1> ; It's important to keep the linear address saved inbetween, 6196 <1> ; even though we save by value (as opposed to DEBUG/X G's saving 6197 <1> ; of the reference) because the selector that we used for the 6198 <1> ; access might now be invalid or (worse) point elsewhere, or 6199 <1> ; a mode change might have occured. (The latter is sometimes 6200 <1> ; handled by a specific kludge in DEBUG/X, but not always.) 6201 <1> 6202 000041AB E898FE <1> call proceed_writepoint_restore 6203 <1> ; This call might return modeswitched. 6204 000041AE 7329 <1> jnc @F 6205 <1> 6206 000041B0 80CC80 <1> or ah, 80h ; mark error during restoration 6207 <1> 6208 <1> .failure: 6209 <1> ; Here we may be modeswitched. 6210 000041B3 F606[A000]08 <1> testopt [internalflags2], dif2_gg_is_gg 6211 <1> ; is it from gg ? 6212 000041B8 7558 <1> jnz .return_CY_pop_cx ; (CY) yes, return to gg 6213 <1> ; This branch may be taken while modeswitched. 6214 <1> 6215 <1> %if _PM 6216 000041BA E8BCF6 <1> call resetmode 6217 <1> %endif 6218 <1> 6219 000041BD E88DF0 <1> call put_deferred_message_silent 6220 <1> 6221 000041C0 50 <1> push ax 6222 000041C1 E8207B <1> call silence_dump 6223 000041C4 58 <1> pop ax 6224 <1> 6225 000041C5 FF36[C600] <1> push word [tpg_proceed_bp + 2] 6226 000041C9 FF36[C400] <1> push word [tpg_proceed_bp] 6227 000041CD 8A1E[CC00] <1> mov bl, [tpg_proceed_bp + BPSIZE - 1] 6228 000041D1 B700 <1> mov bh, 0 6229 000041D3 E8D9FE <1> call display_breakpoint_failure 6230 <1> ; This function calls resetmode. 6231 000041D6 E927BE <1> jmp cmd3 6232 <1> 6233 <1> @@: 6234 000041D9 E823F6 <1> call get_cseip_of_possible_breakpoint 6235 <1> ; dx:ax = linear address 1 before cs:(e)ip 6236 000041DC 7232 <1> jc .return_CY_pop_cx_ax_zero 6237 <1> 6238 000041DE 59 <1> pop cx 6239 <1> %if _PM 6240 000041DF 3916[C600] <1> cmp word [tpg_proceed_bp + 2], dx 6241 <1> %else 6242 <1> test dh, dh ; (bits 24 to 31 set. shouldn't happen) 6243 <1> jnz .not_pp 6244 <1> cmp byte [tpg_proceed_bp + 2], dl 6245 <1> %endif 6246 000041E3 7511 <1> jne .not_pp 6247 000041E5 3906[C400] <1> cmp word [tpg_proceed_bp], ax 6248 000041E9 750B <1> jne .not_pp ; is unexpected (not behind the breakpoint) --> 6249 <1> 6250 <1> ; Need to check this here, because we have to 6251 <1> ; decrement (e)ip if the breakpoint was hit. 6252 000041EB 813E[DA0B][947A] <1> cmp word [run_int], int3msg 6253 000041F1 7503 <1> jne .not_pp ; is unexpected (not returned by interrupt 03h) --> 6254 000041F3 80C908 <1> or cl, 8 ; set flag: pp hit 6255 <1> 6256 <1> .not_pp: 6257 000041F6 B400 <1> mov ah, 0 ; set error to "no error" 6258 <1> 6259 000041F8 E319 <1> jcxz .return_CY ; bb hit/pass/nonpass or pp hit ? if no --> 6260 <1> 6261 000041FA E872F0 <1> call adjust_cseip_after_breakpoint 6262 <1> ; decrement (e)ip to point at the instruction 6263 <1> 6264 000041FD F6C101 <1> test cl, 1 ; bb hit ? 6265 00004200 750A <1> jnz .return ; yes, return (NC, NZ) --> 6266 <1> 6267 00004202 F6C108 <1> test cl, 8 ; proceed point matched ? 6268 00004205 7506 <1> jnz @F ; yes --> 6269 <1> 6270 00004207 800E[A000]80 <1> setopt [internalflags2], dif2_tpg_keep_proceed_bp 6271 <1> ; flag that we should keep this proceed point 6272 <1> ; (NC, NZ) 6273 <1> .return: 6274 0000420C C3 <1> retn 6275 <1> 6276 <1> @@: 6277 <1> ; return with ax = 0, NC, ZR 6278 <1> ; 6279 <1> ; (hit proceed point, no hit bb (possibly pass/non-pass bb) 6280 0000420D 31C0 <1> xor ax, ax ; ah = 0 (NC, ZR) 6281 0000420F C3 <1> retn 6282 <1> 6283 <1> ; set ax = 0, pop cx, CY 6284 <1> .return_CY_pop_cx_ax_zero: 6285 00004210 31C0 <1> xor ax, ax 6286 <1> 6287 <1> ; pop cx, CY (preserve ax) 6288 <1> .return_CY_pop_cx: 6289 00004212 59 <1> pop cx 6290 <1> .return_CY: 6291 00004213 F9 <1> stc 6292 00004214 C3 <1> retn 6293 <1> 6294 <1> 6295 <1> ; PPX - Get next byte in instruction stream. 6296 <1> ; INP: bx:(e)si-> next byte 6297 <1> ; OUT: al = next byte 6298 <1> ; (e)si incremented 6299 <1> pp16: 6300 <1> %if _PM 6301 00004215 E81B1B <1> call resetmode_and_test_d_b_bit 6302 <1> %endif 6303 00004218 1E <1> push ds 6304 00004219 8EDB <1> mov ds, bx 6305 <1> %if _PM 6306 0000421B 7401 <1> jz .16 6307 0000421D 67 <1> a32 ; use esi for lodsb 6308 <1> .16: 6309 <1> %endif 6310 0000421E AC <1> lodsb 6311 0000421F 1F <1> pop ds 6312 00004220 C3 <1> retn 6313 <1> ; begin loop over instruction bytes. 6314 <1> 6315 <1> 6316 <1> %if _BREAKPOINTS 6317 <1> ; Run with bb breakpoints 6318 <1> ; 6319 <1> ; OUT: CY if another breakpoint (not a bb one) or trace hit, 6320 <1> ; cx = 0 6321 <1> ; NC if a bb breakpoint hit, 6322 <1> ; cx & 1 set if it is an actual hit 6323 <1> ; else cx & 2 set if it is a pass match, 6324 <1> ; else it is a non-pass non-match 6325 <1> ; (cx & 4 always set) 6326 <1> ; STT: might return modeswitched 6327 <1> run_with_bb: 6328 00004221 F606[A000]08 <1> testopt [internalflags2], dif2_gg_is_gg 6329 00004226 750C <1> jnz .no_bb 6330 <1> 6331 00004228 F606[9F00]C0 <1> testopt [internalflags], tt_no_bb | tt_no_bb_first 6332 0000422D 740C <1> jz @F 6333 <1> 6334 0000422F 8026[9F00]7F <1> clropt [internalflags], tt_no_bb_first 6335 <1> 6336 <1> .no_bb: 6337 00004234 E87400 <1> call run 6338 00004237 31C9 <1> xor cx, cx 6339 00004239 F9 <1> stc 6340 0000423A C3 <1> retn 6341 <1> 6342 <1> @@: 6343 <1> .gg5: 6344 <1> %if _BREAKPOINTS 6345 0000423B E871F2 <1> call bb_writepoints_init_reset 6346 <1> %endif 6347 <1> 6348 0000423E F606[A000]10 <1> testopt [internalflags2], dif2_gg_first_detected 6349 00004243 7436 <1> jz .only_run ; easy case, no cseip point detected --> 6350 <1> 6351 <1> 6352 <1> ; Enter special mode: Restore cseip breakpoint content. 6353 00004245 800E[A000]02 <1> setopt [internalflags2], dif2_gg_skip_non_cseip 6354 <1> 6355 0000424A 83EC20 <1> sub sp, _NUM_B_BP * 2 6356 0000424D 89E5 <1> mov bp, sp ; -> error info 6357 <1> 6358 0000424F B91000 <1> mov cx, _NUM_B_BP ; = index above last one to restore 6359 00004252 E828F3 <1> call bb_restorepoints_and_init_error_info 6360 00004255 7317 <1> jnc @F ; no error ? --> 6361 <1> 6362 <1> ; Error in bb_restorepoints. Try to restore other bb. 6363 <1> 6364 <1> ; Exit special mode: Handle non-cseip breakpoints again. 6365 00004257 8026[A000]FD <1> clropt [internalflags2], dif2_gg_skip_non_cseip 6366 <1> 6367 <1> ; Enter special mode: Skip cseip breakpoints. 6368 0000425C 800E[A000]04 <1> setopt [internalflags2], dif2_gg_skip_cseip 6369 <1> 6370 <1> ; As we already tried to restore all cseip bb points, 6371 <1> ; here we skip these in the bb_restorepoints call. 6372 00004261 B91000 <1> mov cx, _NUM_B_BP 6373 00004264 E819F3 <1> call bb_restorepoints 6374 <1> 6375 <1> ; Exit special mode: No longer skip cseip breakpoints. 6376 00004267 8026[A000]FB <1> clropt [internalflags2], dif2_gg_skip_cseip 6377 <1> 6378 <1> ; The failure that led us here is already noted in the info. 6379 0000426C EB1D <1> jmp .bb_exit 6380 <1> 6381 <1> 6382 <1> @@: 6383 <1> ; Success! Now discard the reserved error info. 6384 0000426E 83C420 <1> add sp, _NUM_B_BP * 2 6385 <1> 6386 <1> ; Exit special mode, do not skip non-cseip breakpoints anymore. 6387 00004271 8026[A000]FD <1> clropt [internalflags2], dif2_gg_skip_non_cseip 6388 <1> 6389 <1> ; Enter special mode: Skip matching/restoring cseip breakpoint. 6390 00004276 800E[A000]04 <1> setopt [internalflags2], dif2_gg_skip_cseip 6391 <1> 6392 <1> .only_run: 6393 0000427B E82D00 <1> call run 6394 <1> .after_run: 6395 <1> 6396 <1> %if _BREAKPOINTS 6397 0000427E 83EC20 <1> sub sp, _NUM_B_BP * 2 6398 00004281 89E5 <1> mov bp, sp 6399 <1> 6400 00004283 B91000 <1> mov cx, _NUM_B_BP ; = index above last one to restore 6401 00004286 E8F4F2 <1> call bb_restorepoints_and_init_error_info 6402 00004289 7308 <1> jnc @F 6403 <1> 6404 <1> .bb_exit: 6405 0000428B B8FFFF <1> mov ax, -1 6406 0000428E 50 <1> push ax ; (unused: ax error info) 6407 0000428F 50 <1> push ax ; cx error point index, -1 = invalid 6408 <1> 6409 00004290 E939F2 <1> jmp bb_restorepoints_exit 6410 <1> 6411 <1> 6412 <1> @@: 6413 00004293 83C420 <1> add sp, _NUM_B_BP * 2 6414 <1> 6415 00004296 E8F1EF <1> call bb_check_hit 6416 00004299 89C1 <1> mov cx, ax 6417 0000429B 9C <1> pushf 6418 <1> ; Clear all special modes. Stop specialcasing cseip breakpoint. 6419 <1> ; 6420 <1> ; This resets all the special flags for subsequent calls. 6421 0000429C 8026[A000]E8 <1> clropt [internalflags2], dif2_gg_is_first | dif2_gg_first_detected | dif2_gg_skip_cseip | dif2_gg_skip_non_cseip 6424 000042A1 9D <1> popf ; CF 6425 000042A2 7302 <1> jnc @F 6426 <1> 6427 000042A4 F9 <1> stc 6428 <1> ; cx = flags as returned by bb_check_hit 6429 000042A5 C3 <1> retn 6430 <1> 6431 <1> @@: 6432 000042A6 E8C6EF <1> call adjust_cseip_after_breakpoint 6433 <1> ; re-execute (restored) opcode one byte in front of this 6434 000042A9 F8 <1> clc ; (NC) 6435 <1> ; cx = flags as returned by bb_check_hit 6436 000042AA C3 <1> retn 6437 <1> %endif 6438 <1> %endif 6439 <1> 6440 <1> 6441 <1> ; Run - Start up the running program. 6442 <1> ; 6443 <1> ; INP: b[eqflag], a[eqladdr] = address given behind '=' for command 6444 <1> ; w[pspdbe] = process of debuggee 6445 <1> ; [run2324] = interrupt handlers 23h and 24h to set 6446 <1> ; values for registers in d[reg_eax] etc 6447 <1> ; OUT: (_DEBUG && _DEBUGUPDATESAVE) 6448 <1> ; interrupt handlers' ieNext fields updated 6449 <1> ; d[reg_eax] etc updated 6450 <1> ; w[run_int]-> message of how execution returned 6451 <1> ; UP, EI, high word efl = 0, es = ds = ss 6452 <1> ; CHG: all 6453 <1> ; STT: ds = ss 6454 <1> ; UP 6455 <1> ; (INP:es ignored) 6456 <1> run: 6457 000042AB 16 <1> push ss 6458 000042AC 07 <1> pop es 6459 <1> %if _PM 6460 000042AD E8C9F5 <1> call resetmode 6461 000042B0 E84802 <1> call remember_mode 6462 <1> %endif 6463 <1> %if _DELAY_BEFORE_BP 6464 000042B3 8026[A600]7F <1> clropt [internalflags3], dif3_delayed 6465 <1> %endif 6466 000042B8 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 6470 000042BE E86104 <1> call seteq ; set CS:IP to '=' address 6471 <1> 6472 <1> ; For DDebugX: Do this before we install our 6473 <1> ; exception handlers. So if an exception 6474 <1> ; is raised then it is handled by the outer 6475 <1> ; instance instead of our handler. 6476 <1> ; (The actual problem may be that we don't 6477 <1> ; restore the handlers in the entrypoint 6478 <1> ; that leads to debuggerexception.) 6479 <1> ; Also, for non-_DEBUG DebugX too, check the 6480 <1> ; validity before setting debuggee PSP and 6481 <1> ; int 23h, 24h so they needn't be reset. 6482 <1> %if _PM 6483 <1> ; Load segreg values into es to make sure 6484 <1> ; they're valid. (Previously done with 6485 <1> ; the stack pointing into the reg array. 6486 <1> ; Better to do it now with a valid stack.) 6487 <1> ; Only done if we may be in Protected Mode. 6488 <1> ; 86 Mode allows any value to be loaded. 6489 000042C1 8E06[840C] <1> mov es, word [reg_ds] 6490 000042C5 8E06[8C0C] <1> mov es, word [reg_ss] 6491 000042C9 8E06[940C] <1> _386 mov es, word [reg_fs] 6492 000042CD 8E06[980C] <1> _386 mov es, word [reg_gs] 6493 <1> %endif 6494 000042D1 8E06[880C] <1> mov es, word [reg_es] ; last one: actual es value 6495 <1> 6496 000042D5 8B1E[A40A] <1> mov bx, word [pspdbe] 6497 000042D9 E8FE4E <1> call setpsp ; set debuggee's PSP 6498 000042DC E88C62 <1> call setint2324 ; set debuggee's int 23/24 6499 <1> %if _DEBUG ; set this copy's divide/trace/breakpoint ints 6500 <1> %if _TSR || _BOOTLDR 6501 <1> ..@patch_tsr_quit_run: 6502 <1> db __TEST_IMM16 6503 <1> dw __REL16__(.skipints) 6504 <1> %endif 6505 <1> push cx 6506 <1> push si 6507 <1> push ax 6508 <1> push dx 6509 <1> push es 6510 <1> push bx 6511 <1> push bp 6512 <1> push di 6513 <1> 6514 <1> %if _PM 6515 <1> call ispm 6516 <1> jz @F ; in PM --> 6517 <1> testopt [internalflags], canswitchmode 6518 <1> jz @FF ; in 86 Mode and cannot switch to PM --> 6519 <1> 6520 <1> d4 call d4message 6521 <1> d4 asciz "In run (switch mode before calling pm_set_handlers)",13,10 6522 <1> setopt [internalflags], modeswitched ; set flag for resetmode 6523 <1> mov al, 0 6524 <1> call sr_state ; save state 6525 <1> call switchmode ; switch to PM 6526 <1> ; ! handle_mode_changed not called here ! 6527 <1> ; do not call InDos or other functions using seg/sels 6528 <1> @@: 6529 <1> call pm_set_handlers 6530 <1> ; ! this calls resetmode 6531 <1> @@: 6532 <1> %endif 6533 <1> 6534 <1> mov cx, inttab_number 6535 <1> mov si, inttab 6536 <1> .intloop: 6537 <1> lodsb 6538 <1> xchg ax, dx 6539 <1> lodsw ; get address 6540 <1> xchg ax, dx 6541 <1> %if _DEBUGUPDATESAVE 6542 <1> mov di, dx ; -> IISP header 6543 <1> %endif 6544 <1> 6545 <1> call InDos 6546 <1> jz .int21_25 6547 <1> 6548 <1> xor bx, bx 6549 <1> %if _PM 6550 <1> call ispm 6551 <1> jnz @F 6552 <1> push dx 6553 <1> mov dx, bx ; set segment to access (= 0) 6554 <1> call setrmsegm ; get bx = selector configured to this 6555 <1> pop dx 6556 <1> @@: 6557 <1> %endif 6558 <1> mov es, bx ; => 86 Mode IVT (segment or selector) 6559 <1> %if _PM 6560 <1> xor bx, bx ; bh = 0 6561 <1> %endif 6562 <1> mov bl, al 6563 <1> add bx, bx 6564 <1> add bx, bx 6565 <1> 6566 <1> %if _DEBUGUPDATESAVE 6567 <1> push word [ es:bx + 2 ] 6568 <1> push word [ es:bx ] ; get vector 6569 <1> pop word [ di + ieNext ] 6570 <1> pop word [ di + ieNext + 2] 6571 <1> %endif 6572 <1> 6573 <1> mov word [ es:bx ], dx 6574 <1> %if _PM 6575 <1> push word [ pspdbg ] ; => lDEBUG_DATA_ENTRY (86 Mode seg) 6576 <1> pop word [ es:bx + 2 ] 6577 <1> %else 6578 <1> mov word [ es:bx + 2 ], ds ; => lDEBUG_DATA_ENTRY 6579 <1> %endif 6580 <1> jmp short .intset 6581 <1> 6582 <1> .int21_25: 6583 <1> 6584 <1> %if _PM 6585 <1> %if _DEBUGUPDATESAVE 6586 <1> mov ah, 35h ; get interrupt vector 6587 <1> push word [pspdbg] ; => lDEBUG_DATA_ENTRY 6588 <1> call _doscall_return_es_parameter_es_ds 6589 <1> mov word [ di + ieNext ], bx 6590 <1> pop word [ di + ieNext + 2 ] 6591 <1> %endif 6592 <1> mov ah, 25h ; set interrupt vector 6593 <1> push word [pspdbg] ; => lDEBUG_DATA_ENTRY 6594 <1> call _doscall_return_es_parameter_es_ds 6595 <1> pop ax ; (discard returned parameter) 6596 <1> %else 6597 <1> %if _DEBUGUPDATESAVE 6598 <1> mov ah, 35h 6599 <1> int 21h ; get vector 6600 <1> mov word [ di + ieNext ], bx 6601 <1> mov word [ di + ieNext + 2 ], es 6602 <1> %endif 6603 <1> mov ah, 25h ; set interrupt vector 6604 <1> int 21h ; ds => lDEBUG_DATA_ENTRY 6605 <1> %endif 6606 <1> .intset: 6607 <1> loop .intloop 6608 <1> 6609 <1> pop di 6610 <1> pop bp 6611 <1> pop bx 6612 <1> pop es 6613 <1> pop dx 6614 <1> pop ax 6615 <1> pop si 6616 <1> pop cx 6617 <1> .skipints: 6618 <1> %endif 6619 <1> 6620 <1> .2: 6621 000042DF 8926[A00A] <1> mov word [run_sp], sp ; save stack position 6622 <1> 6623 <1> ; Disable this for now. The debugger uses its ss 6624 <1> ; for 86 Mode and Protected Mode at the same area 6625 <1> ; so it should always be valid to adjust SPSAV with 6626 <1> ; the current run_sp, regardless of current mode. 6627 <1> ; Update: SPSAV should always hold a 86 Mode address. 6628 <1> ; So check for our segment, not the current ss. (But 6629 <1> ; for _PM=0 ss is always equal to word [pspdbg].) 6630 <1> ; I assume that the original fix was intended for cases 6631 <1> ; where the segment doesn't match our 86 Mode ss, that 6632 <1> ; is the word [pspdbg]. 6633 <1> %if 1 6634 <1> ; 16.2.2021: check if saved SS is debugger's SS. If no, don't adjust saved SP. 6635 <1> ; SS may be != saved SS if debugger is stopped in protected-mode - then the 6636 <1> ; current DPMI real-mode stack may be stored in SPSAV. 6637 <1> %if _PM 6638 000042E3 A1[A60A] <1> mov ax, word [pspdbg] 6639 <1> %else 6640 <1> mov ax, ss 6641 <1> %endif 6642 000042E6 3B063000 <1> cmp ax, word [SPSAV + 2] 6643 000042EA 7508 <1> jne @F 6644 <1> %endif 6645 000042EC 2B26[A20A] <1> sub sp, word [spadjust] 6646 000042F0 89262E00 <1> mov word [SPSAV], sp 6647 <1> @@: 6648 000042F4 FA <1> cli 6649 <1> 6650 000042F5 BC[640C] <1> mov sp, regs 6651 <1> %ifn _ONLY386 6652 000042F8 EB11 <1> _386_jmps .386 ; --> 6653 000042FA 58 <1> pop ax 6654 000042FB 58 <1> pop ax ; discard all high words 6655 000042FC 5B <1> pop bx 6656 000042FD 58 <1> pop ax 6657 000042FE 59 <1> pop cx 6658 000042FF 58 <1> pop ax 6659 00004300 5A <1> pop dx 6660 00004301 58 <1> pop ax 6661 00004302 58 <1> pop ax ; we'll get esp later 6662 00004303 58 <1> pop ax 6663 00004304 5D <1> pop bp 6664 00004305 58 <1> pop ax 6665 00004306 5E <1> pop si 6666 00004307 58 <1> pop ax 6667 00004308 5F <1> pop di 6668 <1> ; ds, ss, cs loaded later 6669 <1> ; es already loaded 6670 <1> %endif 6671 <1> %ifn _ONLYNON386 6672 <1> %ifn _ONLY386 6673 00004309 EB18 <1> jmp short .common 6674 <1> %endif 6675 <1> 6676 <1> .386: 6677 <1> [cpu 386] 6678 0000430B 6658 <1> pop eax 6679 0000430D 665B <1> pop ebx 6680 0000430F 6659 <1> pop ecx 6681 00004311 665A <1> pop edx 6682 00004313 58 <1> pop ax 6683 00004314 58 <1> pop ax ; we'll get esp later 6684 00004315 665D <1> pop ebp 6685 00004317 665E <1> pop esi 6686 00004319 665F <1> pop edi 6687 <1> ; pop ax ; get ds later 6688 <1> ; pop ax ; discard high words of segment registers 6689 <1> ; pop ax ; es already loaded 6690 <1> ; pop ax 6691 <1> ; pop ax ; get ss later 6692 <1> ; pop ax 6693 <1> ; pop ax ; get cs later 6694 <1> ; pop ax 6695 0000431B 83C410 <1> add sp, byte 8 * 2 6696 0000431E 0FA1 <1> pop fs 6697 00004320 58 <1> pop ax 6698 00004321 0FA9 <1> pop gs 6699 <1> __CPU__ 6700 <1> .common: 6701 <1> %endif 6702 00004323 A1[640C] <1> mov ax, word [reg_eax] ; restore ax (used to discard words) 6703 00004326 8E16[8C0C] <1> mov ss, word [reg_ss] 6704 <1> %if _ONLYNON386 6705 <1> mov sp, word [reg_esp] 6706 <1> %else 6707 <1> ..@patch_no386_ds: 6708 0000432A 66 <1> o32 ; mov esp, dword [reg_esp] 6709 0000432B 8B26[740C] <1> mov sp, word [reg_esp] ; restore program stack 6710 <1> %endif 6711 0000432F C606[E60A]00 <1> mov byte [bInDbg], 0 6712 00004334 66 <1> _386_o32 ; push dword [reg_efl] 6713 00004335 FF36[A00C] <1> push word [reg_efl] 6714 00004339 66 <1> _386_o32 ; push dword [reg_cs] ; high word is zero 6715 0000433A FF36[900C] <1> push word [reg_cs] 6716 0000433E 66 <1> _386_o32 ; push dword [reg_eip] 6717 0000433F FF36[9C0C] <1> push word [reg_eip] 6718 00004343 F606[A10C]02 <1> test byte [reg_efl+1], 2 ; IF set? 6719 00004348 8E1E[840C] <1> mov ds, word [reg_ds] ; restore ds 6720 0000434C 7401 <1> jz .di 6721 0000434E FB <1> sti ; required for ring3 protected mode if IOPL==0 6722 <1> .di: 6723 <1> %if _ONLYNON386 6724 <1> iret 6725 <1> %else 6726 <1> ..@patch_no386_iret: 6727 0000434F 66 <1> o32 ; iretd 6728 00004350 CF <1> iret ; jump to program 6729 <1> %endif 6730 <1> 6731 <1> ; The byte at ..@patch_no386_ds will be adjusted to a ds prefix on non-386 processors. 6732 <1> ; This does not change the following instruction's behaviour (aside from changing it 6733 <1> ; to a 16-bit instruction as intended) and insures that sp is set in the instruction 6734 <1> ; right behind the instruction that sets ss. 6735 <1> 6736 <1> ; The byte at ..@patch_no386_iret will be adjusted to an iret instruction on non-386 processors. 6737 <1> ; This avoids the NOP that would be written there if _386_o32 was used, because the iret 6738 <1> ; should follow right behind the sti instruction. 6739 <1> 6740 <1> 6741 <1> usesection lDEBUG_DATA_ENTRY 6742 <1> 6743 <1> %if _CATCHINT08 6744 00008554 CB90EB10000000004B- <1> iispentry intr8, 0 6744 0000855D 4200EBF300 <1> 6745 <1> intr8_original: equ intr8.next 6746 00008568 9C <1> pushf 6747 00008569 2EFF1E[5885] <1> call far [cs:intr8_original] 6748 0000856E 9C <1> pushf 6749 0000856F 53 <1> push bx 6750 00008570 1E <1> push ds 6751 <1> 6752 00008571 0E <1> push cs 6753 00008572 1F <1> pop ds 6754 <1> 6755 00008573 803E[E60A]00 <1> cmp byte [bInDbg], 0 ; in debugger ? 6756 00008578 754D <1> jne .reset ; yes --> 6757 <1> 6758 0000857A F606[EB0B]04 <1> testopt [serial_flags], sf_double_ctrl_c 6759 0000857F 7408 <1> jz @F 6760 <1> 6761 00008581 C706[DA0B][247B] <1> mov word [run_int], runint_ctrlc_msg 6762 00008587 EB38 <1> jmp @FF 6763 <1> 6764 <1> @@: 6765 00008589 BB4000 <1> mov bx, 40h 6766 0000858C 8EDB <1> mov ds, bx 6767 0000858E F606170004 <1> test byte [17h], 4 ; CTRL currently pressed ? 6768 00008593 0E <1> push cs 6769 00008594 1F <1> pop ds 6770 00008595 7430 <1> jz .reset ; no --> 6771 <1> 6772 00008597 FF06[E40B] <1> inc word [intr8_counter] 6773 0000859B 833E[E40B]5A <1> cmp word [intr8_counter], 18 * 5 ; ca 5 seconds 6774 000085A0 722A <1> jb .return 6775 <1> 6776 000085A2 C706[DA0B][C77A] <1> mov word [run_int], int8msg 6777 000085A8 F606[7D00]80 <1> testopt [options], int8_disable_serial 6778 000085AD 7412 <1> jz @F 6779 000085AF F606[7D00]40 <1> testopt [options], enable_serial 6780 000085B4 740B <1> jz @F 6781 <1> 6782 000085B6 8026[7D00]BF <1> clropt [options], enable_serial 6783 000085BB C706[DA0B][EC7A] <1> mov word [run_int], int8_kbd_msg 6784 <1> 6785 <1> @@: 6786 000085C1 1F <1> pop ds 6787 000085C2 5B <1> pop bx 6788 000085C3 9D <1> popf ; (in 86 Mode) 6789 000085C4 E90B01 <1> jmp intrtn 6790 <1> 6791 <1> .reset: 6792 000085C7 8326[E40B]00 <1> and word [intr8_counter], 0 6793 <1> .return: 6794 000085CC 1F <1> pop ds 6795 000085CD 5B <1> pop bx 6796 000085CE 9D <1> popf ; (in 86 Mode) 6797 000085CF CF <1> iret 6798 <1> %endif 6799 <1> 6800 <1> 6801 <1> ; Interrupt 22h (program termination) handler. 6802 <1> int22: 6803 000085D0 FA <1> cli 6804 <1> .cleartraceflag: 6805 000085D1 0E <1> push cs 6806 000085D2 1F <1> pop ds 6807 000085D3 0E <1> push cs 6808 000085D4 17 <1> pop ss 6809 000085D5 8B26[A00A] <1> mov sp, word [run_sp] ; restore running stack 6810 000085D9 C706[DA0B][247D] <1> mov word [run_int], progtrm ; set interrupt message 6811 000085DF C706[DC0B][E003] <1> mov word [lastcmd], dmycmd ; disable T/P/G auto-repeat 6812 <1> %if _PM 6813 000085E5 8026[9D00]F7 <1> clropt [internalflags], protectedmode ; reset PM flag 6814 <1> %endif 6815 000085EA 90 <1> times 1 - (($ - $$) & 1) nop ; align in-code parameter 6816 000085EB E8F1FA <1> call entry_to_code_seg 6817 000085EE [C543] <1> dw intrtn1_code 6818 <1> ; jump to register saving routine 6819 <1> 6820 <1> 6821 <1> sharedentry1.hwreset: 6822 000085F0 CB <1> retf 6823 <1> 6824 <1> 6825 <1> ; Interrupt 01h (single-step interrupt) handler. 6826 000085F1 90EB10000000004B42- <1> iispentry intr1, 0, sharedentry1 6826 000085FA 00EBF300 <1> 6827 <1> lframe int 6828 00008604 5589E5 <1> lenter 6829 00008607 50 <1> push ax 6830 <1> 6831 00008608 806607FE <1> clropt [bp + ?frame_fl], 100h ; clear TF (always) 6832 0000860C 8CC8 <1> mov ax, cs 6833 0000860E 394604 <1> cmp word [bp + ?frame_cs], ax ; entry segment ? 6834 00008611 7513 <1> jne .if_ZR ; no --> (NZ) 6835 <1> %if _PM 6836 00008613 817E02[C595] <1> cmp word [bp + ?frame_ip], getline_extra_int22.cleartraceflag 6837 00008618 740C <1> je .if_ZR ; that one --> (ZR) 6838 <1> %endif 6839 0000861A 817E02[D185] <1> cmp word [bp + ?frame_ip], int22.cleartraceflag 6840 0000861F 7405 <1> je .if_ZR ; that one --> (ZR) 6841 00008621 817E02[0081] <1> cmp word [bp + ?frame_ip], debug22.cleartraceflag 6842 <1> .if_ZR: 6843 00008626 58 <1> pop ax 6844 00008627 5D <1> lleave , optimiserestoresp 6845 00008628 7501 <1> jnz @F 6846 0000862A CF <1> iret ; continue run if matched 6847 <1> 6848 <1> @@: 6849 0000862B 2EC706[DA0B][717A] <1> mov word [cs:run_int], int1msg ; remember interrupt type 6850 00008632 E99D00 <1> jmp intrtn ; jump to register saving routine 6851 <1> 6852 <1> 6853 <1> ; Interrupt 00h (divide error) handler. 6854 00008635 90EB10000000004B42- <1> iispentry intr0, 0, sharedentry1 6854 0000863E 00EBAF00 <1> 6855 00008648 2EC706[DA0B][627A] <1> mov word [cs:run_int], int0msg ; remember interrupt type 6856 0000864F E98000 <1> jmp intrtn ; jump to register saving routine 6857 <1> 6858 <1> 6859 <1> 6860 <1> ; Interrupt 03h (breakpoint interrupt) handler. 6861 00008652 EB10000000004B4200- <1> iispentry intr3, 0, sharedentry1 6861 0000865B EB9300 <1> 6862 00008664 2EC706[DA0B][947A] <1> mov word [cs:run_int], int3msg ; remember interrupt type 6863 <1> %if _CATCHINT06 6864 0000866B EB65 <1> jmp intrtn ; jump to register saving routine 6865 <1> 6866 <1> 6867 <1> ; Interrupt 06h (invalid opcode) handler. 6868 0000866D 90EB10000000004B42- <1> iispentry intr6, 0, sharedentry2 6868 00008676 00EB7B00 <1> 6869 00008680 2EC706[DA0B][B67A] <1> mov word [cs:run_int], int6msg ; remember interrupt type 6870 <1> %endif 6871 <1> %if _CATCHINT18 6872 00008687 EB49 <1> jmp intrtn ; jump to register saving routine 6873 <1> 6874 <1> 6875 <1> ; Interrupt 18h (diskless boot hook) handler. 6876 00008689 90EB10000000004B42- <1> iispentry intr18, 0, sharedentry2 6876 00008692 00EB5F00 <1> 6877 0000869C 2EC706[DA0B][4B7B] <1> mov word [cs:run_int], int18msg ; remember interrupt type 6878 <1> %endif 6879 <1> %if _CATCHINT19 6880 000086A3 EB2D <1> jmp intrtn ; jump to register saving routine 6881 <1> 6882 <1> 6883 <1> ; Interrupt 19h (boot load) handler. 6884 000086A5 90EB10000000004B42- <1> iispentry intr19, 0, sharedentry2 6884 000086AE 00EB4300 <1> 6885 000086B8 2EC706[DA0B][677B] <1> mov word [cs:run_int], int19msg ; remember interrupt type 6886 000086BF 2EC706[DC0B][E003] <1> mov word [cs:lastcmd], dmycmd ; disable T/P/G auto-repeat 6887 000086C6 2EC606[DE0B]00 <1> mov byte [cs:bInit], 0 6888 000086CC 2E8026[A300]FE <1> clropt [cs:internalflags2], dif2_boot_loaded_kernel 6889 <1> %endif 6890 <1> 6891 <1> ; Common interrupt routine. 6892 <1> 6893 <1> ; Housekeeping. 6894 <1> intrtn: 6895 000086D2 FA <1> cli ; just in case 6896 000086D3 2E8F06[9C0C] <1> pop word [cs:reg_eip] ; recover things from stack 6897 000086D8 2E8F06[900C] <1> pop word [cs:reg_cs] 6898 000086DD 2E8F06[A00C] <1> pop word [cs:reg_efl] 6899 000086E2 2E8C1E[840C] <1> mov word [cs:reg_ds], ds ; ! word-aligned (AC flag) 6900 000086E7 2EA3[640C] <1> mov word [cs:reg_eax], ax ; ! word-aligned (AC flag) 6901 000086EB 8CC8 <1> mov ax, cs 6902 000086ED 8ED8 <1> mov ds, ax ; => lDEBUG_DATA_ENTRY 6903 <1> times 1 - (($ - $$) & 1) nop ; align in-code parameter 6904 000086EF E8EDF9 <1> call entry_to_code_seg 6905 000086F2 [5143] <1> dw intrtn_code 6906 <1> ; To avoid delaying the code segment switch, we use the client's 6907 <1> ; stack here to call (jump) via entry_to_code_seg. 6908 <1> 6909 <1> 6910 <1> sharedentry2.hwreset: 6911 000086F4 CB <1> retf 6912 <1> 6913 <1> 6914 <1> usesection lDEBUG_CODE 6915 <1> 6916 <1> code_insure_low_byte_not_0CCh 6917 <1> intrtn_code: 6918 00004351 8C16[8C0C] <1> mov word [reg_ss], ss ; save stack position 6919 00004355 8326[9E0C]00 <1> _386 and word [reg_eip+2], byte 0 ; we're from real mode 6920 0000435A 66 <1> _386_o32 ; mov dword [reg_esp], esp 6921 0000435B 8926[740C] <1> mov word [reg_esp], sp 6922 0000435F 8ED0 <1> mov ss, ax ; mov ss, cs ; (don't use the stack here) 6923 <1> 6924 <1> %if _PM 6925 00004361 8026[9D00]F7 <1> clropt [internalflags], protectedmode ; reset PM flag 6926 00004366 EB0D <1> jmp @F 6927 <1> 6928 <1> intrtn2_code: ; <--- entry protected mode 6929 00004368 368C1E[840C] <1> mov word [ss:reg_ds], ds ; ! word-aligned (AC flag) 6930 0000436D 36A3[640C] <1> mov word [ss:reg_eax], ax ; ! word-aligned (AC flag) 6931 00004371 8CD0 <1> mov ax, ss 6932 00004373 8ED8 <1> mov ds, ax ; mov ds, ss 6933 <1> @@: 6934 <1> %endif 6935 00004375 B80200 <1> mov ax, 2 6936 <1> %ifn _ONLY386 6937 00004378 EB1A <1> _386_jmps .386 ; --> 6938 0000437A BC[8A0C] <1> mov sp, reg_es+2 6939 0000437D 06 <1> push es 6940 <1> ; sub sp, ax 6941 <1> ; sub sp, ax ; ds already saved 6942 <1> ; sub sp, ax ; don't overwrite high word of di 6943 0000437E 83EC06 <1> sub sp, byte 3*2 6944 00004381 57 <1> push di 6945 00004382 29C4 <1> sub sp, ax 6946 00004384 56 <1> push si 6947 00004385 29C4 <1> sub sp, ax 6948 00004387 55 <1> push bp 6949 <1> ; sub sp, ax 6950 <1> ; sub sp, ax ; sp already saved 6951 <1> ; sub sp, ax 6952 00004388 83EC06 <1> sub sp, byte 3*2 6953 0000438B 52 <1> push dx 6954 0000438C 29C4 <1> sub sp, ax 6955 0000438E 51 <1> push cx 6956 0000438F 29C4 <1> sub sp, ax 6957 00004391 53 <1> push bx 6958 <1> %endif 6959 <1> %ifn _ONLYNON386 6960 <1> %ifn _ONLY386 6961 00004392 EB31 <1> jmp short .common 6962 <1> %endif 6963 <1> 6964 <1> .386: 6965 <1> [cpu 386] 6966 00004394 BC[9A0C] <1> mov sp, reg_gs+2 6967 00004397 0FA8 <1> push gs 6968 00004399 29C4 <1> sub sp, ax ; don't overwrite high words of segments 6969 0000439B 0FA0 <1> push fs 6970 <1> ; sub sp, ax 6971 <1> ; sub sp, ax ; cs already saved 6972 <1> ; sub sp, ax 6973 <1> ; sub sp, ax ; ss already saved 6974 <1> ; sub sp, ax 6975 0000439D 83EC0A <1> sub sp, byte 5*2 6976 000043A0 06 <1> push es 6977 <1> ; sub sp, ax 6978 <1> ; sub sp, ax ; ds already saved 6979 000043A1 83EC04 <1> sub sp, byte 2*2 6980 000043A4 6657 <1> push edi 6981 000043A6 6656 <1> push esi 6982 000043A8 6655 <1> push ebp 6983 <1> ; sub sp, ax 6984 <1> ; sub sp, ax ; sp already saved 6985 000043AA 83EC04 <1> sub sp, byte 2*2 6986 000043AD 6652 <1> push edx 6987 000043AF 6651 <1> push ecx 6988 000043B1 669C <1> pushfd ; (this overwrites reg_ebx) 6989 000043B3 01C4 <1> add sp, ax ; discard low word of efl 6990 000043B5 8F06[A20C] <1> pop word [reg_efl+2] 6991 000043B9 6A00 <1> push 0 6992 000043BB 9C <1> pushf ; (this also overwrites reg_ebx) 6993 000043BC 669D <1> popfd ; clear high word of efl inside debugger (resets AC flag) 6994 000043BE 6653 <1> push ebx 6995 000043C0 A1[640C] <1> mov ax, word [reg_eax] ; restore ax 6996 000043C3 6650 <1> push eax ; so we don't overwrite it with 2 here 6997 <1> __CPU__ 6998 <1> .common: 6999 <1> %endif 7000 <1> 7001 <1> code_insure_low_byte_not_0CCh 7002 <1> ; Clean up. 7003 <1> intrtn1_code: 7004 000043C5 8B26[A00A] <1> mov sp, word [run_sp] ; restore running stack 7005 000043C9 FC <1> cld ; clear direction flag 7006 000043CA FB <1> sti ; interrupts back on 7007 000043CB 8026[A10C]FE <1> clropt [reg_efl], 100h ; clear TF 7008 <1> 7009 <1> %if _PM 7010 000043D0 E85700 <1> call handle_mode_changed 7011 <1> %endif 7012 <1> 7013 000043D3 E8494E <1> call getpsp 7014 000043D6 891E[A40A] <1> mov word [pspdbe], bx 7015 <1> 7016 000043DA E8CF61 <1> call getint2324 ; save debuggee's int 23/24, set debugger's int 23/24 7017 <1> 7018 000043DD 16 <1> push ss 7019 000043DE 07 <1> pop es 7020 000043DF E8F64D <1> call setpspdbg ; set PSP of debugger 7021 <1> 7022 000043E2 E81AF4 <1> call get_cseip_of_possible_breakpoint 7023 <1> ; Initialise this here. This means we do not need to call 7024 <1> ; resetmode between proceed_wp and bb_wp and gg_wp. If 7025 <1> ; more than one point needs to switch modes this avoids 7026 <1> ; repeated modeswitching back and forth. 7027 <1> 7028 <1> %if _DEBUG ; reset to next copy's divide/trace/breakpoint ints 7029 <1> push cx 7030 <1> push si 7031 <1> push di 7032 <1> push ax 7033 <1> push bx 7034 <1> push dx 7035 <1> push bp 7036 <1> 7037 <1> %if _PM 7038 <1> call ispm 7039 <1> jz @F ; in PM --> 7040 <1> testopt [internalflags], canswitchmode 7041 <1> jz @FF ; in 86 Mode and cannot switch to PM --> 7042 <1> 7043 <1> d4 call d4message 7044 <1> d4 asciz "In intrtn1_code (switch mode before calling pm_reset_handlers)",13,10 7045 <1> setopt [internalflags], modeswitched ; set flag for resetmode 7046 <1> mov al, 0 7047 <1> call sr_state ; save state 7048 <1> call switchmode ; switch to PM 7049 <1> ; ! handle_mode_changed not called here ! 7050 <1> ; do not call InDos or other functions using seg/sels 7051 <1> @@: 7052 <1> call pm_reset_handlers 7053 <1> ; ! this calls resetmode 7054 <1> @@: 7055 <1> 7056 <1> numdef OVERRIDE_BUILD_PM_DEBUG, 0 7057 <1> %if ! _CATCHPMINT214C && ! _OVERRIDE_BUILD_PM_DEBUG 7058 <1> %fatal Cannot build DDEBUGX: handler switching without Int21.4C hook untested 7059 <1> %endif 7060 <1> %endif 7061 <1> 7062 <1> %if CATCHINTAMOUNT 7063 <1> mov cx, inttab_number 7064 <1> mov si, inttab 7065 <1> mov dx, -1 ; always force 7066 <1> .nextint: 7067 <1> lodsb 7068 <1> xchg ax, bx ; bl = number 7069 <1> lodsw ; si -> list 7070 <1> xchg ax, si ; si -> entry, ax -> list 7071 <1> xchg ax, bx ; al = number, bx -> list 7072 <1> call UnhookInterruptForce 7073 <1> xchg bx, si ; si -> list 7074 <1> loop .nextint 7075 <1> %endif 7076 <1> 7077 <1> pop bp 7078 <1> pop dx 7079 <1> pop bx 7080 <1> pop ax 7081 <1> pop di 7082 <1> pop si 7083 <1> pop cx 7084 <1> %endif 7085 <1> 7086 000043E5 800E[9D00]30 <1> setopt [internalflags], debuggerA20|debuggeeA20 ; assume A20 is on 7087 <1> %if _PM 7088 000043EA E8E04D <1> call ispm 7089 000043ED 7420 <1> jz .a20done ; assume A20 on. (is this the right thing to do?) 7090 <1> %endif 7091 000043EF 06 <1> push es 7092 000043F0 1E <1> push ds 7093 000043F1 57 <1> push di 7094 000043F2 56 <1> push si 7095 000043F3 51 <1> push cx 7096 000043F4 31F6 <1> xor si, si 7097 000043F6 8EDE <1> mov ds, si ; ds = 0000h 7098 000043F8 4E <1> dec si 7099 000043F9 8EC6 <1> mov es, si ; es = FFFFh 7100 000043FB 46 <1> inc si ; ds:si = 0000h:0000h = 00000h 7101 000043FC BF1000 <1> mov di, 0010h ; es:di = FFFFh:0010h = 100000h (same address if it overflows) 7102 000043FF 89F9 <1> mov cx, di ; 32 byte (16 = 10h word) 7103 00004401 F3A7 <1> repe cmpsw ; compare them and assume A20 line switched off if same 7104 00004403 59 <1> pop cx 7105 00004404 5E <1> pop si 7106 00004405 5F <1> pop di 7107 00004406 1F <1> pop ds 7108 00004407 07 <1> pop es 7109 00004408 7505 <1> jne .a20done ; not equal, A20 line is switched on --> 7110 <1> ; if equal, the A20 line is probably switched off 7111 0000440A 8026[9D00]CF <1> clropt [internalflags], debuggerA20|debuggeeA20 ; assume A20 is off 7112 <1> 7113 <1> %if 0 ;_LOCALENABLEA20 7114 <1> ; This doesn't serve any particular reason if we have no business accessing the HMA. 7115 <1> ; What's more important is that the dump, assemble, and disassemble commands *should* 7116 <1> ; use a disabled A20 if it is disabled to the debuggee. Thus, enabling A20 belongs, if 7117 <1> ; at all, into getsegmented (similar to the switch to PM) as there may be breakpoints in 7118 <1> ; the HMA that we need to reset. 7119 <1> %if _GUARD_86M_INT2F 7120 <1> push es 7121 <1> xor ax, ax 7122 <1> mov es, ax ; (only used in 86 Mode) 7123 <1> mov ax, [es:2Fh * 4] 7124 <1> cmp ax, -1 7125 <1> je @F ; --> (ZR) 7126 <1> or ax, [es:2Fh * 4 + 2] 7127 <1> @@: 7128 <1> pop es 7129 <1> jz @F 7130 <1> %endif 7131 <1> mov ax, 4300h 7132 <1> int 2Fh ; XMS v2 installation check 7133 <1> cmp al, 80h ; installed ? 7134 <1> jne .a20done ; no --> 7135 <1> mov ax, 4310h 7136 <1> int 2Fh ; get entry 7137 <1> mov ah, 05h 7138 <1> push cs 7139 <1> call callfaresbx ; local enable A20 7140 <1> push ds 7141 <1> pop es 7142 <1> dec ax 7143 <1> jnz .a20done ; not able to enable A20 --> 7144 <1> ; actually check here to insure it is on? 7145 <1> setopt [internalflags], debuggerA20 ; our A20 is on 7146 <1> @@: 7147 <1> %endif 7148 <1> .a20done: 7149 <1> 7150 0000440F C606[E60A]01 <1> mov byte [bInDbg], 1 7151 <1> %if _CATCHINT19 7152 00004414 813E[DA0B][677B] <1> cmp word [run_int], int19msg 7153 0000441A 7408 <1> je @F 7154 <1> %endif 7155 0000441C 813E[DA0B][247D] <1> cmp word [run_int], progtrm 7156 00004422 7505 <1> jnz .isnotterm 7157 <1> @@: 7158 00004424 800E[9E00]80 <1> setopt [internalflags], attachedterm 7159 <1> .isnotterm: 7160 00004429 C3 <1> retn 7161 <1> 7162 <1> %if 0 ;_LOCALENABLEA20 7163 <1> callfaresbx: 7164 <1> push es 7165 <1> push bx 7166 <1> retf 7167 <1> %endif 7168 <1> 7169 <1> 7170 <1> %if _PM 7171 <1> ; INP: flag for PM 7172 <1> ; flag for prior PM (from remember_mode) 7173 <1> ; flag for modeswitched (set if in modeswitching) 7174 <1> ; OUT: seg/sels initialised for new mode, if changed 7175 <1> handle_mode_changed: 7176 0000442A BE[DE88] <1> mov si, convsegs 7177 0000442D B90600 <1> mov cx, convsegs.amount 7178 <1> 7179 00004430 E89A4D <1> call ispm 7180 00004433 7503E98000 <1> jz .now_pm 7181 <1> [cpu 286] 7182 <1> .now_86m: 7183 00004438 F606[A700]40 <1> testopt [internalflags3], dif3_prior_pm 7184 0000443D 7503E9B900 <1> jz .from_no_change 7185 <1> .from_pm_now_86m: 7186 <1> .from_pm_now_86m.loop: 7187 00004442 AD <1> lodsw 7188 00004443 97 <1> xchg ax, di 7189 00004444 81FE[E688] <1> cmp si, convsegs.end_fixed 7190 00004448 770A <1> ja @F 7191 0000444A 8B5502 <1> mov dx, word [di + soaSegment] 7192 0000444D 8915 <1> mov word [di + soaSegSel], dx 7193 0000444F E2F1 <1> loop .from_pm_now_86m.loop 7194 00004451 E9A700 <1> jmp .from_done_change 7195 <1> 7196 <1> @@: 7197 <1> ; We want to switch modes to get the segment bases. 7198 <1> ; First check we aren't already modeswitched. 7199 00004454 F606[9E00]08 <1> testopt [internalflags], modeswitched 7200 00004459 7403E99D00 <1> jnz .from_done_change ; cancel this --> 7201 <1> 7202 0000445E F606[9E00]04 <1> testopt [internalflags], canswitchmode 7203 00004463 7510 <1> jnz @FF 7204 00004465 EB02 <1> jmp @F 7205 <1> 7206 <1> .from_pm_now_86m.loop.nonfixed.nomodeswitch: 7207 00004467 AD <1> lodsw 7208 00004468 97 <1> xchg ax, di 7209 <1> @@: 7210 00004469 31D2 <1> xor dx, dx 7211 0000446B 895502 <1> mov word [di + soaSegment], dx 7212 0000446E 8915 <1> mov word [di + soaSegSel], dx 7213 00004470 E2F5 <1> loop .from_pm_now_86m.loop.nonfixed.nomodeswitch 7214 00004472 E98600 <1> jmp .from_done_change 7215 <1> 7216 <1> @@: 7217 00004475 51 <1> push cx 7218 00004476 57 <1> push di 7219 00004477 56 <1> push si 7220 <1> d4 call d4message 7221 <1> d4 asciz "In intrtn1_code.from_pm_now_86m (switching modes to access selectors)",13,10 7222 00004478 800E[9E00]08 <1> setopt [internalflags], modeswitched ; set flag for resetmode 7223 0000447D B000 <1> mov al, 0 7224 0000447F E8D2F3 <1> call sr_state ; save state 7225 00004482 E89AF3 <1> call switchmode ; switch to PM 7226 <1> ; ! handle_mode_changed not called here ! 7227 <1> ; do not call InDos or other functions using seg/sels 7228 00004485 5E <1> pop si 7229 00004486 5F <1> pop di 7230 00004487 EB03 <1> jmp @F 7231 <1> 7232 <1> .from_pm_now_86m.loop.nonfixed: 7233 00004489 AD <1> lodsw 7234 0000448A 97 <1> xchg ax, di 7235 0000448B 51 <1> push cx 7236 <1> @@: 7237 0000448C 31DB <1> xor bx, bx 7238 0000448E 875D04 <1> xchg bx, word [di + soaSelector] 7239 00004491 B80600 <1> mov ax, 0006h 7240 00004494 CD31 <1> int 31h 7241 00004496 7245 <1> jc @F 7242 00004498 F6C20F <1> test dl, 15 7243 0000449B 7540 <1> jnz @F 7244 0000449D F7C1F0FF <1> test cx, 0FFF0h 7245 000044A1 753A <1> jnz @F 7246 000044A3 C1EA04 <1> shr dx, 4 7247 000044A6 C1E10C <1> shl cx, 12 7248 000044A9 09CA <1> or dx, cx 7249 000044AB 895502 <1> mov word [di + soaSegment], dx 7250 000044AE 59 <1> pop cx 7251 000044AF 8915 <1> mov word [di + soaSegSel], dx 7252 000044B1 E2D6 <1> loop .from_pm_now_86m.loop.nonfixed 7253 000044B3 E8C3F3 <1> call resetmode ; ! only if we did the switch 7254 <1> ; Note: This recursively calls this function, 7255 <1> ; handle_mode_changed. Because the modeswitched 7256 <1> ; flag is set during this call, this only re- 7257 <1> ; initialises the fixed seg/sels with the segment 7258 <1> ; values. That is redundant but does no harm. 7259 000044B6 EB43 <1> jmp .from_done_change 7260 <1> __CPU__ 7261 <1> 7262 <1> .now_pm: 7263 000044B8 F606[A700]40 <1> testopt [internalflags3], dif3_prior_pm 7264 000044BD 753C <1> jnz .from_no_change 7265 <1> .from_86m_now_pm: 7266 <1> .from_86m_now_pm.loop: 7267 000044BF AD <1> lodsw 7268 000044C0 97 <1> xchg ax, di 7269 000044C1 81FE[E688] <1> cmp si, convsegs.end_fixed 7270 000044C5 7716 <1> ja @F 7271 <1> 7272 000044C7 8B4504 <1> mov ax, word [di + soaSelector] 7273 000044CA 85C0 <1> test ax, ax 7274 000044CC 750B <1> jnz .no_dosdata_change 7275 000044CE 8B5D02 <1> mov bx, word [di + soaSegment] 7276 000044D1 B80200 <1> mov ax, 0002h 7277 000044D4 CD31 <1> int 31h 7278 000044D6 894504 <1> mov word [di + soaSelector], ax 7279 <1> 7280 <1> .no_dosdata_change: 7281 000044D9 8905 <1> mov word [di + soaSegSel], ax 7282 000044DB EB1C <1> jmp @FFF 7283 <1> 7284 <1> @@: 7285 <1> ; Magic: Do not modify if called during modeswitching. 7286 000044DD F606[9E00]08 <1> testopt [internalflags], modeswitched 7287 000044E2 7517 <1> jnz .from_done_change ; cancel this --> 7288 <1> 7289 000044E4 8B5D02 <1> mov bx, word [di + soaSegment] 7290 000044E7 B80200 <1> mov ax, 0002h 7291 000044EA CD31 <1> int 31h 7292 000044EC 7302 <1> jnc @F 7293 000044EE 31C0 <1> xor ax, ax 7294 <1> @@: 7295 000044F0 8905 <1> mov word [di + soaSegSel], ax 7296 000044F2 894504 <1> mov word [di + soaSelector], ax 7297 000044F5 83650200 <1> and word [di + soaSegment], 0 7298 <1> @@: 7299 <1> %if $ - .from_86m_now_pm.loop > 126 7300 <1> loop .from_86m_now_pm.loop_j 7301 <1> jmp .from_done_change 7302 <1> 7303 <1> .from_86m_now_pm.loop_j: 7304 <1> jmp .from_86m_now_pm.loop 7305 <1> %else 7306 000044F9 E2C4 <1> loop .from_86m_now_pm.loop 7307 <1> %endif 7308 <1> .from_done_change: 7309 <1> .from_no_change: 7310 <1> 7311 <1> 7312 <1> remember_mode: 7313 000044FB E8CF4C <1> call ispm 7314 000044FE 7507 <1> jnz .from_86m 7315 <1> .from_pm: 7316 00004500 800E[A700]40 <1> setopt [internalflags3], dif3_prior_pm 7317 00004505 EB05 <1> jmp @F 7318 <1> 7319 <1> .from_86m: 7320 00004507 8026[A700]BF <1> clropt [internalflags3], dif3_prior_pm 7321 <1> @@: 7322 0000450C C3 <1> retn 7323 <1> %endif 7324 <1> 7325 <1> 7326 <1> %if _PM && _DEBUG 7327 <1> ; INP: - 7328 <1> ; OUT: es = ds 7329 <1> ; CHG: eax, edx, bx, cx, bp, si, di 7330 <1> ; STT: in PM 7331 <1> ; do not call InDos or other functions using seg/sels 7332 <1> pm_set_handlers: 7333 <1> xor bp, bp ; = 0 if no 386 7334 <1> _386 inc bp 7335 <1> _386 inc bp ; = 2 if 386 7336 <1> 7337 <1> push ds 7338 <1> pop es 7339 <1> 7340 <1> mov si, exctab ; hook several exceptions 7341 <1> %if _DEBUGUPDATESAVE 7342 <1> mov di, excsave 7343 <1> %endif 7344 <1> _386 xor edx, edx ; clear edxh 7345 <1> mov dx, exc_first 7346 <1> .loopexc: 7347 <1> lodsb 7348 <1> mov bl, al 7349 <1> 7350 <1> %if _DEBUGUPDATESAVE 7351 <1> _386_o32 ; push edx 7352 <1> push dx ; preserve excXX pointer 7353 <1> mov ax, 0202h 7354 <1> ; (edxh is zero) 7355 <1> int 31h ; cx:(e)dx -> prior handler 7356 <1> _386_o32 ; xchg eax, edx 7357 <1> xchg ax, dx 7358 <1> _386_o32 ; stosd 7359 <1> stosw ; store offset (dword on 386+, else word) 7360 <1> xchg ax, cx 7361 <1> stosw ; store selector 7362 <1> mov ax, 4 7363 <1> sub ax, bp ; if 386, ax = 4 - 2 = 2, else ax = 4 7364 <1> add di, ax ; -> next entry of excsave 7365 <1> _386_o32 ; pop edx 7366 <1> pop dx 7367 <1> %endif 7368 <1> 7369 <1> mov cx, word [cssel] ; -> our handler for this exception 7370 <1> mov ax, 0203h 7371 <1> int 31h ; set our handler 7372 <1> add dx, byte exc_second - exc_first 7373 <1> ; -> next handler 7374 <1> cmp si, endexctab ; if another to go --> 7375 <1> jb .loopexc 7376 <1> 7377 <1> %if _CATCHPMINT214C 7378 <1> mov si, pminttab ; ds:si -> pminttab 7379 <1> %if _DEBUGUPDATESAVE 7380 <1> mov di, pmintsave ; es:di -> pmintsave 7381 <1> %endif 7382 <1> .loopint: 7383 <1> lodsb ; get interrupt number 7384 <1> mov bl, al ; bl = interrupt number 7385 <1> 7386 <1> %if _DEBUGUPDATESAVE 7387 <1> _386 xor edx, edx ; clear edxh 7388 <1> mov ax, 0204h 7389 <1> int 31h ; cx:(e)dx -> prior handler 7390 <1> _386_o32 ; xchg eax, edx 7391 <1> xchg ax, dx ; (e)ax = offset 7392 <1> _386_o32 ; stosd 7393 <1> stosw ; store offset (dword on 386+, else word) 7394 <1> xchg ax, cx 7395 <1> stosw ; store selector 7396 <1> mov ax, 4 7397 <1> sub ax, bp ; if 386, ax = 4 - 2 = 2, else ax = 4 7398 <1> add di, ax ; -> next entry of pmintsave 7399 <1> %endif 7400 <1> 7401 <1> lodsw ; ax -> our handler 7402 <1> _386 xor edx, edx 7403 <1> xchg ax, dx ; (e)dx -> our handler 7404 <1> mov cx, word [cssel] ; cx:(e)dx -> our handler 7405 <1> mov ax, 0205h 7406 <1> int 31h 7407 <1> cmp si, pminttab.end 7408 <1> jb .loopint 7409 <1> %endif 7410 <1> 7411 <1> jmp resetmode 7412 <1> %endif 7413 <1> 7414 <1> 7415 <1> %if _PM && (_DEBUG || 1 || _CATCHPMINT214C) 7416 <1> ; INP: - 7417 <1> ; OUT: - 7418 <1> ; CHG: eax, edx, bx, cx, bp, si, di 7419 <1> ; STT: in PM 7420 <1> ; do not call InDos or other functions using seg/sels 7421 <1> pm_reset_handlers: 7422 0000450D 31ED <1> xor bp, bp ; = 0 if no 386 7423 0000450F 45 <1> _386 inc bp 7424 00004510 45 <1> _386 inc bp ; = 2 if 386 7425 <1> 7426 <1> 7427 <1> %if CATCHEXCAMOUNT 7428 <1> ; unhook exceptions 7429 00004511 BF[EA88] <1> mov di, exctab 7430 00004514 BE[F888] <1> mov si, excsave 7431 <1> .loopexc: 7432 00004517 8A1D <1> mov bl, [di] ; bl = exception number 7433 00004519 47 <1> inc di 7434 0000451A 66 <1> _386_o32 ; lodsd 7435 0000451B AD <1> lodsw ; load offset (dword on 386+, else word) 7436 0000451C 66 <1> _386_o32 ; xchg eax, edx 7437 0000451D 92 <1> xchg ax, dx 7438 0000451E AD <1> lodsw ; load selector 7439 0000451F 91 <1> xchg ax, cx ; cx:(e)dx -> prior handler 7440 00004520 B80400 <1> mov ax, 4 7441 00004523 29E8 <1> sub ax, bp ; if 386, ax = 4 - 2 = 2, else ax = 4 7442 00004525 01C6 <1> add si, ax ; -> next entry of excsave 7443 00004527 B80302 <1> mov ax, 0203h 7444 0000452A CD31 <1> int 31h ; set previous handler 7445 0000452C 81FF[F188] <1> cmp di, endexctab ; if another to go --> 7446 00004530 72E5 <1> jb .loopexc 7447 <1> %endif 7448 <1> 7449 <1> 7450 <1> %if CATCHPMINTAMOUNT 7451 <1> ; unhook interrupts 7452 00004532 BF[3089] <1> mov di, pminttab ; ds:di -> pminttab 7453 00004535 BE[3889] <1> mov si, pmintsave ; ds:si -> pmintsave 7454 <1> .loopint: 7455 00004538 8A1D <1> mov bl, [di] ; bl = interrupt number 7456 0000453A 83C703 <1> add di, 3 ; -> after this pminttab entry 7457 0000453D 66 <1> _386_o32 ; lodsd 7458 0000453E AD <1> lodsw ; load offset (dword on 386+, else word) 7459 0000453F 66 <1> _386_o32 ; xchg eax, edx 7460 00004540 92 <1> xchg ax, dx 7461 00004541 AD <1> lodsw ; load selector 7462 00004542 91 <1> xchg ax, cx ; cx:(e)dx -> prior handler 7463 00004543 B80400 <1> mov ax, 4 7464 00004546 29E8 <1> sub ax, bp ; if 386, ax = 4 - 2 = 2, else ax = 4 7465 00004548 01C6 <1> add si, ax ; -> next entry of pmintsave 7466 0000454A B80502 <1> mov ax, 0205h 7467 0000454D CD31 <1> int 31h ; set previous handler 7468 0000454F 81FF[3389] <1> cmp di, pminttab.end ; if another to go --> 7469 00004553 72E3 <1> jb .loopint 7470 <1> %endif 7471 <1> 7472 00004555 E921F3 <1> jmp resetmode 7473 <1> %endif 7474 <1> 7475 <1> 7476 <1> %if _DEBUG1 7477 <1> ; INP: bx -> dword address, word counter 7478 <1> ; dx:ax = linear address to check 7479 <1> ; OUT: NC if to proceed as usual 7480 <1> ; CY if address matched and counter indicates trigger 7481 <1> ; (ie, this should cause the caller to fail) 7482 <1> ; If the address matched, the counter has been stepped. 7483 <1> ; (The result of that step indicates whether to trigger.) 7484 <1> ; STT: ds = ss = debugger data selector 7485 <1> handle_test_case: 7486 <1> cmp word [bx], ax 7487 <1> jne .proceed 7488 <1> cmp word [bx + 2], dx 7489 <1> jne .proceed 7490 <1> 7491 <1> test word [bx + 4], 7FFFh ; is it already at a terminal state ? 7492 <1> jz .no_decrement ; yes, do not further decrement --> 7493 <1> dec word [bx + 4] ; decrement (towards 0 or 8000h) 7494 <1> jz .trigger ; case for decrementing 1 to 0 --> 7495 <1> .no_decrement: 7496 <1> cmp word [bx + 4], 8000h ; decrement resulted in 8000h 7497 <1> je .trigger ; or was already in that state? --> 7498 <1> .proceed: 7499 <1> clc 7500 <1> retn 7501 <1> 7502 <1> .trigger: 7503 <1> stc 7504 <1> retn 7505 <1> 7506 <1> 7507 <1> ; INP: bx -> first test record (dword address, word counter) 7508 <1> ; dx:ax = linear address to check 7509 <1> ; cx = number of consecutive test records to check 7510 <1> ; OUT: NC if to proceed as usual 7511 <1> ; CY if address matched and counter indicates trigger 7512 <1> ; (ie, this should cause the caller to fail) 7513 <1> ; CHG: bx, cx 7514 <1> ; STT: ds = ss = debugger data selector 7515 <1> ; 7516 <1> ; Note that all test cases are tried and, if the address 7517 <1> ; matches, their counters are stepped. In particular, 7518 <1> ; a trigger no longer causes us to skip all further 7519 <1> ; test cases that may have the same address. 7520 <1> ; If at least one of the matching test cases indicates a 7521 <1> ; trigger condition after its stepping, the return is CY. 7522 <1> handle_test_case_multiple_16: 7523 <1> mov cx, 16 7524 <1> handle_test_case_multiple: 7525 <1> clc 7526 <1> pushf ; initialise flags on stack with NC 7527 <1> jcxz .end 7528 <1> .loop: 7529 <1> call handle_test_case 7530 <1> jnc .next 7531 <1> popf ; (discard) 7532 <1> stc 7533 <1> pushf ; new flags on stack with CY 7534 <1> .next: 7535 <1> add bx, 6 7536 <1> loop .loop 7537 <1> .end: 7538 <1> popf ; CF 7539 <1> retn 7540 <1> %endif 7541 <1> 7542 <1> 7543 <1> usesection lDEBUG_DATA_ENTRY 7544 000086F5 00 <1> align 4, db 0 7545 000086F8 01000000 <1> default_pp_count: dd 1 7546 000086FC 01000000 <1> default_tp_count: dd 1 7547 00008700 01000000 <1> default_tt_count: dd 1 7548 <1> 7549 <1> 7550 <1> usesection lDEBUG_CODE 7551 <1> ; PARSE_PT - Parse 'p' or 't' command. Also resets pagedcommand flag. 7552 <1> ; Entry AL First character of command 7553 <1> ; SI Address of next character 7554 <1> ; [internalflags2] & dif2_is_pp = set if P 7555 <1> ; [internalflags] & tt_p = set if TP 7556 <1> ; both clear if T 7557 <1> ; Exit BX:CX Number of times to repeat 7558 <1> ; Uses AH,BX,CX,DX. 7559 <1> 7560 <1> parse_pt: 7561 00004558 E8A0BF <1> call guard_re 7562 0000455B C706[C000][6370] <1> mov word [gg_deferred_message], msg.empty_message 7563 00004561 8326[C200]00 <1> and word [bb_deferred_message_in_lineout_behind], 0 7564 00004566 8026[A000]F7 <1> clropt [internalflags2], dif2_gg_is_gg 7565 0000456B 8026[9F00]2B <1> clropt [internalflags], tt_while | tt_silent_mode | tt_no_bb | tt_no_bb_first 7567 00004570 8326[FC09]00 <1> and word [tt_silent_mode_number], 0 7568 <1> 7569 <1> ; TP.NB, T.NB, P.NB: trace/proceed without bb breakpoints 7570 <1> ; 7571 <1> ; Note that when such a command is repeated through lastcmd, 7572 <1> ; it gets an empty line, thus tt_no_bb remains clear, and 7573 <1> ; the corresponding command without .NB is run. 7574 00004575 3C2E <1> cmp al, '.' 7575 00004577 7520 <1> jne .no_dot 7576 <1> 7577 00004579 AD <1> lodsw 7578 0000457A 25DFDF <1> and ax, TOUPPER_W 7579 0000457D 3D4E42 <1> cmp ax, "NB" 7580 00004580 7411 <1> je .dot_nb 7581 <1> ; TP.SB, T.SB, P.SB: trace/proceed without bb for first step 7582 00004582 3D5342 <1> cmp ax, "SB" 7583 00004585 7405 <1> je .dot_sb 7584 00004587 4E <1> dec si 7585 00004588 4E <1> dec si 7586 00004589 E9505F <1> jmp error 7587 <1> 7588 <1> .dot_sb: 7589 0000458C 800E[9F00]80 <1> setopt [internalflags], tt_no_bb_first 7590 00004591 EB05 <1> jmp .dot_common 7591 <1> 7592 <1> .dot_nb: 7593 00004593 800E[9F00]40 <1> setopt [internalflags], tt_no_bb 7594 <1> .dot_common: 7595 00004598 AC <1> lodsb 7596 <1> .no_dot: 7597 00004599 E85801 <1> call parseql ; process =addr 7598 0000459C E87673 <1> call skipcomm0 ; skip any white space 7599 <1> 7600 0000459F BA0400 <1> mov dx, opt3_pp_no_paging 7601 000045A2 8B1E[FA86] <1> mov bx, word [default_pp_count + 2] 7602 000045A6 8B0E[F886] <1> mov cx, word [default_pp_count] 7603 000045AA F606[A100]10 <1> testopt [internalflags2], dif2_is_pp 7604 000045AF 751D <1> jnz @F 7605 000045B1 BA0200 <1> mov dx, opt3_tp_no_paging 7606 000045B4 8B1E[FE86] <1> mov bx, word [default_tp_count + 2] 7607 000045B8 8B0E[FC86] <1> mov cx, word [default_tp_count] 7608 000045BC F606[9F00]08 <1> testopt [internalflags], tt_p 7609 000045C1 750B <1> jnz @F 7610 000045C3 BA0100 <1> mov dx, opt3_tt_no_paging 7611 000045C6 8B1E[0287] <1> mov bx, word [default_tt_count + 2] 7612 000045CA 8B0E[0087] <1> mov cx, word [default_tt_count] 7613 <1> @@: ; bx:cx = default count 7614 <1> 7615 000045CE 8516[8400] <1> test word [options3], dx 7616 000045D2 7405 <1> jz @F 7617 000045D4 8026[9C00]F7 <1> clropt [internalflags], pagedcommand 7618 <1> @@: 7619 <1> 7620 <1> ; Initialise auxbuff pointers in case there is no WHILE clause. 7621 000045D9 E80B01 <1> call tpg_initialise_empty_auxbuff 7622 <1> 7623 000045DC E80F73 <1> call iseol? 7624 000045DF 7503E99500 <1> je .ppt1 ; if no count given --> (uses bx:cx = default) 7625 000045E4 E8006D <1> call getdword ; bx:dx = given count 7626 <1> 7627 000045E7 53 <1> push bx 7628 000045E8 52 <1> push dx ; push count 7629 000045E9 E85873 <1> call skipwh0 7630 000045EC E8FF72 <1> call iseol? 7631 000045EF 7503E98300 <1> je .no_while 7632 000045F4 4E <1> dec si 7633 000045F5 BA[9D68] <1> mov dx, msg.while 7634 000045F8 E89472 <1> call isstring? 7635 000045FB 7408 <1> je .found_while 7636 <1> 7637 000045FD E8DFBE <1> call guard_auxbuff 7638 00004600 E8C100 <1> call .handle_silent ; (error if no SILENT keyword) 7639 <1> 7640 00004603 EB72 <1> jmp .no_while 7641 <1> 7642 <1> 7643 <1> .found_while: 7644 00004605 E8D7BE <1> call guard_auxbuff 7645 00004608 E80973 <1> call skipcomma 7646 0000460B 4E <1> dec si 7647 0000460C 89F1 <1> mov cx, si 7648 0000460E AC <1> lodsb 7649 0000460F E8D56C <1> call getexpression 7650 00004612 E8E466 <1> call toboolean 7651 00004615 E82C73 <1> call skipwh0 7652 00004618 52 <1> push dx 7653 00004619 56 <1> push si 7654 0000461A E8D172 <1> call iseol? ; expect end of line here 7655 0000461D 7404 <1> je .no_while_silent 7656 <1> 7657 0000461F 4E <1> dec si 7658 00004620 E8A100 <1> call .handle_silent 7659 <1> 7660 <1> .no_while_silent: 7661 00004623 5E <1> pop si 7662 00004624 5A <1> pop dx 7663 00004625 85D2 <1> test dx, dx ; condition true now ? 7664 00004627 7509 <1> jnz @F 7665 <1> 7666 00004629 BA[1C69] <1> mov dx, msg.while_not_true 7667 0000462C E87577 <1> call putsz 7668 0000462F E9CEB9 <1> jmp cmd3 7669 <1> 7670 <1> @@: 7671 <1> %if _PM 7672 00004632 8B1E[F009] <1> mov bx, word [auxbuff_switchbuffer_size] 7673 <1> %else 7674 <1> xor bx, bx 7675 <1> %endif 7676 <1> ; (si + 1) -> line terminator (13, ';', 0) or next keyword 7677 <1> @@: 7678 00004636 4E <1> dec si ; -> terminator, or blank 7679 00004637 807CFF20 <1> cmp byte [si - 1], 32 ; another blank at end ? 7680 0000463B 74F9 <1> je @B ; yes --> 7681 0000463D 807CFF09 <1> cmp byte [si - 1], 9 7682 00004641 74F3 <1> je @B ; yes --> 7683 00004643 89F0 <1> mov ax, si 7684 00004645 29C8 <1> sub ax, cx ; ax = length of expression 7685 00004647 53 <1> push bx 7686 00004648 01C3 <1> add bx, ax 7687 0000464A 81FB0F20 <1> cmp bx, _AUXBUFFSIZE - 1 7688 0000464E 7603E9895E <1> ja error 7689 00004653 8E06[F209] <1> mov es, word [auxbuff_segorsel] 7690 <1> ; => auxbuff 7691 00004657 5B <1> pop bx ; -> behind switchbuffer 7692 00004658 89CE <1> mov si, cx ; -> expression start 7693 0000465A 89C1 <1> mov cx, ax ; = length of expression 7694 <1> .loop: 7695 0000465C AC <1> lodsb 7696 0000465D 268807 <1> mov byte [es:bx], al 7697 00004660 43 <1> inc bx ; store expression 7698 00004661 E2F9 <1> loop .loop 7699 00004663 26C60700 <1> mov byte [es:bx], 0 ; terminate string 7700 00004667 43 <1> inc bx 7701 00004668 891E[F809] <1> mov word [auxbuff_behind_while_condition], bx 7702 0000466C 891E[FA09] <1> mov word [auxbuff_behind_last_silent], bx 7703 00004670 16 <1> push ss 7704 00004671 07 <1> pop es 7705 <1> 7706 00004672 800E[9F00]04 <1> setopt [internalflags], tt_while 7707 <1> .no_while: 7708 00004677 59 <1> pop cx 7709 00004678 5B <1> pop bx ; bx:cx = given count 7710 <1> 7711 <1> .ppt1: 7712 00004679 85DB <1> test bx, bx 7713 0000467B 7507 <1> jnz @F 7714 0000467D 85C9 <1> test cx, cx 7715 0000467F 7503E9585E <1> jz error ; must be at least 1, else error --> 7716 <1> @@: 7717 00004684 53 <1> push bx 7718 00004685 51 <1> push cx 7719 <1> 7720 00004686 8026[A000]E8 <1> clropt [internalflags2], dif2_gg_is_first | dif2_gg_first_detected | dif2_gg_skip_cseip | dif2_gg_skip_non_cseip 7723 <1> 7724 0000468B F606[7E00]04 <1> testopt [options], tp_do_not_skip_bp 7725 00004690 752C <1> jnz .do_not_skip_cseip 7726 00004692 800E[A000]01 <1> setopt [internalflags2], dif2_gg_is_first 7727 <1> 7728 00004697 803E[D30B]00 <1> cmp byte [eqflag], 0 7729 0000469C 7508 <1> jne .cseip_take_eql 7730 <1> 7731 0000469E 66 <1> _386_PM_o32 ; xor ecx, ecx 7732 0000469F 31C9 <1> xor cx, cx 7733 000046A1 E8B0F0 <1> call get_cseip_ecx_linear 7734 000046A4 EB0C <1> jmp .got_cseip 7735 <1> 7736 <1> .cseip_take_eql: 7737 000046A6 8B1E[D80B] <1> mov bx, word [eqladdr + 4] 7738 000046AA 66 <1> _386_PM_o32 ; mov edx, dword [eqladdr] 7739 000046AB 8B16[D40B] <1> mov dx, word [eqladdr] 7740 000046AF E8AEF0 <1> call getlinear 7741 <1> .got_cseip: 7742 000046B2 7303E9255E <1> jc error 7743 000046B7 A3[B400] <1> mov word [gg_first_cseip_linear], ax 7744 000046BA 8916[B600] <1> mov word [gg_first_cseip_linear + 2], dx 7745 <1> .do_not_skip_cseip: 7746 <1> 7747 000046BE 59 <1> pop cx 7748 000046BF 5B <1> pop bx 7749 <1> 7750 000046C0 E85F00 <1> call seteq ; make the = operand take effect 7751 000046C3 C3 <1> retn 7752 <1> 7753 <1> 7754 <1> .handle_silent: 7755 000046C4 BA[A368] <1> mov dx, msg.silent 7756 000046C7 E8C571 <1> call isstring? 7757 000046CA 7403E90D5E <1> jne error 7758 000046CF E84272 <1> call skipcomma 7759 000046D2 E81972 <1> call iseol? 7760 000046D5 740A <1> je .no_silent_mode_number 7761 <1> 7762 000046D7 E8F370 <1> call getword 7763 000046DA 8916[FC09] <1> mov word [tt_silent_mode_number], dx 7764 000046DE E82272 <1> call chkeol 7765 <1> 7766 <1> .no_silent_mode_number: 7767 000046E1 800E[9F00]10 <1> setopt [internalflags], tt_silent_mode 7768 000046E6 C3 <1> retn 7769 <1> 7770 <1> 7771 <1> ; INP: (_PM) word [auxbuff_switchbuffer_size] 7772 <1> ; OUT: word [auxbuff_behind_while_condition] 7773 <1> ; word [auxbuff_behind_last_silent] 7774 <1> ; CHG: dx 7775 <1> tpg_initialise_empty_auxbuff: 7776 <1> %if _PM 7777 000046E7 8B16[F009] <1> mov dx, word [auxbuff_switchbuffer_size] 7778 <1> %else 7779 <1> xor dx, dx 7780 <1> %endif 7781 000046EB 8916[F809] <1> mov word [auxbuff_behind_while_condition], dx 7782 000046EF 8916[FA09] <1> mov word [auxbuff_behind_last_silent], dx 7783 000046F3 C3 <1> retn 7784 <1> 7785 <1> 7786 <1> ; PARSEQL - Parse `=' operand for `g', 'p' and `t' commands. 7787 <1> ; Entry AL First character of command 7788 <1> ; SI Address of next character 7789 <1> ; Exit AL First character beyond range 7790 <1> ; SI Address of the character after that 7791 <1> ; eqflag Nonzero if an `=' operand was present 7792 <1> ; eqladdr Address, if one was given 7793 <1> ; Uses AH,BX,CX,DX. 7794 <1> 7795 <1> parseql: 7796 000046F4 C606[D30B]00 <1> mov byte [eqflag], 0 ; mark '=' as absent 7797 000046F9 3C3D <1> cmp al, '=' 7798 000046FB 7524 <1> jne peq1 ; if no '=' operand 7799 000046FD E84372 <1> call skipwhite 7800 00004700 8B1E[900C] <1> mov bx, word [reg_cs] ; default segment 7801 00004704 E80E62 <1> call getaddrX ; get the address into bx:(e)dx 7802 <1> %if _PM 7803 00004707 C706[D60B]0000 <1> mov word [eqladdr+2], 0 7804 0000470D 803E[DC88]00 <1> cmp byte [bAddr32], 0 7805 00004712 7401 <1> jz .nohighofs 7806 00004714 66 <1> o32 ; mov dword [eqladdr], edx 7807 <1> .nohighofs: 7808 <1> %endif 7809 00004715 8916[D40B] <1> mov word [eqladdr+0], dx 7810 00004719 891E[D80B] <1> mov word [eqladdr+4], bx 7811 0000471D FE06[D30B] <1> inc byte [eqflag] 7812 <1> peq1: 7813 00004721 C3 <1> retn 7814 <1> 7815 <1> 7816 <1> ; SETEQ - Copy the = arguments to their place, if appropriate. 7817 <1> ; (This is not done immediately, because the command may have 7818 <1> ; a syntax error.) 7819 <1> ; Uses AX. 7820 <1> seteq: 7821 00004722 803E[D30B]00 <1> cmp byte [eqflag], 0 7822 00004727 7417 <1> je .return ; if no `=' operand 7823 00004729 A1[D40B] <1> mov ax, word [eqladdr+0] 7824 0000472C A3[9C0C] <1> mov word [reg_eip], ax 7825 <1> %if _PM 7826 0000472F A1[D60B] <1> mov ax, word [eqladdr+2] 7827 00004732 A3[9E0C] <1> mov word [reg_eip+2], ax 7828 <1> %endif 7829 00004735 A1[D80B] <1> mov ax, word [eqladdr+4] 7830 00004738 A3[900C] <1> mov word [reg_cs], ax 7831 0000473B C606[D30B]00 <1> mov byte [eqflag], 0 ; clear the flag 7832 <1> .return: 7833 00004740 C3 <1> retn 2067 %include "uu.asm" 2068 <1> 2069 <1> %if 0 2070 <1> 2071 <1> lDebug U command - Disassembler 2072 <1> 2073 <1> Copyright (C) 1995-2003 Paul Vojta 2074 <1> Copyright (C) 2008-2012 C. Masloch 2075 <1> 2076 <1> Usage of the works is permitted provided that this 2077 <1> instrument is retained with the works, so that any entity 2078 <1> that uses the works is notified of this instrument. 2079 <1> 2080 <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 2081 <1> 2082 <1> %endif 2083 <1> 2084 <1> 2085 <1> usesection lDEBUG_CODE 2086 <1> 2087 <1> ; U command - disassemble. 2088 <1> uu: 2089 00004741 C706[DC0B][4C47] <1> mov word [lastcmd], lastuu 2090 00004747 E8A471 <1> call iseol? 2091 0000474A 7514 <1> jne uu1 ; if an address was given 2092 <1> 2093 <1> lastuu: 2094 0000474C 66 <1> _386_PM_o32 ; mov ecx, dword [u_addr] 2095 0000474D 8B0E[1E0B] <1> mov cx, word [u_addr] 2096 00004751 66 <1> _386_PM_o32 ; mov edx, ecx 2097 00004752 89CA <1> mov dx, cx 2098 00004754 66 <1> _386_PM_o32 ; add ecx, byte 1Fh 2099 00004755 83C11F <1> add cx, byte 1Fh 2100 00004758 7304 <1> jnc .no_overflow ; if no overflow --> 2101 0000475A 66 <1> _386_PM_o32 ; or ecx, byte -1 2102 0000475B 83C9FF <1> or cx, byte -1 ; til end of segment 2103 <1> .no_overflow: 2104 0000475E EB25 <1> jmp short uu2 2105 <1> 2106 <1> uu1: 2107 00004760 B92000 <1> mov cx, 20h ; default length 2108 00004763 8B1E[900C] <1> mov bx, word [reg_cs] 2109 00004767 E8BE60 <1> call getrangeX ; get address range into bx:(e)dx 2110 0000476A E89671 <1> call chkeol ; expect end of line here 2111 0000476D 891E[220B] <1> mov word [u_addr + saSegSel], bx 2112 <1> %if _PM 2113 00004771 E8594A <1> call ispm 2114 00004774 7506 <1> jnz .86m 2115 <1> .pm: 2116 00004776 891E[260B] <1> mov word [u_addr + saSelector], bx 2117 0000477A EB04 <1> jmp @F 2118 <1> .86m: 2119 0000477C 891E[240B] <1> mov word [u_addr + saSegment], bx 2120 <1> @@: 2121 <1> %endif 2122 00004780 66 <1> _386_PM_o32 ; mov dword [u_addr], edx 2123 00004781 8916[1E0B] <1> mov word [u_addr], dx 2124 <1> 2125 <1> ; (d)word [u_addr] = offset start address 2126 <1> ; word [u_addr + saSegSel] = segment start address 2127 <1> ; (e)cx = end address 2128 <1> ; (e)dx = start adddress (same as [u_addr]) 2129 <1> uu2: 2130 00004785 66 <1> _386_PM_o32 ; inc ecx 2131 00004786 41 <1> inc cx 2132 <1> uu3: 2133 00004787 E81BF8 <1> call handle_serial_flags_ctrl_c 2134 0000478A 66 <1> _386_PM_o32 ; push ecx 2135 0000478B 51 <1> push cx 2136 0000478C 66 <1> _386_PM_o32 ; push edx 2137 0000478D 52 <1> push dx 2138 0000478E 8326[D687]00 <1> and word [disflags], 0 2139 00004793 E81700 <1> call disasm ; do it 2140 00004796 66 <1> _386_PM_o32 ; pop ebx 2141 00004797 5B <1> pop bx 2142 00004798 66 <1> _386_PM_o32 ; pop ecx 2143 00004799 59 <1> pop cx 2144 0000479A 66 <1> _386_PM_o32 ; mov eax, dword [u_addr] 2145 0000479B A1[1E0B] <1> mov ax, word [u_addr] 2146 0000479E 66 <1> _386_PM_o32 ; mov edx, eax 2147 0000479F 89C2 <1> mov dx, ax 2148 000047A1 66 <1> _386_PM_o32 ; sub eax, ecx 2149 000047A2 29C8 <1> sub ax, cx ; current position - end 2150 000047A4 66 <1> _386_PM_o32 ; sub ebx, ecx 2151 000047A5 29CB <1> sub bx, cx ; previous position - end 2152 000047A7 66 <1> _386_PM_o32 ; cmp eax, ebx 2153 000047A8 39D8 <1> cmp ax, bx 2154 000047AA 73DB <1> jnb uu3 ; if we haven't reached the goal 2155 000047AC C3 <1> retn 2156 <1> 2157 <1> 2158 <1> usesection lDEBUG_DATA_ENTRY 2159 <1> 2160 <1> ; Jump table for displaying sized operands. 2161 <1> ; Entries are defined in the debug.asm opsizeditem list. 2162 <1> align 2, db 0 2163 <1> disjmp2: 2164 00008704 [A94F][DA4F][0A52]- <1> dw DISJMP2_OPSIZEDITEMS 2164 0000870A [1752][CB4F][2052]- <1> 2164 00008710 [5A52][5F52] <1> 2165 <1> .end: 2166 <1> 2167 <1> ; Jump table for displaying operands. 2168 <1> ; Entries are defined in the debug.asm opitem list. 2169 <1> align 2, db 0 2170 <1> optab: 2171 00008714 [3D49] <1> dw da_internal_error ; entry for OP_END 2172 00008716 [6352][6752][7852]- <1> dw OPTAB_OPITEMS 2172 0000871C [9552][AB52][BD52]- <1> 2172 00008722 [6853][A653][6755]- <1> 2172 00008728 [7755][8D55][AD55]- <1> 2172 0000872E [B855][D755][F855]- <1> 2172 00008734 [F855][0A56][1056]- <1> 2172 0000873A [1E56][2656][F656]- <1> 2172 00008740 [2057][3B57][4757]- <1> 2172 00008746 [4E57][FF56][0657]- <1> 2172 0000874C [0D57][1957][1457]- <1> 2172 00008752 [3756][5F56][9E56]- <1> 2172 00008758 [3D49]310033004458- <1> 2172 00008760 434C53544353445345- <1> 2172 00008769 53465347535353 <1> 2173 <1> 2174 <1> 2175 <1> %if _MEMREF_AMOUNT 2176 <1> align 16, db 0 2177 00008770 00 <1> memrefs: times MEMREF_size * _MEMREF_AMOUNT db 0 2178 000087B0 0000 <1> .free: dw 0 2179 <1> 2180 000087B2 00 <1> align 4, db 0 2181 <1> string_memref_counter: 2182 000087B4 00000000 <1> dd 0 2183 <1> %endif 2184 <1> 2185 <1> 2186 <1> ; DISASM - Disassemble. 2187 <1> 2188 <1> align 2, db 0 2189 000087B8 0000 <1> dis_n: dw 0 ; number of bytes in instruction so far 2190 000087BA 0000 <1> dw 0 2191 000087BC 00 <1> preflags: db 0 ; flags for prefixes found so far (includes OSIZE,ASIZE) 2192 000087BD 00 <1> preused: db 0 ; flags for prefixes used so far 2193 <1> %if _PM 2194 000087BE 00 <1> presizeflags: db 0 ; O32,A32 flags = (OSIZE,ASIZE) XOR (32-bit cs?) 2195 <1> %else 2196 <1> presizeflags: equ preflags ; O32,A32 flags are always equal to OSIZE,ASIZE 2197 <1> %endif 2198 <1> 2199 <1> PRESEG equ 1 ; segment prefix 2200 <1> PREREP equ 2 ; rep prefixes 2201 <1> PREREPZ equ 4 ; F3h, not F2h 2202 <1> PRELOCK equ 8 ; lock prefix 2203 <1> PREOSIZE equ 10h ; flag for OSIZE prefix 2204 <1> PREASIZE equ 20h ; flag for ASIZE prefix 2205 <1> PRE32D equ 10h ; flag for 32-bit data 2206 <1> PRE32A equ 20h ; flag for 32-bit addressing 2207 <1> PREWAIT equ 40h ; prefix wait (not really a prefix) 2208 <1> GOTREGM equ 80h ; set if we have the reg/mem part 2209 <1> 2210 000087BF 00 <1> instru: db 0 ; the main instruction byte 2211 000087C0 00 <1> disp8: db 0 2212 000087C1 00 <1> align 2, db 0 2213 000087C2 0000 <1> index: dw 0 ; index of the instruction (unsqueezed) 2214 000087C4 380339033C03 <1> obsinst:dw SFPGROUP3, SFPGROUP3+1, SFPGROUP3+4 2215 000087CA 04020602 <1> dw SPARSE_BASE+24h, SPARSE_BASE+26h ; obsolete-instruction values 2216 <1> ; This is used to search for obsolete instructions: 2217 <1> ; DBE0h: feni 2218 <1> ; DBE1h: fdisi 2219 <1> ; DBE4h: fsetpm 2220 <1> ; 124h: mov trX, reg 2221 <1> ; 126h: mov reg, trX 2222 <1> 2223 000087CE 00 <1> rmsize: db 0 ; <0 or 0 or >0 means mod r/m is 8 or 16 or 32 2224 000087CF 00 <1> segmnt: db 0 ; segment determined by prefix (or otherwise) 2225 <1> align 4, db 0 2226 000087D0 00000000 <1> addrr: dd 0 ; address in mod r/m byte 2227 000087D4 0000 <1> savesp2:dw 0 ; save the stack pointer here (used in disasm) 2228 <1> 2229 <1> align 2, db 0 2230 000087D6 0000 <1> disflags: dw 0 ; flags for the disassembler 2231 <1> 2232 <1> ;--- equates for disflags: 2233 <1> 2234 <1> DIS_F_REPT equ 1 ; repeat after pop ss, etc. 2235 <1> DIS_F_SHOW equ 2 ; show memory contents 2236 <1> DIS_I_SHOW equ 4 ; there are memory contents to show 2237 <1> DIS_I_UNUSED equ 8 ; (internal) print " (unused)" 2238 <1> DIS_I_SHOWSIZ equ 10h ; (internal) always show the operand size 2239 <1> DIS_I_KNOWSIZ equ 20h ; (internal) we know the operand size of instr. 2240 <1> DIS_I_MOV_SS equ 40h ; (internal) note for repetition: mov ss 2241 <1> DIS_I_DONTSHOW equ 80h ; do not show memory contents override 2242 <1> DIS_I_NOSIZ equ 100h ; do not show size 2243 <1> DIS_I_FAR_M equ 200h ; far memory reference, show segment word contents 2244 <1> DIS_I_DOUBLE_M equ 400h ; double memory reference, show second item contents 2245 <1> DIS_I_SHOW_A32 equ 800h ; memory contents to show are 32-bit addressed 2246 <1> DIS_I_M_SRC equ 1000h ; memory operand is source 2247 <1> DIS_I_M_DST equ 2000h ; memory operand is destination 2248 <1> ; both of the above may be set 2249 <1> 2250 000087D8 00 <1> disflags2: db 0 ; another copy of DIS_I_KNOWSIZ 2251 000087D9 00 <1> disrepeatcount: db 0 2252 <1> 2253 <1> align 2, db 0 2254 000087DA 0000 <1> sizeloc: dw 0 ; address of size words in output line 2255 <1> %if _COND 2256 000087DC 0000 <1> condmsg: dw 0 ; -> conditionals message to display (if R and no mem) 2257 <1> %endif 2258 <1> 2259 <1> ; Jump table for a certain place. 2260 <1> ; The size of this table matches OPTYPES_BASE. 2261 <1> align 2, db 0 2262 <1> disjmp: 2263 000087DE [6E57] <1> dw disbad ; illegal instruction 2264 000087E0 [4E48] <1> dw da_twobyte ; two-byte instruction 2265 000087E2 [5A48] <1> dw da_insgrp ; instruction group 2266 000087E4 [6148] <1> dw da_fpuins ; coprocessor instruction 2267 000087E6 [7C48] <1> dw da_fpugrp ; coprocessor instruction group 2268 000087E8 [8548] <1> dw da_insprf ; instruction prefix (including 66h/67h) 2269 <1> %if ($ - disjmp) != OPTYPES_BASE 2270 <1> %error Wrong length of table disjmp 2271 <1> %endif 2272 <1> 2273 <1> ; Table for 16-bit mod r/m addressing. 8 = BX, 4 = BP, 2 = SI, 1 = DI. 2274 000087EA 0A09060502010408 <1> rmtab: db 8+2, 8+1, 4+2, 4+1, 2, 1, 4, 8 2275 <1> 2276 <1> 2277 <1> %macro defgpr 1.nolist 2278 <1> REG_ %+ %1: equ ($ - rgnam816) / 2 2279 <1> %defstr %%string %1 2280 <1> db %%string 2281 <1> %endmacro 2282 <1> %macro defsr 1.nolist 2283 <1> REG_ %+ %1: equ REG_NO_GPR + ($ - segrgnam) / 2 2284 <1> %defstr %%string %1 2285 <1> db %%string 2286 <1> %endmacro 2287 <1> 2288 <1> REG_NO_GPR equ 24 ; 16..23 are registers eax..edi 2289 <1> 2290 <1> align 2, db 0 2291 <1> ; Tables of register names. 2292 <1> ; rgnam816/rgnam16/segrgnam/xregnam must be consecutive. 2293 <1> rgnam816: 2294 000087F2 414C <1> defgpr AL 2295 000087F4 434C <1> defgpr CL 2296 000087F6 444C <1> defgpr DL 2297 000087F8 424C <1> defgpr BL 2298 000087FA 4148 <1> defgpr AH 2299 000087FC 4348 <1> defgpr CH 2300 000087FE 4448 <1> defgpr DH 2301 00008800 4248 <1> defgpr BH ; 0..7 2302 <1> rgnam16: 2303 00008802 4158 <1> defgpr AX 2304 00008804 4358 <1> defgpr CX 2305 00008806 4458 <1> defgpr DX 2306 00008808 4258 <1> defgpr BX 2307 0000880A 5350 <1> defgpr SP 2308 0000880C 4250 <1> defgpr BP 2309 0000880E 5349 <1> defgpr SI 2310 00008810 4449 <1> defgpr DI ; 8..15 (16-bit), 16..23 (32-bit) 2311 <1> N_REGS16 equ ($ - rgnam16) >> 1 2312 <1> segrgnam: 2313 00008812 4553 <1> defsr ES 2314 00008814 4353 <1> defsr CS 2315 00008816 5353 <1> defsr SS 2316 00008818 4453 <1> defsr DS 2317 0000881A 4653 <1> defsr FS 2318 0000881C 4753 <1> defsr GS ; 24..29 2319 <1> N_SEGREGS equ ($ - segrgnam) >> 1 2320 <1> xregnam: 2321 0000881E 5354 <1> defsr ST 2322 00008820 4D4D <1> defsr MM 2323 00008822 4352 <1> defsr CR 2324 00008824 4452 <1> defsr DR 2325 00008826 5452 <1> defsr TR ; 30..34 2326 <1> N_ALLREGS equ ($ - rgnam816) >> 1 2327 <1> 2328 <1> 2329 <1> align 2, db 0 2330 00008828 [640C][6C0C][700C]- <1> reg32addr: dw reg_eax, reg_ecx, reg_edx, reg_ebx 2330 0000882E [680C] <1> 2331 00008830 [740C][780C][7C0C]- <1> dw reg_esp, reg_ebp, reg_esi, reg_edi 2331 00008836 [800C] <1> 2332 <1> 2333 <1> align 2, db 0 2334 00008838 [880C][900C][8C0C]- <1> segrgaddr: dw reg_es,reg_cs,reg_ss,reg_ds,reg_fs,reg_gs 2334 0000883E [840C][940C][980C] <1> 2335 <1> 2336 <1> ; Tables for handling of named prefixes. 2337 <1> 2338 00008844 262E363E6465 <1> prefixlist: db 26h,2Eh,36h,3Eh,64h,65h ; segment prefixes (in order) 2339 0000884A 9BF0F2F3 <1> db 9Bh,0F0h,0F2h,0F3h ; WAIT,LOCK,REPNE,REPE 2340 0000884E 6667 <1> db 066h,067h ; OSIZE, ASIZE 2341 <1> N_PREFIX: equ $ - prefixlist 2342 <1> 2343 <1> align 2, db 0 2344 00008850 C309F90535082F08 <1> prefixmnem: dw MN_WAIT,MN_LOCK,MN_REPNE,MN_REPE 2345 00008858 0C000200 <1> dw MN_O32,MN_A32 ; in 16-bit CS, OSIZE is O32 and ASIZE is A32 2346 <1> %if _PM 2347 0000885C 11000700 <1> dw MN_O16,MN_A16 ; in 32-bit CS, OSIZE is O16 and ASIZE is A16 2348 <1> %endif 2349 <1> 2350 <1> %if _COND 2351 <1> align 2, db 0 2352 <1> cond_table: 2353 00008860 0008 <1> dw 800h ; OF 2354 00008862 0100 <1> dw 1 ; CF 2355 00008864 4000 <1> dw 40h ; ZF 2356 00008866 4100 <1> dw 41h ; CF | ZF 2357 00008868 8000 <1> dw 80h ; SF 2358 0000886A 0400 <1> dw 4 ; PF 2359 <1> ; dw cond_L_GE ; handled specifically 2360 <1> ; dw cond_LE_G ; handled specifically 2361 <1> %endif 2362 <1> 2363 <1> single_byte_opcodes_repeat_disassembly: 2364 <1> .: 2365 0000886C 17 <1> db 17h ; pop ss 2366 0000886D E6 <1> db 0E6h ; out imm8, al 2367 0000886E E7 <1> db 0E7h ; out imm8, (e)ax 2368 0000886F EE <1> db 0EEh ; out dx, al 2369 00008870 EF <1> db 0EFh ; out dx, (e)ax 2370 00008871 6E <1> db 06Eh ; outsb 2371 00008872 6F <1> db 06Fh ; outsw/outsd 2372 00008873 E4 <1> db 0E4h ; in al, imm8 2373 00008874 E5 <1> db 0E5h ; in (e)ax, imm8 2374 00008875 EC <1> db 0ECh ; in al, dx 2375 00008876 ED <1> db 0EDh ; in (e)ax, dx 2376 00008877 6C <1> db 06Ch ; insb 2377 00008878 6D <1> db 06Dh ; insw/insd 2378 00008879 F4 <1> db 0F4h ; hlt 2379 0000887A FB <1> db 0FBh ; sti 2380 <1> .length: equ $ - . 2381 <1> 2382 <1> 2383 <1> usesection lDEBUG_CODE 2384 <1> 2385 <1> disasm: 2386 000047AD C606[D987]00 <1> mov byte [disrepeatcount], 0 ; number of repeated disassembly lines 2387 <1> 2388 <1> %if _MEMREF_AMOUNT 2389 000047B2 B90400 <1> mov cx, _MEMREF_AMOUNT 2390 000047B5 BF[7087] <1> mov di, memrefs 2391 <1> @@: 2392 000047B8 E8190D <1> call init_one_memref 2393 000047BB E2FB <1> loop @B 2394 000047BD AB <1> stosw ; memrefs.free 2395 <1> %endif 2396 <1> 2397 <1> .preserve_disrepeatcount: 2398 <1> %if _COND 2399 000047BE 8326[DC87]00 <1> and word [condmsg], 0 ; initialize conditions message 2400 <1> %endif 2401 <1> .preserve_condmsg_and_disrepeatcount: 2402 000047C3 8926[D487] <1> mov word [savesp2], sp 2403 000047C7 66 <1> _386_PM_o32 ; xor eax, eax 2404 000047C8 31C0 <1> xor ax, ax 2405 000047CA 66 <1> _386_PM_o32 ; mov dword [dis_n], eax 2406 000047CB A3[B887] <1> mov word [dis_n], ax 2407 000047CE A2[C087] <1> mov byte [disp8], al 2408 000047D1 A3[BC87] <1> mov word [preflags], ax ; clear preflags and preused 2409 000047D4 C606[CF87]03 <1> mov byte [segmnt], 3 ; initially use DS segment 2410 000047D9 C606[CE87]80 <1> mov byte [rmsize], 80h ; don't display any memory 2411 000047DE A3[A281] <1> mov word [dismach], ax ; no special machine needed, so far 2412 000047E1 8B1E[220B] <1> mov bx, word [u_addr + saSegSel] 2413 <1> %if _PM 2414 000047E5 A2[DB88] <1> mov byte [bCSAttr], al 2415 000047E8 E84B15 <1> call test_d_b_bit 2416 000047EB 7405 <1> jz .16 2417 000047ED C606[DB88]40 <1> mov byte [bCSAttr], 40h 2418 <1> .16: 2419 <1> %endif 2420 <1> 2421 000047F2 E86111 <1> call disgetbyte ; get a byte of the instruction 2422 000047F5 3C9B <1> cmp al, 9Bh ; wait instruction (must be the first prefix) 2423 000047F7 7508 <1> jne da2 ; if not --> 2424 <1> 2425 <1> ; The wait instruction is actually a separate instruction as far as 2426 <1> ; the x86 is concerned, but we treat it as a prefix since there are 2427 <1> ; some mnemonics that incorporate it. But it has to be treated specially 2428 <1> ; since you can't do, e.g., seg cs wait ... but must do wait seg cs ... 2429 <1> ; instead. We'll catch it later if the wait instruction is not going to 2430 <1> ; be part of a shared mnemonic. 2431 <1> 2432 000047F9 800E[BC87]40 <1> or byte [preflags], PREWAIT 2433 <1> 2434 <1> ; If we've found a prefix, we return here for the actual instruction 2435 <1> ; (or another prefix). 2436 <1> 2437 <1> da1: 2438 000047FE E85511 <1> call disgetbyte 2439 <1> da2: 2440 00004801 A2[BF87] <1> mov [instru],al ; save away the instruction 2441 00004804 B400 <1> mov ah,0 2442 <1> 2443 <1> ; Now we have the sequence number of the instruction in AX. Look it up. 2444 <1> 2445 <1> da3: 2446 00004806 89C3 <1> mov bx,ax 2447 00004808 A3[C287] <1> mov [index],ax ; save the compressed index 2448 0000480B 3DE001 <1> cmp ax,SPARSE_BASE 2449 0000480E 720A <1> jb da4 ; if it's not from the squeezed part of the table 2450 00004810 8A9F[4812] <1> mov bl,[sqztab+bx-SPARSE_BASE] 2451 00004814 B700 <1> mov bh,0 2452 00004816 81C3E001 <1> add bx,SPARSE_BASE ; bx = compressed index 2453 <1> 2454 <1> da4: 2455 0000481A 8A8F[500C] <1> mov cl, [optypes+bx]; cx = opcode type 2456 0000481E B500 <1> mov ch, 0 2457 00004820 D1E3 <1> shl bx, 1 2458 00004822 8B9F[EE0E] <1> mov bx, [opinfo+bx] ; bx = other info (usually the mnemonic) 2459 00004826 89CE <1> mov si, cx 2460 00004828 89D8 <1> mov ax, bx 2461 0000482A B10C <1> mov cl, 12 2462 0000482C D3E8 <1> shr ax, cl 2463 0000482E 3A06[A281] <1> cmp al, [dismach] 2464 00004832 7203 <1> jb da5 ; if a higher machine is already required 2465 00004834 A2[A281] <1> mov [dismach], al ; set machine type 2466 <1> da5: 2467 00004837 80E70F <1> and bh, 0Fh ; remove the machine field 2468 0000483A 83FE0C <1> cmp si, OPTYPES_BASE 2469 0000483D 7360 <1> jae da13_unp ; if this is an actual instruction 2470 0000483F F7C60100 <1> test si, 1 ; check whether valid displacement 2471 00004843 7403E9F500 <1> jnz da_internal_error ; if not --> 2472 00004848 FF94[DE87] <1> call [disjmp+si] ; otherwise, do more specific processing 2473 0000484C EBB8 <1> jmp s da3 ; back for more 2474 <1> 2475 <1> ; Two-byte instruction. 2476 <1> 2477 <1> da_twobyte: 2478 0000484E E80511 <1> call disgetbyte 2479 00004851 A2[BF87] <1> mov [instru],al 2480 00004854 B400 <1> mov ah,0 2481 00004856 05E001 <1> add ax,SPARSE_BASE 2482 00004859 C3 <1> ret 2483 <1> 2484 <1> ; Instruction group. 2485 <1> 2486 <1> da_insgrp: 2487 0000485A E87B0F <1> call getregmem_r ; get the middle 3 bits of the R/M byte 2488 0000485D 98 <1> cbw 2489 0000485E 01D8 <1> add ax,bx ; offset 2490 00004860 C3 <1> ret 2491 <1> 2492 <1> ; Coprocessor instruction. 2493 <1> 2494 <1> da_fpuins: 2495 00004861 800E[D687]10 <1> or byte [disflags],DIS_I_SHOWSIZ 2496 00004866 800E[A381]01 <1> or byte [dmflags],DM_COPR 2497 0000486B E8740F <1> call getregmem 2498 0000486E 3CC0 <1> cmp al,0c0h 2499 00004870 72E8 <1> jb da_insgrp ;range 00-bfh is same as an instruction group 2500 00004872 B103 <1> mov cl,3 2501 00004874 D2E8 <1> shr al,cl ;C0h --> 18h 2502 00004876 2C10 <1> sub al,18h-8 ;18h --> 8 2503 00004878 98 <1> cbw 2504 00004879 01D8 <1> add ax,bx ;offset 2505 0000487B C3 <1> ret 2506 <1> 2507 <1> ; Coprocessor instruction group. 2508 <1> 2509 <1> da_fpugrp: 2510 0000487C A0[9C81] <1> mov al,[regmem] 2511 0000487F 2407 <1> and al,7 2512 00004881 98 <1> cbw 2513 00004882 01D8 <1> add ax,bx 2514 00004884 C3 <1> ret 2515 <1> 2516 <1> ; Instruction prefix. At this point, bl = prefix bits; bh = segment 2517 <1> 2518 <1> da_insprf: 2519 00004885 841E[BC87] <1> test bl,[preflags] 2520 00004889 7511 <1> jnz da12 ; if there are duplicates 2521 0000488B 081E[BC87] <1> or [preflags],bl 2522 0000488F F6C301 <1> test bl,PRESEG 2523 00004892 7404 <1> jz da11 ; if not a segment 2524 00004894 883E[CF87] <1> mov [segmnt],bh ; save the segment 2525 <1> da11: 2526 00004898 58 <1> pop ax ; discard return address 2527 00004899 E962FF <1> jmp da1 2528 <1> 2529 <1> da12: 2530 0000489C E9CF0E <1> jmp disbad ; we don't allow duplicate prefixes 2531 <1> 2532 <1> ; si = index into table opindex, + OPTYPES_BASE 2533 <1> da13_unp: 2534 0000489F 83EE0C <1> sub si, OPTYPES_BASE ; = offset into opindex 2535 000048A2 31C0 <1> xor ax, ax 2536 000048A4 8A84[2C16] <1> mov al, [si + opindex] ; ax = adjustment (from opindex) 2537 000048A8 01F6 <1> add si, si ; take offset twice 2538 000048AA 4E <1> dec si ; subtract one 2539 000048AB 01C6 <1> add si, ax ; add in the adjustment 2540 <1> 2541 <1> ; OK. Here we go. This is an actual instruction. 2542 <1> ; bx = offset of mnemonic in mnlist 2543 <1> ; si = offset of operand list in oplists 2544 <1> ; First print the op mnemonic. 2545 <1> 2546 <1> da13: 2547 <1> %if _PM 2548 000048AD A0[BC87] <1> mov al, byte [preflags] 2549 000048B0 2430 <1> and al, PREOSIZE | PREASIZE ; get OSIZE,ASIZE status (= O32,A32 in 16-bit cs) 2550 000048B2 F606[DB88]40 <1> _386 test byte [bCSAttr], 40h ; in a 32-bit segment? 2551 000048B7 7402 <1> _386 jz .16 ; no --> 2552 000048B9 3430 <1> _386 xor al, PRE32D | PRE32A ; OSIZE,ASIZE present means O16,A16 2553 <1> .16: 2554 000048BB A2[BE87] <1> mov byte [presizeflags], al ; set O32,A32 status 2555 <1> %endif 2556 000048BE 56 <1> push si 2557 000048BF 8DB7[9A01] <1> lea si,[mnlist+bx] ; offset of mnemonic 2558 000048C3 81FE[F101] <1> cmp si,mnlist+MN_BSWAP 2559 000048C7 7505 <1> jne da13a ; if not BSWAP 2560 000048C9 E82010 <1> call dischk32d 2561 000048CC 74CE <1> jz da12 ; if no operand-size prefix --> 2562 <1> da13a: 2563 000048CE E8590F <1> call showop ; print out the op code (at line_out+28) 2564 000048D1 8326[DA87]00 <1> and word [sizeloc], 0 ; clear out this flag 2565 000048D6 5E <1> pop si ; recover list of operands (offset in oplists) 2566 000048D7 81C6[0000] <1> add si, oplists ; -> actual oplist entry 2567 <1> 2568 <1> da14_check_end: 2569 000048DB 803C00 <1> cmp byte [si], OP_END 2570 000048DE 7503E98400 <1> je da_op_end_e ; if we're done --> 2571 <1> 2572 <1> ; Loop over operands. si-> next operand type. 2573 <1> ; Fortunately the operands appear in the instruction in the same 2574 <1> ; order as they appear in the disassembly output. 2575 <1> 2576 <1> da14: 2577 000048E3 C606[D887]00 <1> mov byte [disflags2], 0 ; clear out size-related flags 2578 000048E8 AC <1> lodsb ; get the operand type 2579 000048E9 3C40 <1> cmp al,OP_SIZE 2580 000048EB 7259 <1> jb da18 ; if it's not size dependent 2581 000048ED C606[D887]20 <1> mov byte [disflags2],DIS_I_KNOWSIZ ;indicate variable size 2582 000048F2 3CA0 <1> cmp al,OP_1632_DEFAULT 2583 000048F4 7313 <1> jae da15_default 2584 000048F6 3C60 <1> cmp al,OP_8 2585 000048F8 7329 <1> jae da16 ; if the size is fixed (8, 16, 32, 64) 2586 000048FA 3C50 <1> cmp al,OP_1632 2587 000048FC 7317 <1> jae da15 ; if word or dword 2588 <1> ; OP_ALL here. This has a width of 2. 2589 <1> ; If the low bit is clear, this means 2590 <1> ; 8 bit, else 16/32 bits. 2591 000048FE B4FF <1> mov ah,-1 2592 00004900 F606[BF87]01 <1> test byte [instru],1 2593 00004905 7424 <1> jz da17 ; if byte --> 2594 00004907 EB0C <1> jmp da15 2595 <1> da15_default: 2596 00004909 F606[BC87]10 <1> test byte [preflags], PREOSIZE 2597 0000490E 7505 <1> jnz da15 2598 00004910 800E[D787]01 <1> setopt [disflags], DIS_I_NOSIZ 2599 <1> da15: 2600 00004915 800E[BD87]10 <1> or byte [preused],PRE32D; mark this flag as used 2601 0000491A 8A26[BE87] <1> mov ah,[presizeflags] 2602 0000491E 80E410 <1> and ah,PRE32D ;this will be 10h for dword, 00h for word 2603 00004921 EB08 <1> jmp s da17 ;done 2604 <1> 2605 <1> da16: 2606 00004923 88C4 <1> mov ah,al ;OP_8, OP_16, OP_32 or OP_64 (we know which) 2607 00004925 80E4F0 <1> and ah,0f0h ;this converts ah to <0 for byte, =0 for word, 2608 00004928 80EC70 <1> sub ah,OP_16 ;and >0 for dword (byte=F0h, word=00h, dword=10h, qword=20h) 2609 <1> 2610 <1> ; Now we know the size (in ah); branch off to do the operand itself. 2611 <1> 2612 <1> da17: 2613 0000492B 88C3 <1> mov bl, al 2614 0000492D 83E30F <1> and bx, 0Fh ; 8 entries (IMM, RM, M, R_MOD, M_OFFS, R, R_ADD, AX) 2615 00004930 D1E3 <1> shl bx, 1 2616 00004932 83FB10 <1> cmp bx, disjmp2.end - disjmp2 2617 00004935 7306 <1> jae @F 2618 00004937 FF97[0487] <1> call [disjmp2 + bx] ; print out the operand 2619 0000493B EB27 <1> jmp short da20 ; done with operand 2620 <1> 2621 <1> @@: 2622 <1> da_internal_error: 2623 0000493D BA[9970] <1> mov dx, msg.uu_internal_error 2624 00004940 E86174 <1> call putsz 2625 00004943 E9BAB6 <1> jmp cmd3 2626 <1> 2627 <1> 2628 <1> ; Sizeless operands. 2629 <1> 2630 <1> da18: 2631 00004946 98 <1> cbw 2632 00004947 93 <1> xchg ax, bx ; bx = index 2633 00004948 D1E3 <1> shl bx, 1 2634 0000494A 8B87[1487] <1> mov ax, [optab + bx] 2635 0000494E 83FB46 <1> cmp bx, OP_FIRST_STRING << 1 2636 00004951 720F <1> jb da19 ; if it's not a string 2637 00004953 83FB5C <1> cmp bx, OP_AFTER_LAST << 1 2638 00004956 73E5 <1> jae @B 2639 00004958 E8260F <1> call dis_stosw_lowercase 2640 0000495B 84E4 <1> test ah, ah 2641 0000495D 7505 <1> jnz da20 ; if it's two characters 2642 0000495F 4F <1> dec di 2643 00004960 EB02 <1> jmp s da20 ; done with operand 2644 <1> 2645 <1> da19: 2646 00004962 FFD0 <1> call ax ; otherwise, do something else 2647 <1> 2648 <1> ; Operand done, check if there's another one. 2649 <1> da20: 2650 00004964 803C00 <1> cmp byte [si], OP_END 2651 <1> da_op_end_e: 2652 00004967 7410 <1> je da_op_end ; if we're done --> 2653 00004969 B02C <1> mov al,',' 2654 0000496B AA <1> stosb 2655 0000496C F606[AC00]02 <1> testopt [asm_options], disasm_commablank 2656 00004971 7403 <1> jz .nospace 2657 00004973 B020 <1> mov al, 32 2658 00004975 AA <1> stosb 2659 <1> .nospace: 2660 00004976 E96AFF <1> jmp da14 ;another operand 2661 <1> 2662 <1> 2663 <1> ; All operands done. Now handle prefixes: 2664 <1> ; OPSIZE (66h), ADDRSIZE (67h), WAIT, segment, REP, LOCK 2665 <1> da_op_end: 2666 <1> 2667 <1> ; Now check whether O32 or A32 modifies the opcode. 2668 <1> da_modify_opcode_osize_asize: 2669 00004979 B90200 <1> mov cx, N_LTABO 2670 0000497C BB[C415] <1> mov bx, ltabo1 2671 0000497F BA0200 <1> mov dx, 2*N_LTABO-2 2672 00004982 B410 <1> mov ah, PRE32D 2673 00004984 E87D00 <1> call da23_osize_asize 2674 <1> 2675 00004987 B90100 <1> mov cx, N_LTABA 2676 0000498A BB[CC15] <1> mov bx, ltaba1 2677 0000498D BA0000 <1> mov dx, 2*N_LTABA-2 2678 00004990 B420 <1> mov ah, PRE32A 2679 00004992 E86F00 <1> call da23_osize_asize 2680 <1> 2681 <1> ; Now check and loop for unused prefixes. 2682 <1> da21: 2683 00004995 A0[BD87] <1> mov al, [preused] ; = flags that are used 2684 00004998 F6D0 <1> not al ; = flags that are not used 2685 0000499A 2206[BC87] <1> and al, [preflags] ; = flags that are not used but present 2686 0000499E 7503E92B01 <1> jz da28 ; if all present flags were used --> 2687 <1> 2688 000049A3 B90B00 <1> mov cx, N_WTAB 2689 000049A6 BB[9815] <1> mov bx, wtab1 2690 000049A9 BA1400 <1> mov dx, 2*N_WTAB-2 2691 000049AC B440 <1> mov ah, PREWAIT 2692 000049AE 84E0 <1> test al, ah 2693 000049B0 7407 <1> jz @F 2694 <1> ; if there's a WAIT prefix hanging 2695 000049B2 E84B00 <1> call da23_wait 2696 000049B5 7572 <1> jne disbad2 2697 000049B7 EBDC <1> jmp da21 2698 <1> 2699 <1> @@: 2700 000049B9 B420 <1> mov ah, PREASIZE 2701 000049BB 84E0 <1> test al, ah 2702 000049BD 746D <1> jz da24 ; if it isn't a 67h prefix --> 2703 <1> 2704 <1> ; check whether ASIZE applies to an implicit operand 2705 000049BF 57 <1> push di 2706 000049C0 50 <1> push ax 2707 000049C1 A1[C287] <1> mov ax, [index] 2708 000049C4 84E4 <1> test ah, ah 2709 000049C6 750D <1> jnz .nota32prfx_nz ; opcode index > FF, not in this list --> 2710 000049C8 BF[2A11] <1> mov di, a32prfxtab 2711 000049CB AE <1> scasb ; xlatb ? 2712 000049CC 7407 <1> je @F ; yes --> (ZR) 2713 000049CE 24FE <1> and al, ~1 ; clear the low bit (MOVSW -> MOVSB) 2714 000049D0 B90700 <1> mov cx, A32P_LEN - 1 2715 000049D3 F2AE <1> repne scasb ; scan table (low bit cleared) 2716 <1> @@: 2717 <1> .nota32prfx_nz: 2718 000049D5 58 <1> pop ax 2719 000049D6 5F <1> pop di 2720 000049D7 7550 <1> jne .nota32prfx ; not in the list --> 2721 <1> 2722 000049D9 0826[BD87] <1> or [preused], ah ; mark it as used 2723 000049DD B104 <1> mov cl, 4 ; (ch = 0 because A32P_LEN < 256) 2724 000049DF E8C60F <1> call moveover ; make space for "A32 " 2725 000049E2 B84133 <1> mov ax, "A3" 2726 000049E5 E8170E <1> call dis_lowercase ; al = "a" if lowercase option specified 2727 000049E8 A3[2A08] <1> mov word [line_out+MNEMONOFS], ax 2728 000049EB C706[2C08]3220 <1> mov word [line_out+MNEMONOFS+2], "2 " 2729 000049F1 F606[BE87]20 <1> _386_PM test byte [presizeflags], PRE32A 2730 <1> _386_PM ; do we have 32-bit ASIZE ? 2731 000049F6 7506 <1> _386_PM jnz da21_j0 ; yes, keep a32 (in 16-bit cs) --> 2732 000049F8 C706[2B08]3136 <1> _386_PM mov word [line_out + MNEMONOFS + 1], "16" 2733 <1> ; no, make it a16 (in 32-bit cs) 2734 <1> da21_j0: equ $ 2735 000049FE EB95 <1> jmp s da21 2736 <1> 2737 <1> .nota32prfx: equ disbad2 2738 <1> 2739 <1> 2740 <1> da23_osize_asize: equ da23 2741 <1> 2742 <1> da23_wait: 2743 <1> %if _PM 2744 00004A00 0826[BE87] <1> or byte [presizeflags], ah 2745 <1> ; Fake that this flag is set for da23's check. 2746 <1> ; If not _PM then presizeflags == preflags and 2747 <1> ; PREWAIT is already set in that variable. 2748 <1> %endif 2749 <1> 2750 <1> ; INP: bx -> array of words to match against word [index] 2751 <1> ; cx = number of array entries 2752 <1> ; ah = preused flag to mark as used if match 2753 <1> ; ah = presizeflags flag to check if in use 2754 <1> ; dx = offset to add to di -> behind matched word 2755 <1> ; OUT: ZR if one of the array entries matched, 2756 <1> ; byte [preused] |= INP:ah 2757 <1> ; if also flag in byte [presizeflags] was set, 2758 <1> ; mnemonic replaced 2759 <1> ; NZ if no entry matched 2760 <1> ; CHG: ax, cx, si 2761 <1> ; 2762 <1> ; Note: If this is called with a 32-bit CS then the 2763 <1> ; OSIZE/ASIZE value in the byte [preflags] is 2764 <1> ; inverted to that in the byte [presizeflags]. 2765 <1> ; As we check the latter, for O16/A16 we will 2766 <1> ; not modify the mnemonics (keeping the 16-bit 2767 <1> ; default mnemonics) but will mark the prefix 2768 <1> ; as used by setting the flag in byte [preused]. 2769 <1> ; If there is no OSIZE/ASIZE in 32-bit CS then 2770 <1> ; the preused flag is also set (which does no 2771 <1> ; harm) and the 32-bit mnemonic is selected. 2772 <1> ; Operation in 16-bit CS has the same result as 2773 <1> ; the prior handling, though it will always 2774 <1> ; scan for the affected opcodes, and set the 2775 <1> ; preused flag even if no prefix is used. 2776 <1> da23: 2777 00004A04 57 <1> push di 2778 00004A05 89DF <1> mov di, bx 2779 00004A07 50 <1> push ax 2780 00004A08 A1[C287] <1> mov ax, [index] 2781 00004A0B F2AF <1> repne scasw 2782 00004A0D 58 <1> pop ax 2783 00004A0E 7517 <1> jne .ret ; if not found in the list --> (NZ) 2784 00004A10 0826[BD87] <1> or byte [preused], ah ; mark this (OSIZE, ASIZE or WAIT) prefix as used 2785 00004A14 8426[BE87] <1> test byte [presizeflags], ah 2786 <1> ; is it O32, A32, or is WAIT present ? 2787 00004A18 740D <1> jz .ret ; no, do not modify mnemonic --> 2788 00004A1A 01D7 <1> add di, dx ; replace the mnemonic with the modified name 2789 00004A1C 8B35 <1> mov si, [di] 2790 00004A1E 81C6[9A01] <1> add si, mnlist 2791 00004A22 E8050E <1> call showop ; copy instruction mnemonic 2792 00004A25 38C0 <1> cmp al, al ; ZR 2793 <1> .ret: 2794 00004A27 5F <1> pop di 2795 00004A28 C3 <1> retn 2796 <1> 2797 <1> 2798 <1> da21_j1: equ da21_j0 2799 <1> 2800 <1> disbad2: 2801 00004A29 E9420D <1> jmp disbad 2802 <1> 2803 <1> da24: 2804 00004A2C A801 <1> test al, PRESEG 2805 00004A2E 7434 <1> jz da25 ; if not because of a segment prefix --> 2806 00004A30 A1[C287] <1> mov ax, [index] 2807 00004A33 84E4 <1> test ah, ah 2808 00004A35 75F2 <1> jnz disbad2 ; if index > 256, it's none of these --> 2809 00004A37 57 <1> push di 2810 00004A38 B90900 <1> mov cx, SEGP_LEN 2811 00004A3B BF[2211] <1> mov di, segprfxtab 2812 00004A3E F2AE <1> repne scasb 2813 00004A40 5F <1> pop di 2814 00004A41 75E6 <1> jne disbad2 ; if it's not on the list --> 2815 00004A43 B90300 <1> mov cx, 3 2816 00004A46 E85F0F <1> call moveover 2817 00004A49 57 <1> push di 2818 00004A4A BF[2A08] <1> mov di, line_out+MNEMONOFS 2819 00004A4D E82E0E <1> call showseg ; show segment register 2820 00004A50 B03A <1> mov al, ':' 2821 00004A52 F606[AC00]04 <1> testopt [asm_options], disasm_nasm 2822 00004A57 7402 <1> jz .notnasm 2823 00004A59 B020 <1> mov al, 32 2824 <1> .notnasm: 2825 00004A5B AA <1> stosb 2826 00004A5C 5F <1> pop di 2827 00004A5D 800E[BD87]01 <1> or byte [preused], PRESEG ; mark it as used 2828 <1> da21_j2: 2829 00004A62 EB9A <1> jmp s da21_j1 2830 <1> 2831 <1> da25: 2832 00004A64 A802 <1> test al, PREREP 2833 00004A66 7435 <1> jz da26 ; if not a REP prefix 2834 00004A68 2406 <1> and al, PREREP|PREREPZ 2835 00004A6A 0806[BD87] <1> or [preused], al 2836 00004A6E A1[C287] <1> mov ax, [index] 2837 00004A71 84E4 <1> test ah, ah 2838 00004A73 7525 <1> jnz disbad3 ; if not in the first 256 bytes 2839 00004A75 24FE <1> and al, ~1 ; clear the low bit (MOVSW -> MOVSB) 2840 00004A77 57 <1> push di 2841 00004A78 BF[2B11] <1> mov di, replist 2842 00004A7B B90500 <1> mov cx, REP_SAME_LEN; scan those for REP first 2843 00004A7E F2AE <1> repne scasb 2844 00004A80 BE[B709] <1> mov si, mnlist+MN_REP 2845 00004A83 7439 <1> je da27 ; if one of the REP instructions --> 2846 00004A85 B102 <1> mov cl, REP_DIFF_LEN; (ch = 0) 2847 00004A87 F2AE <1> repne scasb 2848 00004A89 750F <1> jne disbad3 ; if not one of the REPE/REPNE instructions 2849 00004A8B BE[C909] <1> mov si, mnlist+MN_REPE 2850 00004A8E F606[BD87]04 <1> test byte [preused], PREREPZ 2851 00004A93 7529 <1> jnz da27 ; if REPE 2852 00004A95 BE[CF09] <1> mov si, mnlist+MN_REPNE 2853 00004A98 EB24 <1> jmp s da27 ; it's REPNE 2854 <1> 2855 <1> disbad3: 2856 00004A9A E9D10C <1> jmp disbad 2857 <1> 2858 <1> da26: 2859 00004A9D A808 <1> test al, PRELOCK 2860 00004A9F 74F9 <1> jz disbad3 ; if not a lock prefix, either --> 2861 00004AA1 57 <1> push di 2862 00004AA2 A1[C287] <1> mov ax, [index] 2863 00004AA5 BF[D015] <1> mov di, locktab 2864 00004AA8 B92E00 <1> mov cx, N_LOCK 2865 00004AAB F2AF <1> repne scasw 2866 00004AAD 75EB <1> jne disbad3 ; if not in the approved list --> 2867 00004AAF F606[BD87]01 <1> test byte [preused], PRESEG 2868 00004AB4 74E4 <1> jz disbad3 ; if memory was not accessed --> 2869 00004AB6 BE[9307] <1> mov si, mnlist+MN_LOCK 2870 00004AB9 800E[BD87]08 <1> or byte [preused], PRELOCK 2871 <1> 2872 <1> ; Slip in another mnemonic (REP or LOCK). 2873 <1> ; SI = offset of mnemonic, what should be 2874 <1> ; DI is on the stack. 2875 <1> 2876 <1> da27: 2877 00004ABE 5F <1> pop di 2878 00004ABF B90800 <1> mov cx, 8 2879 00004AC2 56 <1> push si 2880 00004AC3 E8E20E <1> call moveover 2881 00004AC6 5E <1> pop si 2882 00004AC7 57 <1> push di 2883 00004AC8 E85F0D <1> call showop 2884 00004ACB 5F <1> pop di 2885 00004ACC EB94 <1> jmp s da21_j2 2886 <1> 2887 <1> ; Done with instruction. Erase the size indicator, if appropriate. 2888 <1> 2889 <1> da28: 2890 00004ACE 8B0E[DA87] <1> mov cx, [sizeloc] 2891 00004AD2 E324 <1> jcxz da28b ;if there was no size given 2892 00004AD4 A0[D687] <1> mov al,[disflags] 2893 00004AD7 A810 <1> test al,DIS_I_SHOWSIZ 2894 00004AD9 751D <1> jnz da28b ;if we need to show the size 2895 00004ADB A820 <1> test al,DIS_I_KNOWSIZ 2896 00004ADD 7419 <1> jz da28b ;if the size is not known already 2897 00004ADF 87CF <1> xchg cx,di 2898 00004AE1 89FE <1> mov si,di ;save old di 2899 00004AE3 B020 <1> mov al, 32 2900 <1> da28a: 2901 00004AE5 AE <1> scasb ;skip size name 2902 00004AE6 75FD <1> jne da28a ;if not done yet 2903 <1> ;(The above is the same as repne scasb, but 2904 <1> ;has no effect on cx.) 2905 00004AE8 F606[AC00]04 <1> testopt [asm_options], disasm_nasm 2906 00004AED 7503 <1> jnz .nasm 2907 00004AEF 83C704 <1> add di, byte 4 ;skip 'PTR ' 2908 <1> .nasm: 2909 00004AF2 87F7 <1> xchg si,di 2910 00004AF4 29F1 <1> sub cx,si 2911 00004AF6 F3A4 <1> rep movsb ;move the line 2912 <1> 2913 <1> ; Now we're really done. Print out the bytes on the left. 2914 <1> 2915 <1> da28b: 2916 00004AF8 57 <1> push di ;print start of disassembly line 2917 00004AF9 BF[0E08] <1> mov di,line_out 2918 00004AFC A1[220B] <1> mov ax,[u_addr + saSegSel] 2919 <1> ; print address 2920 00004AFF E8EC6E <1> call hexword 2921 00004B02 B03A <1> mov al,':' 2922 00004B04 AA <1> stosb 2923 00004B05 66 <1> _386_PM_o32 ; mov eax, dword [u_addr] 2924 00004B06 A1[1E0B] <1> mov ax, word [u_addr] 2925 <1> %if _PM 2926 00004B09 F606[DB88]40 <1> test byte [bCSAttr], 40h 2927 00004B0E 7403 <1> jz .16 2928 00004B10 E8CF6E <1> call hexword_high 2929 <1> .16: 2930 <1> %endif 2931 00004B13 E8D86E <1> call hexword 2932 00004B16 B020 <1> mov al, 32 2933 00004B18 AA <1> stosb 2934 00004B19 8B1E[B887] <1> mov bx, [dis_n] 2935 <1> da28c: 2936 00004B1D BE[2908] <1> mov si,line_out+MNEMONOFS - 1 2937 00004B20 29FE <1> sub si, di 2938 00004B22 D1EE <1> shr si, 1 2939 00004B24 39F3 <1> cmp bx, si 2940 00004B26 7619 <1> jbe da29 ; if it's a short instruction which fits in one line 2941 00004B28 29F3 <1> sub bx, si 2942 00004B2A 53 <1> push bx 2943 00004B2B 89F3 <1> mov bx, si 2944 00004B2D 57 <1> push di 2945 00004B2E E85E0E <1> call disshowbytes 2946 00004B31 E8F26E <1> call putsline_crlf 2947 00004B34 59 <1> pop cx 2948 00004B35 5B <1> pop bx 2949 00004B36 BF[0E08] <1> mov di, line_out 2950 00004B39 29F9 <1> sub cx, di 2951 00004B3B B020 <1> mov al, 32 2952 00004B3D F3AA <1> rep stosb 2953 00004B3F EBDC <1> jmp short da28c 2954 <1> da29: 2955 00004B41 E84B0E <1> call disshowbytes 2956 <1> da30: 2957 00004B44 B020 <1> mov al, 32 ; pad to op code 2958 00004B46 B9[2A08] <1> mov cx,line_out+MNEMONOFS 2959 00004B49 29F9 <1> sub cx,di 2960 00004B4B 7202 <1> jc da30_1 2961 00004B4D F3AA <1> rep stosb 2962 <1> da30_1: 2963 00004B4F 5F <1> pop di 2964 00004B50 F606[D687]08 <1> test byte [disflags],DIS_I_UNUSED 2965 00004B55 740D <1> jz da32 ; if we don't print ` (unused)' 2966 00004B57 BE[2B7A] <1> mov si,unused 2967 00004B5A 807DFF20 <1> cmp byte [di-1], 32 2968 00004B5E 7501 <1> jne da31 ; if there's already a space here 2969 00004B60 46 <1> inc si 2970 <1> da31: 2971 00004B61 E8EB6D <1> call showstring 2972 <1> 2973 <1> ; Print info on minimal processor needed. 2974 <1> 2975 <1> da32: 2976 00004B64 A0[A281] <1> mov al, [dismach] 2977 00004B67 3A06[E60B] <1> cmp al, [maxmachinetype] 2978 00004B6B 7603 <1> jbe @F 2979 00004B6D A2[E60B] <1> mov [maxmachinetype], al 2980 <1> @@: 2981 00004B70 57 <1> push di 2982 00004B71 BF[C487] <1> mov di, obsinst 2983 00004B74 8B0E[C287] <1> mov cx, word [index] 2984 00004B78 E87C0D <1> call showmach ;show the machine type, if needed 2985 00004B7B 5F <1> pop di 2986 00004B7C E30F <1> jcxz da32f_j1 ; if no message --> 2987 <1> 2988 <1> ; Print a message on the far right. 2989 <1> 2990 <1> da32_tabto: 2991 00004B7E B8[5D08] <1> mov ax, line_out+79 2992 00004B81 29C8 <1> sub ax, cx 2993 00004B83 51 <1> push cx 2994 00004B84 E8846E <1> call tab_to ; tab out to the location 2995 00004B87 59 <1> pop cx 2996 00004B88 F3A4 <1> rep movsb ; copy the string 2997 <1> da32z_j1: 2998 00004B8A E97302 <1> jmp da32z ; done 2999 <1> 3000 <1> da32f_j1: 3001 00004B8D EB73 <1> jmp da32f 3002 <1> 3003 <1> %if _COND 3004 <1> ; Try dumping a condition status. 3005 <1> da32_cond: 3006 <1> %if _COND_RDUMP_ONLY 3007 00004B8F A802 <1> test al, DIS_F_SHOW ; (! DIS_F_SHOW|DIS_I_SHOW is negated here) 3008 00004B91 75F7 <1> jnz da32z_j1 ; not showing conditionals message --> 3009 <1> %endif 3010 00004B93 8B36[DC87] <1> mov si, word [condmsg] 3011 00004B97 85F6 <1> test si, si ; stored a message here ? 3012 00004B99 74EF <1> jz da32z_j1 ; no --> 3013 00004B9B 57 <1> push di 3014 00004B9C 89F7 <1> mov di, si 3015 00004B9E B9FFFF <1> mov cx, -1 3016 00004BA1 31C0 <1> xor ax, ax 3017 00004BA3 F2AE <1> repne scasb 3018 00004BA5 F7D9 <1> neg cx 3019 00004BA7 49 <1> dec cx 3020 00004BA8 49 <1> dec cx ; get string length 3021 00004BA9 5F <1> pop di 3022 00004BAA EBD2 <1> jmp short da32_tabto 3023 <1> %else 3024 <1> da32_cond: equ da32z_j1 3025 <1> %endif 3026 <1> 3027 <1> da32_xlatb: 3028 00004BAC A802 <1> test al, DIS_F_SHOW ; (! DIS_F_SHOW|DIS_I_SHOW is negated here) 3029 00004BAE 75DF <1> jnz da32_cond 3030 00004BB0 803E[CF87]03 <1> _no386 cmp byte [segmnt], 3 3031 00004BB5 77D8 <1> _no386 ja da32_cond ; if FS or GS on non-386 --> (invalid) 3032 00004BB7 F606[BE87]20 <1> _no386 test byte [presizeflags], PRE32A 3033 00004BBC 75D1 <1> _no386 jnz da32_cond 3034 00004BBE 803E[CF87]05 <1> cmp byte [segmnt], 5 3035 00004BC3 77CA <1> ja da32_cond ; if invalid segment --> 3036 00004BC5 813E[C287]D700 <1> cmp word [index], 0D7h ; xlatb ? 3037 00004BCB 75C2 <1> jne da32_cond 3038 00004BCD A1[680C] <1> mov ax, word [reg_ebx] 3039 00004BD0 A3[D087] <1> mov word [addrr], ax 3040 00004BD3 A1[6A0C] <1> mov ax, word [reg_ebx + 2] 3041 00004BD6 A3[D287] <1> mov word [addrr + 2], ax; get address in (e)bx 3042 00004BD9 A0[640C] <1> mov al, byte [reg_eax] 3043 00004BDC 0006[D087] <1> add byte [addrr], al 3044 00004BE0 8016[D187]00 <1> adc byte [addrr + 1], 0 3045 00004BE5 8316[D287]00 <1> adc word [addrr + 2], 0 ; add al 3046 00004BEA C606[CE87]80 <1> mov byte [rmsize], 80h ; byte size 3047 <1> %if _MEMREF_AMOUNT 3048 00004BEF 800E[D787]10 <1> setopt [disflags], DIS_I_M_SRC 3049 <1> %endif 3050 00004BF4 F606[BE87]20 <1> test byte [presizeflags], PRE32A 3051 00004BF9 7425 <1> jz @F 3052 00004BFB 800E[D787]08 <1> setopt [disflags], DIS_I_SHOW_A32 3053 <1> ; set flag if 32-bit 3054 00004C00 EB1E <1> jmp @F 3055 <1> 3056 <1> 3057 <1> ; Dump referenced memory location. 3058 <1> 3059 <1> da32f: 3060 00004C02 A0[D687] <1> mov al,[disflags] 3061 00004C05 3406 <1> xor al, DIS_F_SHOW | DIS_I_SHOW 3062 00004C07 A886 <1> test al, DIS_F_SHOW | DIS_I_SHOW | DIS_I_DONTSHOW 3063 <1> ; (NZ if either _SHOW is clear, or _DONTSHOW is set) 3064 00004C09 75A1 <1> jnz da32_xlatb ; if there is no memory location to show --> 3065 00004C0B 803E[CF87]03 <1> _no386 cmp byte [segmnt], 3 3066 00004C10 779A <1> _no386 ja da32_xlatb ; if FS or GS on non-386 --> (invalid) 3067 00004C12 F606[D787]08 <1> _no386 testopt [disflags], DIS_I_SHOW_A32 3068 00004C17 7593 <1> _no386 jnz da32_xlatb 3069 00004C19 803E[CF87]05 <1> cmp byte [segmnt], 5 3070 00004C1E 778C <1> ja da32_xlatb ; if invalid segment --> 3071 <1> @@: 3072 <1> %if _PM 3073 00004C20 50 <1> push ax 3074 <1> %endif 3075 00004C21 A0[CF87] <1> mov al, [segmnt] ; segment number 3076 00004C24 98 <1> cbw 3077 00004C25 D1E0 <1> shl ax, 1 3078 00004C27 93 <1> xchg ax, bx ; mov bx, ax 3079 00004C28 8B9F[3888] <1> mov bx, [segrgaddr + bx]; get address of value 3080 <1> %if _PM 3081 00004C2C 58 <1> pop ax 3082 00004C2D E89D45 <1> call ispm 3083 00004C30 7508 <1> jnz @F ; if 86 Mode, all segments readable --> 3084 <1> [cpu 286] 3085 00004C32 0F0027 <1> verr word [bx] 3086 00004C35 7403E955FF <1> jnz da32_cond ; (NOT to da32_xlatb) 3087 <1> __CPU__ 3088 <1> @@: 3089 <1> %endif 3090 00004C3A 53 <1> push bx 3091 <1> %if _MEMREF_AMOUNT 3092 00004C3B FF37 <1> push word [bx] ; = segment/selector value 3093 00004C3D E84508 <1> call get_free_memref ; memrefs + bx -> the memref structure 3094 00004C40 8F87[7887] <1> pop word [memrefs + bx + mrSegmentSelector] 3095 00004C44 808F[7A87]02 <1> or byte [memrefs + bx + mrFlags], mrfMem 3096 00004C49 F606[D787]10 <1> testopt [disflags], DIS_I_M_SRC 3097 00004C4E 7405 <1> jz @F 3098 00004C50 808F[7A87]04 <1> or byte [memrefs + bx + mrFlags], mrfMemSource 3099 <1> @@: 3100 00004C55 F606[D787]20 <1> testopt [disflags], DIS_I_M_DST 3101 00004C5A 7405 <1> jz @F 3102 00004C5C 808F[7A87]08 <1> or byte [memrefs + bx + mrFlags], mrfMemDest 3103 <1> @@: 3104 <1> %endif 3105 <1> 3106 00004C61 B8[5408] <1> mov ax, line_out + 79 - 9 3107 <1> ; 9 is composed of: 3108 <1> ; 1 additional blank (added to the one that is 3109 <1> ; already given by tab_to in any case) 3110 <1> ; 3 segreg name + colon 3111 <1> ; 4 low word offset 3112 <1> ; 1 equals sign 3113 <1> ; 79 means we write to the very right of an 80-columns 3114 <1> ; display, up to the second-to-last column. 3115 00004C64 B90200 <1> mov cx, 2 ; if byte then content uses 2 digits 3116 <1> %if _MEMREF_AMOUNT 3117 00004C67 C687[7C87]01 <1> mov byte [memrefs + bx + mrLength], 1 3118 <1> ; if byte then length = 1 3119 <1> %endif 3120 00004C6C 803E[CE87]00 <1> cmp byte [rmsize],0 3121 00004C71 7C10 <1> jl da32h ; if byte 3122 00004C73 7408 <1> jz da32g ; if word 3123 <1> %if _MEMREF_AMOUNT 3124 00004C75 8087[7C87]02 <1> add byte [memrefs + bx + mrLength], 2 3125 <1> ; add 2 bytes to length for high half of dword 3126 <1> %endif 3127 00004C7A 83C104 <1> add cx, byte 4 ; add 4 digits for high half of dword 3128 <1> da32g: 3129 <1> %if _MEMREF_AMOUNT 3130 00004C7D FE87[7C87] <1> inc byte [memrefs + bx + mrLength] 3131 <1> ; add 1 byte to length for the high byte 3132 <1> %endif 3133 00004C81 41 <1> inc cx 3134 00004C82 41 <1> inc cx ; add 2 digits for the high byte 3135 <1> da32h: 3136 00004C83 F606[D787]04 <1> testopt [disflags], DIS_I_DOUBLE_M 3137 00004C88 740B <1> jz @F 3138 <1> %if _MEMREF_AMOUNT 3139 00004C8A 8A97[7C87] <1> mov dl, byte [memrefs + bx + mrLength] 3140 00004C8E 0097[7C87] <1> add byte [memrefs + bx + mrLength], dl 3141 <1> ; double the amount of bytes 3142 <1> %endif 3143 00004C92 01C9 <1> add cx, cx ; double the amount of digits 3144 00004C94 41 <1> inc cx ; plus one slot for the comma 3145 <1> @@: 3146 00004C95 F606[D787]02 <1> testopt [disflags], DIS_I_FAR_M 3147 00004C9A 7408 <1> jz @F 3148 <1> %if _MEMREF_AMOUNT 3149 00004C9C 8087[7C87]02 <1> add byte [memrefs + bx + mrLength], 2 3150 <1> ; add 2 bytes to the length for the segment 3151 <1> %endif 3152 00004CA1 83C105 <1> add cx, 5 ; 4 digits for segment plus 1 colon 3153 <1> @@: 3154 <1> %if _MEMREF_AMOUNT 3155 00004CA4 FF36[D087] <1> push word [addrr] 3156 00004CA8 8F87[7487] <1> pop word [memrefs + bx + mrOffset] 3157 <1> %endif 3158 00004CAC F606[D787]08 <1> testopt [disflags], DIS_I_SHOW_A32 3159 00004CB1 7410 <1> jz @F 3160 <1> %if _MEMREF_AMOUNT 3161 00004CB3 FF36[D287] <1> push word [addrr + 2] 3162 00004CB7 8F87[7687] <1> pop word [memrefs + bx + mrOffset + 2] 3163 00004CBB 808F[7A87]10 <1> or byte [memrefs + bx + mrFlags], mrfA32 3164 <1> %endif 3165 00004CC0 83C104 <1> add cx, 4 ; add 4 digits for high word offset 3166 <1> @@: 3167 <1> %if _MEMREF_AMOUNT 3168 00004CC3 E8DA07 <1> call calc_linear_memref_and_mark_nonfree 3169 <1> %endif 3170 00004CC6 29C8 <1> sub ax, cx 3171 00004CC8 E8406D <1> call tab_to ; CHG: ax, bx, cx, dx, di 3172 00004CCB B020 <1> mov al, 32 3173 00004CCD AA <1> stosb 3174 00004CCE E8A10B <1> call showseg_uppercase_ax 3175 <1> ; ax = segment register name 3176 00004CD1 E83D0B <1> call dis_lowercase_refmem_w 3177 00004CD4 AB <1> stosw 3178 00004CD5 B03A <1> mov al, ':' 3179 00004CD7 AA <1> stosb 3180 00004CD8 F606[D787]08 <1> testopt [disflags], DIS_I_SHOW_A32 3181 00004CDD 7406 <1> jz @F 3182 00004CDF A1[D287] <1> mov ax, [addrr + 2] 3183 00004CE2 E8096D <1> call hexword ; show high word of offset 3184 <1> @@: 3185 00004CE5 A1[D087] <1> mov ax, [addrr] 3186 00004CE8 E8036D <1> call hexword ; show offset 3187 00004CEB B03D <1> mov al,'=' 3188 00004CED AA <1> stosb 3189 00004CEE 5B <1> pop bx 3190 00004CEF 06 <1> push es 3191 00004CF0 8E07 <1> mov es, [bx] 3192 00004CF2 66 <1> _386_o32 3193 00004CF3 8B1E[D087] <1> mov bx, [addrr] 3194 <1> 3195 00004CF7 F606[D787]02 <1> testopt [disflags], DIS_I_FAR_M 3196 00004CFC 743D <1> jz .no_far_m 3197 00004CFE BE0100 <1> mov si, 1 3198 00004D01 803E[CE87]00 <1> cmp byte [rmsize], 0 3199 00004D06 7C08 <1> jl @F 3200 00004D08 BE0200 <1> mov si, 2 3201 00004D0B 7403 <1> jz @F 3202 00004D0D BE0400 <1> mov si, 4 3203 <1> @@: 3204 00004D10 F606[D787]08 <1> testopt [disflags], DIS_I_SHOW_A32 3205 00004D15 7411 <1> jz @F 3206 <1> [cpu 386] 3207 00004D17 660FB7F6 <1> movzx esi, si 3208 00004D1B 26678A0433 <1> mov al, byte [es:ebx + esi] 3209 00004D20 26678A643301 <1> mov ah, byte [es:ebx + esi + 1] 3210 <1> __CPU__ 3211 00004D26 EB07 <1> jmp @FF 3212 <1> @@: 3213 00004D28 268A00 <1> mov al, byte [es:bx + si] 3214 00004D2B 268A6001 <1> mov ah, byte [es:bx + si + 1] 3215 <1> @@: 3216 00004D2F 8CC6 <1> mov si, es 3217 00004D31 07 <1> pop es 3218 00004D32 06 <1> push es 3219 00004D33 E8B86C <1> call hexword 3220 00004D36 B03A <1> mov al, ':' 3221 00004D38 AA <1> stosb 3222 00004D39 8EC6 <1> mov es, si 3223 <1> .no_far_m: 3224 <1> 3225 00004D3B 8CC6 <1> mov si, es 3226 00004D3D F606[D787]08 <1> testopt [disflags], DIS_I_SHOW_A32 3227 00004D42 741E <1> jz @F 3228 <1> [cpu 386] 3229 00004D44 26678A03 <1> mov al, [es:ebx] ; avoid a "mov ax,[-1]" 3230 00004D48 803E[CE87]00 <1> cmp byte [rmsize], 0 3231 00004D4D 7C38 <1> jl .displaybyte ; if byte --> 3232 00004D4F 26678A6301 <1> mov ah, [es:ebx + 1] 3233 00004D54 742B <1> jz .displayword ; if word --> 3234 00004D56 26678A5302 <1> mov dl, [es:ebx + 2] ; avoid a "mov dx,[-1]" 3235 00004D5B 26678A7303 <1> mov dh, [es:ebx + 3] 3236 <1> __CPU__ 3237 00004D60 EB18 <1> jmp .displaydword ; is dword --> 3238 <1> @@: 3239 00004D62 268A07 <1> mov al, [es:bx] ; avoid a "mov ax,[-1]" 3240 00004D65 803E[CE87]00 <1> cmp byte [rmsize], 0 3241 00004D6A 7C1B <1> jl .displaybyte ; if byte 3242 00004D6C 268A6701 <1> mov ah, [es:bx + 1] 3243 00004D70 740F <1> jz .displayword ; if word 3244 00004D72 268A5702 <1> mov dl, [es:bx + 2] ; avoid a "mov dx,[-1]" 3245 00004D76 268A7703 <1> mov dh, [es:bx + 3] 3246 <1> .displaydword: 3247 00004D7A 07 <1> pop es 3248 00004D7B 92 <1> xchg ax, dx 3249 00004D7C E86F6C <1> call hexword 3250 00004D7F 92 <1> xchg ax, dx 3251 00004D80 A8 <1> db __TEST_IMM8 ; (skip pop) 3252 <1> .displayword: 3253 00004D81 07 <1> pop es 3254 00004D82 E8696C <1> call hexword 3255 00004D85 EB04 <1> jmp short .displayed ; done 3256 <1> .displaybyte: 3257 00004D87 07 <1> pop es 3258 00004D88 E86A6C <1> call hexbyte ; display byte 3259 <1> .displayed: 3260 <1> 3261 00004D8B F606[D787]04 <1> testopt [disflags], DIS_I_DOUBLE_M 3262 00004D90 746E <1> jz .no_double_m 3263 <1> 3264 00004D92 B02C <1> mov al, ',' 3265 00004D94 AA <1> stosb 3266 <1> 3267 00004D95 06 <1> push es 3268 00004D96 8EC6 <1> mov es, si 3269 <1> 3270 00004D98 BE0100 <1> mov si, 1 3271 00004D9B 803E[CE87]00 <1> cmp byte [rmsize], 0 3272 00004DA0 7C08 <1> jl @F 3273 00004DA2 BE0200 <1> mov si, 2 3274 00004DA5 7403 <1> jz @F 3275 00004DA7 BE0400 <1> mov si, 4 3276 <1> @@: 3277 00004DAA F606[D787]08 <1> testopt [disflags], DIS_I_SHOW_A32 3278 00004DAF 7426 <1> jz @F 3279 <1> [cpu 386] 3280 00004DB1 660FB7F6 <1> movzx esi, si 3281 00004DB5 26678A0433 <1> mov al, [es:ebx + esi] ; avoid a "mov ax,[-1]" 3282 00004DBA 803E[CE87]00 <1> cmp byte [rmsize], 0 3283 00004DBF 7C3B <1> jl .double_displaybyte ; if byte --> 3284 00004DC1 26678A643301 <1> mov ah, [es:ebx + esi + 1] 3285 00004DC7 742D <1> jz .double_displayword ; if word --> 3286 00004DC9 26678A543302 <1> mov dl, [es:ebx + esi + 2] 3287 <1> ; avoid a "mov dx,[-1]" 3288 00004DCF 26678A743303 <1> mov dh, [es:ebx + esi + 3] 3289 <1> __CPU__ 3290 00004DD5 EB18 <1> jmp .double_displaydword 3291 <1> @@: 3292 00004DD7 268A00 <1> mov al, [es:bx + si] ; avoid a "mov ax,[-1]" 3293 00004DDA 803E[CE87]00 <1> cmp byte [rmsize], 0 3294 00004DDF 7C1B <1> jl .double_displaybyte ; if byte --> 3295 00004DE1 268A6001 <1> mov ah, [es:bx + si + 1] 3296 00004DE5 740F <1> jz .double_displayword ; if word --> 3297 00004DE7 268A5002 <1> mov dl, [es:bx + si + 2]; avoid a "mov dx,[-1]" 3298 00004DEB 268A7003 <1> mov dh, [es:bx + si + 3] 3299 <1> .double_displaydword: 3300 00004DEF 07 <1> pop es 3301 00004DF0 92 <1> xchg ax, dx 3302 00004DF1 E8FA6B <1> call hexword 3303 00004DF4 92 <1> xchg ax, dx 3304 00004DF5 A8 <1> db __TEST_IMM8 ; (skip pop) 3305 <1> .double_displayword: 3306 00004DF6 07 <1> pop es 3307 00004DF7 E8F46B <1> call hexword 3308 00004DFA EB04 <1> jmp short .double_displayed 3309 <1> .double_displaybyte: 3310 00004DFC 07 <1> pop es 3311 00004DFD E8F56B <1> call hexbyte ; display byte 3312 <1> .double_displayed: 3313 <1> .no_double_m: 3314 <1> 3315 <1> da32z: 3316 00004E00 E81B6C <1> call trimputs ; done with operand list 3317 <1> 3318 <1> %if _MEMREF_AMOUNT 3319 <1> set_string_memref: 3320 00004E03 A1[C287] <1> mov ax, [index] 3321 00004E06 84E4 <1> test ah, ah 3322 00004E08 7403E9F100 <1> jnz .none 3323 00004E0D BF[EE10] <1> mov di, ppbytes.string ; list of string opcodes 3324 00004E10 B90E00 <1> mov cx, ppbytes.string_amount 3325 00004E13 F2AE <1> repne scasb 3326 00004E15 7403E9E400 <1> jne .none ; if not one of these --> 3327 <1> ; last entries are: 0A6h,0A7h,0AEh,0AFh 3328 <1> ; corresponding to cmpsb, cmpsw/d, scasb, scasw/d 3329 <1> ; so cx = 0 means scasw, = 1 scasb, = 2 cmpsw, = 3 cmpsb 3330 00004E1A 8A451E <1> mov al,byte [di+PPLEN-1]; get corresponding byte in ppinfo 3331 <1> 3332 00004E1D 31D2 <1> xor dx, dx 3333 00004E1F FF36[6C0C] <1> push word [reg_ecx] 3334 00004E23 8F06[B487] <1> pop word [string_memref_counter] 3335 00004E27 F606[BE87]20 <1> test byte [presizeflags], PRE32A 3336 00004E2C 7404 <1> jz @F ; if 16-bit addressing --> 3337 00004E2E 8B16[6E0C] <1> mov dx, [reg_ecx + 2] ; = ecxh value 3338 <1> @@: 3339 00004E32 8916[B687] <1> mov word [string_memref_counter + 2], dx 3340 <1> 3341 00004E36 80F904 <1> cmp cl, 4 ; repetition differs for memory content ? 3342 00004E39 737B <1> jae @F ; no --> 3343 00004E3B F606[BC87]02 <1> test byte [preflags], PREREP 3344 00004E40 7474 <1> jz @F ; if not repeated --> 3345 <1> 3346 00004E42 01C9 <1> add cx, cx ; 0 = scasd, 2 = scasb, 4 = cmpsd, 6 = cmpsb 3347 00004E44 F606[BE87]10 <1> test byte [presizeflags], PRE32D 3348 00004E49 7501 <1> jnz .iso32 3349 00004E4B 41 <1> inc cx ; point to word entry, not dword 3350 <1> .iso32: 3351 <1> 3352 00004E4C 01C9 <1> add cx, cx ; table entries are words, so 0..14 3353 <1> 3354 00004E4E F606[BC87]04 <1> test byte [preflags], PREREPZ 3355 00004E53 7403 <1> jz .isrepne 3356 00004E55 83C110 <1> add cx, simulate_rep_sca_cmp.table_repe_offset 3357 <1> ; from 0..14 to 16..30 3358 <1> .isrepne: 3359 <1> 3360 00004E58 89CB <1> mov bx, cx ; = index into table 3361 00004E5A 8B97[7C88] <1> mov dx, word [bx + simulate_rep_sca_cmp.table] 3362 <1> ; function to call 3363 00004E5E F606[BE87]20 <1> test byte [presizeflags], PRE32A 3364 00004E63 7401 <1> jz .isa16 ; if 16-bit addressing --> 3365 00004E65 4A <1> dec dx ; a32 prefix is 1 byte lower than table entry 3366 <1> .isa16: 3367 <1> 3368 00004E66 66 <1> _386_o32 3369 00004E67 8B36[7C0C] <1> mov si, word [reg_esi] 3370 00004E6B 66 <1> _386_o32 3371 00004E6C 8B3E[800C] <1> mov di, word [reg_edi] 3372 00004E70 66 <1> _386_o32 3373 00004E71 8B0E[6C0C] <1> mov cx, word [reg_ecx] 3374 00004E75 8E06[880C] <1> mov es, word [reg_es] 3375 00004E79 50 <1> push ax 3376 00004E7A A810 <1> test al, PP_STRSRC ; cmps ? 3377 00004E7C 740D <1> jz .issca ; no, no need to load ds --> 3378 <1> 3379 00004E7E A0[CF87] <1> mov al, [segmnt] ; segment number 3380 00004E81 98 <1> cbw 3381 00004E82 D1E0 <1> shl ax, 1 3382 00004E84 93 <1> xchg ax, bx ; mov bx, ax 3383 00004E85 8B9F[3888] <1> mov bx, word [segrgaddr + bx] 3384 <1> ; si = address of segment/selector reg 3385 00004E89 8E1F <1> mov ds, [bx] 3386 <1> 3387 <1> .issca: 3388 00004E8B 66 <1> _386_o32 3389 00004E8C 36A1[640C] <1> mov ax, word [ss:reg_eax] 3390 <1> 3391 00004E90 36F606[A10C]04 <1> testopt [ss:reg_efl], 400h 3392 <1> ; DF set ? 3393 00004E96 7401 <1> jz .up 3394 00004E98 FD <1> std 3395 <1> .up: 3396 00004E99 FFD2 <1> call dx ; simulate the repeated string op 3397 00004E9B FC <1> cld 3398 00004E9C 16 <1> push ss 3399 00004E9D 1F <1> pop ds 3400 00004E9E 16 <1> push ss 3401 00004E9F 07 <1> pop es 3402 <1> 3403 00004EA0 6651 <1> _386 push ecx 3404 00004EA2 59 <1> _386 pop cx 3405 00004EA3 5A <1> _386 pop dx 3406 <1> 3407 00004EA4 F606[BE87]20 <1> _386 test byte [presizeflags], PRE32A 3408 00004EA9 7502 <1> _386 jnz .count32 ; if 32-bit addressing --> 3409 00004EAB 31D2 <1> xor dx, dx 3410 <1> .count32: 3411 00004EAD 290E[B487] <1> sub word [string_memref_counter], cx 3412 00004EB1 1916[B687] <1> sbb word [string_memref_counter + 2], dx 3413 <1> 3414 00004EB5 58 <1> pop ax 3415 <1> @@: 3416 <1> 3417 00004EB6 A810 <1> test al, PP_STRSRC 3418 00004EB8 7429 <1> jz .no_src 3419 <1> 3420 00004EBA 803E[CF87]03 <1> _no386 cmp byte [segmnt], 3 3421 00004EBF 7722 <1> _no386 ja .no_src ; if FS or GS on non-386 --> (invalid) 3422 00004EC1 803E[CF87]05 <1> cmp byte [segmnt], 5 3423 00004EC6 771B <1> ja .no_src ; if invalid segment --> 3424 <1> 3425 00004EC8 50 <1> push ax 3426 00004EC9 A0[CF87] <1> mov al, [segmnt] ; segment number 3427 00004ECC 98 <1> cbw 3428 00004ECD D1E0 <1> shl ax, 1 3429 00004ECF 93 <1> xchg ax, bx ; mov bx, ax 3430 00004ED0 58 <1> pop ax 3431 00004ED1 8BB7[3888] <1> mov si, word [segrgaddr + bx] 3432 <1> ; si = address of segment/selector reg 3433 00004ED5 BF[7C0C] <1> mov di, reg_esi ; di = address of offset reg 3434 00004ED8 E80606 <1> call init_string_memref 3435 <1> @@: ; entry: set memref to string source and mark 3436 <1> ; (jump to .none afterwards if al is zero) 3437 00004EDB 808F[7A87]60 <1> or byte [memrefs + bx + mrFlags], mrfString | mrfStringSource 3438 00004EE0 E8BD05 <1> call calc_linear_memref_and_mark_nonfree 3439 <1> 3440 <1> .no_src: 3441 00004EE3 A828 <1> test al, PP_STRDEST | PP_STRSRC2 3442 00004EE5 7417 <1> jz .none 3443 00004EE7 BE[880C] <1> mov si, reg_es ; si = address of segment/selector reg 3444 00004EEA BF[800C] <1> mov di, reg_edi ; di = address of offset reg 3445 00004EED E8F105 <1> call init_string_memref 3446 00004EF0 A808 <1> test al, PP_STRSRC2 ; alternative string source ? 3447 00004EF2 B000 <1> mov al, 0 ; (cause conditional branch to jump) 3448 00004EF4 75E5 <1> jnz @B ; yes, set as string source --> 3449 00004EF6 808F[7A87]A0 <1> or byte [memrefs + bx + mrFlags], mrfString | mrfStringDest 3450 00004EFB E8A205 <1> call calc_linear_memref_and_mark_nonfree 3451 <1> 3452 <1> .none: 3453 <1> 3454 <1> %if _DEBUG2 3455 <1> display_memrefs: 3456 <1> mov cx, [memrefs.free] 3457 <1> test cx, cx 3458 <1> jz .none 3459 <1> xor si, si 3460 <1> .loop: 3461 <1> mov bx, si 3462 <1> call get_memref_index_bx 3463 <1> mov ax, word [memrefs + bx + mrFlags] 3464 <1> mov dx, msg.memrefs_branchdirect 3465 <1> test al, mrfBranchDirect 3466 <1> jnz .gotmsg 3467 <1> mov dx, msg.memrefs_stringsource 3468 <1> test al, mrfStringSource 3469 <1> jnz .gotmsg 3470 <1> mov dx, msg.memrefs_stringdest 3471 <1> test al, mrfStringDest 3472 <1> jnz .gotmsg 3473 <1> mov dl, al 3474 <1> and dl, mrfMemSource | mrfMemDest 3475 <1> cmp dl, mrfMemSource | mrfMemDest 3476 <1> mov dx, msg.memrefs_memsourcedest 3477 <1> je .gotmsg 3478 <1> mov dx, msg.memrefs_memsource 3479 <1> test al, mrfMemSource 3480 <1> jnz .gotmsg 3481 <1> mov dx, msg.memrefs_memdest 3482 <1> test al, mrfMemDest 3483 <1> jnz .gotmsg 3484 <1> mov dx, msg.memrefs_mem_unknown 3485 <1> test al, mrfMem 3486 <1> jnz .gotmsg 3487 <1> mov dx, msg.memrefs_unknown 3488 <1> .gotmsg: 3489 <1> call putsz 3490 <1> 3491 <1> mov di, line_out 3492 <1> mov ax, word [memrefs + bx + mrSegmentSelector] 3493 <1> call hexword 3494 <1> push word [memrefs + bx + mrOffset] 3495 <1> mov al, ':' 3496 <1> stosb 3497 <1> %if 1 || _PM 3498 <1> mov ax, word [memrefs + bx + mrOffset + 2] 3499 <1> test byte [memrefs + bx + mrFlags], mrfA32 3500 <1> jz .16 3501 <1> call hexword 3502 <1> .16: 3503 <1> %endif 3504 <1> pop ax 3505 <1> call hexword 3506 <1> push si 3507 <1> push cx 3508 <1> mov si, msg.memrefs_length 3509 <1> call copy_single_counted_string 3510 <1> mov ax, word [memrefs + bx + mrLength + 2] 3511 <1> test ax, ax 3512 <1> jz @F 3513 <1> call hexword 3514 <1> @@: 3515 <1> mov ax, word [memrefs + bx + mrLength] 3516 <1> call hexword 3517 <1> call putsline_crlf 3518 <1> pop cx 3519 <1> pop si 3520 <1> 3521 <1> inc si 3522 <1> dec cx 3523 <1> jnz .loop 3524 <1> .none: 3525 <1> %endif ; _DEBUG2 3526 <1> %endif ; _MEMREF_AMOUNT 3527 <1> 3528 <1> da_repeat: 3529 00004EFE A0[D687] <1> mov al, [disflags] 3530 00004F01 A801 <1> test al, DIS_F_REPT 3531 00004F03 7437 <1> jz @FF ; if not repeating --> 3532 00004F05 A808 <1> test al, DIS_I_UNUSED 3533 00004F07 751A <1> jnz @F ; if " (unused)" was displayed --> 3534 00004F09 A840 <1> test al, DIS_I_MOV_SS 3535 00004F0B A1[C287] <1> mov ax, [index] 3536 00004F0E 7405 <1> jz .not_mov_to_ss ; not mov to ss --> 3537 <1> 3538 <1> ; DIS_I_MOV_SS is set, check for wo[index] == 8Eh; 3539 <1> ; as we only want to match move *to* ss, not from (8Ch). 3540 00004F10 3D8E00 <1> cmp ax, 8Eh ; move to seg reg? 3541 00004F13 740E <1> je @F ; yes, it is mov to ss --> 3542 <1> 3543 <1> .not_mov_to_ss: 3544 00004F15 84E4 <1> test ah, ah 3545 00004F17 7524 <1> jnz .not_single_byte_opcode 3546 <1> 3547 00004F19 BF[6C88] <1> mov di, single_byte_opcodes_repeat_disassembly 3548 00004F1C B90F00 <1> mov cx, single_byte_opcodes_repeat_disassembly.length 3549 00004F1F F2AE <1> repne scasb 3550 00004F21 751A <1> jne @FFF 3551 <1> @@: 3552 00004F23 8326[D687]03 <1> and word [disflags], DIS_F_REPT|DIS_F_SHOW 3553 00004F28 FE06[D987] <1> inc byte [disrepeatcount] 3554 00004F2C 803E[D987]10 <1> cmp byte [disrepeatcount], 16 3555 00004F31 7303E988F8 <1> jb disasm.preserve_disrepeatcount 3556 <1> 3557 00004F36 BA[6F70] <1> mov dx, msg.uu_too_many_repeat 3558 00004F39 E8686E <1> call putsz 3559 <1> @@: 3560 00004F3C C3 <1> retn 3561 <1> 3562 <1> @@: 3563 <1> .not_single_byte_opcode: 3564 <1> 3565 00004F3D 8A3E[C087] <1> mov bh, byte [disp8] 3566 00004F41 3DEB00 <1> cmp ax, 0EBh ; unconditional short jump ? 3567 00004F44 74F6 <1> je @BB ; yes, return --> 3568 00004F46 66 <1> _386_PM_o32 ; and dword [dis_n], byte 0 3569 00004F47 8326[B887]00 <1> and word [dis_n], byte 0 3570 00004F4C E8070A <1> call disgetbyte 3571 00004F4F B302 <1> mov bl, 2 ; displacement to skip a jmp short 3572 00004F51 3CEB <1> cmp al, 0EBh ; jmp short ? 3573 00004F53 740F <1> je @F ; yes --> 3574 00004F55 B303 <1> mov bl, 3 ; displacement to skip a 16-bit jmp near 3575 00004F57 3CE9 <1> cmp al, 0E9h ; jmp near ? 3576 00004F59 75E1 <1> jne @BB ; no, return --> 3577 <1> %if _PM 3578 00004F5B F606[DB88]40 <1> test byte [bCSAttr], 40h ; 32-bit code segment ? 3579 00004F60 7402 <1> jz @F ; no, 16-bit, use displacement 3 --> 3580 00004F62 B305 <1> mov bl, 5 ; displacement to skip a 32-bit jmp near 3581 <1> %endif 3582 <1> @@: 3583 00004F64 38DF <1> cmp bh, bl ; right displacement ? 3584 00004F66 75D4 <1> jne @BBB ; no --> 3585 <1> 3586 00004F68 8326[D687]03 <1> and word [disflags], DIS_F_REPT|DIS_F_SHOW 3587 00004F6D 8336[DC87]1C <1> xor word [condmsg], (msg.condnotjump + DATASECTIONFIXUP) ^ (msg.condjump + DATASECTIONFIXUP) 3589 00004F72 E94EF8 <1> jmp disasm.preserve_condmsg_and_disrepeatcount 3590 <1> 3591 <1> 3592 <1> %if _MEMREF_AMOUNT 3593 <1> simulate_rep_sca_cmp: 3594 <1> 3595 00004F75 67 <1> _386_a32 3596 <1> .repne_scasd: 3597 00004F76 66 <1> _386_o32 3598 00004F77 F2 <1> repne 3599 00004F78 AF <1> scasw 3600 00004F79 C3 <1> retn 3601 <1> 3602 00004F7A 67 <1> _386_a32 3603 <1> .repne_scasw: 3604 00004F7B F2AF <1> repne scasw 3605 00004F7D C3 <1> retn 3606 <1> 3607 00004F7E 67 <1> _386_a32 3608 <1> .repne_scasb: 3609 00004F7F F2AE <1> repne scasb 3610 00004F81 C3 <1> retn 3611 <1> 3612 00004F82 67 <1> _386_a32 3613 <1> .repne_cmpsd: 3614 00004F83 66 <1> _386_o32 3615 00004F84 F2 <1> repne 3616 00004F85 A7 <1> cmpsw 3617 00004F86 C3 <1> retn 3618 <1> 3619 00004F87 67 <1> _386_a32 3620 <1> .repne_cmpsw: 3621 00004F88 F2A7 <1> repne cmpsw 3622 00004F8A C3 <1> retn 3623 <1> 3624 00004F8B 67 <1> _386_a32 3625 <1> .repne_cmpsb: 3626 00004F8C F2A6 <1> repne cmpsb 3627 00004F8E C3 <1> retn 3628 <1> 3629 00004F8F 67 <1> _386_a32 3630 <1> .repe_scasd: 3631 00004F90 66 <1> _386_o32 3632 00004F91 F3 <1> repe 3633 00004F92 AF <1> scasw 3634 00004F93 C3 <1> retn 3635 <1> 3636 00004F94 67 <1> _386_a32 3637 <1> .repe_scasw: 3638 00004F95 F3AF <1> repe scasw 3639 00004F97 C3 <1> retn 3640 <1> 3641 00004F98 67 <1> _386_a32 3642 <1> .repe_scasb: 3643 00004F99 F3AE <1> repe scasb 3644 00004F9B C3 <1> retn 3645 <1> 3646 00004F9C 67 <1> _386_a32 3647 <1> .repe_cmpsd: 3648 00004F9D 66 <1> _386_o32 3649 00004F9E F3 <1> repe 3650 00004F9F A7 <1> cmpsw 3651 00004FA0 C3 <1> retn 3652 <1> 3653 00004FA1 67 <1> _386_a32 3654 <1> .repe_cmpsw: 3655 00004FA2 F3A7 <1> repe cmpsw 3656 00004FA4 C3 <1> retn 3657 <1> 3658 00004FA5 67 <1> _386_a32 3659 <1> .repe_cmpsb: 3660 00004FA6 F3A6 <1> repe cmpsb 3661 00004FA8 C3 <1> retn 3662 <1> 3663 <1> 3664 <1> usesection lDEBUG_DATA_ENTRY 3665 0000887B 00 <1> align 2, db 0 3666 <1> .table: 3667 0000887C [764F] <1> dw .repne_scasd 3668 0000887E [7B4F] <1> dw .repne_scasw 3669 00008880 [7F4F] <1> dw .repne_scasb 3670 00008882 [7F4F] <1> dw .repne_scasb 3671 00008884 [834F] <1> dw .repne_cmpsd 3672 00008886 [884F] <1> dw .repne_cmpsw 3673 00008888 [8C4F] <1> dw .repne_cmpsb 3674 0000888A [8C4F] <1> dw .repne_cmpsb 3675 <1> .table_repe_offset: equ $ - .table 3676 0000888C [904F] <1> dw .repe_scasd 3677 0000888E [954F] <1> dw .repe_scasw 3678 00008890 [994F] <1> dw .repe_scasb 3679 00008892 [994F] <1> dw .repe_scasb 3680 00008894 [9D4F] <1> dw .repe_cmpsd 3681 00008896 [A24F] <1> dw .repe_cmpsw 3682 00008898 [A64F] <1> dw .repe_cmpsb 3683 0000889A [A64F] <1> dw .repe_cmpsb 3684 <1> 3685 <1> usesection lDEBUG_CODE 3686 <1> %endif 3687 <1> 3688 <1> 3689 <1> ; Here are the routines for printing out the operands themselves. 3690 <1> ; Immediate data (OP_IMM) 3691 <1> 3692 <1> dop_imm: 3693 00004FA9 80FC00 <1> cmp ah, 0 3694 00004FAC 7C17 <1> jl dop03 ; if just a byte --> 3695 00004FAE 9C <1> pushf 3696 00004FAF F606[D687]10 <1> test byte [disflags], DIS_I_SHOWSIZ 3697 00004FB4 7403 <1> jz .nosize ; if we don't need to show the size --> 3698 00004FB6 E8CD08 <1> call showsize 3699 <1> .nosize: 3700 00004FB9 E8B609 <1> call disgetword 3701 00004FBC 9D <1> popf ; ZF 3702 00004FBD 7503E92C6A <1> je hexword ; if just a word 3703 00004FC2 E90D09 <1> jmp disp32.ax 3704 <1> 3705 <1> dop03: 3706 00004FC5 E88E09 <1> call disgetbyte ; print immediate byte 3707 00004FC8 E92A6A <1> jmp hexbyte 3708 <1> 3709 <1> 3710 <1> ; Memory offset reference (OP_MOFFS) 3711 <1> 3712 <1> dop_moffs: 3713 00004FCB B005 <1> mov al, 5 3714 00004FCD F606[BE87]20 <1> test byte [presizeflags], PRE32A 3715 00004FD2 7501 <1> jnz .32 ; if 32-bit addressing --> 3716 00004FD4 40 <1> inc ax 3717 <1> .32: 3718 00004FD5 A2[9C81] <1> mov [regmem], al 3719 00004FD8 EB0A <1> jmp s dop05 3720 <1> 3721 <1> 3722 <1> ; MOD R/M (OP_RM) 3723 <1> 3724 <1> dop_rm: 3725 00004FDA E80508 <1> call getregmem 3726 00004FDD 3CC0 <1> cmp al,0c0h 3727 00004FDF 7203E93F02 <1> jae dop33 ; if pure register reference --> 3728 <1> 3729 <1> dop05: ; <--- used by OP_M, OP_M64, OP_M80, OP_MOFFS 3730 00004FE4 8826[CE87] <1> mov byte [rmsize], ah ; save r/m size 3731 00004FE8 F606[D787]01 <1> testopt [disflags], DIS_I_NOSIZ 3732 00004FED 7506 <1> jnz @F 3733 00004FEF E89408 <1> call showsize ; print out size 3734 00004FF2 E8C808 <1> call showptr ; append "PTR " (if not NASM syntax) 3735 <1> @@: 3736 <1> dop06: ; <--- used by OP_MXX, OP_MFLOAT, OP_MDOUBLE 3737 00004FF5 800E[BD87]01 <1> or byte [preused],PRESEG ; needed even if there's no segment override 3738 <1> ; because handling of LOCK prefix relies on it 3739 00004FFA B05B <1> mov al, '[' 3740 00004FFC E80202 <1> call stosb_nasm 3741 <1> 3742 00004FFF F606[BC87]01 <1> test byte [preflags],PRESEG 3743 00005004 7406 <1> jz dop07 ;if no segment override 3744 00005006 E87508 <1> call showseg ;print segment name 3745 00005009 B03A <1> mov al,':' 3746 0000500B AA <1> stosb 3747 <1> dop07: 3748 0000500C A0[9C81] <1> mov al,[regmem] 3749 0000500F 24C7 <1> and al,0c7h 3750 00005011 800E[BD87]20 <1> or byte [preused],PREASIZE 3751 00005016 F606[BE87]20 <1> test byte [presizeflags],PRE32A 3752 0000501B 7403E9AF00 <1> jnz dop18 ;if 32-bit addressing 3753 00005020 800E[D687]04 <1> or byte [disflags],DIS_I_SHOW ;we'd like to show this address 3754 00005025 8326[D087]00 <1> and word [addrr], 0 ; zero out the address initially 3755 0000502A 93 <1> xchg ax,bx ;mov bx,ax 3756 0000502B E8C601 <1> call store_opensqubracket 3757 0000502E 80FB06 <1> cmp bl,6 3758 00005031 7503E98B00 <1> je dop16 ;if [xxxx] 3759 00005036 83E307 <1> and bx,7 3760 00005039 8A9F[EA87] <1> mov bl,[rmtab+bx] 3761 0000503D F6C308 <1> test bl,8 3762 00005040 7525 <1> jnz dop09 ;if BX 3763 00005042 F6C304 <1> test bl,4 3764 00005045 7436 <1> jz dop11 ;if not BP 3765 00005047 B84250 <1> mov ax,'BP' 3766 0000504A 8B0E[780C] <1> mov cx,[reg_ebp] 3767 0000504E E80A00 <1> call da_set_default_ss 3768 00005051 EB1B <1> jmp dop10 3769 <1> 3770 <1> 3771 <1> ; INP: al = 2 * register number 3772 <1> ; [preflags] & PRESEG set if segment overridden 3773 <1> ; else, 3774 <1> ; byte [segmnt] = initialised to 3 (ds) 3775 <1> ; OUT: no action if register number not for esp or ebp 3776 <1> ; no action if segment overridden 3777 <1> ; otherwise, 3778 <1> ; byte [segmnt] -= 1, resulting in 2 (ss) 3779 <1> da_set_default_ss_if_esp_ebp: 3780 00005053 3C08 <1> cmp al, 2 * 4 3781 00005055 7404 <1> je @F 3782 00005057 3C0A <1> cmp al, 2 * 5 3783 00005059 750B <1> jne @FF 3784 <1> @@: 3785 <1> da_set_default_ss: 3786 0000505B F606[BC87]01 <1> test byte [preflags], PRESEG 3787 00005060 7504 <1> jnz @F ; if segment override --> 3788 00005062 FE0E[CF87] <1> dec byte [segmnt] ; default is now SS 3789 <1> @@: 3790 00005066 C3 <1> retn 3791 <1> 3792 <1> 3793 <1> dop09: 3794 00005067 B84258 <1> mov ax,'BX' ;BX 3795 0000506A 8B0E[680C] <1> mov cx,[reg_ebx] 3796 <1> 3797 <1> dop10: 3798 0000506E 890E[D087] <1> mov [addrr],cx ;print it out, etc. 3799 00005072 E80C08 <1> call dis_stosw_lowercase 3800 00005075 F6C303 <1> test bl,2+1 3801 00005078 741C <1> jz dop13 ;if done 3802 0000507A B02B <1> mov al,'+' 3803 0000507C AA <1> stosb 3804 <1> dop11: 3805 0000507D B85349 <1> mov ax,'SI' 3806 00005080 8B0E[7C0C] <1> mov cx,[reg_esi] 3807 00005084 F6C301 <1> test bl,1 3808 00005087 7406 <1> jz dop12 ;if SI 3809 00005089 B044 <1> mov al,'D' ;DI 3810 0000508B 8B0E[800C] <1> mov cx,[reg_edi] 3811 <1> 3812 <1> dop12: 3813 0000508F 010E[D087] <1> add [addrr], cx ; print it out, etc. 3814 00005093 E8EB07 <1> call dis_stosw_lowercase 3815 <1> dop13: 3816 00005096 F606[9C81]C0 <1> test byte [regmem], 0C0h 3817 0000509B 742E <1> jz s dop17 ; if no displacement --> 3818 0000509D F606[9C81]80 <1> test byte [regmem], 80h 3819 000050A2 751A <1> jnz dop15 ; if word displacement --> 3820 000050A4 E8AF08 <1> call disgetbyte 3821 000050A7 98 <1> cbw 3822 000050A8 0106[D087] <1> add [addrr], ax 3823 000050AC 3C00 <1> cmp al, 0 3824 000050AE B42B <1> mov ah, '+' 3825 000050B0 7D04 <1> jge dop14 ; if not negative --> 3826 000050B2 B42D <1> mov ah, '-' 3827 000050B4 F6D8 <1> neg al 3828 <1> dop14: 3829 000050B6 8825 <1> mov [di], ah 3830 000050B8 47 <1> inc di 3831 000050B9 E83969 <1> call hexbyte ; print the byte displacement 3832 000050BC EB0D <1> jmp s dop17 ; done --> 3833 <1> 3834 <1> dop15: 3835 000050BE B02B <1> mov al, '+' 3836 000050C0 AA <1> stosb 3837 <1> dop16: 3838 000050C1 E8AE08 <1> call disgetword 3839 000050C4 0106[D087] <1> add [addrr], ax 3840 000050C8 E82369 <1> call hexword ; print word displacement 3841 <1> 3842 <1> dop17: 3843 000050CB B05D <1> mov al, ']' 3844 000050CD AA <1> stosb 3845 000050CE C3 <1> retn 3846 <1> 3847 <1> ; 32-bit MOD REG R/M addressing. 3848 <1> 3849 <1> dop18: 3850 000050CF 810E[D687]0408 <1> or word [disflags], DIS_I_SHOW | DIS_I_SHOW_A32 3851 000050D5 8326[D087]00 <1> and word [addrr], 0 3852 000050DA 8326[D287]00 <1> and word [addrr + 2], 0 ; zero out the address initially 3853 000050DF 3C05 <1> cmp al, 5 ; mod=0 and r/m=5 ? 3854 000050E1 7503E98200 <1> je dop19 ; yes, just a disp32 address --> 3855 000050E6 50 <1> push ax 3856 000050E7 2407 <1> and al, 7 3857 000050E9 3C04 <1> cmp al, 4 3858 000050EB 7506 <1> jne dop20 ; if no SIB --> 3859 000050ED E86608 <1> call disgetbyte ; get and save it 3860 000050F0 A2[9D81] <1> mov [sibbyte], al 3861 <1> dop20: 3862 000050F3 58 <1> pop ax 3863 000050F4 A880 <1> test al, 80h 3864 000050F6 7538 <1> jnz dop22 ; if disp32 --> 3865 000050F8 A840 <1> test al, 40h 3866 000050FA 743A <1> jz dop23 ; if no disp8 --> 3867 000050FC E85708 <1> call disgetbyte 3868 <1> 3869 000050FF 98 <1> cbw 3870 00005100 99 <1> cwd 3871 00005101 0106[D087] <1> add word [addrr], ax 3872 00005105 1116[D287] <1> adc word [addrr + 2], dx 3873 <1> 3874 00005109 3C00 <1> cmp al, 0 3875 0000510B 7D06 <1> jge dop21 ; if not negative --> 3876 0000510D F6D8 <1> neg al 3877 0000510F C6052D <1> mov byte [di], '-' 3878 00005112 47 <1> inc di 3879 <1> dop21: 3880 00005113 E8DF68 <1> call hexbyte 3881 00005116 EB1B <1> jmp s dop22a ; done --> 3882 <1> 3883 <1> disp32_add_to_addrr: 3884 00005118 E85708 <1> call disgetword 3885 0000511B 0106[D087] <1> add word [addrr], ax 3886 0000511F 50 <1> push ax 3887 00005120 9C <1> pushf 3888 00005121 E84E08 <1> call disgetword 3889 00005124 9D <1> popf 3890 00005125 1106[D287] <1> adc word [addrr + 2], ax 3891 00005129 E8C268 <1> call hexword 3892 0000512C 58 <1> pop ax 3893 0000512D E9BE68 <1> jmp hexword 3894 <1> 3895 <1> dop22: 3896 00005130 E8E5FF <1> call disp32_add_to_addrr 3897 <1> ; print disp32 3898 <1> 3899 <1> dop22a: 3900 00005133 E8C900 <1> call store_plus 3901 <1> 3902 <1> dop23: 3903 00005136 A0[9C81] <1> mov al,[regmem] 3904 00005139 2407 <1> and al,7 3905 0000513B 3C04 <1> cmp al,4 3906 0000513D 7403E99800 <1> jne dop28 ;if no SIB 3907 00005142 A0[9D81] <1> mov al, [sibbyte] 3908 00005145 88C4 <1> mov ah, al 3909 00005147 250738 <1> and ax, 00_111_000_00_000_111b 3910 <1> ; ah = index << 3, al = base 3911 0000514A 80FC20 <1> cmp ah, 4 << 3 ; index encodes esp ? 3912 0000514D 7414 <1> je dop_sib_index_4 ; yes, use base only --> 3913 <1> ; When this branch is taken, the scale is ignored. 3914 <1> ; This is typically used only for encoding [esp] 3915 <1> ; and [esp + x] but is a valid encoding even for 3916 <1> ; other base registers. So better support it. 3917 <1> ; (This used to be a special case for SIB == 24h 3918 <1> ; only because it doesn't usually occur else. 3919 <1> ; The other cases were rejected in dop25.) 3920 <1> 3921 0000514F E80700 <1> call dop_is_mod_0_and_base_5 3922 00005152 7539 <1> jnz dop24 ; if not mod=0 base=5 --> 3923 00005154 E8C1FF <1> call disp32_add_to_addrr; show 32-bit displacement instead of [EBP] 3924 00005157 EB45 <1> jmp dop25 ; and handle the scale and index --> 3925 <1> 3926 <1> 3927 <1> ; INP: al = low 3 bits of SIB byte (= base) 3928 <1> ; byte [regmem] = ModR/M byte 3929 <1> ; OUT: NZ if not mod=0 base=5 special case 3930 <1> ; ZR else 3931 <1> ; REM: base=5 usually encodes [ebp], and mod=0 3932 <1> ; usually encodes no displacement field. 3933 <1> ; If both are true however, then the 3934 <1> ; special case is true: there is no base 3935 <1> ; register and a 32-bit displacement. 3936 <1> dop_is_mod_0_and_base_5: 3937 00005159 3C05 <1> cmp al, 5 3938 0000515B 7505 <1> jne @F ; NZ if not base=5 --> 3939 0000515D F606[9C81]C0 <1> test byte [regmem], 1100_0000b 3940 <1> ; NZ if not mod=0 3941 <1> @@: 3942 00005162 C3 <1> retn 3943 <1> 3944 <1> 3945 <1> dop_sib_index_4: 3946 <1> ; The mod=0 base=5 special case and the 3947 <1> ; index=4 special case can occur both 3948 <1> ; together. That is a SIB encoding of 3949 <1> ; a 32-bit displacement without any 3950 <1> ; index or base registers. 3951 <1> ; 3952 <1> ; This was noted on stackoverflow.com by 3953 <1> ; Peter Cordes: "x86-32 has 2 redundant 3954 <1> ; ways to encode [0x123456], i.e. no-base 3955 <1> ; + disp32: with or without a SIB byte, 3956 <1> ; because SIB has an encoding for no-base 3957 <1> ; and no-index." (There is a use for this 3958 <1> ; distinction and thus the SIB form only 3959 <1> ; in 64-bit mode but it is accepted as a 3960 <1> ; valid alternative encoding even for us.) 3961 <1> ; 3962 <1> ; - https://stackoverflow.com/questions/48124293/can-rip-be-used-with-another-register-with-rip-relative-addressing/48125453#48125453 3963 00005163 E8F3FF <1> call dop_is_mod_0_and_base_5 3964 00005166 7572 <1> jnz dop28 ; if not mod=0 base=5 --> 3965 <1> ; fall through to dop19 3966 <1> 3967 <1> dop19: 3968 00005168 E88900 <1> call store_opensqubracket 3969 0000516B E8AAFF <1> call disp32_add_to_addrr 3970 <1> ; display 32-bit offset 3971 <1> dop17_j1: 3972 0000516E E95AFF <1> jmp dop17 3973 <1> 3974 <1> add_reg32_to_addrr: 3975 00005171 B90100 <1> mov cx, 1 3976 <1> add_reg32_times_cx_to_addrr: 3977 00005174 50 <1> push ax 3978 00005175 53 <1> push bx 3979 00005176 93 <1> xchg ax, bx 3980 00005177 8B9F[2888] <1> mov bx, word [reg32addr + bx] 3981 <1> @@: 3982 0000517B 8B07 <1> mov ax, word [bx] 3983 0000517D 0106[D087] <1> add word [addrr], ax 3984 00005181 8B4702 <1> mov ax, word [bx + 2] 3985 00005184 1106[D287] <1> adc word [addrr + 2], ax 3986 00005188 E2F1 <1> loop @B 3987 0000518A 5B <1> pop bx 3988 0000518B 58 <1> pop ax 3989 0000518C C3 <1> retn 3990 <1> 3991 <1> dop24: 3992 0000518D E85800 <1> call store_opensqubracket_e 3993 00005190 E84A07 <1> call showreg16 ; show 16-bit register name (number in AL) 3994 00005193 E8BDFE <1> call da_set_default_ss_if_esp_ebp 3995 00005196 E8D8FF <1> call add_reg32_to_addrr 3996 00005199 B05D <1> mov al, ']' 3997 0000519B E85800 <1> call stosb_notnasm 3998 <1> dop25: 3999 0000519E E85E00 <1> call store_plus 4000 <1> 4001 000051A1 A0[9D81] <1> mov al, [sibbyte] 4002 000051A4 E83406 <1> call da_get_bits_3_to_5 ; al = index 4003 <1> ; (In dop23 we already checked this is not = 4 4004 <1> ; which is a special escaping encoding.) 4005 <1> 4006 000051A7 E83E00 <1> call store_opensqubracket_e 4007 <1> 4008 000051AA 8A26[9D81] <1> mov ah, [sibbyte] 4009 000051AE B90100 <1> mov cx, 1 4010 000051B1 F6C4C0 <1> test ah, 0C0h 4011 000051B4 740F <1> jz @F 4012 000051B6 41 <1> inc cx 4013 000051B7 F6C480 <1> test ah, 80h 4014 000051BA 7409 <1> jz @F 4015 000051BC B104 <1> mov cl, 4 4016 000051BE F6C440 <1> test ah, 40h 4017 000051C1 7402 <1> jz @F 4018 000051C3 B108 <1> mov cl, 8 4019 <1> @@: 4020 <1> 4021 000051C5 E81507 <1> call showreg16 4022 000051C8 51 <1> push cx 4023 000051C9 E8A8FF <1> call add_reg32_times_cx_to_addrr 4024 000051CC 59 <1> pop cx 4025 000051CD 49 <1> dec cx ; = 0-based scale 4026 000051CE 7408 <1> jz dop27 ; if scale == 1 (S=00b) --> 4027 000051D0 B02A <1> mov al, '*' 4028 000051D2 AA <1> stosb 4029 000051D3 88C8 <1> mov al, cl 4030 000051D5 0431 <1> add al, '1' ; from 0-based to '1'-based 4031 <1> dop26: 4032 000051D7 AA <1> stosb 4033 <1> dop27: 4034 <1> dop17_j2: 4035 000051D8 EB94 <1> jmp s dop17_j1 4036 <1> 4037 <1> ; 32-bit addressing without SIB 4038 <1> 4039 <1> dop28: 4040 000051DA E80B00 <1> call store_opensqubracket_e 4041 000051DD E8FD06 <1> call showreg16 4042 000051E0 E870FE <1> call da_set_default_ss_if_esp_ebp 4043 000051E3 E88BFF <1> call add_reg32_to_addrr 4044 000051E6 EBF0 <1> jmp short dop27 4045 <1> 4046 <1> ; Store '[' if not NASM syntax, 4047 <1> ; then (regardless of syntax) store 'E' 4048 <1> ; INP: di-> buffer 4049 <1> ; OUT: di-> behind "[E" or 'E' 4050 <1> ; CHG: - 4051 <1> ; 4052 <1> ; The 'E' is lowercased if that option is selected. 4053 <1> store_opensqubracket_e: 4054 000051E8 50 <1> push ax 4055 000051E9 E80800 <1> call store_opensqubracket 4056 000051EC B045 <1> mov al, 'E' 4057 000051EE E80E06 <1> call dis_lowercase 4058 000051F1 AA <1> stosb 4059 000051F2 58 <1> pop ax 4060 000051F3 C3 <1> retn 4061 <1> 4062 <1> ; Store '[' if not NASM syntax 4063 <1> ; INP: di-> buffer 4064 <1> ; OUT: di-> behind '[' if not NASM syntax 4065 <1> ; CHG: al 4066 <1> store_opensqubracket: 4067 000051F4 B05B <1> mov al, '[' 4068 <1> 4069 <1> ; Store al if not NASM syntax 4070 <1> ; INP: di-> buffer 4071 <1> ; OUT: di-> behind stored byte if not NASM syntax 4072 <1> ; CHG: - 4073 <1> stosb_notnasm: 4074 000051F6 F606[AC00]04 <1> testopt [asm_options], disasm_nasm 4075 000051FB 7501 <1> jnz .ret 4076 000051FD AA <1> stosb 4077 000051FE C3 <1> .ret: retn 4078 <1> 4079 <1> ; Store '+' if NASM syntax 4080 <1> ; INP: di-> buffer 4081 <1> ; OUT: di-> behind '+' if NASM syntax 4082 <1> ; CHG: al 4083 <1> store_plus: 4084 000051FF B02B <1> mov al, '+' 4085 <1> 4086 <1> ; Store al if NASM syntax 4087 <1> ; INP: di-> buffer 4088 <1> ; OUT: di-> behind stored byte if NASM syntax 4089 <1> ; CHG: - 4090 <1> stosb_nasm: 4091 00005201 F606[AC00]04 <1> testopt [asm_options], disasm_nasm 4092 00005206 7401 <1> jz .ret 4093 00005208 AA <1> stosb 4094 00005209 C3 <1> .ret: retn 4095 <1> 4096 <1> 4097 <1> ; Memory-only reference (OP_M) 4098 <1> 4099 <1> dop_m: 4100 0000520A E8D505 <1> call getregmem 4101 0000520D 3CC0 <1> cmp al, 0C0h 4102 0000520F 7303E9D0FD <1> jb dop05 ; if it's what we expect --> 4103 <1> 4104 <1> ; it's a register reference 4105 00005214 E95705 <1> disbad1:jmp disbad ; this is not supposed to happen --> 4106 <1> 4107 <1> ; Register reference from MOD R/M part (OP_R_MOD) 4108 <1> 4109 <1> dop_r_mod: 4110 00005217 E8C805 <1> call getregmem 4111 0000521A 3CC0 <1> cmp al,0c0h 4112 0000521C 72F6 <1> jb disbad1 ;if it's a memory reference 4113 0000521E EB03 <1> jmp s dop33 4114 <1> 4115 <1> ; Pure register reference (OP_R) 4116 <1> 4117 <1> dop_r: 4118 00005220 E8B505 <1> call getregmem_r 4119 <1> 4120 <1> dop33: ; <--- used by OP_RM, OP_R_MOD and OP_R_ADD 4121 00005223 2407 <1> and al,7 ;entry point for regs from MOD R/M, and others 4122 00005225 8A0E[D887] <1> mov cl,[disflags2] 4123 00005229 080E[D687] <1> or [disflags],cl ;if it was variable size operand, the size 4124 <1> ;should now be marked as known. 4125 0000522D 80FC00 <1> cmp ah,0 4126 00005230 7C11 <1> jl dop35 ;if byte register 4127 00005232 740D <1> jz dop34 ;if word register 4128 <1> dop33a: 4129 00005234 80FC20 <1> cmp ah, 20h ; qword register (MMX) ? 4130 00005237 7415 <1> je dop35_1 ; --> 4131 00005239 50 <1> push ax 4132 0000523A B045 <1> mov al, 'E' 4133 0000523C E8C005 <1> call dis_lowercase 4134 0000523F AA <1> stosb 4135 00005240 58 <1> pop ax 4136 <1> ;mov byte [di],'E' ;enter here from OP_ECX 4137 <1> ;inc di 4138 <1> dop34: 4139 00005241 0408 <1> add al,8 4140 <1> dop35: 4141 00005243 98 <1> cbw 4142 00005244 D1E0 <1> shl ax,1 4143 00005246 93 <1> xchg ax,bx ;mov bx,ax 4144 00005247 8B87[F287] <1> mov ax,[rgnam816+bx];get the register name 4145 0000524B E93306 <1> jmp dis_stosw_lowercase 4146 <1> 4147 <1> dop35_1: 4148 0000524E 50 <1> push ax 4149 0000524F B84D4D <1> mov ax, "MM" 4150 00005252 E82C06 <1> call dis_stosw_lowercase 4151 00005255 58 <1> pop ax 4152 00005256 0430 <1> add al, '0' 4153 00005258 AA <1> stosb 4154 00005259 C3 <1> retn 4155 <1> 4156 <1> ; Register number embedded in the instruction (OP_R_ADD) 4157 <1> 4158 <1> dop_r_add: 4159 0000525A A0[BF87] <1> mov al,[instru] 4160 0000525D EBC4 <1> jmp s dop33 4161 <1> 4162 <1> ; AL or AX or EAX (OP_AX) 4163 <1> 4164 <1> dop_ax: 4165 0000525F B000 <1> mov al,0 4166 00005261 EBC0 <1> jmp s dop33 4167 <1> 4168 <1> ; QWORD mem (OP_M64) 4169 <1> ; This operand type is used by CMPXCHG8B, FILD and FISTP. 4170 <1> dop_m64: 4171 <1> ;mov ax, 'Q' ; print "QWORD" 4172 00005263 B420 <1> mov ah, 20h ; size QWORD 4173 00005265 EB35 <1> jmp s dop40 4174 <1> 4175 <1> ; FLOAT (=REAL4) mem (OP_MFLOAT) 4176 <1> dop_mfloat: 4177 00005267 B8464C <1> mov ax, "FL" 4178 0000526A E81406 <1> call dis_stosw_lowercase 4179 0000526D B84F41 <1> mov ax, "OA" 4180 00005270 E80E06 <1> call dis_stosw_lowercase 4181 00005273 B85420 <1> mov ax, "T " 4182 00005276 EB15 <1> jmp short dop38c 4183 <1> 4184 <1> ; DOUBLE (=REAL8) mem (OP_MDOUBLE). 4185 <1> 4186 <1> dop_mdouble: 4187 00005278 B8444F <1> mov ax, "DO" 4188 0000527B E80306 <1> call dis_stosw_lowercase 4189 0000527E B85542 <1> mov ax, "UB" 4190 00005281 E8FD05 <1> call dis_stosw_lowercase 4191 00005284 B04C <1> mov al, 'L' 4192 00005286 E87605 <1> call dis_lowercase 4193 00005289 AA <1> stosb 4194 0000528A B84520 <1> mov ax, "E " 4195 <1> dop38c: 4196 0000528D E8F105 <1> call dis_stosw_lowercase 4197 00005290 E82A06 <1> call showptr 4198 00005293 EB1B <1> jmp s dop42a 4199 <1> 4200 <1> ; TBYTE (=REAL10) mem (OP_M80). 4201 <1> 4202 <1> dop_m80: 4203 00005295 B854FF <1> mov ax,0FF00h+'T' ;print 'T' + "BYTE" 4204 00005298 E86405 <1> call dis_lowercase 4205 0000529B AA <1> stosb 4206 <1> dop40: 4207 0000529C E84305 <1> call getregmem 4208 0000529F 3CC0 <1> cmp al,0c0h 4209 000052A1 7317 <1> jae disbad5 ; if it's a register reference 4210 000052A3 800E[D687]80 <1> or byte [disflags], DIS_I_DONTSHOW 4211 <1> ; don't show this 4212 000052A8 E939FD <1> jmp dop05 4213 <1> 4214 <1> %if 0 4215 <1> ; Far memory (OP_FARMEM). 4216 <1> ; This is either a FAR16 (DWORD) or FAR32 (FWORD) pointer. 4217 <1> dop_farmem: 4218 <1> call dischk32d 4219 <1> jz dop41a ; if not dword far 4220 <1> call showdword 4221 <1> dop41a: 4222 <1> mov ax, "FA" ; store "FAR " 4223 <1> call dis_stosw_lowercase 4224 <1> mov ax, "R " 4225 <1> call dis_stosw_lowercase 4226 <1> %endif 4227 <1> 4228 <1> ; mem (OP_MXX). 4229 <1> 4230 <1> dop_mxx: 4231 000052AB 800E[D687]80 <1> or byte [disflags], DIS_I_DONTSHOW 4232 <1> ; don't show this 4233 <1> dop42a: 4234 000052B0 E82F05 <1> call getregmem 4235 000052B3 3CC0 <1> cmp al,0c0h 4236 000052B5 7303E93BFD <1> jb dop06 ; mem ref, don't show size --> 4237 <1> disbad5: 4238 000052BA E9B104 <1> jmp disbad 4239 <1> 4240 <1> ; Far immediate (OP_FARP). Either FAR16 or FAR32. 4241 <1> dop_farimm: 4242 000052BD E8B206 <1> call disgetword 4243 000052C0 50 <1> push ax 4244 000052C1 E82806 <1> call dischk32d 4245 000052C4 7410 <1> jz dop44_word ; if not 32-bit address 4246 <1> 4247 <1> dop44_dword: 4248 <1> %if _PM 4249 000052C6 F606[DB88]40 <1> test byte [bCSAttr],40h ; for 16-bit code segments 4250 000052CB 7503 <1> jnz @F ; no need to display "WORD " 4251 <1> %endif 4252 000052CD E8D505 <1> call showdword 4253 <1> @@: 4254 <1> 4255 000052D0 E89F06 <1> call disgetword 4256 000052D3 50 <1> push ax 4257 000052D4 EB0A <1> jmp dop44_common 4258 <1> 4259 <1> dop44_word: 4260 <1> %if _PM 4261 000052D6 F606[DB88]40 <1> test byte [bCSAttr],40h ; for 32-bit code segments 4262 000052DB 7403 <1> jz @F ; no need to display "DWORD " 4263 000052DD E8CB05 <1> call showword 4264 <1> @@: 4265 <1> %endif 4266 <1> 4267 <1> dop44_common: 4268 000052E0 E88F06 <1> call disgetword 4269 <1> %if _MEMREF_AMOUNT 4270 000052E3 E89F01 <1> call get_free_memref 4271 000052E6 8987[7887] <1> mov word [memrefs + bx + mrSegmentSelector], ax 4272 <1> %endif 4273 000052EA E80167 <1> call hexword 4274 000052ED B03A <1> mov al,':' 4275 000052EF AA <1> stosb 4276 000052F0 E8F905 <1> call dischk32d 4277 000052F3 740D <1> jz dop45 ;if not 32-bit address 4278 000052F5 58 <1> pop ax 4279 <1> %if _MEMREF_AMOUNT 4280 000052F6 8987[7687] <1> mov word [memrefs + bx + mrOffset + 2], ax 4281 000052FA 808F[7A87]10 <1> or byte [memrefs + bx + mrFlags], mrfA32 4282 <1> %endif 4283 000052FF E8EC66 <1> call hexword 4284 <1> dop45: 4285 00005302 58 <1> pop ax 4286 <1> %if _MEMREF_AMOUNT 4287 00005303 8987[7487] <1> mov word [memrefs + bx + mrOffset], ax 4288 00005307 808F[7A87]01 <1> or byte [memrefs + bx + mrFlags], mrfBranchDirect 4289 0000530C E89101 <1> call calc_linear_memref_and_mark_nonfree 4290 <1> %endif 4291 0000530F E9DC66 <1> jmp hexword 4292 <1> 4293 <1> 4294 <1> %if _COND 4295 <1> ; INP: [presizeflags] & PRE32A, d[reg_ecx] 4296 <1> ; OUT: dx:ax = (e)cx 4297 <1> cond_get_ecx: 4298 00005312 A1[6C0C] <1> mov ax, word [reg_ecx] 4299 00005315 F606[BE87]20 <1> test byte [presizeflags], PRE32A ; A32 ? 4300 0000531A 8B16[6E0C] <1> mov dx, word [reg_ecx+2] 4301 0000531E 7502 <1> jnz .ecx 4302 00005320 31D2 <1> xor dx, dx 4303 <1> .ecx: 4304 00005322 C3 <1> retn 4305 <1> 4306 <1> ; INP: ax = 0..15 condition code, else invalid 4307 <1> ; OUT: w[condmsg] set as appropriate 4308 <1> cond_handle: 4309 00005323 83F80F <1> cmp ax, 15 4310 00005326 7738 <1> ja .return 4311 00005328 8B0E[A00C] <1> mov cx, word [reg_efl] ; get flags 4312 0000532C 89C3 <1> mov bx, ax 4313 0000532E 80E3FE <1> and bl, ~1 ; make even 4314 00005331 2401 <1> and al, 1 ; 1 if negated condition 4315 00005333 80FB0C <1> cmp bl, 12 ; L/GE or LE/G? 4316 00005336 7306 <1> jae .specific ; yes --> 4317 <1> 4318 00005338 858F[6088] <1> test cx, [cond_table+bx]; flag(s) set ? 4319 0000533C EB14 <1> jmp short .jump_ZF ; NZ if (normal) condition true --> 4320 <1> 4321 <1> .specific: 4322 0000533E 80FB0E <1> cmp bl, 14 4323 00005341 7205 <1> jb .L_GE 4324 <1> 4325 <1> ; Handle LE/NG and G/NLE conditions. 4326 <1> ; The former says ZF | (OF ^ SF). 4327 <1> .LE_G: 4328 00005343 F6C140 <1> test cl, 40h ; ZF | .. 4329 00005346 750C <1> jnz .jump_true 4330 <1> 4331 <1> ; Handle L/NGE and GE/NL conditions. 4332 <1> ; The former says OF ^ SF. 4333 <1> .L_GE: 4334 00005348 81E18008 <1> and cx, 880h ; OF ^ SF 4335 0000534C 7408 <1> jz .jump_false ; both clear --> 4336 0000534E 81F18008 <1> xor cx, 880h 4337 <1> .jump_ZF: 4338 00005352 7402 <1> jz .jump_false ; both set --> (or ZR: (normal) condition false) 4339 <1> .jump_true: 4340 00005354 3401 <1> xor al, 1 ; (negating ^ raw truth) = cooked truth 4341 <1> .jump_false: 4342 00005356 84C0 <1> test al, al ; true ? 4343 00005358 7507 <1> jnz .msg_jumping ; yes --> 4344 <1> 4345 <1> .msg_notjumping: 4346 0000535A C706[DC87][4C80] <1> mov word [condmsg], msg.condnotjump 4347 <1> .return: 4348 00005360 C3 <1> retn 4349 <1> 4350 <1> .msg_jumping: 4351 00005361 C706[DC87][5080] <1> mov word [condmsg], msg.condjump 4352 00005367 C3 <1> retn 4353 <1> %endif 4354 <1> 4355 <1> 4356 <1> ; 8-bit relative jump (OP_REL8) 4357 <1> 4358 <1> dop_rel8: 4359 <1> %if _COND 4360 00005368 A1[C287] <1> mov ax, word [index] 4361 0000536B 3DE300 <1> cmp ax, 0E3h 4362 0000536E 772C <1> ja .cond_done ; no conditional jump --> 4363 00005370 7211 <1> jb .cond_noncx ; not jcxz, check for other --> 4364 <1> 4365 00005372 E89DFF <1> call cond_get_ecx 4366 00005375 09D0 <1> or ax, dx 4367 00005377 7405 <1> jz .cond_msg_jumping 4368 <1> .cond_msg_notjumping: 4369 00005379 E8DEFF <1> call cond_handle.msg_notjumping 4370 0000537C EB1E <1> jmp short .cond_done 4371 <1> 4372 <1> .cond_msg_jumping: 4373 0000537E E8E0FF <1> call cond_handle.msg_jumping 4374 00005381 EB19 <1> jmp short .cond_done 4375 <1> 4376 <1> .cond_noncx: 4377 00005383 3CE0 <1> cmp al, 0E0h 4378 00005385 7210 <1> jb .cond_nonloop ; not loop, check for other --> 4379 <1> 4380 00005387 50 <1> push ax 4381 00005388 E887FF <1> call cond_get_ecx 4382 0000538B 48 <1> dec ax ; = 0 if cx is 1 4383 0000538C 09D0 <1> or ax, dx ; = 0 if cx is 1 and ecx is cx 4384 0000538E 58 <1> pop ax 4385 0000538F 74E8 <1> jz .cond_msg_notjumping ; if (e)cx is 1 --> 4386 00005391 3CE2 <1> cmp al, 0E2h 4387 00005393 74E9 <1> je .cond_msg_jumping ; loop without additional condition --> 4388 00005395 3495 <1> xor al, 0E0h^75h ; E0h (loopnz) to 75h (jnz), 4389 <1> ; E1h (loopz) to 74h (jz) 4390 <1> 4391 <1> .cond_nonloop: 4392 00005397 2C70 <1> sub al, 70h ; (ah = 0) 4393 00005399 E887FF <1> call cond_handle ; call common code (checks for ax < 16) 4394 <1> .cond_done: 4395 <1> %endif 4396 0000539C E8B705 <1> call disgetbyte 4397 0000539F 98 <1> cbw 4398 000053A0 A2[C087] <1> mov byte [disp8], al 4399 000053A3 E99E00 <1> jmp dop48 4400 <1> 4401 <1> ; 16/32-bit relative jump (OP_REL1632) 4402 <1> 4403 <1> dop_rel1632: 4404 <1> %if _COND 4405 000053A6 A1[C287] <1> mov ax, word [index] 4406 000053A9 2D6002 <1> sub ax, SPARSE_BASE+80h 4407 000053AC E874FF <1> call cond_handle 4408 <1> %endif 4409 000053AF E8C005 <1> call disgetword 4410 000053B2 E83705 <1> call dischk32d 4411 000053B5 7465 <1> jz dop48_near ; if not 32-bit offset 4412 000053B7 92 <1> xchg ax, dx ; mov dx, ax 4413 000053B8 E8B705 <1> call disgetword 4414 <1> 4415 000053BB 813E[C287]E800 <1> cmp word [index], 00E8h 4416 000053C1 7429 <1> je .not_show_keyword ; no need to distinguish NEAR call --> 4417 <1> ; ax:dx between FFFFh:FF80h (-128) .. 0000h:007Fh (127): 4418 <1> ; == show "NEAR" keyword 4419 <1> ; 4420 <1> ; Note: This is not entirely correct. If a jump short is 4421 <1> ; used, the actual opcode is shorter, thus the 4422 <1> ; exact distance that can be reached by the jump short 4423 <1> ; differs from what the jump near can reach with 4424 <1> ; a rel16/32 displacement between -128..127. 4425 000053C3 83F8FF <1> cmp ax, -1 4426 000053C6 7410 <1> je .checkminus 4427 000053C8 85C0 <1> test ax, ax 4428 000053CA 7520 <1> jnz .not_show_keyword 4429 <1> .checkplus: 4430 000053CC 83FA7F <1> cmp dx, byte 127 4431 000053CF 7F1B <1> jg .not_show_keyword 4432 000053D1 83FA00 <1> cmp dx, 0 4433 000053D4 7C16 <1> jl .not_show_keyword 4434 000053D6 EB0A <1> jmp .show_keyword 4435 <1> 4436 <1> .checkminus: 4437 000053D8 83FA80 <1> cmp dx, byte -128 4438 000053DB 7C0F <1> jl .not_show_keyword 4439 000053DD 83FA00 <1> cmp dx, 0 4440 000053E0 7D0A <1> jge .not_show_keyword 4441 <1> 4442 <1> .show_keyword: 4443 000053E2 F606[AC00]20 <1> testopt [asm_options], disasm_show_near 4444 000053E7 7503 <1> jnz .not_show_keyword 4445 000053E9 E87003 <1> call dop_show_near 4446 <1> .not_show_keyword: 4447 <1> 4448 <1> %if _PM 4449 000053EC F606[DB88]40 <1> test byte [bCSAttr],40h ; for 32-bit code segments 4450 000053F1 7505 <1> jnz @F ; no need to display "DWORD " 4451 <1> %endif 4452 000053F3 50 <1> push ax 4453 000053F4 E8AE04 <1> call showdword 4454 000053F7 58 <1> pop ax 4455 <1> @@: 4456 <1> 4457 000053F8 8B1E[1E0B] <1> mov bx,[u_addr+0] 4458 000053FC 031E[B887] <1> add bx,[dis_n] 4459 00005400 1306[BA87] <1> adc ax,[dis_n + 2] 4460 00005404 01DA <1> add dx,bx 4461 <1> %if _PM 4462 00005406 1306[200B] <1> adc ax,[u_addr+2] 4463 <1> %else 4464 <1> adc ax, 0 4465 <1> %endif 4466 <1> %if _MEMREF_AMOUNT 4467 0000540A E87800 <1> call get_free_memref 4468 0000540D 8987[7687] <1> mov word [memrefs + bx + mrOffset + 2], ax 4469 00005411 808F[7A87]10 <1> or byte [memrefs + bx + mrFlags], mrfA32 4470 <1> %endif 4471 00005416 E8D565 <1> call hexword 4472 00005419 92 <1> xchg ax,dx 4473 0000541A EB4F <1> jmp s dop_branch_word 4474 <1> 4475 <1> 4476 <1> dop48_near: 4477 0000541C 813E[C287]E800 <1> cmp word [index], 00E8h 4478 00005422 7414 <1> je @F ; no need to distinguish NEAR call --> 4479 <1> ; ax between FF80h (-128) .. 007Fh (127): 4480 <1> ; == show "NEAR" keyword 4481 <1> ; 4482 <1> ; Note: This is not entirely correct. If a jump short is 4483 <1> ; used, the actual opcode is shorter, thus the 4484 <1> ; exact distance that can be reached by the jump short 4485 <1> ; differs from what the jump near can reach with 4486 <1> ; a rel16/32 displacement between -128..127. 4487 00005424 83F880 <1> cmp ax, byte -128 4488 00005427 7C0F <1> jl @F 4489 00005429 83F87F <1> cmp ax, byte 127 4490 0000542C 7F0A <1> jg @F 4491 0000542E F606[AC00]20 <1> testopt [asm_options], disasm_show_near 4492 00005433 7503 <1> jnz @F 4493 00005435 E82403 <1> call dop_show_near 4494 <1> @@: 4495 <1> 4496 <1> %if _PM 4497 00005438 F606[DB88]40 <1> test byte [bCSAttr],40h ; for 16-bit code segments 4498 0000543D 7405 <1> jz @F ; no need to display "WORD " 4499 0000543F 50 <1> push ax 4500 00005440 E86804 <1> call showword 4501 00005443 58 <1> pop ax 4502 <1> @@: 4503 <1> %endif 4504 <1> 4505 <1> dop48: 4506 00005444 99 <1> cwd 4507 00005445 0306[1E0B] <1> add ax, word [u_addr] 4508 <1> %if _PM 4509 00005449 1316[200B] <1> adc dx, word [u_addr + 2] 4510 <1> %else 4511 <1> adc dx, 0 4512 <1> %endif 4513 0000544D 0306[B887] <1> add ax, word [dis_n] 4514 00005451 1316[BA87] <1> adc dx, word [dis_n + 2] 4515 00005455 E89404 <1> call dischk32d ; 32-bit opsize ? 4516 00005458 7411 <1> jz .16 ; no --> 4517 0000545A 92 <1> xchg ax, dx 4518 0000545B E89065 <1> call hexword ; yes, display high word 4519 0000545E 92 <1> xchg ax, dx 4520 <1> %if _MEMREF_AMOUNT 4521 0000545F E82300 <1> call get_free_memref 4522 00005462 8997[7687] <1> mov word [memrefs + bx + mrOffset + 2], dx 4523 00005466 808F[7A87]10 <1> or byte [memrefs + bx + mrFlags], mrfA32 4524 <1> %endif 4525 <1> .16: 4526 <1> 4527 <1> dop_branch_word: 4528 <1> %if _MEMREF_AMOUNT 4529 0000546B E81700 <1> call get_free_memref 4530 0000546E 8987[7487] <1> mov word [memrefs + bx + mrOffset], ax 4531 00005472 FF36[220B] <1> push word [u_addr + saSegSel] 4532 00005476 8F87[7887] <1> pop word [memrefs + bx + mrSegmentSelector] 4533 0000547A 808F[7A87]01 <1> or byte [memrefs + bx + mrFlags], mrfBranchDirect 4534 0000547F E81E00 <1> call calc_linear_memref_and_mark_nonfree 4535 <1> %endif 4536 00005482 E96965 <1> jmp hexword ; call hexword and return 4537 <1> 4538 <1> 4539 <1> %if _MEMREF_AMOUNT 4540 <1> ; INP: word [memrefs.free] 4541 <1> ; OUT: bx = byte index into memref array 4542 <1> ; CHG: - 4543 <1> ; STT: ss = ds = es 4544 <1> get_free_memref: 4545 00005485 8B1E[B087] <1> mov bx, [memrefs.free] 4546 <1> get_memref_index_bx: 4547 00005489 83FB04 <1> cmp bx, _MEMREF_AMOUNT 4548 0000548C 7309 <1> jae @F 4549 0000548E 01DB <1> add bx, bx 4550 00005490 01DB <1> add bx, bx 4551 00005492 01DB <1> add bx, bx 4552 00005494 01DB <1> add bx, bx 4553 <1> %if MEMREF_size != 16 4554 <1> %error Adjust multiplication 4555 <1> %endif 4556 00005496 C3 <1> retn 4557 <1> 4558 <1> @@: 4559 00005497 BA[A671] <1> mov dx, msg.memrefs_invalid_internal 4560 0000549A E80769 <1> call putsz 4561 0000549D E960AB <1> jmp cmd3 4562 <1> 4563 <1> 4564 <1> ; INP: word [memrefs.free] 4565 <1> ; [memrefs] array entry 4566 <1> ; OUT: NC if valid segmented address (getlinear succeeded), 4567 <1> ; dword [memrefs + x + mrLinear] filled 4568 <1> ; word [memrefs.free] incremented 4569 <1> ; CY if invalid address, 4570 <1> ; [memrefs + x] re-initialised 4571 <1> ; word [memrefs.free] left unmodified 4572 <1> ; CHG: - 4573 <1> ; STT: ss = ds = es 4574 <1> calc_linear_memref_and_mark_nonfree: 4575 000054A0 50 <1> push ax 4576 000054A1 53 <1> push bx 4577 000054A2 66 <1> _386_PM_o32 4578 000054A3 52 <1> push dx 4579 000054A4 E8DEFF <1> call get_free_memref 4580 000054A7 53 <1> push bx 4581 000054A8 66 <1> _386_PM_o32 4582 000054A9 8B97[7487] <1> mov dx, word [memrefs + bx + mrOffset] 4583 000054AD 8B9F[7887] <1> mov bx, word [memrefs + bx + mrSegmentSelector] 4584 000054B1 E8ACE2 <1> call getlinear 4585 000054B4 5B <1> pop bx 4586 000054B5 7211 <1> jc .error 4587 <1> 4588 000054B7 8987[7087] <1> mov word [memrefs + bx + mrLinear], ax 4589 000054BB 8997[7287] <1> mov word [memrefs + bx + mrLinear + 2], dx 4590 000054BF FF06[B087] <1> inc word [memrefs.free] 4591 <1> 4592 <1> ; clc 4593 <1> .return: 4594 000054C3 66 <1> _386_PM_o32 4595 000054C4 5A <1> pop dx 4596 000054C5 5B <1> pop bx 4597 000054C6 58 <1> pop ax 4598 000054C7 C3 <1> retn 4599 <1> 4600 <1> .error: 4601 000054C8 57 <1> push di 4602 000054C9 8DBF[7087] <1> lea di, [memrefs + bx] 4603 000054CD E80400 <1> call init_one_memref 4604 000054D0 5F <1> pop di 4605 000054D1 F9 <1> stc 4606 000054D2 EBEF <1> jmp .return 4607 <1> 4608 <1> 4609 <1> ; INP: di -> memref to initialise 4610 <1> ; OUT: ax = 0 4611 <1> ; di -> past initialised memref 4612 <1> ; CHG: - 4613 <1> ; STT: ss = ds = es 4614 <1> init_one_memref: 4615 000054D4 31C0 <1> xor ax, ax 4616 <1> 4617 <1> ; INP: di -> memref to initialise 4618 <1> ; ax = 0 4619 <1> ; OUT: di -> past initialised memref 4620 <1> ; CHG: - 4621 <1> ; STT: ss = ds = es 4622 <1> .ax_already_zero: 4623 000054D6 AB <1> stosw ; zero-initialise all memrefs 4624 000054D7 AB <1> stosw ; mrLinear 4625 000054D8 AB <1> stosw 4626 000054D9 AB <1> stosw ; mrOffset 4627 000054DA AB <1> stosw ; mrSegmentSelector 4628 000054DB AB <1> stosw ; mrFlags 4629 000054DC 40 <1> inc ax 4630 000054DD AB <1> stosw 4631 000054DE 48 <1> dec ax 4632 000054DF AB <1> stosw ; mrLength = 1 4633 000054E0 C3 <1> retn 4634 <1> 4635 <1> 4636 <1> ; INP: si = address of segreg (reg_cs, reg_ds, etc) 4637 <1> ; di = address of index reg (reg_esi or reg_edi) 4638 <1> ; [memrefs] 4639 <1> ; [presizeflags] 4640 <1> ; byte [index] = which opcode 4641 <1> ; [reg_ecx] 4642 <1> ; [reg_efl] & 400h = Direction Flag 4643 <1> ; OUT: memrefs + bx -> current memref (partially filled) 4644 <1> ; CHG: bx, si, di, cx, dx 4645 <1> init_string_memref: 4646 000054E1 E8A1FF <1> call get_free_memref 4647 000054E4 FF34 <1> push word [si] ; get segment/selector 4648 000054E6 8F87[7887] <1> pop word [memrefs + bx + mrSegmentSelector] 4649 <1> ; store segment/selector 4650 000054EA FF35 <1> push word [di] 4651 000054EC 8F87[7487] <1> pop word [memrefs + bx + mrOffset] 4652 <1> ; store low word of offset 4653 000054F0 8B0E[B687] <1> mov cx, word [string_memref_counter + 2] 4654 000054F4 8B16[B487] <1> mov dx, word [string_memref_counter] 4655 <1> 4656 000054F8 F606[BE87]20 <1> test byte [presizeflags], PRE32A 4657 000054FD 740C <1> jz @F ; if 16-bit addressing --> 4658 000054FF FF7502 <1> push word [di + 2] 4659 00005502 8F87[7687] <1> pop word [memrefs + bx + mrOffset + 2] 4660 <1> ; store high word of offset 4661 00005506 808F[7A87]10 <1> or byte [memrefs + bx + mrFlags], mrfA32 4662 <1> ; remember that it is a32 4663 <1> @@: 4664 <1> 4665 0000550B F606[BC87]02 <1> test byte [preflags], PREREP 4666 00005510 7505 <1> jnz @F ; if to take (e)cx repetitions --> 4667 00005512 BA0100 <1> mov dx, 1 4668 00005515 31C9 <1> xor cx, cx ; cx:dx = 1, just one element 4669 <1> @@: 4670 <1> 4671 00005517 50 <1> push ax 4672 00005518 B80100 <1> mov ax, 1 4673 0000551B F606[C287]01 <1> test byte [index], 1 ; element size is byte ? 4674 00005520 740A <1> jz @F ; yes, ax = 1 4675 00005522 40 <1> inc ax ; = 2 4676 00005523 F606[BE87]10 <1> test byte [presizeflags], PRE32D 4677 <1> ; element size is word ? 4678 00005528 7402 <1> jz @F ; yes, ax = 2 4679 0000552A 01C0 <1> add ax, ax ; = 4 4680 <1> @@: 4681 <1> 4682 0000552C 3C01 <1> cmp al, 1 ; byte size ? 4683 0000552E 7415 <1> je @F ; yes, do not multiply --> 4684 00005530 01D2 <1> add dx, dx 4685 00005532 11C9 <1> adc cx, cx ; * 2, word to byte 4686 00005534 720A <1> jc .carry_counter 4687 00005536 3C02 <1> cmp al, 2 ; word size ? 4688 00005538 740B <1> je @F ; yes, done multiplying --> 4689 0000553A 01D2 <1> add dx, dx 4690 0000553C 11C9 <1> adc cx, cx ; * 4, dword to byte 4691 0000553E 7305 <1> jnc @F 4692 <1> .carry_counter: 4693 00005540 BAFFFF <1> mov dx, -1 4694 00005543 89D1 <1> mov cx, dx ; in case the counter is large 4695 <1> ; A carry out of an a16 address is not yet handled. 4696 <1> ; Note that eg cx=8000h a16 movsw may be valid to 4697 <1> ; copy exactly 64 KiB. Likewise, technically a 4698 <1> ; size of exactly 4 GiB is valid; however, our 4699 <1> ; memref format cannot store that. 4700 <1> @@: 4701 00005545 8997[7C87] <1> mov word [memrefs + bx + mrLength], dx 4702 00005549 898F[7E87] <1> mov word [memrefs + bx + mrLength + 2], cx 4703 <1> 4704 0000554D F606[A10C]04 <1> testopt [reg_efl], 400h ; DF set ? 4705 00005552 7411 <1> jz @F 4706 <1> 4707 00005554 0187[7487] <1> add word [memrefs + bx + mrOffset], ax 4708 00005558 8397[7687]00 <1> adc word [memrefs + bx + mrOffset + 2], 0 4709 0000555D 2997[7487] <1> sub word [memrefs + bx + mrOffset], dx 4710 00005561 198F[7687] <1> sbb word [memrefs + bx + mrOffset + 2], cx 4711 <1> 4712 <1> @@: 4713 00005565 58 <1> pop ax 4714 00005566 C3 <1> retn 4715 <1> %endif 4716 <1> 4717 <1> 4718 <1> ; Check for ST(1) (OP_1CHK). 4719 <1> 4720 <1> dop49: 4721 00005567 58 <1> pop ax ;discard return address 4722 00005568 A0[9C81] <1> mov al,[regmem] 4723 0000556B 2407 <1> and al,7 4724 0000556D 3C01 <1> cmp al,1 4725 0000556F 7403 <1> je dop50 ;if it's ST(1) 4726 00005571 E96FF3 <1> jmp da14 ;another operand (but no comma) 4727 <1> 4728 <1> dop50: 4729 00005574 E902F4 <1> jmp da_op_end ; end of list --> 4730 <1> 4731 <1> ; ST(I) (OP_STI). 4732 <1> 4733 <1> dop_sti: 4734 00005577 A0[9C81] <1> mov al, byte [regmem] 4735 0000557A 2407 <1> and al, 7 4736 0000557C 93 <1> xchg ax, bx ;mov bx,ax 4737 0000557D B85354 <1> mov ax, 'ST' 4738 00005580 E8FE02 <1> call dis_stosw_lowercase; store ST(bl) 4739 00005583 B028 <1> mov al, '(' 4740 00005585 AA <1> stosb 4741 00005586 B83029 <1> mov ax, '0)' 4742 00005589 08D8 <1> or al, bl 4743 0000558B AB <1> stosw 4744 0000558C C3 <1> retn 4745 <1> 4746 <1> ; CRx (OP_CR). 4747 <1> 4748 <1> dop_cr: 4749 0000558D BB4352 <1> mov bx,'CR' 4750 00005590 E84502 <1> call getregmem_r 4751 00005593 3C04 <1> cmp al,4 4752 00005595 7713 <1> ja disbad4 ;if too large 4753 00005597 7505 <1> jne dop52a 4754 00005599 C606[A281]05 <1> mov byte [dismach],5 ;CR4 is new to the 586 4755 <1> dop52a: 4756 0000559E 813E[C287]0202 <1> cmp word [index],SPARSE_BASE+22h 4757 000055A4 7528 <1> jne dop55 ;if not MOV CRx,xx 4758 000055A6 3C01 <1> cmp al,1 4759 000055A8 7524 <1> jne dop55 ;if not CR1 4760 <1> 4761 000055AA E9C101 <1> disbad4:jmp disbad ;can't MOV CR1,xx 4762 <1> 4763 <1> ; DRx (OP_DR). 4764 <1> 4765 <1> dop_dr: 4766 000055AD E82802 <1> call getregmem_r 4767 000055B0 BB4452 <1> mov bx,'DR' 4768 000055B3 B9FFFF <1> mov cx,-1 ;no max or illegal value 4769 000055B6 EB16 <1> jmp s dop55 4770 <1> 4771 <1> ; TRx (OP_TR). 4772 <1> 4773 <1> dop_tr: 4774 000055B8 E81D02 <1> call getregmem_r 4775 000055BB 3C03 <1> cmp al,3 4776 000055BD 7303E9AC01 <1> jb disbad ;if too small 4777 000055C2 3C06 <1> cmp al,6 4778 000055C4 7305 <1> jae dop54a ;if TR6-7 4779 000055C6 C606[A281]04 <1> mov byte [dismach],4 ;TR3-5 are new to the 486 4780 <1> dop54a: 4781 000055CB BB5452 <1> mov bx,'TR' 4782 <1> 4783 <1> dop55: 4784 000055CE 93 <1> xchg ax, bx 4785 000055CF E8AF02 <1> call dis_stosw_lowercase; store XX 4786 000055D2 93 <1> xchg ax, bx 4787 000055D3 0C30 <1> or al, '0' 4788 000055D5 AA <1> stosb 4789 000055D6 C3 <1> retn 4790 <1> 4791 <1> ; Segment register (OP_SEGREG). 4792 <1> 4793 <1> dop_segreg: 4794 000055D7 E8FE01 <1> call getregmem_r 4795 000055DA 3C06 <1> cmp al,6 4796 000055DC 7203E98D01 <1> jae disbad ; if not a segment register --> 4797 000055E1 3C02 <1> cmp al,2 4798 000055E3 7505 <1> jne @F ; if not SS --> 4799 000055E5 800E[D687]40 <1> or byte [disflags], DIS_I_MOV_SS ; note this 4800 <1> @@: 4801 000055EA 3C04 <1> cmp al,4 4802 000055EC 7205 <1> jb dop57a ;if not FS or GS 4803 000055EE C606[A281]03 <1> mov byte [dismach],3;(no new 486-686 instructions involve seg regs) 4804 <1> dop57a: 4805 000055F3 0410 <1> add al,16 4806 000055F5 E94BFC <1> jmp dop35 ;go print it out 4807 <1> 4808 <1> ; Sign-extended immediate byte (OP_IMMS8). "push xx" 4809 <1> 4810 <1> dop_imms8: 4811 000055F8 E85B03 <1> call disgetbyte 4812 000055FB 3C00 <1> cmp al,0 4813 000055FD 93 <1> xchg ax,bx ;mov bl,al 4814 000055FE B02B <1> mov al,'+' 4815 00005600 7D04 <1> jge dop58a ;if >= 0 4816 00005602 F6DB <1> neg bl 4817 00005604 B02D <1> mov al,'-' 4818 <1> dop58a: 4819 00005606 AA <1> stosb 4820 00005607 93 <1> xchg ax,bx ;mov al,bl 4821 00005608 EB03 <1> jmp s dop59a ;call hexbyte and return 4822 <1> 4823 <1> 4824 <1> ; Immediate byte (OP_IMM8). 4825 <1> 4826 <1> dop_imm8: 4827 0000560A E84903 <1> call disgetbyte 4828 <1> dop59a: 4829 0000560D E9E563 <1> jmp hexbyte ;call hexbyte and return 4830 <1> 4831 <1> 4832 <1> dop_imm8_int: 4833 00005610 E84303 <1> call disgetbyte 4834 00005613 3C03 <1> cmp al, 3 4835 00005615 75F6 <1> jne dop59a 4836 00005617 50 <1> push ax 4837 00005618 E87F02 <1> call showsize.byte 4838 0000561B 58 <1> pop ax 4839 0000561C EBEF <1> jmp dop59a 4840 <1> 4841 <1> 4842 <1> ; Show MMx reg (OP_MMX; previously was "Show ECX if 32-bit LOOPxx"). 4843 <1> dop_mmx: 4844 0000561E BB4D4D <1> mov bx, "MM" 4845 00005621 E8B401 <1> call getregmem_r 4846 00005624 EBA8 <1> jmp short dop55 4847 <1> 4848 <1> ; MMX register (in ModR/M part) 4849 <1> dop_mmx_mod: 4850 00005626 BB4D4D <1> mov bx, "MM" 4851 00005629 E8B601 <1> call getregmem 4852 0000562C 3CC0 <1> cmp al, 0C0h 4853 0000562E 7303E93B01 <1> jb disbad ; needs to be encoded as register --> 4854 00005633 2407 <1> and al, 7 4855 00005635 EB97 <1> jmp short dop55 4856 <1> 4857 <1> 4858 <1> %if _MEMREF_AMOUNT 4859 <1> dop_stack_push: 4860 00005637 B80200 <1> mov ax, 2 4861 <1> .special: 4862 0000563A F606[BE87]10 <1> test byte [presizeflags], PRE32D 4863 0000563F 7402 <1> jz .iso16 4864 00005641 01C0 <1> add ax, ax 4865 <1> .iso16: 4866 00005643 E83FFE <1> call get_free_memref ; memrefs + bx -> the memref structure 4867 <1> 4868 00005646 8987[7C87] <1> mov word [memrefs + bx + mrLength], ax 4869 0000564A 8B0E[760C] <1> mov cx, word [reg_esp + 2] 4870 0000564E 8B16[740C] <1> mov dx, word [reg_esp] 4871 00005652 29C2 <1> sub dx, ax 4872 00005654 83D900 <1> sbb cx, 0 4873 <1> 4874 00005657 8997[7487] <1> mov word [memrefs + bx + mrOffset], dx 4875 <1> 4876 0000565B B20A <1> mov dl, mrfMemDest | mrfMem 4877 <1> 4878 0000565D EB21 <1> jmp dop_stack_common 4879 <1> 4880 <1> 4881 <1> dop_stack_pop: 4882 0000565F B80200 <1> mov ax, 2 4883 <1> .special: 4884 00005662 8B0E[760C] <1> mov cx, word [reg_esp + 2] 4885 00005666 8B16[740C] <1> mov dx, word [reg_esp] 4886 <1> .leave: 4887 0000566A F606[BE87]10 <1> test byte [presizeflags], PRE32D 4888 0000566F 7402 <1> jz .iso16 4889 00005671 01C0 <1> add ax, ax 4890 <1> .iso16: 4891 00005673 E80FFE <1> call get_free_memref ; memrefs + bx -> the memref structure 4892 <1> 4893 00005676 8987[7C87] <1> mov word [memrefs + bx + mrLength], ax 4894 <1> 4895 0000567A 8997[7487] <1> mov word [memrefs + bx + mrOffset], dx 4896 <1> 4897 0000567E B206 <1> mov dl, mrfMemSource | mrfMem 4898 <1> 4899 <1> dop_stack_common: 4900 00005680 A1[8C0C] <1> mov ax, word [reg_ss] ; get ss selector into ax 4901 00005683 8987[7887] <1> mov word [memrefs + bx + mrSegmentSelector], ax 4902 <1> 4903 00005687 93 <1> _386_PM xchg ax, bx ; selector in bx 4904 00005688 E8AB06 <1> _386_PM call test_d_b_bit ; check whether a 32-bit ss 4905 0000568B 93 <1> _386_PM xchg ax, bx 4906 0000568C 7407 <1> _386_PM jz .isstack16 4907 0000568E 80CA10 <1> _386_PM or dl, mrfA32 4908 00005691 898F[7687] <1> _386_PM mov word [memrefs + bx + mrOffset + 2], cx 4909 <1> .isstack16: 4910 <1> 4911 00005695 0897[7A87] <1> or byte [memrefs + bx + mrFlags], dl 4912 00005699 E804FE <1> call calc_linear_memref_and_mark_nonfree 4913 0000569C EB54 <1> jmp dop_continue_maybe_end 4914 <1> 4915 <1> 4916 <1> dop_stack_special: 4917 0000569E A1[C287] <1> mov ax, [index] 4918 000056A1 3D3301 <1> cmp ax, GROUP7 + 3 ; call far [mem] ? 4919 000056A4 7414 <1> je .callfar 4920 000056A6 84E4 <1> test ah, ah 4921 000056A8 7545 <1> jnz .error 4922 000056AA 57 <1> push di 4923 000056AB BF[9C88] <1> mov di, .bytes ; list of opcodes 4924 000056AE B90B00 <1> mov cx, .bytes_amount 4925 000056B1 F2AE <1> repne scasb 4926 000056B3 8A450A <1> mov al, [di + .bytes_amount - 1] 4927 000056B6 5F <1> pop di 4928 000056B7 7536 <1> jne .error ; if not one of these --> 4929 <1> 4930 000056B9 A9 <1> db __TEST_IMM16 ; (skip mov) 4931 <1> .callfar: 4932 000056BA B044 <1> mov al, 40h + 4 4933 <1> 4934 <1> .haveinfo: 4935 000056BC 89C3 <1> mov bx, ax 4936 000056BE 83E03F <1> and ax, 3Fh 4937 000056C1 80FB80 <1> cmp bl, 80h 4938 000056C4 739C <1> jae dop_stack_pop.special 4939 000056C6 80FB40 <1> cmp bl, 40h 4940 000056C9 7203E96CFF <1> jae dop_stack_push.special 4941 000056CE 84C0 <1> test al, al 4942 000056D0 740F <1> jz .leave 4943 000056D2 3C01 <1> cmp al, 1 4944 000056D4 7519 <1> jne .error 4945 <1> .into: 4946 000056D6 F606[A10C]08 <1> testopt [reg_efl], 800h 4947 000056DB 7415 <1> jz .none 4948 000056DD B046 <1> mov al, 40h + 6 4949 000056DF EBDB <1> jmp .haveinfo 4950 <1> 4951 <1> .leave: 4952 000056E1 B80200 <1> mov ax, 2 ; pop size = 1 word or 1 dword 4953 000056E4 8B0E[7A0C] <1> mov cx, word [reg_ebp + 2] 4954 000056E8 8B16[780C] <1> mov dx, word [reg_ebp] ; pop from address in (e)bp, not (e)sp 4955 000056EC E97BFF <1> jmp dop_stack_pop.leave 4956 <1> 4957 <1> .error: 4958 000056EF E94BF2 <1> jmp da_internal_error 4959 <1> 4960 <1> usesection lDEBUG_DATA_ENTRY 4961 <1> 4962 <1> .bytes: 4963 0000889C CDCE <1> db 0CDh, 0CEh ; int, into 4964 0000889E CCF1 <1> db 0CCh, 0F1h ; int3, int1 4965 000088A0 9A <1> db 9Ah ; call far imm:imm 4966 000088A1 CFCACB <1> db 0CFh, 0CAh, 0CBh ; iret, retf imm, retf 4967 000088A4 60 <1> db 60h ; pusha 4968 000088A5 61 <1> db 61h ; popa 4969 000088A6 C9 <1> db 0C9h ; leave 4970 <1> .bytes_amount: equ $ - .bytes 4971 <1> 4972 <1> ; In this table the bits have the following meaning: 4973 <1> ; 4974 <1> ; flag 80h: special pop 4975 <1> ; flag 40h: special push 4976 <1> ; if neither flag set: unusual, for leave and into 4977 <1> ; else: masked with 3Fh gives amount of bytes to push/pop 4978 <1> ; in o16, which needs to be doubled to get the amount 4979 <1> ; to push/pop in o32 instead. 4980 <1> .info: 4981 000088A7 46 <1> db 40h + 6 ; int 4982 000088A8 01 <1> db 1 ; into 4983 000088A9 46 <1> db 40h + 6 ; int3 4984 000088AA 46 <1> db 40h + 6 ; int1 4985 000088AB 44 <1> db 40h + 4 ; call far imm:imm 4986 000088AC 86 <1> db 80h + 6 ; iret 4987 000088AD 84 <1> db 80h + 4 ; retf imm 4988 000088AE 84 <1> db 80h + 4 ; retf 4989 000088AF 50 <1> db 40h + 16 ; pusha 4990 000088B0 90 <1> db 80h + 16 ; popa 4991 000088B1 00 <1> db 0 ; leave 4992 <1> 4993 <1> usesection lDEBUG_CODE 4994 <1> 4995 <1> .none: 4996 <1> %else 4997 <1> dop_stack_push: 4998 <1> dop_stack_pop: 4999 <1> dop_stack_special: 5000 <1> %endif 5001 <1> dop_continue_maybe_end: 5002 000056F2 58 <1> pop ax ; discard return address 5003 000056F3 E9E5F1 <1> jmp da14_check_end ; next --> 5004 <1> 5005 <1> ; Set flag to always show size (OP_SHOSIZ). 5006 <1> dop_shosiz: 5007 000056F6 800E[D687]10 <1> or byte [disflags],DIS_I_SHOWSIZ 5008 <1> dop60a: 5009 000056FB 58 <1> pop ax ; discard return address 5010 000056FC E9E4F1 <1> jmp da14 ; next... 5011 <1> 5012 <1> dop_far_m: 5013 000056FF 800E[D787]02 <1> setopt [disflags], DIS_I_FAR_M 5014 00005704 EBF5 <1> jmp dop60a 5015 <1> 5016 <1> dop_double_m: 5017 00005706 800E[D787]04 <1> setopt [disflags], DIS_I_DOUBLE_M 5018 0000570B EBEE <1> jmp dop60a 5019 <1> 5020 <1> 5021 <1> %if _MEMREF_AMOUNT 5022 <1> dop_m_src: 5023 0000570D 800E[D787]10 <1> setopt [disflags], DIS_I_M_SRC 5024 00005712 EBE7 <1> jmp dop60a 5025 <1> 5026 <1> dop_m_src_dst: 5027 00005714 800E[D787]10 <1> setopt [disflags], DIS_I_M_SRC 5028 <1> dop_m_dst: 5029 00005719 800E[D787]20 <1> setopt [disflags], DIS_I_M_DST 5030 0000571E EBDB <1> jmp dop60a 5031 <1> %else 5032 <1> dop_m_src: equ dop60a 5033 <1> dop_m_src_dst: equ dop60a 5034 <1> dop_m_dst: equ dop60a 5035 <1> %endif 5036 <1> 5037 <1> 5038 <1> dop_short: 5039 00005720 F606[AC00]10 <1> testopt [asm_options], disasm_show_short 5040 00005725 74D4 <1> jz dop60a 5041 00005727 B85348 <1> mov ax, "SH" 5042 0000572A E85401 <1> call dis_stosw_lowercase 5043 0000572D B84F52 <1> mov ax, "OR" 5044 00005730 E84E01 <1> call dis_stosw_lowercase 5045 00005733 B85420 <1> mov ax, "T " 5046 00005736 E84801 <1> call dis_stosw_lowercase 5047 <1> dop60a_1: 5048 00005739 EBC0 <1> jmp dop60a 5049 <1> 5050 <1> dop_near: 5051 0000573B F606[AC00]20 <1> testopt [asm_options], disasm_show_near 5052 00005740 74F7 <1> jz dop60a_1 5053 00005742 E81700 <1> call dop_show_near 5054 <1> dop60a_2: 5055 00005745 EBF2 <1> jmp dop60a_1 5056 <1> 5057 <1> dop_far: 5058 00005747 F606[AC00]40 <1> testopt [asm_options], disasm_show_far 5059 0000574C 74F7 <1> jz dop60a_2 5060 <1> dop_far_required: 5061 0000574E B84641 <1> mov ax, "FA" ; store "FAR " 5062 00005751 E82D01 <1> call dis_stosw_lowercase 5063 00005754 B85220 <1> mov ax, "R " 5064 00005757 E82701 <1> call dis_stosw_lowercase 5065 0000575A EBE9 <1> jmp dop60a_2 5066 <1> 5067 <1> dop_show_near: 5068 0000575C 50 <1> push ax 5069 0000575D B84E45 <1> mov ax, "NE" 5070 00005760 E81E01 <1> call dis_stosw_lowercase 5071 00005763 B84152 <1> mov ax, "AR" 5072 00005766 E81801 <1> call dis_stosw_lowercase 5073 00005769 B020 <1> mov al, " " 5074 0000576B AA <1> stosb 5075 0000576C 58 <1> pop ax 5076 0000576D C3 <1> retn 5077 <1> 5078 <1> 5079 <1> disbad: 5080 0000576E 8B26[D487] <1> mov sp,[savesp2] ;pop junk off stack 5081 00005772 B8[AD48] <1> mov ax, da13 5082 00005775 50 <1> push ax 5083 00005776 66 <1> _386_PM_o32 ; xor eax, eax 5084 00005777 31C0 <1> xor ax, ax 5085 00005779 66 <1> _386_PM_o32 ; mov dword [dis_n], eax 5086 0000577A A3[B887] <1> mov word [dis_n], ax 5087 0000577D A3[BC87] <1> mov word [preflags], ax ; clear preflags and preused 5088 <1> %if _COND 5089 00005780 A3[DC87] <1> mov word [condmsg], ax ; initialize conditions message 5090 <1> %endif 5091 00005783 C606[CE87]80 <1> mov byte [rmsize], 80h ; don't display any memory 5092 00005788 A3[A281] <1> mov word [dismach], ax ; forget about the machine type 5093 0000578B 8026[D687]FB <1> and byte [disflags],~DIS_I_SHOW ;and flags 5094 00005790 E8C301 <1> call disgetbyte 5095 00005793 BF[4488] <1> mov di,prefixlist 5096 00005796 B90C00 <1> mov cx,N_PREFIX 5097 00005799 F2AE <1> repne scasb 5098 0000579B 740C <1> je .namedprefix ;if it's a named prefix 5099 0000579D 66 <1> _386_PM_o32 ; dec dword [dis_n] 5100 0000579E FF0E[B887] <1> dec word [dis_n] 5101 000057A2 BBC101 <1> mov bx,MN_DB ;offset of 'DB' mnemonic 5102 000057A5 BEAC16 <1> mov si, fake_oplist.op_imm8 - oplists 5103 000057A8 C3 <1> retn 5104 <1> 5105 <1> .namedprefix: 5106 000057A9 800E[D687]08 <1> or byte [disflags],DIS_I_UNUSED ;print special flag 5107 000057AE BB0B00 <1> mov bx,N_PREFIX - 1 5108 000057B1 29CB <1> sub bx,cx 5109 000057B3 D1E3 <1> shl bx,1 5110 000057B5 83FB0C <1> cmp bx, byte 6 *2 5111 000057B8 7216 <1> jb .segprefix ; if SEG directive --> 5112 <1> %if _PM 5113 000057BA 83FB14 <1> cmp bx, byte 10 *2 5114 000057BD 720A <1> jb .non16prefix ; if not OSIZE or ASIZE --> 5115 000057BF F606[DB88]40 <1> test byte [bCSAttr], 40h; 32-bit code segment ? 5116 000057C4 7403 <1> jz .non16prefix ; no, O32 or A32 --> 5117 000057C6 83C304 <1> add bx, byte 4 ; yes, change to O16 or A16 5118 <1> .non16prefix: 5119 <1> %endif 5120 000057C9 8B9F[4488] <1> mov bx,[prefixmnem+bx-6*2] 5121 000057CD 31F6 <1> xor si, si ; no operand (empty oplist) 5122 000057CF C3 <1> retn 5123 <1> 5124 <1> .segprefix: 5125 000057D0 8DB7AE16 <1> lea si, [bx + fake_oplist.op_segments - oplists] 5126 <1> ; -> fake OPLIST for segments 5127 000057D4 BB5108 <1> mov bx,MN_SEG 5128 000057D7 C3 <1> retn 5129 <1> 5130 <1> 5131 <1> usesection ASMTABLE1, 1 5132 <1> fake_oplist: 5133 <1> .op_imm8: 5134 000016AC 1100 <1> db OP_IMM8, 0 5135 <1> .op_segments: 5136 000016AE 2A00 <1> db OP_ES, 0 5137 000016B0 2800 <1> db OP_CS, 0 5138 000016B2 2D00 <1> db OP_SS, 0 5139 000016B4 2900 <1> db OP_DS, 0 5140 000016B6 2B00 <1> db OP_FS, 0 5141 000016B8 2C00 <1> db OP_GS, 0 5142 <1> __SECT__ 5143 <1> 5144 <1> 5145 <1> ; GETREGMEM_R - Get the reg part of the reg/mem part of the instruction 5146 <1> ; Uses CL 5147 <1> 5148 <1> getregmem_r: 5149 000057D8 E80700 <1> call getregmem 5150 <1> 5151 <1> ; INP: al = bits 3 to 5 has value to extract 5152 <1> ; OUT: al = (INP:al >> 3) & 7 5153 <1> ; CHG: cl 5154 <1> da_get_bits_3_to_5: 5155 000057DB B103 <1> mov cl,3 5156 000057DD D2E8 <1> shr al,cl 5157 000057DF 2407 <1> and al,7 5158 000057E1 C3 <1> ret 5159 <1> 5160 <1> ; GETREGMEM - Get the reg/mem part of the instruction 5161 <1> 5162 <1> getregmem: 5163 000057E2 F606[BD87]80 <1> test byte [preused],GOTREGM 5164 000057E7 750B <1> jnz grm1 ;if we have it already 5165 000057E9 800E[BD87]80 <1> or byte [preused],GOTREGM 5166 000057EE E86501 <1> call disgetbyte ;get the byte 5167 000057F1 A2[9C81] <1> mov [regmem],al ;save it away 5168 <1> 5169 000057F4 A0[9C81] <1> grm1: mov al,[regmem] 5170 000057F7 C3 <1> ret 5171 <1> 5172 <1> dis_lowercase_w: 5173 000057F8 86C4 <1> xchg al, ah 5174 000057FA E80200 <1> call dis_lowercase 5175 000057FD 86C4 <1> xchg al, ah 5176 <1> dis_lowercase: 5177 000057FF 3C41 <1> cmp al, 'A' 5178 00005801 720D <1> jb .not 5179 00005803 3C5A <1> cmp al, 'Z' 5180 00005805 7709 <1> ja .not 5181 00005807 F606[AC00]01 <1> testopt [asm_options], disasm_lowercase 5182 0000580C 7402 <1> jz .not 5183 0000580E 0C20 <1> or al, 20h 5184 <1> .not: 5185 00005810 C3 <1> retn 5186 <1> 5187 <1> 5188 <1> dis_lowercase_refmem_w: 5189 00005811 86C4 <1> xchg al, ah 5190 00005813 E80200 <1> call dis_lowercase_refmem 5191 00005816 86C4 <1> xchg al, ah 5192 <1> dis_lowercase_refmem: 5193 00005818 3C41 <1> cmp al, 'A' 5194 0000581A 720D <1> jb .not 5195 0000581C 3C5A <1> cmp al, 'Z' 5196 0000581E 7709 <1> ja .not 5197 00005820 F606[AC00]08 <1> testopt [asm_options], disasm_lowercase_refmem 5198 00005825 7402 <1> jz .not 5199 00005827 0C20 <1> or al, 20h 5200 <1> .not: 5201 00005829 C3 <1> retn 5202 <1> 5203 <1> 5204 <1> ; Show the opcode mnemonic 5205 <1> ; 5206 <1> ; INP: si-> Opcode mnemonic string of an mnlist entry. 5207 <1> ; w[si-2] & 0Fh = Length of that string. 5208 <1> ; OUT: di-> next available byte in output line 5209 <1> ; (>= line_out + 32 due to padding) 5210 <1> ; CHG: ax, cx, si 5211 <1> showop: 5212 0000582A BF[2A08] <1> mov di, line_out+MNEMONOFS 5213 0000582D 56 <1> push si 5214 <1> 5215 0000582E 8B4CFE <1> mov cx, [si-2] 5216 00005831 83E10F <1> and cx, 0Fh 5217 <1> .loop: 5218 00005834 AC <1> lodsb 5219 00005835 E8C7FF <1> call dis_lowercase 5220 00005838 AA <1> stosb 5221 00005839 E2F9 <1> loop .loop 5222 <1> 5223 0000583B 58 <1> pop ax ; ax-> mnemonic 5224 0000583C 3D[8E0B] <1> cmp ax, mnlist_a_suffix_allowed ; non-suffixed mnemonic ? 5225 0000583F 7227 <1> jb .nosuffix ; yes --> 5226 00005841 3D[B20B] <1> cmp ax, mnlist_o_suffix_allowed ; optional address size suffix ? 5227 00005844 7208 <1> jb .a_suffix_allowed ; yes --> 5228 00005846 3D[270C] <1> cmp ax, mnlist_o_suffix_required; optional operand size suffix ? 5229 00005849 B410 <1> mov ah, PREOSIZE ; (OSIZE: check OSIZE/O32) 5230 0000584B 7309 <1> jae .suffix_decide ; no, it's required --> 5231 0000584D A9 <1> db __TEST_IMM16 ; (skip mov) 5232 <1> .a_suffix_allowed: 5233 0000584E B420 <1> mov ah, PREASIZE ; optional ASIZE: check ASIZE/A32 5234 <1> 5235 <1> .suffix_decide_optional: ; check whether the suffix is necessary 5236 00005850 8426[BC87] <1> test byte [preflags], ah ; check if such a prefix occured (ZR if not) 5237 00005854 740E <1> jz .suffix_invisible ; no, is default form --> (hide suffix) 5238 <1> 5239 <1> .suffix_decide: ; suffix will be displayed, now only decide which 5240 00005856 B057 <1> mov al, 'W' 5241 00005858 8426[BE87] <1> test byte [presizeflags], ah ; 32-bit form ? 5242 0000585C 7402 <1> jz .got_suffix ; no --> 5243 0000585E B044 <1> mov al, 'D' 5244 <1> .got_suffix: 5245 00005860 E89CFF <1> call dis_lowercase 5246 00005863 AA <1> stosb ; store suffix 5247 <1> 5248 <1> .suffix_invisible: ; notional suffix either displayed or left hidden, 5249 00005864 0826[BD87] <1> or byte [preused], ah ; in any case, mark opcode prefix as used 5250 <1> 5251 <1> .nosuffix: 5252 <1> 5253 <1> ; Store blanks to pad to 8 characters, but at least one 5254 00005868 B020 <1> mov al, 32 5255 <1> .pad: 5256 0000586A AA <1> stosb 5257 0000586B 81FF[3208] <1> cmp di, line_out+MNEMONOFS+8 5258 0000586F 72F9 <1> jb .pad 5259 <1> 5260 00005871 C3 <1> retn 5261 <1> 5262 <1> 5263 <1> ; INP: byte [segmnt] = number of segment register 5264 <1> ; [segrgnam] = uppercase segment register names 5265 <1> ; CHG: bx, ax 5266 <1> ; OUT: ax = uppercase segment register name 5267 <1> showseg_uppercase_ax: 5268 00005872 A0[CF87] <1> mov al,[segmnt] ;segment number 5269 00005875 98 <1> cbw 5270 00005876 D1E0 <1> shl ax,1 5271 00005878 93 <1> xchg ax,bx ;mov bx,ax 5272 00005879 8B87[1288] <1> mov ax,[segrgnam+bx] ;get register name 5273 0000587D C3 <1> retn 5274 <1> 5275 <1> ; SHOWSEG - Show the segment descriptor in SEGMNT 5276 <1> ; Entry DI Where to put it 5277 <1> ; Exit DI Updated 5278 <1> ; Uses AX, BX 5279 <1> 5280 <1> showseg: 5281 0000587E E8F1FF <1> call showseg_uppercase_ax 5282 <1> dis_stosw_lowercase: 5283 00005881 E874FF <1> call dis_lowercase_w 5284 00005884 AB <1> stosw 5285 00005885 C3 <1> retn 5286 <1> 5287 <1> 5288 <1> ; Write a size specifier to the buffer 5289 <1> ; and set some flags 5290 <1> ; INP: ah = r/m size value, 5291 <1> ; F0h byte (less than zero) 5292 <1> ; 00h word (equal to zero) 5293 <1> ; 10h dword (greater than zero, but != 20h) 5294 <1> ; 20h qword (greater than zero, == 20h) 5295 <1> ; di-> buffer 5296 <1> ; OUT: di-> behind size specifier in buffer 5297 <1> ; by[rmsize] set 5298 <1> ; wo[sizeloc]-> size specifier in buffer 5299 <1> ; CHG: ax 5300 <1> ; 5301 <1> ; Size specifiers are BYTE, WORD, DWORD, and QWORD. One 5302 <1> ; blank is appended to the size specifier. 5303 <1> ; 5304 <1> ; Size specifiers are lowercased if that option is selected. 5305 <1> showsize: 5306 00005886 8826[CE87] <1> mov [rmsize], ah ; save r/m size 5307 0000588A 893E[DA87] <1> mov [sizeloc], di ; save where we're putting this 5308 0000588E B051 <1> mov al, 'Q' 5309 00005890 80FC20 <1> cmp ah, 20h ; QWORD ? 5310 00005893 7412 <1> je .qword ; yes --> 5311 00005895 80FC00 <1> cmp ah, 0 5312 00005898 7D09 <1> jge .notbyte ; if word or dword --> 5313 <1> .byte: 5314 0000589A B85445 <1> mov ax, "TE" 5315 0000589D 50 <1> push ax 5316 0000589E B84259 <1> mov ax, "BY" 5317 000058A1 EB0F <1> jmp s .common 5318 <1> 5319 <1> .notbyte: 5320 000058A3 7406 <1> je .word ; if word 5321 <1> .dword: 5322 000058A5 B044 <1> mov al, 'D' 5323 <1> .qword: 5324 000058A7 E855FF <1> call dis_lowercase 5325 000058AA AA <1> stosb 5326 <1> .word: 5327 000058AB B85244 <1> mov ax, "RD" 5328 000058AE 50 <1> push ax 5329 000058AF B8574F <1> mov ax, "WO" 5330 <1> .common: 5331 000058B2 E8CCFF <1> call dis_stosw_lowercase 5332 000058B5 58 <1> pop ax 5333 000058B6 E8C8FF <1> call dis_stosw_lowercase 5334 000058B9 B020 <1> mov al, 32 5335 000058BB AA <1> stosb 5336 <1> showptr.ret: 5337 000058BC C3 <1> retn 5338 <1> 5339 <1> ; Write "PTR " to a buffer if NASM syntax is not selected. 5340 <1> ; INP: di-> buffer 5341 <1> ; OUT: di-> behind written string "PTR " (or unchanged) 5342 <1> ; CHG: ax 5343 <1> ; 5344 <1> ; The string is lowercased if that option is selected. 5345 <1> showptr: 5346 000058BD F606[AC00]04 <1> testopt [asm_options], disasm_nasm 5347 000058C2 75F8 <1> jnz .ret 5348 000058C4 B85054 <1> mov ax, "PT" 5349 000058C7 E8B7FF <1> call dis_stosw_lowercase 5350 000058CA B85220 <1> mov ax, "R " 5351 000058CD EBB2 <1> jmp s dis_stosw_lowercase 5352 <1> 5353 <1> ; Write "DWORD " to a buffer 5354 <1> ; INP: di-> buffer 5355 <1> ; OUT: di-> behind written string "DWORD " 5356 <1> ; CHG: ax 5357 <1> ; 5358 <1> ; The string is lowercased if that option is selected. 5359 <1> showdword: equ showsize.dword 5360 <1> showword: equ showsize.word 5361 <1> 5362 <1> ; DISP32 - Print 32-bit displacement for addressing modes. 5363 <1> ; Entry None 5364 <1> ; Exit None 5365 <1> ; Uses AX 5366 <1> 5367 <1> disp32: 5368 000058CF E8A000 <1> call disgetword 5369 <1> .ax: 5370 000058D2 50 <1> push ax 5371 000058D3 E89C00 <1> call disgetword 5372 000058D6 E81561 <1> call hexword 5373 000058D9 58 <1> pop ax 5374 000058DA E91161 <1> jmp hexword 5375 <1> 5376 <1> ; SHOWREG16 - Show 16-bit register name. 5377 <1> ; 5378 <1> ; INP: al = register number, 0 to 7 5379 <1> ; di -> buffer 5380 <1> ; OUT: register name stored to buffer 5381 <1> ; ax = INP:al * 2 5382 <1> showreg16: 5383 000058DD 98 <1> cbw 5384 000058DE D1E0 <1> shl ax,1 5385 000058E0 93 <1> xchg ax,bx 5386 000058E1 50 <1> push ax 5387 000058E2 8B87[0288] <1> mov ax,[rgnam16+bx] 5388 000058E6 E898FF <1> call dis_stosw_lowercase 5389 000058E9 58 <1> pop ax 5390 000058EA 93 <1> xchg ax,bx 5391 000058EB C3 <1> ret 5392 <1> 5393 <1> 5394 <1> ; DISCHK32D - Check for O32 (32-bit operand size). 5395 <1> dischk32d: 5396 000058EC 800E[BD87]10 <1> or byte [preused], PREOSIZE 5397 000058F1 F606[BE87]10 <1> test byte [presizeflags], PRE32D 5398 000058F6 C3 <1> retn 5399 <1> 5400 <1> 5401 <1> ; SHOWMACH - Return string "[needs math coprocessor]", etc. 5402 <1> ; Entry di -> table of 5 words 5403 <1> ; cx = instruction 5404 <1> ; Exit si Address of string 5405 <1> ; cx Length of string, or 0 if not needed 5406 <1> ; Uses al, di 5407 <1> 5408 <1> showmach: 5409 000058F7 BE[357A] <1> mov si,needsmsg ; candidate message 5410 000058FA F606[A381]01 <1> test byte [dmflags],DM_COPR 5411 000058FF 741E <1> jz sm1 ; if not a coprocessor instruction 5412 00005901 C6440937 <1> mov byte [si + needsmsg.digit_6_ofs], '7' 5413 <1> ; change message text 5414 00005905 A0[E40A] <1> mov al,[mach_87] 5415 00005908 803E[E30A]00 <1> cmp byte [has_87],0 5416 0000590D 7517 <1> jnz sm2 ; if it has a coprocessor 5417 0000590F A0[E20A] <1> mov al,[machine] 5418 00005912 3A06[A281] <1> cmp al,[dismach] 5419 00005916 7214 <1> jb sm3 ; if we display the message 5420 00005918 BE[407A] <1> mov si,needsmath ; print this message instead 5421 0000591B B91800 <1> mov cx,needsmath_L 5422 0000591E C3 <1> retn 5423 <1> 5424 <1> sm1: 5425 0000591F C6440936 <1> mov byte [si + needsmsg.digit_6_ofs], '6' 5426 <1> ; reset message text 5427 00005923 A0[E20A] <1> mov al,[machine] 5428 <1> sm2: 5429 00005926 3A06[A281] <1> cmp al,[dismach] 5430 0000592A 730C <1> jae sm4 ; if no message (so far) 5431 <1> sm3: 5432 0000592C A0[A281] <1> mov al,[dismach] 5433 0000592F 0430 <1> add al,'0' 5434 00005931 884407 <1> mov byte [si + needsmsg.digit_x_ofs], al 5435 00005934 B90B00 <1> mov cx,needsmsg_L ; length of the message 5436 00005937 C3 <1> retn 5437 <1> 5438 <1> ; Check for obsolete instruction. 5439 <1> sm4: 5440 00005938 BE[587A] <1> mov si, obsolete ; candidate message 5441 0000593B 89C8 <1> mov ax, cx ; get info on this instruction 5442 0000593D B90500 <1> mov cx, 5 5443 00005940 F2AF <1> repne scasw 5444 00005942 7511 <1> jne sm6 ; if no matches 5445 00005944 BF[BC81] <1> mov di, obsmach + 5 - 1 5446 00005947 29CF <1> sub di, cx 5447 00005949 31C9 <1> xor cx, cx ; clear CX: no message 5448 0000594B A0[E40A] <1> mov al, byte [mach_87] 5449 0000594E 3A05 <1> cmp al, byte [di] 5450 00005950 7E03 <1> jle sm5 ; if this machine is OK 5451 00005952 B90A00 <1> mov cx, obsolete_L 5452 <1> sm5: 5453 00005955 C3 <1> retn 5454 <1> 5455 <1> sm6: equ sm5 5456 <1> 5457 <1> 5458 <1> ; DISGETBYTE - Get byte for disassembler. 5459 <1> ; Entry None 5460 <1> ; Exit AL Next byte in instruction stream 5461 <1> ; Uses None 5462 <1> 5463 <1> disgetbyte: 5464 00005956 1E <1> push ds 5465 00005957 66 <1> _386_PM_o32 ; push esi 5466 00005958 56 <1> push si ; save ds, (e)si 5467 00005959 66 <1> _386_PM_o32 ; mov esi, dword [u_addr] 5468 0000595A 8B36[1E0B] <1> mov si, word [u_addr] 5469 0000595E 66 <1> _386_PM_o32 ; add esi, dword [dis_n] 5470 0000595F 0336[B887] <1> add si, word [dis_n] ; index to the right byte 5471 00005963 8E1E[220B] <1> mov ds, word [u_addr + saSegSel] 5472 00005967 67 <1> _386_PM_a32 5473 00005968 AC <1> lodsb ; get the byte 5474 00005969 66 <1> _386_PM_o32 ; pop esi 5475 0000596A 5E <1> pop si 5476 0000596B 1F <1> pop ds ; restore regs 5477 0000596C 66 <1> _386_PM_o32 ; inc dword [dis_n] 5478 0000596D FF06[B887] <1> inc word [dis_n] ; indicate that we've gotten this byte 5479 00005971 C3 <1> retn 5480 <1> 5481 <1> 5482 <1> ; DISGETWORD - Get word for disassembler. 5483 <1> ; Entry None 5484 <1> ; Exit AX Next word 5485 <1> ; Uses None 5486 <1> 5487 <1> disgetword: 5488 00005972 1E <1> push ds 5489 00005973 66 <1> _386_PM_o32 ; push esi 5490 00005974 56 <1> push si ; save ds, (e)si 5491 00005975 66 <1> _386_PM_o32 ; mov esi, dword [u_addr] 5492 00005976 8B36[1E0B] <1> mov si, word [u_addr] 5493 0000597A 66 <1> _386_PM_o32 ; add esi, dword [dis_n] 5494 0000597B 0336[B887] <1> add si, word [dis_n] ; index to the right byte 5495 0000597F 8E1E[220B] <1> mov ds, word [u_addr + saSegSel] 5496 00005983 67 <1> _386_PM_a32 5497 00005984 AD <1> lodsw ; get the word 5498 00005985 66 <1> _386_PM_o32 ; pop esi 5499 00005986 5E <1> pop si 5500 00005987 1F <1> pop ds ; restore regs 5501 00005988 66 <1> _386_PM_o32 ; add dword [dis_n], byte 2 5502 00005989 8306[B887]02 <1> add word [dis_n], byte 2 ; indicate that we've gotten this word 5503 0000598E C3 <1> retn 5504 <1> 5505 <1> 5506 <1> ; DISSHOWBYTES - Show bytes for the disassembler. 5507 <1> ; Entry BX Number of bytes (must be > 0) 5508 <1> ; di-> output line 5509 <1> ; Exit u_addr updated 5510 <1> ; Uses BX, (E)SI. 5511 <1> 5512 <1> disshowbytes: 5513 0000598F 66 <1> _386_PM_o32 ; mov esi, dword [u_addr] 5514 00005990 8B36[1E0B] <1> mov si, word [u_addr] 5515 00005994 8E1E[220B] <1> mov ds, word [u_addr + saSegSel] 5516 <1> .loop: 5517 00005998 67 <1> _386_PM_a32 5518 00005999 AC <1> lodsb 5519 0000599A E85860 <1> call hexbyte 5520 0000599D 4B <1> dec bx 5521 0000599E 75F8 <1> jnz .loop 5522 000059A0 16 <1> push ss 5523 000059A1 1F <1> pop ds 5524 000059A2 66 <1> _386_PM_o32 ; mov dword [u_addr], esi 5525 000059A3 8936[1E0B] <1> mov word [u_addr], si 5526 000059A7 C3 <1> retn 5527 <1> 5528 <1> ; MOVEOVER - Move the line to the right. 5529 <1> ; Entry DI Last address + 1 of line so far 5530 <1> ; Exit CX Number of bytes to move 5531 <1> ; DI Updated 5532 <1> ; Uses SI 5533 <1> moveover: 5534 000059A8 833E[DA87]00 <1> cmp word [sizeloc], byte 0 5535 000059AD 7404 <1> je mo1 ; if sizeloc not saved 5536 000059AF 010E[DA87] <1> add word [sizeloc], cx 5537 <1> 5538 <1> mo1: 5539 000059B3 89FE <1> mov si, di 5540 000059B5 01CF <1> add di, cx 5541 000059B7 89F9 <1> mov cx, di 5542 000059B9 81E9[2A08] <1> sub cx, line_out+MNEMONOFS 5543 000059BD 57 <1> push di 5544 000059BE FD <1> std ; _AMD_ERRATUM_109_WORKAROUND as below 5545 000059BF 4E <1> dec si 5546 000059C0 4F <1> dec di 5547 <1> 5548 <1> 5549 <1> numdef AMD_ERRATUM_109_WORKAROUND, 1 5550 <1> ; Refer to comment in init.asm init_movp. 5551 <1> 5552 <1> %if _AMD_ERRATUM_109_WORKAROUND 5553 000059C1 E308 <1> jcxz @FF 5554 000059C3 83F914 <1> cmp cx, 20 5555 000059C6 7703 <1> ja @FF 5556 <1> @@: 5557 000059C8 A4 <1> movsb 5558 000059C9 E2FD <1> loop @B 5559 <1> @@: 5560 <1> %endif 5561 000059CB F3A4 <1> rep movsb 5562 000059CD 5F <1> pop di 5563 000059CE FC <1> cld 5564 000059CF C3 <1> retn 2068 2069 2070 %if _PM 2071 %include "pmdata.asm" 2072 <1> 2073 <1> %if 0 2074 <1> 2075 <1> lDebugX PM data 2076 <1> 2077 <1> Copyright (C) 1995-2003 Paul Vojta 2078 <1> Copyright (C) 2008-2021 C. Masloch 2079 <1> 2080 <1> Usage of the works is permitted provided that this 2081 <1> instrument is retained with the works, so that any entity 2082 <1> that uses the works is notified of this instrument. 2083 <1> 2084 <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 2085 <1> 2086 <1> %endif 2087 <1> 2088 <1> 2089 <1> usesection lDEBUG_DATA_ENTRY 2090 <1> 2091 000088B2 00 <1> align 4, db 0 2092 000088B4 00000000 <1> exception_csip: dd 0 ; 16:16 far 16-bit address of debugger exception 2093 000088B8 00000000 <1> dpmientry: dd 0 ; DPMI entry point returned by DPMI host 2094 000088BC 00000000 <1> dpmiwatch: dd 0 2095 000088C0 00000000 <1> dpmi_rm2pm: dd 0 2096 000088C4 00000000 <1> dpmi_rmsav: dd 0 2097 000088C8 000000000000 <1> dpmi_pm2rm: dw 0,0,0 2098 000088CE 000000000000 <1> dpmi_pmsav: dw 0,0,0 2099 <1> align 2, db 0 2100 000088D4 0000 <1> dssel: dw 0 ; debugger's (16-bit RW) data selector 2101 000088D6 0000 <1> cssel: dw 0 ; debugger's (16-bit RE) code selector 2102 000088D8 0000 <1> scratchsel: dw 0 ; scratch selector used for various purposes, limit -1 2103 000088DA 00 <1> dpmi32: db 0 ; 32-bit client if true 2104 000088DB 00 <1> bCSAttr: db 0 ; current code attribute (D bit) 2105 <1> align 2, db 0 2106 000088DC 00 <1> bAddr32: db 0 ; Address attribute. if 1, hiword(edx) is valid 2107 000088DD 00 <1> db 0 ; read/written when bAddr32 is pushed/popped 2108 <1> 2109 <1> 2110 <1> align 2, db 0 2111 <1> convsegs: 2112 <1> .: 2113 000088DE [D40A] <1> dw pInDOS + so16aSegSel 2114 <1> %if _USESDA 2115 000088E0 [DC0A] <1> dw pSDA + so16aSegSel 2116 <1> %endif 2117 000088E2 [F209] <1> dw auxbuff_segorsel + soaSegSel 2118 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 2119 000088E4 [F60A] <1> dw history.segorsel + soaSegSel 2120 <1> %endif 2121 <1> .end_fixed: 2122 <1> .amount_fixed: equ (.end_fixed - .) / 2 2123 000088E6 [040B] <1> dw a_addr + saSegSel 2124 000088E8 [0E0B] <1> dw d_addr + saSegSel 2125 <1> .end: 2126 <1> .amount: equ (.end - .) / 2 2127 <1> 2128 <1> exctab: 2129 <1> %if _CATCHEXC00 2130 000088EA 00 <1> db 00h 2131 <1> %endif 2132 <1> %if _CATCHEXC01 2133 000088EB 01 <1> db 01h 2134 <1> %endif 2135 <1> %if _CATCHEXC03 2136 000088EC 03 <1> db 03h 2137 <1> %endif 2138 <1> %if _CATCHEXC06 2139 000088ED 06 <1> db 06h 2140 <1> %endif 2141 <1> %if _CATCHEXC0C 2142 000088EE 0C <1> db 0Ch 2143 <1> %endif 2144 <1> %if _CATCHEXC0D 2145 000088EF 0D <1> db 0Dh 2146 <1> %endif 2147 <1> %if _CATCHEXC0E 2148 000088F0 0E <1> db 0Eh 2149 <1> %endif 2150 <1> endexctab: 2151 <1> 2152 <1> %if _CATCHPMINT214C || _DEBUG 2153 000088F1 00 <1> align 8, db 0 2154 <1> excsave: 2155 <1> .: 2156 <1> %if _CATCHEXC00 2157 000088F8 FFFFFFFFFFFF0000 <1> dw -1,-1,-1,0 ; 0 2158 <1> %endif 2159 <1> %if _CATCHEXC01 2160 00008900 FFFFFFFFFFFF0000 <1> dw -1,-1,-1,0 ; 1 2161 <1> %endif 2162 <1> %if _CATCHEXC03 2163 00008908 FFFFFFFFFFFF0000 <1> dw -1,-1,-1,0 ; 3 2164 <1> %endif 2165 <1> %if _CATCHEXC06 2166 00008910 FFFFFFFFFFFF0000 <1> dw -1,-1,-1,0 ; 6 2167 <1> %endif 2168 <1> %if _CATCHEXC0C 2169 00008918 FFFFFFFFFFFF0000 <1> dw -1,-1,-1,0 ; 0C 2170 <1> %endif 2171 <1> %if _CATCHEXC0D 2172 00008920 FFFFFFFFFFFF0000 <1> dw -1,-1,-1,0 ; 0D 2173 <1> %endif 2174 <1> %if _CATCHEXC0E 2175 00008928 FFFFFFFFFFFF0000 <1> dw -1,-1,-1,0 ; 0E 2176 <1> %endif 2177 <1> .end: 2178 <1> .amount: equ (.end - .) / 8 2179 <1> 2180 <1> %if .amount != (endexctab - exctab) 2181 <1> %error Wrong excsave length 2182 <1> %endif 2183 <1> %endif 2184 <1> 2185 <1> %if CATCHPMINTAMOUNT 2186 <1> pminttab: 2187 <1> .: 2188 <1> %if _CATCHPMINT214C 2189 00008930 21 <1> db 21h 2190 00008931 [0E8A] <1> dw pmint21 2191 <1> %endif 2192 <1> .end: 2193 <1> .amount: equ (.end - .) / 3 2194 <1> 2195 00008933 00 <1> align 8, db 0 2196 <1> pmintsave: 2197 <1> .: 2198 <1> %if _CATCHPMINT214C 2199 00008938 FFFFFFFFFFFF0000 <1> .int21: dw -1,-1,-1,0 2200 <1> %endif 2201 <1> .end: 2202 <1> .amount: equ (.end - .) / 8 2203 <1> %endif 2072 %include "pminit.asm" 2073 <1> 2074 <1> %if 0 2075 <1> 2076 <1> lDebugX PM initialisation 2077 <1> 2078 <1> Copyright (C) 1995-2003 Paul Vojta 2079 <1> Copyright (C) 2008-2021 C. Masloch 2080 <1> 2081 <1> Usage of the works is permitted provided that this 2082 <1> instrument is retained with the works, so that any entity 2083 <1> that uses the works is notified of this instrument. 2084 <1> 2085 <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 2086 <1> 2087 <1> %endif 2088 <1> 2089 <1> 2090 <1> usesection lDEBUG_DATA_ENTRY 2091 <1> 2092 <1> ; Int2F handler. Starts with an IISP header. 2093 <1> align 2, db 0 2094 00008940 EB10000000004B4200- <1> iispentry debug2F, 0, debug2F 2094 00008949 EB4100 <1> 2095 <1> oldi2F: equ debug2F.next 2096 00008952 9C <1> pushf 2097 00008953 3D8716 <1> cmp ax, 1687h 2098 <1> dpmidisable: ; set this byte to __TEST_IMM8 to disable new DPMI entry 2099 00008956 7406 <1> je dpmiquery 2100 00008958 9D <1> popf 2101 <1> jumpoldi2F: 2102 00008959 2EFF2E[4289] <1> jmp far [ cs:oldi2F ] 2103 <1> 2104 <1> dpmiquery: 2105 0000895E 0E <1> push cs 2106 0000895F E8F7FF <1> call jumpoldi2F 2107 00008962 85C0 <1> test ax, ax 2108 00008964 750F <1> jnz .nohost 2109 <1> 2110 00008966 2E893E[B888] <1> mov word [ cs:dpmientry+0 ], di 2111 0000896B 2E8C06[BA88] <1> mov word [ cs:dpmientry+2 ], es 2112 00008970 BF[7689] <1> mov di, mydpmientry 2113 00008973 0E <1> push cs 2114 00008974 07 <1> pop es 2115 <1> .nohost: 2116 00008975 CF <1> iret 2117 <1> 2118 <1> mydpmientry: 2119 00008976 2EC606[DA88]00 <1> mov byte [ cs:dpmi32 ], 0 2120 0000897C A801 <1> test al, 1 2121 0000897E 7405 <1> jz .16 2122 00008980 2EFE06[DA88] <1> inc byte [ cs:dpmi32 ] 2123 <1> .16: 2124 00008985 2EFF1E[B888] <1> call far [ cs:dpmientry ] 2125 0000898A 7301 <1> jnc installdpmi 2126 <1> debug2F.hwreset: 2127 0000898C CB <1> retf 2128 <1> 2129 <1> 2130 <1> subcpu 286 2131 <1> installdpmi: 2132 0000898D 60 <1> pusha 2133 0000898E 89E5 <1> mov bp, sp ; [bp+16]=ip, [bp+18]=cs 2134 00008990 9C <1> pushf 2135 00008991 1E <1> push ds 2136 00008992 06 <1> push es 2137 <1> 2138 00008993 8CCB <1> mov bx, cs 2139 00008995 B80600 <1> mov ax, 0006h 2140 00008998 CD31 <1> int 31h 2141 0000899A 726D <1> jc .fataldpmierr ; get base address of cs 2142 0000899C F6C20F <1> test dl, 15 2143 0000899F 7568 <1> jnz .fataldpmierr 2144 000089A1 F7C1F0FF <1> test cx, 0FFF0h 2145 000089A5 7562 <1> jnz .fataldpmierr 2146 000089A7 C1EA04 <1> shr dx, 4 2147 000089AA C1E10C <1> shl cx, 12 2148 000089AD 09CA <1> or dx, cx 2149 000089AF 2E3916[A60A] <1> cmp word [cs:pspdbg], dx 2150 000089B4 7553 <1> jne .fataldpmierr 2151 <1> 2152 000089B6 8CCB <1> mov bx, cs 2153 000089B8 B80A00 <1> mov ax, 000Ah ; get a data descriptor for DEBUG's segment 2154 000089BB CD31 <1> int 31h 2155 000089BD 724A <1> jc .fataldpmierr 2156 000089BF 8ED8 <1> mov ds, ax 2157 000089C1 8C0E[D688] <1> mov word [ cssel ], cs 2158 000089C5 A3[D488] <1> mov word [ dssel ], ax 2159 <1> 2160 000089C8 B90100 <1> mov cx, 1 ; allocate code_sel selector 2161 000089CB 31C0 <1> xor ax, ax 2162 000089CD CD31 <1> int 31h 2163 000089CF 7238 <1> jc .fataldpmierr 2164 000089D1 A3[D000] <1> mov word [ code_sel ], ax 2165 000089D4 89C3 <1> mov bx, ax 2166 000089D6 31C9 <1> xor cx, cx 2167 000089D8 83CAFF <1> or dx, -1 ; cx:dx = 0FFFFh 2168 000089DB B80800 <1> mov ax, 0008h 2169 000089DE CD31 <1> int 31h ; set limit 64 KiB 2170 000089E0 7227 <1> jc .fataldpmierr 2171 000089E2 0F020E[D688] <1> lar cx, word [ cssel ] ; get access rights/type of cs 2172 000089E7 7520 <1> jnz .fataldpmierr 2173 000089E9 C1E908 <1> shr cx, 8 ; proper format for 31.0009 2174 <1> ; high byte zero (16-bit and byte-granular selector) 2175 000089EC B80900 <1> mov ax, 0009h 2176 000089EF CD31 <1> int 31h ; set descriptor access rights/type 2177 000089F1 7216 <1> jc .fataldpmierr 2178 <1> 2179 000089F3 8B16[CE00] <1> mov dx, word [ code_seg ] 2180 000089F7 89D1 <1> mov cx, dx 2181 000089F9 C1E204 <1> shl dx, 4 2182 000089FC C1E90C <1> shr cx, 12 2183 000089FF B80700 <1> mov ax, 0007h 2184 00008A02 CD31 <1> int 31h ; set selector base to code segment's base 2185 <1> 2186 00008A04 E8DFF6 <1> call entry_to_code_sel 2187 00008A07 [D059] <1> dw installdpmi_code 2188 <1> 2189 <1> .fataldpmierr: 2190 00008A09 B8FF4C <1> mov ax, 4CFFh 2191 00008A0C CD21 <1> int 21h 2192 <1> 2193 <1> 2194 <1> usesection lDEBUG_CODE 2195 <1> 2196 <1> code_insure_low_byte_not_0CCh 2197 <1> installdpmi_code: 2198 <1> ; Some code (particularly d4message) may expect us to 2199 <1> ; run on the debugger's stack, to access the data 2200 <1> ; segment. Therefore, switch stacks. 2201 000059D0 8CDA <1> mov dx, ds ; dx = ds = debugger data selector 2202 000059D2 8CD0 <1> mov ax, ss 2203 000059D4 89E3 <1> mov bx, sp ; ax:bx = stack to restore 2204 000059D6 8ED2 <1> mov ss, dx 2205 000059D8 8B26[A00A] <1> mov sp, [run_sp] ; switch to our stack 2206 <1> 2207 000059DC 50 <1> push ax 2208 000059DD 53 <1> push bx ; save original stack, far pointer 2209 <1> 2210 000059DE 800E[9D00]08 <1> setopt [internalflags], protectedmode 2211 <1> 2212 <1> d4 call d4message 2213 <1> d4 asciz "In installdpmi_code",13,10 2214 <1> 2215 000059E3 B90200 <1> mov cx, 2 ; alloc 2 descriptors 2216 000059E6 31C0 <1> xor ax, ax 2217 000059E8 CD31 <1> int 31h 2218 000059EA 7303E9F101 <1> jc .fataldpmierr 2219 <1> 2220 <1> d4 call d4message 2221 <1> d4 asciz "In installdpmi_code, allocated 2 descriptors",13,10 2222 <1> 2223 000059EF A3[D888] <1> mov word [ scratchsel ], ax ; the first is used as scratch descriptor 2224 000059F2 89C3 <1> mov bx, ax 2225 000059F4 31C9 <1> xor cx, cx 2226 <1> %if 1 2227 000059F6 49 <1> _386 dec cx ; set a limit of FFFFFFFFh if 386 2228 <1> %else 2229 <1> cmp byte [ dpmi32 ], 0 2230 <1> je .16 2231 <1> dec cx ; set a limit of FFFFFFFFh if 32-bit client 2232 <1> .16: 2233 <1> %endif 2234 000059F7 83CAFF <1> or dx, byte -1 2235 000059FA B80800 <1> mov ax, 0008h 2236 000059FD CD31 <1> int 31h 2237 000059FF B80300 <1> mov ax, 0003h 2238 00005A02 CD31 <1> int 31h ; get selector increment 2239 <1> %if 0 2240 <1> jnc .03sup 2241 <1> mov ax, 8 2242 <1> .03sup: 2243 <1> %endif 2244 00005A04 01C3 <1> add bx, ax ; the second selector is client's CS 2245 00005A06 31C9 <1> xor cx, cx ; this limit is FFFFh even for 32-bits 2246 00005A08 B80800 <1> mov ax, 0008h 2247 00005A0B CD31 <1> int 31h 2248 <1> 2249 00005A0D 5A <1> pop dx 2250 00005A0E 58 <1> pop ax 2251 00005A0F 8EC0 <1> mov es, ax 2252 00005A11 50 <1> push ax 2253 00005A12 52 <1> push dx 2254 <1> 2255 00005A13 268B5612 <1> mov dx, word [ es:bp+18 ] 2256 <1> ; get client's CS 2257 00005A17 E8AC3E <1> call setrmaddr ; set base 2258 00005A1A 0F020E[D688] <1> lar cx, word [ cssel ] 2259 00005A1F 7403E9BC01 <1> jnz .fataldpmierr 2260 00005A24 C1E908 <1> shr cx, 8 ; CS remains 16-bit 2261 00005A27 B80900 <1> mov ax, 0009h 2262 00005A2A CD31 <1> int 31h 2263 00005A2C 89DA <1> mov dx, bx 2264 00005A2E 26895E12 <1> mov word [ es:bp+18 ], bx 2265 <1> 2266 00005A32 FC <1> cld 2267 <1> 2268 00005A33 BE[DE88] <1> mov si, convsegs 2269 00005A36 B90400 <1> mov cx, convsegs.amount_fixed 2270 <1> .loopseg: 2271 <1> d4 call d4message 2272 <1> d4 asciz "In installdpmi_code.loopseg",13,10 2273 <1> 2274 00005A39 AD <1> lodsw 2275 00005A3A 89C7 <1> mov di, ax 2276 00005A3C 8B5D02 <1> mov bx, word [di + soaSegment] 2277 00005A3F B80200 <1> mov ax, 0002h 2278 00005A42 CD31 <1> int 31h 2279 00005A44 7303E99701 <1> jc .fataldpmierr 2280 00005A49 894504 <1> mov word [di + soaSelector], ax 2281 00005A4C E2EB <1> loop .loopseg 2282 <1> 2283 <1> d4 call d4message 2284 <1> d4 asciz "In installdpmi_code after .loopseg",13,10 2285 <1> 2286 00005A4E 6657 <1> _386 push edi 2287 00005A50 6631FF <1> _386 xor edi, edi ; clear edih 2288 00005A53 8026[9E00]DB <1> clropt [internalflags], canswitchmode|switchbuffer 2289 00005A58 31ED <1> xor bp, bp 2290 00005A5A 45 <1> _386 inc bp 2291 00005A5B 45 <1> _386 inc bp 2292 <1> .save16: 2293 00005A5C B80503 <1> mov ax, 0305h ; get raw mode-switch save state addresses 2294 00005A5F CD31 <1> int 31h 2295 00005A61 7303E9A000 <1> jc .cannotswitch 2296 00005A66 3D1020 <1> cmp ax, _AUXBUFFSIZE ; fits into auxbuff ? 2297 00005A69 7603E99800 <1> ja .cannotswitch ; no --> 2298 00005A6E 85C0 <1> test ax, ax 2299 00005A70 7473 <1> jz .nobuffer 2300 <1> 2301 <1> .switchbuffer_init: 2302 00005A72 50 <1> push ax ; ax = target switchbuffer size 2303 00005A73 53 <1> push bx 2304 00005A74 51 <1> push cx 2305 00005A75 56 <1> push si 2306 00005A76 57 <1> push di ; preserve regs returned by fn 0305h 2307 <1> 2308 00005A77 8B3E[F009] <1> mov di, word [auxbuff_switchbuffer_size] 2309 00005A7B 89F9 <1> mov cx, di 2310 00005A7D 29C1 <1> sub cx, ax 2311 00005A7F 7441 <1> je .no_switchbuffer_size_change 2312 00005A81 8E06[F609] <1> mov es, word [auxbuff_segorsel + soaSelector] 2313 00005A85 7737 <1> ja .fillblanks 2314 <1> 2315 00005A87 F7D9 <1> neg cx ; = amount of bytes to move 2316 <1> 2317 <1> .try_again: 2318 00005A89 8B36[FA09] <1> mov si, word [auxbuff_behind_last_silent] 2319 <1> ; (auxbuff):di -> next buffer (if it fits) 2320 00005A8D B81020 <1> mov ax, _AUXBUFFSIZE 2321 00005A90 29F0 <1> sub ax, si ; number of bytes left free 2322 00005A92 39C8 <1> cmp ax, cx ; fits ? 2323 00005A94 7307 <1> jae .simple ; yes --> 2324 <1> 2325 <1> .delete: 2326 00005A96 E81E62 <1> call silence_delete_one_string.internal 2327 00005A99 7228 <1> jc .switchbuffer_error 2328 00005A9B EBEC <1> jmp .try_again 2329 <1> 2330 <1> .simple: 2331 00005A9D 1E <1> push ds 2332 00005A9E 56 <1> push si 2333 <1> ; -> behind used data minus start of auxbuff (0) 2334 <1> ; = how much to copy 2335 00005A9F 4E <1> dec si ; -> last used byte 2336 00005AA0 89F7 <1> mov di, si ; -> last used source byte 2337 00005AA2 01CF <1> add di, cx ; -> destination of last byte 2338 00005AA4 010E[FA09] <1> add word [auxbuff_behind_last_silent], cx 2339 <1> ; update silent pointer 2340 00005AA8 010E[F809] <1> add word [auxbuff_behind_while_condition], cx 2341 <1> ; update while pointer 2342 00005AAC 59 <1> pop cx ; = how much to copy 2343 00005AAD FD <1> std ; _AMD_ERRATUM_109_WORKAROUND as below 2344 00005AAE 06 <1> push es 2345 00005AAF 1F <1> pop ds 2346 <1> 2347 <1> numdef AMD_ERRATUM_109_WORKAROUND, 1 2348 <1> ; Refer to comment in init.asm init_movp. 2349 <1> 2350 <1> %if _AMD_ERRATUM_109_WORKAROUND 2351 00005AB0 E308 <1> jcxz @FF 2352 00005AB2 83F914 <1> cmp cx, 20 2353 00005AB5 7703 <1> ja @FF 2354 <1> @@: 2355 00005AB7 A4 <1> movsb 2356 00005AB8 E2FD <1> loop @B 2357 <1> @@: 2358 <1> %endif 2359 00005ABA F3A4 <1> rep movsb ; copy up silent buffer and while cond 2360 00005ABC FC <1> cld 2361 <1> 2362 00005ABD 1F <1> pop ds 2363 <1> 2364 <1> ; (fall through. cx is equal to zero here so the 2365 <1> ; rep stosb in .fillblanks is effectively a no-op.) 2366 <1> 2367 <1> .fillblanks: 2368 <1> ; This isn't really supported but we'll do enough 2369 <1> ; to handle basic cases. WHILE conditions use the 2370 <1> ; switchbuffer size to find their stored condition. 2371 <1> ; So fill the additional space with blanks, which 2372 <1> ; WHILE condition parsing will happily eat up. 2373 00005ABE B020 <1> mov al, 32 2374 00005AC0 F3AA <1> rep stosb 2375 <1> 2376 <1> .no_switchbuffer_size_change: 2377 00005AC2 A8 <1> db __TEST_IMM8 ; (skip stc, NC) 2378 <1> .switchbuffer_error: 2379 00005AC3 F9 <1> stc 2380 00005AC4 5F <1> pop di 2381 00005AC5 5E <1> pop si 2382 00005AC6 59 <1> pop cx 2383 00005AC7 5B <1> pop bx ; restore returned registers 2384 00005AC8 58 <1> pop ax ; ax = target switchbuffer size 2385 00005AC9 723B <1> jc .cannotswitch 2386 00005ACB A3[F009] <1> mov word [auxbuff_switchbuffer_size], ax 2387 00005ACE 800E[9E00]20 <1> setopt [internalflags], switchbuffer 2388 00005AD3 890E[C488] <1> mov word [dpmi_rmsav+0], cx 2389 00005AD7 891E[C688] <1> mov word [dpmi_rmsav+2], bx 2390 00005ADB 66 <1> _386_o32 ; mov dword [dpmi_pmsav], edi 2391 00005ADC 893E[CE88] <1> mov word [dpmi_pmsav], di 2392 00005AE0 3E89B6[D088] <1> mov word [ds:bp+dpmi_pmsav+2], si 2393 <1> .nobuffer: 2394 00005AE5 6631FF <1> _386 xor edi, edi ; clear edih 2395 00005AE8 B80603 <1> mov ax, 0306h ; get raw mode-switch addresses 2396 00005AEB CD31 <1> int 31h 2397 00005AED 7217 <1> jc .cannotswitch 2398 00005AEF 800E[9E00]04 <1> setopt [internalflags], canswitchmode 2399 00005AF4 890E[C088] <1> mov word [dpmi_rm2pm+0], cx 2400 00005AF8 891E[C288] <1> mov word [dpmi_rm2pm+2], bx 2401 00005AFC 66 <1> _386_o32 ; mov dword [dpmi_pm2rm], edi 2402 00005AFD 893E[C888] <1> mov word [dpmi_pm2rm], di 2403 00005B01 3E89B6[CA88] <1> mov word [ds:bp+dpmi_pm2rm+2], si 2404 <1> .cannotswitch: 2405 00005B06 665F <1> _386 pop edi 2406 <1> 2407 00005B08 6652 <1> _386 push edx 2408 00005B0A 6650 <1> _386 push eax 2409 <1> %if (_CATCHPMINT214C || _DEBUG) || 1 2410 00005B0C 06 <1> push es 2411 00005B0D 1E <1> push ds 2412 00005B0E 07 <1> pop es 2413 <1> %endif 2414 <1> 2415 <1> %if CATCHEXCAMOUNT 2416 00005B0F BE[EA88] <1> mov si, exctab ; hook several exceptions 2417 <1> %if (_CATCHPMINT214C || _DEBUG) || 1 2418 00005B12 BF[F888] <1> mov di, excsave 2419 <1> %endif 2420 00005B15 6631D2 <1> _386 xor edx, edx ; clear edxh 2421 00005B18 BA[268A] <1> mov dx, exc_first 2422 <1> .loopexc: 2423 00005B1B AC <1> lodsb 2424 <1> d4 call d4message 2425 <1> d4 asciz "In installdpmi_code.loopexc, ax=" 2426 <1> d4 push ax 2427 <1> d4 call d4disp_stack_hex 2428 <1> d4 call d4message 2429 <1> d4 asciz 13,10 2430 <1> 2431 00005B1C 88C3 <1> mov bl, al 2432 <1> %if (_CATCHPMINT214C || _DEBUG) || 1 2433 00005B1E 66 <1> _386_o32 ; push edx 2434 00005B1F 52 <1> push dx ; preserve excXX pointer 2435 00005B20 B80202 <1> mov ax, 0202h 2436 <1> ; (edxh is zero) 2437 00005B23 CD31 <1> int 31h ; cx:(e)dx -> prior handler 2438 00005B25 66 <1> _386_o32 ; xchg eax, edx 2439 00005B26 92 <1> xchg ax, dx 2440 00005B27 66 <1> _386_o32 ; stosd 2441 00005B28 AB <1> stosw ; store offset (dword on 386+, else word) 2442 00005B29 91 <1> xchg ax, cx 2443 00005B2A AB <1> stosw ; store selector 2444 00005B2B B80400 <1> mov ax, 4 2445 00005B2E 29E8 <1> sub ax, bp ; if 386, ax = 4 - 2 = 2, else ax = 4 2446 00005B30 01C7 <1> add di, ax ; -> next entry of excsave 2447 00005B32 66 <1> _386_o32 ; pop edx 2448 00005B33 5A <1> pop dx 2449 <1> %endif 2450 00005B34 8B0E[D688] <1> mov cx, word [cssel] ; -> our handler for this exception 2451 00005B38 B80302 <1> mov ax, 0203h 2452 00005B3B CD31 <1> int 31h ; set our handler 2453 00005B3D 83C206 <1> add dx, byte exc_second - exc_first 2454 <1> ; -> next handler 2455 00005B40 81FE[F188] <1> cmp si, endexctab ; if another to go --> 2456 00005B44 72D5 <1> jb .loopexc 2457 <1> %endif 2458 <1> 2459 <1> %if CATCHPMINTAMOUNT 2460 00005B46 BE[3089] <1> mov si, pminttab ; ds:si -> pminttab 2461 00005B49 BF[3889] <1> mov di, pmintsave ; es:di -> pmintsave 2462 <1> .loopint: 2463 00005B4C AC <1> lodsb ; get interrupt number 2464 00005B4D 88C3 <1> mov bl, al ; bl = interrupt number 2465 00005B4F 6631D2 <1> _386 xor edx, edx ; clear edxh 2466 00005B52 B80402 <1> mov ax, 0204h 2467 00005B55 CD31 <1> int 31h ; cx:(e)dx -> prior handler 2468 00005B57 66 <1> _386_o32 ; xchg eax, edx 2469 00005B58 92 <1> xchg ax, dx ; (e)ax = offset 2470 00005B59 66 <1> _386_o32 ; stosd 2471 00005B5A AB <1> stosw ; store offset (dword on 386+, else word) 2472 00005B5B 91 <1> xchg ax, cx 2473 00005B5C AB <1> stosw ; store selector 2474 00005B5D B80400 <1> mov ax, 4 2475 00005B60 29E8 <1> sub ax, bp ; if 386, ax = 4 - 2 = 2, else ax = 4 2476 00005B62 01C7 <1> add di, ax ; -> next entry of pmintsave 2477 00005B64 AD <1> lodsw ; ax -> our handler 2478 00005B65 6631D2 <1> _386 xor edx, edx 2479 00005B68 92 <1> xchg ax, dx ; (e)dx -> our handler 2480 00005B69 8B0E[D688] <1> mov cx, word [cssel] ; cx:(e)dx -> our handler 2481 00005B6D B80502 <1> mov ax, 0205h 2482 00005B70 CD31 <1> int 31h 2483 00005B72 81FE[3389] <1> cmp si, pminttab.end 2484 00005B76 72D4 <1> jb .loopint 2485 <1> %endif 2486 <1> 2487 <1> %if (_CATCHPMINT214C || _DEBUG) || 1 2488 00005B78 07 <1> pop es 2489 <1> %endif 2490 00005B79 6658 <1> _386 pop eax 2491 00005B7B 665A <1> _386 pop edx 2492 <1> 2493 00005B7D BE[DE88] <1> mov si, convsegs 2494 <1> @@: 2495 00005B80 AD <1> lodsw 2496 00005B81 97 <1> xchg ax, di 2497 00005B82 FF7504 <1> push word [di + soaSelector] 2498 00005B85 8F05 <1> pop word [di + soaSegSel] 2499 00005B87 81FE[E688] <1> cmp si, convsegs.end_fixed 2500 00005B8B 72F3 <1> jb @B 2501 <1> 2502 00005B8D F606[9D00]01 <1> testopt [internalflags], hooked2F 2503 00005B92 7431 <1> jz .notours ; not currently hooked --> 2504 <1> 2505 00005B94 B02F <1> mov al, 2Fh ; interrupt number 2506 00005B96 BE[4089] <1> mov si, debug2F ; -> IISP entry header 2507 00005B99 BA0200 <1> mov dx, opt4_int_2F_force >> 16 2508 00005B9C E8D776 <1> call UnhookInterruptForce 2509 <1> ; try unhooking it 2510 00005B9F 730B <1> jnc .got2F 2511 <1> 2512 <1> .not2F: 2513 00005BA1 C706[186B]3246 <1> mov word [msg.serial_cannot_unhook.int], "2F" 2514 00005BA7 BA[F46A] <1> mov dx, msg.serial_cannot_unhook 2515 00005BAA EB16 <1> jmp @F 2516 <1> 2517 <1> .got2F: 2518 00005BAC 8026[9D00]FE <1> clropt [internalflags], hooked2F 2519 00005BB1 8026[A800]FD <1> clropt [internalflags4], dif4_int_2F_hooked 2520 00005BB6 E8CA77 <1> call update_inttab_optional 2521 00005BB9 C706[8A6B]3246 <1> mov word [msg.serial_late_unhook.int], "2F" 2522 00005BBF BA[696B] <1> mov dx, msg.serial_late_unhook 2523 <1> @@: 2524 00005BC2 E8DF61 <1> call putsz 2525 <1> .notours: 2526 <1> 2527 <1> 2528 <1> ; This is a bit silly: If we're never 2529 <1> ; entered in PM except for installdpmi 2530 <1> ; then the debugger thinks that the 2531 <1> ; SegSel fields should be segments. 2532 <1> ; It won't re-initialise them because 2533 <1> ; according to the flag used by run, 2534 <1> ; it was last running in 86 Mode. 2535 <1> ; So for now just hack them back. 2536 00005BC5 BE[DE88] <1> mov si, convsegs 2537 <1> @@: 2538 00005BC8 AD <1> lodsw 2539 00005BC9 97 <1> xchg ax, di 2540 00005BCA FF7502 <1> push word [di + soaSegment] 2541 00005BCD 8F05 <1> pop word [di + soaSegSel] 2542 00005BCF 81FE[E688] <1> cmp si, convsegs.end_fixed 2543 00005BD3 72F3 <1> jb @B 2544 <1> 2545 <1> d4 call d4message 2546 <1> d4 asciz "In installdpmi_code end",13,10 2547 <1> 2548 00005BD5 5B <1> pop bx 2549 00005BD6 58 <1> pop ax 2550 00005BD7 8ED0 <1> mov ss, ax 2551 00005BD9 89DC <1> mov sp, bx ; return to user stack 2552 <1> 2553 00005BDB 07 <1> pop es 2554 00005BDC 1F <1> pop ds 2555 00005BDD 9D <1> popf 2556 00005BDE 61 <1> popa 2557 00005BDF CB <1> retf 2558 <1> 2559 <1> .fataldpmierr: 2560 <1> d4 call d4message 2561 <1> d4 asciz "In installdpmi_code.fataldpmierr",13,10 2562 00005BE0 B8FF4C <1> mov ax, 4CFFh 2563 00005BE3 CD21 <1> int 21h 2073 %include "pmentry.asm" 2074 <1> 2075 <1> %if 0 2076 <1> 2077 <1> lDebugX PM entrypoints 2078 <1> 2079 <1> Copyright (C) 1995-2003 Paul Vojta 2080 <1> Copyright (C) 2008-2021 C. Masloch 2081 <1> 2082 <1> Usage of the works is permitted provided that this 2083 <1> instrument is retained with the works, so that any entity 2084 <1> that uses the works is notified of this instrument. 2085 <1> 2086 <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 2087 <1> 2088 <1> %endif 2089 <1> 2090 <1> 2091 <1> usesection lDEBUG_DATA_ENTRY 2092 <1> 2093 <1> %if _CATCHPMINT214C 2094 <1> pmint21: 2095 00008A0E 80FC4C <1> cmp ah, 4Ch 2096 00008A11 750C <1> jne .next_no_pop 2097 00008A13 1E <1> push ds 2098 00008A14 2E8E1E[D488] <1> mov ds, word [cs:dssel] 2099 00008A19 E8CAF6 <1> call entry_to_code_sel 2100 00008A1C [E55B] <1> dw pmint21_4C_code 2101 <1> 2102 <1> .next: 2103 00008A1E 1F <1> pop ds 2104 <1> .next_no_pop: 2105 <1> %ifn _ONLYNON386 2106 <1> ..@patch_no386_nop_DATA_ENTRY: 2107 00008A1F 66 <1> o32 2108 <1> %endif 2109 00008A20 2EFF2E[3889] <1> jmp far [cs:pmintsave.int21] 2110 <1> 2111 <1> 2112 <1> usesection lDEBUG_CODE 2113 <1> 2114 <1> code_insure_low_byte_not_0CCh 2115 <1> pmint21_4C_code: 2116 00005BE5 FF36[D688] <1> push word [cssel] 2117 00005BE9 68[1E8A] <1> push word pmint21.next 2118 <1> 2119 00005BEC 66 <1> _386_o32 2120 00005BED 60 <1> pusha 2121 00005BEE 06 <1> push es 2122 <1> 2123 <1> ; Some code (particularly d4message) may expect us to 2124 <1> ; run on the debugger's stack, to access the data 2125 <1> ; segment. Therefore, switch stacks. 2126 00005BEF 8CDA <1> mov dx, ds ; dx = ds = debugger data selector 2127 00005BF1 8CD0 <1> mov ax, ss 2128 00005BF3 66 <1> _386_o32 ; mov ebx, esp 2129 00005BF4 89E3 <1> mov bx, sp ; ax:(e)bx = stack to restore 2130 00005BF6 6631C9 <1> _386 xor ecx, ecx ; clear ecxh 2131 00005BF9 8B0E[A00A] <1> mov cx, word [run_sp] ; dx:(e)cx = our stack 2132 00005BFD 8ED2 <1> mov ss, dx 2133 <1> %ifn _ONLYNON386 2134 <1> ..@patch_no386_ds_2: ; (as for the other case in run.asm 2135 <1> ; insure to set sp directly after ss) 2136 00005BFF 66 <1> o32 ; mov esp, ecx 2137 <1> %endif 2138 00005C00 89CC <1> mov sp, cx ; switch to our stack 2139 <1> 2140 00005C02 50 <1> push ax 2141 00005C03 66 <1> _386_o32 ; push ebx 2142 00005C04 53 <1> push bx ; save original stack, far pointer 2143 <1> 2144 00005C05 800E[9D00]08 <1> setopt [internalflags], protectedmode 2145 <1> 2146 <1> 2147 <1> ; remember that we cannot access Protected Mode any longer 2148 <1> ; (also clear modeswitched flag so resetmode is a no-op) 2149 00005C0A 8026[9E00]D3 <1> clropt [internalflags], canswitchmode | switchbuffer | modeswitched 2150 <1> 2151 00005C0F 8B0E[F009] <1> mov cx, word [auxbuff_switchbuffer_size] 2152 00005C13 E30A <1> jcxz .no_switchbuffer_size_change 2153 00005C15 8E06[F609] <1> mov es, word [auxbuff_segorsel + soaSelector] 2154 00005C19 31FF <1> xor di, di ; es:di -> auxbuff switchbuffer 2155 00005C1B B020 <1> mov al, 32 2156 00005C1D F3AA <1> rep stosb ; fill with blanks (for WHILE) 2157 <1> .no_switchbuffer_size_change: 2158 00005C1F 8326[F009]00 <1> and word [auxbuff_switchbuffer_size], 0 2159 <1> 2160 00005C24 16 <1> push ss 2161 00005C25 07 <1> pop es 2162 <1> 2163 00005C26 E8E4E8 <1> call pm_reset_handlers 2164 <1> 2165 <1> 2166 00005C29 66 <1> _386_o32 2167 00005C2A 5B <1> pop bx 2168 00005C2B 58 <1> pop ax ; ax:(e)bx = original stack 2169 00005C2C 8ED0 <1> mov ss, ax 2170 <1> %ifn _ONLYNON386 2171 <1> ..@patch_no386_ds_3: ; (as for the other case above 2172 <1> ; insure to set sp directly after ss) 2173 00005C2E 66 <1> o32 ; mov esp, ebx 2174 <1> %endif 2175 00005C2F 89DC <1> mov sp, bx ; return to user stack 2176 <1> 2177 00005C31 07 <1> pop es 2178 00005C32 66 <1> _386_o32 2179 00005C33 61 <1> popa 2180 <1> 2181 00005C34 CB <1> retf ; jump to cssel:pmint21.next 2182 <1> %endif 2183 <1> 2184 <1> 2185 <1> usesection lDEBUG_DATA_ENTRY 2186 <1> 2187 <1> struc exceptionframe16 2188 00000000 <1> resw 8 ; pusha 2189 00000010 ???? <1> fr16_ds: resw 1 ; push ds 2190 00000012 ???????? <1> resw 2 ; 16-bit return address to DPMI host 2191 00000016 ???? <1> resw 1 ; error code 2192 00000018 ???? <1> fr16_ip: resw 1 2193 0000001A ???? <1> fr16_cs: resw 1 2194 0000001C ???? <1> fr16_fl: resw 1 2195 0000001E ???? <1> fr16_sp: resw 1 2196 00000020 ???? <1> fr16_ss: resw 1 2197 <1> endstruc 2198 <1> 2199 <1> struc exceptionframe32 2200 00000000 <1> resd 8 ; pushad 2201 00000020 ???? <1> resw 1 ; stack alignment 2202 00000022 ???? <1> fr32_ds: resw 1 ; push ds 2203 00000024 ???????????????? <1> resd 2 ; 32-bit return address to DPMI host 2204 0000002C ???????? <1> resd 1 ; error code 2205 00000030 ???????? <1> fr32_eip: resd 1 2206 00000034 ???????? <1> fr32_cs: resd 1 2207 00000038 ???????? <1> fr32_efl: resd 1 2208 0000003C ???????? <1> fr32_esp: resd 1 2209 00000040 ???????? <1> fr32_ss: resd 1 2210 <1> endstruc 2211 <1> 2212 <1> %assign EXC_ENTRY_FIRST 1 2213 <1> %macro exc_entry 2.nolist 2214 <1> %ifn EXC_ENTRY_FIRST 2215 <1> jmp strict short exc 2216 <1> %endif 2217 <1> exc %+ %1 %+ : 2218 <1> push ds 2219 <1> push %2 2220 <1> %if EXC_ENTRY_FIRST 2221 <1> exc_second: equ $ + 2 ; + 2 for short jump 2222 <1> %endif 2223 <1> %assign EXC_ENTRY_FIRST 0 2224 <1> %endmacro 2225 <1> 2226 00008A25 00 <1> align 2, db 0 2227 <1> ; Exception handlers. 2228 <1> ; These are the entry into the debugger in protected mode. 2229 <1> ; The address difference between exc_first and exc_second 2230 <1> ; is assumed to be the same for all the entries. This is 2231 <1> ; above, in installdpmi, as well as in run.asm run. These 2232 <1> ; are where the exception handlers are installed. 2233 <1> 2234 <1> exc_first: 2235 <1> %if _CATCHEXC00 2236 00008A26 1E68[627A] <1> exc_entry 00, int0msg 2237 <1> %endif 2238 <1> %if _CATCHEXC01 2239 00008A2A EB221E68[717A] <1> exc_entry 01, int1msg 2240 <1> %endif 2241 <1> %if _CATCHEXC03 2242 00008A30 EB1C1E68[947A] <1> exc_entry 03, int3msg 2243 <1> %endif 2244 <1> %if _CATCHEXC06 2245 00008A36 EB161E68[7A7B] <1> exc_entry 06, exc6msg 2246 <1> %endif 2247 <1> %if _CATCHEXC0C 2248 00008A3C EB101E68[917B] <1> exc_entry 0C, excCmsg 2249 <1> %endif 2250 <1> %if _CATCHEXC0D 2251 00008A42 EB0A1E68[9F7B] <1> exc_entry 0D, excDmsg 2252 <1> %endif 2253 <1> %if _CATCHEXC0E 2254 00008A48 EB041E68[CC7B] <1> exc_entry 0E, excEmsg 2255 <1> %endif 2256 <1> exc: 2257 00008A4E 2E8E1E[D488] <1> mov ds, word [cs:dssel] 2258 00008A53 8F06[DA0B] <1> pop word [run_int] 2259 <1> times 1 - (($ - $$) & 1) nop ; align in-code parameter 2260 00008A57 E88CF6 <1> call entry_to_code_sel 2261 00008A5A [355C] <1> dw exc_code 2262 <1> 2263 <1> 2264 <1> usesection lDEBUG_CODE 2265 <1> 2266 <1> code_insure_low_byte_not_0CCh 2267 <1> exc_code: 2268 00005C35 803E[DA88]00 <1> cmp byte [dpmi32], 0 2269 00005C3A 7503E98D00 <1> jz exc16 2270 <1> 2271 <1> [cpu 386] 2272 <1> exc32: 2273 00005C3F 50 <1> push ax ; stack alignment 2274 00005C40 6660 <1> pushad 2275 00005C42 6689E5 <1> mov ebp, esp 2276 00005C45 66678B4530 <1> mov eax, dword [ ebp + fr32_eip ] 2277 00005C4A 678B5D34 <1> mov bx, word [ ebp + fr32_cs ] 2278 00005C4E 66678B4D38 <1> mov ecx, dword [ ebp + fr32_efl ] 2279 00005C53 66678B553C <1> mov edx, dword [ ebp + fr32_esp ] 2280 00005C58 678B7540 <1> mov si, word [ ebp + fr32_ss ] 2281 00005C5C 678C4D34 <1> mov word [ ebp + fr32_cs ], cs 2282 00005C60 678C5D40 <1> mov word [ ebp + fr32_ss ], ds 2283 00005C64 803E[E60A]00 <1> cmp byte [ bInDbg ], 0 ; did the exception occur inside DEBUG? 2284 00005C69 7422 <1> je @F ; no --> 2285 <1> 2286 <1> ; inside debugger 2287 <1> %if _EXCCSIP 2288 00005C6B A3[B488] <1> mov word [exception_csip], ax 2289 00005C6E 891E[B688] <1> mov word [exception_csip + 2], bx 2290 <1> ; render CS:IP if internal GPF 2291 <1> %endif 2292 00005C72 6667C74530- <1> mov dword [ ebp + fr32_eip ], debuggerexception 2292 00005C77 [023E0000] <1> 2293 00005C7B 660FB706[940A] <1> movzx eax, word [ savesp ] 2294 00005C81 666789453C <1> mov dword [ ebp + fr32_esp ], eax 2295 00005C86 67806539FE <1> clropt [ ebp + fr32_efl ], 100h ; reset TF 2296 00005C8B EB39 <1> jmp short @FF 2297 <1> 2298 <1> @@: ; inside debuggee 2299 00005C8D 800E[9D00]08 <1> setopt [internalflags], protectedmode 2300 00005C92 6667C74530- <1> mov dword [ ebp + fr32_eip ], intrtn2_code 2300 00005C97 [68430000] <1> 2301 00005C9B 67806539FC <1> clropt [ ebp + fr32_efl ], 300h ; reset IF + TF 2302 00005CA0 6667C7453C- <1> mov dword [ ebp + fr32_esp ], reg_ss 2302 00005CA5 [8C0C0000] <1> 2303 00005CA9 66A3[9C0C] <1> mov dword [ reg_eip ], eax 2304 00005CAD 891E[900C] <1> mov word [ reg_cs ], bx 2305 <1> ; mov dword [ reg_efl ], ecx ; (eflh is saved in intrtn2_code) 2306 00005CB1 890E[A00C] <1> mov word [ reg_efl ], cx 2307 00005CB5 668916[740C] <1> mov dword [ reg_esp ], edx 2308 00005CBA 8936[8C0C] <1> mov word [ reg_ss ], si 2309 00005CBE 67FF7522 <1> push word [ ebp + fr32_ds ] 2310 00005CC2 8F06[840C] <1> pop word [ reg_ds ] 2311 <1> 2312 <1> @@: 2313 00005CC6 6661 <1> popad 2314 00005CC8 58 <1> pop ax ; stack alignment 2315 00005CC9 1F <1> pop ds 2316 00005CCA 66CB <1> o32 retf 2317 <1> 2318 <1> __CPU__ 2319 <1> exc16: 2320 00005CCC 60 <1> pusha 2321 00005CCD 89E5 <1> mov bp, sp 2322 00005CCF 8B4618 <1> mov ax, word [ bp + fr16_ip ] 2323 00005CD2 8B5E1A <1> mov bx, word [ bp + fr16_cs ] 2324 00005CD5 8B4E1C <1> mov cx, word [ bp + fr16_fl ] 2325 00005CD8 8B561E <1> mov dx, word [ bp + fr16_sp ] 2326 00005CDB 8B7620 <1> mov si, word [ bp + fr16_ss ] 2327 00005CDE 8C4E1A <1> mov word [ bp + fr16_cs ], cs 2328 00005CE1 8C5E20 <1> mov word [ bp + fr16_ss ], ds 2329 00005CE4 803E[E60A]00 <1> cmp byte [ bInDbg ], 0 ; did the exception occur inside DEBUG? 2330 00005CE9 7418 <1> je isdebuggee16 2331 <1> %if _EXCCSIP 2332 00005CEB A3[B488] <1> mov word [exception_csip], ax 2333 00005CEE 891E[B688] <1> mov word [exception_csip + 2], bx 2334 <1> ; render CS:IP if internal GPF 2335 <1> %endif 2336 00005CF2 C74618[023E] <1> mov word [ bp + fr16_ip ], debuggerexception 2337 00005CF7 A1[940A] <1> mov ax, word [ savesp ] 2338 00005CFA 89461E <1> mov word [ bp + fr16_sp ], ax 2339 00005CFD 80661DFE <1> clropt [ bp + fr16_fl ], 100h ; reset TF 2340 00005D01 EB2D <1> jmp short isdebugger16 2341 <1> isdebuggee16: 2342 00005D03 800E[9D00]08 <1> setopt [internalflags], protectedmode 2343 00005D08 C74618[6843] <1> mov word [ bp + fr16_ip ], intrtn2_code 2344 00005D0D 80661DFC <1> clropt [ bp + fr16_fl ], 300h ; reset IF + TF 2345 00005D11 C7461E[8C0C] <1> mov word [ bp + fr16_sp ], reg_ss 2346 00005D16 A3[9C0C] <1> mov word [ reg_eip ], ax 2347 00005D19 891E[900C] <1> mov word [ reg_cs ], bx 2348 00005D1D 890E[A00C] <1> mov word [ reg_efl ], cx 2349 00005D21 8916[740C] <1> mov word [ reg_esp ], dx 2350 00005D25 8936[8C0C] <1> mov word [ reg_ss ], si 2351 00005D29 FF7610 <1> push word [ bp + fr16_ds ] 2352 00005D2C 8F06[840C] <1> pop word [ reg_ds ] 2353 <1> isdebugger16: 2354 00005D30 61 <1> popa 2355 00005D31 1F <1> pop ds 2356 00005D32 CB <1> retf 2357 <1> 2358 <1> 2359 <1> usesection lDEBUG_DATA_ENTRY 2360 <1> 2361 <1> i23pm: 2362 <1> %if 1 2363 00008A5C 1E <1> push ds 2364 00008A5D 2E8E1E[D488] <1> mov ds, word [cs:dssel] 2365 00008A62 800E[EB0B]02 <1> setopt [serial_flags], sf_ctrl_c 2366 00008A67 1F <1> pop ds 2367 <1> %endif 2368 00008A68 2E803E[DA88]00 <1> cmp byte [ cs:dpmi32 ], 0 ; ! always NC 2369 00008A6E 7404 <1> je .retfw_2 2370 <1> [cpu 386] 2371 00008A70 66CA0400 <1> retfd 4 ; (NC) 2372 <1> __CPU__ 2373 <1> .retfw_2: 2374 00008A74 CA0200 <1> retfw 2 ; (NC) 2375 <1> 2376 <1> i24pm: 2377 00008A77 B003 <1> mov al, 03h ; fail 2378 00008A79 2E803E[DA88]00 <1> cmp byte [ cs:dpmi32 ], 0 2379 00008A7F 7401 <1> je .iret16 2380 00008A81 66 <1> o32 ; iretd 2381 <1> .iret16: 2382 00008A82 CF <1> iret 2074 2075 2076 usesection lDEBUG_CODE 2077 2078 resetmode_and_test_d_b_bit: 2079 %if _PM 2080 00005D33 E843DB call resetmode 2081 %endif 2082 2083 ; Test if bx is a 32-bit selector 2084 ; (as opposed to a 16-bit selector or a segment) 2085 ; 2086 ; INP: bx = selector (PM) or segment (86M) 2087 ; OUT: NZ = 32-bit 2088 ; ZR = 16-bit (always if 86M) 2089 ; NC 2090 ; REM: This checks whether a code segment's D bit or 2091 ; a stack segment's B bit is set. This operation 2092 ; is not meaningful otherwise. 2093 test_d_b_bit: 2094 00005D36 E89434 _386 call ispm 2095 00005D39 7403 _386 jz .pm ; 386 and PM, check selector --> 2096 ; not PM or no 386 2097 .ZR: 2098 00005D3B 38C0 cmp al, al ; ZR, NC 2099 00005D3D C3 retn 2100 .pm: 2101 [cpu 386] 2102 00005D3E 6650 push eax 2103 00005D40 6631C0 xor eax, eax ; use rights = 0 if inaccessible 2104 00005D43 660F02C3 lar eax, ebx ; access rights 2105 ; eax is unchanged if the access rights are inaccessible 2106 ; (and NZ is set in that case) 2107 00005D47 66A900004000 test eax, 400000h ; test bit (NC) 2108 00005D4D 6658 pop eax 2109 00005D4F C3 retn 2110 __CPU__ 2111 2112 2113 ; Test if selector in bx has a limit beyond 64 KiB - 1 B 2114 ; 2115 ; INP: bx = selector (PM) or segment (86M) 2116 ; OUT: NZ = limit above 64 KiB - 1 B 2117 ; ZR = limit below 64 KiB (always if 86M) 2118 ; NC 2119 test_high_limit: 2120 00005D50 E87A34 _386 call ispm 2121 00005D53 7402 _386 jz .pm ; 386 and PM, check selector --> 2122 ; not PM or no 386 2123 00005D55 EBE4 jmp test_d_b_bit.ZR 2124 2125 .pm: 2126 [cpu 386] 2127 00005D57 6650 push eax 2128 00005D59 6631C0 xor eax, eax ; use limit = 0 if inaccessible 2129 00005D5C 660F03C3 lsl eax, ebx ; segment limit 2130 ; eax is unchanged if the segment limit is inaccessible 2131 ; (and NZ is set in that case) 2132 00005D60 66A90000FFFF test eax, 0FFFF_0000h ; (NC) ZR if low limit, else NZ 2133 00005D66 6658 pop eax 2134 00005D68 C3 retn 2135 __CPU__ 2136 2137 subcpureset ; subcpu used in pminit.asm 2138 %endif ; _PM 2139 2140 %if _NOEXTENDER 2141 ; When we support non-extended DPMI, some calls to Int21 2142 ; are (extended) Int21 calls and some are (not extended) 2143 ; calls down to the real mode Int21. doscall is a macro 2144 ; that will always call the non-extended Int21. 2145 2146 ; Execute a non-extended DOS call 2147 _doscall: 2148 00005D69 9C pushf 2149 00005D6A E86034 call ispm 2150 00005D6D 750C jnz .rm 2151 subcpu 286 2152 ; Execute a non-extended DOS call from PM 2153 00005D6F 9D popf 2154 .pm: 2155 00005D70 36FF36[A60A] push word [ss:pspdbg] 2156 00005D75 6A21 push 21h 2157 00005D77 E89F35 call intcall 2158 00005D7A C3 retn 2159 subcpureset 2160 .rm: 2161 00005D7B 9D popf 2162 00005D7C E91135 jmp _int21 2163 %endif 2164 2165 %if _PM 2166 ; For branches other than symbolic, here's selector_to_segment 2167 ; (as used by the puts in expr.asm). Picked from symsnip 2168 ; binsrch.asm at revision 9c232415d568. 2169 ; INP: word [ss:sp] = selector to access 2170 ; OUT: word [ss:sp] = segment value to use for access 2171 ; CHG: - 2172 selector_to_segment: 2173 lframe near 2174 lpar word, in_selector_out_segment 2175 lpar_return 2176 00005D7F 5589E5 lenter 2177 2178 00005D82 E84834 call ispm ; is it PM ? 2179 00005D85 751B jnz .ret ; no, 86M --> (selector == segment) 2180 2181 subcpu 286 2182 00005D87 50 push ax 2183 00005D88 53 push bx 2184 00005D89 51 push cx 2185 00005D8A 52 push dx 2186 2187 00005D8B 8B5E04 mov bx, word [bp + ?in_selector_out_segment] 2188 00005D8E B80600 mov ax, 6 2189 00005D91 CD31 int 31h ; get segment base to cx:dx 2190 00005D93 C1EA04 shr dx, 4 2191 00005D96 C1E10C shl cx, 12 2192 00005D99 09CA or dx, cx 2193 00005D9B 895604 mov word [bp + ?in_selector_out_segment], dx 2194 2195 00005D9E 5A pop dx 2196 00005D9F 59 pop cx 2197 00005DA0 5B pop bx 2198 00005DA1 58 pop ax 2199 subcpureset 2200 2201 .ret: 2202 00005DA2 5D lleave 2203 00005DA3 C3 lret 2204 %endif 2205 2206 2207 ; support functions for symbols.asm 2208 2209 2210 ; INP: ds:dx -> message 2211 ; cx = length 2212 ; CHG: - 2213 ; STT: ds, es don't care 2214 disp_message_length_cx: 2215 00005DA4 50 push ax 2216 00005DA5 53 push bx 2217 00005DA6 51 push cx 2218 00005DA7 52 push dx 2219 00005DA8 06 push es 2220 00005DA9 1E push ds 2221 00005DAA 1E push ds 2222 00005DAB 07 pop es ; es:dx -> message, cx = length 2223 00005DAC 16 push ss 2224 00005DAD 1F pop ds ; ds = ss (required for puts) 2225 00005DAE E8805C call puts 2226 00005DB1 1F pop ds 2227 00005DB2 07 pop es 2228 00005DB3 5A pop dx 2229 00005DB4 59 pop cx 2230 00005DB5 5B pop bx 2231 00005DB6 58 pop ax 2232 00005DB7 C3 retn 2233 2234 ; INP: ds:dx -> message, ASCIZ 2235 ; CHG: - 2236 ; STT: ds, es don't care 2237 disp_message: 2238 00005DB8 06 push es 2239 00005DB9 1E push ds 2240 00005DBA 07 pop es ; es:dx -> message 2241 00005DBB E8E65F call putsz ; (sets up ds = ss internally) 2242 00005DBE 07 pop es 2243 00005DBF C3 retn 2244 2245 ; INP: al = character to display 2246 ; CHG: - 2247 ; STT: ds, es don't care 2248 disp_al: equ putc 2249 2250 2251 ; Display number in ax hexadecimal, always 4 digits 2252 ; 2253 ; INP: ax = number 2254 ; OUT: displayed using disp_al 2255 ; CHG: none 2256 disp_ax_hex: 2257 00005DC0 86C4 xchg al, ah 2258 00005DC2 E80200 call disp_al_hex 2259 00005DC5 86C4 xchg al, ah 2260 disp_al_hex: 2261 00005DC7 51 push cx 2262 00005DC8 B104 mov cl, 4 2263 00005DCA D2C0 rol al, cl 2264 00005DCC E80300 call disp_al_nybble_hex 2265 00005DCF D2C0 rol al, cl 2266 00005DD1 59 pop cx 2267 disp_al_nybble_hex: 2268 00005DD2 50 push ax 2269 00005DD3 240F and al, 0Fh 2270 00005DD5 0430 add al, '0' 2271 00005DD7 3C39 cmp al, '9' 2272 00005DD9 7602 jbe @F 2273 00005DDB 0407 add al, -'9' -1 +'A' 2274 @@: 2275 00005DDD E8E75F call disp_al 2276 00005DE0 58 pop ax 2277 00005DE1 C3 retn 2278 2279 2280 ; Display number in ax decimal 2281 ; 2282 ; INP: ax = number 2283 ; OUT: displayed using disp_al 2284 ; CHG: none 2285 disp_ax_dec: ; ax (no leading zeros) 2286 00005DE2 53 push bx 2287 00005DE3 31DB xor bx, bx 2288 .pushax: 2289 00005DE5 52 push dx 2290 00005DE6 50 push ax 2291 00005DE7 08DB or bl, bl 2292 00005DE9 7405 jz .nobl 2293 00005DEB 80EB05 sub bl, 5 2294 00005DEE F6DB neg bl 2295 .nobl: 2296 00005DF0 51 push cx 2297 00005DF1 B91027 mov cx, 10000 2298 00005DF4 E81B00 call .divide_out 2299 00005DF7 B9E803 mov cx, 1000 2300 00005DFA E81500 call .divide_out 2301 00005DFD B96400 mov cx, 100 2302 00005E00 E80F00 call .divide_out 2303 00005E03 B10A mov cl, 10 2304 00005E05 E80A00 call .divide_out 2305 ; (Divisor 1 is useless) 2306 00005E08 0430 add al, '0' 2307 00005E0A E8BA5F call disp_al 2308 00005E0D 59 pop cx 2309 00005E0E 58 pop ax 2310 00005E0F 5A pop dx 2311 00005E10 5B pop bx ; Caller's register 2312 00005E11 C3 retn 2313 2314 2315 ; INP: ax = number 2316 ; cx = divisor 2317 ; OUT: ax = remainder of operation 2318 ; result displayed 2319 .divide_out: 2320 00005E12 52 push dx 2321 00005E13 31D2 xor dx, dx 2322 00005E15 F7F1 div cx ; 0:ax / cx 2323 00005E17 52 push dx ; remainder 2324 00005E18 FECB dec bl 2325 00005E1A 7503 jnz .nobl2 2326 00005E1C 80CF01 or bh, 1 2327 .nobl2: 2328 00005E1F 08C7 or bh, al 2329 00005E21 7405 jz .leadingzero 2330 00005E23 0430 add al, '0' 2331 00005E25 E89F5F call disp_al ; display result 2332 .leadingzero: 2333 00005E28 58 pop ax ; remainder 2334 00005E29 5A pop dx 2335 00005E2A C3 retn 2336 2337 2338 ; C command - compare bytes. 2339 cc: 2340 00005E2B E8CD48 call parsecm ; parse arguments 2341 2342 ; To make the 16-bit 64 KiB compare hack below work, the 2343 ; full ecx mustn't be increased here for 16-bit segments. 2344 ; The passed ecx isn't higher than FFFFh for 16-bit segments, 2345 ; and a value of 0001_0000h needs to be passed as zero to 2346 ; the hack anyway. 2347 %if _PM 2348 00005E2E 36803E[DC88]00 cmp byte [ss:bAddr32], 0 2349 00005E34 7407 je .16 2350 [cpu 386] 2351 00005E36 6641 inc ecx 2352 00005E38 7504 jnz cc1 2353 00005E3A E99F46 jmp error 2354 __CPU__ 2355 .16: 2356 %endif 2357 00005E3D 41 inc cx 2358 cc1: 2359 00005E3E 1E push ds 2360 00005E3F 06 push es 2361 00005E40 16 push ss 2362 00005E41 1F pop ds ; ds := cs 2363 00005E42 E80448 call dohack ; do the interrupt pointer hack 2364 00005E45 07 pop es 2365 00005E46 1F pop ds 2366 %if _PM 2367 00005E47 36803E[DC88]00 cmp byte [ss:bAddr32], 0 2368 00005E4D 740E jz .cmp16 2369 00005E4F F367A6 a32 repe cmpsb 2370 00005E52 678A56FF mov dl, byte [esi-1] 2371 00005E56 26678A77FF mov dh, byte [es:edi-1] 2372 00005E5B EB0D jmp short .cmpdone 2373 .cmp16: 2374 %endif 2375 ; The following 3 instructions make a hack to support 64 KiB 2376 ; compare. The only time we get here with cx = 0 is the first 2377 ; iteration for a 64 KiB compare. In that case, dec cx results 2378 ; in FFFFh making repe cmpsb work. The single cmpsb will either 2379 ; jump the repe cmpsb (if it found a mismatch) or not jump it. 2380 ; The repe cmpsb might be executed with cx = 0, but will then 2381 ; not change anything including the flags so it works. 2382 00005E5D 49 dec cx 2383 00005E5E A6 cmpsb 2384 00005E5F 7502 jne .skip 2385 00005E61 F3A6 repe cmpsb ; start comparing 2386 .skip: 2387 00005E63 8A54FF mov dl, byte [si-1] ; save the possibly errant characters 2388 00005E66 268A75FF mov dh, byte [es:di-1] 2389 .cmpdone: 2390 00005E6A 9F lahf 2391 00005E6B 1E push ds 2392 00005E6C 06 push es 2393 00005E6D 16 push ss 2394 00005E6E 1F pop ds 2395 00005E6F E80B48 call unhack ; undo the interrupt pointer hack 2396 00005E72 07 pop es 2397 00005E73 1F pop ds 2398 00005E74 9E sahf 2399 00005E75 7475 je cc2 ; if we're done 2400 00005E77 06 push es 2401 00005E78 16 push ss 2402 00005E79 07 pop es 2403 00005E7A 66 _386_PM_o32 ; mov ebx, edi 2404 00005E7B 89FB mov bx, di 2405 00005E7D BF[0E08] mov di, line_out 2406 00005E80 8CD8 mov ax, ds 2407 00005E82 E8695B call hexword 2408 00005E85 B03A mov al, ':' 2409 00005E87 AA stosb 2410 00005E88 66 _386_PM_o32 ; mov eax, esi 2411 00005E89 89F0 mov ax, si 2412 00005E8B 66 _386_PM_o32 ; dec eax 2413 00005E8C 48 dec ax 2414 %if _PM 2415 00005E8D 36803E[DC88]00 cmp byte [ss:bAddr32], 0 2416 00005E93 7403 jz .16si 2417 00005E95 E84A5B call hexword_high 2418 .16si: 2419 %endif 2420 00005E98 E8535B call hexword 2421 00005E9B B82020 mov ax, 32<<8|32 2422 00005E9E AB stosw 2423 00005E9F 88D0 mov al, dl 2424 00005EA1 E8515B call hexbyte 2425 00005EA4 B82020 mov ax, 32<<8|32 2426 00005EA7 AB stosw 2427 00005EA8 88F0 mov al, dh 2428 00005EAA E8485B call hexbyte 2429 00005EAD B82020 mov ax, 32<<8|32 2430 00005EB0 AB stosw 2431 00005EB1 58 pop ax 2432 00005EB2 50 push ax 2433 00005EB3 E8385B call hexword 2434 00005EB6 B03A mov al, ':' 2435 00005EB8 AA stosb 2436 00005EB9 66 _386_PM_o32 ; mov eax, ebx 2437 00005EBA 89D8 mov ax, bx 2438 00005EBC 66 _386_PM_o32 ; dec eax 2439 00005EBD 48 dec ax 2440 %if _PM 2441 00005EBE 36803E[DC88]00 cmp byte [ss:bAddr32], 0 2442 00005EC4 7403 jz .16bx 2443 00005EC6 E8195B call hexword_high 2444 .16bx: 2445 %endif 2446 00005EC9 E8225B call hexword 2447 00005ECC 1E push ds 2448 00005ECD 16 push ss 2449 00005ECE 1F pop ds 2450 00005ECF 53 push bx 2451 00005ED0 51 push cx 2452 00005ED1 E8525B call putsline_crlf 2453 00005ED4 59 pop cx 2454 00005ED5 5F pop di 2455 00005ED6 1F pop ds 2456 00005ED7 07 pop es 2457 %if _PM 2458 00005ED8 36803E[DC88]00 cmp byte [ss:bAddr32],0 2459 00005EDE 7406 jz cc1_6 2460 [cpu 386] 2461 00005EE0 67E309 jecxz cc2 2462 __CPU__ 2463 cc1_j1: 2464 00005EE3 E958FF jmp cc1 2465 cc1_6: 2466 %else 2467 cc1_j1 equ cc1 2468 %endif 2469 %if 0 2470 _386_PM_o32 ; inc ecx 2471 inc cx 2472 _386_PM_a32 ; loopd cc1 2473 loop cc1 ; if not done yet 2474 %else 2475 00005EE6 67 _386_PM_a32 ; jecxz cc2 2476 00005EE7 E303 jcxz cc2 2477 00005EE9 E952FF jmp cc1 ; if not done yet 2478 %endif 2479 cc2: 2480 00005EEC 16 push ss ; restore segment registers 2481 00005EED 1F pop ds 2482 00005EEE 16 push ss 2483 00005EEF 07 pop es 2484 00005EF0 C3 retn 2485 2486 2487 %if _BOOTLDR 2488 %include "boot.asm" 2489 <1> 2490 <1> %if 0 2491 <1> 2492 <1> lDebug "boot" commands - boot loading 2493 <1> 2494 <1> Copyright (C) 2008-2017 C. Masloch 2495 <1> 2496 <1> Usage of the works is permitted provided that this 2497 <1> instrument is retained with the works, so that any entity 2498 <1> that uses the works is notified of this instrument. 2499 <1> 2500 <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 2501 <1> 2502 <1> %endif 2503 <1> 2504 <1> 2505 <1> usesection lDEBUG_DATA_ENTRY 2506 <1> 2507 00008A83 00 <1> align 16, db 0 2508 <1> load_unit_flags: 2509 00008A90 00 <1> times 128 db _LUF_DEFAULT_DISKETTE 2510 00008B10 00 <1> times 128 db _LUF_DEFAULT_HARDDISK 2511 <1> 2512 <1> align 16, db 0 2513 00008B90 00 <1> load_partition_table: times 16 * 4 db 0 2514 <1> .end: 2515 <1> 2516 <1> align 16, db 0 2517 <1> ; Data passed to us from loader (in case we booted) 2518 <1> loaddata_loadedfrom: 2519 00008BD0 00 <1> times (-LOADDATA + bsBPB + ebpbNew + BPBN_size) db 0 2520 <1> 2521 00008C4A 00 <1> align 16, db 0 2522 <1> load_data_lowest: 2523 00008C50 00 <1> times LOADDATA3_size db 0 2524 <1> ; data used to access storage 2525 <1> load_data: 2526 00008C60 00 <1> times (-LOADDATA2 + bsBPB + ebpbNew + BPBN_size) db 0 2527 00008CEA 00 <1> align 16, db 0 2528 <1> load_current_settings: 2529 <1> istruc LOADSETTINGS 2530 00008CF0 0000 <1> at lsKernelName, load_kernelname_default: dw 0 2531 00008CF2 0000 <1> at lsAddName, load_addname_default: dw 0 2532 00008CF4 0000 <1> at lsMinPara, load_minpara: dw 0 2533 00008CF6 0000 <1> at lsMaxPara, load_maxpara: dw 0 2534 00008CF8 0000 <1> at lsOptions, load_options: dw 0 2535 00008CFA 0000 <1> at lsSegment, load_loadseg: dw 0 2536 00008CFC 00000000 <1> at lsEntry, load_entrypoint: dd 0 2537 00008D00 00000000 <1> at lsBPB, load_bpb: dd 0 2538 00008D04 0000 <1> at lsCheckOffset, load_check_offset: dw 0 2539 00008D06 0000 <1> at lsCheckValue, load_check_value: dw 0 2540 <1> at lsName 2541 <1> ; iend 2542 <1> %pop ; (pop off the istruc context) 2543 <1> 2544 <1> %if _INPUT_FILE_BOOT 2545 00008D08 00 <1> align 16, db 0 2546 <1> load_yy_direntry: 2547 00008D10 00 <1> times DIRENTRY_size db 0 2548 <1> 2549 <1> LOAD_INPUT_FILE_SIZE equ fromparas(paras(-LOADDATA3 + bsBPB + ebpbNew + BPBN_size)) 2550 <1> align 16, db 0 2551 <1> load_input_file: 2552 00008D30 00 <1> times _INPUT_FILE_BOOT * LOAD_INPUT_FILE_SIZE db 0 2553 <1> .active: 2554 00008FB0 0000 <1> dw 0 2555 <1> .goto_offset: 2556 00008FB2 0000 <1> dw 0 2557 <1> %endif 2558 <1> 2559 <1> align 4, db 0 2560 00008FB4 00000000 <1> load_bpb_dest: dd 0 2561 <1> load_sectors: equ load_data - LOADDATA2 + bsBPB + bpbCHSSectors 2562 <1> load_heads: equ load_data - LOADDATA2 + bsBPB + bpbCHSHeads 2563 <1> load_sectorsize: equ load_data - LOADDATA2 + bsBPB + bpbBytesPerSector 2564 <1> load_sectorsizepara: equ load_data - LOADDATA2 + ldParaPerSector 2565 <1> load_sectorseg: equ load_data - LOADDATA2 + ldSectorSeg 2566 00008FB8 00000000 <1> load_partition_sector: dd 0 2567 <1> load_ldp_sector: equ loaddata_loadedfrom - LOADDATA + bsBPB + bpbHiddenSectors 2568 <1> ; load_sdp_sector: equ load_data - LOADDATA2 + bsBPB + bpbHiddenSectors 2569 00008FBC 0000 <1> load_partition_cycle: dw 0 2570 00008FBE 0000 <1> load_cmdline: dw 0 2571 <1> load_ldflags: equ load_data - LOADDATA2 + ldFlags 2572 <1> load_unit: equ load_data - LOADDATA2 + bsBPB + ebpbNew + bpbnBootUnit 2573 00008FC0 0000 <1> load_partition_entry: dw 0 2574 00008FC2 00 <1> load_partition: db 0 2575 00008FC3 00 <1> load_current_partition: db 0 2576 00008FC4 00 <1> load_found_partition: db 0 2577 00008FC5 00 <1> load_check_dir_attr: db 0 2578 00008FC6 00 <1> load_sector_alt: db 0 2579 <1> 2580 00008FC7 00 <1> align 4, db 0 2581 00008FC8 00 <1> load_kernel_name: times 11 + 1 db 0 2582 <1> align 2, db 0 2583 <1> ; load_kernelname_default:dw 0 2584 <1> ; ASCIZ filename for if load_kernelname_input terminates in '/' 2585 00008FD4 0000 <1> load_kernelname_input: dw 0 2586 <1> ; input (ASCIZ '/'-terminated pathnames + optional filename) 2587 00008FD6 0000 <1> load_kernelname_next: dw 0 2588 <1> ; next element in ASCIZ load_kernelname_input, 2589 <1> ; empty string if pathname terminated in '/' 2590 <1> ; load_addname_default: dw 0 2591 00008FD8 0000 <1> load_addname_input: dw 0 2592 00008FDA 0000 <1> load_addname_next: dw 0 2593 <1> %if _INPUT_FILE_BOOT 2594 00008FDC 0000 <1> load_yyname_input: dw 0 2595 00008FDE 0000 <1> load_yyname_next: dw 0 2596 <1> %endif 2597 <1> 2598 <1> align 2, db 0 2599 00008FE0 0000 <1> load_adr_dirbuf_segment:dw 0 2600 00008FE2 0000 <1> boot_new_memsizekib: dw 0 2601 00008FE4 0000 <1> boot_old_memsizekib: dw 0 2602 00008FE6 00 <1> boot_ebdaflag: db 0 ; EBDA flag: non-zero if present 2603 <1> 2604 00008FE7 00 <1> align 4, db 0 2605 00008FE8 00000000 <1> load_readwrite_sector: dd 0 2606 00008FEC 0000 <1> load_readwrite_buffer: dw 0 2607 00008FEE 0000 <1> load_readwrite_count: dw 0 2608 00008FF0 0000 <1> load_readwrite_function:dw 0 2609 <1> 2610 <1> 2611 <1> usesection lDEBUG_CODE 2612 <1> 2613 <1> init_bootcmd: 2614 00005EF1 E807A6 <1> call guard_re 2615 00005EF4 BD[908C] <1> mov bp, load_data - LOADDATA2 2616 <1> 2617 00005EF7 F606[A400]80 <1> testopt [internalflags3], dif3_partition_changed 2618 00005EFC 7413 <1> jz @F 2619 <1> 2620 00005EFE FF761E <1> push word [bp + bsBPB + bpbHiddenSectors + 2] 2621 00005F01 FF761C <1> push word [bp + bsBPB + bpbHiddenSectors] 2622 00005F04 8F06[B88F] <1> pop word [load_partition_sector] 2623 00005F08 8F06[BA8F] <1> pop word [load_partition_sector + 2] 2624 00005F0C 8026[A400]7F <1> clropt [internalflags3], dif3_partition_changed 2625 <1> @@: 2626 <1> 2627 00005F11 31C9 <1> xor cx, cx 2628 00005F13 894E1C <1> mov [bp + bsBPB + bpbHiddenSectors + 0], cx 2629 00005F16 894E1E <1> mov [bp + bsBPB + bpbHiddenSectors + 2], cx 2630 00005F19 880E[C68F] <1> mov byte [load_sector_alt], cl 2631 00005F1D C3 <1> retn 2632 <1> 2633 <1> 2634 <1> bootcmd: 2635 <1> %if _PM 2636 00005F1E E8AC32 <1> call ispm 2637 00005F21 750C <1> jnz .rm 2638 00005F23 BA[1A7C] <1> mov dx, nopmsupp 2639 00005F26 B80102 <1> mov ax, 0201h 2640 00005F29 E8F745 <1> call setrc 2641 00005F2C E96F5E <1> jmp putsz_error 2642 <1> .rm: 2643 <1> %endif 2644 <1> d4 call d4message 2645 <1> d4 asciz "In bootcmd",13,10 2646 <1> 2647 00005F2F E8BFFF <1> call init_bootcmd 2648 <1> 2649 00005F32 E8DF59 <1> call skipcomma 2650 00005F35 4E <1> dec si 2651 00005F36 BA[6470] <1> mov dx, msg.list 2652 00005F39 E85359 <1> call isstring? 2653 00005F3C 7503E9D304 <1> je .list 2654 <1> 2655 00005F41 BA[A163] <1> mov dx, msg.quit 2656 00005F44 E84859 <1> call isstring? 2657 00005F47 7536 <1> jne .not_quit 2658 <1> .quit: 2659 <1> %if _DOSEMU 2660 00005F49 F606[9F00]01 <1> testopt [internalflags], runningdosemu 2661 00005F4E 7407 <1> jz .quit_not_dosemu 2662 <1> 2663 00005F50 31DB <1> xor bx, bx 2664 00005F52 B8FFFF <1> mov ax, -1 2665 00005F55 CDE6 <1> int 0E6h ; dosemu quit 2666 <1> 2667 <1> .quit_not_dosemu: 2668 <1> %endif 2669 <1> 2670 <1> ; from https://stackoverflow.com/a/5240330/738287 2671 00005F57 B80153 <1> mov ax, 5301h 2672 00005F5A 31DB <1> xor bx, bx 2673 00005F5C CD15 <1> int 15h ; connect to APM API 2674 <1> 2675 00005F5E B80E53 <1> mov ax, 530Eh 2676 00005F61 31DB <1> xor bx, bx 2677 00005F63 B90201 <1> mov cx, 0102h 2678 00005F66 CD15 <1> int 15h ; set APM version to 1.02 2679 <1> 2680 00005F68 B80753 <1> mov ax, 5307h 2681 00005F6B BB0100 <1> mov bx, 1 2682 00005F6E B90300 <1> mov cx, 3 2683 00005F71 CD15 <1> int 15h ; shut down system 2684 <1> 2685 00005F73 BA[C25F] <1> mov dx, msg.boot_quit_fail 2686 00005F76 B80202 <1> mov ax, 0202h 2687 00005F79 E8A745 <1> call setrc 2688 00005F7C E91F5E <1> jmp putsz_error 2689 <1> 2690 <1> .not_quit: 2691 00005F7F BA[7B63] <1> mov dx, msg.read 2692 00005F82 E80A59 <1> call isstring? 2693 00005F85 7503E96608 <1> je boot_read 2694 <1> 2695 00005F8A BA[8063] <1> mov dx, msg.write 2696 00005F8D E8FF58 <1> call isstring? 2697 00005F90 7503E96308 <1> je boot_write 2698 <1> 2699 00005F95 BA[8D63] <1> mov dx, msg.dir 2700 00005F98 E8F458 <1> call isstring? 2701 00005F9B 7503E97310 <1> je boot_dir 2702 <1> 2703 00005FA0 BA[A663] <1> mov dx, msg.protocol 2704 00005FA3 E8E958 <1> call isstring? 2705 00005FA6 7533 <1> jne .notproto 2706 <1> 2707 00005FA8 E88259 <1> call skipequals 2708 00005FAB 4E <1> dec si 2709 00005FAC BA[E863] <1> mov dx, msg.sector 2710 00005FAF E8DD58 <1> call isstring? 2711 00005FB2 7423 <1> je .proto_sector 2712 <1> 2713 00005FB4 BA[EF63] <1> mov dx, msg.sector_alt 2714 00005FB7 E8D558 <1> call isstring? 2715 00005FBA 7416 <1> je .proto_sector_alt 2716 <1> 2717 00005FBC BB[1877] <1> mov bx, loadsettings 2718 <1> .proto_settings_next: 2719 00005FBF 8D5718 <1> lea dx, [bx + lsName] 2720 00005FC2 E8CA58 <1> call isstring? 2721 00005FC5 7421 <1> je .proto_settings 2722 00005FC7 83C320 <1> add bx, LOADSETTINGS_size 2723 00005FCA 833F00 <1> cmp word [bx], 0 2724 00005FCD 75F0 <1> jne .proto_settings_next 2725 <1> 2726 00005FCF E90A45 <1> jmp error 2727 <1> 2728 <1> .proto_sector_alt: 2729 00005FD2 C606[C68F]01 <1> mov byte [load_sector_alt], 1 2730 <1> .proto_sector: 2731 00005FD7 E83A59 <1> call skipcomma 2732 00005FDA A8 <1> db __TEST_IMM8 2733 <1> .notproto: 2734 00005FDB AC <1> lodsb 2735 00005FDC E81D06 <1> call parseloadunit_default_sdp 2736 00005FDF E93303 <1> jmp .load 2737 <1> 2738 <1> 2739 <1> .errordec: 2740 00005FE2 4E <1> dec si 2741 <1> .error: 2742 00005FE3 A8 <1> db __TEST_IMM8 ; skip pop 2743 <1> .errorpop: 2744 00005FE4 5E <1> pop si 2745 00005FE5 E9F444 <1> jmp error 2746 <1> 2747 <1> 2748 <1> .proto_settings: 2749 00005FE8 56 <1> push si 2750 00005FE9 89DE <1> mov si, bx 2751 00005FEB BF[F08C] <1> mov di, load_current_settings 2752 00005FEE B90C00 <1> mov cx, lsName >> 1 2753 00005FF1 F3A5 <1> rep movsw 2754 <1> %if lsName & 1 2755 <1> movsb 2756 <1> %endif 2757 00005FF3 FF75E8 <1> push word [load_kernelname_default - (load_current_settings + lsName) + di] 2758 00005FF6 8F85CC02 <1> pop word [load_kernelname_input - (load_current_settings + lsName) + di] 2759 00005FFA FF75EA <1> push word [load_addname_default - (load_current_settings + lsName) + di] 2760 00005FFD 8F85D002 <1> pop word [load_addname_input - (load_current_settings + lsName) + di] 2761 <1> 2762 00006001 5E <1> pop si 2763 <1> 2764 <1> d4 call d4message 2765 <1> d4 asciz "In bootcmd.proto_settings",13,10 2766 <1> 2767 <1> .proto_next: 2768 00006002 E80F59 <1> call skipcomma 2769 00006005 4E <1> dec si 2770 00006006 BA[AF63] <1> mov dx, msg.segment 2771 00006009 E88358 <1> call isstring? 2772 0000600C 7478 <1> je .proto_segment 2773 0000600E BA[B763] <1> mov dx, msg.entry 2774 00006011 E87B58 <1> call isstring? 2775 00006014 7503E98C00 <1> je .proto_entry 2776 00006019 BA[BD63] <1> mov dx, msg.bpb 2777 0000601C E87058 <1> call isstring? 2778 0000601F 7503E9A000 <1> je .proto_bpb 2779 00006024 BA[C163] <1> mov dx, msg.minpara 2780 00006027 E86558 <1> call isstring? 2781 0000602A 7503E9B400 <1> je .proto_minpara 2782 0000602F BA[C963] <1> mov dx, msg.maxpara 2783 00006032 E85A58 <1> call isstring? 2784 00006035 7503E9B700 <1> je .proto_maxpara 2785 0000603A BA[D163] <1> mov dx, msg.checkoffset 2786 0000603D E84F58 <1> call isstring? 2787 00006040 7503E9BA00 <1> je .proto_checkoffset 2788 00006045 BA[DD63] <1> mov dx, msg.checkvalue 2789 00006048 E84458 <1> call isstring? 2790 0000604B 7503E9C800 <1> je .proto_checkvalue 2791 <1> 2792 00006050 BB[A875] <1> mov bx, loadoptiontable 2793 <1> .proto_lot_next: 2794 00006053 8B0F <1> mov cx, [bx] ; flag 2795 00006055 8B5702 <1> mov dx, [bx + 2] ; -> ASCIZ message 2796 00006058 85C9 <1> test cx, cx 2797 0000605A 7503E9C700 <1> jz .proto_done 2798 0000605F E82D58 <1> call isstring? 2799 00006062 7405 <1> je .proto_lot 2800 00006064 83C304 <1> add bx, 4 2801 00006067 EBEA <1> jmp .proto_lot_next 2802 <1> 2803 <1> .proto_lot: 2804 00006069 E8C158 <1> call skipequals 2805 0000606C 89CA <1> mov dx, cx 2806 0000606E F7D2 <1> not dx 2807 00006070 2116[F88C] <1> and word [load_options], dx 2808 00006074 E87052 <1> call getexpression 2809 00006077 E87F4C <1> call toboolean 2810 0000607A 85D2 <1> test dx, dx 2811 0000607C 7404 <1> jz @F 2812 0000607E 090E[F88C] <1> or word [load_options], cx 2813 <1> @@: 2814 00006082 4E <1> dec si 2815 00006083 E97CFF <1> jmp .proto_next 2816 <1> 2817 <1> .proto_segment: 2818 00006086 E8A458 <1> call skipequals 2819 00006089 E84157 <1> call getword ; dx = word 2820 0000608C 83FA50 <1> cmp dx, 50h 2821 0000608F 7208 <1> jb @F 2822 00006091 8916[FA8C] <1> mov word [load_loadseg], dx 2823 00006095 4E <1> dec si 2824 00006096 E969FF <1> jmp .proto_next 2825 <1> 2826 <1> @@: 2827 00006099 BA[2263] <1> mov dx, msg.boot_segment_too_low 2828 0000609C B81002 <1> mov ax, 0210h 2829 0000609F E88144 <1> call setrc 2830 000060A2 E95803 <1> jmp .fail 2831 <1> 2832 <1> 2833 <1> .proto_entry: 2834 000060A5 E88558 <1> call skipequals 2835 000060A8 31DB <1> xor bx, bx 2836 000060AA E86248 <1> call getaddr ; bx:(e)dx = addr 2837 000060AD 66F7C20000FFFF <1> _386 test edx, 0_FFFF_0000h 2838 000060B4 0F852BFF <1> _386 jnz .error 2839 000060B8 8916[FC8C] <1> mov word [load_entrypoint], dx 2840 000060BC 891E[FE8C] <1> mov word [load_entrypoint + 2], bx 2841 000060C0 4E <1> dec si 2842 000060C1 E93EFF <1> jmp .proto_next 2843 <1> 2844 <1> .proto_bpb: 2845 000060C4 E86658 <1> call skipequals 2846 000060C7 31DB <1> xor bx, bx 2847 000060C9 E84348 <1> call getaddr ; bx:(e)dx = addr 2848 000060CC 66F7C20000FFFF <1> _386 test edx, 0_FFFF_0000h 2849 000060D3 0F850CFF <1> _386 jnz .error 2850 000060D7 8916[008D] <1> mov word [load_bpb], dx 2851 000060DB 891E[028D] <1> mov word [load_bpb + 2], bx 2852 000060DF 4E <1> dec si 2853 000060E0 E91FFF <1> jmp .proto_next 2854 <1> 2855 <1> .proto_minpara: 2856 000060E3 E84758 <1> call skipequals 2857 000060E6 E8E456 <1> call getword ; dx = word 2858 000060E9 8916[F48C] <1> mov word [load_minpara], dx 2859 000060ED 4E <1> dec si 2860 000060EE E911FF <1> jmp .proto_next 2861 <1> 2862 <1> .proto_maxpara: 2863 000060F1 E83958 <1> call skipequals 2864 000060F4 E8D656 <1> call getword ; dx = word 2865 000060F7 8916[F68C] <1> mov word [load_maxpara], dx 2866 000060FB 4E <1> dec si 2867 000060FC E903FF <1> jmp .proto_next 2868 <1> 2869 <1> .proto_checkoffset: 2870 000060FF E82B58 <1> call skipequals 2871 00006102 E8C856 <1> call getword ; dx = word 2872 00006105 89D0 <1> mov ax, dx 2873 00006107 241F <1> and al, 31 2874 00006109 3C1F <1> cmp al, 31 2875 0000610B 7503E9D3FE <1> je .error 2876 <1> ; Previously we rejected all odd values here. Now, 2877 <1> ; we only reject a subset of odd values, namely 2878 <1> ; those that may actually cross a sector boundary. 2879 <1> ; Note that sectors may be as small as 32 bytes. 2880 <1> ; This insures the checked word never crosses a sector 2881 <1> ; boundary. Thus, loading a single sector suffices. 2882 00006110 8916[048D] <1> mov word [load_check_offset], dx 2883 00006114 4E <1> dec si 2884 00006115 E9EAFE <1> jmp .proto_next 2885 <1> 2886 <1> .proto_checkvalue: 2887 00006118 E81258 <1> call skipequals 2888 0000611B E8AF56 <1> call getword ; dx = word 2889 0000611E 8916[068D] <1> mov word [load_check_value], dx 2890 00006122 4E <1> dec si 2891 00006123 E9DCFE <1> jmp .proto_next 2892 <1> 2893 <1> .proto_done: 2894 00006126 BB[E475] <1> mov bx, loadoptiontable.incompatible 2895 <1> @@: 2896 00006129 8B0F <1> mov cx, [bx] 2897 0000612B 0B4F02 <1> or cx, [bx + 2] 2898 0000612E 746B <1> jz .proto_compatible 2899 00006130 8B16[F88C] <1> mov dx, word [load_options] 2900 00006134 21CA <1> and dx, cx 2901 00006136 39CA <1> cmp dx, cx 2902 00006138 7405 <1> je .proto_incompatible 2903 0000613A 83C304 <1> add bx, 4 2904 0000613D EBEA <1> jmp @B 2905 <1> 2906 <1> .proto_incompatible: 2907 0000613F 16 <1> push ss 2908 00006140 07 <1> pop es 2909 00006141 B80302 <1> mov ax, 0203h 2910 00006144 E8DC43 <1> call setrc 2911 00006147 BA[DC5F] <1> mov dx, msg.bootfail 2912 0000614A E8515C <1> call putsz_error 2913 0000614D BA[D562] <1> mov dx, msg.boot_cannot_set_both 2914 00006150 E84B5C <1> call putsz_error 2915 00006153 8B07 <1> mov ax, word [bx] 2916 00006155 E82200 <1> call .proto_incompatible_get_label 2917 00006158 E8435C <1> call putsz_error 2918 0000615B BA[E662] <1> mov dx, msg.boot_and 2919 0000615E E83D5C <1> call putsz_error 2920 00006161 8B4702 <1> mov ax, word [bx + 2] 2921 00006164 E81300 <1> call .proto_incompatible_get_label 2922 00006167 E8345C <1> call putsz_error 2923 0000616A BA[EC62] <1> mov dx, msg.boot_dot_crlf 2924 <1> .putsz_errret: 2925 0000616D B80402 <1> mov ax, 0204h 2926 00006170 E8B043 <1> call setrc 2927 00006173 E8285C <1> call putsz_error 2928 00006176 FF26[9A0A] <1> jmp near word [errret] 2929 <1> 2930 <1> .proto_incompatible_get_label: 2931 0000617A 53 <1> push bx 2932 0000617B BB[A875] <1> mov bx, loadoptiontable 2933 <1> @@: 2934 0000617E 8B0F <1> mov cx, [bx] 2935 00006180 E30E <1> jcxz .proto_internal_error 2936 00006182 39C8 <1> cmp ax, cx 2937 00006184 8B5702 <1> mov dx, word [bx + 2] 2938 00006187 7405 <1> je @F 2939 00006189 83C304 <1> add bx, 4 2940 0000618C EBF0 <1> jmp @B 2941 <1> 2942 <1> @@: 2943 0000618E 5B <1> pop bx 2944 0000618F C3 <1> retn 2945 <1> 2946 <1> .proto_internal_error: 2947 00006190 BA[F062] <1> mov dx, msg.boot_internal_error 2948 00006193 B80502 <1> mov ax, 0205h 2949 00006196 E88A43 <1> call setrc 2950 00006199 EBD2 <1> jmp .putsz_errret 2951 <1> 2952 <1> 2953 <1> .proto_compatible: 2954 0000619B AC <1> lodsb 2955 0000619C E85D04 <1> call parseloadunit_default_sdp 2956 0000619F 7503E98800 <1> jz .fn_done_eol ; no filename given, use defaults --> 2957 <1> ; al was = '/' or '\' or first pathname's first character 2958 <1> ; si-> next char 2959 000061A4 BB[D48F] <1> mov bx, load_kernelname_input 2960 000061A7 E83E00 <1> call .pathname_parse_super 2961 <1> 2962 000061AA 56 <1> push si 2963 000061AB 50 <1> push ax 2964 000061AC E89557 <1> call skipwh0 2965 000061AF E83C57 <1> call iseol? 2966 000061B2 58 <1> pop ax 2967 000061B3 5E <1> pop si 2968 000061B4 7478 <1> je .fn_done 2969 <1> 2970 000061B6 BB[D88F] <1> mov bx, load_addname_input 2971 <1> 2972 000061B9 E88857 <1> call skipwh0 2973 000061BC 3C2F <1> cmp al, '/' 2974 000061BE 7404 <1> je @F 2975 000061C0 3C5C <1> cmp al, '\' 2976 000061C2 751F <1> jne .proto_not_double_slash 2977 <1> @@: 2978 000061C4 803C2F <1> cmp byte [si], '/' 2979 000061C7 7405 <1> je @F 2980 000061C9 803C5C <1> cmp byte [si], '\' 2981 000061CC 7515 <1> jne .proto_not_double_slash 2982 <1> @@: 2983 000061CE 4E <1> dec si 2984 000061CF 8937 <1> mov word [bx], si 2985 000061D1 C7042F2F <1> mov word [si], "//" 2986 000061D5 46 <1> inc si 2987 000061D6 46 <1> inc si 2988 000061D7 E81457 <1> call iseol? 2989 000061DA C60400 <1> mov byte [si], 0 2990 000061DD 7401 <1> je @F 2991 000061DF 46 <1> inc si 2992 <1> @@: 2993 000061E0 AC <1> lodsb 2994 000061E1 EB4B <1> jmp .fn_done 2995 <1> 2996 <1> .proto_not_double_slash: 2997 000061E3 E80200 <1> call .pathname_parse_super 2998 000061E6 EB46 <1> jmp .fn_done 2999 <1> 3000 <1> 3001 <1> ; INP: bx -> word variable to hold filename 3002 <1> ; OUT: word [bx] -> list of /-separated pathnames, zero-terminated 3003 <1> ; CHG: ax, cx, si, di, [es:load_kernel_name] 3004 <1> .pathname_parse_super: 3005 <1> d4 call d4message 3006 <1> d4 asciz "In bootcmd.pathname_parse_super",13,10 3007 <1> 3008 000061E8 E85957 <1> call skipwh0 3009 000061EB 3C2F <1> cmp al, '/' 3010 000061ED 7404 <1> je @F 3011 000061EF 3C5C <1> cmp al, '\' 3012 000061F1 7506 <1> jne @FF 3013 <1> @@: 3014 000061F3 4E <1> dec si 3015 000061F4 8937 <1> mov word [bx], si 3016 000061F6 46 <1> inc si 3017 000061F7 EB0E <1> jmp .pathname_check 3018 <1> 3019 <1> @@: 3020 000061F9 4E <1> dec si 3021 000061FA 8937 <1> mov word [bx], si 3022 <1> 3023 <1> .pathname_parse: 3024 <1> .pathname_next: 3025 <1> d4 call d4message 3026 <1> d4 asciz "In bootcmd.pathname_parse",13,10 3027 000061FC E8D506 <1> call boot_parse_fn 3028 <1> ; al = separator char 3029 <1> ; si -> next char after that (if any) 3030 000061FF 3C2F <1> cmp al, '/' ; path separator? 3031 00006201 7404 <1> je .pathname_check 3032 00006203 3C5C <1> cmp al, '\' 3033 00006205 7517 <1> jne .pathname_none ; no, this was the filename --> 3034 <1> .pathname_check: 3035 <1> d4 call d4message 3036 <1> d4 asciz "In bootcmd.pathname_parse_check",13,10 3037 00006207 C644FF2F <1> mov byte [si - 1], '/' ; normalise path separator 3038 0000620B AC <1> lodsb 3039 0000620C 3C20 <1> cmp al, 32 ; space ? 3040 0000620E 740E <1> je .pathname_gotfirst 3041 00006210 3C09 <1> cmp al, 9 3042 00006212 740A <1> je .pathname_gotfirst ; yes, allow for second name --> 3043 00006214 4E <1> dec si 3044 00006215 E8D656 <1> call iseol? ; EOL ? 3045 00006218 75E2 <1> jne .pathname_next ; no, next pathname element --> 3046 0000621A C60400 <1> mov byte [si], 0 ; terminate after trailing path sep 3047 0000621D C3 <1> retn 3048 <1> 3049 <1> .pathname_gotfirst: 3050 <1> .pathname_none: 3051 0000621E B000 <1> mov al, 0 3052 00006220 4E <1> dec si 3053 00006221 8604 <1> xchg al, byte [si] ; terminate after filename 3054 00006223 8936[0E0C] <1> mov word [terminator_in_line_in.offset], si 3055 00006227 A2[100C] <1> mov byte [terminator_in_line_in.value], al 3056 0000622A 46 <1> inc si 3057 0000622B C3 <1> retn 3058 <1> 3059 <1> 3060 <1> ; DPR:word [load_kernelname_input] -> ASCIZ pathname. 3061 <1> ; if it ends in '/', append DPR:word [load_kernelname_default] 3062 <1> ; DPR:word [load_addname_input] -> ASCIZ pathname. 3063 <1> ; if it ends in '/', append DPR:word [load_addname_default] 3064 <1> ; if it's empty (and no trailing '/' in front of the zero) 3065 <1> ; then no additional name is given. 3066 <1> .fn_done_eol: 3067 0000622C B00D <1> mov al, 13 3068 <1> .fn_done: 3069 <1> d4 call d4message 3070 <1> d4 asciz "In bootcmd.fn_done",13,10 3071 <1> 3072 0000622E 8326[BE8F]00 <1> and word [load_cmdline], 0 3073 <1> 3074 00006233 E8B856 <1> call iseol? 3075 00006236 743E <1> je @F 3076 <1> 3077 00006238 F606[F98C]10 <1> testopt [load_options], LOAD_CMDLINE 3078 0000623D 7503E99A42 <1> jz error 3079 <1> 3080 00006242 E8FF56 <1> call skipwh0 3081 00006245 B400 <1> mov ah, 0 3082 00006247 3C22 <1> cmp al, '"' 3083 00006249 7404 <1> je .cmdline_quote 3084 0000624B 3C27 <1> cmp al, "'" 3085 0000624D 7503 <1> jne .cmdline_no_quote 3086 <1> .cmdline_quote: 3087 0000624F 88C4 <1> mov ah, al 3088 00006251 A8 <1> db __TEST_IMM8 3089 <1> .cmdline_no_quote: 3090 00006252 4E <1> dec si 3091 00006253 8936[BE8F] <1> mov word [load_cmdline], si 3092 <1> .cmdline_loop: 3093 00006257 AC <1> lodsb 3094 00006258 E89756 <1> call iseol?.notsemicolon 3095 0000625B 740E <1> je .cmdline_eol 3096 0000625D 38E0 <1> cmp al, ah 3097 0000625F 75F6 <1> jne .cmdline_loop 3098 <1> .cmdline_quote_eol: 3099 00006261 C644FF00 <1> mov byte [si - 1], 0 3100 00006265 AC <1> lodsb 3101 00006266 E89A56 <1> call chkeol 3102 00006269 EB0B <1> jmp @F 3103 <1> 3104 <1> .cmdline_eol: 3105 0000626B 84E4 <1> test ah, ah 3106 0000626D 7403E96A42 <1> jnz error 3107 00006272 C644FF00 <1> mov byte [si - 1], 0 3108 <1> 3109 <1> @@: 3110 00006276 F606[A400]07 <1> testopt [internalflags3], dif3_load_is_dp 3111 0000627B 7527 <1> jnz .load_kernel_from_ldp 3112 <1> 3113 0000627D 8A1E[C28F] <1> mov bl, [load_partition] 3114 00006281 803E[D08C]80 <1> cmp byte [load_unit], 80h 3115 00006286 7228 <1> jb .p_f_is_diskette 3116 00006288 84DB <1> test bl, bl ; partition specified ? 3117 0000628A 7503E954FD <1> jz .error ; no, error --> 3118 <1> 3119 0000628F E8BB14 <1> call query_geometry 3120 <1> 3121 00006292 B9[C869] <1> mov cx, load_freedos_from_partition 3122 00006295 E80D13 <1> call scan_partitions 3123 00006298 BA[7661] <1> mov dx, msg.boot_partition_not_found 3124 0000629B B81102 <1> mov ax, 0211h 3125 0000629E E88242 <1> call setrc 3126 000062A1 E95901 <1> jmp .fail 3127 <1> 3128 <1> 3129 <1> .load_kernel_from_ldp: 3130 000062A4 E8A614 <1> call query_geometry 3131 000062A7 A1[B88F] <1> mov ax, word [load_partition_sector] 3132 000062AA 8B16[BA8F] <1> mov dx, word [load_partition_sector + 2] 3133 000062AE EB0E <1> jmp @F 3134 <1> 3135 <1> 3136 <1> .p_f_is_diskette: 3137 000062B0 84DB <1> test bl, bl ; partition specified ? 3138 000062B2 7403E92CFD <1> jnz .error ; yes, error --> 3139 <1> 3140 000062B7 E89314 <1> call query_geometry 3141 <1> 3142 000062BA 31C0 <1> xor ax, ax 3143 000062BC 31D2 <1> xor dx, dx 3144 <1> @@: 3145 000062BE 8B1E[F209] <1> mov bx, word [auxbuff_segorsel] ; bx => auxbuff 3146 000062C2 52 <1> push dx 3147 000062C3 50 <1> push ax 3148 000062C4 E83C16 <1> call read_ae_512_bytes 3149 <1> 3150 000062C7 26813EFE0155AA <1> cmp word [es:510], 0AA55h 3151 000062CE 7403E91E19 <1> jne boot_sigmismatch 3152 000062D3 58 <1> pop ax 3153 000062D4 5A <1> pop dx 3154 <1> 3155 000062D5 06 <1> push es 3156 000062D6 F606[F98C]40 <1> testopt [load_options], LOAD_SET_DSSI_PARTINFO 3157 000062DB 7434 <1> jz @F 3158 <1> 3159 000062DD 50 <1> push ax 3160 000062DE 31FF <1> xor di, di 3161 000062E0 8EC7 <1> mov es, di 3162 000062E2 BF0006 <1> mov di, 600h 3163 000062E5 B8CD19 <1> mov ax, 19CDh 3164 000062E8 AB <1> stosw ; fake boot sector loader 3165 000062E9 B9FE00 <1> mov cx, 508 / 2 3166 000062EC 31C0 <1> xor ax, ax 3167 000062EE F3AB <1> rep stosw ; initialise pseudo MBR 3168 000062F0 B855AA <1> mov ax, 0AA55h 3169 000062F3 AB <1> stosw ; fake boot sector signature 3170 000062F4 58 <1> pop ax 3171 <1> 3172 000062F5 BEBE07 <1> mov si, 600h + 512 - 2 - 64 3173 000062F8 26894408 <1> mov word [es:si + 8], ax 3174 000062FC 2689540A <1> mov word [es:si + 8 + 2], dx ; store in partition table entry 3175 00006300 26C60480 <1> mov byte [es:si + piBoot], 80h ; fake primary active 3176 00006304 26C64404FF <1> mov byte [es:si + piType], 0FFh ; fake a type 3177 00006309 26FE440C <1> inc byte [es:si + piLength] ; fake a size 3178 <1> 3179 0000630D 8936[C08F] <1> mov word [load_partition_entry], si 3180 <1> @@: 3181 00006311 07 <1> pop es 3182 <1> 3183 00006312 E92207 <1> jmp load_freedos_common 3184 <1> 3185 <1> 3186 <1> .load: 3187 00006315 7403E9C9FC <1> jnz bootcmd.error 3188 <1> 3189 0000631A F606[A400]07 <1> testopt [internalflags3], dif3_load_is_dp 3190 0000631F 751C <1> jnz .load_sector_from_ldp 3191 <1> 3192 00006321 803E[C28F]00 <1> cmp byte [load_partition], 0 3193 00006326 7421 <1> je .load_boot 3194 <1> 3195 00006328 E82214 <1> call query_geometry 3196 <1> 3197 <1> d4 call d4message 3198 <1> d4 asciz "In bootcmd.load (before call to scan_partitions)",13,10 3199 <1> 3200 0000632B B9[5969] <1> mov cx, load_from_partition 3201 0000632E E87412 <1> call scan_partitions 3202 00006331 BA[7661] <1> mov dx, msg.boot_partition_not_found 3203 00006334 B81202 <1> mov ax, 0212h 3204 00006337 E8E941 <1> call setrc 3205 0000633A E9C000 <1> jmp .fail 3206 <1> 3207 <1> 3208 <1> .load_sector_from_ldp: 3209 0000633D E80D14 <1> call query_geometry 3210 00006340 A1[B88F] <1> mov ax, word [load_partition_sector] 3211 00006343 8B16[BA8F] <1> mov dx, word [load_partition_sector + 2] 3212 00006347 EB07 <1> jmp @F 3213 <1> 3214 <1> .load_boot: 3215 00006349 E80114 <1> call query_geometry 3216 <1> 3217 0000634C 31C0 <1> xor ax, ax 3218 0000634E 31D2 <1> xor dx, dx 3219 <1> @@: 3220 00006350 BBC007 <1> mov bx, 7C0h 3221 <1> d4 call d4dumpregs 3222 <1> d4 call d4message 3223 <1> d4 asciz 13,10,"In bootcmd.load_boot (before call to read_sector)",13,10 3224 00006353 52 <1> push dx 3225 00006354 50 <1> push ax 3226 00006355 E8AB15 <1> call read_ae_512_bytes 3227 <1> d4 call d4message 3228 <1> d4 asciz "In bootcmd.load_boot (after call to read_sector)",13,10 3229 00006358 31D2 <1> xor dx, dx 3230 0000635A 8EC2 <1> mov es, dx 3231 <1> 3232 0000635C A0[D08C] <1> mov al, byte [load_unit] ; al = boot unit 3233 0000635F BB007C <1> mov bx, 7C00h 3234 <1> 3235 00006362 26813EFE7D55AA <1> cmp word [es:7C00h + 510], 0AA55h 3236 00006369 7403E98318 <1> jne boot_sigmismatch 3237 <1> 3238 0000636E 26833F00 <1> cmp word [es:bx], 0 3239 00006372 7503E98618 <1> je boot_codemismatch 3240 <1> 3241 00006377 50 <1> push ax 3242 00006378 B9FF00 <1> mov cx, 510 / 2 3243 0000637B BF0006 <1> mov di, 600h ; MBR location 3244 0000637E 31C0 <1> xor ax, ax 3245 00006380 F3AB <1> rep stosw ; initialise (sector and all entries) 3246 00006382 B855AA <1> mov ax, 0AA55h 3247 00006385 AB <1> stosw ; initialise boot sector signature 3248 00006386 26C7060006CD19 <1> mov word [es:600h], 019CDh ; initialise boot sector code 3249 0000638D BFBE07 <1> mov di, 600h + 510 - 4*16 ; -> first partition table entry 3250 00006390 58 <1> pop ax 3251 00006391 268F4508 <1> pop word [es:di + piStart] 3252 00006395 268F450A <1> pop word [es:di + piStart + 2] ; = boot sector LBA 3253 00006399 26C60580 <1> mov byte [es:di + 0], 80h ; "bootable" flag set 3254 0000639D 26C64504FF <1> mov byte [es:di + 4], 0FFh ; dummy value for FS type (nonzero) 3255 000063A2 26C6450C01 <1> mov byte [es:di + 12], 1 ; dummy value for length (nonzero) 3256 <1> 3257 <1> load_partition_common: equ $ 3258 000063A7 8126[A00C]FFF8 <1> and word [reg_efl], ~(400h|200h|100h) ; UP, DI, TF=0 3259 000063AD 893E[7C0C] <1> mov word [reg_esi], di 3260 000063B1 893E[780C] <1> mov word [reg_ebp], di 3261 000063B5 890E[840C] <1> mov word [reg_ds], cx ; ds:si -> 0:600h + offset to first entry 3262 000063B9 A2[700C] <1> mov byte [reg_edx], al ; dl = boot unit 3263 000063BC 891E[9C0C] <1> mov word [reg_eip], bx 3264 000063C0 890E[9E0C] <1> mov word [reg_eip + 2], cx 3265 000063C4 890E[900C] <1> mov word [reg_cs], cx ; cs:eip = 0:7C00h 3266 000063C8 803E[C68F]00 <1> cmp byte [load_sector_alt], 0 3267 000063CD 740A <1> je @F 3268 000063CF 890E[9C0C] <1> mov word [reg_eip], cx 3269 000063D3 C706[900C]C007 <1> mov word [reg_cs], 7C0h ; cs:eip = 07C0h:0 3270 <1> @@: 3271 000063D9 891E[740C] <1> mov word [reg_esp], bx 3272 000063DD 890E[760C] <1> mov word [reg_esp + 2], cx 3273 000063E1 890E[8C0C] <1> mov word [reg_ss], cx ; ss:esp = 0:7C00h 3274 000063E5 800E[A300]01 <1> setopt [internalflags2], dif2_boot_loaded_kernel 3275 000063EA C3 <1> retn 3276 <1> 3277 <1> 3278 <1> .fail_read: 3279 000063EB 16 <1> push ss 3280 000063EC 07 <1> pop es 3281 000063ED BF[0860] <1> mov di, msg.bootfail_read_errorcode 3282 000063F0 88E0 <1> mov al, ah 3283 000063F2 B404 <1> mov ah, 04h 3284 000063F4 E82C41 <1> call setrc 3285 000063F7 E8FB55 <1> call hexbyte 3286 000063FA BA[EB5F] <1> mov dx, msg.bootfail_read 3287 <1> 3288 <1> .fail: 3289 000063FD 16 <1> push ss 3290 000063FE 07 <1> pop es 3291 000063FF 52 <1> push dx 3292 00006400 BA[DC5F] <1> mov dx, msg.bootfail 3293 00006403 E89859 <1> call putsz_error 3294 00006406 5A <1> pop dx 3295 00006407 E89459 <1> call putsz_error 3296 0000640A B8FF02 <1> mov ax, 02FFh 3297 0000640D E81341 <1> call setrc 3298 00006410 FF26[9A0A] <1> jmp near word [errret] 3299 <1> 3300 <1> 3301 <1> bootcmd.list: 3302 00006414 E8FD54 <1> call skipcomma 3303 <1> 3304 00006417 E8E201 <1> call parseloadunit_default_sdp 3305 0000641A 7403E9C4FB <1> jnz bootcmd.error 3306 <1> 3307 0000641F E82B13 <1> call query_geometry 3308 <1> 3309 00006422 F606[A400]07 <1> testopt [internalflags3], dif3_load_is_dp 3310 00006427 752B <1> jnz .list_ldp 3311 <1> 3312 00006429 803E[C28F]00 <1> cmp byte [load_partition], 0 3313 0000642E 741E <1> je .listall 3314 <1> 3315 00006430 C606[C48F]00 <1> mov byte [load_found_partition], 0 3316 00006435 B9[8D64] <1> mov cx, list_single_partition 3317 00006438 E86A11 <1> call scan_partitions 3318 0000643B 803E[C48F]00 <1> cmp byte [load_found_partition], 0 3319 00006440 750B <1> jne @F 3320 00006442 BA[7661] <1> mov dx, msg.boot_partition_not_found 3321 00006445 B81302 <1> mov ax, 0213h 3322 00006448 E8D840 <1> call setrc 3323 0000644B EBB0 <1> jmp bootcmd.fail 3324 <1> @@: 3325 0000644D C3 <1> retn 3326 <1> 3327 <1> .listall: 3328 0000644E B9[9B64] <1> mov cx, list_any_partition 3329 00006451 E95111 <1> jmp scan_partitions 3330 <1> 3331 <1> .list_ldp: 3332 00006454 C606[C48F]00 <1> mov byte [load_found_partition], 0 3333 00006459 B9[7264] <1> mov cx, list_partition_if_ldp 3334 0000645C E84611 <1> call scan_partitions 3335 0000645F 803E[C48F]00 <1> cmp byte [load_found_partition], 0 3336 00006464 750B <1> jne @F 3337 00006466 BA[7661] <1> mov dx, msg.boot_partition_not_found 3338 00006469 B81402 <1> mov ax, 0214h 3339 0000646C E8B440 <1> call setrc 3340 0000646F EB8C <1> jmp bootcmd.fail 3341 <1> @@: 3342 00006471 C3 <1> retn 3343 <1> 3344 <1> 3345 <1> list_partition_if_ldp: 3346 <1> d4 call d4message 3347 <1> d4 asciz "In list_partition_if_ldp",13,10 3348 <1> 3349 00006472 8B43F8 <1> mov ax, word [bp + di - 8] 3350 00006475 8B53FA <1> mov dx, word [bp + di - 6] ; root 3351 00006478 26034408 <1> add ax, word [es:si + 8] 3352 0000647C 2613540A <1> adc dx, word [es:si + 8 + 2] ; add partition offset 3353 00006480 3906[B88F] <1> cmp word [load_partition_sector], ax 3354 00006484 7506 <1> jne @F 3355 00006486 3916[BA8F] <1> cmp word [load_partition_sector + 2], dx 3356 0000648A 740B <1> je list_single_partition.gotit 3357 <1> @@: 3358 0000648C C3 <1> retn 3359 <1> 3360 <1> list_single_partition: 3361 <1> d4 call d4message 3362 <1> d4 asciz "In list_single_partition",13,10 3363 <1> 3364 0000648D A0[C38F] <1> mov al, byte [load_current_partition] 3365 00006490 3A06[C28F] <1> cmp al, byte [load_partition] 3366 00006494 7401 <1> je .gotit 3367 00006496 C3 <1> retn 3368 <1> 3369 <1> .gotit: 3370 00006497 FE06[C48F] <1> inc byte [load_found_partition] 3371 <1> 3372 <1> ; INP: es:si -> partition table entry, 3373 <1> ; si = load_partition_table .. load_partition_table+48, 3374 <1> ; es = ss 3375 <1> ; bp + di -> above part table metadata, 3376 <1> ; dwo [bp + di - 4] = root (outermost extended position) 3377 <1> ; dwo [bp + di - 8] = base (current table position) 3378 <1> ; CHG: ax, bx, (cx), dx 3379 <1> list_any_partition: 3380 0000649B 06 <1> push es 3381 0000649C 51 <1> push cx 3382 0000649D 56 <1> push si 3383 0000649E 57 <1> push di 3384 <1> 3385 0000649F BF[0E08] <1> mov di, line_out ; reset di 3386 000064A2 B075 <1> mov al, "u" 3387 000064A4 AA <1> stosb 3388 000064A5 A0[D08C] <1> mov al, byte [load_unit] 3389 000064A8 E84A55 <1> call hexbyte 3390 000064AB B02E <1> mov al, '.' 3391 000064AD AA <1> stosb 3392 000064AE A0[C38F] <1> mov al, byte [load_current_partition] 3393 000064B1 E8A154 <1> call decbyte 3394 000064B4 3C0A <1> cmp al, 10 3395 000064B6 B020 <1> mov al, 32 3396 000064B8 7301 <1> jae @F 3397 000064BA AA <1> stosb 3398 <1> @@: 3399 000064BB AA <1> stosb 3400 <1> 3401 000064BC A0[D08C] <1> mov al, byte [load_unit] 3402 000064BF BB6664 <1> mov bx, "fd" 3403 000064C2 3C80 <1> cmp al, 80h 3404 000064C4 7202 <1> jb @F 3405 000064C6 B368 <1> mov bl, "h" 3406 <1> @@: 3407 000064C8 247F <1> and al, ~80h 3408 000064CA 0461 <1> add al, 'a' 3409 000064CC 3C7A <1> cmp al, 'z' 3410 000064CE 7609 <1> jbe @F 3411 000064D0 B020 <1> mov al, 32 3412 000064D2 B90500 <1> mov cx, 3 + 2 3413 000064D5 F3AA <1> rep stosb 3414 000064D7 EB11 <1> jmp @FF 3415 <1> 3416 <1> @@: 3417 000064D9 93 <1> xchg ax, bx 3418 000064DA AB <1> stosw 3419 000064DB 93 <1> xchg ax, bx 3420 000064DC AA <1> stosb 3421 000064DD A0[C38F] <1> mov al, byte [load_current_partition] 3422 000064E0 E87254 <1> call decbyte 3423 000064E3 3C0A <1> cmp al, 10 3424 000064E5 B020 <1> mov al, 32 3425 000064E7 7301 <1> jae @F 3426 000064E9 AA <1> stosb 3427 <1> @@: 3428 000064EA AA <1> stosb 3429 <1> 3430 000064EB 8A4404 <1> mov al, byte [si + 4] 3431 000064EE E80455 <1> call hexbyte 3432 <1> 3433 000064F1 B020 <1> mov al, 32 3434 000064F3 AA <1> stosb 3435 <1> 3436 000064F4 89F9 <1> mov cx, di ; (preserve di in line_out) 3437 000064F6 5F <1> pop di ; get di of scan_partitions 3438 000064F7 57 <1> push di 3439 000064F8 8B43F8 <1> mov ax, word [bp + di - 8] 3440 000064FB 8B53FA <1> mov dx, word [bp + di - 6] ; root 3441 000064FE 89CF <1> mov di, cx ; (preserve di in line_out) 3442 00006500 034408 <1> add ax, word [si + 8] 3443 00006503 13540A <1> adc dx, word [si + 8 + 2] ; add partition offset 3444 00006506 92 <1> xchg ax, dx 3445 00006507 E8E454 <1> call hexword 3446 0000650A 92 <1> xchg ax, dx 3447 0000650B E8E054 <1> call hexword 3448 <1> 3449 0000650E 50 <1> push ax 3450 0000650F B82028 <1> mov ax, " (" 3451 00006512 AB <1> stosw 3452 00006513 58 <1> pop ax 3453 00006514 51 <1> push cx 3454 00006515 53 <1> push bx 3455 00006516 8B0E[9B8C] <1> mov cx, [load_sectorsize] 3456 0000651A BB0800 <1> mov bx, 4+4 3457 0000651D E809BA <1> call disp_dxax_times_cx_width_bx_size.store 3458 00006520 50 <1> push ax 3459 00006521 B82920 <1> mov ax, ") " 3460 00006524 AB <1> stosw 3461 00006525 58 <1> pop ax 3462 <1> 3463 00006526 52 <1> push dx 3464 00006527 50 <1> push ax 3465 <1> 3466 00006528 8B440C <1> mov ax, word [si + 12] 3467 0000652B 8B540E <1> mov dx, word [si + 12 + 2] 3468 0000652E 92 <1> xchg ax, dx 3469 0000652F E8BC54 <1> call hexword 3470 00006532 92 <1> xchg ax, dx 3471 00006533 E8B854 <1> call hexword 3472 <1> 3473 00006536 50 <1> push ax 3474 00006537 B82028 <1> mov ax, " (" 3475 0000653A AB <1> stosw 3476 0000653B 58 <1> pop ax 3477 0000653C E8EAB9 <1> call disp_dxax_times_cx_width_bx_size.store 3478 0000653F B029 <1> mov al, ")" 3479 00006541 AA <1> stosb 3480 <1> 3481 00006542 58 <1> pop ax 3482 00006543 5A <1> pop dx 3483 <1> 3484 00006544 5B <1> pop bx 3485 00006545 59 <1> pop cx 3486 <1> 3487 00006546 807C0483 <1> cmp byte [si + piType], ptLinux 3488 0000654A 7544 <1> jne .notlinux 3489 <1> 3490 0000654C 8B1E[F209] <1> mov bx, word [auxbuff_segorsel] ; bx => auxbuff 3491 00006550 E89F13 <1> call read_ae_1536_bytes 3492 <1> 3493 00006553 26813E380453EF <1> cmp word [es:1024 + 56], 0xEF53 ; s_magic == EXT2_SUPER_MAGIC ? 3494 0000655A 7403E99300 <1> jne .nolabel 3495 <1> 3496 0000655F 26833E4E0400 <1> cmp word [es:1024 + 76 + 2], 0 3497 00006565 7403E98800 <1> jne .nolabel 3498 0000656A 26833E4C0401 <1> cmp word [es:1024 + 76], 1 ; s_rev_level == EXT2_DYNAMIC_REV ? 3499 00006570 7403E97D00 <1> jne .nolabel 3500 <1> 3501 00006575 06 <1> push es 3502 00006576 1F <1> pop ds 3503 00006577 BE7804 <1> mov si, 1024 + 120 3504 0000657A B91000 <1> mov cx, 16 3505 0000657D 16 <1> push ss 3506 0000657E 07 <1> pop es 3507 <1> 3508 0000657F B020 <1> mov al, 32 3509 00006581 AA <1> stosb 3510 <1> @@: 3511 00006582 AC <1> lodsb 3512 00006583 84C0 <1> test al, al 3513 00006585 7403 <1> jz @F 3514 00006587 AA <1> stosb 3515 00006588 E2F8 <1> loop @B 3516 <1> @@: 3517 <1> 3518 0000658A 16 <1> push ss 3519 0000658B 1F <1> pop ds 3520 <1> 3521 0000658C 59 <1> pop cx 3522 0000658D 5E <1> pop si 3523 0000658E 56 <1> push si ; get si of scan_partitions 3524 0000658F 51 <1> push cx 3525 <1> 3526 <1> .notlinux: 3527 00006590 8A5C04 <1> mov bl, byte [si + piType] 3528 00006593 80FB01 <1> cmp bl, ptFAT12 3529 00006596 7419 <1> je .isfat 3530 00006598 80FB04 <1> cmp bl, ptFAT16_16BIT_CHS 3531 0000659B 7414 <1> je .isfat 3532 0000659D 80FB06 <1> cmp bl, ptFAT16_CHS 3533 000065A0 740F <1> je .isfat 3534 000065A2 80FB0B <1> cmp bl, ptFAT32_CHS 3535 000065A5 740A <1> je .isfat 3536 000065A7 80FB0C <1> cmp bl, ptFAT32 3537 000065AA 7405 <1> je .isfat 3538 000065AC 80FB0E <1> cmp bl, ptFAT16 3539 000065AF 7541 <1> jne .notfat 3540 <1> .isfat: 3541 <1> 3542 000065B1 8B1E[F209] <1> mov bx, word [auxbuff_segorsel] ; bx => auxbuff 3543 000065B5 E84B13 <1> call read_ae_512_bytes 3544 <1> 3545 000065B8 26813EFE0155AA <1> cmp word [es:510], 0AA55h 3546 000065BF 7531 <1> jne .nolabel 3547 000065C1 26833E0B0000 <1> cmp word [es:bsBPB + bpbBytesPerSector], 0 3548 000065C7 7429 <1> je .nolabel 3549 000065C9 BE2B00 <1> mov si, bsBPB + bpbNew + bpbnVolumeLabel 3550 000065CC 26833E160000 <1> cmp word [es:bsBPB + bpbSectorsPerFAT], 0 3551 000065D2 7503 <1> jne @F 3552 000065D4 BE4700 <1> mov si, bsBPB + ebpbNew + bpbnVolumeLabel 3553 <1> @@: 3554 000065D7 26807CFB29 <1> cmp byte [es:si - bpbnVolumeLabel + bpbnExtBPBSignature], 29h 3555 000065DC 7514 <1> jne .nolabel 3556 000065DE B90B00 <1> mov cx, 11 3557 <1> 3558 000065E1 06 <1> push es 3559 000065E2 1F <1> pop ds 3560 000065E3 16 <1> push ss 3561 000065E4 07 <1> pop es 3562 <1> 3563 000065E5 B020 <1> mov al, 32 3564 000065E7 AA <1> stosb 3565 <1> @@: 3566 000065E8 AC <1> lodsb 3567 000065E9 84C0 <1> test al, al 3568 000065EB 7403 <1> jz @F 3569 000065ED AA <1> stosb 3570 000065EE E2F8 <1> loop @B 3571 <1> @@: 3572 <1> 3573 000065F0 16 <1> push ss 3574 000065F1 1F <1> pop ds 3575 <1> .notfat: 3576 <1> .nolabel: 3577 000065F2 16 <1> push ss 3578 000065F3 07 <1> pop es 3579 000065F4 E82F54 <1> call putsline_crlf 3580 <1> 3581 000065F7 5F <1> pop di 3582 000065F8 5E <1> pop si 3583 000065F9 59 <1> pop cx 3584 000065FA 07 <1> pop es 3585 000065FB C3 <1> retn 3586 <1> 3587 <1> 3588 <1> ; INP: al = first character 3589 <1> ; si -> next 3590 <1> ; OUT: NC 3591 <1> ; byte [load_unit] set 3592 <1> ; byte [load_partition] set 3593 <1> ; (zero if none specified, -1 if ldp or sdp) 3594 <1> ; opt [internalflags3] & dif3_load_is_ldp 3595 <1> ; opt [internalflags3] & dif3_load_is_sdp 3596 <1> ; dword [load_partition_sector] set if ldp or sdp 3597 <1> ; ZR if no filename specified (at end of input) 3598 <1> ; NZ if presumably a filename specified, 3599 <1> ; al = first character (slash or whatever non-blank) 3600 <1> ; si -> next 3601 <1> ; CHG: bx, cx, dx, ax, si, di 3602 <1> ; STT: ds = es = ss 3603 <1> parseloadunit_default_sdp: 3604 000065FC E81C00 <1> call parseloadunit 3605 000065FF 7319 <1> jnc @F 3606 <1> 3607 00006601 8A16[D08C] <1> mov dl, byte [load_data - LOADDATA2 + bsBPB + ebpbNew + bpbnBootUnit] 3609 00006605 8816[D08C] <1> mov byte [load_unit], dl 3610 00006609 C606[C28F]FF <1> mov byte [load_partition], -1 3611 0000660E 800E[A400]02 <1> or byte [internalflags3], dif3_load_is_sdp 3612 <1> 3613 00006613 E82E53 <1> call skipwh0 3614 00006616 E8D552 <1> call iseol? 3615 00006619 F8 <1> clc 3616 <1> @@: 3617 0000661A C3 <1> retn 3618 <1> 3619 <1> 3620 <1> ; INP: al = first character 3621 <1> ; si -> next 3622 <1> ; OUT: CY if no load unit 3623 <1> ; (not "HD[A-Z]", "FD[A-Z]", "LD[P]", "SD[P]", "U[0-9A-F]") 3624 <1> ; note: this is barely used! 3625 <1> ; NC else, 3626 <1> ; byte [load_unit] set 3627 <1> ; byte [load_partition] set 3628 <1> ; (zero if none specified, -1 if ldp or sdp) 3629 <1> ; opt [internalflags3] & dif3_load_is_ldp 3630 <1> ; opt [internalflags3] & dif3_load_is_sdp 3631 <1> ; dword [load_partition_sector] set if ldp or sdp 3632 <1> ; ZR if no filename specified (at end of input) 3633 <1> ; NZ if presumably a filename specified, 3634 <1> ; al = first character (slash or whatever non-blank) 3635 <1> ; si -> next 3636 <1> ; CHG: bx, cx, dx, ax, si, di 3637 <1> ; STT: ds = es = ss 3638 <1> parseloadunit: 3639 0000661B 31DB <1> xor bx, bx 3640 <1> lframe near 3641 <1> lvar word, unit_low_partition_high 3642 <1> lequ ?unit_low_partition_high, unit 3643 <1> lequ ?unit_low_partition_high + 1, partition 3644 0000661D 5589E550 <1> lenter 3645 <1> lvar word, dif3_set 3646 00006621 53 <1> push bx 3647 <1> lvar dword, load_partition_sector 3648 00006622 FF36[BA8F] <1> push word [load_partition_sector + 2] 3649 00006626 FF36[B88F] <1> push word [load_partition_sector] 3650 <1> 3651 0000662A 89F7 <1> mov di, si 3652 0000662C 8026[A400]F8 <1> clropt [internalflags3], dif3_load_is_dp 3653 00006631 E8DF25 <1> call uppercase 3654 00006634 3C48 <1> cmp al, 'H' 3655 00006636 7503E9EF00 <1> je .load_hd 3656 0000663B 3C46 <1> cmp al, 'F' 3657 0000663D 7503E9E500 <1> je .load_fd 3658 00006642 B401 <1> mov ah, dif3_load_is_ldp 3659 00006644 3C4C <1> cmp al, 'L' 3660 00006646 7419 <1> je .load_ld_sd 3661 00006648 B402 <1> mov ah, dif3_load_is_sdp 3662 0000664A 3C53 <1> cmp al, 'S' 3663 0000664C 7413 <1> je .load_ld_sd 3664 <1> %if _INPUT_FILE_BOOT 3665 0000664E B404 <1> mov ah, dif3_load_is_ydp 3666 00006650 3C59 <1> cmp al, 'Y' 3667 00006652 740D <1> je .load_ld_sd 3668 <1> %endif 3669 00006654 3C55 <1> cmp al, 'U' 3670 00006656 747C <1> je .load_u 3671 <1> .retc: 3672 00006658 89FE <1> mov si, di 3673 0000665A 4E <1> dec si 3674 0000665B AC <1> lodsb 3675 0000665C F9 <1> stc 3676 <1> .ret: 3677 0000665D 89EC5D <1> lleave code 3678 00006660 C3 <1> lret 3679 <1> 3680 <1> .load_ld_sd: 3681 00006661 AC <1> lodsb 3682 00006662 E8AE25 <1> call uppercase 3683 00006665 3C44 <1> cmp al, 'D' 3684 00006667 75EF <1> jne .retc 3685 <1> 3686 <1> d4 call d4message 3687 <1> d4 asciz "In parseloadunit.load_ld_sd",13,10 3688 <1> 3689 00006669 8A16[D08C] <1> mov dl, byte [load_data - LOADDATA2 + bsBPB + ebpbNew + bpbnBootUnit] 3691 0000666D 80FC02 <1> cmp ah, dif3_load_is_sdp 3692 00006670 741D <1> je @F 3693 00006672 8A16[308C] <1> mov dl, byte [loaddata_loadedfrom - LOADDATA + bsBPB + ebpbNew + bpbnBootUnit] 3695 <1> %if _INPUT_FILE_BOOT 3696 00006676 80FC01 <1> cmp ah, dif3_load_is_ldp 3697 00006679 7414 <1> je @F 3698 0000667B F606[A300]02 <1> testopt [internalflags2], dif2_input_file_boot 3699 00006680 74D6 <1> jz .retc 3700 <1> 3701 00006682 93 <1> xchg ax, bx 3702 00006683 B8A000 <1> mov ax, LOAD_INPUT_FILE_SIZE 3703 00006686 F726[B08F] <1> mul word [load_input_file.active] 3704 <1> 3705 <1> ; test dx, dx 3706 <1> ; jnz .error 3707 <1> 3708 0000668A 93 <1> xchg ax, bx 3709 0000668B 8A97[B08D] <1> mov dl, byte [load_input_file + bx - LOADDATA3 + bsBPB + ebpbNew + bpbnBootUnit] 3711 <1> %endif 3712 <1> @@: 3713 0000668F AC <1> lodsb 3714 00006690 E88025 <1> call uppercase 3715 00006693 3C50 <1> cmp al, 'P' 3716 00006695 7403E9AD00 <1> jne .got_unit 3717 <1> 3718 <1> d4 call d4message 3719 <1> d4 asciz "In parseloadunit.load_ld_sd with ldp",13,10 3720 <1> 3721 0000669A 8856FE <1> mov byte [bp + ?unit], dl 3722 0000669D C646FFFF <1> mov byte [bp + ?partition], -1 3723 000066A1 0866FC <1> or byte [bp + ?dif3_set], ah 3724 <1> 3725 000066A4 80FC02 <1> cmp ah, dif3_load_is_sdp 3726 000066A7 741D <1> je @F 3727 <1> %if _INPUT_FILE_BOOT 3728 000066A9 80FC01 <1> cmp ah, dif3_load_is_ldp 3729 000066AC 740A <1> je .is_ldp 3730 000066AE FFB7[8E8D] <1> push word [load_input_file + bx - LOADDATA3 + bsBPB + bpbHiddenSectors + 2] 3732 000066B2 FFB7[8C8D] <1> push word [load_input_file + bx - LOADDATA3 + bsBPB + bpbHiddenSectors] 3734 000066B6 EB08 <1> jmp .is_ldp_ydp 3735 <1> 3736 <1> %endif 3737 <1> .is_ldp: 3738 000066B8 FF36[0E8C] <1> push word [load_ldp_sector + 2] 3739 000066BC FF36[0C8C] <1> push word [load_ldp_sector] 3740 <1> .is_ldp_ydp: 3741 000066C0 8F46F8 <1> pop word [bp + ?load_partition_sector] 3742 000066C3 8F46FA <1> pop word [bp + ?load_partition_sector + 2] 3743 <1> @@: 3744 <1> 3745 000066C6 E87A52 <1> call skipwhite 3746 000066C9 E82252 <1> call iseol? 3747 000066CC 7403E9F700 <1> jne .fn 3748 000066D1 E9F000 <1> jmp .ret_nc 3749 <1> 3750 <1> .load_u: 3751 000066D4 AC <1> lodsb 3752 000066D5 E83B25 <1> call uppercase 3753 <1> 3754 000066D8 3C28 <1> cmp al, '(' 3755 000066DA 7419 <1> je @F 3756 000066DC 3C30 <1> cmp al, '0' 3757 000066DE 7303E975FF <1> jb .retc 3758 000066E3 3C39 <1> cmp al, '9' 3759 000066E5 760E <1> jbe @F 3760 000066E7 3C41 <1> cmp al, 'A' 3761 000066E9 7303E96AFF <1> jb .retc 3762 000066EE 3C46 <1> cmp al, 'F' 3763 000066F0 7603E963FF <1> ja .retc 3764 <1> @@: 3765 <1> 3766 000066F5 3C28 <1> cmp al, '(' 3767 000066F7 7511 <1> jne .u_not_expr 3768 000066F9 AC <1> lodsb 3769 000066FA E8EA4B <1> call getexpression 3770 000066FD E84452 <1> call skipwh0 3771 00006700 3C29 <1> cmp al, ')' 3772 00006702 AC <1> lodsb 3773 00006703 7403E9DAF8 <1> jne bootcmd.errordec 3774 00006708 EB03 <1> jmp .u_check_dot 3775 <1> 3776 <1> .u_not_expr: 3777 0000670A E8EB0F <1> call boot_get_hexadecimal_literal 3778 <1> .u_check_dot: 3779 0000670D 3C2E <1> cmp al, '.' 3780 0000670F 7403E9CFF8 <1> jne bootcmd.error 3781 00006714 AC <1> lodsb 3782 00006715 85DB <1> test bx, bx 3783 00006717 7403E9C7F8 <1> jnz bootcmd.error 3784 0000671C 81FA0001 <1> cmp dx, 256 3785 00006720 7203E9BEF8 <1> jae bootcmd.error 3786 00006725 EB20 <1> jmp .got_unit 3787 <1> 3788 <1> .load_fd: 3789 00006727 B200 <1> mov dl, 0 3790 <1> 3791 <1> d4 call d4message 3792 <1> d4 asciz "In parseloadunit.load_fd",13,10 3793 <1> 3794 00006729 A9 <1> db __TEST_IMM16 ; skip mov 3795 <1> .load_hd: 3796 0000672A B280 <1> mov dl, 80h 3797 <1> d4 call d4message 3798 <1> d4 asciz "In parseloadunit.load_fd or .load_hd",13,10 3799 <1> 3800 0000672C AC <1> lodsb 3801 0000672D E8E324 <1> call uppercase 3802 00006730 3C44 <1> cmp al, 'D' 3803 00006732 7403E921FF <1> jne .retc 3804 00006737 AC <1> lodsb 3805 00006738 E8D824 <1> call uppercase 3806 0000673B 2C41 <1> sub al, 'A' 3807 0000673D 3C19 <1> cmp al, 'Z' - 'A' 3808 0000673F 7603E914FF <1> ja .retc 3809 00006744 08C2 <1> or dl, al ; hdX: 80h + number, fdX: 0 + number 3810 00006746 AC <1> lodsb 3811 <1> 3812 <1> .got_unit: 3813 00006747 89D1 <1> mov cx, dx 3814 00006749 884EFE <1> mov byte [bp + ?unit], cl 3815 0000674C C646FF00 <1> mov byte [bp + ?partition], 0 3816 00006750 3C2F <1> cmp al, '/' ; slash ? 3817 00006752 7474 <1> je .fn 3818 00006754 3C5C <1> cmp al, '\' 3819 00006756 7470 <1> je .fn ; got a filename --> 3820 00006758 3C20 <1> cmp al, 32 ; or blank ? 3821 0000675A 7404 <1> je @F 3822 0000675C 3C09 <1> cmp al, 9 3823 0000675E 7508 <1> jne .checkeol ; check for EOL -- but no filename 3824 <1> ; (hdd1name is invalid -- must be hdd1/name or hdd1 name) 3825 <1> @@: ; was blank 3826 00006760 E8E151 <1> call skipwh0 ; skip blanks 3827 00006763 E88851 <1> call iseol? ; EOL ? 3828 00006766 7560 <1> jne .fn ; no, is filename --> 3829 <1> ; will jump after this 3830 <1> .checkeol: 3831 00006768 E88351 <1> call iseol? ; EOL ? 3832 0000676B 7457 <1> je .ret_nc ; yes, no filename --> 3833 <1> 3834 0000676D 3C28 <1> cmp al, '(' 3835 0000676F 740E <1> je @F 3836 00006771 3C30 <1> cmp al, '0' 3837 00006773 7303E9E0FE <1> jb .retc 3838 00006778 3C39 <1> cmp al, '9' 3839 0000677A 7603E9D9FE <1> ja .retc 3840 <1> @@: 3841 <1> 3842 <1> d4 call d4message 3843 <1> d4 asciz "In parseloadunit (after no EOL found)",13,10 3844 0000677F 51 <1> push cx 3845 00006780 80FA80 <1> cmp dl, 80h 3846 00006783 7303E95BF8 <1> jb bootcmd.error ; diskettes aren't partitioned 3847 00006788 3C28 <1> cmp al, '(' 3848 0000678A 750F <1> jne .not_expr 3849 0000678C AC <1> lodsb ; skip opening paren 3850 <1> 3851 <1> d4 call d4message 3852 <1> d4 asciz "In parseloadunit (before call to getexpression)",13,10 3853 <1> 3854 0000678D E8574B <1> call getexpression 3855 <1> 3856 <1> d4 call d4message 3857 <1> d4 asciz "In parseloadunit (after call to getexpression)",13,10 3858 00006790 E8B151 <1> call skipwh0 3859 00006793 3C29 <1> cmp al, ')' 3860 00006795 AC <1> lodsb 3861 00006796 7406 <1> je .got_expr 3862 00006798 E947F8 <1> jmp bootcmd.errordec 3863 <1> 3864 <1> .not_expr: 3865 <1> d4 call d4message 3866 <1> d4 asciz "In parseloadunit (before call to boot_get_decimal_literal)",13,10 3867 0000679B E8520F <1> call boot_get_decimal_literal 3868 <1> .got_expr: ; bx:dx = load partition number 3869 <1> d4 call d4message 3870 <1> d4 asciz "In parseloadunit.got_expr",13,10 3871 0000679E 59 <1> pop cx ; cl = load unit 3872 0000679F 85DB <1> test bx, bx 3873 000067A1 7403E93DF8 <1> jnz bootcmd.error 3874 000067A6 81FAFF00 <1> cmp dx, 255 3875 000067AA 7603E934F8 <1> ja bootcmd.error 3876 000067AF 85D2 <1> test dx, dx 3877 000067B1 7503E92DF8 <1> jz bootcmd.error 3878 000067B6 E88B51 <1> call skipwh0 3879 000067B9 8856FF <1> mov byte [bp + ?partition], dl 3880 000067BC 884EFE <1> mov byte [bp + ?unit], cl 3881 000067BF E82C51 <1> call iseol? 3882 000067C2 7504 <1> jne .fn 3883 <1> .ret_nc: 3884 000067C4 31DB <1> xor bx, bx ; NC, ZR 3885 000067C6 EB06 <1> jmp @F 3886 <1> 3887 <1> .fn: 3888 000067C8 E87951 <1> call skipwh0 3889 000067CB 83CB01 <1> or bx, 1 ; NC, NZ 3890 <1> @@: 3891 000067CE 8F06[B88F] <1> pop word [load_partition_sector] 3892 000067D2 8F06[BA8F] <1> pop word [load_partition_sector + 2] 3893 <1> ; pop from ?load_partition_sector 3894 000067D6 9C <1> pushf 3895 000067D7 8B5EFE <1> mov bx, word [bp + ?unit_low_partition_high] 3896 000067DA 881E[D08C] <1> mov byte [load_unit], bl 3897 000067DE 883E[C28F] <1> mov byte [load_partition], bh 3898 000067E2 8A5EFC <1> mov bl, byte [bp + ?dif3_set] 3899 000067E5 081E[A400] <1> or byte [internalflags3], bl 3900 000067E9 9D <1> popf ; ZF, CF 3901 000067EA E970FE <1> jmp .ret 3902 <1> 3903 <1> lleave ctx 3904 <1> 3905 <1> 3906 000067ED 00 <1> align 4, db 0 3907 <1> 3908 <1> boot_read: 3909 000067F0 C706[F08F][1579] <1> mov word [load_readwrite_function], read_sector 3910 000067F6 EB06 <1> jmp boot_readwrite 3911 <1> 3912 <1> boot_write: 3913 000067F8 C706[F08F][1479] <1> mov word [load_readwrite_function], write_sector 3914 <1> 3915 <1> boot_readwrite: 3916 <1> 3917 <1> d4 call d4message 3918 <1> d4 asciz "In boot_readwrite",13,10 3919 <1> 3920 000067FE E82C51 <1> call skipequals 3921 00006801 E8F8FD <1> call parseloadunit_default_sdp 3922 00006804 7503E9C800 <1> jz .error 3923 <1> 3924 <1> %if 0 3925 <1> call skipwh0 3926 <1> mov bx, word [reg_ds] ; default segment 3927 <1> call getaddr ; get buffer address into bx:(e)dx 3928 <1> 3929 <1> _386 test edx, 0FFFF_0000h 3930 <1> _386 jnz .error 3931 <1> 3932 <1> ; (variable must be a dword!) 3933 <1> mov word [load_readwrite_buffer], dx 3934 <1> mov word [load_readwrite_buffer + 2], bx 3935 <1> %else 3936 00006809 E8C14F <1> call getword 3937 <1> ; (variable is a word) 3938 0000680C 8916[EC8F] <1> mov word [load_readwrite_buffer], dx 3939 <1> %endif 3940 <1> 3941 00006810 E83151 <1> call skipwh0 3942 00006813 E8D850 <1> call iseol? 3943 00006816 750F <1> jne @F 3944 <1> 3945 <1> d4 call d4message 3946 <1> d4 asciz "In boot_readwrite no sector given no count given",13,10 3947 <1> 3948 00006818 8326[E88F]00 <1> and word [load_readwrite_sector], 0 3949 0000681D 8326[EA8F]00 <1> and word [load_readwrite_sector + 2], 0 3950 00006822 BA0100 <1> mov dx, 1 3951 00006825 EB36 <1> jmp @FF 3952 <1> 3953 <1> @@: 3954 00006827 BA[8663] <1> mov dx, msg.hidden 3955 0000682A 4E <1> dec si 3956 0000682B E86150 <1> call isstring? 3957 0000682E 7510 <1> jne .nothidden 3958 <1> 3959 00006830 E8FA50 <1> call skipequals 3960 00006833 E8B14A <1> call getdword 3961 <1> 3962 00006836 89561C <1> mov word [bp + bsBPB + bpbHiddenSectors + 0], dx 3963 00006839 895E1E <1> mov word [bp + bsBPB + bpbHiddenSectors + 2], bx 3964 0000683C E80551 <1> call skipwh0 3965 <1> 3966 0000683F A8 <1> db __TEST_IMM8 3967 <1> .nothidden: 3968 00006840 AC <1> lodsb 3969 00006841 E8A34A <1> call getexpression ; bx:dx = value 3970 <1> 3971 00006844 8916[E88F] <1> mov word [load_readwrite_sector], dx 3972 00006848 891E[EA8F] <1> mov word [load_readwrite_sector + 2], bx 3973 <1> 3974 0000684C E8F550 <1> call skipwh0 3975 0000684F BA0100 <1> mov dx, 1 3976 00006852 E89950 <1> call iseol? 3977 00006855 7406 <1> je @F 3978 00006857 E8734F <1> call getword 3979 0000685A E8A650 <1> call chkeol 3980 <1> @@: 3981 0000685D 8916[EE8F] <1> mov word [load_readwrite_count], dx 3982 <1> 3983 00006861 E8E90E <1> call query_geometry 3984 <1> 3985 00006864 F606[A400]07 <1> testopt [internalflags3], dif3_load_is_dp 3986 00006869 753C <1> jnz .ldp 3987 <1> 3988 0000686B 803E[C28F]00 <1> cmp byte [load_partition], 0 3989 00006870 7447 <1> je .whole_unit 3990 <1> 3991 00006872 C606[C48F]00 <1> mov byte [load_found_partition], 0 3992 00006877 B9[8968] <1> mov cx, .single_partition 3993 0000687A E8280D <1> call scan_partitions 3994 <1> ; cmp byte [load_found_partition], 0 3995 <1> ; jne @F 3996 0000687D BA[7661] <1> mov dx, msg.boot_partition_not_found 3997 00006880 B81502 <1> mov ax, 0215h 3998 00006883 E89D3C <1> call setrc 3999 00006886 E974FB <1> jmp bootcmd.fail 4000 <1> ;@@: 4001 <1> ; retn 4002 <1> 4003 <1> 4004 <1> .single_partition: 4005 <1> ; INP: es:si -> partition table entry, 4006 <1> ; si = load_partition_table .. load_partition_table+48, 4007 <1> ; es = ss 4008 <1> ; bp + di -> above part table metadata, 4009 <1> ; dwo [bp + di - 4] = root (outermost extended position) 4010 <1> ; dwo [bp + di - 8] = base (current table position) 4011 <1> ;; CHG: ax, bx, (cx), dx 4012 <1> ; CHG: all 4013 <1> 4014 <1> d4 call d4message 4015 <1> d4 asciz "In boot_readwrite.single_partition",13,10 4016 <1> 4017 00006889 A0[C38F] <1> mov al, byte [load_current_partition] 4018 0000688C 3A06[C28F] <1> cmp al, byte [load_partition] 4019 00006890 7401 <1> je .gotit 4020 00006892 C3 <1> retn 4021 <1> 4022 <1> .gotit: 4023 <1> d4 call d4message 4024 <1> d4 asciz "In boot_readwrite.gotit",13,10 4025 <1> 4026 <1> ; inc byte [load_found_partition] 4027 <1> 4028 00006893 8B43F8 <1> mov ax, [bp + di - 8] 4029 00006896 8B53FA <1> mov dx, [bp + di - 6] ; base (current table position) 4030 <1> 4031 00006899 26034408 <1> add ax, [es:si + 8] 4032 0000689D 2613540A <1> adc dx, [es:si + 8 + 2] ; add offset to logical partition 4033 <1> 4034 000068A1 89EC <1> mov sp, bp 4035 000068A3 5D <1> pop bp ; restore bp (scan_partitions) 4036 000068A4 5B <1> pop bx ; discard ret address (scan_partitions) 4037 000068A5 EB07 <1> jmp .gotbase_dxax 4038 <1> 4039 <1> 4040 <1> .ldp: 4041 000068A7 A1[B88F] <1> mov ax, word [load_partition_sector] 4042 000068AA 8B16[BA8F] <1> mov dx, word [load_partition_sector + 2] 4043 <1> 4044 <1> .gotbase_dxax: 4045 000068AE 89461C <1> mov word [bp + bsBPB + bpbHiddenSectors + 0], ax 4046 000068B1 89561E <1> mov word [bp + bsBPB + bpbHiddenSectors + 2], dx 4047 000068B4 800E[A400]80 <1> setopt [internalflags3], dif3_partition_changed 4048 <1> 4049 <1> .whole_unit: 4050 000068B9 A1[E88F] <1> mov ax, word [load_readwrite_sector] 4051 000068BC 8B16[EA8F] <1> mov dx, word [load_readwrite_sector + 2] 4052 000068C0 8B0E[EE8F] <1> mov cx, word [load_readwrite_count] 4053 000068C4 8B1E[EC8F] <1> mov bx, word [load_readwrite_buffer] 4054 <1> 4055 000068C8 E306 <1> jcxz @FF 4056 <1> @@: 4057 000068CA FF16[F08F] <1> call near word [load_readwrite_function] 4058 000068CE E2FA <1> loop @B 4059 <1> @@: 4060 000068D0 C3 <1> retn 4061 <1> 4062 <1> .error: 4063 000068D1 E9083C <1> jmp error 4064 <1> 4065 <1> 4066 <1> ; INP: ds:si-> first letter of name 4067 <1> ; es:load_kernel_name-> 12-byte buffer (for fn + 0) 4068 <1> ; CHG: ax, cx, di 4069 <1> ; OUT: al = first character after name (EOL, blank, or slash) 4070 <1> ; si -> next character 4071 <1> boot_parse_fn: 4072 000068D4 B020 <1> mov al, 32 4073 000068D6 BF[C88F] <1> mov di, load_kernel_name 4074 000068D9 B90B00 <1> mov cx, 11 4075 000068DC F3AA <1> rep stosb ; initialise to empty 4076 <1> 4077 000068DE BF[C88F] <1> mov di, load_kernel_name 4078 000068E1 B90900 <1> mov cx, 9 4079 <1> .loop_name: 4080 000068E4 AC <1> lodsb 4081 000068E5 E82B23 <1> call uppercase 4082 000068E8 E80350 <1> call iseol? 4083 000068EB 7455 <1> je .loop_name_done 4084 000068ED 3C20 <1> cmp al, 32 4085 000068EF 7451 <1> je .loop_name_done 4086 000068F1 3C09 <1> cmp al, 9 4087 000068F3 744D <1> je .loop_name_done 4088 000068F5 3C2F <1> cmp al, '/' 4089 000068F7 7449 <1> je .loop_name_done 4090 000068F9 3C5C <1> cmp al, '\' 4091 000068FB 7445 <1> je .loop_name_done 4092 000068FD 3C2E <1> cmp al, '.' 4093 000068FF 740F <1> je .loop_name_ext 4094 00006901 AA <1> stosb 4095 00006902 E2E0 <1> loop .loop_name 4096 <1> .invalid: 4097 00006904 BA[C162] <1> mov dx, msg.boot_invalid_filename 4098 00006907 B81602 <1> mov ax, 0216h 4099 0000690A E8163C <1> call setrc 4100 0000690D E9EDFA <1> jmp bootcmd.fail 4101 <1> 4102 <1> .loop_name_ext: 4103 00006910 83F909 <1> cmp cx, 9 4104 00006913 74EF <1> je .invalid 4105 00006915 B90400 <1> mov cx, 4 4106 00006918 BF[D08F] <1> mov di, load_kernel_name + 8 4107 <1> .loop_ext: 4108 0000691B AC <1> lodsb 4109 0000691C E8F422 <1> call uppercase 4110 0000691F E8CC4F <1> call iseol? 4111 00006922 7419 <1> je .loop_ext_done 4112 00006924 3C20 <1> cmp al, 32 4113 00006926 7415 <1> je .loop_ext_done 4114 00006928 3C09 <1> cmp al, 9 4115 0000692A 7411 <1> je .loop_ext_done 4116 0000692C 3C2F <1> cmp al, '/' 4117 0000692E 740D <1> je .loop_ext_done 4118 00006930 3C5C <1> cmp al, '\' 4119 00006932 7409 <1> je .loop_ext_done 4120 00006934 3C2E <1> cmp al, '.' 4121 00006936 74CC <1> je .invalid 4122 00006938 AA <1> stosb 4123 00006939 E2E0 <1> loop .loop_ext 4124 0000693B EBC7 <1> jmp .invalid 4125 <1> 4126 <1> .loop_ext_done: 4127 0000693D 83F904 <1> cmp cx, 4 4128 00006940 74C2 <1> je .invalid 4129 <1> .loop_name_done: 4130 00006942 83F909 <1> cmp cx, 9 4131 00006945 74BD <1> je .invalid 4132 00006947 C606[D38F]00 <1> mov byte [load_kernel_name + 11], 0 4133 0000694C 803E[C88F]E5 <1> cmp byte [load_kernel_name], 0E5h 4134 00006951 7505 <1> jne @F 4135 00006953 C606[C88F]05 <1> mov byte [load_kernel_name], 05h 4136 <1> @@: 4137 00006958 C3 <1> retn 4138 <1> 4139 <1> 4140 <1> ; INP: es:si -> partition table entry, 4141 <1> ; si = load_partition_table .. load_partition_table+48, 4142 <1> ; es = ss 4143 <1> ; bp + di -> above part table metadata, 4144 <1> ; dwo [bp + di - 4] = root (outermost extended position) 4145 <1> ; dwo [bp + di - 8] = base (current table position) 4146 <1> ; CHG: ax, bx, (cx), dx 4147 <1> load_from_partition: 4148 <1> d4 call d4message 4149 <1> d4 asciz "In load_from_partition",13,10 4150 <1> 4151 00006959 A0[C38F] <1> mov al, byte [load_current_partition] 4152 0000695C 3A06[C28F] <1> cmp al, byte [load_partition] 4153 00006960 7401 <1> je .gotit 4154 00006962 C3 <1> retn 4155 <1> 4156 <1> .gotit: 4157 <1> d4 call d4message 4158 <1> d4 asciz "In load_from_partition.gotit",13,10 4159 <1> 4160 00006963 8B43F8 <1> mov ax, [bp + di - 8] 4161 00006966 8B53FA <1> mov dx, [bp + di - 6] ; base (current table position) 4162 <1> 4163 00006969 52 <1> push dx 4164 0000696A 50 <1> push ax 4165 0000696B 06 <1> push es 4166 0000696C BB6000 <1> mov bx, 60h 4167 0000696F E8910F <1> call read_ae_512_bytes ; load partition table to 0:600h 4168 00006972 07 <1> pop es 4169 00006973 58 <1> pop ax 4170 00006974 5A <1> pop dx 4171 <1> 4172 00006975 26034408 <1> add ax, [es:si + 8] 4173 00006979 2613540A <1> adc dx, [es:si + 8 + 2] ; add offset to logical partition 4174 <1> 4175 0000697D 26894408 <1> mov word [es:si + 8], ax 4176 00006981 2689540A <1> mov word [es:si + 8 + 2], dx ; store in partition table entry 4177 <1> 4178 00006985 31C9 <1> xor cx, cx 4179 00006987 8EC1 <1> mov es, cx ; es = 0 4180 00006989 8DB42E7B <1> lea si, [si - (load_partition_table + DATASECTIONFIXUP) + 600h + (510 - 64)] 4181 <1> ; si = 600h + 510-64 .. 600h + 510-16 4182 0000698D 26894408 <1> mov word [es:si + 8], ax 4183 00006991 2689540A <1> mov word [es:si + 8 + 2], dx ; store in partition table entry 4184 <1> 4185 <1> ; dx:ax = absolute sector number 4186 00006995 BBC007 <1> mov bx, 7C0h ; bx:0 = 7C0h:0 -> boot sector area 4187 00006998 E8680F <1> call read_ae_512_bytes ; load partition boot sector to 0:7C00h 4188 <1> 4189 0000699B 89EC <1> mov sp, bp 4190 0000699D 5D <1> pop bp ; restore bp (scan_partitions) 4191 0000699E 58 <1> pop ax ; discard ret address (scan_partitions) 4192 <1> 4193 0000699F 26813EFE0155AA <1> cmp word [es:510], 0AA55h 4194 000069A6 7403E94612 <1> jne boot_sigmismatch 4195 <1> 4196 000069AB 31C9 <1> xor cx, cx 4197 000069AD 26390E0000 <1> cmp word [es:0], cx 4198 000069B2 7503E94612 <1> je boot_codemismatch 4199 <1> 4200 000069B7 8EC1 <1> mov es, cx ; cx = 0, es = 0 4201 000069B9 89F7 <1> mov di, si ; di -> partition table entry (seg 0) 4202 000069BB 26800D80 <1> or byte [es:di + 0], 80h ; set bootable flag 4203 000069BF A0[D08C] <1> mov al, byte [load_unit] ; al = unit 4204 000069C2 BB007C <1> mov bx, 7C00h ; bx = 7C00h 4205 000069C5 E9DFF9 <1> jmp load_partition_common 4206 <1> 4207 <1> 4208 <1> ; INP: es:si -> partition table entry, 4209 <1> ; si = load_partition_table .. load_partition_table+48, 4210 <1> ; es = ss 4211 <1> ; bp + di -> above part table metadata, 4212 <1> ; dwo [bp + di - 4] = root (outermost extended position) 4213 <1> ; dwo [bp + di - 8] = base (current table position) 4214 <1> ; CHG: ax, bx, (cx), dx 4215 <1> load_freedos_from_partition: 4216 <1> d4 call d4message 4217 <1> d4 asciz "In load_freedos_from_partition",13,10 4218 <1> 4219 000069C8 A0[C38F] <1> mov al, byte [load_current_partition] 4220 000069CB 3A06[C28F] <1> cmp al, byte [load_partition] 4221 000069CF 7401 <1> je .gotit 4222 000069D1 C3 <1> retn 4223 <1> 4224 <1> .gotit: 4225 <1> d4 call d4message 4226 <1> d4 asciz "In load_freedos_from_partition.gotit",13,10 4227 <1> 4228 000069D2 8B43F8 <1> mov ax, [bp + di - 8] 4229 000069D5 8B53FA <1> mov dx, [bp + di - 6] ; base (current table position) 4230 <1> 4231 000069D8 26034408 <1> add ax, [es:si + 8] 4232 000069DC 2613540A <1> adc dx, [es:si + 8 + 2] ; add offset to logical partition 4233 <1> 4234 000069E0 26894408 <1> mov word [es:si + 8], ax 4235 000069E4 2689540A <1> mov word [es:si + 8 + 2], dx ; store in partition table entry 4236 000069E8 26800C80 <1> or byte [es:si + 0], 80h ; set bootable flag 4237 <1> 4238 <1> 4239 000069EC F606[F98C]40 <1> testopt [load_options], LOAD_SET_DSSI_PARTINFO 4240 000069F1 7427 <1> jz @F 4241 <1> 4242 000069F3 52 <1> push dx 4243 000069F4 50 <1> push ax 4244 <1> 4245 000069F5 8B43F8 <1> mov ax, [bp + di - 8] 4246 000069F8 8B53FA <1> mov dx, [bp + di - 6] ; base (current table position) 4247 <1> 4248 000069FB 52 <1> push dx 4249 000069FC 50 <1> push ax 4250 000069FD 06 <1> push es 4251 000069FE BB6000 <1> mov bx, 60h 4252 00006A01 E8FF0E <1> call read_ae_512_bytes ; load partition table to 0:600h 4253 00006A04 07 <1> pop es 4254 00006A05 58 <1> pop ax 4255 00006A06 5A <1> pop dx 4256 <1> 4257 00006A07 31C9 <1> xor cx, cx 4258 00006A09 8EC1 <1> mov es, cx ; es = 0 4259 00006A0B 8DBC2E7B <1> lea di, [si - (load_partition_table + DATASECTIONFIXUP) + 600h + (510 - 64)] 4260 <1> ; si = 600h + 510-64 .. 600h + 510-16 4261 00006A0F B108 <1> mov cl, 16 / 2 4262 00006A11 57 <1> push di 4263 00006A12 F3A5 <1> rep movsw 4264 <1> 4265 00006A14 8F06[C08F] <1> pop word [load_partition_entry] 4266 <1> 4267 00006A18 58 <1> pop ax 4268 00006A19 5A <1> pop dx 4269 <1> @@: 4270 <1> 4271 <1> 4272 00006A1A 89EC <1> mov sp, bp 4273 00006A1C 5D <1> pop bp ; restore bp (scan_partitions) 4274 00006A1D 5B <1> pop bx ; discard ret address (scan_partitions) 4275 <1> 4276 <1> ; dx:ax = absolute sector number 4277 00006A1E 8B1E[F209] <1> mov bx, word [auxbuff_segorsel] ; bx => auxbuff 4278 00006A22 50 <1> push ax 4279 00006A23 52 <1> push dx 4280 00006A24 E8DC0E <1> call read_ae_512_bytes ; load partition boot sector 4281 <1> 4282 00006A27 26813EFE0155AA <1> cmp word [es:510], 0AA55h 4283 00006A2E 7403E9BE11 <1> jne boot_sigmismatch 4284 <1> 4285 00006A33 31C9 <1> xor cx, cx 4286 <1> ; cmp word [es:0], cx 4287 <1> ; je boot_codemismatch 4288 <1> 4289 00006A35 5A <1> pop dx 4290 00006A36 58 <1> pop ax 4291 <1> 4292 <1> ; dx:ax = boot sector 4293 <1> ; byte [load_unit] = unit 4294 <1> ; es:0-> read sector 4295 <1> load_freedos_common: 4296 00006A37 26A31C00 <1> mov word [es:bsBPB + bpbHiddenSectors], ax 4297 00006A3B 2689161E00 <1> mov word [es:bsBPB + bpbHiddenSectors + 2], dx 4298 <1> 4299 00006A40 8B5E0B <1> mov bx, [bp + bsBPB + bpbBytesPerSector] 4300 00006A43 263B1E0B00 <1> cmp bx, [es:bsBPB + bpbBytesPerSector] 4301 00006A48 7403E9B811 <1> jne boot_secsizemismatch 4302 <1> 4303 <1> ; preserve some variables from our pseudo BPB 4304 00006A4D 31C0 <1> xor ax, ax 4305 00006A4F FF7618 <1> push word [bp + bsBPB + bpbCHSSectors] 4306 00006A52 268F061800 <1> pop word [es:bsBPB + bpbCHSSectors] 4307 00006A57 FF761A <1> push word [bp + bsBPB + bpbCHSHeads] 4308 00006A5A 268F061A00 <1> pop word [es:bsBPB + bpbCHSHeads] ; preserve geometry 4309 <1> 4310 00006A5F 8B5EEA <1> mov bx, word [bp + ldParaPerSector] 4311 00006A62 D1EB <1> shr bx, 1 4312 00006A64 895ED4 <1> mov word [bp + ldEntriesPerSector], bx 4313 <1> 4314 00006A67 2639061600 <1> cmp word [es:bsBPB + bpbSectorsPerFAT], ax 4315 00006A6C 8A5E40 <1> mov bl, byte [bp + bsBPB + ebpbNew + bpbnBootUnit] 4316 00006A6F 7407 <1> je .is_fat32 4317 00006A71 26881E2400 <1> mov byte [es:bsBPB + bpbNew + bpbnBootUnit], bl 4318 00006A76 EB05 <1> jmp short .was_fat1612 4319 <1> .is_fat32: 4320 00006A78 26881E4000 <1> mov byte [es:bsBPB + ebpbNew + bpbnBootUnit], bl 4321 <1> .was_fat1612: 4322 <1> 4323 00006A7D 06 <1> push es 4324 00006A7E 1E <1> push ds 4325 00006A7F 06 <1> push es 4326 00006A80 1F <1> pop ds 4327 00006A81 31F6 <1> xor si, si ; -> BPB from boot partition 4328 00006A83 16 <1> push ss 4329 00006A84 07 <1> pop es 4330 00006A85 BF[908C] <1> mov di, load_data - LOADDATA2 ; -> our copy of a BPB 4331 00006A88 B95A00 <1> mov cx, (bsBPB + ebpbNew + BPBN_size) 4332 00006A8B F3A4 <1> rep movsb ; get the BPB 4333 <1> 4334 00006A8D 1F <1> pop ds 4335 00006A8E 800E[A400]80 <1> setopt [internalflags3], dif3_partition_changed 4336 <1> 4337 00006A93 394616 <1> cmp word [bp + bsBPB + bpbSectorsPerFAT], ax 4338 00006A96 740B <1> je @F ; is FAT32 --> 4339 00006A98 BE[B48C] <1> mov si, load_data - LOADDATA2 + bsBPB + bpbNew 4340 00006A9B BF[D08C] <1> mov di, load_data - LOADDATA2 + bsBPB + ebpbNew 4341 00006A9E B91A00 <1> mov cx, BPBN_size 4342 00006AA1 F3A4 <1> rep movsb ; clone the FAT16 / FAT12 BPBN 4343 <1> ; to where the FAT32 BPBN lives 4344 <1> @@: 4345 00006AA3 07 <1> pop es 4346 <1> 4347 00006AA4 E80C69 <1> call bootgetmemorysize 4348 00006AA7 8956E0 <1> mov word [bp + ldMemoryTop], dx 4349 00006AAA 81EA0005 <1> sub dx, (20 * 1024) >> 4 4350 <1> ; leave 20 KiB free at the top, to 4351 <1> ; allow loading with the lDOS protocol (needs BPB and FAT seg 4352 <1> ; to live below its destination buffers for these) 4353 00006AAE 7303 <1> jnc @F 4354 <1> .outofmem: 4355 00006AB0 E9FE0D <1> jmp query_geometry.out_of_memory_error 4356 <1> @@: 4357 <1> 4358 00006AB3 81EA0002 <1> sub dx, 8192 >> 4 4359 00006AB7 72F7 <1> jc .outofmem 4360 00006AB9 8956F8 <1> mov word [bp + lsvFATSeg], dx 4361 00006ABC B8FFFF <1> mov ax, -1 4362 00006ABF 8946F4 <1> mov word [bp + lsvFATSector], ax 4363 00006AC2 8946F6 <1> mov word [bp + lsvFATSector + 2], ax 4364 <1> 4365 00006AC5 FF36[FA8C] <1> push word [load_loadseg] 4366 00006AC9 8F46FA <1> pop word [bp + lsvLoadSeg] 4367 <1> 4368 00006ACC 31DB <1> xor bx, bx 4369 00006ACE B90808 <1> mov cx, ((- LOADSTACKVARS + 15 + 4096) & ~15) >> 1 4370 00006AD1 F606[F98C]20 <1> testopt [load_options], LOAD_NO_BPB 4371 00006AD6 7506 <1> jnz @F 4372 00006AD8 BB0002 <1> mov bx, 512 4373 00006ADB B90809 <1> mov cx, ((512 - LOADSTACKVARS + 15 + 4096) & ~15) >> 1 4374 <1> @@: 4375 <1> 4376 00006ADE 833E[028D]FF <1> cmp word [load_bpb + 2], -1 4377 00006AE3 7469 <1> je .auto_bpb 4378 <1> 4379 00006AE5 A1[008D] <1> mov ax, [load_bpb] 4380 00006AE8 D1E8 <1> shr ax, 1 4381 00006AEA D1E8 <1> shr ax, 1 4382 00006AEC D1E8 <1> shr ax, 1 4383 00006AEE D1E8 <1> shr ax, 1 ; round down: start of BPB 4384 00006AF0 0306[028D] <1> add ax, [load_bpb + 2] ; start of BPB 4385 00006AF4 2D0101 <1> sub ax, (4096 - LOADSTACKVARS + 15) >> 4 4386 <1> ; start of stack area 4387 00006AF7 50 <1> push ax 4388 00006AF8 7235 <1> jc .bpb_too_low 4389 <1> 4390 00006AFA 3B46FA <1> cmp ax, word [bp + lsvLoadSeg] 4391 00006AFD 773B <1> ja .loads_below_bpb 4392 <1> 4393 00006AFF 83F860 <1> cmp ax, 60h 4394 00006B02 722B <1> jb .bpb_too_low 4395 <1> 4396 00006B04 A1[008D] <1> mov ax, [load_bpb] 4397 00006B07 01D8 <1> add ax, bx 4398 00006B09 83C00F <1> add ax, 15 4399 00006B0C D1E8 <1> shr ax, 1 4400 00006B0E D1E8 <1> shr ax, 1 4401 00006B10 D1E8 <1> shr ax, 1 4402 00006B12 D1E8 <1> shr ax, 1 4403 00006B14 0306[028D] <1> add ax, [load_bpb + 2] ; end of BPB / pseudo-boot-sector 4404 <1> 4405 00006B18 3B46FA <1> cmp ax, word [bp + lsvLoadSeg] 4406 00006B1B 761F <1> jbe .loads_above_bpb 4407 <1> 4408 00006B1D BA[0563] <1> mov dx, msg.boot_bpb_load_overlap 4409 00006B20 B81702 <1> mov ax, 0217h 4410 00006B23 E8FD39 <1> call setrc 4411 <1> .fail: 4412 00006B26 B81802 <1> mov ax, 0218h 4413 00006B29 E8F739 <1> call setrc 4414 00006B2C E9CEF8 <1> jmp bootcmd.fail 4415 <1> 4416 <1> .bpb_too_low: 4417 00006B2F BA[3563] <1> mov dx, msg.boot_bpb_too_low 4418 00006B32 B81902 <1> mov ax, 0219h 4419 00006B35 E8EB39 <1> call setrc 4420 00006B38 EBEC <1> jmp .fail 4421 <1> 4422 <1> 4423 <1> 4424 <1> .loads_below_bpb: 4425 00006B3A 89C2 <1> mov dx, ax ; set load top to before BPB/lsv/stack 4426 <1> 4427 <1> .loads_above_bpb: ; dx = word [bp + ldLoadTop] = word [bp + lsvFATSeg] 4428 00006B3C FF36[028D] <1> push word [load_bpb + 2] 4429 00006B40 8F06[B68F] <1> pop word [load_bpb_dest + 2] 4430 00006B44 FF36[008D] <1> push word [load_bpb] 4431 00006B48 8F06[B48F] <1> pop word [load_bpb_dest] 4432 00006B4C EB37 <1> jmp .got_bpb_set_load_top 4433 <1> 4434 <1> 4435 <1> ; auto-BPB: allocate BPB at top and load below that 4436 <1> .auto_bpb: 4437 00006B4E 81EA0101 <1> sub dx, (-LOADSTACKVARS + 15 + 4096) >> 4 4438 00006B52 7303E959FF <1> jc .outofmem 4439 00006B57 85DB <1> test bx, bx 4440 00006B59 7408 <1> jz @F 4441 00006B5B 83EA20 <1> sub dx, 512 >> 4 4442 00006B5E 7303E94DFF <1> jc .outofmem 4443 <1> @@: 4444 <1> 4445 00006B63 52 <1> push dx 4446 00006B64 89D0 <1> mov ax, dx 4447 <1> ; eg dx = 800h 4448 <1> ; want (((800h<<4) + 4096 - LOADSTACKVARS) - 7C00h) >> 4 4449 <1> ; which is 143h 4450 <1> ; which :7C00h = 903h:0 4451 <1> ; dx + ( 4096 - LOADSTACKVARS - 7C00h) / 16 4452 <1> ; dx - (-4096 + LOADSTACKVARS + 7C00h) / 16 4453 00006B66 BBF0EF <1> mov bx, (-4096 +LOADSTACKVARS) 4454 00006B69 031E[008D] <1> add bx, word [load_bpb] 4455 00006B6D 51 <1> push cx 4456 00006B6E B104 <1> mov cl, 4 4457 00006B70 D3EB <1> shr bx, cl 4458 00006B72 59 <1> pop cx 4459 00006B73 29D8 <1> sub ax, bx 4460 <1> ; sub ax, (-4096 +LOADSTACKVARS + 7C00h) / 16 4461 00006B75 7303E936FF <1> jc .outofmem 4462 <1> ; mov word [load_bpb_dest], 7C00h 4463 00006B7A FF36[008D] <1> push word [load_bpb] 4464 00006B7E 8F06[B48F] <1> pop word [load_bpb_dest] 4465 00006B82 A3[B68F] <1> mov word [load_bpb_dest + 2], ax 4466 <1> .got_bpb_set_load_top: 4467 00006B85 8956E2 <1> mov word [bp + ldLoadTop], dx 4468 <1> 4469 <1> .got_bpb: ; cx = how many words are used for stack/lsv/BPB 4470 00006B88 58 <1> pop ax ; -> stack area 4471 00006B89 06 <1> push es 4472 00006B8A 8EC0 <1> mov es, ax 4473 00006B8C 31FF <1> xor di, di 4474 00006B8E 31C0 <1> xor ax, ax 4475 00006B90 F3AB <1> rep stosw 4476 00006B92 07 <1> pop es 4477 <1> 4478 00006B93 E8C916 <1> call initialise_fs 4479 <1> 4480 00006B96 C606[C58F]00 <1> mov byte [load_check_dir_attr], 0 4481 00006B9B 8B36[D48F] <1> mov si, word [load_kernelname_input] 4482 00006B9F 803C2F <1> cmp byte [si], '/' 4483 00006BA2 7501 <1> jne @F 4484 00006BA4 46 <1> inc si 4485 <1> @@: 4486 00006BA5 803C00 <1> cmp byte [si], 0 4487 00006BA8 7504 <1> jne @F 4488 00006BAA 8B36[F08C] <1> mov si, word [load_kernelname_default] 4489 <1> @@: 4490 00006BAE 16 <1> push ss 4491 00006BAF 07 <1> pop es 4492 00006BB0 E821FD <1> call boot_parse_fn ; get next pathname 4493 00006BB3 3C2F <1> cmp al, '/' 4494 00006BB5 7509 <1> jne @F 4495 00006BB7 C606[C58F]10 <1> mov byte [load_check_dir_attr], ATTR_DIRECTORY 4496 00006BBC 8936[D68F] <1> mov word [load_kernelname_next], si 4497 <1> @@: 4498 <1> 4499 00006BC0 BFFFFF <1> mov di, -1 4500 00006BC3 89FE <1> mov si, di 4501 00006BC5 897EF4 <1> mov [bp + lsvFATSector], di 4502 00006BC8 8976F6 <1> mov [bp + lsvFATSector + 2], si 4503 <1> 4504 00006BCB 31C0 <1> xor ax, ax 4505 00006BCD 31D2 <1> xor dx, dx 4506 <1> 4507 <1> scan_dir_kernelname_loop: 4508 00006BCF 8946EC <1> mov word [bp + ldDirCluster], ax 4509 00006BD2 8956EE <1> mov word [bp + ldDirCluster + 2], dx 4510 <1> 4511 00006BD5 31DB <1> xor bx, bx 4512 00006BD7 8EC3 <1> mov es, bx 4513 00006BD9 BB0005 <1> mov bx, 500h 4514 00006BDC E8C607 <1> call scan_dir_aux_for_file 4515 <1> 4516 00006BDF 803E[C58F]10 <1> cmp byte [load_check_dir_attr], ATTR_DIRECTORY 4517 00006BE4 753C <1> jne got_kernelentry 4518 <1> 4519 00006BE6 56 <1> push si 4520 00006BE7 57 <1> push di 4521 00006BE8 C606[C58F]00 <1> mov byte [load_check_dir_attr], 0 4522 00006BED 8B36[D68F] <1> mov si, word [load_kernelname_next] 4523 00006BF1 803C00 <1> cmp byte [si], 0 4524 00006BF4 7504 <1> jne @F 4525 00006BF6 8B36[F08C] <1> mov si, word [load_kernelname_default] 4526 <1> @@: 4527 00006BFA 06 <1> push es 4528 00006BFB 16 <1> push ss 4529 00006BFC 07 <1> pop es 4530 00006BFD E8D4FC <1> call boot_parse_fn ; get next pathname 4531 00006C00 07 <1> pop es 4532 00006C01 3C2F <1> cmp al, '/' 4533 00006C03 7509 <1> jne @F 4534 00006C05 C606[C58F]10 <1> mov byte [load_check_dir_attr], ATTR_DIRECTORY 4535 00006C0A 8936[D68F] <1> mov word [load_kernelname_next], si 4536 <1> @@: 4537 00006C0E 5F <1> pop di 4538 00006C0F 5E <1> pop si 4539 <1> 4540 00006C10 31D2 <1> xor dx, dx 4541 00006C12 268B471A <1> mov ax, [es:bx + deClusterLow] 4542 <1> ; = first cluster (not FAT32) 4543 00006C16 807EE620 <1> cmp byte [bp + ldFATType], 32 4544 00006C1A 7504 <1> jne @F 4545 00006C1C 268B5714 <1> mov dx, [es:bx + deClusterHigh] 4546 <1> ; dx:ax = first cluster (FAT32) 4547 <1> @@: 4548 <1> 4549 00006C20 EBAD <1> jmp scan_dir_kernelname_loop 4550 <1> 4551 <1> 4552 <1> got_kernelentry: 4553 00006C22 56 <1> push si 4554 00006C23 57 <1> push di 4555 <1> 4556 00006C24 C606[C58F]00 <1> mov byte [load_check_dir_attr], 0 4557 00006C29 8B36[D88F] <1> mov si, word [load_addname_input] 4558 00006C2D 803C2F <1> cmp byte [si], '/' 4559 00006C30 7511 <1> jne @F 4560 00006C32 46 <1> inc si 4561 00006C33 803C2F <1> cmp byte [si], '/' 4562 00006C36 7503E9A400 <1> je got_no_addentry.no_dxax_on_stack 4563 <1> 4564 00006C3B 31C0 <1> xor ax, ax 4565 00006C3D 8946EC <1> mov word [bp + ldDirCluster], ax 4566 00006C40 8946EE <1> mov word [bp + ldDirCluster + 2], ax 4567 <1> ; search from root directory 4568 <1> @@: 4569 00006C43 803C00 <1> cmp byte [si], 0 4570 00006C46 750C <1> jne @F 4571 00006C48 8B36[F28C] <1> mov si, word [load_addname_default] 4572 00006C4C 803C00 <1> cmp byte [si], 0 4573 00006C4F 7503E98B00 <1> je got_no_addentry.no_dxax_on_stack 4574 <1> @@: 4575 00006C54 16 <1> push ss 4576 00006C55 07 <1> pop es 4577 00006C56 E87BFC <1> call boot_parse_fn ; get next pathname 4578 00006C59 3C2F <1> cmp al, '/' 4579 00006C5B 7509 <1> jne @F 4580 00006C5D C606[C58F]10 <1> mov byte [load_check_dir_attr], ATTR_DIRECTORY 4581 00006C62 8936[D68F] <1> mov word [load_kernelname_next], si 4582 <1> @@: 4583 00006C66 5F <1> pop di 4584 00006C67 5E <1> pop si 4585 00006C68 EB06 <1> jmp @F 4586 <1> 4587 <1> scan_dir_addname_loop: 4588 00006C6A 8946EC <1> mov word [bp + ldDirCluster], ax 4589 00006C6D 8956EE <1> mov word [bp + ldDirCluster + 2], dx 4590 <1> 4591 <1> @@: 4592 00006C70 31DB <1> xor bx, bx 4593 00006C72 8EC3 <1> mov es, bx 4594 00006C74 BB2005 <1> mov bx, 520h ; 0:bx -> space for second directory entry 4595 00006C77 E82B07 <1> call scan_dir_aux_for_file 4596 <1> 4597 00006C7A 803E[C58F]10 <1> cmp byte [load_check_dir_attr], ATTR_DIRECTORY 4598 00006C7F 756C <1> jne got_addentry 4599 <1> 4600 00006C81 56 <1> push si 4601 00006C82 57 <1> push di 4602 00006C83 52 <1> push dx 4603 00006C84 50 <1> push ax 4604 00006C85 C606[C58F]00 <1> mov byte [load_check_dir_attr], 0 4605 00006C8A 8B36[DA8F] <1> mov si, word [load_addname_next] 4606 00006C8E 803C00 <1> cmp byte [si], 0 4607 00006C91 7509 <1> jne @F 4608 00006C93 8B36[F28C] <1> mov si, word [load_addname_default] 4609 00006C97 803C00 <1> cmp byte [si], 0 4610 00006C9A 7441 <1> je got_no_addentry 4611 <1> @@: 4612 00006C9C 06 <1> push es 4613 00006C9D 16 <1> push ss 4614 00006C9E 07 <1> pop es 4615 00006C9F E832FC <1> call boot_parse_fn ; get next pathname 4616 00006CA2 07 <1> pop es 4617 00006CA3 3C2F <1> cmp al, '/' 4618 00006CA5 7509 <1> jne @F 4619 00006CA7 C606[C58F]10 <1> mov byte [load_check_dir_attr], ATTR_DIRECTORY 4620 00006CAC 8936[DA8F] <1> mov word [load_addname_next], si 4621 <1> @@: 4622 00006CB0 58 <1> pop ax 4623 00006CB1 5A <1> pop dx 4624 00006CB2 5F <1> pop di 4625 00006CB3 5E <1> pop si 4626 <1> 4627 00006CB4 31D2 <1> xor dx, dx 4628 00006CB6 268B471A <1> mov ax, [es:bx + deClusterLow] 4629 <1> ; = first cluster (not FAT32) 4630 00006CBA 807EE620 <1> cmp byte [bp + ldFATType], 32 4631 00006CBE 7504 <1> jne @F 4632 00006CC0 268B5714 <1> mov dx, [es:bx + deClusterHigh] 4633 <1> ; dx:ax = first cluster (FAT32) 4634 <1> @@: 4635 <1> 4636 00006CC4 EBA4 <1> jmp scan_dir_addname_loop 4637 <1> 4638 <1> 4639 <1> helper_shift_down_and_clamp: 4640 00006CC6 B90400 <1> mov cx, 4 4641 <1> @@: 4642 00006CC9 D0EA <1> shr dl, 1 4643 00006CCB D1D8 <1> rcr ax, 1 4644 00006CCD D1DB <1> rcr bx, 1 4645 00006CCF E2F8 <1> loop @B 4646 <1> 4647 00006CD1 08D0 <1> or al, dl 4648 00006CD3 89DA <1> mov dx, bx ; size in paragraphs 4649 00006CD5 85C0 <1> test ax, ax ; > 0FFFFh ? 4650 00006CD7 7403 <1> jz @F ; no, take actual size --> 4651 00006CD9 BAFFFF <1> mov dx, 0FFFFh ; clamp to 0FFFFh 4652 <1> @@: 4653 00006CDC C3 <1> retn 4654 <1> 4655 <1> got_no_addentry: 4656 00006CDD 58 <1> pop ax 4657 00006CDE 5A <1> pop dx 4658 <1> .no_dxax_on_stack: 4659 <1> ; push ax 4660 00006CDF B91000 <1> mov cx, 16 4661 00006CE2 31C0 <1> xor ax, ax 4662 00006CE4 8EC0 <1> mov es, ax 4663 00006CE6 BF2005 <1> mov di, 520h ; es:di -> space for second directory entry 4664 00006CE9 F3AB <1> rep stosw ; store zeros 4665 <1> ; pop ax 4666 <1> 4667 00006CEB 5F <1> pop di 4668 00006CEC 5E <1> pop si 4669 <1> 4670 <1> got_addentry: 4671 00006CED 31C0 <1> xor ax, ax 4672 00006CEF 8EC0 <1> mov es, ax 4673 <1> 4674 <1> 4675 <1> ; (boot32.asm code starts here) 4676 <1> 4677 00006CF1 8B46E2 <1> mov ax, word [bp + ldLoadTop] 4678 00006CF4 2B46EA <1> sub ax, word [bp + ldParaPerSector] 4679 00006CF7 7303E9B4FD <1> jc load_freedos_common.outofmem 4680 00006CFC 8946D6 <1> mov [bp + ldLastAvailableSector], ax 4681 <1> 4682 00006CFF 268B1E1C05 <1> mov bx, [es:500h + deSize] 4683 00006D04 26A11E05 <1> mov ax, [es:500h + deSize + 2] ; ax:bx = file size 4684 00006D08 268A160C05 <1> mov dl, [es:500h + 12] ; dl = FAT+ size bits 4685 00006D0D 88D6 <1> mov dh, dl 4686 00006D0F 81E207E0 <1> and dx, 0E007h ; obtain bits 7-5 and 2-0 4687 00006D13 D0EE <1> shr dh, 1 4688 00006D15 D0EE <1> shr dh, 1 4689 00006D17 08F2 <1> or dl, dh ; dl:ax:bx = file size 4690 00006D19 52 <1> push dx 4691 00006D1A 50 <1> push ax 4692 00006D1B 53 <1> push bx 4693 <1> 4694 00006D1C E8A7FF <1> call helper_shift_down_and_clamp 4695 <1> ; round down to next paragraph boundary 4696 00006D1F 3916[F48C] <1> cmp word [load_minpara], dx 4697 00006D23 7603E9A400 <1> ja error_filetoosmall 4698 <1> 4699 00006D28 5B <1> pop bx 4700 00006D29 58 <1> pop ax 4701 00006D2A 5A <1> pop dx 4702 00006D2B 8B4E0B <1> mov cx, [bp + bsBPB + bpbBytesPerSector] 4703 00006D2E 49 <1> dec cx ; BpS - 1 4704 00006D2F 01CB <1> add bx, cx 4705 00006D31 83D000 <1> adc ax, 0 4706 00006D34 80D200 <1> adc dl, 0 ; round up to next sector 4707 00006D37 F7D1 <1> not cx ; ~ (BpS - 1) 4708 00006D39 21CB <1> and bx, cx ; mask to limit to rounded-up sector 4709 00006D3B E888FF <1> call helper_shift_down_and_clamp 4710 <1> 4711 <1> ; dl:ax:bx = size in paragraphs 4712 00006D3E A1[F68C] <1> mov ax, word [load_maxpara] 4713 00006D41 39C2 <1> cmp dx, ax ; actual size below maximum ? 4714 00006D43 7602 <1> jbe @F ; yes, use actual size --> 4715 00006D45 89C2 <1> mov dx, ax ; use maximum size 4716 <1> @@: 4717 00006D47 8956D8 <1> mov word [bp + ldParasLeft], dx 4718 00006D4A C746DA0000 <1> mov word [bp + ldParasDone], 0 4719 <1> 4720 <1> ; get starting cluster of file 4721 00006D4F 31D2 <1> xor dx, dx 4722 00006D51 26A11A05 <1> mov ax, [es:500h + deClusterLow] 4723 <1> ; = first cluster (not FAT32) 4724 <1> 4725 00006D55 807EE620 <1> cmp byte [bp + ldFATType], 32 4726 00006D59 7505 <1> jne @F 4727 00006D5B 268B161405 <1> mov dx, [es:500h + deClusterHigh] 4728 <1> ; dx:ax = first cluster (FAT32) 4729 <1> @@: 4730 <1> 4731 00006D60 8946F0 <1> mov word [bp + lsvFirstCluster], ax 4732 00006D63 8956F2 <1> mov word [bp + lsvFirstCluster + 2], dx 4733 <1> 4734 00006D66 E80A08 <1> call check_clust 4735 00006D69 7303E92E15 <1> jc error_badchain 4736 <1> 4737 <1> next_load_cluster: 4738 00006D6E E82107 <1> call clust_to_first_sector 4739 <1> ; dx:ax = first sector of cluster 4740 <1> ; cx:bx = cluster value 4741 00006D71 51 <1> push cx 4742 00006D72 53 <1> push bx ; preserve cluster number for later 4743 <1> 4744 00006D73 8B4EE8 <1> mov cx, [bp + ldClusterSize] 4745 <1> 4746 00006D76 8B5EFA <1> mov bx, [bp + lsvLoadSeg] 4747 <1> ; xxx - this will always load an entire cluster (e.g. 64 sectors), 4748 <1> ; even if the file is shorter than this 4749 <1> @@: 4750 00006D79 3B5ED6 <1> cmp bx, [bp + ldLastAvailableSector] 4751 00006D7C 7613 <1> jbe @F 4752 00006D7E 833E[F68C]00 <1> cmp word [load_maxpara], 0 4753 00006D83 743D <1> je @FF ; if to allow partial load --> 4754 00006D85 BA[5362] <1> mov dx, msg.boot_file_too_big_error 4755 00006D88 B81A02 <1> mov ax, 021Ah 4756 00006D8B E89537 <1> call setrc 4757 00006D8E E96CF6 <1> jmp bootcmd.fail 4758 <1> 4759 <1> @@: 4760 00006D91 06 <1> push es ; (must preserve ADR_FATBUF reference) 4761 00006D92 E8800B <1> call read_sector 4762 00006D95 07 <1> pop es 4763 00006D96 895EFA <1> mov [bp + lsvLoadSeg], bx ; => after last read data 4764 <1> 4765 00006D99 50 <1> push ax 4766 00006D9A 8B46EA <1> mov ax, [bp + ldParaPerSector] 4767 00006D9D 0146DA <1> add word [bp + ldParasDone], ax 4768 00006DA0 833E[F68C]00 <1> cmp word [load_maxpara], 0 4769 00006DA5 7407 <1> je .donotuseleft 4770 00006DA7 2946D8 <1> sub word [bp + ldParasLeft], ax 4771 00006DAA 58 <1> pop ax 4772 00006DAB 7615 <1> jbe @F ; read enough --> 4773 00006DAD A8 <1> db __TEST_IMM8 ; (skip pop) 4774 <1> .donotuseleft: 4775 00006DAE 58 <1> pop ax 4776 <1> 4777 00006DAF E2C8 <1> loop @BB 4778 00006DB1 5B <1> pop bx 4779 00006DB2 59 <1> pop cx 4780 <1> 4781 00006DB3 E80507 <1> call clust_next 4782 00006DB6 73B6 <1> jnc next_load_cluster 4783 00006DB8 40 <1> inc ax 4784 00006DB9 40 <1> inc ax 4785 00006DBA A808 <1> test al, 8 ; set in 0FFF_FFF8h--0FFF_FFFFh, 4786 <1> ; clear in 0, 1, and 0FFF_FFF7h 4787 00006DBC 7503E9DB14 <1> jz error_badchain 4788 00006DC1 A9 <1> db __TEST_IMM16 4789 <1> @@: 4790 00006DC2 5B <1> pop bx 4791 00006DC3 59 <1> pop cx 4792 <1> 4793 00006DC4 A1[F48C] <1> mov ax, word [load_minpara] 4794 00006DC7 3B46DA <1> cmp ax, word [bp + ldParasDone] 4795 00006DCA 760C <1> jbe @F 4796 <1> error_filetoosmall: 4797 00006DCC BA[6362] <1> mov dx, msg.boot_file_too_small_error 4798 00006DCF B81B02 <1> mov ax, 021Bh 4799 00006DD2 E84E37 <1> call setrc 4800 00006DD5 E925F6 <1> jmp bootcmd.fail 4801 <1> @@: 4802 <1> 4803 <1> 4804 00006DD8 8E06[FA8C] <1> mov es, word [load_loadseg] 4805 00006DDC 8B3E[048D] <1> mov di, word [load_check_offset] 4806 00006DE0 A1[068D] <1> mov ax, word [load_check_value] 4807 00006DE3 85C0 <1> test ax, ax 4808 00006DE5 7406 <1> jz @F 4809 00006DE7 AF <1> scasw 4810 00006DE8 7403E9F301 <1> jne .error_check_mismatch 4811 <1> @@: 4812 <1> 4813 <1> ; turn off floppy motor 4814 00006DED BAF203 <1> mov dx,3F2h 4815 00006DF0 B000 <1> mov al,0 4816 00006DF2 EE <1> out dx,al 4817 <1> 4818 <1> ; Set-up registers for and jump to loaded file 4819 <1> 4820 00006DF3 8A5640 <1> mov dl, [bp + bsBPB + ebpbNew + bpbnBootUnit] 4821 <1> ; testopt [load_options], LOAD_SET_DL_UNIT 4822 <1> ; jz @F 4823 <1> ; (always set dl) 4824 00006DF6 8816[700C] <1> mov byte [reg_edx], dl 4825 <1> @@: 4826 <1> 4827 <1> ; testopt [load_options], LOAD_SET_BL_UNIT 4828 <1> ; jz @F 4829 <1> ; (always set bl -- overwritten later if LOAD_SET_AXBX_DATASTART) 4830 00006DFA 8816[680C] <1> mov byte [reg_ebx], dl 4831 <1> @@: 4832 <1> 4833 00006DFE 8A6E15 <1> mov ch, byte [bp + bsBPB + bpbMediaID] 4834 00006E01 882E[6D0C] <1> mov byte [reg_ecx + 1], ch 4835 <1> 4836 00006E05 F606[F88C]40 <1> testopt [load_options], LOAD_DATASTART_HIDDEN 4837 00006E0A 740C <1> jz @F 4838 00006E0C 8B5E1C <1> mov bx, [bp + bsBPB + bpbHiddenSectors] 4839 00006E0F 8B461E <1> mov ax, [bp + bsBPB + bpbHiddenSectors + 2] 4840 00006E12 015EFC <1> add word [bp + lsvDataStart], bx 4841 00006E15 1146FE <1> adc word [bp + lsvDataStart + 2], ax 4842 <1> @@: 4843 <1> 4844 00006E18 F606[F88C]80 <1> testopt [load_options], LOAD_SET_AXBX_DATASTART 4845 00006E1D 740D <1> jz @F 4846 00006E1F 8B5EFC <1> mov bx, word [bp + lsvDataStart] 4847 00006E22 8B46FE <1> mov ax, word [bp + lsvDataStart + 2] 4848 00006E25 891E[680C] <1> mov word [reg_ebx], bx 4849 00006E29 A3[640C] <1> mov word [reg_eax], ax 4850 <1> @@: 4851 <1> 4852 00006E2C F606[F98C]08 <1> testopt [load_options], LOAD_SET_AXBX_ROOT_HIDDEN 4853 00006E31 7413 <1> jz @F 4854 00006E33 8B5ED0 <1> mov bx, word [bp + ldRootSector] 4855 00006E36 8B46D2 <1> mov ax, word [bp + ldRootSector + 2] 4856 00006E39 035E1C <1> add bx, word [bp + bsBPB + bpbHiddenSectors] 4857 00006E3C 13461E <1> adc ax, word [bp + bsBPB + bpbHiddenSectors + 2] 4858 00006E3F 891E[680C] <1> mov word [reg_ebx], bx 4859 00006E43 A3[640C] <1> mov word [reg_eax], ax 4860 <1> @@: 4861 <1> 4862 00006E46 F606[F88C]04 <1> testopt [load_options], LOAD_SET_SIDI_CLUSTER 4863 00006E4B 740D <1> jz @F 4864 00006E4D 8B56F2 <1> mov dx, word [bp + lsvFirstCluster + 2] 4865 00006E50 8B46F0 <1> mov ax, word [bp + lsvFirstCluster] 4866 00006E53 8916[7C0C] <1> mov word [reg_esi], dx 4867 00006E57 A3[800C] <1> mov word [reg_edi], ax 4868 <1> @@: 4869 <1> 4870 <1> ; (boot.asm code ends here) 4871 <1> 4872 <1> 4873 00006E5A C43E[B48F] <1> les di, [load_bpb_dest] 4874 00006E5E 57 <1> push di 4875 00006E5F 83EF10 <1> sub di, -LOADSTACKVARS 4876 00006E62 BE[808C] <1> mov si, load_data - LOADDATA2 + LOADSTACKVARS 4877 00006E65 B91000 <1> mov cx, -LOADSTACKVARS 4878 00006E68 F606[F98C]20 <1> testopt [load_options], LOAD_NO_BPB 4879 00006E6D 7568 <1> jnz .no_bpb_movsb 4880 00006E6F B93400 <1> mov cx, -LOADSTACKVARS + bsBPB + bpbNew 4881 00006E72 F3A4 <1> rep movsb ; move common BPB part 4882 <1> 4883 00006E74 394E16 <1> cmp word [bp + bsBPB + bpbSectorsPerFAT], cx 4884 00006E77 B93600 <1> mov cx, ebpbNew - bpbNew + BPBN_size ; move FAT32 EBPB part + BPBN 4885 00006E7A 7406 <1> je @F 4886 00006E7C 83C61C <1> add si, ebpbNew - bpbNew; -> BPBN 4887 00006E7F B91A00 <1> mov cx, BPBN_size ; move only BPBN 4888 <1> @@: 4889 00006E82 F3A4 <1> rep movsb 4890 <1> 4891 00006E84 89F8 <1> mov ax, di 4892 00006E86 5F <1> pop di 4893 00006E87 29F8 <1> sub ax, di 4894 00006E89 48 <1> dec ax 4895 00006E8A 48 <1> dec ax 4896 00006E8B 86C4 <1> xchg al, ah 4897 00006E8D B0EB <1> mov al, 0EBh 4898 00006E8F 268905 <1> mov word [es:di], ax 4899 00006E92 26C6450290 <1> mov byte [es:di + 2], 90h 4900 <1> 4901 00006E97 F606[F98C]02 <1> testopt [load_options], LOAD_LBA_SET_TYPE 4902 00006E9C 7416 <1> jz @F 4903 00006E9E F646E701 <1> test byte [bp + ldFlags], ldfHasLBA 4904 00006EA2 7410 <1> jz @F 4905 <1> 4906 00006EA4 26C645020E <1> mov byte [es:di + 2], 0Eh ; (LBA-enabled) FAT16 FS partition type 4907 00006EA9 807EE620 <1> cmp byte [bp + ldFATType], 32 4908 00006EAD 7205 <1> jb @F 4909 00006EAF 26C645020C <1> mov byte [es:di + 2], 0Ch ; (LBA-enabled) FAT32 FS partition type 4910 <1> @@: 4911 <1> 4912 00006EB4 26C785FE0155AA <1> mov word [es:di + 510], 0AA55h 4913 00006EBB 1E <1> push ds 4914 00006EBC 31C9 <1> xor cx, cx 4915 00006EBE 8ED9 <1> mov ds, cx 4916 00006EC0 BE0005 <1> mov si, 500h 4917 00006EC3 57 <1> push di 4918 00006EC4 81C7D601 <1> add di, 512 - 2 - 2 - 14 - 12 - 12 4919 <1> ; 2: AA55 sig, 2: null word, 14: MS-DOS 7 protocol 4920 <1> ; message table pointer lives here, 4921 <1> ; 12: add name, 12: kernel name 4922 00006EC8 B10B <1> mov cl, 11 4923 00006ECA F3A4 <1> rep movsb ; put kernel filename into the pseudo boot sector 4924 00006ECC 47 <1> inc di 4925 00006ECD BE2005 <1> mov si, 520h 4926 00006ED0 B10B <1> mov cl, 11 4927 00006ED2 F3A4 <1> rep movsb ; put additional filename (if any), cx = 0 4928 00006ED4 5F <1> pop di 4929 00006ED5 1F <1> pop ds 4930 <1> 4931 <1> ; cx = 0 4932 00006ED6 A8 <1> db __TEST_IMM8 ; (skip pop) 4933 <1> .no_bpb_movsb: 4934 00006ED7 58 <1> pop ax ; discard word on stack 4935 00006ED8 F3A4 <1> rep movsb 4936 <1> 4937 00006EDA 8126[A00C]FFF8 <1> and word [reg_efl], ~(400h|200h|100h) ; UP, DI, TF=0 4938 <1> 4939 00006EE0 890E[9E0C] <1> mov word [reg_eip + 2], cx 4940 00006EE4 FF36[FC8C] <1> push word [load_entrypoint] 4941 00006EE8 8F06[9C0C] <1> pop word [reg_eip] 4942 00006EEC A1[FE8C] <1> mov ax, word [load_entrypoint + 2] 4943 00006EEF 0306[FA8C] <1> add ax, word [load_loadseg] 4944 00006EF3 A3[900C] <1> mov word [reg_cs], ax 4945 <1> 4946 00006EF6 A1[B68F] <1> mov ax, word [load_bpb_dest + 2] 4947 00006EF9 A3[8C0C] <1> mov word [reg_ss], ax 4948 <1> ; testopt [load_options], LOAD_SET_DSBP_BPB 4949 <1> ; jz @F 4950 <1> ; (always set ds -- overwritten later if LOAD_SET_DSSI_DPT) 4951 00006EFC A3[840C] <1> mov word [reg_ds], ax 4952 <1> @@: 4953 00006EFF 8B1E[B48F] <1> mov bx, word [load_bpb_dest] 4954 00006F03 890E[7A0C] <1> mov word [reg_ebp + 2], cx 4955 00006F07 891E[780C] <1> mov word [reg_ebp], bx 4956 00006F0B 89D8 <1> mov ax, bx 4957 00006F0D 83EB10 <1> sub bx, -LOADSTACKVARS ; (subtracts --10h) 4958 00006F10 890E[760C] <1> mov word [reg_esp + 2], cx 4959 00006F14 891E[740C] <1> mov word [reg_esp], bx 4960 <1> 4961 00006F18 F606[F98C]20 <1> testopt [load_options], LOAD_NO_BPB 4962 00006F1D 751B <1> jnz @F 4963 <1> 4964 00006F1F F606[F98C]04 <1> testopt [load_options], LOAD_MESSAGE_TABLE 4965 00006F24 7414 <1> jz @F 4966 00006F26 B96000 <1> mov cx, (bsBPB + ebpbNew + BPBN_size + 2 + 15) & ~15 4967 00006F29 01C8 <1> add ax, cx 4968 00006F2B 268985EE01 <1> mov word [es:di + 1EEh], ax 4969 <1> ; this pointer points to the MS-DOS 7 message table. 4970 <1> ; 4971 <1> ; note that in actual MS-DOS 7 boot sectors, this value is 4972 <1> ; eg 17Fh, which is incorrectly used with the boot sector's 4973 <1> ; ss to load the table into the initial loader. 4974 <1> ; 4975 <1> ; refer to comments in msg.asm about msdos7_message_table. 4976 00006F30 BE[D576] <1> mov si, msdos7_message_table 4977 00006F33 01CF <1> add di, cx 4978 00006F35 B94300 <1> mov cx, msdos7_message_table.size 4979 00006F38 F3A4 <1> rep movsb 4980 <1> @@: 4981 <1> 4982 00006F3A F606[F98C]10 <1> testopt [load_options], LOAD_CMDLINE 4983 00006F3F 7440 <1> jz .no_cmdline 4984 <1> 4985 00006F41 8B36[BE8F] <1> mov si, word [load_cmdline] 4986 00006F45 85F6 <1> test si, si 4987 00006F47 7503 <1> jnz @F 4988 00006F49 BE[BE8F] <1> mov si, load_cmdline 4989 <1> @@: 4990 <1> 4991 <1> ; due to the size of our line_in buffer, 4992 <1> ; the command line is never too long for 4993 <1> ; the lsv command line buffer (256 bytes). 4994 00006F4C B98000 <1> mov cx, lsvclBufferLength / 2 4995 00006F4F 812E[740C]0401 <1> sub word [reg_esp], - lsvCommandLine.start + LOADSTACKVARS 4996 <1> ; hazard: if sp is too low, this underflows! 4997 00006F55 7303E9AD00 <1> jc .error_stack_underflow 4998 00006F5A 8E06[8C0C] <1> mov es, [reg_ss] 4999 00006F5E 8B3E[740C] <1> mov di, [reg_esp] ; es:di -> stack area for the pointers 5000 00006F62 81FF0001 <1> cmp di, 256 5001 00006F66 7303E99C00 <1> jb .error_stack_underflow 5002 00006F6B 57 <1> push di 5003 00006F6C F3A5 <1> rep movsw 5004 00006F6E 26884DFF <1> mov byte [es:di - 1], cl; truncate command line if too long 5005 00006F72 B8434C <1> mov ax, lsvclSignature 5006 00006F75 AB <1> stosw ; write lsvCommandLine.signature 5007 00006F76 31C0 <1> xor ax, ax 5008 00006F78 AB <1> stosw ; write lsvExtra 5009 00006F79 5F <1> pop di 5010 00006F7A B90001 <1> mov cx, lsvclBufferLength 5011 00006F7D F2AE <1> repne scasb ; search terminator 5012 00006F7F F3AA <1> rep stosb ; zero buffer behind terminator 5013 <1> .no_cmdline: 5014 <1> 5015 00006F81 31C0 <1> xor ax, ax 5016 00006F83 8EC0 <1> mov es, ax 5017 00006F85 BF7800 <1> mov di, 1Eh * 4 5018 00006F88 268B5502 <1> mov dx, word [es:di + 2] 5019 00006F8C 268B1D <1> mov bx, word [es:di] 5020 <1> 5021 00006F8F F606[F88C]10 <1> testopt [load_options], LOAD_SET_DSSI_DPT 5022 00006F94 7408 <1> jz @F 5023 00006F96 8916[840C] <1> mov word [reg_ds], dx 5024 00006F9A 891E[7C0C] <1> mov word [reg_esi], bx 5025 <1> @@: 5026 00006F9E F606[F88C]20 <1> testopt [load_options], LOAD_PUSH_DPT 5027 00006FA3 7419 <1> jz @F 5028 <1> 5029 00006FA5 06 <1> push es 5030 00006FA6 57 <1> push di 5031 00006FA7 832E[740C]08 <1> sub word [reg_esp], 4 * 2 ; push four words 5032 00006FAC 8E06[8C0C] <1> mov es, [reg_ss] 5033 00006FB0 8B3E[740C] <1> mov di, [reg_esp] ; es:di -> stack area for the pointers 5034 00006FB4 58 <1> pop ax ; di (1Eh * 4) 5035 00006FB5 AB <1> stosw 5036 00006FB6 58 <1> pop ax ; es (0) 5037 00006FB7 AB <1> stosw 5038 00006FB8 89D8 <1> mov ax, bx 5039 00006FBA AB <1> stosw ; si (Int1E offset) 5040 00006FBB 89D0 <1> mov ax, dx 5041 00006FBD AB <1> stosw ; ds (Int1E segment) 5042 <1> @@: 5043 <1> 5044 00006FBE F606[F98C]40 <1> testopt [load_options], LOAD_SET_DSSI_PARTINFO 5045 00006FC3 7415 <1> jz @F 5046 00006FC5 A1[C08F] <1> mov ax, word [load_partition_entry] 5047 00006FC8 8326[840C]00 <1> and word [reg_ds], 0 5048 00006FCD A3[7C0C] <1> mov word [reg_esi], ax 5049 00006FD0 F606[F98C]20 <1> testopt [load_options], LOAD_NO_BPB 5050 00006FD5 7403 <1> jz @F 5051 00006FD7 A3[780C] <1> mov word [reg_ebp], ax 5052 <1> @@: 5053 00006FDA 800E[A300]01 <1> setopt [internalflags2], dif2_boot_loaded_kernel 5054 00006FDF C3 <1> retn 5055 <1> 5056 <1> 5057 <1> .error_check_mismatch: 5058 00006FE0 4F <1> dec di 5059 00006FE1 4F <1> dec di ; = offset into file 5060 00006FE2 26FF35 <1> push word [es:di] ; = value we got in file 5061 00006FE5 57 <1> push di ; = offset 5062 00006FE6 16 <1> push ss 5063 00006FE7 07 <1> pop es ; set STT 5064 00006FE8 BF[F960] <1> mov di, msg.bootfail_check_mismatch.check_value 5065 00006FEB E8004A <1> call hexword ; write expected value 5066 00006FEE 58 <1> pop ax 5067 00006FEF BF[0961] <1> mov di, msg.bootfail_check_mismatch.check_offset 5068 00006FF2 E8F949 <1> call hexword ; write offset 5069 00006FF5 58 <1> pop ax 5070 00006FF6 BF[1761] <1> mov di, msg.bootfail_check_mismatch.check_got 5071 00006FF9 E8F249 <1> call hexword ; write what we got in file 5072 <1> 5073 00006FFC BA[E060] <1> mov dx, msg.bootfail_check_mismatch 5074 00006FFF B81C02 <1> mov ax, 021Ch 5075 00007002 E81E35 <1> call setrc 5076 00007005 EB09 <1> jmp @F ; fail with error message 5077 <1> 5078 <1> .error_stack_underflow: 5079 00007007 BA[C660] <1> mov dx, msg.bootfail_stack_underflow 5080 0000700A B81D02 <1> mov ax, 021Dh 5081 0000700D E81335 <1> call setrc 5082 <1> @@: 5083 00007010 E9EAF3 <1> jmp bootcmd.fail 5084 <1> 5085 <1> 5086 <1> boot_dir: 5087 00007013 8026[A400]F7 <1> clropt [internalflags3], dif3_load_dir_dir 5088 00007018 E82849 <1> call skipwhite 5089 0000701B 4E <1> dec si 5090 0000701C BA[8D63] <1> mov dx, msg.dir 5091 0000701F E86D48 <1> call isstring? 5092 00007022 7505 <1> jne @F 5093 00007024 800E[A400]08 <1> setopt [internalflags3], dif3_load_dir_dir 5094 <1> @@: 5095 00007029 C706[D48F][9A63] <1> mov word [load_kernelname_input], msg.emptydirname 5096 0000702F AC <1> lodsb 5097 00007030 E8C9F5 <1> call parseloadunit_default_sdp 5098 00007033 7409 <1> jz .fn_done_eol ; no filename given, use defaults --> 5099 <1> ; al was = '/' or '\' or first pathname's first character 5100 <1> ; si-> next char 5101 00007035 BB[D48F] <1> mov bx, load_kernelname_input 5102 00007038 E8ADF1 <1> call bootcmd.pathname_parse_super 5103 0000703B E8C548 <1> call chkeol 5104 <1> 5105 <1> .fn_done_eol: 5106 0000703E F606[A400]07 <1> testopt [internalflags3], dif3_load_is_dp 5107 00007043 7527 <1> jnz .boot_dir_from_ldp 5108 <1> 5109 00007045 8A1E[C28F] <1> mov bl, [load_partition] 5110 00007049 803E[D08C]80 <1> cmp byte [load_unit], 80h 5111 0000704E 7228 <1> jb .boot_dir_is_diskette 5112 00007050 84DB <1> test bl, bl ; partition specified ? 5113 00007052 7503E98CEF <1> jz bootcmd.error ; no, error --> 5114 <1> 5115 00007057 E8F306 <1> call query_geometry 5116 <1> 5117 0000705A B9[9F70] <1> mov cx, boot_dir_from_partition 5118 0000705D E84505 <1> call scan_partitions 5119 00007060 BA[7661] <1> mov dx, msg.boot_partition_not_found 5120 00007063 B81102 <1> mov ax, 0211h 5121 00007066 E8BA34 <1> call setrc 5122 00007069 E991F3 <1> jmp bootcmd.fail 5123 <1> 5124 <1> 5125 <1> .boot_dir_from_ldp: 5126 0000706C E8DE06 <1> call query_geometry 5127 0000706F A1[B88F] <1> mov ax, word [load_partition_sector] 5128 00007072 8B16[BA8F] <1> mov dx, word [load_partition_sector + 2] 5129 00007076 EB0E <1> jmp @F 5130 <1> 5131 <1> 5132 <1> .boot_dir_is_diskette: 5133 00007078 84DB <1> test bl, bl ; partition specified ? 5134 0000707A 7403E964EF <1> jnz bootcmd.error ; yes, error --> 5135 <1> 5136 0000707F E8CB06 <1> call query_geometry 5137 <1> 5138 00007082 31C0 <1> xor ax, ax 5139 00007084 31D2 <1> xor dx, dx 5140 <1> @@: 5141 00007086 8B1E[F209] <1> mov bx, word [auxbuff_segorsel] ; bx => auxbuff 5142 0000708A 52 <1> push dx 5143 0000708B 50 <1> push ax 5144 0000708C E87408 <1> call read_ae_512_bytes 5145 <1> 5146 0000708F 26813EFE0155AA <1> cmp word [es:510], 0AA55h 5147 00007096 7403E9560B <1> jne boot_sigmismatch 5148 0000709B 58 <1> pop ax 5149 0000709C 5A <1> pop dx 5150 <1> 5151 0000709D EB41 <1> jmp boot_dir_common 5152 <1> 5153 <1> 5154 <1> ; INP: es:si -> partition table entry, 5155 <1> ; si = load_partition_table .. load_partition_table+48, 5156 <1> ; es = ss 5157 <1> ; bp + di -> above part table metadata, 5158 <1> ; dwo [bp + di - 4] = root (outermost extended position) 5159 <1> ; dwo [bp + di - 8] = base (current table position) 5160 <1> ; CHG: ax, bx, (cx), dx 5161 <1> boot_dir_from_partition: 5162 <1> d4 call d4message 5163 <1> d4 asciz "In boot_dir_from_partition",13,10 5164 <1> 5165 0000709F A0[C38F] <1> mov al, byte [load_current_partition] 5166 000070A2 3A06[C28F] <1> cmp al, byte [load_partition] 5167 000070A6 7401 <1> je .gotit 5168 000070A8 C3 <1> retn 5169 <1> 5170 <1> .gotit: 5171 <1> d4 call d4message 5172 <1> d4 asciz "In boot_dir_from_partition.gotit",13,10 5173 <1> 5174 000070A9 8B43F8 <1> mov ax, [bp + di - 8] 5175 000070AC 8B53FA <1> mov dx, [bp + di - 6] ; base (current table position) 5176 <1> 5177 000070AF 26034408 <1> add ax, [es:si + 8] 5178 000070B3 2613540A <1> adc dx, [es:si + 8 + 2] ; add offset to logical partition 5179 <1> 5180 000070B7 26894408 <1> mov word [es:si + 8], ax 5181 000070BB 2689540A <1> mov word [es:si + 8 + 2], dx ; store in partition table entry 5182 000070BF 26800C80 <1> or byte [es:si + 0], 80h ; set bootable flag 5183 <1> 5184 000070C3 89EC <1> mov sp, bp 5185 000070C5 5D <1> pop bp ; restore bp (scan_partitions) 5186 000070C6 5B <1> pop bx ; discard ret address (scan_partitions) 5187 <1> 5188 <1> ; dx:ax = absolute sector number 5189 000070C7 8B1E[F209] <1> mov bx, word [auxbuff_segorsel] ; bx => auxbuff 5190 000070CB 50 <1> push ax 5191 000070CC 52 <1> push dx 5192 000070CD E83308 <1> call read_ae_512_bytes ; load partition boot sector 5193 <1> 5194 000070D0 26813EFE0155AA <1> cmp word [es:510], 0AA55h 5195 000070D7 7403E9150B <1> jne boot_sigmismatch 5196 <1> 5197 000070DC 31C9 <1> xor cx, cx 5198 <1> ; cmp word [es:0], cx 5199 <1> ; je boot_codemismatch 5200 <1> 5201 000070DE 5A <1> pop dx 5202 000070DF 58 <1> pop ax 5203 <1> 5204 <1> ; dx:ax = boot sector 5205 <1> ; byte [load_unit] = unit 5206 <1> ; es:0-> read sector 5207 <1> boot_dir_common: 5208 000070E0 26A31C00 <1> mov word [es:bsBPB + bpbHiddenSectors], ax 5209 000070E4 2689161E00 <1> mov word [es:bsBPB + bpbHiddenSectors + 2], dx 5210 <1> 5211 000070E9 8B5E0B <1> mov bx, [bp + bsBPB + bpbBytesPerSector] 5212 000070EC 263B1E0B00 <1> cmp bx, [es:bsBPB + bpbBytesPerSector] 5213 000070F1 7403E90F0B <1> jne boot_secsizemismatch 5214 <1> 5215 <1> ; preserve some variables from our pseudo BPB 5216 000070F6 31C0 <1> xor ax, ax 5217 000070F8 FF7618 <1> push word [bp + bsBPB + bpbCHSSectors] 5218 000070FB 268F061800 <1> pop word [es:bsBPB + bpbCHSSectors] 5219 00007100 FF761A <1> push word [bp + bsBPB + bpbCHSHeads] 5220 00007103 268F061A00 <1> pop word [es:bsBPB + bpbCHSHeads] ; preserve geometry 5221 <1> 5222 00007108 8B5EEA <1> mov bx, word [bp + ldParaPerSector] 5223 0000710B D1EB <1> shr bx, 1 5224 0000710D 895ED4 <1> mov word [bp + ldEntriesPerSector], bx 5225 <1> 5226 00007110 2639061600 <1> cmp word [es:bsBPB + bpbSectorsPerFAT], ax 5227 00007115 8A5E40 <1> mov bl, byte [bp + bsBPB + ebpbNew + bpbnBootUnit] 5228 00007118 7407 <1> je .is_fat32 5229 0000711A 26881E2400 <1> mov byte [es:bsBPB + bpbNew + bpbnBootUnit], bl 5230 0000711F EB05 <1> jmp short .was_fat1612 5231 <1> .is_fat32: 5232 00007121 26881E4000 <1> mov byte [es:bsBPB + ebpbNew + bpbnBootUnit], bl 5233 <1> .was_fat1612: 5234 <1> 5235 00007126 06 <1> push es 5236 00007127 1E <1> push ds 5237 00007128 06 <1> push es 5238 00007129 1F <1> pop ds 5239 0000712A 31F6 <1> xor si, si ; -> BPB from boot partition 5240 0000712C 16 <1> push ss 5241 0000712D 07 <1> pop es 5242 0000712E BF[908C] <1> mov di, load_data - LOADDATA2 ; -> our copy of a BPB 5243 00007131 B95A00 <1> mov cx, (bsBPB + ebpbNew + BPBN_size) 5244 00007134 F3A4 <1> rep movsb ; get the BPB 5245 <1> 5246 00007136 1F <1> pop ds 5247 00007137 800E[A400]80 <1> setopt [internalflags3], dif3_partition_changed 5248 <1> 5249 0000713C 394616 <1> cmp word [bp + bsBPB + bpbSectorsPerFAT], ax 5250 0000713F 740B <1> je @F ; is FAT32 --> 5251 00007141 BE[B48C] <1> mov si, load_data - LOADDATA2 + bsBPB + bpbNew 5252 00007144 BF[D08C] <1> mov di, load_data - LOADDATA2 + bsBPB + ebpbNew 5253 00007147 B91A00 <1> mov cx, BPBN_size 5254 0000714A F3A4 <1> rep movsb ; clone the FAT16 / FAT12 BPBN 5255 <1> ; to where the FAT32 BPBN lives 5256 <1> @@: 5257 0000714C 07 <1> pop es 5258 <1> 5259 0000714D FF36[F209] <1> push word [auxbuff_segorsel] 5260 00007151 8F46F8 <1> pop word [bp + lsvFATSeg] 5261 00007154 804EE702 <1> or byte [bp + ldFlags], ldfFATInvalid 5262 00007158 B8FFFF <1> mov ax, -1 5263 0000715B 8946F4 <1> mov word [bp + lsvFATSector], ax 5264 0000715E 8946F6 <1> mov word [bp + lsvFATSector + 2], ax 5265 <1> 5266 00007161 E8FB10 <1> call initialise_fs 5267 <1> 5268 00007164 C706[F28F][7673] <1> mov word [handle_scan_dir_entry], scan_dir_entry 5269 <1> 5270 0000716A C606[C58F]00 <1> mov byte [load_check_dir_attr], 0 5271 0000716F 8B36[D48F] <1> mov si, word [load_kernelname_input] 5272 00007173 803C2F <1> cmp byte [si], '/' 5273 00007176 7501 <1> jne @F 5274 00007178 46 <1> inc si 5275 <1> @@: 5276 00007179 803C00 <1> cmp byte [si], 0 5277 0000717C 7503E99B00 <1> je .root 5278 00007181 16 <1> push ss 5279 00007182 07 <1> pop es 5280 00007183 E84EF7 <1> call boot_parse_fn ; get next pathname 5281 00007186 3C2F <1> cmp al, '/' 5282 00007188 7509 <1> jne @F 5283 0000718A C606[C58F]10 <1> mov byte [load_check_dir_attr], ATTR_DIRECTORY 5284 0000718F 8936[D68F] <1> mov word [load_kernelname_next], si 5285 <1> @@: 5286 00007193 84C0 <1> test al, al 5287 00007195 7506 <1> jnz @F 5288 00007197 C706[F28F][7373] <1> mov word [handle_scan_dir_entry], scan_dir_entry_dir_or_file 5289 <1> @@: 5290 <1> 5291 0000719D BFFFFF <1> mov di, -1 5292 000071A0 89FE <1> mov si, di 5293 000071A2 897EF4 <1> mov [bp + lsvFATSector], di 5294 000071A5 8976F6 <1> mov [bp + lsvFATSector + 2], si 5295 <1> 5296 000071A8 31C0 <1> xor ax, ax 5297 000071AA 31D2 <1> xor dx, dx 5298 <1> 5299 000071AC 83EC20 <1> sub sp, 32 5300 <1> 5301 <1> .scan_dir_dirname_loop: 5302 000071AF 8946EC <1> mov word [bp + ldDirCluster], ax 5303 000071B2 8956EE <1> mov word [bp + ldDirCluster + 2], dx 5304 <1> 5305 000071B5 16 <1> push ss 5306 000071B6 07 <1> pop es 5307 000071B7 89E3 <1> mov bx, sp 5308 000071B9 E8EF01 <1> call scan_dir_aux_with_error 5309 <1> 5310 000071BC 803E[C58F]10 <1> cmp byte [load_check_dir_attr], ATTR_DIRECTORY 5311 000071C1 7542 <1> jne .got_direntry 5312 <1> 5313 000071C3 56 <1> push si 5314 000071C4 57 <1> push di 5315 000071C5 C606[C58F]00 <1> mov byte [load_check_dir_attr], 0 5316 000071CA 8B36[D68F] <1> mov si, word [load_kernelname_next] 5317 000071CE 803C00 <1> cmp byte [si], 0 5318 000071D1 744F <1> je .sub 5319 <1> 5320 000071D3 06 <1> push es 5321 000071D4 16 <1> push ss 5322 000071D5 07 <1> pop es 5323 000071D6 E8FBF6 <1> call boot_parse_fn ; get next pathname 5324 000071D9 07 <1> pop es 5325 000071DA 3C2F <1> cmp al, '/' 5326 000071DC 7509 <1> jne @F 5327 000071DE C606[C58F]10 <1> mov byte [load_check_dir_attr], ATTR_DIRECTORY 5328 000071E3 8936[D68F] <1> mov word [load_kernelname_next], si 5329 <1> @@: 5330 000071E7 84C0 <1> test al, al 5331 000071E9 7506 <1> jnz @F 5332 000071EB C706[F28F][7373] <1> mov word [handle_scan_dir_entry], scan_dir_entry_dir_or_file 5333 <1> @@: 5334 <1> 5335 000071F1 5F <1> pop di 5336 000071F2 5E <1> pop si 5337 <1> 5338 000071F3 31D2 <1> xor dx, dx 5339 000071F5 268B471A <1> mov ax, [es:bx + deClusterLow] 5340 <1> ; = first cluster (not FAT32) 5341 000071F9 807EE620 <1> cmp byte [bp + ldFATType], 32 5342 000071FD 7504 <1> jne @F 5343 000071FF 268B5714 <1> mov dx, [es:bx + deClusterHigh] 5344 <1> ; dx:ax = first cluster (FAT32) 5345 <1> @@: 5346 <1> 5347 00007203 EBAA <1> jmp .scan_dir_dirname_loop 5348 <1> 5349 <1> .got_direntry: 5350 00007205 F606[A400]08 <1> testopt [internalflags3], dif3_load_dir_dir 5351 0000720A 7507 <1> jnz @F 5352 0000720C 26F6470B10 <1> test byte [es:bx + deAttrib], ATTR_DIRECTORY 5353 00007211 7511 <1> jnz @FF 5354 <1> @@: 5355 00007213 89DF <1> mov di, bx 5356 00007215 E83400 <1> call list_dir_entry 5357 00007218 83C420 <1> add sp, 32 5358 0000721B C3 <1> retn 5359 <1> 5360 <1> .root: 5361 0000721C 31C0 <1> xor ax, ax 5362 0000721E 31D2 <1> xor dx, dx 5363 00007220 EB15 <1> jmp .scan 5364 <1> 5365 <1> .sub: 5366 00007222 5F <1> pop di 5367 00007223 5E <1> pop si 5368 <1> 5369 <1> @@: 5370 00007224 83C420 <1> add sp, 32 5371 <1> 5372 00007227 31D2 <1> xor dx, dx 5373 00007229 268B471A <1> mov ax, [es:bx + deClusterLow] 5374 <1> ; = first cluster (not FAT32) 5375 0000722D 807EE620 <1> cmp byte [bp + ldFATType], 32 5376 00007231 7504 <1> jne @F 5377 00007233 268B5714 <1> mov dx, [es:bx + deClusterHigh] 5378 <1> ; dx:ax = first cluster (FAT32) 5379 <1> @@: 5380 <1> .scan: 5381 00007237 8946EC <1> mov word [bp + ldDirCluster], ax 5382 0000723A 8956EE <1> mov word [bp + ldDirCluster + 2], dx 5383 <1> 5384 0000723D C706[F28F][4C72] <1> mov word [handle_scan_dir_entry], list_dir_entry 5385 00007243 C706[F48F][E003] <1> mov word [handle_scan_dir_not_found], dmycmd 5386 <1> 5387 00007249 E96501 <1> jmp scan_dir_aux 5388 <1> 5389 <1> 5390 <1> list_dir_entry: 5391 0000724C 26803D00 <1> cmp byte [es:di], 0 5392 00007250 7503E91D01 <1> je .ret ; (NC, ZR) 5393 00007255 26803DE5 <1> cmp byte [es:di], 0E5h 5394 00007259 7504 <1> jne @F 5395 0000725B 80CB01 <1> or bl, 1 ; (NC, NZ) 5396 0000725E C3 <1> retn 5397 <1> 5398 <1> @@: 5399 0000725F 268A5D0B <1> mov bl, byte [es:di + deAttrib] 5400 00007263 F6C308 <1> test bl, ATTR_VOLLABEL 5401 00007266 7403E90401 <1> jnz .ret_NC_NZ ; skip volume labels (and LFNs) --> (NZ) 5402 <1> 5403 0000726B 26803D2E <1> cmp byte [es:di], '.' ; dot or dotdot entry ? 5404 0000726F 7503E9FB00 <1> je .ret_NC_NZ ; yes, skip --> 5405 <1> 5406 00007274 50 <1> push ax 5407 00007275 53 <1> push bx 5408 00007276 51 <1> push cx 5409 00007277 52 <1> push dx 5410 00007278 56 <1> push si 5411 00007279 57 <1> push di 5412 0000727A 06 <1> push es 5413 0000727B 1E <1> push ds 5414 0000727C 06 <1> push es 5415 0000727D 1F <1> pop ds 5416 0000727E 89FE <1> mov si, di 5417 <1> 5418 00007280 16 <1> push ss 5419 00007281 07 <1> pop es 5420 00007282 BF[0E08] <1> mov di, line_out 5421 00007285 B90800 <1> mov cx, 8 5422 00007288 F3A4 <1> rep movsb 5423 0000728A B82020 <1> mov ax, 2020h 5424 0000728D AA <1> stosb 5425 0000728E B103 <1> mov cl, 3 5426 00007290 F3A4 <1> rep movsb 5427 00007292 AB <1> stosw 5428 <1> 5429 00007293 1F <1> pop ds 5430 00007294 B02D <1> mov al, '-' 5431 00007296 F6C320 <1> test bl, ATTR_ARCHIVE 5432 00007299 7402 <1> jz @F 5433 0000729B B041 <1> mov al, 'A' 5434 <1> @@: 5435 0000729D AA <1> stosb 5436 0000729E B02D <1> mov al, '-' 5437 000072A0 F6C302 <1> test bl, ATTR_HIDDEN 5438 000072A3 7402 <1> jz @F 5439 000072A5 B048 <1> mov al, 'H' 5440 <1> @@: 5441 000072A7 AA <1> stosb 5442 000072A8 B02D <1> mov al, '-' 5443 000072AA F6C301 <1> test bl, ATTR_READONLY 5444 000072AD 7402 <1> jz @F 5445 000072AF B052 <1> mov al, 'R' 5446 <1> @@: 5447 000072B1 AA <1> stosb 5448 000072B2 B02D <1> mov al, '-' 5449 000072B4 F6C304 <1> test bl, ATTR_SYSTEM 5450 000072B7 7402 <1> jz @F 5451 000072B9 B053 <1> mov al, 'S' 5452 <1> @@: 5453 000072BB AA <1> stosb 5454 000072BC B82020 <1> mov ax, 2020h 5455 000072BF AB <1> stosw 5456 <1> 5457 000072C0 F6C310 <1> test bl, ATTR_DIRECTORY 5458 000072C3 7408 <1> jz @F 5459 000072C5 BE[9163] <1> mov si, msg.dirinsteadsize 5460 000072C8 E839C1 <1> call copy_single_counted_string 5461 000072CB EB2D <1> jmp @FF 5462 <1> 5463 <1> @@: 5464 000072CD 07 <1> pop es 5465 000072CE 5E <1> pop si 5466 000072CF 56 <1> push si 5467 000072D0 06 <1> push es 5468 000072D1 268A440C <1> mov al, byte [es:si + dePlusSize] 5469 000072D5 88C4 <1> mov ah, al 5470 000072D7 2507E0 <1> and ax, 0E007h 5471 000072DA 88E2 <1> mov dl, ah 5472 000072DC B400 <1> mov ah, 0 5473 000072DE B600 <1> mov dh, 0 5474 000072E0 D1EA <1> shr dx, 1 5475 000072E2 D1EA <1> shr dx, 1 5476 000072E4 09D0 <1> or ax, dx 5477 000072E6 50 <1> push ax 5478 000072E7 268B541E <1> mov dx, word [es:si + deSize + 2] 5479 000072EB 268B441C <1> mov ax, word [es:si + deSize] 5480 000072EF 5E <1> pop si 5481 000072F0 16 <1> push ss 5482 000072F1 07 <1> pop es 5483 000072F2 31C9 <1> xor cx, cx 5484 000072F4 BB0800 <1> mov bx, 4+4 5485 000072F7 E82FAC <1> call disp_dxax_times_cx_width_bx_size.store 5486 <1> 5487 <1> @@: 5488 000072FA B82020 <1> mov ax, 2020h 5489 000072FD AB <1> stosw 5490 000072FE 07 <1> pop es 5491 000072FF 5E <1> pop si 5492 00007300 56 <1> push si 5493 00007301 06 <1> push es 5494 00007302 268B5C18 <1> mov bx, word [es:si + deDate] 5495 00007306 268B7416 <1> mov si, word [es:si + deTime] 5496 0000730A 16 <1> push ss 5497 0000730B 07 <1> pop es 5498 0000730C 89D8 <1> mov ax, bx 5499 0000730E B90900 <1> mov cx, 9 5500 00007311 D3E8 <1> shr ax, cl 5501 00007313 05BC07 <1> add ax, 1980 5502 00007316 31D2 <1> xor dx, dx 5503 00007318 B104 <1> mov cl, 4 5504 0000731A E86946 <1> call dec_dword_minwidth 5505 0000731D B02D <1> mov al, '-' 5506 0000731F AA <1> stosb 5507 00007320 89D8 <1> mov ax, bx 5508 00007322 B105 <1> mov cl, 5 5509 00007324 D3E8 <1> shr ax, cl 5510 00007326 83E00F <1> and ax, 15 5511 00007329 B102 <1> mov cl, 2 5512 0000732B E85846 <1> call dec_dword_minwidth 5513 0000732E B02D <1> mov al, '-' 5514 00007330 AA <1> stosb 5515 00007331 89D8 <1> mov ax, bx 5516 00007333 83E01F <1> and ax, 31 5517 00007336 E84D46 <1> call dec_dword_minwidth 5518 00007339 B020 <1> mov al, 32 5519 0000733B AA <1> stosb 5520 0000733C 89F0 <1> mov ax, si 5521 0000733E B10B <1> mov cl, 11 5522 00007340 D3E8 <1> shr ax, cl 5523 00007342 B102 <1> mov cl, 2 5524 00007344 E83F46 <1> call dec_dword_minwidth 5525 00007347 B03A <1> mov al, ':' 5526 00007349 AA <1> stosb 5527 0000734A 89F0 <1> mov ax, si 5528 0000734C B105 <1> mov cl, 5 5529 0000734E D3E8 <1> shr ax, cl 5530 00007350 83E03F <1> and ax, 63 5531 00007353 B102 <1> mov cl, 2 5532 00007355 E82E46 <1> call dec_dword_minwidth 5533 00007358 B03A <1> mov al, ':' 5534 0000735A AA <1> stosb 5535 0000735B 89F0 <1> mov ax, si 5536 0000735D 83E01F <1> and ax, 31 5537 00007360 D1E0 <1> shl ax, 1 5538 00007362 E82146 <1> call dec_dword_minwidth 5539 <1> 5540 00007365 E8BE46 <1> call putsline_crlf 5541 <1> 5542 00007368 07 <1> pop es 5543 00007369 5F <1> pop di 5544 0000736A 5E <1> pop si 5545 0000736B 5A <1> pop dx 5546 0000736C 59 <1> pop cx 5547 0000736D 5B <1> pop bx 5548 0000736E 58 <1> pop ax 5549 <1> 5550 <1> .ret_NC_NZ: 5551 0000736F 80CB01 <1> or bl, 1 ; (NC, NZ) 5552 <1> .ret: 5553 00007372 C3 <1> retn 5554 <1> 5555 <1> 5556 <1> usesection lDEBUG_DATA_ENTRY 5557 <1> 5558 <1> align 2, db 0 5559 <1> handle_scan_dir_entry: 5560 00008FF2 [DCA4] <1> dw error 5561 <1> handle_scan_dir_not_found: 5562 00008FF4 [DCA4] <1> dw error 5563 <1> 5564 <1> 5565 <1> usesection lDEBUG_CODE 5566 <1> 5567 <1> scan_dir_entry_dir_or_file: 5568 00007373 B701 <1> mov bh, 1 5569 00007375 A9 <1> db __TEST_IMM16 ; (skip mov) 5570 <1> 5571 <1> scan_dir_entry: 5572 00007376 B700 <1> mov bh, 0 5573 00007378 26803D00 <1> cmp byte [es:di], 0 5574 0000737C F9 <1> stc 5575 0000737D 7425 <1> je .ret 5576 0000737F 268A5D0B <1> mov bl, byte [es:di + deAttrib] 5577 00007383 F6C308 <1> test bl, ATTR_VOLLABEL 5578 00007386 751B <1> jnz @F ; skip volume labels (and LFNs) --> (NZ) 5579 00007388 84FF <1> test bh, bh 5580 0000738A 7509 <1> jnz .no_check_dir 5581 0000738C 80E310 <1> and bl, ATTR_DIRECTORY ; isolate directory bit 5582 0000738F 3A1E[C58F] <1> cmp bl, byte [load_check_dir_attr] ; is it what we're searching? 5583 00007393 750E <1> jne @F ; no --> 5584 <1> .no_check_dir: 5585 00007395 56 <1> push si 5586 00007396 57 <1> push di 5587 00007397 51 <1> push cx 5588 00007398 BE[C88F] <1> mov si, load_kernel_name ; ds:si-> name to match 5589 0000739B B90B00 <1> mov cx, 11 ; length of padded 8.3 FAT filename 5590 0000739E F3A6 <1> repe cmpsb ; check entry 5591 000073A0 59 <1> pop cx 5592 000073A1 5F <1> pop di 5593 000073A2 5E <1> pop si 5594 <1> @@: 5595 000073A3 F8 <1> clc 5596 <1> .ret: 5597 000073A4 C3 <1> retn 5598 <1> 5599 <1> 5600 <1> ; INP: es:bx -> where to place directory entry 5601 <1> ; si:di = loaded FAT sector (0 = first FAT sector) 5602 <1> ; dword [bp + ldDirCluster] = directory cluster to scan, 5603 <1> ; 0 for root dir 5604 <1> ; byte [bp + ldFATType] = size of FAT entry in bits 5605 <1> ; OUT: es:bx -> directory entry (es:bx unchanged) 5606 <1> ; si:di = loaded FAT sector 5607 <1> ; CHG: dx, ax, si, di, cx 5608 <1> scan_dir_aux_for_file: 5609 000073A5 C706[F28F][7673] <1> mov word [handle_scan_dir_entry], scan_dir_entry 5610 <1> 5611 <1> scan_dir_aux_with_error: 5612 000073AB C706[F48F][0774] <1> mov word [handle_scan_dir_not_found], error_filenotfound 5613 <1> 5614 <1> scan_dir_aux: 5615 000073B1 FF36[F209] <1> push word [auxbuff_segorsel] 5616 000073B5 8F06[E08F] <1> pop word [load_adr_dirbuf_segment] 5617 <1> 5618 <1> scan_dir: 5619 000073B9 8B46EC <1> mov ax, word [bp + ldDirCluster] 5620 000073BC 8B56EE <1> mov dx, word [bp + ldDirCluster + 2] 5621 <1> 5622 000073BF 85C0 <1> test ax, ax 5623 000073C1 7576 <1> jnz fat32_scan_root.dir_clust_dxax 5624 000073C3 85D2 <1> test dx, dx 5625 000073C5 7572 <1> jnz fat32_scan_root.dir_clust_dxax 5626 <1> 5627 <1> ; got to scan root directory. use FAT12/FAT16 walker if so, 5628 <1> ; else use FAT32 walker 5629 <1> 5630 000073C7 807EE610 <1> cmp byte [bp + ldFATType], 16 5631 000073CB 7766 <1> ja fat32_scan_root 5632 <1> 5633 000073CD 56 <1> push si 5634 000073CE 57 <1> push di 5635 000073CF 06 <1> push es 5636 000073D0 53 <1> push bx 5637 <1> 5638 000073D1 8B7611 <1> mov si, word [bp + bsBPB + bpbNumRootDirEnts] 5639 <1> 5640 <1> 5641 <1> ; (boot.asm code starts here) 5642 <1> 5643 <1> fat16_scan_root: 5644 000073D4 85F6 <1> test si, si 5645 000073D6 7424 <1> jz handle_filenotfound_fat16 5646 <1> 5647 000073D8 8B46D0 <1> mov ax, [bp + ldRootSector] 5648 000073DB 8B56D2 <1> mov dx, [bp + ldRootSector + 2] 5649 <1> 5650 <1> ; Scan root directory for file. We don't bother to check for deleted 5651 <1> ; entries (E5h) or entries that mark the end of the directory (00h). 5652 <1> ; number of root entries in si here 5653 <1> fat16_next_sect: 5654 000073DE 8B1E[E08F] <1> mov bx, [load_adr_dirbuf_segment] 5655 000073E2 E83005 <1> call read_sector 5656 <1> 5657 000073E5 8B4ED4 <1> mov cx, [bp + ldEntriesPerSector] ; entries per sector as loop counter 5658 000073E8 31FF <1> xor di, di ; es:di-> first entry in this sector 5659 <1> fat16_next_ent: 5660 000073EA FF16[F28F] <1> call near word [handle_scan_dir_entry] 5661 000073EE 720C <1> jc handle_filenotfound_fat16 5662 000073F0 8D7D20 <1> lea di, [di + DIRENTRY_size] ; bytes/dirent 5663 000073F3 7428 <1> je fat16_found_it ; found entry --> 5664 <1> 5665 000073F5 4E <1> dec si ; count down entire root's entries 5666 000073F6 E0F2 <1> loopnz fat16_next_ent ; count down sector's entries (jumps iff si >0 && cx >0) 5667 000073F8 85F6 <1> test si, si ; work around qemu bug 5668 000073FA 75E2 <1> jnz fat16_next_sect ; (jumps iff si >0 && cx ==0) 5669 <1> ; ends up here iff si ==0 5670 <1> ; ie all root entries checked unsuccessfully 5671 <1> %if 0 5672 <1> 5673 <1> qemu prior to 2020-08 has a bug which affects the above 5674 <1> conditionals. The bug is that if NZ is set (like when the 5675 <1> branch to fat16_found_it is not taken) and then another 5676 <1> instruction sets ZR (like the dec si at the end of the root 5677 <1> directory) and then loopnz is used which sets cx to zero 5678 <1> then after the loopnz FL will be NZ leading to the jnz branch 5679 <1> to be taken. Eventually the entire load unit is traversed and 5680 <1> qemu returns error 01h when trying to read past the end of 5681 <1> the unit (at least for 1440 KiB diskettes). 5682 <1> 5683 <1> The bug is now worked around by the comparison with zero at 5684 <1> the fat16_next_ent label. The test si, si serves as another 5685 <1> workaround to forcibly set the flag correctly after loopnz. 5686 <1> It is only really needed when the entire root is filled with 5687 <1> non-zero directory entries and an older qemu is used. 5688 <1> 5689 <1> Reference: https://bugs.launchpad.net/qemu/+bug/1888165 5690 <1> 5691 <1> %endif 5692 <1> 5693 <1> handle_filenotfound_fat16: 5694 000073FC 5B <1> pop bx 5695 000073FD 07 <1> pop es 5696 000073FE 5F <1> pop di 5697 000073FF 5E <1> pop si 5698 <1> 5699 00007400 A9 <1> db __TEST_IMM16 ; (skip pop and pop) 5700 <1> handle_filenotfound_fat32: 5701 00007401 5B <1> pop bx 5702 00007402 07 <1> pop es 5703 <1> 5704 <1> handle_filenotfound: 5705 00007403 FF26[F48F] <1> jmp near word [handle_scan_dir_not_found] 5706 <1> 5707 <1> error_filenotfound: 5708 <1> %if _INPUT_FILE_BOOT 5709 00007407 F606[A700]08 <1> testopt [internalflags3], dif3_in_if 5710 0000740C 7403E96E1C <1> jnz if_exists_not_found 5711 <1> %endif 5712 00007411 BA[4162] <1> mov dx, msg.boot_file_not_found 5713 00007414 B81E02 <1> mov ax, 021Eh 5714 00007417 E80931 <1> call setrc 5715 0000741A E9E0EF <1> jmp bootcmd.fail 5716 <1> 5717 <1> fat16_found_it: 5718 0000741D 5B <1> pop bx 5719 0000741E 58 <1> pop ax 5720 0000741F B92000 <1> mov cx, 32 5721 00007422 29CF <1> sub di, cx 5722 00007424 1E <1> push ds 5723 00007425 06 <1> push es 5724 00007426 1F <1> pop ds 5725 00007427 89FE <1> mov si, di ; ds:si -> entry in directory buffer 5726 00007429 89DF <1> mov di, bx 5727 0000742B 8EC0 <1> mov es, ax ; es:di -> destination for entry 5728 0000742D F3A4 <1> rep movsb 5729 0000742F 1F <1> pop ds 5730 00007430 5F <1> pop di 5731 00007431 5E <1> pop si 5732 00007432 C3 <1> retn 5733 <1> 5734 <1> 5735 <1> ; (boot32.asm code starts here) 5736 <1> 5737 <1> fat32_scan_root: 5738 00007433 8B462C <1> mov ax, [bp + bsBPB + ebpbRootCluster] 5739 00007436 8B562E <1> mov dx, [bp + bsBPB + ebpbRootCluster + 2] 5740 <1> 5741 <1> .dir_clust_dxax: 5742 00007439 06 <1> push es 5743 0000743A 53 <1> push bx 5744 <1> 5745 0000743B E83501 <1> call check_clust 5746 0000743E 72C1 <1> jc handle_filenotfound_fat32 5747 <1> 5748 <1> fat32_next_root_clust: 5749 00007440 E84F00 <1> call clust_to_first_sector 5750 00007443 51 <1> push cx 5751 00007444 53 <1> push bx 5752 00007445 8B4EE8 <1> mov cx, [bp + ldClusterSize] 5753 <1> fat32_next_root_sect: 5754 00007448 51 <1> push cx 5755 00007449 8B4ED4 <1> mov cx, [bp + ldEntriesPerSector] 5756 <1> 5757 <1> ; Scan root directory for file. We don't bother to check for deleted 5758 <1> ; entries (E5h) or entries that mark the end of the directory (00h). 5759 0000744C 8B1E[E08F] <1> mov bx, [load_adr_dirbuf_segment] 5760 00007450 E8C204 <1> call read_sector 5761 <1> 5762 00007453 57 <1> push di 5763 00007454 31FF <1> xor di, di ; es:di-> first entry in this sector 5764 <1> fat32_next_ent: 5765 00007456 FF16[F28F] <1> call near word [handle_scan_dir_entry] 5766 0000745A 7214 <1> jc handle_filenotfound_fat32_pop 5767 0000745C 8D7D20 <1> lea di, [di + DIRENTRY_size] ; bytes/dirent 5768 0000745F 7415 <1> je fat32_found_it ; found entry --> 5769 <1> 5770 00007461 E2F3 <1> loop fat32_next_ent ; count down sector's entries (jumps iff cx >0) 5771 00007463 5F <1> pop di 5772 00007464 59 <1> pop cx 5773 00007465 E2E1 <1> loop fat32_next_root_sect 5774 00007467 5B <1> pop bx 5775 00007468 59 <1> pop cx 5776 00007469 E84F00 <1> call clust_next 5777 0000746C 73D2 <1> jnc fat32_next_root_clust 5778 0000746E EB04 <1> jmp @F 5779 <1> 5780 <1> handle_filenotfound_fat32_pop: 5781 00007470 5F <1> pop di 5782 00007471 59 <1> pop cx 5783 00007472 5B <1> pop bx 5784 00007473 59 <1> pop cx 5785 <1> @@: 5786 00007474 EB8B <1> jmp handle_filenotfound_fat32 5787 <1> 5788 <1> 5789 <1> fat32_found_it: 5790 00007476 5A <1> pop dx ; value for di 5791 00007477 83C406 <1> add sp, 6 ; discard sector-in-cluster counter and cluster 5792 0000747A 5B <1> pop bx 5793 0000747B 58 <1> pop ax 5794 0000747C B92000 <1> mov cx, 32 5795 0000747F 29CF <1> sub di, cx 5796 00007481 1E <1> push ds 5797 00007482 06 <1> push es 5798 00007483 1F <1> pop ds 5799 00007484 56 <1> push si 5800 00007485 89FE <1> mov si, di ; ds:si -> entry in directory buffer 5801 00007487 89DF <1> mov di, bx 5802 00007489 8EC0 <1> mov es, ax ; es:di -> destination for entry 5803 0000748B F3A4 <1> rep movsb 5804 0000748D 5E <1> pop si 5805 0000748E 1F <1> pop ds 5806 0000748F 89D7 <1> mov di, dx ; restore si:di = loaded FAT sector 5807 00007491 C3 <1> retn 5808 <1> 5809 <1> 5810 <1> ; (iniload.asm code continues here) 5811 <1> 5812 <1> ; INP: dx:ax = cluster - 2 (0-based cluster) 5813 <1> ; OUT: cx:bx = input dx:ax 5814 <1> ; dx:ax = first sector of that cluster 5815 <1> ; CHG: - 5816 <1> clust_to_first_sector: 5817 00007492 52 <1> push dx 5818 00007493 50 <1> push ax 5819 00007494 52 <1> push dx 5820 00007495 F726[788C] <1> mul word [load_data - LOADDATA2 + ldClusterSize] 5821 00007499 93 <1> xchg bx, ax 5822 0000749A 87CA <1> xchg cx, dx 5823 0000749C 58 <1> pop ax 5824 0000749D F726[788C] <1> mul word [load_data - LOADDATA2 + ldClusterSize] 5825 000074A1 85D2 <1> test dx, dx 5826 000074A3 7513 <1> jnz .error_badchain 5827 000074A5 92 <1> xchg dx, ax 5828 000074A6 01CA <1> add dx, cx 5829 000074A8 720E <1> jc .error_badchain 5830 000074AA 93 <1> xchg ax, bx 5831 <1> 5832 000074AB 0306[8C8C] <1> add ax, [load_data - LOADDATA2 + lsvDataStart] 5833 000074AF 1316[8E8C] <1> adc dx, [load_data - LOADDATA2 + lsvDataStart + 2] 5834 000074B3 7203 <1> jc .error_badchain 5835 <1> ; dx:ax = first sector in cluster 5836 000074B5 5B <1> pop bx 5837 000074B6 59 <1> pop cx ; cx:bx = cluster 5838 000074B7 C3 <1> retn 5839 <1> 5840 <1> .error_badchain: 5841 000074B8 E9E10D <1> jmp error_badchain 5842 <1> 5843 <1> 5844 <1> ; INP: cx:bx = cluster (0-based) 5845 <1> ; si:di = loaded FAT sector, -1 if none 5846 <1> ; OUT: CY if no next cluster 5847 <1> ; NC if next cluster found, 5848 <1> ; dx:ax = next cluster value (0-based) 5849 <1> ; si:di = loaded FAT sector 5850 <1> ; CHG: cx, bx 5851 <1> clust_next: 5852 000074BB 89D8 <1> mov ax, bx 5853 000074BD 89CA <1> mov dx, cx 5854 <1> .dxax: 5855 000074BF 83C002 <1> add ax, 2 5856 000074C2 83D200 <1> adc dx, 0 5857 <1> 5858 000074C5 06 <1> push es 5859 000074C6 803E[768C]10 <1> cmp byte [load_data - LOADDATA2 + ldFATType], 16 5860 000074CB 7452 <1> je .fat16 5861 000074CD 774C <1> ja .fat32 5862 <1> 5863 <1> .fat12: 5864 <1> ; FAT12 entries are 12 bits, bytes are 8 bits. Ratio is 3 / 2, 5865 <1> ; so multiply cluster number by 3 first, then divide by 2. 5866 <1> ; ax = cluster number (up to 12 bits set) 5867 000074CF 89C2 <1> mov dx, ax 5868 000074D1 D1E0 <1> shl ax, 1 ; = 2n (up to 13 bits set) 5869 000074D3 01D0 <1> add ax, dx ; = 2n+n = 3n (up to 14 bits set) 5870 000074D5 D1E8 <1> shr ax, 1 ; ax = byte offset into FAT (0..6129) 5871 <1> ; CF = whether to use high 12 bits 5872 000074D7 19C9 <1> sbb cx, cx ; = -1 iff CY, else 0 5873 <1> 5874 <1> ; Use the calculated byte offset as an offset into the FAT 5875 <1> ; buffer, which holds all of the FAT's relevant data. 5876 000074D9 8E06[888C] <1> mov es, [load_data - LOADDATA2 + lsvFATSeg] 5877 000074DD 89C3 <1> mov bx, ax ; -> 16-bit word in FAT to load 5878 <1> 5879 000074DF F606[778C]02 <1> test byte [load_ldflags], ldfFATInvalid 5880 000074E4 7426 <1> jz .fat12_have_fat ; already have it --> 5881 000074E6 51 <1> push cx 5882 000074E7 31D2 <1> xor dx, dx 5883 000074E9 F736[9B8C] <1> div word [load_data - LOADDATA2 + bsBPB + bpbBytesPerSector] 5884 <1> ; dx = remainder, byte offset 5885 <1> ; ax = sector to read 5886 000074ED 52 <1> push dx 5887 000074EE 31D2 <1> xor dx, dx 5888 000074F0 0306[9E8C] <1> add ax, [load_data - LOADDATA2 + bsBPB + bpbReservedSectors] 5889 000074F4 11D2 <1> adc dx, dx 5890 000074F6 8B1E[888C] <1> mov bx, [load_data - LOADDATA2 + lsvFATSeg] 5891 000074FA E81804 <1> call read_sector 5892 000074FD 59 <1> pop cx 5893 000074FE 3B0E[9B8C] <1> cmp cx, word [load_data - LOADDATA2 + bsBPB + bpbBytesPerSector] 5894 00007502 7505 <1> jne .fat12_have_fat_cx 5895 00007504 06 <1> push es 5896 00007505 E80D04 <1> call read_sector ; read second sector for straddling entry 5897 00007508 07 <1> pop es 5898 <1> 5899 <1> .fat12_have_fat_cx: 5900 00007509 89CB <1> mov bx, cx 5901 0000750B 59 <1> pop cx 5902 <1> 5903 <1> .fat12_have_fat: 5904 <1> 5905 <1> ; get 16 bits from FAT 5906 0000750C 268B07 <1> mov ax, [es:bx] 5907 <1> 5908 0000750F 80E104 <1> and cl, 4 ; = 4 iff CY after shift, else 0 5909 00007512 D3E8 <1> shr ax, cl ; shift down iff odd entry, else unchanged 5910 00007514 25FF0F <1> and ax, 0FFFh ; insure it's only 12 bits 5911 00007517 31D2 <1> xor dx, dx 5912 00007519 EB57 <1> jmp short .gotvalue 5913 <1> 5914 <1> .fat32: 5915 <1> ; * 4 = byte offset into FAT (0--4000_0000h) 5916 0000751B 01C0 <1> add ax, ax 5917 0000751D 11D2 <1> adc dx, dx 5918 <1> .fat16: 5919 <1> ; * 2 = byte offset into FAT (0--2_0000h) 5920 0000751F 01C0 <1> add ax, ax 5921 00007521 11D2 <1> adc dx, dx 5922 <1> 5923 00007523 50 <1> push ax 5924 00007524 92 <1> xchg ax, dx 5925 00007525 31D2 <1> xor dx, dx ; dx:ax = high word 5926 00007527 F736[9B8C] <1> div word [load_data - LOADDATA2 + bsBPB + bpbBytesPerSector] 5927 0000752B 89C3 <1> mov bx, ax 5928 0000752D 58 <1> pop ax ; dx = remainder, ax = low word 5929 0000752E F736[9B8C] <1> div word [load_data - LOADDATA2 + bsBPB + bpbBytesPerSector] 5930 00007532 87D3 <1> xchg dx, bx ; dx:ax = result, bx = remainder 5931 <1> ; dx:ax = sector offset into FAT (0--200_0000h) 5932 <1> ; bx = byte offset into FAT sector (0--8190) 5933 00007534 F606[778C]02 <1> test byte [load_ldflags], ldfFATInvalid 5934 00007539 7513 <1> jnz .read_no_store ; always read --> 5935 <1> 5936 0000753B 39F2 <1> cmp dx, si 5937 0000753D 7504 <1> jne @F ; read sector 5938 0000753F 39F8 <1> cmp ax, di 5939 00007541 741B <1> je @FF ; sector is already buffered 5940 <1> @@: 5941 00007543 89D6 <1> mov si, dx 5942 00007545 89C7 <1> mov di, ax 5943 00007547 8916[868C] <1> mov word [load_data - LOADDATA2 + lsvFATSector + 2], dx 5944 0000754B A3[848C] <1> mov word [load_data - LOADDATA2 + lsvFATSector + 0], ax 5945 <1> 5946 <1> .read_no_store: 5947 0000754E 53 <1> push bx 5948 0000754F 0306[9E8C] <1> add ax, [load_data - LOADDATA2 + bsBPB + bpbReservedSectors] 5949 00007553 83D200 <1> adc dx, 0 5950 00007556 8B1E[888C] <1> mov bx, [load_data - LOADDATA2 + lsvFATSeg] 5951 0000755A E8B803 <1> call read_sector 5952 0000755D 5B <1> pop bx 5953 <1> @@: 5954 0000755E 8E06[888C] <1> mov es, [load_data - LOADDATA2 + lsvFATSeg] 5955 00007562 31D2 <1> xor dx, dx 5956 00007564 268B07 <1> mov ax, [es:bx] 5957 <1> 5958 00007567 803E[768C]10 <1> cmp byte [load_data - LOADDATA2 + ldFATType], 16 5959 0000756C 7404 <1> je @F 5960 0000756E 268B5702 <1> mov dx, [es:bx + 2] 5961 <1> @@: 5962 <1> .gotvalue: 5963 00007572 07 <1> pop es 5964 <1> 5965 <1> ; INP: dx:ax = cluster value, 2-based 5966 <1> ; OUT: dx:ax -= 2 (makes it 0-based) 5967 <1> ; CY iff invalid cluster 5968 <1> check_clust: 5969 00007573 80E60F <1> and dh, 0Fh 5970 00007576 83E802 <1> sub ax, 2 5971 00007579 83DA00 <1> sbb dx, 0 5972 <1> 5973 0000757C 803E[768C]10 <1> cmp byte [load_data - LOADDATA2 + ldFATType], 16 5974 00007581 7707 <1> ja .fat32 5975 00007583 740B <1> je .fat16 5976 <1> 5977 <1> .fat12: 5978 00007585 3DF50F <1> cmp ax, 0FF7h - 2 5979 00007588 EB09 <1> jmp short .common 5980 <1> 5981 <1> .fat32: 5982 0000758A 81FAFF0F <1> cmp dx, 0FFFh 5983 0000758E 7203 <1> jb @F ; CY here means valid ...- 5984 <1> 5985 <1> .fat16: 5986 00007590 83F8F5 <1> cmp ax, 0FFF7h - 2 5987 <1> @@: ; -... or if NC first, CY here also 5988 <1> .common: 5989 00007593 F5 <1> cmc ; NC if valid 5990 00007594 720E <1> jc .ret 5991 00007596 3B16[528C] <1> cmp dx, word [load_data - LOADDATA2 + ldMaxCluster + 2] 5992 0000759A 7504 <1> jne @F 5993 0000759C 3B06[508C] <1> cmp ax, word [load_data - LOADDATA2 + ldMaxCluster] 5994 <1> @@: 5995 000075A0 7701 <1> ja .ret_CY 5996 000075A2 A8 <1> db __TEST_IMM8 ; (skip stc, NC) 5997 <1> .ret_CY: 5998 000075A3 F9 <1> stc 5999 <1> .ret: 6000 000075A4 C3 <1> retn 6001 <1> 6002 <1> 6003 <1> partition_table equ load_partition_table 6004 <1> partition_table.end equ load_partition_table.end 6005 <1> %define _SCANPTAB_PREFIX 6006 <1> %define _SCANPTAB_DEBUG4_PREFIX 6007 <1> %assign _PARTITION_TABLE_IN_CS 0 6008 <1> %define _BASE bp 6009 <1> %include "scanptab.asm" 6010 <2> 6011 <2> %if 0 6012 <2> 6013 <2> scanptab - Scan partition table 6014 <2> 2019 by C. Masloch 6015 <2> 6016 <2> Usage of the works is permitted provided that this 6017 <2> instrument is retained with the works, so that any entity 6018 <2> that uses the works is notified of this instrument. 6019 <2> 6020 <2> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 6021 <2> 6022 <2> %endif 6023 <2> 6024 <2> ; _SCANPTAB_PREFIX = prefix for our variables and functions 6025 <2> ; _SCANPTAB_DEBUG4_PREFIX = prefix for d4 function calls 6026 <2> numdef PARTITION_TABLE_IN_CS, 1 6027 <2> numdef BOOTCMD_FAIL_ERROR, 1 6028 <2> gendef BASE, ss:bx 6029 <2> %ifidn _BASE, ss:bx 6030 <2> %elifidn _BASE, bp 6031 <2> %else 6032 <2> %error Invalid base 6033 <2> %endif 6034 <2> 6035 <2> 6036 <2> ; INP: byte [%load_unit] = unit to scan 6037 <2> ; cx = function to call for each partition 6038 <2> ; OUT: function called for each partition 6039 <2> ; CHG: di, si, ax, bx, (cx), dx, es 6040 <2> ; STT: ds => data segment (used for %load_* variables, unless bp-based) 6041 <2> ; 6042 <2> ; Note: Calls %read_partition_table (in this module), 6043 <2> ; which calls %read_ae_512_bytes, which calls 6044 <2> ; read_sector. The read_sector base must be 6045 <2> ; zero and the geometry must be initialised. 6046 <2> 6047 <2> ; Function in cx is called with: 6048 <2> ; INP: es:si -> partition table entry, 6049 <2> ; si = %partition_table .. %partition_table+48, 6050 <2> ; es = ss (if not _PARTITION_TABLE_IN_CS) 6051 <2> ; es = cs (if _PARTITION_TABLE_IN_CS) 6052 <2> ; byte [%load_current_partition] = partition number, 6053 <2> ; 0 for diskette (unpartitioned), 6054 <2> ; 1 to 4 for primary partitions, 6055 <2> ; 5+ for logical partitions 6056 <2> ; _BASE + di -> above part table metadata, 6057 <2> ; dword [_BASE + di - 4] = root (outermost extended position) 6058 <2> ; dword [_BASE + di - 8] = base (current table position) 6059 <2> ; dword [es:si + piStart] = local partition start 6060 <2> ; base + local start = absolute partition start 6061 <2> ; _BASE -> bp value (dummy if _BASE is not bp), 6062 <2> ; near return address of scan_partitions 6063 <2> ; CHG: ax, (cx), dx, bx (unless part of _BASE) 6064 <2> ; STT: ds => data segment (used for load_* variables, unless bp-based) 6065 <2> ; Note: preserves (cx), si, di, ds, es, (bp), _BASE 6066 <2> ; 6067 <2> ; Note: If the function returns to scan_partitions, 6068 <2> ; cx must be left as the function to call for 6069 <2> ; subsequent partitions afterwards. 6070 <2> ; Note: May load sp from _BASE then pop bp then return 6071 <2> ; near if the scan should stop after the call. 6072 <2> %[_SCANPTAB_PREFIX]scan_partitions: 6073 000075A5 8326[BC8F]00 <2> and word [ %[_SCANPTAB_PREFIX]load_partition_cycle], 0 6074 <2> d4 call %[_SCANPTAB_DEBUG4_PREFIX]d4message 6075 <2> d4 asciz "In scan_partitions",13,10 6076 <2> 6077 000075AA 55 <2> push bp 6078 <2> %ifidn _BASE, ss:bx 6079 <2> mov bx, sp 6080 <2> %elifidn _BASE, bp 6081 000075AB 89E5 <2> mov bp, sp 6082 <2> %endif 6083 000075AD 31FF <2> xor di, di 6084 000075AF 57 <2> push di ; [_BASE+di-2] 6085 000075B0 57 <2> push di ; [_BASE+di-4] 6086 000075B1 57 <2> push di ; [_BASE+di-6] 6087 000075B2 57 <2> push di ; [_BASE+di-8] 6088 <2> 6089 000075B3 803E[D08C]80 <2> cmp byte [ %[_SCANPTAB_PREFIX]load_unit], 80h 6090 000075B8 7325 <2> jae @F 6091 <2> 6092 000075BA 57 <2> push di 6093 000075BB 51 <2> push cx 6094 <2> %if _PARTITION_TABLE_IN_CS 6095 <2> push cs 6096 <2> %else 6097 000075BC 16 <2> push ss 6098 <2> %endif 6099 000075BD 07 <2> pop es 6100 000075BE BF[908B] <2> mov di, %[_SCANPTAB_PREFIX]partition_table 6101 000075C1 31C0 <2> xor ax, ax 6102 000075C3 B92000 <2> mov cx, (4 * 16) >> 1 6103 000075C6 F3AB <2> rep stosw ; initialise fake partition table 6104 000075C8 59 <2> pop cx 6105 000075C9 5F <2> pop di 6106 000075CA BE[908B] <2> mov si, %[_SCANPTAB_PREFIX]partition_table 6107 <2> ; -> fake PARTINFO 6108 000075CD 26C60480 <2> mov byte [es:si + piBoot], 80h ; fake primary active 6109 000075D1 26C64404FF <2> mov byte [es:si + piType], 0FFh ; fake a type 6110 000075D6 C606[C38F]00 <2> mov byte [ %[_SCANPTAB_PREFIX]load_current_partition], 0 ; special: 0 = diskette 6111 <2> ; piLength is 0, too 6112 000075DB FFD1 <2> call cx 6113 <2> 6114 000075DD EB66 <2> jmp %[_SCANPTAB_PREFIX]scan_logical.end 6115 <2> 6116 <2> 6117 <2> @@: 6118 000075DF 31C0 <2> xor ax, ax 6119 000075E1 31D2 <2> xor dx, dx 6120 <2> d4 call %[_SCANPTAB_DEBUG4_PREFIX]d4message 6121 <2> d4 asciz "In scan_partitions (before first call to read_partition_table)",13,10 6122 000075E3 E8DA00 <2> call %[_SCANPTAB_PREFIX]read_partition_table 6123 <2> d4 call %[_SCANPTAB_DEBUG4_PREFIX]d4message 6124 <2> d4 asciz "In scan_partitions (after first call to read_partition_table)",13,10 6125 000075E6 BE[908B] <2> mov si, %[_SCANPTAB_PREFIX]partition_table 6126 000075E9 8816[C38F] <2> mov byte [ %[_SCANPTAB_PREFIX]load_current_partition], dl ; = 0 6127 <2> .loop_primary_parts: 6128 000075ED FE06[C38F] <2> inc byte [ %[_SCANPTAB_PREFIX]load_current_partition] 6129 000075F1 26807C0400 <2> cmp byte [es:si + piType], 0 6130 000075F6 7402 <2> je .loop_primary_skip 6131 000075F8 FFD1 <2> call cx ; es:si -> partition table entry 6132 <2> ; byte [load_current_partition] = which 6133 <2> .loop_primary_skip: 6134 000075FA 83C610 <2> add si, 16 6135 000075FD 81FE[D08B] <2> cmp si, %[_SCANPTAB_PREFIX]partition_table.end 6136 00007601 72EA <2> jb .loop_primary_parts 6137 <2> 6138 <2> %[_SCANPTAB_PREFIX]scan_logical: 6139 <2> .: 6140 <2> d4 call %[_SCANPTAB_DEBUG4_PREFIX]d4message 6141 <2> d4 asciz "In scan_logical.",13,10 6142 00007603 BE[908B] <2> mov si, %[_SCANPTAB_PREFIX]partition_table 6143 <2> .loop: 6144 00007606 FF06[BC8F] <2> inc word [ %[_SCANPTAB_PREFIX]load_partition_cycle] 6145 0000760A 7503E9A500 <2> jz .got_partition_cycle 6146 <2> 6147 0000760F 268A4404 <2> mov al, [es:si + piType] 6148 <2> 6149 <2> %ifidn _BASE, bp 6150 00007613 31DB <2> xor bx, bx 6151 <2> %endif 6152 00007615 84C0 <2> test al, al 6153 00007617 741F <2> jz .next 6154 00007619 3C0F <2> cmp al, 0Fh ; extended partition (LBA aware) ? 6155 0000761B 742C <2> je .push ; yes --> 6156 0000761D 247F <2> and al, ~80h ; extended partition Linux (85h) ? 6157 0000761F 3C05 <2> cmp al, 05h ; or extended partition DOS (05h) ? 6158 00007621 7426 <2> je .push ; yes --> 6159 <2> 6160 <2> %ifidn _BASE, bp 6161 00007623 395BFE <2> cmp word [_BASE+di-2], bx 6162 00007626 7505 <2> jne .logical 6163 00007628 395BFC <2> cmp word [_BASE+di-4], bx 6164 <2> %else 6165 <2> cmp word [_BASE+di-2], 0 6166 <2> jne .logical 6167 <2> cmp word [_BASE+di-4], 0 6168 <2> %endif 6169 0000762B 740B <2> je .next 6170 <2> .logical: 6171 0000762D FE06[C38F] <2> inc byte [ %[_SCANPTAB_PREFIX]load_current_partition] 6172 00007631 7503E98400 <2> jz .error_too_many_partitions 6173 00007636 FFD1 <2> call cx 6174 <2> ; CHG: ax, (cx), dx, bx if _BASE = bp 6175 <2> ; preserve: (cx), si, di, ds, es, bx if _BASE = ss:bx 6176 <2> .next: 6177 00007638 83C610 <2> add si, 16 ; -> next partition table entry 6178 0000763B 81FE[D08B] <2> cmp si, %[_SCANPTAB_PREFIX]partition_table.end 6179 <2> ; was last? 6180 0000763F 72C5 <2> jb .loop ; no, loop --> 6181 00007641 85FF <2> test di, di ; still some on stack? 6182 00007643 7546 <2> jnz .pop ; yes, pop 6183 <2> .end: 6184 <2> %ifidn _BASE, bp 6185 00007645 89EC <2> mov sp, bp ; restore sp 6186 00007647 5D <2> pop bp 6187 <2> %else 6188 <2> mov sp, bx ; restore sp 6189 <2> pop ax ; (discard dummy bp value) 6190 <2> %endif 6191 00007648 C3 <2> retn ; and bye 6192 <2> 6193 <2> .push: 6194 <2> d4 call %[_SCANPTAB_DEBUG4_PREFIX]d4message 6195 <2> d4 asciz "In scan_logical.push",13,10 6196 <2> 6197 00007649 56 <2> push si 6198 <2> .push_check_empty_next: 6199 0000764A 83C610 <2> add si, 16 ; -> next 6200 0000764D 81FE[D08B] <2> cmp si, %[_SCANPTAB_PREFIX]partition_table.end 6201 <2> ; at end? 6202 00007651 734A <2> jae .replace ; yes, no other partitions found, replace --> 6203 00007653 26807C0400 <2> cmp byte [es:si + piType], 0 ; is this a partition? 6204 00007658 74F0 <2> je .push_check_empty_next ; no, check next --> 6205 <2> ; found a partition after this, do push 6206 <2> ; (possibly logical or another extended) 6207 <2> .push_check_is_not_empty: 6208 <2> d4 call %[_SCANPTAB_DEBUG4_PREFIX]d4message 6209 <2> d4 asciz "In scan_logical.push_check_is_not_empty",13,10 6210 0000765A 5E <2> pop si ; restore -> partition table entry 6211 0000765B 56 <2> push si ; stored at word [_BASE+di-10] 6212 0000765C 83EF0A <2> sub di, 10 6213 0000765F FF7308 <2> push word [_BASE+di+10-2] 6214 00007662 FF7306 <2> push word [_BASE+di+10-4] ; copy root 6215 <2> 6216 00007665 268B4408 <2> mov ax, word [es:si + piStart] 6217 00007669 268B540A <2> mov dx, word [es:si + piStart + 2] ; get extended partition offset 6218 0000766D 0343FC <2> add ax, word [_BASE+di-4] 6219 00007670 1353FE <2> adc dx, word [_BASE+di-2] ; add in root to get absolute sector number 6220 <2> 6221 00007673 52 <2> push dx 6222 00007674 50 <2> push ax ; new base 6223 <2> 6224 <2> .replace_common: 6225 <2> %ifidn _BASE, bp 6226 00007675 395BFE <2> cmp word [_BASE+di-2], bx ; have a (nonzero) root? 6227 00007678 750B <2> jne .have_root 6228 0000767A 395BFC <2> cmp word [_BASE+di-4], bx 6229 <2> %else 6230 <2> cmp word [_BASE+di-2], 0 ; have a (nonzero) root? 6231 <2> jne .have_root 6232 <2> cmp word [_BASE+di-4], 0 6233 <2> %endif 6234 0000767D 7506 <2> jne .have_root ; yes --> 6235 <2> 6236 0000767F 8953FE <2> mov word [_BASE+di-2], dx 6237 00007682 8943FC <2> mov word [_BASE+di-4], ax ; set root 6238 <2> .have_root: 6239 <2> 6240 00007685 E83800 <2> call %[_SCANPTAB_PREFIX]read_partition_table 6241 00007688 E978FF <2> jmp . 6242 <2> 6243 <2> .pop: 6244 <2> d4 call %[_SCANPTAB_DEBUG4_PREFIX]d4message 6245 <2> d4 asciz "In scan_logical.pop",13,10 6246 <2> 6247 0000768B 83C70A <2> add di, 10 6248 0000768E 83C408 <2> add sp, 8 6249 00007691 5E <2> pop si 6250 <2> 6251 00007692 8B43F8 <2> mov ax, word [_BASE+di-8] 6252 00007695 8B53FA <2> mov dx, word [_BASE+di-6] 6253 00007698 E82500 <2> call %[_SCANPTAB_PREFIX]read_partition_table 6254 0000769B EB9B <2> jmp .next 6255 <2> 6256 <2> .replace: 6257 <2> d4 call %[_SCANPTAB_DEBUG4_PREFIX]d4message 6258 <2> d4 asciz "In scan_logical.replace",13,10 6259 <2> 6260 0000769D 5E <2> pop si ; (discard) 6261 0000769E 268B4408 <2> mov ax, word [es:si + piStart] 6262 000076A2 268B540A <2> mov dx, word [es:si + piStart + 2] ; get extended partition offset 6263 000076A6 0343FC <2> add ax, word [_BASE+di - 4] 6264 000076A9 1353FE <2> adc dx, word [_BASE+di - 2] ; add in root 6265 000076AC 8943F8 <2> mov word [_BASE+di - 8], ax 6266 000076AF 8953FA <2> mov word [_BASE+di - 6], dx ; set base 6267 <2> 6268 000076B2 EBC1 <2> jmp .replace_common 6269 <2> 6270 <2> 6271 <2> %if _BOOTCMD_FAIL_ERROR 6272 <2> .got_partition_cycle: 6273 000076B4 BA[5461] <2> mov dx, msg.boot_partition_cycle_error 6274 000076B7 E943ED <2> jmp bootcmd.fail 6275 <2> 6276 <2> .error_too_many_partitions: 6277 000076BA BA[3161] <2> mov dx, msg.boot_too_many_partitions_error 6278 000076BD E93DED <2> jmp bootcmd.fail 6279 <2> %endif 6280 <2> 6281 <2> 6282 <2> ; if _PARTITION_TABLE_IN_CS: 6283 <2> ; INP: dx:ax = partition table sector to read 6284 <2> ; CHG: ax, dx 6285 <2> ; OUT: es = cs 6286 <2> ; 64 bytes [es:partition_table] = partition table 6287 <2> ; does not return if error 6288 <2> 6289 <2> ; else: 6290 <2> ; INP: dx:ax = partition table sector to read 6291 <2> ; CHG: ax, dx 6292 <2> ; OUT: es = ss 6293 <2> ; 64 bytes [es:partition_table] = partition table 6294 <2> ; does not return if error 6295 <2> %[_SCANPTAB_PREFIX]read_partition_table: 6296 000076C0 53 <2> push bx 6297 <2> %ifidn _BASE, bp 6298 000076C1 8B1E[F209] <2> mov bx, word [auxbuff_segorsel] ; bx => auxbuff 6299 <2> %else 6300 <2> mov bx, word [bp + ldSectorSeg] 6301 <2> %endif 6302 000076C5 E83B02 <2> call %[_SCANPTAB_PREFIX]read_ae_512_bytes 6303 000076C8 5B <2> pop bx 6304 000076C9 26813EFE0155AA <2> cmp word [es:510], 0AA55h 6305 000076D0 7518 <2> jne .signature_fail 6306 000076D2 1E <2> push ds 6307 000076D3 57 <2> push di 6308 000076D4 56 <2> push si 6309 000076D5 51 <2> push cx 6310 000076D6 06 <2> push es 6311 000076D7 1F <2> pop ds 6312 000076D8 BEBE01 <2> mov si, 510 - 4*16 ; ds:si -> partition table in sectorseg 6313 <2> %if _PARTITION_TABLE_IN_CS 6314 <2> push cs 6315 <2> %else 6316 000076DB 16 <2> push ss 6317 <2> %endif 6318 000076DC 07 <2> pop es 6319 000076DD BF[908B] <2> mov di, %[_SCANPTAB_PREFIX]partition_table 6320 <2> ; es:di -> cs:%[_SCANPTAB_PREFIX]partition_table 6321 000076E0 B92000 <2> mov cx, 4*16 / 2 6322 000076E3 F3A5 <2> rep movsw 6323 000076E5 59 <2> pop cx 6324 000076E6 5E <2> pop si 6325 000076E7 5F <2> pop di 6326 000076E8 1F <2> pop ds 6327 000076E9 C3 <2> retn 6328 <2> 6329 <2> 6330 <2> %if _BOOTCMD_FAIL_ERROR 6331 <2> .signature_fail: 6332 000076EA BA[4060] <2> mov dx, msg.bootfail_sig_parttable 6333 000076ED E90DED <2> jmp bootcmd.fail 6334 <2> %endif 6010 <1> 6011 <1> 6012 <1> ; INP: al = first character 6013 <1> ; si -> next 6014 <1> ; OUT: doesn't return if error 6015 <1> ; bx:dx = number read 6016 <1> ; al = character after the number 6017 <1> ; si -> next 6018 <1> ; CHG: cx, ax, di 6019 <1> boot_get_decimal_literal: 6020 000076F0 BA0A00 <1> mov dx, 10 ; set base: decimal 6021 <1> %if 1 6022 000076F3 B93940 <1> mov cx, '9' | (('A'-10-1 + 10) << 8) 6023 <1> %else 6024 <1> mov cl, dl 6025 <1> add cl, '0'-1 6026 <1> cmp cl, '9' 6027 <1> jbe .lit_basebelow11 6028 <1> mov cl, '9' 6029 <1> .lit_basebelow11: ; cl = highest decimal digit for base ('1'..'9') 6030 <1> mov ch, dl 6031 <1> add ch, 'A'-10-1 ; ch = highest letter for base ('A'-x..'Z') 6032 <1> %endif 6033 000076F6 EB06 <1> jmp @F 6034 <1> 6035 <1> 6036 <1> boot_get_hexadecimal_literal: 6037 000076F8 BA1000 <1> mov dx, 16 ; set base: hexadecimal 6038 <1> %if 1 6039 000076FB B93946 <1> mov cx, '9' | (('A'-10-1 + 16) << 8) 6040 <1> %else 6041 <1> mov cl, dl 6042 <1> add cl, '0'-1 6043 <1> cmp cl, '9' 6044 <1> jbe .lit_basebelow11 6045 <1> mov cl, '9' 6046 <1> .lit_basebelow11: ; cl = highest decimal digit for base ('1'..'9') 6047 <1> mov ch, dl 6048 <1> add ch, 'A'-10-1 ; ch = highest letter for base ('A'-x..'Z') 6049 <1> %endif 6050 <1> 6051 <1> @@: 6052 000076FE B400 <1> mov ah, 0 6053 00007700 31DB <1> xor bx, bx 6054 00007702 89D7 <1> mov di, dx ; di = base 6055 <1> 6056 00007704 E83A40 <1> call getexpression.lit_isdigit? ; first character must be a digit 6057 00007707 7241 <1> jc .err2 6058 00007709 31D2 <1> xor dx, dx ; initialize value 6059 <1> .lit_loopdigit: 6060 0000770B 3C5F <1> cmp al, '_' 6061 0000770D 7432 <1> je .lit_skip 6062 0000770F E82F40 <1> call getexpression.lit_isdigit? ; was last character ? 6063 00007712 7230 <1> jc .lit_end ; yes --> 6064 00007714 E8FC14 <1> call uppercase 6065 00007717 2C30 <1> sub al, '0' 6066 00007719 3C09 <1> cmp al, 9 ; was decimal digit ? 6067 0000771B 7602 <1> jbe .lit_decimaldigit ; yes --> 6068 0000771D 2C07 <1> sub al, 'A'-('9'+1) ; else adjust for hexadecimal digit 6069 <1> .lit_decimaldigit: 6070 0000771F 50 <1> push ax 6071 00007720 89D0 <1> mov ax, dx 6072 00007722 53 <1> push bx 6073 00007723 F7E7 <1> mul di ; multiply low word with base 6074 00007725 89D3 <1> mov bx, dx 6075 00007727 89C2 <1> mov dx, ax 6076 00007729 58 <1> pop ax 6077 0000772A 52 <1> push dx 6078 0000772B F7E7 <1> mul di ; multiply high word with base 6079 0000772D 85D2 <1> test dx, dx 6080 0000772F 5A <1> pop dx 6081 00007730 7518 <1> jnz .err2 ; overflow --> 6082 00007732 01C3 <1> add bx, ax ; add them 6083 00007734 58 <1> pop ax 6084 00007735 7213 <1> jc .err2 ; overflow --> 6085 00007737 00C2 <1> add dl, al ; add in the new digit 6086 00007739 80D600 <1> adc dh, 0 6087 0000773C 83D300 <1> adc bx, byte 0 6088 0000773F 7209 <1> jc .err2 ; overflow --> 6089 <1> 6090 <1> .lit_skip: 6091 00007741 AC <1> lodsb 6092 00007742 EBC7 <1> jmp short .lit_loopdigit 6093 <1> 6094 <1> .lit_end: 6095 00007744 E88232 <1> call isseparator? ; after the number, there must be a separator 6096 00007747 7501 <1> jne .err2 ; none here --> 6097 00007749 C3 <1> retn 6098 <1> 6099 <1> .err2: 6100 0000774A E98F2D <1> jmp error 6101 <1> 6102 <1> 6103 <1> query_geometry: 6104 0000774D E88F8D <1> call guard_auxbuff 6105 00007750 8A16[D08C] <1> mov dl, [load_unit] 6106 <1> ; test dl, dl ; floppy? 6107 <1> ; jns @F ; don't attempt query, might fail --> 6108 <1> ; Note that while the original PC BIOS doesn't support this function 6109 <1> ; (for its diskettes), it does properly return the error code 01h. 6110 <1> ; https://sites.google.com/site/pcdosretro/ibmpcbios (IBM PC version 1) 6111 00007754 B408 <1> mov ah, 08h 6112 00007756 31C9 <1> xor cx, cx ; initialise cl to 0 6113 00007758 890E[AA8C] <1> mov [load_heads], cx 6114 0000775C 890E[A88C] <1> mov [load_sectors], cx 6115 00007760 F9 <1> stc ; initialise to CY 6116 00007761 E83701 <1> call .int13_retry ; query drive geometry 6117 00007764 720C <1> jc .try_bootsector ; apparently failed --> 6118 00007766 88F2 <1> mov dl, dh 6119 00007768 B600 <1> mov dh, 0 ; dx = maximum head number 6120 0000776A 42 <1> inc dx ; dx = number of heads (H is 0-based) 6121 0000776B 89C8 <1> mov ax, cx ; ax & 3Fh = maximum sector number 6122 0000776D 83E03F <1> and ax, 3Fh ; get sectors (number of sectors, S is 1-based) 6123 00007770 7523 <1> jnz .got_sectors_heads ; valid (S is 1-based), use these --> 6124 <1> ; zero = invalid 6125 <1> .try_bootsector: 6126 00007772 8E06[F209] <1> mov es, word [auxbuff_segorsel] ; es => auxbuff 6127 00007776 31DB <1> xor bx, bx ; es:bx -> auxbuff 6128 00007778 B80102 <1> mov ax, 0201h ; read sector, 1 sector 6129 0000777B B90100 <1> mov cx, 1 ; sector 1 (1-based!), cylinder 0 (0-based) 6130 0000777E B600 <1> mov dh, 0 ; head 0 (0-based) 6131 00007780 8A16[D08C] <1> mov dl, [load_unit] 6132 00007784 F9 <1> stc 6133 00007785 E81301 <1> call .int13_retry 6134 00007788 7303E92B01 <1> jc .access_error 6135 <1> 6136 <1> ; note: the smallest supported sector size, 32 bytes, 6137 <1> ; does contain these entries (offset 18h and 1Ah in sector) 6138 <1> ; within the first BPB sector. 6139 0000778D 268B4718 <1> mov ax, word [es:bx + bsBPB + bpbCHSSectors] 6140 00007791 268B571A <1> mov dx, word [es:bx + bsBPB + bpbCHSHeads] 6141 <1> 6142 <1> .got_sectors_heads: 6143 00007795 A3[A88C] <1> mov word [load_sectors], ax 6144 00007798 8916[AA8C] <1> mov word [load_heads], dx 6145 <1> 6146 0000779C 85C0 <1> test ax, ax 6147 0000779E 7503E93B01 <1> jz .invalid_sectors 6148 000077A3 83F83F <1> cmp ax, 63 6149 000077A6 7603E93301 <1> ja .invalid_sectors 6150 000077AB 85D2 <1> test dx, dx 6151 000077AD 7503E93301 <1> jz .invalid_heads 6152 000077B2 81FA0001 <1> cmp dx, 100h 6153 000077B6 7603E92A01 <1> ja .invalid_heads 6154 <1> 6155 000077BB 8E06[F209] <1> mov es, word [auxbuff_segorsel] ; es => auxbuff 6156 000077BF 31DB <1> xor bx, bx ; es:bx -> auxbuff 6157 000077C1 31C0 <1> xor ax, ax 6158 <1> 6159 <1> %if _AUXBUFFSIZE < 8192+2 6160 <1> %error Expecting to use auxbuff as sector size detection buffer 6161 <1> %endif 6162 <1> 6163 <1> d5 call d5dumpregs 6164 <1> d5 call d5message 6165 <1> d5 asciz 13,10,"In query_geometry 0",13,10 6166 <1> 6167 000077C3 89DF <1> mov di, bx 6168 000077C5 B90110 <1> mov cx, (8192 + 2) >> 1 6169 <1> ; es:bx -> auxbuff, es:di = same 6170 000077C8 F3AB <1> rep stosw ; fill buffer, di -> behind (auxbuff+8192+2) 6171 000077CA B80102 <1> mov ax, 0201h ; read sector, 1 sector 6172 000077CD 41 <1> inc cx ; sector 1 (1-based!), cylinder 0 (0-based) 6173 000077CE B600 <1> mov dh, 0 ; head 0 (0-based) 6174 000077D0 8A16[D08C] <1> mov dl, [load_unit] 6175 000077D4 F9 <1> stc 6176 000077D5 E8C300 <1> call .int13_retry 6177 000077D8 7303E9DB00 <1> jc .access_error 6178 <1> 6179 000077DD FD <1> std ; _AMD_ERRATUM_109_WORKAROUND does not apply 6180 000077DE AF <1> scasw ; -> auxbuff+8192 (at last word to sca) 6181 <1> d5 call d5dumpregs 6182 <1> d5 call d5message 6183 <1> d5 asciz 13,10,"In query_geometry 1",13,10 6184 000077DF B90110 <1> mov cx, (8192 + 2) >> 1 6185 000077E2 31C0 <1> xor ax, ax 6186 000077E4 F3AF <1> repe scasw 6187 000077E6 83C704 <1> add di, 4 ; di -> first differing byte (from top) 6188 000077E9 FC <1> cld 6189 000077EA 57 <1> push di 6190 <1> 6191 000077EB 89DF <1> mov di, bx 6192 000077ED B90110 <1> mov cx, (8192 + 2) >> 1 6193 000077F0 48 <1> dec ax ; = FFFFh 6194 000077F1 F3AB <1> rep stosw 6195 <1> 6196 000077F3 B80102 <1> mov ax, 0201h 6197 000077F6 41 <1> inc cx 6198 000077F7 B600 <1> mov dh, 0 6199 000077F9 8A16[D08C] <1> mov dl, [load_unit] 6200 000077FD F9 <1> stc 6201 000077FE E89A00 <1> call .int13_retry 6202 00007801 7303E9B200 <1> jc .access_error 6203 <1> 6204 00007806 FD <1> std ; _AMD_ERRATUM_109_WORKAROUND does not apply 6205 00007807 AF <1> scasw ; di -> auxbuff+8192 (last word to sca) 6206 <1> d5 call d5dumpregs 6207 <1> d5 call d5message 6208 <1> d5 asciz 13,10,"In query_geometry 2",13,10 6209 00007808 5A <1> pop dx 6210 00007809 B8FFFF <1> mov ax, -1 6211 0000780C B90110 <1> mov cx, (8192 + 2) >> 1 6212 0000780F F3AF <1> repe scasw 6213 <1> %if 0 6214 <1> AAAB 6215 <1> ^ 6216 <1> sca B, match 6217 <1> ^ 6218 <1> sca B, mismatch 6219 <1> ^ 6220 <1> stop 6221 <1> %endif 6222 00007811 83C704 <1> add di, 4 ; di -> first differing byte (from top) 6223 00007814 FC <1> cld 6224 <1> 6225 <1> %if 0 6226 <1> 0000000000000 6227 <1> AAAAAAAA00000 6228 <1> ^ 6229 <1> FFFFFFFFFFFFF 6230 <1> AAAAAAAA00FFF 6231 <1> ^ 6232 <1> %endif 6233 00007815 39FA <1> cmp dx, di ; choose the higher one 6234 00007817 7302 <1> jae @F 6235 00007819 89FA <1> mov dx, di 6236 <1> @@: 6237 0000781B 29DA <1> sub dx, bx ; dx = sector size 6238 <1> 6239 <1> d5 call d5dumpregs 6240 <1> d5 call d5message 6241 <1> d5 asciz 13,10,"In query_geometry 3",13,10 6242 <1> 6243 0000781D 81FA0220 <1> cmp dx, 8192 + 2 6244 00007821 7203E9A300 <1> jae .sector_too_large 6245 00007826 B82000 <1> mov ax, 32 6246 00007829 39C2 <1> cmp dx, ax 6247 0000782B 7303E9A000 <1> jb .sector_too_small 6248 <1> @@: 6249 00007830 39C2 <1> cmp dx, ax 6250 00007832 740C <1> je .got_match 6251 00007834 3D0020 <1> cmp ax, 8192 6252 00007837 7203E99B00 <1> jae .sector_not_power 6253 0000783C D1E0 <1> shl ax, 1 6254 0000783E EBF0 <1> jmp @B 6255 <1> 6256 <1> .got_match: 6257 00007840 A3[9B8C] <1> mov word [load_sectorsize], ax 6258 00007843 B104 <1> mov cl, 4 6259 00007845 D3E8 <1> shr ax, cl 6260 00007847 A3[7A8C] <1> mov word [load_sectorsizepara], ax 6261 <1> 6262 0000784A C606[778C]00 <1> mov byte [load_ldflags], 0 6263 0000784F 8A16[D08C] <1> mov dl, [load_unit] 6264 00007853 31DB <1> xor bx, bx 6265 00007855 88D3 <1> mov bl, dl 6266 00007857 F687[908A]01 <1> testopt [load_unit_flags + bx], lufForceCHS 6267 0000785C 7519 <1> jnz .no_lba 6268 0000785E B441 <1> mov ah, 41h 6269 00007860 BBAA55 <1> mov bx, 55AAh 6270 00007863 F9 <1> stc 6271 00007864 CD13 <1> int 13h ; 13.41.bx=55AA extensions installation check 6272 00007866 720F <1> jc .no_lba 6273 00007868 81FB55AA <1> cmp bx, 0AA55h 6274 0000786C 7509 <1> jne .no_lba 6275 0000786E F6C101 <1> test cl, 1 ; support bitmap bit 0 6276 00007871 7404 <1> jz .no_lba 6277 <1> 6278 <1> %if ldfHasLBA != 1 6279 <1> %error Assuming ldfHasLBA is 1 6280 <1> %endif 6281 00007873 FE06[778C] <1> inc byte [load_ldflags] 6282 <1> .no_lba: 6283 <1> 6284 00007877 A1[F209] <1> mov ax, word [auxbuff_segorsel] ; ax => auxbuff 6285 0000787A 89C2 <1> mov dx, ax 6286 0000787C 81C2FF01 <1> add dx, (8192 - 16) >> 4 6287 00007880 89C3 <1> mov bx, ax 6288 00007882 89D1 <1> mov cx, dx 6289 00007884 81E300F0 <1> and bx, 0F000h 6290 00007888 81E100F0 <1> and cx, 0F000h 6291 0000788C 39D9 <1> cmp cx, bx 6292 0000788E 7504 <1> jne @F 6293 00007890 A3[748C] <1> mov word [load_sectorseg], ax 6294 00007893 C3 <1> retn 6295 <1> 6296 <1> @@: 6297 00007894 BA[4463] <1> mov dx, msg.boot_auxbuff_crossing 6298 00007897 B020 <1> mov al, 20h 6299 00007899 EB4F <1> jmp .error_common_j 6300 <1> 6301 <1> 6302 <1> .int13_retry: 6303 0000789B 9C <1> pushf 6304 0000789C 50 <1> push ax 6305 0000789D CD13 <1> int 13h ; first try 6306 0000789F 730B <1> jnc @F ; NC, success on first attempt --> 6307 <1> 6308 <1> ; reset drive 6309 000078A1 31C0 <1> xor ax, ax 6310 000078A3 CD13 <1> int 13h 6311 000078A5 7205 <1> jc @F ; CY, reset failed, error in ah --> 6312 <1> 6313 <1> ; try read again 6314 000078A7 58 <1> pop ax ; restore function number 6315 000078A8 9D <1> popf ; CF 6316 000078A9 CD13 <1> int 13h ; retry, CF error status, ah error number 6317 000078AB C3 <1> retn 6318 <1> 6319 <1> @@: ; NC or CY, stack has function number 6320 000078AC 44 <1> inc sp 6321 000078AD 44 <1> inc sp 6322 000078AE 44 <1> inc sp 6323 000078AF 44 <1> inc sp ; discard two words on stack, preserve CF 6324 000078B0 C3 <1> retn 6325 <1> 6326 <1> 6327 <1> .out_of_memory_error: 6328 000078B1 BA[2061] <1> mov dx, msg.boot_out_of_memory_error 6329 000078B4 B021 <1> mov al, 21h 6330 000078B6 EB32 <1> jmp .error_common_j 6331 <1> .access_error: 6332 <1> %if _INPUT_FILE_BOOT 6333 000078B8 F606[A700]08 <1> testopt [internalflags3], dif3_in_if 6334 000078BD 7403E9BD17 <1> jnz if_exists_not_found 6335 <1> %endif 6336 000078C2 BA[8D61] <1> mov dx, msg.boot_access_error 6337 000078C5 B022 <1> mov al, 22h 6338 000078C7 EB21 <1> jmp .error_common_j 6339 <1> .sector_too_large: 6340 000078C9 BA[9B61] <1> mov dx, msg.boot_sector_too_large 6341 000078CC B023 <1> mov al, 23h 6342 000078CE EB1A <1> jmp .error_common_j 6343 <1> .sector_too_small: 6344 000078D0 BA[C161] <1> mov dx, msg.boot_sector_too_small 6345 000078D3 B024 <1> mov al, 24h 6346 000078D5 EB13 <1> jmp .error_common_j 6347 <1> .sector_not_power: 6348 000078D7 BA[E961] <1> mov dx, msg.boot_sector_not_power 6349 000078DA B025 <1> mov al, 25h 6350 000078DC EB0C <1> jmp .error_common_j 6351 <1> .invalid_sectors: 6352 000078DE BA[0B62] <1> mov dx, msg.boot_invalid_sectors 6353 000078E1 B026 <1> mov al, 26h 6354 000078E3 EB05 <1> jmp .error_common_j 6355 <1> .invalid_heads: 6356 000078E5 BA[2762] <1> mov dx, msg.boot_invalid_heads 6357 000078E8 B027 <1> mov al, 27h 6358 <1> .error_common_j: 6359 000078EA B402 <1> mov ah, 02h 6360 000078EC E8342C <1> call setrc 6361 000078EF E90BEB <1> jmp bootcmd.fail 6362 <1> 6363 <1> 6364 <1> ; INP: dx:ax = first sector 6365 <1> ; bx:0 -> buffer 6366 <1> ; OUT: dx:ax = sector number after last read 6367 <1> ; es = input bx 6368 <1> ; bx:0 -> buffer after last written 6369 <1> ; CHG: - 6370 <1> ; STT: ds = ss 6371 <1> read_ae_1536_bytes: 6372 000078F2 51 <1> push cx 6373 000078F3 53 <1> push bx 6374 000078F4 B90006 <1> mov cx, 1536 6375 <1> .loop: 6376 000078F7 E81B00 <1> call read_sector 6377 000078FA 2B0E[9B8C] <1> sub cx, word [load_data - LOADDATA2 + bsBPB + bpbBytesPerSector] 6378 000078FE 77F7 <1> ja .loop 6379 00007900 07 <1> pop es 6380 00007901 59 <1> pop cx 6381 00007902 C3 <1> retn 6382 <1> 6383 <1> ; INP: dx:ax = first sector 6384 <1> ; bx:0 -> buffer 6385 <1> ; OUT: dx:ax = sector number after last read 6386 <1> ; es = input bx 6387 <1> ; bx:0 -> buffer after last written 6388 <1> ; CHG: - 6389 <1> ; STT: ds = ss 6390 <1> read_ae_512_bytes: 6391 00007903 51 <1> push cx 6392 00007904 53 <1> push bx 6393 00007905 B90002 <1> mov cx, 512 6394 <1> .loop: 6395 00007908 E80A00 <1> call read_sector 6396 0000790B 2B0E[9B8C] <1> sub cx, word [load_data - LOADDATA2 + bsBPB + bpbBytesPerSector] 6397 0000790F 77F7 <1> ja .loop 6398 00007911 07 <1> pop es 6399 00007912 59 <1> pop cx 6400 00007913 C3 <1> retn 6401 <1> 6402 <1> 6403 <1> ; Write a sector using Int13.03 or Int13.43 6404 <1> ; 6405 <1> ; Protocol as for read_sector 6406 <1> write_sector: 6407 00007914 A8 <1> db __TEST_IMM8 ; (skip stc, NC) 6408 <1> 6409 <1> ; Read a sector using Int13.02 or Int13.42 6410 <1> ; 6411 <1> ; INP: dx:ax = sector number (within partition) 6412 <1> ; bx:0-> buffer 6413 <1> ; (_LBA) ds = ss 6414 <1> ; dword[load_data - LOADDATA2 + bsBPB + bpbHiddenSectors] 6415 <1> ; = base sector number (dx:ax is added to this to get 6416 <1> ; the absolute sector number in the selected unit.) 6417 <1> ; OUT: If unable to read, 6418 <1> ; ! jumps to error instead of returning 6419 <1> ; If sector has been read, 6420 <1> ; dx:ax = next sector number (has been incremented) 6421 <1> ; bx:0-> next buffer (bx = es+word[load_sectorsizepara]) 6422 <1> ; es = input bx 6423 <1> ; CHG: - 6424 <1> ; 6425 <1> ; Note: If error 09h (data boundary error) is returned, 6426 <1> ; the read is done into the load_sectorseg buffer, 6427 <1> ; then copied into the user buffer. 6428 <1> read_sector: 6429 00007915 F9 <1> stc 6430 <1> 6431 <1> read_sector_CY_or_write_sector_NC: 6432 <1> lframe near 6433 00007916 5589E5 <1> lenter 6434 <1> lvar word, is_read_bit0 6435 00007919 9C <1> pushf 6436 <1> 6437 <1> .err: equ bootcmd.fail_read 6438 <1> d5 call d5dumpregs 6439 <1> d5 call d5message 6440 <1> d5 asciz 13,10,"In read_sector",13,10 6441 <1> 6442 0000791A 52 <1> push dx 6443 0000791B 51 <1> push cx 6444 0000791C 50 <1> push ax 6445 0000791D 56 <1> push si 6446 <1> 6447 0000791E 53 <1> push bx 6448 <1> 6449 <1> ; DX:AX==LBA sector number 6450 <1> ; add partition start (= number of hidden sectors) 6451 0000791F 0306[AC8C] <1> add ax,[load_data - LOADDATA2 + bsBPB + bpbHiddenSectors + 0] 6452 00007923 1316[AE8C] <1> adc dx,[load_data - LOADDATA2 + bsBPB + bpbHiddenSectors + 2] 6453 <1> 6454 00007927 19F6 <1> sbb si, si ; -1 if was CY, 0 else 6455 00007929 F7DE <1> neg si ; 1 if was CY, 0 else 6456 0000792B 31C9 <1> xor cx, cx 6457 0000792D 51 <1> push cx 6458 0000792E 56 <1> push si ; bit 32 = 1 if operating in 33-bit space 6459 0000792F 52 <1> push dx 6460 00007930 50 <1> push ax ; qword sector number (lpSector) 6461 00007931 53 <1> push bx 6462 00007932 51 <1> push cx ; bx:0 -> buffer (lpBuffer) 6463 00007933 41 <1> inc cx 6464 00007934 51 <1> push cx ; word number of sectors to read (lpCount) 6465 00007935 B110 <1> mov cl, 10h 6466 00007937 51 <1> push cx ; word size of disk address packet (lpSize) 6467 00007938 89E6 <1> mov si, sp ; ds:si -> disk address packet (on stack) 6468 <1> 6469 0000793A F606[778C]01 <1> test byte [load_data - LOADDATA2 + ldFlags], ldfHasLBA 6470 0000793F 7503E9BB00 <1> jz .no_lba 6471 <1> 6472 <1> d5 call d5message 6473 <1> d5 asciz "In read_sector.lba",13,10 6474 <1> 6475 00007944 8A16[D08C] <1> mov dl, byte [load_unit] 6476 00007948 E89A01 <1> call .set_ah_function_42_or_43 6477 0000794B CD13 <1> int 13h ; 13.42 extensions read 6478 0000794D 7203E9A600 <1> jnc .lba_done 6479 <1> 6480 00007952 31C0 <1> xor ax, ax 6481 00007954 CD13 <1> int 13h 6482 00007956 7303E990EA <1> jc .lba_error 6483 <1> 6484 <1> ; have to reset the LBAPACKET's lpCount, as the handler may 6485 <1> ; set it to "the number of blocks successfully transferred". 6486 <1> ; (in any case, the high byte is still zero.) 6487 0000795B C6440201 <1> mov byte [si + lpCount], 1 6488 <1> 6489 0000795F E88301 <1> call .set_ah_function_42_or_43 6490 00007962 CD13 <1> int 13h 6491 00007964 7203E98F00 <1> jnc .lba_done 6492 <1> 6493 00007969 80FC09 <1> cmp ah, 9 ; data boundary error? 6494 0000796C 7403E97AEA <1> jne .lba_error 6495 <1> 6496 <1> .lba_sectorseg: 6497 <1> d4 call d4dumpregs 6498 <1> d4 call d4message 6499 <1> d4 asciz 13,10,"In read_sector.lba_sectorseg",13,10 6500 <1> 6501 00007971 F646FE01 <1> test byte [bp + ?is_read_bit0], 1 6502 00007975 7542 <1> jnz .lba_sectorseg_read 6503 <1> 6504 <1> .lba_sectorseg_write: 6505 00007977 1E <1> push ds 6506 00007978 56 <1> push si 6507 00007979 06 <1> push es 6508 0000797A 57 <1> push di 6509 0000797B 8B0E[9B8C] <1> mov cx, word [load_sectorsize] 6510 0000797F 8E06[748C] <1> mov es, word [load_sectorseg] ; => sectorseg 6511 <1> ; lds si, [si + lpBuffer + 0] 6512 00007983 8E5C06 <1> mov ds, word [si + lpBuffer + 2]; => user buffer 6513 00007986 31F6 <1> xor si, si 6514 00007988 31FF <1> xor di, di 6515 0000798A F3A4 <1> rep movsb ; copy data into sectorseg 6516 0000798C 5F <1> pop di 6517 0000798D 07 <1> pop es 6518 0000798E 5E <1> pop si 6519 0000798F 1F <1> pop ds 6520 <1> 6521 00007990 FF36[748C] <1> push word [load_sectorseg] 6522 00007994 8F4406 <1> pop word [si + lpBuffer + 2] ; => sectorseg 6523 <1> ; and word [si + lpBuffer + 0], byte 0 6524 <1> 6525 00007997 C6440201 <1> mov byte [si + lpCount], 1 6526 0000799B B443 <1> mov ah, 43h 6527 0000799D CD13 <1> int 13h 6528 0000799F 7316 <1> jnc @F 6529 <1> 6530 000079A1 31C0 <1> xor ax, ax 6531 000079A3 CD13 <1> int 13h 6532 000079A5 7303E941EA <1> jc .lba_error 6533 <1> 6534 000079AA C6440201 <1> mov byte [si + lpCount], 1 6535 000079AE B443 <1> mov ah, 43h 6536 000079B0 CD13 <1> int 13h 6537 000079B2 7303E934EA <1> jc .lba_error 6538 <1> @@: 6539 000079B7 EB3F <1> jmp .lba_done 6540 <1> 6541 <1> 6542 <1> .lba_sectorseg_read: 6543 <1> ; the offset part of the pointer is already zero! 6544 <1> ; push word [si + lpBuffer + 0] 6545 000079B9 FF7406 <1> push word [si + lpBuffer + 2] ; user buffer 6546 000079BC FF36[748C] <1> push word [load_sectorseg] 6547 000079C0 8F4406 <1> pop word [si + lpBuffer + 2] 6548 <1> ; and word [si + lpBuffer + 0], byte 0 6549 <1> 6550 000079C3 C6440201 <1> mov byte [si + lpCount], 1 6551 000079C7 E81B01 <1> call .set_ah_function_42_or_43 6552 000079CA CD13 <1> int 13h 6553 000079CC 7317 <1> jnc .lba_sectorseg_done 6554 <1> 6555 000079CE 31C0 <1> xor ax, ax 6556 000079D0 CD13 <1> int 13h 6557 000079D2 7303E914EA <1> jc .lba_error 6558 <1> 6559 000079D7 C6440201 <1> mov byte [si + lpCount], 1 6560 000079DB E80701 <1> call .set_ah_function_42_or_43 6561 000079DE CD13 <1> int 13h 6562 000079E0 7303E906EA <1> jc .lba_error 6563 <1> .lba_sectorseg_done: 6564 <1> 6565 000079E5 31F6 <1> xor si, si 6566 000079E7 8E1E[748C] <1> mov ds, word [load_sectorseg] 6567 000079EB 07 <1> pop es 6568 <1> ; pop cx 6569 000079EC 57 <1> push di 6570 <1> ; mov di, cx 6571 000079ED 31FF <1> xor di, di 6572 000079EF 8B0E[9B8C] <1> mov cx, word [load_sectorsize] 6573 000079F3 F3A4 <1> rep movsb 6574 000079F5 5F <1> pop di 6575 <1> 6576 000079F6 16 <1> push ss 6577 000079F7 1F <1> pop ds 6578 <1> .lba_done: 6579 000079F8 83C410 <1> add sp, 10h 6580 000079FB 5B <1> pop bx 6581 000079FC E9D400 <1> jmp .chs_done 6582 <1> 6583 <1> .lba_error: equ .err 6584 <1> 6585 <1> .no_lba: 6586 000079FF 83C408 <1> add sp, 8 6587 00007A02 58 <1> pop ax 6588 00007A03 5A <1> pop dx 6589 00007A04 5E <1> pop si 6590 00007A05 59 <1> pop cx 6591 00007A06 85F6 <1> test si, si 6592 00007A08 7403E9DEE9 <1> jnz .err 6593 <1> 6594 <1> ; DX:AX=LBA sector number 6595 <1> ; divide by number of sectors per track to get sector number 6596 <1> ; Use 32:16 DIV instead of 64:32 DIV for 8088 compatability 6597 <1> ; Use two-step 32:16 divide to avoid overflow 6598 00007A0D 89C1 <1> mov cx,ax 6599 00007A0F 89D0 <1> mov ax,dx 6600 00007A11 31D2 <1> xor dx,dx 6601 00007A13 F736[A88C] <1> div word [load_sectors] 6602 00007A17 91 <1> xchg cx,ax 6603 00007A18 F736[A88C] <1> div word [load_sectors] 6604 00007A1C 87CA <1> xchg cx,dx 6605 <1> 6606 <1> ; DX:AX=quotient, CX=remainder=sector (S) - 1 6607 <1> ; divide quotient by number of heads 6608 00007A1E 89C3 <1> mov bx, ax 6609 00007A20 92 <1> xchg ax, dx 6610 00007A21 31D2 <1> xor dx, dx 6611 00007A23 F736[AA8C] <1> div word [load_heads] 6612 00007A27 93 <1> xchg bx, ax 6613 00007A28 F736[AA8C] <1> div word [load_heads] 6614 <1> 6615 <1> ; bx:ax=quotient=cylinder (C), dx=remainder=head (H) 6616 <1> ; move variables into registers for INT 13h AH=02h 6617 00007A2C 88D6 <1> mov dh, dl ; dh = head 6618 00007A2E 41 <1> inc cx ; cl5:0 = sector 6619 00007A2F 86E8 <1> xchg ch, al ; ch = cylinder 7:0, al = 0 6620 00007A31 D1E8 <1> shr ax, 1 6621 00007A33 D1E8 <1> shr ax, 1 ; al7:6 = cylinder 9:8 6622 <1> ; bx has bits set iff it's > 0, indicating a cylinder >= 65536. 6623 00007A35 08FB <1> or bl, bh ; collect set bits from bh 6624 00007A37 08C1 <1> or cl, al ; cl7:6 = cylinder 9:8 6625 <1> ; ah has bits set iff it was >= 4, indicating a cylinder >= 1024. 6626 00007A39 08E3 <1> or bl, ah ; collect set bits from ah 6627 00007A3B 8A16[D08C] <1> mov dl, [load_unit] 6628 <1> ; dl = drive 6629 00007A3F B404 <1> mov ah, 04h ; error number: sector not found 6630 00007A41 7403E9A5E9 <1> jnz .err ; error if cylinder >= 1024 --> 6631 <1> ; ! bx = 0 (for 13.02 call) 6632 <1> 6633 <1> ; we call INT 13h AH=02h once for each sector. Multi-sector reads 6634 <1> ; may fail if we cross a track or 64K boundary 6635 00007A46 07 <1> pop es 6636 <1> 6637 00007A47 BE1100 <1> mov si, 16 + 1 6638 <1> .loop_chs_retry_repeat: 6639 00007A4A E8A300 <1> call .set_ax_function_0201_or_0301 6640 00007A4D CD13 <1> int 13h ; read one sector 6641 00007A4F 7203E97D00 <1> jnc .done 6642 00007A54 50 <1> push ax 6643 00007A55 31C0 <1> xor ax, ax 6644 00007A57 CD13 <1> int 13h ; reset disk 6645 00007A59 58 <1> pop ax 6646 00007A5A 4E <1> dec si ; another attempt ? 6647 00007A5B 75ED <1> jnz .loop_chs_retry_repeat ; yes --> 6648 <1> 6649 00007A5D 80FC09 <1> cmp ah, 9 ; data boundary error? 6650 00007A60 7403E986E9 <1> jne .err 6651 <1> 6652 <1> .chs_sectorseg: 6653 <1> d4 call d4dumpregs 6654 <1> d4 call d4message 6655 <1> d4 asciz 13,10,"In read_sector.chs_sectorseg",13,10 6656 <1> 6657 00007A65 F646FE01 <1> test byte [bp + ?is_read_bit0], 1 6658 00007A69 7534 <1> jnz .chs_sectorseg_read 6659 <1> 6660 <1> .chs_sectorseg_write: 6661 00007A6B 06 <1> push es 6662 <1> 6663 00007A6C 1E <1> push ds 6664 00007A6D 57 <1> push di 6665 00007A6E 51 <1> push cx 6666 00007A6F 8B0E[9B8C] <1> mov cx, word [load_sectorsize] 6667 00007A73 06 <1> push es 6668 00007A74 8E06[748C] <1> mov es, word [load_sectorseg] ; => sectorseg 6669 00007A78 1F <1> pop ds ; => user buffer 6670 00007A79 31F6 <1> xor si, si 6671 00007A7B 31FF <1> xor di, di 6672 00007A7D F3A4 <1> rep movsb ; copy data into sectorseg 6673 00007A7F 59 <1> pop cx 6674 00007A80 5F <1> pop di 6675 00007A81 1F <1> pop ds 6676 <1> 6677 00007A82 B80103 <1> mov ax, 0301h 6678 00007A85 CD13 <1> int 13h 6679 00007A87 7313 <1> jnc @F 6680 <1> 6681 00007A89 31C0 <1> xor ax, ax 6682 00007A8B CD13 <1> int 13h 6683 00007A8D 7303E959E9 <1> jc .err 6684 <1> 6685 00007A92 B80103 <1> mov ax, 0301h 6686 00007A95 CD13 <1> int 13h 6687 00007A97 7303E94FE9 <1> jc .err 6688 <1> @@: 6689 00007A9C 5B <1> pop bx 6690 00007A9D EB34 <1> jmp .chs_done 6691 <1> 6692 <1> 6693 <1> .chs_sectorseg_read: 6694 <1> 6695 00007A9F 06 <1> push es ; user buffer 6696 00007AA0 8E06[748C] <1> mov es, word [load_sectorseg] 6697 <1> 6698 00007AA4 E84900 <1> call .set_ax_function_0201_or_0301 6699 00007AA7 CD13 <1> int 13h 6700 00007AA9 7313 <1> jnc .chs_sectorseg_done 6701 <1> 6702 00007AAB 31C0 <1> xor ax, ax 6703 00007AAD CD13 <1> int 13h 6704 00007AAF 7303E937E9 <1> jc .err 6705 <1> 6706 00007AB4 E83900 <1> call .set_ax_function_0201_or_0301 6707 00007AB7 CD13 <1> int 13h 6708 00007AB9 7303E92DE9 <1> jc .err 6709 <1> .chs_sectorseg_done: 6710 <1> 6711 00007ABE 31F6 <1> xor si, si 6712 00007AC0 8E1E[748C] <1> mov ds, word [load_sectorseg] 6713 00007AC4 07 <1> pop es 6714 00007AC5 57 <1> push di 6715 00007AC6 31FF <1> xor di, di 6716 00007AC8 8B0E[9B8C] <1> mov cx, word [load_sectorsize] 6717 00007ACC F3A4 <1> rep movsb 6718 00007ACE 5F <1> pop di 6719 <1> 6720 00007ACF 16 <1> push ss 6721 00007AD0 1F <1> pop ds 6722 <1> .done: 6723 <1> ; increment segment 6724 00007AD1 8CC3 <1> mov bx, es 6725 <1> 6726 <1> .chs_done: 6727 00007AD3 8EC3 <1> mov es, bx 6728 00007AD5 031E[7A8C] <1> add bx, word [load_sectorsizepara] 6729 <1> 6730 00007AD9 5E <1> pop si 6731 00007ADA 58 <1> pop ax 6732 00007ADB 59 <1> pop cx 6733 00007ADC 5A <1> pop dx 6734 <1> ; increment LBA sector number 6735 00007ADD 40 <1> inc ax 6736 00007ADE 7501 <1> jne @F 6737 00007AE0 42 <1> inc dx 6738 <1> @@: 6739 00007AE1 89EC5D <1> lleave code 6740 00007AE4 C3 <1> retn 6741 <1> 6742 <1> .set_ah_function_42_or_43: 6743 00007AE5 B442 <1> mov ah, 42h 6744 00007AE7 F646FE01 <1> test byte [bp + ?is_read_bit0], 1 6745 00007AEB 7502 <1> jnz @F 6746 00007AED B443 <1> mov ah, 43h 6747 <1> @@: 6748 00007AEF C3 <1> retn 6749 <1> 6750 <1> .set_ax_function_0201_or_0301: 6751 00007AF0 B001 <1> mov al, 1 6752 <1> .set_ah_function_02_or_03: 6753 00007AF2 B402 <1> mov ah, 02h 6754 00007AF4 F646FE01 <1> test byte [bp + ?is_read_bit0], 1 6755 00007AF8 7502 <1> jnz @F 6756 00007AFA B403 <1> mov ah, 03h 6757 <1> @@: 6758 00007AFC C3 <1> retn 6759 <1> 6760 <1> lleave ctx 6761 <1> 6762 <1> 6763 <1> %if _INPUT_FILE_BOOT 6764 <1> yy_boot: 6765 00007AFD E8F1E3 <1> call init_bootcmd 6766 <1> 6767 00007B00 E8F9EA <1> call parseloadunit_default_sdp 6768 00007B03 7510 <1> jnz .have_filename 6769 <1> 6770 00007B05 BA[856C] <1> mov dx, msg.yy_requires_filename 6771 <1> .disp_error_1: 6772 00007B08 B80002 <1> mov ax, 0200h 6773 00007B0B E8152A <1> call setrc 6774 00007B0E E88D42 <1> call putsz_error 6775 00007B11 FF26[9A0A] <1> jmp near word [errret] 6776 <1> 6777 <1> .have_filename: 6778 00007B15 F606[A300]02 <1> testopt [internalflags2], dif2_input_file_boot 6779 00007B1A 740C <1> jz @F 6780 00007B1C 833E[B08F]03 <1> cmp word [load_input_file.active], _INPUT_FILE_BOOT - 1 6781 00007B21 7205 <1> jb @F 6782 <1> 6783 00007B23 BA[C56C] <1> mov dx, msg.yy_too_many_handles 6784 00007B26 EBE0 <1> jmp .disp_error_1 6785 <1> @@: 6786 <1> 6787 <1> ; al was = '/' or '\' or first pathname's first character 6788 <1> ; si-> next char 6789 00007B28 3C3A <1> cmp al, ':' 6790 00007B2A 751F <1> jne .not_yy_goto_subfunction 6791 <1> 6792 00007B2C F606[A300]02 <1> testopt [internalflags2], dif2_input_file_boot 6793 00007B31 7413 <1> jz @F 6794 <1> 6795 00007B33 E80D3E <1> call skipwhite 6796 00007B36 4E <1> dec si 6797 00007B37 8936[B28F] <1> mov word [load_input_file.goto_offset], si 6798 <1> 6799 00007B3B E8F402 <1> call yy_boot_get 6800 00007B3E 800E[A400]80 <1> setopt [internalflags3], dif3_partition_changed 6801 00007B43 E97F02 <1> jmp load_yy_finish 6802 <1> 6803 <1> @@: 6804 00007B46 BA[0B6D] <1> mov dx, msg.yy_no_file 6805 00007B49 EBBD <1> jmp .disp_error_1 6806 <1> .not_yy_goto_subfunction: 6807 <1> 6808 00007B4B BB[DC8F] <1> mov bx, load_yyname_input 6809 00007B4E E897E6 <1> call bootcmd.pathname_parse_super 6810 <1> 6811 00007B51 8326[B28F]00 <1> and word [load_input_file.goto_offset], 0 6812 00007B56 E8EB3D <1> call skipwh0 6813 00007B59 8936[060C] <1> mov word [if_exists_then_address], si 6814 00007B5D E87D3D <1> call iseol?_or_then 6815 00007B60 7427 <1> je .not_yy_goto 6816 <1> 6817 00007B62 3C3A <1> cmp al, ':' 6818 00007B64 7403E97329 <1> jne error 6819 <1> 6820 00007B69 E8D73D <1> call skipwhite 6821 00007B6C 4E <1> dec si 6822 00007B6D 8936[B28F] <1> mov word [load_input_file.goto_offset], si 6823 <1> 6824 <1> @@: 6825 00007B71 AC <1> lodsb 6826 00007B72 3C20 <1> cmp al, 32 6827 00007B74 7409 <1> je @F 6828 00007B76 3C09 <1> cmp al, 9 6829 00007B78 7405 <1> je @F 6830 00007B7A E8713D <1> call iseol? 6831 00007B7D 75F2 <1> jne @B 6832 <1> @@: 6833 00007B7F E8C23D <1> call skipwh0 6834 00007B82 8936[060C] <1> mov word [if_exists_then_address], si 6835 00007B86 E8703D <1> call chkeol_or_then 6836 <1> 6837 <1> .not_yy_goto: 6838 <1> 6839 00007B89 F606[A400]07 <1> testopt [internalflags3], dif3_load_is_dp 6840 00007B8E 7555 <1> jnz .load_yy_from_ldp 6841 <1> 6842 00007B90 8A1E[C28F] <1> mov bl, [load_partition] 6843 00007B94 803E[D08C]80 <1> cmp byte [load_unit], 80h 6844 00007B99 7226 <1> jb .p_f_is_diskette 6845 00007B9B 84DB <1> test bl, bl ; partition specified ? 6846 00007B9D 7503E93A29 <1> jz error ; no, error --> 6847 <1> 6848 00007BA2 E8A8FB <1> call query_geometry 6849 <1> 6850 00007BA5 B9[0D7C] <1> mov cx, load_yy_from_partition 6851 00007BA8 E8FAF9 <1> call scan_partitions 6852 00007BAB F606[A700]08 <1> testopt [internalflags3], dif3_in_if 6853 00007BB0 7403E9CA14 <1> jnz if_exists_not_found 6854 00007BB5 BA[7661] <1> mov dx, msg.boot_partition_not_found 6855 00007BB8 B80602 <1> mov ax, 0206h 6856 00007BBB E86529 <1> call setrc 6857 00007BBE E93CE8 <1> jmp bootcmd.fail 6858 <1> 6859 <1> 6860 <1> .p_f_is_diskette: 6861 00007BC1 84DB <1> test bl, bl ; partition specified ? 6862 00007BC3 7403E91429 <1> jnz error ; yes, error --> 6863 <1> 6864 00007BC8 E882FB <1> call query_geometry 6865 <1> 6866 00007BCB 31C0 <1> xor ax, ax 6867 00007BCD 31D2 <1> xor dx, dx 6868 <1> @@: 6869 00007BCF 8B1E[F209] <1> mov bx, word [auxbuff_segorsel] ; bx => auxbuff 6870 00007BD3 52 <1> push dx 6871 00007BD4 50 <1> push ax 6872 00007BD5 E82BFD <1> call read_ae_512_bytes 6873 <1> 6874 00007BD8 26813EFE0155AA <1> cmp word [es:510], 0AA55h 6875 00007BDF 7510 <1> jne boot_sigmismatch 6876 00007BE1 58 <1> pop ax 6877 00007BE2 5A <1> pop dx 6878 <1> 6879 00007BE3 EB62 <1> jmp load_yy_common 6880 <1> 6881 <1> 6882 <1> .load_yy_from_ldp: 6883 00007BE5 E865FB <1> call query_geometry 6884 00007BE8 A1[B88F] <1> mov ax, word [load_partition_sector] 6885 00007BEB 8B16[BA8F] <1> mov dx, word [load_partition_sector + 2] 6886 00007BEF EBDE <1> jmp @B 6887 <1> %endif 6888 <1> 6889 <1> 6890 <1> boot_sigmismatch: 6891 00007BF1 BA[1060] <1> mov dx, msg.bootfail_sig 6892 00007BF4 B80702 <1> mov ax, 0207h 6893 <1> @@: 6894 00007BF7 E82929 <1> call setrc 6895 00007BFA E900E8 <1> jmp bootcmd.fail 6896 <1> 6897 <1> boot_codemismatch: 6898 00007BFD BA[7460] <1> mov dx, msg.bootfail_code 6899 00007C00 B80802 <1> mov ax, 0208h 6900 00007C03 EBF2 <1> jmp @B 6901 <1> 6902 <1> boot_secsizemismatch: 6903 00007C05 BA[9B60] <1> mov dx, msg.bootfail_secsizediffer 6904 00007C08 B80902 <1> mov ax, 0209h 6905 00007C0B EBEA <1> jmp @B 6906 <1> 6907 <1> 6908 <1> %if _INPUT_FILE_BOOT 6909 <1> ; INP: es:si -> partition table entry, 6910 <1> ; si = load_partition_table .. load_partition_table+48, 6911 <1> ; es = ss 6912 <1> ; bp + di -> above part table metadata, 6913 <1> ; dwo [bp + di - 4] = root (outermost extended position) 6914 <1> ; dwo [bp + di - 8] = base (current table position) 6915 <1> ; CHG: ax, bx, (cx), dx 6916 <1> load_yy_from_partition: 6917 <1> d4 call d4message 6918 <1> d4 asciz "In load_yy_from_partition",13,10 6919 <1> 6920 00007C0D A0[C38F] <1> mov al, byte [load_current_partition] 6921 00007C10 3A06[C28F] <1> cmp al, byte [load_partition] 6922 00007C14 7401 <1> je .gotit 6923 00007C16 C3 <1> retn 6924 <1> 6925 <1> .gotit: 6926 <1> d4 call d4message 6927 <1> d4 asciz "In load_yy_from_partition.gotit",13,10 6928 <1> 6929 00007C17 8B43F8 <1> mov ax, [bp + di - 8] 6930 00007C1A 8B53FA <1> mov dx, [bp + di - 6] ; base (current table position) 6931 <1> 6932 00007C1D 26034408 <1> add ax, [es:si + 8] 6933 00007C21 2613540A <1> adc dx, [es:si + 8 + 2] ; add offset to logical partition 6934 <1> 6935 00007C25 26894408 <1> mov word [es:si + 8], ax 6936 00007C29 2689540A <1> mov word [es:si + 8 + 2], dx ; store in partition table entry 6937 <1> 6938 00007C2D 89EC <1> mov sp, bp 6939 00007C2F 5D <1> pop bp ; restore bp (scan_partitions) 6940 00007C30 5B <1> pop bx ; discard ret address (scan_partitions) 6941 <1> 6942 <1> ; dx:ax = absolute sector number 6943 00007C31 8B1E[F209] <1> mov bx, word [auxbuff_segorsel] ; bx => auxbuff 6944 00007C35 50 <1> push ax 6945 00007C36 52 <1> push dx 6946 00007C37 E8C9FC <1> call read_ae_512_bytes ; load partition boot sector 6947 <1> 6948 00007C3A 26813EFE0155AA <1> cmp word [es:510], 0AA55h 6949 00007C41 75AE <1> jne boot_sigmismatch 6950 <1> 6951 00007C43 31C9 <1> xor cx, cx 6952 <1> ; cmp word [es:0], cx 6953 <1> ; je boot_codemismatch 6954 <1> 6955 00007C45 5A <1> pop dx 6956 00007C46 58 <1> pop ax 6957 <1> 6958 <1> ; dx:ax = boot sector 6959 <1> ; byte [load_unit] = unit 6960 <1> ; es:0-> read sector 6961 <1> load_yy_common: 6962 00007C47 26A31C00 <1> mov word [es:bsBPB + bpbHiddenSectors], ax 6963 00007C4B 2689161E00 <1> mov word [es:bsBPB + bpbHiddenSectors + 2], dx 6964 <1> 6965 00007C50 8B5E0B <1> mov bx, [bp + bsBPB + bpbBytesPerSector] 6966 00007C53 263B1E0B00 <1> cmp bx, [es:bsBPB + bpbBytesPerSector] 6967 00007C58 75AB <1> jne boot_secsizemismatch 6968 <1> 6969 <1> ; preserve some variables from our pseudo BPB 6970 00007C5A 31C0 <1> xor ax, ax 6971 00007C5C FF7618 <1> push word [bp + bsBPB + bpbCHSSectors] 6972 00007C5F 268F061800 <1> pop word [es:bsBPB + bpbCHSSectors] 6973 00007C64 FF761A <1> push word [bp + bsBPB + bpbCHSHeads] 6974 00007C67 268F061A00 <1> pop word [es:bsBPB + bpbCHSHeads] ; preserve geometry 6975 <1> 6976 00007C6C 8B5EEA <1> mov bx, word [bp + ldParaPerSector] 6977 00007C6F D1EB <1> shr bx, 1 6978 00007C71 895ED4 <1> mov word [bp + ldEntriesPerSector], bx 6979 <1> 6980 00007C74 2639061600 <1> cmp word [es:bsBPB + bpbSectorsPerFAT], ax 6981 00007C79 8A5E40 <1> mov bl, byte [bp + bsBPB + ebpbNew + bpbnBootUnit] 6982 00007C7C 7407 <1> je .is_fat32 6983 00007C7E 26881E2400 <1> mov byte [es:bsBPB + bpbNew + bpbnBootUnit], bl 6984 00007C83 EB05 <1> jmp short .was_fat1612 6985 <1> .is_fat32: 6986 00007C85 26881E4000 <1> mov byte [es:bsBPB + ebpbNew + bpbnBootUnit], bl 6987 <1> .was_fat1612: 6988 <1> 6989 00007C8A 06 <1> push es 6990 00007C8B 1E <1> push ds 6991 00007C8C 06 <1> push es 6992 00007C8D 1F <1> pop ds 6993 00007C8E 31F6 <1> xor si, si ; -> BPB from boot partition 6994 00007C90 16 <1> push ss 6995 00007C91 07 <1> pop es 6996 00007C92 BF[908C] <1> mov di, load_data - LOADDATA2 ; -> our copy of a BPB 6997 00007C95 B95A00 <1> mov cx, (bsBPB + ebpbNew + BPBN_size) 6998 00007C98 F3A4 <1> rep movsb ; get the BPB 6999 <1> 7000 00007C9A 1F <1> pop ds 7001 00007C9B 800E[A400]80 <1> setopt [internalflags3], dif3_partition_changed 7002 <1> 7003 00007CA0 394616 <1> cmp word [bp + bsBPB + bpbSectorsPerFAT], ax 7004 00007CA3 740B <1> je @F ; is FAT32 --> 7005 00007CA5 BE[B48C] <1> mov si, load_data - LOADDATA2 + bsBPB + bpbNew 7006 00007CA8 BF[D08C] <1> mov di, load_data - LOADDATA2 + bsBPB + ebpbNew 7007 00007CAB B91A00 <1> mov cx, BPBN_size 7008 00007CAE F3A4 <1> rep movsb ; clone the FAT16 / FAT12 BPBN 7009 <1> ; to where the FAT32 BPBN lives 7010 <1> @@: 7011 00007CB0 07 <1> pop es 7012 <1> 7013 <1> .outofmem: equ query_geometry.out_of_memory_error 7014 <1> 7015 00007CB1 FF36[F209] <1> push word [auxbuff_segorsel] 7016 00007CB5 8F46F8 <1> pop word [bp + lsvFATSeg] 7017 00007CB8 804EE702 <1> or byte [bp + ldFlags], ldfFATInvalid 7018 00007CBC B8FFFF <1> mov ax, -1 7019 00007CBF 8946F4 <1> mov word [bp + lsvFATSector], ax 7020 00007CC2 8946F6 <1> mov word [bp + lsvFATSector + 2], ax 7021 <1> 7022 00007CC5 E89705 <1> call initialise_fs 7023 <1> 7024 00007CC8 C606[C58F]00 <1> mov byte [load_check_dir_attr], 0 7025 00007CCD 8B36[DC8F] <1> mov si, word [load_yyname_input] 7026 00007CD1 803C2F <1> cmp byte [si], '/' 7027 00007CD4 7501 <1> jne @F 7028 00007CD6 46 <1> inc si 7029 <1> @@: 7030 00007CD7 803C00 <1> cmp byte [si], 0 7031 00007CDA 750C <1> jne @F 7032 <1> ..@yy_filename_empty: 7033 00007CDC BA[A66C] <1> mov dx, msg.yy_filename_empty 7034 00007CDF B80A02 <1> mov ax, 020Ah 7035 00007CE2 E83E28 <1> call setrc 7036 00007CE5 E915E7 <1> jmp bootcmd.fail 7037 <1> @@: 7038 00007CE8 16 <1> push ss 7039 00007CE9 07 <1> pop es 7040 00007CEA E8E7EB <1> call boot_parse_fn ; get next pathname 7041 00007CED 3C2F <1> cmp al, '/' 7042 00007CEF 7509 <1> jne @F 7043 00007CF1 C606[C58F]10 <1> mov byte [load_check_dir_attr], ATTR_DIRECTORY 7044 00007CF6 8936[DE8F] <1> mov word [load_yyname_next], si 7045 <1> @@: 7046 <1> 7047 00007CFA BFFFFF <1> mov di, -1 7048 00007CFD 89FE <1> mov si, di 7049 00007CFF 897EF4 <1> mov [bp + lsvFATSector], di 7050 00007D02 8976F6 <1> mov [bp + lsvFATSector + 2], si 7051 <1> 7052 00007D05 31C0 <1> xor ax, ax 7053 00007D07 31D2 <1> xor dx, dx 7054 <1> 7055 <1> scan_dir_yyname_loop: 7056 00007D09 8946EC <1> mov word [bp + ldDirCluster], ax 7057 00007D0C 8956EE <1> mov word [bp + ldDirCluster + 2], dx 7058 <1> 7059 00007D0F 16 <1> push ss 7060 00007D10 07 <1> pop es 7061 00007D11 BB[108D] <1> mov bx, load_yy_direntry 7062 <1> 7063 00007D14 E88EF6 <1> call scan_dir_aux_for_file 7064 <1> 7065 00007D17 803E[C58F]10 <1> cmp byte [load_check_dir_attr], ATTR_DIRECTORY 7066 00007D1C 753A <1> jne got_yyentry 7067 <1> 7068 00007D1E 56 <1> push si 7069 00007D1F 57 <1> push di 7070 00007D20 C606[C58F]00 <1> mov byte [load_check_dir_attr], 0 7071 00007D25 8B36[DE8F] <1> mov si, word [load_yyname_next] 7072 00007D29 803C00 <1> cmp byte [si], 0 7073 00007D2C 7502 <1> jne @F 7074 00007D2E EBAC <1> jmp ..@yy_filename_empty 7075 <1> @@: 7076 00007D30 06 <1> push es 7077 00007D31 16 <1> push ss 7078 00007D32 07 <1> pop es 7079 00007D33 E89EEB <1> call boot_parse_fn ; get next pathname 7080 00007D36 07 <1> pop es 7081 00007D37 3C2F <1> cmp al, '/' 7082 00007D39 7509 <1> jne @F 7083 00007D3B C606[C58F]10 <1> mov byte [load_check_dir_attr], ATTR_DIRECTORY 7084 00007D40 8936[DE8F] <1> mov word [load_yyname_next], si 7085 <1> @@: 7086 00007D44 5F <1> pop di 7087 00007D45 5E <1> pop si 7088 <1> 7089 00007D46 31D2 <1> xor dx, dx 7090 00007D48 268B471A <1> mov ax, [es:bx + deClusterLow] 7091 <1> ; = first cluster (not FAT32) 7092 00007D4C 807EE620 <1> cmp byte [bp + ldFATType], 32 7093 00007D50 7504 <1> jne @F 7094 00007D52 268B5714 <1> mov dx, [es:bx + deClusterHigh] 7095 <1> ; dx:ax = first cluster (FAT32) 7096 <1> @@: 7097 <1> 7098 00007D56 EBB1 <1> jmp scan_dir_yyname_loop 7099 <1> 7100 <1> 7101 <1> got_yyentry: 7102 <1> 7103 <1> 7104 <1> ; (boot32.asm code starts here) 7105 <1> 7106 00007D58 8B1E[2C8D] <1> mov bx, [load_yy_direntry + deSize] 7107 00007D5C A1[2E8D] <1> mov ax, [load_yy_direntry + deSize + 2] 7108 <1> ; ax:bx = file size 7109 00007D5F 8A16[1C8D] <1> mov dl, [load_yy_direntry + 12] 7110 <1> ; dl = FAT+ size bits 7111 00007D63 88D6 <1> mov dh, dl 7112 00007D65 81E207E0 <1> and dx, 0E007h ; obtain bits 7-5 and 2-0 7113 00007D69 740C <1> jz @F 7114 00007D6B BA[986D] <1> mov dx, msg.yy_too_large 7115 00007D6E B80B02 <1> mov ax, 020Bh 7116 00007D71 E8AF27 <1> call setrc 7117 00007D74 E986E6 <1> jmp bootcmd.fail 7118 <1> @@: 7119 00007D77 895EC4 <1> mov word [bp + ldFileSize], bx 7120 00007D7A 8946C6 <1> mov word [bp + ldFileSize + 2], ax 7121 <1> 7122 00007D7D 09D8 <1> or ax, bx 7123 00007D7F 7516 <1> jnz @F 7124 <1> 7125 00007D81 F606[A700]08 <1> testopt [internalflags3], dif3_in_if 7126 00007D86 7403E9F412 <1> jnz if_exists_not_found 7127 00007D8B BA[B46D] <1> mov dx, msg.yy_empty 7128 00007D8E B80C02 <1> mov ax, 020Ch 7129 00007D91 E88F27 <1> call setrc 7130 00007D94 E966E6 <1> jmp bootcmd.fail 7131 <1> @@: 7132 <1> 7133 <1> ; get starting cluster of file 7134 00007D97 31D2 <1> xor dx, dx 7135 00007D99 A1[2A8D] <1> mov ax, [load_yy_direntry + deClusterLow] 7136 <1> ; = first cluster (not FAT32) 7137 <1> 7138 00007D9C 807EE620 <1> cmp byte [bp + ldFATType], 32 7139 00007DA0 7504 <1> jne @F 7140 00007DA2 8B16[248D] <1> mov dx, [load_yy_direntry + deClusterHigh] 7141 <1> ; dx:ax = first cluster (FAT32) 7142 <1> @@: 7143 <1> 7144 00007DA6 80E60F <1> and dh, 0Fh 7145 00007DA9 8946F0 <1> mov word [bp + lsvFirstCluster], ax 7146 00007DAC 8956F2 <1> mov word [bp + lsvFirstCluster + 2], dx 7147 <1> 7148 00007DAF 8946C8 <1> mov word [bp + ldCurrentCluster], ax 7149 00007DB2 8956CA <1> mov word [bp + ldCurrentCluster + 2], dx 7150 00007DB5 31DB <1> xor bx, bx 7151 00007DB7 895ECC <1> mov word [bp + ldCurrentSeek], bx 7152 00007DBA 895ECE <1> mov word [bp + ldCurrentSeek + 2], bx 7153 00007DBD E8B3F7 <1> call check_clust 7154 00007DC0 7303E9D704 <1> jc error_badchain 7155 <1> 7156 <1> load_yy_finish: 7157 00007DC5 31ED <1> xor bp, bp 7158 00007DC7 31DB <1> xor bx, bx 7159 00007DC9 BE[508C] <1> mov si, load_data_lowest 7160 00007DCC B95000 <1> mov cx, (LOAD_INPUT_FILE_SIZE + 1) >> 1 7161 <1> 7162 00007DCF BF[308D] <1> mov di, load_input_file 7163 00007DD2 F606[A300]02 <1> testopt [internalflags2], dif2_input_file_boot 7164 00007DD7 7415 <1> jz @F 7165 00007DD9 8B1E[B08F] <1> mov bx, word [load_input_file.active] 7166 00007DDD 43 <1> inc bx 7167 00007DDE B8A000 <1> mov ax, LOAD_INPUT_FILE_SIZE 7168 00007DE1 F7E3 <1> mul bx 7169 <1> ; test dx, dx 7170 <1> ; jnz error 7171 00007DE3 01C7 <1> add di, ax 7172 00007DE5 8B5586 <1> mov dx, word [di - LOAD_INPUT_FILE_SIZE - LOADDATA3 + ldFATType] 7173 00007DE8 81E200F0 <1> and dx, ifhfTestReserved1 | ifhfTestReserved2 | ifhfQuietInput | ifhfQuietOutput 7175 00007DEC 09D5 <1> or bp, dx 7176 <1> 7177 <1> @@: 7178 <1> 7179 00007DEE 092E[768C] <1> or word [load_data - LOADDATA2 + ldFATType], bp 7180 00007DF2 16 <1> push ss 7181 00007DF3 07 <1> pop es 7182 00007DF4 F3A5 <1> rep movsw 7183 <1> 7184 <1> ; hazard: this uses load_input_file and 7185 <1> ; load_data_lowest if we are already in 7186 <1> ; a yy_boot script. 7187 00007DF6 8026[A700]EF <1> clropt [internalflags3], dif3_auxbuff_guarded_1 7188 00007DFB E8FE4D <1> call yy_reset_buf 7189 <1> 7190 00007DFE 891E[B08F] <1> mov word [load_input_file.active], bx 7191 00007E02 800E[A300]02 <1> setopt [internalflags2], dif2_input_file_boot 7192 <1> 7193 00007E07 8B36[B28F] <1> mov si, word [load_input_file.goto_offset] 7194 00007E0B 85F6 <1> test si, si 7195 00007E0D 7403E9784F <1> jnz cmd_goto.yy_entry 7196 <1> 7197 00007E12 F606[A700]08 <1> testopt [internalflags3], dif3_in_if 7198 00007E17 7403E97012 <1> jnz if_exists_found_open 7199 00007E1C C3 <1> retn 7200 <1> 7201 <1> 7202 <1> ; INP: [load_input_file], dif2_input_file_boot 7203 <1> ; OUT: most recent file closed, flag cleared if no longer file 7204 <1> ; CHG: di, bx, ax 7205 <1> yy_boot_close_file: 7206 00007E1D A1[B08F] <1> mov ax, word [load_input_file.active] 7207 00007E20 48 <1> dec ax 7208 00007E21 790B <1> jns .next 7209 00007E23 8026[A300]FD <1> clropt [internalflags2], dif2_input_file_boot 7210 00007E28 800E[A300]04 <1> setopt [internalflags2], dif2_closed_input_file_boot 7211 00007E2D C3 <1> retn 7212 <1> .next: 7213 00007E2E A3[B08F] <1> mov word [load_input_file.active], ax 7214 00007E31 C3 <1> retn 7215 <1> 7216 <1> 7217 <1> ; INP: [load_input_file] 7218 <1> ; OUT: [load_data_lowest] = LOADDATA[123], lsv, BPB 7219 <1> ; CHG: es, ax, dx, di, si 7220 <1> yy_boot_get: 7221 00007E32 16 <1> push ss 7222 00007E33 07 <1> pop es 7223 <1> 7224 00007E34 B8A000 <1> mov ax, LOAD_INPUT_FILE_SIZE 7225 00007E37 F726[B08F] <1> mul word [load_input_file.active] 7226 <1> 7227 <1> ; test dx, dx 7228 <1> ; jnz .error 7229 <1> 7230 00007E3B 51 <1> push cx 7231 00007E3C BF[508C] <1> mov di, load_data_lowest 7232 00007E3F B95000 <1> mov cx, (LOAD_INPUT_FILE_SIZE + 1) >> 1 7233 <1> 7234 00007E42 BE[308D] <1> mov si, load_input_file 7235 00007E45 01C6 <1> add si, ax 7236 <1> 7237 00007E47 F3A5 <1> rep movsw 7238 00007E49 59 <1> pop cx 7239 00007E4A C3 <1> retn 7240 <1> 7241 <1> 7242 <1> ; INP: [load_data_lowest] = LOADDATA3 7243 <1> ; OUT: [load_input_file] 7244 <1> ; CHG: es, ax, dx, di, si 7245 <1> ; Note: Preserves flags (ZF, CF) 7246 <1> yy_boot_update: 7247 00007E4B 9C <1> pushf 7248 <1> 7249 00007E4C 16 <1> push ss 7250 00007E4D 07 <1> pop es 7251 <1> 7252 00007E4E B8A000 <1> mov ax, LOAD_INPUT_FILE_SIZE 7253 00007E51 F726[B08F] <1> mul word [load_input_file.active] 7254 <1> 7255 <1> ; test dx, dx 7256 <1> ; jnz .error 7257 <1> 7258 00007E55 51 <1> push cx 7259 00007E56 BE[508C] <1> mov si, load_data_lowest 7260 00007E59 B90800 <1> mov cx, LOADDATA3_size >> 1 7261 <1> 7262 00007E5C BF[308D] <1> mov di, load_input_file 7263 00007E5F 01C7 <1> add di, ax 7264 <1> 7265 00007E61 F3A5 <1> rep movsw 7266 00007E63 59 <1> pop cx 7267 00007E64 9D <1> popf ; ZF, CF 7268 00007E65 C3 <1> retn 7269 <1> 7270 <1> 7271 <1> 7272 <1> ; INP: [load_input_file] = active file 7273 <1> ; cx = how many bytes to read 7274 <1> ; ds:dx -> buffer 7275 <1> ; OUT: CY if error reading 7276 <1> ; NC if success 7277 <1> ; ax = how many bytes read 7278 <1> ; CHG: bx, cx 7279 <1> ; STT: ds = es = ss 7280 <1> yy_boot_read: 7281 <1> lframe near 7282 <1> lvar word, length 7283 <1> lvar word, length_this_cluster 7284 <1> lvar dword, bytes_per_cluster 7285 <1> lvar dword, how_far_in_cluster 7286 00007E66 5589E58D66F4 <1> lenter 7287 <1> lvar dword, pointer 7288 00007E6C 1E <1> push ds 7289 00007E6D 52 <1> push dx 7290 00007E6E 31C0 <1> xor ax, ax 7291 <1> lvar word, did_guard_auxbuff 7292 00007E70 50 <1> push ax 7293 <1> lvar word, read_how_many 7294 00007E71 50 <1> push ax 7295 00007E72 52 <1> push dx 7296 00007E73 56 <1> push si 7297 00007E74 57 <1> push di 7298 <1> 7299 00007E75 FF36[9A0A] <1> push word [errret] 7300 00007E79 FF36[9C0A] <1> push word [throwret] 7301 00007E7D FF36[9E0A] <1> push word [throwsp] 7302 <1> 7303 00007E81 55 <1> push bp 7304 <1> 7305 00007E82 C706[9A0A][EA7F] <1> mov word [errret], .err_ret 7306 00007E88 C706[9C0A][EA7F] <1> mov word [throwret], .err_ret 7307 00007E8E 8926[9E0A] <1> mov word [throwsp], sp 7308 <1> 7309 00007E92 E89DFF <1> call yy_boot_get 7310 <1> 7311 00007E95 E84786 <1> call guard_auxbuff 7312 00007E98 FF46EE <1> inc word [bp + ?did_guard_auxbuff] 7313 <1> 7314 00007E9B 8B16[568C] <1> mov dx, word [load_data - LOADDATA2 + ldFileSize + 2] 7315 00007E9F A1[548C] <1> mov ax, word [load_data - LOADDATA2 + ldFileSize] 7316 <1> 7317 00007EA2 2B06[5C8C] <1> sub ax, word [load_data - LOADDATA2 + ldCurrentSeek] 7318 00007EA6 1B16[5E8C] <1> sbb dx, word [load_data - LOADDATA2 + ldCurrentSeek + 2] 7319 <1> 7320 00007EAA 85D2 <1> test dx, dx 7321 00007EAC 7506 <1> jnz .use_count 7322 00007EAE 39C8 <1> cmp ax, cx 7323 00007EB0 7302 <1> jae .use_count 7324 00007EB2 89C1 <1> mov cx, ax 7325 <1> .use_count: 7326 00007EB4 85C9 <1> test cx, cx 7327 00007EB6 7503E90801 <1> jz .success 7328 00007EBB 894EFE <1> mov word [bp + ?length], cx 7329 <1> 7330 <1> .next_cluster: 7331 00007EBE 8B36[5E8C] <1> mov si, word [load_data - LOADDATA2 + ldCurrentSeek + 2] 7332 00007EC2 8B3E[5C8C] <1> mov di, word [load_data - LOADDATA2 + ldCurrentSeek] 7333 00007EC6 A1[9B8C] <1> mov ax, word [load_data - LOADDATA2 + bsBPB + bpbBytesPerSector] 7334 00007EC9 F726[788C] <1> mul word [load_data - LOADDATA2 + ldClusterSize] 7335 <1> 7336 00007ECD 8946F8 <1> mov word [bp + ?bytes_per_cluster], ax 7337 00007ED0 8956FA <1> mov word [bp + ?bytes_per_cluster + 2], dx 7338 00007ED3 83E801 <1> sub ax, 1 7339 00007ED6 83DA00 <1> sbb dx, 0 7340 00007ED9 21D6 <1> and si, dx 7341 00007EDB 21C7 <1> and di, ax ; how far are we into cluster 7342 <1> 7343 00007EDD 897EF4 <1> mov word [bp + ?how_far_in_cluster], di 7344 00007EE0 8976F6 <1> mov word [bp + ?how_far_in_cluster + 2], si 7345 <1> 7346 00007EE3 F7DE <1> neg si 7347 00007EE5 F7DF <1> neg di 7348 00007EE7 83DE00 <1> sbb si, byte 0 ; neg si:di 7349 <1> 7350 00007EEA 037EF8 <1> add di, word [bp + ?bytes_per_cluster] 7351 00007EED 1376FA <1> adc si, word [bp + ?bytes_per_cluster + 2] 7352 <1> ; cluster size - how far we are 7353 <1> ; = how much to read from this cluster 7354 00007EF0 85F6 <1> test si, si 7355 00007EF2 7506 <1> jnz .use_count_2 7356 00007EF4 39CF <1> cmp di, cx 7357 00007EF6 7302 <1> jae .use_count_2 7358 00007EF8 89F9 <1> mov cx, di 7359 <1> .use_count_2: 7360 00007EFA 894EFC <1> mov word [bp + ?length_this_cluster], cx 7361 <1> 7362 <1> .next_sector: 7363 00007EFD A1[588C] <1> mov ax, word [load_data - LOADDATA2 + ldCurrentCluster] 7364 00007F00 8B16[5A8C] <1> mov dx, word [load_data - LOADDATA2 + ldCurrentCluster + 2] 7365 00007F04 E86CF6 <1> call check_clust 7366 00007F07 7303E9B800 <1> jc .error 7367 00007F0C E883F5 <1> call clust_to_first_sector 7368 00007F0F 8B1E[9B8C] <1> mov bx, word [load_data - LOADDATA2 + bsBPB + bpbBytesPerSector] 7369 00007F13 8B7EF4 <1> mov di, word [bp + ?how_far_in_cluster] 7370 00007F16 8B76F6 <1> mov si, word [bp + ?how_far_in_cluster + 2] 7371 00007F19 87D6 <1> xchg dx, si 7372 00007F1B 97 <1> xchg ax, di 7373 00007F1C F7F3 <1> div bx 7374 <1> ; dx = byte offset into sector 7375 <1> ; ax = sector offset into cluster's data 7376 00007F1E 01C7 <1> add di, ax 7377 00007F20 83D600 <1> adc si, 0 7378 00007F23 87D6 <1> xchg dx, si 7379 00007F25 97 <1> xchg ax, di 7380 <1> ; dx:ax = sector in fs 7381 <1> ; si = byte offset 7382 <1> 7383 00007F26 89F1 <1> mov cx, si ; = byte offset 7384 00007F28 F7D9 <1> neg cx ; - byte offset 7385 00007F2A 01D9 <1> add cx, bx ; sector size - byte offset 7386 <1> ; = length this sector 7387 00007F2C 3B4EFC <1> cmp cx, word [bp + ?length_this_cluster] 7388 00007F2F 7603 <1> jbe @F ; sector has less than requested --> 7389 00007F31 8B4EFC <1> mov cx, word [bp + ?length_this_cluster] 7390 <1> ; fill entire remaining request 7391 <1> @@: 7392 00007F34 8B1E[F209] <1> mov bx, word [auxbuff_segorsel] 7393 00007F38 E8DAF9 <1> call read_sector 7394 00007F3B 1E <1> push ds 7395 <1> 7396 00007F3C 06 <1> push es 7397 <1> ; es:si -> data in sector buffer 7398 00007F3D C47EF0 <1> les di, [bp + ?pointer] 7399 <1> ; es:di -> buffer 7400 00007F40 014EEC <1> add word [bp + ?read_how_many], cx 7401 00007F43 294EFC <1> sub word [bp + ?length_this_cluster], cx 7402 00007F46 294EFE <1> sub word [bp + ?length], cx 7403 00007F49 010E[5C8C] <1> add word [load_data - LOADDATA2 + ldCurrentSeek], cx 7404 00007F4D 8316[5E8C]00 <1> adc word [load_data - LOADDATA2 + ldCurrentSeek + 2], 0 7405 00007F52 014EF4 <1> add word [bp + ?how_far_in_cluster], cx 7406 00007F55 8356F600 <1> adc word [bp + ?how_far_in_cluster + 2], 0 7407 00007F59 1F <1> pop ds ; ds:si -> data in sector buffer 7408 00007F5A F3A4 <1> rep movsb ; copy 7409 00007F5C 897EF0 <1> mov word [bp + ?pointer], di 7410 <1> ; update pointer 7411 00007F5F 1F <1> pop ds 7412 <1> 7413 00007F60 837EFC00 <1> cmp word [bp + ?length_this_cluster], 0 7414 00007F64 7597 <1> jne .next_sector 7415 <1> 7416 00007F66 8B7EF8 <1> mov di, word [bp + ?bytes_per_cluster] 7417 00007F69 8B76FA <1> mov si, word [bp + ?bytes_per_cluster + 2] 7418 00007F6C 397EF4 <1> cmp word [bp + ?how_far_in_cluster], di 7419 00007F6F 7505 <1> jne @F 7420 00007F71 3976F6 <1> cmp word [bp + ?how_far_in_cluster + 2], si 7421 00007F74 7408 <1> je @FF 7422 <1> @@: 7423 00007F76 837EFE00 <1> cmp word [bp + ?length], 0 7424 00007F7A 7548 <1> jne .error 7425 00007F7C EB45 <1> jmp .success 7426 <1> 7427 <1> @@: 7428 00007F7E A1[588C] <1> mov ax, word [load_data - LOADDATA2 + ldCurrentCluster] 7429 00007F81 8B16[5A8C] <1> mov dx, word [load_data - LOADDATA2 + ldCurrentCluster + 2] 7430 00007F85 E8EBF5 <1> call check_clust 7431 00007F88 723A <1> jc .error 7432 00007F8A E832F5 <1> call clust_next.dxax 7433 00007F8D 731B <1> jnc @F ; (NC) --> 7434 00007F8F B8F6FF <1> mov ax, 0FFF8h - 2 7435 00007F92 BAFF0F <1> mov dx, 0FFFh 7436 00007F95 8B3E[5C8C] <1> mov di, word [load_data - LOADDATA2 + ldCurrentSeek] 7437 00007F99 8B36[5E8C] <1> mov si, word [load_data - LOADDATA2 + ldCurrentSeek + 2] 7438 00007F9D 3B36[548C] <1> cmp si, word [load_data - LOADDATA2 + ldFileSize] 7439 00007FA1 7506 <1> jne .set_error 7440 00007FA3 3B3E[568C] <1> cmp di, word [load_data - LOADDATA2 + ldFileSize + 2] 7441 00007FA7 7401 <1> je .do_not_set_error ; if same then NC --> 7442 <1> .set_error: 7443 00007FA9 F9 <1> stc 7444 <1> .do_not_set_error: 7445 <1> @@: 7446 00007FAA 9C <1> pushf 7447 00007FAB 83C002 <1> add ax, 2 7448 00007FAE 83D200 <1> adc dx, 0 7449 00007FB1 A3[588C] <1> mov word [load_data - LOADDATA2 + ldCurrentCluster], ax 7450 00007FB4 8916[5A8C] <1> mov word [load_data - LOADDATA2 + ldCurrentCluster + 2], dx 7451 00007FB8 9D <1> popf ; CF 7452 00007FB9 7209 <1> jc .error 7453 00007FBB 8B4EFE <1> mov cx, word [bp + ?length] 7454 00007FBE E303 <1> jcxz .success 7455 00007FC0 E9FBFE <1> jmp .next_cluster 7456 <1> 7457 <1> .success: 7458 00007FC3 A8 <1> db __TEST_IMM8 ; (skip stc, NC) 7459 <1> .error: 7460 00007FC4 F9 <1> stc 7461 <1> 7462 00007FC5 5D <1> pop bp 7463 <1> 7464 00007FC6 8F06[9E0A] <1> pop word [throwsp] 7465 00007FCA 8F06[9C0A] <1> pop word [throwret] ; restore throw destination 7466 00007FCE 8F06[9A0A] <1> pop word [errret] 7467 <1> 7468 00007FD2 9C <1> pushf 7469 00007FD3 F646EE01 <1> testopt [bp + ?did_guard_auxbuff], 1 7470 00007FD7 7405 <1> jz @F 7471 00007FD9 8026[A700]EF <1> clropt [internalflags3], dif3_auxbuff_guarded_1 7472 <1> @@: 7473 00007FDE 9D <1> popf ; CF 7474 <1> 7475 00007FDF E869FE <1> call yy_boot_update 7476 <1> 7477 00007FE2 5F <1> pop di 7478 00007FE3 5E <1> pop si 7479 00007FE4 5A <1> pop dx 7480 00007FE5 58 <1> pop ax ; pop from ?read_how_many 7481 00007FE6 89EC5D <1> lleave 7482 00007FE9 C3 <1> retn 7483 <1> 7484 <1> .err_ret: 7485 00007FEA 8B26[9E0A] <1> mov sp, word [throwsp] ; restore stack 7486 <1> ; (needed here if returned to errret) 7487 00007FEE EBD4 <1> jmp .error 7488 <1> 7489 <1> 7490 <1> ; INP: [load_input_file] = active file 7491 <1> ; cx:dx = signed seek distance from current 7492 <1> ; OUT: - 7493 <1> ; CHG: ax, bx, cx, dx 7494 <1> ; STT: ds = es = ss 7495 <1> yy_boot_seek_current: 7496 <1> lframe near 7497 <1> lvar dword, length 7498 <1> lvar dword, length_this_cluster 7499 <1> lvar dword, bytes_per_cluster 7500 <1> lvar dword, how_far_in_cluster 7501 00007FF0 5589E58D66F0 <1> lenter 7502 <1> lvar dword, seek_distance 7503 00007FF6 51 <1> push cx 7504 00007FF7 52 <1> push dx 7505 00007FF8 31C0 <1> xor ax, ax 7506 <1> lvar word, did_guard_auxbuff 7507 00007FFA 50 <1> push ax 7508 00007FFB 56 <1> push si 7509 00007FFC 57 <1> push di 7510 <1> 7511 00007FFD FF36[9A0A] <1> push word [errret] 7512 00008001 FF36[9C0A] <1> push word [throwret] 7513 00008005 FF36[9E0A] <1> push word [throwsp] 7514 <1> 7515 00008009 55 <1> push bp 7516 <1> 7517 0000800A C706[9A0A][3482] <1> mov word [errret], .err_ret 7518 00008010 C706[9C0A][3482] <1> mov word [throwret], .err_ret 7519 00008016 8926[9E0A] <1> mov word [throwsp], sp 7520 <1> 7521 0000801A E815FE <1> call yy_boot_get 7522 <1> 7523 0000801D E8BF84 <1> call guard_auxbuff 7524 00008020 FF46EA <1> inc word [bp + ?did_guard_auxbuff] 7525 <1> 7526 00008023 85C9 <1> test cx, cx 7527 00008025 7975 <1> jns .plus 7528 <1> 7529 00008027 8B36[5E8C] <1> mov si, word [load_data - LOADDATA2 + ldCurrentSeek + 2] 7530 0000802B 8B3E[5C8C] <1> mov di, word [load_data - LOADDATA2 + ldCurrentSeek] 7531 0000802F A1[9B8C] <1> mov ax, word [load_data - LOADDATA2 + bsBPB + bpbBytesPerSector] 7532 00008032 F726[788C] <1> mul word [load_data - LOADDATA2 + ldClusterSize] 7533 <1> 7534 00008036 8946F4 <1> mov word [bp + ?bytes_per_cluster], ax 7535 00008039 8956F6 <1> mov word [bp + ?bytes_per_cluster + 2], dx 7536 0000803C 83E801 <1> sub ax, 1 7537 0000803F 83DA00 <1> sbb dx, 0 7538 00008042 F7D0 <1> not ax 7539 00008044 F7D2 <1> not dx 7540 <1> 7541 00008046 56 <1> push si 7542 00008047 57 <1> push di 7543 <1> 7544 00008048 21D6 <1> and si, dx 7545 0000804A 21C7 <1> and di, ax ; start seek of current cluster 7546 <1> 7547 0000804C 58 <1> pop ax 7548 0000804D 5A <1> pop dx ; current seek 7549 <1> 7550 0000804E 0346EC <1> add ax, word [bp + ?seek_distance] 7551 00008051 1356EE <1> adc dx, word [bp + ?seek_distance + 2] 7552 00008054 7203E9B801 <1> jnc .error ; target seek 7553 <1> 7554 <1> ; if the cluster is invalid, need to reset 7555 00008059 813E[5A8C]FF0F <1> cmp word [load_data - LOADDATA2 + ldCurrentCluster + 2], 0FFFh 7556 0000805F 7207 <1> jb @F 7557 00008061 833E[588C]F8 <1> cmp word [load_data - LOADDATA2 + ldCurrentCluster], 0FFF8h 7558 00008066 7308 <1> jae .minus_reset 7559 <1> @@: 7560 <1> 7561 00008068 39F2 <1> cmp dx, si ; is target seek 7562 <1> ; >= start seek of current cluster? 7563 0000806A 7502 <1> jne @F 7564 0000806C 39F8 <1> cmp ax, di 7565 <1> @@: 7566 0000806E 7322 <1> jae .minus_simple ; yes, simple --> 7567 <1> 7568 <1> .minus_reset: 7569 <1> ; reset current cluster to first, seek to 0 7570 00008070 FF36[828C] <1> push word [load_data - LOADDATA2 + lsvFirstCluster + 2] 7571 00008074 FF36[808C] <1> push word [load_data - LOADDATA2 + lsvFirstCluster] 7572 00008078 8F06[588C] <1> pop word [load_data - LOADDATA2 + ldCurrentCluster] 7573 0000807C 8F06[5A8C] <1> pop word [load_data - LOADDATA2 + ldCurrentCluster + 2] 7574 00008080 8326[5C8C]00 <1> and word [load_data - LOADDATA2 + ldCurrentSeek], 0 7575 00008085 8326[5E8C]00 <1> and word [load_data - LOADDATA2 + ldCurrentSeek + 2], 0 7576 <1> 7577 <1> ; set distance 7578 0000808A 8946EC <1> mov word [bp + ?seek_distance], ax 7579 0000808D 8956EE <1> mov word [bp + ?seek_distance + 2], dx 7580 <1> ; use positive seek code 7581 00008090 EB0A <1> jmp .plus 7582 <1> 7583 <1> .minus_simple: 7584 <1> ; just set seek, current cluster still valid 7585 00008092 A3[5C8C] <1> mov word [load_data - LOADDATA2 + ldCurrentSeek], ax 7586 00008095 8916[5E8C] <1> mov word [load_data - LOADDATA2 + ldCurrentSeek + 2], dx 7587 00008099 E97501 <1> jmp .return 7588 <1> 7589 <1> .plus: 7590 0000809C 8B16[568C] <1> mov dx, word [load_data - LOADDATA2 + ldFileSize + 2] 7591 000080A0 A1[548C] <1> mov ax, word [load_data - LOADDATA2 + ldFileSize] 7592 <1> 7593 000080A3 2B06[5C8C] <1> sub ax, word [load_data - LOADDATA2 + ldCurrentSeek] 7594 000080A7 1B16[5E8C] <1> sbb dx, word [load_data - LOADDATA2 + ldCurrentSeek + 2] 7595 <1> 7596 000080AB 720A <1> jc .eof 7597 <1> ; dx:ax = how far we can seek within file 7598 000080AD 3B56EE <1> cmp dx, word [bp + ?seek_distance + 2] 7599 000080B0 7503 <1> jne @F 7600 000080B2 3B46EC <1> cmp ax, word [bp + ?seek_distance] 7601 <1> @@: 7602 000080B5 771D <1> ja .not_eof 7603 <1> .eof: 7604 000080B7 8B46EC <1> mov ax, word [bp + ?seek_distance] 7605 000080BA 8B56EE <1> mov dx, word [bp + ?seek_distance + 2] 7606 000080BD 0106[5C8C] <1> add word [load_data - LOADDATA2 + ldCurrentSeek], ax 7607 000080C1 1116[5E8C] <1> adc word [load_data - LOADDATA2 + ldCurrentSeek + 2], dx 7608 000080C5 C706[588C]F8FF <1> mov word [load_data - LOADDATA2 + ldCurrentCluster], 0FFF8h 7609 000080CB C706[5A8C]FF0F <1> mov word [load_data - LOADDATA2 + ldCurrentCluster + 2], 0FFFh 7610 000080D1 E93D01 <1> jmp .return 7611 <1> 7612 <1> .not_eof: 7613 000080D4 8B4EEC <1> mov cx, word [bp + ?seek_distance] 7614 000080D7 8B5EEE <1> mov bx, word [bp + ?seek_distance + 2] 7615 000080DA 85DB <1> test bx, bx 7616 000080DC 7507 <1> jnz @F 7617 000080DE 85C9 <1> test cx, cx 7618 000080E0 7503E92C01 <1> jz .return 7619 <1> @@: 7620 000080E5 894EFC <1> mov word [bp + ?length], cx 7621 000080E8 895EFE <1> mov word [bp + ?length + 2], bx 7622 <1> 7623 <1> ; bx:cx = length 7624 <1> .next_cluster: 7625 000080EB 8B36[5E8C] <1> mov si, word [load_data - LOADDATA2 + ldCurrentSeek + 2] 7626 000080EF 8B3E[5C8C] <1> mov di, word [load_data - LOADDATA2 + ldCurrentSeek] 7627 000080F3 A1[9B8C] <1> mov ax, word [load_data - LOADDATA2 + bsBPB + bpbBytesPerSector] 7628 000080F6 F726[788C] <1> mul word [load_data - LOADDATA2 + ldClusterSize] 7629 <1> 7630 000080FA 8946F4 <1> mov word [bp + ?bytes_per_cluster], ax 7631 000080FD 8956F6 <1> mov word [bp + ?bytes_per_cluster + 2], dx 7632 00008100 83E801 <1> sub ax, 1 7633 00008103 83DA00 <1> sbb dx, 0 7634 00008106 21D6 <1> and si, dx 7635 00008108 21C7 <1> and di, ax ; how far are we into cluster 7636 <1> 7637 0000810A 897EF0 <1> mov word [bp + ?how_far_in_cluster], di 7638 0000810D 8976F2 <1> mov word [bp + ?how_far_in_cluster + 2], si 7639 <1> 7640 00008110 F7DE <1> neg si 7641 00008112 F7DF <1> neg di 7642 00008114 83DE00 <1> sbb si, byte 0 ; neg si:di 7643 <1> 7644 00008117 037EF4 <1> add di, word [bp + ?bytes_per_cluster] 7645 0000811A 1376F6 <1> adc si, word [bp + ?bytes_per_cluster + 2] 7646 <1> ; cluster size - how far we are 7647 <1> ; = how much to read from this cluster 7648 0000811D 39DE <1> cmp si, bx 7649 0000811F 7502 <1> jne @F 7650 00008121 39CF <1> cmp di, cx 7651 <1> @@: 7652 00008123 7304 <1> jae .use_count_2 7653 00008125 89F9 <1> mov cx, di 7654 00008127 89F3 <1> mov bx, si 7655 <1> .use_count_2: 7656 <1> ; bx:cx = how far to seek in this cluster 7657 00008129 894EF8 <1> mov word [bp + ?length_this_cluster], cx 7658 0000812C 895EFA <1> mov word [bp + ?length_this_cluster + 2], bx 7659 <1> 7660 <1> .next_sector: 7661 0000812F A1[588C] <1> mov ax, word [load_data - LOADDATA2 + ldCurrentCluster] 7662 00008132 8B16[5A8C] <1> mov dx, word [load_data - LOADDATA2 + ldCurrentCluster + 2] 7663 00008136 E83AF4 <1> call check_clust 7664 00008139 7303E9D300 <1> jc .error 7665 0000813E 8B1E[9B8C] <1> mov bx, word [load_data - LOADDATA2 + bsBPB + bpbBytesPerSector] 7666 00008142 8B7EF0 <1> mov di, word [bp + ?how_far_in_cluster] 7667 00008145 8B76F2 <1> mov si, word [bp + ?how_far_in_cluster + 2] 7668 <1> 7669 00008148 87D6 <1> xchg dx, si 7670 0000814A 97 <1> xchg ax, di 7671 0000814B F7F3 <1> div bx 7672 <1> ; dx = byte offset into sector 7673 <1> ; ax = sector offset into cluster's data 7674 0000814D 87D6 <1> xchg dx, si 7675 0000814F 97 <1> xchg ax, di 7676 <1> ; si = byte offset 7677 <1> 7678 00008150 89F1 <1> mov cx, si ; = byte offset 7679 00008152 F7D9 <1> neg cx ; - byte offset 7680 00008154 01D9 <1> add cx, bx ; sector size - byte offset 7681 <1> ; = length this sector 7682 00008156 837EFA00 <1> cmp word [bp + ?length_this_cluster + 2], 0 7683 0000815A 7508 <1> jne @F ; fill remaining sector size 7684 0000815C 3B4EF8 <1> cmp cx, word [bp + ?length_this_cluster] 7685 0000815F 7603 <1> jbe @F ; sector has less than requested --> 7686 00008161 8B4EF8 <1> mov cx, word [bp + ?length_this_cluster] 7687 <1> ; fill entire remaining request 7688 <1> @@: 7689 00008164 294EF8 <1> sub word [bp + ?length_this_cluster], cx 7690 00008167 835EFA00 <1> sbb word [bp + ?length_this_cluster + 2], 0 7691 0000816B 294EFC <1> sub word [bp + ?length], cx 7692 0000816E 835EFE00 <1> sbb word [bp + ?length + 2], 0 7693 00008172 010E[5C8C] <1> add word [load_data - LOADDATA2 + ldCurrentSeek], cx 7694 00008176 8316[5E8C]00 <1> adc word [load_data - LOADDATA2 + ldCurrentSeek + 2], 0 7695 0000817B 014EF0 <1> add word [bp + ?how_far_in_cluster], cx 7696 0000817E 8356F200 <1> adc word [bp + ?how_far_in_cluster + 2], 0 7697 <1> 7698 00008182 837EFA00 <1> cmp word [bp + ?length_this_cluster + 2], 0 7699 00008186 75A7 <1> jne .next_sector 7700 00008188 837EF800 <1> cmp word [bp + ?length_this_cluster], 0 7701 0000818C 75A1 <1> jne .next_sector 7702 <1> 7703 0000818E 8B7EF4 <1> mov di, word [bp + ?bytes_per_cluster] 7704 00008191 8B76F6 <1> mov si, word [bp + ?bytes_per_cluster + 2] 7705 00008194 397EF0 <1> cmp word [bp + ?how_far_in_cluster], di 7706 00008197 7505 <1> jne @F 7707 00008199 3976F2 <1> cmp word [bp + ?how_far_in_cluster + 2], si 7708 0000819C 740E <1> je @FF 7709 <1> @@: 7710 0000819E 837EFE00 <1> cmp word [bp + ?length + 2], 0 7711 000081A2 756D <1> jne .error 7712 000081A4 837EFC00 <1> cmp word [bp + ?length], 0 7713 000081A8 7567 <1> jne .error 7714 000081AA EB65 <1> jmp .return 7715 <1> 7716 <1> @@: 7717 000081AC A1[588C] <1> mov ax, word [load_data - LOADDATA2 + ldCurrentCluster] 7718 000081AF 8B16[5A8C] <1> mov dx, word [load_data - LOADDATA2 + ldCurrentCluster + 2] 7719 000081B3 E8BDF3 <1> call check_clust 7720 000081B6 7259 <1> jc .error 7721 000081B8 E804F3 <1> call clust_next.dxax 7722 000081BB 732F <1> jnc @F ; (NC) --> 7723 000081BD B8F6FF <1> mov ax, 0FFF8h - 2 7724 000081C0 BAFF0F <1> mov dx, 0FFFh 7725 000081C3 8B3E[5C8C] <1> mov di, word [load_data - LOADDATA2 + ldCurrentSeek] 7726 000081C7 8B36[5E8C] <1> mov si, word [load_data - LOADDATA2 + ldCurrentSeek + 2] 7727 000081CB 3B36[548C] <1> cmp si, word [load_data - LOADDATA2 + ldFileSize] 7728 000081CF 7506 <1> jne .set_error 7729 000081D1 3B3E[568C] <1> cmp di, word [load_data - LOADDATA2 + ldFileSize + 2] 7730 000081D5 7401 <1> je .do_not_set_error ; if same then NC --> 7731 <1> .set_error: 7732 000081D7 F9 <1> stc 7733 <1> .do_not_set_error: 7734 000081D8 9C <1> pushf 7735 000081D9 31C9 <1> xor cx, cx 7736 000081DB 31DB <1> xor bx, bx 7737 000081DD 874EFC <1> xchg cx, word [bp + ?length] 7738 000081E0 875EFE <1> xchg bx, word [bp + ?length + 2] 7739 000081E3 010E[5C8C] <1> add word [load_data - LOADDATA2 + ldCurrentSeek], cx 7740 000081E7 111E[5E8C] <1> adc word [load_data - LOADDATA2 + ldCurrentSeek + 2], bx 7741 000081EB A8 <1> db __TEST_IMM8 ; (skip pushf) 7742 <1> @@: 7743 000081EC 9C <1> pushf 7744 000081ED 83C002 <1> add ax, 2 7745 000081F0 83D200 <1> adc dx, 0 7746 000081F3 A3[588C] <1> mov word [load_data - LOADDATA2 + ldCurrentCluster], ax 7747 000081F6 8916[5A8C] <1> mov word [load_data - LOADDATA2 + ldCurrentCluster + 2], dx 7748 000081FA 9D <1> popf ; CF 7749 000081FB 7214 <1> jc .error 7750 000081FD 8B4EFC <1> mov cx, word [bp + ?length] 7751 00008200 8B5EFE <1> mov bx, word [bp + ?length + 2] 7752 00008203 85DB <1> test bx, bx 7753 00008205 7403E9E1FE <1> jnz .next_cluster 7754 0000820A 85C9 <1> test cx, cx 7755 0000820C 7403E9DAFE <1> jnz .next_cluster 7756 <1> .return: 7757 <1> .error: 7758 <1> 7759 00008211 5D <1> pop bp 7760 <1> 7761 00008212 8F06[9E0A] <1> pop word [throwsp] 7762 00008216 8F06[9C0A] <1> pop word [throwret] ; restore throw destination 7763 0000821A 8F06[9A0A] <1> pop word [errret] 7764 <1> 7765 0000821E 9C <1> pushf 7766 0000821F F646EA01 <1> testopt [bp + ?did_guard_auxbuff], 1 7767 00008223 7405 <1> jz @F 7768 00008225 8026[A700]EF <1> clropt [internalflags3], dif3_auxbuff_guarded_1 7769 <1> @@: 7770 0000822A 9D <1> popf ; CF 7771 <1> 7772 0000822B E81DFC <1> call yy_boot_update 7773 <1> 7774 0000822E 5F <1> pop di 7775 0000822F 5E <1> pop si 7776 00008230 89EC5D <1> lleave 7777 00008233 C3 <1> retn 7778 <1> 7779 <1> .err_ret: 7780 00008234 8B26[9E0A] <1> mov sp, word [throwsp] ; restore stack 7781 <1> ; (needed here if returned to errret) 7782 00008238 EBD7 <1> jmp .error 7783 <1> 7784 <1> 7785 <1> ; INP: [load_input_file] = active file 7786 <1> ; cx:dx = 0 7787 <1> ; OUT: - 7788 <1> ; CHG: ax, bx, cx, dx 7789 <1> ; STT: ds = es = ss 7790 <1> yy_boot_seek_start: 7791 0000823A 56 <1> push si 7792 0000823B 57 <1> push di 7793 <1> 7794 0000823C E8F3FB <1> call yy_boot_get 7795 <1> 7796 <1> .reset: 7797 <1> ; reset current cluster to first, seek to 0 7798 0000823F FF36[828C] <1> push word [load_data - LOADDATA2 + lsvFirstCluster + 2] 7799 00008243 FF36[808C] <1> push word [load_data - LOADDATA2 + lsvFirstCluster] 7800 00008247 8F06[588C] <1> pop word [load_data - LOADDATA2 + ldCurrentCluster] 7801 0000824B 8F06[5A8C] <1> pop word [load_data - LOADDATA2 + ldCurrentCluster + 2] 7802 0000824F 8326[5C8C]00 <1> and word [load_data - LOADDATA2 + ldCurrentSeek], 0 7803 00008254 8326[5E8C]00 <1> and word [load_data - LOADDATA2 + ldCurrentSeek + 2], 0 7804 <1> 7805 00008259 E8EFFB <1> call yy_boot_update 7806 <1> 7807 0000825C 5F <1> pop di 7808 0000825D 5E <1> pop si 7809 0000825E C3 <1> retn 7810 <1> %endif 7811 <1> 7812 <1> 7813 <1> ; INP: bp = load_data - LOADDATA2 7814 <1> initialise_fs: 7815 <1> ; (boot.asm code starts here) 7816 <1> 7817 0000825F 31C0 <1> xor ax, ax 7818 <1> ; calculate some values that we need: 7819 <1> ; adjusted sectors per cluster (store in a word, 7820 <1> ; and decode EDR-DOS's special value 0 meaning 256) 7821 00008261 8A460D <1> mov al, [bp + bsBPB + bpbSectorsPerCluster] 7822 00008264 FEC8 <1> dec al 7823 00008266 40 <1> inc ax 7824 00008267 8946E8 <1> mov [bp + ldClusterSize], ax 7825 <1> 7826 0000826A 8B46D4 <1> mov ax, [bp + ldEntriesPerSector] 7827 <1> 7828 <1> ; number of sectors used for root directory (store in CX) 7829 0000826D 31D2 <1> xor dx, dx 7830 0000826F 89C3 <1> mov bx, ax 7831 00008271 48 <1> dec ax ; rounding up 7832 00008272 034611 <1> add ax, [bp + bsBPB + bpbNumRootDirEnts] ; (0 iff FAT32) 7833 00008275 11D2 <1> adc dx, dx ; account for overflow (dx was zero) 7834 00008277 F7F3 <1> div bx ; get number of root sectors 7835 00008279 91 <1> xchg ax, cx ; cx = number of root secs 7836 <1> 7837 <1> 7838 <1> ; (iniload.asm code starts here) 7839 <1> 7840 0000827A 51 <1> push cx ; number of root secs 7841 0000827B 31C0 <1> xor ax, ax 7842 <1> ; first sector of root directory 7843 0000827D 8A4610 <1> mov al, [bp + bsBPB + bpbNumFATs] ; ! ah = 0, hence ax = number of FATs 7844 00008280 8B4E16 <1> mov cx, word [bp + bsBPB + bpbSectorsPerFAT] 7845 00008283 31FF <1> xor di, di ; di:cx = sectors per FAT 7846 <1> ; iff FAT12, FAT16 7847 00008285 85C9 <1> test cx, cx ; is FAT32 ? 7848 00008287 7506 <1> jnz @F ; no --> 7849 00008289 8B4E24 <1> mov cx, word [bp + bsBPB + ebpbSectorsPerFATLarge] 7850 0000828C 8B7E26 <1> mov di, word [bp + bsBPB + ebpbSectorsPerFATLarge + 2] ; for FAT32 7851 <1> @@: 7852 0000828F 50 <1> push ax 7853 00008290 F7E1 <1> mul cx 7854 <1> ; ax = low word SpF*nF 7855 <1> ; dx = high word 7856 00008292 93 <1> xchg bx, ax 7857 00008293 87CA <1> xchg cx, dx 7858 <1> ; cx:bx = first mul 7859 00008295 58 <1> pop ax 7860 00008296 F7E7 <1> mul di 7861 <1> ; ax = high word adjust 7862 <1> ; dx = third word 7863 00008298 85D2 <1> test dx, dx 7864 0000829A 740C <1> jz @F 7865 <1> .error_badchain: 7866 <1> error_badchain: equ $ 7867 0000829C BA[8F62] <1> mov dx, msg.boot_badchain 7868 0000829F B80D02 <1> mov ax, 020Dh 7869 000082A2 E87E22 <1> call setrc 7870 000082A5 E955E1 <1> jmp bootcmd.fail 7871 <1> 7872 <1> @@: 7873 000082A8 92 <1> xchg dx, ax 7874 <1> ; dx = high word adjust 7875 000082A9 01CA <1> add dx, cx 7876 <1> ; dx:bx = result 7877 000082AB 93 <1> xchg ax, bx 7878 <1> ; dx:ax = result 7879 000082AC 72EE <1> jc .error_badchain 7880 <1> 7881 000082AE 03460E <1> add ax, [bp + bsBPB + bpbReservedSectors] 7882 000082B1 83D200 <1> adc dx, byte 0 7883 000082B4 72E6 <1> jc .error_badchain 7884 <1> 7885 000082B6 59 <1> pop cx ; number of root sectors 7886 000082B7 31FF <1> xor di, di 7887 <1> 7888 <1> ; first sector of disk data area: 7889 000082B9 01C1 <1> add cx, ax 7890 000082BB 11D7 <1> adc di, dx 7891 000082BD 72DD <1> jc .error_badchain 7892 000082BF 894EFC <1> mov [bp + lsvDataStart], cx 7893 000082C2 897EFE <1> mov [bp + lsvDataStart + 2], di 7894 <1> 7895 000082C5 8946D0 <1> mov [bp + ldRootSector], ax 7896 000082C8 8956D2 <1> mov [bp + ldRootSector + 2], dx 7897 <1> 7898 <1> ; total sectors 7899 000082CB 31D2 <1> xor dx, dx 7900 000082CD 8B4613 <1> mov ax, [bp + bsBPB + bpbTotalSectors] 7901 000082D0 85C0 <1> test ax, ax 7902 000082D2 7506 <1> jnz @F 7903 000082D4 8B5622 <1> mov dx, [bp + bsBPB + bpbTotalSectorsLarge + 2] 7904 000082D7 8B4620 <1> mov ax, [bp + bsBPB + bpbTotalSectorsLarge] 7905 <1> 7906 <1> ; fall through and let it overwrite the field with the 7907 <1> ; already current contents. saves a jump. 7908 <1> @@: 7909 000082DA 895622 <1> mov [bp + bsBPB + bpbTotalSectorsLarge + 2], dx 7910 000082DD 894620 <1> mov [bp + bsBPB + bpbTotalSectorsLarge], ax 7911 <1> 7912 <1> ; dx:ax = total sectors 7913 <1> 7914 000082E0 8B5E16 <1> mov bx, [bp + bsBPB + bpbSectorsPerFAT] 7915 000082E3 C646E620 <1> mov byte [bp + ldFATType], 32 7916 000082E7 85DB <1> test bx, bx 7917 000082E9 740B <1> jz @F 7918 <1> 7919 000082EB 31C9 <1> xor cx, cx 7920 <1> 7921 000082ED 895E24 <1> mov word [bp + bsBPB + ebpbSectorsPerFATLarge], bx 7922 000082F0 894E26 <1> mov word [bp + bsBPB + ebpbSectorsPerFATLarge + 2], cx 7923 000082F3 894E28 <1> mov word [bp + bsBPB + ebpbFSFlags], cx 7924 <1> ; FSVersion, RootCluster, FSINFOSector, BackupSector, Reserved: 7925 <1> ; uninitialised here (initialised by loaded_all later) 7926 <1> 7927 <1> @@: 7928 <1> ; dx:ax = total amount of sectors 7929 000082F6 2B46FC <1> sub ax, word [bp + lsvDataStart] 7930 000082F9 1B56FE <1> sbb dx, word [bp + lsvDataStart + 2] 7931 <1> 7932 <1> ; dx:ax = total amount of data sectors 7933 000082FC 89C3 <1> mov bx, ax 7934 000082FE 92 <1> xchg ax, dx 7935 000082FF 31D2 <1> xor dx, dx 7936 00008301 F776E8 <1> div word [bp + ldClusterSize] 7937 00008304 93 <1> xchg bx, ax 7938 00008305 F776E8 <1> div word [bp + ldClusterSize] 7939 <1> ; bx:ax = quotient, dx = remainder 7940 <1> ; bx:ax = number of clusters 7941 00008308 85DB <1> test bx, bx 7942 0000830A 741F <1> jz @FF 7943 <1> ; >= 1_0000h clusters, should be FAT32 7944 0000830C 81FBFF0F <1> cmp bx, 0FFFh 7945 00008310 770D <1> ja .badclusters 7946 00008312 7505 <1> jne @F 7947 00008314 83F8F5 <1> cmp ax, 0FFF7h - 2 7948 00008317 7706 <1> ja .badclusters 7949 <1> @@: 7950 <1> ; check it is really FAT32 7951 00008319 837E1600 <1> cmp word [bp + bsBPB + bpbSectorsPerFAT], 0 7952 0000831D 7447 <1> je .gotfattype 7953 <1> 7954 <1> .badclusters: 7955 0000831F BA[7562] <1> mov dx, msg.boot_badclusters 7956 00008322 B80E02 <1> mov ax, 020Eh 7957 00008325 E8FB21 <1> call setrc 7958 00008328 E9D2E0 <1> jmp bootcmd.fail 7959 <1> 7960 <1> @@: 7961 <1> ; <= FFFFh clusters, must be FAT16 or FAT12 7962 <1> ; check it is really not FAT32 7963 0000832B 837E1600 <1> cmp word [bp + bsBPB + bpbSectorsPerFAT], 0 7964 0000832F 74EE <1> je .badclusters 7965 <1> 7966 00008331 83F8F5 <1> cmp ax, 0FFF7h - 2 ; too much for FAT16 ? 7967 00008334 77E9 <1> ja .badclusters 7968 00008336 C646E610 <1> mov byte [bp + ldFATType], 16 7969 0000833A 3DF50F <1> cmp ax, 0FF7h - 2 ; is it FAT12 ? 7970 0000833D 7727 <1> ja .gotfattype ; no, is FAT16 --> 7971 <1> 7972 0000833F C646E60C <1> mov byte [bp + ldFATType], 12 7973 <1> 7974 00008343 F606[778C]02 <1> testopt [load_ldflags], ldfFATInvalid 7975 00008348 751C <1> jnz .gotfattype 7976 <1> 7977 0000834A 53 <1> push bx 7978 0000834B 50 <1> push ax 7979 <1> ; (boot.asm code continues here) 7980 <1> 7981 <1> ; Load the entire FAT into memory. This is easily feasible for FAT12, 7982 <1> ; as the FAT can only contain at most 4096 entries. 7983 <1> ; (The exact condition should be "at most 4087 entries", or with a 7984 <1> ; specific FF7h semantic, "at most 4088 entries"; the more reliable 7985 <1> ; and portable alternative would be "at most 4080 entries".) 7986 <1> ; Thus, no more than 6 KiB need to be read, even though the FAT size 7987 <1> ; as indicated by word[sectors_per_fat] could be much higher. The 7988 <1> ; first loop condition below is to correctly handle the latter case. 7989 <1> ; (Sector size is assumed to be a power of two between 32 and 8192 7990 <1> ; bytes, inclusive. An 8 KiB buffer is necessary if the sector size 7991 <1> ; is 4 or 8 KiB, because reading the FAT can or will write to 8 KiB 7992 <1> ; of memory instead of only the relevant 6 KiB. This is always true 7993 <1> ; if the sector size is 8 KiB, and with 4 KiB sector size it is true 7994 <1> ; iff word[sectors_per_fat] is higher than one.) 7995 0000834C BF0018 <1> mov di, 6 << 10 ; maximum size of FAT12 to load 7996 0000834F 8B4E16 <1> mov cx, [bp + bsBPB + bpbSectorsPerFAT] 7997 <1> ; maximum size of this FS's FAT 7998 00008352 31D2 <1> xor dx, dx 7999 00008354 8B460E <1> mov ax, [bp + bsBPB + bpbReservedSectors]; = first FAT sector 8000 00008357 8B5EF8 <1> mov bx, [bp + lsvFATSeg] 8001 <1> @@: 8002 0000835A E8B8F5 <1> call read_sector ; read next FAT sector 8003 0000835D 2B7E0B <1> sub di, [bp + bsBPB + bpbBytesPerSector] 8004 <1> ; di = bytes still left to read 8005 00008360 7602 <1> jbe @F ; if none --> 8006 <1> ; (jbe means jump if CF || ZF) 8007 00008362 E2F6 <1> loop @B ; if any FAT sector still remains --> 8008 <1> @@: ; one of the limits reached; FAT read 8009 00008364 58 <1> pop ax 8010 00008365 5B <1> pop bx 8011 <1> 8012 <1> .gotfattype: 8013 <1> 8014 <1> ; if bx:ax = 1, then entries 0, 1, 2 are valid 8015 00008366 83C001 <1> add ax, 1 8016 00008369 83D300 <1> adc bx, 0 8017 <1> ; max entry is x+1 (2 if x=1) 8018 <1> 8019 0000836C 8946C0 <1> mov word [bp + ldMaxCluster], ax 8020 0000836F 895EC2 <1> mov word [bp + ldMaxCluster + 2], bx 8021 <1> 8022 <1> ; if bx:ax was = 1, then entries below 3 have to exist 8023 00008372 83C001 <1> add ax, 1 8024 00008375 83D300 <1> adc bx, 0 8025 <1> ; if bx:ax was 1, bx:ax now = 3 8026 <1> 8027 00008378 89DA <1> mov dx, bx 8028 <1> 8029 0000837A 807EE610 <1> cmp byte [bp + ldFATType], 16 8030 0000837E 720C <1> jb .check_fat_limit_12 8031 00008380 7404 <1> je .check_fat_limit_16 8032 <1> .check_fat_limit_32: 8033 00008382 01C0 <1> add ax, ax 8034 00008384 11D2 <1> adc dx, dx 8035 <1> .check_fat_limit_16: 8036 00008386 01C0 <1> add ax, ax 8037 00008388 11D2 <1> adc dx, dx 8038 0000838A EB0D <1> jmp @F 8039 <1> 8040 <1> .check_fat_limit_12: 8041 0000838C 89C2 <1> mov dx, ax 8042 0000838E 01C0 <1> add ax, ax 8043 00008390 01D0 <1> add ax, dx ; * 3 8044 00008392 D1E8 <1> shr ax, 1 ; * 3 / 2 = * 1.5 8045 00008394 83D000 <1> adc ax, 0 ; if the last nybble is needed 8046 00008397 31D2 <1> xor dx, dx 8047 <1> 8048 <1> @@: 8049 00008399 8B5E0B <1> mov bx, word [bp + bsBPB + bpbBytesPerSector] 8050 0000839C 4B <1> dec bx 8051 0000839D 01D8 <1> add ax, bx 8052 0000839F 83D200 <1> adc dx, 0 8053 000083A2 43 <1> inc bx 8054 <1> 8055 000083A3 91 <1> xchg cx, ax 8056 000083A4 89D0 <1> mov ax, dx 8057 000083A6 31D2 <1> xor dx, dx 8058 000083A8 F7F3 <1> div bx 8059 000083AA 91 <1> xchg cx, ax 8060 000083AB F7F3 <1> div bx 8061 000083AD 87CA <1> xchg cx, dx 8062 <1> ; cx = remainder, dx:ax = number of sectors needed 8063 <1> 8064 000083AF 8B4E16 <1> mov cx, word [bp + bsBPB + bpbSectorsPerFAT] 8065 000083B2 31FF <1> xor di, di ; di:cx = sectors per FAT 8066 <1> ; iff FAT12, FAT16 8067 000083B4 85C9 <1> test cx, cx ; is FAT32 ? 8068 000083B6 7506 <1> jnz @F ; no --> 8069 000083B8 8B4E24 <1> mov cx, word [bp + bsBPB + ebpbSectorsPerFATLarge] 8070 000083BB 8B7E26 <1> mov di, word [bp + bsBPB + ebpbSectorsPerFATLarge + 2] ; for FAT32 8071 <1> @@: 8072 <1> 8073 000083BE 39D7 <1> cmp di, dx 8074 000083C0 7502 <1> jne @F 8075 000083C2 39C1 <1> cmp cx, ax 8076 <1> @@: 8077 000083C4 730C <1> jae @F 8078 <1> .badfat: 8079 000083C6 BA[A462] <1> mov dx, msg.boot_badfat 8080 000083C9 B80F02 <1> mov ax, 020Fh 8081 000083CC E85421 <1> call setrc 8082 000083CF E92BE0 <1> jmp bootcmd.fail 8083 <1> 8084 <1> @@: 8085 000083D2 C3 <1> retn 2489 %endif 2490 2491 2492 usesection lDEBUG_CODE 2493 2494 bb: 2495 %if _BOOTLDR 2496 000083D3 F606[9D00]40 testopt [internalflags], nodosloaded 2497 000083D8 740F jz @F 2498 000083DA 4E dec si 2499 000083DB 4E dec si ; -> at 'B' 2500 000083DC BA[9C63] mov dx, msg.boot 2501 000083DF E8AD34 call isstring? ; check for "BOOT" 2502 000083E2 7503E937DB je bootcmd 2503 000083E7 46 inc si ; skip 'B' 2504 000083E8 AC lodsb ; load next 2505 @@: 2506 %endif 2507 000083E9 E82708 call uppercase 2508 %if _BREAKPOINTS 2509 000083EC 3C50 cmp al, 'P' 2510 000083EE 7449 je point_set 2511 000083F0 3C4E cmp al, 'N' 2512 000083F2 7503E91302 je point_number 2513 000083F7 3C43 cmp al, 'C' 2514 000083F9 7503E9AA04 je point_clear 2515 000083FE 3C44 cmp al, 'D' 2516 00008400 7503E91E05 je point_disable 2517 00008405 3C45 cmp al, 'E' 2518 00008407 7503E90B05 je point_enable 2519 0000840C 3C54 cmp al, 'T' 2520 0000840E 7503E91A05 je point_toggle 2521 00008413 3C4C cmp al, 'L' 2522 00008415 7503E91D05 je point_list 2523 0000841A 3C49 cmp al, 'I' 2524 0000841C 7503E94102 je point_id 2525 00008421 3C57 cmp al, 'W' 2526 00008423 7503E97F03 je point_when 2527 %if BPSIZE == 6 || BPSIZE == 9 2528 00008428 3C4F cmp al, 'O' 2529 0000842A 7503E91803 je point_offset 2530 %endif 2531 %endif 2532 0000842F 3C55 cmp al, 'U' ; BU command ? 2533 00008431 7503E9D307 je bu_breakpoint 2534 2535 00008436 E9A320 jmp error ; no valid subcommand --> 2536 2537 %if _BREAKPOINTS 2538 point_set: 2539 00008439 E80735 call skipwhite 2540 2541 0000843C E8EB06 call getpointat ; "AT" keyword ? 2542 0000843F 720B jc .not_at ; no --> 2543 00008441 BF[7F84] mov di, .get_saved ; access saved address later 2544 00008444 E8A106 call findpointat ; do we find it ? 2545 00008447 7210 jc .find_new ; no, treat as if "NEW" keyword given --> 2546 ; point index is in dx 2547 00008449 52 push dx 2548 0000844A EB51 jmp @FF ; skip check whether used 2549 2550 .not_at: 2551 0000844C BF[7384] mov di, .get_addr ; get address from input command line later 2552 0000844F E8F906 call getpointindex 2553 00008452 7338 jnc @F ; got an index --> 2554 00008454 7503E98320 jz error ; "ALL" is invalid 2555 ; got "NEW" keyword 2556 .find_new: 2557 00008459 31C9 xor cx, cx 2558 0000845B 50 push ax 2559 .new_loop: 2560 0000845C 89C8 mov ax, cx ; try this index 2561 0000845E E87806 call calcpointbit 2562 %if ((_NUM_B_BP+7)>>3) != 1 2563 00008461 84A7[0201] test byte [b_bplist.used_mask+bx], ah 2564 %else 2565 test byte [b_bplist.used_mask], ah 2566 %endif 2567 00008465 7421 jz .new_found ; found unused one --> 2568 2569 00008467 41 inc cx ; = next index 2570 00008468 83F910 cmp cx, _NUM_B_BP ; valid ? 2571 0000846B 72EF jb .new_loop ; yes, try next --> 2572 2573 0000846D BA[D46D] mov dx, msg.bb_no_new 2574 00008470 E9FA7F jmp prnquit 2575 2576 2577 ; INP: al=, si-> input line 2578 ; OUT: al=, si-> after 2579 ; bx:dx = linear adddress 2580 ; does not return if error 2581 ; CHG: edxh 2582 .get_addr: 2583 00008473 8B1E[900C] mov bx, word [reg_cs] 2584 00008477 E832B3 call getlinearaddr 2585 0000847A 730B jnc .retn 2586 0000847C E95D20 jmp error 2587 2588 2589 ; INP: al=, si-> input line 2590 ; OUT: bx:dx = linear address 2591 ; CHG: - 2592 .get_saved: 2593 0000847F 8B16[F88F] mov dx, word [..@bb_saved_linear] 2594 00008483 8B1E[FA8F] mov bx, word [..@bb_saved_linear + 2] 2595 .retn: 2596 00008487 C3 retn 2597 2598 usesection lDEBUG_DATA_ENTRY 2599 00008FF6 00 align 4, db 0 2600 ..@bb_saved_linear: 2601 00008FF8 00000000 dd 0 2602 usesection lDEBUG_CODE 2603 2604 2605 .new_found: 2606 00008488 58 pop ax 2607 00008489 51 push cx 2608 0000848A EB11 jmp @FF 2609 2610 @@: 2611 0000848C 52 push dx 2612 0000848D 50 push ax 2613 0000848E 89D0 mov ax, dx 2614 00008490 E84606 call calcpointbit 2615 %if ((_NUM_B_BP+7)>>3) != 1 2616 00008493 84A7[0201] test byte [b_bplist.used_mask+bx], ah 2617 %else 2618 test byte [b_bplist.used_mask], ah 2619 %endif 2620 00008497 58 pop ax 2621 00008498 7403E93F20 jnz error 2622 @@: 2623 0000849D FFD7 call di ; call either .get_addr or .get_saved 2624 ; in any case, bx:dx = linear address 2625 0000849F BF0080 mov di, 8000h ; default counter 2626 000084A2 52 push dx 2627 000084A3 31D2 xor dx, dx 2628 2629 usesection lDEBUG_DATA_ENTRY 2630 align 4, db 0 2631 ..@bb_id_start: 2632 00008FFC 0000 dw 0 2633 ..@bb_id_length: 2634 00008FFE 0000 dw 0 2635 ..@bb_when_start: 2636 00009000 0000 dw 0 2637 ..@bb_when_length: 2638 00009002 0000 dw 0 2639 usesection lDEBUG_CODE 2640 2641 2642 000084A5 8916[FE8F] mov word [..@bb_id_length], dx 2643 000084A9 8916[0290] mov word [..@bb_when_length], dx 2644 ; initialise to empty ID 2645 000084AD 52 push dx 2646 .loop_additional: 2647 000084AE E89334 call skipwh0 2648 000084B1 4E dec si 2649 000084B2 BA[4E65] mov dx, msg.number 2650 000084B5 E8D733 call isstring? 2651 000084B8 7435 je .additional_number 2652 000084BA BA[5565] mov dx, msg.counter 2653 000084BD E8CF33 call isstring? 2654 000084C0 742D je .additional_number 2655 000084C2 BA[5D65] mov dx, msg.id 2656 000084C5 E8C733 call isstring? 2657 000084C8 745A je .additional_id 2658 000084CA BA[6065] mov dx, msg.when 2659 000084CD E8BF33 call isstring? 2660 000084D0 7444 je .additional_when 2661 %if BPSIZE == 6 || BPSIZE == 9 2662 000084D2 BA[6565] mov dx, msg.offset 2663 000084D5 E8B733 call isstring? 2664 000084D8 7425 je .additional_offset 2665 %endif 2666 000084DA AC lodsb 2667 000084DB E81034 call iseol? 2668 000084DE 744B je .no_additional 2669 000084E0 5A pop dx 2670 000084E1 85D2 test dx, dx ; already got a number without keyword? 2671 000084E3 7403E9F41F jnz error ; yes --> 2672 000084E8 42 inc dx ; remember for subsequent iterations 2673 000084E9 52 push dx 2674 000084EA E85734 call skipwh0 2675 000084ED EB0B jmp @F 2676 2677 .additional_number: 2678 000084EF E83B34 call skipequals 2679 000084F2 E8F933 call iseol? 2680 000084F5 7503E9E21F je error 2681 @@: 2682 000084FA E8DC00 call getcounter 2683 000084FD EBAF jmp .loop_additional 2684 2685 %if BPSIZE == 6 || BPSIZE == 9 2686 .additional_offset: 2687 000084FF 5A pop dx 2688 00008500 80CA01 or dl, 1 ; remember for subsequent iterations 2689 ; not to accept number without keyword 2690 00008503 52 push dx 2691 00008504 E82634 call skipequals 2692 %if _PM 2693 00008507 53 push bx 2694 00008508 E8DC2D call getdword 2695 0000850B 8916[5085] mov word [bp_offset], dx 2696 0000850F 891E[5285] mov word [bp_offset + 2], bx 2697 00008513 5B pop bx 2698 %else 2699 call getword 2700 mov word [bp_offset], dx 2701 %endif 2702 00008514 EB98 jmp .loop_additional 2703 %endif 2704 2705 .additional_when: 2706 00008516 5A pop dx 2707 00008517 80CA01 or dl, 1 ; remember for subsequent iterations 2708 ; not to accept number without keyword 2709 0000851A 52 push dx 2710 0000851B E80F34 call skipequals 2711 0000851E 4E dec si 2712 0000851F E88C00 call get_when 2713 00008522 EB8A jmp .loop_additional 2714 2715 .additional_id: 2716 00008524 E80634 call skipequals 2717 00008527 4E dec si 2718 00008528 E85300 call get_id 2719 2720 .no_additional: 2721 0000852B 5A pop dx ; discard non-keyword NUMBER indicator 2722 0000852C 5A pop dx ; restore dx = low word of linear 2723 2724 0000852D 87DA xchg bx, dx ; dx:bx = linear 2725 0000852F 93 xchg bx, ax ; dx:ax = linear 2726 00008530 5B pop bx ; = 0-based point index to set 2727 00008531 52 push dx 2728 00008532 50 push ax ; on stack: dword linear 2729 2730 00008533 57 push di 2731 00008534 87D3 xchg dx, bx ; dx = point index 2732 2733 ; As for set_id, set_when will free a prior condition 2734 ; when writing the new one. However, we check for the 2735 ; appropriate buffer size being still free before 2736 ; calling set_when because we want to cancel the point 2737 ; initialisation if either the ID or the condition do 2738 ; not fit, without having yet written anything. 2739 00008536 E8F602 call check_when_space ; CHG ax, bx, cx, si, di 2740 2741 ; Note that point_clear and init both leave the 2742 ; empty word in the ID array. Therefore we can 2743 ; always handle this by freeing the prior value 2744 ; first, which is required if we're resetting 2745 ; an existing point with BP AT. 2746 ; The set_id function takes care of this. 2747 00008539 E86501 call set_id ; CHG ax, bx, cx, si, di 2748 2749 ; After check_when_space then set_id both returned, 2750 ; we have finally checked all error conditions and 2751 ; are now actually modifying things. 2752 0000853C E8B402 call set_when ; CHG ax, bx, cx, si, di 2753 0000853F 92 xchg ax, dx ; ax = point index 2754 00008540 5F pop di ; preserve counter value 2755 2756 00008541 89C3 mov bx, ax 2757 00008543 01DB add bx, bx 2758 00008545 01DB add bx, bx 2759 %if BPSIZE == 4 2760 %elif BPSIZE == 5 2761 add bx, ax 2762 %elif BPSIZE == 6 2763 add bx, ax ; * 5 2764 add bx, ax ; * 6 2765 %elif BPSIZE == 9 2766 00008547 01DB add bx, bx ; * 8 2767 00008549 01C3 add bx, ax ; * 9 2768 %else 2769 %error Unexpected breakpoint size 2770 %endif 2771 0000854B 8F87[0601] pop word [ b_bplist.bp + bx ] 2772 ; These two instructions need to stay in that order. 2773 ; For the non-PM version, the pop overwrites the byte 2774 ; that is then initialized to 0CCh (the breakpoint 2775 ; content byte). 2776 ; (This is not true for BPSIZE == 6. Instead, the pop 2777 ; overwrites the first byte of the preferred offset.) 2778 0000854F 8F87[0801] pop word [ b_bplist.bp + bx + 2 ] 2779 00008553 C687[0E01]CC mov byte [ b_bplist.bp + bx + BPSIZE - 1 ], 0CCh 2780 %if BPSIZE == 6 2781 push word [bp_offset] 2782 pop word [ b_bplist.bp + bx + 3 ] 2783 %elif BPSIZE == 9 2784 00008558 FF36[5085] push word [bp_offset] 2785 0000855C 8F87[0A01] pop word [ b_bplist.bp + bx + 4 ] 2786 00008560 FF36[5285] push word [bp_offset + 2] 2787 00008564 8F87[0C01] pop word [ b_bplist.bp + bx + 6 ] 2788 %endif 2789 00008568 89C3 mov bx, ax 2790 0000856A 01DB add bx, bx 2791 0000856C 89BF[9601] mov word [ b_bplist.counter + bx ], di 2792 00008570 E86605 call calcpointbit 2793 %if ((_NUM_B_BP+7)>>3) != 1 2794 00008573 08A7[0201] or byte [b_bplist.used_mask+bx], ah 2795 00008577 F6D4 not ah 2796 00008579 20A7[0401] and byte [b_bplist.disabled_mask+bx], ah 2797 %if _BREAKPOINTS_STICKY 2798 and byte [b_bplist.sticky_mask+bx], ah 2799 %endif 2800 %else 2801 or byte [b_bplist.used_mask], ah 2802 not ah 2803 and byte [b_bplist.disabled_mask], ah 2804 %if _BREAKPOINTS_STICKY 2805 and byte [b_bplist.sticky_mask], ah 2806 %endif 2807 %endif 2808 0000857D C3 retn 2809 2810 2811 ; INP: si -> first non-blank character 2812 ; OUT: ..@bb_id_start and ..@bb_id_length set 2813 ; does not return if error (too long) 2814 ; CHG: ax, cx, si 2815 get_id: 2816 0000857E 8936[FC8F] mov word [..@bb_id_start], si 2817 @@: 2818 00008582 AC lodsb 2819 00008583 E86C33 call iseol?.notsemicolon 2820 00008586 75FA jne @B 2821 ; si -> after EOL char 2822 ; si - 1 -> EOL char 2823 @@: 2824 00008588 4E dec si 2825 00008589 3B36[FC8F] cmp si, word [..@bb_id_start] 2826 0000858D 740C je @F 2827 0000858F 807CFF20 cmp byte [si - 1], 32 2828 00008593 74F3 je @B 2829 00008595 807CFF09 cmp byte [si - 1], 9 2830 00008599 74ED je @B 2831 @@: 2832 0000859B 89F1 mov cx, si 2833 0000859D 2B0E[FC8F] sub cx, word [..@bb_id_start] 2834 000085A1 890E[FE8F] mov word [..@bb_id_length], cx 2835 000085A5 83F93F cmp cx, 63 2836 000085A8 7603E92F1F ja error 2837 2838 %if 0 2839 push dx 2840 mov dx, msg.id 2841 call putsz 2842 mov al, 32 2843 call putc 2844 mov al, '"' 2845 call putc 2846 mov dx, word [..@bb_id_start] 2847 mov cx, word [..@bb_id_length] 2848 call disp_message_length_cx 2849 mov al, '"' 2850 call putc 2851 mov dx, crlf 2852 call putsz 2853 pop dx 2854 %endif 2855 000085AD C3 retn 2856 2857 2858 ; INP: si -> first non-blank character 2859 ; OUT: ..@bb_when_start and ..@bb_when_length set 2860 ; does not return if error 2861 ; al = character after the condition, si -> next 2862 ; CHG: ax, cx, si 2863 get_when: 2864 000085AE 8936[0090] mov word [..@bb_when_start], si 2865 @@: 2866 000085B2 AC lodsb 2867 000085B3 52 push dx 2868 000085B4 53 push bx 2869 000085B5 E82F2D call getexpression 2870 000085B8 5B pop bx 2871 000085B9 5A pop dx 2872 ; si -> after condition char 2873 ; si - 1 -> last condition char 2874 @@: 2875 000085BA 4E dec si 2876 000085BB 3B36[0090] cmp si, word [..@bb_when_start] 2877 000085BF 740C je @F 2878 000085C1 807CFF20 cmp byte [si - 1], 32 2879 000085C5 74F3 je @B 2880 000085C7 807CFF09 cmp byte [si - 1], 9 2881 000085CB 74ED je @B 2882 @@: 2883 000085CD 89F1 mov cx, si 2884 000085CF 2B0E[0090] sub cx, word [..@bb_when_start] 2885 000085D3 890E[0290] mov word [..@bb_when_length], cx 2886 2887 000085D7 AC lodsb 2888 %if 0 2889 push dx 2890 mov dx, msg.when 2891 call putsz 2892 mov al, 32 2893 call putc 2894 mov al, '"' 2895 call putc 2896 mov dx, word [..@bb_when_start] 2897 mov cx, word [..@bb_when_length] 2898 call disp_message_length_cx 2899 mov al, '"' 2900 call putc 2901 mov dx, crlf 2902 call putsz 2903 dec si 2904 lodsb 2905 pop dx 2906 %endif 2907 000085D8 C3 retn 2908 2909 2910 ; INP: al = first character, si -> next character 2911 ; di = default value 2912 ; OUT: di = counter value (default if EOL) 2913 ; al = first character after number, si -> next 2914 ; CHG: - 2915 ; does not return if error encountered 2916 getcounter: 2917 .: 2918 000085D9 E86833 call skipwh0 2919 000085DC E80F33 call iseol? 2920 000085DF 7407 je .got_counter 2921 000085E1 52 push dx 2922 000085E2 E8E831 call getword 2923 000085E5 89D7 mov di, dx 2924 000085E7 5A pop dx 2925 .got_counter: 2926 000085E8 C3 retn 2927 2928 2929 ; INP: al = first character, si -> next character 2930 ; OUT: di = counter value (defaults to 8000h) 2931 ; CHG: ax, si (flags not changed) 2932 ; does not return if error encountered 2933 .pushf_chkeol: 2934 000085E9 9C pushf 2935 000085EA 52 push dx 2936 000085EB 4E dec si 2937 000085EC BA[4E65] mov dx, msg.number 2938 000085EF E89D32 call isstring? 2939 000085F2 7408 je @F 2940 000085F4 BA[5565] mov dx, msg.counter 2941 000085F7 E89532 call isstring? 2942 000085FA 7504 jne @FF 2943 @@: 2944 000085FC E82E33 call skipequals 2945 000085FF A8 db __TEST_IMM8 ; (skip lodsb) 2946 @@: 2947 00008600 AC lodsb 2948 00008601 5A pop dx 2949 00008602 E8D4FF call . 2950 00008605 E8FB32 call chkeol 2951 00008608 9D popf 2952 00008609 C3 retn 2953 2954 2955 point_number: 2956 0000860A E83633 call skipwhite 2957 2958 0000860D E81A05 call getpointat ; "AT" keyword ? 2959 00008610 7210 jc .not_at ; no --> 2960 00008612 E8D304 call findpointat ; do we find it ? 2961 00008615 7303E9C21E jc error ; not found --> 2962 0000861A BF0080 mov di, 8000h ; default counter 2963 0000861D E8C9FF call getcounter.pushf_chkeol 2964 00008620 EB29 jmp @F ; point index is in dx --> 2965 2966 .not_at: 2967 00008622 E82605 call getpointindex 2968 00008625 BF0080 mov di, 8000h ; default counter 2969 00008628 E8BEFF call getcounter.pushf_chkeol 2970 0000862B 731E jnc @F 2971 0000862D 7403E9AA1E jnz error ; "NEW" is invalid --> 2972 2973 00008632 31C9 xor cx, cx 2974 .all_loop: 2975 00008634 89C8 mov ax, cx 2976 00008636 89CA mov dx, cx 2977 00008638 E89E04 call calcpointbit 2978 %if ((_NUM_B_BP+7)>>3) != 1 2979 0000863B 84A7[0201] test byte [b_bplist.used_mask+bx], ah 2980 %else 2981 test byte [b_bplist.used_mask], ah 2982 %endif 2983 0000863F 7403 jz .all_next 2984 00008641 E81500 call .setnumber 2985 .all_next: 2986 00008644 41 inc cx 2987 00008645 83F910 cmp cx, _NUM_B_BP 2988 00008648 72EA jb .all_loop 2989 0000864A C3 retn 2990 2991 @@: 2992 0000864B 89D0 mov ax, dx 2993 0000864D E88904 call calcpointbit 2994 %if ((_NUM_B_BP+7)>>3) != 1 2995 00008650 84A7[0201] test byte [b_bplist.used_mask+bx], ah 2996 %else 2997 test byte [b_bplist.used_mask], ah 2998 %endif 2999 00008654 7503E9831E jz error 3000 3001 .setnumber: 3002 00008659 89D3 mov bx, dx 3003 0000865B 01DB add bx, bx 3004 0000865D 89BF[9601] mov word [b_bplist.counter + bx], di 3005 00008661 C3 retn 3006 3007 3008 point_id: 3009 00008662 E8DE32 call skipwhite 3010 3011 00008665 E8C204 call getpointat ; "AT" keyword ? 3012 00008668 720A jc .not_at ; no --> 3013 0000866A E87B04 call findpointat ; do we find it ? 3014 0000866D 7303E96A1E jc error ; not found --> 3015 00008672 EB08 jmp @F ; point index is in dx --> 3016 3017 .not_at: 3018 00008674 E8D404 call getpointindex 3019 00008677 7303E9601E jc error ; "NEW" and "ALL" keywords are invalid --> 3020 3021 @@: 3022 0000867C 50 push ax 3023 0000867D 89D0 mov ax, dx 3024 0000867F E85704 call calcpointbit 3025 %if ((_NUM_B_BP+7)>>3) != 1 3026 00008682 84A7[0201] test byte [b_bplist.used_mask+bx], ah 3027 %else 3028 test byte [b_bplist.used_mask], ah 3029 %endif 3030 00008686 7503E9511E jz error 3031 0000868B 58 pop ax 3032 3033 0000868C E8B532 call skipwh0 3034 3035 0000868F 4E dec si 3036 00008690 52 push dx 3037 00008691 BA[5D65] mov dx, msg.id 3038 00008694 E8F831 call isstring? 3039 00008697 7504 jne .no_id_kw 3040 00008699 E89132 call skipequals 3041 0000869C 4E dec si 3042 .no_id_kw: 3043 0000869D 5A pop dx 3044 0000869E E8DDFE call get_id 3045 3046 ; INP: ..@bb_id_start 3047 ; ..@bb_id_length 3048 ; dx = point index 3049 ; OUT: jumps to error if failure (too long) 3050 ; CHG: ax, bx, cx, si, di 3051 set_id: 3052 000086A1 BBFFFF mov bx, -1 3053 000086A4 E84000 call get_set_id_offset_length 3054 000086A7 B10A mov cl, 10 3055 000086A9 89D8 mov ax, bx 3056 000086AB D3EB shr bx, cl ; bx = length of ID to free 3057 3058 000086AD 8B36[F601] mov si, word [b_bplist.idbuffer.free] 3059 ; offset free 3060 000086B1 F7DE neg si ; - offset free 3061 000086B3 81C68001 add si, b_bplist.idbuffer.length 3062 ; 1024 - offset free = amount free 3063 000086B7 01DE add si, bx ; amount free + length of ID to free 3064 000086B9 8B0E[FE8F] mov cx, word [..@bb_id_length] 3065 000086BD E33F jcxz .empty ; if no ID to set --> 3066 000086BF 39CE cmp si, cx ; enough free ? 3067 000086C1 8B36[FC8F] mov si, word [..@bb_id_start] 3068 ; -> ID string 3069 000086C5 7303E9121E jb error ; no --> 3070 3071 000086CA 51 push cx 3072 000086CB E83700 call free_id ; actually free it now 3073 000086CE 59 pop cx 3074 000086CF 51 push cx 3075 000086D0 89CB mov bx, cx ; length 3076 000086D2 B10A mov cl, 10 ; offset part is 10 bits (0..1023) 3077 000086D4 D3E3 shl bx, cl ; length is in top 6 bits (0..63) 3078 000086D6 59 pop cx 3079 000086D7 8B3E[F601] mov di, word [b_bplist.idbuffer.free] 3080 ; = offset of free part 3081 000086DB 010E[F601] add word [b_bplist.idbuffer.free], cx 3082 ; mark space as used 3083 000086DF 09FB or bx, di ; OR in the offset 3084 000086E1 81C7[FA01] add di, b_bplist.idbuffer 3085 ; -> into buffer space 3086 000086E5 F3A4 rep movsb ; write 3087 3088 ; now remember this 3089 .after_empty: 3090 ; INP: dx = 0-based point index 3091 ; bx = word to set (-1 if not to modify) 3092 ; OUT: bx = word read 3093 get_set_id_offset_length: equ $ 3094 000086E7 87D3 xchg dx, bx 3095 000086E9 D1E3 shl bx, 1 3096 000086EB FFB7[B601] push word [b_bplist.id + bx] 3097 000086EF 83FAFF cmp dx, -1 3098 000086F2 7404 je @F 3099 000086F4 8997[B601] mov word [b_bplist.id + bx], dx 3100 @@: 3101 000086F8 5A pop dx 3102 000086F9 D1EB shr bx, 1 3103 000086FB 87D3 xchg dx, bx 3104 000086FD C3 retn 3105 3106 .empty: 3107 000086FE E80400 call free_id 3108 00008701 31DB xor bx, bx ; offset = 0 and length = 0 3109 00008703 EBE2 jmp .after_empty 3110 3111 3112 ; INP: ax = offset/length word of ID to free 3113 ; (length zero means none) 3114 ; b_bplist.id = ID array (ONE of which matches ax) 3115 ; CHG: ax, bx, cx 3116 ; OUT: b_bplist.id entries adjusted 3117 ; (the one that is being freed is unaffected) 3118 ; b_bplist.idbuffer adjusted 3119 ; STT: UP, ss = ds = es 3120 ; REM: The b_bplist.id array contains zeroes as 3121 ; indicators of unused entries. This implies 3122 ; that the length field is zero too. However, 3123 ; the canonical NULL entry is *all* zeros. 3124 free_id: 3125 00008705 B10A mov cl, 10 3126 00008707 89C3 mov bx, ax 3127 00008709 81E3FF03 and bx, 1023 ; bx = offset of ID to free 3128 0000870D D3E8 shr ax, cl ; ax = length of ID to free 3129 0000870F 91 xchg cx, ax ; cx = length of ID to free 3130 3131 00008710 56 push si 3132 00008711 57 push di 3133 3134 00008712 E330 jcxz .return ; if none to free --> 3135 3136 00008714 51 push cx 3137 00008715 8DBF[FA01] lea di, [b_bplist.idbuffer + bx] 3138 ; -> ID to be freed 3139 ; (destination of following data) 3140 00008719 89FE mov si, di 3141 0000871B 01CE add si, cx ; -> behind ID to be freed 3142 ; (source of following data) 3143 0000871D 89F1 mov cx, si 3144 0000871F F7D9 neg cx ; minus pointer to first subsequent data 3145 00008721 81C1[7A03] add cx, b_bplist.idbuffer + b_bplist.idbuffer.length 3146 ; pointer behind buffer - pointer subsequent data 3147 ; = length of data to move 3148 00008725 F3A4 rep movsb ; now di -> first uninitialised byte 3149 00008727 59 pop cx ; = length of data freed 3150 3151 00008728 290E[F601] sub word [b_bplist.idbuffer.free], cx 3152 ; mark as free 3153 0000872C 51 push cx 3154 0000872D 30C0 xor al, al 3155 0000872F F3AA rep stosb ; clear the buffer trailer (uninitialised part) 3156 00008731 5F pop di ; di = length of data freed 3157 3158 00008732 BE[B601] mov si, b_bplist.id 3159 %if _NUM_B_BP < 256 3160 00008735 B110 mov cl, _NUM_B_BP 3161 %else 3162 mov cx, _NUM_B_BP 3163 %endif 3164 .loop: 3165 00008737 AD lodsw 3166 00008738 25FF03 and ax, 1023 ; get offset 3167 0000873B 39D8 cmp ax, bx ; offset matches what we're freeing ?, OR 3168 ; is it below/equal the offset we're freeing ? 3169 0000873D 7603 jbe .next ; yes --> (also jumps if ax == 0) 3170 0000873F 297CFE sub word [si - 2], di ; adjust offset 3171 ; This subtraction shouldn't underflow the 10 bits 3172 ; used for the offset, so it should leave the top 3173 ; 6 bits for the ID length unchanged. 3174 .next: 3175 00008742 E2F3 loop .loop 3176 3177 .return: 3178 00008744 5F pop di 3179 00008745 5E pop si 3180 00008746 C3 retn 3181 3182 3183 %if BPSIZE == 6 || BPSIZE == 9 3184 point_offset: 3185 00008747 E8F931 call skipwhite 3186 3187 0000874A E8DD03 call getpointat ; "AT" keyword ? 3188 0000874D 720A jc .not_at ; no --> 3189 0000874F E89603 call findpointat ; do we find it ? 3190 00008752 7303E9851D jc error ; not found --> 3191 00008757 EB08 jmp @F ; point index is in dx --> 3192 3193 .not_at: 3194 00008759 E8EF03 call getpointindex 3195 0000875C 7303E97B1D jc error ; "NEW" and "ALL" keywords are invalid --> 3196 3197 @@: 3198 00008761 50 push ax 3199 00008762 89D0 mov ax, dx 3200 00008764 E87203 call calcpointbit 3201 %if ((_NUM_B_BP+7)>>3) != 1 3202 00008767 84A7[0201] test byte [b_bplist.used_mask+bx], ah 3203 %else 3204 test byte [b_bplist.used_mask], ah 3205 %endif 3206 0000876B 7503E96C1D jz error 3207 00008770 58 pop ax 3208 3209 00008771 E8D031 call skipwh0 3210 00008774 52 push dx 3211 00008775 BAFFFF mov dx, -1 3212 %if BPSIZE == 9 3213 00008778 89D3 mov bx, dx 3214 %endif 3215 0000877A E87131 call iseol? 3216 0000877D 7414 je @F 3217 0000877F 4E dec si 3218 00008780 BA[6565] mov dx, msg.offset 3219 00008783 E80931 call isstring? 3220 00008786 7504 jne .no_offset_kw 3221 00008788 E8A231 call skipequals 3222 0000878B 4E dec si 3223 .no_offset_kw: 3224 0000878C AC lodsb 3225 %if BPSIZE == 9 3226 0000878D E8572B call getdword ; bx:dx = offset 3227 %else 3228 call getword ; dx = offset 3229 %endif 3230 00008790 E87031 call chkeol 3231 @@: 3232 00008793 58 pop ax 3233 00008794 89C7 mov di, ax 3234 00008796 01FF add di, di 3235 00008798 01FF add di, di ; * 4 3236 %if BPSIZE == 6 3237 add di, ax ; * 5 3238 add di, ax ; * 6 3239 add di, b_bplist.bp + 3 3240 %elif BPSIZE == 9 3241 0000879A 01FF add di, di ; * 8 3242 0000879C 01C7 add di, ax ; * 9 3243 0000879E 81C7[0A01] add di, b_bplist.bp + 4 3244 %else 3245 %error Unexpected breakpoint size 3246 %endif 3247 000087A2 92 xchg ax, dx 3248 000087A3 AB stosw ; store low word of offset 3249 %if BPSIZE == 9 3250 000087A4 93 xchg ax, bx 3251 000087A5 AB stosw ; store high word of offset 3252 %endif 3253 000087A6 C3 retn 3254 %endif 3255 3256 3257 point_when: 3258 000087A7 E89931 call skipwhite 3259 3260 000087AA E87D03 call getpointat ; "AT" keyword ? 3261 000087AD 720A jc .not_at ; no --> 3262 000087AF E83603 call findpointat ; do we find it ? 3263 000087B2 7303E9251D jc error ; not found --> 3264 000087B7 EB08 jmp @F ; point index is in dx --> 3265 3266 .not_at: 3267 000087B9 E88F03 call getpointindex 3268 000087BC 7303E91B1D jc error ; "NEW" and "ALL" keywords are invalid --> 3269 3270 @@: 3271 000087C1 50 push ax 3272 000087C2 89D0 mov ax, dx 3273 000087C4 E81203 call calcpointbit 3274 %if ((_NUM_B_BP+7)>>3) != 1 3275 000087C7 84A7[0201] test byte [b_bplist.used_mask+bx], ah 3276 %else 3277 test byte [b_bplist.used_mask], ah 3278 %endif 3279 000087CB 7503E90C1D jz error 3280 000087D0 58 pop ax 3281 3282 000087D1 E87031 call skipwh0 3283 000087D4 8326[0290]00 and word [..@bb_when_length], 0 3284 000087D9 E81231 call iseol? 3285 000087DC 7415 je @F 3286 000087DE 4E dec si 3287 000087DF 52 push dx 3288 000087E0 BA[6065] mov dx, msg.when 3289 000087E3 E8A930 call isstring? 3290 000087E6 7504 jne .no_when_kw 3291 000087E8 E84231 call skipequals 3292 000087EB 4E dec si 3293 .no_when_kw: 3294 000087EC 5A pop dx 3295 000087ED E8BEFD call get_when 3296 000087F0 E81031 call chkeol 3297 @@: 3298 3299 3300 ; INP: ..@bb_when_start 3301 ; ..@bb_when_length 3302 ; dx = point index 3303 ; OUT: jumps to error if failure (too long) 3304 ; CHG: ax, bx, cx, si, di 3305 ; STT: UP, ss = ds = es 3306 set_when: 3307 000087F3 E83900 call check_when_space ; cx = length (with terminating NUL) or 0, 3308 ; si -> clause (if cx != 0), 3309 ; ax = prior pointer or 0 3310 000087F6 E330 jcxz .empty 3311 3312 000087F8 51 push cx 3313 000087F9 E86B00 call free_when ; actually free it now (INP ax) 3314 000087FC 59 pop cx 3315 000087FD 8B3E[F801] mov di, word [b_bplist.whenbuffer.free] 3316 ; = offset of free part 3317 00008801 010E[F801] add word [b_bplist.whenbuffer.free], cx 3318 ; mark space as used 3319 00008805 81C7[7A03] add di, b_bplist.whenbuffer 3320 ; -> into buffer space 3321 00008809 89FB mov bx, di ; bx -> buffer for clause, for set function 3322 ; si -> new clause (left by check function) 3323 0000880B F3A4 rep movsb ; write (with space for the NUL) 3324 0000880D C645FF00 mov byte [di - 1], 0 ; actually write a NUL 3325 3326 ; now remember this 3327 .after_empty: 3328 ; INP: dx = 0-based point index 3329 ; bx = word to set (-1 if not to modify) 3330 ; OUT: bx = word read 3331 get_set_when_offset: equ $ 3332 00008811 87D3 xchg dx, bx 3333 00008813 D1E3 shl bx, 1 3334 00008815 FFB7[D601] push word [b_bplist.when + bx] 3335 00008819 83FAFF cmp dx, -1 3336 0000881C 7404 je @F 3337 0000881E 8997[D601] mov word [b_bplist.when + bx], dx 3338 @@: 3339 00008822 5A pop dx 3340 00008823 D1EB shr bx, 1 3341 00008825 87D3 xchg dx, bx 3342 00008827 C3 retn 3343 3344 .empty: 3345 00008828 E83C00 call free_when 3346 0000882B 31DB xor bx, bx ; offset = 0 3347 0000882D EBE2 jmp .after_empty 3348 3349 3350 ; INP: ..@bb_when_start 3351 ; ..@bb_when_length 3352 ; dx = point index 3353 ; OUT: jumps to error if failure (too long) 3354 ; ax = prior pointer from array (to be freed), 3355 ; or 0 if no prior clause to free 3356 ; cx = length (including terminating NUL) 3357 ; or = 0 if no WHEN clause 3358 ; (if cx != 0) si -> WHEN clause data 3359 ; CHG: ax, bx, cx, si, di 3360 ; STT: UP, ss = ds = es 3361 check_when_space: 3362 0000882F BBFFFF mov bx, -1 3363 00008832 E8DCFF call get_set_when_offset 3364 3365 00008835 53 push bx 3366 00008836 85DB test bx, bx 3367 00008838 740D jz @F 3368 0000883A 89DF mov di, bx 3369 0000883C B9FFFF mov cx, -1 3370 0000883F B000 mov al, 0 3371 00008841 F2AE repne scasb 3372 00008843 F7D1 not cx ; = length to free (including terminating NUL) 3373 00008845 89CB mov bx, cx 3374 @@: ; bx = length to free 3375 00008847 58 pop ax ; ax -> prior clause in .whenbuffer 3376 3377 00008848 8B36[F801] mov si, word [b_bplist.whenbuffer.free] 3378 ; offset free 3379 0000884C F7DE neg si ; - offset free 3380 0000884E 81C60004 add si, b_bplist.whenbuffer.length 3381 ; 1024 - offset free = amount free 3382 00008852 01DE add si, bx ; amount free + length of condition to free 3383 00008854 8B0E[0290] mov cx, word [..@bb_when_length] 3384 00008858 E30C jcxz .empty ; if no condition to set --> 3385 0000885A 41 inc cx ; count terminating NUL 3386 0000885B 39CE cmp si, cx ; enough free ? 3387 0000885D 8B36[0090] mov si, word [..@bb_when_start] 3388 ; -> condition string 3389 00008861 7303E9761C jb error ; no --> 3390 .empty: 3391 00008866 C3 retn 3392 3393 3394 ; INP: ax = offset word of condition to free 3395 ; (zero means none) 3396 ; b_bplist.when = condition array (ONE of which matches ax) 3397 ; CHG: ax, bx, cx 3398 ; OUT: b_bplist.when entries adjusted 3399 ; (the one that is being freed is unaffected) 3400 ; b_bplist.whenbuffer adjusted 3401 ; STT: UP, ss = ds = es 3402 ; REM: The b_bplist.when array contains actual offsets 3403 ; into the b_bplist.whenbuffer space. Therefore 3404 ; a value of zero acts as a NULL pointer and valid 3405 ; values are >= b_bplist.whenbuffer. 3406 free_when: 3407 00008867 56 push si 3408 00008868 57 push di 3409 3410 00008869 85C0 test ax, ax 3411 0000886B 7438 jz .return 3412 3413 0000886D 89C7 mov di, ax 3414 0000886F 89C3 mov bx, ax 3415 ; -> condition to be freed 3416 ; (destination of following data) 3417 00008871 57 push di 3418 00008872 B9FFFF mov cx, -1 3419 00008875 B000 mov al, 0 3420 00008877 F2AE repne scasb 3421 00008879 F7D1 not cx ; = length to free (including terminating NUL) 3422 0000887B 5F pop di 3423 0000887C 51 push cx 3424 0000887D 89FE mov si, di 3425 0000887F 01CE add si, cx ; -> behind condition to be freed 3426 ; (source of following data) 3427 00008881 89F1 mov cx, si 3428 00008883 F7D9 neg cx ; minus pointer to first subsequent data 3429 00008885 81C1[7A07] add cx, b_bplist.whenbuffer + b_bplist.whenbuffer.length 3430 ; pointer behind buffer - pointer subsequent data 3431 ; = length of data to move 3432 00008889 F3A4 rep movsb ; now di -> first uninitialised byte 3433 0000888B 59 pop cx ; = length of data freed 3434 3435 0000888C 290E[F801] sub word [b_bplist.whenbuffer.free], cx 3436 ; mark as free 3437 00008890 51 push cx 3438 00008891 30C0 xor al, al 3439 00008893 F3AA rep stosb ; clear the buffer trailer (uninitialised part) 3440 00008895 5F pop di ; di = length of data freed 3441 3442 00008896 BE[D601] mov si, b_bplist.when 3443 %if _NUM_B_BP < 256 3444 00008899 B110 mov cl, _NUM_B_BP 3445 %else 3446 mov cx, _NUM_B_BP 3447 %endif 3448 .loop: 3449 0000889B AD lodsw 3450 0000889C 39D8 cmp ax, bx ; offset we're freeing ?, OR 3451 ; is it below/equal the offset we're freeing ? 3452 0000889E 7603 jbe .next ; yes --> (also jumps if ax == 0) 3453 000088A0 297CFE sub word [si - 2], di ; adjust offset 3454 .next: 3455 000088A3 E2F6 loop .loop 3456 3457 .return: 3458 000088A5 5F pop di 3459 000088A6 5E pop si 3460 000088A7 C3 retn 3461 3462 3463 point_clear: 3464 000088A8 BF[AD88] mov di, .clear 3465 000088AB EB1F jmp point_clear_enable_disable_toggle_common 3466 3467 .clear: 3468 000088AD F7D0 not ax 3469 %if ((_NUM_B_BP+7)>>3) != 1 3470 000088AF 20A7[0201] and byte [b_bplist.used_mask+bx], ah 3471 000088B3 20A7[0401] and byte [b_bplist.disabled_mask+bx], ah 3472 %else 3473 and byte [b_bplist.used_mask], ah 3474 and byte [b_bplist.disabled_mask], ah 3475 %endif 3476 000088B7 51 push cx 3477 3478 000088B8 31DB xor bx, bx ; replace by empty word 3479 000088BA E82AFE call get_set_id_offset_length 3480 000088BD 93 xchg ax, bx ; ax = word what to free 3481 000088BE E844FE call free_id ; actually free it now 3482 3483 000088C1 31DB xor bx, bx ; replace by empty word 3484 000088C3 E84BFF call get_set_when_offset 3485 000088C6 93 xchg ax, bx ; ax = word what to free 3486 000088C7 E89DFF call free_when ; actually free it now 3487 3488 %if 0 3489 xor cx, cx 3490 3491 mov bx, dx 3492 add bx, bx ; * 2 3493 mov word [b_bplist.counter + bx], cx 3494 3495 add bx, bx ; * 4 3496 %if BPSIZE == 4 3497 %elif BPSIZE == 5 3498 add bx, dx ; * 5 3499 %elif BPSIZE == 6 3500 add bx, dx ; * 5 3501 add bx, dx ; * 6 3502 %elif BPSIZE == 9 3503 add bx, bx ; * 8 3504 add bx, dx ; * 9 3505 %else 3506 %error Unexpected breakpoint size 3507 %endif 3508 add bx, b_bplist.bp 3509 mov word [bx], cx 3510 mov word [bx + 2], cx 3511 %if BPSIZE == 4 3512 %elif BPSIZE == 5 3513 mov byte [bx + 4], cl 3514 %elif BPSIZE == 6 3515 mov word [bx + 4], cx 3516 %elif BPSIZE == 9 3517 mov word [bx + 4], cx 3518 mov word [bx + 6], cx 3519 mov byte [bx + 8], cl 3520 %else 3521 %error Unexpected breakpoint size 3522 %endif 3523 3524 %endif 3525 3526 000088CA 59 pop cx 3527 000088CB C3 retn 3528 3529 point_clear_enable_disable_toggle_common: 3530 000088CC E87430 call skipwhite 3531 3532 000088CF E85802 call getpointat ; "AT" keyword ? 3533 000088D2 720A jc .not_at ; no --> 3534 000088D4 E81102 call findpointat ; do we find it ? 3535 000088D7 7303E9001C jc error ; not found --> 3536 000088DC EB25 jmp @F ; point index is in dx --> 3537 3538 .not_at: 3539 000088DE E86A02 call getpointindex 3540 000088E1 7320 jnc @F ; point index is in dx, no keyword --> 3541 000088E3 7403E9F41B jnz error ; "NEW" is invalid --> 3542 3543 000088E8 E81830 call chkeol 3544 000088EB 31C9 xor cx, cx 3545 .all_loop: 3546 000088ED 89C8 mov ax, cx 3547 000088EF E8E701 call calcpointbit 3548 %if ((_NUM_B_BP+7)>>3) != 1 3549 000088F2 84A7[0201] test byte [b_bplist.used_mask+bx], ah 3550 %else 3551 test byte [b_bplist.used_mask], ah 3552 %endif 3553 000088F6 7404 jz .all_next 3554 000088F8 89CA mov dx, cx 3555 000088FA FFD7 call di 3556 .all_next: 3557 000088FC 41 inc cx 3558 000088FD 83F910 cmp cx, _NUM_B_BP 3559 00008900 72EB jb .all_loop 3560 00008902 C3 retn 3561 3562 @@: 3563 00008903 E8FD2F call chkeol 3564 00008906 89D0 mov ax, dx 3565 00008908 E8CE01 call calcpointbit 3566 %if ((_NUM_B_BP+7)>>3) != 1 3567 0000890B 84A7[0201] test byte [b_bplist.used_mask+bx], ah 3568 %else 3569 test byte [b_bplist.used_mask], ah 3570 %endif 3571 0000890F 7503E9C81B jz error 3572 00008914 FFD7 call di 3573 00008916 C3 retn 3574 3575 3576 point_enable: 3577 00008917 BF[1C89] mov di, .enable 3578 0000891A EBB0 jmp point_clear_enable_disable_toggle_common 3579 3580 .enable: 3581 0000891C F7D0 not ax 3582 %if ((_NUM_B_BP+7)>>3) != 1 3583 0000891E 20A7[0401] and byte [b_bplist.disabled_mask+bx], ah 3584 %else 3585 and byte [b_bplist.disabled_mask], ah 3586 %endif 3587 00008922 C3 retn 3588 3589 3590 point_disable: 3591 00008923 BF[2889] mov di, .disable 3592 00008926 EBA4 jmp point_clear_enable_disable_toggle_common 3593 3594 .disable: 3595 %if ((_NUM_B_BP+7)>>3) != 1 3596 00008928 08A7[0401] or byte [b_bplist.disabled_mask+bx], ah 3597 %else 3598 or byte [b_bplist.disabled_mask], ah 3599 %endif 3600 0000892C C3 retn 3601 3602 3603 point_toggle: 3604 0000892D BF[3289] mov di, .toggle 3605 00008930 EB9A jmp point_clear_enable_disable_toggle_common 3606 3607 .toggle: 3608 %if ((_NUM_B_BP+7)>>3) != 1 3609 00008932 30A7[0401] xor byte [b_bplist.disabled_mask+bx], ah 3610 %else 3611 xor byte [b_bplist.disabled_mask], ah 3612 %endif 3613 00008936 C3 retn 3614 3615 3616 point_list: 3617 00008937 E80930 call skipwhite 3618 0000893A E8B12F call iseol? 3619 0000893D 747B je .all 3620 3621 0000893F E8E801 call getpointat ; "AT" keyword ? 3622 00008942 7256 jc .not_at ; no --> 3623 00008944 E8A101 call findpointat ; do we find it ? 3624 ; Here we ignore the point index in dx, we just 3625 ; take note that at least one point matching the 3626 ; specified address exists. The points are matched 3627 ; against the linear address in ..@bb_saved_linear. 3628 00008947 7307 jnc .all_matching 3629 3630 00008949 BA[956E] mov dx, msg.bpnone_at 3631 0000894C E85534 call putsz 3632 0000894F C3 retn 3633 3634 3635 .all_matching: 3636 00008950 31ED xor bp, bp 3637 00008952 31DB xor bx, bx 3638 00008954 31D2 xor dx, dx 3639 00008956 BF[0E08] mov di, line_out 3640 .loop_matching: 3641 00008959 89DE mov si, bx 3642 0000895B 01F6 add si, si 3643 0000895D 01F6 add si, si 3644 %if BPSIZE == 4 3645 %elif BPSIZE == 5 3646 add si, bx 3647 %elif BPSIZE == 6 3648 add si, bx ; * 5 3649 add si, bx ; * 6 3650 %elif BPSIZE == 9 3651 0000895F 01F6 add si, si ; * 8 3652 00008961 01DE add si, bx ; * 9 3653 %else 3654 %error Unexpected breakpoint size 3655 %endif 3656 00008963 81C6[0601] add si, b_bplist.bp 3657 00008967 AD lodsw 3658 00008968 3906[F88F] cmp word [..@bb_saved_linear], ax 3659 0000896C 7524 jne .next_matching 3660 %if _PM 3661 0000896E AD lodsw 3662 %else 3663 xor ax, ax 3664 lodsb 3665 %endif 3666 0000896F 3906[FA8F] cmp word [..@bb_saved_linear + 2], ax 3667 00008973 751D jne .next_matching 3668 3669 00008975 57 push di 3670 00008976 B020 mov al, 32 3671 00008978 B92800 mov cx, 40 3672 0000897B F3AA rep stosb ; initialize field with blanks 3673 0000897D 30C0 xor al, al 3674 0000897F AA stosb ; terminate it 3675 00008980 5F pop di 3676 3677 00008981 E88000 call .single ; fill buffer 3678 3679 00008984 52 push dx 3680 00008985 53 push bx 3681 %if 0 3682 test dl, 1 ; an odd point ? 3683 jnz .odd_matching ; yes --> 3684 mov di, line_out + 40 ; write next point after the field 3685 jmp .was_even_matching 3686 .odd_matching: 3687 %endif 3688 00008986 E89D30 call putsline_crlf ; put line with linebreak (and no excess blanks) 3689 00008989 E83301 call handle_bl_when 3690 0000898C BF[0E08] mov di, line_out ; write next point at start of field 3691 .was_even_matching: 3692 0000898F 5B pop bx 3693 00008990 5A pop dx 3694 00008991 42 inc dx ; increment odd/even counter 3695 .next_matching: 3696 00008992 43 inc bx ; increment breakpoint index 3697 00008993 83FB10 cmp bx, _NUM_B_BP 3698 00008996 75C1 jne .loop_matching 3699 00008998 EB51 jmp .end 3700 3701 3702 .not_at: 3703 0000899A E8AE01 call getpointindex 3704 0000899D 730A jnc @F 3705 0000899F 7403E9381B jnz error ; "NEW" is invalid --> 3706 3707 000089A4 E85C2F call chkeol 3708 000089A7 EB11 jmp .all 3709 @@: 3710 000089A9 E8572F call chkeol 3711 000089AC 89D3 mov bx, dx 3712 000089AE BF[0E08] mov di, line_out 3713 000089B1 E85000 call .single 3714 000089B4 E86F30 call putsline_crlf 3715 000089B7 E90501 jmp handle_bl_when 3716 3717 3718 .all: 3719 000089BA 31ED xor bp, bp ; high byte: any set points encountered yet, 3720 ; low byte: current line has any set points 3721 000089BC 31DB xor bx, bx 3722 000089BE BF[0E08] mov di, line_out 3723 .loop: 3724 000089C1 57 push di 3725 000089C2 B020 mov al, 32 3726 000089C4 B92800 mov cx, 40 3727 000089C7 F3AA rep stosb ; initialize field with blanks 3728 000089C9 30C0 xor al, al 3729 000089CB AA stosb ; terminate it 3730 000089CC 5F pop di 3731 3732 000089CD E83400 call .single ; fill buffer 3733 3734 000089D0 53 push bx 3735 %if 0 3736 test bl, 1 ; an odd point ? 3737 jnz .odd ; yes --> 3738 mov di, line_out + 40 ; write next point after the field 3739 jmp .was_even 3740 .odd: 3741 %endif 3742 000089D1 F7C5FF00 test bp, 00FFh ; any point set in this line ? 3743 000089D5 740A jz .skip_putsline ; no --> 3744 000089D7 E84C30 call putsline_crlf ; put line with linebreak (and no excess blanks) 3745 000089DA E8E200 call handle_bl_when 3746 3747 000089DD 81E500FF and bp, ~00FFh ; clear flag for next line processing 3748 .skip_putsline: 3749 000089E1 BF[0E08] mov di, line_out ; write next point at start of field 3750 .was_even: 3751 000089E4 5B pop bx 3752 000089E5 43 inc bx 3753 000089E6 83FB10 cmp bx, _NUM_B_BP 3754 000089E9 75D6 jne .loop 3755 .end: 3756 000089EB 81FF[0E08] cmp di, line_out 3757 000089EF 7406 je @F 3758 000089F1 E83230 call putsline_crlf 3759 000089F4 E8C800 call handle_bl_when 3760 @@: 3761 000089F7 F7C500FF test bp, 0FF00h 3762 000089FB 7506 jnz @F 3763 000089FD BA[756E] mov dx, msg.bpnone 3764 00008A00 E8A133 call putsz 3765 @@: 3766 00008A03 C3 retn 3767 3768 .single: 3769 00008A04 BE[4F6E] mov si, msg.bp 3770 00008A07 E8452F call showstring 3771 00008A0A 53 push bx 3772 00008A0B 89D8 mov ax, bx 3773 00008A0D E8E52F call hexbyte ; store index of this point 3774 00008A10 E8C600 call calcpointbit 3775 00008A13 BE[596E] mov si, msg.bpunused 3776 %if ((_NUM_B_BP+7)>>3) != 1 3777 00008A16 84A7[0201] test byte [b_bplist.used_mask+bx], ah 3778 %else 3779 test byte [b_bplist.used_mask], ah 3780 %endif 3781 00008A1A 7508 jnz @F ; if set --> 3782 00008A1C E8302F call showstring 3783 00008A1F 31F6 xor si, si 3784 00008A21 E99900 jmp .unused 3785 3786 @@: 3787 00008A24 81CD0101 or bp, 0101h ; flag that there was a point set in this line 3788 00008A28 BE[566E] mov si, msg.bpdisabled 3789 %if ((_NUM_B_BP+7)>>3) != 1 3790 00008A2B 84A7[0401] test byte [b_bplist.disabled_mask+bx], ah 3791 %else 3792 test byte [b_bplist.disabled_mask], ah 3793 %endif 3794 00008A2F 7503 jnz .disabled ; disabled --> (D) 3795 00008A31 BE[536E] mov si, msg.bpenabled 3796 .disabled: 3797 00008A34 E8182F call showstring 3798 00008A37 BE[616E] mov si, msg.bpaddress 3799 00008A3A E8122F call showstring 3800 00008A3D 58 pop ax 3801 00008A3E 50 push ax 3802 00008A3F 89C6 mov si, ax 3803 00008A41 01F6 add si, si 3804 00008A43 01F6 add si, si 3805 %if BPSIZE == 4 3806 %elif BPSIZE == 5 3807 add si, ax 3808 %elif BPSIZE == 6 3809 add si, ax ; * 5 3810 add si, ax ; * 6 3811 %elif BPSIZE == 9 3812 00008A45 01F6 add si, si ; * 8 3813 00008A47 01C6 add si, ax ; * 9 3814 %else 3815 %error Unexpected breakpoint size 3816 %endif 3817 00008A49 81C6[0601] add si, b_bplist.bp ; -> point 3818 00008A4D 52 push dx 3819 00008A4E AD lodsw 3820 00008A4F 92 xchg ax, dx 3821 %if _PM 3822 00008A50 AD lodsw 3823 00008A51 E89A2F call hexword 3824 %else 3825 xor ax, ax 3826 lodsb 3827 call hexbyte 3828 %endif 3829 00008A54 50 push ax 3830 00008A55 B05F mov al, '_' 3831 00008A57 AA stosb 3832 00008A58 58 pop ax 3833 00008A59 92 xchg ax, dx 3834 00008A5A E8912F call hexword ; display (linear) address 3835 %if BPSIZE == 6 || BPSIZE == 9 3836 ; INP: dx:ax = linear address 3837 ; si -> (d)word offset 3838 ; di -> where to store 3839 ; OUT: cx = length displayed 3840 ; si -> after offset 3841 ; di -> after stored string 3842 ; CHG: ax, dx 3843 00008A5D E80F01 call bp_display_offset ; BPSIZE implied 3844 %else 3845 xor cx, cx 3846 %endif 3847 00008A60 5A pop dx 3848 00008A61 AC lodsb 3849 00008A62 50 push ax 3850 00008A63 BE[676E] mov si, msg.bpcontent 3851 00008A66 E8E62E call showstring 3852 00008A69 58 pop ax 3853 00008A6A E8882F call hexbyte ; display content 3854 00008A6D BE[6A6E] mov si, msg.bpcounter 3855 00008A70 E8DC2E call showstring 3856 00008A73 58 pop ax 3857 00008A74 50 push ax 3858 00008A75 89C3 mov bx, ax 3859 00008A77 52 push dx 3860 00008A78 89C2 mov dx, ax 3861 00008A7A 01DB add bx, bx 3862 00008A7C 8B87[9601] mov ax, word [b_bplist.counter + bx] 3863 00008A80 E86B2F call hexword 3864 3865 00008A83 BBFFFF mov bx, -1 3866 00008A86 E85EFC call get_set_id_offset_length 3867 00008A89 F6C7FC test bh, 63 << 2 ; length nonzero ? 3868 00008A8C 7426 jz @F ; no --> 3869 3870 ; The maximum length of a short ID is based on 3871 ; how much space there is assuming 80 columns. 3872 00008A8E BE[416E] mov si, msg.bb_hitpass_id.short 3873 00008A91 D0E1 shl cl, 1 3874 00008A93 D0E1 shl cl, 1 3875 00008A95 F6D9 neg cl 3876 00008A97 80C18C add cl, 35 << 2 3877 00008A9A 38CF cmp bh, cl ; long ? 3878 00008A9C 7203 jb .trigger_short_id 3879 ; This jump MUST be a jb, not jbe. The jbe 3880 ; would not match ZR for words where the 3881 ; idbuffer offset is a nonzero value. 3882 00008A9E BE[396E] mov si, msg.bb_hitpass_id.long 3883 .trigger_short_id: 3884 3885 00008AA1 E860A9 call copy_single_counted_string 3886 00008AA4 88F9 mov cl, bh 3887 00008AA6 D0E9 shr cl, 1 3888 00008AA8 D0E9 shr cl, 1 ; cx = length 3889 00008AAA 81E3FF03 and bx, 1023 ; bx = offset 3890 00008AAE 8DB7[FA01] lea si, [b_bplist.idbuffer + bx] 3891 00008AB2 F3A4 rep movsb 3892 3893 @@: 3894 3895 00008AB4 BBFFFF mov bx, -1 3896 00008AB7 E857FD call get_set_when_offset 3897 00008ABA 89DE mov si, bx 3898 00008ABC 5A pop dx 3899 3900 .unused: 3901 00008ABD 5B pop bx ; restore counter (if displaying all) 3902 00008ABE C3 retn 3903 3904 3905 ; CHG: si, al 3906 handle_bl_when: 3907 00008ABF 87D6 xchg dx, si 3908 00008AC1 85D2 test dx, dx 3909 00008AC3 7411 jz @F 3910 00008AC5 52 push dx 3911 00008AC6 BA[486E] mov dx, msg.bb_when 3912 00008AC9 E8D832 call putsz 3913 00008ACC 5A pop dx 3914 00008ACD E8D432 call putsz 3915 %if 0 3916 mov al, '$' 3917 call putc 3918 %endif 3919 00008AD0 BA[4574] mov dx, crlf 3920 00008AD3 E8CE32 call putsz 3921 @@: 3922 00008AD6 87D6 xchg dx, si 3923 00008AD8 C3 retn 3924 3925 3926 ; INP: ax = 0-based index of point 3927 ; OUT: (bx-> byte to access. only if at least 9 points) 3928 ; (bx = 0 always if 8 or fewer points) 3929 ; ah = value to access 3930 ; CHG: al 3931 calcpointbit: 3932 %if ((_NUM_B_BP+7)>>3) != 1 3933 00008AD9 89C3 mov bx, ax 3934 %endif 3935 00008ADB 2407 and al, 7 3936 00008ADD B401 mov ah, 1 3937 00008ADF 91 xchg ax, cx 3938 00008AE0 D2E5 shl ch, cl 3939 %if ((_NUM_B_BP+7)>>3) != 1 3940 00008AE2 B103 mov cl, 3 3941 00008AE4 D3EB shr bx, cl 3942 %else 3943 xor bx, bx 3944 %endif 3945 00008AE6 91 xchg ax, cx 3946 00008AE7 C3 retn 3947 3948 3949 ; INP: bx:dx = linear address 3950 ; OUT: NC if point found, 3951 ; dx = point index 3952 ; CY if point not found, 3953 ; bx:dx unchanged 3954 ; CHG: di 3955 findpointat: 3956 lframe near 3957 00008AE8 5589E5 lenter 3958 lvar word, orig_ax 3959 00008AEB 50 push ax 3960 lvar word, orig_si 3961 00008AEC 56 push si 3962 lvar dword, orig_bxdx 3963 00008AED 53 push bx 3964 00008AEE 52 push dx 3965 00008AEF 31D2 xor dx, dx 3966 .loop: 3967 00008AF1 89D0 mov ax, dx 3968 00008AF3 E8E3FF call calcpointbit 3969 %if ((_NUM_B_BP+7)>>3) != 1 3970 00008AF6 84A7[0201] test byte [b_bplist.used_mask + bx], ah 3971 %else 3972 test byte [b_bplist.used_mask], ah 3973 %endif 3974 00008AFA 741F jz .next 3975 3976 00008AFC 89D6 mov si, dx 3977 00008AFE 01F6 add si, si 3978 00008B00 01F6 add si, si 3979 %if BPSIZE == 4 3980 %elif BPSIZE == 5 3981 add si, dx 3982 %elif BPSIZE == 6 3983 add si, dx ; * 5 3984 add si, dx ; * 6 3985 %elif BPSIZE == 9 3986 00008B02 01F6 add si, si ; * 8 3987 00008B04 01D6 add si, dx ; * 9 3988 %else 3989 %error Unexpected breakpoint size 3990 %endif 3991 00008B06 81C6[0601] add si, b_bplist.bp ; -> point 3992 00008B0A AD lodsw 3993 00008B0B 3946F8 cmp word [bp + ?orig_bxdx], ax 3994 00008B0E 750B jne .next 3995 %if _PM 3996 00008B10 AD lodsw 3997 %else 3998 xor ax, ax 3999 lodsb 4000 %endif 4001 00008B11 3946FA cmp word [bp + ?orig_bxdx + 2], ax 4002 00008B14 7505 jne .next 4003 ; (NC) 4004 00008B16 8956F8 mov word [bp + ?orig_bxdx], dx 4005 00008B19 EB07 jmp .ret 4006 4007 .next: 4008 00008B1B 42 inc dx 4009 00008B1C 83FA10 cmp dx, _NUM_B_BP 4010 00008B1F 72D0 jb .loop 4011 4012 00008B21 F9 stc 4013 .ret: 4014 00008B22 5A pop dx 4015 00008B23 5B pop bx ; pop ?orig_bxdx 4016 00008B24 5E pop si ; pop ?orig_si 4017 00008B25 58 pop ax ; pop ?orig_ax 4018 00008B26 89EC5D lleave 4019 00008B29 C3 lret 4020 4021 4022 ; INP: si->, al= 4023 ; OUT: CY if no "AT" keyword + address, 4024 ; si, al unchanged 4025 ; NC if "AT" keyword + address, 4026 ; si->, al= after 4027 ; bx:dx = dword [..@bb_saved_linear] = linear address 4028 ; CHG: edx, bx 4029 getpointat: 4030 00008B2A 4E dec si 4031 00008B2B BA[9A68] mov dx, msg.at 4032 00008B2E E85E2D call isstring? 4033 00008B31 AC lodsb 4034 00008B32 7402 je .at 4035 00008B34 F9 stc 4036 00008B35 C3 retn 4037 4038 .at: 4039 00008B36 8B1E[900C] mov bx, word [reg_cs] 4040 00008B3A E86FAC call getlinearaddr 4041 00008B3D 7303E99A19 jc error 4042 00008B42 8916[F88F] mov word [..@bb_saved_linear], dx 4043 00008B46 891E[FA8F] mov word [..@bb_saved_linear + 2], bx 4044 00008B4A C3 retn 4045 4046 4047 ; INP: si->, al= 4048 ; OUT: NC if a point is specified, 4049 ; dx = point index (0-based, below _NUM_B_BP) 4050 ; CY if a keyword is specified, 4051 ; ZR if "ALL" keyword specified 4052 ; NZ if "NEW" keyword specified 4053 getpointindex: 4054 00008B4B 4E dec si 4055 00008B4C BA[CC6D] mov dx, msg.all 4056 00008B4F E83D2D call isstring? 4057 00008B52 7418 je .is_all ; (ZR) 4058 00008B54 BA[D06D] mov dx, msg.new 4059 00008B57 E8352D call isstring? 4060 00008B5A 740E je .is_new 4061 00008B5C AC lodsb 4062 00008B5D E86D2C call getword 4063 00008B60 83FA10 cmp dx, _NUM_B_BP 4064 00008B63 7203E97419 jae error 4065 00008B68 F8 clc ; (NC) 4066 00008B69 C3 retn 4067 4068 .is_new: 4069 00008B6A 85F6 test si, si ; (NZ) 4070 .is_all: 4071 00008B6C F9 stc ; (CY) 4072 00008B6D AC lodsb ; al = separator, si-> after 4073 00008B6E C3 retn 4074 %endif 4075 4076 4077 %if BPSIZE == 6 || BPSIZE == 9 4078 ; INP: dx:ax = linear address 4079 ; si -> (d)word offset 4080 ; di -> where to store 4081 ; OUT: cx = length displayed 4082 ; si -> after offset 4083 ; di -> after stored string 4084 ; CHG: ax, dx 4085 bp_display_offset: 4086 lframe 4087 lvar dword, offset 4088 00008B6F 5589E55050 lenter 4089 lvar dword, linear 4090 00008B74 52 push dx 4091 00008B75 50 push ax 4092 00008B76 B82020 mov ax, " " 4093 lvar word, prefix 4094 00008B79 50 push ax 4095 lvar word, start_write 4096 00008B7A 57 push di 4097 00008B7B 53 push bx 4098 00008B7C AD lodsw 4099 %if _PM 4100 00008B7D 92 xchg ax, dx 4101 00008B7E AD lodsw 4102 00008B7F 83F8FF cmp ax, -1 4103 00008B82 92 xchg ax, dx 4104 00008B83 7505 jne @F 4105 %else 4106 xor dx, dx 4107 %endif 4108 00008B85 83F8FF cmp ax, -1 4109 00008B88 746A je .skip 4110 @@: 4111 00008B8A 8956FE mov word [bp + ?offset + 2], dx 4112 00008B8D 8946FC mov word [bp + ?offset], ax 4113 4114 00008B90 8B56FA mov dx, word [bp + ?linear + 2] 4115 00008B93 8B46F8 mov ax, word [bp + ?linear] 4116 00008B96 2B46FC sub ax, word [bp + ?offset] 4117 00008B99 1B56FE sbb dx, word [bp + ?offset + 2] 4118 4119 %if _PM 4120 00008B9C E82E06 call ispm 4121 00008B9F 7525 jnz .r86m 4122 4123 00008BA1 52 push dx 4124 00008BA2 50 push ax 4125 00008BA3 B80600 mov ax, 6 4126 00008BA6 8B1E[900C] mov bx, word [reg_cs] 4127 00008BAA CD31 int 31h 4128 00008BAC 58 pop ax 4129 00008BAD 5B pop bx 4130 00008BAE 7212 jc .try_r86m 4131 4132 00008BB0 39D9 cmp cx, bx 4133 00008BB2 750E jne .try_r86m 4134 00008BB4 39C2 cmp dx, ax 4135 00008BB6 750A jne .try_r86m 4136 4137 00008BB8 B82020 mov ax, " " 4138 00008BBB AB stosw 4139 00008BBC B84353 mov ax, "CS" 4140 00008BBF AB stosw 4141 00008BC0 EB1F jmp .offset 4142 4143 .try_r86m: 4144 00008BC2 C646F724 mov byte [bp + ?prefix + 1], '$' 4145 %endif 4146 4147 .r86m: 4148 00008BC6 B90400 mov cx, 4 4149 00008BC9 A80F test al, 15 4150 00008BCB 7531 jnz .questionmarks 4151 00008BCD F7C2F0FF test dx, 0FFF0h 4152 00008BD1 752B jnz .questionmarks 4153 00008BD3 D3E8 shr ax, cl 4154 00008BD5 D3CA ror dx, cl 4155 00008BD7 09C2 or dx, ax 4156 00008BD9 8B46F6 mov ax, word [bp + ?prefix] 4157 00008BDC AB stosw 4158 00008BDD 92 xchg ax, dx 4159 00008BDE E80D2E call hexword 4160 4161 .offset: 4162 00008BE1 B03A mov al, ':' 4163 00008BE3 AA stosb 4164 %if _PM 4165 00008BE4 8B46FE mov ax, word [bp + ?offset + 2] 4166 00008BE7 85C0 test ax, ax 4167 00008BE9 7403 jz @F 4168 00008BEB E8002E call hexword 4169 @@: 4170 %endif 4171 00008BEE 8B46FC mov ax, word [bp + ?offset] 4172 00008BF1 E8FA2D call hexword 4173 4174 .skip: 4175 00008BF4 5B pop bx 4176 00008BF5 59 pop cx ; get ?start_write 4177 00008BF6 F7D9 neg cx 4178 00008BF8 01F9 add cx, di 4179 00008BFA 89EC5D lleave 4180 00008BFD C3 retn 4181 4182 .questionmarks: 4183 00008BFE B82020 mov ax, " " 4184 00008C01 AB stosw 4185 00008C02 B83F3F mov ax, "??" 4186 00008C05 AB stosw 4187 00008C06 AB stosw 4188 00008C07 EBD8 jmp .offset 4189 %endif 4190 4191 4192 bu_breakpoint: 4193 00008C09 AC lodsb 4194 00008C0A E8F62C call chkeol 4195 %if _DEBUG 4196 mov dx, msg.bu 4197 call putsz 4198 int3 4199 retn 4200 %else 4201 00008C0D BA[1072] mov dx, msg.notbu 4202 00008C10 E99131 jmp putsz 4203 %endif 4204 4205 4206 uppercase: 4207 00008C13 3C61 cmp al, 'a' 4208 00008C15 7206 jb .ret 4209 00008C17 3C7A cmp al, 'z' 4210 00008C19 7702 ja .ret 4211 00008C1B 24DF and al, TOUPPER 4212 .ret: 4213 00008C1D C3 retn 4214 4215 4216 errorj4: 4217 00008C1E E9BB18 jmp error 4218 4219 4220 %if 0 4221 4222 ee 0: 4223 push ss 4224 pop ds 4225 push ss 4226 pop es 4227 mov ax, word [ savesp ] 4228 inc ax 4229 inc ax 4230 mov sp, ax ; restore stack 4231 mov bx, word [e_addr + saSegSel] 4232 _386_PM_o32 4233 mov dx, word [ e_addr ] ; get back address 4234 4235 4236 ; Prompt mode. 4237 ee 1: 4238 mov word [ errret ], ee 0 4239 4240 ; Begin loop over lines. 4241 ee 2: ; <--- next line 4242 mov word [e_addr + saSegSel], bx 4243 %if _PM 4244 call ispm 4245 jnz .86m 4246 .pm: 4247 mov word [e_addr + saSelector], bx 4248 jmp @F 4249 .86m: 4250 mov word [e_addr + saSegment], bx 4251 @@: 4252 %endif 4253 _386_PM_o32 4254 mov word [ e_addr ], dx ; save address 4255 mov di, line_out 4256 mov ax, bx ; print out segment and offset 4257 call hexword 4258 4259 === 4260 4261 4262 mov al, '.' 4263 stosb 4264 call getline00 ; read input line 4265 call iseol? 4266 je .end 4267 %if _PM 4268 xor bx, bx 4269 %endif 4270 mov dx, 1 4271 call ee_checkplusminus 4272 jne .notplusminus 4273 cmp al, '+' 4274 je ee 3 4275 jmp short ee 2 4276 4277 .notplusminus: 4278 4279 === 4280 4281 4282 ; INP: al = character, si-> line 4283 ; bx:dx = increment to add/subtract if this is an add/sub request 4284 ; OUT: al, si unchanged 4285 ; NZ if no add/sub request 4286 ; ZR if add/sub request, 4287 ; [ e_addr ] offset adjusted 4288 ee_checkplusminus: 4289 cmp al, '-' 4290 jne .not 4291 cmp al, '+' 4292 jne .not 4293 push si 4294 push ax 4295 call skipwhite 4296 call iseol? 4297 pop ax 4298 pop si 4299 jne .not 4300 cmp al, '-' 4301 je .minus 4302 add word [ e_addr ], dx 4303 _386_PM adc word [ e_addr+2 ], bx 4304 jmp short .done 4305 4306 .minus: 4307 sub word [ e_addr ], dx 4308 _386_PM sbb word [ e_addr+2 ], bx 4309 .done: 4310 cmp al, al 4311 .not: 4312 retn 4313 4314 === 4315 4316 4317 ee 9: 4318 call getline00 4319 4320 %endif 4321 4322 4323 ; E command - edit memory. 4324 ee: 4325 00008C21 E8F719 call prephack 4326 00008C24 8B1E[840C] mov bx, word [reg_ds] 4327 00008C28 E8E41C call getaddr ; get address into bx:(e)dx 4328 00008C2B E8E72C call skipcomm0 4329 00008C2E E8BD2C call iseol? 4330 00008C31 743E je ee1 ; if prompt mode 4331 4332 eeparsestr: 4333 00008C33 52 push dx ; save destination offset 4334 00008C34 E8351D call getstr ; get data bytes 4335 00008C37 89F9 mov cx, di 4336 00008C39 BA[0E08] mov dx, line_out 4337 00008C3C 29D1 sub cx, dx ; length of byte string 4338 00008C3E 5F pop di 4339 00008C3F 89C8 mov ax, cx 4340 00008C41 48 dec ax 4341 00008C42 01F8 add ax, di 4342 00008C44 72D8 jc short errorj4 ; if it wraps around 4343 00008C46 E8001A call dohack 4344 00008C49 89D6 mov si, dx 4345 00008C4B 8EC3 mov es, bx 4346 %if _PM 4347 00008C4D 803E[DC88]00 cmp byte [bAddr32], 0 4348 00008C52 740E jz ee_2 4349 [cpu 386] 4350 00008C54 89FA mov dx, di ; dx was destroyed 4351 00008C56 6689D7 mov edi, edx 4352 00008C59 660FB7F6 movzx esi, si 4353 00008C5D 660FB7C9 movzx ecx, cx 4354 00008C61 67 a32 4355 __CPU__ 4356 ee_2: 4357 %endif 4358 00008C62 F3A4 rep movsb 4359 4360 ; Restore ds + es and undo the interrupt vector hack. 4361 ; This code is also used by the `m' command. 4362 ee0a: 4363 00008C64 16 push ss ; restore ds 4364 00008C65 1F pop ds 4365 00008C66 16 push ss ; restore es 4366 00008C67 07 pop es 4367 00008C68 BF[A80A] mov di, run2324 ; debuggee's int 23/24 values 4368 00008C6B E8C619 call prehak1 ; copy things back 4369 00008C6E E90C1A jmp unhack 4370 4371 4372 4373 ; Prompt mode. 4374 ee1: 4375 00008C71 E88778 call guard_re 4376 ; Begin loop over lines. 4377 ee2: ; <--- next line 4378 00008C74 89D8 mov ax, bx ; print out segment and offset 4379 00008C76 E8752D call hexword 4380 00008C79 B03A mov al, ':' 4381 00008C7B AA stosb 4382 00008C7C 66 _386_PM_o32 ; mov eax, edx 4383 00008C7D 89D0 mov ax, dx 4384 %if _PM 4385 00008C7F E8B4D0 call test_d_b_bit ; 32-bit segment ? 4386 00008C82 7403 jz .16 ; no --> 4387 00008C84 E85B2D call hexword_high 4388 .16: 4389 %endif 4390 00008C87 E8642D call hexword 4391 4392 ; Begin loop over bytes. 4393 ee3: ; <--- next byte 4394 00008C8A B82020 mov ax, 32<<8|32 ; print old value of byte 4395 00008C8D AB stosw 4396 00008C8E E8B819 call dohack ; do the INT pointer hack 4397 00008C91 E8D00C call readmem ; read mem at BX:(E)DX 4398 00008C94 E8E619 call unhack ; undo the INT pointer hack 4399 00008C97 E85B2D call hexbyte 4400 00008C9A B02E mov al, '.' 4401 00008C9C AA stosb 4402 00008C9D C606[930A]00 mov byte [ linecounter ], 0 ; reset counter 4403 00008CA2 8026[9E00]EF clropt [internalflags], promptwaiting 4404 00008CA7 53 push bx 4405 00008CA8 52 push dx 4406 00008CA9 E87E2D call putsline 4407 00008CAC 5A pop dx 4408 00008CAD 5B pop bx 4409 00008CAE BE[1E08] mov si, line_out+16 ; address of buffer for characters 4410 00008CB1 31C9 xor cx, cx ; number of characters so far 4411 4412 ee4_next: 4413 00008CB3 E83737 call getline_is_input_file? 4414 00008CB6 7238 jc ee9_getc_tty ; if it's a TTY 4415 4416 ee_getc_file: 4417 00008CB8 800E[A200]40 setopt [internalflags2], dif2_did_getline_file 4418 ; set this flag so yy_reset_buf knows 4419 ; that we may have buffered the file 4420 4421 00008CBD 56 push si 4422 %if _NEWFULLHANDLING 4423 00008CBE BF[0300] mov di, line_in+3 ; read max 4424 %else 4425 mov di, line_in+2 4426 %endif 4427 00008CC1 8B36[EC0A] mov si, word [bufnext] 4428 ee5: 4429 00008CC5 3B36[EE0A] cmp si, word [bufend] 4430 00008CC9 7207 jb ee6 ; if there's a character already 4431 00008CCB E82A3C call fillbuf 4432 00008CCE B00D mov al, 13 4433 00008CD0 7217 jc ee8 ; if eof 4434 ee6: 4435 00008CD2 803E[E70A]0D cmp byte [notatty], 13 4436 00008CD7 750C jne ee7 ; if no need to compress CR/LF 4437 00008CD9 803C0A cmp byte [si], 10 4438 00008CDC 7507 jne ee7 ; if not a line feed 4439 00008CDE 46 inc si ; skip it 4440 00008CDF FE06[E70A] inc byte [notatty] ; avoid repeating this 4441 00008CE3 EBE0 jmp ee5 ; next character 4442 4443 ee7: 4444 00008CE5 AC lodsb ; get the character 4445 00008CE6 A2[E70A] mov byte [notatty], al 4446 ee8: 4447 00008CE9 8936[EC0A] mov word [bufnext], si 4448 00008CED 5E pop si 4449 00008CEE EB03 jmp ee10_got_codepoint 4450 4451 ee9_getc_tty: 4452 00008CF0 E81631 call getc ; character input without echo 4453 ee10_got_codepoint: 4454 00008CF3 3C20 cmp al, 32 ; (go to next byte) 4455 00008CF5 7448 je ee13_write 4456 00008CF7 3C2D cmp al, '-' ; (go to prior byte) 4457 00008CF9 7444 je ee13_write 4458 00008CFB 3C2E cmp al, '.' ; (exit E interactive mode) 4459 00008CFD 7440 je ee13_write 4460 00008CFF 3C0A cmp al, 10 4461 00008D01 743C je ee13_write 4462 00008D03 E8EC2B call iseol?.notsemicolon; (also exit E interactive mode) 4463 00008D06 7437 je ee13_write ; all: done with this byte --> 4464 00008D08 3C08 cmp al, 8 4465 00008D0A 7423 je ee11_backspace ; if backspace --> 4466 00008D0C 3C7F cmp al, 7Fh 4467 00008D0E 741F je ee11_backspace ; if DEL (handle like backspace) --> 4468 00008D10 83F902 cmp cx, byte 2 ; otherwise, it should be a hex character 4469 00008D13 739E jae ee4_next ; if we have a full byte already 4470 00008D15 8804 mov byte [si], al 4471 00008D17 E8D82A call getnyb 4472 00008D1A 7297 jc ee4_next ; if it's not a hex character 4473 00008D1C 41 inc cx 4474 00008D1D AC lodsb ; get the character back 4475 00008D1E EB19 jmp ee12_put_then_next 4476 4477 ee112_priorbyte: 4478 00008D20 E8A430 call putc ; display the minus 4479 00008D23 E810D0 _386_PM call test_d_b_bit ; 32-bit segment ? 4480 00008D26 7401 _386_PM jz .16 ; no --> 4481 00008D28 66 _386_PM_o32 4482 .16: 4483 00008D29 4A dec dx ; decrement offset (16 bit or 32 bit) 4484 00008D2A BF[0E08] mov di, line_out 4485 00008D2D EB6E jmp ee15_linebreak_and_ee2 4486 4487 ee11_backspace: 4488 00008D2F E382 jcxz ee4_next ; if nothing to backspace over 4489 00008D31 49 dec cx 4490 00008D32 4E dec si 4491 00008D33 E8073B call fullbsout 4492 00008D36 E97AFF jmp ee4_next 4493 4494 ee12_put_then_next: 4495 00008D39 E88B30 call putc 4496 00008D3C E974FF jmp ee4_next ; back for more 4497 4498 ; We have a byte (if CX != 0). 4499 ; 4500 ; cx = number of digits we have (0..2) 4501 ; al = codepoint specifying how to proceed after writing 4502 ee13_write: 4503 00008D3F E329 jcxz ee14_done_write ; if no change for this byte 4504 4505 00008D41 50 push ax ; preserve proceed control 4506 00008D42 31C0 xor ax, ax ; ah = 0, al = 0 4507 00008D44 8804 mov byte [si], al ; terminate the string 4508 00008D46 29CE sub si, cx ; point to beginning 4509 @@: 4510 00008D48 00E4 add ah, ah 4511 00008D4A 00E4 add ah, ah 4512 00008D4C 00E4 add ah, ah 4513 00008D4E 00E4 add ah, ah ; prior value times 16 4514 00008D50 00C4 add ah, al ; add next digit (0 in first iteration) 4515 00008D52 AC lodsb ; load next digit (or NUL) 4516 00008D53 E89C2A call getnyb 4517 00008D56 73F0 jnc @B ; if another digit --> (NC) 4518 ; (CY can only mean we reached the NUL) 4519 00008D58 88E0 mov al, ah ; get byte value 4520 00008D5A E8EC18 call dohack ; do the INT pointer hack 4521 00008D5D E8D70B call writemem ; write AL at BX:(E)DX 4522 00008D60 BF[A80A] mov di, run2324 ; debuggee's int 23/24 4523 00008D63 E8CE18 call prehak1 ; copy things back 4524 00008D66 E81419 call unhack ; undo the INT pointer hack 4525 00008D69 58 pop ax ; al = how to proceed 4526 4527 ; End the loop over bytes. 4528 ee14_done_write: 4529 00008D6A BF[0E08] mov di, line_out ; reset output buffer 4530 4531 00008D6D 3C20 cmp al, 32 ; (go to next byte) 4532 00008D6F 7414 je ee_nextbyte 4533 00008D71 3C2D cmp al, '-' ; (go to prior byte) 4534 00008D73 74AB je ee112_priorbyte 4535 00008D75 3C2E cmp al, '.' ; (exit E interactive mode) 4536 00008D77 742B je ee16_end 4537 00008D79 3C0A cmp al, 10 4538 00008D7B 7427 je ee16_end 4539 00008D7D E8722B call iseol?.notsemicolon; (also exit E interactive mode) 4540 00008D80 7422 je ee16_end 4541 00008D82 E95717 jmp error ; unexpected value 4542 4543 ee_nextbyte: 4544 00008D85 E8AECF _386_PM call test_d_b_bit ; 32-bit segment ? 4545 00008D88 7401 _386_PM jz .16 ; no --> 4546 00008D8A 66 _386_PM_o32 4547 .16: 4548 00008D8B 42 inc dx ; increment offset (16 bit or 32 bit) 4549 00008D8C F6C207 test dl, 7 4550 00008D8F 740C jz ee15_linebreak_and_ee2 4551 ; if new line 4552 00008D91 F7D1 not cx 4553 00008D93 83C104 add cx, byte 4 ; compute 3 - cx 4554 00008D96 B020 mov al, 32 4555 00008D98 F3AA rep stosb ; store that many spaces 4556 00008D9A E9EDFE jmp ee3 ; back for more 4557 4558 ee15_linebreak_and_ee2: 4559 00008D9D B80D0A mov ax, 10 << 8 | 13 ; terminate this line 4560 00008DA0 AB stosw 4561 00008DA1 E9D0FE jmp ee2 ; back for a new line 4562 4563 ee16_end: 4564 00008DA4 E97F2C jmp putsline_crlf ; call putsline and return 4565 4566 4567 ; F command - fill memory 4568 ff: 4569 00008DA7 31C9 xor cx, cx ; get address range (no default length) 4570 00008DA9 8B1E[840C] mov bx, word [reg_ds] 4571 00008DAD E8881A call getrange ; get address range into bx:(e)dx 4572 00008DB0 66 _386_PM_o32 ; sub ecx, edx 4573 00008DB1 29D1 sub cx, dx 4574 00008DB3 66 _386_PM_o32 ; inc ecx 4575 00008DB4 41 inc cx ; (e)cx = number of bytes 4576 00008DB5 53 push bx 4577 00008DB6 66 _386_PM_o32 ; push ecx 4578 00008DB7 51 push cx ; save it 4579 00008DB8 66 _386_PM_o32 ; push edx 4580 00008DB9 52 push dx ; save start address 4581 4582 00008DBA 4E dec si 4583 00008DBB BA[0067] mov dx, msg.range 4584 00008DBE E8CE2A call isstring? 4585 00008DC1 AC lodsb 4586 00008DC2 7517 jne .notrange 4587 4588 00008DC4 8B1E[840C] mov bx, word [reg_ds] ; get search range 4589 00008DC8 800E[A700]04 setopt [internalflags3], dif3_accept_getrange_0 4590 00008DCD E8611A call getrangeX.ecx_and_0_valid 4591 ; try to get second range 4592 00008DD0 E8302B call chkeol ; and insure end-of-line 4593 ; successful if it returned 4594 00008DD3 66 _386_PM_o32 ; mov esi, edx 4595 00008DD4 89D6 mov si, dx ; bx:esi-> source string 4596 00008DD6 66 _386_PM_o32 ; sub ecx, edx 4597 00008DD7 29D1 sub cx, dx ; ecx = count - 1 4598 00008DD9 EB1E jmp short @F 4599 4600 .notrange: 4601 00008DDB E8372B call skipcomm0 4602 00008DDE E88B1B call getstr ; get string of bytes 4603 00008DE1 89F9 mov cx, di 4604 00008DE3 81E9[0E08] sub cx, line_out 4605 00008DE7 7503E9F016 jz error 4606 00008DEC 49 dec cx 4607 00008DED 660FB7C9 _386_PM movzx ecx, cx 4608 00008DF1 8CDB mov bx, ds 4609 00008DF3 6631F6 _386_PM xor esi, esi 4610 00008DF6 BE[0E08] mov si, line_out 4611 4612 @@: 4613 00008DF9 66 _386_PM_o32 ; pop edi 4614 00008DFA 5F pop di 4615 00008DFB 66 _386_PM_o32 ; pop eax 4616 00008DFC 58 pop ax 4617 00008DFD 07 pop es 4618 00008DFE 8EDB mov ds, bx 4619 %if _PM 4620 00008E00 36803E[DC88]00 cmp byte [ss:bAddr32], 0 4621 00008E06 7440 jz ff16 4622 ff32: 4623 [cpu 386] 4624 00008E08 6641 inc ecx 4625 00008E0A 0F84CE16 jz error 4626 00008E0E 6683F901 cmp ecx, byte 1 4627 00008E12 7429 je .onebytesource 4628 00008E14 6631D2 xor edx, edx ; edx:eax = size 4629 00008E17 66F7F1 div ecx 4630 00008E1A 6685C0 test eax, eax 4631 00008E1D 7413 jz .partial 4632 .loop: 4633 00008E1F 6656 push esi 4634 00008E21 6651 push ecx 4635 00008E23 67A4 a32 movsb 4636 00008E25 6649 dec ecx 4637 00008E27 F367A4 a32 rep movsb 4638 00008E2A 6659 pop ecx 4639 00008E2C 665E pop esi 4640 00008E2E 6648 dec eax 4641 00008E30 75ED jnz .loop 4642 .partial: 4643 00008E32 6689D1 mov ecx, edx ; get remainder (number of bytes in partial copy) 4644 00008E35 67E344 jecxz ffret ; if no partial copy --> 4645 00008E38 F367A4 a32 rep movsb 4646 00008E3B EB3F jmp short ffret ; done --> 4647 .onebytesource: 4648 00008E3D 6689C1 mov ecx, eax ; size 4649 00008E40 678A06 mov al, byte [esi] 4650 00008E43 F367AA a32 rep stosb 4651 00008E46 EB34 jmp short ffret 4652 __CPU__ 4653 ff16: 4654 %endif 4655 00008E48 31D2 xor dx, dx ; dx:ax = size 4656 00008E4A 83F801 cmp ax, byte 1 4657 00008E4D 83D200 adc dx, byte 0 ; convert 0000:0000 to 0001:0000 (0 = 64 KiB) 4658 00008E50 41 inc cx 4659 00008E51 7503 jnz @F 4660 ; dx:ax = 1_0000h, remainder = 0, quotient = 1 4661 ; dx:ax = 1, remainder = 1, quotient = 0 4662 ; dx:ax = 1234h, remainder = 1234h, quotient = 0 4663 00008E53 92 xchg ax, dx 4664 00008E54 EB07 jmp @FF 4665 4666 @@: 4667 00008E56 83F901 cmp cx, byte 1 4668 00008E59 7419 je .onebytesource ; a common optimization 4669 00008E5B F7F1 div cx ; compute number of whole repetitions 4670 @@: 4671 00008E5D 85C0 test ax, ax 4672 00008E5F 740B jz .partial ; if less than one whole rep 4673 .loop: 4674 00008E61 56 push si 4675 00008E62 51 push cx 4676 00008E63 A4 movsb 4677 00008E64 49 dec cx 4678 00008E65 F3A4 rep movsb 4679 00008E67 59 pop cx 4680 00008E68 5E pop si 4681 00008E69 48 dec ax 4682 00008E6A 75F5 jnz .loop ; if more to go 4683 .partial: 4684 00008E6C 89D1 mov cx, dx ; get remainder (number of bytes in partial copy) 4685 00008E6E E30C jcxz ffret ; if no partial copy --> 4686 00008E70 F3A4 rep movsb 4687 00008E72 EB08 jmp short ffret ; done --> 4688 .onebytesource: 4689 00008E74 89C1 mov cx, ax ; size 4690 00008E76 8A04 mov al, byte [si] 4691 00008E78 AA stosb ; cx=0 -> 64 kB 4692 00008E79 49 dec cx 4693 00008E7A F3AA rep stosb 4694 ffret: 4695 00008E7C 16 push ss ; restore ds 4696 00008E7D 1F pop ds 4697 00008E7E 16 push ss ; restore es 4698 00008E7F 07 pop es 4699 00008E80 C3 retn 4700 4701 4702 %if _EXPRESSIONS 4703 4704 ; H command - hex computation 4705 hh: 4706 00008E81 E8912A call skipcomm0 4707 00008E84 4E dec si 4708 00008E85 BA[5467] mov dx, msg.base 4709 00008E88 E8042A call isstring? 4710 00008E8B 7403E9CC00 jne .normal 4711 00008E90 E89A2A call skipequals 4712 00008E93 E85124 call getexpression 4713 00008E96 85DB test bx, bx 4714 @@: 4715 00008E98 7403E93F16 jnz error 4716 00008E9D 83FA24 cmp dx, 36 4717 00008EA0 77F6 ja @B 4718 00008EA2 83FA02 cmp dx, 2 4719 00008EA5 72F1 jb @B 4720 00008EA7 52 push dx 4721 4722 00008EA8 E86A2A call skipcomm0 4723 00008EAB 4E dec si 4724 00008EAC BA[5967] mov dx, msg.group 4725 00008EAF E8DD29 call isstring? 4726 00008EB2 BA0000 mov dx, 0 4727 00008EB5 7513 jne .gotgroup 4728 00008EB7 E8732A call skipequals 4729 00008EBA E82A24 call getexpression 4730 00008EBD E8552A call skipcomm0 4731 00008EC0 85DB test bx, bx 4732 00008EC2 75D4 jnz @B 4733 00008EC4 83FA20 cmp dx, 32 4734 00008EC7 77CF ja @B 4735 00008EC9 4E dec si 4736 .gotgroup: 4737 00008ECA 52 push dx 4738 00008ECB BA[5F67] mov dx, msg.width 4739 00008ECE E8BE29 call isstring? 4740 00008ED1 BB0000 mov bx, 0 4741 00008ED4 7515 jne .gotwidth 4742 00008ED6 E8542A call skipequals 4743 00008ED9 E80B24 call getexpression 4744 00008EDC E8362A call skipcomm0 4745 00008EDF 85DB test bx, bx 4746 00008EE1 75B5 jnz @B 4747 00008EE3 83FA20 cmp dx, 32 4748 00008EE6 77B0 ja @B 4749 00008EE8 89D3 mov bx, dx 4750 00008EEA A8 db __TEST_IMM8 ; (skip lodsb) 4751 .gotwidth: 4752 00008EEB AC lodsb 4753 00008EEC 53 push bx 4754 00008EED E8E200 call .compute 4755 00008EF0 58 pop ax 4756 00008EF1 5E pop si 4757 00008EF2 59 pop cx 4758 00008EF3 BF[5008] mov di, line_out + 66 4759 4760 00008EF6 E81901 call .storeresult 4761 4762 00008EF9 93 xchg bx, ax ; ax:dx = number, bx = width 4763 00008EFA 92 xchg ax, dx ; dx:ax = number 4764 lframe 4765 00008EFB 5589E5 lenter 4766 lvar dword, dividend 4767 00008EFE 52 push dx 4768 00008EFF 50 push ax 4769 00008F00 4B dec bx 4770 lvar word, minwidth 4771 00008F01 53 push bx 4772 lvar word, group 4773 00008F02 56 push si 4774 lvar word, groupcounter 4775 00008F03 56 push si 4776 4777 00008F04 89FB mov bx, di 4778 00008F06 FD std ; _AMD_ERRATUM_109_WORKAROUND does not apply 4779 4780 ; dword [bp + ?dividend] = number to display 4781 ; cx = base 4782 .loop_write: 4783 4784 00008F07 31D2 xor dx, dx 4785 00008F09 57 push di 4786 00008F0A BF0400 mov di, 4 4787 .loop_divide: 4788 00008F0D 8B43FA mov ax, [bp + ?dividend - 2 + di] 4789 00008F10 F7F1 div cx 4790 00008F12 8943FA mov word [bp + ?dividend - 2 + di], ax 4791 00008F15 4F dec di 4792 00008F16 4F dec di 4793 00008F17 75F4 jnz .loop_divide 4794 ; dx = last remainder 4795 00008F19 5F pop di 4796 00008F1A 92 xchg ax, dx ; ax = remainder (next digit) 4797 ; dword [bp + ?dividend] = result of div 4798 00008F1B 0430 add al, '0' 4799 00008F1D 3C39 cmp al, '9' 4800 00008F1F 7602 jbe @F 4801 00008F21 0407 add al, -('9'+1)+'A' 4802 @@: 4803 00008F23 AA stosb 4804 4805 00008F24 FF4EF6 dec word [bp + ?groupcounter] 4806 00008F27 7509 jnz @F 4807 00008F29 FF76F8 push word [bp + ?group] 4808 00008F2C 8F46F6 pop word [bp + ?groupcounter] 4809 00008F2F B05F mov al, '_' 4810 00008F31 AA stosb 4811 @@: 4812 4813 00008F32 FF4EFA dec word [bp + ?minwidth] 4814 00008F35 79D0 jns .loop_write 4815 4816 00008F37 837EFE00 cmp word [bp + ?dividend + 2], 0 4817 00008F3B 75CA jnz .loop_write 4818 00008F3D 837EFC00 cmp word [bp + ?dividend], 0 4819 ; any more ? 4820 00008F41 75C4 jnz .loop_write ; loop --> 4821 4822 00008F43 FC cld 4823 4824 00008F44 29FB sub bx, di 4825 00008F46 89D9 mov cx, bx 4826 00008F48 89FE mov si, di 4827 00008F4A 46 inc si 4828 4829 00008F4B BF[0E08] mov di, line_out 4830 4831 00008F4E 803C5F cmp byte [si], '_' 4832 00008F51 7502 jne @F 4833 00008F53 46 inc si 4834 00008F54 49 dec cx 4835 ; never need to loop because next digit is always a digit 4836 4837 @@: 4838 00008F55 F3A4 rep movsb ; overlapping! 4839 4840 00008F57 89EC5D lleave 4841 00008F5A EB73 jmp short .putsline_crlf 4842 4843 4844 .normal: 4845 00008F5C AC lodsb 4846 00008F5D 56 push si 4847 00008F5E 50 push ax 4848 00008F5F 800E[AC95]01 or byte [hhflag], 1 ; set flag so no operator means add 4849 00008F64 E86B00 call .compute 4850 00008F67 58 pop ax 4851 00008F68 5E pop si 4852 00008F69 E8A600 call .storeresult 4853 00008F6C F606[AC95]04 test byte [hhflag], 4 ; any two-fold operation ? 4854 00008F71 741F jz .single ; no --> 4855 00008F73 8A26[8100] mov ah, byte [options2 + 1] 4856 00008F77 80E410 and ah, opt2_hh_compat >> 8 4857 00008F7A E87100 call .store2 ; display "FFFFFFFF (-0001)" 4858 00008F7D 50 push ax 4859 00008F7E B82020 mov ax, 32<<8|32 4860 00008F81 AB stosw 4861 00008F82 58 pop ax 4862 00008F83 50 push ax 4863 00008F84 800E[AC95]02 or byte [hhflag], 2 ; set flag so no operator means sub 4864 00008F89 E84600 call .compute 4865 00008F8C 58 pop ax 4866 00008F8D E85E00 call .store2 ; display "FFFFFFFF (-0001)" 4867 00008F90 EB3D jmp short .putsline_crlf 4868 4869 .single: 4870 00008F92 B400 mov ah, 0 4871 00008F94 53 push bx 4872 00008F95 52 push dx 4873 00008F96 E85500 call .store2 4874 4875 00008F99 B82020 mov ax, (32 << 8) | 32 4876 00008F9C AB stosw 4877 00008F9D B86465 mov ax, "de" 4878 00008FA0 AB stosw 4879 00008FA1 B86369 mov ax, "ci" 4880 00008FA4 AB stosw 4881 00008FA5 B86D61 mov ax, "ma" 4882 00008FA8 AB stosw 4883 00008FA9 B86C3A mov ax, "l:" 4884 00008FAC AB stosw 4885 00008FAD B020 mov al, 32 4886 00008FAF AA stosb 4887 00008FB0 58 pop ax 4888 00008FB1 5A pop dx 4889 00008FB2 E8C929 call decdword 4890 00008FB5 85D2 test dx, dx ; result negative ? 4891 00008FB7 7916 jns @F ; no --> 4892 00008FB9 50 push ax 4893 00008FBA B82028 mov ax, " (" 4894 00008FBD AB stosw 4895 00008FBE B02D mov al, "-" 4896 00008FC0 AA stosb 4897 00008FC1 58 pop ax 4898 00008FC2 F7DA neg dx 4899 00008FC4 F7D8 neg ax 4900 00008FC6 83DA00 sbb dx, byte 0 ; neg bx:dx 4901 00008FC9 E8B229 call decdword 4902 00008FCC B029 mov al, ")" 4903 00008FCE AA stosb 4904 @@: 4905 .putsline_crlf: 4906 00008FCF E9542A jmp putsline_crlf 4907 4908 4909 .compute: 4910 00008FD2 E81223 call getdword 4911 00008FD5 E82B29 call chkeol ; expect end of line here 4912 .comp_ret: 4913 00008FD8 C3 retn 4914 4915 ; INP: bx:dx = result 4916 ; ah = flag, nonzero if to stay 86-DOS Debug compatible 4917 ; OUT: displayed 4918 ; CHG: di, bx, dx 4919 .store: 4920 00008FD9 50 push ax 4921 00008FDA 84E4 test ah, ah 4922 00008FDC 7509 jnz .store_nothigh 4923 00008FDE 85DB test bx, bx 4924 00008FE0 7405 jz .store_nothigh ; no need to display 32-bit value 4925 00008FE2 89D8 mov ax, bx 4926 00008FE4 E8072A call hexword 4927 .store_nothigh: 4928 00008FE7 89D0 mov ax, dx 4929 00008FE9 E8022A call hexword 4930 00008FEC 58 pop ax 4931 00008FED C3 retn 4932 4933 .store2: 4934 00008FEE E8E8FF call .store 4935 00008FF1 50 push ax 4936 00008FF2 84E4 test ah, ah 4937 00008FF4 751A jnz .store2_ret 4938 00008FF6 85DB test bx, bx ; result negative ? 4939 00008FF8 7916 jns .store2_ret ; no --> 4940 00008FFA B82028 mov ax, " (" 4941 00008FFD AB stosw 4942 00008FFE B02D mov al, "-" 4943 00009000 AA stosb 4944 00009001 F7DB neg bx 4945 00009003 F7DA neg dx 4946 00009005 83DB00 sbb bx, byte 0 ; neg bx:dx 4947 00009008 58 pop ax 4948 00009009 50 push ax 4949 0000900A E8CCFF call .store 4950 0000900D B029 mov al, ")" 4951 0000900F AA stosb 4952 .store2_ret: 4953 00009010 58 pop ax 4954 00009011 C3 retn 4955 4956 4957 .storeresult: 4958 00009012 8916[0490] mov word [hhresult], dx 4959 00009016 891E[0690] mov word [hhresult + 2], bx 4960 0000901A C3 retn 4961 %else 4962 ; H command - hex addition and subtraction. 4963 hh: 4964 call getdword 4965 push bx 4966 push dx 4967 call skipcomm0 4968 call getdword 4969 call chkeol ; expect end of line here 4970 pop cx 4971 pop ax ; first value in AX:CX, second in BX:DX 4972 mov si, ax 4973 mov bp, cx ; first value in SI:BP now 4974 mov ax, cx 4975 add ax, dx 4976 push ax 4977 mov ax, si 4978 adc ax, bx 4979 jz .nothigh1 ; no need to display 32-bit value 4980 call hexword 4981 .nothigh1: 4982 pop ax 4983 call hexword 4984 mov ax, 2020h 4985 stosw 4986 mov ax, bp 4987 sub ax, dx 4988 push ax 4989 mov ax, si 4990 sbb ax, bx 4991 jz .nothigh2 ; no need to display 32-bit value 4992 or si, bx 4993 jz .nothigh2 ; both were zero, non-zero result only by carry --> 4994 call hexword 4995 .nothigh2: 4996 pop ax 4997 call hexword 4998 call putsline_crlf 4999 retn 5000 %endif 5001 5002 5003 usesection lDEBUG_DATA_ENTRY 5004 5005 align 4, db 0 5006 00009004 00000000 hhresult: dd 0 5007 5008 usesection lDEBUG_CODE 5009 5010 5011 ; O command - output to I/O port. 5012 oo: 5013 0000901B B44F mov ah, 'O' 5014 0000901D BB[2490] mov bx, .tab 5015 00009020 E95A01 jmp ii.common 5016 5017 5018 00009023 00 align 2, db 0 5019 .tab: 5020 00009024 [2A90][3490][3E90] dw .byte, .word, .dword 5021 5022 5023 .byte: 5024 0000902A E8AE27 call getbyte ; read value from command line 5025 0000902D E8D328 call chkeol ; expect end of line here 5026 00009030 92 xchg ax, dx ; al = value 5027 00009031 5A pop dx ; recover port number 5028 00009032 EE out dx, al ; send 5029 00009033 C3 retn 5030 5031 .word: 5032 00009034 E89627 call getword 5033 00009037 E8C928 call chkeol 5034 0000903A 92 xchg ax, dx ; ax = value 5035 0000903B 5A pop dx 5036 0000903C EF out dx, ax 5037 0000903D C3 retn 5038 5039 .dword: 5040 [cpu 386] 5041 0000903E E8A622 call getdword 5042 00009041 E8BF28 call chkeol ; expect end of line here 5043 00009044 53 push bx 5044 00009045 52 push dx 5045 00009046 6658 pop eax ; eax = value 5046 00009048 5A pop dx 5047 00009049 66EF out dx, eax 5048 0000904B C3 retn 5049 __CPU__ 5050 5051 5052 %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 5053 if_exists_check: 5054 0000904C 16 push ss 5055 0000904D 07 pop es 5056 0000904E 8B3E[080C] mov di, word [if_exists_si] 5057 00009052 8B0E[0C0C] mov cx, word [if_exists_length] 5058 00009056 8B36[0A0C] mov si, word [if_exists_sp] 5059 0000905A F3A4 rep movsb 5060 0000905C 8B0E[0C0C] mov cx, word [if_exists_length] 5061 00009060 41 inc cx 5062 00009061 80E1FE and cl, ~1 5063 5064 00009064 8B36[060C] mov si, word [if_exists_then_address] 5065 00009068 85F6 test si, si 5066 0000906A 740A jz .error 5067 0000906C 4E dec si 5068 0000906D BA[B164] mov dx, msg.then 5069 00009070 E81C28 call isstring? 5070 00009073 7501 jne .error 5071 00009075 C3 retn 5072 5073 .error: 5074 00009076 B80701 mov ax, 107h 5075 00009079 E8A714 call setrc 5076 0000907C E95D14 jmp error 5077 5078 if_exists_not_found: 5079 0000907F E8CAFF call if_exists_check 5080 00009082 F606[A400]40 testopt [internalflags3], dif3_if_not 5081 00009087 7512 jnz if_exists_condition_met 5082 if_exists_condition_not_met: 5083 00009089 E9746F jmp cmd3 5084 5085 if_exists_found_open: 5086 0000908C 16 push ss 5087 0000908D 07 pop es 5088 0000908E E89533 call getline_close_file 5089 5090 if_exists_found_closed: 5091 00009091 E8B8FF call if_exists_check 5092 00009094 F606[A400]40 testopt [internalflags3], dif3_if_not 5093 00009099 75EE jnz if_exists_condition_not_met 5094 if_exists_condition_met: 5095 0000909B 8B26[0A0C] mov sp, word [if_exists_sp] 5096 0000909F 01CC add sp, cx 5097 000090A1 E89F28 call skipwhite 5098 000090A4 5A pop dx ; discard near return address 5099 000090A5 8026[A700]E7 clropt [internalflags3], dif3_in_if | dif3_auxbuff_guarded_1 5100 000090AA E99472 jmp cmd3_notblank 5101 %endif 5102 5103 5104 ; I command - input from I/O port. 5105 ; 5106 ; IF command -- conditional 5107 ii: 5108 000090AD 89F2 mov dx, si 5109 000090AF 50 push ax 5110 000090B0 8B44FE mov ax, [si - 2] 5111 000090B3 25DFDF and ax, TOUPPER_W 5112 000090B6 3D4946 cmp ax, "IF" 5113 000090B9 58 pop ax 5114 000090BA 7403E9B500 jne .not_if 5115 5116 000090BF E88128 call skipwhite 5117 000090C2 E8EE18 call isoperator? 5118 000090C5 7514 jne .if 5119 000090C7 89CB mov bx, cx 5120 000090C9 01DB add bx, bx ; bh = 0 ! 5121 000090CB 50 push ax 5122 000090CC FF97[B090] call near [operatordispatchers+bx] 5123 000090D0 58 pop ax 5124 000090D1 85DB test bx, bx 5125 000090D3 7403E99C00 jnz .not_if 5126 000090D8 E86828 call skipwhite 5127 .if: 5128 000090DB 8026[A400]BF clropt [internalflags3], dif3_if_not 5129 000090E0 4E dec si 5130 000090E1 BA[B664] mov dx, msg.not 5131 000090E4 E8A827 call isstring? 5132 000090E7 AC lodsb 5133 000090E8 7508 jne @F 5134 000090EA E85728 call skipwh0 5135 000090ED 800E[A400]40 setopt [internalflags3], dif3_if_not 5136 5137 @@: 5138 %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 5139 000090F2 4E dec si 5140 000090F3 BA[7C6C] mov dx, msg.exists 5141 000090F6 E89627 call isstring? 5142 000090F9 AC lodsb 5143 000090FA 754C jne .if_numeric 5144 000090FC E84528 call skipwh0 5145 000090FF 4E dec si 5146 00009100 BA[836C] mov dx, msg.y 5147 00009103 E88927 call isstring? 5148 00009106 7403E9D113 jne error 5149 0000910B E83528 call skipwhite 5150 5151 0000910E 4E dec si 5152 0000910F 8936[080C] mov word [if_exists_si], si 5153 00009113 89F3 mov bx, si 5154 @@: 5155 00009115 AC lodsb 5156 00009116 E8D927 call iseol?.notsemicolon 5157 00009119 75FA jne @B 5158 0000911B 89F1 mov cx, si ; -> after EOL byte 5159 0000911D 29D9 sub cx, bx ; = length including EOL 5160 0000911F 890E[0C0C] mov word [if_exists_length], cx 5161 00009123 41 inc cx ; round up 5162 00009124 80E1FE and cl, ~1 ; make even 5163 00009127 29CC sub sp, cx 5164 00009129 8926[0A0C] mov word [if_exists_sp], sp 5165 0000912D 89E7 mov di, sp 5166 0000912F 89DE mov si, bx 5167 00009131 D1E9 shr cx, 1 5168 00009133 F3A5 rep movsw 5169 5170 00009135 89DE mov si, bx 5171 00009137 AC lodsb 5172 00009138 8326[060C]00 and word [if_exists_then_address], 0 5173 0000913D 800E[A700]08 setopt [internalflags3], dif3_in_if 5174 00009142 E87138 call yy 5175 00009145 E99413 jmp error 5176 %endif 5177 5178 .if_numeric: 5179 00009148 E89C21 call getexpression 5180 0000914B E8AB1B call toboolean 5181 0000914E 89D3 mov bx, dx 5182 00009150 BA[B164] mov dx, msg.then 5183 00009153 4E dec si 5184 00009154 E83827 call isstring? 5185 00009157 7403E98013 jne error 5186 0000915C E8E427 call skipwhite 5187 0000915F F606[A400]40 testopt [internalflags3], dif3_if_not 5188 00009164 7403 jz @F 5189 00009166 80F301 xor bl, 1 5190 @@: 5191 00009169 85DB test bx, bx 5192 0000916B 7404 jz .if_false 5193 0000916D 5B pop bx ; discard near return address to cmd3 5194 0000916E E9D071 jmp cmd3_notblank ; execute tail 5195 5196 .if_false: 5197 00009171 E9023D jmp resetrc 5198 5199 .not_if: 5200 00009174 89D6 mov si, dx 5201 00009176 4E dec si 5202 00009177 AC lodsb 5203 5204 00009178 B449 mov ah, 'I' 5205 0000917A BB[B091] mov bx, .tab 5206 5207 ; bx = jump table for byte, word, dword handler 5208 ; ah = letter of the command 5209 ; si, al etc. 5210 .common: 5211 0000917D 50 push ax 5212 0000917E E892FA call uppercase 5213 00009181 3C57 cmp al, 'W' 5214 00009183 7507 jne .notw 5215 .incbx2: 5216 00009185 43 inc bx 5217 00009186 43 inc bx ; use word handler 5218 00009187 E8B927 call skipwhite ; skip the 'W' til next character 5219 0000918A EB12 jmp short .sizeset 5220 5221 .notw: 5222 0000918C 3C44 cmp al, 'D' 5223 0000918E 750E jne .sizeset 5224 %if 1 5225 00009190 3264FE xor ah, byte [si-2] 5226 00009193 7405 jz .d ; "Id" or "Od" --> (uppercase command) 5227 00009195 80F420 xor ah, 32 5228 00009198 7504 jnz .sizeset ; no space is allowed between the command and 'D' --> 5229 ; "id" or "od" here (lowercase command) 5230 .d: 5231 %endif 5232 0000919A 43 _386 inc bx 5233 0000919B 43 _386 inc bx ; use dword handler 5234 0000919C EBE7 _386_jmps .incbx2 ; bx += 2 and skip the 'D' 5235 ; no 386 here. try with D as part of port number 5236 .sizeset: 5237 0000919E E82C26 call getword ; get port 5238 000091A1 59 pop cx ; restore letter if necessary 5239 000091A2 80FD49 cmp ch, 'I' ; check whether I or O 5240 000091A5 7504 jne .o ; O --> 5241 000091A7 E85927 call chkeol ; expect end of line here for I commands 5242 000091AA A8 db __TEST_IMM8 ; (skip push) 5243 .o: 5244 000091AB 52 push dx ; save port number for O commands 5245 000091AC 2EFF27 jmp near [cs:bx] 5246 5247 5248 000091AF 00 align 2, db 0 5249 .tab: 5250 000091B0 [B691][BC91][C391] dw .byte, .word, .dword 5251 5252 .byte: 5253 000091B6 EC in al, dx 5254 000091B7 E83B28 call hexbyte 5255 000091BA EB04 jmp short .done 5256 5257 .word: 5258 000091BC ED in ax, dx 5259 .doneword: 5260 000091BD E82E28 call hexword 5261 .done: 5262 000091C0 E96328 jmp putsline_crlf 5263 5264 .dword: 5265 [cpu 386] 5266 000091C3 66ED in eax, dx 5267 000091C5 E81A28 call hexword_high 5268 __CPU__ 5269 000091C8 EBF3 jmp short .doneword 5270 5271 5272 000091CA E90F13 errorj5:jmp error 5273 5274 5275 %if _PM 5276 ; OUT: NC 5277 ; ZR if in protected mode 5278 ; NZ otherwise 5279 ; STT: - 5280 ; ([internalflags] & nodosloaded, [internalflags] & protectedmode set up) 5281 ispm: 5282 000091CD 50 push ax 5283 %if protectedmode & ~0FF00h 5284 %error Internal flags re-ordered, adjust code here 5285 %endif 5286 000091CE 36A0[9D00] mov al, byte [ss:internalflags+1] ; get flag byte 5287 000091D2 2408 and al, protectedmode>>8 ; separate PM flag 5288 000091D4 3408 xor al, protectedmode>>8 ; ZR if in PM (NC) 5289 000091D6 58 pop ax 5290 000091D7 C3 retn 5291 %endif 5292 5293 5294 setpspdbg: 5295 000091D8 8CD3 mov bx, ss 5296 setpsp: 5297 %if _BOOTLDR 5298 000091DA F606[9D00]40 testopt [internalflags], nodosloaded 5299 000091DF 753D jnz .ret ; no PSPs --> 5300 %endif 5301 000091E1 B450 mov ah, 50h 5302 %if _PM && (_NOEXTENDER || _USESDA) 5303 000091E3 E8E7FF call ispm 5304 %if _NOEXTENDER 5305 000091E6 751B jnz .rm 5306 subcpu 286 5307 000091E8 51 push cx 5308 000091E9 52 push dx 5309 000091EA 53 push bx 5310 000091EB 50 push ax 5311 000091EC B80600 mov ax, 0006h 5312 000091EF CD31 int 31h 5313 000091F1 58 pop ax 5314 000091F2 C1E10C shl cx, 12 5315 000091F5 C1EA04 shr dx, 4 5316 000091F8 09CA or dx, cx 5317 000091FA 89D3 mov bx, dx 5318 000091FC E871CB call _doscall.pm ; insure non-extended 5319 000091FF 5B pop bx 5320 00009200 5A pop dx 5321 00009201 59 pop cx 5322 00009202 C3 retn 5323 subcpureset 5324 %else 5325 jz _int21 ; extended 5326 %endif 5327 %endif 5328 .rm: 5329 %if _USESDA 5330 00009203 833E[DA0A]FF cmp word [pSDA+0], byte -1 5331 00009208 7503E98300 je _int21 5332 0000920D 1E push ds 5333 0000920E 56 push si 5334 0000920F BE[DC0A] mov si, pSDA + so16aSegSel 5335 00009212 E8B214 call update_dosdata_segment 5336 00009215 C574FE lds si, [si - so16aSegSel] 5337 00009218 895C10 mov word [si+10h], bx 5338 0000921B 5E pop si 5339 0000921C 1F pop ds 5340 0000921D C3 retn 5341 %else 5342 jmp short _int21 5343 %endif 5344 %if _BOOTLDR 5345 .ret: 5346 getpsp.ret: 5347 0000921E C3 retn 5348 %endif 5349 5350 getpsp: 5351 %if _BOOTLDR 5352 0000921F 31DB xor bx, bx 5353 00009221 F606[9D00]40 testopt [internalflags], nodosloaded 5354 00009226 75F6 jnz .ret ; no PSPs --> 5355 %endif 5356 00009228 B451 mov ah, 51h 5357 %if _PM && (_NOEXTENDER || _USESDA) 5358 0000922A E8A0FF call ispm 5359 %if _NOEXTENDER 5360 0000922D 750B jnz .rm 5361 0000922F E83ECB call _doscall.pm ; insure non-extended 5362 00009232 B80200 mov ax, 2 5363 00009235 CD31 int 31h 5364 00009237 89C3 mov bx, ax 5365 00009239 C3 retn 5366 %else 5367 jz _int21 ; extended 5368 %endif 5369 %endif 5370 .rm: 5371 %if _USESDA 5372 0000923A 833E[DA0A]FF cmp word [pSDA+0], byte -1 5373 0000923F 744F je _int21 5374 00009241 1E push ds 5375 00009242 56 push si 5376 00009243 BE[DC0A] mov si, pSDA + so16aSegSel 5377 00009246 E87E14 call update_dosdata_segment 5378 00009249 C574FE lds si, [si - so16aSegSel] 5379 0000924C 8B5C10 mov bx, word [si + 10h] 5380 0000924F 5E pop si 5381 00009250 1F pop ds 5382 00009251 C3 retn 5383 %else 5384 jmp short _int21 5385 %endif 5386 5387 5388 _doscall_return_es: 5389 _doscall_return_es_parameter_es_ds: 5390 lframe near 5391 lpar word, es_ds_value 5392 lpar_return 5393 %if _PM 5394 lvar word, int_number 5395 00009252 5589E550 lenter 5396 00009256 C746FE2100 mov word [bp + ?int_number], 21h 5397 0000925B 9C pushf 5398 0000925C E86EFF call ispm 5399 0000925F 7518 jnz .rm 5400 .pm: 5401 00009261 9D popf 5402 00009262 FF7604 push word [bp + ?es_ds_value] 5403 00009265 FF7604 push word [bp + ?es_ds_value] 5404 00009268 FF76FE push word [bp + ?int_number] 5405 0000926B FF7600 push word [bp + ?frame_bp] 5406 0000926E E83100 call intcall_return_parameter_es_parameter_ds 5407 00009271 8F4604 pop word [bp + ?es_ds_value] ; discard returned ds 5408 00009274 8F4604 pop word [bp + ?es_ds_value] ; get es 5409 00009277 EB13 jmp .ret 5410 .rm: 5411 00009279 9D popf 5412 %else 5413 lenter 5414 %endif 5415 0000927A 06 push es 5416 0000927B 1E push ds 5417 0000927C FF7604 push word [bp + ?es_ds_value] 5418 0000927F 1F pop ds 5419 00009280 FF7604 push word [bp + ?es_ds_value] 5420 00009283 07 pop es 5421 00009284 CD21 int 21h 5422 00009286 06 push es 5423 00009287 8F4604 pop word [bp + ?es_ds_value] 5424 0000928A 1F pop ds 5425 0000928B 07 pop es 5426 .ret: 5427 0000928C 89EC5D lleave 5428 0000928F C3 lret 5429 5430 5431 ; Execute real Int21 instruction. If this is in PM it might get extended. 5432 _int21: 5433 %if _BOOTLDR 5434 00009290 9C pushf 5435 00009291 F606[9D00]40 testopt [internalflags], nodosloaded 5436 00009296 7504 jnz .reterr ; no Int21 --> (throw?) 5437 00009298 9D popf 5438 %endif 5439 00009299 CD21 int 21h 5440 0000929B C3 retn 5441 %if _BOOTLDR 5442 .reterr: 5443 0000929C 9D popf 5444 0000929D B80100 mov ax, 1 5445 000092A0 F9 stc 5446 000092A1 C3 retn 5447 %endif 5448 5449 5450 %if _PM 5451 intcall_return_parameter_es_parameter_ds: 5452 lframe near 5453 lpar word, es_value 5454 lpar word, ds_value 5455 lpar_return 5456 lpar word, int_number 5457 lpar word, bp_value 5458 lvar 32h, 86m_call_struc 5459 000092A2 5589E58D66CE lenter 5460 000092A8 06 push es 5461 000092A9 897ECE mov word [bp + ?86m_call_struc +00h], di ; edi 5462 000092AC 8976D2 mov word [bp + ?86m_call_struc +04h], si ; esi 5463 000092AF 895EDE mov word [bp + ?86m_call_struc +10h], bx ; ebx 5464 000092B2 8956E2 mov word [bp + ?86m_call_struc +14h], dx ; edx 5465 000092B5 894EE6 mov word [bp + ?86m_call_struc +18h], cx ; ecx 5466 000092B8 8946EA mov word [bp + ?86m_call_struc +1Ch], ax ; eax 5467 000092BB 8B4604 mov ax, word [bp + ?bp_value] 5468 000092BE 8946D6 mov word [bp + ?86m_call_struc +08h], ax ; bp 5469 000092C1 B000 mov al, 0 ; (preserve flags!) 5470 000092C3 9F lahf 5471 000092C4 86C4 xchg al, ah 5472 000092C6 8946EE mov word [bp + ?86m_call_struc +20h], ax ; flags 5473 000092C9 31C0 xor ax, ax 5474 000092CB 8946FC mov word [bp + ?86m_call_struc +2Eh], ax ; sp 5475 000092CE 8946FE mov word [bp + ?86m_call_struc +30h], ax ; ss 5476 000092D1 8B460A mov ax, word [bp + ?es_value] ; usually [pspdbg] 5477 000092D4 8946F0 mov word [bp + ?86m_call_struc +22h], ax ; es 5478 000092D7 8B4608 mov ax, word [bp + ?ds_value] ; usually [pspdbg] 5479 000092DA 8946F2 mov word [bp + ?86m_call_struc +24h], ax ; ds 5480 000092DD 16 push ss 5481 000092DE 07 pop es ; => stack 5482 000092DF 8D7ECE lea di, [bp + ?86m_call_struc] ; -> 86-Mode call structure 5483 000092E2 660FB7FF _386 movzx edi, di ; (previously checked b[dpmi32] here) 5484 000092E6 8B5E06 mov bx, word [bp + ?int_number] ; int# 5485 000092E9 31C9 xor cx, cx 5486 000092EB B80003 mov ax, 0300h 5487 000092EE CD31 int 31h 5488 000092F0 8A66EE mov ah, byte [bp + ?86m_call_struc +20h] ; flags 5489 000092F3 9E sahf 5490 000092F4 8B7ECE mov di, word [bp + ?86m_call_struc +00h] ; edi 5491 000092F7 8B76D2 mov si, word [bp + ?86m_call_struc +04h] ; esi 5492 000092FA 8B5EDE mov bx, word [bp + ?86m_call_struc +10h] ; ebx 5493 000092FD 8B56E2 mov dx, word [bp + ?86m_call_struc +14h] ; edx 5494 00009300 8B4EE6 mov cx, word [bp + ?86m_call_struc +18h] ; ecx 5495 00009303 8B46EA mov ax, word [bp + ?86m_call_struc +1Ch] ; eax 5496 00009306 FF76F0 push word [bp + ?86m_call_struc +22h] ; return es value 5497 00009309 8F460A pop word [bp + ?es_value] ; in the parameter 5498 0000930C FF76F2 push word [bp + ?86m_call_struc +24h] ; return ds value 5499 0000930F 8F4608 pop word [bp + ?ds_value] ; in the parameter 5500 00009312 07 pop es 5501 00009313 89EC5D lleave 5502 00009316 C20400 lret 5503 5504 intcall: 5505 lframe near 5506 lpar word, es_ds_value 5507 lpar word, int_number 5508 00009319 5589E5 lenter 5509 0000931C FF7606 push word [bp + ?es_ds_value] ; es 5510 0000931F FF7606 push word [bp + ?es_ds_value] ; ds 5511 00009322 FF7604 push word [bp + ?int_number] ; int number 5512 00009325 FF7600 push word [bp + ?frame_bp] ; bp 5513 00009328 E877FF call intcall_return_parameter_es_parameter_ds 5514 ; (discard returned parameters ?es_value, ?ds_value, done by lleave) 5515 0000932B 89EC5D lleave , forcerestoresp 5516 0000932E C20400 lret 5517 5518 5519 call_int2D: 5520 00009331 E899FE call ispm 5521 00009334 750B jnz short .rm 5522 subcpu 286 5523 00009336 36FF36[A60A] push word [ss:pspdbg] ; es ds value. generally unused 5524 0000933B 6A2D push 2Dh ; interrupt 2Dh 5525 0000933D E8D9FF call intcall ; call it 5526 00009340 C3 retn 5527 subcpureset 5528 .rm: 5529 00009341 CD2D int 2Dh ; directly call int 2Dh 5530 00009343 C3 retn 5531 5532 5533 ; Called in PM only, ds unknown. 5534 ; 5535 ; INP: - 5536 ; OUT: CY if no DOS extender available ("MS-DOS" on Int2F.168A) 5537 ; NC if DOS extender available 5538 ; CHG: - 5539 isextenderavailable: 5540 subcpu 286 5541 00009344 1E push ds 5542 00009345 06 push es 5543 00009346 60 pusha 5544 00009347 16 push ss 5545 00009348 1F pop ds 5546 00009349 BE[C97C] mov si, msg.msdos 5547 0000934C 660FB7F6 _386 movzx esi, si 5548 00009350 B88A16 mov ax, 168Ah 5549 00009353 CD2F int 2Fh 5550 00009355 3C01 cmp al, 1 ; CY if al is zero 5551 00009357 F5 cmc ; NC if al is zero, CY else 5552 00009358 61 popa 5553 00009359 07 pop es 5554 0000935A 1F pop ds 5555 0000935B C3 retn 5556 subcpureset 5557 5558 nodosextinst: 5559 0000935C 16 push ss 5560 0000935D 1F pop ds 5561 0000935E BA[D97B] mov dx, nodosext 5562 00009361 E9402A jmp putsz 5563 %endif 5564 5565 5566 ; L command - read a program, or disk sectors, from disk. 5567 ll: 5568 %if _BOOTLDR 5569 00009364 F606[9D00]40 testopt [internalflags], nodosloaded 5570 00009369 7406 jz @F 5571 0000936B BA[955F] mov dx, msg.nobootsupp 5572 0000936E E9332A jmp putsz 5573 @@: 5574 %endif 5575 5576 00009371 E8C513 call parselw ; parse L and W argument format 5577 00009374 7441 jz ll1 ; if request to read program 5578 %if _PM && _NOEXTENDER 5579 00009376 E854FE call ispm 5580 00009379 7505 jnz .rm 5581 0000937B E8C6FF call isextenderavailable 5582 0000937E 72DC jc nodosextinst 5583 .rm: 5584 %endif 5585 00009380 36F606[9C00]06 testopt [ss:internalflags], newpacket| ntpacket 5586 00009386 7427 jz .oldint 5587 00009388 88C2 mov dl, al ; zero-based drive 5588 0000938A BE0060 mov si, 6000h ; read, assume "file data" 5589 %if _VDD 5590 0000938D F606[9C00]04 testopt [internalflags], ntpacket 5591 00009392 750A jnz .vdd 5592 %endif 5593 00009394 FEC2 inc dl ; one-based drive 5594 00009396 B80573 mov ax, 7305h ; ds:(e)bx-> packet 5595 00009399 F9 stc 5596 0000939A CD21 int 21h ; use int 21h here, not doscall 5597 0000939C EB13 jmp short .done 5598 %if _VDD 5599 .vdd: 5600 0000939E A1[B80A] mov ax, word [hVdd] 5601 000093A1 B90500 mov cx, 5 5602 %if _PM 5603 000093A4 020E[DA88] add cl, byte [dpmi32] 5604 %endif 5605 000093A8 C4C4580290 DispatchCall 5606 000093AD EB02 jmp short .done 5607 %endif 5608 .oldint: 5609 000093AF CD25 int 25h 5610 .done: 5611 000093B1 BA[A379] mov dx, reading 5612 000093B4 E9DF0D jmp ww1 5613 5614 ; For .COM or .EXE files, we can only load at cs:100. Check that first. 5615 ll1: 5616 000093B7 E8EE12 call InDos 5617 000093BA 7519 jnz not_while_indos 5618 000093BC E83C71 call guard_re 5619 000093BF F606[DF0B]06 test byte [fileext], EXT_COM| EXT_EXE 5620 000093C4 7423 jz ll4 ; if not .COM or .EXE file 5621 000093C6 3B1E[900C] cmp bx, word [reg_cs] 5622 000093CA 7506 jne ll2 ; if segment is wrong 5623 000093CC 81FA0001 cmp dx, 100h 5624 000093D0 7417 je ll4 ; if address is OK (or not given) 5625 ll2: 5626 000093D2 E90711 jmp error ; can only load .COM or .EXE at cs:100 5627 5628 not_while_indos: 5629 000093D5 B80501 mov ax, 0105h 5630 000093D8 E84811 call setrc 5631 000093DB BA[555D] mov dx, msg.not_while_indos 5632 000093DE E9BD29 jmp putsz_error 5633 5634 5635 ; load (any) file (if not .EXE or .COM, load at BX:DX) 5636 ll3: 5637 000093E1 803E[DF0B]00 cmp byte [fileext], 0 5638 000093E6 7501 jne ll4 5639 000093E8 C3 retn 5640 5641 ; open file and get length 5642 ll4: 5643 000093E9 89DE mov si, bx ; save destination address, segment 5644 000093EB 89D7 mov di, dx ; and offset 5645 000093ED B8003D mov ax, 3D00h ; open file for reading 5646 000093F0 BA8000 mov dx, DTA 5647 doscall 2040 000093F3 E873C9 <1> call _doscall 5648 000093F6 7303E9AB01 jc ll16 ; error 5649 000093FB 93 xchg ax, bx ; mov bx, ax 5650 000093FC B80242 mov ax, 4202h ; lseek 5651 000093FF 31C9 xor cx, cx 5652 00009401 31D2 xor dx, dx 5653 00009403 CD21 int 21h 5654 5655 ; Split off file types 5656 ; At this point: 5657 ; bx file handle 5658 ; dx:ax file length 5659 ; si:di load address (CS:100h for .EXE or .COM) 5660 5661 00009405 F606[DF0B]06 test byte [fileext], EXT_COM | EXT_EXE 5662 0000940A 7403E97E00 jnz ll13 ; if .COM or .EXE file 5663 5664 %if _PM 5665 ;--- dont load a file in protected mode, 5666 ;--- the read loop makes some segment register arithmetic 5667 0000940F E8BBFD call ispm 5668 00009412 7508 jnz .rm 5669 00009414 BA[1A7C] mov dx, nopmsupp 5670 00009417 E88A29 call putsz 5671 0000941A EB6A jmp ll12 5672 .rm: 5673 %endif 5674 5675 ; Load it ourselves. 5676 ; For non-.com/.exe files, we just do a read, and set BX:CX to the 5677 ; number of bytes read. 5678 5679 0000941C E8CA3F call ensuredebuggeeloaded ; make sure a debuggee is loaded 5680 0000941F 8E06[A40A] mov es, word [pspdbe] 5681 5682 ; Check the size against available space. 5683 00009423 56 push si 5684 00009424 53 push bx 5685 5686 00009425 263B360200 cmp si, word [es:ALASAP] 5687 0000942A 9C pushf 5688 0000942B F7DE neg si 5689 0000942D 9D popf 5690 0000942E 7305 jae ll6 ; if loading past end of mem, allow through ffff 5691 00009430 2603360200 add si, word [es:ALASAP] ; si = number of paragraphs available 5692 ll6: 5693 00009435 B90400 mov cx, 4 5694 00009438 31DB xor bx, bx 5695 ll7: 5696 0000943A D1E6 shl si, 1 5697 0000943C D1D3 rcl bx, 1 5698 0000943E E2FA loop ll7 5699 00009440 29FE sub si, di 5700 00009442 19CB sbb bx, cx ; bx:si = number of words left 5701 00009444 7208 jb ll9 ; if already we're out of space 5702 00009446 39D3 cmp bx, dx 5703 00009448 7502 jne ll8 5704 0000944A 39C6 cmp si, ax 5705 ll8: 5706 0000944C 730A jae ll10 ; if not out of space 5707 ll9: 5708 0000944E 5B pop bx ; out of space 5709 0000944F 5E pop si 5710 00009450 BA[FE7D] mov dx, doserr8 ; not enough memory 5711 00009453 E84E29 call putsz ; print string 5712 00009456 EB2E jmp short ll12 5713 5714 ll10: 5715 00009458 5B pop bx 5716 00009459 5E pop si 5717 5718 ; Store length in registers 5719 5720 ; seems a bit unwise to modify registers if a debuggee is running 5721 ; but MS DEBUG does it as well 5722 5723 %if 0 5724 mov cx,[reg_cs] 5725 cmp cx,[pspdbe] 5726 jnz .noregmodify 5727 cmp word [reg_eip], 100h 5728 jnz .noregmodify 5729 %endif 5730 0000945A 8916[680C] mov word [reg_ebx], dx 5731 0000945E A3[6C0C] mov word [reg_ecx], ax 5732 .noregmodify: 5733 5734 ; Rewind the file 5735 00009461 B80042 mov ax, 4200h ; lseek 5736 00009464 31C9 xor cx, cx 5737 00009466 31D2 xor dx, dx 5738 00009468 CD21 int 21h 5739 5740 0000946A BA0F00 mov dx, 0Fh 5741 0000946D 21FA and dx, di 5742 0000946F B104 mov cl, 4 5743 00009471 D3EF shr di, cl 5744 00009473 01FE add si, di ; si:dx is the address to read to 5745 5746 ; Begin loop over chunks to read 5747 ll11: 5748 00009475 B43F mov ah, 3Fh ; read from file into DS:(E)DX 5749 00009477 B900FE mov cx, 0FE00h ; read up to this many bytes 5750 0000947A 8EDE mov ds, si 5751 0000947C CD21 int 21h 5752 5753 0000947E 81C6E00F add si,0fe0h ;wont work in protected-mode! 5754 00009482 39C8 cmp ax,cx 5755 00009484 74EF je ll11 ;if end of file reached 5756 5757 ; Close the file and finish up. 5758 5759 ll12: 5760 00009486 B43E mov ah, 3Eh ; close file 5761 00009488 CD21 int 21h 5762 0000948A 16 push ss ; restore ds 5763 0000948B 1F pop ds 5764 0000948C C3 retn ; done 5765 5766 ll13: 5767 ; file is .EXE or .COM 5768 ; Close the file 5769 %if 0 5770 push ax 5771 mov ah, 3Eh ; close file 5772 int 21h 5773 pop bx ; dx:bx is the file length 5774 5775 ; adjust .exe size by 200h (who knows why) 5776 ; cm: this is wrong. It needs to be adjusted by the header size, 5777 ; which is stored (as number of paragraphs) in the .EXE header. 5778 ; The header size is often 200h, but not always. 5779 test byte [fileext], EXT_EXE 5780 jz ll14 ; if not .EXE 5781 sub bx, 200h 5782 sbb dx, 0 5783 %else 5784 0000948D 52 push dx 5785 0000948E 50 push ax 5786 5787 0000948F B80042 mov ax, 4200h ; lseek set 5788 00009492 31C9 xor cx, cx 5789 00009494 31D2 xor dx, dx 5790 00009496 CD21 int 21h 5791 00009498 16 push ss 5792 00009499 1F pop ds 5793 5794 0000949A 89E5 mov bp, sp 5795 0000949C B91C00 mov cx, EXEHEADER_size 5796 0000949F 29CC sub sp, cx 5797 000094A1 89E2 mov dx, sp 5798 000094A3 89E6 mov si, sp 5799 000094A5 B43F mov ah, 3Fh 5800 000094A7 CD21 int 21h 5801 5802 000094A9 50 push ax 5803 000094AA B43E mov ah, 3Eh ; close file 5804 000094AC CD21 int 21h 5805 000094AE 58 pop ax 5806 5807 000094AF 39C8 cmp ax, cx 5808 000094B1 7524 jne .no_exe 5809 000094B3 813C4D5A cmp word [si + exeSignature], "MZ" 5810 000094B7 7406 je @F 5811 000094B9 813C5A4D cmp word [si + exeSignature], "ZM" 5812 000094BD 7518 jne .no_exe 5813 @@: 5814 5815 ; This possibly should honour the size of the image in pages 5816 ; as indicated by the header, instead of the file size. 5817 ; Oh well, for now we use the file size (on stack). 5818 000094BF 8B4408 mov ax, [si + exeHeaderSize] 5819 000094C2 31F6 xor si, si 5820 000094C4 B90400 mov cx, 4 5821 @@: 5822 000094C7 D1E0 shl ax, 1 5823 000094C9 D1D6 rcl si, 1 5824 000094CB E2FA loop @B ; si:ax <<= 4 5825 5826 000094CD 89EC mov sp, bp 5827 000094CF 5B pop bx 5828 000094D0 5A pop dx 5829 5830 000094D1 29C3 sub bx, ax 5831 000094D3 19F2 sbb dx, si ; file size minus header size 5832 5833 000094D5 EB04 jmp @F 5834 5835 .no_exe: 5836 000094D7 89EC mov sp, bp 5837 000094D9 5B pop bx 5838 000094DA 5A pop dx ; full file size 5839 @@: 5840 %endif 5841 5842 ; Clear registers 5843 5844 ll14: 5845 000094DB 53 push bx 5846 000094DC 52 push dx 5847 ; mov word [reg_ebx], dx 5848 ; mov word [reg_ecx], bx 5849 5850 ;--- cancel current process (unless there is none) 5851 ;--- this will also put cpu back in real-mode!!! 5852 5853 000094DD E84E10 call terminate_attached_process 5854 000094E0 7503E9C400 jz ll_attached_unterminated 5855 5856 000094E5 BF[640C] mov di, regs 5857 000094E8 B92000 mov cx, 16*2 ;(8 std, 6 seg, ip, fl) * 2 5858 000094EB 31C0 xor ax, ax 5859 000094ED F3AB rep stosw 5860 5861 000094EF 8F06[680C] pop word [reg_ebx] 5862 000094F3 8F06[6C0C] pop word [reg_ecx] 5863 5864 ; Fix up interrupt vectors in PSP 5865 000094F7 BE0E00 mov si, CCIV ; address of original INT 23 and 24 (in PSP) 5866 000094FA BF[A80A] mov di, run2324 5867 000094FD A5 movsw 5868 000094FE A5 movsw 5869 000094FF A5 movsw 5870 00009500 A5 movsw 5871 5872 ; Actual program loading. Use the DOS interrupt. 5873 00009501 B8014B mov ax, 4B01h ; load program 5874 00009504 BA8000 mov dx, DTA ; offset of file to load 5875 00009507 BB[4C0C] mov bx, execblk ; parameter block 5876 0000950A CD21 int 21h ; load it 5877 0000950C 7303E99500 jc ll16 ; if error 5878 00009511 89E0 mov ax, sp 5879 00009513 2B062E00 sub ax, [SPSAV] 5880 00009517 3D8000 cmp ax, 80h 5881 0000951A 7203 jb ll15 ; if in range 5882 0000951C B88000 mov ax, 80h 5883 ll15: 5884 0000951F A3[A20A] mov word [spadjust], ax 5885 00009522 C436[5A0C] les si, [execblk+14] 5886 00009526 26AD es lodsw ; recover ax 5887 00009528 A3[640C] mov word [reg_eax], ax 5888 0000952B 8936[740C] mov word [reg_esp], si 5889 0000952F 8326[760C]00 and word [reg_esp + 2], 0 5890 00009534 8C06[8C0C] mov word [reg_ss], es 5891 00009538 C436[5E0C] les si, [execblk+18] 5892 0000953C 8936[9C0C] mov word [reg_eip], si 5893 00009540 8326[9E0C]00 and word [reg_eip + 2], 0 5894 00009545 8C06[900C] mov word [reg_cs], es 5895 00009549 C606[DE0B]00 mov byte [bInit],0 5896 0000954E 16 push ss 5897 0000954F 07 pop es 5898 00009550 E8B63F call set_efl_to_fl 5899 00009553 E8C9FC call getpsp 5900 00009556 89D8 mov ax, bx 5901 00009558 A3[A40A] mov word [pspdbe], ax 5902 0000955B 8026[9E00]7F clropt [internalflags], attachedterm 5903 00009560 BF[840C] mov di, reg_ds 5904 00009563 AB stosw 5905 00009564 AF scasw 5906 00009565 AB stosw ; reg_es 5907 00009566 E86FFC call setpspdbg 5908 5909 ; Finish up. Set termination address. 5910 00009569 B82225 mov ax, 2522h ; set interrupt vector 22h 5911 0000956C BA[D085] mov dx, int22 ; ds => lDEBUG_DATA_ENTRY 5912 0000956F CD21 int 21h 5913 00009571 8E1E[A40A] mov ds, word [pspdbe] 5914 00009575 89160A00 mov word [TPIV], dx 5915 00009579 8C160C00 mov word [TPIV+2], ss ; => lDEBUG_DATA_ENTRY 5916 0000957D 16 push ss 5917 0000957E 1F pop ds 5918 5919 ; Set up initial addresses for 'a', 'd', and 'u' commands. 5920 adusetup: 5921 0000957F A1[9C0C] mov ax, word [reg_eip] 5922 00009582 8B0E[9E0C] mov cx, word [reg_eip+2] 5923 00009586 8B1E[900C] mov bx, word [reg_cs] 5924 0000958A BA0900 mov dx, var_addr_entries.amount 5925 0000958D BF[000B] mov di, var_addr_entries 5926 5927 .loop: 5928 00009590 AB stosw ; IP 5929 %if saSegSel == 4 5930 00009591 890D mov word [di], cx 5931 00009593 AF scasw ; skip this word 5932 %endif 5933 00009594 93 xchg ax, bx 5934 00009595 AB stosw ; CS 5935 %if _PM 5936 %if SEGADR_size != 10 5937 %error Unexpected SEGADR size 5938 %endif 5939 00009596 E834FC call ispm 5940 00009599 7504 jnz .86m 5941 .pm: 5942 0000959B AF scasw ; skip saSegment 5943 0000959C AB stosw ; store saSelector 5944 0000959D EB02 jmp @F 5945 .86m: 5946 0000959F AB stosw ; store saSegment 5947 000095A0 AF scasw ; skip saSelector 5948 @@: 5949 %else 5950 %if SEGADR_size == 10 5951 %error Unexpected SEGADR size 5952 %endif 5953 %endif 5954 000095A1 93 xchg ax, bx ; d_addr 5955 5956 000095A2 4A dec dx 5957 000095A3 75EB jnz .loop 5958 000095A5 C3 retn 5959 5960 ; Error messages. Print and quit. 5961 ll16: 5962 000095A6 E9E80C jmp ww15 ; print error message 5963 5964 ll_attached_unterminated: 5965 000095A9 BA[CE6B] mov dx, msg.ll_unterm 5966 000095AC E9F527 jmp putsz 5967 5968 ; M command - move from place to place. 5969 ; 5970 ; first check if there is more than 1 argument 5971 ; 0 or 1 arguments are handled by the 'M [cpu]' code 5972 mm: 5973 %if 0 5974 push si 5975 call iseol? 5976 je mc ; no argument, CPU-related M command 5977 mov ah, byte [ si ] 5978 push ax 5979 and ax, ~(2020h) 5980 cmp ax, "NC" 5981 pop ax 5982 je mc 5983 call getdword 5984 call iseol? 5985 je mc ; one argument, CPU-related 5986 cmp al, 32 5987 je .blank ; end of first argument 5988 cmp al, 9 5989 jne .nonblank ; not end of first argument 5990 .blank: 5991 %else 5992 000095AF 56 push si 5993 000095B0 E83B23 call iseol? 5994 000095B3 7503E9CF00 je mc ; no argument, CPU-related M command 5995 .nonblank: 5996 000095B8 AC lodsb ; is a non-space and non-CR ? 5997 000095B9 E83223 call iseol? 5998 000095BC 7503E9C600 je mc ; one argument, CPU-related 5999 000095C1 3C20 cmp al, 32 6000 000095C3 7404 je .blank ; end of first argument 6001 000095C5 3C09 cmp al, 9 6002 000095C7 75EF jne .nonblank ; not end of first argument 6003 .blank: 6004 %endif 6005 000095C9 E87823 call skipwh0 ; skip blanks behind argument 6006 000095CC E81F23 call iseol? 6007 000095CF 7503E9B300 je mc ; one argument, CPU-related 6008 000095D4 5E pop si 6009 000095D5 4E dec si 6010 000095D6 AC lodsb 6011 ; It is a normal M command (Move) 6012 000095D7 E82111 call parsecm ; parse arguments (DS:ESI, ES:EDI, ECX) 6013 000095DA 51 push cx 6014 %if _PM 6015 000095DB E8EFFB call ispm 6016 000095DE 7543 jnz .rm 6017 000095E0 8CD8 mov ax, ds 6018 000095E2 8CC1 mov cx, es 6019 000095E4 39C8 cmp ax, cx 6020 000095E6 7470 je .pmsimple ; same selector, simple --> 6021 6022 000095E8 B80600 mov ax, 0006h 6023 000095EB 8CDB mov bx, ds 6024 000095ED CD31 int 31h ; get selector's base 6025 000095EF 7303E9E80E jc error 6026 000095F4 51 push cx 6027 000095F5 52 push dx 6028 000095F6 B80600 mov ax, 0006h 6029 000095F9 8CC3 mov bx, es 6030 000095FB CD31 int 31h ; get selector's base 6031 000095FD 7303E9DA0E jc error ; throw 6032 00009602 36803E[DC88]00 cmp byte [ss:bAddr32], 0 6033 00009608 7430 je .pm16 6034 [cpu 386] 6035 0000960A 6658 pop eax 6036 0000960C 51 push cx 6037 0000960D 52 push dx 6038 0000960E 665A pop edx ; mov edx, cxdx 6039 00009610 6601F0 add eax, esi ; add offset to source selector's base 6040 00009613 0F82C50E jc error 6041 00009617 6601FA add edx, edi ; add offset to destination selector's base 6042 0000961A 0F82BE0E jc error ; if overflow (> 4 GiB) --> 6043 0000961E 6639D0 cmp eax, edx ; compare linear source to linear destination 6044 00009621 EB38 jmp short m3 ; and decide whether to move up or down --> 6045 __CPU__ 6046 6047 .rm: 6048 00009623 8CD8 mov ax, ds 6049 00009625 8CDB mov bx, ds 6050 00009627 8CC2 mov dx, es 6051 00009629 B10C mov cl, 12 6052 0000962B D3EB shr bx, cl 6053 0000962D D3EA shr dx, cl 6054 0000962F 52 push dx 6055 00009630 8CC2 mov dx, es 6056 00009632 B104 mov cl, 4 6057 00009634 D3E0 shl ax, cl 6058 00009636 D3E2 shl dx, cl 6059 00009638 59 pop cx 6060 00009639 A9 db __TEST_IMM16 ; (skip 2 pop instructions) 6061 6062 .pm16: 6063 0000963A 58 pop ax 6064 0000963B 5B pop bx 6065 0000963C 01F0 add ax, si 6066 0000963E 83D300 adc bx, byte 0 ; add offset to source selector's base 6067 00009641 7303E9960E jc error 6068 00009646 01FA add dx, di 6069 00009648 83D100 adc cx, byte 0 ; add offset to destination selector's base 6070 0000964B 7303E98C0E jc error ; if overflow (> 4 GiB) --> 6071 00009650 39CB cmp bx, cx ; compare linear source to linear destination 6072 00009652 7507 jne m3 6073 00009654 39D0 cmp ax, dx 6074 00009656 EB03 jmp short m3 ; and decide whether to move up or down --> 6075 6076 .pmsimple: 6077 00009658 66 _386_o32 ; cmp esi, edi 6078 00009659 39FE cmp si, di 6079 %else 6080 mov dx, di 6081 mov bx, es 6082 mov cl, 4 6083 shr dx, cl 6084 add dx, bx ; upper 16 bits of destination 6085 mov ax, si 6086 shr ax, cl 6087 mov bx, ds 6088 add ax, bx 6089 cmp ax, dx 6090 jne m3 ; if we know which is larger 6091 mov ax, si 6092 and al, 0Fh 6093 mov bx, di 6094 and bl, 0Fh 6095 cmp al, bl 6096 %endif 6097 0000965B 59 m3: pop cx 6098 0000965C 9F lahf 6099 0000965D 1E push ds 6100 0000965E 06 push es 6101 0000965F 16 push ss ; ds := cs 6102 00009660 1F pop ds 6103 00009661 E8E50F call dohack ; do the interrupt pointer hack 6104 00009664 07 pop es 6105 00009665 1F pop ds 6106 00009666 9E sahf 6107 00009667 7315 jae .forward ; if forward copy is OK 6108 00009669 66 _386_PM_o32 6109 0000966A 01CE add si, cx 6110 0000966C 66 _386_PM_o32 6111 0000966D 01CF add di, cx ; point both behind data 6112 0000966F FD std ; _AMD_ERRATUM_109_WORKAROUND as below 6113 6114 6115 numdef AMD_ERRATUM_109_WORKAROUND, 1 6116 ; Refer to comment in init.asm init_movp. 6117 6118 %if _AMD_ERRATUM_109_WORKAROUND 6119 00009670 67 _386_PM_a32 6120 00009671 E30B jcxz @FF 6121 00009673 66 _386_PM_o32 6122 00009674 83F914 cmp cx, strict byte 20 6123 00009677 7705 ja @FF 6124 @@: 6125 00009679 67 _386_PM_a32 6126 0000967A A4 movsb 6127 0000967B 67 _386_PM_a32 6128 0000967C E2FB loop @B 6129 @@: 6130 %endif 6131 .forward: 6132 0000967E 67 _386_PM_a32 6133 0000967F F3A4 rep movsb ; do the move 6134 00009681 67 _386_PM_a32 6135 00009682 A4 movsb ; one more byte (length of zero means 64 KiB. or 4 GiB..) 6136 .was32: 6137 00009683 FC cld ; restore flag 6138 00009684 E9DDF5 jmp ee0a ; restore segments and undo the interrupt pointer hack 6139 6140 6141 ; Other M command: set machine type. 6142 mc: 6143 00009687 5E pop si 6144 00009688 4E dec si 6145 00009689 AC lodsb 6146 0000968A E86122 call iseol? 6147 0000968D 7456 je m10 ; if just an 'm' (query machine type) 6148 0000968F 3C3F cmp al, '?' 6149 00009691 7452 je m10 ; if '?' (also query) 6150 00009693 3C30 cmp al, '0' 6151 00009695 720D jb mc1 ; if not a digit 6152 00009697 3C36 cmp al, '6' 6153 00009699 7709 ja mc1 ; ditto 6154 0000969B 2C30 sub al, '0' 6155 0000969D A2[E20A] mov byte [machine], al ; set machine type 6156 000096A0 A2[E40A] mov byte [mach_87], al ; coprocessor type, too 6157 000096A3 C3 retn 6158 6159 000096A4 0C20 mc1: or al, TOLOWER 6160 000096A6 3C63 cmp al, 'c' 6161 000096A8 7415 je mcc ; if coprocessor declaration 6162 000096AA 3C6E cmp al, 'n' 6163 000096AC 756A jne short errorj3 ; if something else 6164 000096AE AC lodsb 6165 000096AF 0C20 or al, TOLOWER 6166 000096B1 3C63 cmp al, 'c' 6167 000096B3 7563 jne short errorj3 ; if not 'c' after that 6168 000096B5 AC lodsb 6169 000096B6 E84A22 call chkeol 6170 000096B9 C606[E30A]00 mov byte [has_87], 0 ; clear coprocessor flag 6171 000096BE C3 retn ; done 6172 6173 mcc: 6174 000096BF E88122 call skipwhite ; get next nonblank character 6175 000096C2 8A26[E20A] mov ah, byte [machine] 6176 000096C6 80FC03 cmp ah, 3 6177 000096C9 750D jne mcc2 ; if not a 386 6178 000096CB 3C33 cmp al, '3' 6179 000096CD 7406 je mcc1 ; if declaring a 387 6180 000096CF 3C32 cmp al, '2' 6181 000096D1 7505 jne mcc2 ; if not '2' 6182 000096D3 B402 mov ah, 2 6183 mcc1: 6184 000096D5 E86B22 call skipwhite 6185 mcc2: 6186 000096D8 E82822 call chkeol 6187 000096DB C606[E30A]01 mov byte [has_87], 1 ; set coprocessor flag 6188 000096E0 8826[E40A] mov byte [mach_87], ah ; set copr. type 6189 000096E4 C3 retn 6190 6191 ; Display machine type. 6192 m10: 6193 000096E5 BE[BB79] mov si, msg8088 6194 000096E8 A0[E20A] mov al, byte [machine] 6195 000096EB 3C00 cmp al, 0 6196 000096ED 7407 je .88or86 ; if 8088 6197 000096EF BE[C379] mov si, msgx86 6198 000096F2 0430 add al, '0' 6199 000096F4 8804 mov byte [si], al 6200 .88or86: 6201 000096F6 E85622 call showstring 6202 000096F9 BE[C779] mov si, no_copr 6203 000096FC 803E[E30A]00 cmp byte [has_87], 0 6204 00009701 740F je m12 ; if no coprocessor 6205 00009703 BE[DC79] mov si, has_copr 6206 00009706 A0[E40A] mov al, byte [mach_87] 6207 00009709 3A06[E20A] cmp al, byte [machine] 6208 0000970D 7403 je m12 ; if has coprocessor same as processor 6209 0000970F BE[EE79] mov si, has_287 6210 m12: 6211 00009712 E83A22 call showstring ; show string 6212 00009715 E90E23 jmp putsline_crlf ; call puts and quit 6213 6214 errorj3: 6215 00009718 E9C10D jmp error 6216 6217 6218 ; N command - change the name of the program being debugged. 6219 nn: 6220 0000971B 16 push ss 6221 0000971C 07 pop es 6222 %if _BOOTLDR 6223 0000971D 36F606[9D00]40 testopt [ss:internalflags], nodosloaded 6224 00009723 7406 jz @F 6225 00009725 BA[955F] mov dx, msg.nobootsupp 6226 00009728 E97926 jmp putsz 6227 @@: 6228 %endif 6229 0000972B BF8000 mov di, DTA ; destination address 6230 6231 ; Copy and canonicalize file name. 6232 nn1: 6233 0000972E 81FF[4A00] cmp di, N_BUFFER_END 6234 00009732 7313 jae .toolong 6235 00009734 E83D01 call ifsep ; check for separators CR, blank, tab, comma, ;, = 6236 00009737 7428 je nn3 ; if end of file name 6237 00009739 363A06[E90A] cmp al, byte [ss:swch1] 6238 ; The use of ss here appears to be intended to 6239 ; allow loading from ds different from the 6240 ; data entry and PSP segment, However, the 6241 ; subsequent copy of the command tail around 6242 ; nn4 does not participate in this scheme. 6243 ; So if this is used make sure to adjust that. 6244 0000973E 7421 je nn3 ; if '/' (and '/' is the switch character) 6245 00009740 E8D0F4 call uppercase 6246 00009743 AA stosb 6247 00009744 AC lodsb 6248 00009745 EBE7 jmp short nn1 ; back for more 6249 6250 .toolong: 6251 nn4.toolong: 6252 00009747 16 push ss 6253 00009748 1F pop ds 6254 00009749 BA[3365] mov dx, msg.n_toolongname 6255 0000974C E85526 call putsz 6256 0000974F BF[4700] mov di, N_BUFFER_END - 3 6257 00009752 B000 mov al, 0 ; truncate the name 6258 00009754 AA stosb 6259 00009755 A2[DF0B] mov byte [fileext], al ; invalid / none 6260 00009758 893E[4E0C] mov word [execblk+2], di 6261 0000975C B8000D mov ax, 13 << 8 ; 0 in low byte (tail length), CR in high byte 6262 0000975F AB stosw 6263 00009760 C3 retn 6264 6265 6266 nn3: 6267 00009761 16 push ss 6268 00009762 1F pop ds 6269 00009763 B000 mov al, 0 ; null terminate the file name string 6270 00009765 AA stosb 6271 00009766 893E[4E0C] mov word [execblk+2], di; save start of command tail 6272 6273 %if _DEBUG4 6274 push dx 6275 mov dx, DTA 6276 call d4disp_msg 6277 mov dx, crlf 6278 call d4disp_msg 6279 pop dx 6280 %endif 6281 ; Determine file extension 6282 0000976A 81FF8100 cmp di, DTA+1 6283 0000976E 7438 je nn3d ; if no file name at all 6284 00009770 81FF8500 cmp di, DTA+5 6285 00009774 7230 jb nn3c ; if no extension (name too short) 6286 00009776 B008 mov al, EXT_HEX 6287 00009778 817DFB2E48 cmp word [di-5], ".H" 6288 0000977D 7507 jne nn3a ; if not .HEX 6289 0000977F 817DFD4558 cmp word [di-3], "EX" 6290 00009784 7422 je nn3d ; if .HEX 6291 nn3a: 6292 00009786 B004 mov al, EXT_EXE 6293 00009788 817DFB2E45 cmp word [di-5], ".E" 6294 0000978D 7507 jne nn3b ; if not .EXE 6295 0000978F 817DFD5845 cmp word [di-3], "XE" 6296 00009794 7412 je nn3d ; if .EXE 6297 nn3b: 6298 00009796 B002 mov al, EXT_COM 6299 00009798 817DFB2E43 cmp word [di-5], ".C" 6300 0000979D 7507 jne nn3c ; if not .COM 6301 0000979F 817DFD4F4D cmp word [di-3], "OM" 6302 000097A4 7402 je nn3d ; if .COM 6303 nn3c: 6304 000097A6 B001 mov al, EXT_OTHER 6305 nn3d: 6306 000097A8 A2[DF0B] mov byte [fileext], al 6307 6308 ; Finish the N command 6309 000097AB 57 push di 6310 000097AC BF[0E08] mov di, line_out 6311 000097AF 4E dec si 6312 nn4: 6313 000097B0 AC lodsb ; copy the remainder to line_out 6314 000097B1 AA stosb 6315 000097B2 E83D21 call iseol?.notsemicolon 6316 000097B5 75F9 jne nn4 6317 6318 000097B7 E8EE0E call InDos 6319 000097BA 7407 jz .fcb_setup 6320 000097BC 8326[640C]00 and word [reg_eax], 0 6321 000097C1 EB15 jmp .fcb_none 6322 6323 .fcb_setup: 6324 ; Set up FCBs. 6325 000097C3 BE[0E08] mov si, line_out 6326 000097C6 BF5C00 mov di, 5Ch 6327 000097C9 E85100 call nn6 ; do first FCB 6328 000097CC A2[640C] mov byte [reg_eax], al 6329 000097CF BF6C00 mov di, 6Ch 6330 000097D2 E84800 call nn6 ; second FCB 6331 000097D5 A2[650C] mov byte [reg_eax+1], al 6332 .fcb_none: 6333 6334 ; Copy command tail. 6335 000097D8 BE[0E08] mov si, line_out 6336 000097DB 5F pop di 6337 000097DC 81FF[4800] cmp di, N_BUFFER_END - 2 6338 000097E0 7203E962FF jae .toolong 6339 000097E5 57 push di 6340 000097E6 47 inc di 6341 nn5: 6342 000097E7 AC lodsb 6343 000097E8 AA stosb 6344 000097E9 81FF[4A00] cmp di, N_BUFFER_END 6345 000097ED 731F jae .toolong 6346 000097EF E80021 call iseol?.notsemicolon 6347 000097F2 75F3 jne nn5 ; if not end of string 6348 ; test al, al 6349 ; jnz @B 6350 000097F4 C645FF0D mov byte [di - 1], 13 ; (just overwrite this unconditionally) 6351 ; @@: ; jump destination from above if al == 13 6352 @@: ; jump destination from .toolong 6353 000097F8 57 push di 6354 000097F9 89F9 mov cx, di 6355 000097FB 81E9[4A00] sub cx, N_BUFFER_END 6356 000097FF F7D9 neg cx 6357 00009801 31C0 xor ax, ax 6358 00009803 F3AA rep stosb 6359 00009805 5F pop di 6360 00009806 58 pop ax ; recover old DI 6361 00009807 97 xchg ax, di 6362 00009808 29F8 sub ax, di ; compute length of tail 6363 0000980A 48 dec ax 6364 0000980B 48 dec ax 6365 0000980C AA stosb 6366 %if _DEBUG4 6367 mov dx, DTA 6368 call d4disp_msg 6369 mov dx, crlf 6370 call d4disp_msg 6371 %endif 6372 0000980D C3 retn ; done 6373 6374 .toolong: 6375 0000980E BA[1865] mov dx, msg.n_toolongtail 6376 00009811 E89025 call putsz 6377 00009814 BF[4A00] mov di, N_BUFFER_END 6378 00009817 C645FF0D mov byte [di - 1], 13 6379 0000981B EBDB jmp @B 6380 6381 6382 ; Subroutine to process an FCB. 6383 ; 6384 ; INP: di -> FCB 6385 ; si -> input 6386 nn6: 6387 0000981D AC lodsb 6388 0000981E E8D120 call iseol?.notsemicolon 6389 00009821 740B je nn7 ; if end 6390 00009823 E84E00 call ifsep 6391 00009826 74F5 je nn6 ; if separator (other than CR) 6392 00009828 3A06[E80A] cmp al, byte [switchar] 6393 0000982C 741C je nn10 ; if switch character 6394 nn7: 6395 0000982E 4E dec si 6396 0000982F B80129 mov ax, 2901h ; parse filename 6397 doscall 2040 00009832 E834C5 <1> call _doscall 6398 00009835 50 push ax ; save AL 6399 nn8: 6400 00009836 AC lodsb ; skip till separator 6401 00009837 E83A00 call ifsep 6402 0000983A 7406 je nn9 ; if separator character (including CR) 6403 0000983C 3A06[E90A] cmp al, byte [swch1] 6404 00009840 75F4 jne nn8 ; if not switchar (sort of) 6405 nn9: 6406 00009842 4E dec si 6407 00009843 58 pop ax ; recover AL 6408 00009844 3C01 cmp al, 1 6409 00009846 7501 jne nn9a ; if not 1 6410 00009848 48 dec ax 6411 nn9a: 6412 00009849 C3 retn 6413 6414 ; Handle a switch (differently). 6415 0000984A AC nn10: lodsb 6416 0000984B E8A420 call iseol?.notsemicolon 6417 0000984E 74DE je nn7 ; if end of string 6418 00009850 E82100 call ifsep 6419 00009853 74F5 je nn10 ; if another separator (other than CR) 6420 00009855 B000 mov al, 0 6421 00009857 AA stosb 6422 00009858 4E dec si 6423 00009859 AC lodsb 6424 0000985A 3C61 cmp al, 'a' 6425 0000985C 7206 jb nn11 ; if not a lower case letter 6426 0000985E 3C7A cmp al, 'z' 6427 00009860 7702 ja nn11 6428 00009862 24DF and al, TOUPPER ; convert to upper case 6429 00009864 AA nn11: stosb 6430 00009865 B82020 mov ax, 32<<8|32 6431 00009868 AB stosw 6432 00009869 AB stosw 6433 0000986A AB stosw 6434 0000986B AB stosw 6435 0000986C AB stosw 6436 0000986D 31C0 xor ax, ax 6437 0000986F AB stosw 6438 00009870 AB stosw 6439 00009871 AB stosw 6440 00009872 AB stosw 6441 00009873 C3 retn ; return with al = 0 6442 6443 6444 ; Compare character with separators 6445 ; 6446 ; INP: al = character 6447 ; OUT: ZR if al is CR, NUL, blank, tab, comma, semicolon, or equal sign 6448 ; NZ else 6449 ; REM: This is only used for parsing FCBs. 6450 ifsep: 6451 00009874 E87720 call iseol? ; semicolon or CR or NUL 6452 00009877 740E je .return 6453 00009879 3C20 cmp al, 32 6454 0000987B 740A je .return 6455 0000987D 3C09 cmp al, 9 6456 0000987F 7406 je .return 6457 00009881 3C2C cmp al, ',' 6458 00009883 7402 je .return 6459 00009885 3C3D cmp al, '=' 6460 .return: 6461 00009887 C3 retn 6462 6463 6464 ; Ensure segment in bx is writeable 6465 ; 6466 ; INP: bx = selector/segment 6467 ; OUT: NC if in 86M, bx unchanged 6468 ; NC if in PM and bx not a code segment, bx unchanged 6469 ; NC if in PM and was a code segment, 6470 ; bx = word [scratchsel], set up to mirror INP:bx selector 6471 ; CY if in PM and a failure occurred, segment not writeable 6472 ; CHG: bx 6473 ; STT: (if in PM) es = ss = debugger data selector 6474 %if _PM 6475 verifysegm: 6476 00009888 E842F9 call ispm 6477 0000988B 7533 jnz .rm ; (NC) 6478 0000988D 50 push ax 6479 0000988E 66 _386_o32 ; push edi 6480 0000988F 57 push di 6481 00009890 55 push bp 6482 00009891 89E5 mov bp, sp 6483 00009893 83EC08 sub sp, 8 6484 00009896 89E7 mov di, sp 6485 00009898 660FB7FF _386 movzx edi, di 6486 0000989C B80B00 mov ax, 000Bh ; get descriptor 6487 0000989F CD31 int 31h 6488 000098A1 7217 jc @F 6489 000098A3 F6450508 test byte [di+5], 8 ; code segment ? 6490 000098A7 7411 jz @F ; (NC) no --> 6491 000098A9 806505F3 and byte [di+5], 0F3h ; reset CODE+conforming attr 6492 000098AD 804D0502 or byte [di+5], 2 ; set writable 6493 000098B1 8B1E[D888] mov bx, word [scratchsel] 6494 000098B5 B80C00 mov ax, 000Ch 6495 000098B8 CD31 int 31h 6496 @@: 6497 000098BA 89EC mov sp, bp 6498 000098BC 5D pop bp 6499 000098BD 66 _386_o32 ; pop edi 6500 000098BE 5F pop di 6501 000098BF 58 pop ax 6502 .rm: 6503 000098C0 C3 retn 6504 6505 subcpu 286 6506 ; INP: dx = 86 Mode segment to access 6507 ; OUT: bx = scratch selector, addressing that segment 6508 ; CHG: - 6509 ; STT: ss = lDEBUG_DATA_ENTRY selector, in PM 6510 setrmsegm: 6511 000098C1 368B1E[D888] mov bx, word [ss:scratchsel] 6512 setrmaddr: ;<--- set selector in BX to segment address in DX 6513 .: 6514 000098C6 52 push dx 6515 000098C7 50 push ax 6516 000098C8 51 push cx 6517 000098C9 89D1 mov cx, dx 6518 000098CB C1E204 shl dx, 4 6519 000098CE C1E90C shr cx, 12 6520 000098D1 B80700 mov ax, 7 6521 000098D4 CD31 int 31h 6522 000098D6 59 pop cx 6523 000098D7 58 pop ax 6524 000098D8 5A pop dx 6525 000098D9 C3 retn 6526 6527 subcpureset 6528 %endif 6529 6530 ; Read a byte relative to cs:eip 6531 ; 6532 ; INP: reg_cs, reg_eip 6533 ; cx = (signed) eip adjustment 6534 ; OUT: al = byte at that address 6535 ; (e)bx = new offset (eip+adjustment) 6536 ; CHG: - 6537 getcseipbyte: 6538 000098DA 06 push es 6539 %if _PM 6540 000098DB 8B1E[900C] mov bx, word [reg_cs] 6541 000098DF 8EC3 mov es, bx 6542 000098E1 E852C4 call test_d_b_bit 6543 000098E4 7416 jz .16 6544 [cpu 386] 6545 000098E6 668B1E[9C0C] mov ebx, dword [reg_eip] 6546 000098EB 6652 push edx 6547 000098ED 660FBFD1 movsx edx, cx 6548 000098F1 6601D3 add ebx, edx 6549 000098F4 26678A03 mov al, byte [es:ebx] 6550 000098F8 665A pop edx 6551 000098FA 07 pop es 6552 000098FB C3 retn 6553 __CPU__ 6554 .16: 6555 %else 6556 mov es, word [reg_cs] 6557 %endif 6558 000098FC 8B1E[9C0C] mov bx, word [reg_eip] 6559 00009900 01CB add bx, cx 6560 00009902 268A07 mov al, byte [es:bx] 6561 00009905 07 pop es 6562 00009906 C3 retn 6563 6564 ; Write to a byte relative to cs:eip 6565 ; 6566 ; INP: reg_cs, reg_eip 6567 ; cx = (signed) eip adjustment 6568 ; OUT: al = byte at that address 6569 ; CHG: (e)bx 6570 setcseipbyte: 6571 00009907 06 push es 6572 %if _PM 6573 00009908 8B1E[900C] mov bx, word [reg_cs] 6574 0000990C E879FF call verifysegm 6575 0000990F 7224 jc .ret 6576 00009911 8EC3 mov es, bx 6577 00009913 E820C4 call test_d_b_bit 6578 00009916 7414 jz .16 6579 [cpu 386] 6580 00009918 668B1E[9C0C] mov ebx, dword [reg_eip] 6581 0000991D 6652 push edx 6582 0000991F 660FBFD1 movsx edx, cx 6583 00009923 2667880413 mov byte [es:ebx+edx],al 6584 00009928 665A pop edx 6585 0000992A 07 pop es 6586 0000992B C3 retn 6587 __CPU__ 6588 .16: 6589 %else 6590 mov es, word [reg_cs] 6591 %endif 6592 0000992C 8B1E[9C0C] mov bx, word [reg_eip] 6593 00009930 01CB add bx, cx 6594 00009932 268807 mov byte [es:bx], al 6595 .ret: 6596 00009935 07 pop es 6597 00009936 C3 retn 6598 6599 ; Exchange byte with memory 6600 ; 6601 ; INP: bx:(e)dx-> destination byte 6602 ; al = source byte 6603 ; OUT: CY if failed due to segment not writable 6604 ; NC if successful, 6605 ; al = previous value of destination byte 6606 ; CHG: ah 6607 writemem: 6608 %if _DEBUG1 6609 push dx 6610 push ax 6611 6612 call getlinear.do_not_use_test 6613 jc @F ; already an error ? then return --> (CY) 6614 push bx 6615 push cx 6616 mov bx, test_records_Writemem 6617 call handle_test_case_multiple_16 6618 ; check whether this should testcase the error 6619 ; CY to indicate error from this call 6620 pop cx 6621 pop bx 6622 @@: 6623 pop ax 6624 pop dx 6625 jnc .do_not_use_test 6626 retn ; return CY here 6627 6628 %endif 6629 .do_not_use_test: 6630 6631 00009937 88C4 mov ah, al 6632 %if _PM 6633 00009939 E891F8 call ispm 6634 0000993C 7516 jnz .16 ; (NC from ispm) --> 6635 0000993E E847FF call verifysegm ; make bx a writeable segment 6636 00009941 7220 jc .ret 6637 00009943 E8F0C3 call test_d_b_bit 6638 00009946 740C jz .16 ; (NC from test_d_b_bit) --> 6639 [cpu 386] 6640 00009948 1E push ds 6641 00009949 8EDB mov ds, bx 6642 0000994B 678602 xchg al, byte [edx] 6643 0000994E 673A22 cmp ah, byte [edx] 6644 00009951 1F pop ds 6645 __CPU__ 6646 00009952 EB0C jmp short .cmp 6647 .16: 6648 %endif 6649 00009954 1E push ds 6650 00009955 8EDB mov ds, bx 6651 00009957 53 push bx 6652 00009958 89D3 mov bx, dx 6653 0000995A 8607 xchg al, byte [bx] 6654 0000995C 3A27 cmp ah, byte [bx] 6655 0000995E 5B pop bx 6656 0000995F 1F pop ds 6657 .cmp: 6658 00009960 7401 je .ret ; (NC) 6659 00009962 F9 stc ; Failed to compare (i.e. memory wasn't our byte after writing). 6660 ; This check catches ROM that will silently fail to write. 6661 .ret: 6662 00009963 C3 retn 6663 6664 6665 ;--- read byte at BX:EDX into AL 6666 6667 readmem: 6668 %if _DEBUG1 6669 push dx 6670 push ax 6671 6672 call getlinear.do_not_use_test 6673 jc @F ; already an error ? then return --> (CY) 6674 push bx 6675 push cx 6676 mov bx, test_records_Readmem 6677 call handle_test_case_multiple_16 6678 ; check whether this should testcase the error 6679 ; CY to indicate error from this call 6680 pop cx 6681 pop bx 6682 @@: 6683 pop ax 6684 pop dx 6685 jnc .do_not_use_test 6686 mov al, byte [test_readmem_value] 6687 ; return a most likely wrong value 6688 retn 6689 6690 %endif 6691 .do_not_use_test: 6692 6693 %if _PM 6694 00009964 E8CFC3 call test_d_b_bit 6695 00009967 7408 jz .16 6696 [cpu 386] 6697 00009969 1E push ds 6698 0000996A 8EDB mov ds, bx 6699 0000996C 678A02 mov al, byte [edx] 6700 0000996F 1F pop ds 6701 00009970 C3 retn 6702 __CPU__ 6703 .16: 6704 %endif 6705 00009971 1E push ds 6706 00009972 53 push bx 6707 00009973 8EDB mov ds, bx 6708 00009975 89D3 mov bx, dx 6709 00009977 8A07 mov al, byte [bx] 6710 00009979 5B pop bx 6711 0000997A 1F pop ds 6712 0000997B C3 retn 6713 6714 6715 ; Q command - quit. 6716 qq: 6717 0000997C E87C6B call guard_re 6718 %if _BOOTLDR 6719 ; Test whether we are in non-DOS mode, and were 6720 ; currently entered in protected mode. Since 6721 ; this will make the entire operation fail, 6722 ; it has to be checked for before modifying 6723 ; or releasing any of the resources. 6724 ; (Does this ever occur? No?) 6725 0000997F F606[9D00]40 testopt [internalflags], nodosloaded 6726 00009984 7418 jz .notpmnodos 6727 %if _PM 6728 00009986 E844F8 call ispm 6729 %if _TSR ; same message, reuse code 6730 00009989 741F jz .cannotpmquit 6731 %else 6732 jnz .notpmnodos_nodos 6733 mov dx, msg.cannotpmquit 6734 jmp putsz 6735 %endif 6736 %endif 6737 .notpmnodos_nodos: 6738 0000998B E8253A call bootgetmemorysize ; dx => behind usable memory 6739 0000998E A1[E28F] mov ax, word [ boot_new_memsizekib ] 6740 00009991 B106 mov cl, 6 6741 00009993 D3E0 shl ax, cl 6742 00009995 39D0 cmp ax, dx ; same? 6743 00009997 7405 je @F 6744 00009999 BA[8D64] mov dx, msg.cannotbootquit_memsizes 6745 0000999C EB0F jmp .putsz 6746 %if !_TSR || !_PM 6747 .putsz equ putsz 6748 %endif 6749 6750 @@: 6751 .notpmnodos: 6752 %endif 6753 %if _PM 6754 %if _TSR 6755 ; Test whether we are in TSR mode, and were 6756 ; currently entered in protected mode. Since 6757 ; this will make the entire operation fail, 6758 ; it has to be checked for before modifying 6759 ; or releasing any of the resources. 6760 0000999E F606[9E00]40 testopt [internalflags], tsrmode 6761 000099A3 740B jz .notpmtsr 6762 000099A5 E825F8 call ispm 6763 000099A8 7506 jnz .notpmtsr 6764 6765 ; This isn't yet implemented. Broken down: 6766 ; * Uses terminate_attached_process which returns in real mode. 6767 ; * Exception vectors are implicitly restored/discarded by that. 6768 ; * (RM) Interrupt vectors are currently restored in real mode. Unnecessary. 6769 ; * The VDD is un-registered in real mode. Necessary? 6770 ; * Normal 21.4C is used to return to the real parent. 6771 ; * We have to discard our DOS process resources. Any DPMI TSR resources? 6772 ; * We must again gain control in debuggee's mode after discarding them. 6773 ; * We must return to the debuggee and seemlessly discard our memory. The 6774 ; stack trick possibly/probably does not work in protected mode. 6775 6776 .cannotpmquit: 6777 000099AA BA[6D5F] mov dx, msg.cannotpmquit 6778 .putsz: 6779 000099AD E9F423 jmp putsz 6780 6781 .notpmtsr: 6782 %endif 6783 6784 %if (nohook2F)&~0FF00h 6785 %fatal Internal flags re-ordered, adjust code here 6786 %endif 6787 000099B0 A1[9C00] mov ax, [internalflags] 6788 000099B3 B0A8 mov al, __TEST_IMM8 6789 000099B5 8606[5689] xchg al, [dpmidisable] ; disable DPMI hook 6790 ; (SMC in section lDEBUG_DATA_ENTRY) 6791 000099B9 50 push ax 6792 000099BA 800E[9D00]02 setopt [internalflags], nohook2F ; avoid a new hook while terminating 6793 %endif 6794 6795 6796 qq_restore_interrupts_simulated: 6797 000099BF 31ED xor bp, bp 6798 %if _CATCHINT2D 6799 .2D: 6800 000099C1 F606[A800]08 testopt [internalflags4], dif4_int_2D_hooked 6801 000099C6 741C jz .noint2D 6802 6803 000099C8 B02D mov al, 2Dh ; interrupt number 6804 000099CA BE[4C81] mov si, int2D ; -> IISP entry header 6805 000099CD BA0800 mov dx, opt4_int_2D_force >> 16 6806 000099D0 E8D238 call UnhookInterruptForceSim 6807 ; try unhooking it 6808 000099D3 16 push ss 6809 000099D4 07 pop es 6810 000099D5 730D jnc .got2D 6811 6812 .not2D: 6813 000099D7 C706[186B]3244 mov word [msg.serial_cannot_unhook.int], "2D" 6814 000099DD BA[FD6A] mov dx, msg.serial_cannot_unhook.nowarn 6815 000099E0 E8C123 call putsz 6816 000099E3 45 inc bp 6817 6818 .got2D: 6819 .noint2D: 6820 %endif 6821 6822 6823 %if _CATCHINT08 6824 .08: 6825 000099E4 F606[A800]04 testopt [internalflags4], dif4_int_08_hooked 6826 000099E9 741C jz .noint08 6827 6828 000099EB B008 mov al, 08h ; interrupt number 6829 000099ED BE[5685] mov si, intr8 ; -> IISP entry header 6830 000099F0 BA0400 mov dx, opt4_int_08_force >> 16 6831 000099F3 E8AF38 call UnhookInterruptForceSim 6832 ; try unhooking it 6833 000099F6 16 push ss 6834 000099F7 07 pop es 6835 000099F8 730D jnc .got08 6836 6837 .not08: 6838 000099FA C706[186B]3038 mov word [msg.serial_cannot_unhook.int], "08" 6839 00009A00 BA[FD6A] mov dx, msg.serial_cannot_unhook.nowarn 6840 00009A03 E89E23 call putsz 6841 00009A06 45 inc bp 6842 6843 .got08: 6844 .noint08: 6845 %endif 6846 6847 6848 .serial: 6849 00009A07 F606[A800]01 testopt [internalflags4], dif4_int_serial_hooked 6850 00009A0C 7420 jz .done_serial 6851 00009A0E BE[D895] mov si, serial_interrupt_handler 6852 00009A11 A0[120C] mov al, byte [serial_installed_intnum] 6853 00009A14 BA0100 mov dx, opt4_int_serial_force >> 16 6854 00009A17 E88B38 call UnhookInterruptForceSim 6855 00009A1A 16 push ss 6856 00009A1B 07 pop es 6857 00009A1C 7310 jnc .done_serial ; if it succeeded --> 6858 6859 00009A1E BF[186B] mov di, msg.serial_cannot_unhook.int 6860 00009A21 A0[120C] mov al, byte [serial_installed_intnum] 6861 00009A24 E8CE1F call hexbyte 6862 00009A27 BA[FD6A] mov dx, msg.serial_cannot_unhook.nowarn 6863 00009A2A E87723 call putsz 6864 00009A2D 45 inc bp 6865 6866 .done_serial: 6867 6868 %if _PM 6869 .2F: 6870 00009A2E F606[9D00]01 testopt [internalflags], hooked2F 6871 00009A33 741C jz .noint2F 6872 6873 00009A35 B02F mov al, 2Fh ; interrupt number 6874 00009A37 BE[4089] mov si, debug2F ; -> IISP entry header 6875 00009A3A BA0200 mov dx, opt4_int_2F_force >> 16 6876 00009A3D E86538 call UnhookInterruptForceSim 6877 ; try unhooking it 6878 00009A40 16 push ss 6879 00009A41 07 pop es 6880 00009A42 730D jnc .got2F 6881 6882 .not2F: 6883 00009A44 C706[186B]3246 mov word [msg.serial_cannot_unhook.int], "2F" 6884 00009A4A BA[FD6A] mov dx, msg.serial_cannot_unhook.nowarn 6885 00009A4D E85423 call putsz 6886 00009A50 45 inc bp 6887 6888 .got2F: 6889 .noint2F: 6890 %endif 6891 6892 6893 %if CATCHINTAMOUNT && ! _DEBUG 6894 ; Simulate to restore interrupt vectors. 6895 00009A51 BE[310C] mov si, inttab 6896 00009A54 BF[460C] mov di, intforcetab 6897 00009A57 B90600 mov cx, inttab_number 6898 00009A5A 31D2 xor dx, dx 6899 .nextintsim: 6900 00009A5C AC lodsb 6901 00009A5D 93 xchg ax, bx ; bl = number 6902 00009A5E AD lodsw ; si -> list 6903 00009A5F 96 xchg ax, si ; si -> entry, ax -> list 6904 00009A60 93 xchg ax, bx ; al = number, bx -> list 6905 00009A61 57 push di 6906 00009A62 8A35 mov dh, byte [di] 6907 00009A64 E83E38 call UnhookInterruptForceSim 6908 00009A67 5F pop di 6909 00009A68 16 push ss 6910 00009A69 07 pop es 6911 00009A6A 730D jnc @F 6912 00009A6C BF[186B] mov di, msg.serial_cannot_unhook.int 6913 00009A6F E8831F call hexbyte 6914 00009A72 BA[FD6A] mov dx, msg.serial_cannot_unhook.nowarn 6915 00009A75 E82C23 call putsz 6916 00009A78 45 inc bp 6917 @@: 6918 00009A79 47 inc di 6919 00009A7A 87DE xchg bx, si ; si -> list 6920 00009A7C E2DE loop .nextintsim 6921 %endif 6922 6923 00009A7E BA[6370] mov dx, msg.empty_message 6924 00009A81 85ED test bp, bp 6925 00009A83 7403E99601 jnz qq_attached_unterminated.common 6926 6927 6928 qq_restore_interrupts: 6929 %if _CATCHINT2D 6930 .2D: 6931 00009A88 F606[A800]08 testopt [internalflags4], dif4_int_2D_hooked 6932 00009A8D 741E jz .noint2D 6933 6934 00009A8F B02D mov al, 2Dh ; interrupt number 6935 00009A91 BE[4C81] mov si, int2D ; -> IISP entry header 6936 00009A94 BA0800 mov dx, opt4_int_2D_force >> 16 6937 00009A97 E8DC37 call UnhookInterruptForce 6938 ; try unhooking it 6939 00009A9A 730C jnc .got2D 6940 6941 .not2D: 6942 00009A9C C706[186B]3244 mov word [msg.serial_cannot_unhook.int], "2D" 6943 00009AA2 BA[FD6A] mov dx, msg.serial_cannot_unhook.nowarn 6944 00009AA5 E97601 jmp qq_attached_unterminated.common 6945 6946 .got2D: 6947 00009AA8 8026[A800]F7 clropt [internalflags4], dif4_int_2D_hooked 6948 .noint2D: 6949 %endif 6950 6951 6952 %if _CATCHINT08 6953 .08: 6954 00009AAD F606[A800]04 testopt [internalflags4], dif4_int_08_hooked 6955 00009AB2 7421 jz .noint08 6956 6957 00009AB4 B008 mov al, 08h ; interrupt number 6958 00009AB6 BE[5685] mov si, intr8 ; -> IISP entry header 6959 00009AB9 BA0400 mov dx, opt4_int_08_force >> 16 6960 00009ABC E8B737 call UnhookInterruptForce 6961 ; try unhooking it 6962 00009ABF 730C jnc .got08 6963 6964 .not08: 6965 00009AC1 C706[186B]3038 mov word [msg.serial_cannot_unhook.int], "08" 6966 00009AC7 BA[FD6A] mov dx, msg.serial_cannot_unhook.nowarn 6967 00009ACA E95101 jmp qq_attached_unterminated.common 6968 6969 .got08: 6970 00009ACD 8026[A800]FB clropt [internalflags4], dif4_int_08_hooked 6971 00009AD2 E8AE38 call update_inttab_optional 6972 .noint08: 6973 %endif 6974 6975 6976 .serial: 6977 00009AD5 F606[EB0B]01 testopt [serial_flags], sf_init_done 6978 00009ADA 740D jz @F 6979 00009ADC E8E834 call serial_clean_up ; unhook interrupt 6980 00009ADF 8026[EB0B]FE clropt [serial_flags], sf_init_done ; clear (in case return to cmd3) 6981 00009AE4 8026[7D00]BF clropt [options], enable_serial ; do not output to serial any longer 6982 @@: 6983 00009AE9 F606[A800]01 testopt [internalflags4], dif4_int_serial_hooked 6984 00009AEE 7419 jz .done_serial 6985 00009AF0 E81F35 call serial_uninstall_interrupt_handler 6986 00009AF3 7314 jnc .done_serial ; if it succeeded --> 6987 6988 00009AF5 BF[186B] mov di, msg.serial_cannot_unhook.int 6989 00009AF8 A0[120C] mov al, byte [serial_installed_intnum] 6990 00009AFB E8F71E call hexbyte 6991 00009AFE BA[FD6A] mov dx, msg.serial_cannot_unhook.nowarn 6992 00009B01 C606[E095]00 mov byte [serial_interrupt_handler + ieEOI], 0 6993 ; we do not issue EOI any longer 6994 00009B06 E91501 jmp qq_attached_unterminated.common 6995 6996 6997 .done_serial: 6998 6999 %if _PM 7000 .2F: 7001 00009B09 F606[9D00]01 testopt [internalflags], hooked2F 7002 00009B0E 7426 jz .noint2F 7003 7004 00009B10 B02F mov al, 2Fh ; interrupt number 7005 00009B12 BE[4089] mov si, debug2F ; -> IISP entry header 7006 00009B15 BA0200 mov dx, opt4_int_2F_force >> 16 7007 00009B18 E85B37 call UnhookInterruptForce 7008 ; try unhooking it 7009 00009B1B 730C jnc .got2F 7010 7011 .not2F: 7012 00009B1D C706[186B]3246 mov word [msg.serial_cannot_unhook.int], "2F" 7013 00009B23 BA[FD6A] mov dx, msg.serial_cannot_unhook.nowarn 7014 00009B26 E9F500 jmp qq_attached_unterminated.common 7015 7016 .got2F: 7017 00009B29 8026[9D00]FE clropt [internalflags], hooked2F 7018 00009B2E 8026[A800]FD clropt [internalflags4], dif4_int_2F_hooked 7019 00009B33 E84D38 call update_inttab_optional 7020 .noint2F: 7021 %endif 7022 7023 7024 %if _BOOTLDR 7025 00009B36 F606[9D00]40 testopt [internalflags], nodosloaded 7026 00009B3B 753D jnz .restoreints 7027 %endif 7028 7029 ; Cancel child's process if any. 7030 ; This will drop to real mode if debuggee is in protected mode. 7031 %if _TSR 7032 00009B3D F606[9E00]40 testopt [internalflags], tsrmode 7033 00009B42 7423 jz .terminate_attached 7034 7035 %if _PM 7036 00009B44 E886F6 call ispm 7037 00009B47 7414 jz @F ; in PM --> 7038 00009B49 F606[9E00]04 testopt [internalflags], canswitchmode 7039 00009B4E 7415 jz @FF ; in 86 Mode and cannot switch to PM --> 7040 7041 00009B50 800E[9E00]08 setopt [internalflags], modeswitched ; set flag for resetmode 7042 00009B55 B000 mov al, 0 7043 00009B57 E8FA9C call sr_state ; save state 7044 00009B5A E8C29C call switchmode ; switch to PM 7045 ; ! handle_mode_changed not called here ! 7046 ; do not call InDos or other functions using seg/sels 7047 @@: 7048 00009B5D E8ADA9 call pm_reset_handlers 7049 ; ! this calls resetmode 7050 7051 ; remember that we cannot access Protected Mode any longer 7052 00009B60 8026[9E00]DB clropt [internalflags], canswitchmode | switchbuffer 7053 @@: 7054 %endif 7055 7056 00009B65 EB13 jmp .restoreints 7057 7058 .terminate_attached: 7059 %endif 7060 7061 00009B67 E8C409 call terminate_attached_process 7062 00009B6A 7503E9AC00 jz qq_attached_unterminated 7063 %if _PM 7064 00009B6F E85BF6 call ispm 7065 00009B72 7506 jnz @F 7066 7067 00009B74 BA[3E6C] mov dx, msg.qq_still_pm 7068 00009B77 E9A400 jmp qq_attached_unterminated.common 7069 @@: 7070 %endif 7071 7072 .restoreints: 7073 %if CATCHINTAMOUNT && ! _DEBUG 7074 ; Restore interrupt vectors. 7075 00009B7A BE[310C] mov si, inttab 7076 00009B7D BF[460C] mov di, intforcetab 7077 00009B80 B90600 mov cx, inttab_number 7078 00009B83 31D2 xor dx, dx 7079 .nextint: 7080 00009B85 AC lodsb 7081 00009B86 93 xchg ax, bx ; bl = number 7082 00009B87 AD lodsw ; si -> list 7083 00009B88 96 xchg ax, si ; si -> entry, ax -> list 7084 00009B89 93 xchg ax, bx ; al = number, bx -> list 7085 00009B8A 57 push di 7086 00009B8B 8A35 mov dh, byte [di] 7087 00009B8D E8E636 call UnhookInterruptForce 7088 00009B90 5F pop di 7089 00009B91 47 inc di 7090 00009B92 87DE xchg bx, si ; si -> list 7091 00009B94 E2EF loop .nextint 7092 %endif 7093 7094 7095 %if _PM 7096 00009B96 58 pop ax ; (discard) 7097 %endif 7098 7099 7100 qqlate: 7101 ; Release the registered VDD. 7102 %if _VDD 7103 00009B97 F606[9C00]04 testopt [internalflags], ntpacket 7104 00009B9C 7408 jz .novdd 7105 00009B9E A1[B80A] mov ax, word [hVdd] 7106 00009BA1 C4C4580190 UnRegisterModule 7107 .novdd: 7108 %endif 7109 7110 ; Restore termination address. 7111 %if _BOOTLDR 7112 00009BA6 F606[9D00]40 testopt [internalflags], nodosloaded 7113 00009BAB 7403E99200 jnz .bootterminate ; terminate --> 7114 %endif 7115 %if _TSR 7116 00009BB0 F606[9E00]40 testopt [internalflags], tsrmode 7117 00009BB5 744C jz .nontsrterminate 7118 00009BB7 31F6 xor si, si 7119 00009BB9 E82369 call guard_auxbuff 7120 00009BBC 8E06[F209] mov es, word [auxbuff_segorsel] 7121 00009BC0 31FF xor di, di 7122 00009BC2 31C0 xor ax, ax 7123 00009BC4 B90800 mov cx, 8 7124 00009BC7 F3AB rep stosw ; 10h MCB bytes 7125 00009BC9 B94000 mov cx, 40h 7126 00009BCC F3A5 rep movsw ; 80h PSP bytes 7127 00009BCE 8CC0 mov ax, es 7128 00009BD0 40 inc ax 7129 00009BD1 26A30100 mov word [es:1], ax ; fake MCB 7130 00009BD5 1E push ds 7131 00009BD6 8ED8 mov ds, ax 7132 00009BD8 C70634001800 mov word [34h], 18h 7133 00009BDE A33600 mov word [36h], ax ; insure default PHT and fix segment 7134 00009BE1 C70632000100 mov word [32h], 1 ; only one PHT entry (zero might crash) 7135 00009BE7 C6061800FF mov byte [18h], -1 ; PHT entry is closed 7136 00009BEC C7062C000000 mov word [2Ch], 0 ; PSP clear 7137 00009BF2 E83F00 call .setparent ; make it self-owned, just in case 7138 00009BF5 8CD3 mov bx, ss 7139 00009BF7 4B dec bx 7140 00009BF8 8EDB mov ds, bx ; => our (real) MCB 7141 00009BFA A30100 mov word [1], ax ; parent = fake PSP 7142 00009BFD 1F pop ds 7143 00009BFE E83300 call .setparent ; make the fake PSP our parent 7144 00009C01 EB13 jmp short terminate_00 ; see ya 7145 7146 .nontsrterminate: 7147 %endif 7148 00009C03 BE[C80A] mov si, psp22 ; restore termination address 7149 00009C06 BF0A00 mov di, TPIV 7150 00009C09 A5 movsw 7151 00009C0A A5 movsw 7152 00009C0B BF1600 mov di, 16h ; restore PSP of parent 7153 00009C0E A5 movsw 7154 ; Really done. 7155 00009C0F B44C mov ah, 4Ch ; quit 7156 00009C11 A0[110C] mov al, byte [termcode] ; return code 7157 00009C14 CD21 int 21h 7158 7159 7160 terminate_00: ; used by terminate_attached_process 7161 00009C16 B8004C mov ax, 4C00h ; quit 7162 00009C19 CD21 int 21h 7163 7164 7165 qq_attached_unterminated: 7166 00009C1B BA[0C6C] mov dx, msg.qq_unterm 7167 7168 .common: 7169 ; Restore state: 7170 %if _PM 7171 %if (nohook2F)&~0FF00h 7172 %fatal Internal flags re-ordered, adjust code here 7173 %endif 7174 00009C1E 58 pop ax 7175 00009C1F A2[5689] mov [dpmidisable], al ; (SMC in section lDEBUG_DATA_ENTRY) 7176 00009C22 80E402 and ah, nohook2F>>8 7177 00009C25 8026[9D00]FD clropt [internalflags], nohook2F 7178 00009C2A 0826[9D00] or [internalflags+1], ah 7179 %endif 7180 00009C2E E97321 jmp putsz 7181 7182 7183 usesection lDEBUG_DATA_ENTRY 7184 7185 %if _TSR 7186 qq.proceedtsrtermination: 7187 00009008 FA cli 7188 00009009 FC cld 7189 0000900A 8CC8 mov ax, cs 7190 0000900C 8ED8 mov ds, ax 7191 0000900E 8ED0 mov ss, ax 7192 00009010 BC[400C] mov sp, stack_end 7193 00009013 FB sti 7194 00009014 832E[740C]10 sub word [reg_esp], 2+4+((qq.tsrfreecode_size+1)&~1) 7195 00009019 8B3E[740C] mov di, word [reg_esp] ; -> stack frame 7196 0000901D 8E06[8C0C] mov es, word [reg_ss] 7197 00009021 A1[840C] mov ax, word [reg_ds] 7198 00009024 AB stosw ; debuggee's ds 7199 00009025 A1[9C0C] mov ax, word [reg_eip] 7200 00009028 AB stosw 7201 00009029 A1[900C] mov ax, word [reg_cs] 7202 0000902C AB stosw ; debuggee's cs:ip 7203 0000902D 06 push es 7204 0000902E 57 push di 7205 0000902F BE[5690] mov si, qq.tsrfreecode 7206 00009032 B90500 mov cx, ((qq.tsrfreecode_size+1)>>1) 7207 00009035 F3A5 rep movsw ; code on stack 7208 00009037 8CC8 mov ax, cs 7209 00009039 48 dec ax 7210 0000903A A3[840C] mov word [reg_ds], ax ; = our MCB 7211 0000903D 8F06[9C0C] pop word [reg_eip] 7212 00009041 8F06[900C] pop word [reg_cs] ; -> code on stack 7213 00009045 F606[8700]80 testopt [options3], opt3_tsr_quit_leave_tf 7214 0000904A 7505 jnz @F 7215 0000904C 8026[A10C]FE clropt [reg_efl], 100h ; clear TF 7216 @@: 7217 7218 00009051 E88BF0 call entry_to_code_seg 7219 00009054 [319C] dw .proceedtsrcode 7220 7221 7222 usesection lDEBUG_CODE 7223 7224 code_insure_low_byte_not_0CCh 7225 .proceedtsrcode: 7226 %if _DEBUG 7227 ; avoid hooking interrupts again: 7228 mov byte [cs:..@patch_tsr_quit_run], __JMP_REL16 7229 ; (SMC in section lDEBUG_CODE) 7230 %endif 7231 00009C31 E977A6 jmp run ; run this 7232 7233 7234 usesection lDEBUG_DATA_ENTRY 7235 7236 align 2, db 0 7237 ; (Update: Explicitly clears TF now, except if the 7238 ; option opt3_tsr_quit_leave_tf is set. See above.) 7239 ; 7240 ; Note that since we are in control of debuggee's TF and 7241 ; reset it every time the debugger is entered, this code 7242 ; will not be entered with TF set. It might be entered 7243 ; with IF set and an interrupt might occur; the only harm 7244 ; done then is that the interrupt handler has less stack 7245 ; available. All flags must be preserved by this code. 7246 qq.tsrfreecode: 7247 00009056 C70601000000 mov word [1], 0 ; free the MCB 7248 0000905C 1F pop ds ; restore debuggee's ds 7249 0000905D CA0A00 retf ((qq.tsrfreecode_size+1)&~1) ; jump 7250 qq.tsrfreecode_size: equ $-qq.tsrfreecode 7251 7252 7253 usesection lDEBUG_CODE 7254 7255 qqlate.setparent: 7256 00009C34 A31600 mov word [16h], ax 7257 00009C37 C7060A00[0890] mov word [0Ah], qq.proceedtsrtermination 7258 00009C3D 8C160C00 mov word [0Ah+2], ss 7259 00009C41 C3 retn 7260 %endif 7261 7262 %if _BOOTLDR 7263 qqlate.bootterminate: 7264 00009C42 812E[740C]BC00 sub word [reg_esp], 2*8+4+((qq.bootfreecode_size+1)&~1) 7265 00009C48 8B3E[740C] mov di, word [reg_esp] ; -> stack frame 7266 00009C4C 8E06[8C0C] mov es, word [reg_ss] 7267 00009C50 A1[840C] mov ax, word [reg_ds] 7268 00009C53 AB stosw 7269 00009C54 A1[880C] mov ax, word [reg_es] 7270 00009C57 AB stosw 7271 00009C58 A1[7C0C] mov ax, word [reg_esi] 7272 00009C5B AB stosw 7273 00009C5C A1[800C] mov ax, word [reg_edi] 7274 00009C5F AB stosw 7275 00009C60 A1[640C] mov ax, word [reg_eax] 7276 00009C63 AB stosw 7277 00009C64 A1[6C0C] mov ax, word [reg_ecx] 7278 00009C67 AB stosw 7279 00009C68 A1[680C] mov ax, word [reg_ebx] 7280 00009C6B AB stosw 7281 00009C6C A1[700C] mov ax, word [reg_edx] 7282 00009C6F AB stosw 7283 00009C70 A1[9C0C] mov ax, word [reg_eip] 7284 00009C73 AB stosw 7285 00009C74 A1[900C] mov ax, word [reg_cs] 7286 00009C77 AB stosw ; debuggee's cs:ip 7287 00009C78 06 push es 7288 00009C79 57 push di 7289 00009C7A 1E push ds 7290 00009C7B 0E push cs 7291 00009C7C 1F pop ds ; => lDEBUG_CODE 7292 00009C7D BE[E49C] mov si, qq.bootfreecode 7293 00009C80 B95400 mov cx, ((qq.bootfreecode_size+1)>>1) 7294 00009C83 F3A5 rep movsw ; code on stack 7295 00009C85 1F pop ds 7296 7297 00009C86 16 push ss 7298 00009C87 07 pop es 7299 7300 00009C88 A1[E28F] mov ax, word [ boot_new_memsizekib ] 7301 00009C8B B106 mov cl, 6 7302 00009C8D D3E0 shl ax, cl ; ax => source of EBDA (new position) 7303 00009C8F 8B16[E48F] mov dx, word [ boot_old_memsizekib ] 7304 00009C93 D3E2 shl dx, cl ; dx => destination of EBDA (old position) 7305 00009C95 31C9 xor cx, cx ; size of EBDA to move (if none) 7306 00009C97 1E push ds 7307 00009C98 8ED9 mov ds, cx 7308 00009C9A 8B1E0E04 mov bx, word [40Eh] ; new ref in word [0:40Eh] (if none) 7309 00009C9E 1F pop ds 7310 00009C9F 803E[E68F]00 cmp byte [ boot_ebdaflag ], 0 ; any EBDA ? 7311 00009CA4 7412 jz .noebda 7312 7313 00009CA6 1E push ds 7314 00009CA7 8ED8 mov ds, ax ; => EBDA 7315 00009CA9 31DB xor bx, bx 7316 00009CAB 8A1E0000 mov bl, byte [ 0 ] ; EBDA size in KiB 7317 00009CAF B106 mov cl, 6 7318 00009CB1 D3E3 shl bx, cl ; *64, to paragraphs 7319 00009CB3 89D9 mov cx, bx ; = size of EBDA to move (in paragraphs) 7320 00009CB5 89D3 mov bx, dx ; = new EBDA reference to put in word [0:40Eh] 7321 00009CB7 1F pop ds 7322 7323 .noebda: 7324 00009CB8 A3[640C] mov word [reg_eax], ax ; => relocated (new) EBDA position 7325 ; (in front of debugger image) 7326 00009CBB 891E[680C] mov word [reg_ebx], bx ; = what to put in word [0:40Eh], 7327 ; unchanged content of that word if no EBDA 7328 00009CBF 890E[6C0C] mov word [reg_ecx], cx ; = EBDA size, 0 if no EBDA 7329 00009CC3 8916[700C] mov word [reg_edx], dx ; = original (old) EBDA position 7330 ; = original mem size (in paras) 7331 ; (behind/in debugger image) 7332 00009CC7 C706[840C]0000 mov word [reg_ds], 0 7333 7334 00009CCD 8F06[9C0C] pop word [reg_eip] 7335 00009CD1 8F06[900C] pop word [reg_cs] ; -> code on stack 7336 00009CD5 F606[8700]80 testopt [options3], opt3_tsr_quit_leave_tf 7337 00009CDA 7505 jnz @F 7338 00009CDC 8026[A10C]FE clropt [reg_efl], 100h ; clear TF 7339 @@: 7340 ; call dumpregs 7341 %if _DEBUG 7342 ; avoid hooking interrupts again: 7343 mov byte [cs:..@patch_tsr_quit_run], __JMP_REL16 7344 ; (SMC in section lDEBUG_CODE) 7345 %endif 7346 ; jmp cmd3 7347 00009CE1 E9C7A5 jmp run ; run this 7348 7349 7350 align 2, db 0 7351 qq.bootfreecode: 7352 00009CE4 9C pushf 7353 00009CE5 E81800 call movp ; move EBDA back (if any) 7354 00009CE8 891E0E04 mov word [40Eh], bx ; back relocate EBDA (if any) 7355 00009CEC B106 mov cl, 6 7356 00009CEE D3EA shr dx, cl ; = to KiB 7357 00009CF0 89161304 mov word [413h], dx ; back relocate mem size 7358 00009CF4 9D popf 7359 00009CF5 1F pop ds 7360 00009CF6 07 pop es 7361 00009CF7 5E pop si 7362 00009CF8 5F pop di 7363 00009CF9 58 pop ax 7364 00009CFA 59 pop cx 7365 00009CFB 5B pop bx 7366 00009CFC 5A pop dx 7367 00009CFD CAA800 retf ((qq.bootfreecode_size+1)&~1) 7368 7369 7370 ; Move paragraphs 7371 ; 7372 ; INP: ax:0-> source 7373 ; dx:0-> destination 7374 ; cx = number of paragraphs 7375 ; CHG: - 7376 ; Note: Doesn't work correctly on HMA; doesn't always wrap to LMA either. 7377 ; Do not provide a wrapped/HMA source or destination! 7378 movp: 7379 00009D00 51 push cx 7380 00009D01 1E push ds 7381 00009D02 56 push si 7382 00009D03 06 push es 7383 00009D04 57 push di 7384 7385 00009D05 39D0 cmp ax, dx ; source above destination ? 7386 00009D07 770A ja .up ; yes, move up (forwards) --> 7387 00009D09 747B je .return ; same, no need to move --> 7388 00009D0B 50 push ax 7389 00009D0C 01C8 add ax, cx ; (expected not to carry) 7390 00009D0E 39D0 cmp ax, dx ; end of source is above destination ? 7391 00009D10 58 pop ax 7392 00009D11 7730 ja .down ; yes, move from top down --> 7393 ; Here, the end of source is below-or-equal the destination, 7394 ; so they do not overlap. In this case we prefer moving up. 7395 7396 .up: 7397 00009D13 50 push ax 7398 00009D14 52 push dx 7399 .uploop: 7400 00009D15 8ED8 mov ds, ax 7401 00009D17 8EC2 mov es, dx 7402 00009D19 31FF xor di, di 7403 00009D1B 31F6 xor si, si ; -> start of segment 7404 00009D1D 81E90010 sub cx, 1000h ; 64 KiB left ? 7405 00009D21 7610 jbe .uplast ; no --> 7406 00009D23 51 push cx 7407 00009D24 B90080 mov cx, 10000h /2 7408 00009D27 F3A5 rep movsw ; move 64 KiB 7409 00009D29 59 pop cx 7410 00009D2A 050010 add ax, 1000h 7411 00009D2D 81C20010 add dx, 1000h ; -> next segment 7412 00009D31 EBE2 jmp short .uploop ; proceed for more --> 7413 .uplast: 7414 00009D33 81C10010 add cx, 1000h ; restore counter 7415 00009D37 D1E1 shl cx, 1 7416 00009D39 D1E1 shl cx, 1 7417 00009D3B D1E1 shl cx, 1 ; *8, paragraphs to words 7418 00009D3D F3A5 rep movsw ; move last part 7419 00009D3F 5A pop dx 7420 00009D40 58 pop ax 7421 00009D41 EB43 jmp short .return 7422 7423 .down: 7424 00009D43 FD std ; _AMD_ERRATUM_109_WORKAROUND as below 7425 .dnloop: 7426 00009D44 81E90010 sub cx, 1000h ; 64 KiB left ? 7427 00009D48 761A jbe .dnlast ; no --> 7428 00009D4A 50 push ax 7429 00009D4B 52 push dx 7430 00009D4C 01C8 add ax, cx 7431 00009D4E 01CA add dx, cx 7432 00009D50 8ED8 mov ds, ax ; -> 64 KiB not yet moved 7433 00009D52 8EC2 mov es, dx 7434 00009D54 5A pop dx 7435 00009D55 58 pop ax 7436 00009D56 BFFEFF mov di, -2 7437 00009D59 89FE mov si, di ; moved from last word down 7438 00009D5B 51 push cx 7439 00009D5C B90080 mov cx, 10000h /2 7440 00009D5F F3A5 rep movsw ; move 64 KiB 7441 00009D61 59 pop cx 7442 00009D62 EBE0 jmp short .dnloop ; proceed for more --> 7443 .dnlast: 7444 00009D64 81C10010 add cx, 1000h ; restore counter 7445 00009D68 D1E1 shl cx, 1 7446 00009D6A D1E1 shl cx, 1 7447 00009D6C D1E1 shl cx, 1 ; *8, paragraphs to words 7448 00009D6E 89CF mov di, cx 7449 00009D70 4F dec di 7450 00009D71 D1E7 shl di, 1 ; words to offset, -> last word 7451 00009D73 89FE mov si, di 7452 00009D75 8ED8 mov ds, ax 7453 00009D77 8EC2 mov es, dx ; first segment correct 7454 7455 7456 numdef AMD_ERRATUM_109_WORKAROUND, 1 7457 ; Refer to comment in init.asm init_movp. 7458 7459 %if _AMD_ERRATUM_109_WORKAROUND 7460 00009D79 E308 jcxz @FF 7461 00009D7B 83F914 cmp cx, 20 7462 00009D7E 7703 ja @FF 7463 @@: 7464 00009D80 A5 movsw 7465 00009D81 E2FD loop @B 7466 @@: 7467 %endif 7468 00009D83 F3A5 rep movsw ; move first part 7469 00009D85 FC cld 7470 .return: 7471 00009D86 5F pop di 7472 00009D87 07 pop es 7473 00009D88 5E pop si 7474 00009D89 1F pop ds 7475 00009D8A 59 pop cx 7476 00009D8B C3 retn 7477 qq.bootfreecode_size: equ $-qq.bootfreecode 7478 %endif 7479 7480 7481 sleepcmd: 7482 00009D8C E8851B call skipcomma 7483 00009D8F E85515 call getdword 7484 00009D92 53 push bx 7485 00009D93 52 push dx 7486 00009D94 E8AD1B call skipwh0 7487 00009D97 E8541B call iseol? 7488 00009D9A 7421 je .seconds 7489 00009D9C 4E dec si 7490 00009D9D BA[B068] mov dx, msg.seconds 7491 00009DA0 E8EC1A call isstring? 7492 00009DA3 7414 je .seconds_check_eol 7493 00009DA5 BA[B868] mov dx, msg.ticks 7494 00009DA8 E8E41A call isstring? 7495 .error_NZ: 7496 00009DAB 7403E92C07 jne error 7497 .ticks_check_eol: 7498 00009DB0 AC lodsb 7499 00009DB1 E84F1B call chkeol 7500 7501 00009DB4 B80100 mov ax, 1 7502 00009DB7 EB07 jmp .common 7503 7504 .seconds_check_eol: 7505 00009DB9 AC lodsb 7506 00009DBA E8461B call chkeol 7507 .seconds: 7508 00009DBD B81200 mov ax, 18 7509 .common: 7510 00009DC0 5A pop dx 7511 00009DC1 50 push ax 7512 00009DC2 F7E2 mul dx ; dx:ax = low word times multiplier 7513 00009DC4 89D3 mov bx, dx 7514 00009DC6 89C1 mov cx, ax ; bx:cx = low word times multiplier 7515 00009DC8 58 pop ax 7516 00009DC9 5A pop dx 7517 00009DCA F7E2 mul dx ; dx:ax = high word times multiplier 7518 00009DCC 01C3 add bx, ax 7519 00009DCE 83D200 adc dx, 0 ; dx:bx:cx = entire result 7520 00009DD1 75D8 jnz .error_NZ 7521 7522 00009DD3 85C9 test cx, cx 7523 00009DD5 7504 jnz @F 7524 00009DD7 85DB test bx, bx 7525 00009DD9 7436 jz .end 7526 @@: 7527 7528 00009DDB B84000 mov ax, 40h ; bimodal segment/selector 7529 00009DDE 8EC0 mov es, ax 7530 .loop_reset: 7531 00009DE0 268B166C00 mov dx, word [es:6Ch] 7532 .loop: 7533 00009DE5 263B166C00 cmp dx, word [es:6Ch] 7534 00009DEA 7519 jne .next 7535 00009DEC E8B6A1 call handle_serial_flags_ctrl_c 7536 00009DEF F606[8700]40 testopt [options3], opt3_check_ctrlc_0bh 7537 00009DF4 750A jnz @F ; already called function 0Bh --> 7538 00009DF6 E8AF08 call InDos 7539 00009DF9 7505 jnz @F 7540 00009DFB B40B mov ah, 0Bh 7541 doscall ; allow to break with Ctrl-C 2040 00009DFD E869BF <1> call _doscall 7542 @@: 7543 00009E00 E8CC22 call idle 7544 00009E03 EBE0 jmp .loop 7545 7546 .next: 7547 00009E05 83E901 sub cx, 1 7548 00009E08 83DB00 sbb bx, 0 7549 00009E0B 75D3 jnz .loop_reset 7550 00009E0D E302 jcxz .end 7551 00009E0F EBCF jmp .loop_reset 7552 7553 .end: 7554 00009E11 C3 retn 7555 7556 7557 ; S command - search for a string of bytes. 7558 sss: 7559 00009E12 4E dec si 7560 00009E13 4E dec si ; -> at 'S' 7561 00009E14 BA[AA68] mov dx, msg.sleep 7562 00009E17 E8751A call isstring? ; check for "SLEEP" 7563 00009E1A 7503E96DFF je sleepcmd 7564 00009E1F 46 inc si ; skip 'S' 7565 00009E20 AC lodsb ; load next 7566 7567 00009E21 8026[A700]7F clropt [internalflags3], dif3_sss_is_reverse 7568 7569 00009E26 8B1E[840C] mov bx, word [reg_ds] ; get search range 7570 00009E2A 66 _386_PM_o32 ; xor ecx, ecx 7571 00009E2B 31C9 xor cx, cx 7572 00009E2D E8F809 call getrangeX ; get address range into BX:(E)DX..BX:(E)CX 7573 00009E30 E8E21A call skipcomm0 7574 00009E33 66 _386_PM_o32 ; push edx 7575 00009E34 52 push dx 7576 00009E35 66 _386_PM_o32 ; push ecx 7577 00009E36 51 push cx 7578 00009E37 53 push bx 7579 7580 00009E38 BA[0667] mov dx, msg.reverse 7581 00009E3B 4E dec si 7582 00009E3C E8501A call isstring? 7583 00009E3F 7509 jne @F 7584 7585 00009E41 800E[A700]80 setopt [internalflags3], dif3_sss_is_reverse 7586 00009E46 E8FA1A call skipwhite 7587 00009E49 4E dec si 7588 @@: 7589 00009E4A BA[0067] mov dx, msg.range 7590 00009E4D E83F1A call isstring? 7591 00009E50 AC lodsb 7592 00009E51 7514 jne .notrange 7593 7594 00009E53 8B1E[840C] mov bx, word [reg_ds] ; get search range 7595 00009E57 31C9 xor cx, cx 7596 00009E59 E8CC09 call getrangeX ; try to get second range 7597 00009E5C E8A41A call chkeol ; and insure end-of-line 7598 ; successful if it returned 7599 00009E5F 66 _386_PM_o32 ; mov esi, edx 7600 00009E60 89D6 mov si, dx ; bx:esi-> source string 7601 00009E62 66 _386_PM_o32 ; sub ecx, edx 7602 00009E63 29D1 sub cx, dx ; ecx = count - 1 7603 00009E65 EB28 jmp short .setesedi 7604 7605 .notrange: 7606 00009E67 E8020B call getstr ; get string of bytes 7607 00009E6A 81EF[0E08] sub di, line_out ; di = number of bytes to look for 7608 00009E6E 7503E96906 jz error 7609 00009E73 89F9 mov cx, di 7610 00009E75 4F dec di ; minus one 7611 00009E76 BE[0E08] mov si, line_out 7612 00009E79 57 push di 7613 00009E7A E86266 call guard_auxbuff 7614 00009E7D 8E06[F209] mov es, word [auxbuff_segorsel] 7615 00009E81 31FF xor di, di 7616 00009E83 F3A4 rep movsb ; move to auxbuff 7617 00009E85 66 _386_PM_o32 ; xor esi, esi 7618 00009E86 31F6 xor si, si 7619 00009E88 8CC3 mov bx, es ; bx:esi -> auxbuff 7620 00009E8A 59 pop cx 7621 00009E8B 660FB7C9 _386_PM movzx ecx, cx ; ecx = count - 1 7622 .setesedi: 7623 00009E8F 16 push ss 7624 00009E90 07 pop es 7625 00009E91 BF[6C0B] mov di, search_results 7626 00009E94 31C0 xor ax, ax 7627 00009E96 A3[CC0B] mov word [sscounter], ax 7628 00009E99 A3[CE0B] mov word [sscounter + 2], ax 7629 00009E9C 51 push cx 7630 %if _PM 7631 00009E9D B93000 mov cx, (6 * 16) >> 1 7632 %else 7633 mov cx, (4 * 16) >> 1 7634 %endif 7635 00009EA0 F3AB rep stosw 7636 00009EA2 59 pop cx 7637 7638 00009EA3 E87507 call prephack ; set up for the interrupt vector hack 7639 00009EA6 E8A007 call dohack 7640 00009EA9 8EDB mov ds, bx 7641 00009EAB 07 pop es 7642 00009EAC E92501 _386_PM_jmpn .386init ; 386 --> 7643 .init: 7644 00009EAF 5B pop bx 7645 00009EB0 5A pop dx 7646 .init_popped: 7647 00009EB1 29D3 sub bx, dx ; bx = number of bytes in search range minus one 7648 00009EB3 29CB sub bx, cx ; = number of possible positions of string minus 1 7649 00009EB5 7303E92206 jb error 7650 00009EBA 89D7 mov di, dx 7651 00009EBC 89CA mov dx, cx 7652 00009EBE 89D9 mov cx, bx 7653 7654 ; ds:si-> search string, length (dx+1) 7655 ; es:di-> data to search in, (cx+1) bytes 7656 00009EC0 36F606[A700]80 testopt [ss:internalflags3], dif3_sss_is_reverse 7657 00009EC6 7516 jnz .reverse 7658 .loop: 7659 00009EC8 0C01 or al, 1 ; NZ (iff cx==0, repne scasb doesn't change ZF) 7660 00009ECA 56 push si 7661 00009ECB AC lodsb ; first character in al 7662 00009ECC F2AE repne scasb ; look for first byte 7663 00009ECE 7408 je .foundbyte 7664 00009ED0 AE scasb ; count in cx was cnt-1 7665 00009ED1 7536 jne .done 7666 .found_last_byte: 7667 00009ED3 E85600 call .handle_found_byte 7668 00009ED6 EB31 jmp .done 7669 7670 .foundbyte: 7671 00009ED8 E85100 call .handle_found_byte 7672 00009EDB 5E pop si 7673 00009EDC EBEA jmp .loop ; cx = 0 if one to search, 7674 ; cx = 1 if two to search, etc 7675 7676 .reverse: 7677 00009EDE 01CF add di, cx ; -> last position to check 7678 .reverseloop: 7679 00009EE0 0C01 or al, 1 ; NZ (iff cx==0, repne scasb doesn't change ZF) 7680 00009EE2 56 push si 7681 00009EE3 AC lodsb ; first character in al 7682 00009EE4 FD std ; no AMD erratum workaround needed 7683 00009EE5 F2AE repne scasb ; look for first byte 7684 00009EE7 7411 je .reversefoundbyte 7685 00009EE9 AE scasb ; count in cx was cnt-1 7686 00009EEA 751D jne .done 7687 .reversefound_last_byte: 7688 00009EEC FC cld 7689 00009EED 83C702 add di, 2 7690 00009EF0 38C0 cmp al, al ; ZR for case if dx = 0 7691 00009EF2 E83700 call .handle_found_byte 7692 00009EF5 83EF02 sub di, 2 7693 00009EF8 EB0F jmp .done 7694 7695 .reversefoundbyte: 7696 00009EFA FC cld 7697 00009EFB 83C702 add di, 2 7698 00009EFE 38C0 cmp al, al ; ZR for case if dx = 0 7699 00009F00 E82900 call .handle_found_byte 7700 00009F03 83EF02 sub di, 2 7701 00009F06 5E pop si 7702 00009F07 EBD7 jmp .reverseloop ; cx = 0 if one to search, 7703 ; cx = 1 if two to search, etc 7704 7705 .done: 7706 00009F09 5E pop si ; discard 7707 .commondone: 7708 00009F0A FC cld 7709 00009F0B 16 push ss 7710 00009F0C 1F pop ds 7711 00009F0D E86D07 call unhack 7712 00009F10 BF[0E08] mov di, line_out 7713 7714 00009F13 A1[CE0B] mov ax, word [sscounter + 2] 7715 00009F16 85C0 test ax, ax 7716 00009F18 7403 jz .nohighcounter 7717 00009F1A E8D11A call hexword 7718 .nohighcounter: 7719 7720 00009F1D A1[CC0B] mov ax, word [sscounter] 7721 00009F20 E8CB1A call hexword 7722 00009F23 E8041B call putsline 7723 00009F26 BA[5880] mov dx, msg.matches 7724 00009F29 E9781E jmp putsz 7725 7726 7727 ; INP: ZR 7728 .handle_found_byte: 7729 00009F2C 51 push cx 7730 00009F2D 57 push di 7731 00009F2E 89D1 mov cx, dx 7732 00009F30 F3A6 repe cmpsb ; compare string behind first byte 7733 ; If we're searching for a single-byte value then 7734 ; dx is equal to zero here. In that case cx gets 7735 ; the value zero and then repe cmpsb does not 7736 ; alter ZF, meaning it will stay ZR (as noted for 7737 ; the comment INP section). 7738 00009F32 5F pop di 7739 00009F33 7402 je .display ; if equal 7740 .next: 7741 00009F35 59 pop cx 7742 00009F36 C3 retn 7743 7744 .display: 7745 00009F37 8CC3 mov bx, es 7746 00009F39 57 push di 7747 00009F3A 1E push ds 7748 00009F3B 06 push es 7749 00009F3C 16 push ss 7750 00009F3D 1F pop ds 7751 00009F3E E83C07 call unhack ; undo the interrupt vector hack and restore es 7752 00009F41 57 push di 7753 00009F42 833E[CE0B]00 cmp word [sscounter + 2], 0 7754 00009F47 751F jne @F 7755 00009F49 8B3E[CC0B] mov di, word [sscounter] 7756 00009F4D 83FF10 cmp di, 16 7757 00009F50 7316 jae @F 7758 %if _PM 7759 00009F52 01FF add di, di ; * 2 7760 00009F54 89F8 mov ax, di 7761 00009F56 01FF add di, di ; * 4 7762 00009F58 01C7 add di, ax ; * 4 + * 2 = * 6 7763 %else 7764 add di, di 7765 add di, di ; * 4 7766 %endif 7767 00009F5A 81C7[6C0B] add di, search_results 7768 00009F5E 58 pop ax 7769 00009F5F 50 push ax 7770 00009F60 48 dec ax 7771 00009F61 AB stosw 7772 %if _PM 7773 00009F62 31C0 xor ax, ax 7774 00009F64 AB stosw 7775 %endif 7776 00009F65 89D8 mov ax, bx 7777 00009F67 AB stosw 7778 7779 @@: 7780 00009F68 8306[CC0B]01 add word [sscounter], 1 7781 00009F6D 8316[CE0B]00 adc word [sscounter + 2], 0 7782 00009F72 89D8 mov ax, bx 7783 00009F74 BF[0E08] mov di, line_out 7784 00009F77 E8741A call hexword ; 4 (segment) 7785 00009F7A B03A mov al, ':' 7786 00009F7C AA stosb ; +1=5 7787 00009F7D 58 pop ax 7788 00009F7E 48 dec ax 7789 00009F7F E86C1A call hexword 7790 %if _SDUMP 7791 00009F82 F606[7E00]80 testopt [options], ss_no_dump 7792 00009F87 753D jnz @F 7793 00009F89 F9 stc 7794 00009F8A 11D0 adc ax, dx ; -> behind result 7795 00009F8C 7638 jbe .noresult ; end of segment 7796 00009F8E 89C6 mov si, ax 7797 00009F90 B82020 mov ax, 32<<8|32 7798 00009F93 AB stosw 7799 00009F94 8D5D30 lea bx, [di+3*16] 7800 00009F97 89F1 mov cx, si 7801 00009F99 F7D9 neg cx 7802 00009F9B 83F910 cmp cx, byte 16 7803 00009F9E 7603 jbe .cxdone 7804 00009FA0 B91000 mov cx, 16 7805 .cxdone: 7806 00009FA3 1F pop ds 7807 00009FA4 1E push ds ; restore search's segment 7808 00009FA5 51 push cx 7809 .disploop: 7810 00009FA6 AC lodsb 7811 00009FA7 E8EB75 call dd_store 7812 00009FAA B020 mov al, 32 7813 00009FAC AA stosb 7814 00009FAD E2F7 loop .disploop 7815 00009FAF 59 pop cx 7816 00009FB0 16 push ss 7817 00009FB1 1F pop ds 7818 00009FB2 F7D9 neg cx 7819 00009FB4 83C110 add cx, byte 16 7820 00009FB7 7407 jz .noblanks 7821 .loopblanks: 7822 00009FB9 B82020 mov ax, 32<<8|32 7823 00009FBC AB stosw 7824 00009FBD AA stosb 7825 00009FBE E2F9 loop .loopblanks 7826 .noblanks: 7827 00009FC0 C645E72D mov byte [di-(1+(8*3))], '-' 7828 00009FC4 89DF mov di, bx 7829 .noresult: 7830 @@: 7831 %endif ; _SDUMP 7832 00009FC6 52 push dx 7833 00009FC7 E85C1A call putsline_crlf 7834 00009FCA E87C06 call dohack 7835 00009FCD 5A pop dx 7836 00009FCE 07 pop es 7837 00009FCF 1F pop ds 7838 00009FD0 5F pop di 7839 00009FD1 E961FF jmp .next 7840 7841 %if _PM 7842 .386init: 7843 [cpu 386] 7844 00009FD4 665B pop ebx 7845 00009FD6 665A pop edx 7846 00009FD8 E8F2F1 call ispm 7847 00009FDB 0F85D2FE jnz .init_popped ; not PM --> 7848 00009FDF 6629D3 sub ebx, edx ; ebx = number of bytes in search range minus one 7849 00009FE2 6629CB sub ebx, ecx ; = number of possible positions of string minus 1 7850 00009FE5 0F82F304 jb error 7851 00009FE9 6689D7 mov edi, edx 7852 00009FEC 6689CA mov edx, ecx 7853 00009FEF 6689D9 mov ecx, ebx 7854 7855 ; ds:esi-> search string, length (edx+1) 7856 ; es:edi-> data to search in, (ecx+1) bytes 7857 ; Although 386+ RM still uses 64 KiB segments, it allows 7858 ; us to use the 32-bit addressing variant of the string 7859 ; instructions as long as we never access any byte above 7860 ; the 64 KiB limit. (Even if the index register contains 7861 ; 00010000h after an instruction executed.) 7862 00009FF2 36F606[A700]80 testopt [ss:internalflags3], dif3_sss_is_reverse 7863 00009FF8 751B jnz .386reverse 7864 .386loop: 7865 00009FFA 0C01 or al, 1 ; NZ (iff cx==0, repne scasb doesn't change ZF) 7866 00009FFC 6656 push esi 7867 00009FFE 67AC a32 lodsb ; first character in al 7868 0000A000 F267AE a32 repne scasb ; look for first byte 7869 0000A003 7409 je .386foundbyte 7870 0000A005 67AE a32 scasb ; count in ecx was cnt-1 7871 0000A007 7541 jne .386done 7872 .386found_last_byte: 7873 0000A009 E84300 call .386handle_found_byte 7874 0000A00C EB3C jmp .386done 7875 7876 .386foundbyte: 7877 0000A00E E83E00 call .386handle_found_byte 7878 0000A011 665E pop esi 7879 0000A013 EBE5 jmp .386loop ; ecx = 0 if one to search, 7880 ; ecx = 1 if two to search, etc 7881 7882 .386reverse: 7883 0000A015 6601CF add edi, ecx ; -> last position to check 7884 .386reverseloop: 7885 0000A018 0C01 or al, 1 ; NZ (iff cx==0, repne scasb doesn't change ZF) 7886 0000A01A 6656 push esi 7887 0000A01C 67AC a32 lodsb ; first character in al 7888 0000A01E FD std ; no AMD erratum workaround needed 7889 0000A01F F267AE a32 repne scasb ; look for first byte 7890 0000A022 7414 je .386reversefoundbyte 7891 0000A024 67AE a32 scasb ; count in ecx was cnt-1 7892 0000A026 7522 jne .386done 7893 .386reversefound_last_byte: 7894 0000A028 FC cld 7895 0000A029 6683C702 add edi, 2 7896 0000A02D 38C0 cmp al, al ; ZR for case if edx = 0 7897 0000A02F E81D00 call .386handle_found_byte 7898 0000A032 6683EF02 sub edi, 2 7899 0000A036 EB12 jmp .386done 7900 7901 .386reversefoundbyte: 7902 0000A038 FC cld 7903 0000A039 6683C702 add edi, 2 7904 0000A03D 38C0 cmp al, al ; ZR for case if edx = 0 7905 0000A03F E80D00 call .386handle_found_byte 7906 0000A042 6683EF02 sub edi, 2 7907 0000A046 665E pop esi 7908 0000A048 EBCE jmp .386reverseloop ; ecx = 0 if one to search, 7909 ; ecx = 1 if two to search, etc 7910 7911 .386done: 7912 0000A04A 665E pop esi ; discard 7913 0000A04C E9BBFE jmp .commondone 7914 7915 7916 ; INP: ZR 7917 .386handle_found_byte: 7918 0000A04F 6651 push ecx 7919 0000A051 6657 push edi 7920 0000A053 6689D1 mov ecx, edx 7921 0000A056 F367A6 a32 repe cmpsb ; compare string behind first byte 7922 ; If we're searching for a single-byte value then 7923 ; edx is equal to zero here. In that case ecx gets 7924 ; the value zero and then a32 repe cmpsb does not 7925 ; alter ZF, meaning it will stay ZR (as noted for 7926 ; the comment INP section). 7927 0000A059 665F pop edi 7928 0000A05B 7403 je .386display ; if equal 7929 .386next: 7930 0000A05D 6659 pop ecx 7931 0000A05F C3 retn 7932 7933 .386display: 7934 0000A060 8CC3 mov bx, es 7935 0000A062 6657 push edi 7936 0000A064 1E push ds 7937 0000A065 06 push es 7938 0000A066 16 push ss 7939 0000A067 1F pop ds 7940 0000A068 E81206 call unhack ; undo the interrupt vector hack and restore es 7941 0000A06B 6657 push edi 7942 0000A06D 668B3E[CC0B] mov edi, dword [sscounter] 7943 0000A072 6683FF10 cmp edi, 16 7944 0000A076 7317 jae @F 7945 0000A078 01FF add di, di ; * 2 7946 0000A07A 89F8 mov ax, di 7947 0000A07C 01FF add di, di ; * 4 7948 0000A07E 01C7 add di, ax ; * 4 + * 2 = * 6 7949 0000A080 81C7[6C0B] add di, search_results 7950 0000A084 6658 pop eax 7951 0000A086 6650 push eax 7952 0000A088 6648 dec eax 7953 0000A08A 66AB stosd 7954 0000A08C 89D8 mov ax, bx 7955 0000A08E AB stosw 7956 7957 @@: 7958 0000A08F 66FF06[CC0B] inc dword [sscounter] 7959 0000A094 89D8 mov ax, bx 7960 0000A096 BF[0E08] mov di, line_out 7961 0000A099 E85219 call hexword ; 4 (segment) 7962 0000A09C B03A mov al, ':' 7963 0000A09E AA stosb ; +1=5 7964 0000A09F 6658 pop eax 7965 0000A0A1 6648 dec eax 7966 0000A0A3 E890BC call test_d_b_bit 7967 0000A0A6 7403 jz .noa32 7968 0000A0A8 E83719 call hexword_high 7969 .noa32: 7970 0000A0AB E84019 call hexword 7971 %if _SDUMP 7972 0000A0AE F606[7E00]80 testopt [options], ss_no_dump 7973 0000A0B3 7543 jnz @F 7974 0000A0B5 F9 stc 7975 0000A0B6 6611D0 adc eax, edx ; -> behind result 7976 0000A0B9 763D jbe .386noresult ; end of segment 7977 0000A0BB 6689C6 mov esi, eax 7978 0000A0BE B82020 mov ax, 32<<8|32 7979 0000A0C1 AB stosw 7980 0000A0C2 8D5D30 lea bx, [di+3*16] 7981 0000A0C5 6689F1 mov ecx, esi 7982 0000A0C8 66F7D9 neg ecx 7983 0000A0CB 6683F910 cmp ecx, byte 16 7984 0000A0CF 7603 jbe .386cxdone 7985 0000A0D1 B91000 mov cx, 16 7986 .386cxdone: 7987 0000A0D4 1F pop ds 7988 0000A0D5 1E push ds ; restore search's segment 7989 0000A0D6 51 push cx 7990 .386disploop: 7991 0000A0D7 67AC a32 lodsb 7992 0000A0D9 E8B974 call dd_store 7993 0000A0DC B020 mov al, 32 7994 0000A0DE AA stosb 7995 0000A0DF E2F6 loop .386disploop 7996 0000A0E1 59 pop cx 7997 0000A0E2 16 push ss 7998 0000A0E3 1F pop ds 7999 0000A0E4 F7D9 neg cx 8000 0000A0E6 83C110 add cx, byte 16 8001 0000A0E9 7407 jz .386noblanks 8002 .386loopblanks: 8003 0000A0EB B82020 mov ax, 32<<8|32 8004 0000A0EE AB stosw 8005 0000A0EF AA stosb 8006 0000A0F0 E2F9 loop .386loopblanks 8007 .386noblanks: 8008 0000A0F2 C645E72D mov byte [di-(1+(8*3))], '-' 8009 0000A0F6 89DF mov di, bx 8010 .386noresult: 8011 @@: 8012 %endif ; _SDUMP 8013 0000A0F8 52 push dx 8014 0000A0F9 E82A19 call putsline_crlf 8015 0000A0FC E84A05 call dohack 8016 0000A0FF 5A pop dx 8017 0000A100 07 pop es 8018 0000A101 1F pop ds 8019 0000A102 665F pop edi 8020 0000A104 E956FF jmp .386next 8021 __CPU__ 8022 %endif ; _PM 8023 8024 8025 %if 0 8026 getdebuggeebyte: 8027 push bp 8028 mov bp, sp 8029 sub sp, byte 4 8030 push bx 8031 push cx 8032 %define _dedata -4 8033 %define _bp 0 8034 %define _ip 2 8035 %define _adroffset 4 8036 %define _adrsegment 8 8037 test byte [], memorydump 8038 jz .realmemory 8039 8040 jmp short .return 8041 .realmemory32: 8042 .realmemory: 8043 mov ax, word [ bp + _adrsegment ] 8044 mov bx, word [ bp + _adroffset ] 8045 push ds 8046 mov ds, ax 8047 push word [ bx ] 8048 pop word [ bp + _dedata ] 8049 push word [ bx +2 ] 8050 pop word [ bp + _dedata +2 ] 8051 pop ds 8052 ; test ax, ax 8053 ; jnz .return 8054 mov dx, ax 8055 mov cl, 4 8056 shl ax, cl 8057 mov cl, 12 8058 shr dx, cl 8059 add ax, bx 8060 adc dx, byte 0 8061 jnz .return 8062 sub ax, 23h*4 8063 jb .return 8064 cmp ax, 2*4 8065 jae .return 8066 8067 push ds 8068 xor bx, bx 8069 mov ds, bx 8070 push si 8071 push di 8072 mov si, 22h*4 8073 mov di, hackints.dummy22 8074 movsw 8075 movsw 8076 mov bl, 8 8077 add si, bx 8078 add di, bx 8079 movsw 8080 movsw 8081 8082 mov cl, byte [ bx - 4 + hackints2324 ] 8083 mov byte [ bp + _dedata ], cl 8084 .return: 8085 pop cx 8086 pop bx 8087 pop ax 8088 pop dx 8089 pop bp 8090 retn 6 8091 8092 8093 ; Interrupt hack table 8094 ; 8095 ; This contains the Int23 and Int24 handler we want to show 8096 ; the user. As we'll retrieve a dword per access, 8097 align 4, db 0 8098 hackints: 8099 .dummy22: dd 0 8100 .23: dd 0 8101 .24: dd 0 8102 .dummy25: dd 0 8103 %endif 8104 8105 8106 lockdrive: 8107 0000A107 50 push ax 8108 0000A108 53 push bx 8109 0000A109 51 push cx 8110 0000A10A 52 push dx 8111 0000A10B 88C3 mov bl, al 8112 0000A10D FEC3 inc bl 8113 0000A10F B700 mov bh, 0 8114 0000A111 B94A08 mov cx, 084Ah 8115 0000A114 BA0100 mov dx, 0001h 8116 0000A117 B80D44 mov ax, 440Dh 8117 0000A11A CD21 int 21h 8118 0000A11C 5A pop dx 8119 0000A11D 59 pop cx 8120 0000A11E 5B pop bx 8121 0000A11F 58 pop ax 8122 0000A120 C3 retn 8123 8124 unlockdrive: 8125 0000A121 50 push ax 8126 0000A122 53 push bx 8127 0000A123 51 push cx 8128 0000A124 52 push dx 8129 0000A125 88C3 mov bl, al 8130 0000A127 FEC3 inc bl 8131 0000A129 B700 mov bh, 0 8132 0000A12B B96A08 mov cx, 086Ah 8133 0000A12E BA0100 mov dx, 0001h 8134 0000A131 B80D44 mov ax, 440Dh 8135 0000A134 CD21 int 21h 8136 0000A136 5A pop dx 8137 0000A137 59 pop cx 8138 0000A138 5B pop bx 8139 0000A139 58 pop ax 8140 0000A13A C3 retn 8141 8142 8143 ; W command - write a program, or disk sectors, to disk. 8144 ww: 8145 %if _BOOTLDR 8146 0000A13B F606[9D00]40 testopt [internalflags], nodosloaded 8147 0000A140 7406 jz @F 8148 0000A142 BA[955F] mov dx, msg.nobootsupp 8149 0000A145 E95C1C jmp putsz 8150 @@: 8151 %endif 8152 8153 0000A148 E8EE05 call parselw ; parse L and W argument format 8154 0000A14B 747B jz ww4 ; if request to write program 8155 %if _PM && _NOEXTENDER 8156 0000A14D E87DF0 call ispm 8157 0000A150 7508 jnz .rm 8158 0000A152 E8EFF1 call isextenderavailable 8159 0000A155 7303E902F2 jc nodosextinst 8160 .rm: 8161 %endif 8162 0000A15A 36F606[9C00]06 testopt [ss:internalflags], newpacket| ntpacket 8163 0000A160 742F jz .oldint 8164 0000A162 88C2 mov dl, al ; A: = 0, ... 8165 0000A164 BE0160 mov si, 6001h ; write, assume "file data" 8166 %if _VDD 8167 0000A167 F606[9C00]04 testopt [internalflags], ntpacket 8168 0000A16C 7512 jnz .vdd 8169 %endif 8170 0000A16E FEC2 inc dl ; A: = 1, ... 8171 0000A170 E894FF call lockdrive 8172 0000A173 B80573 mov ax, 7305h ; ds:(e)bx-> packet 8173 0000A176 F9 stc 8174 0000A177 CD21 int 21h ; use int 21h here, not doscall 8175 0000A179 9C pushf 8176 0000A17A E8A4FF call unlockdrive 8177 0000A17D 9D popf 8178 0000A17E EB13 jmp short .done 8179 %if _VDD 8180 .vdd: 8181 0000A180 A1[B80A] mov ax, word [hVdd] 8182 0000A183 B90500 mov cx, 5 8183 %if _PM 8184 0000A186 020E[DA88] add cl, byte [dpmi32] 8185 %endif 8186 0000A18A C4C4580290 DispatchCall 8187 0000A18F EB02 jmp short .done 8188 %endif 8189 .oldint: 8190 0000A191 CD26 int 26h 8191 .done: 8192 0000A193 BA[A979] mov dx, writing 8193 ww1: 8194 0000A196 8CD3 mov bx, ss ; restore segment registers 8195 0000A198 8EDB mov ds, bx 8196 0000A19A 8B26[940A] mov sp, word [savesp] 8197 0000A19E 8EC3 mov es, bx 8198 0000A1A0 7323 jnc ww3 ; if no error 8199 0000A1A2 3C0C cmp al, 0Ch 8200 0000A1A4 7602 jbe ww2 ; if in range 8201 0000A1A6 B00C mov al, 0Ch 8202 ww2: 8203 0000A1A8 98 cbw ; ah = 0 8204 0000A1A9 BB[DA78] mov bx, dskerrs ; -> byte table 8205 0000A1AC D7 xlatb ; get offset from dskerrs 8206 0000A1AD 01D8 add ax, bx ; -> message 8207 0000A1AF BF[0E08] mov di, line_out 8208 0000A1B2 89C6 mov si, ax 8209 0000A1B4 E89817 call showstring 8210 0000A1B7 89D6 mov si, dx 8211 0000A1B9 E89317 call showstring 8212 0000A1BC BE[AF79] mov si, drive 8213 0000A1BF E88D17 call showstring 8214 0000A1C2 E86118 call putsline_crlf 8215 ww3: 8216 0000A1C5 E9385E jmp cmd3 ; can't return because Int26 leaves stack wrong 8217 8218 ; Write to file. First check the file extension. 8219 ; size of file is in client's BX:CX, 8220 ; default start address is DS:100h 8221 8222 ww4: 8223 0000A1C8 E8DD04 call InDos 8224 0000A1CB 7403E905F2 jnz not_while_indos 8225 8226 0000A1D0 A0[DF0B] mov al, byte [fileext] ; get flags of file extension 8227 0000A1D3 A80C test al, EXT_EXE + EXT_HEX 8228 0000A1D5 7405 jz ww5 ; if not EXE or HEX 8229 0000A1D7 BA[4B7D] mov dx, nowhexe 8230 0000A1DA EB07 jmp short ww6 8231 8232 ww5: 8233 0000A1DC 3C00 cmp al, 0 8234 0000A1DE 7506 jnz ww7 ; if extension exists 8235 0000A1E0 BA[717D] mov dx, nownull 8236 ww6: 8237 0000A1E3 E9D400 jmp ww16 8238 8239 ; File extension is OK; write it. First, create the file. 8240 ww7: 8241 %if _PM 8242 0000A1E6 E8E4EF call ispm 8243 0000A1E9 7506 jnz ww7_1 8244 0000A1EB BA[1A7C] mov dx, nopmsupp 8245 0000A1EE E9B31B jmp putsz 8246 ww7_1: 8247 %endif 8248 0000A1F1 BD[0E08] mov bp, line_out 8249 0000A1F4 80FEFE cmp dh, 0FEh 8250 0000A1F7 7207 jb ww8 ; if (dx < 0xFE00) 8251 0000A1F9 80EEFE sub dh, 0FEh ; dx -= 0xFE00; 8252 0000A1FC 81C3E00F add bx, 0FE0h 8253 ww8: 8254 0000A200 89560A mov word [bp+10], dx ; save lower part of address in line_out+10 8255 0000A203 89DE mov si, bx ; upper part goes into si 8256 0000A205 B43C mov ah, 3Ch ; create file 8257 0000A207 31C9 xor cx, cx ; no attributes 8258 0000A209 BA8000 mov dx, DTA 8259 doscall 2040 0000A20C E85ABB <1> call _doscall 8260 0000A20F 7303E97D00 jc ww15 ; if error 8261 0000A214 50 push ax ; save file handle 8262 8263 ; Print message about writing. 8264 0000A215 BA[947D] mov dx, wwmsg1 8265 0000A218 E8891B call putsz ; print string 8266 0000A21B A1[680C] mov ax, word [reg_ebx] 8267 0000A21E 83F810 cmp ax, 10h 8268 0000A221 7202 jb ww9 ; if not too large 8269 0000A223 31C0 xor ax, ax ; too large: zero it out 8270 ww9: 8271 0000A225 894608 mov word [bp+8], ax 8272 0000A228 85C0 test ax, ax 8273 0000A22A 7403 jz ww10 8274 0000A22C E8D117 call hexnyb 8275 ww10: 8276 0000A22F A1[6C0C] mov ax, word [reg_ecx] 8277 0000A232 894606 mov word [bp+6], ax 8278 0000A235 E8B617 call hexword 8279 0000A238 E8EF17 call putsline ; print size 8280 0000A23B BA[9D7D] mov dx, wwmsg2 8281 0000A23E E8631B call putsz ; print string 8282 8283 ; Now write the file. Size remaining is in line_out+6. 8284 0000A241 5B pop bx ; recover file handle 8285 0000A242 8B560A mov dx, word [bp+10] ; address to write from is si:dx 8286 ww11: 8287 0000A245 B800FE mov ax, 0FE00h 8288 0000A248 29D0 sub ax, dx 8289 0000A24A 807E0800 cmp byte [bp+8], 0 8290 0000A24E 7508 jnz ww12 ; if more than 0FE00h bytes remaining 8291 0000A250 3B4606 cmp ax, word [bp+6] 8292 0000A253 7203 jb ww12 ; ditto 8293 0000A255 8B4606 mov ax, word [bp+6] 8294 ww12: 8295 0000A258 91 xchg ax, cx ; mov cx, ax 8296 0000A259 8EDE mov ds, si 8297 0000A25B B440 mov ah, 40h ; write to file 8298 0000A25D CD21 int 21h ; use INT, not doscall 8299 0000A25F 16 push ss ; restore DS 8300 0000A260 1F pop ds 8301 0000A261 39C8 cmp ax, cx 8302 0000A263 7515 jne ww13 ; if disk full 8303 0000A265 31D2 xor dx, dx ; next time write from xxxx:0 8304 0000A267 81C6E00F add si, 0FE0h ; update segment pointer 8305 0000A26B 294E06 sub word [bp+6], cx 8306 0000A26E 9F lahf 8307 0000A26F 805E0800 sbb byte [bp+8], 0 8308 0000A273 75D0 jnz ww11 ; if more to go 8309 0000A275 9E sahf 8310 0000A276 75CD jnz ww11 ; ditto 8311 0000A278 EB12 jmp short ww14 ; done 8312 8313 ww13: 8314 0000A27A BA[A67D] mov dx, diskful 8315 0000A27D E8241B call putsz ; print string 8316 0000A280 E80900 call ww14 ; close file 8317 8318 0000A283 B441 mov ah, 41h ; unlink file 8319 0000A285 BA8000 mov dx, DTA 8320 doscall 2040 0000A288 E8DEBA <1> call _doscall 8321 0000A28B C3 retn 8322 8323 ; Close the file. 8324 ww14: 8325 0000A28C B43E mov ah, 3Eh ; close file 8326 0000A28E CD21 int 21h 8327 0000A290 C3 retn 8328 8329 ; Error opening file. This is also called by the load command. 8330 ww15: 8331 0000A291 83F802 cmp ax, byte 2 8332 0000A294 BA[CC7D] mov dx, doserr2 ; File not found 8333 0000A297 7421 je ww16 8334 0000A299 83F803 cmp ax, byte 3 8335 0000A29C BA[DD7D] mov dx, doserr3 ; Path not found 8336 0000A29F 7419 je ww16 8337 0000A2A1 83F805 cmp ax, byte 5 8338 0000A2A4 BA[EE7D] mov dx, doserr5 ; Access denied 8339 0000A2A7 7411 je ww16 8340 0000A2A9 83F808 cmp ax, byte 8 8341 0000A2AC BA[FE7D] mov dx, doserr8 ; Insufficient memory 8342 0000A2AF 7409 je ww16 8343 0000A2B1 BF[B87D] mov di, openerr1 8344 0000A2B4 E83717 call hexword 8345 0000A2B7 BA[B27D] mov dx, openerr ; Error ____ opening file 8346 ww16: 8347 0000A2BA E9E71A jmp putsz 8348 8349 8350 %ifn _EMS 8351 xx: equ error 8352 %else 8353 ; X commands - manipulate EMS memory. 8354 ; 8355 ; Reference: 8356 ; http://www.nondot.org/sabre/os/files/MemManagement/LIMEMS41.txt 8357 8358 0000A2BD 3C3F xx: cmp al, '?' 8359 0000A2BF 741F je xhelp ; if a call for help 8360 0000A2C1 0C20 or al, TOLOWER 8361 0000A2C3 3C61 cmp al, 'a' 8362 0000A2C5 7423 je xa ; if XA command 8363 0000A2C7 3C64 cmp al, 'd' 8364 0000A2C9 7446 je xd ; if XD command 8365 0000A2CB 3C6D cmp al, 'm' 8366 0000A2CD 7503E97E00 je xm ; if XM command 8367 0000A2D2 3C72 cmp al, 'r' 8368 0000A2D4 7459 je xr ; if XR command 8369 0000A2D6 3C73 cmp al, 's' 8370 0000A2D8 7503E9A900 je xs ; if XS command 8371 0000A2DD E9FC01 jmp error 8372 8373 0000A2E0 AC xhelp: lodsb 8374 0000A2E1 E81F16 call chkeol 8375 0000A2E4 BA[F75D] mov dx, msg.xhelp 8376 0000A2E7 E9BA1A jmp putsz ; print string and return 8377 8378 ; XA - Allocate EMS. 8379 0000A2EA E89201 xa: call emschk 8380 0000A2ED E82416 call skipcomma 8381 0000A2F0 E8DA14 call getword ; get argument into DX 8382 0000A2F3 E80D16 call chkeol ; expect end of line here 8383 0000A2F6 89D3 mov bx, dx 8384 8385 0000A2F8 B8005A mov ax, 5A00h ; use the EMS 4.0 version to alloc 0 pages 8386 0000A2FB 85DB test bx, bx 8387 0000A2FD 7402 jz short .nullcnt 8388 0000A2FF B443 mov ah, 43h ; allocate handle 8389 .nullcnt: 8390 0000A301 E83C01 call emscall 8391 0000A304 92 xchg ax, dx ; mov ax, dx 8392 0000A305 BF[0E7F] mov di, xaans1 8393 0000A308 E8E316 call hexword 8394 0000A30B BA[FD7E] mov dx, xaans 8395 0000A30E E9931A jmp putsz ; print string and return 8396 8397 ; XD - Deallocate EMS handle. 8398 0000A311 E86B01 xd: call emschk 8399 0000A314 E8FD15 call skipcomma 8400 0000A317 E8B314 call getword ; get argument into DX 8401 0000A31A E8E615 call chkeol ; expect end of line here 8402 8403 0000A31D B445 mov ah, 45h ; deallocate handle 8404 0000A31F E81E01 call emscall 8405 0000A322 92 xchg ax, dx ; mov ax,dx 8406 0000A323 BF[1C7F] mov di, xdans1 8407 0000A326 E8C516 call hexword 8408 0000A329 BA[157F] mov dx, xdans 8409 0000A32C E9751A jmp putsz ; print string and return 8410 8411 ; XR - Reallocate EMS handle. 8412 0000A32F E84D01 xr: call emschk 8413 0000A332 E8DF15 call skipcomma 8414 0000A335 E89514 call getword ; get handle argument into DX 8415 0000A338 89D3 mov bx, dx 8416 0000A33A E8D815 call skipcomm0 8417 0000A33D E88D14 call getword ; get count argument into DX 8418 0000A340 E8C015 call chkeol ; expect end of line here 8419 0000A343 87DA xchg bx, dx 8420 8421 0000A345 B451 mov ah, 51h ; reallocate handle 8422 0000A347 E8F600 call emscall 8423 0000A34A BA[2F7F] mov dx, xrans 8424 0000A34D E9541A jmp putsz ; print string and return 8425 8426 ; XM - Map EMS memory to physical page. 8427 0000A350 E82C01 xm: call emschk 8428 0000A353 E8BE15 call skipcomma 8429 0000A356 E87414 call getword ; get logical page (FFFFh means unmap) 8430 0000A359 89D3 mov bx, dx ; save it in BX 8431 0000A35B E8B715 call skipcomm0 8432 0000A35E E87A14 call getbyte ; get physical page (DL) 8433 0000A361 52 push dx 8434 0000A362 E8B015 call skipcomm0 8435 0000A365 E86514 call getword ; get handle into DX 8436 0000A368 E89815 call chkeol ; expect end of line 8437 0000A36B 58 pop ax ; recover physical page into AL 8438 0000A36C 50 push ax 8439 0000A36D B444 mov ah, 44h ; function 5 - map memory 8440 0000A36F E8CE00 call emscall 8441 0000A372 BF[517F] mov di, xmans1 8442 0000A375 93 xchg ax, bx ; mov ax, bx 8443 0000A376 E87516 call hexword 8444 0000A379 BF[6E7F] mov di, xmans2 8445 0000A37C 58 pop ax 8446 0000A37D E87516 call hexbyte 8447 0000A380 BA[447F] mov dx, xmans 8448 0000A383 E91E1A jmp putsz ; print string and return 8449 8450 ; XS - Print EMS status. 8451 xs: 8452 0000A386 E8F600 call emschk 8453 0000A389 AC lodsb 8454 0000A38A E87615 call chkeol ; no arguments allowed 8455 8456 ; First print out the handles and handle sizes. This can be done either 8457 ; by trying all possible handles or getting a handle table. 8458 ; The latter is preferable, if it fits in memory. 8459 0000A38D B44B mov ah, 4Bh ; function 12 - get handle count 8460 0000A38F E8AE00 call emscall 8461 0000A392 83FB42 cmp bx, (line_out_end-line_out)/4 8462 0000A395 762B jbe short xs3 ; if we can do it by getting the table 8463 0000A397 31D2 xor dx, dx ; handle 8464 8465 xs1: 8466 ; try EMS 4.0 function 5402h to get total number of handles 8467 0000A399 B80254 mov ax, 5402h 8468 0000A39C E8CB00 call emscall.witherrors 8469 0000A39F 89D9 mov cx, bx ; cx = number of handles 8470 0000A3A1 7403 jz @F 8471 8472 0000A3A3 B9FF00 mov cx, 0FFh ; total number of handles (assumed) 8473 ; this does not match the prior code here, 8474 ; which used 100h handles assuming that 8475 ; 0FFh is the last valid handle number. 8476 ; however, if we assume that there are 0FFh 8477 ; valid handles then the last number is 0FEh! 8478 @@: 8479 8480 0000A3A6 B44C mov ah, 4Ch ; function 13 - get handle pages 8481 0000A3A8 E8BF00 call emscall.witherrors 8482 0000A3AB 750D jnz short .err 8483 0000A3AD 93 xchg ax, bx ; mov ax,bx 8484 0000A3AE E8E200 call hndlshow 8485 .cont: 8486 0000A3B1 42 inc dx ; increment handle number to access 8487 0000A3B2 7404 jz @F ; (if 0000h handles, do not loop forever) 8488 0000A3B4 39CA cmp dx, cx ; end of the loop ? 8489 0000A3B6 72E1 jb short xs1 ; if more to be done --> 8490 @@: 8491 0000A3B8 EB1F jmp short xs5 ; done with this part 8492 8493 .err: 8494 0000A3BA 80FC83 cmp ah, 83h ; no such handle? 8495 0000A3BD 74F2 je short .cont ; just skip --> 8496 0000A3BF E98300 jmp emscall.errorhandle ; if other error --> 8497 8498 ; Get the information in tabular form. 8499 xs3: 8500 0000A3C2 B44D mov ah, 4Dh ; function 14 - get all handle pages 8501 0000A3C4 BF[0E08] mov di, line_out 8502 0000A3C7 E87600 call emscall 8503 0000A3CA 85DB test bx, bx 8504 0000A3CC 740B jz short xs5 8505 0000A3CE 89FE mov si, di 8506 xs4: 8507 0000A3D0 AD lodsw 8508 0000A3D1 92 xchg ax, dx 8509 0000A3D2 AD lodsw 8510 0000A3D3 E8BD00 call hndlshow 8511 0000A3D6 4B dec bx 8512 0000A3D7 75F7 jnz short xs4 ; if more to go 8513 8514 xs5: 8515 0000A3D9 BA[4574] mov dx, crlf 8516 0000A3DC E8C519 call putsz ; print string 8517 8518 ; Next print the mappable physical address array. 8519 ; The size of the array shouldn't be a problem. 8520 0000A3DF B80058 mov ax, 5800h ; function 25 - get mappable phys. address array 8521 0000A3E2 BF[0E08] mov di, line_out ; address to put array 8522 0000A3E5 E85800 call emscall 8523 0000A3E8 BA[F67F] mov dx, xsnopgs 8524 0000A3EB E328 jcxz xs7 ; NO mappable pages! 8525 8526 0000A3ED 89FE mov si, di 8527 xs6: 8528 0000A3EF 51 push cx 8529 0000A3F0 AD lodsw 8530 0000A3F1 BF[B27F] mov di, xsstr2b 8531 0000A3F4 E8F715 call hexword 8532 0000A3F7 AD lodsw 8533 0000A3F8 BF[A57F] mov di, xsstr2a 8534 0000A3FB E8F715 call hexbyte 8535 0000A3FE BA[9A7F] mov dx, xsstr2 8536 0000A401 E8A019 call putsz ; print string 8537 0000A404 59 pop cx ; end of loop 8538 0000A405 F6C101 test cl, 1 8539 0000A408 7406 jz short xs_nonl 8540 0000A40A BA[4574] mov dx, crlf ; blank line 8541 0000A40D E89419 call putsz ; print string 8542 xs_nonl: 8543 0000A410 E2DD loop xs6 8544 0000A412 BA[4574] mov dx, crlf ; blank line 8545 xs7: 8546 0000A415 E88C19 call putsz ; print string 8547 8548 ; Finally, print the cumulative totals. 8549 0000A418 B442 mov ah, 42h ; function 3 - get unallocated page count 8550 0000A41A E82300 call emscall 8551 0000A41D 89D0 mov ax, dx ; total pages available 8552 0000A41F 29D8 sub ax, bx ; number of pages allocated 8553 0000A421 BB[EC7F] mov bx, xsstrpg 8554 0000A424 E88300 call sumshow ; print the line 8555 0000A427 B44B mov ah, 4Bh ; function 12 - get handle count 8556 0000A429 E81400 call emscall 8557 0000A42C 53 push bx ; number of handles allocated 8558 8559 ; try EMS 4.0 function 5402h to get total number of handles 8560 0000A42D B80254 mov ax, 5402h 8561 0000A430 E83700 call emscall.witherrors ; don't use emscall, this function may fail! 8562 0000A433 89DA mov dx, bx 8563 0000A435 7403 jz @F 8564 8565 0000A437 BAFF00 mov dx, 0FFh ; total number of handles 8566 @@: 8567 0000A43A 58 pop ax ; ax = number of handles allocated 8568 0000A43B BB[F07F] mov bx, xsstrhd 8569 0000A43E EB6A jmp sumshow ; print the line 8570 8571 ; Call EMS 8572 emscall: 8573 0000A440 E82700 call .witherrors 8574 0000A443 7439 jz short .ret ; return if OK 8575 .errorhandle: 8576 0000A445 88E0 mov al, ah 8577 0000A447 3C8B cmp al, 8Bh 8578 0000A449 7F0D jg short .ce2 ; if out of range (signed comparison intended) 8579 0000A44B 98 cbw 8580 0000A44C 89C3 mov bx, ax 8581 0000A44E D1E3 shl bx, 1 8582 0000A450 8B97[DA7F] mov dx, word [emserrs+100h+bx] 8583 0000A454 85D2 test dx, dx 8584 0000A456 7538 jnz short .ce4 ; if there's a word there 8585 .ce2: 8586 0000A458 BA[F27E] mov dx, emserrx 8587 0000A45B E84619 call putsz 8588 0000A45E BF[0E08] mov di, line_out 8589 0000A461 E89115 call hexbyte 8590 0000A464 E8BF15 call putsline_crlf 8591 0000A467 E9965B jmp cmd3 ; quit 8592 8593 .witherrors: 8594 %if _PM 8595 0000A46A E860ED call ispm 8596 0000A46D 750B jnz short .rm 8597 subcpu 286 8598 0000A46F 36FF36[A60A] push word [ss:pspdbg] 8599 0000A474 6A67 push 67h 8600 0000A476 E8A0EE call intcall 8601 0000A479 A9 db __TEST_IMM16 ; (skip int opcode) 8602 subcpureset 8603 .rm: 8604 %endif 8605 0000A47A CD67 int 67h 8606 0000A47C 84E4 test ah, ah 8607 .ret: 8608 emschk.ret: 8609 0000A47E C3 retn 8610 8611 8612 ; Check for EMS 8613 ; maybe should disable this while bootloaded ? 8614 emschk: 8615 0000A47F B067 mov al, 67h 8616 0000A481 E8042D call intchk ; ZR if offset = -1 or segment = 0 8617 ; CHG: ax, dx, bx 8618 0000A484 7407 jz .failed 8619 0000A486 B446 mov ah, 46h 8620 0000A488 E8DFFF call emscall.witherrors ; get version 8621 0000A48B 74F1 jz short .ret ; success --> 8622 .failed: 8623 0000A48D BA[147E] mov dx, emsnot 8624 emscall.ce4: 8625 0000A490 E9DA5F jmp prnquit ; otherwise abort with message --> 8626 8627 ; HNDLSHOW - Print XS line giving the handle and pages allocated. 8628 ; 8629 ; Entry DX Handle 8630 ; AX Number of pages 8631 ; 8632 ; Exit Line printed 8633 ; 8634 ; Uses ax, di 8635 hndlshow: 8636 0000A493 BF[837F] mov di, xsstr1b 8637 0000A496 E85515 call hexword 8638 0000A499 89D0 mov ax, dx 8639 0000A49B BF[7A7F] mov di, xsstr1a 8640 0000A49E E84D15 call hexword 8641 0000A4A1 52 push dx 8642 0000A4A2 BA[737F] mov dx, xsstr1 8643 0000A4A5 E8FC18 call putsz ; print string 8644 0000A4A8 5A pop dx 8645 0000A4A9 C3 retn 8646 8647 ; SUMSHOW - Print summary line for XS command. 8648 ; 8649 ; Entry AX Number of xxxx's that have been used 8650 ; DX Total number of xxxx's 8651 ; BX Name of xxxx 8652 ; 8653 ; Exit String printed 8654 ; 8655 ; Uses AX, CX, DX, DI 8656 sumshow: 8657 0000A4AA BF[B97F] mov di, xsstr3 8658 0000A4AD 57 push di 8659 0000A4AE E81600 call trimhex 8660 0000A4B1 92 xchg ax, dx ; mov ax,dx 8661 0000A4B2 BF[C97F] mov di, xsstr3a 8662 0000A4B5 E80F00 call trimhex 8663 0000A4B8 5A pop dx ; mov dx,xsstr3 8664 0000A4B9 E8E818 call putsz ; print string 8665 0000A4BC 89DA mov dx, bx 8666 0000A4BE E8E318 call putsz ; print string 8667 0000A4C1 BA[D37F] mov dx, xsstr4 8668 0000A4C4 E9DD18 jmp putsz ; print string and return 8669 8670 ; TRIMHEX - Print word without leading zeroes. 8671 ; 8672 ; Entry AX Number to print 8673 ; DI Where to print it 8674 ; 8675 ; Uses AX, CX, DI. 8676 trimhex: 8677 0000A4C7 E82415 call hexword 8678 0000A4CA 83EF04 sub di, 4 ; back up DI to start of word 8679 0000A4CD B90300 mov cx, 3 8680 0000A4D0 B030 mov al, '0' 8681 .loop: 8682 0000A4D2 AE scasb 8683 0000A4D3 7506 jne .done ; return if not a '0' 8684 0000A4D5 C645FF20 mov byte [di-1], ' ' 8685 0000A4D9 E2F7 loop .loop 8686 .done: 8687 0000A4DB C3 retn 8688 %endif ; _EMS 8689 8690 ; Error handlers. 8691 error: 8692 0000A4DC 16 push ss 8693 0000A4DD 07 pop es 8694 0000A4DE 16 push ss 8695 0000A4DF 1F pop ds 8696 0000A4E0 89F1 mov cx, si 8697 0000A4E2 81E9[0300] sub cx, line_in+3 8698 0000A4E6 81F90001 cmp cx, 256 8699 0000A4EA 7705 ja .invalid 8700 0000A4EC 030E[EA0A] add cx, word [promptlen]; number of spaces to skip 8701 0000A4F0 A9 db __TEST_IMM16 ; (skip xor) 8702 .invalid: 8703 0000A4F1 31C9 xor cx, cx ; if we're really messed up 8704 0000A4F3 8B26[9E0A] mov sp, [throwsp] 8705 0000A4F7 FF26[9C0A] jmp near [throwret] 8706 ; INP: cx = number of spaces to indent 8707 8708 ; This is the default address in throwret. 8709 ; Display the error, then jump to errret. 8710 errhandler: 8711 0000A4FB E84E23 call get_columns ; ax = columns 8712 .: 8713 0000A4FE 29C1 sub cx, ax 8714 0000A500 73FC jnc . 8715 0000A502 01C1 add cx, ax 8716 0000A504 7407 jz err2 8717 0000A506 B020 mov al, 32 8718 .loop: 8719 0000A508 E8BC18 call putc 8720 0000A50B E2FB loop .loop 8721 err2: 8722 0000A50D BA[3D74] mov dx, errcarat 8723 0000A510 E89118 call putsz ; print string 8724 0000A513 B8FF01 mov ax, 01FFh 8725 0000A516 E80A00 call setrc 8726 0000A519 C706[DC0B][E003] mov word [lastcmd], dmycmd 8727 ; cancel command repetition 8728 0000A51F FF26[9A0A] jmp near [errret] ; return to the prompt (cmd3, aa01) 8729 8730 8731 setrc: 8732 0000A523 833E[F00A]00 cmp word [rc], 0 8733 0000A528 7503 jne .ret 8734 0000A52A A3[F00A] mov word [rc], ax 8735 .ret: 8736 0000A52D C3 retn 8737 8738 8739 ; Terminate the attached process, if any 8740 ; 8741 ; OUT: NZ if now no process attached 8742 ; ZR if still a process attached, 8743 ; ie we failed to terminate this one 8744 terminate_attached_process: 8745 0000A52E F606[9E00]80 testopt [internalflags], attachedterm 8746 0000A533 7535 jnz @F 8747 8748 0000A535 8026[A10C]FC clropt [reg_efl], 300h ; clear TF and IF 8749 0000A53A 8C0E[900C] mov word [reg_cs], cs 8750 0000A53E C706[9C0C][169C] mov word [reg_eip], terminate_00 8751 0000A544 50 push ax ; (dummy to take space for return address) 8752 0000A545 8C16[8C0C] mov word [reg_ss], ss 8753 0000A549 8926[740C] mov word [reg_esp], sp ; save current ss:sp 8754 0000A54D 58 pop ax ; (discard) 8755 0000A54E 31C0 xor ax, ax 8756 0000A550 A3[9E0C] mov word [reg_eip+2], ax 8757 0000A553 A3[760C] mov word [reg_esp+2], ax 8758 %if _PM 8759 0000A556 A3[880C] mov word [reg_es], ax 8760 0000A559 A3[840C] mov word [reg_ds], ax 8761 0000A55C A3[940C] mov word [reg_fs], ax 8762 0000A55F A3[980C] mov word [reg_gs], ax ; insure valid segregs in PM 8763 %endif 8764 0000A562 E8469D call run 8765 ; The dummy stack space above is to hold the return address 8766 ; of this call. The debugger stack is used by this run. 8767 8768 0000A565 F606[9E00]80 testopt [internalflags], attachedterm 8769 @@: 8770 0000A56A C3 retn 8771 8772 8773 ;--- this is called by "run" 8774 ;--- better don't use INTs inside 8775 ;--- set debuggee's INT 23/24 8776 8777 ; Low-level functions to reset to debuggee's interrupt vectors 23h/24h 8778 ; INP: - 8779 ; OUT: - 8780 ; CHG: bx, (e)dx, cx, ax 8781 ; STT: ds = our segment 8782 ; Do not use Int21, even if not in InDOS mode 8783 setint2324: 8784 %if _BOOTLDR 8785 0000A56B F606[9D00]40 testopt [internalflags], nodosloaded 8786 0000A570 751C jnz .ret ; don't touch int23/24 --> 8787 %endif 8788 %if _PM 8789 0000A572 E858EC call ispm 8790 0000A575 7418 jz .pm 8791 %endif 8792 0000A577 06 push es 8793 0000A578 57 push di 8794 0000A579 56 push si 8795 8796 0000A57A 31FF xor di, di 8797 0000A57C 8EC7 mov es, di 8798 0000A57E BF8C00 mov di, 23h *4 8799 0000A581 BE[A80A] mov si, run2324 8800 0000A584 A5 movsw 8801 0000A585 A5 movsw 8802 0000A586 A5 movsw 8803 0000A587 A5 movsw 8804 8805 %if _PM 8806 0000A588 E88C2F call hook2F 8807 %endif 8808 0000A58B 5E pop si 8809 0000A58C 5F pop di 8810 0000A58D 07 pop es 8811 .ret: 8812 0000A58E C3 retn 8813 %if _PM 8814 .pm: 8815 0000A58F 56 push si 8816 0000A590 BE[A80A] mov si, run2324 8817 0000A593 BB2302 mov bx, 0223h 8818 .loop: 8819 0000A596 66 _386_o32 ; mov edx, dword [si+0] 8820 0000A597 8B14 mov dx, word [si+0] 8821 0000A599 8B4C04 mov cx, word [si+4] 8822 0000A59C B80502 mov ax, 0205h 8823 0000A59F CD31 int 31h 8824 0000A5A1 83C606 add si, 6 8825 0000A5A4 FEC3 inc bl 8826 0000A5A6 FECF dec bh 8827 0000A5A8 75EC jnz .loop 8828 0000A5AA 5E pop si 8829 0000A5AB C3 retn 8830 %endif 8831 8832 ; Low-level functions to save debuggee's interrupt vectors 23h/24h 8833 ; and set our interrupt vectors instead 8834 ; INP: - 8835 ; OUT: - 8836 ; CHG: - 8837 ; STT: ds = our segment 8838 ; Do not use Int21, even if not in InDOS mode 8839 getint2324: 8840 %if _BOOTLDR 8841 0000A5AC F606[9D00]40 testopt [internalflags], nodosloaded 8842 0000A5B1 752A jnz .ret ; don't touch int23/24 --> 8843 %endif 8844 %if _PM 8845 0000A5B3 E817EC call ispm 8846 0000A5B6 7426 jz .pm 8847 %endif 8848 0000A5B8 56 push si 8849 0000A5B9 57 push di 8850 0000A5BA 06 push es 8851 8852 0000A5BB 1E push ds 8853 0000A5BC 07 pop es 8854 0000A5BD 31FF xor di, di 8855 0000A5BF 8EDF mov ds, di 8856 0000A5C1 BF[A80A] mov di, run2324 8857 0000A5C4 BE8C00 mov si, 23h *4 8858 0000A5C7 56 push si 8859 0000A5C8 A5 movsw ; save interrupt vector 23h 8860 0000A5C9 A5 movsw 8861 0000A5CA A5 movsw ; save interrupt vector 24h 8862 0000A5CB A5 movsw 8863 0000A5CC 5F pop di 8864 0000A5CD 06 push es 8865 0000A5CE 1F pop ds 8866 0000A5CF 31F6 xor si, si 8867 0000A5D1 8EC6 mov es, si 8868 0000A5D3 BE0E00 mov si, CCIV 8869 0000A5D6 A5 movsw 8870 0000A5D7 A5 movsw 8871 0000A5D8 A5 movsw 8872 0000A5D9 A5 movsw 8873 8874 0000A5DA 07 pop es 8875 0000A5DB 5F pop di 8876 0000A5DC 5E pop si 8877 .ret: 8878 0000A5DD C3 retn 8879 %if _PM 8880 subcpu 286 8881 .pm: 8882 0000A5DE 66 _386_o32 8883 0000A5DF 60 pusha 8884 0000A5E0 BF[A80A] mov di, run2324 8885 0000A5E3 BB2302 mov bx, 0223h 8886 .loop: 8887 0000A5E6 B80402 mov ax, 0204h 8888 0000A5E9 CD31 int 31h 8889 0000A5EB 66 _386_o32 ; mov dword [di+0], edx 8890 0000A5EC 8915 mov word [di+0], dx 8891 0000A5EE 894D04 mov word [di+4], cx 8892 0000A5F1 83C706 add di, byte 6 8893 0000A5F4 FEC3 inc bl 8894 0000A5F6 FECF dec bh 8895 0000A5F8 75EC jnz .loop 8896 %if _ONLYNON386 8897 db __TEST_IMM8 ; (skip pusha) 8898 %else 8899 0000A5FA A9 db __TEST_IMM16 ; (skip pushad) 8900 %endif 8901 8902 restoredbgi2324: 8903 setdbgi2324: 8904 0000A5FB 66 _386_o32 8905 0000A5FC 60 pusha 8906 0000A5FD BE[B40A] mov si, dbg2324 8907 0000A600 BB2302 mov bx, 0223h 8908 0000A603 6631D2 _386 xor edx, edx 8909 .loop: 8910 0000A606 AD lodsw 8911 0000A607 89C2 mov dx, ax 8912 0000A609 8B0E[D688] mov cx, word [cssel] 8913 0000A60D B80502 mov ax, 0205h 8914 0000A610 CD31 int 31h 8915 0000A612 FEC3 inc bl 8916 0000A614 FECF dec bh 8917 0000A616 75EE jnz .loop 8918 0000A618 66 _386_o32 8919 0000A619 61 popa 8920 0000A61A C3 retn 8921 subcpureset 8922 %endif 8923 8924 %if 0 8925 The next three subroutines concern the handling of Int23 and 24. 8926 These interrupt vectors are saved and restored when running the 8927 child process, but are not active when DEBUG itself is running. 8928 It is still useful for the programmer to be able to check where Int23 8929 and 24 point, so these values are copied into the interrupt table 8930 during parts of the C, D, (DX, DI,) E, M, and S commands, so that 8931 they appear to be in effect. The E command also copies these values 8932 back. 8933 8934 Between calls to dohack and unhack, there should be no calls to DOS, 8935 so that there is no possibility of these vectors being used when 8936 DEBUG itself is running. 8937 8938 ; As long as no DOS is loaded anyway, Int23 and Int24 won't be touched 8939 by us, so the whole hack is unnecessary and will be skipped. 8940 %endif 8941 8942 ; PREPHACK - Set up for interrupt vector substitution. 8943 ; Entry es = cs 8944 prephack: 8945 0000A61B 803E[C40A]00 cmp byte [hakstat], 0 8946 0000A620 7509 jne .err ; if hack status error --> 8947 0000A622 57 push di 8948 0000A623 BF[BC0A] mov di, sav2324 ; debugger's Int2324 8949 0000A626 E80B00 call prehak1 8950 0000A629 5F pop di 8951 0000A62A C3 retn 8952 8953 .err: 8954 0000A62B 52 push dx 8955 0000A62C BA[FE7C] mov dx, ph_msg 8956 0000A62F E87217 call putsz ; display error 8957 0000A632 5A pop dx 8958 0000A633 C3 retn 8959 8960 ; INP: di-> saved interrupt vectors 8961 ; OUT: - 8962 ; CHG: - 8963 prehak1: 8964 %if _PM 8965 0000A634 E896EB call ispm 8966 0000A637 740F jz .pm ; nothing to do 8967 %endif 8968 0000A639 1E push ds 8969 0000A63A 56 push si 8970 0000A63B 31F6 xor si, si 8971 0000A63D 8EDE mov ds, si 8972 0000A63F BE8C00 mov si, 23h *4 8973 0000A642 A5 movsw 8974 0000A643 A5 movsw 8975 0000A644 A5 movsw 8976 0000A645 A5 movsw 8977 0000A646 5E pop si 8978 0000A647 1F pop ds 8979 .pm: 8980 0000A648 C3 retn 8981 8982 8983 ; DOHACK - Fake the interrupt vectors 23h and 24h to debuggee's 8984 ; UNHACK - Restore interrupt vectors 23h and 24h to our values 8985 ; It's OK to do either of these twice in a row. 8986 ; In particular, the S command may do unhack twice in a row. 8987 ; INP: ds = our segment 8988 ; OUT: es = our segment 8989 ; CHG: - 8990 ; STT: Do not use Int21 8991 dohack: 8992 0000A649 16 push ss 8993 0000A64A 07 pop es 8994 %if _BOOTLDR 8995 0000A64B F606[9D00]40 testopt [internalflags], nodosloaded 8996 0000A650 7555 jnz unhack.ret ; nothing to hack --> 8997 %endif 8998 0000A652 56 push si 8999 0000A653 C606[C40A]01 mov byte [hakstat], 1 9000 0000A658 BE[A80A] mov si, run2324 ; debuggee's interrupt vectors 9001 %if _PM 9002 0000A65B E86FEB call ispm 9003 0000A65E 7537 jnz unhack.common 9004 subcpu 286 9005 0000A660 66 _386_o32 9006 0000A661 60 pusha 9007 0000A662 BB2302 mov bx, 0223h 9008 .pm_loop: 9009 0000A665 66 _386_o32 9010 0000A666 8B14 mov dx, word [si+0+0] 9011 0000A668 8B4C04 mov cx, word [si+0+4] 9012 0000A66B B80502 mov ax, 205h 9013 0000A66E CD31 int 31h 9014 0000A670 83C606 add si, byte 6 9015 0000A673 FEC3 inc bl 9016 0000A675 FECF dec bh 9017 0000A677 75EC jnz .pm_loop 9018 0000A679 66 _386_o32 9019 0000A67A 61 popa 9020 0000A67B 5E pop si 9021 0000A67C C3 retn 9022 subcpureset 9023 %else 9024 jmp short unhack.common 9025 %endif 9026 9027 unhack: 9028 0000A67D 16 push ss 9029 0000A67E 07 pop es 9030 %if _BOOTLDR 9031 0000A67F F606[9D00]40 testopt [internalflags], nodosloaded 9032 0000A684 7521 jnz .ret ; nothing to hack --> 9033 %endif 9034 0000A686 C606[C40A]00 mov byte [hakstat], 0 9035 %if _PM 9036 0000A68B E83FEB call ispm 9037 0000A68E 7503E968FF jz restoredbgi2324 9038 %endif 9039 0000A693 56 push si 9040 0000A694 BE[BC0A] mov si, sav2324 ; debugger's interrupt vectors 9041 .common: 9042 0000A697 57 push di 9043 0000A698 06 push es 9044 0000A699 31FF xor di, di 9045 0000A69B 8EC7 mov es, di 9046 0000A69D BF8C00 mov di, 23h *4 9047 0000A6A0 A5 movsw 9048 0000A6A1 A5 movsw 9049 0000A6A2 A5 movsw 9050 0000A6A3 A5 movsw 9051 0000A6A4 07 pop es 9052 0000A6A5 5F pop di 9053 0000A6A6 5E pop si 9054 .ret: 9055 0000A6A7 C3 retn 9056 9057 9058 ; OUT: NZ if InDOS mode 9059 ; ZR if not 9060 ; CHG: - 9061 ; STT: ss = ds 9062 InDos: 9063 %if _BOOTLDR 9064 0000A6A8 F606[9D00]40 testopt [internalflags], nodosloaded 9065 0000A6AD 7517 jnz .return ; always "in DOS" --> 9066 %endif 9067 0000A6AF F606[7C00]08 testopt [options], fakeindos 9068 0000A6B4 7510 jnz .return ; faking InDOS on anyway --> 9069 .real_indos: 9070 0000A6B6 1E push ds 9071 0000A6B7 56 push si 9072 0000A6B8 BE[D40A] mov si, pInDOS + so16aSegSel 9073 0000A6BB E80900 call update_dosdata_segment 9074 0000A6BE C574FE lds si, [si - so16aSegSel] 9075 0000A6C1 803C00 cmp byte [si], 0 9076 0000A6C4 5E pop si 9077 0000A6C5 1F pop ds 9078 .return: 9079 0000A6C6 C3 retn 9080 9081 9082 ; INP: si -> word seg or sel, word segment, word selector 9083 update_dosdata_segment: 9084 0000A6C7 F606[A300]20 testopt [internalflags2], dif2_int31_segment 9085 0000A6CC 742C jz .ret 9086 0000A6CE 52 push dx 9087 0000A6CF 50 push ax 9088 0000A6D0 53 push bx 9089 0000A6D1 B031 mov al, 31h 9090 0000A6D3 E8792A call get_86m_interrupt_handler_no_dos 9091 %if _PM 9092 0000A6D6 395402 cmp word [si + soaSegment], dx 9093 0000A6D9 7419 je @F 9094 9095 0000A6DB E8EFEA call ispm 9096 0000A6DE 750E jnz .realmode 9097 9098 0000A6E0 89D3 mov bx, dx 9099 0000A6E2 B80200 mov ax, 0002h 9100 0000A6E5 CD31 int 31h 9101 9102 0000A6E7 8904 mov word [si + soaSegSel], ax 9103 0000A6E9 894404 mov word [si + soaSelector], ax 9104 0000A6EC EB06 jmp @F 9105 9106 .realmode: 9107 0000A6EE 8914 mov word [si + soaSegSel], dx 9108 0000A6F0 83640400 and word [si + soaSelector], 0 9109 9110 @@: 9111 0000A6F4 895402 mov word [si + soaSegment], dx 9112 0000A6F7 5B pop bx 9113 0000A6F8 58 pop ax 9114 %else 9115 pop bx 9116 pop ax 9117 mov word [si + soaSegSel], dx 9118 %endif 9119 0000A6F9 5A pop dx 9120 .ret: 9121 0000A6FA C3 retn 9122 9123 9124 ; PARSECM - Parse command line for C and M commands. 9125 ; Entry AL First nonwhite character of parameters 9126 ; SI Address of the character after that 9127 ; Exit DS:ESI Address from first parameter 9128 ; ES:EDI Address from second parameter 9129 ; ECX Length of address range minus one 9130 ; [bAddr32] Set if any high word non-zero 9131 9132 parsecm: 9133 0000A6FB E81DFF call prephack 9134 0000A6FE 8B1E[840C] mov bx, word [reg_ds] ; get source range 9135 0000A702 31C9 xor cx, cx 9136 0000A704 E83101 call getrange ; get address range into bx:(e)dx bx:(e)cx 9137 0000A707 53 push bx ; save segment first address 9138 0000A708 E80A12 call skipcomm0 9139 0000A70B 8B1E[840C] mov bx, word [reg_ds] 9140 0000A70F 66 _386_PM_o32 ; sub ecx, edx 9141 0000A710 29D1 sub cx, dx ; number of bytes minus one 9142 0000A712 66 _386_PM_o32 ; push edx 9143 0000A713 52 push dx 9144 0000A714 66 _386_PM_o32 ; push ecx 9145 0000A715 51 push cx 9146 %if _PM 9147 0000A716 8A0E[DC88] mov cl, byte [bAddr32] 9148 0000A71A 51 push cx 9149 0000A71B E8F101 call getaddr ; get destination address into bx:edx 9150 0000A71E 59 pop cx 9151 0000A71F 080E[DC88] or byte [bAddr32], cl ; if either is 32-bit, handle both as 32-bit 9152 %else 9153 call getaddr ; get destination address into bx:dx 9154 %endif 9155 0000A723 66 _386_PM_o32 9156 0000A724 59 pop cx ; pop ecx 9157 0000A725 66 _386_PM_o32 ; mov edi, edx 9158 0000A726 89D7 mov di, dx 9159 0000A728 66 _386_PM_o32 9160 0000A729 01CA add dx, cx ; add edx, ecx 9161 0000A72B 7209 jc short errorj7 ; if it wrapped around 9162 0000A72D E8D311 call chkeol ; expect end of line 9163 0000A730 8EC3 mov es, bx 9164 0000A732 66 _386_PM_o32 ; pop esi 9165 0000A733 5E pop si 9166 0000A734 1F pop ds 9167 0000A735 C3 retn 9168 9169 errorj7: 9170 0000A736 E9A3FD jmp error 9171 9172 ; PARSELW - Parse command line for L and W commands. 9173 ; 9174 ; Entry AL First nonwhite character of parameters 9175 ; SI Address of the character after that 9176 ; 9177 ; Exit If there is at most one argument (program load/write), then the 9178 ; zero flag is set, and registers are set as follows: 9179 ; bx:(e)dx Transfer address 9180 ; 9181 ; If there are more arguments (absolute disk read/write), then the 9182 ; zero flag is clear, and registers are set as follows: 9183 ; 9184 ; DOS versions prior to 3.31: 9185 ; AL Drive number 9186 ; CX Number of sectors to read 9187 ; DX Beginning logical sector number 9188 ; DS:BX Transfer address 9189 ; 9190 ; Later DOS versions: 9191 ; AL Drive number 9192 ; BX Offset of packet 9193 ; CX 0FFFFh 9194 9195 usesection lDEBUG_DATA_ENTRY 9196 align 4, db 0 9197 00009060 00000000 packet: dd 0 ; sector number 9198 00009064 0000 dw 0 ; number of sectors to read 9199 00009066 00000000 dd 0 ; transfer address Segm:OOOO 9200 %if _PM 9201 0000906A 0000 dw 0 ; transfer address might be Segm:OOOOOOOO! 9202 %endif 9203 9204 usesection lDEBUG_CODE 9205 parselw: 9206 0000A739 8B1E[900C] mov bx, word [reg_cs] ; default segment 9207 0000A73D 6631D2 _386 xor edx, edx 9208 0000A740 BA0001 mov dx, 100h ; default offset 9209 0000A743 E8A811 call iseol? 9210 0000A746 7468 je plw2 ; if no arguments 9211 0000A748 E8C401 call getaddr ; get buffer address into bx:(e)dx 9212 0000A74B E8C711 call skipcomm0 9213 0000A74E E89D11 call iseol? 9214 0000A751 745D je plw2 ; if only one argument 9215 0000A753 53 push bx ; save segment 9216 0000A754 52 push dx ; save offset 9217 0000A755 BB8000 mov bx, 80h ; max number of sectors to read 9218 0000A758 F7DA neg dx 9219 0000A75A 7406 jz plw1 ; if address is zero 9220 0000A75C B109 mov cl, 9 9221 0000A75E D3EA shr dx, cl ; max number of sectors which can be read 9222 0000A760 89D7 mov di, dx 9223 plw1: 9224 0000A762 803C3A cmp byte [si], ':' ; drive letter specification ? 9225 0000A765 750F jne @F ; no --> 9226 9227 0000A767 50 push ax 9228 0000A768 E8A8E4 call uppercase 9229 0000A76B 2C41 sub al, 'A' 9230 0000A76D 3C20 cmp al, 32 ; valid drive ? 9231 0000A76F 88C2 mov dl, al ; put drive number 9232 0000A771 46 inc si ; -> past the colon 9233 0000A772 58 pop ax 9234 0000A773 7205 jb @FF ; got it --> 9235 0000A775 4E dec si ; -> at colon 9236 9237 @@: 9238 0000A776 E86210 call getbyte ; get drive number (DL) 9239 0000A779 A8 db __TEST_IMM8 ; (skip lodsb) 9240 @@: 9241 0000A77A AC lodsb 9242 0000A77B E89711 call skipcomm0 9243 0000A77E 52 push dx 9244 0000A77F 80C241 add dl, 'A' 9245 0000A782 8816[B979] mov byte [driveno], dl 9246 0000A786 E85E0B call getdword ; get relative sector number 9247 0000A789 E88911 call skipcomm0 9248 0000A78C 53 push bx ; save sector number high 9249 0000A78D 52 push dx ; save sector number low 9250 0000A78E 56 push si ; in case we find an error 9251 0000A78F E83B10 call getword ; get sector count 9252 0000A792 4A dec dx 9253 0000A793 39FA cmp dx, di 9254 0000A795 739F jae errorj7 ; if too many sectors 9255 0000A797 42 inc dx 9256 0000A798 89D1 mov cx, dx 9257 0000A79A E86611 call chkeol ; expect end of line 9258 0000A79D F606[9C00]07 testopt [internalflags], oldpacket| newpacket| ntpacket 9259 0000A7A2 750D jnz plw3 ; if using a packet --> 9260 0000A7A4 5E pop si ; in case of error 9261 0000A7A5 5A pop dx ; get LoWord starting logical sector number 9262 0000A7A6 5B pop bx ; get HiWord 9263 0000A7A7 85DB test bx, bx ; just a 16-bit sector number possible 9264 0000A7A9 758B jnz errorj7 ; if too big 9265 0000A7AB 58 pop ax ; drive number 9266 0000A7AC 5B pop bx ; transfer buffer ofs 9267 0000A7AD 1F pop ds ; transfer buffer seg 9268 0000A7AE 85C9 test cx, cx ; NZ 9269 plw2: 9270 0000A7B0 C3 retn 9271 9272 ; disk I/O packet for Int25/Int26, Int21.7305, VDD 9273 plw3: 9274 0000A7B1 5B pop bx ; discard si 9275 0000A7B2 BB[6090] mov bx, packet 9276 0000A7B5 8F07 pop word [bx+0] ; LoWord sector number 9277 0000A7B7 8F4702 pop word [bx+2] ; HiWord sector number 9278 0000A7BA 894F04 mov word [bx+4], cx ; number of sectors 9279 0000A7BD 58 pop ax ; drive number 9280 0000A7BE 8F4706 pop word [bx+6] ; transfer address ofs 9281 0000A7C1 5A pop dx 9282 0000A7C2 31C9 xor cx, cx 9283 %if _PM 9284 0000A7C4 E806EA call ispm 9285 0000A7C7 751B jnz plw3_1 9286 0000A7C9 803E[DA88]00 cmp byte [dpmi32], 0 9287 0000A7CE 7414 jz plw3_1 9288 [cpu 386] 9289 0000A7D0 89570A mov word [bx+10], dx ; save segment of transfer buffer 9290 0000A7D3 660FB7DB movzx ebx, bx 9291 0000A7D7 66C1EA10 shr edx, 16 ; get HiWord(offset) 9292 0000A7DB 803E[DC88]01 cmp byte [bAddr32], 1 9293 0000A7E0 7402 jz plw3_1 9294 0000A7E2 31D2 xor dx, dx 9295 __CPU__ 9296 plw3_1: 9297 %endif 9298 0000A7E4 895708 mov word [bx+8], dx ; transfer address seg 9299 0000A7E7 49 dec cx ; NZ and make cx = -1 9300 0000A7E8 C3 retn 9301 9302 9303 %include "expr.asm" 9304 <1> 9305 <1> %if 0 9306 <1> 9307 <1> lDebug expression evaluator 9308 <1> 9309 <1> Copyright (C) 1995-2003 Paul Vojta 9310 <1> Copyright (C) 2008-2012 C. Masloch 9311 <1> 9312 <1> Usage of the works is permitted provided that this 9313 <1> instrument is retained with the works, so that any entity 9314 <1> that uses the works is notified of this instrument. 9315 <1> 9316 <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 9317 <1> 9318 <1> %endif 9319 <1> 9320 <1> 9321 <1> usesection lDEBUG_CODE 9322 <1> 9323 <1> ;--- get a valid offset for segment in BX 9324 <1> 9325 <1> ; INP: bx = segment 9326 <1> ; al = first character, si -> next character 9327 <1> ; ah = 1 if might be a segment or pointer 9328 <1> ; ah = 0 if must be an offset 9329 <1> ; OUT: CY if pointer type return, bx:dx = pointer 9330 <1> ; DebugX on a 386: 9331 <1> ; edx = offset (even if 16-bit PM/86M segment) 9332 <1> ; ah = 1 if a 32-bit segment, 0 if a 16-bit segment 9333 <1> ; DebugX otherwise: 9334 <1> ; dx = offset 9335 <1> ; ah = 0 9336 <1> ; Debug: 9337 <1> ; dx = offset 9338 <1> ; al, si refer to next part of command line 9339 <1> ; CHG: Debug: ah, DebugX: - 9340 <1> ; REM: The byte [bAddr32] is no longer changed by this 9341 <1> ; function. The caller has to use the status that 9342 <1> ; is returned in ah, if desired. 9343 <1> getofsforbx: 9344 0000A7E9 51 <1> push cx ; preserve 9345 0000A7EA 53 <1> push bx ; preserve 9346 0000A7EB 88E5 <1> mov ch, ah ; ch = 0 if must be an offset 9347 <1> %if _PM 9348 0000A7ED 6631D2 <1> _386 xor edx, edx ; properly initialize high word 9349 0000A7F0 E843B5 <1> call test_d_b_bit 9350 0000A7F3 740E <1> jz .16 ; 16-bit segment --> 9351 <1> [cpu 386] 9352 0000A7F5 E8EF0A <1> call getdword 9353 0000A7F8 53 <1> push bx 9354 0000A7F9 52 <1> push dx 9355 0000A7FA 665A <1> pop edx ; edx = 32-bit offset 9356 0000A7FC E81300 <1> call checkpointer 9357 0000A7FF B401 <1> mov ah, 1 ; return 32-bit offset flag 9358 0000A801 EB0B <1> jmp .ret_pop_NC 9359 <1> __CPU__ 9360 <1> %endif 9361 <1> 9362 <1> .16: 9363 0000A803 E8E10A <1> call getexpression 9364 0000A806 E80900 <1> call checkpointer 9365 0000A809 E8C60F <1> call getword.checksignificantbits 9366 <1> %if _PM 9367 0000A80C B400 <1> mov ah, 0 ; return 16-bit offset flag 9368 <1> %endif 9369 <1> .ret_pop_NC: 9370 0000A80E 5B <1> pop bx 9371 0000A80F 59 <1> pop cx ; restore 9372 0000A810 F8 <1> clc 9373 0000A811 C3 <1> retn 9374 <1> 9375 <1> checkpointer: 9376 0000A812 84E4 <1> test ah, ah ; pointer type ? 9377 0000A814 790E <1> jns .ret ; no --> 9378 0000A816 84ED <1> test ch, ch ; can be a pointer or segment ? 9379 0000A818 740B <1> jz errorj10 ; no --> 9380 0000A81A 59 <1> pop cx ; discard a near return address 9381 0000A81B 59 <1> pop cx ; discard bx 9382 0000A81C 59 <1> pop cx ; restore cx 9383 <1> %if _PM 9384 0000A81D 660FB7D2 <1> _386 movzx edx, dx ; edx = dx 9385 0000A821 B400 <1> mov ah, 0 ; always treat as 16-bit offset 9386 <1> %endif 9387 0000A823 F9 <1> stc ; return a pointer type 9388 0000A824 C3 <1> .ret: retn 9389 <1> 9390 0000A825 E9B4FC <1> errorj10: jmp error 9391 <1> 9392 <1> 9393 <1> ; GETRANGE - Get address range from input line. 9394 <1> ; a range consists of either start and end address 9395 <1> ; or a start address, a 'L' and a length. 9396 <1> ; Entry AL First character of range 9397 <1> ; SI Address of next character 9398 <1> ; BX Default segment to use 9399 <1> ; CX Default length to use (or 0 if not allowed) 9400 <1> ; Exit AL First character beyond range 9401 <1> ; SI Address of the character after that 9402 <1> ; BX:(E)DX First address in range 9403 <1> ; BX:(E)CX Last address in range 9404 <1> ; Uses AH 9405 <1> 9406 <1> getrangeX: 9407 <1> %if _PM 9408 0000A828 8026[A700]FB <1> clropt [internalflags3], dif3_accept_getrange_0 9409 0000A82D 660FB7C9 <1> _386 movzx ecx, cx 9410 <1> .ecx_and_0_valid: 9411 0000A831 66 <1> _386_PM_o32 9412 0000A832 51 <1> push cx 9413 0000A833 E8DF00 <1> call getaddrX 9414 0000A836 EB0E <1> jmp short getrange.common 9415 <1> %else 9416 <1> .ecx_and_0_valid: equ getrange.ecx_and_0_valid 9417 <1> %endif 9418 <1> 9419 <1> getrange: 9420 0000A838 8026[A700]FB <1> clropt [internalflags3], dif3_accept_getrange_0 9421 0000A83D 660FB7C9 <1> _386_PM movzx ecx, cx 9422 <1> .ecx_and_0_valid: 9423 0000A841 66 <1> _386_PM_o32 9424 0000A842 51 <1> push cx ; save the default length 9425 0000A843 E8C900 <1> call getaddr ; get address into bx:(e)dx (sets bAddr32) (returns edx) 9426 <1> .common: 9427 0000A846 56 <1> push si 9428 0000A847 E8CB10 <1> call skipcomm0 9429 0000A84A 3C20 <1> cmp al, 32 9430 0000A84C 773E <1> ja gr2 9431 0000A84E 5E <1> pop si ; restore si and cx 9432 0000A84F 66 <1> _386_PM_o32 9433 0000A850 59 <1> pop cx 9434 0000A851 4E <1> dec si ; restore al 9435 0000A852 AC <1> lodsb 9436 0000A853 F606[A700]04 <1> testopt [internalflags3], dif3_accept_getrange_0 9437 0000A858 7503 <1> jnz @F 9438 0000A85A 67 <1> _386_PM_a32 9439 0000A85B E3C8 <1> jcxz errorj10 ; if a range is mandatory 9440 <1> @@: 9441 0000A85D 30E4 <1> xor ah, ah 9442 <1> gr3.addcheck: 9443 0000A85F 803E[DC88]00 <1> _386_PM cmp byte [bAddr32], 0 9444 0000A864 740D <1> _386_PM je .16 9445 0000A866 6649 <1> _386_PM dec ecx 9446 0000A868 6601D1 <1> _386_PM add ecx, edx 9447 0000A86B 731E <1> _386_PM jnc gr1 ; if no wraparound 9448 0000A86D 6683C9FF <1> _386_PM or ecx, byte -1 ; go to end of segment 9449 0000A871 EB14 <1> _386_PM jmp short .checkgr3 9450 <1> .16: 9451 0000A873 6681F9FFFF0000 <1> _386_PM cmp ecx, 0FFFFh ; was high ? 9452 0000A87A 7603 <1> _386_PM jbe @F ; no --> (ecxh = 0) 9453 0000A87C 6631C9 <1> _386_PM xor ecx, ecx ; ecxh = 0 and prepare so as to 9454 <1> ; result in cx = FFFFh after dec 9455 <1> @@: 9456 0000A87F 49 <1> dec cx 9457 0000A880 01D1 <1> add cx, dx 9458 0000A882 7307 <1> jnc gr1 ; if no wraparound 9459 0000A884 B9FFFF <1> mov cx, -1 ; go to end of segment 9460 <1> .checkgr3: 9461 0000A887 84E4 <1> test ah, ah 9462 0000A889 759A <1> jnz short errorj10 ; if specified length wrapped --> 9463 <1> gr1: 9464 0000A88B C3 <1> retn 9465 <1> 9466 <1> gr2: 9467 0000A88C 83C402 <1> _386_PM add sp, byte 2 ; for the ecxh on stack 9468 0000A88F 83C404 <1> add sp, byte 4 ; discard saved cx, si 9469 0000A892 E87EE3 <1> call uppercase 9470 0000A895 3C4C <1> cmp al, 'L' 9471 0000A897 7414 <1> je gr3 ; if a range is given 9472 <1> ; call skipwh0 ; get next nonblank 9473 0000A899 66 <1> _386_PM_o32 ; xchg ecx, edx 9474 0000A89A 87CA <1> xchg cx, dx 9475 0000A89C B400 <1> mov ah, 0 ; must be offset 9476 0000A89E E8C300 <1> call getofsforbx_remember_bitness 9477 <1> ; (DebugX: returns edx no matter what) 9478 0000A8A1 66 <1> _386_PM_o32 ; xchg ecx, edx 9479 0000A8A2 87CA <1> xchg cx, dx 9480 0000A8A4 66 <1> _386_PM_o32 ; cmp edx, ecx 9481 0000A8A5 39CA <1> cmp dx, cx 9482 0000A8A7 7603E99000 <1> ja errorj2 ; if empty range --> 9483 0000A8AC C3 <1> retn 9484 <1> 9485 <1> gr3: 9486 0000A8AD 4E <1> dec si ; -> at 'L' 9487 0000A8AE 52 <1> push dx 9488 0000A8AF BA[F966] <1> mov dx, msg.length 9489 0000A8B2 E8DA0F <1> call isstring? 9490 0000A8B5 5A <1> pop dx 9491 0000A8B6 7501 <1> jne .notlength 9492 0000A8B8 A8 <1> db __TEST_IMM8 ; (skip inc, si -> terminator after "LENGTH") 9493 <1> .notlength: 9494 0000A8B9 46 <1> inc si ; -> behind 'L' 9495 0000A8BA E85710 <1> call skipcomma ; discard the 'L' 9496 <1> ;--- a range is entered with the L/ength argument 9497 <1> ;--- get a valid length for segment in BX 9498 0000A8BD 52 <1> push dx 9499 0000A8BE 53 <1> push bx 9500 0000A8BF E874B4 <1> _386_PM call test_d_b_bit 9501 0000A8C2 9C <1> _386_PM pushf 9502 0000A8C3 E8210A <1> call getdword 9503 <1> 9504 0000A8C6 4E <1> dec si 9505 0000A8C7 52 <1> push dx 9506 0000A8C8 B90200 <1> mov cx, 2 ; shift count = 2 (do times 4) 9507 0000A8CB BA[EC66] <1> mov dx, msg.dwords 9508 0000A8CE E8BE0F <1> call isstring? 9509 0000A8D1 7410 <1> je .gotsize 9510 0000A8D3 49 <1> dec cx ; shift count = 1 9511 0000A8D4 BA[ED66] <1> mov dx, msg.words 9512 0000A8D7 E8B50F <1> call isstring? 9513 0000A8DA 7407 <1> je .gotsize 9514 0000A8DC 49 <1> dec cx ; shift count = 0 9515 0000A8DD BA[F366] <1> mov dx, msg.bytes 9516 0000A8E0 E8AC0F <1> call isstring? 9517 <1> ; je .gotsize 9518 <1> .gotsize: ; si -> terminator after length unit 9519 <1> ; (or -> after expression if no unit) 9520 0000A8E3 5A <1> pop dx 9521 0000A8E4 E30B <1> jcxz .noshift ; "BYTES" or no unit given --> 9522 <1> .shiftloop: 9523 0000A8E6 D1E2 <1> shl dx, 1 9524 0000A8E8 D1D3 <1> rcl bx, 1 9525 0000A8EA 7303E9EDFB <1> jc error ; too large --> 9526 0000A8EF E2F5 <1> loop .shiftloop ; loop shifting (if it was shift count = 2) 9527 <1> .noshift: 9528 0000A8F1 AC <1> lodsb ; al = next character, si -> after that 9529 0000A8F2 9D <1> _386_PM popf 9530 0000A8F3 740B <1> _386_PM jz .not16_64kib ; don't check for <= 64 KiB 9531 0000A8F5 83FB01 <1> cmp bx, byte 1 9532 0000A8F8 7206 <1> jb .not16_64kib ; < 64 KiB in 16-bit segment --> 9533 0000A8FA 7540 <1> jne short errorj2 ; 16-bit segment, above 64 KiB --> 9534 0000A8FC 85D2 <1> test dx, dx 9535 0000A8FE 753C <1> jnz short errorj2 ; 16-bit segment, above 64 KiB --> 9536 <1> .not16_64kib: 9537 <1> %if _PM 9538 0000A900 53 <1> _386 push bx ; (only push high word on 386+) 9539 0000A901 52 <1> push dx 9540 0000A902 66 <1> _386_o32 ; pop ecx ; mov ecx, bxdx 9541 0000A903 59 <1> pop cx ; mov cx, dx 9542 <1> %else 9543 <1> mov cx, dx 9544 <1> %endif 9545 0000A904 09D3 <1> or bx, dx ; zero ? 9546 0000A906 7434 <1> jz short errorj2 ; yes, error --> 9547 0000A908 5B <1> pop bx 9548 0000A909 5A <1> pop dx 9549 0000A90A B401 <1> mov ah, 1 9550 0000A90C E950FF <1> jmp .addcheck 9551 <1> 9552 <1> %ifn _PM 9553 <1> errorj2: 9554 <1> jmp error 9555 <1> %endif 9556 <1> 9557 <1> 9558 <1> ; GETADDR - Get address from input line. 9559 <1> ; Entry AL First character of address 9560 <1> ; SI Address of next character 9561 <1> ; BX Default segment to use 9562 <1> ; Exit AL First character beyond address 9563 <1> ; SI Address of the character after that 9564 <1> ; BX:(E)DX Address found 9565 <1> ; Uses AH,CX 9566 <1> 9567 <1> getaddr: 9568 <1> %if _PM 9569 0000A90F E80300 <1> call getaddrX 9570 0000A912 E973EF <1> jmp verifysegm ; make BX a writeable segment 9571 <1> 9572 <1> ; getaddrX differs from getaddr in that BX is not ensured 9573 <1> ; to be writeable in PM. 9574 <1> ; 9575 <1> ; For DEBUG without PM support, getaddr is getaddrX. Both don't return CF. 9576 <1> 9577 <1> getaddrX: 9578 0000A915 C606[DC88]00 <1> mov byte [bAddr32], 0 9579 0000A91A 3C24 <1> cmp al, '$' ; a real-mode segment? 9580 0000A91C 7521 <1> jne ga1_1 9581 0000A91E AC <1> lodsb 9582 0000A91F E8AB0E <1> call getword 9583 0000A922 E8A8E8 <1> call ispm ; need to translate ? 9584 0000A925 750D <1> jnz .checkseg ; no --> 9585 0000A927 89D3 <1> mov bx, dx 9586 0000A929 50 <1> push ax 9587 0000A92A B80200 <1> mov ax, 0002h 9588 0000A92D CD31 <1> int 31h 9589 0000A92F 720B <1> jc short errorj2 9590 0000A931 89C2 <1> mov dx, ax 9591 0000A933 58 <1> pop ax 9592 <1> .checkseg: 9593 0000A934 56 <1> push si 9594 0000A935 E80C10 <1> call skipwh0 9595 0000A938 3C3A <1> cmp al, ':' ; was a segment at all? 9596 0000A93A 7420 <1> je ga2_2 ; yes --> 9597 <1> errorj2: 9598 0000A93C E99DFB <1> jmp error 9599 <1> %else 9600 <1> getaddrX: 9601 <1> cmp al, '$' 9602 <1> jne ga1_1 9603 <1> push ax ; (unused) 9604 <1> lodsb 9605 <1> call getword 9606 <1> call skipwh0 9607 <1> cmp al, ':' 9608 <1> je ga2_2 9609 <1> jmp error 9610 <1> %endif 9611 <1> ga1_1: 9612 0000A93F B401 <1> mov ah, 1 ; might be a pointer type 9613 0000A941 E8A5FE <1> call getofsforbx 9614 0000A944 720B <1> jc .ret 9615 0000A946 56 <1> push si 9616 0000A947 E8FA0F <1> call skipwh0 9617 0000A94A 3C3A <1> cmp al, ':' 9618 0000A94C 7405 <1> je ga2 ; if this is a segment/selector --> 9619 0000A94E 5E <1> pop si 9620 0000A94F 4E <1> dec si 9621 0000A950 AC <1> lodsb 9622 <1> .ret: 9623 <1> %if _PM 9624 0000A951 EB14 <1> jmp short remember_bitness 9625 <1> ; remember 32-bitness (only if no segment) 9626 <1> %else 9627 <1> retn 9628 <1> %endif 9629 <1> 9630 <1> ga2: 9631 0000A953 6681FA00000100 <1> _386_PM cmp edx, 0001_0000h ; segment/selector fits in word ? 9632 0000A95A 73E0 <1> _386_PM jae short errorj2 ; no --> 9633 <1> ga2_2: 9634 0000A95C 58 <1> pop ax ; throw away saved si 9635 0000A95D 89D3 <1> mov bx, dx ; mov segment into BX 9636 0000A95F E8E10F <1> call skipwhite ; skip to next word 9637 0000A962 B400 <1> mov ah, 0 ; must be an offset 9638 <1> %if _PM 9639 <1> getofsforbx_remember_bitness: 9640 0000A964 E882FE <1> call getofsforbx 9641 <1> remember_bitness: 9642 0000A967 0826[DC88] <1> or byte [bAddr32], ah ; remember 32-bitness 9643 0000A96B C3 <1> retn 9644 <1> %else 9645 <1> jmp getofsforbx 9646 <1> 9647 <1> getofsforbx_remember_bitness: equ getofsforbx 9648 <1> %endif 9649 <1> 9650 <1> 9651 <1> ; GETSTR - Get string of bytes. Put the answer in line_out. 9652 <1> ; Entry AL first character 9653 <1> ; SI address of next character 9654 <1> ; Exit [line_out] first byte of string 9655 <1> ; DI address of last+1 byte of string 9656 <1> ; Uses AX,CL,DL,SI 9657 <1> 9658 <1> getstr: 9659 0000A96C BF[0E08] <1> mov di, line_out 9660 0000A96F E87C0F <1> call iseol? 9661 0000A972 74C8 <1> je short errorj2 ; we don't allow empty byte strings 9662 <1> gs1: 9663 0000A974 3C27 <1> cmp al, "'" 9664 0000A976 740C <1> je gs2 ; if string 9665 0000A978 3C22 <1> cmp al, '"' 9666 0000A97A 7408 <1> je gs2 ; ditto 9667 0000A97C E85C0E <1> call getbyte ; byte in DL 9668 0000A97F 8815 <1> mov byte [di], dl ; store the byte 9669 0000A981 47 <1> inc di 9670 0000A982 EB14 <1> jmp short gs6 9671 <1> 9672 <1> gs2: 9673 0000A984 88C4 <1> mov ah, al ; save quote character 9674 <1> gs3: 9675 0000A986 AC <1> lodsb 9676 0000A987 38E0 <1> cmp al, ah 9677 0000A989 7408 <1> je gs5 ; if possible end of string 9678 0000A98B E8640F <1> call iseol?.notsemicolon 9679 0000A98E 74AC <1> je short errorj2 ; if end of line 9680 <1> gs4: 9681 0000A990 AA <1> stosb ; save character and continue 9682 0000A991 EBF3 <1> jmp short gs3 9683 <1> 9684 <1> gs5: 9685 0000A993 AC <1> lodsb 9686 0000A994 38E0 <1> cmp al, ah 9687 0000A996 74F8 <1> je gs4 ; if doubled quote character 9688 <1> gs6: 9689 0000A998 E87A0F <1> call skipcomm0 ; go back for more 9690 0000A99B E8500F <1> call iseol? 9691 0000A99E 75D4 <1> jne gs1 ; if not done yet 9692 <1> .ret: 9693 0000A9A0 C3 <1> retn 9694 <1> 9695 <1> isbracketorunaryoperator?: 9696 0000A9A1 E80900 <1> call isunaryoperator? 9697 0000A9A4 7406 <1> je .yes 9698 <1> %if _INDIRECTION 9699 0000A9A6 3C5B <1> cmp al, '[' 9700 0000A9A8 7402 <1> je .yes 9701 <1> %endif 9702 0000A9AA 3C28 <1> cmp al, '(' 9703 <1> .yes: 9704 0000A9AC C3 <1> retn 9705 <1> 9706 <1> 9707 <1> ; Is al one of the simple unary operators? 9708 <1> ; OUT: NZ if not 9709 <1> ; ZR if so, 9710 <1> ; NC 9711 <1> ; cx = index into unaryoperators 9712 <1> isunaryoperator?: 9713 0000A9AD 57 <1> push di 9714 0000A9AE BF[9E90] <1> mov di, unaryoperators 9715 0000A9B1 EB04 <1> jmp short isoperator?.common 9716 <1> 9717 <1> ; See previous description. 9718 <1> isoperator?: 9719 0000A9B3 57 <1> push di 9720 0000A9B4 BF[8890] <1> mov di, operators 9721 <1> .common: 9722 0000A9B7 8B0D <1> mov cx, word [di] 9723 0000A9B9 51 <1> push cx 9724 0000A9BA AF <1> scasw 9725 0000A9BB F2AE <1> repne scasb 9726 0000A9BD 5F <1> pop di 9727 0000A9BE 7507 <1> jne .no 9728 0000A9C0 F7D9 <1> neg cx 9729 0000A9C2 01F9 <1> add cx, di 9730 0000A9C4 49 <1> dec cx 9731 0000A9C5 38C0 <1> cmp al, al ; NC, ZR 9732 <1> .no: 9733 0000A9C7 5F <1> pop di 9734 0000A9C8 C3 <1> retn 9735 <1> 9736 <1> 9737 <1> ; INP: al = character 9738 <1> ; OUT: al = capitalised character 9739 <1> ; ZR, NC if a separator 9740 <1> ; NZ if no separator 9741 <1> isseparator?: 9742 <1> .: 9743 0000A9C9 E847E2 <1> call uppercase 9744 0000A9CC 51 <1> push cx 9745 <1> %if _EXPRESSIONS 9746 0000A9CD 3C41 <1> cmp al, 'A' 9747 0000A9CF 7204 <1> jb @F 9748 0000A9D1 3C5A <1> cmp al, 'Z' 9749 0000A9D3 7605 <1> jbe @FF 9750 <1> @@: 9751 0000A9D5 E8DBFF <1> call isoperator? ; normal operators are separators (also handles equality sign) 9752 0000A9D8 740A <1> je .yes ; if match --> (ZR, NC) 9753 <1> @@: 9754 <1> %endif 9755 0000A9DA 57 <1> push di 9756 0000A9DB BF[9495] <1> mov di, separators 9757 0000A9DE 8B0D <1> mov cx, word [di] 9758 0000A9E0 AF <1> scasw 9759 0000A9E1 F2AE <1> repne scasb ; ZR, NC on match, NZ else 9760 0000A9E3 5F <1> pop di 9761 <1> .yes: 9762 0000A9E4 59 <1> pop cx 9763 0000A9E5 C3 <1> retn 9764 <1> 9765 <1> ; INP: al = character 9766 <1> ; OUT: al = capitalised character 9767 <1> ; ZR, NC if a separator (not L or dot) 9768 <1> ; NZ if no separator (including L or dot) 9769 <1> .except_L_or_dot: 9770 0000A9E6 E82AE2 <1> call uppercase 9771 0000A9E9 3C2E <1> cmp al, '.' 9772 0000A9EB 7404 <1> je .ret_NZ 9773 0000A9ED 3C4C <1> cmp al, 'L' 9774 0000A9EF 75D8 <1> jne . 9775 <1> .ret_NZ: 9776 0000A9F1 84C0 <1> test al, al 9777 0000A9F3 C3 <1> retn 9778 <1> 9779 <1> 9780 <1> ; Does one of the type operators start in input? 9781 <1> ; 9782 <1> ; INP: al = first character 9783 <1> ; si-> next character 9784 <1> ; OUT: Iff NC, 9785 <1> ; bx>>1 = offset into typebitmasks and typehandlers tables 9786 <1> ; bx&1 = set iff signed type 9787 <1> ; di-> behind the type operator 9788 <1> ; CHG: bx, cx, di 9789 <1> ; 9790 <1> ; Note: Signed types are specified by an S prefix to 9791 <1> ; the type names. Only non-address types can 9792 <1> ; be signed (that is, offset, segment, and 9793 <1> ; pointer cannot be signed). 9794 <1> ; Types can be specified with abbreviated names, 9795 <1> ; except where that would clash with numeric 9796 <1> ; input or a register name or ambiguity would 9797 <1> ; be caused. These cases are: 9798 <1> ; SS, S (short, seg, signed, ss) 9799 <1> ; B (byte, numeric 0Bh) 9800 <1> ; C (char, numeric 0Ch) 9801 <1> ; D (dword, numeric 0Dh) 9802 <1> ; 3 (3byte, numeric 3) 9803 <1> ; 3B (3byte, numeric 3Bh) 9804 <1> ; CH (char, register ch) 9805 <1> istype?: 9806 <1> %if maxtypesize & 1 9807 0000A9F4 B90800 <1> mov cx, maxtypesize+1 ; = maximum count + 1 9808 <1> %else 9809 <1> mov cx, maxtypesize ; = maximum count 9810 <1> %endif 9811 <1> ; cx is even here! 9812 0000A9F7 52 <1> push dx 9813 0000A9F8 50 <1> push ax 9814 0000A9F9 56 <1> push si 9815 <1> 9816 0000A9FA 29CC <1> sub sp, cx ; allocate name buffer 9817 0000A9FC 89E7 <1> mov di, sp ; -> name buffer 9818 0000A9FE 57 <1> push di 9819 0000A9FF 31DB <1> xor bx, bx ; initialise count 9820 <1> %ifn maxtypesize & 1 9821 <1> inc cx ; = maximum count + 1 9822 <1> %endif 9823 <1> ; The +1 does not represent an off-by-one 9824 <1> ; because the below loop stores to the 9825 <1> ; buffer at the beginning of subsequent 9826 <1> ; iterations, after checking cx. 9827 <1> 9828 0000AA01 A9 <1> db __TEST_IMM16 ; (skip stosb and lodsb) 9829 <1> .storename: 9830 0000AA02 AA <1> stosb ; store in name buffer 9831 0000AA03 AC <1> lodsb ; get next character to check 9832 0000AA04 E80CE2 <1> call uppercase 9833 0000AA07 51 <1> push cx 9834 0000AA08 E896FF <1> call isbracketorunaryoperator? ; terminator ? 9835 0000AA0B 59 <1> pop cx 9836 0000AA0C 7413 <1> je .endname 9837 0000AA0E E8DD0E <1> call iseol? 9838 0000AA11 740E <1> je .endname 9839 0000AA13 3C20 <1> cmp al, 32 9840 0000AA15 740A <1> je .endname 9841 0000AA17 3C09 <1> cmp al, 9 9842 0000AA19 7406 <1> je .endname ; yes --> 9843 <1> ; We don't check for digits here. 9844 <1> ; Immediate values and variables 9845 <1> ; must leave a space inbetween. 9846 0000AA1B 43 <1> inc bx ; count characters 9847 0000AA1C E2E4 <1> loop .storename ; count remaining buffer space 9848 <1> ; Here, the potential name was too 9849 <1> ; long for a valid type name. 9850 0000AA1E F9 <1> stc 9851 0000AA1F EB1F <1> jmp short .done ; --> 9852 <1> 9853 <1> .endname: 9854 0000AA21 E8200F <1> call skipwh0 ; skip to next field 9855 0000AA24 4E <1> dec si ; -> behind potential name 9856 0000AA25 5F <1> pop di ; -> name buffer 9857 0000AA26 89D9 <1> mov cx, bx ; cx = length 9858 0000AA28 56 <1> push si ; save position in input line 9859 0000AA29 89FE <1> mov si, di ; si-> name buffer 9860 0000AA2B 53 <1> push bx 9861 0000AA2C 57 <1> push di 9862 0000AA2D F8 <1> clc ; indicate unsigned check 9863 0000AA2E E81900 <1> call isunsignedtype? ; matches an unsigned type ? 9864 0000AA31 5E <1> pop si 9865 0000AA32 59 <1> pop cx 9866 0000AA33 730B <1> jnc .done ; yes --> 9867 <1> 9868 0000AA35 AC <1> lodsb ; al = first, si-> second character 9869 0000AA36 49 <1> dec cx ; cx = length less one 9870 0000AA37 3C53 <1> cmp al, 'S' ; first character an "S" ? 9871 0000AA39 F9 <1> stc ; (indicate signed check, or: no type) 9872 0000AA3A 7504 <1> jne .done ; no, not signed either --> 9873 0000AA3C E80B00 <1> call isunsignedtype? ; matches an unsigned type now ? 9874 0000AA3F 43 <1> inc bx ; if NC, set to indicate signed type 9875 <1> .done: 9876 0000AA40 9F <1> lahf 9877 0000AA41 5F <1> pop di ; if NC, -> behind matched type name 9878 0000AA42 83C408 <1> add sp, (maxtypesize+1) & ~1 ; discard name buffer 9879 0000AA45 5E <1> pop si 9880 0000AA46 9E <1> sahf 9881 0000AA47 58 <1> pop ax 9882 0000AA48 5A <1> pop dx 9883 0000AA49 C3 <1> retn 9884 <1> 9885 <1> ; Does one of the unsigned type operators start in buffer? 9886 <1> ; 9887 <1> ; INP: si-> name buffer with capitalised potential name 9888 <1> ; cx = length of potential name 9889 <1> ; CY iff looking for signed type 9890 <1> ; OUT: Iff NC, 9891 <1> ; bx>>1 = offset into typebitmasks and typehandlers tables 9892 <1> ; bx&1 = 0 9893 <1> ; CHG: ax, bx, cx, dx, si, di 9894 <1> isunsignedtype?: 9895 0000AA4A BF[9480] <1> mov di, types 9896 0000AA4D 19D2 <1> sbb dx, dx ; 0FFFFh if signed check else 0 9897 0000AA4F E351 <1> jcxz .notype ; if zero characters --> 9898 0000AA51 83F902 <1> cmp cx, 2 9899 0000AA54 750C <1> jne @F 9900 0000AA56 813C4348 <1> cmp word [si], "CH" 9901 0000AA5A 7446 <1> je .notype 9902 0000AA5C 813C3342 <1> cmp word [si], "3B" 9903 0000AA60 7440 <1> je .notype 9904 <1> @@: 9905 0000AA62 E214 <1> loop .single_character_checked ; if not single character --> 9906 <1> 9907 0000AA64 AC <1> lodsb ; get that character 9908 0000AA65 3C53 <1> cmp al, 'S' ; specified "S" or "SS" ? 9909 0000AA67 7439 <1> je .notype ; yes, not allowed --> 9910 0000AA69 08D0 <1> or al, dl ; iff signed check, al |= 0FFh 9911 0000AA6B 4E <1> dec si ; (restore) 9912 0000AA6C 3C33 <1> cmp al, '3' 9913 0000AA6E 7432 <1> je .notype 9914 0000AA70 3C41 <1> cmp al, 'A' ; specified only a valid digit ? 9915 0000AA72 7204 <1> jb .single_character_checked 9916 0000AA74 3C47 <1> cmp al, 'F'+1 9917 0000AA76 722A <1> jb .notype ; yes, not allowed --> 9918 <1> 9919 <1> .single_character_checked: 9920 0000AA78 41 <1> inc cx ; (restore) 9921 0000AA79 83E2E1 <1> and dx, types.addresses-types.end ; = 0 iff unsigned check 9922 0000AA7C 31C0 <1> xor ax, ax ; initialise ah, and ax = 0 first 9923 0000AA7E 31DB <1> xor bx, bx 9924 0000AA80 87FE <1> xchg di, si 9925 0000AA82 81C2[DF80] <1> add dx, types.end ; = .addresses for signed check, 9926 <1> ; = .end for unsigned check 9927 <1> 9928 <1> ; Before each iteration, 9929 <1> ; si-> byte-counted next name to check 9930 <1> ; di-> potential name (in name buffer) 9931 <1> ; cx = cl = length of potential name 9932 <1> ; (dx-1) = maximum value for si 9933 <1> ; ah = 0 9934 <1> ; Before the first iteration additionally, 9935 <1> ; bx&~3 = index to return for this name (if match) 9936 <1> ; al = 0 9937 <1> ; Before subsequent iterations additionally, 9938 <1> ; (bx+2)&~3 = index to return for this name (if match) 9939 <1> ; al = offset to add to si first 9940 0000AA86 A9 <1> db __TEST_IMM16 ; (skip two times inc bx) 9941 <1> .loop: 9942 0000AA87 43 <1> inc bx 9943 0000AA88 43 <1> inc bx ; increase index 9944 0000AA89 01C6 <1> add si, ax ; -> next table entry 9945 0000AA8B AC <1> lodsb ; ax = length of full name 9946 0000AA8C 39D6 <1> cmp si, dx ; checked all allowed names? 9947 0000AA8E 7312 <1> jae .notype ; yes, done --> 9948 0000AA90 39C8 <1> cmp ax, cx ; full name large enough ? 9949 0000AA92 72F3 <1> jb .loop ; no --> 9950 0000AA94 57 <1> push di 9951 0000AA95 51 <1> push cx 9952 0000AA96 56 <1> push si 9953 0000AA97 F3A6 <1> repe cmpsb ; potential name matches ? 9954 0000AA99 5E <1> pop si 9955 0000AA9A 59 <1> pop cx 9956 0000AA9B 5F <1> pop di 9957 0000AA9C 75E9 <1> jne .loop ; no --> 9958 <1> 9959 0000AA9E 80E3FC <1> and bl, ~3 ; conflate alternative type names 9960 0000AAA1 A8 <1> db __TEST_IMM8 ; (NC, skip stc) 9961 <1> .notype: 9962 0000AAA2 F9 <1> stc 9963 0000AAA3 C3 <1> retn 9964 <1> 9965 <1> 9966 <1> usesection lDEBUG_DATA_ENTRY 9967 <1> 9968 <1> ; Table of bit masks and shift counts to determine 9969 <1> ; how a type modifies the bit mask of required bytes. 9970 <1> ; 9971 <1> ; It would be possible to always retrieve a full dword 9972 <1> ; from memory to process indirection in expressions, 9973 <1> ; but this could fault if accessing inexistent data. 9974 <1> ; Hence the debugger should minimise memory access. 9975 <1> ; For this reason, types allow the expression evaluator 9976 <1> ; to keep track which of the term's bytes are actually 9977 <1> ; going to be used. The bit mask of required bytes 9978 <1> ; indicates which bytes are not discarded by any of a 9979 <1> ; term's type operators. 9980 <1> ; 9981 <1> ; The second byte of each entry (applied to ch by the 9982 <1> ; reader, ie high byte of cx) indicates a mask to 9983 <1> ; apply to the bit mask of required bytes. Note that 9984 <1> ; this mask is applied first, before the shift that's 9985 <1> ; described next. 9986 <1> ; The first byte of each entry (loaded into cl by the 9987 <1> ; reader, ie low byte of cx) indicates a shift left 9988 <1> ; count to apply to the bit mask of required bytes. 9989 <1> ; (Only the segment type doesn't have 0 currently.) 9990 <1> ; 9991 <1> ; Note that types are parsed forwards through the input 9992 <1> ; (ie the specified command) but are actually applied 9993 <1> ; to the numeric value they refer to backwards, that 9994 <1> ; is, a type that is closer to the term in the input 9995 <1> ; is applied to the term's result before a type that's 9996 <1> ; farther from the term. 9997 <1> ; Misleadingly, this reversal isn't very apparent in 9998 <1> ; most processing of the type and unary operators. 9999 <1> ; The segment type's shifting and masking reflects the 10000 <1> ; reversal: while the actual operation is to shift 10001 <1> ; right then restrict to the low word, the entry in 10002 <1> ; this table indicates to restrict the bit mask to 10003 <1> ; the low word then shift left. 10004 <1> align 2, db 0 10005 <1> typebitmasks: 10006 0000906C 0001 <1> db 0, 1b ; byte 10007 0000906E 0003 <1> db 0, 11b ; word 10008 00009070 0007 <1> db 0, 111b ; 3byte 10009 00009072 000F <1> db 0, 1111b ; dword 10010 00009074 000F <1> db 0, 1111b ; pointer 10011 00009076 0003 <1> db 0, 11b ; offset 10012 00009078 0203 <1> db 2, 11b ; segment 10013 <1> 10014 <1> 10015 <1> ; Dispatch table for type conversion functions. 10016 <1> ; 10017 <1> ; INP: bx:dx = dword input 10018 <1> ; CF = signedness of type conversion 10019 <1> ; ah from lahf with the same CF as current 10020 <1> ; al = type (80h = pointer, 40h = signed) 10021 <1> ; OUT: bx:dx = new value 10022 <1> ; ah = type (80h = pointer, 40h = signed) 10023 <1> ; CHG: ax 10024 <1> align 2, db 0 10025 <1> typehandlers: 10026 0000907A [B7AA] <1> dw handlebyte 10027 0000907C [C2AA] <1> dw handleword 10028 0000907E [AAAA] <1> dw handle3byte 10029 00009080 [CDAA] <1> dw handledword 10030 00009082 [D5AA] <1> dw handlepointer 10031 00009084 [C2AA] <1> dw handleoffset 10032 00009086 [A4AA] <1> dw handlesegment 10033 <1> 10034 <1> 10035 <1> usesection lDEBUG_CODE 10036 <1> 10037 <1> handlesegment: 10038 0000AAA4 89DA <1> mov dx, bx 10039 0000AAA6 30E4 <1> xor ah, ah ; NC, ah = 0 10040 0000AAA8 EB18 <1> jmp short handleword 10041 <1> handleoffset equ handleword 10042 <1> 10043 <1> handle3byte: 10044 0000AAAA B700 <1> mov bh, 0 10045 0000AAAC 7307 <1> jnc .zero ; (iff unsigned type -->) 10046 0000AAAE 84DB <1> test bl, bl ; signed ? 10047 0000AAB0 7902 <1> jns .zero_f ; no --> 10048 0000AAB2 FECF <1> dec bh 10049 <1> .zero_f: 10050 0000AAB4 9E <1> sahf ; restore CF 10051 <1> .zero: 10052 0000AAB5 EB16 <1> jmp handledword 10053 <1> 10054 <1> handlebyte: 10055 0000AAB7 B600 <1> mov dh, 0 10056 0000AAB9 7307 <1> jnc .zero ; (iff unsigned type -->) 10057 0000AABB 84D2 <1> test dl, dl ; signed ? 10058 0000AABD 7902 <1> jns .zero_f ; no --> 10059 0000AABF FECE <1> dec dh 10060 <1> .zero_f: 10061 0000AAC1 9E <1> sahf ; restore CF 10062 <1> .zero: 10063 <1> handleword: 10064 0000AAC2 BB0000 <1> mov bx, 0 10065 0000AAC5 7306 <1> jnc .zero ; (iff unsigned type -->) 10066 0000AAC7 85D2 <1> test dx, dx ; signed ? 10067 0000AAC9 7901 <1> jns .zero_f ; no --> 10068 0000AACB 4B <1> dec bx 10069 <1> .zero_f: 10070 0000AACC 9E <1> sahf ; restore CF 10071 <1> .zero: 10072 <1> handledword: 10073 0000AACD 7203 <1> jc .signed ; if signed --> 10074 0000AACF 30E4 <1> xor ah, ah ; return pointer=0 signed=0 10075 0000AAD1 C3 <1> retn 10076 <1> 10077 <1> .signed: 10078 0000AAD2 B440 <1> mov ah, 40h ; return pointer=0 signed=1 10079 0000AAD4 C3 <1> retn 10080 <1> 10081 <1> handlepointer: 10082 0000AAD5 B480 <1> mov ah, 80h ; return pointer=1 signed=0 10083 0000AAD7 C3 <1> retn 10084 <1> 10085 <1> 10086 <1> usesection lDEBUG_DATA_ENTRY 10087 <1> 10088 <1> ; List of binary and unary operators. 10089 <1> ; The order has to match that in the respective 10090 <1> ; operator handler dispatch table below. 10091 <1> align 2, db 0 10092 <1> operators: 10093 00009088 13002B2D2A2F253C3E- <1> .: countedw "+-*/%<>=!|&^oOaAxX?" 10093 00009091 3D217C265E6F4F6141- <1> 10093 0000909A 78583F <1> 10094 <1> .amount: equ $ - . - 2 10095 0000909D 00 <1> align 2, db 0 10096 <1> unaryoperators: 10097 0000909E 05002B2D7E213F <1> .: countedw "+-~!?" 10098 <1> .amount: equ $ - . - 2 10099 <1> 10100 <1> 10101 <1> ; Dispatch table for unary operators, 10102 <1> ; used by getexpression. 10103 <1> ; Functions in this table are called with: 10104 <1> ; 10105 <1> ; INP: bx:dx = number 10106 <1> ; ah = type 10107 <1> ; OUT: bx:dx = result 10108 <1> ; ah = type 10109 <1> ; CHG: - 10110 000090A5 00 <1> align 2, db 0 10111 <1> unaryoperatorhandlers: 10112 <1> .: 10113 000090A6 [EAAA] <1> dw uoh_plus ; + 10114 000090A8 [E0AA] <1> dw uoh_minus ; - 10115 000090AA [EBAA] <1> dw uoh_not_bitwise ; ~ 10116 000090AC [F2AA] <1> dw uoh_not_boolean ; ! 10117 000090AE [D8AA] <1> dw uoh_abs ; ? 10118 <1> .amount: equ ($ - .) / 2 10119 <1> %if .amount != unaryoperators.amount 10120 <1> %error String and table mismatch 10121 <1> %endif 10122 <1> 10123 <1> 10124 <1> usesection lDEBUG_CODE 10125 <1> 10126 <1> uoh_abs: 10127 0000AAD8 80E4BF <1> and ah, ~ 40h ; make type signed=0 10128 0000AADB F6C780 <1> test bh, 80h ; negative ? 10129 0000AADE 740A <1> jz uoh_plus ; no --> 10130 <1> uoh_minus: 10131 0000AAE0 80CC40 <1> or ah, 40h ; make type signed=1 10132 <1> calculate_minus_bxdx: 10133 0000AAE3 F7DB <1> neg bx 10134 0000AAE5 F7DA <1> neg dx 10135 0000AAE7 83DB00 <1> sbb bx, byte 0 ; neg bx:dx 10136 <1> uoh_plus: ; (nop) 10137 0000AAEA C3 <1> retn 10138 <1> 10139 <1> uoh_not_bitwise: 10140 0000AAEB B400 <1> mov ah, 0 ; make type pointer=0 signed=0 10141 0000AAED F7D3 <1> not bx 10142 0000AAEF F7D2 <1> not dx 10143 0000AAF1 C3 <1> retn 10144 <1> 10145 <1> uoh_not_boolean: 10146 0000AAF2 B400 <1> mov ah, 0 ; make type pointer=0 signed=0 10147 0000AAF4 E80202 <1> call toboolean 10148 0000AAF7 80F201 <1> xor dl, 1 ; toggle only bit 0 10149 0000AAFA C3 <1> retn 10150 <1> 10151 <1> 10152 <1> usesection lDEBUG_DATA_ENTRY 10153 <1> 10154 <1> ; Word table operatordispatchers: order as in string operators 10155 <1> ; Pointed functions dispatch depending on operator characters 10156 <1> ; Return: operator index, 0 = invalid 10157 <1> 10158 <1> ; Operator index (byte): 10159 <1> ; 0 = invalid, no operator found 10160 <1> ; 1.. = 1-based index in byte table operatorprecedences 10161 <1> ; = 1-based index in word table operatorfunctions 10162 <1> 10163 <1> 10164 <1> ; Dispatch table for (binary) expression operators, 10165 <1> ; used by getexpression. 10166 <1> ; Functions in this table are called with: 10167 <1> ; INP: al = operator character (which is also implicit) 10168 <1> ; si-> remaining line (directly) behind operator character 10169 <1> ; OUT: bl != 0 if a valid operator, 10170 <1> ; bl = operator index 10171 <1> ; si-> behind the last character belonging to the operator 10172 <1> ; bl = 0 if no valid operator 10173 <1> ; CHG: al, bh, dx 10174 <1> 10175 <1> struc opprecs 10176 00000000 ?? <1> OPPREC_INVALID: resb 1 10177 00000001 ?? <1> OPPREC_COND: resb 1 10178 00000002 ?? <1> OPPREC_BOOL_OR: resb 1 10179 00000003 ?? <1> OPPREC_BOOL_XOR:resb 1 10180 00000004 ?? <1> OPPREC_BOOL_AND:resb 1 10181 00000005 ?? <1> OPPREC_COMPARE: resb 1 10182 00000006 ?? <1> OPPREC_BIT_OR: resb 1 10183 00000007 ?? <1> OPPREC_BIT_XOR: resb 1 10184 00000008 ?? <1> OPPREC_BIT_AND: resb 1 10185 00000009 ?? <1> OPPREC_SHIFT: resb 1 10186 0000000A ?? <1> OPPREC_ADDSUB: resb 1 10187 0000000B ?? <1> OPPREC_MULDIV: resb 1 10188 0000000C ?? <1> OPPREC_POWER: resb 1 10189 <1> OPPREC_RIGHTOP: ; (to process it first in getexpression) 10190 <1> endstruc 10191 <1> ; The number of precedence levels indicates how many 10192 <1> ; intermediate results getexpression might have to save 10193 <1> ; on its stack. With eleven levels of precedence, up to 10194 <1> ; ten intermediate results are pushed by getexpression. 10195 <1> ; (With 6 bytes each, that gives a moderate 60 bytes.) 10196 <1> ; Key to this is that, in case of a low enough operator 10197 <1> ; behind the one that triggered the pushing, the pushed 10198 <1> ; value will be popped before proceeding. This way more 10199 <1> ; intermediate results may be pushed later but the stack 10200 <1> ; never holds intermediate results that don't need to be 10201 <1> ; on the stack. 10202 <1> 10203 <1> ; This is the definition of operator index values. The tables 10204 <1> ; operatorprecedences and operatorfunctions are ordered by this. 10205 <1> ; The operator dispatchers return one of these. 10206 <1> struc ops 10207 00000000 ?? <1> OPERATOR_INVALID: resb 1 ; 0 - invalid 10208 00000001 ?? <1> OPERATOR_PLUS: resb 1 ; + 10209 00000002 ?? <1> OPERATOR_MINUS: resb 1 ; - 10210 00000003 ?? <1> OPERATOR_MULTIPLY: resb 1 ; * 10211 00000004 ?? <1> OPERATOR_DIVIDE: resb 1 ; / 10212 00000005 ?? <1> OPERATOR_MODULO: resb 1 ; % 10213 00000006 ?? <1> OPERATOR_POWER: resb 1 ; ** 10214 00000007 ?? <1> OPERATOR_CMP_BELOW: resb 1 ; < 10215 00000008 ?? <1> OPERATOR_CMP_BELOW_EQUAL: resb 1 ; <= 10216 00000009 ?? <1> OPERATOR_CMP_ABOVE: resb 1 ; > 10217 0000000A ?? <1> OPERATOR_CMP_ABOVE_EQUAL: resb 1 ; >= 10218 0000000B ?? <1> OPERATOR_CMP_EQUAL: resb 1 ; == 10219 0000000C ?? <1> OPERATOR_CMP_NOT_EQUAL: resb 1 ; != 10220 0000000D ?? <1> OPERATOR_SHIFT_LEFT: resb 1 ; << 10221 0000000E ?? <1> OPERATOR_SHIFT_RIGHT: resb 1 ; >> 10222 0000000F ?? <1> OPERATOR_SHIFT_RIGHT_SIGNED: resb 1 ; >>> 10223 00000010 ?? <1> OPERATOR_BIT_MIRROR: resb 1 ; >< 10224 00000011 ?? <1> OPERATOR_BIT_OR: resb 1 ; | 10225 00000012 ?? <1> OPERATOR_BIT_XOR: resb 1 ; ^ 10226 00000013 ?? <1> OPERATOR_BIT_AND: resb 1 ; & 10227 00000014 ?? <1> OPERATOR_BOOL_OR: resb 1 ; || 10228 00000015 ?? <1> OPERATOR_BOOL_XOR: resb 1 ; ^^ 10229 00000016 ?? <1> OPERATOR_BOOL_AND: resb 1 ; && 10230 00000017 ?? <1> OPERATOR_COND: resb 1 ; ?? :: construct (special) 10231 00000018 ?? <1> OPERATOR_RIGHTOP: resb 1 ; (dummy right-operand operator) 10232 <1> endstruc 10233 <1> ; Order of BIT_* needs to be the same as that of BOOL_*. 10234 <1> ; BOOL_* have to follow directly behind BIT_*. 10235 <1> ; "r cf op= expr" depends on that. 10236 <1> 10237 <1> align 2, db 0 10238 <1> operatordispatchers: 10239 <1> .: 10240 000090B0 [FEAA] <1> dw od_plus ; + 10241 000090B2 [FBAA] <1> dw od_minus ; - 10242 000090B4 [01AB] <1> dw od_multiply ; * ** 10243 000090B6 [0BAB] <1> dw od_divide ; / 10244 000090B8 [0EAB] <1> dw od_modulo ; % 10245 000090BA [36AB] <1> dw od_below ; < <> <= << 10246 000090BC [11AB] <1> dw od_above ; > >< >= >> >>> 10247 000090BE [53AB] <1> dw od_equal ; == =< => 10248 000090C0 [65AB] <1> dw od_not ; != 10249 000090C2 [6DAB] <1> dw od_or ; | || 10250 000090C4 [78AB] <1> dw od_and ; & && 10251 000090C6 [83AB] <1> dw od_xor ; ^ ^^ 10252 000090C8 [95AB] <1> dw od_o ; o 10253 000090CA [95AB] <1> dw od_o ; O 10254 000090CC [9CAB] <1> dw od_a ; a 10255 000090CE [9CAB] <1> dw od_a ; A 10256 000090D0 [A3AB] <1> dw od_x ; x 10257 000090D2 [A3AB] <1> dw od_x ; X 10258 000090D4 [8EAB] <1> dw od_cond ; ? 10259 <1> .end: equ $ - . 10260 <1> .amount: equ ($ - .) / 2 10261 <1> %if .amount != operators.amount 10262 <1> %error String and table mismatch 10263 <1> %endif 10264 <1> %if .amount > 100h 10265 <1> %error Too many operator dispatchers 10266 <1> %endif 10267 <1> 10268 <1> 10269 <1> operatorprecedences: 10270 <1> .: 10271 000090D6 00 <1> db OPPREC_INVALID ; need this for some checks 10272 000090D7 0A <1> db OPPREC_ADDSUB ; + 10273 000090D8 0A <1> db OPPREC_ADDSUB ; - 10274 000090D9 0B <1> db OPPREC_MULDIV ; * 10275 000090DA 0B <1> db OPPREC_MULDIV ; / 10276 000090DB 0B <1> db OPPREC_MULDIV ; % 10277 000090DC 0C <1> db OPPREC_POWER ; ** 10278 000090DD 05 <1> db OPPREC_COMPARE ; < 10279 000090DE 05 <1> db OPPREC_COMPARE ; <= 10280 000090DF 05 <1> db OPPREC_COMPARE ; > 10281 000090E0 05 <1> db OPPREC_COMPARE ; >= 10282 000090E1 05 <1> db OPPREC_COMPARE ; == 10283 000090E2 05 <1> db OPPREC_COMPARE ; != 10284 000090E3 09 <1> db OPPREC_SHIFT ; << 10285 000090E4 09 <1> db OPPREC_SHIFT ; >> 10286 000090E5 09 <1> db OPPREC_SHIFT ; >>> 10287 000090E6 09 <1> db OPPREC_SHIFT ; >< 10288 000090E7 06 <1> db OPPREC_BIT_OR ; | 10289 000090E8 07 <1> db OPPREC_BIT_XOR ; ^ 10290 000090E9 08 <1> db OPPREC_BIT_AND ; & 10291 000090EA 02 <1> db OPPREC_BOOL_OR ; || 10292 000090EB 03 <1> db OPPREC_BOOL_XOR ; ^^ 10293 000090EC 04 <1> db OPPREC_BOOL_AND ; && 10294 000090ED 01 <1> db OPPREC_COND ; ?? :: construct 10295 000090EE 0D <1> db OPPREC_RIGHTOP ; getexpression: no number yet 10296 <1> .amount: equ $ - . 10297 <1> %if .amount != ops_size 10298 <1> %error Operators table size mismatch 10299 <1> %endif 10300 <1> 10301 <1> 10302 000090EF 00 <1> align 2, db 0 10303 <1> operatorfunctions: 10304 <1> .: 10305 000090F0 [DCA4] <1> dw error ; should not be called 10306 000090F2 [D3AB] <1> dw of_plus ; + 10307 000090F4 [D0AB] <1> dw of_minus ; - 10308 000090F6 [E0AB] <1> dw of_multiply ; * 10309 000090F8 [0BAC] <1> dw of_divide ; / 10310 000090FA [B0AB] <1> dw of_modulo ; % 10311 000090FC [82AC] <1> dw of_power ; ** 10312 000090FE [DBAC] <1> dw of_compare_below ; < 10313 00009100 [D5AC] <1> dw of_compare_below_equal ; <= 10314 00009102 [F3AC] <1> dw of_compare_above ; > 10315 00009104 [EDAC] <1> dw of_compare_above_equal ; >= 10316 00009106 [E7AC] <1> dw of_compare_equal ; == 10317 00009108 [E1AC] <1> dw of_compare_not_equal ; != 10318 0000910A [2EAD] <1> dw of_shift_left ; << 10319 0000910C [16AD] <1> dw of_shift_right ; >> 10320 0000910E [22AD] <1> dw of_shift_right_signed ; >>> 10321 00009110 [55AD] <1> dw of_bit_mirror ; >< 10322 00009112 [A0AD] <1> dw of_or_bitwise ; | 10323 00009114 [C3AD] <1> dw of_xor_bitwise ; ^ 10324 00009116 [B2AD] <1> dw of_and_bitwise ; & 10325 00009118 [ABAD] <1> dw of_or_boolean ; || 10326 0000911A [CDAD] <1> dw of_xor_boolean ; ^^ 10327 0000911C [BCAD] <1> dw of_and_boolean ; && 10328 0000911E [5BB7] <1> dw of_cond ; ?? :: construct 10329 00009120 [03AD] <1> dw of_rightop ; set to right operand 10330 <1> .amount: equ ($ - .) / 2 10331 <1> %if .amount != ops_size 10332 <1> %error Operators table size mismatch 10333 <1> %endif 10334 <1> 10335 <1> 10336 <1> usesection lDEBUG_CODE 10337 <1> 10338 <1> od_minus: 10339 0000AAFB B302 <1> mov bl, OPERATOR_MINUS 10340 0000AAFD C3 <1> retn 10341 <1> 10342 <1> od_plus: 10343 0000AAFE B301 <1> mov bl, OPERATOR_PLUS 10344 0000AB00 C3 <1> retn 10345 <1> 10346 <1> od_multiply: 10347 0000AB01 B303 <1> mov bl, OPERATOR_MULTIPLY 10348 0000AB03 3804 <1> cmp byte [si], al 10349 0000AB05 7503 <1> jne .ret 10350 0000AB07 46 <1> inc si 10351 0000AB08 B306 <1> mov bl, OPERATOR_POWER 10352 <1> .ret: 10353 0000AB0A C3 <1> retn 10354 <1> 10355 <1> od_divide: 10356 0000AB0B B304 <1> mov bl, OPERATOR_DIVIDE 10357 0000AB0D C3 <1> retn 10358 <1> 10359 <1> od_modulo: 10360 0000AB0E B305 <1> mov bl, OPERATOR_MODULO 10361 0000AB10 C3 <1> retn 10362 <1> 10363 <1> od_above: 10364 0000AB11 3804 <1> cmp byte [si], al 10365 0000AB13 7411 <1> je .shr 10366 0000AB15 803C3C <1> cmp byte [si], '<' 10367 0000AB18 7418 <1> je .mirror 10368 0000AB1A 803C3D <1> cmp byte [si], '=' 10369 0000AB1D 7403 <1> je .cmp_ae 10370 0000AB1F B309 <1> mov bl, OPERATOR_CMP_ABOVE 10371 0000AB21 C3 <1> retn 10372 <1> .cmp_ae: 10373 0000AB22 46 <1> inc si 10374 0000AB23 B30A <1> mov bl, OPERATOR_CMP_ABOVE_EQUAL 10375 0000AB25 C3 <1> retn 10376 <1> .shr: 10377 0000AB26 46 <1> inc si 10378 0000AB27 3804 <1> cmp byte [si], al 10379 0000AB29 7403 <1> je .sar 10380 0000AB2B B30E <1> mov bl, OPERATOR_SHIFT_RIGHT 10381 0000AB2D C3 <1> retn 10382 <1> .sar: 10383 0000AB2E 46 <1> inc si 10384 0000AB2F B30F <1> mov bl, OPERATOR_SHIFT_RIGHT_SIGNED 10385 0000AB31 C3 <1> retn 10386 <1> .mirror: 10387 0000AB32 46 <1> inc si 10388 0000AB33 B310 <1> mov bl, OPERATOR_BIT_MIRROR 10389 0000AB35 C3 <1> retn 10390 <1> 10391 <1> od_below: 10392 0000AB36 3804 <1> cmp byte [si], al 10393 0000AB38 7411 <1> je .shl 10394 0000AB3A 803C3E <1> cmp byte [si], '>' 10395 0000AB3D 7410 <1> je .ncmp 10396 0000AB3F 803C3D <1> cmp byte [si], '=' 10397 0000AB42 7403 <1> je .cmp_be 10398 0000AB44 B307 <1> mov bl, OPERATOR_CMP_BELOW 10399 0000AB46 C3 <1> retn 10400 <1> .cmp_be: 10401 0000AB47 46 <1> inc si 10402 0000AB48 B308 <1> mov bl, OPERATOR_CMP_BELOW_EQUAL 10403 0000AB4A C3 <1> retn 10404 <1> .shl: 10405 0000AB4B 46 <1> inc si 10406 0000AB4C B30D <1> mov bl, OPERATOR_SHIFT_LEFT 10407 0000AB4E C3 <1> retn 10408 <1> .ncmp: 10409 <1> od_not.ncmp: 10410 0000AB4F 46 <1> inc si 10411 0000AB50 B30C <1> mov bl, OPERATOR_CMP_NOT_EQUAL 10412 0000AB52 C3 <1> retn 10413 <1> 10414 <1> od_equal: 10415 0000AB53 803C3E <1> cmp byte [si], '>' 10416 0000AB56 74CA <1> je od_above.cmp_ae 10417 0000AB58 803C3C <1> cmp byte [si], '<' 10418 0000AB5B 74EA <1> je od_below.cmp_be 10419 0000AB5D 3804 <1> cmp byte [si], al 10420 0000AB5F 7509 <1> jne .invalid ; no valid operator --> 10421 <1> .cmp: 10422 0000AB61 46 <1> inc si 10423 0000AB62 B30B <1> mov bl, OPERATOR_CMP_EQUAL 10424 0000AB64 C3 <1> retn 10425 <1> 10426 <1> od_not: 10427 0000AB65 803C3D <1> cmp byte [si], '=' 10428 0000AB68 74E5 <1> je .ncmp 10429 <1> od_equal.invalid: 10430 0000AB6A B300 <1> mov bl, OPERATOR_INVALID 10431 0000AB6C C3 <1> retn 10432 <1> 10433 <1> od_or: 10434 0000AB6D 3804 <1> cmp byte [si], al 10435 0000AB6F 7403 <1> je .boolean 10436 0000AB71 B311 <1> mov bl, OPERATOR_BIT_OR 10437 0000AB73 C3 <1> retn 10438 <1> .boolean: 10439 0000AB74 46 <1> inc si 10440 0000AB75 B314 <1> mov bl, OPERATOR_BOOL_OR 10441 0000AB77 C3 <1> retn 10442 <1> od_and: 10443 0000AB78 3804 <1> cmp byte [si], al 10444 0000AB7A 7403 <1> je .boolean 10445 0000AB7C B313 <1> mov bl, OPERATOR_BIT_AND 10446 0000AB7E C3 <1> retn 10447 <1> .boolean: 10448 0000AB7F 46 <1> inc si 10449 0000AB80 B316 <1> mov bl, OPERATOR_BOOL_AND 10450 0000AB82 C3 <1> retn 10451 <1> 10452 <1> od_xor: 10453 0000AB83 3804 <1> cmp byte [si], al 10454 0000AB85 7403 <1> je .boolean 10455 0000AB87 B312 <1> mov bl, OPERATOR_BIT_XOR 10456 0000AB89 C3 <1> retn 10457 <1> .boolean: 10458 0000AB8A 46 <1> inc si 10459 0000AB8B B315 <1> mov bl, OPERATOR_BOOL_XOR 10460 0000AB8D C3 <1> retn 10461 <1> 10462 <1> 10463 <1> od_cond: 10464 0000AB8E B317 <1> mov bl, OPERATOR_COND 10465 0000AB90 BA[6C65] <1> mov dx, msg.questionmark 10466 0000AB93 EB13 <1> jmp od_string_common 10467 <1> 10468 <1> od_o: 10469 0000AB95 B311 <1> mov bl, OPERATOR_BIT_OR 10470 0000AB97 BA[6F65] <1> mov dx, msg.r 10471 0000AB9A EB0C <1> jmp od_string_common 10472 <1> 10473 <1> od_a: 10474 0000AB9C B313 <1> mov bl, OPERATOR_BIT_AND 10475 0000AB9E BA[7165] <1> mov dx, msg.nd 10476 0000ABA1 EB05 <1> jmp od_string_common 10477 <1> 10478 <1> od_x: 10479 0000ABA3 B312 <1> mov bl, OPERATOR_BIT_XOR 10480 0000ABA5 BA[6E65] <1> mov dx, msg.or 10481 <1> ; jmp od_string_common 10482 <1> 10483 <1> od_string_common: 10484 0000ABA8 E8E40C <1> call isstring? 10485 0000ABAB 7402 <1> je .ret 10486 <1> .none: 10487 0000ABAD 31DB <1> xor bx, bx 10488 <1> .ret: 10489 0000ABAF C3 <1> retn 10490 <1> 10491 <1> 10492 <1> ; (Binary) Expression operator functions, 10493 <1> ; used by getexpression. 10494 <1> ; These functions are called with: 10495 <1> ; INP: dword [hhvar] = previous number (left-hand operand) 10496 <1> ; byte [hhtype] = previous type 10497 <1> ; bx:dx = following number (right-hand operand) 10498 <1> ; ah = following type 10499 <1> ; OUT: bx:dx = result 10500 <1> ; ah = type 10501 <1> ; CHG: ax, cx 10502 <1> ; Note: Errors (divisor zero) are currently simply handled 10503 <1> ; by jumping to "error". 10504 <1> ; getexpression mustn't be called after until hhvar is 10505 <1> ; no longer used, as the call might overwrite hhvar. 10506 <1> ; 10507 <1> ; Type info (in ah and b[hhtype]) appears to be correctly 10508 <1> ; passed to here already. However, how should that be used? 10509 <1> ; 10510 <1> ; Quite simply, doing any arithmetic on two unsigned numbers 10511 <1> ; could return the smallest possible unsigned type (so that 10512 <1> ; if the result is <= 255 then the type is 1, if <= 65536 10513 <1> ; then the type is 2, else the type is 4). 10514 <1> ; 10515 <1> ; Handling two signed numbers here might be equally simple: 10516 <1> ; if the result is >= -128 && <= 127 then the type is 81h, 10517 <1> ; if the result is >= -32768 && <= 32767 then the type is 10518 <1> ; 82h, otherwise the type is 84h. Have to look into this. 10519 <1> ; (How does this interact with the unsignedness of the 10520 <1> ; actual computations?) 10521 <1> ; 10522 <1> ; It gets hairy when one operand is signed and the other 10523 <1> ; isn't; generally, two sub-cases of this exist: first, the 10524 <1> ; signed operand is positive, second, the signed operand is 10525 <1> ; negative. (Whether this distinction actually makes sense 10526 <1> ; for the implementation is still to be determined.) 10527 <1> ; Possible models: 10528 <1> ; * Result is always signed. 10529 <1> ; * Result is always unsigned(?!). 10530 <1> ; * Result is treated as signed, but if it's positive its 10531 <1> ; type is changed to unsigned. 10532 <1> ; 10533 <1> ; It is also possible that operators could be handled 10534 <1> ; differently, for example, (some) bit and boolean 10535 <1> ; operators could imply unsigned operands in any case. 10536 <1> ; (>>> obviously implies a signed left operand already.) 10537 <1> ; 10538 <1> ; Note that (signed) negative bit shifting counts could 10539 <1> ; imply reversing the operation; << becomes >> and such. 10540 <1> ; 10541 <1> ; Note that for the addition of, for example, bit rotation, 10542 <1> ; it would be useful to retain the originally used type 10543 <1> ; inside getdword. At the end of getdword, the current bit 10544 <1> ; counting could be changed to use the "signed" bit of the 10545 <1> ; types and then determine which signed or unsigned type is 10546 <1> ; large enough to hold the value. (It might already work 10547 <1> ; mostly like that.) (Is this specifically about binary 10548 <1> ; operators? - No. In fact, binary operators are the most 10549 <1> ; likely to be (one of) the syntactic element(s) which 10550 <1> ; should change (and possible 'optimize') types. - Then 10551 <1> ; this might still apply to unary operators, and brackets 10552 <1> ; and parentheses. In particular, the later should call 10553 <1> ; a different entry or instruct getdword not to optimize 10554 <1> ; the type at the end so as to retain it. - Although in 10555 <1> ; cases where that matters, the parentheses are arguably 10556 <1> ; unnecessary, aren't they?) 10557 <1> ; 10558 <1> ; It has to be decided whether there should be implicit 10559 <1> ; dispatching based on the operands' types' signedness. 10560 <1> ; For example, currently (with all operands being implied 10561 <1> ; to be unsigned) there exist >> and >>>, and there could 10562 <1> ; exist > and S>. With implicit signedness dispatching, the 10563 <1> ; behaviour of >> would change: it would expose the current 10564 <1> ; >>'s behaviour with an unsigned (left) operand, and the 10565 <1> ; current >>>'s behaviour with a signed (left) operand. 10566 <1> ; (Either U(nsigned)>> and S(igned)>> operators could then 10567 <1> ; exist, which would imply an unsigned or signed left 10568 <1> ; operand respectively, or the affected operands' signedness 10569 <1> ; could be changed with the currently available prefix or 10570 <1> ; possible new postfix unary operators. 10571 <1> of_modulo: 10572 0000ABB0 FF36[A695] <1> push word [hhvar+2] 10573 0000ABB4 FF36[A495] <1> push word [hhvar] 10574 0000ABB8 53 <1> push bx 10575 0000ABB9 52 <1> push dx 10576 0000ABBA E84E00 <1> call of_divide ; bx:dx := prev / foll 10577 0000ABBD 8F06[A495] <1> pop word [hhvar] 10578 0000ABC1 8F06[A695] <1> pop word [hhvar+2] 10579 0000ABC5 E81800 <1> call of_multiply ; bx:dx := (prev / foll) * foll 10580 0000ABC8 8F06[A495] <1> pop word [hhvar] 10581 0000ABCC 8F06[A695] <1> pop word [hhvar+2] 10582 <1> ; jmp short of_minus ; bx:dx := prev - ((prev / foll) * foll) 10583 <1> 10584 <1> of_minus: 10585 0000ABD0 E810FF <1> call calculate_minus_bxdx 10586 <1> of_plus: 10587 0000ABD3 0316[A495] <1> add dx, word [hhvar] 10588 0000ABD7 131E[A695] <1> adc bx, word [hhvar+2] 10589 <1> or_hhtype: 10590 0000ABDB 0A26[AD95] <1> or ah, byte [hhtype] 10591 0000ABDF C3 <1> retn 10592 <1> 10593 <1> of_multiply: ; bx:dx := var * bx:dx 10594 0000ABE0 0826[AD95] <1> or byte [hhtype], ah 10595 0000ABE4 56 <1> push si 10596 0000ABE5 57 <1> push di ; si:di is used as temporary storage 10597 0000ABE6 89D0 <1> mov ax, dx 10598 0000ABE8 50 <1> push ax 10599 0000ABE9 F726[A495] <1> mul word [hhvar] 10600 0000ABED 89C7 <1> mov di, ax 10601 0000ABEF 89D6 <1> mov si, dx 10602 0000ABF1 58 <1> pop ax 10603 0000ABF2 F726[A695] <1> mul word [hhvar+2] 10604 0000ABF6 01C6 <1> add si, ax 10605 0000ABF8 89D8 <1> mov ax, bx 10606 0000ABFA F726[A495] <1> mul word [hhvar] 10607 0000ABFE 01C6 <1> add si, ax 10608 <1> ; bx*[hhvar+2] not required, completely overflows 10609 0000AC00 89FA <1> mov dx, di 10610 0000AC02 89F3 <1> mov bx, si 10611 0000AC04 5F <1> pop di 10612 0000AC05 5E <1> pop si ; restore those 10613 <1> set_hhtype: 10614 0000AC06 8A26[AD95] <1> mov ah, byte [hhtype] 10615 0000AC0A C3 <1> retn 10616 <1> 10617 <1> of_divide: ; bx:dx := var / bx:dx 10618 0000AC0B 0826[AD95] <1> or byte [hhtype], ah 10619 0000AC0F 53 <1> push bx 10620 0000AC10 09D3 <1> or bx, dx ; divisor zero ? 10621 0000AC12 5B <1> pop bx 10622 0000AC13 7503E9C4F8 <1> jz error ; divisor zero ! 10623 0000AC18 EB48 <1> _386_jmps .32 ; 386, use 32-bit code --> 10624 0000AC1A 85DB <1> test bx, bx ; need only 16-bit divisor ? 10625 0000AC1C 7514 <1> jnz .difficultdiv16 ; nope --> 10626 0000AC1E 89D1 <1> mov cx, dx 10627 0000AC20 31D2 <1> xor dx, dx 10628 0000AC22 A1[A695] <1> mov ax, word [hhvar+2] ; dx:ax = high word of previous number 10629 0000AC25 F7F1 <1> div cx 10630 0000AC27 89C3 <1> mov bx, ax 10631 0000AC29 A1[A495] <1> mov ax, word [hhvar] ; ax = low word of previous number, dx = remainder 10632 0000AC2C F7F1 <1> div cx 10633 0000AC2E 89C2 <1> mov dx, ax ; bx:dx = result 10634 0000AC30 EBD4 <1> jmp set_hhtype 10635 <1> 10636 <1> .difficultdiv16: ; code adapted from Art of Assembly chapter 9 10637 <1> ; refer to http://www.plantation-productions.com/Webster/www.artofasm.com/DOS/ch09/CH09-4.html#HEADING4-99 10638 0000AC32 B92000 <1> mov cx, 32 10639 0000AC35 55 <1> push bp 10640 0000AC36 56 <1> push si 10641 0000AC37 57 <1> push di 10642 0000AC38 A1[A495] <1> mov ax, word [hhvar] 10643 0000AC3B 8B2E[A695] <1> mov bp, word [hhvar+2] ; bp:ax = previous number 10644 0000AC3F 31FF <1> xor di, di 10645 0000AC41 31F6 <1> xor si, si ; clear variable si:di 10646 0000AC43 92 <1> xchg ax, dx 10647 0000AC44 87EB <1> xchg bp, bx ; bx:dx = previous number, bp:ax = divisor 10648 <1> .bitloop: 10649 0000AC46 D1E2 <1> shl dx, 1 10650 0000AC48 D1D3 <1> rcl bx, 1 10651 0000AC4A D1D7 <1> rcl di, 1 10652 0000AC4C D1D6 <1> rcl si, 1 ; si:di:bx:dx << 1 10653 0000AC4E 39EE <1> cmp si, bp ; does the divisor fit into si:di here ? 10654 0000AC50 7502 <1> jne @F 10655 0000AC52 39C7 <1> cmp di, ax 10656 <1> @@: 10657 0000AC54 7205 <1> jb .trynext ; no --> 10658 <1> .goesinto: 10659 0000AC56 29C7 <1> sub di, ax 10660 0000AC58 19EE <1> sbb si, bp ; subtract divisor 10661 0000AC5A 42 <1> inc dx ; set a bit of the result (bit was zero before, never carries) 10662 <1> .trynext: 10663 0000AC5B E2E9 <1> loop .bitloop ; loop for 32 bits 10664 0000AC5D 5F <1> pop di 10665 0000AC5E 5E <1> pop si 10666 0000AC5F 5D <1> pop bp 10667 0000AC60 EBA4 <1> jmp set_hhtype 10668 <1> 10669 <1> %ifn _ONLYNON386 10670 <1> .32: 10671 <1> [cpu 386] 10672 0000AC62 6650 <1> push eax 10673 0000AC64 6653 <1> push ebx 10674 0000AC66 6652 <1> push edx ; to preserve the high words 10675 0000AC68 53 <1> push bx 10676 0000AC69 52 <1> push dx 10677 0000AC6A 665B <1> pop ebx ; ebx = following number 10678 0000AC6C 6631D2 <1> xor edx, edx 10679 0000AC6F 66A1[A495] <1> mov eax, dword [hhvar] ; edx:eax = previous number 10680 0000AC73 66F7F3 <1> div ebx 10681 0000AC76 665A <1> pop edx 10682 0000AC78 665B <1> pop ebx ; restore high words 10683 0000AC7A 6650 <1> push eax 10684 0000AC7C 5A <1> pop dx 10685 0000AC7D 5B <1> pop bx ; bx:dx = result 10686 0000AC7E 6658 <1> pop eax ; restore high word of eax 10687 <1> __CPU__ 10688 0000AC80 EB84 <1> jmp set_hhtype 10689 <1> %endif 10690 <1> 10691 <1> 10692 <1> of_power: 10693 0000AC82 0826[AD95] <1> or byte [hhtype], ah 10694 0000AC86 89D9 <1> mov cx, bx 10695 0000AC88 89D0 <1> mov ax, dx ; get exponent 10696 0000AC8A 09D3 <1> or bx, dx ; exponent zero ? 10697 0000AC8C BB0000 <1> mov bx, 0 10698 0000AC8F BA0100 <1> mov dx, 1 10699 0000AC92 743E <1> jz .ret ; yes, return with result as 1 --> 10700 0000AC94 3916[A495] <1> cmp word [hhvar], dx ; optimization: 10701 0000AC98 7506 <1> jne .notone 10702 0000AC9A 391E[A695] <1> cmp word [hhvar+2], bx 10703 0000AC9E 7432 <1> je .ret ; if base is one (and exponent not zero), result is 1 --> 10704 <1> .notone: 10705 0000ACA0 55 <1> push bp 10706 <1> 10707 <1> .loop: ; cx:ax non-zero here 10708 0000ACA1 D1E9 <1> shr cx, 1 10709 0000ACA3 D1D8 <1> rcr ax, 1 ; exponent /= 2 10710 0000ACA5 50 <1> push ax 10711 0000ACA6 51 <1> push cx 10712 0000ACA7 7303 <1> jnc .even ; if exponent was even --> 10713 0000ACA9 E834FF <1> call of_multiply ; var *= base 10714 <1> .even: 10715 <1> ; In the last iteration, cx:ax might be zero here 10716 <1> ; making the next call unnecessary. Oh well. 10717 0000ACAC 53 <1> push bx 10718 0000ACAD 52 <1> push dx 10719 0000ACAE 8B1E[A695] <1> mov bx, word [hhvar+2] 10720 0000ACB2 8B16[A495] <1> mov dx, word [hhvar] ; base 10721 0000ACB6 E827FF <1> call of_multiply ; * base = base squared 10722 0000ACB9 891E[A695] <1> mov word [hhvar+2], bx 10723 0000ACBD 8916[A495] <1> mov word [hhvar], dx ; store as new base 10724 0000ACC1 5A <1> pop dx 10725 0000ACC2 5B <1> pop bx 10726 0000ACC3 59 <1> pop cx 10727 0000ACC4 58 <1> pop ax 10728 <1> 10729 0000ACC5 89DD <1> mov bp, bx ; optimization: 10730 0000ACC7 09D5 <1> or bp, dx ; register now zero ? 10731 0000ACC9 7406 <1> jz .ret_bp ; if so, return now --> (multiplying zero always results in zero) 10732 0000ACCB 89CD <1> mov bp, cx 10733 0000ACCD 09C5 <1> or bp, ax ; exponent now zero ? 10734 0000ACCF 75D0 <1> jnz .loop ; no, loop --> 10735 <1> 10736 <1> .ret_bp: 10737 0000ACD1 5D <1> pop bp 10738 <1> .ret: 10739 0000ACD2 E931FF <1> jmp set_hhtype 10740 <1> 10741 <1> of_compare_below_equal: 10742 0000ACD5 E82C00 <1> call of_helper_compare 10743 0000ACD8 7628 <1> jbe of_helper_compare_true 10744 0000ACDA C3 <1> retn 10745 <1> 10746 <1> of_compare_below: 10747 0000ACDB E82600 <1> call of_helper_compare 10748 0000ACDE 7222 <1> jb of_helper_compare_true 10749 0000ACE0 C3 <1> retn 10750 <1> 10751 <1> of_compare_not_equal: 10752 0000ACE1 E82000 <1> call of_helper_compare 10753 0000ACE4 751C <1> jne of_helper_compare_true 10754 0000ACE6 C3 <1> retn 10755 <1> 10756 <1> of_compare_equal: 10757 0000ACE7 E81A00 <1> call of_helper_compare 10758 0000ACEA 7416 <1> je of_helper_compare_true 10759 0000ACEC C3 <1> retn 10760 <1> 10761 <1> of_compare_above_equal: 10762 0000ACED E81400 <1> call of_helper_compare 10763 0000ACF0 7310 <1> jae of_helper_compare_true 10764 0000ACF2 C3 <1> retn 10765 <1> 10766 <1> of_compare_above: 10767 0000ACF3 E80E00 <1> call of_helper_compare 10768 0000ACF6 770A <1> ja of_helper_compare_true 10769 0000ACF8 C3 <1> retn 10770 <1> 10771 <1> 10772 <1> ; Called by operator functions to convert a number to boolean 10773 <1> ; 10774 <1> ; INP: bx:dx 10775 <1> ; OUT: dx = 0 or 1 10776 <1> ; bx = 0 10777 <1> ; ZF 10778 <1> toboolean: 10779 0000ACF9 09D3 <1> or bx, dx ; = 0 iff it was 0000_0000h 10780 0000ACFB 83FB01 <1> cmp bx, byte 1 ; CY iff it was 0000_0000h, else NC 10781 0000ACFE 19D2 <1> sbb dx, dx ; -1 iff it was 0000_0000h, else 0 10782 0000AD00 31DB <1> xor bx, bx 10783 <1> 10784 <1> ; INP: dx 10785 <1> ; OUT: dx += 1 10786 <1> of_helper_compare_true: 10787 0000AD02 42 <1> inc dx ; bx:dx = 0 iff it was 0000_0000h, else 1 10788 <1> 10789 <1> ; Dummy operator computation function, 10790 <1> ; used when setting a register without operator (rr) 10791 <1> ; and to initialize the first getexpression loop iteration 10792 <1> ; INP: dword [hhvar] = previous number (left-hand operand) 10793 <1> ; byte [hhtype] = previous type 10794 <1> ; bx:dx = following number (right-hand operand) 10795 <1> ; ah = following type 10796 <1> ; OUT: bx:dx = result (right-hand operand) 10797 <1> ; ah = type 10798 <1> ; CHG: ax, cx 10799 <1> of_rightop: 10800 0000AD03 C3 <1> retn 10801 <1> 10802 <1> 10803 <1> ; Called by operator functions to compare operands 10804 <1> ; 10805 <1> ; INP: dword [hhvar], byte [hhtype] 10806 <1> ; bx:dx, ah 10807 <1> ; OUT: Flags as for "cmp d[hhvar], bxdx" 10808 <1> ; bx:dx = 0 10809 <1> ; ah = 0 10810 <1> of_helper_compare: 10811 0000AD04 30E4 <1> xor ah, ah ; type signed=0 pointer=0 10812 0000AD06 391E[A695] <1> cmp word [hhvar+2], bx 10813 0000AD0A 7504 <1> jne .ret 10814 0000AD0C 3916[A495] <1> cmp word [hhvar], dx 10815 <1> .ret: 10816 0000AD10 BB0000 <1> mov bx, 0 10817 0000AD13 89DA <1> mov dx, bx ; set both to zero (without affecting flags) 10818 0000AD15 C3 <1> retn 10819 <1> 10820 <1> of_shift_right: 10821 0000AD16 30E4 <1> xor ah, ah 10822 0000AD18 E81F00 <1> call of_helper_getshiftdata 10823 <1> .loop: 10824 0000AD1B D1EB <1> shr bx, 1 10825 0000AD1D D1DA <1> rcr dx, 1 10826 0000AD1F E2FA <1> loop .loop 10827 0000AD21 C3 <1> retn 10828 <1> 10829 <1> of_shift_right_signed: 10830 0000AD22 B440 <1> mov ah, 40h 10831 0000AD24 E81300 <1> call of_helper_getshiftdata 10832 <1> .loop: 10833 0000AD27 D1FB <1> sar bx, 1 10834 0000AD29 D1DA <1> rcr dx, 1 10835 0000AD2B E2FA <1> loop .loop 10836 0000AD2D C3 <1> retn 10837 <1> 10838 <1> of_shift_left: 10839 0000AD2E 30E4 <1> xor ah, ah 10840 0000AD30 E80700 <1> call of_helper_getshiftdata 10841 <1> .loop: 10842 0000AD33 D1E2 <1> shl dx, 1 10843 0000AD35 D1D3 <1> rcl bx, 1 10844 0000AD37 E2FA <1> loop .loop 10845 0000AD39 C3 <1> retn 10846 <1> 10847 <1> ; Called by operator functions to get shift data 10848 <1> ; 10849 <1> ; This returns to the next caller with the unchanged input 10850 <1> ; operand if the shift count is zero. Otherwise, large shift 10851 <1> ; counts are normalized so the returned value in cx is not 10852 <1> ; zero and not higher than 32. This normalization is not just 10853 <1> ; an optimization, it's required for shift counts that don't 10854 <1> ; fit into a 16-bit counter. 10855 <1> ; 10856 <1> ; INP: bx:dx = shift count 10857 <1> ; OUT: bx:dx = input operand 10858 <1> ; If shift count is >= 1 and <= 32, 10859 <1> ; cx = shift count 10860 <1> ; If shift count is > 32, 10861 <1> ; cx = 32 10862 <1> ; If shift count is zero, 10863 <1> ; discards one near return address before returning 10864 <1> ; CHG: cx 10865 <1> of_helper_getshiftdata: 10866 0000AD3A 89D1 <1> mov cx, dx 10867 0000AD3C 85DB <1> test bx, bx 10868 0000AD3E 7505 <1> jnz .largeshift 10869 0000AD40 83FA20 <1> cmp dx, byte 32 10870 0000AD43 7203 <1> jb .normalshift 10871 <1> .largeshift: 10872 0000AD45 B92000 <1> mov cx, 32 ; fix at maximal shift count 10873 <1> .normalshift: 10874 0000AD48 8B16[A495] <1> mov dx, word [hhvar] 10875 0000AD4C 8B1E[A695] <1> mov bx, word [hhvar+2] 10876 0000AD50 E301 <1> jcxz .break ; shift count zero, return input --> 10877 0000AD52 C3 <1> retn 10878 <1> 10879 <1> .break: 10880 0000AD53 59 <1> pop cx ; discard near return address 10881 0000AD54 C3 <1> retn 10882 <1> 10883 <1> of_bit_mirror: 10884 0000AD55 30E4 <1> xor ah, ah 10885 0000AD57 89D1 <1> mov cx, dx 10886 0000AD59 85DB <1> test bx, bx 10887 0000AD5B 7505 <1> jnz .large 10888 0000AD5D 83FA40 <1> cmp dx, byte 64 10889 0000AD60 7205 <1> jb .normal 10890 <1> .large: 10891 0000AD62 31DB <1> xor bx, bx ; mirror count 64 or higher: 10892 0000AD64 31D2 <1> xor dx, dx ; all 32 bits mirrored with (nonexistent) zero bits 10893 0000AD66 C3 <1> retn 10894 <1> .normal: 10895 0000AD67 8B16[A495] <1> mov dx, word [hhvar] 10896 0000AD6B 8B1E[A695] <1> mov bx, word [hhvar+2] 10897 0000AD6F 80F901 <1> cmp cl, 1 10898 0000AD72 762B <1> jbe .ret ; mirror count one or zero, return input --> 10899 0000AD74 56 <1> push si 10900 0000AD75 57 <1> push di 10901 <1> 10902 0000AD76 51 <1> push cx 10903 0000AD77 BFFFFF <1> mov di, -1 10904 0000AD7A 89FE <1> mov si, di 10905 <1> .loopmask: 10906 0000AD7C D1E7 <1> shl di, 1 10907 0000AD7E D1D6 <1> rcl si, 1 10908 0000AD80 E2FA <1> loop .loopmask ; create mask of bits not involved in mirroring 10909 0000AD82 21DE <1> and si, bx 10910 0000AD84 21D7 <1> and di, dx ; get the uninvolved bits 10911 0000AD86 59 <1> pop cx 10912 <1> 10913 0000AD87 56 <1> push si 10914 0000AD88 57 <1> push di ; save them 10915 0000AD89 31F6 <1> xor si, si 10916 0000AD8B 31FF <1> xor di, di ; initialize mirrored register 10917 <1> .loop: 10918 0000AD8D D1EB <1> shr bx, 1 10919 0000AD8F D1DA <1> rcr dx, 1 ; shift out of original register's current LSB 10920 0000AD91 D1D7 <1> rcl di, 1 10921 0000AD93 D1D6 <1> rcl si, 1 ; into other register's current LSB 10922 0000AD95 E2F6 <1> loop .loop 10923 0000AD97 5A <1> pop dx 10924 0000AD98 5B <1> pop bx ; restore uninvolved bits 10925 0000AD99 09F3 <1> or bx, si 10926 0000AD9B 09FA <1> or dx, di ; combine with mirrored bits 10927 <1> 10928 0000AD9D 5F <1> pop di 10929 0000AD9E 5E <1> pop si 10930 <1> .ret: 10931 0000AD9F C3 <1> retn 10932 <1> 10933 <1> of_or_bitwise: 10934 0000ADA0 0B16[A495] <1> or dx, word [hhvar] 10935 0000ADA4 0B1E[A695] <1> or bx, word [hhvar+2] ; bitwise or 10936 <1> or_hhtype_1: 10937 0000ADA8 E930FE <1> jmp or_hhtype 10938 <1> 10939 <1> of_or_boolean: 10940 0000ADAB E82700 <1> call of_helper_getbool 10941 0000ADAE 09DA <1> or dx, bx ; boolean or 10942 0000ADB0 EB20 <1> jmp short of_helper_retbool 10943 <1> 10944 <1> of_and_bitwise: 10945 0000ADB2 2316[A495] <1> and dx, word [hhvar] 10946 0000ADB6 231E[A695] <1> and bx, word [hhvar+2] ; bitwise and 10947 0000ADBA EBEC <1> jmp or_hhtype_1 10948 <1> 10949 <1> of_and_boolean: 10950 0000ADBC E81600 <1> call of_helper_getbool 10951 0000ADBF 21DA <1> and dx, bx ; boolean and 10952 0000ADC1 EB0F <1> jmp short of_helper_retbool 10953 <1> 10954 <1> of_xor_bitwise: 10955 0000ADC3 3316[A495] <1> xor dx, word [hhvar] 10956 0000ADC7 331E[A695] <1> xor bx, word [hhvar+2] ; bitwise xor 10957 0000ADCB EBDB <1> jmp or_hhtype_1 10958 <1> 10959 <1> of_xor_boolean: 10960 0000ADCD E80500 <1> call of_helper_getbool 10961 0000ADD0 31DA <1> xor dx, bx ; boolean xor 10962 <1> of_helper_retbool: 10963 0000ADD2 31DB <1> xor bx, bx ; high word always zero 10964 0000ADD4 C3 <1> retn 10965 <1> 10966 <1> ; Called by operator functions to convert operands to boolean 10967 <1> ; 10968 <1> ; INP: bx:dx = next number, ah = type 10969 <1> ; [hhvar] = previous number, [hhtype] = type 10970 <1> ; OUT: bx = next number's boolean value 10971 <1> ; dx = previous number's boolean value 10972 <1> ; ah = 0 10973 <1> of_helper_getbool: 10974 0000ADD5 30E4 <1> xor ah, ah 10975 0000ADD7 E81FFF <1> call toboolean 10976 0000ADDA 52 <1> push dx 10977 0000ADDB 8B16[A495] <1> mov dx, word [hhvar] 10978 0000ADDF 8B1E[A695] <1> mov bx, word [hhvar+2] 10979 0000ADE3 E813FF <1> call toboolean 10980 0000ADE6 5B <1> pop bx 10981 0000ADE7 C3 <1> retn 10982 <1> 10983 <1> 10984 <1> usesection lDEBUG_DATA_ENTRY 10985 <1> 10986 <1> isvariable_data: 10987 <1> 10988 <1> %if _DEBUG3 10989 <1> align 8, db 0 10990 <1> kregs: dd 0 10991 <1> dd 1 10992 <1> dd 0aa55aa55h 10993 <1> dd -1 10994 <1> times 12 dd 0 10995 <1> %endif 10996 <1> 10997 00009122 00 <1> align 8, db 0 10998 <1> isvariable_struc_list: 10999 <1> 11000 <1> %assign IVS_ONEBYTE 1 11001 <1> isvariable_struc_onebyte_list: 11002 <1> ; name, size, flags, address, array last index, array skip 11003 00009128 00003000[E40C]FF00 <1> isvariablestruc "V", 4, 0, vregs, 255 11004 <1> %if _DEBUG3 11005 <1> isvariablestruc "K", 4, 0, kregs, 15 11006 <1> %endif 11007 <1> isvariable_struc_onebyte_list_end: 11008 <1> 11009 <1> %assign IVS_ONEBYTE 0 11010 <1> isvariable_struc_morebyte_list: 11011 00009130 [A694]0100[E60B]00- <1> isvariablestruc "MMT", 1, 0, maxmachinetype 11011 00009137 00 <1> 11012 00009138 [A794]3103[7C00]04- <1> isvariablestruc "DCO", 4, ivfArrayOneBased | ivfArrayOptional, options, 4 11012 0000913F 00 <1> 11014 00009140 [A894]B103[8C00]04- <1> isvariablestruc "DCS", 4, ivfReadOnly | ivfArrayOneBased | ivfArrayOptional, startoptions, 4 11014 00009147 00 <1> 11016 00009148 [A994]B103[9C00]04- <1> isvariablestruc "DIF", 4, ivfReadOnly | ivfArrayOneBased | ivfArrayOptional, internalflags, 4 11016 0000914F 00 <1> 11018 00009150 [AA94]3100[AC00]00- <1> isvariablestruc "DAO", 4, 0, asm_options 11018 00009157 00 <1> 11020 00009158 [AB94]B100[B000]00- <1> isvariablestruc "DAS", 4, ivfReadOnly, asm_startoptions 11020 0000915F 00 <1> 11022 00009160 [AC94]B100[C80A]00- <1> isvariablestruc "DPI", 4, ivfReadOnly, psp22 11022 00009167 00 <1> 11024 00009168 [AD94]9100[A60A]00- <1> isvariablestruc "DPR", 2, ivfReadOnly, pspdbg 11024 0000916F 00 <1> 11026 00009170 [AE94]9100[CC0A]00- <1> isvariablestruc "DPP", 2, ivfReadOnly, parent 11026 00009177 00 <1> 11028 <1> %if _PM 11029 00009178 [AF94]D100[E8AD]00- <1> isvariablestruc "DPS", 2, ivfReadOnly | ivfSpecialSetUp, var_seldbg_setup 11029 0000917F 00 <1> 11031 <1> %endif 11032 <1> 11033 00009180 [B094]3100[F886]00- <1> isvariablestruc "PPC", 4, 0, default_pp_count 11033 00009187 00 <1> 11034 00009188 [B194]3100[FC86]00- <1> isvariablestruc "TPC", 4, 0, default_tp_count 11034 0000918F 00 <1> 11035 00009190 [B294]3100[0087]00- <1> isvariablestruc "TTC", 4, 0, default_tt_count 11035 00009197 00 <1> 11036 <1> 11037 00009198 [B394]3500[EC09]00- <1> isvariablestruc "RELIMIT", 4, 0, re_limit 11037 0000919F 00 <1> 11038 000091A0 [B894]3500[E809]00- <1> isvariablestruc "RECOUNT", 4, 0, re_count 11038 000091A7 00 <1> 11039 <1> 11040 000091A8 [BD94]1000[F20A]00- <1> isvariablestruc "RC", 2, 0, priorrc 11040 000091AF 00 <1> 11041 000091B0 [BD94]1100[F40A]00- <1> isvariablestruc "ERC", 2, 0, erc 11041 000091B7 00 <1> 11042 000091B8 [BE94]0400[110C]00- <1> isvariablestruc "QQCODE", 1, 0, termcode 11042 000091BF 00 <1> 11043 <1> 11044 <1> %if _PM 11045 <1> %assign var_addr_offset 4 11046 <1> %else 11047 <1> %assign var_addr_offset 2 11048 <1> %endif 11049 <1> 11050 000091C0 [C294]3100[000B]00- <1> isvariablestruc "AAO", var_addr_offset, 0, a_addr 11050 000091C7 00 <1> 11051 000091C8 [C394]1100[040B]00- <1> isvariablestruc "AAS", 2, 0, a_addr + saSegSel 11051 000091CF 00 <1> 11052 000091D0 [C494]3100[0A0B]00- <1> isvariablestruc "ADO", var_addr_offset, 0, d_addr 11052 000091D7 00 <1> 11053 000091D8 [C594]1100[0E0B]00- <1> isvariablestruc "ADS", 2, 0, d_addr + saSegSel 11053 000091DF 00 <1> 11054 000091E0 [C694]3100[140B]00- <1> isvariablestruc "ABO", var_addr_offset, 0, behind_r_u_addr 11054 000091E7 00 <1> 11055 000091E8 [C794]1100[180B]00- <1> isvariablestruc "ABS", 2, 0, behind_r_u_addr + saSegSel 11055 000091EF 00 <1> 11056 000091F0 [C894]3100[1E0B]00- <1> isvariablestruc "AUO", var_addr_offset, 0, u_addr 11056 000091F7 00 <1> 11057 000091F8 [C994]1100[220B]00- <1> isvariablestruc "AUS", 2, 0, u_addr + saSegSel 11057 000091FF 00 <1> 11058 00009200 [CA94]3100[280B]00- <1> isvariablestruc "AEO", var_addr_offset, 0, e_addr 11058 00009207 00 <1> 11059 00009208 [CB94]1100[2C0B]00- <1> isvariablestruc "AES", 2, 0, e_addr + saSegSel 11059 0000920F 00 <1> 11060 <1> %if _DSTRINGS 11061 00009210 [CC94]3100[320B]00- <1> isvariablestruc "AZO", var_addr_offset, 0, dz_addr 11061 00009217 00 <1> 11062 00009218 [CD94]1100[360B]00- <1> isvariablestruc "AZS", 2, 0, dz_addr + saSegSel 11062 0000921F 00 <1> 11063 00009220 [CE94]3100[3C0B]00- <1> isvariablestruc "ACO", var_addr_offset, 0, dcpm_addr 11063 00009227 00 <1> 11064 00009228 [CF94]1100[400B]00- <1> isvariablestruc "ACS", 2, 0, dcpm_addr + saSegSel 11064 0000922F 00 <1> 11065 00009230 [D094]3100[460B]00- <1> isvariablestruc "APO", var_addr_offset, 0, dcount_addr 11065 00009237 00 <1> 11066 00009238 [D194]1100[4A0B]00- <1> isvariablestruc "APS", 2, 0, dcount_addr + saSegSel 11066 0000923F 00 <1> 11067 00009240 [D294]3100[500B]00- <1> isvariablestruc "AWO", var_addr_offset, 0, dwcount_addr 11067 00009247 00 <1> 11068 00009248 [D394]1100[540B]00- <1> isvariablestruc "AWS", 2, 0, dwcount_addr + saSegSel 11068 0000924F 00 <1> 11069 <1> %endif 11070 <1> %if _PM 11071 00009250 [D494]3100[000B]00- <1> isvariablestruc "AXO", 4, 0, a_addr 11071 00009257 00 <1> 11072 <1> %endif 11073 <1> 11074 00009258 [D594]0100[E70B]00- <1> isvariablestruc "DSR", 1, 0, serial_rows 11074 0000925F 00 <1> 11075 00009260 [D694]0100[E80B]00- <1> isvariablestruc "DSC", 1, 0, serial_columns 11075 00009267 00 <1> 11076 00009268 [D794]0100[E90B]00- <1> isvariablestruc "DST", 1, 0, serial_keep_timeout 11076 0000926F 00 <1> 11077 <1> %if _USE_TX_FIFO 11078 00009270 [D894]0100[EA0B]00- <1> isvariablestruc "DSF", 1, 0, serial_fifo_size 11078 00009277 00 <1> 11079 <1> %endif 11080 00009278 [D994]0300[EC0B]00- <1> isvariablestruc "DSPVI", 1, 0, serial_var_intnum 11080 0000927F 00 <1> 11081 00009280 [DC94]8300[2209]00- <1> isvariablestruc "DSPUI", 1, ivfReadOnly, serial_use_intnum 11081 00009287 00 <1> 11082 00009288 [DF94]0300[ED0B]00- <1> isvariablestruc "DSPVS", 1, 0, serial_var_params 11082 0000928F 00 <1> 11083 00009290 [E294]8300[2309]00- <1> isvariablestruc "DSPUS", 1, ivfReadOnly, serial_use_params 11083 00009297 00 <1> 11084 00009298 [E594]0300[EE0B]00- <1> isvariablestruc "DSPVF", 1, 0, serial_var_fifo 11084 0000929F 00 <1> 11085 000092A0 [E894]8300[2409]00- <1> isvariablestruc "DSPUF", 1, ivfReadOnly, serial_use_fifo 11085 000092A7 00 <1> 11086 000092A8 [EB94]1300[F00B]00- <1> isvariablestruc "DSPVP", 2, 0, serial_var_baseport 11086 000092AF 00 <1> 11087 000092B0 [EE94]9300[2609]00- <1> isvariablestruc "DSPUP", 2, ivfReadOnly, serial_use_baseport 11087 000092B7 00 <1> 11088 000092B8 [F194]0300[F20B]00- <1> isvariablestruc "DSPVD", 1, 0, serial_var_dl 11088 000092BF 00 <1> 11089 000092C0 [F494]8300[2809]00- <1> isvariablestruc "DSPUD", 1, ivfReadOnly, serial_use_dl 11089 000092C7 00 <1> 11090 000092C8 [F794]0300[F40B]00- <1> isvariablestruc "DSPVM", 1, 0, serial_var_irqmask 11090 000092CF 00 <1> 11091 000092D0 [FA94]8300[2A09]00- <1> isvariablestruc "DSPUM", 1, ivfReadOnly, serial_use_irqmask 11091 000092D7 00 <1> 11092 <1> 11093 000092D8 [FD94]0100[F60B]00- <1> isvariablestruc "IOR", 1, 0, io_rows 11093 000092DF 00 <1> 11094 000092E0 [FE94]0100[F70B]00- <1> isvariablestruc "IOC", 1, 0, io_columns 11094 000092E7 00 <1> 11095 000092E8 [FF94]1100[F80B]00- <1> isvariablestruc "IOS", 2, 0, io_start_buffer 11095 000092EF 00 <1> 11096 000092F0 [0095]1100[FA0B]00- <1> isvariablestruc "IOE", 2, 0, io_end_buffer 11096 000092F7 00 <1> 11097 000092F8 [0195]1100[FC0B]00- <1> isvariablestruc "IOL", 2, 0, io_levels 11097 000092FF 00 <1> 11098 00009300 [0295]1100[FE0B]00- <1> isvariablestruc "IOF", 2, 0, io_flags 11098 00009307 00 <1> 11099 00009308 [0395]D100[F7AD]00- <1> isvariablestruc "IOI", 2, ivfReadOnly | ivfSpecialSetUp, var_ioi_setup 11099 0000930F 00 <1> 11100 <1> 11101 <1> %if _CATCHINT2D 11102 00009310 [0495]8500[6081]00- <1> isvariablestruc "AMISNUM", 1, ivfReadOnly, amis_multiplex_number 11102 00009317 00 <1> 11103 00009318 [0995]0800[4881]00- <1> isvariablestruc "TRYAMISNUM", 1, 0, try_amis_multiplex_number 11103 0000931F 00 <1> 11104 <1> %endif 11105 <1> 11106 00009320 [1195]3600[0490]00- <1> isvariablestruc "HHRESULT", 4, 0, hhresult 11106 00009327 00 <1> 11107 <1> 11108 <1> %if _DEBUG1 11109 <1> isvariablestruc "TRC", 2, ivfArrayOptional, test_records_Readmem + 4, 15, 4 11111 <1> isvariablestruc "TRA", 4, ivfArrayOptional, test_records_Readmem, 15, 2 11113 <1> isvariablestruc "TWC", 2, ivfArrayOptional, test_records_Writemem + 4, 15, 4 11115 <1> isvariablestruc "TWA", 4, ivfArrayOptional, test_records_Writemem, 15, 2 11117 <1> isvariablestruc "TLC", 2, ivfArrayOptional, test_records_getLinear + 4, 15, 4 11119 <1> isvariablestruc "TLA", 4, ivfArrayOptional, test_records_getLinear, 15, 2 11121 <1> isvariablestruc "TSC", 2, ivfArrayOptional, test_records_getSegmented + 4, 15, 4 11123 <1> isvariablestruc "TSA", 4, ivfArrayOptional, test_records_getSegmented, 15, 2 11125 <1> isvariablestruc "TRV", 1, 0, test_readmem_value 11127 <1> %endif 11128 <1> 11129 <1> 11130 <1> %if _PM 11131 00009328 [1795]B102[6C0B]0F- <1> isvariablestruc "SRO", 4, ivfArrayOptional | ivfReadOnly, search_results, 15, 2 11131 0000932F 02 <1> 11133 00009330 [1895]9102[700B]0F- <1> isvariablestruc "SRS", 2, ivfArrayOptional | ivfReadOnly, search_results + 4, 15, 4 11133 00009337 04 <1> 11135 <1> %else 11136 <1> isvariablestruc "SRO", 2, ivfArrayOptional | ivfReadOnly, search_results, 15, 2 11138 <1> isvariablestruc "SRS", 2, ivfArrayOptional | ivfReadOnly, search_results + 2, 15, 2 11140 <1> %endif 11141 00009338 [1995]B100[CC0B]00- <1> isvariablestruc "SRC", 4, ivfReadOnly, sscounter 11141 0000933F 00 <1> 11143 <1> 11144 00009340 [1A95]D004[D9B1]FF- <1> isvariablestruc "RI", 2, ivfSpecialSetUp | ivfSeparatorSpecial | ivfReadOnly, var_ri_setup, 255 11144 00009347 00 <1> 11146 <1> 11147 <1> %if _DEBUG3 11148 <1> isvariablestruc "MT", 4, ivfSpecialSetUp, var_mt_setup, 1 11149 <1> %endif 11150 <1> 11151 <1> %if _INPUT_FILE_BOOT || _INPUT_FILE_HANDLES 11152 00009348 [1A95]5102[5BB2]0F- <1> isvariablestruc "YSF", 2, ivfSpecialSetUp | ivfArrayOptional, var_ysf_setup, 15 11152 0000934F 00 <1> 11154 <1> %if _INPUT_FILE_HANDLES 11155 00009350 [1B95]5102[5BB2]0F- <1> isvariablestruc "YHF", 2, ivfSpecialSetUp | ivfArrayOptional, var_ysf_setup, 15 11155 00009357 00 <1> 11157 <1> %endif 11158 <1> %if _INPUT_FILE_BOOT 11159 00009358 [1C95]5102[5BB2]0F- <1> isvariablestruc "YBF", 2, ivfSpecialSetUp | ivfArrayOptional, var_ysf_setup, 15 11159 0000935F 00 <1> 11161 <1> %endif 11162 <1> %endif 11163 <1> 11164 <1> %if _ACCESS_VARIABLES_AMOUNT 11165 00009360 [1D95]B502[0483]03- <1> isvariablestruc "READADR", 4, ivfReadOnly | ivfArrayOptional, reading_access_variables, _ACCESS_VARIABLES_AMOUNT - 1, 4 11165 00009367 04 <1> 11167 00009368 [2295]B502[0883]03- <1> isvariablestruc "READLEN", 4, ivfReadOnly | ivfArrayOptional, reading_access_variables + 4, _ACCESS_VARIABLES_AMOUNT - 1, 4 11167 0000936F 04 <1> 11169 00009370 [2795]B502[2483]03- <1> isvariablestruc "WRITADR", 4, ivfReadOnly | ivfArrayOptional, writing_access_variables, _ACCESS_VARIABLES_AMOUNT - 1, 4 11169 00009377 04 <1> 11171 00009378 [2C95]B502[2883]03- <1> isvariablestruc "WRITLEN", 4, ivfReadOnly | ivfArrayOptional, writing_access_variables + 4, _ACCESS_VARIABLES_AMOUNT - 1, 4 11171 0000937F 04 <1> 11173 <1> %endif 11174 <1> 11175 <1> %if _PSPVARIABLES 11176 00009380 [3195]9200[A40A]00- <1> isvariablestruc "PSPS", 2, ivfReadOnly, pspdbe 11176 00009387 00 <1> 11177 00009388 [3395]D100[01AE]00- <1> isvariablestruc "PSP", 2, ivfReadOnly | ivfSpecialSetUp, var_psp_setup 11177 0000938F 00 <1> 11178 00009390 [3495]D100[0BAE]00- <1> isvariablestruc "PPR", 2, ivfReadOnly | ivfSpecialSetUp, var_ppr_setup 11178 00009397 00 <1> 11179 00009398 [3595]F100[24AE]00- <1> isvariablestruc "PPI", 4, ivfReadOnly | ivfSpecialSetUp, var_ppi_setup 11179 0000939F 00 <1> 11180 <1> %endif 11181 <1> 11182 <1> %if _BOOTLDR 11183 000093A0 [3695]4800[DAAE]FF- <1> isvariablestruc "BOOTUNITFL", 1, ivfSpecialSetUp, var_bootunitflags_setup, 255 11183 000093A7 00 <1> 11184 000093A8 [3E95]C900[98AE]00- <1> isvariablestruc "BOOTLDPUNIT", 1, ivfReadOnly | ivfSpecialSetUp, var_bootldpunit_setup 11184 000093AF 00 <1> 11185 000093B0 [4795]C900[9DAE]00- <1> isvariablestruc "BOOTSDPUNIT", 1, ivfReadOnly | ivfSpecialSetUp, var_bootsdpunit_setup 11185 000093B7 00 <1> 11186 <1> %if _INPUT_FILE_BOOT 11187 000093B8 [5095]C900[A2AE]00- <1> isvariablestruc "BOOTYDPUNIT", 1, ivfReadOnly | ivfSpecialSetUp, var_bootydpunit_setup 11187 000093BF 00 <1> 11188 <1> %endif 11189 000093C0 [5995]F900[B9AE]00- <1> isvariablestruc "BOOTLDPPART", 4, ivfReadOnly | ivfSpecialSetUp, var_bootldppart_setup 11189 000093C7 00 <1> 11190 000093C8 [6295]F900[BEAE]00- <1> isvariablestruc "BOOTSDPPART", 4, ivfReadOnly | ivfSpecialSetUp, var_bootsdppart_setup 11190 000093CF 00 <1> 11191 <1> %if _INPUT_FILE_BOOT 11192 000093D0 [6B95]F900[C3AE]00- <1> isvariablestruc "BOOTYDPPART", 4, ivfReadOnly | ivfSpecialSetUp, var_bootydppart_setup 11192 000093D7 00 <1> 11193 <1> %endif 11194 <1> %endif 11195 <1> 11196 000093D8 [7495]0900[4981]00- <1> isvariablestruc "TRYDEBUGNUM", 1, 0, try_debugger_amis_multiplex_number 11196 000093DF 00 <1> 11197 000093E0 [7D95]9700[1681]00- <1> isvariablestruc "DEBUGFUNC", 2, ivfReadOnly, debuggerfunction 11197 000093E7 00 <1> 11198 <1> 11199 <1> isvariable_struc_morebyte_list_end: 11200 <1> isvariable_struc_list_end: 11201 <1> 11202 <1> align 2, db 0 11203 000093E8 00000000 <1> interrupt_var: dd 0 11204 <1> align 2, db 0 11205 000093EC 0000 <1> ioi_var: dw 0 11206 <1> %if _PM 11207 <1> align 2, db 0 11208 000093EE 0000 <1> seldbg: dw 0 11209 <1> %endif 11210 <1> %if _PSPVARIABLES 11211 <1> align 2, db 0 11212 000093F0 0000 <1> psp_segment: dw 0 11213 000093F2 0000 <1> psp_parent: dw 0 11214 000093F4 00000000 <1> psp_pra: dd 0 11215 <1> %endif 11216 <1> 11217 <1> align 2, db 0 11218 <1> isvariable_morebyte_nameheaders: 11219 000093F8 4D4D44434443444944- <1> dw IVS_MOREBYTE_NAMEHEADERS 11219 00009401 414441445044504450- <1> 11219 0000940A 445050505450545452- <1> 11219 00009413 455245524345525151- <1> 11219 0000941C 414141414144414441- <1> 11219 00009425 424142415541554145- <1> 11219 0000942E 4145415A415A414341- <1> 11219 00009437 434150415041574157- <1> 11219 00009440 415844534453445344- <1> 11219 00009449 534453445344534453- <1> 11219 00009452 445344534453445344- <1> 11219 0000945B 53445344534453494F- <1> 11219 00009464 494F494F494F494F49- <1> 11219 0000946D 4F494F414D54524848- <1> 11219 00009476 535253525352524959- <1> 11219 0000947F 535948594252455245- <1> 11219 00009488 575257525053505350- <1> 11219 00009491 505050424F424F424F- <1> 11219 0000949A 424F424F424F424F54- <1> 11219 000094A3 524445 <1> 11220 <1> .end: 11221 <1> %if IVS_HAVE_ONEBYTE && ! IVS_SINGLE_ONEBYTE 11222 <1> isvariable_onebyte_names: 11223 <1> db IVS_ONEBYTE_NAMES 11224 <1> .end: 11225 <1> %endif 11226 <1> 11227 000094A6 544F53464F53495250- <1> isvariablestrings ISVARIABLESTRINGS 11227 000094AF 534343434C494D4954- <1> 11227 000094B8 434F554E5443434F44- <1> 11227 000094C1 454F534F534F534F53- <1> 11227 000094CA 4F534F534F534F534F- <1> 11227 000094D3 534F52435446505649- <1> 11227 000094DC 505549505653505553- <1> 11227 000094E5 505646505546505650- <1> 11227 000094EE 505550505644505544- <1> 11227 000094F7 50564D50554D524353- <1> 11227 00009500 454C464949534E554D- <1> 11227 00009509 59414D49534E554D52- <1> 11227 00009512 4553554C544F534346- <1> 11227 0000951B 464641444144524144- <1> 11227 00009524 4C454E495441445249- <1> 11227 0000952D 544C454E5053505249- <1> 11227 00009536 4F54554E4954464C4F- <1> 11227 0000953F 544C4450554E49544F- <1> 11227 00009548 54534450554E49544F- <1> 11227 00009551 54594450554E49544F- <1> 11227 0000955A 544C4450504152544F- <1> 11227 00009563 54534450504152544F- <1> 11227 0000956C 545944505041525459- <1> 11227 00009575 44454255474E554D42- <1> 11227 0000957E 554746554E43 <1> 11228 <1> 11229 <1> 11230 <1> usesection lDEBUG_CODE 11231 <1> isvariable_code: 11232 <1> 11233 <1> %if _PM 11234 <1> var_seldbg_setup: 11235 0000ADE8 BB[EE93] <1> mov bx, seldbg 11236 0000ADEB 832700 <1> and word [bx], byte 0 11237 0000ADEE E8DCE3 <1> call ispm 11238 0000ADF1 7502 <1> jnz @F 11239 0000ADF3 8C1F <1> mov word [bx], ds 11240 <1> @@: 11241 0000ADF5 F8 <1> clc 11242 0000ADF6 C3 <1> retn 11243 <1> %endif 11244 <1> 11245 <1> %if _DEBUG3 11246 <1> var_mt_setup: 11247 <1> mov bx, ax 11248 <1> add bx, bx 11249 <1> add bx, bx 11250 <1> mov di, bx 11251 <1> add bx, mtest_regs 11252 <1> add di, masks_test 11253 <1> clc 11254 <1> retn 11255 <1> %endif 11256 <1> 11257 <1> var_ioi_setup: 11258 0000ADF7 E8E60F <1> call peekc 11259 0000ADFA BB[EC93] <1> mov bx, ioi_var 11260 0000ADFD 8907 <1> mov word [bx], ax 11261 0000ADFF F8 <1> clc 11262 0000AE00 C3 <1> retn 11263 <1> 11264 <1> %if _PSPVARIABLES 11265 <1> var_psp_setup: 11266 0000AE01 BB[F093] <1> mov bx, psp_segment 11267 0000AE04 E83B00 <1> call var_get_psp_segment 11268 0000AE07 8907 <1> mov word [bx], ax 11269 0000AE09 F8 <1> clc 11270 0000AE0A C3 <1> retn 11271 <1> 11272 <1> 11273 <1> var_ppr_setup: 11274 0000AE0B BB[F293] <1> mov bx, psp_parent 11275 0000AE0E 31C0 <1> xor ax, ax 11276 0000AE10 8907 <1> mov word [bx], ax 11277 0000AE12 E84700 <1> call var_get_psp_selector 11278 0000AE15 7206 <1> jc @F 11279 0000AE17 26A11600 <1> mov ax, word [es:16h] 11280 0000AE1B 8907 <1> mov word [bx], ax ; retrieve parent process 11281 <1> @@: 11282 0000AE1D 16 <1> push ss 11283 0000AE1E 07 <1> pop es 11284 <1> %if _PM ; This is not really needed but does not hurt either. 11285 <1> ; getsegmented is used above, but only from PM. 11286 <1> ; This is assumed not to switch modes. 11287 0000AE1F E8578A <1> call resetmode ; reset mode if we switched 11288 <1> %endif 11289 0000AE22 F8 <1> clc 11290 0000AE23 C3 <1> retn 11291 <1> 11292 <1> 11293 <1> var_ppi_setup: 11294 0000AE24 BB[F493] <1> mov bx, psp_pra 11295 0000AE27 31C0 <1> xor ax, ax 11296 0000AE29 8907 <1> mov word [bx], ax 11297 0000AE2B 894702 <1> mov word [bx + 2], ax 11298 0000AE2E E82B00 <1> call var_get_psp_selector 11299 0000AE31 72EA <1> jc @B 11300 0000AE33 26A10A00 <1> mov ax, word [es:TPIV] 11301 0000AE37 8907 <1> mov word [bx], ax 11302 0000AE39 26A10C00 <1> mov ax, word [es:TPIV + 2] 11303 0000AE3D 894702 <1> mov word [bx + 2], ax ; retrieve Int22 address 11304 0000AE40 EBDB <1> jmp @B 11305 <1> 11306 <1> 11307 <1> var_get_psp_segment: 11308 0000AE42 A1[A40A] <1> mov ax, word [pspdbe] 11309 0000AE45 40 <1> inc ax ; FFFFh ? 11310 0000AE46 7410 <1> jz short .pspvar_psp_invalid ; yes, invalid --> 11311 0000AE48 48 <1> dec ax ; 0 ? 11312 0000AE49 740D <1> jz short .pspvar_psp_invalid ; yes, invalid --> 11313 <1> %if _PM 11314 0000AE4B 50 <1> push ax 11315 0000AE4C E830AF <1> call selector_to_segment 11316 0000AE4F 58 <1> pop ax 11317 0000AE50 40 <1> inc ax ; FFFFh ? 11318 0000AE51 7405 <1> jz short .pspvar_psp_invalid ; yes, invalid --> 11319 0000AE53 48 <1> dec ax ; 0 ? 11320 0000AE54 7402 <1> jz short .pspvar_psp_invalid ; yes, invalid --> 11321 <1> %endif 11322 0000AE56 F8 <1> clc 11323 0000AE57 C3 <1> retn 11324 <1> 11325 <1> .pspvar_psp_invalid: 11326 0000AE58 31C0 <1> xor ax, ax 11327 0000AE5A F9 <1> stc 11328 0000AE5B C3 <1> retn 11329 <1> 11330 <1> 11331 <1> var_get_psp_selector: 11332 0000AE5C E8E3FF <1> call var_get_psp_segment 11333 0000AE5F 7230 <1> jc .pspvar_psp_invalid 11334 <1> %if _PM 11335 0000AE61 E869E3 <1> call ispm 11336 0000AE64 751E <1> jnz short .pspvar_rm 11337 0000AE66 53 <1> push bx 11338 0000AE67 66 <1> _386_o32 ; push edx 11339 0000AE68 52 <1> push dx 11340 0000AE69 51 <1> push cx 11341 0000AE6A 31D2 <1> xor dx, dx 11342 0000AE6C B90400 <1> mov cx, 4 11343 <1> .pspvar_shift: 11344 0000AE6F D1E0 <1> shl ax, 1 11345 0000AE71 D1D2 <1> rcl dx, 1 11346 0000AE73 E2FA <1> loop .pspvar_shift ; dx:ax = PSP segment << 4 11347 0000AE75 E8268A <1> call getsegmented 11348 <1> ; getsegmented is assumed not to switch modes (see below). 11349 0000AE78 7219 <1> jc short .pspvar_error ; (shouldn't happen) 11350 0000AE7A 66 <1> _386_o32 11351 0000AE7B 85D2 <1> test dx, dx ; test edx, edx 11352 0000AE7D 7514 <1> jnz short .pspvar_error ; (assumed not to happen) 11353 0000AE7F 59 <1> pop cx 11354 0000AE80 66 <1> _386_o32 11355 0000AE81 5A <1> pop dx ; pop edx 11356 0000AE82 93 <1> xchg ax, bx ; ax = selector 11357 0000AE83 5B <1> pop bx 11358 <1> .pspvar_rm: 11359 <1> %endif 11360 0000AE84 8EC0 <1> mov es, ax ; es = segment/selector 11361 0000AE86 26813E0000CD20 <1> cmp word [es:0], 20CDh ; int 20h opcode ? 11362 0000AE8D 7502 <1> jne short .pspvar_psp_invalid ; no, invalid --> 11363 0000AE8F F8 <1> clc 11364 0000AE90 C3 <1> retn 11365 <1> 11366 <1> .pspvar_psp_invalid: 11367 0000AE91 F9 <1> stc 11368 0000AE92 C3 <1> retn 11369 <1> 11370 <1> .pspvar_error: 11371 0000AE93 31F6 <1> xor si, si 11372 0000AE95 E944F6 <1> jmp error 11373 <1> %endif 11374 <1> 11375 <1> 11376 <1> %if _BOOTLDR 11377 <1> var_bootldpunit_setup: 11378 0000AE98 BB[308C] <1> mov bx, loaddata_loadedfrom - LOADDATA + bsBPB + ebpbNew + bpbnBootUnit 11380 0000AE9B EB45 <1> jmp @F 11381 <1> 11382 <1> var_bootsdpunit_setup: 11383 0000AE9D BB[D08C] <1> mov bx, load_data - LOADDATA2 + bsBPB + ebpbNew + bpbnBootUnit 11385 0000AEA0 EB40 <1> jmp @F 11386 <1> 11387 <1> %if _INPUT_FILE_BOOT 11388 <1> var_bootydpunit_setup: 11389 0000AEA2 F606[A300]02 <1> testopt [internalflags2], dif2_input_file_boot 11390 0000AEA7 7440 <1> jz .retc 11391 <1> 11392 0000AEA9 52 <1> push dx 11393 0000AEAA B8A000 <1> mov ax, LOAD_INPUT_FILE_SIZE 11394 0000AEAD F726[B08F] <1> mul word [load_input_file.active] 11395 0000AEB1 5A <1> pop dx 11396 <1> 11397 0000AEB2 93 <1> xchg ax, bx 11398 0000AEB3 8D9F[B08D] <1> lea bx, [load_input_file + bx - LOADDATA3 + bsBPB + ebpbNew + bpbnBootUnit] 11400 0000AEB7 EB29 <1> jmp @F 11401 <1> %endif 11402 <1> 11403 <1> var_bootldppart_setup: 11404 0000AEB9 BB[0C8C] <1> mov bx, loaddata_loadedfrom - LOADDATA + bsBPB + bpbHiddenSectors 11406 0000AEBC EB24 <1> jmp @F 11407 <1> 11408 <1> var_bootsdppart_setup: 11409 0000AEBE BB[AC8C] <1> mov bx, load_data - LOADDATA2 + bsBPB + bpbHiddenSectors 11411 0000AEC1 EB1F <1> jmp @F 11412 <1> 11413 <1> %if _INPUT_FILE_BOOT 11414 <1> var_bootydppart_setup: 11415 0000AEC3 F606[A300]02 <1> testopt [internalflags2], dif2_input_file_boot 11416 0000AEC8 741F <1> jz .retc 11417 <1> 11418 0000AECA 52 <1> push dx 11419 0000AECB B8A000 <1> mov ax, LOAD_INPUT_FILE_SIZE 11420 0000AECE F726[B08F] <1> mul word [load_input_file.active] 11421 0000AED2 5A <1> pop dx 11422 <1> 11423 0000AED3 93 <1> xchg ax, bx 11424 0000AED4 8D9F[8C8D] <1> lea bx, [load_input_file + bx - LOADDATA3 + bsBPB + bpbHiddenSectors] 11426 0000AED8 EB08 <1> jmp @F 11427 <1> %endif 11428 <1> 11429 <1> var_bootunitflags_setup: 11430 0000AEDA 05[908A] <1> add ax, load_unit_flags 11431 0000AEDD 89C3 <1> mov bx, ax 11432 0000AEDF BF[9095] <1> mov di, mask_bootunitflags 11433 <1> @@: 11434 0000AEE2 F606[9D00]40 <1> testopt [internalflags], nodosloaded 11435 0000AEE7 7501 <1> jnz @F ; (NC) 11436 <1> var_bootydpunit_setup.retc: 11437 <1> var_bootydppart_setup.retc: 11438 0000AEE9 F9 <1> stc 11439 <1> @@: 11440 0000AEEA C3 <1> retn 11441 <1> %endif 11442 <1> 11443 <1> 11444 <1> usesection lDEBUG_DATA_ENTRY 11445 <1> 11446 <1> align 4, db 0 11447 <1> masks: 11448 <1> ; size 4 want masks + 0 11449 <1> ; size 3 want masks + 1 11450 <1> ; size 2 want masks + 2 11451 <1> ; size 1 want masks + 3 11452 <1> ; size 0 want masks + 4 11453 <1> ; 4 - size = offset into masks 11454 00009584 00 <1> mask_4byte: db 0 11455 00009585 00 <1> mask_3byte: db 0 11456 00009586 00 <1> mask_2byte: db 0 11457 00009587 00 <1> mask_1byte: db 0 11458 00009588 FFFFFFFF <1> mask_0byte: dd -1 11459 0000958C FF0FFFFF <1> mask_ysf: dd ~ (ifhfTestReserved1 | ifhfTestReserved2 | ifhfQuietInput | ifhfQuietOutput) 11461 <1> %if _BOOTLDR 11462 00009590 FEFFFFFF <1> mask_bootunitflags: dd ~ luf_mask_writable 11463 <1> %endif 11464 <1> 11465 <1> %if _DEBUG3 11466 <1> masks_test: 11467 <1> mask_test_0: dd 0AA55AA55h 11468 <1> mask_test_1: dd 00FF00FFh 11469 <1> mtest_regs: 11470 <1> mtest_reg_0: dd 0 11471 <1> mtest_reg_1: dd 00110022h 11472 <1> %endif 11473 <1> 11474 <1> 11475 <1> usesection lDEBUG_CODE 11476 <1> ; INP: al = first character 11477 <1> ; si-> next character 11478 <1> ; OUT: CY if no variable, 11479 <1> ; al, si = unchanged 11480 <1> ; NC if variable, 11481 <1> ; bx-> low word 11482 <1> ; dx-> high word 11483 <1> ; (if cl <= 2 then dx-> some word in our memory) 11484 <1> ; (dx != bx+2 if compound register) 11485 <1> ; cl = size of variable (1, 2, 3, 4 bytes) 11486 <1> ; ch = size of variable's name (2..13 bytes) 11487 <1> ; INP:si - 1 -> variable's name 11488 <1> ; (can be modified from original content) 11489 <1> ; ah = 0 if a writeable variable (ie simply memory) 11490 <1> ; 1 if a read-only variable (ie simply memory) 11491 <1> ; 2..33 if an MMX register, see note below 11492 <1> ; al = next character behind variable 11493 <1> ; si-> behind next character 11494 <1> ; dword [di] = mask of bits that are read-only 11495 <1> ; CHG: ah, bx, dx, cx, di 11496 <1> ; STT: ss = ds = es, UP 11497 <1> ; 11498 <1> ; Note: For read access to (half of) an MMX register, no 11499 <1> ; special handling is necessary at all, because cl, 11500 <1> ; bx, and dx are set up to access a buffer that 11501 <1> ; contains the current value. (The value should be 11502 <1> ; read at once though, as the buffer may be shared 11503 <1> ; or become outdated otherwise.) 11504 <1> ; Write access to an MMX register must be handled 11505 <1> ; specifically, however. The returned field type 11506 <1> ; in ah indicates the register number (0..7) in the 11507 <1> ; lowest three bits. The two bits above those specify 11508 <1> ; the access type, which also specifies what was read 11509 <1> ; but need not be examined by readers. The access 11510 <1> ; type must be adhered to by writers. These are the 11511 <1> ; access types: 11512 <1> ; 0 zero extension from 32 bits to write all 64 bits 11513 <1> ; 1 sign extension from 32 bits to write all 64 bits 11514 <1> ; 2 writes only low 32 bits 11515 <1> ; 3 writes only high 32 bits 11516 <1> ; (Access type 3 is the only one for which the read 11517 <1> ; buffer is initialised with the high 32 bits.) 11518 <1> ; 11519 <1> ; As dx points to 'some word in our memory' if it 11520 <1> ; doesn't serve any purpose, it is still valid to 11521 <1> ; read the word that it points to. Particularly dx 11522 <1> ; mustn't contain 0FFFFh then, but with the current 11523 <1> ; implementation, it can also be assumed that we do 11524 <1> ; actually 'own' the word (even with a PM segment 11525 <1> ; shorter than 64 KiB the read would be allowed). 11526 <1> isvariable?: 11527 0000AEEB A8 <1> db __TEST_IMM8 ; (skip stc, NC) 11528 <1> 11529 <1> ; As above but additionally: 11530 <1> ; 11531 <1> ; INP: di -> buffer to receive variable name, 14 bytes 11532 <1> ; OUT: if NC, buffer filled with all-caps ASCIZ name 11533 <1> .return_name: 11534 0000AEEC F9 <1> stc 11535 <1> 11536 0000AEED 4E <1> dec si 11537 <1> lframe 11538 0000AEEE 5589E5 <1> lenter 11539 <1> lvar word, bit0_is_return_name 11540 0000AEF1 9C <1> pushf 11541 <1> lvar word, return_name_pointer 11542 0000AEF2 57 <1> push di 11543 0000AEF3 31C0 <1> xor ax, ax 11544 <1> lvar 16, namebuffer 11545 0000AEF5 50 <1> push ax ; ax = 0 so that accidentally reading past 11546 <1> ; the actual buffer wouldn't match 11547 0000AEF6 FF740C <1> push word [si+12] 11548 0000AEF9 FF740A <1> push word [si+10] 11549 0000AEFC FF7408 <1> push word [si+8] 11550 0000AEFF FF7406 <1> push word [si+6] 11551 0000AF02 FF7404 <1> push word [si+4] 11552 0000AF05 FF7402 <1> push word [si+2] 11553 0000AF08 FF34 <1> push word [si] 11554 0000AF0A 89E7 <1> mov di, sp ; -> name buffer 11555 <1> 11556 <1> lvar word, fieldtype_high_flags_low 11557 <1> lequ ?fieldtype_high_flags_low + 1, fieldtype 11558 <1> lequ ?fieldtype_high_flags_low, flags 11559 0000AF0C 50 <1> push ax ; field type initialised to 0 (RW), flags too 11560 0000AF0D 31DB <1> _386 xor bx, bx ; (a flag for the 32-bit register name check) 11561 <1> lvar word, length_to_add 11562 0000AF0F 50 <1> push ax ; = 0 11563 <1> lvar word, startpointer 11564 0000AF10 56 <1> push si ; -> name start 11565 0000AF11 89FE <1> mov si, di 11566 0000AF13 57 <1> push di 11567 <1> 11568 0000AF14 B91000 <1> mov cx, 16 11569 <1> .store: 11570 0000AF17 AC <1> lodsb 11571 <1> ; call uppercase ; (isseparator? calls uppercase) 11572 0000AF18 E8AEFA <1> call isseparator? 11573 0000AF1B F8 <1> clc 11574 0000AF1C 7501 <1> jne short .not_separator 11575 0000AF1E F9 <1> stc 11576 <1> .not_separator: 11577 0000AF1F D1DA <1> rcr dx, 1 ; dl = flags indicating separators 11578 0000AF21 AA <1> stosb 11579 0000AF22 E2F3 <1> loop .store 11580 <1> 11581 0000AF24 5E <1> pop si 11582 <1> 11583 0000AF25 F646FE01 <1> test byte [bp + ?bit0_is_return_name], 1 11584 0000AF29 7409 <1> jz @F 11585 <1> 11586 0000AF2B 56 <1> push si 11587 0000AF2C B107 <1> mov cl, 14 >> 1 11588 0000AF2E 8B7EFC <1> mov di, word [bp + ?return_name_pointer] 11589 0000AF31 F3A5 <1> rep movsw 11590 0000AF33 5E <1> pop si 11591 <1> 11592 <1> @@: 11593 0000AF34 F6C214 <1> test dl, 1<<2|1<<4 11594 0000AF37 AD <1> lodsw 11595 0000AF38 7460 <1> jz short .notreg16 11596 <1> 11597 0000AF3A E84700 <1> call .reg16names_match ; (iff no match, --> .notreg16) 11598 <1> ; bx-> regs entry of (first) match 11599 0000AF3D F6C204 <1> test dl, 1<<2 11600 0000AF40 AD <1> lodsw 11601 0000AF41 7403E99000 <1> jnz .reg16 ; iff single match --> 11602 <1> 11603 <1> ; Check for a second 16-bit register name 11604 <1> ; (ie check for a compound register name) 11605 0000AF46 E83B00 <1> call .reg16names_match ; (iff no match, --> .notreg16) 11606 <1> ; bx-> regs entry of second match 11607 0000AF49 92 <1> xchg dx, ax ; dx-> regs entry of first match 11608 0000AF4A B90404 <1> mov cx, 4<<8|4 11609 <1> .return_success: ; cx, bx, dx, ?fieldtype set 11610 0000AF4D 31C0 <1> xor ax, ax 11611 0000AF4F 88C8 <1> mov al, cl 11612 0000AF51 F7D8 <1> neg ax 11613 0000AF53 05[8895] <1> add ax, masks + 4 ; 4 - size = offset into masks 11614 0000AF56 97 <1> xchg di, ax ; di -> mask 11615 0000AF57 807EEB01 <1> cmp byte [bp + ?fieldtype], 1 11616 0000AF5B 7503 <1> jne @F 11617 0000AF5D BF[8895] <1> mov di, mask_0byte ; di -> mask 11618 <1> @@: 11619 <1> .return_success_di: 11620 0000AF60 31C0 <1> xor ax, ax 11621 0000AF62 88E8 <1> mov al, ch ; ax = length 11622 <1> 11623 0000AF64 F646FE01 <1> test byte [bp + ?bit0_is_return_name], 1 11624 0000AF68 7407 <1> jz @F 11625 <1> 11626 0000AF6A 8B76FC <1> mov si, word [bp + ?return_name_pointer] 11627 0000AF6D 01C6 <1> add si, ax 11628 0000AF6F 8824 <1> mov byte [si], ah ; zero-terminate 11629 <1> @@: 11630 <1> 11631 0000AF71 5E <1> pop si ; ?startpointer 11632 0000AF72 F646EA01 <1> testopt [bp + ?flags], 1 11633 0000AF76 7402 <1> jz @F 11634 0000AF78 58 <1> pop ax ; get length to add to start 11635 0000AF79 50 <1> push ax ; fill stack slot again 11636 <1> @@: 11637 0000AF7A 01C6 <1> add si, ax ; -> behind name (should NC) 11638 0000AF7C 58 <1> pop ax ; discard ?length_to_add 11639 0000AF7D F8 <1> clc ; (NC) 11640 <1> .return_ax_frame_lodsb: 11641 0000AF7E 58 <1> pop ax ; ah = ?type 11642 0000AF7F 89EC5D <1> lleave code 11643 0000AF82 AC <1> lodsb 11644 <1> .retn: 11645 0000AF83 C3 <1> retn 11646 <1> 11647 <1> 11648 <1> ; INP: ax = capitalised candidate register name 11649 <1> ; ch = 0 11650 <1> ; dx, si, bx, etc set up for later checks 11651 <1> ; OUT: Iff match, 11652 <1> ; bx-> associated regs entry (dword-aligned) 11653 <1> ; ax = INP:bx 11654 <1> ; Else, 11655 <1> ; returns to .notreg16 11656 <1> ; bx left unchanged on 386 systems 11657 <1> ; CHG: cl, di, bx, ax 11658 <1> ; 11659 <1> ; Note: The 32-bit register name check depends on the 11660 <1> ; fact that the low two bits of bx are set to 11661 <1> ; zero on a match, which is true because regs 11662 <1> ; is dword-aligned. 11663 <1> ; It also depends on bx being left unchanged on 11664 <1> ; a mismatch, which is the case unless the 11665 <1> ; non-386 additional FS,GS filtering occurs. 11666 <1> .reg16names_match: 11667 0000AF84 BF[7480] <1> mov di, reg16names 11668 0000AF87 B110 <1> mov cl, 16 11669 0000AF89 F2AF <1> repne scasw 11670 0000AF8B 750C <1> jne short .notreg16_pop ; no match --> 11671 0000AF8D 01FF <1> add di, di 11672 0000AF8F 93 <1> xchg ax, bx ; (returned for compound register name match) 11673 0000AF90 8D9D[7809] <1> lea bx, [di -2*(reg16names+DATASECTIONFIXUP+2) +regs] 11674 <1> ; -> regs entry 11675 0000AF94 C3 <1> _386 retn 11676 <1> ; cx = number of remaining reg16names 11677 0000AF95 D1E9 <1> _no386 shr cx, 1 ; cx = number of remaining reg16names pairs 11678 <1> ; = 1 iff exactly the IP,FL pair remaining 11679 <1> ; (ie matched one of FS,GS) 11680 0000AF97 E2EA <1> _no386 loop .retn ; iff cx != 1, return the match --> 11681 <1> ; on non-386 systems, FS,GS matches fall through here 11682 <1> .notreg16_pop: 11683 0000AF99 58 <1> pop ax ; (discard near return address) 11684 <1> .notreg16: 11685 <1> ; Check for a 32-bit register name 11686 0000AF9A F6C208 <1> _386 test dl, 1<<3 11687 0000AF9D 7419 <1> _386 jz short .notreg32 11688 <1> 11689 0000AF9F 8D76EC <1> _386 lea si, [bp+?namebuffer] 11690 0000AFA2 AC <1> _386 lodsb 11691 0000AFA3 D0EB <1> _386 shr bl, 1 ; CY iff second entry during same call 11692 <1> ; (in that case, al contains 'E') 11693 0000AFA5 1C45 <1> _386 sbb al, 'E' ; possibly an 'E' register ? (on first entry) 11694 0000AFA7 AD <1> _386 lodsw 11695 0000AFA8 750E <1> _386 jne short .notreg32 ; no --> (or after second entry) 11696 0000AFAA 43 <1> _386 inc bx ; prepare flag for second entry 11697 <1> ; (this requires regs to be dword-aligned!) 11698 0000AFAB 80FC53 <1> _386 cmp ah, 'S' ; candidate segment register ? 11699 0000AFAE 7408 <1> _386 je short .notreg32 ; yes, skip check (disallow match) --> 11700 <1> 11701 0000AFB0 E8D1FF <1> _386 call .reg16names_match ; (iff no match, --> .notreg16 (second entry)) 11702 <1> ; bx-> regs entry of match 11703 0000AFB3 B90403 <1> _386 mov cx, 3<<8|4 11704 0000AFB6 EB22 <1> _386 jmp short .return_success_var32_set_dx 11705 <1> 11706 <1> .notreg32: 11707 <1> ; Check for an 8-bit register name 11708 0000AFB8 F6C204 <1> test dl, 1<<2 11709 0000AFBB 7423 <1> jz short .notreg8 11710 <1> 11711 0000AFBD 8D76EC <1> lea si, [bp+?namebuffer] 11712 0000AFC0 AD <1> lodsw 11713 0000AFC1 BF[6480] <1> mov di, reg8names 11714 0000AFC4 B108 <1> mov cl, 8 11715 0000AFC6 F2AF <1> repne scasw 11716 0000AFC8 7516 <1> jne short .notreg8 11717 <1> ; cx = cl = number of remaining reg8names 11718 0000AFCA 80E101 <1> and cl, 1 ; cx = cl = 1 iff an xL register, else 0 11719 0000AFCD 8D9DFD8B <1> lea bx, [di-reg8names-2+regs-1] 11720 <1> ; bx-> reg_eax-1 if AL, reg_eax+1 if AH, etc 11721 0000AFD1 01CB <1> add bx, cx ; bx-> reg_eax if AL, reg_eax+1 if AH, etc 11722 0000AFD3 B101 <1> mov cl, 1 11723 <1> 11724 0000AFD5 A9 <1> db __TEST_IMM16 ; (NC, skip mov) 11725 <1> .reg16: 11726 0000AFD6 B102 <1> mov cl, 2 11727 <1> .got2bytename: 11728 <1> .got2bytename_var32_set_dx: 11729 0000AFD8 B502 <1> mov ch, 2 11730 <1> .return_success_var32_set_dx: 11731 0000AFDA 8D5702 <1> lea dx, [bx+2] ; (irrelevant to 8-/16-bit register return) 11732 <1> %define .return_success_j .return_success_j1 11733 <1> %[.return_success_j]: 11734 0000AFDD E96DFF <1> jmp .return_success 11735 <1> 11736 <1> .notreg8: 11737 <1> 11738 0000AFE0 BF[F893] <1> mov di, isvariable_morebyte_nameheaders 11739 <1> 11740 <1> .loop: 11741 0000AFE3 8B46EC <1> mov ax, word [bp + ?namebuffer] 11742 0000AFE6 B9[A694] <1> mov cx, isvariable_morebyte_nameheaders.end 11743 0000AFE9 39CF <1> cmp di, cx 11744 0000AFEB 730A <1> jae @F 11745 0000AFED 29F9 <1> sub cx, di 11746 0000AFEF D1E9 <1> shr cx, 1 ; = how many headers remaining 11747 0000AFF1 F2AF <1> repne scasw 11748 0000AFF3 741E <1> je .check_morebyte 11749 <1> %if IVS_HAVE_ONEBYTE 11750 0000AFF5 EB0C <1> jmp .next_no_pop 11751 <1> 11752 <1> @@: 11753 <1> %if IVS_SINGLE_ONEBYTE 11754 0000AFF7 41 <1> inc cx 11755 0000AFF8 39CF <1> cmp di, cx ; iteration after one byte var check ? 11756 0000AFFA 7309 <1> jae @F ; yes, end --> 11757 0000AFFC 47 <1> inc di ; remember we did the one byte check 11758 0000AFFD 3C56 <1> cmp al, IVS_SINGLE_ONEBYTE_NAME 11759 0000AFFF 7407 <1> je .check_onebyte 11760 <1> %else 11761 <1> mov cx, isvariable_onebyte_names.end 11762 <1> sub cx, di ; = how many names remaining 11763 <1> jbe @F ; if none --> 11764 <1> repne scasb 11765 <1> je .check_onebyte 11766 <1> %endif 11767 <1> %endif 11768 0000B001 A8 <1> db __TEST_IMM8 ; (skip pop) 11769 <1> .next: 11770 0000B002 5F <1> pop di 11771 <1> .next_no_pop: 11772 0000B003 EBDE <1> jmp .loop 11773 <1> 11774 <1> @@: 11775 0000B005 E94801 <1> jmp .end 11776 <1> 11777 <1> 11778 <1> %if IVS_HAVE_ONEBYTE 11779 <1> .check_onebyte: 11780 0000B008 57 <1> push di 11781 <1> %if IVS_SINGLE_ONEBYTE 11782 0000B009 BB[2891] <1> mov bx, isvariable_struc_onebyte_list 11783 <1> %else 11784 <1> sub di, isvariable_onebyte_names + 1 11785 <1> ; = index 11786 <1> %if ISVARIABLESTRUC_size == 8 11787 <1> add di, di ; = index * 2 11788 <1> add di, di ; = index * 4 11789 <1> add di, di ; = index * 8 11790 <1> %else 11791 <1> %error Unexpected structure size 11792 <1> %endif 11793 <1> lea bx, [di + isvariable_struc_onebyte_list] 11794 <1> %endif 11795 0000B00C 8D76ED <1> lea si, [bp + ?namebuffer + 1] ; -> buffered string (allcaps) 11796 0000B00F 31C9 <1> xor cx, cx ; = 0, gets incremented next 11797 0000B011 EB21 <1> jmp @F 11798 <1> %endif 11799 <1> 11800 <1> .check_morebyte: 11801 0000B013 57 <1> push di 11802 0000B014 81EF[FA93] <1> sub di, isvariable_morebyte_nameheaders + 2 11803 <1> ; = index * 2 11804 <1> %if ISVARIABLESTRUC_size == 8 11805 0000B018 01FF <1> add di, di ; = index * 4 11806 0000B01A 01FF <1> add di, di ; = index * 8 11807 <1> %else 11808 <1> %error Unexpected structure size 11809 <1> %endif 11810 0000B01C 8D9D[3091] <1> lea bx, [di + isvariable_struc_morebyte_list] 11811 0000B020 8B4F02 <1> mov cx, word [bx + ivFlags] 11812 0000B023 83E10F <1> and cx, ivfNameLengthMask ; cx = length 11813 0000B026 8B3F <1> mov di, word [bx + ivName] ; -> name 11814 0000B028 8D76EE <1> lea si, [bp + ?namebuffer + 2] ; -> buffered string (allcaps) 11815 0000B02B 38C0 <1> cmp al, al ; ZR (in case remaining length is zero) 11816 0000B02D 51 <1> push cx 11817 0000B02E F3A6 <1> repe cmpsb ; compare 11818 0000B030 59 <1> pop cx 11819 0000B031 75CF <1> jne .next ; if not same --> 11820 0000B033 41 <1> inc cx ; increment twice 11821 <1> @@: 11822 0000B034 41 <1> inc cx ; increment once 11823 0000B035 AC <1> lodsb ; get next byte in buffer 11824 0000B036 807F0600 <1> cmp byte [bx + ivArrayLast], 0 11825 0000B03A 7503E9BC00 <1> je .notarray 11826 <1> 11827 <1> .array: 11828 0000B03F 3C28 <1> cmp al, '(' 11829 0000B041 754B <1> jne .array_not_index_expression ; not index expression --> 11830 <1> 11831 <1> .array_index_expression: 11832 0000B043 8B76E6 <1> mov si, word [bp + ?startpointer] 11833 0000B046 01CE <1> add si, cx ; -> at opening parens 11834 0000B048 46 <1> inc si ; -> behind opening parens 11835 0000B049 AC <1> lodsb 11836 0000B04A 52 <1> push dx 11837 0000B04B E88D07 <1> call getbyte 11838 0000B04E B600 <1> mov dh, 0 11839 0000B050 89D7 <1> mov di, dx ; di = index 11840 0000B052 5A <1> pop dx 11841 0000B053 E8EE08 <1> call skipwh0 11842 0000B056 3C29 <1> cmp al, ')' ; insure closing parens 11843 0000B058 7403E99B00 <1> jne .error_j1 11844 <1> 11845 0000B05D 56 <1> push si 11846 0000B05E 2B76E6 <1> sub si, word [bp + ?startpointer] 11847 <1> ; = how much to skip 11848 0000B061 8976E8 <1> mov word [bp + ?length_to_add], si 11849 0000B064 5E <1> pop si 11850 0000B065 804EEA01 <1> setopt [bp + ?flags], 1 11851 <1> 11852 0000B069 F646FE01 <1> test byte [bp + ?bit0_is_return_name], 1 11853 0000B06D 7415 <1> jz .array_no_return_name 11854 <1> 11855 0000B06F 97 <1> xchg ax, di 11856 0000B070 8B7EFC <1> mov di, word [bp + ?return_name_pointer] 11857 0000B073 01CF <1> add di, cx ; -> behind name 11858 0000B075 807F060F <1> cmp byte [bx + ivArrayLast], 0Fh 11859 0000B079 7705 <1> ja @F ; if >= 10h is a valid index --> 11860 0000B07B E88209 <1> call hexnyb ; expand to single digit 11861 0000B07E EB03 <1> jmp @FF 11862 <1> @@: 11863 0000B080 E87209 <1> call hexbyte ; expand to two digits 11864 <1> @@: 11865 0000B083 97 <1> xchg ax, di ; restore di = index 11866 <1> 11867 <1> .array_no_return_name: 11868 0000B084 41 <1> inc cx ; make space for one digit 11869 0000B085 807F060F <1> cmp byte [bx + ivArrayLast], 0Fh 11870 0000B089 7601 <1> jna @F ; if maximum index <= 0Fh --> 11871 0000B08B 41 <1> inc cx ; make space for another digit 11872 <1> @@: 11873 0000B08C EB57 <1> jmp .array_index_expression_common 11874 <1> 11875 <1> .array_not_index_expression: 11876 0000B08E E838F9 <1> call isseparator? ; name ends ? 11877 0000B091 7509 <1> jne @F ; no --> 11878 0000B093 F6470302 <1> testopt [bx + ivFlags], ivfArrayOptional 11879 <1> ; is the index optional ? 11880 0000B097 7567 <1> jnz .arrayfirst ; yes, handle as if first --> 11881 <1> .next_j1: 11882 0000B099 E966FF <1> jmp .next ; no, mismatch --> 11883 <1> 11884 <1> @@: 11885 0000B09C E85307 <1> call getnyb 11886 0000B09F 72F8 <1> jc .next_j1 11887 0000B0A1 98 <1> cbw ; ax = first nybble of index 11888 0000B0A2 97 <1> xchg di, ax ; di = first nybble of index 11889 0000B0A3 AC <1> lodsb 11890 0000B0A4 F6470304 <1> testopt [bx + ivFlags], ivfSeparatorSpecial 11891 0000B0A8 7408 <1> jz @F 11892 0000B0AA 807F060F <1> cmp byte [bx + ivArrayLast], 0Fh 11893 <1> ; highest > 0Fh ? 11894 0000B0AE 7629 <1> jna .gotseparatorspecial; no --> 11895 0000B0B0 EB0B <1> jmp .get_second_digit 11896 <1> 11897 <1> @@: 11898 0000B0B2 E814F9 <1> call isseparator? ; single digit ? 11899 0000B0B5 7422 <1> je @F ; yes --> 11900 0000B0B7 807F060F <1> cmp byte [bx + ivArrayLast], 0Fh 11901 <1> ; highest > 0Fh ? 11902 0000B0BB 76DC <1> jna .next_j1 ; no --> 11903 <1> .get_second_digit: 11904 0000B0BD E83207 <1> call getnyb 11905 0000B0C0 72D7 <1> jc .next_j1 11906 0000B0C2 98 <1> cbw ; ax = second nybble of index 11907 0000B0C3 01FF <1> add di, di 11908 0000B0C5 01FF <1> add di, di 11909 0000B0C7 01FF <1> add di, di 11910 0000B0C9 01FF <1> add di, di ; di = first digit times 16 11911 0000B0CB 01C7 <1> add di, ax ; di = full index 11912 0000B0CD AC <1> lodsb 11913 0000B0CE F6470304 <1> testopt [bx + ivFlags], ivfSeparatorSpecial 11914 0000B0D2 7505 <1> jnz @F 11915 0000B0D4 E8F2F8 <1> call isseparator? 11916 0000B0D7 75C0 <1> jne .next_j1 11917 <1> @@: 11918 <1> .gotseparatorspecial: 11919 <1> 11920 0000B0D9 F7DE <1> neg si ; minus -> after separator 11921 0000B0DB 8D4AED <1> lea cx, [bp + ?namebuffer + 1 + si] 11922 <1> ; -> buffered string plus 1 minus -> after separator 11923 <1> ; -> buffered string plus 1 minus (-> at separator plus 1) 11924 <1> ; -> buffered string minus -> at separator 11925 0000B0DE F7D9 <1> neg cx ; -> at separator minus -> buffered string 11926 0000B0E0 8B76E6 <1> mov si, word [bp + ?startpointer] 11927 0000B0E3 01CE <1> add si, cx 11928 <1> 11929 <1> .array_index_expression_common: 11930 <1> ; si -> behind index 11931 0000B0E5 89F8 <1> mov ax, di 11932 <1> ; test ah, ah 11933 <1> ; jnz .error_j1 ; (not possible) 11934 0000B0E7 3A4706 <1> cmp al, byte [bx + ivArrayLast] 11935 <1> ; index > last ? 11936 0000B0EA 770C <1> ja .error_j1 ; then error --> 11937 <1> 11938 0000B0EC F6470301 <1> testopt [bx + ivFlags], ivfArrayOneBased 11939 0000B0F0 7403 <1> jz @F ; got index 11940 0000B0F2 48 <1> dec ax ; decrement index to get 0-based 11941 0000B0F3 7803 <1> js .error_j1 ; if it was 0, invalid --> 11942 <1> @@: 11943 0000B0F5 96 <1> xchg ax, si ; si = index 11944 0000B0F6 EB0A <1> jmp .arraycommon ; continue 11945 <1> 11946 <1> .error_j1: 11947 0000B0F8 E9E1F3 <1> jmp error 11948 <1> 11949 <1> 11950 <1> .notarray: 11951 0000B0FB E8CBF8 <1> call isseparator? ; name ends ? 11952 0000B0FE 7599 <1> jne .next_j1 ; no, mismatch --> 11953 <1> 11954 <1> .arrayfirst: 11955 0000B100 31F6 <1> xor si, si ; si = array index (0 here) 11956 <1> 11957 <1> .arraycommon: 11958 0000B102 88CD <1> mov ch, cl ; ch = name length 11959 0000B104 8B4702 <1> mov ax, word [bx + ivFlags] 11960 0000B107 83E030 <1> and ax, ivfVarLengthMask; ax = shifted encoded var length 11961 0000B10A B104 <1> mov cl, ivfVarLengthShift 11962 0000B10C D3E8 <1> shr ax, cl ; ax = encoded var length 11963 0000B10E 40 <1> inc ax ; decode var length 11964 0000B10F 88C1 <1> mov cl, al ; cl = var length 11965 <1> 11966 0000B111 96 <1> xchg ax, si ; ax = array index 11967 <1> 11968 0000B112 F6470280 <1> testopt [bx + ivFlags], ivfReadOnly 11969 0000B116 7403 <1> jz @F 11970 0000B118 FE46EB <1> inc byte [bp + ?fieldtype] 11971 <1> ; = 1 (RO) 11972 <1> @@: 11973 0000B11B 31FF <1> xor di, di 11974 0000B11D 8B7704 <1> mov si, word [bx + ivAddress] 11975 0000B120 F6470240 <1> testopt [bx + ivFlags], ivfSpecialSetUp 11976 0000B124 7407 <1> jz .notspecial 11977 <1> ; (NC) 11978 0000B126 FFD6 <1> call si ; INP: ax = array index (0-based), di = 0 11979 <1> ; CHG: si, ax 11980 <1> ; OUT: NC if valid, 11981 <1> ; bx -> var, di = 0 or di -> mask 11982 0000B128 7318 <1> jnc @F 11983 0000B12A E9D5FE <1> jmp .next 11984 <1> 11985 <1> .notspecial: 11986 0000B12D 8A5F07 <1> mov bl, byte [bx + ivArrayBetween] 11987 0000B130 B700 <1> mov bh, 0 ; bx = array between offset 11988 0000B132 00CB <1> add bl, cl 11989 0000B134 80D700 <1> adc bh, 0 ; bx = array item size 11990 0000B137 F7E3 <1> mul bx ; dx:ax = ax times bx 11991 0000B139 85D2 <1> test dx, dx 11992 0000B13B 75BB <1> jnz .error_j1 11993 0000B13D 01F0 <1> add ax, si ; ax -> variable 11994 0000B13F 72B7 <1> jc .error_j1 11995 0000B141 93 <1> xchg ax, bx ; bx -> variable 11996 <1> @@: 11997 0000B142 5A <1> pop dx ; (discard pointer into names/headers) 11998 0000B143 8D5702 <1> lea dx, [bx+2] ; (irrelevant to 8-/16-bit register return) 11999 0000B146 85FF <1> test di, di 12000 0000B148 7503E900FE <1> jz .return_success 12001 0000B14D E910FE <1> jmp .return_success_di 12002 <1> 12003 <1> 12004 <1> .end: 12005 <1> %if _MMXSUPP 12006 <1> ;MMx MMxf MM(x) MM(x)f 12007 0000B150 F6C278 <1> test dl, 1<<3|1<<4| 1<<5| 1<<6 12008 0000B153 746A <1> jz short .notmmx 12009 <1> 12010 0000B155 8D76EC <1> lea si, [bp+?namebuffer] 12011 0000B158 803E[E50A]00 <1> cmp byte [has_mmx], 0 ; MMX supported ? 12012 0000B15D 7460 <1> je short .notmmx ; no --> 12013 <1> [cpu 586] 12014 0000B15F AD <1> lodsw 12015 0000B160 3D4D4D <1> cmp ax, "MM" ; possibly an MMX register ? 12016 0000B163 755A <1> jne short .notmmx ; no --> 12017 0000B165 AC <1> lodsb 12018 0000B166 E85301 <1> call getstmmxdigit 12019 0000B169 7254 <1> jc short .notmmx 12020 0000B16B 88DC <1> mov ah, bl 12021 0000B16D C0E303 <1> shl bl, 3 ; shift into reg field 12022 0000B170 8D4C14 <1> lea cx, [si-?namebuffer] 12023 0000B173 80CB06 <1> or bl, 06h ; code to get our ModR/M byte (r/m = [ofs]) 12024 0000B176 29E9 <1> sub cx, bp ; length of name (if with suffix) 12025 0000B178 881E[AAB1] <1> mov byte [.getmmxlow_modrm], bl 12026 0000B17C 43 <1> inc bx ; adjust the ModR/M byte (r/m = [bx]) 12027 0000B17D AC <1> lodsb 12028 0000B17E 881E[CFB1] <1> mov byte [.getmmxhigh_modrm], bl 12029 0000B182 4E <1> dec si 12030 0000B183 4E <1> dec si 12031 <1> 12032 0000B184 E842F8 <1> call isseparator? ; a separator after potential suffix ? 12033 0000B187 AC <1> lodsb 12034 0000B188 B700 <1> mov bh, 0 12035 0000B18A 7516 <1> jne short .check_mmx_no_suffix ; no --> 12036 <1> 12037 0000B18C 3C5A <1> cmp al, 'Z' 12038 0000B18E 7418 <1> je short .getmmxlow ; 0 = ZX --> 12039 0000B190 B710 <1> mov bh, 2<<3 ; = 10h = low 12040 0000B192 3C4C <1> cmp al, 'L' 12041 0000B194 7412 <1> je short .getmmxlow 12042 0000B196 B708 <1> mov bh, 1<<3 ; = 8h = SX 12043 0000B198 3C53 <1> cmp al, 'S' 12044 0000B19A 740C <1> je short .getmmxlow 12045 0000B19C 3C48 <1> cmp al, 'H' 12046 0000B19E 7425 <1> je short .getmmxhigh 12047 0000B1A0 B700 <1> mov bh, 0 ; 0 = ZX 12048 <1> .check_mmx_no_suffix: 12049 0000B1A2 49 <1> dec cx ; length of name (if no suffix follows) 12050 0000B1A3 E823F8 <1> call isseparator? ; immediately a separator (but no suffix) ? 12051 0000B1A6 7517 <1> jne short .notmmx ; no --> 12052 <1> ; yes, (default to) zero-extending full reg 12053 <1> .getmmxlow: 12054 <1> .getmmxlow_modrm: equ $+2 ; (opcode adjusted for the right MMX reg) 12055 0000B1A8 0F7E06[E00B] <1> movd dword [mmxbuff], mm0 12056 0000B1AD 08FC <1> or ah, bh 12057 <1> 12058 <1> .mmxcommon: 12059 0000B1AF 80C402 <1> add ah, 2 12060 0000B1B2 B504 <1> mov ch, 4 12061 0000B1B4 86CD <1> xchg cl, ch 12062 0000B1B6 BB[E00B] <1> mov bx, mmxbuff 12063 0000B1B9 8866EB <1> mov byte [bp+?fieldtype], ah 12064 <1> .return_success_var32_set_dx_j: 12065 0000B1BC E91BFE <1> jmp .return_success_var32_set_dx 12066 <1> __CPU__ 12067 <1> 12068 <1> .notmmx: 12069 <1> %endif 12070 <1> 12071 <1> .return_failure: 12072 0000B1BF 5E <1> pop si ; ?startpointer 12073 0000B1C0 58 <1> pop ax ; ?length_to_add 12074 0000B1C1 F9 <1> stc 12075 0000B1C2 E9B9FD <1> jmp .return_ax_frame_lodsb 12076 <1> 12077 <1> 12078 <1> %if _MMXSUPP 12079 <1> [cpu 586] 12080 <1> .getmmxhigh: 12081 0000B1C5 83EC08 <1> sub sp, byte 8 12082 0000B1C8 80CC18 <1> or ah, 3<<3 ; = 18h = high 12083 0000B1CB 89E3 <1> mov bx, sp ; (ss = ds) 12084 <1> .getmmxhigh_modrm: equ $+2 ; (opcode adjusted for the right MMX reg) 12085 0000B1CD 0F7F07 <1> movq qword [bx], mm0 12086 0000B1D0 5B <1> pop bx 12087 0000B1D1 5B <1> pop bx ; discard low dword 12088 0000B1D2 668F06[E00B] <1> pop dword [mmxbuff] ; save high dword here 12089 0000B1D7 EBD6 <1> jmp short .mmxcommon 12090 <1> __CPU__ 12091 <1> %endif 12092 <1> 12093 <1> 12094 <1> var_ri_setup: 12095 0000B1D9 8D76F0 <1> lea si, [bp + ?namebuffer + 4] 12096 0000B1DC F646EA01 <1> testopt [bp + ?flags], 1 12097 0000B1E0 7409 <1> jz @F 12098 0000B1E2 8B76E6 <1> mov si, word [bp + ?startpointer] 12099 0000B1E5 0376E8 <1> add si, word [bp + ?length_to_add] 12100 0000B1E8 FF46E8 <1> inc word [bp + ?length_to_add] 12101 <1> @@: 12102 0000B1EB 50 <1> push ax 12103 0000B1EC AC <1> lodsb ; al = last letter 12104 0000B1ED E823DA <1> call uppercase 12105 0000B1F0 88C7 <1> mov bh, al ; bh = letter 12106 0000B1F2 3C4C <1> cmp al, 'L' ; valid one ? 12107 0000B1F4 7408 <1> je @F 12108 0000B1F6 3C4F <1> cmp al, 'O' 12109 0000B1F8 7404 <1> je @F 12110 0000B1FA 3C53 <1> cmp al, 'S' 12111 0000B1FC 755A <1> jne .ret_CY_pop ; no --> 12112 <1> @@: ; is valid letter 12113 0000B1FE AC <1> lodsb ; = candidate separator 12114 0000B1FF E8C7F7 <1> call isseparator? ; is it ? 12115 0000B202 7554 <1> jne .ret_CY_pop ; no --> 12116 0000B204 58 <1> pop ax 12117 <1> 12118 0000B205 F646FE01 <1> test byte [bp + ?bit0_is_return_name], 1 12119 0000B209 7408 <1> jz .interrupt_no_return_name 12120 <1> 12121 0000B20B 8B7EFC <1> mov di, word [bp + ?return_name_pointer] 12122 0000B20E 83C704 <1> add di, 4 12123 0000B211 883D <1> mov byte [di], bh ; store the additional letter 12124 <1> 12125 <1> .interrupt_no_return_name: 12126 0000B213 FEC5 <1> inc ch ; increment name length 12127 0000B215 93 <1> xchg ax, bx 12128 <1> 12129 <1> ; INP: bx = interrupt number 0..255 12130 <1> ; ah = 'S' for segment, 'O' for offset, 'L' for linear 12131 0000B216 31F6 <1> xor si, si 12132 <1> %if _PM 12133 0000B218 53 <1> push bx 12134 0000B219 E82E6C <1> call setds2si ; ds => IVT 12135 0000B21C 5B <1> pop bx 12136 <1> %else 12137 <1> mov ds, si ; ds => IVT 12138 <1> %endif 12139 0000B21D 80FC53 <1> cmp ah, 'S' 12140 0000B220 7502 <1> jne @F 12141 0000B222 46 <1> inc si 12142 0000B223 46 <1> inc si ; si = 2 (displacement to get segment) 12143 <1> @@: 12144 0000B224 01DB <1> add bx, bx 12145 0000B226 01DB <1> add bx, bx ; ds:bx -> IVT entry 12146 0000B228 FF7002 <1> push word [bx + si + 2] 12147 0000B22B FF30 <1> push word [bx + si] ; get segment:offset or trash:segment 12148 0000B22D 16 <1> push ss 12149 0000B22E 1F <1> pop ds 12150 0000B22F BB[E893] <1> mov bx, interrupt_var 12151 0000B232 8F07 <1> pop word [bx] 12152 0000B234 8F4702 <1> pop word [bx + 2] 12153 <1> ; store in variable 12154 0000B237 80FC4C <1> cmp ah, 'L' 12155 0000B23A 7519 <1> jne @FF 12156 0000B23C 51 <1> push cx 12157 0000B23D 31C0 <1> xor ax, ax 12158 0000B23F 874702 <1> xchg ax, word [bx + 2] ; clear high word, get segment 12159 0000B242 31D2 <1> xor dx, dx ; dx:ax = segment 12160 0000B244 B90400 <1> mov cx, 4 12161 <1> @@: 12162 0000B247 D1E0 <1> shl ax, 1 12163 0000B249 D1D2 <1> rcl dx, 1 12164 0000B24B E2FA <1> loop @B ; shift up 4 bits 12165 0000B24D 0107 <1> add word [bx], ax 12166 0000B24F 115702 <1> adc word [bx + 2], dx ; add to dword 12167 0000B252 59 <1> pop cx 12168 0000B253 B103 <1> mov cl, 3 ; 3byte variable (21 bits needed) 12169 <1> @@: 12170 0000B255 31FF <1> xor di, di ; (NC) 12171 0000B257 C3 <1> retn 12172 <1> 12173 <1> .ret_CY_pop: 12174 0000B258 58 <1> pop ax 12175 <1> .ret_CY: 12176 0000B259 F9 <1> stc 12177 0000B25A C3 <1> retn 12178 <1> 12179 <1> 12180 <1> 12181 <1> %if _INPUT_FILE_BOOT || _INPUT_FILE_HANDLES 12182 <1> var_ysf_setup: 12183 0000B25B 93 <1> xchg ax, bx ; bx = index 12184 0000B25C 8A46ED <1> mov al, byte [bp + ?namebuffer + 1] 12185 0000B25F 3C53 <1> cmp al, 'S' 12186 0000B261 750B <1> jne @F 12187 <1> %if _INPUT_FILE_BOOT 12188 0000B263 F606[A300]02 <1> testopt [internalflags2], dif2_input_file_boot 12189 0000B268 B042 <1> mov al, 'B' 12190 0000B26A 7502 <1> jnz @F 12191 <1> %endif 12192 0000B26C B048 <1> mov al, 'H' 12193 <1> @@: 12194 0000B26E 3C42 <1> cmp al, 'B' 12195 0000B270 7509 <1> jne @F 12196 <1> %if _INPUT_FILE_BOOT 12197 0000B272 F606[A300]02 <1> testopt [internalflags2], dif2_input_file_boot 12198 0000B277 750D <1> jnz @FF 12199 <1> %endif 12200 <1> .notysf: 12201 0000B279 F9 <1> stc 12202 0000B27A C3 <1> retn 12203 <1> @@: 12204 <1> %if _INPUT_FILE_HANDLES 12205 0000B27B 3C48 <1> cmp al, 'H' 12206 0000B27D 75FA <1> jne short .notysf 12207 0000B27F F606[A200]10 <1> testopt [internalflags2], dif2_input_file 12208 0000B284 74F3 <1> jz .notysf 12209 <1> %else 12210 <1> jmp .notysf 12211 <1> %endif 12212 <1> @@: 12213 <1> ; bx = index 12214 <1> %if _INPUT_FILE_HANDLES 12215 0000B286 BF[800A] <1> mov di, input_file_handles.active 12216 <1> ; -> active index for YHF 12217 <1> %endif 12218 <1> %if _INPUT_FILE_BOOT 12219 <1> %if _INPUT_FILE_HANDLES 12220 0000B289 3C42 <1> cmp al, 'B' 12221 0000B28B 7503 <1> jne @F 12222 <1> %endif 12223 0000B28D BF[B08F] <1> mov di, load_input_file.active 12224 <1> ; -> active index for YBF 12225 <1> @@: 12226 <1> %endif 12227 0000B290 F7DB <1> neg bx ; -1 .. 0 12228 0000B292 7406 <1> jz @F ; if 0, always valid --> 12229 <1> ; index was nonzero, meaning bx now holds a 12230 <1> ; negative number. if [.active] is large enough, 12231 <1> ; adding it to bx yields a positive number, which 12232 <1> ; carries in the addition. check for that. 12233 0000B294 031D <1> add bx, word [di] 12234 0000B296 73E1 <1> jnc .notysf ; not valid index --> 12235 0000B298 EB02 <1> jmp @FF ; valid, use it 12236 <1> @@: 12237 0000B29A 031D <1> add bx, word [di] 12238 <1> ; 0 means the topmost level 12239 <1> @@: 12240 <1> %if _INPUT_FILE_BOOT 12241 <1> %if _INPUT_FILE_HANDLES 12242 0000B29C 3C42 <1> cmp al, 'B' 12243 0000B29E 750D <1> jne @F 12244 <1> %endif 12245 <1> 12246 0000B2A0 B8A000 <1> mov ax, LOAD_INPUT_FILE_SIZE 12247 0000B2A3 93 <1> xchg ax, bx 12248 0000B2A4 F7E3 <1> mul bx ; dx ignored, should be zero 12249 0000B2A6 93 <1> xchg ax, bx ; bx = offset into array 12250 0000B2A7 81C3[568D] <1> add bx, load_input_file - LOADDATA3 + ldFATType 12251 <1> ; -> flag word 12252 0000B2AB EB0A <1> jmp @FF 12253 <1> 12254 <1> @@: 12255 <1> %endif 12256 <1> %if _INPUT_FILE_HANDLES 12257 0000B2AD D1E3 <1> shl bx, 1 12258 0000B2AF D1E3 <1> shl bx, 1 12259 0000B2B1 D1E3 <1> shl bx, 1 ; to qword array index 12260 <1> %if INPUTFILEHANDLE_size != 8 12261 <1> %error Unexpected structure size 12262 <1> %endif 12263 0000B2B3 81C3[020A] <1> add bx, input_file_handles + ifhFlags 12264 <1> ; -> flags word 12265 <1> %endif 12266 <1> @@: 12267 0000B2B7 BF[8C95] <1> mov di, mask_ysf ; give the mask of read-only bits 12268 0000B2BA F8 <1> clc 12269 0000B2BB C3 <1> retn 12270 <1> %endif 12271 <1> 12272 <1> 12273 <1> lleave ctx 12274 <1> 12275 <1> 12276 <1> ; INP: al, si-> string 12277 <1> ; OUT: CY if no valid digit 0..7 12278 <1> ; NC if valid digit, 12279 <1> ; bl = 0..7 12280 <1> ; al, si-> behind digit specification 12281 <1> ; CHG: bl 12282 <1> getstmmxdigit: 12283 0000B2BC 3C28 <1> cmp al, '(' 12284 0000B2BE 7407 <1> je .paropen 12285 0000B2C0 E81A00 <1> call .isdigit? 12286 0000B2C3 7201 <1> jc .ret 12287 <1> .retlodsb: 12288 0000B2C5 AC <1> lodsb 12289 <1> .ret: 12290 0000B2C6 C3 <1> retn 12291 <1> 12292 <1> .paropen: 12293 0000B2C7 50 <1> push ax 12294 0000B2C8 56 <1> push si 12295 0000B2C9 AC <1> lodsb 12296 0000B2CA E81000 <1> call .isdigit? 12297 0000B2CD 720B <1> jc .retpop 12298 0000B2CF AC <1> lodsb 12299 0000B2D0 3C29 <1> cmp al, ')' ; closing parenthesis ? 12300 0000B2D2 F9 <1> stc 12301 0000B2D3 7505 <1> jne .retpop ; no --> (CY) 12302 0000B2D5 83C404 <1> add sp, byte 4 ; discard saved registers (NC) 12303 0000B2D8 EBEB <1> jmp short .retlodsb 12304 <1> 12305 <1> .retpop: 12306 0000B2DA 5E <1> pop si 12307 0000B2DB 58 <1> pop ax 12308 0000B2DC C3 <1> retn 12309 <1> 12310 <1> .isdigit?: 12311 0000B2DD 88C3 <1> mov bl, al 12312 0000B2DF 80EB30 <1> sub bl, '0' 12313 0000B2E2 80FB08 <1> cmp bl, 8 ; valid digit 0..7 ? (CY if so) 12314 0000B2E5 F5 <1> cmc ; NC if so 12315 0000B2E6 C3 <1> retn 12316 <1> 12317 <1> 12318 <1> usesection lDEBUG_CODE 12319 <1> isvariable_code_size equ $ - isvariable_code 12320 <1> 12321 <1> 12322 <1> usesection lDEBUG_DATA_ENTRY 12323 <1> isvariable_data_size equ $ - isvariable_data 12324 <1> 12325 <1> numdef SHOW_ISVARIABLE_SIZE, 0 12326 <1> %if _SHOW_ISVARIABLE_SIZE 12327 <1> %assign CODESIZE isvariable_code_size 12328 <1> %assign DATASIZE isvariable_data_size 12329 <1> %warning isvariable size: CODESIZE code, DATASIZE data 12330 <1> %endif 12331 <1> 12332 <1> 12333 <1> align 2, db 0 12334 00009594 0D0020090D2C4C3B5D- <1> separators: countedw 32,9,13,",L;]:)(=.",0 12334 0000959D 3A29283D2E00 <1> 12335 <1> 12336 <1> %ifn _EXPRESSIONS 12337 <1> %error Building without the expression evaluator is not possible right now 12338 <1> %endif 12339 <1> 12340 <1> %if _EXPRESSIONS 12341 <1> 12342 000095A3 00 <1> align 4, db 0 12343 000095A4 00000000 <1> hhvar: dd 0 ; left-hand operand for operator functions 12344 <1> align 2, db 0 12345 <1> hh_depth: 12346 000095A8 0000 <1> dw 0 12347 <1> hh_depth_of_single_term: 12348 000095AA 0000 <1> dw 0 12349 000095AC 00 <1> hhflag: db 0 ; &2: getdword called from hh, default to sub (precedence over 1) 12350 <1> ; &1: getdword called from hh, default to add 12351 <1> ; &4: getdword defaulted to add/sub for hh 12352 <1> ; (Note that during recursive getexpression calls (ie, 12353 <1> ; bracket handling), hh_depth is incremented to 2 and 12354 <1> ; higher. As these flags are only used with hh_depth == 1, 12355 <1> ; this means inside brackets the hh defaulting is 12356 <1> ; not in effect.) 12357 000095AD 00 <1> hhtype: db 0 ; type info on left-hand operand for operator functions 12358 <1> %endif 12359 <1> 12360 <1> 12361 <1> usesection lDEBUG_CODE 12362 <1> 12363 <1> ; Get a numerical value from input line 12364 <1> ; INP: al = first character 12365 <1> ; si-> next character 12366 <1> ; OUT: bx:dx = numerical value 12367 <1> ; ah&80h = whether a pointer 12368 <1> ; ah&40h = whether a signed type 12369 <1> ; ah&3Fh = number of significant bits 12370 <1> ; one-based position of highest one bit if unsigned or signed but positive 12371 <1> ; one-based position of lowest one bit from the top if negative signed 12372 <1> getdword: 12373 <1> getexpression: 12374 0000B2E7 FF06[A895] <1> inc word [hh_depth] 12375 0000B2EB E82706 <1> call skipcomm0 12376 0000B2EE 51 <1> push cx 12377 0000B2EF 57 <1> push di 12378 <1> lframe 12379 0000B2F0 5589E5 <1> lenter 12380 <1> 12381 0000B2F3 31C9 <1> xor cx, cx 12382 0000B2F5 51 <1> push cx 12383 <1> lvar word, ??Count 12384 <1> %define lCount ???Count 12385 <1> 12386 <1> ; The first number field's operator is initialized to 12387 <1> ; the dummy right-operand operator, which is set up with 12388 <1> ; the highest precedence. This means it'll be processed 12389 <1> ; immediately in the first iteration below. 12390 0000B2F6 B118 <1> mov cl, OPERATOR_RIGHTOP 12391 0000B2F8 51 <1> push cx ; initialize dummy first number operator 12392 0000B2F9 83EC0A <1> sub sp, byte 6+4 12393 <1> lvar 6, ??A 12394 <1> %define lA ???A 12395 <1> lvar 6, ??B 12396 <1> %define lB ???B 12397 <1> 12398 <1> .loop: 12399 <1> ; Get next term of an expression. A term is one variable, 12400 <1> ; one immediate number, one expression contained within 12401 <1> ; round brackets or one expression used to access memory. 12402 <1> ; This code also parses any number of unary operators 12403 <1> ; (including type conversions) in front of the term. 12404 <1> ; 12405 <1> ; INP: (si-1)-> first character 12406 <1> ; OUT: (see label .operator) 12407 <1> ; bx:dx = numerical value of term 12408 <1> ; ah&80h = whether a pointer 12409 <1> ; ah&40h = whether a signed type 12410 <1> ; ah&20h = whether a positive value but signed type 12411 <1> ; al = first character behind term 12412 <1> ; si-> line 12413 <1> ; CHG: di, cx 12414 <1> ; 12415 <1> ; This part might be simplified by directly modifying 6byte[bp+lB] 12416 <1> ; instead of setting bx:dx and ah. (The current interface is one of 12417 <1> ; the holdovers of getexpressionterm as a separate function.) In 12418 <1> ; that case, bx:dx and ah presumably will then be simply added to 12419 <1> ; the CHG specification. 12420 <1> .term: 12421 0000B2FC 4E <1> dec si 12422 0000B2FD 56 <1> push si ; -> term 12423 <1> 12424 <1> ; count unary operators and type specifiers, 12425 <1> ; get the bit mask of required bytes 12426 <1> ; and skip past the operators and specifiers 12427 0000B2FE E89504 <1> call count_unary_operators 12428 <1> 12429 <1> %if _INDIRECTION 12430 0000B301 3C5B <1> cmp al, '[' 12431 0000B303 7503E91202 <1> je .indirection ; handle indirected value --> 12432 <1> %endif 12433 0000B308 3C28 <1> cmp al, '(' 12434 0000B30A 7503E95E02 <1> je .parens ; handle term with precedence --> 12435 <1> 12436 0000B30F 52 <1> push dx ; remember the count+1 12437 <1> ; (only if no indirection or bracket) 12438 <1> 12439 0000B310 4E <1> dec si 12440 0000B311 BA[0E67] <1> mov dx, msg.value ; does a VALUE keyword for VALUE x IN y go here ? 12441 0000B314 E87805 <1> call isstring? 12442 0000B317 7503E95701 <1> je .value_in ; yes --> 12443 <1> 12444 0000B31C BA[4D67] <1> mov dx, msg.linear ; does a LINEAR keyword go here ? 12445 0000B31F E86D05 <1> call isstring? 12446 0000B322 7503E91D01 <1> je .linear ; yes --> 12447 <1> 12448 0000B327 AC <1> lodsb 12449 <1> 12450 0000B328 E8C0FB <1> call isvariable? ; is it a variable ? 12451 0000B32B 7226 <1> jc .literal ; no, must be an immediate value --> 12452 <1> 12453 <1> .variable: 12454 0000B32D 87DA <1> xchg bx, dx ; bx-> high word 12455 0000B32F 88CC <1> mov ah, cl 12456 0000B331 31C9 <1> xor cx, cx 12457 0000B333 80FC02 <1> cmp ah, 2 12458 0000B336 7609 <1> jbe .variable_nohigh 12459 0000B338 8B0F <1> mov cx, word [bx] ; get high word 12460 0000B33A 80FC03 <1> cmp ah, 3 12461 0000B33D 7702 <1> ja @F 12462 0000B33F B500 <1> mov ch, 0 12463 <1> @@: 12464 <1> .variable_nohigh: 12465 0000B341 87DA <1> xchg bx, dx ; bx-> low word 12466 0000B343 8B17 <1> mov dx, word [bx] ; get low word 12467 0000B345 89CB <1> mov bx, cx ; high word/zero 12468 0000B347 80FC01 <1> cmp ah, 1 12469 0000B34A 7702 <1> ja .variable_notbyte 12470 0000B34C B600 <1> mov dh, 0 ; limit to byte 12471 <1> .variable_notbyte: 12472 0000B34E B400 <1> mov ah, 0 ; type pointer=0 signed=0 12473 0000B350 E92A02 <1> jmp .term_end 12474 <1> 12475 <1> 12476 <1> .literal: 12477 0000B353 31DB <1> xor bx, bx ; (in case of decimal base shortcut: 12478 0000B355 BA0A00 <1> mov dx, 10 ; set base: decimal) 12479 0000B358 3C23 <1> cmp al, '#' ; shortcut change to decimal base, or string literal? 12480 0000B35A 753C <1> jne .lithex_common 12481 0000B35C 803C22 <1> cmp byte [si], '"' 12482 0000B35F 7407 <1> je .lit_string 12483 0000B361 803C27 <1> cmp byte [si], "'" 12484 0000B364 7402 <1> je .lit_string 12485 0000B366 EB72 <1> jmp .lit_base ; decimal base --> 12486 <1> 12487 <1> .lit_string: 12488 0000B368 31D2 <1> xor dx, dx 12489 0000B36A AC <1> lodsb 12490 0000B36B 86C4 <1> xchg al, ah 12491 <1> 12492 0000B36D E81900 <1> call @F 12493 0000B370 88C2 <1> mov dl, al 12494 0000B372 E81400 <1> call @F 12495 0000B375 88C6 <1> mov dh, al 12496 0000B377 E80F00 <1> call @F 12497 0000B37A 88C3 <1> mov bl, al 12498 0000B37C E80A00 <1> call @F 12499 0000B37F 88C7 <1> mov bh, al 12500 0000B381 AC <1> lodsb 12501 0000B382 38E0 <1> cmp al, ah 12502 0000B384 740F <1> je @FFF 12503 <1> .err3: 12504 0000B386 E9B800 <1> jmp .err2 12505 <1> 12506 <1> @@: 12507 0000B389 AC <1> lodsb 12508 0000B38A 38E0 <1> cmp al, ah 12509 0000B38C 7406 <1> je @F 12510 0000B38E E86105 <1> call iseol?.notsemicolon 12511 0000B391 74F3 <1> je .err3 12512 0000B393 C3 <1> retn 12513 <1> 12514 <1> @@: 12515 0000B394 59 <1> pop cx ; (discard near return address) 12516 <1> @@: 12517 0000B395 AC <1> lodsb 12518 0000B396 EB38 <1> jmp .lit_end_string 12519 <1> 12520 <1> 12521 <1> .lithex_common: 12522 0000B398 E8A303 <1> call .lit_ishexdigit? ; the first character must be a digit then 12523 0000B39B 7303E9A100 <1> jc .err2 12524 0000B3A0 30D2 <1> xor dl, dl ; initialize value 12525 <1> .lithex_loopdigit: 12526 0000B3A2 3C5F <1> cmp al, '_' 12527 0000B3A4 7423 <1> je .lithex_skip 12528 0000B3A6 E89503 <1> call .lit_ishexdigit? ; was last character ? 12529 0000B3A9 7221 <1> jc .lit_end ; yes --> 12530 0000B3AB F6C7F0 <1> test bh, 0F0h ; would shift bits out ? 12531 0000B3AE 7403E98E00 <1> jnz .err2 12532 0000B3B3 E85DD8 <1> call uppercase 12533 0000B3B6 2C30 <1> sub al, '0' 12534 0000B3B8 3C09 <1> cmp al, 9 ; was decimal digit ? 12535 0000B3BA 7602 <1> jbe .lithex_decimaldigit; yes --> 12536 0000B3BC 2C07 <1> sub al, 'A'-('9'+1) ; else adjust for hexadecimal digit 12537 <1> .lithex_decimaldigit: 12538 0000B3BE B90400 <1> mov cx, 4 12539 <1> .lithex_loopshift: 12540 0000B3C1 D1E2 <1> shl dx, 1 12541 0000B3C3 D1D3 <1> rcl bx, 1 12542 0000B3C5 E2FA <1> loop .lithex_loopshift ; *16 12543 0000B3C7 08C2 <1> or dl, al ; add in the new digit 12544 <1> .lithex_skip: 12545 0000B3C9 AC <1> lodsb 12546 0000B3CA EBD6 <1> jmp short .lithex_loopdigit 12547 <1> 12548 <1> .lit_end: 12549 0000B3CC 3C23 <1> cmp al, '#' ; base change specification? 12550 0000B3CE 740A <1> je .lit_base ; yes --> 12551 <1> .lit_end_string: 12552 0000B3D0 E8F6F5 <1> call isseparator? ; after the number, there must be a separator 12553 0000B3D3 756C <1> jne .err2 ; none here --> 12554 0000B3D5 B400 <1> mov ah, 0 ; type pointer=0 signed=0 12555 0000B3D7 E9A301 <1> jmp .term_end ; okay --> 12556 <1> .lit_base: 12557 0000B3DA 85DB <1> test bx, bx ; insure base <= 36 12558 0000B3DC 7563 <1> jnz .err2 12559 0000B3DE 83FA24 <1> cmp dx, byte 36 12560 0000B3E1 775E <1> ja .err2 12561 0000B3E3 83FA02 <1> cmp dx, byte 2 ; and >= 2 12562 0000B3E6 7259 <1> jb .err2 ; otherwise error --> 12563 <1> 12564 0000B3E8 AC <1> lodsb 12565 0000B3E9 80FA10 <1> cmp dl, 16 ; hexadecimal ? 12566 0000B3EC 74AA <1> je .lithex_common ; yes, use specific handling --> 12567 <1> 12568 0000B3EE 89D7 <1> mov di, dx ; di = base 12569 0000B3F0 88D1 <1> mov cl, dl 12570 0000B3F2 80C12F <1> add cl, '0'-1 12571 0000B3F5 80F939 <1> cmp cl, '9' 12572 0000B3F8 7602 <1> jbe .lit_basebelow11 12573 0000B3FA B139 <1> mov cl, '9' 12574 <1> .lit_basebelow11: ; cl = highest decimal digit for base ('1'..'9') 12575 0000B3FC 88D5 <1> mov ch, dl 12576 0000B3FE 80C536 <1> add ch, 'A'-10-1 ; ch = highest letter for base ('A'-x..'Z') 12577 <1> 12578 0000B401 E83D03 <1> call .lit_isdigit? ; first character must be a digit 12579 0000B404 723B <1> jc .err2 12580 0000B406 31D2 <1> xor dx, dx ; initialize value 12581 <1> .lit_loopdigit: 12582 0000B408 3C5F <1> cmp al, '_' 12583 0000B40A 7432 <1> je .lit_skip 12584 0000B40C E83203 <1> call .lit_isdigit? ; was last character ? 12585 0000B40F 72BB <1> jc .lit_end ; yes --> 12586 0000B411 E8FFD7 <1> call uppercase 12587 0000B414 2C30 <1> sub al, '0' 12588 0000B416 3C09 <1> cmp al, 9 ; was decimal digit ? 12589 0000B418 7602 <1> jbe .lit_decimaldigit ; yes --> 12590 0000B41A 2C07 <1> sub al, 'A'-('9'+1) ; else adjust for hexadecimal digit 12591 <1> .lit_decimaldigit: 12592 0000B41C 50 <1> push ax 12593 0000B41D 89D0 <1> mov ax, dx 12594 0000B41F 53 <1> push bx 12595 0000B420 F7E7 <1> mul di ; multiply low word with base 12596 0000B422 89D3 <1> mov bx, dx 12597 0000B424 89C2 <1> mov dx, ax 12598 0000B426 58 <1> pop ax 12599 0000B427 52 <1> push dx 12600 0000B428 F7E7 <1> mul di ; multiply high word with base 12601 0000B42A 85D2 <1> test dx, dx 12602 0000B42C 5A <1> pop dx 12603 0000B42D 7512 <1> jnz .err2 ; overflow --> 12604 0000B42F 01C3 <1> add bx, ax ; add them 12605 0000B431 58 <1> pop ax 12606 0000B432 720D <1> jc .err2 ; overflow --> 12607 0000B434 00C2 <1> add dl, al ; add in the new digit 12608 0000B436 80D600 <1> adc dh, 0 12609 0000B439 83D300 <1> adc bx, byte 0 12610 0000B43C 7203 <1> jc .err2 ; overflow --> 12611 <1> ; The value 3#102002022201221111210 is exactly equal to ffffFFFFh 12612 <1> ; so 3#102002022201221111211 (or ...2) overflows 32 bits and 12613 <1> ; needs to be detected here when adding in the as yet least 12614 <1> ; significant digit. This is why this jump is needed. 12615 <1> ; This also applies to decimal #4294967296. 12616 <1> 12617 <1> .lit_skip: 12618 0000B43E AC <1> lodsb 12619 0000B43F EBC7 <1> jmp short .lit_loopdigit 12620 <1> 12621 <1> .err2: 12622 0000B441 E998F0 <1> jmp error 12623 <1> 12624 <1> 12625 <1> .linear: 12626 0000B444 58 <1> pop ax ; discard unary operators counter 12627 <1> 12628 <1> %if _EXPRESSION_INDIRECTION_STACK_CHECK == _EXPRESSION_LINEAR_STACK_CHECK 12629 0000B445 E81D04 <1> call stack_check_indirection 12630 <1> %else 12631 <1> mov ax, _EXPRESSION_LINEAR_STACK_CHECK 12632 <1> call stack_check ; abort if deep recursion 12633 <1> %endif 12634 0000B448 A9[6D71] <1> test ax, msg.stack_overflow.linear 12635 <1> 12636 0000B44B E8F504 <1> call skipwhite 12637 0000B44E FF36[DC88] <1> _386_PM push word [bAddr32] 12638 0000B452 6652 <1> _386_PM push edx 12639 0000B454 5A <1> _386_PM pop dx 12640 0000B455 8B1E[840C] <1> mov bx, word [reg_ds] 12641 0000B459 E85083 <1> call getlinearaddr 12642 0000B45C 52 <1> _386_PM push dx 12643 0000B45D 665A <1> _386_PM pop edx 12644 0000B45F 8F06[DC88] <1> _386_PM pop word [bAddr32] 12645 0000B463 72DC <1> jc .err2 12646 <1> 12647 0000B465 66 <1> _386_PM_o32 ; or dword 12648 0000B466 830E[5085]FF <1> or word [bp_offset], strict byte -1 12649 <1> ; do not use a preferred offset 12650 <1> 12651 0000B46B E8A704 <1> call skipcomm0 12652 0000B46E B400 <1> mov ah, 0 ; type pointer=0 signed=0 12653 0000B470 E90901 <1> jmp .term_end_recount 12654 <1> 12655 <1> 12656 <1> .value_in: 12657 0000B473 58 <1> pop ax ; discard unary operators counter 12658 <1> 12659 <1> %if _EXPRESSION_INDIRECTION_STACK_CHECK == _EXPRESSION_VALUE_IN_STACK_CHECK 12660 0000B474 E8EE03 <1> call stack_check_indirection 12661 <1> %else 12662 <1> mov ax, _EXPRESSION_VALUE_IN_STACK_CHECK 12663 <1> call stack_check ; abort if deep recursion 12664 <1> %endif 12665 0000B477 A9[5271] <1> test ax, msg.stack_overflow.value_in 12666 <1> 12667 0000B47A E8C604 <1> call skipwhite 12668 0000B47D 4E <1> dec si 12669 0000B47E BA[1F67] <1> mov dx, msg.executing 12670 0000B481 E80B04 <1> call isstring? 12671 0000B484 7514 <1> jne @F 12672 0000B486 E8BA04 <1> call skipwhite 12673 0000B489 56 <1> push si 12674 0000B48A BE[2967] <1> mov si, msg.executing_value_range 12675 0000B48D E87D03 <1> call get_value_range 12676 0000B490 9C <1> pushf 12677 0000B491 E86F04 <1> call chkeol 12678 0000B494 9D <1> popf 12679 0000B495 5E <1> pop si 12680 0000B496 4E <1> dec si 12681 0000B497 AC <1> lodsb 12682 0000B498 EB03 <1> jmp @FF 12683 <1> 12684 <1> @@: 12685 0000B49A E87003 <1> call get_value_range ; OUT: cx:di = from, bx:dx = to 12686 <1> @@: 12687 <1> 12688 <1> ; If the VALUE is a not normal range (zero length 12689 <1> ; or from > to) then we still have to parse the 12690 <1> ; remaining input line to find the end of the 12691 <1> ; VALUE x IN y construct. So we do this with a 12692 <1> ; sort of hack: we take the invalid / unset 12693 <1> ; range values, do all the (invalid) comparisons, 12694 <1> ; but do not count any of the possible matches. 12695 <1> ; Look at .value_in.found for this hack. 12696 <1> lframe none, nested 12697 0000B49D 5589E5 <1> lenter 12698 <1> lvar word, bit0_do_not_match 12699 0000B4A0 9C <1> pushf 12700 <1> lvar dword, value_from 12701 0000B4A1 51 <1> push cx 12702 0000B4A2 57 <1> push di 12703 <1> lvar dword, value_to 12704 0000B4A3 53 <1> push bx 12705 0000B4A4 52 <1> push dx 12706 0000B4A5 31C9 <1> xor cx, cx 12707 <1> lvar dword, found 12708 0000B4A7 51 <1> push cx 12709 0000B4A8 51 <1> push cx 12710 <1> 12711 0000B4A9 51 <1> push cx ; zero terminator of keyword remembered offsets 12712 0000B4AA 4E <1> dec si 12713 0000B4AB BA[1467] <1> mov dx, msg.in 12714 0000B4AE E8DE03 <1> call isstring? 12715 <1> .err3_NZ: 12716 <1> .err4_NZ: 12717 0000B4B1 758E <1> jne .err2 12718 <1> 12719 <1> .value_in.loop: 12720 0000B4B3 E88D04 <1> call skipwhite 12721 0000B4B6 4E <1> dec si 12722 0000B4B7 BB[4874] <1> mov bx, msgtable_value_range 12723 <1> ; -> table 12724 <1> 12725 <1> @@: 12726 0000B4BA 8B17 <1> mov dx, word [bx] 12727 0000B4BC 85D2 <1> test dx, dx 12728 0000B4BE 7419 <1> jz @F ; last checked, go get range --> 12729 0000B4C0 E8CC03 <1> call isstring? 12730 0000B4C3 7405 <1> je .value_in.keyword ; found a keyword --> 12731 0000B4C5 83C304 <1> add bx, 4 ; go to next table entry 12732 0000B4C8 EBF0 <1> jmp @B 12733 <1> 12734 <1> .value_in.keyword: 12735 <1> %if _EXPRESSION_INDIRECTION_STACK_CHECK == _EXPRESSION_VALUE_IN_STACK_CHECK 12736 0000B4CA E89803 <1> call stack_check_indirection 12737 <1> %else 12738 <1> mov ax, _EXPRESSION_VALUE_IN_STACK_CHECK 12739 <1> call stack_check ; abort if deep recursion 12740 <1> %endif 12741 0000B4CD A9[5271] <1> test ax, msg.stack_overflow.value_in 12742 <1> 12743 0000B4D0 E87004 <1> call skipwhite ; skip past blanks 12744 0000B4D3 56 <1> push si ; remember offset after keyword 12745 0000B4D4 8B7702 <1> mov si, word [bx + 2] ; -> keyword replacement text 12746 0000B4D7 EBDA <1> jmp .value_in.loop ; handle replacement --> 12747 <1> 12748 <1> @@: 12749 0000B4D9 E83103 <1> call get_value_range ; OUT: cx:di = from, bx:dx = to 12750 0000B4DC 7223 <1> jc .value_in.next 12751 <1> 12752 <1> ; ! (StartVal > EndMatch) 12753 0000B4DE 395EFC <1> cmp word [bp + ?value_from + 2], bx 12754 0000B4E1 7503 <1> jne @F 12755 0000B4E3 3956FA <1> cmp word [bp + ?value_from], dx 12756 <1> @@: 12757 0000B4E6 7719 <1> ja .value_in.next 12758 <1> 12759 <1> ; ! (EndVal < StartMatch) 12760 0000B4E8 394EF8 <1> cmp word [bp + ?value_to + 2], cx 12761 0000B4EB 7503 <1> jne @F 12762 0000B4ED 397EF6 <1> cmp word [bp + ?value_to], di 12763 <1> @@: 12764 0000B4F0 720F <1> jb .value_in.next 12765 <1> 12766 <1> .value_in.found: 12767 0000B4F2 8B4EFE <1> mov cx, word [bp + ?bit0_do_not_match] 12768 0000B4F5 F7D1 <1> not cx 12769 0000B4F7 83E101 <1> and cx, 1 12770 0000B4FA 014EF2 <1> add word [bp + ?found], cx 12771 0000B4FD 8356F200 <1> adc word [bp + ?found], 0 12772 <1> 12773 <1> .value_in.next: 12774 <1> @@: 12775 0000B501 E84004 <1> call skipwh0 12776 0000B504 3C2C <1> cmp al, ',' 12777 0000B506 74AB <1> je .value_in.loop 12778 <1> 12779 0000B508 59 <1> pop cx ; get next remembered offset 12780 0000B509 E306 <1> jcxz @F ; if none --> 12781 0000B50B 89CE <1> mov si, cx ; -> behind keyword 12782 0000B50D 4E <1> dec si 12783 0000B50E AC <1> lodsb ; reload al 12784 0000B50F EBF0 <1> jmp @B ; continue after the keyword --> 12785 <1> 12786 <1> @@: 12787 0000B511 5A <1> pop dx 12788 0000B512 5B <1> pop bx ; pop ?found counter variable 12789 0000B513 89EC5D <1> lleave 12790 <1> 12791 0000B516 B400 <1> mov ah, 0 ; type pointer=0 signed=0 12792 0000B518 EB62 <1> jmp .term_end_recount 12793 <1> 12794 <1> 12795 <1> %if _INDIRECTION 12796 <1> .indirection: 12797 0000B51A E84803 <1> call stack_check_indirection 12798 <1> ; abort if deep recursion 12799 0000B51D A9[0571] <1> test ax, msg.stack_overflow.indirection 12800 <1> 12801 0000B520 FF36[DC88] <1> _386_PM push word [bAddr32] 12802 0000B524 6652 <1> _386_PM push edx 12803 0000B526 5A <1> _386_PM pop dx 12804 <1> 12805 0000B527 E8EA03 <1> call skipcomma ; also skips the '[' in al 12806 0000B52A 8B1E[840C] <1> mov bx, word [reg_ds] ; default segment/selector 12807 0000B52E 51 <1> push cx ; save previous bit mask (ch) 12808 0000B52F E8E3F3 <1> call getaddrX ; (recursively calls getexpression:) 12809 0000B532 59 <1> pop cx 12810 0000B533 B100 <1> mov cl, 0 12811 0000B535 3C5D <1> cmp al, ']' ; verify this is the closing bracket 12812 <1> .err5_NZ: 12813 0000B537 7403E975FF <1> jne .err4_NZ ; if not --> 12814 0000B53C AC <1> lodsb ; get next character 12815 <1> ; bx:(e)dx-> data 12816 <1> ; ch = bit mask of required bytes 12817 <1> ; cl = 0 12818 <1> 12819 0000B53D 50 <1> push ax 12820 0000B53E 55 <1> push bp 12821 0000B53F 31ED <1> xor bp, bp 12822 0000B541 55 <1> push bp 12823 0000B542 55 <1> push bp 12824 0000B543 89E5 <1> mov bp, sp ; -> buffer 12825 <1> 12826 0000B545 E8D3F0 <1> call prephack 12827 0000B548 E8FEF0 <1> call dohack 12828 <1> ; Regarding how this loop handles cx, 12829 <1> ; remember that ch holds the flags for 12830 <1> ; the required bytes. 12831 <1> ; And cl is initialised to 0. In 12832 <1> ; each iteration, cl is incremented. 12833 <1> ; The loop instruction then decrements 12834 <1> ; cl again, but the entire cx is only 12835 <1> ; zero if no more bytes are required. 12836 <1> ; (This hack saves a single byte over 12837 <1> ; the "test ch, ch \ jnz" alternative 12838 <1> ; but it isn't very pretty. It 12839 <1> ; also probably slows down a bit.) 12840 <1> .indirection_loop: 12841 0000B54B D0ED <1> shr ch, 1 ; need to read this byte ? 12842 0000B54D 7306 <1> jnc .indirection_skip ; no --> 12843 0000B54F E812E4 <1> call readmem ; else read byte 12844 0000B552 884600 <1> mov byte [bp+0], al ; store byte 12845 <1> .indirection_skip: 12846 0000B555 41 <1> inc cx ; = 1 if no more to read 12847 0000B556 45 <1> inc bp ; increase buffer pointer 12848 0000B557 66 <1> _386_PM_o32 ; inc edx 12849 0000B558 42 <1> inc dx ; increase offset 12850 0000B559 E2F0 <1> loop .indirection_loop ; read next byte if any --> 12851 0000B55B E81FF1 <1> call unhack 12852 <1> 12853 0000B55E 5A <1> pop dx 12854 0000B55F 5B <1> pop bx 12855 0000B560 5D <1> pop bp 12856 0000B561 58 <1> pop ax 12857 <1> 12858 0000B562 52 <1> _386_PM push dx 12859 0000B563 665A <1> _386_PM pop edx 12860 0000B565 8F06[DC88] <1> _386_PM pop word [bAddr32] 12861 0000B569 B400 <1> mov ah, 0 ; type pointer=0 signed=0 12862 0000B56B EB0F <1> jmp short .term_end_recount 12863 <1> %endif 12864 <1> 12865 <1> 12866 <1> .parens: 12867 <1> %if _EXPRESSION_INDIRECTION_STACK_CHECK == _EXPRESSION_PARENS_STACK_CHECK 12868 0000B56D E8F502 <1> call stack_check_indirection 12869 <1> %else 12870 <1> mov ax, _EXPRESSION_PARENS_STACK_CHECK 12871 <1> call stack_check ; abort if deep recursion 12872 <1> %endif 12873 0000B570 A9[1F71] <1> test ax, msg.stack_overflow.parens 12874 <1> 12875 0000B573 AC <1> lodsb 12876 0000B574 E870FD <1> call getexpression ; (recursive) bx:dx = number, ah = type 12877 0000B577 3C29 <1> cmp al, ')' ; closing parens ? 12878 0000B579 75BC <1> jne .err5_NZ ; no --> 12879 0000B57B AC <1> lodsb 12880 <1> 12881 <1> .term_end_recount: 12882 0000B57C A9 <1> db __TEST_IMM16 ; skip pop, stc; NC 12883 <1> .term_end: 12884 0000B57D 59 <1> pop cx ; get count+1 of unary operators and type specifiers 12885 0000B57E F9 <1> stc 12886 0000B57F 5F <1> pop di ; -> term 12887 0000B580 87F7 <1> xchg si, di 12888 0000B582 57 <1> push di ; save -> behind 12889 <1> ; si-> unary operators and types 12890 0000B583 720B <1> jc .unary_processnext ; if we preserved the count --> 12891 <1> 12892 0000B585 53 <1> push bx 12893 0000B586 52 <1> push dx 12894 0000B587 56 <1> push si 12895 0000B588 E80B02 <1> call count_unary_operators 12896 0000B58B 89D1 <1> mov cx, dx ; get count+1 again 12897 0000B58D 5E <1> pop si 12898 0000B58E 5A <1> pop dx 12899 0000B58F 5B <1> pop bx 12900 <1> 12901 <1> .unary_processnext: 12902 0000B590 E204 <1> loop .unary_doprocess 12903 0000B592 5E <1> pop si ; -> behind term 12904 0000B593 4E <1> dec si ; -> character to reload in skipwhite 12905 0000B594 EB33 <1> jmp short .term_done 12906 <1> 12907 <1> .unary_doprocess: 12908 0000B596 56 <1> push si 12909 0000B597 51 <1> push cx 12910 0000B598 53 <1> push bx 12911 0000B599 52 <1> push dx 12912 <1> 12913 0000B59A 89CF <1> mov di, cx ; count+1 of operators to skip 12914 0000B59C E8F901 <1> call count_unary_operators_restrict ; skip them 12915 0000B59F 7525 <1> jnz .err ; if not enough --> (?!) 12916 <1> 12917 0000B5A1 E850F4 <1> call istype? ; get type info if it's a type 12918 0000B5A4 7211 <1> jc .unary_processnotype ; isn't a type --> 12919 0000B5A6 86C4 <1> xchg al, ah ; al = type input 12920 0000B5A8 D1EB <1> shr bx, 1 ; CF = signedness 12921 0000B5AA 9F <1> lahf ; with CF = signedness 12922 0000B5AB 8B8F[7A90] <1> mov cx, word [ typehandlers + bx ] ; function 12923 <1> .unary_processcall: 12924 0000B5AF 5A <1> pop dx 12925 0000B5B0 5B <1> pop bx 12926 0000B5B1 FFD1 <1> call cx ; call type or unary operator handler 12927 <1> ; bx:dx = output number, ah = type 12928 0000B5B3 59 <1> pop cx ; restore processing counter 12929 0000B5B4 5E <1> pop si ; restore ->term 12930 0000B5B5 EBD9 <1> jmp short .unary_processnext 12931 <1> 12932 <1> .unary_processnotype: 12933 0000B5B7 E8F3F3 <1> call isunaryoperator? ; get unary operator index 12934 0000B5BA 750A <1> jne .err ; if no unary operator --> (?!) 12935 0000B5BC 89CB <1> mov bx, cx 12936 0000B5BE D1E3 <1> shl bx, 1 12937 0000B5C0 8B8F[A690] <1> mov cx, word [ unaryoperatorhandlers + bx ] 12938 0000B5C4 EBE9 <1> jmp short .unary_processcall 12939 <1> 12940 <1> .err: 12941 0000B5C6 E913EF <1> jmp error 12942 <1> 12943 <1> .term_done: ; bx:dx = number, ah = type 12944 <1> ; get the operator following this number 12945 0000B5C9 E87703 <1> call skipwhite 12946 0000B5CC 8956F2 <1> mov word [bp+lB+0], dx 12947 0000B5CF 895EF4 <1> mov word [bp+lB+2], bx ; store numeric value 12948 0000B5D2 8B1E[AA95] <1> mov bx, word [hh_depth_of_single_term] 12949 0000B5D6 3B1E[A895] <1> cmp bx, word [hh_depth] 12950 0000B5DA 7455 <1> je .operator_invalid 12951 0000B5DC E8D4F3 <1> call isoperator? ; cl = operator index (if any) 12952 0000B5DF 7440 <1> je .operator_apparently_valid 12953 0000B5E1 E80A03 <1> call iseol? ; end of line follows ? 12954 0000B5E4 744B <1> je .operator_invalid 12955 <1> .hh_twofold_check: 12956 0000B5E6 807EFC17 <1> cmp byte [bp + lA + 4], OPERATOR_COND 12957 0000B5EA 7445 <1> je .operator_invalid ; special check for conditional operator 12958 0000B5EC 807EFC18 <1> cmp byte [bp + lA + 4], OPERATOR_RIGHTOP 12959 0000B5F0 750D <1> jne @F 12960 0000B5F2 837EFE00 <1> cmp word [bp + lCount], 0 12961 0000B5F6 7407 <1> je @F 12962 0000B5F8 59 <1> pop cx 12963 0000B5F9 51 <1> push cx 12964 0000B5FA 80F917 <1> cmp cl, OPERATOR_COND 12965 0000B5FD 7432 <1> je .operator_invalid ; special check for conditional operator 12966 <1> @@: 12967 0000B5FF 833E[A895]01 <1> cmp word [hh_depth], 1 ; are we in first level expression ? 12968 0000B604 752B <1> jne .operator_invalid ; no, do not do special H operation --> 12969 0000B606 F606[AC95]03 <1> test byte [hhflag], 1|2 ; special H operation requested ? 12970 0000B60B 7424 <1> jz .operator_invalid ; no --> 12971 0000B60D B302 <1> mov bl, OPERATOR_MINUS ; assume it's sub 12972 0000B60F F606[AC95]02 <1> test byte [hhflag], 2 ; sub requested by H ? 12973 0000B614 7501 <1> jnz .hh_twofold_found ; yes --> 12974 0000B616 4B <1> dec bx ; else it must be add 12975 <1> %if (OPERATOR_MINUS - 1) != OPERATOR_PLUS 12976 <1> %error Remove optimisation 12977 <1> %endif 12978 <1> .hh_twofold_found: 12979 0000B617 800E[AC95]04 <1> or byte [hhflag], 4 ; set flag for H twofold operation 12980 0000B61C E8F602 <1> call skipcomm0 12981 0000B61F EB12 <1> jmp short .operator_done ; return this --> 12982 <1> 12983 <1> .operator_apparently_valid: 12984 0000B621 89CB <1> mov bx, cx 12985 0000B623 01DB <1> add bx, bx 12986 0000B625 FF97[B090] <1> call [operatordispatchers + bx] 12987 0000B629 84DB <1> test bl, bl ; valid ? 12988 0000B62B 74B9 <1> jz .hh_twofold_check ; no, check for H twofold operation --> 12989 0000B62D E81303 <1> call skipwhite 12990 0000B630 A9 <1> db __TEST_IMM16 12991 <1> .operator_invalid: 12992 0000B631 31DB <1> xor bx, bx ; bl = 0 (no operator) 12993 <1> .operator_done: 12994 0000B633 88E7 <1> mov bh, ah ; bh = type info 12995 0000B635 895EF6 <1> mov word [bp+lB+4], bx ; store type and following operator 12996 <1> 12997 0000B638 8A4EFC <1> mov cl, byte [bp+lA+4] 12998 0000B63B E8EE00 <1> call .compare_operators ; (cmp bl, cl = cmp Boprtr, Aoprtr) 12999 0000B63E 7249 <1> jb .high_precedence_A ; compute the first operand first --> 13000 <1> ; (jump taken for invalid Boprtr too) 13001 0000B640 7505 <1> jne @F 13002 0000B642 83FB01 <1> cmp bx, OPPREC_COND 13003 0000B645 7542 <1> jne .high_precedence_A 13004 <1> 13005 <1> @@: 13006 0000B647 FF46FE <1> inc word [bp+lCount] ; increase loop count 13007 0000B64A FF76F8 <1> push word [bp+lA+0] 13008 0000B64D FF76FA <1> push word [bp+lA+2] 13009 0000B650 FF76FC <1> push word [bp+lA+4] ; push A and its operator 13010 <1> 13011 0000B653 FF76F6 <1> push word [bp+lB+4] 13012 0000B656 FF76F4 <1> push word [bp+lB+2] 13013 0000B659 FF76F2 <1> push word [bp+lB+0] 13014 0000B65C 8F46F8 <1> pop word [bp+lA+0] 13015 0000B65F 8F46FA <1> pop word [bp+lA+2] 13016 0000B662 8F46FC <1> pop word [bp+lA+4] ; set A to B, including operator 13017 <1> 13018 <1> %if _EXPRESSION_INDIRECTION_STACK_CHECK == _EXPRESSION_PRECEDENCE_STACK_CHECK 13019 0000B665 E8FD01 <1> call stack_check_indirection 13020 <1> %else 13021 <1> mov ax, _EXPRESSION_PRECEDENCE_STACK_CHECK 13022 <1> call stack_check ; abort if deep recursion 13023 <1> %endif 13024 0000B668 A9[3971] <1> test ax, msg.stack_overflow.precedence 13025 <1> 13026 <1> d4 call d4message 13027 <1> d4 asciz "getexpression: Entering loop/recursion",13,10 13028 <1> 13029 <1> .loop_j: 13030 0000B66B E98EFC <1> jmp .loop ; start again (former B as first term) --> 13031 <1> 13032 <1> .cont: 13033 <1> 13034 <1> d4 call d4message 13035 <1> d4 asciz "getexpression: End of loop/recursion",13,10 13036 <1> 13037 0000B66E FF76FC <1> push word [bp+lA+4] 13038 0000B671 FF76FA <1> push word [bp+lA+2] 13039 0000B674 FF76F8 <1> push word [bp+lA+0] 13040 0000B677 8F46F2 <1> pop word [bp+lB+0] 13041 0000B67A 8F46F4 <1> pop word [bp+lB+2] 13042 0000B67D 8F46F6 <1> pop word [bp+lB+4] ; set B to A, including operator 13043 <1> 13044 0000B680 8F46FC <1> pop word [bp+lA+4] 13045 0000B683 8F46FA <1> pop word [bp+lA+2] 13046 0000B686 8F46F8 <1> pop word [bp+lA+0] ; pop A and its operator 13047 <1> 13048 <1> .high_precedence_A: 13049 0000B689 8B4EFC <1> mov cx, word [bp+lA+4] ; retrieve A's type info and operator 13050 0000B68C FF76FA <1> push word [bp+lA+2] 13051 0000B68F FF76F8 <1> push word [bp+lA+0] 13052 0000B692 8B46F6 <1> mov ax, word [bp+lB+4] ; retrieve B's type info and operator 13053 0000B695 882E[AD95] <1> mov byte [hhtype], ch ; set type info 13054 0000B699 8F06[A495] <1> pop word [hhvar] 13055 0000B69D B500 <1> mov ch, 0 ; cx = A's 1-based operator index 13056 0000B69F 8F06[A695] <1> pop word [hhvar+2] ; retrieve A's number 13057 0000B6A3 8B56F2 <1> mov dx, word [bp+lB+0] 13058 0000B6A6 89CF <1> mov di, cx 13059 0000B6A8 8B5EF4 <1> mov bx, word [bp+lB+2] ; retrieve B's number 13060 0000B6AB 01FF <1> add di, di ; = offset into dispatch table 13061 0000B6AD 50 <1> push ax ; preserve B's operator 13062 0000B6AE FF95[F090] <1> call near [operatorfunctions+di]; compute: (A) operatorA (B) 13063 0000B6B2 59 <1> pop cx ; cl = B's operator 13064 <1> 13065 0000B6B3 8956F8 <1> mov word [bp+lA+0], dx 13066 0000B6B6 88C8 <1> mov al, cl ; B's operator 13067 0000B6B8 895EFA <1> mov word [bp+lA+2], bx 13068 0000B6BB 8946FC <1> mov word [bp+lA+4], ax ; store result in A, with B's operator 13069 <1> 13070 <1> %if OPERATOR_INVALID != 0 13071 <1> %error Remove optimisation 13072 <1> %endif 13073 0000B6BE 84C0 <1> test al, al ; (previous B's) operator valid ? 13074 0000B6C0 7412 <1> jz .end ; no, end of sequence --> 13075 <1> 13076 0000B6C2 837EFE00 <1> cmp word [bp+lCount], byte 0 ; in recursion ? 13077 0000B6C6 74A3 <1> je .loop_j ; no, loop --> 13078 <1> 13079 0000B6C8 5B <1> pop bx 13080 0000B6C9 53 <1> push bx ; retrieve saved ('@') operator 13081 <1> 13082 0000B6CA E85F00 <1> call .compare_operators ; (cmp bl, cl = cmp @oprtr, Aoprtr) 13083 0000B6CD 729C <1> jb .loop_j ; A's operator's precedence higher --> 13084 <1> 13085 0000B6CF 83FB01 <1> cmp bx, OPPREC_COND 13086 0000B6D2 7497 <1> je .loop_j 13087 <1> 13088 <1> d4 call d4message 13089 <1> d4 asciz "getexpression: Loop/recursion found to be not necessary anymore",13,10 13090 <1> 13091 <1> ; dec word [bp+lCount] 13092 <1> ; jmp .cont ; return to previous level --> 13093 <1> 13094 <1> .end: 13095 0000B6D4 FF4EFE <1> dec word [bp+lCount] ; decrease loop count 13096 0000B6D7 7995 <1> jns .cont ; process next operand from stack --> 13097 <1> 13098 0000B6D9 8B56F8 <1> mov dx, word [bp+lA+0] 13099 0000B6DC 8B5EFA <1> mov bx, word [bp+lA+2] ; retrieve A 13100 0000B6DF 8B46FC <1> mov ax, word [bp+lA+4] ; (discard (invalid) operator) 13101 <1> 13102 0000B6E2 89EC5D <1> lleave code ; remove the stack frame 13103 <1> 13104 0000B6E5 5F <1> pop di 13105 0000B6E6 59 <1> pop cx ; restore registers 13106 <1> 13107 0000B6E7 FF0E[A895] <1> dec word [hh_depth] 13108 0000B6EB 4E <1> dec si 13109 0000B6EC AC <1> lodsb ; (restore al) 13110 <1> 13111 <1> .countsignificantbits: 13112 0000B6ED 51 <1> push cx 13113 0000B6EE 52 <1> push dx 13114 0000B6EF 53 <1> push bx 13115 0000B6F0 B90100 <1> mov cx, 1 13116 0000B6F3 53 <1> push bx 13117 0000B6F4 F6C440 <1> test ah, 40h ; signed type ? 13118 0000B6F7 7416 <1> jz .unsigned ; no --> 13119 0000B6F9 F6C780 <1> test bh, 80h ; negative value ? 13120 0000B6FC 7411 <1> jz .unsigned ; no --> 13121 <1> .signed: 13122 0000B6FE 21D3 <1> and bx, dx 13123 0000B700 43 <1> inc bx ; = 0 if -1 (all bits set) 13124 0000B701 5B <1> pop bx 13125 0000B702 741F <1> jz .done ; is -1, 1 significant bit --> 13126 0000B704 B122 <1> mov cl, 32+1+1 ; number of significant bits is 1 + 1-based index of highest clear bit 13127 <1> .signedloop: 13128 0000B706 D1E2 <1> shl dx, 1 13129 0000B708 D1D3 <1> rcl bx, 1 ; shift up the number 13130 0000B70A 49 <1> dec cx ; maintain index 13131 0000B70B 72F9 <1> jc .signedloop ; still a set bit --> 13132 0000B70D EB14 <1> jmp short .done 13133 <1> .unsigned: 13134 0000B70F 09D3 <1> or bx, dx ; = 0 if 0 (all bits cleared) 13135 0000B711 5B <1> pop bx 13136 0000B712 740F <1> jz .done ; is 0, 1 significant bit --> 13137 0000B714 B121 <1> mov cl, 32+1 ; number of significant bits is 1-based index of highest set bit 13138 <1> .unsignedloop: 13139 0000B716 D1E2 <1> shl dx, 1 13140 0000B718 D1D3 <1> rcl bx, 1 13141 0000B71A 49 <1> dec cx 13142 0000B71B 73F9 <1> jnc .unsignedloop 13143 0000B71D F6C440 <1> test ah, 40h ; positive signed value ? 13144 0000B720 7401 <1> jz .done ; no --> 13145 0000B722 41 <1> inc cx ; then the following zero bit is required too 13146 <1> .done: 13147 0000B723 80E4C0 <1> and ah, 1100_0000b 13148 <1> ; insure we only pass the top two type bits 13149 0000B726 08CC <1> or ah, cl 13150 <1> ; low 6 bits = number of significant bits 13151 0000B728 5B <1> pop bx 13152 0000B729 5A <1> pop dx 13153 0000B72A 59 <1> pop cx 13154 0000B72B C3 <1> retn 13155 <1> 13156 <1> 13157 <1> ; INP: bl = operator index 1 13158 <1> ; cl = operator index 2 13159 <1> ; OUT: flags as for "cmp precedence1, precedence2" 13160 <1> ; CHG: bx, cx 13161 <1> .compare_operators: 13162 0000B72C E80600 <1> call .getprecedence 13163 0000B72F E80300 <1> call .getprecedence 13164 0000B732 39CB <1> cmp bx, cx 13165 0000B734 C3 <1> retn 13166 <1> 13167 <1> .getprecedence: 13168 0000B735 30FF <1> xor bh, bh 13169 0000B737 8A9F[D690] <1> mov bl, byte [operatorprecedences+bx] 13170 0000B73B 87D9 <1> xchg bx, cx 13171 0000B73D C3 <1> retn 13172 <1> 13173 <1> getexpression.lit_ishexdigit?: 13174 0000B73E B93946 <1> mov cx, "9F" 13175 <1> getexpression.lit_isdigit?: 13176 0000B741 3C30 <1> cmp al, '0' 13177 0000B743 7214 <1> jb .no 13178 0000B745 38C8 <1> cmp al, cl 13179 0000B747 760D <1> jbe .yes 13180 0000B749 50 <1> push ax 13181 0000B74A E8C6D4 <1> call uppercase 13182 0000B74D 38E8 <1> cmp al, ch 13183 0000B74F 7707 <1> ja .no_p 13184 0000B751 3C41 <1> cmp al, 'A' 13185 0000B753 7203 <1> jb .no_p 13186 0000B755 58 <1> pop ax 13187 <1> .yes: 13188 0000B756 F8 <1> clc 13189 0000B757 C3 <1> retn 13190 <1> 13191 <1> .no_p: 13192 0000B758 58 <1> pop ax 13193 <1> .no: 13194 0000B759 F9 <1> stc 13195 0000B75A C3 <1> retn 13196 <1> 13197 <1> 13198 <1> of_cond: 13199 0000B75B 50 <1> push ax ; second operand type 13200 0000B75C 4E <1> dec si 13201 0000B75D AD <1> lodsw 13202 0000B75E 3D3A3A <1> cmp ax, "::" 13203 0000B761 7403E976ED <1> jne error 13204 <1> %if _EXPRESSION_INDIRECTION_STACK_CHECK == _EXPRESSION_COND_STACK_CHECK 13205 0000B766 E8FC00 <1> call stack_check_indirection 13206 <1> %else 13207 <1> mov ax, _EXPRESSION_COND_STACK_CHECK 13208 <1> call stack_check ; abort if deep recursion 13209 <1> %endif 13210 0000B769 A9[8271] <1> test ax, msg.stack_overflow.cond 13211 <1> 13212 0000B76C A1[A495] <1> mov ax, word [hhvar] 13213 0000B76F 0B06[A695] <1> or ax, word [hhvar + 2] ; ax = flag (zero if to take third operand) 13214 0000B773 53 <1> push bx 13215 0000B774 52 <1> push dx 13216 0000B775 50 <1> push ax ; preserve stack 13217 0000B776 AC <1> lodsb 13218 0000B777 E86DFB <1> call getexpression ; parse third operand 13219 0000B77A E89801 <1> call skipcomm0 ; allow comma afterwards 13220 0000B77D 59 <1> pop cx 13221 0000B77E E309 <1> jcxz @F ; if to take third operand --> 13222 0000B780 5A <1> pop dx 13223 0000B781 5B <1> pop bx ; take second operand 13224 0000B782 88C1 <1> mov cl, al 13225 0000B784 58 <1> pop ax ; ah = second operand type 13226 0000B785 88C8 <1> mov al, cl ; preserve al 13227 0000B787 EB03 <1> jmp @FF 13228 <1> 13229 <1> @@: 13230 0000B789 59 <1> pop cx 13231 0000B78A 59 <1> pop cx ; discard second operand value 13232 0000B78B 59 <1> pop cx ; discard second operand type 13233 <1> @@: 13234 0000B78C 59 <1> pop cx ; discard near return address 13235 0000B78D 59 <1> pop cx ; discard cx on stack 13236 <1> 13237 0000B78E C646FC18 <1> mov byte [bp+lA+4], OPERATOR_RIGHTOP 13238 0000B792 4E <1> dec si 13239 0000B793 E933FE <1> jmp getexpression.term_done 13240 <1> 13241 <1> 13242 <1> lleave ctx 13243 <1> 13244 <1> 13245 <1> ; INP: si-> possible unary operators 13246 <1> ; OUT: dx = 1 + count of unary operators 13247 <1> ; al, si-> behind identified unary operators 13248 <1> ; ch = bit mask of required bytes, 13249 <1> ; bits 0..3 represent one byte of a dword each 13250 <1> ; bits 4..7 are clear 13251 <1> ; CHG: bx, ch, di 13252 <1> ; 13253 <1> ; Type specifications are parsed as unary operators 13254 <1> ; here. (Elsewhere, "unary operators" refers only to 13255 <1> ; the unary operators specified as one of "+-~!?".) 13256 <1> count_unary_operators: 13257 0000B796 31FF <1> xor di, di 13258 <1> ; INP: si-> possible unary operators 13259 <1> ; di = maximum count+1 of unary operators to process, 13260 <1> ; zero means unlimited 13261 <1> ; OUT: dx = 1 + count of unary operators, 13262 <1> ; at most di 13263 <1> ; al, si-> behind identified unary operators 13264 <1> ; ch = bit mask of required bytes, 13265 <1> ; bits 0..3 represent one byte of a dword each 13266 <1> ; bits 4..7 are clear 13267 <1> ; ZR if maximum reached 13268 <1> ; NZ if maximum not reached 13269 <1> ; CHG: bx, ch 13270 <1> count_unary_operators_restrict: 13271 0000B798 B50F <1> mov ch, 1111b ; default to access a full dword 13272 0000B79A 31D2 <1> xor dx, dx ; initialize counter to zero 13273 0000B79C A8 <1> db __TEST_IMM8 ; skip pop 13274 <1> .loop: 13275 0000B79D 5F <1> pop di ; get maximum count 13276 0000B79E 42 <1> inc dx ; count unary operators and type specifiers 13277 0000B79F 57 <1> push di ; save maximum count again 13278 0000B7A0 E8A001 <1> call skipwhite ; load next character and skip blanks 13279 0000B7A3 39FA <1> cmp dx, di ; reached maximum ? 13280 0000B7A5 741B <1> je .end ; yes --> (ZR) 13281 0000B7A7 51 <1> push cx 13282 0000B7A8 E849F2 <1> call istype? ; check for type and if so retrieve info 13283 0000B7AB 720F <1> jc .notype ; not a type --> 13284 0000B7AD 59 <1> pop cx 13285 <1> 13286 0000B7AE D1EB <1> shr bx, 1 ; discard signedness bit 13287 0000B7B0 89FE <1> mov si, di ; -> behind the type specifier 13288 0000B7B2 B11F <1> mov cl, 01Fh ; prepare shift count register 13289 0000B7B4 238F[6C90] <1> and cx,[typebitmasks+bx]; apply mask and get shift count register 13290 0000B7B8 D2E5 <1> shl ch, cl ; apply shift 13291 0000B7BA EBE1 <1> jmp short .loop ; check for more --> 13292 <1> 13293 <1> .notype: 13294 0000B7BC E8EEF1 <1> call isunaryoperator? ; is it a unary operator? 13295 0000B7BF 59 <1> pop cx 13296 0000B7C0 74DB <1> je .loop ; yes, check for more --> 13297 <1> ; (NZ) 13298 <1> .end: 13299 0000B7C2 5F <1> pop di ; discard 13300 0000B7C3 C3 <1> retn 13301 <1> 13302 <1> 13303 <1> get3byte.checksignificantbits: 13304 0000B7C4 50 <1> push ax 13305 0000B7C5 80E43F <1> and ah, 3Fh 13306 0000B7C8 80FC18 <1> cmp ah, 24 13307 0000B7CB EB1E <1> jmp checksignificantbitscommon 13308 <1> 13309 <1> getword: 13310 0000B7CD 53 <1> push bx 13311 0000B7CE E816FB <1> call getexpression 13312 0000B7D1 5B <1> pop bx 13313 <1> .checksignificantbits: 13314 0000B7D2 50 <1> push ax 13315 0000B7D3 80E43F <1> and ah, 3Fh 13316 0000B7D6 80FC10 <1> cmp ah, 16 13317 0000B7D9 EB10 <1> jmp checksignificantbitscommon 13318 <1> 13319 <1> getbyte: 13320 0000B7DB 53 <1> push bx 13321 0000B7DC 52 <1> push dx 13322 0000B7DD E807FB <1> call getexpression 13323 0000B7E0 5B <1> pop bx 13324 0000B7E1 88FE <1> mov dh, bh 13325 0000B7E3 5B <1> pop bx 13326 <1> .checksignificantbits: 13327 0000B7E4 50 <1> push ax 13328 0000B7E5 80E43F <1> and ah, 3Fh 13329 0000B7E8 80FC08 <1> cmp ah, 8 13330 <1> checksignificantbitscommon: 13331 0000B7EB 58 <1> pop ax 13332 0000B7EC 7701 <1> ja short errorj6 ; if error 13333 0000B7EE C3 <1> retn 13334 <1> 13335 <1> errorj6: 13336 0000B7EF E9EAEC <1> jmp error 13337 <1> 13338 <1> 13339 <1> ; GETNYB - Convert the hex character in AL into a nybble. Return 13340 <1> ; carry set in case of error. 13341 <1> 13342 <1> getnyb: 13343 0000B7F2 50 <1> push ax 13344 0000B7F3 2C30 <1> sub al, '0' 13345 0000B7F5 3C09 <1> cmp al, 9 13346 0000B7F7 760D <1> jbe .return ; if normal digit 13347 0000B7F9 58 <1> pop ax 13348 0000B7FA 50 <1> push ax 13349 0000B7FB E815D4 <1> call uppercase 13350 0000B7FE 2C41 <1> sub al, 'A' 13351 0000B800 3C05 <1> cmp al, 'F'-'A' 13352 0000B802 7706 <1> ja .error ; if not A..F 13353 0000B804 040A <1> add al, 10 13354 <1> .return: 13355 0000B806 44 <1> inc sp ; normal return (first pop old AX) 13356 0000B807 44 <1> inc sp 13357 0000B808 F8 <1> clc 13358 0000B809 C3 <1> retn 13359 <1> .error: 13360 0000B80A 58 <1> pop ax ; error return 13361 0000B80B F9 <1> stc 13362 0000B80C C3 <1> retn 13363 <1> 13364 <1> 13365 <1> ; INP: si -> input line 13366 <1> ; OUT: NC if normal range (nonzero, upper >= lower), 13367 <1> ; bx:dx = TO value (upper bound) 13368 <1> ; cx:di = FROM value (lower bound) 13369 <1> ; CY if not normal, 13370 <1> ; bx:dx and cx:di may be invalid 13371 <1> ; ZR if FROM LENGTH with zero length, cx:di valid 13372 <1> ; al = first character 13373 <1> ; si -> next character 13374 <1> ; jumps to error if invalid input 13375 <1> get_value_range: 13376 0000B80D E83301 <1> call skipwhite 13377 0000B810 4E <1> dec si 13378 0000B811 BA[1767] <1> mov dx, msg.from 13379 0000B814 E87800 <1> call isstring? 13380 0000B817 AC <1> lodsb 13381 0000B818 753B <1> jne .not_from 13382 <1> 13383 <1> .from: 13384 0000B81A E8CAFA <1> call getexpression ; (recursive) 13385 0000B81D 89D7 <1> mov di, dx 13386 0000B81F 89D9 <1> mov cx, bx ; cx:di = from 13387 <1> 13388 0000B821 4E <1> dec si 13389 0000B822 BA[1C67] <1> mov dx, msg.to 13390 0000B825 E86700 <1> call isstring? 13391 0000B828 7425 <1> je .from_to 13392 0000B82A BA[F966] <1> mov dx, msg.length 13393 0000B82D E85F00 <1> call isstring? 13394 0000B830 7403E9A7EC <1> jne error 13395 <1> 13396 <1> .from_length: 13397 0000B835 AC <1> lodsb 13398 0000B836 E8AEFA <1> call getexpression ; (recursive) 13399 0000B839 85DB <1> test bx, bx 13400 0000B83B 7506 <1> jnz @F 13401 0000B83D 85D2 <1> test dx, dx 13402 0000B83F 7502 <1> jnz @F 13403 <1> ; ZR = length is zero, cx:di = from 13404 <1> .notnormal: 13405 0000B841 F9 <1> stc 13406 0000B842 C3 <1> retn 13407 <1> 13408 <1> @@: 13409 <1> ; bx:dx = length 13410 0000B843 01FA <1> add dx, di 13411 0000B845 11CB <1> adc bx, cx ; bx:dx = from + length 13412 0000B847 83EA01 <1> sub dx, 1 13413 0000B84A 83DB00 <1> sbb bx, 0 ; bx:dx = from + length - 1 13414 0000B84D EB0D <1> jmp @F 13415 <1> 13416 <1> .from_to: 13417 0000B84F AC <1> lodsb 13418 <1> 13419 0000B850 E894FA <1> call getexpression ; (recursive) 13420 <1> ; bx:dx = to 13421 <1> ; cx:di = from 13422 0000B853 EB07 <1> jmp @F 13423 <1> 13424 <1> .not_from: 13425 0000B855 E88FFA <1> call getexpression ; (recursive) 13426 0000B858 89D7 <1> mov di, dx 13427 0000B85A 89D9 <1> mov cx, bx ; bx:dx = cx:ax = value 13428 <1> 13429 <1> @@: 13430 0000B85C 39CB <1> cmp bx, cx 13431 0000B85E 7502 <1> jne @F 13432 0000B860 39FA <1> cmp dx, di 13433 <1> @@: 13434 0000B862 72DD <1> jb .notnormal ; NZ = length overflow or not normal FROM TO 13435 0000B864 C3 <1> retn ; (NC) 13436 <1> 13437 <1> 13438 <1> stack_check_indirection: 13439 0000B865 B88000 <1> mov ax, _EXPRESSION_INDIRECTION_STACK_CHECK 13440 <1> 13441 <1> ; INP: ax = how much stack should be left 13442 <1> ; word [cs:ip + 1] = message for location 13443 <1> ; OUT: doesn't return if stack overflow 13444 <1> ; CHG: ax 13445 <1> ; STT: ds = ss 13446 <1> stack_check: 13447 0000B868 05[400A] <1> add ax, stack 13448 0000B86B 39C4 <1> cmp sp, ax 13449 0000B86D 7201 <1> jb @F 13450 0000B86F C3 <1> retn 13451 <1> 13452 <1> @@: 13453 0000B870 58 <1> pop ax 13454 <1> 13455 0000B871 16 <1> push ss 13456 0000B872 07 <1> pop es 13457 0000B873 8B26[9E0A] <1> mov sp, [throwsp] 13458 <1> 13459 0000B877 BF[F670] <1> mov di, msg.stack_overflow.caller 13460 0000B87A E87101 <1> call hexword 13461 0000B87D BA[DA70] <1> mov dx, msg.stack_overflow 13462 0000B880 E82105 <1> call putsz 13463 0000B883 93 <1> xchg ax, bx 13464 0000B884 2E8B5701 <1> mov dx, [cs:bx + 1] 13465 0000B888 E81905 <1> call putsz 13466 <1> 13467 0000B88B FF26[9A0A] <1> jmp near [errret] 9304 9305 9306 %include "lineio.asm" 9307 <1> 9308 <1> %if 0 9309 <1> 9310 <1> lDebug line input and output 9311 <1> 9312 <1> Copyright (C) 1995-2003 Paul Vojta 9313 <1> Copyright (C) 2008-2012 C. Masloch 9314 <1> 9315 <1> Usage of the works is permitted provided that this 9316 <1> instrument is retained with the works, so that any entity 9317 <1> that uses the works is notified of this instrument. 9318 <1> 9319 <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 9320 <1> 9321 <1> %endif 9322 <1> 9323 <1> 9324 <1> usesection lDEBUG_CODE 9325 <1> 9326 <1> ; Check for given string (cap-insensitive) 9327 <1> ; 9328 <1> ; INP: si-> input string to check (either cap), 9329 <1> ; terminated by CR (13), semicolon, space, tab, 9330 <1> ; comma, colon, [, ], (, or ) 9331 <1> ; dx-> ASCIZ string to check (all-caps) 9332 <1> ; OUT: Iff string matches, 9333 <1> ; ZR 9334 <1> ; si-> at separator that terminates the keyword 9335 <1> ; else, 9336 <1> ; NZ 9337 <1> ; si = input si 9338 <1> ; STT: ds = es = ss 9339 <1> ; CHG: dx, al 9340 <1> isstring?: 9341 0000B88F 56 <1> push si 9342 0000B890 87D7 <1> xchg dx, di 9343 <1> .loop: 9344 0000B892 AC <1> lodsb 9345 0000B893 E87DD3 <1> call uppercase 9346 0000B896 AE <1> scasb 9347 0000B897 7506 <1> jne .mismatch 9348 0000B899 84C0 <1> test al, al 9349 0000B89B 75F5 <1> jne .loop 9350 0000B89D EB38 <1> jmp .matched_zr 9351 <1> 9352 <1> .mismatch: 9353 0000B89F E84C00 <1> call iseol? 9354 0000B8A2 742C <1> je .checkend 9355 0000B8A4 3C20 <1> cmp al, 32 9356 0000B8A6 7428 <1> je .checkend 9357 0000B8A8 3C09 <1> cmp al, 9 9358 0000B8AA 7424 <1> je .checkend 9359 0000B8AC 3C2E <1> cmp al, '.' 9360 0000B8AE 7420 <1> je .checkend 9361 0000B8B0 3C2C <1> cmp al, ',' 9362 0000B8B2 741C <1> je .checkend 9363 0000B8B4 3C3D <1> cmp al, '=' 9364 0000B8B6 7418 <1> je .checkend 9365 0000B8B8 3C3A <1> cmp al, ':' 9366 0000B8BA 7414 <1> je .checkend 9367 0000B8BC 3C5B <1> cmp al, '[' 9368 0000B8BE 7410 <1> je .checkend 9369 0000B8C0 3C5D <1> cmp al, ']' 9370 0000B8C2 740C <1> je .checkend 9371 0000B8C4 3C28 <1> cmp al, '(' 9372 0000B8C6 7408 <1> je .checkend 9373 0000B8C8 3C29 <1> cmp al, ')' 9374 0000B8CA 7404 <1> je .checkend 9375 <1> .ret_nz: 9376 <1> ; NZ 9377 0000B8CC 5E <1> pop si 9378 <1> .ret: 9379 0000B8CD 87D7 <1> xchg dx, di 9380 0000B8CF C3 <1> retn 9381 <1> 9382 <1> .checkend: 9383 0000B8D0 26807DFF00 <1> cmp byte [es:di - 1], 0 9384 0000B8D5 75F5 <1> jne .ret_nz 9385 <1> .matched_zr: ; ZR 9386 0000B8D7 5F <1> pop di ; (discard) 9387 0000B8D8 8D74FF <1> lea si, [si - 1] ; -> separator 9388 0000B8DB EBF0 <1> jmp .ret 9389 <1> 9390 <1> 9391 <1> iseol?_or_then: 9392 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 9393 0000B8DD F606[A700]08 <1> testopt [internalflags3], dif3_in_if 9394 0000B8E2 740A <1> jz iseol? 9395 0000B8E4 BA[B164] <1> mov dx, msg.then 9396 0000B8E7 4E <1> dec si 9397 0000B8E8 E8A4FF <1> call isstring? 9398 0000B8EB 740B <1> je iseol?.ret 9399 0000B8ED AC <1> lodsb 9400 <1> %endif 9401 <1> 9402 <1> iseol?: 9403 0000B8EE 3C3B <1> cmp al, ';' 9404 0000B8F0 7406 <1> je .ret 9405 <1> .notsemicolon: 9406 0000B8F2 3C0D <1> cmp al, 13 ; this *IS* iseol? 9407 0000B8F4 7402 <1> je .ret 9408 0000B8F6 3C00 <1> cmp al, 0 9409 <1> .ret: 9410 0000B8F8 C3 <1> retn 9411 <1> 9412 <1> 9413 <1> chkeol_or_then: 9414 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 9415 0000B8F9 E84800 <1> call skipwh0 9416 0000B8FC E8DEFF <1> call iseol?_or_then 9417 0000B8FF 74F7 <1> je iseol?.ret ; if EOL --> 9418 0000B901 EB08 <1> jmp @F 9419 <1> %endif 9420 <1> 9421 <1> ; Check for end of line 9422 <1> ; 9423 <1> ; INP: al = first character 9424 <1> ; ds:si-> next character 9425 <1> ; OUT: ZR 9426 <1> ; al = 13 or al = ';' or al = 0 9427 <1> ; (does not return if anything on line beside blanks) 9428 <1> chkeol: 9429 0000B903 E83E00 <1> call skipwh0 9430 0000B906 E8E5FF <1> call iseol? 9431 0000B909 74ED <1> je iseol?.ret ; if EOL --> 9432 <1> 9433 <1> @@: 9434 0000B90B B80001 <1> mov ax, 0100h 9435 0000B90E E812EC <1> call setrc 9436 <1> errorj8: 9437 0000B911 E9C8EB <1> jmp error 9438 <1> 9439 <1> 9440 <1> ; SKIPCOMMA - Skip white space, then an optional comma, and more white 9441 <1> ; space. 9442 <1> ; SKIPCOMM0 - Same as above, but we already have the character in AL. 9443 <1> ; STK: 3 word 9444 <1> skipcomma: 9445 0000B914 AC <1> lodsb 9446 <1> skipcomm0: 9447 0000B915 E82C00 <1> call skipwh0 9448 0000B918 3C2C <1> cmp al, ',' 9449 0000B91A 7510 <1> jne .return ; if no comma 9450 0000B91C 56 <1> push si 9451 0000B91D E82300 <1> call skipwhite 9452 0000B920 E8CBFF <1> call iseol? 9453 0000B923 7504 <1> jne .noteol ; if not end of line 9454 0000B925 5E <1> pop si 9455 0000B926 B02C <1> mov al, ',' 9456 0000B928 C3 <1> retn 9457 <1> .noteol: 9458 0000B929 83C402 <1> add sp, byte 2 ; pop si into nowhere 9459 <1> .return: 9460 0000B92C C3 <1> retn 9461 <1> 9462 <1> 9463 <1> skipequals: 9464 0000B92D AC <1> lodsb 9465 <1> skipequ0: 9466 0000B92E E81300 <1> call skipwh0 9467 0000B931 3C3D <1> cmp al, '=' 9468 0000B933 7503 <1> jne .return 9469 0000B935 E80B00 <1> call skipwhite 9470 <1> .return: 9471 0000B938 C3 <1> retn 9472 <1> 9473 <1> 9474 <1> ; Skip alphabetic characters, and then white space 9475 <1> ; 9476 <1> ; INP: ds:si-> first character 9477 <1> ; OUT: al = first non-blank character behind alphabetic characters 9478 <1> ; ds:si-> character behind the first non-blank behind alpha. 9479 <1> ; NC 9480 <1> skipalpha: 9481 <1> .: 9482 0000B939 AC <1> lodsb 9483 0000B93A 24DF <1> and al, TOUPPER 9484 0000B93C 2C41 <1> sub al, 'A' 9485 0000B93E 3C19 <1> cmp al, 'Z'-'A' 9486 0000B940 76F7 <1> jbe . 9487 0000B942 4E <1> dec si 9488 <1> 9489 <1> ; Skip blanks and tabs 9490 <1> ; 9491 <1> ; INP: ds:si-> first character 9492 <1> ; OUT: al = first non-blank character 9493 <1> ; ds:si-> character behind the first non-blank 9494 <1> ; NC 9495 <1> ; CHG: - 9496 <1> ; STK: 1 word 9497 <1> skipwhite: 9498 0000B943 AC <1> lodsb 9499 <1> 9500 <1> ; Same as above, but first character in al 9501 <1> ; 9502 <1> ; INP: al = first character 9503 <1> ; ds:si-> next character 9504 <1> ; OUT: al = first non-blank character 9505 <1> ; ds:si-> character behind the first non-blank 9506 <1> ; NC 9507 <1> ; CHG: - 9508 <1> ; STK: 1 word 9509 <1> skipwh0: 9510 0000B944 3C20 <1> cmp al, 32 9511 0000B946 74FB <1> je skipwhite 9512 0000B948 3C09 <1> cmp al, 9 9513 0000B94A 74F7 <1> je skipwhite 9514 0000B94C F8 <1> clc 9515 0000B94D C3 <1> retn 9516 <1> 9517 <1> 9518 <1> ; SHOWSTRING - Print ASCIZ string. 9519 <1> showstring.next: 9520 0000B94E AA <1> stosb 9521 <1> showstring: 9522 0000B94F AC <1> lodsb 9523 0000B950 84C0 <1> test al, al 9524 0000B952 75FA <1> jnz .next 9525 0000B954 C3 <1> retn 9526 <1> 9527 <1> 9528 <1> ; Dump byte as decimal number string 9529 <1> ; 9530 <1> ; INP: al = byte 9531 <1> ; di-> where to store 9532 <1> ; OUT: - 9533 <1> ; CHG: di-> behind variable-length string 9534 <1> decbyte: 9535 0000B955 50 <1> push ax 9536 0000B956 51 <1> push cx 9537 0000B957 B96400 <1> mov cx, 100 9538 0000B95A E80B00 <1> call .div 9539 0000B95D B10A <1> mov cl, 10 9540 0000B95F E80600 <1> call .div 9541 0000B962 0430 <1> add al, '0' 9542 0000B964 AA <1> stosb 9543 0000B965 59 <1> pop cx 9544 0000B966 58 <1> pop ax 9545 0000B967 C3 <1> retn 9546 <1> 9547 <1> .div: 9548 0000B968 30E4 <1> xor ah, ah 9549 0000B96A F6F1 <1> div cl 9550 0000B96C 08C5 <1> or ch, al 9551 0000B96E 7403 <1> jz .leadingzero 9552 0000B970 0430 <1> add al, '0' 9553 0000B972 AA <1> stosb 9554 <1> .leadingzero: 9555 0000B973 86C4 <1> xchg al, ah 9556 0000B975 C3 <1> retn 9557 <1> 9558 <1> 9559 <1> decword: 9560 0000B976 52 <1> push dx 9561 0000B977 31D2 <1> xor dx, dx 9562 0000B979 E80200 <1> call decdword 9563 0000B97C 5A <1> pop dx 9564 0000B97D C3 <1> retn 9565 <1> 9566 <1> 9567 <1> decdword: 9568 0000B97E 51 <1> push cx 9569 0000B97F 31C9 <1> xor cx, cx 9570 0000B981 E80200 <1> call dec_dword_minwidth 9571 0000B984 59 <1> pop cx 9572 0000B985 C3 <1> retn 9573 <1> 9574 <1> 9575 <1> ; Dump dword as decimal number string 9576 <1> ; 9577 <1> ; INP: dx:ax = dword 9578 <1> ; cx = minimum width (<= 1 for none, must be < 128) 9579 <1> ; di -> where to store 9580 <1> ; OUT: - 9581 <1> ; CHG: di -> behind variable-length string 9582 <1> ; STT: UP 9583 <1> dec_dword_minwidth: 9584 <1> lframe near 9585 <1> lequ 10, bufferlen 9586 <1> lvar ?bufferlen,buffer 9587 0000B986 5589E58D66F6 <1> lenter 9588 <1> lvar dword, dividend 9589 0000B98C 52 <1> push dx 9590 0000B98D 50 <1> push ax 9591 0000B98E 49 <1> dec cx 9592 <1> lvar word, minwidth 9593 0000B98F 51 <1> push cx 9594 0000B990 41 <1> inc cx 9595 <1> 9596 0000B991 50 <1> push ax 9597 0000B992 53 <1> push bx 9598 0000B993 51 <1> push cx 9599 0000B994 52 <1> push dx 9600 0000B995 56 <1> push si 9601 0000B996 57 <1> push di 9602 0000B997 06 <1> push es 9603 <1> 9604 0000B998 16 <1> push ss 9605 0000B999 07 <1> pop es 9606 <1> 9607 0000B99A 8D7EFF <1> lea di, [bp + ?buffer + ?bufferlen - 1] 9608 0000B99D 89FB <1> mov bx, di 9609 0000B99F FD <1> std ; _AMD_ERRATUM_109_WORKAROUND does not apply 9610 <1> 9611 <1> ; dword [bp + ?dividend] = number to display 9612 0000B9A0 B90A00 <1> mov cx, 10 ; divisor 9613 <1> .loop_write: 9614 <1> 9615 0000B9A3 31D2 <1> xor dx, dx 9616 0000B9A5 57 <1> push di 9617 0000B9A6 BF0400 <1> mov di, 4 9618 <1> .loop_divide: 9619 0000B9A9 8B43F0 <1> mov ax, [bp + ?dividend - 2 + di] 9620 0000B9AC F7F1 <1> div cx 9621 0000B9AE 8943F0 <1> mov word [bp + ?dividend - 2 + di], ax 9622 0000B9B1 4F <1> dec di 9623 0000B9B2 4F <1> dec di 9624 0000B9B3 75F4 <1> jnz .loop_divide 9625 <1> ; dx = last remainder 9626 0000B9B5 5F <1> pop di 9627 0000B9B6 92 <1> xchg ax, dx ; ax = remainder (next digit) 9628 <1> ; dword [bp + ?dividend] = result of div 9629 0000B9B7 0430 <1> add al, '0' 9630 0000B9B9 AA <1> stosb 9631 0000B9BA FF4EF0 <1> dec word [bp + ?minwidth] 9632 0000B9BD 79E4 <1> jns .loop_write 9633 <1> 9634 0000B9BF 837EF400 <1> cmp word [bp + ?dividend + 2], 0 9635 0000B9C3 75DE <1> jnz .loop_write 9636 0000B9C5 837EF200 <1> cmp word [bp + ?dividend], 0 9637 <1> ; any more ? 9638 0000B9C9 75D8 <1> jnz .loop_write ; loop --> 9639 <1> 9640 0000B9CB FC <1> cld 9641 <1> 9642 0000B9CC 29FB <1> sub bx, di 9643 0000B9CE 89D9 <1> mov cx, bx 9644 0000B9D0 89FE <1> mov si, di 9645 0000B9D2 46 <1> inc si 9646 <1> 9647 0000B9D3 07 <1> pop es 9648 0000B9D4 5F <1> pop di 9649 <1> 9650 <1> @@: 9651 0000B9D5 36A4 <1> ss movsb ; do not replace by rep ss movsb, because 9652 <1> ; some 8086 don't like two-prefix opcodes 9653 0000B9D7 E2FC <1> loop @B 9654 <1> 9655 0000B9D9 5E <1> pop si 9656 0000B9DA 5A <1> pop dx 9657 0000B9DB 59 <1> pop cx 9658 0000B9DC 5B <1> pop bx 9659 0000B9DD 58 <1> pop ax 9660 <1> 9661 0000B9DE 89EC5D <1> lleave 9662 0000B9E1 C3 <1> retn 9663 <1> 9664 <1> 9665 <1> ; dump high word of eax - assumes 386 9666 <1> hexword_high: 9667 <1> [cpu 386] 9668 0000B9E2 66C1C010 <1> rol eax, 16 9669 0000B9E6 E80500 <1> call hexword 9670 0000B9E9 66C1C010 <1> rol eax, 16 9671 <1> __CPU__ 9672 0000B9ED C3 <1> retn 9673 <1> 9674 <1> 9675 <1> ; hexdword - dump dword (in eax) to hex ASCII - assumes 386 9676 <1> ; HEXWORD - Print hex word (in AX). 9677 <1> ; HEXBYTE - Print hex byte (in AL). 9678 <1> ; HEXNYB - Print hex digit. 9679 <1> ; Uses none. 9680 <1> %if 0 ; currently disabled because only one call made to here (ID command) 9681 <1> hexdword: 9682 <1> call hexword_high 9683 <1> %endif 9684 <1> hexword: 9685 0000B9EE 86C4 <1> xchg al, ah 9686 0000B9F0 E80200 <1> call hexbyte 9687 0000B9F3 86C4 <1> xchg al, ah 9688 <1> 9689 <1> hexbyte: 9690 0000B9F5 51 <1> push cx 9691 0000B9F6 B104 <1> mov cl, 4 9692 0000B9F8 D2C0 <1> rol al, cl 9693 0000B9FA E80300 <1> call hexnyb 9694 0000B9FD D2C0 <1> rol al, cl 9695 0000B9FF 59 <1> pop cx 9696 <1> 9697 <1> hexnyb: 9698 0000BA00 50 <1> push ax 9699 0000BA01 240F <1> and al, 0Fh 9700 <1> .common: 9701 <1> ; These three instructions change to ASCII hex. 9702 <1> ; Refer to https://codegolf.stackexchange.com/questions/193793/little-endian-number-to-string-conversion/193842#193842 9703 0000BA03 3C0A <1> cmp al, 10 ; set CF according to digit <= 9 9704 0000BA05 1C69 <1> sbb al, 69h ; read CF, set CF and conditionally set AF 9705 0000BA07 2F <1> das ; magic, which happens to work 9706 0000BA08 AA <1> stosb 9707 0000BA09 58 <1> pop ax 9708 0000BA0A C3 <1> retn 9709 <1> 9710 <1> ; TAB_TO - Space fill until reaching the column indicated by AX. 9711 <1> ; (Print a new line if necessary.) 9712 <1> 9713 <1> tab_to: 9714 0000BA0B 50 <1> push ax 9715 0000BA0C 29F8 <1> sub ax, di 9716 0000BA0E 7706 <1> ja tabto1 ; if there's room on this line 9717 0000BA10 E80B00 <1> call trimputs 9718 0000BA13 BF[0E08] <1> mov di, line_out 9719 <1> tabto1: 9720 0000BA16 59 <1> pop cx 9721 0000BA17 29F9 <1> sub cx, di 9722 0000BA19 B020 <1> mov al, 32 9723 0000BA1B F3AA <1> rep stosb ; space fill to the right end 9724 <1> puts.retn: 9725 0000BA1D C3 <1> retn 9726 <1> 9727 <1> ; Trim excess blanks, append linebreak and display line_out. 9728 <1> ; 9729 <1> ; INP: es:di -> behind last character to display, or blank 9730 <1> ; 9731 <1> ; Note: May overflow if line_out only contains blanks. The byte at 9732 <1> ; trim_overflow is used to avoid overflows. 9733 <1> trimputs: 9734 0000BA1E 4F <1> dec di 9735 0000BA1F 26803D20 <1> cmp byte [es:di], 32 9736 0000BA23 74F9 <1> je trimputs 9737 0000BA25 47 <1> inc di 9738 <1> 9739 <1> ; Append linebreak and display line_out 9740 <1> ; 9741 <1> ; INP: es:di -> behind last character to display 9742 <1> ; STT: all segment registers same 9743 <1> ; CHG: ax, bx, cx, dx 9744 <1> putsline_crlf: 9745 0000BA26 B80D0A <1> mov ax, 10<<8| 13 9746 0000BA29 AB <1> stosw 9747 <1> 9748 <1> ; Display line_out 9749 <1> ; 9750 <1> ; INP: es:di -> behind last character to display 9751 <1> ; es:line_out -> first character to display 9752 <1> ; STT: all segment registers same 9753 <1> ; CHG: ax, bx, cx, dx 9754 <1> putsline: 9755 0000BA2A 89F9 <1> mov cx, di 9756 0000BA2C BA[0E08] <1> mov dx, line_out 9757 0000BA2F 29D1 <1> sub cx, dx 9758 <1> 9759 <1> ; Display message 9760 <1> ; 9761 <1> ; INP: es:dx -> message to display 9762 <1> ; cx = length of message 9763 <1> ; STT: ds = ss = debugger data selector 9764 <1> ; CHG: ax, bx, cx, dx 9765 <1> puts: 9766 <1> ;d4 call d4message 9767 <1> ;d4 asciz "In puts first",13,10 9768 <1> 9769 0000BA31 F606[9F00]20 <1> testopt [internalflags], tt_silence 9770 0000BA36 7403E93302 <1> jnz puts_silence 9771 <1> 9772 0000BA3B F606[A500]60 <1> testopt [internalflags3], dif3_unquiet 9773 0000BA40 7507 <1> jnz @F 9774 0000BA42 F606[A500]10 <1> testopt [internalflags3], dif3_quiet_output 9775 0000BA47 75D4 <1> jnz .retn 9776 <1> @@: 9777 <1> 9778 <1> ; The following code contains most of the paging support. 9779 <1> ; Based on the number of LF characters in the string it 9780 <1> ; displays only parts of the string, then interrupts it by 9781 <1> ; the "[more]" prompt which waits for any key before 9782 <1> ; proceeding. This is ensured to work proper in InDOS mode. 9783 <1> ; 9784 <1> ; Paging is deactivated if the command's output mustn't be 9785 <1> ; paged (clears pagedcommand, which is set by cmd3). It is 9786 <1> ; also not used when we output to a file. 9787 0000BA49 F606[7C00]10 <1> testopt [options], nonpagingdevice 9788 0000BA4E 7403E9FE00 <1> jnz .display ; deactivated by user --> 9789 0000BA53 F606[A700]01 <1> testopt [internalflags3], dif3_input_re 9790 0000BA58 7403E9F400 <1> jnz .display 9791 0000BA5D F606[A500]01 <1> testopt [internalflags3], dif3_input_cmdline 9792 0000BA62 7403E9EA00 <1> jnz .display 9793 <1> %if _INPUT_FILE_BOOT 9794 0000BA67 F606[A300]02 <1> testopt [internalflags2], dif2_input_file_boot 9795 0000BA6C 7403E9E000 <1> jnz .display 9796 <1> %endif 9797 0000BA71 E834EC <1> call InDos ; InDOS mode ? 9798 0000BA74 752C <1> jnz .dontcheckredirection ; yes, then we display with Int10 anyway --> 9799 <1> %if _INPUT_FILE_HANDLES 9800 0000BA76 F606[A200]10 <1> testopt [internalflags2], dif2_input_file 9801 0000BA7B 7403E9D100 <1> jnz .display 9802 <1> %endif 9803 0000BA80 F606[7D00]40 <1> testopt [options], enable_serial ; I/O done using serial port ? 9804 0000BA85 751B <1> jnz .dontcheckredirection ; yes, is paged --> 9805 0000BA87 F606[9C00]80 <1> testopt [internalflags], outputfile 9806 0000BA8C 7403E9C000 <1> jnz .display ; output redirected to file. never page --> 9807 0000BA91 F606[7D00]01 <1> testopt [options], nondospaging 9808 0000BA96 750A <1> jnz .dontcheckredirection 9809 0000BA98 F606[9C00]20 <1> testopt [internalflags], inputfile 9810 0000BA9D 7403E9AF00 <1> jnz .display ; input redirected from a file. never page --> 9811 <1> .dontcheckredirection: 9812 0000BAA2 57 <1> push di 9813 0000BAA3 51 <1> push cx ; used as variable: remaining (not yet displayed) line length 9814 0000BAA4 89D7 <1> mov di, dx ; es:di-> string, cx = length 9815 <1> .looplf: 9816 0000BAA6 85C9 <1> test cx, cx 9817 0000BAA8 7503E9A200 <1> jz .display_pop ; end of string (or ended in LF) --> 9818 <1> ; Important: We only ever jump back to .looplf when cx 9819 <1> ; zero means it's okay to ignore the waiting prompt as 9820 <1> ; flagged below. This is (A) at the start of a string, 9821 <1> ; where cx is the whole string's length, (B) after 9822 <1> ; determining that prompting is not yet necessary, in 9823 <1> ; which case the flag was checked earlier already, (C) 9824 <1> ; after the flag has been set and a substring was already 9825 <1> ; displayed (so cx is again the whole substring's length) 9826 <1> ; or (D) just after the prompt was displayed, in which 9827 <1> ; case the flag cannot be set. 9828 <1> ; In case A and C, when the (sub)string is empty (ie. cx 9829 <1> ; is zero) it's crucial to ignore the waiting prompt as 9830 <1> ; this is the exact behaviour we want: If nothing is 9831 <1> ; displayed anymore before the getline code prompts 9832 <1> ; anyway, do not display our prompt. 9833 0000BAAD F606[9E00]10 <1> testopt [internalflags], promptwaiting ; do we have a prompt to display ? 9834 0000BAB2 7550 <1> jnz .promptnow ; yes, display it before the string --> 9835 <1> 9836 0000BAB4 31C0 <1> xor ax, ax 9837 0000BAB6 F606[7D00]40 <1> testopt [options], enable_serial ; serial ? 9838 0000BABB 7409 <1> jz @F ; no --> 9839 0000BABD 0A06[E70B] <1> or al, byte [serial_rows] ; ax = number of rows if serial 9840 0000BAC1 7419 <1> jz .display_pop_ZR ; if zero, do not page --> 9841 0000BAC3 48 <1> dec ax ; was 1 ? (adjust to rows minus one) 9842 0000BAC4 7516 <1> jnz @FF ; no, use as rows minus one --> (NZ) 9843 <1> ; ax = 0 if it was 1 9844 <1> @@: 9845 0000BAC6 0A06[F60B] <1> or al, [io_rows] 9846 0000BACA 7410 <1> jz .display_pop_ZR 9847 0000BACC 48 <1> dec ax ; was 1 ? (adjust to rows minus one) 9848 0000BACD 750D <1> jnz @F ; no, use as rows minus one --> (NZ) 9849 <1> ; yes, automatic (use BDA) 9850 0000BACF 06 <1> push es 9851 0000BAD0 B84000 <1> mov ax, 40h ; 0040h is a bimodal segment/selector 9852 0000BAD3 8EC0 <1> mov es, ax 9853 0000BAD5 26A08400 <1> mov al, byte [ es:84h ] ; rows on screen 9854 0000BAD9 07 <1> pop es 9855 0000BADA 85C0 <1> test ax, ax 9856 <1> @@: 9857 <1> .display_pop_ZR: 9858 0000BADC 7471 <1> jz .display_pop 9859 <1> 9860 0000BADE 3806[930A] <1> cmp byte [ linecounter ], al 9861 0000BAE2 725E <1> jb .notyet ; not yet reached --> 9862 0000BAE4 F606[9C00]08 <1> testopt [internalflags], pagedcommand ; active ? 9863 0000BAE9 7506 <1> jnz .prompt ; yes, prompt --> 9864 0000BAEB FE0E[930A] <1> dec byte [ linecounter ] ; keep count, but don't prompt til next LF 9865 0000BAEF EB51 <1> jmp short .notyet 9866 <1> 9867 <1> .prompt: 9868 0000BAF1 58 <1> pop ax ; ax = length of string, cx = length of string remaining 9869 0000BAF2 29C8 <1> sub ax, cx ; ax = length of string til LF 9870 0000BAF4 91 <1> xchg ax, cx ; cx = til LF incl., ax = behind LF 9871 0000BAF5 50 <1> push ax ; new count 9872 <1> ; cx = length til LF 9873 <1> ; es:dx-> start of part til LF 9874 0000BAF6 E85800 <1> call .display ; display part of message which fits on screen 9875 0000BAF9 59 <1> pop cx 9876 0000BAFA 51 <1> push cx ; update cx from variable 9877 0000BAFB 89FA <1> mov dx, di ; dx-> start of next part 9878 0000BAFD 800E[9E00]10 <1> setopt [internalflags], promptwaiting ; mark as prompting necessary 9879 0000BB02 EBA2 <1> jmp short .looplf ; now check whether anything follows at all 9880 <1> ; This is the magic to suppress unnecessary prompts as 9881 <1> ; were displayed previously. Now, we'll set this flag 9882 <1> ; which effectively displays the prompt before (!) any 9883 <1> ; other output is done. Previously, the prompt would be 9884 <1> ; displayed right here. The only case where behaviour 9885 <1> ; changed is when no more output occurs until the flag 9886 <1> ; is reset elsewhere - ie. if getline prompts anyway. 9887 <1> 9888 <1> .promptnow: 9889 0000BB04 52 <1> push dx 9890 0000BB05 51 <1> push cx 9891 0000BB06 C606[930A]00 <1> mov byte [ linecounter ], 0 ; prompting, so reset the line counter 9892 0000BB0B 8026[9E00]EF <1> clropt [internalflags], promptwaiting 9893 0000BB10 06 <1> push es 9894 0000BB11 16 <1> push ss 9895 0000BB12 07 <1> pop es 9896 0000BB13 BA[0E5D] <1> mov dx, msg.more ; es:dx -> message 9897 0000BB16 B90600 <1> mov cx, msg.more_size 9898 0000BB19 E83500 <1> call .display ; print string (avoiding a recursion) 9899 0000BB1C 07 <1> pop es 9900 <1> 9901 <1> ; This option is a hack for the sole use of 9902 <1> ; demo scripts that only want the user to press 9903 <1> ; a key for paging. 9904 0000BB1D F606[7D00]01 <1> testopt [options], nondospaging 9905 0000BB22 7405 <1> jz .getc 9906 0000BB24 E8F502 <1> call getc.rawnext ; get a character from BIOS 9907 0000BB27 EB03 <1> jmp short .dispover 9908 <1> .getc: 9909 0000BB29 E8DD02 <1> call getc ; get a character 9910 <1> .dispover: 9911 0000BB2C 3C03 <1> cmp al, 3 ; is it Ctrl+C ? 9912 0000BB2E 743D <1> je .ctrlc ; yes, handle that --> 9913 0000BB30 E87284 <1> call handle_serial_flags_ctrl_c 9914 0000BB33 06 <1> push es 9915 0000BB34 16 <1> push ss 9916 0000BB35 07 <1> pop es 9917 0000BB36 BA[145D] <1> mov dx, msg.more_over ; es:dx -> message 9918 0000BB39 B90800 <1> mov cx, msg.more_over_size 9919 0000BB3C E81200 <1> call .display ; overwrite the prompt (avoiding a recursion) 9920 0000BB3F 07 <1> pop es 9921 0000BB40 59 <1> pop cx 9922 0000BB41 5A <1> pop dx 9923 <1> 9924 <1> .notyet: 9925 0000BB42 B00A <1> mov al, 10 9926 0000BB44 F2AE <1> repne scasb ; search LF 9927 0000BB46 7507 <1> jne .display_pop ; none --> 9928 <1> 9929 0000BB48 FE06[930A] <1> inc byte [ linecounter ] ; record how many LFs will be displayed 9930 0000BB4C E957FF <1> jmp .looplf ; search for next LF --> 9931 <1> 9932 <1> .display_pop: 9933 0000BB4F 59 <1> pop cx 9934 0000BB50 5F <1> pop di 9935 <1> .display: 9936 <1> ; Non-paged output code follows. 9937 <1> ;d4 call d4message 9938 <1> ;d4 asciz "In puts.display first",13,10 9939 <1> 9940 0000BB51 F606[7D00]40 <1> testopt [options], enable_serial 9941 0000BB56 7522 <1> jnz .notdos 9942 0000BB58 E84DEB <1> call InDos 9943 0000BB5B 751D <1> jnz .notdos 9944 <1> ; es:dx -> message 9945 0000BB5D BB0100 <1> mov bx, 1 ; standard output 9946 0000BB60 B440 <1> mov ah, 40h ; write to file 9947 <1> %if _PM 9948 <1> d5 push di 9949 0000BB62 06 <1> push es ; point ds of _doscall* to msg segment 9950 <1> d5 call d4message 9951 <1> d5 asciz 13,10,"In puts.display, es=" 9952 <1> d5 push es 9953 <1> d5 call d4disp_stack_hex 9954 <1> d5 call d4message 9955 <1> d5 asciz "h",13,10 9956 0000BB63 E819A2 <1> call selector_to_segment ; make sure we give it as a segment 9957 <1> ; This assumes that non-access-slice pointers into the 9958 <1> ; symbol tables (SYMSTR particularly) can be converted 9959 <1> ; into 86M segmented addresses, ie that the selector 9960 <1> ; points into 86M-accessible memory. 9961 <1> d5 call d4message 9962 <1> d5 asciz "In puts.display, on stack =" 9963 <1> d5 pop di 9964 <1> d5 push di 9965 <1> d5 push di 9966 <1> d5 call d4disp_stack_hex 9967 <1> d5 call d4message 9968 <1> d5 asciz "h",13,10 9969 0000BB66 E8E9D6 <1> call _doscall_return_es_parameter_es_ds 9970 0000BB69 83C402 <1> add sp, 2 ; discard es returned from call 9971 <1> d5 pop di 9972 <1> %else 9973 <1> push ds 9974 <1> push es 9975 <1> pop ds ; ds:dx -> message 9976 <1> int 21h ; simply call into DOS 9977 <1> pop ds 9978 <1> %endif 9979 0000BB6C C3 <1> retn 9980 <1> 9981 <1> .ctrlc: 9982 0000BB6D F606[A300]10 <1> testopt [internalflags2], dif2_in_silence_dump 9983 0000BB72 7403 <1> jz @F 9984 0000BB74 E81C02 <1> call reset_silent_mode 9985 <1> @@: 9986 0000BB77 E9A284 <1> jmp handle_ctrl_c ; abort currently running command --> 9987 <1> ; If handled by DOS, Ctrl+C causes our process to be terminated. 9988 <1> ; Because we are self-owned, we re-enter our code at debug22 then. 9989 <1> ; debug22 only does some re-initialization of registers before 9990 <1> ; entering cmd3. Therefore, instead of aborting we can directly jump 9991 <1> ; to cmd3 here. This has the additional benefit of not requiring DOS 9992 <1> ; at all, so that no workarounds for InDOS mode and boot loader 9993 <1> ; operation are necessary. 9994 <1> 9995 <1> ; No command should fail spectacularly when being aborted this way, 9996 <1> ; because in fact every command calling puts can already be aborted by 9997 <1> ; DOS's Ctrl+C checking if DOS is used. This check is really only an 9998 <1> ; _additional_ way the commands can be aborted. 9999 <1> 10000 <1> ; Note that a more complete way to support command abortion would be 10001 <1> ; to hook Int1B, and to keep a flag of whether Ctrl+C or Ctrl+Break 10002 <1> ; were requested, and to additionally check before or after every I/O 10003 <1> ; operation whether Ctrl+C was pressed using non-destructive reads. 10004 <1> ; In short, exactly what DOS does. 10005 <1> 10006 <1> .notdos: 10007 0000BB7A 56 <1> push si 10008 0000BB7B F606[9E00]01 <1> testopt [internalflags], usecharcounter 10009 0000BB80 7505 <1> jnz .dontresetcharcounter 10010 0000BB82 C606[920A]01 <1> mov byte [ charcounter ], 1 10011 <1> ; This assumes we always start at the beginning of a line. 10012 <1> ; Therefore any call to puts must display at the beginning 10013 <1> ; of a line or tab parsing will not work. Only calls to puts 10014 <1> ; not containing tab characters may display partial lines. 10015 <1> ; (Calls to puts with partial lines and tab characters have 10016 <1> ; to set the flag usecharcounter in internalflags.) 10017 <1> .dontresetcharcounter: 10018 0000BB87 E358 <1> jcxz .return 10019 0000BB89 89D6 <1> mov si, dx 10020 <1> .loop: 10021 0000BB8B 26AC <1> es lodsb 10022 0000BB8D 3C09 <1> cmp al, 9 10023 0000BB8F 750B <1> jne .nottab ; is no tab --> 10024 0000BB91 A0[920A] <1> mov al, byte [ charcounter ] 10025 0000BB94 2407 <1> and al, 7 ; at 8 character boundary ? 10026 0000BB96 B020 <1> mov al, 32 ; (always replaced by blank) 10027 0000BB98 7402 <1> jz .nottab ; yes, don't use hack --> 10028 0000BB9A 41 <1> inc cx 10029 0000BB9B 4E <1> dec si ; find tab again next lodsb 10030 <1> .nottab: 10031 0000BB9C 3C0D <1> cmp al, 13 ; (exact match for CR) 10032 0000BB9E 750A <1> jne .notcr 10033 0000BBA0 8026[A600]FD <1> clropt [internalflags3], dif3_int10_highlight 10034 0000BBA5 C606[920A]00 <1> mov byte [ charcounter ], 0 ; increased to one before displaying 10035 <1> .notcr: 10036 <1> %if 0 ; currently we never receive BS here 10037 <1> cmp al, 8 10038 <1> jne .notbs 10039 <1> mov ah, 0Fh 10040 <1> int 10h ; get page 10041 <1> mov bl, al ; save number of characters per column 10042 <1> push cx 10043 <1> mov ah, 03h 10044 <1> int 10h ; get cursor position dx 10045 <1> pop cx 10046 <1> dec byte [ charcounter ] ; assume not at start of line 10047 <1> mov al, 8 ; changed by Int10 10048 <1> or dl, dl 10049 <1> jnz .dontcount ; not first column, so display normal --> 10050 <1> mov byte [ charcounter ], 1 ; assume at start of screen 10051 <1> or dh, dh 10052 <1> jz .next ; at start of screen, don't display --> 10053 <1> dec dh ; previous line 10054 <1> mov dl, bl 10055 <1> mov byte [ charcounter ], dl ; really at end of line (one-based counter) 10056 <1> dec dl ; last column 10057 <1> mov ah, 02h 10058 <1> int 10h ; set new cursor position 10059 <1> jmp short .next 10060 <1> .notbs: 10061 <1> %endif 10062 0000BBAA 3C0A <1> cmp al, 10 10063 0000BBAC 7404 <1> je .dontcount ; must not count line feeds! 10064 0000BBAE FE06[920A] <1> inc byte [ charcounter ] 10065 <1> .dontcount: 10066 0000BBB2 F606[7D00]40 <1> testopt [options], enable_serial 10067 0000BBB7 7405 <1> jz @F 10068 <1> 10069 0000BBB9 E87914 <1> call serial_send_char 10070 <1> 10071 0000BBBC EB21 <1> jmp .next 10072 <1> @@: 10073 <1> 10074 0000BBBE 3C1B <1> cmp al, 27 10075 0000BBC0 7421 <1> je .try_highlight 10076 <1> 10077 <1> .nohighlight: 10078 0000BBC2 F606[A600]02 <1> testopt [internalflags3], dif3_int10_highlight 10079 0000BBC7 740F <1> jz @F 10080 0000BBC9 B409 <1> mov ah, 09h 10081 0000BBCB B700 <1> mov bh, 0 10082 0000BBCD 8A1E[AE95] <1> mov bl, byte [.attribute] 10083 0000BBD1 51 <1> push cx 10084 0000BBD2 B90100 <1> mov cx, 1 10085 0000BBD5 CD10 <1> int 10h 10086 0000BBD7 59 <1> pop cx 10087 <1> 10088 <1> @@: 10089 0000BBD8 BB0700 <1> mov bx, 0007 10090 0000BBDB B40E <1> mov ah, 0Eh 10091 0000BBDD CD10 <1> int 10h 10092 <1> .next: 10093 0000BBDF E2AA <1> loop .loop 10094 <1> .return: 10095 0000BBE1 5E <1> pop si 10096 0000BBE2 C3 <1> retn 10097 <1> 10098 <1> .try_highlight: 10099 0000BBE3 F606[8600]02 <1> testopt [options3], opt3_r_highlight_dumb 10100 0000BBE8 75D8 <1> jnz .nohighlight 10101 0000BBEA 83F902 <1> cmp cx, 2 10102 0000BBED 76D3 <1> jbe .nohighlight 10103 0000BBEF 26803C5B <1> cmp byte [es:si], '[' 10104 0000BBF3 75CD <1> jne .nohighlight 10105 0000BBF5 26807C016D <1> cmp byte [es:si + 1], 'm' 10106 0000BBFA 742C <1> je .highlight_reset 10107 0000BBFC 83F903 <1> cmp cx, 3 10108 0000BBFF 74C1 <1> je .nohighlight 10109 0000BC01 26807C0137 <1> cmp byte [es:si + 1], '7' 10110 0000BC06 75BA <1> jne .nohighlight 10111 0000BC08 26807C026D <1> cmp byte [es:si + 2], 'm' 10112 0000BC0D 75B3 <1> jne .nohighlight 10113 <1> .highlight_set: 10114 0000BC0F 50 <1> push ax 10115 0000BC10 51 <1> push cx 10116 0000BC11 B403 <1> mov ah, 3 10117 0000BC13 B700 <1> mov bh, 0 10118 0000BC15 31D2 <1> xor dx, dx ; pre-initialise to zero 10119 0000BC17 CD10 <1> int 10h ; dl = column, dh = row 10120 0000BC19 84D2 <1> test dl, dl 10121 0000BC1B 59 <1> pop cx 10122 0000BC1C 58 <1> pop ax 10123 0000BC1D 74A3 <1> jz .nohighlight 10124 <1> ; This test fails if we are at the very left of 10125 <1> ; the screen or in dosemu -dumb mode. So don't 10126 <1> ; use highlighting at the beginning of a line! 10127 0000BC1F 800E[A600]02 <1> setopt [internalflags3], dif3_int10_highlight 10128 0000BC24 49 <1> dec cx 10129 0000BC25 46 <1> inc si 10130 0000BC26 EB10 <1> jmp @F 10131 <1> 10132 <1> .highlight_reset: 10133 0000BC28 50 <1> push ax 10134 0000BC29 51 <1> push cx 10135 0000BC2A B403 <1> mov ah, 3 10136 0000BC2C B700 <1> mov bh, 0 10137 0000BC2E 31D2 <1> xor dx, dx ; pre-initialise to zero 10138 0000BC30 CD10 <1> int 10h ; dl = column, dh = row 10139 0000BC32 84D2 <1> test dl, dl 10140 0000BC34 59 <1> pop cx 10141 0000BC35 58 <1> pop ax 10142 0000BC36 748A <1> jz .nohighlight 10143 <1> ; Refer to above comment. 10144 <1> @@: 10145 0000BC38 800E[A600]02 <1> setopt [internalflags3], dif3_int10_highlight 10146 0000BC3D FECA <1> dec dl 10147 0000BC3F B402 <1> mov ah, 02h 10148 0000BC41 B700 <1> mov bh, 0 10149 0000BC43 CD10 <1> int 10h ; set cursor position 10150 0000BC45 B408 <1> mov ah, 08h 10151 0000BC47 B700 <1> mov bh, 0 10152 0000BC49 CD10 <1> int 10h ; read attribute to ah 10153 0000BC4B 50 <1> push ax 10154 0000BC4C FEC2 <1> inc dl 10155 0000BC4E B402 <1> mov ah, 02h 10156 0000BC50 B700 <1> mov bh, 0 10157 0000BC52 CD10 <1> int 10h ; set cursor position 10158 0000BC54 58 <1> pop ax 10159 0000BC55 88E0 <1> mov al, ah 10160 0000BC57 257788 <1> and ax, 8877h 10161 0000BC5A D0C0 <1> rol al, 1 10162 0000BC5C D0C0 <1> rol al, 1 10163 0000BC5E D0C0 <1> rol al, 1 10164 0000BC60 D0C0 <1> rol al, 1 10165 0000BC62 08E0 <1> or al, ah 10166 0000BC64 A2[AE95] <1> mov byte [.attribute], al 10167 <1> 10168 0000BC67 49 <1> dec cx 10169 0000BC68 49 <1> dec cx 10170 0000BC69 46 <1> inc si 10171 0000BC6A 46 <1> inc si 10172 0000BC6B E971FF <1> jmp .next 10173 <1> 10174 <1> 10175 <1> usesection lDEBUG_DATA_ENTRY 10176 000095AE 00 <1> .attribute: db 0 10177 <1> usesection lDEBUG_CODE 10178 <1> 10179 <1> 10180 <1> ; INP: es:dx -> message to display 10181 <1> ; cx = length of message 10182 <1> ; STT: ds = ss = debugger data selector 10183 <1> ; CHG: ax, bx, cx, dx 10184 <1> puts_silence: 10185 0000BC6E 56 <1> push si 10186 0000BC6F 57 <1> push di 10187 <1> 10188 <1> .try_again: 10189 0000BC70 89D6 <1> mov si, dx ; es:si -> message 10190 0000BC72 8B3E[FA09] <1> mov di, word [auxbuff_behind_last_silent] 10191 <1> ; (auxbuff):di -> next buffer (if it fits) 10192 0000BC76 B80F20 <1> mov ax, _AUXBUFFSIZE - 1 10193 0000BC79 29F8 <1> sub ax, di ; number of bytes left free 10194 <1> ; (+ 1 byte terminator) 10195 0000BC7B 7204 <1> jc .delete 10196 0000BC7D 39C8 <1> cmp ax, cx ; fits ? 10197 0000BC7F 730B <1> jae .simple ; yes --> 10198 <1> 10199 <1> .delete: 10200 0000BC81 06 <1> push es 10201 0000BC82 8E06[F209] <1> mov es, word [auxbuff_segorsel] 10202 0000BC86 E81700 <1> call silence_delete_one_string 10203 0000BC89 07 <1> pop es 10204 0000BC8A EBE4 <1> jmp .try_again 10205 <1> 10206 <1> .simple: 10207 0000BC8C 1E <1> push ds 10208 0000BC8D 06 <1> push es 10209 0000BC8E FF36[F209] <1> push word [auxbuff_segorsel] 10210 0000BC92 06 <1> push es 10211 0000BC93 1F <1> pop ds ; ds:si -> message 10212 0000BC94 07 <1> pop es ; es:di -> next buffer 10213 0000BC95 F3A4 <1> rep movsb ; copy over 10214 0000BC97 07 <1> pop es 10215 0000BC98 1F <1> pop ds 10216 0000BC99 893E[FA09] <1> mov word [auxbuff_behind_last_silent], di 10217 <1> ; update pointer 10218 0000BC9D 5F <1> pop di 10219 0000BC9E 5E <1> pop si 10220 0000BC9F C3 <1> retn 10221 <1> 10222 <1> 10223 <1> ; INP: es => auxbuff 10224 <1> ; ds = ss 10225 <1> ; [auxbuff_behind_last_silent] -> behind last silent 10226 <1> ; [auxbuff_behind_while_condition] 10227 <1> ; OUT: [auxbuff_behind_last_silent] updated 10228 <1> ; auxbuff updated (deleted one of the dump strings, 10229 <1> ; moved forwards in the buffer the remainder) 10230 <1> ; if error, aborts command by jumping to cmd3 10231 <1> ; CHG: ax, di, si 10232 <1> silence_delete_one_string: 10233 0000BCA0 E81400 <1> call .internal ; call internal implementation 10234 0000BCA3 733E <1> jnc .retn ; no error ? --> 10235 <1> .error: ; else: error, abort command 10236 0000BCA5 16 <1> push ss 10237 0000BCA6 1F <1> pop ds 10238 0000BCA7 16 <1> push ss 10239 0000BCA8 07 <1> pop es 10240 0000BCA9 8026[9F00]DF <1> clropt [internalflags], tt_silence 10241 0000BCAE BA[E968] <1> mov dx, msg.silent_error 10242 0000BCB1 E8F000 <1> call putsz 10243 0000BCB4 E94943 <1> jmp cmd3 10244 <1> 10245 <1> 10246 <1> ; INP: as for silence_delete_one_string 10247 <1> ; OUT: as for silence_delete_one_string, but: 10248 <1> ; CY if error (no more space) 10249 <1> ; NC if success 10250 <1> ; CHG: ax, di, si 10251 <1> ; STT: ds = ss 10252 <1> .internal: 10253 0000BCB7 51 <1> push cx 10254 0000BCB8 8B0E[FA09] <1> mov cx, [auxbuff_behind_last_silent] 10255 <1> ; -> next buffer position 10256 0000BCBC 8B3E[F809] <1> mov di, word [auxbuff_behind_while_condition] 10257 0000BCC0 29F9 <1> sub cx, di 10258 0000BCC2 B000 <1> mov al, 0 10259 0000BCC4 3C01 <1> cmp al, 1 ; initialise to NZ (if cx is zero) 10260 0000BCC6 F2AE <1> repne scasb 10261 0000BCC8 F9 <1> stc 10262 0000BCC9 7518 <1> jne .retn ; error, no NUL found in data (CY) 10263 <1> ; es:di -> behind first NUL 10264 <1> 10265 0000BCCB 89FE <1> mov si, di ; es:si -> next message 10266 0000BCCD 8B3E[F809] <1> mov di, word [auxbuff_behind_while_condition] 10267 0000BCD1 8B0E[FA09] <1> mov cx, word [auxbuff_behind_last_silent] 10268 0000BCD5 06 <1> push es 10269 0000BCD6 1F <1> pop ds ; ds:si -> next message 10270 0000BCD7 29F1 <1> sub cx, si ; remaining buffer 10271 0000BCD9 F3A4 <1> rep movsb ; move to start of silent buffer 10272 0000BCDB 16 <1> push ss 10273 0000BCDC 1F <1> pop ds 10274 0000BCDD 893E[FA09] <1> mov word [auxbuff_behind_last_silent], di 10275 0000BCE1 59 <1> pop cx 10276 0000BCE2 F8 <1> clc ; (NC) 10277 <1> .retn: 10278 0000BCE3 C3 <1> retn 10279 <1> 10280 <1> 10281 <1> ; After having used puts_silence, this dumps all data 10282 <1> ; remaining in the silent buffer in auxbuff. 10283 <1> ; If word [tt_silent_mode_number] is set, only that many 10284 <1> ; data strings (zero-terminated) are dumped, from the end 10285 <1> ; of the buffer. 10286 <1> ; 10287 <1> ; CHG: ax, bx, cx, dx, si, di, es 10288 <1> ; STT: ds = ss = debugger data selector 10289 <1> ; sets es to ss 10290 <1> silence_dump: 10291 0000BCE4 F606[9F00]10 <1> testopt [internalflags], tt_silent_mode ; is in use ? 10292 0000BCE9 7501 <1> jnz @F ; yes --> 10293 0000BCEB C3 <1> retn ; no. simple 10294 <1> 10295 <1> @@: 10296 0000BCEC 8026[9F00]DF <1> clropt [internalflags], tt_silence 10297 0000BCF1 800E[A300]10 <1> setopt [internalflags2], dif2_in_silence_dump 10298 <1> 10299 0000BCF6 F606[8500]01 <1> testopt [options3], opt3_silence_paging_set 10300 0000BCFB 7413 <1> jz @F 10301 0000BCFD F606[8500]02 <1> testopt [options3], opt3_silence_paging_on 10302 0000BD02 7407 <1> jz .turn_paging_off 10303 <1> 10304 <1> .turn_paging_on: 10305 0000BD04 800E[9C00]08 <1> setopt [internalflags], pagedcommand 10306 0000BD09 EB05 <1> jmp @F 10307 <1> 10308 <1> .turn_paging_off: 10309 0000BD0B 8026[9C00]F7 <1> clropt [internalflags], pagedcommand 10310 <1> @@: 10311 <1> 10312 0000BD10 8B16[FC09] <1> mov dx, word [tt_silent_mode_number] 10313 0000BD14 85D2 <1> test dx, dx 10314 0000BD16 7428 <1> jz .no_number_given 10315 <1> 10316 0000BD18 8E06[F209] <1> mov es, word [auxbuff_segorsel] 10317 0000BD1C 8B3E[F809] <1> mov di, word [auxbuff_behind_while_condition] 10318 0000BD20 8B0E[FA09] <1> mov cx, word [auxbuff_behind_last_silent] 10319 0000BD24 29F9 <1> sub cx, di 10320 0000BD26 7418 <1> jz .no_number_given 10321 <1> 10322 0000BD28 31DB <1> xor bx, bx ; counter of zeros 10323 <1> @@: 10324 0000BD2A B000 <1> mov al, 0 10325 0000BD2C E307 <1> jcxz @F ; no more data --> 10326 0000BD2E F2AE <1> repne scasb ; another zero ? 10327 0000BD30 7503 <1> jne @F ; no, done --> 10328 0000BD32 43 <1> inc bx ; count zeros 10329 0000BD33 EBF5 <1> jmp @B ; search for next --> 10330 <1> 10331 <1> @@: 10332 0000BD35 29D3 <1> sub bx, dx ; number of dumps - requested number 10333 <1> ; = excess number of dumps 10334 0000BD37 7607 <1> jbe .no_number_given 10335 <1> 10336 0000BD39 89D9 <1> mov cx, bx ; use excess number as loop counter 10337 <1> @@: 10338 0000BD3B E862FF <1> call silence_delete_one_string 10339 <1> ; delete one string 10340 0000BD3E E2FB <1> loop @B ; loop for however many to delete --> 10341 <1> 10342 <1> .no_number_given: 10343 0000BD40 8B3E[F809] <1> mov di, word [auxbuff_behind_while_condition] 10344 <1> ; es:di -> silent buffer 10345 <1> .loop_line: 10346 0000BD44 8E06[F209] <1> mov es, word [auxbuff_segorsel] 10347 0000BD48 8B0E[FA09] <1> mov cx, word [auxbuff_behind_last_silent] 10348 0000BD4C 29F9 <1> sub cx, di ; any more data ? 10349 0000BD4E 7439 <1> jz .return ; no, return --> 10350 0000BD50 B000 <1> mov al, 0 10351 0000BD52 49 <1> dec cx ; (in case of branching for next conditional) 10352 0000BD53 AE <1> scasb ; starts with a NUL byte ? 10353 0000BD54 7402 <1> je @F ; yes, skipped --> 10354 0000BD56 41 <1> inc cx ; (restore cx to original value) 10355 0000BD57 4F <1> dec di ; no, decrement 10356 <1> @@: 10357 0000BD58 89FE <1> mov si, di ; es:si -> start of string 10358 <1> 10359 0000BD5A 81F90001 <1> cmp cx, 256 ; cx > 256 ? 10360 0000BD5E 7603 <1> jbe @F ; no --> 10361 0000BD60 B90001 <1> mov cx, 256 ; limit to 256 bytes per string 10362 <1> ; (line_out is 264 bytes) 10363 <1> @@: 10364 0000BD63 E324 <1> jcxz .return ; (if single byte that was NUL remaining -->) 10365 0000BD65 89CB <1> mov bx, cx ; search string length 10366 0000BD67 B000 <1> mov al, 0 10367 0000BD69 F2AE <1> repne scasb ; scan for NUL bytes 10368 0000BD6B 7501 <1> jne @F ; (if none found: cx = 0) 10369 <1> ; (if any found: cx = remaining length) 10370 0000BD6D 41 <1> inc cx ; cx = remaining length + 1 (do not output NUL) 10371 <1> @@: 10372 0000BD6E 29CB <1> sub bx, cx ; search length - remaining = found length 10373 0000BD70 89D9 <1> mov cx, bx ; how much to show 10374 0000BD72 06 <1> push es 10375 0000BD73 1F <1> pop ds ; ds => auxbuff (ds:si -> start of string) 10376 0000BD74 16 <1> push ss 10377 0000BD75 07 <1> pop es ; es => line_out 10378 0000BD76 BF[0E08] <1> mov di, line_out ; es:di -> line_out 10379 0000BD79 51 <1> push cx 10380 0000BD7A F3A4 <1> rep movsb ; copy over to line_out 10381 0000BD7C 59 <1> pop cx ; cx = message length 10382 <1> 10383 0000BD7D 16 <1> push ss 10384 0000BD7E 1F <1> pop ds ; reset seg regs to ss 10385 0000BD7F BA[0E08] <1> mov dx, line_out ; dx -> message, cx = length 10386 0000BD82 56 <1> push si 10387 0000BD83 E8ABFC <1> call puts ; print out 10388 0000BD86 5F <1> pop di ; -> next silent message 10389 0000BD87 EBBB <1> jmp .loop_line 10390 <1> 10391 <1> .return: 10392 0000BD89 16 <1> push ss 10393 0000BD8A 07 <1> pop es 10394 0000BD8B FF36[F809] <1> push word [auxbuff_behind_while_condition] 10395 0000BD8F 8F06[FA09] <1> pop word [auxbuff_behind_last_silent] 10396 <1> reset_silent_mode: 10397 0000BD93 8026[9F00]CF <1> clropt [internalflags], tt_silent_mode | tt_silence 10398 0000BD98 8026[A300]EF <1> clropt [internalflags2], dif2_in_silence_dump 10399 0000BD9D C3 <1> retn 10400 <1> 10401 <1> 10402 <1> putsz_error: 10403 0000BD9E 36800E[A500]20 <1> setopt [ss:internalflags3], dif3_unquiet_error 10404 <1> 10405 <1> ; Display ASCIZ message 10406 <1> ; 10407 <1> ; INP: ds:dx -> ASCIZ message to display 10408 <1> ; CHG: - 10409 <1> ; STT: ds, es don't care 10410 <1> putsz: 10411 0000BDA4 50 <1> push ax 10412 0000BDA5 53 <1> push bx 10413 0000BDA6 51 <1> push cx 10414 0000BDA7 52 <1> push dx 10415 0000BDA8 06 <1> push es 10416 0000BDA9 1E <1> push ds 10417 0000BDAA 1E <1> push ds 10418 0000BDAB 07 <1> pop es 10419 0000BDAC 57 <1> push di 10420 0000BDAD 89D7 <1> mov di, dx ; es:di-> string 10421 0000BDAF 30C0 <1> xor al, al 10422 0000BDB1 B9FFFF <1> mov cx, -1 10423 0000BDB4 F2AE <1> repne scasb ; search zero 10424 0000BDB6 F7D9 <1> neg cx 10425 0000BDB8 49 <1> dec cx 10426 0000BDB9 49 <1> dec cx ; cx = length of message 10427 0000BDBA 5F <1> pop di 10428 0000BDBB 16 <1> push ss 10429 0000BDBC 1F <1> pop ds ; ds = ss 10430 0000BDBD E871FC <1> call puts 10431 0000BDC0 1F <1> pop ds 10432 0000BDC1 07 <1> pop es 10433 0000BDC2 5A <1> pop dx 10434 0000BDC3 59 <1> pop cx 10435 0000BDC4 5B <1> pop bx 10436 0000BDC5 58 <1> pop ax 10437 0000BDC6 C3 <1> retn 10438 <1> 10439 <1> ; Display character 10440 <1> ; 10441 <1> ; INP: al = character to display 10442 <1> ; CHG: - 10443 <1> ; STT: ds, es don't care 10444 <1> putc: 10445 0000BDC7 53 <1> push bx 10446 0000BDC8 51 <1> push cx 10447 0000BDC9 52 <1> push dx 10448 0000BDCA 06 <1> push es 10449 0000BDCB 1E <1> push ds 10450 0000BDCC 16 <1> push ss 10451 0000BDCD 07 <1> pop es ; es:dx -> message 10452 0000BDCE 16 <1> push ss 10453 0000BDCF 1F <1> pop ds ; ds = ss 10454 0000BDD0 50 <1> push ax 10455 0000BDD1 B90100 <1> mov cx, 1 ; one character 10456 0000BDD4 89E2 <1> mov dx, sp ; ds:dx-> ax on stack 10457 0000BDD6 E858FC <1> call puts 10458 0000BDD9 58 <1> pop ax 10459 0000BDDA 1F <1> pop ds 10460 0000BDDB 07 <1> pop es 10461 0000BDDC 5A <1> pop dx 10462 0000BDDD 59 <1> pop cx 10463 0000BDDE 5B <1> pop bx 10464 0000BDDF C3 <1> retn 10465 <1> 10466 <1> 10467 <1> ; OUT: ax = 0 if no input available 10468 <1> ; ax = 0FFFFh if DOS stdin input available 10469 <1> ; ah = scancode, al = ASCII if int 16h input available 10470 <1> ; ax = al = ASCII if serial input available 10471 <1> ; REM: This is always a nondestructive read. 10472 <1> peekc: 10473 0000BDE0 F606[7D00]40 <1> testopt [options], enable_serial 10474 0000BDE5 750C <1> jnz .serial 10475 0000BDE7 E8BEE8 <1> call InDos 10476 0000BDEA 740E <1> jz .dos 10477 <1> .bios: 10478 0000BDEC B401 <1> mov ah, 01h 10479 0000BDEE CD16 <1> int 16h ; key available ? 10480 <1> @@: 10481 0000BDF0 7413 <1> jz .return_ax_0 10482 0000BDF2 C3 <1> retn 10483 <1> 10484 <1> .serial: 10485 0000BDF3 E8AA10 <1> call serial_check_receive_char 10486 <1> ; do serial getc (check rx buffer) 10487 0000BDF6 B400 <1> mov ah, 0 10488 0000BDF8 EBF6 <1> jmp @B 10489 <1> 10490 <1> .dos: 10491 0000BDFA B40B <1> mov ah, 0Bh 10492 <1> doscall 2040 0000BDFC E86A9F <2> call _doscall 10493 0000BDFF B4FF <1> mov ah, -1 10494 0000BE01 84C0 <1> test al, al 10495 0000BE03 EBEB <1> jmp @B 10496 <1> 10497 <1> .return_ax_0: 10498 0000BE05 B80000 <1> mov ax, 0 10499 <1> .return: 10500 0000BE08 C3 <1> retn 10501 <1> 10502 <1> 10503 <1> ; Get character/key 10504 <1> ; 10505 <1> ; OUT: al = character (if zero, look for ah) 10506 <1> ; ah = scan code or zero 10507 <1> ; CHG: ax 10508 <1> ; STT: ds = ss = debugger segment/selector 10509 <1> ; 10510 <1> ; Idles system when in InDOS mode. When not in InDOS mode, Int21.08 10511 <1> ; is used which is assumed to idle the system itself. 10512 <1> getc: 10513 0000BE09 F606[A400]20 <1> testopt [internalflags3], dif3_input_serial_override 10514 0000BE0E 750C <1> jnz @F 10515 0000BE10 F606[7D00]40 <1> testopt [options], enable_serial 10516 0000BE15 7505 <1> jnz @F 10517 0000BE17 E88EE8 <1> call InDos 10518 0000BE1A 7440 <1> jz getc_dos 10519 <1> @@: 10520 <1> .rawnext: 10521 0000BE1C FF16[040C] <1> call near word [getline_timer_func] 10522 <1> 10523 0000BE20 F606[A400]20 <1> testopt [internalflags3], dif3_input_serial_override 10524 0000BE25 7523 <1> jnz @F 10525 0000BE27 F606[A700]01 <1> testopt [internalflags3], dif3_input_re 10526 0000BE2C 751C <1> jnz @F 10527 <1> %if _INPUT_FILE_BOOT 10528 0000BE2E F606[A300]02 <1> testopt [internalflags2], dif2_input_file_boot 10529 0000BE33 7515 <1> jnz @F 10530 <1> %endif 10531 0000BE35 F606[A500]01 <1> testopt [internalflags3], dif3_input_cmdline 10532 0000BE3A 750E <1> jnz @F 10533 0000BE3C F606[7D00]40 <1> testopt [options], enable_serial 10534 0000BE41 7507 <1> jnz @F 10535 0000BE43 F606[7D00]04 <1> testopt [options], biosidles 10536 <1> ; idling disabled? 10537 0000BE48 750D <1> jnz .rawkey ; yes, just request a key --> 10538 <1> 10539 <1> @@: 10540 0000BE4A E8A801 <1> call getc_if_any ; got a key ? 10541 0000BE4D 750C <1> jnz .return ; yes --> 10542 <1> .idle: ; common idling for BIOS keyboard and serial 10543 0000BE4F E85381 <1> call handle_serial_flags_ctrl_c 10544 0000BE52 E87A02 <1> call idle 10545 0000BE55 EBC5 <1> jmp .rawnext ; check again --> 10546 <1> 10547 <1> .rawkey: 10548 0000BE57 31C0 <1> xor ax, ax 10549 0000BE59 CD16 <1> int 16h ; get the key and scancode 10550 <1> .return: 10551 0000BE5B C3 <1> retn 10552 <1> 10553 <1> 10554 <1> getc_dos: 10555 <1> %if _PM 10556 0000BE5C E86ED3 <1> call ispm 10557 0000BE5F 7507 <1> jnz @F ; if 86 Mode --> 10558 0000BE61 F606[8100]40 <1> testopt [options2], opt2_getc_idle_dpmi 10559 0000BE66 7507 <1> jnz @FF 10560 <1> @@: 10561 <1> %endif 10562 0000BE68 F606[8100]20 <1> testopt [options2], opt2_getc_idle 10563 0000BE6D 7410 <1> jz getc_dos_internal 10564 <1> @@: 10565 <1> .with_idle: 10566 0000BE6F E88301 <1> call getc_if_any 10567 0000BE72 7403E9B500 <1> jnz .return 10568 0000BE77 E82B81 <1> call handle_serial_flags_ctrl_c 10569 0000BE7A E85202 <1> call idle 10570 0000BE7D EBF0 <1> jmp .with_idle 10571 <1> 10572 <1> .return equ getc_dos_internal_get_extended.return 10573 <1> 10574 <1> 10575 <1> getc_dos_internal: ; DOS character devices handle one-byte characters. Therefore 10576 <1> ; non-ASCII keys cannot be returned with scancode in the high 10577 <1> ; byte of the same call. A non-ASCII key will be split into 10578 <1> ; two characters by CON: one NUL byte followed by the scancode. 10579 0000BE7F F606[A700]01 <1> testopt [internalflags3], dif3_input_re 10580 0000BE84 741B <1> jz @F 10581 0000BE86 56 <1> push si 10582 0000BE87 8B36[E409] <1> mov si, word [re_buffer.position] 10583 0000BE8B 31C0 <1> xor ax, ax 10584 0000BE8D AC <1> lodsb 10585 0000BE8E 84C0 <1> test al, al 10586 0000BE90 8936[E409] <1> mov word [re_buffer.position], si 10587 0000BE94 5E <1> pop si 10588 0000BE95 7403E99200 <1> jnz .return 10589 0000BE9A FF0E[E409] <1> dec word [re_buffer.position] 10590 0000BE9E E98B00 <1> jmp .return 10591 <1> 10592 <1> .return equ getc_dos_internal_get_extended.return 10593 <1> 10594 <1> 10595 <1> @@: 10596 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 10597 <1> %if _INPUT_FILE_BOOT 10598 0000BEA1 F606[A300]02 <1> testopt [internalflags2], dif2_input_file_boot 10599 0000BEA6 750E <1> jnz .file 10600 <1> %endif 10601 <1> %if _INPUT_FILE_HANDLES 10602 0000BEA8 E8FDE7 <1> call InDos 10603 0000BEAB 7546 <1> jnz .file_not 10604 0000BEAD F606[A200]10 <1> testopt [internalflags2], dif2_input_file 10605 0000BEB2 7502 <1> jnz .file 10606 <1> %endif 10607 0000BEB4 EB3D <1> jmp .file_not 10608 <1> 10609 <1> .file: 10610 0000BEB6 52 <1> push dx 10611 0000BEB7 51 <1> push cx 10612 0000BEB8 53 <1> push bx 10613 0000BEB9 57 <1> push di 10614 0000BEBA 31C0 <1> xor ax, ax ; initialise ah to zero 10615 0000BEBC 50 <1> push ax 10616 0000BEBD 89E2 <1> mov dx, sp ; ds:dx -> al byte on stack 10617 0000BEBF B90100 <1> mov cx, 1 10618 <1> %if _INPUT_FILE_BOOT 10619 <1> %if _INPUT_FILE_HANDLES 10620 0000BEC2 F606[A300]02 <1> testopt [internalflags2], dif2_input_file_boot 10621 0000BEC7 7408 <1> jz @F 10622 <1> %endif 10623 0000BEC9 E87F0E <1> call yy_boot_remember_seek 10624 0000BECC E897BF <1> call yy_boot_read 10625 <1> %if _INPUT_FILE_HANDLES 10626 0000BECF EB0B <1> jmp @FF 10627 <1> @@: 10628 <1> %endif 10629 <1> %endif 10630 <1> %if _INPUT_FILE_HANDLES 10631 0000BED1 B43F <1> mov ah, 3Fh 10632 0000BED3 E81001 <1> call yy_get_handle 10633 0000BED6 E83B0E <1> call yy_remember_seek 10634 <1> doscall ; (depends on ds = ss) 2040 0000BED9 E88D9E <2> call _doscall 10635 <1> %endif 10636 <1> @@: 10637 0000BEDC 7204 <1> jc @F 10638 0000BEDE 85C0 <1> test ax, ax 10639 0000BEE0 750B <1> jnz .file_got 10640 <1> 10641 <1> @@: 10642 0000BEE2 E85100 <1> call yy_close_file 10643 0000BEE5 58 <1> pop ax 10644 0000BEE6 5F <1> pop di 10645 0000BEE7 5B <1> pop bx 10646 0000BEE8 59 <1> pop cx 10647 0000BEE9 5A <1> pop dx 10648 0000BEEA E91CFF <1> jmp getc 10649 <1> 10650 <1> 10651 <1> .file_got: 10652 0000BEED 58 <1> pop ax ; ah = 0, al = character read 10653 0000BEEE 5F <1> pop di 10654 0000BEEF 5B <1> pop bx 10655 0000BEF0 59 <1> pop cx 10656 0000BEF1 5A <1> pop dx 10657 0000BEF2 C3 <1> retn 10658 <1> 10659 <1> .file_not: 10660 <1> %endif 10661 0000BEF3 F606[A500]01 <1> testopt [internalflags3], dif3_input_cmdline 10662 0000BEF8 7419 <1> jz @F 10663 0000BEFA 56 <1> push si 10664 0000BEFB 8B36[E001] <1> mov si, word [cmdline_buffer.position] 10665 0000BEFF 31C0 <1> xor ax, ax 10666 0000BF01 AC <1> lodsb 10667 0000BF02 84C0 <1> test al, al 10668 0000BF04 8936[E001] <1> mov word [cmdline_buffer.position], si 10669 0000BF08 5E <1> pop si 10670 0000BF09 7521 <1> jnz .return 10671 0000BF0B 8026[A500]FE <1> clropt [internalflags3], dif3_input_cmdline 10672 0000BF10 E9F6FE <1> jmp getc 10673 <1> 10674 <1> @@: 10675 0000BF13 B408 <1> mov ah, 8 10676 <1> doscall ; wait for a key 2040 0000BF15 E8519E <2> call _doscall 10677 <1> 10678 <1> getc_dos_internal_get_extended: 10679 <1> ; FreeDOS kernel 2036 returns with ax=4C00h upon Control C. 10680 <1> ; This is due to setting ax internally to terminate the 10681 <1> ; process, paired with the termination service just 10682 <1> ; returning for self-owned processes. This was eventually 10683 <1> ; fixed in https://sourceforge.net/p/freedos/svn/1469/ 10684 <1> ; This is a work around to restart our command line then. 10685 <1> ; Usually ah stays 08h when this call returns. 10686 <1> ; (06h if calling from getc_if_any to here.) 10687 0000BF18 80FC4C <1> cmp ah, 4Ch 10688 0000BF1B 7410 <1> je .freedos_ctrlc_workaround 10689 0000BF1D B400 <1> mov ah, 0 ; assume it is ASCII 10690 0000BF1F 08C0 <1> or al, al 10691 0000BF21 7509 <1> jne .return ; ASCII, return with ah zero --> 10692 0000BF23 B408 <1> mov ah, 8 10693 <1> doscall ; scancode of non-ASCII key to al 2040 0000BF25 E8419E <2> call _doscall 10694 0000BF28 86C4 <1> xchg al, ah ; to ah 10695 0000BF2A B000 <1> mov al, 0 ; return zero for non-ASCII key 10696 <1> .return: 10697 0000BF2C C3 <1> retn 10698 <1> 10699 <1> .freedos_ctrlc_workaround: 10700 0000BF2D BA[215D] <1> mov dx, msg.freedos_ctrlc_workaround 10701 0000BF30 E871FE <1> call putsz 10702 0000BF33 E937FC <1> jmp puts.ctrlc ; use common handler 10703 <1> 10704 <1> 10705 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT || 1 10706 <1> ; INP: [input_file_handles], dif2_input_file 10707 <1> ; OUT: most recent file closed, flag cleared if no longer file 10708 <1> ; CHG: di, bx, ax 10709 <1> yy_close_file: 10710 0000BF36 F606[A700]01 <1> testopt [internalflags3], dif3_input_re 10711 0000BF3B 740B <1> jz @F 10712 0000BF3D 8026[A700]FE <1> clropt [internalflags3], dif3_input_re 10713 0000BF42 800E[A700]02 <1> setopt [internalflags3], dif3_input_re_closed 10714 0000BF47 C3 <1> retn 10715 <1> 10716 <1> @@: 10717 <1> %if _INPUT_FILE_BOOT 10718 0000BF48 F606[A300]02 <1> testopt [internalflags2], dif2_input_file_boot 10719 0000BF4D 7406 <1> jz @F 10720 0000BF4F E8DE0D <1> call yy_boot_clear_remember_seek 10721 0000BF52 E9C8BE <1> jmp yy_boot_close_file 10722 <1> 10723 <1> @@: 10724 <1> %endif 10725 <1> %if _INPUT_FILE_HANDLES 10726 0000BF55 F606[A200]10 <1> testopt [internalflags2], dif2_input_file 10727 0000BF5A 7455 <1> jz .notfile 10728 0000BF5C 8B3E[800A] <1> mov di, word [input_file_handles.active] 10729 0000BF60 57 <1> push di 10730 0000BF61 D1E7 <1> shl di, 1 10731 0000BF63 D1E7 <1> shl di, 1 10732 0000BF65 D1E7 <1> shl di, 1 10733 <1> %if INPUTFILEHANDLE_size != 8 10734 <1> %error Unexpected structure size 10735 <1> %endif 10736 0000BF67 8B9D[000A] <1> mov bx, word [input_file_handles + di + ifhHandle] 10737 0000BF6B E88A0D <1> call yy_clear_remember_seek 10738 <1> 10739 0000BF6E F685[030A]01 <1> testopt [input_file_handles + di + ifhFlags], ifhfIsDup 10740 0000BF73 7416 <1> jz @F 10741 <1> 10742 0000BF75 51 <1> push cx 10743 0000BF76 52 <1> push dx 10744 <1> 10745 0000BF77 8B9D[F809] <1> mov bx, word [input_file_handles + di - INPUTFILEHANDLE_size + ifhHandle] 10746 0000BF7B 8B95[040A] <1> mov dx, word [input_file_handles + di + ifhParentSeek] 10747 0000BF7F 8B8D[060A] <1> mov cx, word [input_file_handles + di + ifhParentSeek + 2] 10748 0000BF83 B80042 <1> mov ax, 4200h ; seek from start 10749 0000BF86 E8F90C <1> call handle_seek_or_remember 10750 <1> 10751 0000BF89 5A <1> pop dx 10752 0000BF8A 59 <1> pop cx 10753 <1> 10754 <1> @@: 10755 <1> 10756 0000BF8B E81AE7 <1> call InDos 10757 0000BF8E 7406 <1> jz .closefile 10758 <1> 10759 0000BF90 FF06[820A] <1> inc word [input_file_handles.to_close] 10760 0000BF94 EB06 <1> jmp @F 10761 <1> 10762 <1> .closefile: 10763 0000BF96 B80100 <1> mov ax, 1 10764 0000BF99 E82C00 <1> call yy_close_file_handles 10765 <1> 10766 <1> @@: 10767 0000BF9C 5F <1> pop di 10768 0000BF9D 4F <1> dec di 10769 0000BF9E 790C <1> jns .next 10770 0000BFA0 8026[A200]EF <1> clropt [internalflags2], dif2_input_file 10771 0000BFA5 800E[A200]20 <1> setopt [internalflags2], dif2_closed_input_file 10772 0000BFAA EB04 <1> jmp .done 10773 <1> .next: 10774 0000BFAC 893E[800A] <1> mov word [input_file_handles.active], di 10775 <1> .done: 10776 0000BFB0 C3 <1> retn 10777 <1> 10778 <1> .notfile: 10779 0000BFB1 F606[A500]01 <1> testopt [internalflags3], dif3_input_cmdline 10780 0000BFB6 740B <1> jz @F 10781 0000BFB8 8026[A500]FE <1> clropt [internalflags3], dif3_input_cmdline 10782 0000BFBD 800E[A500]02 <1> setopt [internalflags3], dif3_input_cmdline_closed 10783 0000BFC2 C3 <1> retn 10784 <1> 10785 <1> @@: 10786 0000BFC3 31F6 <1> xor si, si 10787 0000BFC5 E914E5 <1> jmp error 10788 <1> 10789 <1> 10790 <1> ; INP: word [input_file_handles.to_close] = how many 10791 <1> ; ax = additionally how many (0 or 1) 10792 <1> ; input_file_handles + di -> first to close 10793 <1> ; OUT: word [input_file_handles.to_close] = 0 10794 <1> ; closed handle fields = -1 10795 <1> ; CHG: ax, bx, di 10796 <1> ; STT: DOS must be accessible 10797 <1> yy_close_file_handles: 10798 0000BFC8 51 <1> push cx 10799 0000BFC9 31C9 <1> xor cx, cx 10800 0000BFCB 870E[820A] <1> xchg cx, word [input_file_handles.to_close] 10801 0000BFCF 01C1 <1> add cx, ax 10802 0000BFD1 7411 <1> jz @FF 10803 <1> @@: 10804 0000BFD3 BBFFFF <1> mov bx, -1 10805 0000BFD6 879D[000A] <1> xchg bx, word [input_file_handles + di + ifhHandle] 10806 0000BFDA B43E <1> mov ah, 3Eh 10807 <1> doscall 2040 0000BFDC E88A9D <2> call _doscall 10808 0000BFDF 83C708 <1> add di, INPUTFILEHANDLE_size 10809 0000BFE2 E2EF <1> loop @B 10810 <1> @@: 10811 0000BFE4 59 <1> pop cx 10812 0000BFE5 C3 <1> retn 10813 <1> 10814 <1> 10815 <1> ; INP: - 10816 <1> ; OUT: di = active handle offset 10817 <1> ; bx = active handle 10818 <1> ; CHG: - 10819 <1> yy_get_handle: 10820 0000BFE6 8B3E[800A] <1> mov di, word [input_file_handles.active] 10821 0000BFEA D1E7 <1> shl di, 1 10822 0000BFEC D1E7 <1> shl di, 1 10823 0000BFEE D1E7 <1> shl di, 1 10824 <1> %if INPUTFILEHANDLE_size != 8 10825 <1> %error Unexpected structure size 10826 <1> %endif 10827 0000BFF0 8B9D[000A] <1> mov bx, word [input_file_handles + di + ifhHandle] 10828 <1> %endif 10829 0000BFF4 C3 <1> retn 10830 <1> %endif 10831 <1> 10832 <1> 10833 <1> ; INP: - 10834 <1> ; OUT: NZ if received any, 10835 <1> ; al = character 10836 <1> ; ah = scan code or zero 10837 <1> ; ZR if none received 10838 <1> ; CHG: ax 10839 <1> ; STT: ds = ss = debugger segment/selector 10840 <1> getc_if_any: 10841 0000BFF5 F606[A400]20 <1> testopt [internalflags3], dif3_input_serial_override 10842 0000BFFA 755B <1> jnz .serial 10843 0000BFFC F606[A400]10 <1> testopt [internalflags3], dif3_input_terminal_override 10844 0000C001 754D <1> jnz .terminal 10845 <1> 10846 0000C003 F606[A700]01 <1> testopt [internalflags3], dif3_input_re 10847 0000C008 741D <1> jz @F 10848 0000C00A 56 <1> push si 10849 0000C00B 8B36[E409] <1> mov si, word [re_buffer.position] 10850 0000C00F 31C0 <1> xor ax, ax 10851 0000C011 AC <1> lodsb 10852 0000C012 84C0 <1> test al, al 10853 0000C014 8936[E409] <1> mov word [re_buffer.position], si 10854 0000C018 5E <1> pop si 10855 0000C019 7403E9B000 <1> jnz .return 10856 0000C01E FF0E[E409] <1> dec word [re_buffer.position] 10857 0000C022 38C0 <1> cmp al, al ; ZR 10858 0000C024 E9A700 <1> jmp .return 10859 <1> 10860 <1> @@: 10861 <1> %if _INPUT_FILE_BOOT 10862 0000C027 F606[A300]02 <1> testopt [internalflags2], dif2_input_file_boot 10863 0000C02C 7552 <1> jnz .file 10864 <1> %endif 10865 <1> 10866 0000C02E F606[A500]01 <1> testopt [internalflags3], dif3_input_cmdline 10867 0000C033 741B <1> jz @F 10868 0000C035 56 <1> push si 10869 0000C036 8B36[E001] <1> mov si, word [cmdline_buffer.position] 10870 0000C03A 31C0 <1> xor ax, ax 10871 0000C03C AC <1> lodsb 10872 0000C03D 84C0 <1> test al, al 10873 0000C03F 8936[E001] <1> mov word [cmdline_buffer.position], si 10874 0000C043 5E <1> pop si 10875 0000C044 7403E98500 <1> jnz .return 10876 0000C049 8026[A500]FE <1> clropt [internalflags3], dif3_input_cmdline 10877 0000C04E EBA5 <1> jmp getc_if_any 10878 <1> 10879 <1> @@: 10880 <1> .terminal: 10881 0000C050 F606[7D00]40 <1> testopt [options], enable_serial 10882 0000C055 7408 <1> jz @F ; do BIOS keyboard or DOS getc --> 10883 <1> 10884 <1> .serial: 10885 0000C057 E8250E <1> call serial_receive_char ; do serial getc (check rx buffer) 10886 0000C05A 7472 <1> jz .return ; no data, go and idle --> 10887 0000C05C B400 <1> mov ah, 0 10888 0000C05E C3 <1> retn 10889 <1> 10890 <1> @@: 10891 0000C05F E846E6 <1> call InDos 10892 0000C062 755C <1> jnz .bios 10893 <1> 10894 0000C064 F606[A400]10 <1> testopt [internalflags3], dif3_input_terminal_override 10895 0000C069 7547 <1> jnz .dos_terminal 10896 <1> 10897 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 10898 <1> %if _INPUT_FILE_BOOT 10899 0000C06B F606[A300]02 <1> testopt [internalflags2], dif2_input_file_boot 10900 0000C070 750E <1> jnz .file 10901 <1> %endif 10902 <1> %if _INPUT_FILE_HANDLES 10903 0000C072 E833E6 <1> call InDos 10904 0000C075 753B <1> jnz .file_not 10905 0000C077 F606[A200]10 <1> testopt [internalflags2], dif2_input_file 10906 0000C07C 7502 <1> jnz .file 10907 <1> %endif 10908 0000C07E EB32 <1> jmp .file_not 10909 <1> 10910 <1> .file: 10911 0000C080 57 <1> push di 10912 0000C081 53 <1> push bx 10913 0000C082 51 <1> push cx 10914 0000C083 52 <1> push dx 10915 0000C084 31C0 <1> xor ax, ax 10916 0000C086 50 <1> push ax 10917 <1> 10918 0000C087 89E2 <1> mov dx, sp ; ds:dx -> al byte on stack 10919 0000C089 B90100 <1> mov cx, 1 ; buffer length = 1 10920 <1> %if _INPUT_FILE_BOOT 10921 <1> %if _INPUT_FILE_HANDLES 10922 0000C08C F606[A300]02 <1> testopt [internalflags2], dif2_input_file_boot 10923 0000C091 7408 <1> jz @F 10924 <1> %endif 10925 0000C093 E8B50C <1> call yy_boot_remember_seek 10926 0000C096 E8CDBD <1> call yy_boot_read 10927 0000C099 EB0B <1> jmp @FF 10928 <1> @@: 10929 <1> %endif 10930 <1> %if _INPUT_FILE_HANDLES 10931 0000C09B B43F <1> mov ah, 3Fh 10932 0000C09D E846FF <1> call yy_get_handle 10933 0000C0A0 E8710C <1> call yy_remember_seek 10934 <1> doscall ; DOS read file (depends on ds = ss) 2040 0000C0A3 E8C39C <2> call _doscall 10935 <1> %endif 10936 <1> @@: 10937 0000C0A6 7302 <1> jnc @F 10938 0000C0A8 31C0 <1> xor ax, ax 10939 <1> @@: 10940 0000C0AA 85C0 <1> test ax, ax 10941 0000C0AC 58 <1> pop ax 10942 0000C0AD 5A <1> pop dx 10943 0000C0AE 59 <1> pop cx 10944 0000C0AF 5B <1> pop bx 10945 0000C0B0 5F <1> pop di 10946 0000C0B1 C3 <1> retn ; ZR if no character read 10947 <1> 10948 <1> .file_not: 10949 <1> %endif 10950 <1> .dos_terminal: 10951 <1> %if 0 10952 <1> push dx 10953 <1> mov ah, 06h 10954 <1> mov dl, -1 10955 <1> doscall 10956 <1> jz .return_dx ; none available 10957 <1> ; bugfix: the 06h call is a *destructive* read. 10958 <1> ; so do not call getc again, just handle the 10959 <1> ; possible second byte returned. 10960 <1> call getc_dos_internal_get_extended 10961 <1> pop dx 10962 <1> jmp .return_NZ 10963 <1> .return_dx: 10964 <1> pop dx 10965 <1> retn 10966 <1> %else 10967 0000C0B2 B40B <1> mov ah, 0Bh 10968 <1> doscall 2040 0000C0B4 E8B29C <2> call _doscall 10969 0000C0B7 84C0 <1> test al, al 10970 0000C0B9 7413 <1> jz .return 10971 0000C0BB E8C1FD <1> call getc_dos_internal 10972 0000C0BE EB0A <1> jmp .return_NZ 10973 <1> %endif 10974 <1> 10975 <1> .bios: 10976 0000C0C0 B401 <1> mov ah, 01h 10977 0000C0C2 CD16 <1> int 16h ; key available ? 10978 0000C0C4 7408 <1> jz .return 10979 0000C0C6 31C0 <1> xor ax, ax 10980 0000C0C8 CD16 <1> int 16h 10981 <1> .return_NZ: 10982 0000C0CA 50 <1> push ax 10983 0000C0CB 0C01 <1> or al, 1 ; (NZ) 10984 0000C0CD 58 <1> pop ax 10985 <1> .return: 10986 0000C0CE C3 <1> retn 10987 <1> 10988 <1> 10989 <1> ; INP: - 10990 <1> ; OUT: - 10991 <1> ; CHG: ax 10992 <1> ; STT: ds = ss = debugger segment/selector 10993 <1> ; 10994 <1> ; Idle system, using 2F.1680 (in given mode), or 2F.1680 10995 <1> ; (calling down to 86 Mode), or sti \ hlt. 10996 <1> idle: 10997 <1> %if _BOOTLDR 10998 0000C0CF F606[9D00]40 <1> testopt [internalflags], nodosloaded 10999 0000C0D4 7568 <1> jnz .hlt ; can't call 2F --> 11000 <1> %endif 11001 0000C0D6 F606[8700]02 <1> testopt [options3], opt3_no_idle_2F 11002 0000C0DB 7561 <1> jnz .hlt 11003 <1> %if _GUARD_86M_INT2F 11004 <1> %if _PM 11005 0000C0DD E8EDD0 <1> call ispm 11006 0000C0E0 7416 <1> jz @FF ; --> (NZ) 11007 <1> %endif 11008 0000C0E2 06 <1> push es 11009 0000C0E3 31C0 <1> xor ax, ax 11010 0000C0E5 8EC0 <1> mov es, ax ; (only used in 86 Mode) 11011 0000C0E7 26A1BC00 <1> mov ax, [es:2Fh * 4] 11012 0000C0EB 83F8FF <1> cmp ax, -1 11013 0000C0EE 7405 <1> je @F ; --> (ZR) 11014 0000C0F0 260B06BE00 <1> or ax, [es:2Fh * 4 + 2] 11015 <1> @@: 11016 0000C0F5 07 <1> pop es 11017 0000C0F6 7409 <1> jz @FF 11018 <1> @@: 11019 <1> %endif 11020 0000C0F8 B88016 <1> mov ax, 1680h 11021 0000C0FB CD2F <1> int 2Fh ; release timeslice in multitasker 11022 0000C0FD 84C0 <1> test al, al 11023 0000C0FF 7450 <1> jz .return ; done idling --> 11024 <1> @@: 11025 <1> %if _PM 11026 0000C101 E8C9D0 <1> call ispm 11027 0000C104 7538 <1> jnz .hlt 11028 <1> 11029 0000C106 53 <1> push bx 11030 0000C107 51 <1> push cx 11031 0000C108 06 <1> push es 11032 0000C109 66 <1> _386_PM_o32 ; push edi 11033 0000C10A 57 <1> push di 11034 0000C10B 6631FF <1> _386 xor edi, edi ; clear EDIH 11035 0000C10E 31C9 <1> xor cx, cx ; (copy no words from stack) 11036 <1> 11037 <1> [cpu 286] 11038 0000C110 51 <1> push cx ; ss 11039 0000C111 51 <1> push cx ; sp (0:0 = host should allocate a stack) 11040 0000C112 83EC0C <1> sub sp, byte 12 ; cs:ip (ignored), segments (uninitialized) 11041 0000C115 9C <1> pushf 11042 0000C116 51 <1> push cx ; EAXH (uninitialized) 11043 0000C117 688016 <1> push 1680h ; AX 11044 0000C11A 83EC0C <1> sub sp, byte 12 ; ecx, edx, ebx (uninitialized) 11045 0000C11D 51 <1> push cx 11046 0000C11E 51 <1> push cx ; reserved (zero) 11047 0000C11F 83EC0C <1> sub sp, byte 12 ; ebp, esi, edi (uninitialized) 11048 0000C122 16 <1> push ss 11049 0000C123 07 <1> pop es 11050 0000C124 89E7 <1> mov di, sp ; es:(e)di -> 86 Mode call structure 11051 0000C126 B80003 <1> mov ax, 0300h 11052 0000C129 BB2F00 <1> mov bx, 2Fh ; bl = interrupt, bh = reserved (zero) 11053 0000C12C CD31 <1> int 31h ; call real mode 2F.1680 11054 <1> __CPU__ 11055 <1> 11056 0000C12E 83C41C <1> add sp, byte 28 ; discard RM call structure 11057 0000C131 58 <1> pop ax ; get AX 11058 0000C132 83C414 <1> add sp, byte 20 ; discard RM call structure 11059 <1> 11060 0000C135 66 <1> _386_PM_o32 ; pop edi 11061 0000C136 5F <1> pop di 11062 0000C137 07 <1> pop es 11063 0000C138 59 <1> pop cx 11064 0000C139 5B <1> pop bx 11065 <1> 11066 0000C13A 84C0 <1> test al, al 11067 0000C13C 7413 <1> jz .return ; done idling --> 11068 <1> %endif 11069 <1> .hlt: 11070 0000C13E F606[7D00]02 <1> testopt [options], nohlt 11071 0000C143 750C <1> jnz .return 11072 <1> %if _PM 11073 <1> %if (protectedmode|dpminohlt)&~0FF00h 11074 <1> %error Option bits re-ordered, adjust code here 11075 <1> %endif 11076 0000C145 A0[9D00] <1> mov al, byte [internalflags+1] 11077 0000C148 240C <1> and al, (protectedmode|dpminohlt)>>8 11078 0000C14A 340C <1> xor al, (protectedmode|dpminohlt)>>8 11079 0000C14C 7403 <1> jz .return ; DPMI host throws GPF when we execute hlt --> 11080 <1> %endif 11081 0000C14E FB <1> sti 11082 0000C14F F4 <1> hlt ; else idle by hlt 11083 0000C150 90 <1> nop 11084 <1> .return: 11085 0000C151 C3 <1> retn 11086 <1> 11087 <1> 11088 <1> ; GETLINE - Print a prompt (address in DX, length in CX) and read a line 11089 <1> ; of input. 11090 <1> ; GETLINE0 - Same as above, but use the output line (so far), plus two 11091 <1> ; spaces and a colon, as a prompt. 11092 <1> ; GETLINE00 - Same as above, but use the output line (so far) as a prompt. 11093 <1> ; Entry CX Length of prompt (getline only) 11094 <1> ; DX Address of prompt string (getline only) 11095 <1> ; 11096 <1> ; DI Address + 1 of last character in prompt (getline0 and 11097 <1> ; getline00 only) 11098 <1> ; 11099 <1> ; Exit AL First nonwhite character in input line 11100 <1> ; SI Address of the next character after that 11101 <1> ; Uses AH,BX,CX,DX,DI 11102 <1> 11103 <1> getline0: 11104 0000C152 B82020 <1> mov ax, 32<<8|32 ; add two spaces and a colon 11105 0000C155 AB <1> stosw 11106 0000C156 B03A <1> mov al, ':' 11107 0000C158 AA <1> stosb 11108 <1> getline00: 11109 0000C159 BA[0E08] <1> mov dx, line_out 11110 0000C15C 89F9 <1> mov cx, di 11111 0000C15E 29D1 <1> sub cx, dx 11112 <1> 11113 <1> getline: ; note: this entry is no longer used 11114 0000C160 8026[A500]77 <1> clropt [internalflags3], dif3_quiet_input_single | dif3_return_eof 11115 <1> .use_dif3_flags: 11116 <1> %if _DEBUG 11117 <1> d0bp 11118 <1> %endif 11119 0000C165 890E[EA0A] <1> mov word [promptlen], cx ; save length of prompt 11120 0000C169 C606[930A]00 <1> mov byte [linecounter], 0 ; reset counter 11121 0000C16E 8326[0E0C]00 <1> and word [terminator_in_line_in.offset], 0 11122 <1> ; reset this when reading new line 11123 0000C173 8026[9E00]EF <1> clropt [internalflags], promptwaiting 11124 <1> 11125 0000C178 E87202 <1> call getline_is_input_file? 11126 0000C17B 7303E9FF00 <1> jc getline_nofile 11127 <1> 11128 <1> getline_file: 11129 0000C180 F606[A700]01 <1> testopt [internalflags3], dif3_input_re 11130 0000C185 7549 <1> jnz .notquiet 11131 <1> 11132 <1> %if _INPUT_FILE_BOOT 11133 0000C187 F606[A300]02 <1> testopt [internalflags2], dif2_input_file_boot 11134 0000C18C 7412 <1> jz @F 11135 0000C18E B8A000 <1> mov ax, LOAD_INPUT_FILE_SIZE 11136 0000C191 52 <1> push dx 11137 0000C192 F726[B08F] <1> mul word [load_input_file.active] 11138 0000C196 5A <1> pop dx 11139 0000C197 89C7 <1> mov di, ax 11140 0000C199 F685[578D]40 <1> testopt [load_input_file + di - LOADDATA3 + ldFATType], ifhfQuietInput 11141 0000C19E EB29 <1> jmp .quiet_if_nz 11142 <1> 11143 <1> @@: 11144 <1> %endif 11145 <1> %if _INPUT_FILE_HANDLES 11146 0000C1A0 E805E5 <1> call InDos 11147 0000C1A3 7518 <1> jnz @F 11148 0000C1A5 F606[A200]10 <1> testopt [internalflags2], dif2_input_file 11149 0000C1AA 7411 <1> jz @F 11150 0000C1AC 8B3E[800A] <1> mov di, word [input_file_handles.active] 11151 0000C1B0 D1E7 <1> shl di, 1 11152 0000C1B2 D1E7 <1> shl di, 1 11153 0000C1B4 D1E7 <1> shl di, 1 ; to qword array index 11154 <1> %if INPUTFILEHANDLE_size != 8 11155 <1> %error Unexpected structure size 11156 <1> %endif 11157 0000C1B6 F685[030A]40 <1> testopt [input_file_handles + di + ifhFlags], ifhfQuietInput 11158 0000C1BB EB0C <1> jmp .quiet_if_nz 11159 <1> 11160 <1> @@: 11161 <1> %endif 11162 0000C1BD F606[A500]01 <1> testopt [internalflags3], dif3_input_cmdline 11163 0000C1C2 740C <1> jz @F 11164 0000C1C4 F606[7F00]40 <1> testopt [options], opt_cmdline_quiet_input 11165 <1> ; jmp .quiet_if_nz 11166 <1> 11167 <1> .quiet_if_nz: 11168 0000C1C9 7405 <1> jz @F 11169 <1> .quiet: 11170 0000C1CB 800E[A500]08 <1> setopt [internalflags3], dif3_quiet_input_single 11171 <1> .notquiet: 11172 <1> @@: 11173 <1> 11174 0000C1D0 800E[A200]40 <1> setopt [internalflags2], dif2_did_getline_file 11175 <1> 11176 <1> 11177 <1> ; This part reads the input line from a file (in the case of 11178 <1> ; `debug < file'). It is necessary to do this by hand because DOS 11179 <1> ; function 0Ah does not handle EOF correctly otherwise. This is 11180 <1> ; especially important for DEBUG because it traps Control-C. 11181 0000C1D5 C706[DC0B][E003] <1> mov word [lastcmd], dmycmd ; disable auto-repeat while reading from a file 11182 <1> 11183 <1> %if _NEWFULLHANDLING 11184 0000C1DB BF[0300] <1> mov di, line_in+3 ; read max 11185 <1> %else 11186 <1> mov di, line_in+2 11187 <1> %endif 11188 0000C1DE 8B36[EC0A] <1> mov si, word [bufnext] 11189 0000C1E2 3B36[EE0A] <1> cmp si, word [bufend] 11190 0000C1E6 7216 <1> jb .char_buffered ; if there's a character already 11191 0000C1E8 E80D07 <1> call fillbuf 11192 0000C1EB 7311 <1> jnc .fillbuf_had_data 11193 0000C1ED F606[A500]80 <1> testopt [internalflags3], dif3_return_eof 11194 0000C1F2 7402 <1> jz @F 11195 0000C1F4 F9 <1> stc 11196 0000C1F5 C3 <1> retn 11197 <1> @@: 11198 0000C1F6 E82D02 <1> call getline_close_file 11199 0000C1F9 7403E962FF <1> jnz getline 11200 <1> 11201 <1> .fillbuf_had_data: 11202 <1> .char_buffered: 11203 <1> %if _NEWFULLHANDLING 11204 0000C1FE 4F <1> dec di 11205 <1> %endif 11206 <1> 11207 <1> ; Discard an LF if the last character read was CR. 11208 0000C1FF 803E[E70A]0D <1> cmp byte [notatty], 13 ; last parsed character was CR ? 11209 0000C204 750A <1> jne .no_lf_skip ; no, nothing more to do --> 11210 0000C206 803C0A <1> cmp byte [si], 10 ; first read character is LF ? 11211 0000C209 7505 <1> jne .no_lf_skip ; no --> 11212 0000C20B 46 <1> inc si ; skip the LF 11213 0000C20C FE06[E70A] <1> inc byte [notatty] ; avoid repeating this 11214 <1> .no_lf_skip: 11215 <1> 11216 0000C210 3B36[EE0A] <1> cmp si, word [bufend] 11217 0000C214 740B <1> je @F 11218 0000C216 803C40 <1> cmp byte [si], '@' ; no display ? 11219 0000C219 7506 <1> jne @F 11220 <1> 11221 0000C21B 46 <1> inc si ; increment past @ 11222 0000C21C 800E[A500]08 <1> setopt [internalflags3], dif3_quiet_input_single 11223 <1> @@: 11224 0000C221 F606[A500]08 <1> testopt [internalflags3], dif3_quiet_input_single 11225 0000C226 7503 <1> jnz gl1 11226 <1> 11227 0000C228 E806F8 <1> call puts ; display prompt (having checked it wasn't EOF) 11228 <1> 11229 <1> ; si-> next character in buffer 11230 <1> ; w[bufend]-> behind last valid character of buffer 11231 <1> gl1: 11232 0000C22B 8B0E[EE0A] <1> mov cx, word [bufend] 11233 0000C22F 29F1 <1> sub cx, si ; cx = number of valid characters in buffer 11234 0000C231 740C <1> jz gl3 ; if none --> 11235 <1> gl2: 11236 0000C233 AC <1> lodsb 11237 0000C234 3C0D <1> cmp al, 13 ; (exact match for CR) 11238 0000C236 7410 <1> je gl4 11239 0000C238 3C0A <1> cmp al, 10 11240 0000C23A 740C <1> je gl4 ; if EOL --> 11241 0000C23C AA <1> stosb 11242 0000C23D E2F4 <1> loop gl2 ; if more valid characters --> 11243 <1> 11244 <1> ; The buffer is empty. Fill it again. 11245 <1> gl3: 11246 <1> %if _NEWFULLHANDLING 11247 0000C23F 47 <1> inc di 11248 <1> %endif 11249 0000C240 E8B506 <1> call fillbuf 11250 <1> %if _NEWFULLHANDLING 11251 0000C243 4F <1> dec di 11252 <1> %endif 11253 0000C244 73E5 <1> jnc gl1 ; if we have more characters --> 11254 0000C246 B00A <1> mov al, 10 ; make jump after gl4 always branch 11255 <1> %ifn _NEWFULLHANDLING ; should now always have at least one byte free 11256 <1> cmp di, line_in+LINE_IN_LEN 11257 <1> jb @F 11258 <1> dec si 11259 <1> dec di 11260 <1> @@: 11261 <1> %endif 11262 <1> 11263 <1> gl4: 11264 0000C248 3C0D <1> cmp al, 13 ; terminator was CR ? 11265 0000C24A 7508 <1> jne @F ; no --> 11266 0000C24C E306 <1> jcxz @F ; if no other byte buffered --> 11267 0000C24E 803C0A <1> cmp byte [si], 10 ; next byte is an LF ? 11268 0000C251 7501 <1> jne @F ; no --> 11269 0000C253 AC <1> lodsb ; increment si past the LF and set al = 10 11270 <1> ; dec cx ; (not used in subsequent code) 11271 <1> @@: 11272 0000C254 8936[EC0A] <1> mov word [bufnext], si 11273 0000C258 A2[E70A] <1> mov byte [notatty], al ; store 10 or 13 (depending on the kind of EOL) 11274 <1> 11275 0000C25B 800E[A500]04 <1> setopt [internalflags3], dif3_at_line_end 11276 0000C260 E81906 <1> call getline_reset_notatty 11277 <1> 11278 0000C263 89F9 <1> mov cx, di ; (counter is for input without CR) 11279 0000C265 B00D <1> mov al, 13 11280 0000C267 AA <1> stosb ; terminate line for our usage 11281 0000C268 BA[0200] <1> mov dx, line_in + 2 11282 0000C26B 29D1 <1> sub cx, dx ; = length of input (no CR) 11283 0000C26D F606[A500]08 <1> testopt [internalflags3], dif3_quiet_input_single 11284 0000C272 7503 <1> jnz @F 11285 0000C274 E8BAF7 <1> call puts ; print out the received line 11286 <1> @@: 11287 0000C277 49 <1> dec cx 11288 0000C278 880E[0100] <1> mov byte [line_in+1], cl 11289 0000C27C E92201 <1> jmp getline_eol ; done 11290 <1> 11291 <1> getline_nofile: 11292 0000C27F E87A09 <1> call yy_reset_buf 11293 0000C282 51 <1> push cx 11294 0000C283 52 <1> push dx 11295 0000C284 E8AAF7 <1> call puts ; display prompt 11296 0000C287 5A <1> pop dx 11297 0000C288 59 <1> pop cx 11298 0000C289 F606[7D00]40 <1> testopt [options], enable_serial 11299 0000C28E 7516 <1> jnz .rawinput_NZ 11300 0000C290 E815E4 <1> call InDos 11301 0000C293 7511 <1> jnz .rawinput_NZ 11302 <1> %if _PM 11303 0000C295 E835CF <1> call ispm 11304 0000C298 7507 <1> jnz @F ; if 86 Mode --> 11305 0000C29A F606[8100]08 <1> testopt [options2], opt2_rawinput_dpmi 11306 0000C29F 7505 <1> jnz .rawinput_NZ 11307 <1> @@: 11308 <1> %endif 11309 0000C2A1 F606[7D00]08 <1> testopt [options], opt_userawinput 11310 <1> .rawinput_NZ: 11311 0000C2A6 7403E9E001 <1> jnz rawinput 11312 <1> 11313 <1> %if _PM 11314 0000C2AB E81FCF <1> call ispm 11315 0000C2AE 7537 <1> jnz @F ; if 86 Mode --> 11316 0000C2B0 F606[9E00]04 <1> testopt [internalflags], canswitchmode 11317 0000C2B5 7430 <1> jz @F ; can't switch to 86M --> 11318 0000C2B7 800E[9E00]08 <1> setopt [internalflags], modeswitched 11319 <1> ; set flag for resetmode 11320 0000C2BC B000 <1> mov al, 0 11321 0000C2BE E89375 <1> call sr_state ; save state 11322 0000C2C1 E85B75 <1> call switchmode ; switch to 86M 11323 0000C2C4 E86381 <1> call handle_mode_changed ; ! called with flag set 11324 <1> 11325 0000C2C7 BE[B095] <1> mov si, getline_extra_int23 11326 0000C2CA B023 <1> mov al, 23h 11327 0000C2CC E82D0E <1> call install_86m_interrupt_handler 11328 <1> ; override DPMI host's int 23h vector 11329 0000C2CF BA[C495] <1> mov dx, getline_extra_int22 11330 0000C2D2 B82225 <1> mov ax, 2522h 11331 0000C2D5 CD21 <1> int 21h 11332 0000C2D7 89160A00 <1> mov word [TPIV], dx ; override our PRI 11333 <1> 11334 0000C2DB BA[0000] <1> mov dx, line_in 11335 0000C2DE B40A <1> mov ah, 0Ah 11336 0000C2E0 CD21 <1> int 21h ; call DOS 11337 <1> 11338 0000C2E2 E8D300 <1> call getline_extra_uninstall 11339 <1> ; undo patches 11340 0000C2E5 EB08 <1> jmp getline_eol_enter_history 11341 <1> ; go to common trail 11342 <1> 11343 <1> @@: 11344 <1> %endif 11345 0000C2E7 BA[0000] <1> mov dx, line_in 11346 0000C2EA B40A <1> mov ah, 0Ah ; buffered keyboard input 11347 <1> doscall 2040 0000C2EC E87A9A <2> call _doscall 11348 <1> 11349 <1> getline_eol_enter_history: 11350 <1> %if _HISTORY 11351 <1> .loop: 11352 0000C2EF BE[0200] <1> mov si, line_in + 2 11353 0000C2F2 31C9 <1> xor cx, cx 11354 0000C2F4 0A4CFF <1> or cl, byte [si - 1] 11355 0000C2F7 7503E9A300 <1> jz .dontenter 11356 <1> gethistorysegment es 298 0000C2FC 368E06[F60A] <2> mov %1, word [ss:history.segorsel] 11357 <1> gethistoryoffset bx 301 0000C301 BB0000 <2> mov %1, 0 11358 0000C304 A1[FE0A] <1> mov ax, word [history.last] 11359 0000C307 3B06[FC0A] <1> cmp ax, word [history.first] 11360 0000C30B 7419 <1> je @F 11361 0000C30D 89C7 <1> mov di, ax 11362 0000C30F 268B15 <1> mov dx, [es:di] 11363 0000C312 268B7D02 <1> mov di, [es:di + 2] 11364 0000C316 29FA <1> sub dx, di 11365 0000C318 39D1 <1> cmp cx, dx 11366 0000C31A 750A <1> jne @F 11367 0000C31C 8D39 <1> lea di, [di + bx] 11368 0000C31E 51 <1> push cx 11369 0000C31F 56 <1> push si 11370 0000C320 F3A6 <1> repe cmpsb 11371 0000C322 5E <1> pop si 11372 0000C323 59 <1> pop cx 11373 0000C324 7479 <1> je .dontenter 11374 <1> @@: 11375 0000C326 89C7 <1> mov di, ax 11376 0000C328 268B15 <1> mov dx, [es:di] 11377 0000C32B 01DA <1> add dx, bx ; -> free space 11378 0000C32D F7DA <1> neg dx ; - free space start 11379 0000C32F 7502 <1> jnz @F 11380 0000C331 4A <1> dec dx 11381 0000C332 47 <1> inc di 11382 <1> @@: 11383 0000C333 01FA <1> add dx, di ; free space end - free space start 11384 0000C335 730C <1> jnc .delete 11385 0000C337 740A <1> je .delete 11386 0000C339 4A <1> dec dx 11387 0000C33A 7407 <1> jz .delete 11388 0000C33C 4A <1> dec dx 11389 0000C33D 7404 <1> jz .delete 11390 0000C33F 39D1 <1> cmp cx, dx 11391 0000C341 7646 <1> jbe .insert 11392 <1> .delete: 11393 0000C343 3B06[FC0A] <1> cmp ax, word [history.first] 11394 0000C347 7508 <1> jne @F 11395 <1> 11396 <1> .error: 11397 0000C349 BA[6567] <1> mov dx, msg.history_internal_error 11398 0000C34C E855FA <1> call putsz 11399 0000C34F EB4E <1> jmp .dontenter 11400 <1> 11401 <1> @@: 11402 0000C351 89C7 <1> mov di, ax 11403 0000C353 268B3D <1> mov di, [es:di] ; + bx -> after last 11404 0000C356 8B36[FC0A] <1> mov si, word [history.first] 11405 0000C35A 268B74FE <1> mov si, [es:si - 2] ; + bx -> at second 11406 0000C35E 29F7 <1> sub di, si ; = after last - after first 11407 <1> ; = length excluding first 11408 0000C360 89F9 <1> mov cx, di ; length to move 11409 0000C362 56 <1> push si 11410 0000C363 01DE <1> add si, bx ; -> after first 11411 0000C365 89DF <1> mov di, bx ; -> start of buffer 11412 0000C367 06 <1> push es 11413 0000C368 1F <1> pop ds 11414 0000C369 F3A4 <1> rep movsb ; move stuff 11415 0000C36B 59 <1> pop cx ; = how far we moved 11416 0000C36C 89C7 <1> mov di, ax 11417 0000C36E 8B15 <1> mov dx, word [di] 11418 <1> @@: 11419 0000C370 47 <1> inc di 11420 0000C371 47 <1> inc di 11421 0000C372 363B3E[FC0A] <1> cmp di, word [ss:history.first] 11422 0000C377 7406 <1> je @F 11423 0000C379 29CA <1> sub dx, cx 11424 0000C37B 8715 <1> xchg word [di], dx 11425 0000C37D EBF1 <1> jmp @B 11426 <1> 11427 <1> @@: 11428 0000C37F 16 <1> push ss 11429 0000C380 1F <1> pop ds 11430 0000C381 8306[FE0A]02 <1> add word [history.last], 2 11431 0000C386 E966FF <1> jmp .loop 11432 <1> 11433 <1> .insert: 11434 0000C389 48 <1> dec ax 11435 0000C38A 48 <1> dec ax 11436 0000C38B A3[FE0A] <1> mov word [history.last], ax 11437 0000C38E 89C7 <1> mov di, ax 11438 0000C390 57 <1> push di 11439 0000C391 268B7D02 <1> mov di, word [es:di + 2] 11440 0000C395 01DF <1> add di, bx 11441 0000C397 F3A4 <1> rep movsb 11442 0000C399 5E <1> pop si 11443 0000C39A 29DF <1> sub di, bx 11444 0000C39C 26893C <1> mov word [es:si], di 11445 <1> 11446 <1> .dontenter: 11447 0000C39F 16 <1> push ss 11448 0000C3A0 07 <1> pop es 11449 <1> %endif 11450 <1> 11451 <1> getline_eol: 11452 0000C3A1 F606[A500]08 <1> testopt [internalflags3], dif3_quiet_input_single 11453 0000C3A6 750A <1> jnz @F 11454 0000C3A8 B00D <1> mov al, 13 11455 0000C3AA E81AFA <1> call putc ; fix ZDOS Int21.0A display bug 11456 0000C3AD B00A <1> mov al, 10 11457 0000C3AF E815FA <1> call putc 11458 <1> @@: 11459 0000C3B2 BE[0200] <1> mov si, line_in+2 11460 0000C3B5 E98BF5 <1> jmp skipwhite ; NC 11461 <1> 11462 <1> 11463 <1> %if _PM 11464 <1> getline_extra_uninstall: 11465 0000C3B8 BA[FF80] <1> mov dx, debug22 11466 0000C3BB B82225 <1> mov ax, 2522h 11467 0000C3BE CD21 <1> int 21h 11468 0000C3C0 89160A00 <1> mov word [TPIV], dx ; restore default int 22h (PRI) 11469 0000C3C4 BE[B095] <1> mov si, getline_extra_int23 11470 0000C3C7 B023 <1> mov al, 23h 11471 0000C3C9 BAFFFF <1> mov dx, -1 11472 0000C3CC E8A70E <1> call UnhookInterruptForce 11473 <1> ; restore DPMI host's int 23h handler 11474 0000C3CF E9A774 <1> jmp resetmode ; return to PM 11475 <1> 11476 <1> usesection lDEBUG_DATA_ENTRY 11477 <1> 11478 000095AF CBEB10000000004B42- <1> iispentry getline_extra_int23 11478 000095B8 00EBF400 <1> 11479 000095C2 F9 <1> stc 11480 000095C3 CB <1> retf ; indicate to abort syscall and process 11481 <1> 11482 <1> align 2 11483 <1> getline_extra_int22: 11484 000095C4 FA <1> cli 11485 <1> .cleartraceflag: 11486 000095C5 FC <1> cld ; reestablish things 11487 000095C6 8CC8 <1> mov ax, cs 11488 000095C8 8ED8 <1> mov ds, ax 11489 000095CA 8ED0 <1> mov ss, ax 11490 000095CC 8B26[940A] <1> mov sp, word [ savesp ] ; restore stack 11491 000095D0 90 <1> times 1 - (($ - $$) & 1) nop ; align in-code parameter 11492 000095D1 E80BEB <1> call entry_to_code_seg 11493 000095D4 [D2C3] <1> dw .code 11494 <1> 11495 <1> usesection lDEBUG_CODE 11496 <1> 11497 <1> .code: 11498 <1> 11499 0000C3D2 66 <1> _386_o32 ; mov esp 11500 0000C3D3 8B26[940A] <1> mov sp, word [ savesp ] ; restore stack 11501 0000C3D7 83E4FC <1> _386 and sp, ~3 ; align stack 11502 0000C3DA 66 <1> _386_o32 11503 0000C3DB 31C0 <1> xor ax, ax 11504 0000C3DD 66 <1> _386_o32 11505 0000C3DE 50 <1> push ax 11506 0000C3DF 66 <1> _386_o32 11507 0000C3E0 9D <1> popf 11508 0000C3E1 8B26[940A] <1> _386 mov sp, word [ savesp ] ; restore stack 11509 0000C3E5 FC <1> cld 11510 0000C3E6 FB <1> sti 11511 <1> 11512 0000C3E7 E8CEFF <1> call getline_extra_uninstall 11513 <1> ; undo patches and return to PM 11514 0000C3EA E92F7C <1> jmp handle_ctrl_c ; go to common handler --> 11515 <1> %endif 11516 <1> 11517 <1> 11518 <1> getline_is_input_file?: 11519 0000C3ED F606[A400]20 <1> testopt [internalflags3], dif3_input_serial_override 11520 0000C3F2 7530 <1> jnz .nofile 11521 0000C3F4 F606[A700]01 <1> testopt [internalflags3], dif3_input_re 11522 0000C3F9 7528 <1> jnz .file 11523 0000C3FB F606[A500]01 <1> testopt [internalflags3], dif3_input_cmdline 11524 0000C400 7521 <1> jnz .file 11525 <1> %if _INPUT_FILE_BOOT 11526 0000C402 F606[A300]02 <1> testopt [internalflags2], dif2_input_file_boot 11527 0000C407 751A <1> jnz .file 11528 <1> %endif 11529 0000C409 E89CE2 <1> call InDos 11530 0000C40C 7516 <1> jnz .nofile ; InDOS, not reading from a file --> 11531 <1> %if _INPUT_FILE_HANDLES 11532 0000C40E F606[A200]10 <1> testopt [internalflags2], dif2_input_file 11533 0000C413 750E <1> jnz .file 11534 <1> %endif 11535 0000C415 F606[7D00]40 <1> testopt [options], enable_serial 11536 0000C41A 7508 <1> jnz .nofile 11537 0000C41C 803E[E70A]00 <1> cmp byte [notatty], 0 ; check this weird flag 11538 0000C421 7401 <1> je .nofile ; not reading from a file --> 11539 <1> 11540 <1> .file: 11541 0000C423 A8 <1> db __TEST_IMM8 ; (skip stc, NC) 11542 <1> .nofile: 11543 0000C424 F9 <1> stc 11544 0000C425 C3 <1> retn 11545 <1> 11546 <1> 11547 <1> getline_close_file: 11548 0000C426 51 <1> push cx 11549 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT || 1 11550 <1> ; EOF reached. if not input file, quit. else, close input file. 11551 0000C427 F606[A700]01 <1> testopt [internalflags3], dif3_input_re 11552 0000C42C 7515 <1> jnz .re 11553 <1> %if _INPUT_FILE_HANDLES && _INPUT_FILE_BOOT 11554 0000C42E F706[A200]1002 <1> testopt [internalflags2], dif2_input_file | dif2_input_file_boot, 1 11555 0000C434 750A <1> jnz @F 11556 <1> %elif _INPUT_FILE_HANDLES 11557 <1> testopt [internalflags2], dif2_input_file 11558 <1> jnz @F 11559 <1> %elif _INPUT_FILE_BOOT 11560 <1> testopt [internalflags2], dif2_input_file_boot 11561 <1> jnz @F 11562 <1> %endif 11563 0000C436 F606[A500]01 <1> testopt [internalflags3], dif3_input_cmdline 11564 0000C43B 7503E93CD5 <1> jz qq ; if EOF, quit --> 11565 <1> 11566 <1> @@: 11567 0000C440 31C9 <1> xor cx, cx 11568 0000C442 A9 <1> db __TEST_IMM16 11569 <1> .re: 11570 0000C443 B1FF <1> mov cl, -1 11571 <1> 11572 0000C445 51 <1> push cx 11573 0000C446 E82B00 <1> call .resetstuff 11574 0000C449 59 <1> pop cx 11575 <1> 11576 0000C44A E302 <1> jcxz .notre 11577 0000C44C EB15 <1> jmp @F 11578 <1> 11579 <1> .notre: 11580 0000C44E 59 <1> pop cx 11581 0000C44F F606[A500]04 <1> testopt [internalflags3], dif3_at_line_end 11582 0000C454 750C <1> jnz .return ; (NZ) 11583 <1> 11584 0000C456 B80D0A <1> mov ax, 13 | 10 << 8 ; pretend we read a CR LF sequence 11585 0000C459 AB <1> stosw 11586 0000C45A 893E[EE0A] <1> mov word [bufend], di 11587 0000C45E 4F <1> dec di 11588 0000C45F 4F <1> dec di 11589 0000C460 38C0 <1> cmp al, al ; ZR 11590 <1> .return: 11591 0000C462 C3 <1> retn 11592 <1> 11593 <1> @@: 11594 0000C463 59 <1> pop cx 11595 0000C464 F606[A500]04 <1> testopt [internalflags3], dif3_at_line_end 11596 0000C469 7506 <1> jnz @F 11597 0000C46B BA[A366] <1> mov dx, msg.unexpected_noneol_re 11598 0000C46E E82DF9 <1> call putsz_error 11599 <1> @@: 11600 0000C471 E9B162 <1> jmp dumpregs_extended.exit 11601 <1> %else 11602 <1> jmp qq ; if EOF, quit --> 11603 <1> %endif 11604 <1> 11605 <1> .resetstuff: 11606 0000C474 57 <1> push di 11607 0000C475 E8BEFA <1> call yy_close_file ; close file 11608 0000C478 5F <1> pop di 11609 <1> 11610 <1> %if _NEWFULLHANDLING 11611 0000C479 C706[EC0A][0300] <1> mov word [bufnext], line_in + 3 11612 0000C47F C706[EE0A][0300] <1> mov word [bufend], line_in + 3 11613 <1> %else 11614 <1> mov word [bufnext], line_in + 2 11615 <1> mov word [bufend], line_in + 2 11616 <1> %endif 11617 <1> 11618 0000C485 E8F403 <1> call getline_reset_notatty 11619 <1> 11620 0000C488 E9FA3F <1> jmp determine_quiet_output 11621 <1> 11622 <1> 11623 <1> rawinput: 11624 <1> lframe 11625 <1> lequ 254, limit 11626 <1> lvar word, columns 11627 <1> lvar word, maxpercol 11628 <1> lvar word, maxpercolhalf 11629 0000C48B 5589E58D66FA <1> lenter 11630 0000C491 06 <1> push es 11631 0000C492 52 <1> push dx 11632 <1> lvar dword, prompt ; (in line_out buffer) 11633 0000C493 31C0 <1> xor ax, ax 11634 <1> %if _HISTORY 11635 0000C495 50 <1> push ax 11636 <1> lvar word, historyentry 11637 <1> %endif 11638 0000C496 50 <1> push ax 11639 <1> lvar word, length_displayed 11640 0000C497 50 <1> push ax 11641 <1> lvar word, length_input 11642 0000C498 50 <1> push ax 11643 <1> lvar word, offset 11644 0000C499 50 <1> push ax 11645 <1> lvar word, lastskip 11646 0000C49A 50 <1> push ax 11647 <1> lvar word, low_redraw_and_high_beep 11648 <1> lequ ?low_redraw_and_high_beep, redraw 11649 <1> lequ ?low_redraw_and_high_beep + 1, beep 11650 0000C49B 50 <1> push ax 11651 <1> lvar word, edited 11652 0000C49C 51 <1> push cx 11653 <1> lvar word, column 11654 0000C49D 51 <1> push cx 11655 <1> lvar word, promptlength 11656 <1> 11657 0000C49E 57 <1> push di 11658 0000C49F 1E <1> push ds 11659 0000C4A0 07 <1> pop es 11660 <1> 11661 0000C4A1 BF[0200] <1> mov di, line_in+2 11662 <1> .next: 11663 0000C4A4 E8FE7A <1> call handle_serial_flags_ctrl_c 11664 <1> 11665 0000C4A7 807EEA00 <1> cmp byte [bp + ?redraw], 0 11666 0000C4AB 7503E9AF00 <1> je .no_do_redraw 11667 <1> .do_redraw: 11668 <1> 11669 0000C4B0 E89903 <1> call get_columns 11670 <1> 11671 0000C4B3 8946FE <1> mov word [bp + ?columns], ax 11672 0000C4B6 48 <1> dec ax ; $COLS - 1 11673 0000C4B7 2B46E4 <1> sub ax, word [bp + ?promptlength]; - $promptlength 11674 0000C4BA 8946FC <1> mov word [bp + ?maxpercol], ax 11675 0000C4BD D1E8 <1> shr ax, 1 ; int($maxpercol / 2) 11676 0000C4BF 8946FA <1> mov word [bp + ?maxpercolhalf], ax 11677 <1> 11678 0000C4C2 B00D <1> mov al, 13 11679 0000C4C4 E800F9 <1> call putc 11680 <1> 11681 0000C4C7 C456F6 <1> les dx, [bp + ?prompt] 11682 0000C4CA 8B4EE4 <1> mov cx, [bp + ?promptlength] 11683 0000C4CD E861F5 <1> call puts 11684 0000C4D0 8B46F0 <1> mov ax, [bp + ?length_input] 11685 0000C4D3 89C1 <1> mov cx, ax 11686 0000C4D5 31FF <1> xor di, di ; skip 11687 <1> ; + line_in + 2 -> to display 11688 0000C4D7 3B46FC <1> cmp ax, word [bp + ?maxpercol] 11689 0000C4DA 8B46E6 <1> mov ax, word [bp + ?column] ; col 11690 0000C4DD 7626 <1> jna .not_show_a_maxpercol 11691 <1> .show_a_maxpercol: 11692 0000C4DF 8B5EEC <1> mov bx, word [bp + ?lastskip] 11693 0000C4E2 395EEE <1> cmp word [bp + ?offset], bx 11694 0000C4E5 7206 <1> jnae .not_offset_ae_lastskip 11695 <1> .offset_ae_lastskip: 11696 0000C4E7 29D8 <1> sub ax, bx ; col -= lastskip 11697 0000C4E9 01DF <1> add di, bx ; skip += lastskip 11698 0000C4EB 29D9 <1> sub cx, bx ; lessen length of part to display 11699 <1> .not_offset_ae_lastskip: 11700 <1> 11701 <1> @@: 11702 0000C4ED 3B46FC <1> cmp ax, word [bp + ?maxpercol] 11703 0000C4F0 760B <1> jna .not_col_a_maxpercol 11704 <1> .col_a_maxpercol: 11705 0000C4F2 2B46FA <1> sub ax, word [bp + ?maxpercolhalf] 11706 <1> ; lessen col 11707 0000C4F5 037EFA <1> add di, word [bp + ?maxpercolhalf] 11708 <1> ; heighten offset of part to display 11709 0000C4F8 2B4EFA <1> sub cx, word [bp + ?maxpercolhalf] 11710 <1> ; lessen length of part to display 11711 0000C4FB EBF0 <1> jmp @B 11712 <1> 11713 <1> .not_col_a_maxpercol: 11714 0000C4FD 3B4EFC <1> cmp cx, word [bp + ?maxpercol] 11715 0000C500 7603 <1> jbe @F 11716 0000C502 8B4EFC <1> mov cx, word [bp + ?maxpercol] 11717 <1> @@: 11718 <1> .not_show_a_maxpercol: 11719 0000C505 897EEC <1> mov word [bp + ?lastskip], di 11720 0000C508 8D95[0200] <1> lea dx, [di + line_in + 2] 11721 0000C50C 16 <1> push ss 11722 0000C50D 07 <1> pop es 11723 <1> 11724 0000C50E FF76F2 <1> push word [bp + ?length_displayed] 11725 0000C511 894EF2 <1> mov word [bp + ?length_displayed], cx 11726 0000C514 50 <1> push ax 11727 0000C515 51 <1> push cx 11728 0000C516 52 <1> push dx 11729 0000C517 E817F5 <1> call puts ; redraw 11730 0000C51A 5A <1> pop dx 11731 0000C51B 59 <1> pop cx 11732 0000C51C 58 <1> pop ax 11733 0000C51D 5B <1> pop bx 11734 <1> 11735 0000C51E 87D9 <1> xchg bx, cx ; cx = prior length displayed, 11736 <1> ; bx = new length displayed 11737 0000C520 29D9 <1> sub cx, bx ; = how many blanks needed to overwrite 11738 0000C522 760B <1> jbe @FF 11739 0000C524 01CB <1> add bx, cx ; = length displayed 11740 0000C526 50 <1> push ax 11741 0000C527 B020 <1> mov al, 32 11742 <1> @@: 11743 0000C529 E89BF8 <1> call putc 11744 0000C52C E2FB <1> loop @B 11745 0000C52E 58 <1> pop ax 11746 <1> @@: 11747 <1> 11748 0000C52F 52 <1> push dx 11749 0000C530 01DA <1> add dx, bx 11750 0000C532 81EA[0200] <1> sub dx, line_in + 2 ; offset into line (with length displayed) 11751 0000C536 0356E4 <1> add dx, word [bp + ?promptlength]; offset into display 11752 0000C539 3B56E6 <1> cmp dx, word [bp + ?column] ; same as column ? 11753 0000C53C 5A <1> pop dx 11754 0000C53D 741C <1> je .do_redraw_done ; yes, skip cursor movement stuff --> 11755 <1> 11756 0000C53F 50 <1> push ax 11757 0000C540 52 <1> push dx 11758 0000C541 B00D <1> mov al, 13 11759 0000C543 E881F8 <1> call putc ; reset cursor 11760 0000C546 C456F6 <1> les dx, [bp + ?prompt] 11761 0000C549 8B4EE4 <1> mov cx, [bp + ?promptlength] 11762 0000C54C E8E2F4 <1> call puts ; redraw prompt 11763 0000C54F 16 <1> push ss 11764 0000C550 07 <1> pop es 11765 0000C551 5A <1> pop dx ; -> current input text 11766 0000C552 58 <1> pop ax ; = col 11767 0000C553 2B46E4 <1> sub ax, word [bp + ?promptlength] 11768 <1> ; = offset into input text 11769 0000C556 89C1 <1> mov cx, ax ; draw that much 11770 0000C558 E8D6F4 <1> call puts ; draw (to move cursor) 11771 <1> 11772 <1> .do_redraw_done: 11773 0000C55B C646EA00 <1> mov byte [bp + ?redraw], 0 11774 <1> 11775 <1> .no_do_redraw: 11776 <1> 11777 0000C55F 807EEB00 <1> cmp byte [bp + ?beep], 0 11778 0000C563 7409 <1> je .no_do_beep 11779 <1> .do_beep: 11780 0000C565 B007 <1> mov al, 7 11781 0000C567 E85DF8 <1> call putc 11782 <1> 11783 0000C56A C646EB00 <1> mov byte [bp + ?beep], 0 11784 <1> .no_do_beep: 11785 <1> 11786 0000C56E E898F8 <1> call getc 11787 <1> 11788 <1> ; check scancode for int 16h in non-dumb dosemu first 11789 0000C571 86C4 <1> xchg al, ah 11790 0000C573 3C48 <1> cmp al, 48h 11791 0000C575 7503E9F901 <1> je .up 11792 0000C57A 3C4B <1> cmp al, 4Bh 11793 0000C57C 7503E9CA01 <1> je .left 11794 0000C581 3C50 <1> cmp al, 50h 11795 0000C583 7503E90702 <1> je .down 11796 0000C588 3C4D <1> cmp al, 4Dh 11797 0000C58A 7503E9CF01 <1> je .right 11798 0000C58F 3C52 <1> cmp al, 52h 11799 0000C591 7503E95502 <1> je .insert 11800 0000C596 3C53 <1> cmp al, 53h 11801 0000C598 7503E96101 <1> je .del 11802 0000C59D 3C47 <1> cmp al, 47h 11803 0000C59F 7503E98301 <1> je .home 11804 0000C5A4 3C4F <1> cmp al, 4Fh 11805 0000C5A6 7503E98D01 <1> je .end 11806 0000C5AB 3C49 <1> cmp al, 49h 11807 0000C5AD 7503E93902 <1> je .pageup 11808 0000C5B2 3C51 <1> cmp al, 51h 11809 0000C5B4 7503E93202 <1> je .pagedown 11810 <1> 11811 <1> ; not a special scancode, check character returned 11812 0000C5B9 86C4 <1> xchg al, ah 11813 0000C5BB 3C1B <1> cmp al, 1Bh 11814 0000C5BD 7403E98B00 <1> jne .not_esc 11815 <1> 11816 <1> ; check escape opcodes for int 16h in -dumb dosemu 11817 <1> ; or input from serial I/O (picocom/screen/ssh/mate-terminal) 11818 <1> .esc: 11819 0000C5C2 E844F8 <1> call getc 11820 0000C5C5 3C5B <1> cmp al, '[' 11821 0000C5C7 7403E91F02 <1> jne .beep 11822 0000C5CC E83AF8 <1> call getc 11823 0000C5CF 3C41 <1> cmp al, 41h 11824 0000C5D1 7503E99D01 <1> je .up 11825 0000C5D6 3C44 <1> cmp al, 44h 11826 0000C5D8 7503E96E01 <1> je .left 11827 0000C5DD 3C42 <1> cmp al, 42h 11828 0000C5DF 7503E9AB01 <1> je .down 11829 0000C5E4 3C43 <1> cmp al, 43h 11830 0000C5E6 7503E97301 <1> je .right 11831 0000C5EB 3C32 <1> cmp al, 32h 11832 0000C5ED 7425 <1> je .check_insert 11833 0000C5EF 3C33 <1> cmp al, 33h 11834 0000C5F1 7421 <1> je .check_del 11835 0000C5F3 3C31 <1> cmp al, 31h 11836 0000C5F5 741D <1> je .check_home 11837 0000C5F7 3C34 <1> cmp al, 34h 11838 0000C5F9 7419 <1> je .check_end 11839 0000C5FB 3C48 <1> cmp al, 48h 11840 0000C5FD 7503E92501 <1> je .home 11841 0000C602 3C46 <1> cmp al, 46h 11842 0000C604 7503E92F01 <1> je .end 11843 0000C609 3C35 <1> cmp al, 35h 11844 0000C60B 7407 <1> je .check_pageup 11845 0000C60D 3C36 <1> cmp al, 36h 11846 0000C60F 7403 <1> je .check_pagedown 11847 0000C611 E9D701 <1> jmp .beep 11848 <1> 11849 <1> 11850 <1> .check_insert: 11851 <1> .check_del: 11852 <1> .check_home: 11853 <1> .check_end: 11854 <1> .check_pageup: 11855 <1> .check_pagedown: 11856 0000C614 50 <1> push ax 11857 0000C615 E8F1F7 <1> call getc 11858 0000C618 3C7E <1> cmp al, 7Eh 11859 0000C61A 58 <1> pop ax 11860 0000C61B 7403E9CB01 <1> jne .beep 11861 <1> 11862 0000C620 3C32 <1> cmp al, 32h 11863 0000C622 7503E9C401 <1> je .insert 11864 0000C627 3C33 <1> cmp al, 33h 11865 0000C629 7503E9D000 <1> je .del 11866 0000C62E 3C31 <1> cmp al, 31h 11867 0000C630 7503E9F200 <1> je .home 11868 0000C635 3C34 <1> cmp al, 34h 11869 0000C637 7503E9FC00 <1> je .end 11870 0000C63C 3C35 <1> cmp al, 35h 11871 0000C63E 7503E9A801 <1> je .pageup 11872 0000C643 3C36 <1> cmp al, 36h 11873 0000C645 7503E9A101 <1> je .pagedown 11874 <1> 11875 0000C64A E99E01 <1> jmp .beep 11876 <1> 11877 <1> 11878 <1> .not_esc: 11879 <1> ; check regular characters 11880 0000C64D 84C0 <1> test al, al ; waste? 11881 0000C64F 7503E950FE <1> je .next 11882 0000C654 3CE0 <1> cmp al, 0E0h 11883 0000C656 7503E949FE <1> je .next ; waste --> 11884 <1> 11885 0000C65B 3C03 <1> cmp al, 03h 11886 0000C65D 7503E99001 <1> je .ctrlc 11887 0000C662 3C09 <1> cmp al, 09h 11888 0000C664 7503E98201 <1> je .beep ; tab 11889 0000C669 3C08 <1> cmp al, 08h 11890 0000C66B 745D <1> je .backspace 11891 0000C66D 3C7F <1> cmp al, 7Fh 11892 <1> ; On the server in int 16h of -dumb dosemu, as well as on 11893 <1> ; both systems across serial I/O this code is used. 11894 0000C66F 7459 <1> je .backspace 11895 0000C671 3C0A <1> cmp al, 10 ; (allow Linux style linebreak) 11896 0000C673 7503E97D01 <1> je .done 11897 0000C678 3C0D <1> cmp al, 13 ; (match for CR keypress) 11898 0000C67A 7503E97601 <1> je .done 11899 <1> 11900 <1> .textcodepoint: 11901 0000C67F 8B5EF0 <1> mov bx, word [bp + ?length_input] 11902 0000C682 81FBFE00 <1> cmp bx, ?limit 11903 0000C686 720B <1> jb @F 11904 0000C688 C646EA01 <1> mov byte [bp + ?redraw], 1 11905 0000C68C C646EB01 <1> mov byte [bp + ?beep], 1 11906 0000C690 E911FE <1> jmp .next 11907 <1> @@: 11908 <1> 11909 0000C693 C646E801 <1> mov byte [bp + ?edited], 1 11910 0000C697 8B56F0 <1> mov dx, word [bp + ?length_input] 11911 0000C69A 89D1 <1> mov cx, dx 11912 0000C69C 89D7 <1> mov di, dx 11913 0000C69E 16 <1> push ss 11914 0000C69F 07 <1> pop es 11915 0000C6A0 81C7[0200] <1> add di, line_in + 2 ; di -> behind end of input 11916 0000C6A4 89FE <1> mov si, di 11917 0000C6A6 4E <1> dec si ; si -> at last entry of input 11918 0000C6A7 2B4EEE <1> sub cx, word [bp + ?offset] 11919 0000C6AA FD <1> std ; AMD erratum 109 workaround done 11920 <1> numdef AMD_ERRATUM_109_WORKAROUND, 1 11921 <1> %if _AMD_ERRATUM_109_WORKAROUND 11922 0000C6AB E308 <1> jcxz @FF 11923 0000C6AD 83F914 <1> cmp cx, 20 11924 0000C6B0 7703 <1> ja @FF 11925 <1> @@: 11926 0000C6B2 A4 <1> movsb 11927 0000C6B3 E2FD <1> loop @B 11928 <1> @@: 11929 <1> %endif 11930 0000C6B5 F3A4 <1> rep movsb 11931 0000C6B7 FC <1> cld 11932 0000C6B8 8805 <1> mov byte [di], al 11933 0000C6BA FF46E6 <1> inc word [bp + ?column] 11934 0000C6BD FF46EE <1> inc word [bp + ?offset] 11935 0000C6C0 FF46F0 <1> inc word [bp + ?length_input] 11936 0000C6C3 C646EA01 <1> mov byte [bp + ?redraw], 1 11937 0000C6C7 E9DAFD <1> jmp .next 11938 <1> 11939 <1> .backspace: 11940 0000C6CA 837EEE00 <1> cmp word [bp + ?offset], 0 11941 0000C6CE 7427 <1> je .backspace_offset_0 11942 <1> 11943 0000C6D0 C646E801 <1> mov byte [bp + ?edited], 1 11944 0000C6D4 16 <1> push ss 11945 0000C6D5 07 <1> pop es 11946 0000C6D6 8B7EEE <1> mov di, word [bp + ?offset] 11947 0000C6D9 8B4EF0 <1> mov cx, word [bp + ?length_input] 11948 0000C6DC 29F9 <1> sub cx, di ; length after offset 11949 0000C6DE 81C7[0200] <1> add di, line_in + 2 ; -> at offset in line 11950 0000C6E2 89FE <1> mov si, di ; -> at offset in line 11951 0000C6E4 4F <1> dec di ; -> at offset - 1 in line 11952 0000C6E5 F3A4 <1> rep movsb ; move down additional content 11953 0000C6E7 FF4EE6 <1> dec word [bp + ?column] 11954 0000C6EA FF4EEE <1> dec word [bp + ?offset] 11955 0000C6ED FF4EF0 <1> dec word [bp + ?length_input] 11956 0000C6F0 C646EA01 <1> mov byte [bp + ?redraw], 1 11957 0000C6F4 E9ADFD <1> jmp .next 11958 <1> 11959 <1> .backspace_offset_0: 11960 <1> .del_offset_ae_length_input: 11961 <1> .left_offset_0: 11962 <1> .right_offset_too_high: 11963 0000C6F7 C646EB01 <1> mov byte [bp + ?beep], 1 11964 0000C6FB E9A6FD <1> jmp .next 11965 <1> 11966 <1> .del: 11967 0000C6FE 8B46EE <1> mov ax, word [bp + ?offset] 11968 0000C701 3B46F0 <1> cmp ax, word [bp + ?length_input] 11969 0000C704 73F1 <1> jae .del_offset_ae_length_input 11970 0000C706 C646E801 <1> mov byte [bp + ?edited], 1 11971 0000C70A 89C7 <1> mov di, ax 11972 0000C70C 81C7[0200] <1> add di, line_in + 2 ; -> at current offset 11973 0000C710 89FE <1> mov si, di 11974 0000C712 46 <1> inc si ; -> after current offset 11975 0000C713 40 <1> inc ax ; offset + 1 11976 0000C714 F7D8 <1> neg ax ; - (offset + 1) 11977 0000C716 0346F0 <1> add ax, word [bp + ?length_input]; length input - (offset + 1) 11978 0000C719 89C1 <1> mov cx, ax 11979 0000C71B F3A4 <1> rep movsb ; move down part after deleted point 11980 0000C71D FF4EF0 <1> dec word [bp + ?length_input] 11981 0000C720 C646EA01 <1> mov byte [bp + ?redraw], 1 11982 0000C724 E97DFD <1> jmp .next 11983 <1> 11984 <1> .home: 11985 0000C727 8366EE00 <1> and word [bp + ?offset], 0 11986 0000C72B FF76E4 <1> push word [bp + ?promptlength] 11987 0000C72E 8F46E6 <1> pop word [bp + ?column] 11988 0000C731 C646EA01 <1> mov byte [bp + ?redraw], 1 11989 0000C735 E96CFD <1> jmp .next 11990 <1> 11991 <1> .end: 11992 0000C738 8B46F0 <1> mov ax, word [bp + ?length_input] 11993 0000C73B 8946EE <1> mov word [bp + ?offset], ax 11994 0000C73E 0346E4 <1> add ax, word [bp + ?promptlength] 11995 0000C741 8946E6 <1> mov word [bp + ?column], ax 11996 0000C744 C646EA01 <1> mov byte [bp + ?redraw], 1 11997 0000C748 E959FD <1> jmp .next 11998 <1> 11999 <1> .left: 12000 0000C74B 837EEE00 <1> cmp word [bp + ?offset], 0 12001 0000C74F 74A6 <1> je .left_offset_0 12002 0000C751 FF4EEE <1> dec word [bp + ?offset] 12003 0000C754 FF4EE6 <1> dec word [bp + ?column] 12004 0000C757 C646EA01 <1> mov byte [bp + ?redraw], 1 12005 0000C75B E946FD <1> jmp .next 12006 <1> 12007 <1> .right: 12008 0000C75E 8B46EE <1> mov ax, word [bp + ?offset] 12009 0000C761 3B46F0 <1> cmp ax, word [bp + ?length_input] 12010 0000C764 7391 <1> jnb .right_offset_too_high 12011 0000C766 FF46EE <1> inc word [bp + ?offset] 12012 0000C769 FF46E6 <1> inc word [bp + ?column] 12013 0000C76C C646EA01 <1> mov byte [bp + ?redraw], 1 12014 0000C770 E931FD <1> jmp .next 12015 <1> 12016 <1> .up: 12017 0000C773 807EE800 <1> cmp byte [bp + ?edited], 0 12018 0000C777 7572 <1> jne .beep 12019 <1> %if _HISTORY 12020 0000C779 8B76F4 <1> mov si, word [bp + ?historyentry] 12021 0000C77C 85F6 <1> test si, si 12022 0000C77E 8D7402 <1> lea si, [si + 2] 12023 0000C781 7504 <1> jnz @F 12024 0000C783 8B36[FE0A] <1> mov si, word [history.last] 12025 <1> @@: 12026 0000C787 3B36[FC0A] <1> cmp si, word [history.first] 12027 0000C78B 745E <1> je .beep 12028 0000C78D EB1B <1> jmp .copyline 12029 <1> 12030 <1> .down: 12031 0000C78F 807EE800 <1> cmp byte [bp + ?edited], 0 12032 0000C793 7556 <1> jne .beep 12033 0000C795 8B76F4 <1> mov si, word [bp + ?historyentry] 12034 0000C798 85F6 <1> test si, si 12035 0000C79A 744F <1> jz .beep 12036 0000C79C 3B36[FE0A] <1> cmp si, word [history.last] 12037 0000C7A0 7506 <1> jne @F 12038 0000C7A2 31C0 <1> xor ax, ax 12039 0000C7A4 31C9 <1> xor cx, cx 12040 0000C7A6 EB10 <1> jmp .setline 12041 <1> 12042 <1> @@: 12043 0000C7A8 4E <1> dec si 12044 0000C7A9 4E <1> dec si 12045 <1> 12046 <1> .copyline: 12047 0000C7AA 89F0 <1> mov ax, si 12048 <1> gethistorysegment ds 298 0000C7AC 368E1E[F60A] <2> mov %1, word [ss:history.segorsel] 12049 0000C7B1 8B0C <1> mov cx, [si] 12050 0000C7B3 8B7402 <1> mov si, [si + 2] 12051 0000C7B6 29F1 <1> sub cx, si 12052 <1> 12053 <1> .setline: 12054 0000C7B8 8946F4 <1> mov word [bp + ?historyentry], ax 12055 <1> gethistoryoffset bx 301 0000C7BB BB0000 <2> mov %1, 0 12056 0000C7BE 8D30 <1> lea si, [si + bx] 12057 0000C7C0 16 <1> push ss 12058 0000C7C1 07 <1> pop es 12059 0000C7C2 BF[0100] <1> mov di, line_in + 1 12060 0000C7C5 88C8 <1> mov al, cl 12061 0000C7C7 AA <1> stosb 12062 0000C7C8 F3A4 <1> rep movsb 12063 0000C7CA B00D <1> mov al, 13 12064 0000C7CC AA <1> stosb 12065 0000C7CD 16 <1> push ss 12066 0000C7CE 1F <1> pop ds 12067 <1> %else 12068 <1> .down: equ .beep 12069 <1> 12070 <1> mov byte [bp + ?edited], 1 12071 <1> %endif 12072 0000C7CF 31C0 <1> xor ax, ax 12073 0000C7D1 A0[0100] <1> mov al, byte [line_in + 1] 12074 0000C7D4 8946EE <1> mov word [bp + ?offset], ax 12075 0000C7D7 8946F0 <1> mov word [bp + ?length_input], ax 12076 0000C7DA 0346E4 <1> add ax, word [bp + ?promptlength] 12077 0000C7DD 8946E6 <1> mov word [bp + ?column], ax 12078 0000C7E0 8366EC00 <1> and word [bp + ?lastskip], 0 12079 0000C7E4 C646EA01 <1> mov byte [bp + ?redraw], 1 12080 0000C7E8 E9B9FC <1> jmp .next 12081 <1> 12082 <1> .insert: 12083 <1> .pageup: 12084 <1> .pagedown: 12085 <1> .beep: 12086 0000C7EB C646EB01 <1> mov byte [bp + ?beep], 1 12087 0000C7EF E9B2FC <1> jmp .next 12088 <1> 12089 <1> .ctrlc: 12090 0000C7F2 E92778 <1> jmp handle_ctrl_c 12091 <1> 12092 <1> .done: 12093 0000C7F5 8B7EF0 <1> mov di, word [bp + ?length_input] 12094 <1> 12095 0000C7F8 8B56EC <1> mov dx, word [bp + ?lastskip] 12096 0000C7FB 0356F2 <1> add dx, word [bp + ?length_displayed] 12097 <1> ; offset into line (with length displayed) 12098 0000C7FE 0356E4 <1> add dx, word [bp + ?promptlength]; offset into display 12099 0000C801 3B56E6 <1> cmp dx, word [bp + ?column] ; same as column ? 12100 0000C804 750A <1> jne @F ; no, always redraw --> 12101 <1> 12102 0000C806 89F8 <1> mov ax, di 12103 0000C808 0346E4 <1> add ax, word [bp + ?promptlength] 12104 0000C80B 3946FE <1> cmp word [bp + ?columns], ax 12105 0000C80E 7719 <1> ja .done_no_redraw 12106 <1> 12107 <1> @@: 12108 0000C810 B00D <1> mov al, 13 12109 0000C812 E8B2F5 <1> call putc ; reset cursor 12110 0000C815 C456F6 <1> les dx, [bp + ?prompt] 12111 0000C818 8B4EE4 <1> mov cx, [bp + ?promptlength] 12112 0000C81B E813F2 <1> call puts ; redraw prompt 12113 0000C81E 16 <1> push ss 12114 0000C81F 07 <1> pop es 12115 0000C820 BA[0200] <1> mov dx, line_in + 2 12116 0000C823 8B4EF0 <1> mov cx, word [bp + ?length_input] 12117 0000C826 E808F2 <1> call puts ; draw 12118 <1> 12119 <1> .done_no_redraw: 12120 0000C829 81C7[0200] <1> add di, line_in + 2 12121 0000C82D B00D <1> mov al, 13 12122 0000C82F AA <1> stosb ; store the CR (there always is room) 12123 0000C830 97 <1> xchg ax, di ; -> behind CR 12124 0000C831 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 12127 <1> ; (This instruction disregards the unnecessary higher byte.) 12128 0000C833 5F <1> pop di ; restore di 12129 0000C834 A2[0100] <1> mov byte [line_in+1], al ; store the length byte 12130 0000C837 89EC5D <1> lleave code 12131 0000C83A E9B2FA <1> jmp getline_eol_enter_history 12132 <1> 12133 <1> lleave ctx 12134 <1> 12135 <1> 12136 <1> fullbsout: 12137 0000C83D B008 <1> mov al, 8 12138 0000C83F E885F5 <1> call putc 12139 0000C842 B020 <1> mov al, 32 12140 0000C844 E880F5 <1> call putc 12141 0000C847 B008 <1> mov al, 8 12142 0000C849 E97BF5 <1> jmp putc 12143 <1> 12144 <1> 12145 <1> ; INP: - 12146 <1> ; OUT: ax = number of columns to use 12147 <1> ; STT: ds = ss = debugger data selector 12148 <1> get_columns: 12149 0000C84C 31C0 <1> xor ax, ax 12150 0000C84E F606[7D00]40 <1> testopt [options], enable_serial ; serial ? 12151 0000C853 7411 <1> jz @F ; no --> 12152 0000C855 0A06[E80B] <1> or al, byte [serial_columns] ; ax = number of columns if serial 12153 0000C859 7407 <1> jz .default_columns 12154 0000C85B 3C01 <1> cmp al, 1 12155 0000C85D 751C <1> jne @FF 12156 0000C85F 48 <1> dec ax ; = 0 12157 0000C860 EB04 <1> jmp @F ; use IOC / BDA selection 12158 <1> .default_columns: 12159 0000C862 B050 <1> mov al, 80 12160 0000C864 EB15 <1> jmp @FF 12161 <1> @@: 12162 0000C866 0A06[F70B] <1> or al, [io_columns] 12163 0000C86A 74F6 <1> jz .default_columns 12164 0000C86C 3C01 <1> cmp al, 1 ; is 1 ? 12165 0000C86E 750B <1> jne @F ; no, use as columns --> 12166 <1> ; yes, automatic (use BDA) 12167 0000C870 06 <1> push es 12168 0000C871 B84000 <1> mov ax, 40h ; 0040h is a bimodal segment/selector 12169 0000C874 8EC0 <1> mov es, ax 12170 0000C876 26A14A00 <1> mov ax, word [ es:4Ah ] ; columns on screen 12171 0000C87A 07 <1> pop es 12172 <1> @@: 12173 0000C87B C3 <1> retn 12174 <1> 12175 <1> 12176 <1> getline_reset_notatty: 12177 0000C87C F606[A700]02 <1> testopt [internalflags3], dif3_input_re_closed 12178 0000C881 7421 <1> jz @F 12179 0000C883 8026[A700]FD <1> clropt [internalflags3], dif3_input_re_closed 12180 0000C888 F606[A500]01 <1> testopt [internalflags3], dif3_input_cmdline 12181 0000C88D 7515 <1> jnz @F 12182 <1> %if _INPUT_FILE_HANDLES 12183 0000C88F E816DE <1> call InDos 12184 0000C892 7507 <1> jnz .notfile1 12185 0000C894 F606[A200]10 <1> testopt [internalflags2], dif2_input_file 12186 0000C899 7509 <1> jnz @F 12187 <1> .notfile1: 12188 <1> %endif 12189 <1> %if _INPUT_FILE_BOOT 12190 0000C89B F606[A300]02 <1> testopt [internalflags2], dif2_input_file_boot 12191 0000C8A0 7502 <1> jnz @F 12192 <1> %endif 12193 0000C8A2 EB47 <1> jmp .clear_notatty 12194 <1> 12195 <1> @@: 12196 0000C8A4 F606[A500]02 <1> testopt [internalflags3], dif3_input_cmdline_closed 12197 0000C8A9 741A <1> jz @F 12198 0000C8AB 8026[A500]FD <1> clropt [internalflags3], dif3_input_cmdline_closed 12199 <1> %if _INPUT_FILE_HANDLES 12200 0000C8B0 E8F5DD <1> call InDos 12201 0000C8B3 7507 <1> jnz .notfile2 12202 0000C8B5 F606[A200]10 <1> testopt [internalflags2], dif2_input_file 12203 0000C8BA 7509 <1> jnz @F 12204 <1> .notfile2: 12205 <1> %endif 12206 <1> %if _INPUT_FILE_BOOT 12207 0000C8BC F606[A300]02 <1> testopt [internalflags2], dif2_input_file_boot 12208 0000C8C1 7502 <1> jnz @F 12209 <1> %endif 12210 0000C8C3 EB26 <1> jmp .clear_notatty 12211 <1> 12212 <1> @@: 12213 <1> %if _INPUT_FILE_BOOT 12214 0000C8C5 F606[A300]04 <1> testopt [internalflags2], dif2_closed_input_file_boot 12215 0000C8CA 7413 <1> jz @F 12216 0000C8CC 8026[A300]FB <1> clropt [internalflags2], dif2_closed_input_file_boot 12217 <1> %if _INPUT_FILE_HANDLES 12218 0000C8D1 E8D4DD <1> call InDos 12219 0000C8D4 7507 <1> jnz .notfile3 12220 0000C8D6 F606[A200]10 <1> testopt [internalflags2], dif2_input_file 12221 0000C8DB 7502 <1> jnz @F 12222 <1> .notfile3: 12223 <1> %endif 12224 0000C8DD EB0C <1> jmp .clear_notatty 12225 <1> @@: 12226 <1> %endif 12227 <1> %if _INPUT_FILE_HANDLES 12228 0000C8DF F606[A200]20 <1> testopt [internalflags2], dif2_closed_input_file 12229 0000C8E4 7411 <1> jz @F 12230 0000C8E6 8026[A200]DF <1> clropt [internalflags2], dif2_closed_input_file 12231 <1> %else 12232 <1> jmp @F 12233 <1> %endif 12234 <1> .clear_notatty: 12235 0000C8EB F606[9C00]30 <1> testopt [internalflags], inputfile | notstdinput 12236 0000C8F0 7505 <1> jnz @F 12237 0000C8F2 C606[E70A]00 <1> mov byte [notatty], 0 ; it _is_ a tty 12238 <1> @@: 12239 0000C8F7 C3 <1> retn 12240 <1> 12241 <1> 12242 <1> ; Fill input buffer from file. 12243 <1> ; 12244 <1> ; INP: di-> first available byte in input buffer 12245 <1> ; OUT: CY if DOS returned an error or EOF occured 12246 <1> ; NC if no error 12247 <1> ; si = di 12248 <1> ; CHG: - 12249 <1> fillbuf: 12250 0000C8F8 E8AA76 <1> call handle_serial_flags_ctrl_c 12251 0000C8FB 50 <1> push ax 12252 0000C8FC 53 <1> push bx 12253 0000C8FD 51 <1> push cx 12254 0000C8FE 52 <1> push dx 12255 0000C8FF 89FE <1> mov si, di ; we know this already 12256 0000C901 B9[0101] <1> mov cx, line_in+LINE_IN_LEN 12257 0000C904 89FA <1> mov dx, di 12258 0000C906 29F9 <1> sub cx, di 12259 0000C908 7703E99F00 <1> jbe .ret_cy ; if no more room --> 12260 <1> 12261 0000C90D F606[A700]01 <1> testopt [internalflags3], dif3_input_re 12262 0000C912 7429 <1> jz .not_re 12263 0000C914 56 <1> push si 12264 0000C915 57 <1> push di 12265 0000C916 89CB <1> mov bx, cx 12266 0000C918 8B36[E409] <1> mov si, word [re_buffer.position] 12267 0000C91C 89F7 <1> mov di, si 12268 0000C91E B9FFFF <1> mov cx, -1 12269 0000C921 31C0 <1> xor ax, ax 12270 0000C923 F2AE <1> repne scasb 12271 0000C925 F7D1 <1> not cx 12272 0000C927 49 <1> dec cx 12273 0000C928 39CB <1> cmp bx, cx 12274 0000C92A 7702 <1> ja @F 12275 0000C92C 89D9 <1> mov cx, bx 12276 <1> @@: 12277 0000C92E 89C8 <1> mov ax, cx 12278 0000C930 89D7 <1> mov di, dx 12279 0000C932 F3A4 <1> rep movsb 12280 0000C934 8936[E409] <1> mov word [re_buffer.position], si 12281 0000C938 5F <1> pop di 12282 0000C939 5E <1> pop si 12283 0000C93A F8 <1> clc 12284 0000C93B EB61 <1> jmp .after 12285 <1> 12286 <1> .not_re: 12287 <1> 12288 <1> %if _INPUT_FILE_BOOT 12289 0000C93D F606[A300]02 <1> testopt [internalflags2], dif2_input_file_boot 12290 0000C942 7408 <1> jz @F 12291 0000C944 E80404 <1> call yy_boot_remember_seek 12292 0000C947 E81CB5 <1> call yy_boot_read 12293 0000C94A EB52 <1> jmp .after 12294 <1> @@: 12295 <1> %endif 12296 <1> 12297 <1> %if _INPUT_FILE_HANDLES 12298 0000C94C E859DD <1> call InDos 12299 0000C94F 750E <1> jnz @F 12300 0000C951 F606[A200]10 <1> testopt [internalflags2], dif2_input_file 12301 0000C956 7407 <1> jz @F ; if not input file --> 12302 0000C958 57 <1> push di 12303 0000C959 E88AF6 <1> call yy_get_handle ; bx = handle 12304 0000C95C 5F <1> pop di 12305 0000C95D EB37 <1> jmp .file_handle 12306 <1> %endif 12307 <1> 12308 <1> @@: 12309 0000C95F F606[A500]01 <1> testopt [internalflags3], dif3_input_cmdline 12310 0000C964 7429 <1> jz .not_cmdline 12311 0000C966 56 <1> push si 12312 0000C967 57 <1> push di 12313 0000C968 89CB <1> mov bx, cx 12314 0000C96A 8B36[E001] <1> mov si, word [cmdline_buffer.position] 12315 0000C96E 89F7 <1> mov di, si 12316 0000C970 B9FFFF <1> mov cx, -1 12317 0000C973 31C0 <1> xor ax, ax 12318 0000C975 F2AE <1> repne scasb 12319 0000C977 F7D1 <1> not cx 12320 0000C979 49 <1> dec cx 12321 0000C97A 39CB <1> cmp bx, cx 12322 0000C97C 7702 <1> ja @F 12323 0000C97E 89D9 <1> mov cx, bx 12324 <1> @@: 12325 0000C980 89C8 <1> mov ax, cx 12326 0000C982 89D7 <1> mov di, dx 12327 0000C984 F3A4 <1> rep movsb 12328 0000C986 8936[E001] <1> mov word [cmdline_buffer.position], si 12329 0000C98A 5F <1> pop di 12330 0000C98B 5E <1> pop si 12331 0000C98C F8 <1> clc 12332 0000C98D EB0F <1> jmp .after 12333 <1> 12334 <1> .not_cmdline: 12335 <1> 12336 <1> @@: 12337 0000C98F 31DB <1> xor bx, bx ; bx = handle (0 is STDIN) 12338 0000C991 E814DD <1> call InDos 12339 0000C994 7516 <1> jnz .ret_cy 12340 <1> 12341 <1> .file_handle: 12342 0000C996 B43F <1> mov ah, 3Fh ; read from file 12343 0000C998 E87903 <1> call yy_remember_seek 12344 <1> doscall 2040 0000C99B E8CB93 <2> call _doscall 12345 <1> .after: 12346 0000C99E 720C <1> jc .ret_cy ; if error --> 12347 0000C9A0 85C0 <1> test ax, ax 12348 0000C9A2 7408 <1> jz .ret_cy ; if EOF --> 12349 0000C9A4 01C2 <1> add dx, ax ; -> behind last valid byte 12350 <1> 12351 0000C9A6 8026[A500]FB <1> clropt [internalflags3], dif3_at_line_end 12352 <1> 12353 0000C9AB A8 <1> db __TEST_IMM8 ; (NC) 12354 <1> .ret_cy: 12355 0000C9AC F9 <1> stc 12356 0000C9AD 8916[EE0A] <1> mov word [bufend], dx ; -> behind last valid byte 12357 0000C9B1 5A <1> pop dx 12358 0000C9B2 59 <1> pop cx 12359 0000C9B3 5B <1> pop bx 12360 0000C9B4 58 <1> pop ax 12361 0000C9B5 C3 <1> retn 12362 <1> 12363 <1> 12364 <1> %ifn _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 12365 <1> yy equ error 12366 <1> %else 12367 <1> yy: 12368 0000C9B6 E8423B <1> call guard_re 12369 <1> %if _INPUT_FILE_BOOT 12370 0000C9B9 F606[9D00]40 <1> testopt [internalflags], nodosloaded 12371 0000C9BE 7403E93AB1 <1> jnz yy_boot 12372 <1> %endif 12373 <1> %ifn _INPUT_FILE_HANDLES 12374 <1> jmp error 12375 <1> %else 12376 0000C9C3 E8E2DC <1> call InDos 12377 0000C9C6 740B <1> jz @F 12378 0000C9C8 B80503 <1> mov ax, 0305h 12379 0000C9CB E855DB <1> call setrc 12380 0000C9CE BA[436D] <1> mov dx, msg.yy_no_dos 12381 0000C9D1 EB2F <1> jmp .disp_error_1 12382 <1> 12383 <1> @@: 12384 <1> ; If input_file_handles.to_close is set, 12385 <1> ; close all left over open files. (This 12386 <1> ; may only be done when DOS is available.) 12387 0000C9D3 31DB <1> xor bx, bx ; if none left open, -> first structure 12388 0000C9D5 F606[A200]10 <1> testopt [internalflags2], dif2_input_file 12389 0000C9DA 740B <1> jz @F 12390 0000C9DC 8B1E[800A] <1> mov bx, word [input_file_handles.active] 12391 0000C9E0 43 <1> inc bx ; point to first unused structure 12392 0000C9E1 D1E3 <1> shl bx, 1 12393 0000C9E3 D1E3 <1> shl bx, 1 12394 0000C9E5 D1E3 <1> shl bx, 1 ; to qword array index 12395 <1> %if INPUTFILEHANDLE_size != 8 12396 <1> %error Unexpected structure size 12397 <1> %endif 12398 <1> @@: 12399 0000C9E7 89DF <1> mov di, bx ; + input_file_handles -> to close 12400 0000C9E9 31C0 <1> xor ax, ax ; zero base amount to close 12401 0000C9EB E8DAF5 <1> call yy_close_file_handles 12402 <1> ; CHG: ax, bx, di 12403 <1> ; if we remembered to close any, do it now 12404 <1> 12405 0000C9EE 4E <1> dec si 12406 0000C9EF 89F3 <1> mov bx, si ; -> start of name 12407 0000C9F1 89F7 <1> mov di, si ; -> start of name 12408 0000C9F3 AC <1> lodsb ; load character 12409 0000C9F4 E8F7EE <1> call iseol? 12410 0000C9F7 7515 <1> jne @F 12411 0000C9F9 BA[856C] <1> mov dx, msg.yy_requires_filename 12412 0000C9FC B80403 <1> mov ax, 0304h 12413 0000C9FF E821DB <1> call setrc 12414 <1> .disp_error_1: 12415 0000CA02 B8FF03 <1> mov ax, 03FFh 12416 0000CA05 E81BDB <1> call setrc 12417 0000CA08 E893F3 <1> call putsz_error 12418 0000CA0B E9F235 <1> jmp cmd3 12419 <1> 12420 <1> @@: 12421 <1> .unquoted_loop: 12422 0000CA0E 3C20 <1> cmp al, 32 ; blank or EOL outside quoted part ? 12423 0000CA10 7434 <1> je .blank 12424 0000CA12 3C09 <1> cmp al, 9 12425 0000CA14 7430 <1> je .blank 12426 0000CA16 E8D5EE <1> call iseol? ; (includes semicolon in lDebug) 12427 0000CA19 742B <1> je .blank ; yes --> 12428 0000CA1B 3C22 <1> cmp al, '"' ; starting quote mark ? 12429 0000CA1D 740E <1> je .quoted ; yes --> 12430 0000CA1F AA <1> stosb ; store character 12431 <1> .unquote: 12432 0000CA20 AC <1> lodsb ; load character 12433 0000CA21 EBEB <1> jmp .unquoted_loop ; continue in not-quoted loop --> 12434 <1> 12435 <1> .quoted_loop: 12436 0000CA23 E8CCEE <1> call iseol?.notsemicolon; EOL inside quoted part ? 12437 0000CA26 7413 <1> je .quoted_eol ; if yes, error --> 12438 0000CA28 3C22 <1> cmp al, '"' ; ending quote mark ? 12439 0000CA2A 74F4 <1> je .unquote ; yes --> 12440 0000CA2C AA <1> stosb ; store character 12441 <1> .quoted: 12442 0000CA2D AC <1> lodsb ; load character 12443 0000CA2E EBF3 <1> jmp .quoted_loop ; continue in quoted loop --> 12444 <1> 12445 <1> .empty: 12446 0000CA30 B80603 <1> mov ax, 0306h 12447 0000CA33 E8EDDA <1> call setrc 12448 0000CA36 BA[A66C] <1> mov dx, msg.yy_filename_empty 12449 0000CA39 EBC7 <1> jmp .disp_error_1 12450 <1> 12451 <1> .quoted_eol: 12452 0000CA3B B80703 <1> mov ax, 0307h 12453 0000CA3E E8E2DA <1> call setrc 12454 0000CA41 BA[6D6D] <1> mov dx, msg.yy_filename_missing_unquote 12455 0000CA44 EBBC <1> jmp .disp_error_1 12456 <1> 12457 <1> .blank: 12458 <1> ; mov byte [si - 1], 0 ; terminate (shouldn't be needed) 12459 <1> 12460 0000CA46 B000 <1> mov al, 0 12461 0000CA48 8605 <1> xchg al, byte [di] ; terminate after filename 12462 0000CA4A 893E[0E0C] <1> mov word [terminator_in_line_in.offset], di 12463 0000CA4E A2[100C] <1> mov byte [terminator_in_line_in.value], al 12464 0000CA51 39FB <1> cmp bx, di ; empty ? 12465 0000CA53 74DB <1> je .empty ; yes --> 12466 <1> ; done 12467 <1> 12468 0000CA55 F606[A200]10 <1> testopt [internalflags2], dif2_input_file 12469 0000CA5A 7412 <1> jz @F 12470 <1> ; IFH = 1 12471 <1> ; IFH - 1 = 0 12472 <1> ; cmp active, 0 12473 <1> ; active >= 0 --> error 12474 <1> 12475 <1> ; IFH = 2 12476 <1> ; IFH - 1 = 1 12477 <1> ; cmp active, 1 12478 <1> ; active >= 1 --> error 12479 0000CA5C 833E[800A]0F <1> cmp word [input_file_handles.active], _INPUT_FILE_HANDLES - 1 12480 0000CA61 720B <1> jb @F 12481 <1> 12482 0000CA63 B80803 <1> mov ax, 0308h 12483 0000CA66 E8BADA <1> call setrc 12484 0000CA69 BA[C56C] <1> mov dx, msg.yy_too_many_handles 12485 0000CA6C EB94 <1> jmp .disp_error_1 12486 <1> @@: 12487 <1> 12488 0000CA6E 803F3A <1> cmp byte [bx], ':' 12489 0000CA71 7552 <1> jne .not_yy_goto_subfunction 12490 <1> 12491 0000CA73 F606[A200]10 <1> testopt [internalflags2], dif2_input_file 12492 0000CA78 750C <1> jnz @F 12493 <1> 12494 0000CA7A E870F9 <1> call getline_is_input_file? 12495 0000CA7D 723A <1> jc .no_file 12496 0000CA7F F606[A500]01 <1> testopt [internalflags3], dif3_input_cmdline 12497 0000CA84 7533 <1> jnz .no_file 12498 <1> @@: 12499 0000CA86 43 <1> inc bx 12500 0000CA87 89DD <1> mov bp, bx 12501 <1> 12502 0000CA89 E87001 <1> call yy_reset_buf 12503 <1> 12504 0000CA8C 31DB <1> xor bx, bx ; bx = handle (0 is STDIN) 12505 <1> %if _INPUT_FILE_HANDLES 12506 0000CA8E F606[A200]10 <1> testopt [internalflags2], dif2_input_file 12507 0000CA93 7405 <1> jz @F ; if not input file --> 12508 0000CA95 57 <1> push di 12509 0000CA96 E84DF5 <1> call yy_get_handle ; bx = handle 12510 0000CA99 5F <1> pop di 12511 <1> @@: 12512 <1> %endif 12513 0000CA9A B445 <1> mov ah, 45h 12514 <1> doscall ; duplicate file handle 2040 0000CA9C E8CA92 <2> call _doscall 12515 0000CA9F 7303E9DD00 <1> jc yy_open_file.error 12516 0000CAA4 93 <1> xchg ax, bx 12517 <1> 12518 0000CAA5 31C9 <1> xor cx, cx 12519 0000CAA7 31D2 <1> xor dx, dx 12520 0000CAA9 B80142 <1> mov ax, 4201h ; lseek, from current file position 12521 <1> doscall ; call DOS 2040 0000CAAC E8BA92 <2> call _doscall 12522 0000CAAF 91 <1> xchg ax, cx ; dx:cx = current seek 12523 0000CAB0 87D1 <1> xchg dx, cx ; cx:dx = current seek 12524 0000CAB2 BE0001 <1> mov si, ifhfIsDup 12525 0000CAB5 93 <1> xchg ax, bx 12526 0000CAB6 E9F200 <1> jmp yy_finish 12527 <1> 12528 <1> 12529 <1> .no_file: 12530 0000CAB9 B80903 <1> mov ax, 0309h 12531 0000CABC E864DA <1> call setrc 12532 0000CABF BA[0B6D] <1> mov dx, msg.yy_no_file 12533 0000CAC2 E93DFF <1> jmp .disp_error_1 12534 <1> 12535 <1> .not_yy_goto_subfunction: 12536 0000CAC5 31ED <1> xor bp, bp 12537 0000CAC7 E87AEE <1> call skipwh0 12538 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 12539 0000CACA 8936[060C] <1> mov word [if_exists_then_address], si 12540 <1> %endif 12541 0000CACE E80CEE <1> call iseol?_or_then 12542 0000CAD1 7425 <1> je .not_yy_goto 12543 <1> 12544 0000CAD3 3C3A <1> cmp al, ':' 12545 0000CAD5 7403E902DA <1> jne error 12546 <1> 12547 0000CADA E866EE <1> call skipwhite 12548 0000CADD 4E <1> dec si 12549 0000CADE 89F5 <1> mov bp, si 12550 <1> 12551 <1> @@: 12552 0000CAE0 AC <1> lodsb 12553 0000CAE1 3C20 <1> cmp al, 32 12554 0000CAE3 7409 <1> je @F 12555 0000CAE5 3C09 <1> cmp al, 9 12556 0000CAE7 7405 <1> je @F 12557 0000CAE9 E802EE <1> call iseol? 12558 0000CAEC 75F2 <1> jne @B 12559 <1> @@: 12560 0000CAEE E853EE <1> call skipwh0 12561 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 12562 0000CAF1 8936[060C] <1> mov word [if_exists_then_address], si 12563 <1> %endif 12564 0000CAF5 E801EE <1> call chkeol_or_then 12565 <1> 12566 <1> .not_yy_goto: 12567 0000CAF8 89DF <1> mov di, bx 12568 <1> 12569 <1> ; INP: ds:di -> filename 12570 <1> ; OUT: File opened, 12571 <1> ; bx = file handle 12572 <1> ; STT: ds = es = ss = debugger data selector/segment 12573 <1> yy_open_file: 12574 0000CAFA E89A00 <1> call .setup_opencreate ; ds:si -> pathname 12575 0000CAFD B86C71 <1> mov ax, 716Ch ; LFN open-create 12576 0000CB00 57 <1> push di 12577 0000CB01 31FF <1> xor di, di ; alias hint 12578 0000CB03 F9 <1> stc 12579 <1> doscall 2040 0000CB04 E86292 <2> call _doscall 12580 0000CB07 5F <1> pop di 12581 0000CB08 7203E99500 <1> jnc .got ; LFN call succeeded --> 12582 <1> 12583 <1> ; Early case for no-LFN-interface available. 12584 <1> ; cmp ax, 1 12585 <1> ; je .try_sfn 12586 0000CB0D 3D0071 <1> cmp ax, 7100h 12587 0000CB10 744D <1> je .try_sfn 12588 <1> 12589 <1> ; Only now, we check whether the used drive supports LFNs. 12590 <1> ; If it does, then we treat the error received as an 12591 <1> ; actual error and cancel here. If not, the SFN function 12592 <1> ; is called next as a fallback. 12593 <1> ; 12594 <1> ; We cannot rely on specific error returns like the 12595 <1> ; expected 7100h CY (or 7100h CF-unchanged) or the similar 12596 <1> ; 0001h CY (Invalid function) because no one agrees on what 12597 <1> ; error code to use. 12598 <1> ; 12599 <1> ; dosemu returns 0003h (Path not found) on FATFS and 12600 <1> ; redirected-non-dosemu drives. But may be changed so as to 12601 <1> ; return 0059h (Function not supported on network). 12602 <1> ; MSWindows 98SE returns 0002h (File not found) on 12603 <1> ; DOS-redirected drives. 12604 <1> ; DOSLFN with Fallback mode enabled supports the call (albeit 12605 <1> ; limited to SFNs). 12606 <1> ; 12607 <1> ; To suss out what the error means, check LFN availability. 12608 <1> ; 12609 <1> ; Refer to https://github.com/stsp/dosemu2/issues/770 12610 0000CB12 1E <1> push ds 12611 0000CB13 06 <1> push es 12612 0000CB14 57 <1> push di 12613 0000CB15 50 <1> push ax 12614 <1> lframe 12615 <1> lvar 34, fstype_buffer 12616 <1> lvar 4, pathname_buffer 12617 0000CB16 5589E58D66DA <1> lenter 12618 <1> 12619 0000CB1C AD <1> lodsw ; load first two bytes of pathname 12620 <1> 12621 0000CB1D 16 <1> push ss 12622 0000CB1E 1F <1> pop ds 12623 0000CB1F 89E2 <1> mov dx, sp ; ds:dx -> ?pathname_buffer 12624 0000CB21 16 <1> push ss 12625 0000CB22 07 <1> pop es 12626 0000CB23 89E7 <1> mov di, sp ; es:di -> ?pathname_buffer 12627 <1> 12628 0000CB25 80FC3A <1> cmp ah, ':' ; starts with drive specifier ? 12629 0000CB28 7409 <1> je @F ; yes --> 12630 <1> 12631 0000CB2A B419 <1> mov ah, 19h 12632 <1> doscall ; get current default drive 2040 0000CB2C E83A92 <2> call _doscall 12633 0000CB2F 0441 <1> add al, 'A' ; A: = 0, convert to drive letter 12634 0000CB31 B43A <1> mov ah, ':' ; drive specifier 12635 <1> @@: 12636 0000CB33 AB <1> stosw 12637 0000CB34 B85C00 <1> mov ax, '\' ; backslash and zero terminator 12638 0000CB37 AB <1> stosw ; es:di -> ?fstype_buffer 12639 <1> 12640 0000CB38 31C0 <1> xor ax, ax 12641 0000CB3A B91100 <1> mov cx, 34 >> 1 12642 0000CB3D 57 <1> push di 12643 0000CB3E F3AB <1> rep stosw ; initialise ?fstype_buffer to all zeros 12644 0000CB40 5F <1> pop di ; -> ?fstype_buffer 12645 <1> 12646 0000CB41 B92000 <1> mov cx, 32 ; size of ?fstype_buffer 12647 0000CB44 31DB <1> xor bx, bx ; harden, initialise this 12648 0000CB46 B8A071 <1> mov ax, 71A0h ; get volume information 12649 0000CB49 F9 <1> stc 12650 <1> doscall ; (depends on ds = es = ss) 2040 0000CB4A E81C92 <2> call _doscall 12651 <1> 12652 0000CB4D 7207 <1> jc @F ; if call not supported --> 12653 <1> ; bx = FS flags 12654 0000CB4F F6C740 <1> test bh, 0100_0000b ; LFN interface available ? 12655 0000CB52 F9 <1> stc ; if no 12656 0000CB53 7401 <1> jz @F ; no --> 12657 <1> 12658 0000CB55 F8 <1> clc ; is available 12659 <1> @@: 12660 <1> 12661 0000CB56 89EC5D <1> lleave 12662 0000CB59 58 <1> pop ax ; (restore error code) 12663 0000CB5A 5F <1> pop di 12664 0000CB5B 07 <1> pop es 12665 0000CB5C 1F <1> pop ds 12666 0000CB5D 7322 <1> jnc .error ; if LFN interface is available, actual error 12667 <1> ; if LFN interface is not available, try SFN 12668 <1> 12669 <1> .try_sfn: 12670 0000CB5F E83500 <1> call .setup_opencreate 12671 0000CB62 B8006C <1> mov ax, 6C00h ; Open-create 12672 0000CB65 F9 <1> stc 12673 <1> doscall 2040 0000CB66 E80092 <2> call _doscall 12674 0000CB69 7337 <1> jnc .got 12675 <1> 12676 0000CB6B 83F801 <1> cmp ax, 1 12677 0000CB6E 7405 <1> je .try_old_open 12678 0000CB70 3D006C <1> cmp ax, 6C00h 12679 0000CB73 750C <1> jne .error 12680 <1> 12681 <1> .try_old_open: 12682 0000CB75 88D8 <1> mov al, bl ; access and sharing modes 12683 0000CB77 B43D <1> mov ah, 3Dh ; Open 12684 0000CB79 89F2 <1> mov dx, si ; -> filename 12685 0000CB7B F9 <1> stc 12686 <1> doscall 2040 0000CB7C E8EA91 <2> call _doscall 12687 0000CB7F 7321 <1> jnc .got 12688 <1> 12689 <1> .error: 12690 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 12691 0000CB81 F606[A700]08 <1> testopt [internalflags3], dif3_in_if 12692 0000CB86 7403E9F4C4 <1> jnz if_exists_not_found 12693 <1> %endif 12694 0000CB8B B80A03 <1> mov ax, 030Ah 12695 0000CB8E E892D9 <1> call setrc 12696 0000CB91 BA[EA6C] <1> mov dx, msg.yy_error_file_open 12697 0000CB94 E96BFE <1> jmp yy.disp_error_1 12698 <1> 12699 <1> .setup_opencreate: 12700 0000CB97 89FE <1> mov si, di ; -> filename 12701 0000CB99 BB2060 <1> mov bx, 0110_0000_0010_0000b ; Auto-commit, no int 24h 12702 <1> ; DENY WRITE, Read-only 12703 0000CB9C 31C9 <1> xor cx, cx ; create attribute 12704 0000CB9E BA0100 <1> mov dx, 0000_0000_0000_0001b ; no create / open, no truncate 12705 0000CBA1 C3 <1> retn 12706 <1> 12707 <1> .got: 12708 <1> ; ax = file handle 12709 0000CBA2 E85700 <1> call yy_reset_buf 12710 <1> 12711 0000CBA5 31C9 <1> xor cx, cx 12712 0000CBA7 31D2 <1> xor dx, dx 12713 0000CBA9 31F6 <1> xor si, si 12714 <1> yy_finish: 12715 0000CBAB F606[A200]10 <1> testopt [internalflags2], dif2_input_file 12716 0000CBB0 7509 <1> jnz @F 12717 0000CBB2 800E[A200]10 <1> setopt [internalflags2], dif2_input_file 12718 0000CBB7 31DB <1> xor bx, bx 12719 0000CBB9 EB18 <1> jmp @FF 12720 <1> 12721 <1> @@: 12722 0000CBBB FF06[800A] <1> inc word [input_file_handles.active] 12723 0000CBBF 8B1E[800A] <1> mov bx, word [input_file_handles.active] 12724 0000CBC3 D1E3 <1> shl bx, 1 12725 0000CBC5 D1E3 <1> shl bx, 1 12726 0000CBC7 D1E3 <1> shl bx, 1 ; to qword array index 12727 <1> %if INPUTFILEHANDLE_size != 8 12728 <1> %error Unexpected structure size 12729 <1> %endif 12730 0000CBC9 8BBF[FA09] <1> mov di, word [input_file_handles + bx - INPUTFILEHANDLE_size + ifhFlags] 12731 0000CBCD 81E700F0 <1> and di, ifhfTestReserved1 | ifhfTestReserved2 | ifhfQuietInput | ifhfQuietOutput 12733 0000CBD1 09FE <1> or si, di 12734 <1> @@: 12735 <1> 12736 0000CBD3 8987[000A] <1> mov word [input_file_handles + bx + ifhHandle], ax 12737 0000CBD7 89B7[020A] <1> mov word [input_file_handles + bx + ifhFlags], si 12738 0000CBDB 8997[040A] <1> mov word [input_file_handles + bx + ifhParentSeek], dx 12739 0000CBDF 898F[060A] <1> mov word [input_file_handles + bx + ifhParentSeek + 2], cx 12740 <1> 12741 0000CBE3 8026[A700]EF <1> clropt [internalflags3], dif3_auxbuff_guarded_1 12742 0000CBE8 89EE <1> mov si, bp 12743 0000CBEA 85F6 <1> test si, si 12744 0000CBEC 7403E99901 <1> jnz cmd_goto.yy_entry 12745 <1> 12746 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 12747 0000CBF1 F606[A700]08 <1> testopt [internalflags3], dif3_in_if 12748 0000CBF6 7403E991C4 <1> jnz if_exists_found_open 12749 <1> %endif 12750 0000CBFB C3 <1> retn 12751 <1> %endif 12752 <1> %endif 12753 <1> 12754 <1> 12755 <1> ; INP: word [bufnext], word [bufend] 12756 <1> ; CHG: - 12757 <1> ; 12758 <1> ; Note: When reading from a file, we buffer some of the input 12759 <1> ; in line_in. When switching to a non-file, or starting 12760 <1> ; to read from another file, we have to reset the seek 12761 <1> ; position of the (prior) file to avoid losing the data. 12762 <1> ; This cropped up during yy development, but actually 12763 <1> ; affects serial and InDOS input, too. Therefore, 12764 <1> ; this function is not below the conditional for yy. 12765 <1> yy_reset_buf: 12766 0000CBFC 51 <1> push cx 12767 <1> %if _NEWFULLHANDLING 12768 0000CBFD B9[0300] <1> mov cx, line_in + 3 12769 <1> %else 12770 <1> mov cx, line_in + 2 12771 <1> %endif 12772 0000CC00 870E[EC0A] <1> xchg cx, word [bufnext] 12773 0000CC04 F7D9 <1> neg cx 12774 0000CC06 030E[EE0A] <1> add cx, word [bufend] ; cx = how much remaining in buffer 12775 <1> %if _NEWFULLHANDLING 12776 0000CC0A C706[EE0A][0300] <1> mov word [bufend], line_in + 3 12777 <1> %else 12778 <1> mov word [bufend], line_in + 2 12779 <1> %endif 12780 <1> 12781 0000CC10 F606[A200]40 <1> testopt [internalflags2], dif2_did_getline_file 12782 0000CC15 7469 <1> jz .not_used 12783 <1> 12784 0000CC17 50 <1> push ax 12785 0000CC18 52 <1> push dx 12786 0000CC19 53 <1> push bx 12787 0000CC1A 89CA <1> mov dx, cx 12788 0000CC1C 31C9 <1> xor cx, cx 12789 0000CC1E F7DA <1> neg dx ; dx = minus how much remaining 12790 0000CC20 7456 <1> jz .done ; if zero, do not seek at all --> 12791 0000CC22 49 <1> dec cx ; sign extension into cx:dx 12792 <1> 12793 0000CC23 F606[A700]01 <1> testopt [internalflags3], dif3_input_re 12794 0000CC28 7406 <1> jz @F 12795 0000CC2A 0116[E409] <1> add word [re_buffer.position], dx 12796 0000CC2E EB48 <1> jmp .done 12797 <1> @@: 12798 <1> 12799 <1> %if _INPUT_FILE_BOOT 12800 0000CC30 F606[A300]02 <1> testopt [internalflags2], dif2_input_file_boot 12801 0000CC35 741E <1> jz @F 12802 0000CC37 F606[A700]30 <1> testopt [internalflags3], dif3_auxbuff_guarded_1 | dif3_auxbuff_guarded_2 12803 0000CC3C 7412 <1> jz .do_boot_seek 12804 <1> 12805 0000CC3E FF36[B08F] <1> push word [load_input_file.active] 12806 0000CC42 8F06[900A] <1> pop word [boot_remember_seek_handle] 12807 0000CC46 890E[8E0A] <1> mov word [boot_remember_seek_offset + 2], cx 12808 0000CC4A 8916[8C0A] <1> mov word [boot_remember_seek_offset], dx 12809 0000CC4E EB28 <1> jmp .done 12810 <1> 12811 <1> .do_boot_seek: 12812 0000CC50 E89DB3 <1> call yy_boot_seek_current 12813 0000CC53 EB23 <1> jmp .done 12814 <1> @@: 12815 <1> %endif 12816 <1> 12817 <1> %if _INPUT_FILE_HANDLES 12818 0000CC55 F606[A200]10 <1> testopt [internalflags2], dif2_input_file 12819 0000CC5A 7407 <1> jz @F ; if not input file --> 12820 0000CC5C 57 <1> push di 12821 0000CC5D E886F3 <1> call yy_get_handle ; bx = handle 12822 0000CC60 5F <1> pop di 12823 0000CC61 EB0F <1> jmp .filehandle 12824 <1> @@: 12825 <1> %endif 12826 <1> 12827 0000CC63 F606[A500]01 <1> testopt [internalflags3], dif3_input_cmdline 12828 0000CC68 7406 <1> jz @F 12829 0000CC6A 0116[E001] <1> add word [cmdline_buffer.position], dx 12830 0000CC6E EB08 <1> jmp .done 12831 <1> @@: 12832 <1> 12833 0000CC70 31DB <1> xor bx, bx ; bx = handle (0 is STDIN) 12834 <1> .filehandle: 12835 0000CC72 B80142 <1> mov ax, 4201h ; lseek, from current file position 12836 0000CC75 E80A00 <1> call handle_seek_or_remember 12837 <1> 12838 <1> .done: 12839 0000CC78 5B <1> pop bx 12840 0000CC79 5A <1> pop dx 12841 0000CC7A 58 <1> pop ax 12842 <1> 12843 0000CC7B 8026[A200]BF <1> clropt [internalflags2], dif2_did_getline_file 12844 <1> 12845 <1> .not_used: 12846 0000CC80 59 <1> pop cx 12847 0000CC81 C3 <1> retn 12848 <1> 12849 <1> 12850 <1> handle_seek_or_remember: 12851 0000CC82 E823DA <1> call InDos 12852 0000CC85 7411 <1> jz @F 12853 <1> 12854 0000CC87 A3[840A] <1> mov word [indos_remember_seek_function], ax 12855 0000CC8A 891E[860A] <1> mov word [indos_remember_seek_handle], bx 12856 0000CC8E 890E[8A0A] <1> mov word [indos_remember_seek_offset + 2], cx 12857 0000CC92 8916[880A] <1> mov word [indos_remember_seek_offset], dx 12858 0000CC96 EB03 <1> jmp .done 12859 <1> 12860 <1> @@: 12861 <1> doscall ; call DOS 2040 0000CC98 E8CE90 <2> call _doscall 12862 <1> .done: 12863 0000CC9B C3 <1> retn 12864 <1> 12865 <1> 12866 <1> yy_reset_buf_and_seek_start: 12867 0000CC9C 51 <1> push cx 12868 0000CC9D 50 <1> push ax 12869 0000CC9E 52 <1> push dx 12870 0000CC9F 53 <1> push bx 12871 <1> %if _NEWFULLHANDLING 12872 0000CCA0 B8[0300] <1> mov ax, line_in + 3 12873 <1> %else 12874 <1> mov ax, line_in + 2 12875 <1> %endif 12876 0000CCA3 A3[EC0A] <1> mov word [bufnext], ax 12877 0000CCA6 A3[EE0A] <1> mov word [bufend], ax 12878 <1> 12879 0000CCA9 31D2 <1> xor dx, dx 12880 0000CCAB 31C9 <1> xor cx, cx 12881 <1> 12882 0000CCAD F606[A700]01 <1> testopt [internalflags3], dif3_input_re 12883 0000CCB2 7408 <1> jz @F 12884 0000CCB4 C706[E409][E401] <1> mov word [re_buffer.position], re_buffer 12885 0000CCBA EB37 <1> jmp .done 12886 <1> @@: 12887 <1> 12888 <1> %if _INPUT_FILE_BOOT 12889 0000CCBC F606[A300]02 <1> testopt [internalflags2], dif2_input_file_boot 12890 0000CCC1 7408 <1> jz @F 12891 0000CCC3 E86A00 <1> call yy_boot_clear_remember_seek 12892 0000CCC6 E871B5 <1> call yy_boot_seek_start 12893 0000CCC9 EB28 <1> jmp .done 12894 <1> @@: 12895 <1> %endif 12896 <1> 12897 <1> %if _INPUT_FILE_HANDLES 12898 0000CCCB F606[A200]10 <1> testopt [internalflags2], dif2_input_file 12899 0000CCD0 7407 <1> jz @F ; if not input file --> 12900 0000CCD2 57 <1> push di 12901 0000CCD3 E810F3 <1> call yy_get_handle ; bx = handle 12902 0000CCD6 5F <1> pop di 12903 0000CCD7 EB11 <1> jmp .filehandle 12904 <1> @@: 12905 <1> %endif 12906 <1> 12907 0000CCD9 F606[A500]01 <1> testopt [internalflags3], dif3_input_cmdline 12908 0000CCDE 7408 <1> jz @F 12909 0000CCE0 C706[E001][E000] <1> mov word [cmdline_buffer.position], cmdline_buffer 12910 0000CCE6 EB0B <1> jmp .done 12911 <1> @@: 12912 <1> 12913 0000CCE8 31DB <1> xor bx, bx ; bx = handle (0 is STDIN) 12914 <1> 12915 <1> .filehandle: 12916 0000CCEA E80B00 <1> call yy_clear_remember_seek 12917 0000CCED B80042 <1> mov ax, 4200h ; seek from start 12918 0000CCF0 E88FFF <1> call handle_seek_or_remember 12919 <1> .done: 12920 0000CCF3 5B <1> pop bx 12921 0000CCF4 5A <1> pop dx 12922 0000CCF5 58 <1> pop ax 12923 0000CCF6 59 <1> pop cx 12924 0000CCF7 C3 <1> retn 12925 <1> 12926 <1> 12927 <1> yy_clear_remember_seek: 12928 0000CCF8 391E[860A] <1> cmp word [indos_remember_seek_handle], bx 12929 0000CCFC 7515 <1> jne .ret 12930 <1> .clear: 12931 0000CCFE C706[840A]0142 <1> mov word [indos_remember_seek_function], 4201h 12932 0000CD04 830E[860A]FF <1> or word [indos_remember_seek_handle], -1 12933 0000CD09 8326[8A0A]00 <1> and word [indos_remember_seek_offset + 2], 0 12934 0000CD0E 8326[880A]00 <1> and word [indos_remember_seek_offset], 0 12935 <1> .ret: 12936 0000CD13 C3 <1> retn 12937 <1> 12938 <1> 12939 <1> yy_remember_seek: 12940 0000CD14 391E[860A] <1> cmp word [indos_remember_seek_handle], bx 12941 0000CD18 75F9 <1> jne yy_clear_remember_seek.ret 12942 <1> 12943 0000CD1A 50 <1> push ax 12944 0000CD1B 51 <1> push cx 12945 0000CD1C 52 <1> push dx 12946 0000CD1D 8B0E[8A0A] <1> mov cx, word [indos_remember_seek_offset + 2] 12947 0000CD21 8B16[880A] <1> mov dx, word [indos_remember_seek_offset] 12948 0000CD25 A1[840A] <1> mov ax, word [indos_remember_seek_function] 12949 <1> doscall ; call DOS 2040 0000CD28 E83E90 <2> call _doscall 12950 0000CD2B 5A <1> pop dx 12951 0000CD2C 59 <1> pop cx 12952 0000CD2D 58 <1> pop ax 12953 0000CD2E EBCE <1> jmp yy_clear_remember_seek.clear 12954 <1> 12955 <1> 12956 <1> %if _INPUT_FILE_BOOT 12957 <1> yy_boot_clear_remember_seek: 12958 0000CD30 50 <1> push ax 12959 0000CD31 A1[B08F] <1> mov ax, word [load_input_file.active] 12960 0000CD34 3906[900A] <1> cmp word [boot_remember_seek_handle], ax 12961 0000CD38 750F <1> jne .ret_pop_ax 12962 <1> .clear: 12963 0000CD3A 830E[900A]FF <1> or word [boot_remember_seek_handle], -1 12964 0000CD3F 8326[8E0A]00 <1> and word [boot_remember_seek_offset + 2], 0 12965 0000CD44 8326[8C0A]00 <1> and word [boot_remember_seek_offset], 0 12966 <1> .ret_pop_ax: 12967 0000CD49 58 <1> pop ax 12968 0000CD4A C3 <1> retn 12969 <1> 12970 <1> 12971 <1> yy_boot_remember_seek: 12972 0000CD4B 50 <1> push ax 12973 0000CD4C A1[B08F] <1> mov ax, word [load_input_file.active] 12974 0000CD4F 3906[900A] <1> cmp word [boot_remember_seek_handle], ax 12975 0000CD53 75F4 <1> jne yy_boot_clear_remember_seek.ret_pop_ax 12976 <1> 12977 0000CD55 53 <1> push bx 12978 0000CD56 51 <1> push cx 12979 0000CD57 52 <1> push dx 12980 0000CD58 8B0E[8E0A] <1> mov cx, word [boot_remember_seek_offset + 2] 12981 0000CD5C 8B16[8C0A] <1> mov dx, word [boot_remember_seek_offset] 12982 0000CD60 E88DB2 <1> call yy_boot_seek_current 12983 0000CD63 5A <1> pop dx 12984 0000CD64 59 <1> pop cx 12985 0000CD65 5B <1> pop bx 12986 0000CD66 EBD2 <1> jmp yy_boot_clear_remember_seek.clear 12987 <1> %endif 12988 <1> 12989 <1> 12990 <1> cmd_goto: 12991 0000CD68 E8D8EB <1> call skipwhite 12992 0000CD6B 3C3A <1> cmp al, ':' 12993 0000CD6D 7503 <1> jne @F 12994 0000CD6F E8D1EB <1> call skipwhite 12995 <1> @@: 12996 <1> 12997 0000CD72 E878F6 <1> call getline_is_input_file? 12998 0000CD75 7312 <1> jnc @F 12999 0000CD77 BA[8A65] <1> mov dx, msg.goto_not_file 13000 0000CD7A B80003 <1> mov ax, 0300h 13001 0000CD7D E8A3D7 <1> call setrc 13002 <1> .error: 13003 0000CD80 B8FF03 <1> mov ax, 03FFh 13004 0000CD83 E89DD7 <1> call setrc 13005 0000CD86 E915F0 <1> jmp putsz_error 13006 <1> 13007 <1> @@: 13008 0000CD89 4E <1> dec si 13009 <1> .yy_entry: ; si -> destination label 13010 0000CD8A BA[8265] <1> mov dx, msg.sof 13011 0000CD8D E8FFEA <1> call isstring? 13012 0000CD90 751B <1> jne @F 13013 0000CD92 E8AEEB <1> call skipwhite 13014 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 13015 0000CD95 8936[060C] <1> mov word [if_exists_then_address], si 13016 <1> %endif 13017 0000CD99 E85DEB <1> call chkeol_or_then 13018 0000CD9C E8D700 <1> call resetrc 13019 0000CD9F E8FAFE <1> call yy_reset_buf_and_seek_start 13020 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 13021 0000CDA2 F606[A700]08 <1> testopt [internalflags3], dif3_in_if 13022 0000CDA7 7403E9E0C2 <1> jnz if_exists_found_open 13023 <1> %endif 13024 0000CDAC C3 <1> retn 13025 <1> 13026 <1> @@: 13027 0000CDAD BA[8665] <1> mov dx, msg.eof 13028 0000CDB0 E8DCEA <1> call isstring? 13029 0000CDB3 751B <1> jne @F 13030 0000CDB5 E88BEB <1> call skipwhite 13031 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 13032 0000CDB8 8936[060C] <1> mov word [if_exists_then_address], si 13033 <1> %endif 13034 0000CDBC E83AEB <1> call chkeol_or_then 13035 0000CDBF E8B400 <1> call resetrc 13036 0000CDC2 E861F6 <1> call getline_close_file 13037 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 13038 0000CDC5 F606[A700]08 <1> testopt [internalflags3], dif3_in_if 13039 0000CDCA 7403E9C2C2 <1> jnz if_exists_found_closed 13040 <1> %endif 13041 0000CDCF C3 <1> retn 13042 <1> 13043 <1> @@: 13044 0000CDD0 89F3 <1> mov bx, si 13045 0000CDD2 B9FFFF <1> mov cx, -1 13046 <1> .loop: 13047 0000CDD5 41 <1> inc cx 13048 0000CDD6 AC <1> lodsb 13049 0000CDD7 3C20 <1> cmp al, 32 13050 0000CDD9 7409 <1> je .end 13051 0000CDDB 3C09 <1> cmp al, 9 13052 0000CDDD 7405 <1> je .end 13053 0000CDDF E80CEB <1> call iseol? 13054 0000CDE2 75F1 <1> jne .loop 13055 <1> .end: 13056 0000CDE4 C644FF00 <1> mov byte [si - 1], 0 ; terminate 13057 0000CDE8 E859EB <1> call skipwh0 13058 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 13059 0000CDEB 8936[060C] <1> mov word [if_exists_then_address], si 13060 <1> %endif 13061 0000CDEF E807EB <1> call chkeol_or_then 13062 0000CDF2 E376 <1> jcxz .empty 13063 0000CDF4 41 <1> inc cx ; space for zero terminator 13064 0000CDF5 41 <1> inc cx ; round up 13065 0000CDF6 80E1FE <1> and cl, ~1 ; align to word 13066 0000CDF9 89E5 <1> mov bp, sp 13067 0000CDFB 29CC <1> sub sp, cx ; allocate stack space 13068 0000CDFD 89DE <1> mov si, bx ; -> label in line_in 13069 0000CDFF 89E7 <1> mov di, sp ; -> buffer on stack 13070 0000CE01 57 <1> push di 13071 <1> @@: 13072 0000CE02 AC <1> lodsb 13073 0000CE03 E80DBE <1> call uppercase ; normalise the name in buffer 13074 0000CE06 AA <1> stosb 13075 0000CE07 E2F9 <1> loop @B ; copy all or all+1 13076 <1> 13077 0000CE09 E890FE <1> call yy_reset_buf_and_seek_start 13078 <1> 13079 <1> .next_line: 13080 0000CE0C 800E[A500]88 <1> setopt [internalflags3], dif3_quiet_input_single | dif3_return_eof 13081 0000CE11 31C9 <1> xor cx, cx 13082 0000CE13 E84FF3 <1> call getline.use_dif3_flags 13083 0000CE16 7228 <1> jc .notfound 13084 0000CE18 89F3 <1> mov bx, si 13085 0000CE1A 3C3A <1> cmp al, ':' 13086 0000CE1C 75EE <1> jne .next_line 13087 0000CE1E E822EB <1> call skipwhite 13088 0000CE21 5A <1> pop dx 13089 0000CE22 52 <1> push dx 13090 0000CE23 4E <1> dec si 13091 0000CE24 E868EA <1> call isstring? 13092 0000CE27 75E3 <1> jne .next_line 13093 0000CE29 8D77FF <1> lea si, [bx - 1] 13094 0000CE2C AC <1> lodsb 13095 0000CE2D 89EC <1> mov sp, bp 13096 0000CE2F E84400 <1> call resetrc 13097 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 13098 0000CE32 F606[A700]08 <1> testopt [internalflags3], dif3_in_if 13099 0000CE37 7403E950C2 <1> jnz if_exists_found_open 13100 <1> %endif 13101 0000CE3C 5A <1> pop dx ; return address to cmd3 13102 0000CE3D E90135 <1> jmp cmd3_notblank 13103 <1> 13104 <1> .notfound: 13105 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 13106 0000CE40 F606[A700]08 <1> testopt [internalflags3], dif3_in_if 13107 0000CE45 751B <1> jnz @F 13108 <1> %endif 13109 0000CE47 B80103 <1> mov ax, 0301h 13110 0000CE4A E8D6D6 <1> call setrc 13111 0000CE4D BA[F265] <1> mov dx, msg.goto_not_found.1 13112 0000CE50 E84BEF <1> call putsz_error 13113 0000CE53 5A <1> pop dx 13114 0000CE54 E847EF <1> call putsz_error 13115 0000CE57 BA[1266] <1> mov dx, msg.goto_not_found.2 13116 0000CE5A E841EF <1> call putsz_error 13117 0000CE5D 89EC <1> mov sp, bp 13118 0000CE5F E9C4F5 <1> jmp getline_close_file 13119 <1> 13120 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 13121 <1> @@: 13122 0000CE62 89EC <1> mov sp, bp 13123 0000CE64 E8BFF5 <1> call getline_close_file 13124 0000CE67 E915C2 <1> jmp if_exists_not_found 13125 <1> %endif 13126 <1> 13127 <1> .empty: 13128 0000CE6A B80203 <1> mov ax, 0302h 13129 0000CE6D E8B3D6 <1> call setrc 13130 0000CE70 BA[C965] <1> mov dx, msg.goto_empty 13131 0000CE73 E90AFF <1> jmp .error 13132 <1> 13133 <1> 13134 <1> resetrc: 13135 0000CE76 FF36[F20A] <1> push word [priorrc] 13136 0000CE7A 8F06[F00A] <1> pop word [rc] 13137 0000CE7E C3 <1> retn 13138 <1> 13139 <1> 13140 <1> %include "serialp.asm" 13141 <2> 13142 <2> %if 0 13143 <2> 13144 <2> Serial port handling code 13145 <2> 13146 <2> 2019 by C. Masloch 13147 <2> based on http://www.sci.muni.cz/docs/pc/serport.txt The Serial Port rel. 14 13148 <2> 13149 <2> Usage of the works is permitted provided that this 13150 <2> instrument is retained with the works, so that any entity 13151 <2> that uses the works is notified of this instrument. 13152 <2> 13153 <2> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 13154 <2> 13155 <2> %endif 13156 <2> 13157 <2> 13158 <2> usesection lDEBUG_DATA_ENTRY 13159 <2> 13160 000095D6 CB <2> iisphwreset serial_interrupt_handler 13161 <2> 13162 000095D7 00 <2> align 2, db 0 13163 000095D8 EB10000000004B4280- <2> iispentry serial_interrupt_handler, 80h, serial_interrupt_handler 13163 000095E1 EBF300 <2> 13164 000095EA 2EF606[EB0B]01 <2> testopt [cs:serial_flags], sf_init_done 13165 000095F0 7505 <2> jnz @F 13166 000095F2 2EFF2E[DA95] <2> jmp far [cs:.next] 13167 <2> @@: 13168 000095F7 50 <2> push ax 13169 000095F8 51 <2> push cx 13170 000095F9 52 <2> push dx ; first save the regs we need to change 13171 000095FA 1E <2> push ds 13172 000095FB 56 <2> push si 13173 <2> 13174 000095FC 0E <2> push cs 13175 000095FD 1F <2> pop ds 13176 000095FE B020 <2> mov al, 20h ; acknowledge interrupt 13177 00009600 803E[2B09]00 <2> cmp byte [serial_use_irqmask + 1], 0 13178 00009605 7402 <2> je @F 13179 00009607 E6A0 <2> out 0A0h, al ; to secondary PIC 13180 <2> @@: 13181 00009609 E620 <2> out 20h, al ; to primary PIC 13182 0000960B FC <2> cld 13183 <2> ih_continue: 13184 0000960C 8B16[2609] <2> mov dx, [baseport] 13185 00009610 42 <2> inc dx 13186 00009611 42 <2> inc dx ; (base + 2) write FCR, read IIR 13187 <2> %if _USE_TX_FIFO 13188 00009612 A0[2109] <2> mov al, byte [serial_fcr_setting] 13189 00009615 24F9 <2> and al, ~ 0000_0110b 13190 00009617 EE <2> out dx, al ; (write FCR) configure FIFOs 13191 00009618 31C0 <2> xor ax, ax 13192 <2> %else 13193 <2> xor ax, ax 13194 <2> out dx, al ; (write FCR) configure FIFOs 13195 <2> nop 13196 <2> %endif 13197 0000961A EC <2> in al, dx ; (read IIR) get interrupt cause 13198 0000961B A801 <2> test al, 1 ; did the UART generate the int? 13199 0000961D 750C <2> jnz ih_sep ; no, then it's somebody else's problem 13200 0000961F 2406 <2> and al, 6 ; mask bits not needed 13201 00009621 89C6 <2> mov si, ax ; make a pointer out of it 13202 00009623 4A <2> dec dx 13203 00009624 4A <2> dec dx ; = base 13204 00009625 FF94[3296] <2> call near word [serial_interrupt_table + si] ; serve this int 13205 00009629 EBE1 <2> jmp ih_continue ; and look for more things to be done 13206 <2> ih_sep: 13207 0000962B 5E <2> pop si 13208 0000962C 1F <2> pop ds 13209 0000962D 5A <2> pop dx ; restore regs 13210 0000962E 59 <2> pop cx 13211 0000962F 58 <2> pop ax 13212 00009630 CF <2> iret 13213 <2> 13214 00009631 00 <2> align 2, db 0 13215 00009632 [3A96][3F96][8796]- <2> serial_interrupt_table: dw int_modem,int_tx,int_rx,int_status 13215 00009638 [DA96] <2> 13216 <2> 13217 <2> 13218 <2> int_modem: 13219 <2> ; just clear modem status, we are not interested in it 13220 0000963A 83C206 <2> add dx, 6 13221 0000963D EC <2> in al, dx ; read MSR 13222 0000963E C3 <2> retn 13223 <2> 13224 <2> 13225 <2> int_tx: 13226 0000963F 8B16[2609] <2> mov dx, [baseport] 13227 00009643 8B36[3209] <2> mov si, word [txtail] 13228 <2> 13229 00009647 52 <2> push dx 13230 00009648 83C205 <2> add dx, 5 13231 0000964B EC <2> in al, dx ; (base + 5) read LSR 13232 0000964C 5A <2> pop dx 13233 0000964D A820 <2> test al, 20h ; Transmitter Holding Register Empty ? 13234 0000964F 7421 <2> jz itx_setup_int ; no, it was a spurious interrupt --> 13235 <2> ; This conditional detects the condition specified in 13236 <2> ; the section "Known problems with several chips": 13237 <2> ; When a 1 is written to the bit 1 (Tx int enab) in the 13238 <2> ; IER, a Tx interrupt is generated. This is an erroneous 13239 <2> ; interrupt if the THRE bit is not set. [So don't set 13240 <2> ; this bit as long as the THRE bit isn't set. CB] 13241 <2> 13242 <2> ; check if there's something to be sent 13243 <2> %if _USE_TX_FIFO 13244 00009651 B90100 <2> mov cx, 1 13245 00009654 F606[EB0B]08 <2> test byte [serial_flags], sf_built_in_fifo 13246 00009659 7404 <2> jz @F 13247 0000965B 8A0E[EA0B] <2> mov cl, byte [serial_fifo_size] 13248 <2> @@: 13249 <2> %endif 13250 <2> itx_more: 13251 0000965F 3B36[3009] <2> cmp si, word [txhead] 13252 00009663 7419 <2> je itx_nothing 13253 00009665 AC <2> lodsb 13254 00009666 EE <2> out dx, al ; write it to the THR 13255 <2> ; check for wrap-around in our fifo 13256 <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: 13257 <2> %if _USE_TX_FIFO 13258 <2> ; send as much bytes as the chip can take when available 13259 00009670 E2ED <2> loop itx_more 13260 <2> %endif 13261 <2> itx_setup_int: 13262 00009672 3B36[3009] <2> cmp si, word [txhead] 13263 00009676 7406 <2> je itx_nothing 13264 00009678 42 <2> inc dx 13265 00009679 B003 <2> mov al, 0000_0011b 13266 0000967B EE <2> out dx, al ; write to IER 13267 0000967C EB04 <2> jmp itx_dontstop 13268 <2> itx_nothing: 13269 <2> ; no more data in the fifo, so inhibit TX interrupts 13270 0000967E 42 <2> inc dx 13271 0000967F B001 <2> mov al, 0000_0001b 13272 00009681 EE <2> out dx, al ; write to IER 13273 <2> itx_dontstop: 13274 00009682 8936[3209] <2> mov word [txtail], si 13275 00009686 C3 <2> retn 13276 <2> 13277 <2> 13278 <2> int_rx: 13279 00009687 8B36[2C09] <2> mov si, word [rxhead] 13280 <2> irx_more: 13281 0000968B 8B16[2609] <2> mov dx, [baseport] 13282 0000968F EC <2> in al, dx ; read from RBR 13283 00009690 3C03 <2> cmp al, 3 13284 00009692 7511 <2> jne @FF 13285 00009694 F606[EB0B]02 <2> testopt [serial_flags], sf_ctrl_c 13286 00009699 7405 <2> jz @F 13287 0000969B 800E[EB0B]04 <2> setopt [serial_flags], sf_double_ctrl_c 13288 <2> @@: 13289 000096A0 800E[EB0B]02 <2> setopt [serial_flags], sf_ctrl_c 13290 <2> @@: 13291 000096A5 8804 <2> mov byte [si], al 13292 000096A7 89F0 <2> mov ax, si 13293 000096A9 46 <2> inc si 13294 <2> ; check for wrap-around 13295 <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: 13296 000096B3 3936[2E09] <2> cmp word [rxtail], si 13297 000096B7 7415 <2> je @FF 13298 <2> ; see if there are more bytes to be read 13299 000096B9 83C205 <2> add dx, 5 13300 000096BC EC <2> in al, dx ; read LSR 13301 000096BD A801 <2> test al, 1 ; Data Available ? 13302 000096BF 75CA <2> jnz irx_more 13303 <2> .end: 13304 000096C1 8936[2C09] <2> mov word [rxhead], si 13305 <2> ; test al, 20h ; Transmitter Holding Register Empty ? 13306 <2> ; jnz int_tx ; yes, do transmit next --> 13307 <2> ; Sometimes when sending and receiving at the 13308 <2> ; same time, TX ints get lost. This is a cure. 13309 <2> ; retn 13310 000096C5 E977FF <2> jmp int_tx ; (this checks for THRE) 13311 <2> 13312 <2> @@: 13313 000096C8 8B16[2609] <2> mov dx, [baseport] 13314 000096CC EC <2> in al, dx ; read RBR (discard) 13315 000096CD A9 <2> db __TEST_IMM16 ; (skip mov) 13316 <2> @@: 13317 000096CE 89C6 <2> mov si, ax 13318 000096D0 83C205 <2> add dx, 5 13319 000096D3 EC <2> in al, dx ; read LSR 13320 000096D4 A801 <2> test al, 1 ; Data Available ? 13321 000096D6 75F0 <2> jnz @BB 13322 000096D8 EBE7 <2> jmp .end 13323 <2> 13324 <2> 13325 <2> int_status: 13326 <2> ; just clear the status ("this trivial task is left as an exercise 13327 <2> ; to the student") 13328 000096DA 83C205 <2> add dx, 5 13329 000096DD EC <2> in al, dx ; read LSR 13330 000096DE C3 <2> retn 13331 <2> 13332 <2> 13333 <2> usesection lDEBUG_CODE 13334 <2> 13335 <2> ; OUT: ZR if no new character in buffer 13336 <2> ; NZ if new character read, 13337 <2> ; al = character 13338 <2> ; STT: ds = debugger segment 13339 <2> serial_receive_char: 13340 0000CE7F 56 <2> push si 13341 <2> ; see if there are bytes to be read from the fifo 13342 0000CE80 8B36[2E09] <2> mov si, word [rxtail] 13343 <2> 13344 0000CE84 3B36[2C09] <2> cmp si, word [rxhead] 13345 0000CE88 7412 <2> je .nodata 13346 0000CE8A AC <2> lodsb 13347 <2> %if _ECHO_RX_TO_TX 13348 <2> %if _RX_TO_TX_ADD_LF 13349 <2> call serial_send_char_add_lf 13350 <2> %else 13351 <2> call serial_send_char 13352 <2> %endif 13353 <2> %endif 13354 <2> ; check for wrap-around 13355 <2> rx_checkwrap 174 0000CE8B 81FE[C009] <3> cmp si, rxfifo+_RXFIFOSIZE 175 0000CE8F 7203 <3> jb %%rx_nowrap 176 0000CE91 BE[4009] <3> mov si, rxfifo 177 <3> %%rx_nowrap: 13356 0000CE94 8936[2E09] <2> mov word [rxtail], si 13357 0000CE98 85F6 <2> test si, si ; (NZ) 13358 0000CE9A EB02 <2> jmp .return 13359 <2> 13360 <2> .nodata: 13361 0000CE9C 31C0 <2> xor ax, ax ; (ZR) 13362 <2> .return: 13363 0000CE9E 5E <2> pop si 13364 0000CE9F C3 <2> retn 13365 <2> 13366 <2> 13367 <2> ; OUT: ZR if no new character in buffer 13368 <2> ; NZ if new character available, 13369 <2> ; al = character 13370 <2> ; STT: ds = debugger segment 13371 <2> serial_check_receive_char: 13372 0000CEA0 56 <2> push si 13373 <2> ; see if there are bytes to be read from the fifo 13374 0000CEA1 8B36[2E09] <2> mov si, word [rxtail] 13375 <2> 13376 0000CEA5 3B36[2C09] <2> cmp si, word [rxhead] 13377 0000CEA9 7405 <2> je .nodata 13378 0000CEAB AC <2> lodsb 13379 0000CEAC 85F6 <2> test si, si ; (NZ) 13380 0000CEAE EB02 <2> jmp .return 13381 <2> 13382 <2> .nodata: 13383 0000CEB0 31C0 <2> xor ax, ax ; (ZR) 13384 <2> .return: 13385 0000CEB2 5E <2> pop si 13386 0000CEB3 C3 <2> retn 13387 <2> 13388 <2> 13389 <2> ; OUT: NC if successful 13390 <2> ; CY if handler hooked in different interrrupt 13391 <2> ; and couldn't unhook 13392 <2> serial_install_interrupt_handler: 13393 <2> ; install interrupt handler first 13394 0000CEB4 A0[2209] <2> mov al, byte [serial_use_intnum] 13395 0000CEB7 F606[A800]01 <2> testopt [internalflags4], dif4_int_serial_hooked 13396 0000CEBC 740D <2> jz @F 13397 0000CEBE 3A06[120C] <2> cmp al, byte [serial_installed_intnum] 13398 0000CEC2 7418 <2> je .ret ; --> (NC) 13399 0000CEC4 50 <2> push ax 13400 0000CEC5 E84A01 <2> call serial_uninstall_interrupt_handler 13401 0000CEC8 58 <2> pop ax 13402 0000CEC9 7211 <2> jc .ret ; --> (CY) 13403 <2> @@: 13404 0000CECB A2[120C] <2> mov byte [serial_installed_intnum], al 13405 0000CECE BE[D895] <2> mov si, serial_interrupt_handler 13406 0000CED1 E82802 <2> call install_86m_interrupt_handler 13407 0000CED4 800E[A800]01 <2> setopt [internalflags4], dif4_int_serial_hooked 13408 0000CED9 E8A704 <2> call update_inttab_optional 13409 <2> ; (NC) 13410 <2> .ret: 13411 0000CEDC C3 <2> retn 13412 <2> 13413 <2> 13414 <2> %if 0 13415 <2> 13416 <2> If you do the following: 13417 <2> 13418 <2> r dspvi FF 13419 <2> r dco or= 4000 13420 <2> (wait for KEEP prompt to fail) 13421 <2> r dspvi 0B 13422 <2> r dco or= 4000 13423 <2> (try to reply to the KEEP prompt) 13424 <2> 13425 <2> In dosemu2 the default interrupt handler apparently 13426 <2> doesn't send an EOI to the PIC and thus the interrupts 13427 <2> get stuck when prompting with the correct handler. 13428 <2> Therefore, we should send an EOI to the PIC just in case. 13429 <2> 13430 <2> %endif 13431 <2> 13432 <2> ; INP: word [serial_use_irqmask] 13433 <2> ; CHG: ax 13434 <2> serial_eoi: 13435 0000CEDD B020 <2> mov al, 20h ; acknowledge interrupt 13436 0000CEDF 803E[2B09]00 <2> cmp byte [serial_use_irqmask + 1], 0 13437 0000CEE4 7402 <2> je @F 13438 0000CEE6 E6A0 <2> out 0A0h, al ; to secondary PIC 13439 <2> @@: 13440 0000CEE8 E620 <2> out 20h, al ; to primary PIC 13441 0000CEEA C3 <2> retn 13442 <2> 13443 <2> 13444 <2> serial_clear_fifos: 13445 <2> ; clear fifos (not those in the 16550A, but ours) 13446 0000CEEB B8[4009] <2> mov ax, rxfifo 13447 0000CEEE A3[2C09] <2> mov word [rxhead], ax 13448 0000CEF1 A3[2E09] <2> mov word [rxtail], ax 13449 0000CEF4 B8[C009] <2> mov ax, txfifo 13450 0000CEF7 A3[3009] <2> mov word [txhead], ax 13451 0000CEFA A3[3209] <2> mov word [txtail], ax 13452 0000CEFD C3 <2> retn 13453 <2> 13454 <2> 13455 <2> numdef SERIAL_DL_WORD, 0 13456 <2> 13457 <2> serial_init_UART: 13458 0000CEFE E8DCFF <2> call serial_eoi 13459 <2> ; initialize the UART 13460 0000CF01 8B16[2609] <2> mov dx, [baseport] 13461 0000CF05 83C203 <2> add dx, 3 ; (base + 3) read/write LCR 13462 0000CF08 EC <2> in al, dx ; read LCR 13463 0000CF09 A2[1F09] <2> mov byte [serial_save_lcr], al 13464 0000CF0C B080 <2> mov al, 80h ; DLAB = 1 13465 0000CF0E EE <2> out dx, al ; write LCR, make DL register accessible 13466 0000CF0F 52 <2> push dx 13467 0000CF10 8B16[2609] <2> mov dx, [baseport] ; (base) 13468 <2> %if _SERIAL_DL_WORD 13469 <2> in ax, dx ; read bps rate divisor (DL) 13470 <2> mov word [serial_save_dl], ax 13471 <2> mov ax, word [serial_use_dl] 13472 <2> out dx, ax ; write bps rate divisor (DL) 13473 <2> %else 13474 0000CF14 EC <2> in al, dx ; read bps rate divisor low byte (DL) 13475 0000CF15 42 <2> inc dx 13476 0000CF16 A2[1C09] <2> mov byte [serial_save_dl], al 13477 0000CF19 EC <2> in al, dx ; read bps rate divisor high byte (DL) 13478 0000CF1A A2[1D09] <2> mov byte [serial_save_dl + 1], al 13479 0000CF1D A0[2909] <2> mov al, byte [serial_use_dl + 1] 13480 0000CF20 EE <2> out dx, al ; write bps rate divisor high byte (DL) 13481 0000CF21 4A <2> dec dx 13482 0000CF22 A0[2809] <2> mov al, byte [serial_use_dl] 13483 0000CF25 EE <2> out dx, al ; write bps rate divisor low byte (DL) 13484 <2> %endif 13485 0000CF26 5A <2> pop dx ; (base + 3) write LCR 13486 0000CF27 A0[2309] <2> mov al, byte [serial_use_params] 13487 <2> ; DLAB = 0 and control parameters 13488 0000CF2A EE <2> out dx, al ; write parameters 13489 <2> 13490 <2> ; is it a 16550A? 13491 0000CF2B 4A <2> dec dx ; (base + 2) write FCR, read IIR 13492 <2> %if _USE_TX_FIFO 13493 0000CF2C B007 <2> mov al, 0000_0111b 13494 0000CF2E 0A06[2409] <2> or al, byte [serial_use_fifo] 13495 0000CF32 A2[2109] <2> mov byte [serial_fcr_setting], al 13496 0000CF35 EE <2> out dx, al ; (write FCR) try to clear and enable FIFOs 13497 0000CF36 90 <2> nop 13498 0000CF37 EC <2> in al, dx ; read IIR 13499 0000CF38 800E[EB0B]08 <2> or byte [serial_flags], sf_built_in_fifo 13500 <2> ; in case of built-in tx FIFO 13501 0000CF3D 24C0 <2> and al, 1100_0000b ; mask of FIFO functional bits 13502 0000CF3F 3CC0 <2> cmp al, 1100_0000b ; both bits set ? 13503 0000CF41 740B <2> je @F ; yes --> 13504 0000CF43 8026[EB0B]F7 <2> and byte [serial_flags], ~ sf_built_in_fifo 13505 <2> ; no built-in tx FIFO 13506 0000CF48 31C0 <2> xor ax, ax 13507 0000CF4A A2[2109] <2> mov byte [serial_fcr_setting], al 13508 0000CF4D EE <2> out dx, al ; (write FCR) disable the FIFOs 13509 <2> @@: 13510 <2> %else 13511 <2> xor ax, ax 13512 <2> out dx, al ; (write FCR) disable the FIFOs 13513 <2> %endif 13514 0000CF4E 4A <2> dec dx ; (base + 1) 13515 0000CF4F EC <2> in al, dx ; read IER 13516 0000CF50 A2[1E09] <2> mov byte [serial_save_ier], al 13517 0000CF53 B001 <2> mov al, 0000_0001b ; allow RX interrupts 13518 0000CF55 EE <2> out dx, al ; write to IER 13519 0000CF56 4A <2> dec dx ; (base + 0) read RBR 13520 0000CF57 EC <2> in al, dx ; clear receiver 13521 0000CF58 83C205 <2> add dx, 5 ; (base + 5) read LSR 13522 0000CF5B EC <2> in al, dx ; clear line status 13523 0000CF5C 42 <2> inc dx ; (base + 6) read MSR 13524 0000CF5D EC <2> in al, dx ; clear modem status 13525 <2> ; free interrupt in the ICU 13526 0000CF5E 8B0E[2A09] <2> mov cx, word [serial_use_irqmask] 13527 0000CF62 F7D1 <2> not cx ; negated mask of bits to change 13528 0000CF64 31DB <2> xor bx, bx ; all bits clear (= IRQ ON) 13529 0000CF66 E81200 <2> call set_irq 13530 0000CF69 891E[1A09] <2> mov word [serial_save_irq_off], bx 13531 0000CF6D 890E[1809] <2> mov word [serial_save_irq_mask], cx 13532 <2> ; and enable ints from the UART 13533 0000CF71 4A <2> dec dx 13534 0000CF72 4A <2> dec dx ; (base + 4) 13535 0000CF73 EC <2> in al, dx ; read MCR 13536 0000CF74 A2[2009] <2> mov byte [serial_save_mcr], al 13537 0000CF77 B008 <2> mov al, 0000_1000b 13538 0000CF79 EE <2> out dx, al ; write MCR 13539 0000CF7A C3 <2> retn 13540 <2> 13541 <2> ; INP: cx = negated mask of bits to change 13542 <2> ; (if bit is clear, modify corresponding IRQ) 13543 <2> ; bx = mask of what to set bits to (0 = IRQ ON, 1 = IRQ OFF) 13544 <2> ; OUT: bx = mask of bits previously set 13545 <2> ; CHG: ax 13546 <2> set_irq: 13547 0000CF7B 52 <2> push dx 13548 0000CF7C BA0100 <2> mov dx, 1 13549 <2> .loop: 13550 0000CF7F 85CA <2> test dx, cx 13551 0000CF81 753E <2> jnz .next 13552 0000CF83 84D2 <2> test dl, dl 13553 0000CF85 741E <2> jz .high 13554 <2> 13555 <2> .low: 13556 0000CF87 E421 <2> in al, 21h ; get PIC configuration 13557 0000CF89 50 <2> push ax 13558 0000CF8A F7D2 <2> not dx ; dx = mask of bits to keep 13559 0000CF8C 20D0 <2> and al, dl ; mask to 0 the bit to set 13560 0000CF8E 53 <2> push bx 13561 0000CF8F F7D2 <2> not dx ; dx = mask of bits to change 13562 0000CF91 20D3 <2> and bl, dl ; get bit state to change to 13563 0000CF93 08D8 <2> or al, bl ; set this bit state 13564 0000CF95 E621 <2> out 21h, al ; configure the PIC 13565 0000CF97 5B <2> pop bx ; = saved states / still to set states 13566 0000CF98 F7D2 <2> not dx ; dx = mask of bits to keep 13567 0000CF9A 58 <2> pop ax ; = prior config 13568 0000CF9B 20D3 <2> and bl, dl ; clear bits to change 13569 0000CF9D F7D2 <2> not dx ; dx = mask of bits to change 13570 0000CF9F 20D0 <2> and al, dl ; separate out only bits to change 13571 0000CFA1 08C3 <2> or bl, al ; set in bx 13572 0000CFA3 EB1C <2> jmp .next 13573 <2> 13574 <2> .high: 13575 0000CFA5 E4A1 <2> in al, 0A1h ; get PIC configuration 13576 0000CFA7 50 <2> push ax 13577 0000CFA8 F7D2 <2> not dx ; dx = mask of bits to keep 13578 0000CFAA 20F0 <2> and al, dh ; mask to 0 the bit to set 13579 0000CFAC 53 <2> push bx 13580 0000CFAD F7D2 <2> not dx ; dx = mask of bits to change 13581 0000CFAF 20F7 <2> and bh, dh ; get bit state to change to 13582 0000CFB1 08F8 <2> or al, bh ; set this bit state 13583 0000CFB3 E6A1 <2> out 0A1h, al ; configure the PIC 13584 0000CFB5 5B <2> pop bx ; = saved states / still to set states 13585 0000CFB6 F7D2 <2> not dx ; dx = mask of bits to keep 13586 0000CFB8 58 <2> pop ax ; = prior config 13587 0000CFB9 20F7 <2> and bh, dh ; clear bits to change 13588 0000CFBB F7D2 <2> not dx ; dx = mask of bits to change 13589 0000CFBD 20F0 <2> and al, dh ; separate out only bits to change 13590 0000CFBF 08C7 <2> or bh, al ; set in bx 13591 <2> 13592 <2> .next: 13593 0000CFC1 01D2 <2> add dx, dx 13594 0000CFC3 75BA <2> jnz .loop 13595 0000CFC5 5A <2> pop dx 13596 0000CFC6 C3 <2> retn 13597 <2> 13598 <2> 13599 <2> ; OUT: NC if successful 13600 <2> ; CY if couldn't unhook 13601 <2> serial_clean_up: 13602 0000CFC7 E813FF <2> call serial_eoi 13603 0000CFCA 31C0 <2> xor ax, ax 13604 0000CFCC 8B16[2609] <2> mov dx, [baseport] 13605 0000CFD0 83C204 <2> add dx, 4 ; (base + 4) 13606 <2> ; disconnect the UART from the int line 13607 0000CFD3 EE <2> out dx, al ; write MCR 13608 0000CFD4 4A <2> dec dx 13609 0000CFD5 4A <2> dec dx 13610 0000CFD6 4A <2> dec dx ; (base + 1) disable UART ints 13611 0000CFD7 EE <2> out dx, al ; write IER 13612 0000CFD8 42 <2> inc dx ; (base + 2) 13613 <2> ; disable the FIFOs (old software relies on it) 13614 0000CFD9 EE <2> out dx, al ; write FCR 13615 <2> 13616 <2> ; reset the UART 13617 0000CFDA 8B16[2609] <2> mov dx, [baseport] 13618 0000CFDE 83C203 <2> add dx, 3 ; (base + 3) read/write LCR 13619 0000CFE1 B080 <2> mov al, 80h ; DLAB = 1 13620 0000CFE3 EE <2> out dx, al ; write LCR, make DL register accessible 13621 0000CFE4 52 <2> push dx 13622 0000CFE5 8B16[2609] <2> mov dx, [baseport] ; (base) 13623 <2> %if _SERIAL_DL_WORD 13624 <2> mov ax, word [serial_save_dl] 13625 <2> out dx, ax ; write bps rate divisor (DL) 13626 <2> %else 13627 0000CFE9 A0[1C09] <2> mov al, byte [serial_save_dl] 13628 0000CFEC EE <2> out dx, al ; write bps rate divisor low byte (DL) 13629 0000CFED 42 <2> inc dx 13630 0000CFEE A0[1D09] <2> mov al, byte [serial_save_dl + 1] 13631 0000CFF1 EE <2> out dx, al ; write bps rate divisor high byte (DL) 13632 <2> %endif 13633 0000CFF2 5A <2> pop dx ; (base + 3) write LCR 13634 0000CFF3 A0[1F09] <2> mov al, byte [serial_save_lcr] 13635 0000CFF6 EE <2> out dx, al ; write parameters 13636 <2> 13637 0000CFF7 4A <2> dec dx ; (base + 2) write FCR, read IIR 13638 0000CFF8 31C0 <2> xor ax, ax 13639 0000CFFA EE <2> out dx, al ; (write FCR) disable the FIFOs 13640 0000CFFB 4A <2> dec dx ; (base + 1) 13641 0000CFFC A0[1E09] <2> mov al, byte [serial_save_ier] 13642 0000CFFF EE <2> out dx, al ; write to IER 13643 0000D000 8B1E[1A09] <2> mov bx, [serial_save_irq_off] 13644 <2> ; bits clear for IRQ ON 13645 0000D004 8B0E[1809] <2> mov cx, [serial_save_irq_mask] 13646 <2> ; negated mask of bits to change 13647 0000D008 E870FF <2> call set_irq 13648 0000D00B 42 <2> inc dx 13649 0000D00C 42 <2> inc dx 13650 0000D00D 42 <2> inc dx ; (base + 4) 13651 0000D00E A0[2009] <2> mov al, byte [serial_save_mcr] 13652 0000D011 EE <2> out dx, al ; write MCR 13653 <2> 13654 <2> ; restore int vector 13655 <2> ; OUT: NC if successful 13656 <2> ; CY if couldn't unhook 13657 <2> serial_uninstall_interrupt_handler: 13658 0000D012 BE[D895] <2> mov si, serial_interrupt_handler 13659 0000D015 A0[120C] <2> mov al, byte [serial_installed_intnum] 13660 0000D018 BA0100 <2> mov dx, opt4_int_serial_force >> 16 13661 0000D01B E85802 <2> call UnhookInterruptForce 13662 0000D01E 7208 <2> jc @F 13663 0000D020 8026[A800]FE <2> clropt [internalflags4], dif4_int_serial_hooked 13664 0000D025 E85B03 <2> call update_inttab_optional 13665 <2> ; (NC) 13666 <2> @@: 13667 0000D028 C3 <2> retn 13668 <2> 13669 <2> 13670 <2> serial_send_char_add_lf: 13671 0000D029 50 <2> push ax 13672 <2> .loop: 13673 0000D02A E80800 <2> call serial_send_char 13674 0000D02D 3C0D <2> cmp al, 13 ; add LF after CR; change it if you don't like it 13675 0000D02F B00A <2> mov al, 10 13676 0000D031 74F7 <2> je .loop 13677 0000D033 58 <2> pop ax 13678 0000D034 C3 <2> retn 13679 <2> 13680 <2> serial_send_char: 13681 0000D035 56 <2> push si 13682 0000D036 51 <2> push cx 13683 0000D037 52 <2> push dx 13684 0000D038 06 <2> push es 13685 <2> 13686 0000D039 8B36[3009] <2> mov si, word [txhead] 13687 0000D03D 8804 <2> mov byte [si],al 13688 0000D03F 46 <2> inc si 13689 <2> ; check for wrap-around 13690 <2> tx_checkwrap 181 0000D040 81FE[400A] <3> cmp si, txfifo+_TXFIFOSIZE 182 0000D044 7203 <3> jb %%tx_nowrap 183 0000D046 BE[C009] <3> mov si, txfifo 184 <3> %%tx_nowrap: 13691 <2> 13692 0000D049 50 <2> push ax 13693 <2> %if _PM 13694 0000D04A 50 <2> push ax 13695 0000D04B E84F00 <2> call push_if 13696 <2> %else 13697 <2> pushf 13698 <2> %endif 13699 0000D04E 3936[3209] <2> cmp word [txtail], si 13700 0000D052 7537 <2> jne .no_wait 13701 <2> 13702 <2> ; Because we enable the tx empty interrupt 13703 <2> ; when putting data into the buffer, it 13704 <2> ; should still be enabled here when the 13705 <2> ; buffer is currently full. So we only 13706 <2> ; need to wait for the interrupt to 13707 <2> ; occur and be processed by our handler. 13708 <2> 13709 0000D054 31C9 <2> xor cx, cx 13710 0000D056 BA4000 <2> mov dx, 40h ; 0040h is a bimodal segment/selector 13711 0000D059 8EC2 <2> mov es, dx 13712 <2> .wait_reset_dx: 13713 0000D05B 268B166C00 <2> mov dx, word [es:6Ch] 13714 <2> 13715 <2> .wait: 13716 0000D060 E86CF0 <2> call idle 13717 <2> %if _PM 13718 0000D063 E85A00 <2> call pop_if 13719 0000D066 50 <2> push ax 13720 0000D067 E83300 <2> call push_if 13721 <2> %else 13722 <2> popf 13723 <2> pushf 13724 <2> %endif 13725 <2> 13726 0000D06A 3B36[3209] <2> cmp si, word [txtail] 13727 0000D06E 751B <2> jne .no_wait 13728 <2> 13729 0000D070 263B166C00 <2> cmp dx, word [es:6Ch] 13730 0000D075 74E9 <2> je .wait 13731 0000D077 41 <2> inc cx 13732 0000D078 83F95A <2> cmp cx, 5 * 18 13733 0000D07B 72DE <2> jb .wait_reset_dx 13734 <2> 13735 0000D07D 8026[7D00]BF <2> clropt [options], enable_serial 13736 0000D082 BA[6969] <2> mov dx, msg.no_progress 13737 0000D085 E81CED <2> call putsz 13738 0000D088 E9752F <2> jmp cmd3 13739 <2> 13740 <2> .no_wait: 13741 0000D08B 8936[3009] <2> mov word [txhead], si 13742 0000D08F FA <2> cli ; try to avoid interrupt while emptying buffer 13743 <2> ; test if we can send a byte right away 13744 <2> %if 0 ; int_tx checks for THRE ...- 13745 <2> mov dx, [baseport] 13746 <2> add dx, 5 ; (base + 5) 13747 <2> in al, dx ; read LSR 13748 <2> test al, 20h ; Transmitter Holding Register Empty ? 13749 <2> jz .crank ; no, just enable the interrupt --> 13750 <2> %endif 13751 <2> 13752 <2> ; call int_tx ; send bytes, enables or disables the tx interrupt 13753 0000D090 0E <2> push cs 13754 0000D091 E84C00 <2> call code_to_int_tx 13755 <2> 13756 <2> %if 0 ; -... and sets up the interrupt accordingly 13757 <2> jmp .dontcrank 13758 <2> .crank: 13759 <2> ; crank it up 13760 <2> ; note that this might not work with some very old 8250s 13761 <2> add dx, 1 - 5 ; (base + 1) write IER 13762 <2> mov al, 0000_0011b 13763 <2> out dx, al ; enable tx empty interrupt 13764 <2> .dontcrank: 13765 <2> %endif 13766 <2> %if _PM 13767 0000D094 E82900 <2> call pop_if 13768 <2> %else 13769 <2> popf 13770 <2> %endif 13771 0000D097 58 <2> pop ax 13772 0000D098 07 <2> pop es 13773 0000D099 5A <2> pop dx 13774 0000D09A 59 <2> pop cx 13775 0000D09B 5E <2> pop si 13776 0000D09C C3 <2> retn 13777 <2> 13778 <2> %if _PM 13779 <2> push_if: 13780 <2> lframe near 13781 <2> lpar word, flags 13782 <2> lpar_return 13783 0000D09D 5589E5 <2> lenter 13784 0000D0A0 E82AC1 <2> call ispm 13785 0000D0A3 7515 <2> jnz .86m 13786 <2> .pm: 13787 0000D0A5 50 <2> push ax 13788 0000D0A6 B80209 <2> mov ax, 0902h 13789 0000D0A9 CD31 <2> int 31h 13790 0000D0AB 84C0 <2> test al, al ; 0 = disabled ? 13791 0000D0AD B80000 <2> mov ax, 0 ; initialise to IF=0 13792 0000D0B0 7402 <2> jz @F 13793 0000D0B2 B402 <2> mov ah, 2 ; else, IF=1 13794 <2> @@: 13795 0000D0B4 894604 <2> mov word [bp + ?flags], ax 13796 0000D0B7 58 <2> pop ax 13797 0000D0B8 EB04 <2> jmp .end 13798 <2> .86m: 13799 0000D0BA 9C <2> pushf 13800 0000D0BB 8F4604 <2> pop word [bp + ?flags] 13801 <2> .end: 13802 0000D0BE 5D <2> lleave 13803 0000D0BF C3 <2> lret 13804 <2> 13805 <2> pop_if: 13806 <2> lframe near 13807 <2> lpar word, flags 13808 0000D0C0 5589E5 <2> lenter 13809 0000D0C3 E807C1 <2> call ispm 13810 0000D0C6 7510 <2> jnz .86m 13811 0000D0C8 50 <2> push ax 13812 0000D0C9 B80009 <2> mov ax, 0900h ; initialise to disable VIF = 0900h 13813 0000D0CC F6460502 <2> test byte [bp + ?flags + 1], 2 13814 0000D0D0 7401 <2> jz @F ; if to disable --> 13815 0000D0D2 40 <2> inc ax ; else enable VIF = 0901h 13816 <2> @@: 13817 0000D0D3 CD31 <2> int 31h 13818 0000D0D5 58 <2> pop ax 13819 0000D0D6 EB04 <2> jmp .end 13820 <2> .86m: 13821 0000D0D8 FF7604 <2> push word [bp + ?flags] 13822 0000D0DB 9D <2> popf 13823 <2> .end: 13824 0000D0DC 5D <2> lleave 13825 0000D0DD C20200 <2> lret 13826 <2> %endif 13827 <2> 13828 <2> code_to_int_tx: 13829 0000D0E0 2EFF36[FAD0] <2> push word [cs:.entry_retf_word] 13830 <2> %if _PM 13831 <2> ; near return address 13832 0000D0E5 E8E5C0 <2> call ispm 13833 0000D0E8 7506 <2> jnz .rm 13834 <2> 13835 0000D0EA FF36[D688] <2> push word [cssel] 13836 0000D0EE EB01 <2> jmp @F 13837 <2> 13838 <2> %endif 13839 <2> .rm: 13840 0000D0F0 16 <2> push ss 13841 <2> @@: 13842 0000D0F1 2EFF36[F8D0] <2> push word [cs:.int_tx_word] 13843 0000D0F6 CB <2> retf ; jump to lDEBUG_DATA_ENTRY:int_tx 13844 <2> 13845 0000D0F7 00 <2> align 2, db 0 13846 <2> .int_tx_word: 13847 0000D0F8 [3F96] <2> dw int_tx 13848 <2> .entry_retf_word: 13849 0000D0FA [DF96] <2> dw entry_retf 13850 <2> 13851 <2> 13852 <2> usesection lDEBUG_DATA_ENTRY 13853 <2> 13854 <2> entry_retf: 13855 000096DF CB <2> retf 9307 9308 9309 %include "ints.asm" 9310 <1> 9311 <1> %if 0 9312 <1> 9313 <1> Interrupt hooking and unhooking 9314 <1> 9315 <1> 2021 by C. Masloch 9316 <1> 9317 <1> Usage of the works is permitted provided that this 9318 <1> instrument is retained with the works, so that any entity 9319 <1> that uses the works is notified of this instrument. 9320 <1> 9321 <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 9322 <1> 9323 <1> %endif 9324 <1> 9325 <1> usesection lDEBUG_CODE 9326 <1> 9327 <1> 9328 <1> ; INP: 86 Mode ss = word [pspdbg] = cs for handler 9329 <1> ; si -> handler entrypoint 9330 <1> ; dword [si + ieNext] = storage for next vector 9331 <1> ; al = interrupt number 9332 <1> ; CHG: ax, bx, cx, dx 9333 <1> ; STT: ss = ds (= word [pspdbg] if in 86 Mode) 9334 <1> install_86m_interrupt_handler: 9335 <1> %if _PM 9336 0000D0FC E8CEC0 <1> call ispm 9337 0000D0FF 7518 <1> jnz .rm 9338 <1> 9339 0000D101 93 <1> xchg ax, bx ; bl = interrupt number 9340 0000D102 B80002 <1> mov ax, 0200h 9341 0000D105 CD31 <1> int 31h ; cx:dx = interrupt vector 9342 0000D107 895402 <1> mov word [si + ieNext], dx 9343 0000D10A 894C04 <1> mov word [si + ieNext + 2], cx 9344 <1> 9345 0000D10D B80102 <1> mov ax, 0201h 9346 <1> ; bl still = interrupt number 9347 0000D110 8B0E[A60A] <1> mov cx, word [pspdbg] ; cx => lDEBUG_DATA_ENTRY 9348 0000D114 89F2 <1> mov dx, si ; cx:dx -> our entrypoint 9349 0000D116 CD31 <1> int 31h ; change vector to our handler 9350 0000D118 C3 <1> retn 9351 <1> 9352 <1> .rm: 9353 <1> %endif 9354 <1> 9355 0000D119 E88CD5 <1> call InDos 9356 0000D11C 741E <1> jz .notindos 9357 0000D11E 06 <1> push es 9358 0000D11F 1E <1> push ds 9359 0000D120 31DB <1> xor bx, bx 9360 0000D122 8EDB <1> mov ds, bx 9361 0000D124 88C3 <1> mov bl, al 9362 0000D126 01DB <1> add bx, bx 9363 0000D128 01DB <1> add bx, bx ; ds:bx -> interrupt vector 9364 0000D12A C417 <1> les dx, [bx] ; es:dx = vector 9365 0000D12C 36895402 <1> mov word [ss:si + ieNext], dx 9366 0000D130 368C4404 <1> mov word [ss:si + ieNext + 2], es 9367 <1> ; save prior vector 9368 0000D134 8937 <1> mov word [bx], si 9369 0000D136 8C5702 <1> mov word [bx + 2], ss ; ss => lDEBUG_DATA_ENTRY 9370 <1> ; change vector to our handler 9371 0000D139 1F <1> pop ds 9372 0000D13A 07 <1> pop es 9373 0000D13B C3 <1> retn 9374 <1> 9375 <1> .notindos: 9376 0000D13C 06 <1> push es 9377 0000D13D B435 <1> mov ah, 35h 9378 0000D13F CD21 <1> int 21h 9379 0000D141 895C02 <1> mov word [si + ieNext], bx 9380 0000D144 8C4404 <1> mov word [si + ieNext + 2], es 9381 0000D147 07 <1> pop es 9382 0000D148 B425 <1> mov ah, 25h 9383 0000D14A 89F2 <1> mov dx, si ; ds => lDEBUG_DATA_ENTRY 9384 0000D14C CD21 <1> int 21h ; change vector to our handler 9385 0000D14E C3 <1> retn 9386 <1> 9387 <1> 9388 <1> %if _PM 9389 <1> get_86m_interrupt_handler_no_dos: 9390 0000D14F E87BC0 <1> call ispm 9391 0000D152 7519 <1> jnz get_86m_interrupt_handler.rm_indos 9392 <1> %endif 9393 <1> 9394 <1> ; INP: al = interrupt number 9395 <1> ; OUT: dx:bx = 86 Mode far pointer 9396 <1> ; CHG: ah 9397 <1> get_86m_interrupt_handler: 9398 <1> %if _PM 9399 0000D154 E876C0 <1> call ispm 9400 0000D157 750F <1> jnz .rm 9401 <1> 9402 0000D159 50 <1> push ax 9403 0000D15A 51 <1> push cx 9404 0000D15B 93 <1> xchg ax, bx ; bl = interrupt number 9405 0000D15C B80002 <1> mov ax, 0200h 9406 0000D15F CD31 <1> int 31h ; cx:dx = interrupt vector 9407 0000D161 87CB <1> xchg cx, bx ; bx:dx 9408 0000D163 87DA <1> xchg bx, dx ; dx:bx 9409 0000D165 59 <1> pop cx 9410 0000D166 58 <1> pop ax 9411 0000D167 C3 <1> retn 9412 <1> 9413 <1> .rm: 9414 <1> %endif 9415 <1> 9416 0000D168 E83DD5 <1> call InDos 9417 0000D16B 7412 <1> jz .notindos 9418 <1> %ifn _PM 9419 <1> get_86m_interrupt_handler_no_dos: equ $ 9420 <1> %endif 9421 <1> .rm_indos: 9422 0000D16D 1E <1> push ds 9423 0000D16E 31DB <1> xor bx, bx 9424 0000D170 8EDB <1> mov ds, bx 9425 0000D172 88C3 <1> mov bl, al 9426 0000D174 01DB <1> add bx, bx 9427 0000D176 01DB <1> add bx, bx ; ds:bx -> interrupt vector 9428 0000D178 8B5702 <1> mov dx, word [bx + 2] 9429 0000D17B 8B1F <1> mov bx, word [bx] 9430 0000D17D 1F <1> pop ds 9431 0000D17E C3 <1> retn 9432 <1> 9433 <1> .notindos: 9434 0000D17F 06 <1> push es 9435 0000D180 B435 <1> mov ah, 35h 9436 0000D182 CD21 <1> int 21h 9437 0000D184 8CC2 <1> mov dx, es 9438 0000D186 07 <1> pop es 9439 0000D187 C3 <1> retn 9440 <1> 9441 <1> 9442 <1> ; INP: al = interrupt number 9443 <1> ; OUT: ZR if offset = -1 or segment = 0 9444 <1> ; NZ else 9445 <1> ; CHG: ah, dx, bx 9446 <1> intchk: 9447 0000D188 E8C9FF <1> call get_86m_interrupt_handler 9448 0000D18B 43 <1> inc bx 9449 0000D18C 7402 <1> jz @F ; was 0FFFFh --> 9450 0000D18E 85D2 <1> test dx, dx 9451 <1> ; jz @F ; was 0000h --> 9452 <1> @@: 9453 0000D190 C3 <1> retn 9454 <1> 9455 <1> 9456 <1> ; INP: al = interrupt number 9457 <1> ; dx:bx = 86 Mode far pointer 9458 <1> ; CHG: ah 9459 <1> set_86m_interrupt_handler: 9460 0000D191 50 <1> push ax 9461 0000D192 53 <1> push bx 9462 0000D193 51 <1> push cx 9463 0000D194 52 <1> push dx 9464 <1> %if _PM 9465 0000D195 E835C0 <1> call ispm 9466 0000D198 750A <1> jnz .rm 9467 <1> 9468 0000D19A 93 <1> xchg ax, bx ; bl = interrupt number, 9469 <1> ; dx:ax = vector 9470 0000D19B 92 <1> xchg ax, dx ; ax:dx 9471 0000D19C 91 <1> xchg cx, ax ; cx:dx 9472 0000D19D B80102 <1> mov ax, 0201h 9473 0000D1A0 CD31 <1> int 31h ; cx:dx = interrupt vector 9474 0000D1A2 EB21 <1> jmp .ret 9475 <1> 9476 <1> .rm: 9477 <1> %endif 9478 <1> 9479 0000D1A4 1E <1> push ds 9480 0000D1A5 E800D5 <1> call InDos 9481 0000D1A8 7412 <1> jz .notindos 9482 0000D1AA 53 <1> push bx 9483 0000D1AB 31DB <1> xor bx, bx 9484 0000D1AD 8EDB <1> mov ds, bx 9485 0000D1AF 88C3 <1> mov bl, al 9486 0000D1B1 01DB <1> add bx, bx 9487 0000D1B3 01DB <1> add bx, bx ; ds:bx -> interrupt vector 9488 0000D1B5 895702 <1> mov word [bx + 2], dx 9489 0000D1B8 8F07 <1> pop word [bx] 9490 0000D1BA EB08 <1> jmp .ret_ds 9491 <1> 9492 <1> .notindos: 9493 0000D1BC 87DA <1> xchg bx, dx 9494 0000D1BE 8EDB <1> mov ds, bx ; ds:dx = vector 9495 0000D1C0 B425 <1> mov ah, 25h 9496 0000D1C2 CD21 <1> int 21h 9497 <1> .ret_ds: 9498 0000D1C4 1F <1> pop ds 9499 <1> .ret: 9500 0000D1C5 5A <1> pop dx 9501 0000D1C6 59 <1> pop cx 9502 0000D1C7 5B <1> pop bx 9503 0000D1C8 58 <1> pop ax 9504 0000D1C9 C3 <1> retn 9505 <1> 9506 <1> 9507 <1> ; INP: dx = 86 Mode segment to access 9508 <1> ; OUT: es => segment 9509 <1> ; CHG: - 9510 <1> %if _PM 9511 <1> setes2dx: 9512 0000D1CA E800C0 <1> call ispm 9513 0000D1CD 7508 <1> jnz @F 9514 0000D1CF 53 <1> push bx 9515 0000D1D0 E8EEC6 <1> call setrmsegm 9516 0000D1D3 8EC3 <1> mov es, bx 9517 0000D1D5 5B <1> pop bx 9518 0000D1D6 C3 <1> retn 9519 <1> 9520 <1> @@: 9521 0000D1D7 8EC2 <1> mov es, dx 9522 0000D1D9 C3 <1> retn 9523 <1> %endif ; _PM 9524 <1> 9525 <1> 9526 <1> ; INP: ds:si -> source IISP header (or pseudo header) 9527 <1> ; es:di -> destination IISP header 9528 <1> ; OUT: EI 9529 <1> ; si and di both incremented by 6 9530 <1> ; CHG: - 9531 <1> ; STT: UP 9532 <1> update_iisp_header: 9533 0000D1DA 50 <1> push ax 9534 0000D1DB 51 <1> push cx 9535 0000D1DC 52 <1> push dx 9536 0000D1DD 57 <1> push di 9537 0000D1DE 56 <1> push si 9538 0000D1DF 06 <1> push es 9539 <1> %if _PM 9540 0000D1E0 E89C8B <1> call selector_to_segment 9541 <1> %endif 9542 0000D1E3 1E <1> push ds 9543 0000D1E4 16 <1> push ss 9544 0000D1E5 1F <1> pop ds 9545 <1> 9546 <1> findinstalleddebugger: 9547 0000D1E6 B02D <1> mov al, 2Dh 9548 0000D1E8 53 <1> push bx 9549 0000D1E9 E89CFF <1> call intchk 9550 0000D1EC 5B <1> pop bx 9551 0000D1ED 741E <1> jz .zero 9552 <1> 9553 0000D1EF F606[8700]08 <1> testopt [options3], opt3_no_call_update 9554 0000D1F4 7517 <1> jnz .zero 9555 <1> 9556 0000D1F6 8A26[4981] <1> mov ah, byte [try_debugger_amis_multiplex_number] 9557 0000D1FA E81400 <1> call .check 9558 0000D1FD 7305 <1> jnc @F 9559 <1> 9560 0000D1FF B4FF <1> mov ah, 0FFh ; start with multiplex number 0FFh 9561 <1> .loop: 9562 0000D201 E80D00 <1> call .check 9563 <1> @@: 9564 0000D204 B030 <1> mov al, 30h ; al = 30h to indicate found, ah = multiplex number 9565 0000D206 732E <1> jnc .end 9566 0000D208 80EC01 <1> sub ah, 1 ; search is backward (to find latest installed first), from 0FFh to 00h including 9567 0000D20B 73F4 <1> jnc .loop ; try next if we didn't check all yet --> 9568 <1> 9569 <1> .zero: 9570 0000D20D 31C0 <1> xor ax, ax ; al = 0 to indicate none found 9571 0000D20F EB25 <1> jmp .end ; If not found, continue --> 9572 <1> 9573 <1> 9574 <1> ; INP: ah = multiplex number to check 9575 <1> ; ds = ss = cs 9576 <1> ; OUT: CY if multiplex number unused or no signature match, 9577 <1> ; bp, ah, ds unmodified 9578 <1> ; NC if match found, 9579 <1> ; ah = multiplex number (unmodified) 9580 <1> ; CHG: si, di, es, cx, dx 9581 <1> .check: 9582 0000D211 F606[A800]08 <1> testopt [internalflags4], dif4_int_2D_hooked 9583 0000D216 7406 <1> jz @F 9584 0000D218 3A26[6081] <1> cmp ah, byte [amis_multiplex_number] 9585 0000D21C 7416 <1> je .notfound ; do not use our own multiplexer --> 9586 <1> @@: 9587 0000D21E B000 <1> mov al, 00h ; AMIS installation check 9588 <1> %if _PM 9589 0000D220 E80EC1 <1> call call_int2D 9590 <1> %else 9591 <1> int 2Dh ; AMIS (or "DOS reserved" = iret if no AMIS present) 9592 <1> %endif 9593 0000D223 3CFF <1> cmp al, 0FFh 9594 0000D225 750D <1> jne .notfound 9595 0000D227 BE[1881] <1> mov si, debuggeramissig ; ds:si -> our AMIS name strings 9596 <1> %if _PM 9597 0000D22A E89DFF <1> call setes2dx 9598 <1> %else 9599 <1> mov es, dx ; es:di -> name strings of AMIS multiplexer that just answered 9600 <1> %endif 9601 0000D22D B90800 <1> mov cx, 8 ; Ignore description, only compare vendor and program name 9602 0000D230 F3A7 <1> repe cmpsw 9603 0000D232 7401 <1> je .checkret ; ZR, NC = match --> 9604 <1> .notfound: 9605 0000D234 F9 <1> stc ; NZ, CY no match 9606 <1> .checkret: 9607 0000D235 C3 <1> retn 9608 <1> 9609 <1> .end: 9610 0000D236 A3[1681] <1> mov word [debuggerfunction], ax 9611 <1> 9612 0000D239 1F <1> pop ds ; must be not using scratchsel ! 9613 <1> %if _PM 9614 0000D23A 5A <1> pop dx 9615 0000D23B E88CFF <1> call setes2dx ; this one uses scratchsel 9616 <1> %else 9617 <1> pop es 9618 <1> %endif 9619 0000D23E 5E <1> pop si 9620 0000D23F 5F <1> pop di 9621 0000D240 5A <1> pop dx 9622 0000D241 59 <1> pop cx 9623 <1> ; push ax 9624 0000D242 36A1[1681] <1> mov ax, word [ss:debuggerfunction] 9625 0000D246 85C0 <1> test ax, ax ; found the debugger ? 9626 0000D248 741F <1> jz @F ; no --> 9627 <1> %if _PM 9628 0000D24A E880BF <1> call ispm 9629 0000D24D 7512 <1> jnz .86m 9630 <1> [cpu 286] 9631 0000D24F 06 <1> push es ; es 9632 0000D250 E82C8B <1> call selector_to_segment ; convert to segment 9633 0000D253 1E <1> push ds ; ds 9634 0000D254 E8288B <1> call selector_to_segment ; convert to segment 9635 0000D257 6A2D <1> push word 2Dh ; int 2Dh 9636 0000D259 55 <1> push bp ; bp 9637 0000D25A E845C0 <1> call intcall_return_parameter_es_parameter_ds 9638 0000D25D 83C404 <1> add sp, 4 ; discard returned ds, es 9639 <1> __CPU__ 9640 0000D260 A9 <1> db __TEST_IMM16 ; (skip int) 9641 <1> %endif 9642 <1> .86m: 9643 0000D261 CD2D <1> int 2Dh ; call its Update IISP Header function 9644 0000D263 3CFF <1> cmp al, 0FFh ; supported ? 9645 0000D265 58 <1> pop ax 9646 0000D266 740D <1> je .ret ; yes. done --> 9647 0000D268 A8 <1> db __TEST_IMM8 ; (skip pop) 9648 <1> @@: 9649 0000D269 58 <1> pop ax ; restore ax, then do manual update 9650 <1> %if _PM 9651 0000D26A 50 <1> push ax 9652 0000D26B E82FFE <1> call push_if 9653 <1> %else 9654 <1> pushf 9655 <1> %endif 9656 0000D26E FA <1> cli ; try to rest while updating chain 9657 0000D26F A7 <1> cmpsw ; skip over first word (entrypoint) 9658 <1> ; (generally xxEBh or 0EA90h) 9659 0000D270 A5 <1> movsw 9660 0000D271 A5 <1> movsw ; transfer source ieNext to dest ieNext 9661 <1> %if _PM 9662 0000D272 E84BFE <1> call pop_if 9663 <1> %else 9664 <1> popf 9665 <1> %endif 9666 <1> .ret: 9667 0000D275 C3 <1> retn 9668 <1> 9669 <1> 9670 <1> ; INP: al = interrupt number 9671 <1> ; ds:si-> interrupt entry 9672 <1> ; dx = flag in word [options4 + 2] to force 9673 <1> ; dx = -1 to force unconditionally 9674 <1> ; OUT: es = ss 9675 <1> ; CY if unhooking failed, 9676 <1> ; ds:si preserved 9677 <1> ; NC if unhooking successful 9678 <1> ; CHG: ah, di, si 9679 <1> ; STT: ds = ss => data entry segment/selector 9680 <1> ; word [pspdbg] = data entry 86 Mode segment 9681 <1> UnhookInterruptForce: 9682 0000D276 E80F00 <1> call UnhookInterrupt 9683 0000D279 730C <1> jnc .ret 9684 0000D27B 83FAFF <1> cmp dx, -1 9685 0000D27E 7414 <1> je UnhookInterrupt.easy 9686 0000D280 8516[8A00] <1> test word [options4 + 2], dx 9687 0000D284 750E <1> jnz UnhookInterrupt.easy 9688 0000D286 F9 <1> stc 9689 <1> .ret: 9690 0000D287 C3 <1> retn 9691 <1> 9692 <1> 9693 <1> ; INP: al = interrupt number 9694 <1> ; ds:si-> interrupt entry 9695 <1> ; OUT: es = ss 9696 <1> ; CY if unhooking failed, 9697 <1> ; ds:si preserved 9698 <1> ; NC if unhooking successful 9699 <1> ; CHG: ah, di, si 9700 <1> ; STT: ds = ss => data entry segment/selector 9701 <1> ; word [pspdbg] = data entry 86 Mode segment 9702 <1> UnhookInterrupt: 9703 <1> ; UnhookInterruptSim (below) only checks if it's possible to unhook this interrupt. 9704 <1> ; This function really unhooks the interrupt if possible. 9705 <1> ; 9706 <1> ; This is to cover the situation when some of the hooked interrupts can unhook, 9707 <1> ; but some can't. If the uninstaller would start to unhook the interrupts and then 9708 <1> ; catch the interrupt that can't be unhooked the user would end up with a dead TSR 9709 <1> ; that's uninstalled halfway. Very bad. 9710 <1> ; 9711 <1> ; "Simulating" the unhooking first and checking if all interrupts can unhook 9712 <1> ; usually will not return such a state. 9713 0000D288 E82000 <1> call UnhookInterruptSim 9714 0000D28B 7215 <1> jc .ret ; bad. --> (CY) 9715 0000D28D 7405 <1> jz .easy 9716 <1> .hard: 9717 <1> ; "hard" case: UnhookInterruptSim has however already done the work, 9718 <1> ; so the hard case is here indeed easier than the easy case. 9719 0000D28F E848FF <1> call update_iisp_header ; copies our stored pointer into the other's entry 9720 0000D292 EB0D <1> jmp .ret_NC 9721 <1> .easy: 9722 0000D294 52 <1> push dx 9723 0000D295 53 <1> push bx 9724 0000D296 8B5404 <1> mov dx, word [si + ieNext + 2] 9725 0000D299 8B5C02 <1> mov bx, word [si + ieNext] ; get what we stored in the entry 9726 0000D29C E8F2FE <1> call set_86m_interrupt_handler ; easy case - just reset to the value stored 9727 0000D29F 5B <1> pop bx 9728 0000D2A0 5A <1> pop dx 9729 <1> .ret_NC: 9730 0000D2A1 F8 <1> clc 9731 <1> .ret: 9732 0000D2A2 16 <1> push ss 9733 0000D2A3 07 <1> pop es 9734 0000D2A4 C3 <1> retn 9735 <1> 9736 <1> 9737 <1> ; INP: al = interrupt number 9738 <1> ; ds:si-> interrupt entry 9739 <1> ; dx = flag in word [options4 + 2] to force 9740 <1> ; OUT: NC if no error (hard, easy, or forced case) 9741 <1> ; CY if error 9742 <1> ; CHG: ah, es, di 9743 <1> ; STT: ds = ss => data entry segment/selector 9744 <1> ; word [pspdbg] = data entry 86 Mode segment 9745 <1> UnhookInterruptForceSim: 9746 0000D2A5 8516[8A00] <1> test word [options4 + 2], dx 9747 0000D2A9 751D <1> jnz UnhookInterruptSim.retn ; --> (NC) 9748 <1> 9749 <1> 9750 <1> ; INP: ds:si-> IISP entry 9751 <1> ; al = interrupt number 9752 <1> ; OUT: NC if no error (either hard or easy case), 9753 <1> ; ZR if easy case, 9754 <1> ; ds:si-> our IISP entry, containing stored interrupt 9755 <1> ; NZ if hard case, 9756 <1> ; ds:si-> our IISP entry 9757 <1> ; es:di-> IISP entry to modify 9758 <1> ; implies dword [es:di + 2] = far pointer to ours 9759 <1> ; CY if error (not first handler and no IISP chain to this handler) 9760 <1> ; CHG: ah, es, di 9761 <1> ; STT: ds = ss => data entry segment/selector 9762 <1> ; word [pspdbg] = data entry 86 Mode segment 9763 <1> UnhookInterruptSim: 9764 0000D2AB 52 <1> push dx 9765 0000D2AC 53 <1> push bx 9766 <1> 9767 <1> ; harden this, check we are an IISP entry 9768 0000D2AD 1E <1> push ds 9769 0000D2AE 07 <1> pop es ; es => our handler segment 9770 0000D2AF 89F3 <1> mov bx, si ; es:bx -> our handler 9771 0000D2B1 E8A100 <1> call IsIISPEntry? ; does it have an IISP header ? 9772 0000D2B4 753D <1> jne .fail ; fail if not 9773 <1> 9774 0000D2B6 E89BFE <1> call get_86m_interrupt_handler ; get current vector 9775 0000D2B9 39DE <1> cmp si, bx ; our pointer ? 9776 0000D2BB 750C <1> jne .hard 9777 0000D2BD 3916[A60A] <1> cmp word [pspdbg], dx ; our segment ? 9778 0000D2C1 7506 <1> jne .hard 9779 <1> 9780 0000D2C3 80E400 <1> and ah, 00h ; NC, ZR 9781 0000D2C6 5B <1> pop bx 9782 0000D2C7 5A <1> pop dx 9783 <1> .retn: 9784 0000D2C8 C3 <1> retn 9785 <1> 9786 <1> .hard: 9787 <1> %if _PM 9788 0000D2C9 E8FEFE <1> call setes2dx 9789 <1> %else 9790 <1> mov es, dx 9791 <1> %endif 9792 <1> 9793 <1> ; INP: ds:si-> IISP entry 9794 <1> ; es:bx-> current interrupt entry 9795 <1> ; OUT: CY if error 9796 <1> ; NC, NZ if no error, 9797 <1> ; ds:si-> our IISP entry 9798 <1> ; es:di-> IISP entry to modify 9799 <1> ; implies dword [es:di + 2] = far pointer to ours 9800 <1> ; CHG: ah, es, di, (bx, dx) 9801 <1> ; STT: ds = ss => data entry segment/selector 9802 <1> ; word [pspdbg] = data entry 86 Mode segment 9803 0000D2CC E87000 <1> call SearchIISPChain 9804 0000D2CF 7508 <1> jne .harder 9805 <1> .found: ; found reference to our interrupt handler 9806 0000D2D1 89DF <1> mov di, bx ; es:di-> IISP entry that references our's 9807 0000D2D3 80CCFF <1> or ah, 0FFh ; NC, NZ 9808 0000D2D6 5B <1> pop bx 9809 0000D2D7 5A <1> pop dx 9810 0000D2D8 C3 <1> retn 9811 <1> 9812 <1> .harder: ; Desperate attempt to find IISP entry that references ours by 9813 <1> ; searching through the interrupts hooked by other AMIS TSRs. Note 9814 <1> ; that the plexer loop will find and search through the list of 9815 <1> ; hooked interrupts of the uninstalling TSR itself, but this causes 9816 <1> ; no trouble. 9817 <1> ; INP: ds:si-> IISP entry 9818 <1> ; OUT: CY if error 9819 <1> ; NC, NZ if no error, 9820 <1> ; ds:si-> our IISP entry 9821 <1> ; es:di-> IISP entry to modify 9822 <1> ; implies dword [es:di + 2] = far pointer to ours 9823 <1> ; CHG: ah, es, di, (bx, dx) 9824 <1> ; STT: ds = ss => data entry segment/selector 9825 <1> ; word [pspdbg] = data entry 86 Mode segment 9826 0000D2D9 50 <1> push ax ; register with interrupt number last 9827 <1> 9828 0000D2DA B02D <1> mov al, 2Dh 9829 0000D2DC E8A9FE <1> call intchk ; ZR if offset = -1 or segment = 0 9830 <1> ; CHG: ax, dx, bx 9831 0000D2DF 7411 <1> jz .fail_ax 9832 <1> 9833 0000D2E1 31C0 <1> xor ax, ax 9834 <1> .loopplex: 9835 0000D2E3 B000 <1> mov al, 00h ; AMIS installation check 9836 0000D2E5 51 <1> push cx 9837 <1> ; function 0 changes dx, di, cx, al 9838 <1> %if _PM 9839 0000D2E6 E848C0 <1> call call_int2D 9840 <1> %else 9841 <1> int 2Dh ; enquire whether there's anyone 9842 <1> %endif 9843 0000D2E9 59 <1> pop cx ; but we don't care who it might be 9844 0000D2EA FEC0 <1> inc al ; = FFh ? 9845 0000D2EC 7409 <1> jz .search ; yes, it is in use --> 9846 <1> .nextplex: 9847 0000D2EE FEC4 <1> inc ah 9848 0000D2F0 75F1 <1> jnz .loopplex ; try next multiplexer --> 9849 <1> .fail_ax: 9850 0000D2F2 58 <1> pop ax 9851 <1> .fail: ; IISP incompatible TSR between current interrupt entry and our entry 9852 <1> ; and no AMIS compatible TSR installed on top of our entry 9853 0000D2F3 F9 <1> stc 9854 0000D2F4 5B <1> pop bx 9855 0000D2F5 5A <1> pop dx 9856 0000D2F6 C3 <1> retn 9857 <1> 9858 <1> ; INP: ah = multiplex number of AMIS TSR to search through 9859 <1> ; ss:sp-> interrupt number (byte), must be preserved 9860 <1> ; CHG: es, di, dx, bx 9861 <1> .search: 9862 0000D2F7 B004 <1> mov al, 04h 9863 0000D2F9 5B <1> pop bx 9864 0000D2FA 53 <1> push bx ; low byte is the interrupt number 9865 <1> ; function 4 changes dx, bx, al 9866 <1> %if _PM 9867 0000D2FB E833C0 <1> call call_int2D 9868 <1> %else 9869 <1> int 2Dh 9870 <1> %endif 9871 0000D2FE 3C03 <1> cmp al, 03h ; returned its interrupt entry ? 9872 <1> ; RBIL doesn't explicitly state that this interrupt entry has to 9873 <1> ; be IISP compatible. But I'm too lazy to look up the older AMIS, 9874 <1> ; and SearchIISPChain checks the interrupt entry anyway. 9875 0000D300 742B <1> je .search_dxbx 9876 0000D302 3C04 <1> cmp al, 04h ; returned list of hooked interrupts ? 9877 0000D304 75E8 <1> jne .nextplex ; no, try next multiplexer --> 9878 0000D306 89DF <1> mov di, bx 9879 0000D308 5B <1> pop bx 9880 0000D309 53 <1> push bx ; bl = interrupt number 9881 0000D30A 88D8 <1> mov al, bl 9882 <1> .search_intlist_seg: 9883 <1> %if _PM 9884 0000D30C E8BBFE <1> call setes2dx 9885 <1> %else 9886 <1> mov es, dx ; es:di-> list 9887 <1> %endif 9888 <1> .search_intlist: ; Search the returned list for the required interrupt number. 9889 0000D30F AE <1> scasb ; our interrupt number ? 9890 0000D310 740A <1> je .search_found_intlist 9891 0000D312 26807DFF2D <1> cmp byte [es:di-1], 2Dh ; was last in list ? 9892 0000D317 74D5 <1> je .nextplex 9893 0000D319 AF <1> scasw ; skip pointer 9894 0000D31A EBF3 <1> jmp short .search_intlist ; try next entry --> 9895 <1> 9896 <1> .search_found_intlist: 9897 0000D31C 268B1D <1> mov bx, word [es:di] ; dx:bx = es:bx -> IISP entry 9898 0000D31F AF <1> scasw ; skip pointer 9899 0000D320 52 <1> push dx ; preserve dx for .search_intlist_seg 9900 0000D321 E81B00 <1> call SearchIISPChain 9901 0000D324 5A <1> pop dx 9902 0000D325 740E <1> je .search_found ; found entry --> 9903 <1> ; This specific jump supports TSRs that hook the same 9904 <1> ; interrupt more than once; jumping to .nextplex instead 9905 <1> ; (as previously) aborts the search after the first match 9906 <1> ; in the interrupt list. This support might become useful. 9907 0000D327 3C2D <1> cmp al, 2Dh ; was last in list ? 9908 0000D329 74C3 <1> je .nextplex 9909 0000D32B EBDF <1> jmp short .search_intlist_seg 9910 <1> 9911 <1> .search_dxbx: 9912 <1> %if _PM 9913 0000D32D E89AFE <1> call setes2dx 9914 <1> %else 9915 <1> mov es, dx ; es:bx-> (IISP) interrupt entry 9916 <1> %endif 9917 <1> ; The entry we found now is possibly behind the non-IISP entry that 9918 <1> ; terminated our first SearchIISPChain call (at .hard). We then 9919 <1> ; possibly might find our entry in this hidden part of the chain. 9920 0000D330 E80C00 <1> call SearchIISPChain 9921 0000D333 75B9 <1> jne .nextplex ; didn't find our entry in the chain --> 9922 <1> .search_found: 9923 0000D335 58 <1> pop ax 9924 0000D336 EB99 <1> jmp short .found 9925 <1> 9926 <1> 9927 <1> SearchIISPChain.next: 9928 <1> %if _PM 9929 <1> ; dx already next segment 9930 0000D338 268B5F02 <1> mov bx, word [es:bx + ieNext] ; get next offset 9931 0000D33C E88BFE <1> call setes2dx ; point es:bx -> next handler 9932 <1> %else 9933 <1> les bx, [es:bx + ieNext] ; get next interrupt entry 9934 <1> %endif 9935 <1> 9936 <1> ; INP: ds:si-> IISP entry 9937 <1> ; es:bx-> current interrupt entry 9938 <1> ; OUT: NZ if reference to ds:si not found in IISP chain es:bx-> 9939 <1> ; ZR if reference found, 9940 <1> ; es:bx-> IISP (or uninstalled iHPFS) interrupt entry with reference 9941 <1> ; CHG: es, bx, dx 9942 <1> SearchIISPChain: 9943 0000D33F E81300 <1> call IsIISPEntry? ; that an IISP entry ? 9944 0000D342 7510 <1> jnz .return ; nope --> (NZ) 9945 0000D344 268B5704 <1> mov dx, word [es:bx + ieNext + 2] ; (for _PM: dx = next segment) 9946 0000D348 263B7702 <1> cmp si, word [es:bx + ieNext] ; our offset ? 9947 0000D34C 75EA <1> jne .next ; no, try next --> 9948 0000D34E 3B16[A60A] <1> cmp dx, word [pspdbg] ; our segment ? 9949 0000D352 75E4 <1> jne .next ; no, try next --> 9950 <1> .return: ; yes, found (ZR) 9951 0000D354 C3 <1> retn 9952 <1> 9953 <1> 9954 <1> ; INP: es:bx-> interrupt entry 9955 <1> ; OUT: NZ if non-IISP entry 9956 <1> ; ZR if IISP entry 9957 <1> IsIISPEntry?: 9958 0000D355 83FBF8 <1> cmp bx, - (ieSignature + 2) ; may access word at offset FFFFh ? 9959 0000D358 7728 <1> ja .return ; yes, avoid --> (NZ) 9960 0000D35A 26817F064B42 <1> cmp word [ es:bx + ieSignature ], "KB" ; "KB"/424Bh ? ("BK" in MASM) 9961 0000D360 7520 <1> jne .return 9962 0000D362 26813F90EA <1> cmp word [ es:bx + ieEntry ], 0EA90h ; nop\jmp far imm16:imm16 ? 9963 0000D367 7419 <1> je .return ; unused IISP entry (created by iHPFS) --> 9964 0000D369 26803FEB <1> cmp byte [ es:bx + ieEntry ], 0EBh ; jmp short ... ? 9965 <1> ; (This opcode should strictly be jmp short $+18 but there's programs 9966 <1> ; that save an additional jmp opcode by jumping directly into their 9967 <1> ; code even though it's not right behind the header.) 9968 0000D36D 7513 <1> jne .return 9969 0000D36F 26807F09EB <1> cmp byte [ es:bx + ieJmphwreset ], 0EBh ; jmp short ... ? 9970 0000D374 740C <1> je .return ; usual IISP entry --> 9971 0000D376 26807F09CB <1> cmp byte [ es:bx + ieJmphwreset ], 0CBh ; retf ? 9972 0000D37B 7405 <1> je .return ; a shorter variant --> 9973 0000D37D 26807F09CF <1> cmp byte [ es:bx + ieJmphwreset ], 0CFh ; iret ? 9974 <1> .return: 9975 0000D382 C3 <1> retn 9976 <1> 9977 <1> 9978 <1> update_inttab_optional: 9979 0000D383 50 <1> push ax 9980 0000D384 53 <1> push bx 9981 0000D385 51 <1> push cx 9982 0000D386 52 <1> push dx 9983 0000D387 56 <1> push si 9984 0000D388 BE[120C] <1> mov si, inttab_optional 9985 0000D38B BB[310C] <1> mov bx, inttab 9986 <1> .loop: 9987 0000D38E AD <1> lodsw 9988 0000D38F 83F8FF <1> cmp ax, -1 9989 0000D392 7415 <1> je .end 9990 0000D394 91 <1> xchg ax, cx 9991 0000D395 AD <1> lodsw 9992 0000D396 91 <1> xchg ax, cx 9993 0000D397 92 <1> xchg ax, dx 9994 0000D398 AD <1> lodsw 9995 0000D399 92 <1> xchg ax, dx 9996 0000D39A 8516[A800] <1> test word [internalflags4], dx 9997 0000D39E 7407 <1> jz .next 9998 0000D3A0 4B <1> dec bx 9999 0000D3A1 4B <1> dec bx 10000 0000D3A2 890F <1> mov word [bx], cx 10001 0000D3A4 4B <1> dec bx 10002 0000D3A5 8807 <1> mov byte [bx], al 10003 <1> .next: 10004 0000D3A7 EBE5 <1> jmp .loop 10005 <1> 10006 <1> .end: 10007 0000D3A9 891E[260C] <1> mov word [amisintr_offset], bx 10008 0000D3AD 5E <1> pop si 10009 0000D3AE 5A <1> pop dx 10010 0000D3AF 59 <1> pop cx 10011 0000D3B0 5B <1> pop bx 10012 0000D3B1 58 <1> pop ax 10013 0000D3B2 C3 <1> retn 9310 9311 9312 usesection lDEBUG_CODE 9313 9314 %if _BOOTLDR 9315 ; Determine the amount of actual memory 9316 ; 9317 ; This is important to call at the time we need the size, 9318 ; not just save the size initially. Loading other pre-boot 9319 ; installers or RPLs will change the size. 9320 ; 9321 ; INP: - 9322 ; OUT: dx = segment behind usable memory (taking EBDAs & RPLs into account) 9323 ; ds = ss 9324 ; CHG: ax, cx, di, si, ds 9325 bootgetmemorysize: 9326 0000D3B3 06 push es 9327 0000D3B4 31C0 xor ax, ax 9328 0000D3B6 8ED8 mov ds, ax 9329 0000D3B8 CD12 int 12h ; get memory size in KiB 9330 0000D3BA B106 mov cl, 6 9331 0000D3BC D3E0 shl ax, cl ; *64, convert to paragraphs 9332 0000D3BE 50 push ax 9333 0000D3BF C536BC00 lds si, [ 2Fh *4 ] ; get current Int2F 9334 0000D3C3 46 inc si ; pointer valid (not 0FFFFh) ? (left increased!) 9335 0000D3C4 741B jz .norpl ; no --> 9336 0000D3C6 8CD8 mov ax, ds 9337 0000D3C8 85C0 test ax, ax ; segment valid (not zero) ? 9338 0000D3CA 7415 jz .norpl ; no --> 9339 0000D3CC 46 times 2 inc si ; +3 with above inc 9340 0000D3CE 0E push cs 9341 0000D3CF 07 pop es 9342 0000D3D0 BF[E6D3] mov di, .rpl 9343 0000D3D3 B90300 mov cx, .rpl_size 9344 0000D3D6 F3A6 repe cmpsb ; "RPL" signature ? 9345 0000D3D8 7507 jne .norpl ; no --> 9346 0000D3DA 5A pop dx 9347 0000D3DB B8064A mov ax, 4A06h 9348 0000D3DE CD2F int 2Fh ; adjust usable memory size for RPL 9349 0000D3E0 A8 db __TEST_IMM8 ; (skip pop) 9350 .norpl: 9351 0000D3E1 5A pop dx 9352 ; dx = segment behind last available memory 9353 0000D3E2 16 push ss 9354 0000D3E3 1F pop ds 9355 0000D3E4 07 pop es 9356 0000D3E5 C3 retn 9357 9358 0000D3E6 52504C .rpl: db "RPL" 9359 endarea .rpl 9360 %endif 9361 9362 9363 ;--- ensure a debuggee is loaded 9364 ;--- set SI:DI to CS:IP, preserve AX, BX, DX 9365 9366 ensuredebuggeeloaded: 9367 0000D3E9 50 push ax 9368 0000D3EA F606[9E00]80 testopt [internalflags], attachedterm 9369 0000D3EF 7502 jnz @F ; not loaded, create --> 9370 0000D3F1 58 pop ax 9371 0000D3F2 C3 retn ; done 9372 9373 @@: 9374 0000D3F3 53 push bx 9375 0000D3F4 52 push dx 9376 9377 0000D3F5 E81101 call set_efl_to_fl ; initialize EFL, and ax = 0 9378 0000D3F8 BF[640C] mov di, regs 9379 0000D3FB B91E00 mov cx, 15*2 ; (8 standard + 6 seg + eip) * 2 9380 0000D3FE F3AB rep stosw ; initialize all regs 9381 %if _BOOTLDR 9382 0000D400 F606[9D00]40 testopt [internalflags], nodosloaded 9383 0000D405 7444 jz .dos 9384 0000D407 B86000 mov ax, 60h 9385 0000D40A 50 push ax 9386 0000D40B BF[840C] mov di, reg_ds 9387 0000D40E AB stosw 9388 0000D40F AF scasw ; (skip dummy high word) 9389 0000D410 AB stosw 9390 0000D411 AF scasw 9391 0000D412 AB stosw 9392 0000D413 AF scasw 9393 0000D414 AB stosw 9394 0000D415 E867C1 call adusetup 9395 0000D418 E898FF call bootgetmemorysize 9396 0000D41B 83EA60 sub dx, 60h 9397 0000D41E 81FA0010 cmp dx, 1000h 9398 0000D422 7602 jbe .bootbelow64kib ; if memory left <= 64 KiB 9399 0000D424 31D2 xor dx, dx ; dx = 1000h (same thing, after shifting) 9400 .bootbelow64kib: 9401 0000D426 B104 mov cl, 4 9402 0000D428 D3E2 shl dx, cl 9403 0000D42A 4A dec dx 9404 0000D42B 4A dec dx 9405 0000D42C 8916[740C] mov word [reg_esp], dx 9406 0000D430 07 pop es 9407 0000D431 87D7 xchg dx, di ; es:di = child stack pointer 9408 0000D433 31C0 xor ax, ax 9409 0000D435 AB stosw ; push 0 on client's stack 9410 9411 0000D436 803E[DE0B]00 cmp byte [bInit], 0 9412 0000D43B 750B jnz .bootnomemtouch 9413 0000D43D FE06[DE0B] inc byte [bInit] 9414 0000D441 26C7060000CD19 mov word [es:0], 019CDh ; place opcode for int 19h at cs:ip 9415 .bootnomemtouch: 9416 0000D448 E9AB00 jmp .return 9417 9418 .dos: 9419 %endif 9420 0000D44B C606[9D0C]01 mov byte [reg_eip+1], 100h>>8 9421 0000D450 B448 mov ah, 48h ; get size of largest free block 9422 0000D452 BBFFFF mov bx, -1 9423 0000D455 CD21 int 21h 9424 0000D457 83FB11 cmp bx, 11h ; enough for PSP + one paragraph for code/stack ? 9425 0000D45A 7303E99700 jb .return ; no --> 9426 0000D45F B448 mov ah, 48h ; allocate it 9427 0000D461 CD21 int 21h 9428 0000D463 7303E98E00 jc .return ; (memory taken between the calls) 9429 9430 0000D468 53 push bx 9431 0000D469 BF[840C] mov di, reg_ds ; fill segment registers ds,es,ss,cs 9432 0000D46C AB stosw 9433 0000D46D AF scasw ; (skip dummy high word) 9434 0000D46E AB stosw 9435 0000D46F AF scasw 9436 0000D470 AB stosw 9437 0000D471 AF scasw 9438 0000D472 AB stosw 9439 0000D473 E809C1 call adusetup 9440 0000D476 8B1E[900C] mov bx, word [reg_cs] ; bx:dx = where to load program 9441 0000D47A 8EC3 mov es, bx 9442 0000D47C 58 pop ax ; get size of memory block 9443 0000D47D 89C2 mov dx, ax 9444 0000D47F 01DA add dx, bx 9445 0000D481 2689160200 mov word [es:ALASAP], dx 9446 0000D486 3D0010 cmp ax, 1000h 9447 0000D489 7602 jbe .below64kib ; if memory left <= 64 KiB 9448 0000D48B 31C0 xor ax, ax ; ax = 1000h (same thing, after shifting) 9449 .below64kib: 9450 0000D48D B104 mov cl, 4 9451 0000D48F D3E0 shl ax, cl 9452 0000D491 48 dec ax 9453 0000D492 48 dec ax 9454 0000D493 A3[740C] mov word [reg_esp], ax 9455 0000D496 97 xchg ax, di ; es:di = child stack pointer 9456 0000D497 31C0 xor ax, ax 9457 0000D499 AB stosw ; push 0 on client's stack 9458 9459 ; Create a PSP 9460 0000D49A B455 mov ah, 55h ; create child PSP 9461 0000D49C 8CC2 mov dx, es 9462 0000D49E 268B360200 mov si, word [es:ALASAP] 9463 0000D4A3 F8 clc ; works around OS/2 bug 9464 0000D4A4 CD21 int 21h 9465 0000D4A6 E82FBD call setpspdbg ; reset PSP to ours 9466 9467 ; Finish up. Set termination address. 9468 0000D4A9 B82225 mov ax, 2522h ; set interrupt vector 22h 9469 0000D4AC BA[D085] mov dx, int22 9470 0000D4AF CD21 int 21h 9471 0000D4B1 2689160A00 mov word [es:TPIV], dx 9472 0000D4B6 268C1E0C00 mov word [es:TPIV+2], ds 9473 9474 0000D4BB 803E[DE0B]00 cmp byte [bInit], 0 9475 0000D4C0 750A jnz .nomemtouch 9476 0000D4C2 FE06[DE0B] inc byte [bInit] 9477 0000D4C6 26C6060001C3 mov byte [es:100h], 0C3h ; place opcode for retn at cs:ip 9478 .nomemtouch: 9479 9480 0000D4CC 8C06[A40A] mov word [pspdbe], es 9481 0000D4D0 8CC0 mov ax, es 9482 0000D4D2 48 dec ax 9483 0000D4D3 8EC0 mov es, ax 9484 0000D4D5 40 inc ax 9485 0000D4D6 26C70608004445 mov word [es:8+0], "DE" 9486 0000D4DD 26C7060A004255 mov word [es:8+2], "BU" 9487 0000D4E4 26C7060C004747 mov word [es:8+4], "GG" 9488 0000D4EB 26C7060E004545 mov word [es:8+6], "EE" ; set MCB name 9489 0000D4F2 26A30100 mov word [es:1], ax ; set MCB owner 9490 .return: 9491 0000D4F6 8026[9E00]7F clropt [internalflags], attachedterm 9492 0000D4FB 16 push ss 9493 0000D4FC 07 pop es 9494 9495 0000D4FD 8B36[900C] mov si, word [reg_cs] 9496 0000D501 8B3E[9C0C] mov di, word [reg_eip] 9497 0000D505 5A pop dx 9498 0000D506 5B pop bx 9499 0000D507 58 pop ax 9500 0000D508 C3 retn 9501 9502 9503 set_efl_to_fl: 9504 0000D509 31C0 xor ax, ax ; initialize ax = 0 and FL = ZR NC etc 9505 0000D50B 50 _no386 push ax ; dummy high word 9506 0000D50C 66 _386_o32 ; pushfd 9507 0000D50D 9C pushf 9508 0000D50E 8F06[A00C] pop word [reg_efl] ; set to FL 9509 0000D512 8F06[A20C] pop word [reg_efl+2] ; set to high word of EFL, or zero 9510 0000D516 C3 retn 9511 9512 9513 %if _PM 9514 ; Hook Int2F if a DPMI host is found. However for Win9x and DosEmu 9515 ; Int2F.1687 is not hooked because it doesn't work. Debugging in 9516 ; protected mode may still work, but the initial switch must be 9517 ; single-stepped. 9518 ; 9519 ; CHG: ax, bx, cx, dx, di, es 9520 ; STT: V86/RM 9521 ; ss = ds = debugger data segment 9522 hook2F: 9523 0000D517 E88ED1 call InDos 9524 0000D51A 7403E99A00 jnz .return 9525 0000D51F F606[9D00]01 testopt [internalflags], hooked2F 9526 0000D524 7403E99000 jnz .return ; don't hook now --> 9527 .loop: 9528 %if _GUARD_86M_INT2F 9529 0000D529 06 push es 9530 0000D52A 31C0 xor ax, ax 9531 0000D52C 8EC0 mov es, ax ; (only used in 86 Mode) 9532 0000D52E 26A1BC00 mov ax, [es:2Fh * 4] 9533 0000D532 83F8FF cmp ax, -1 9534 0000D535 7405 je @F ; --> (ZR) 9535 0000D537 260B06BE00 or ax, [es:2Fh * 4 + 2] 9536 @@: 9537 0000D53C 07 pop es 9538 0000D53D 747A jz .return 9539 %endif 9540 0000D53F B88716 mov ax, 1687h ; DPMI host installed? 9541 0000D542 CD2F int 2Fh 9542 0000D544 85C0 test ax, ax 9543 0000D546 7571 jnz .return 9544 0000D548 893E[B888] mov word [dpmientry+0], di ; true host DPMI entry 9545 0000D54C 8C06[BA88] mov word [dpmientry+2], es 9546 0000D550 893E[BC88] mov word [dpmiwatch+0], di 9547 0000D554 8C06[BE88] mov word [dpmiwatch+2], es 9548 0000D558 F606[9D00]02 testopt [internalflags], nohook2F 9549 0000D55D 755A jnz .return ; can't hook Int2F --> 9550 0000D55F F606[8800]02 testopt [options4], opt4_int_2F_hook 9551 0000D564 7453 jz .return ; requested to not hook --> 9552 0000D566 B82F35 mov ax, 352Fh 9553 0000D569 CD21 int 21h 9554 0000D56B 891E[4289] mov word [oldi2F+0], bx 9555 0000D56F 8C06[4489] mov word [oldi2F+2], es 9556 0000D573 BA[4089] mov dx, debug2F ; ds => lDEBUG_DATA_ENTRY 9557 0000D576 B82F25 mov ax, 252Fh 9558 0000D579 CD21 int 21h 9559 9560 ; Test whether we can hook the DPMI entrypoint call. 9561 0000D57B B88716 mov ax, 1687h 9562 0000D57E CD2F int 2Fh 9563 0000D580 85C0 test ax, ax 9564 0000D582 7538 jnz .nohost 9565 0000D584 81FF[7689] cmp di, mydpmientry ; our entrypoint returned ? 9566 0000D588 7532 jne .nohook 9567 0000D58A 8CC0 mov ax, es 9568 0000D58C 8CDB mov bx, ds ; bx => lDEBUG_DATA_ENTRY 9569 0000D58E 39D8 cmp ax, bx 9570 0000D590 752A jne .nohook ; no --> 9571 9572 0000D592 C706[BC88][7689] mov word [dpmiwatch+0], mydpmientry 9573 0000D598 8C1E[BE88] mov word [dpmiwatch+2], ds ; => lDEBUG_DATA_ENTRY 9574 9575 0000D59C 800E[9D00]01 setopt [internalflags], hooked2F 9576 0000D5A1 800E[A800]02 setopt [internalflags4], dif4_int_2F_hooked 9577 0000D5A6 E8DAFD call update_inttab_optional 9578 %if _DISPHOOK 9579 0000D5A9 8CD8 mov ax, ds ; ax => lDEBUG_DATA_ENTRY 9580 0000D5AB 1E push ds 9581 0000D5AC 07 pop es 9582 0000D5AD BF[617C] mov di, dpmihookcs 9583 0000D5B0 E83BE4 call hexword 9584 0000D5B3 BA[447C] mov dx, dpmihook 9585 0000D5B6 E8EBE7 call putsz 9586 %endif 9587 .return: 9588 0000D5B9 1E push ds 9589 0000D5BA 07 pop es 9590 0000D5BB C3 retn 9591 9592 .nohost: 9593 .nohook: 9594 0000D5BC C516[4289] lds dx, [oldi2F] 9595 0000D5C0 B82F25 mov ax, 252Fh 9596 0000D5C3 CD21 int 21h ; unhook 9597 0000D5C5 16 push ss 9598 0000D5C6 1F pop ds 9599 0000D5C7 16 push ss 9600 0000D5C8 07 pop es ; restore segregs 9601 0000D5C9 800E[9D00]02 setopt [internalflags], nohook2F 9602 ; note that we cannot hook 9603 0000D5CE BA[6D7C] mov dx, msg.dpmi_no_hook 9604 0000D5D1 E8D0E7 call putsz ; display message about it 9605 0000D5D4 E952FF jmp .loop 9606 %endif 9607 9608 9609 usesection lDEBUG_DATA_ENTRY 9610 align 16, db 0 9611 ldebug_data_entry_size equ $-section.lDEBUG_DATA_ENTRY.vstart 9612 endarea ldebug_data_entry, 1 9613 9614 usesection ASMTABLE1 9615 000016BA 00 align 16, db 0 9616 asmtable1_size equ $-section.ASMTABLE1.vstart 9617 endarea asmtable1, 1 9618 9619 usesection ASMTABLE2 9620 00000897 00 align 16, db 0 9621 asmtable2_size equ $-section.ASMTABLE2.vstart 9622 endarea asmtable2, 1 9623 9624 9625 numdef SHOWASMTABLESIZE, 0 9626 %if _SHOWASMTABLESIZE 9627 %assign ASMTABLESIZE asmtable1_size + asmtable2_size 9628 %warning asmtables hold ASMTABLESIZE bytes 9629 %endif 9630 9631 9632 usesection DATASTACK 9633 %define SECTIONFIXUP -$$+100h+ldebug_data_entry_size +asmtable1_size+asmtable2_size 9635 9636 ; I/O buffers 9637 alignb 2 9638 00000000 ?? line_in: resb 1 ; maximal length of input line 9639 00000001 ?? resb 1 ; actual length (must be one less than previous byte) 9640 00000002 resb 255 ; buffer for 13-terminated input line 9641 .end: 9642 ; zero-initialisation starts here 9643 ..@init_first: 9644 ; b_bplist and g_bplist are expected in that order by initcont 9645 %if _BREAKPOINTS 9646 00000101 ?? alignb 2 9647 b_bplist: 9648 00000102 ???? .used_mask: resb (_NUM_B_BP+7)>>3 ; bitmask of used points 9649 00000104 ???? .disabled_mask: resb (_NUM_B_BP+7)>>3 ; bitmask of disabled points 9650 %if _BREAKPOINTS_STICKY 9651 .sticky_mask: resb (_NUM_B_BP+7)>>3 ; bitmask of sticky points 9652 ; desc: stay around during DEBUG's operation unless 9653 ; explicitly removed/un-stickified. This allows 9654 ; to keep breakpoints around while changing from PM. 9655 ; Hits while in DEBUG are ignored though, use DDEBUG. 9656 ; Disabling won't remove them, just ignores hits. 9657 %endif 9658 alignb 2 9659 00000106 .bp: resb _NUM_B_BP*BPSIZE 9660 alignb 2 9661 00000196 .counter: resw _NUM_B_BP 9662 alignb 2 9663 000001B6 .id: resw _NUM_B_BP ; array of lengths/offsets, 0 = unused 9664 ; low 10 bits = offset into .idbuffer (0..1023) 9665 ; high 6 bits = length (0..63, 0 if unused) 9666 alignb 2 9667 000001D6 .when: resw _NUM_B_BP ; array of pointers, 0 = unused 9668 9669 .idbuffer.length: equ _NUM_B_ID_BYTES 9670 .idbuffer.free: 9671 000001F6 ???? resw 1 ; offset into .idbuffer of free space 9672 ; (0..1024) 9673 9674 .whenbuffer.length: equ _NUM_B_WHEN_BYTES 9675 .whenbuffer.free: 9676 000001F8 ???? resw 1 ; *offset* into .whenbuffer 9677 ; (not a pointer) 9678 9679 .idbuffer: 9680 000001FA resb .idbuffer.length ; buffer holding ID strings 9681 .whenbuffer: 9682 0000037A resb .whenbuffer.length ; buffer holding condition strings 9683 %endif 9684 %if _NUM_G_BP 9685 0000077A ?? resb 1 - (($-$$) % 2) ; make g_bplist.bp aligned 9686 g_bplist: 9687 0000077B ?? .used_count: resb 1 ; for the byte counter of saved breakpoints 9688 0000077C .bp: resb _NUM_G_BP*BPSIZE 9689 .end: 9690 %endif 9691 %if _HISTORY && ! _HISTORY_SEPARATE_FIXED 9692 historybuffer: resb _HISTORY_SIZE 9693 .end: 9694 %endif 9695 9696 ; $ - $$ = offset into section 9697 ; % 2 = 1 if odd offset, 0 if even 9698 ; 2 - = 1 if odd, 2 if even 9699 ; % 2 = 1 if odd, 0 if even 9700 ; resb (2 - (($-$$) % 2)) % 2 9701 ; $ - $$ = offset into section 9702 ; % 2 = 1 if odd offset, 0 if even 9703 ; 1 - = 0 if odd, 1 if even 9704 0000080C ?? resb 1 - (($-$$) % 2) ; make line_out aligned 9705 0000080D ?? trim_overflow: resb 1 ; actually part of line_out to avoid overflow of trimputs loop 9706 0000080E line_out: resb 263 9707 00000915 ?? resb 1 ; reserved for terminating zero 9708 line_out_end: 9709 alignb 2 9710 00000916 ???? line_out_overflow: resw 1 ; 2642h if line_out didn't overflow 9711 9712 alignb 2 9713 00000918 ???? serial_save_irq_mask: resw 1 9714 0000091A ???? serial_save_irq_off: resw 1 9715 0000091C ???? serial_save_dl: resw 1 9716 0000091E ?? serial_save_ier: resb 1 9717 0000091F ?? serial_save_lcr: resb 1 9718 00000920 ?? serial_save_mcr: resb 1 9719 %if _USE_TX_FIFO 9720 00000921 ?? serial_fcr_setting: resb 1 9721 %endif 9722 00000922 ?? serial_use_intnum: resb 1 9723 00000923 ?? serial_use_params: resb 1 9724 00000924 ?? serial_use_fifo: resb 1 9725 00000925 ?? alignb 2 9726 baseport: 9727 00000926 ???? serial_use_baseport: resw 1 9728 00000928 ???? serial_use_dl: resw 1 9729 0000092A ???? serial_use_irqmask: resw 1 9730 9731 alignb 2 9732 0000092C ???? rxhead: resw 1 9733 0000092E ???? rxtail: resw 1 9734 00000930 ???? txhead: resw 1 9735 00000932 ???? txtail: resw 1 9736 00000934 alignb 16 9737 00000940 rxfifo: resb _RXFIFOSIZE 9738 alignb 16 9739 000009C0 txfifo: resb _TXFIFOSIZE 9740 9741 ; zero-initialisation ends here 9742 ..@init_behind: 9743 9744 alignb 16 ; stack might be re-used as GDT, so align it on a paragraph 9745 00000A40 stack: resb _STACKSIZE 9746 alignb 2 ; ensure stack aligned 9747 stack_end: 9748 9749 datastack_size equ $-section.DATASTACK.vstart 9750 endarea datastack, 1 9751 9752 9753 usesection INIT 9754 initstart: 9755 9756 %include "init.asm" 9757 <1> 9758 <1> %if 0 9759 <1> 9760 <1> lDebug initialisation 9761 <1> 9762 <1> Copyright (C) 1995-2003 Paul Vojta 9763 <1> Copyright (C) 2008-2012 C. Masloch 9764 <1> 9765 <1> Usage of the works is permitted provided that this 9766 <1> instrument is retained with the works, so that any entity 9767 <1> that uses the works is notified of this instrument. 9768 <1> 9769 <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 9770 <1> 9771 <1> %endif 9772 <1> 9773 <1> 9774 <1> usesection INIT 9775 <1> 9776 <1> initcode: 9777 <1> %if ($ - $$) != 0 9778 <1> %fatal initcode expected at start of section 9779 <1> %endif 9780 <1> 9781 00000000 8CD0 <1> mov ax, ss 9782 00000002 8CDA <1> mov dx, ds 9783 00000004 29D0 <1> sub ax, dx 9784 00000006 31D2 <1> xor dx, dx 9785 00000008 B90400 <1> mov cx, 4 9786 <1> @@: 9787 0000000B D1E0 <1> shl ax, 1 9788 0000000D D1D2 <1> rcl dx, 1 9789 0000000F E2FA <1> loop @B 9790 <1> 9791 00000011 50 <1> push ax ; (if sp was zero) 9792 <1> 9793 00000012 01E0 <1> add ax, sp 9794 00000014 83D200 <1> adc dx, 0 9795 00000017 83C00F <1> add ax, 15 9796 0000001A 83D200 <1> adc dx, 0 9797 <1> 9798 0000001D 24F0 <1> and al, ~15 9799 <1> 9800 0000001F 83FA02 <1> cmp dx, NONBOOTINITSTACK_END >> 16 9801 00000022 771B <1> ja .stackdownfirst 9802 00000024 7205 <1> jb .memupfirst 9803 00000026 3D400E <1> cmp ax, NONBOOTINITSTACK_END & 0FFFFh 9804 00000029 7314 <1> jae .stackdownfirst 9805 <1> .memupfirst: 9806 0000002B BBE420 <1> mov bx, paras(NONBOOTINITSTACK_END) 9807 0000002E B44A <1> mov ah, 4Ah 9808 00000030 CD21 <1> int 21h 9809 00000032 730B <1> jnc @F 9810 <1> .memfail: 9811 00000034 BA[0D08] <1> mov dx, imsg.early_mem_fail 9812 <1> .earlyfail: 9813 00000037 E8A70C <1> call init_putsz_cs 9814 0000003A B8FF4C <1> mov ax, 4CFFh 9815 0000003D CD21 <1> int 21h 9816 <1> 9817 <1> @@: 9818 <1> .stackdownfirst: 9819 0000003F 8CD8 <1> mov ax, ds 9820 00000041 05C420 <1> add ax, paras(NONBOOTINITSTACK_START) 9821 00000044 FA <1> cli 9822 00000045 8ED0 <1> mov ss, ax 9823 00000047 BC0002 <1> mov sp, NONBOOTINITSTACK_SIZE 9824 0000004A FB <1> sti 9825 <1> 9826 <1> ; if jumped to .stackdownfirst: now, shrink our memory block 9827 <1> ; else: no-op (already grew or shrunk block) 9828 0000004B BBE420 <1> mov bx, paras(NONBOOTINITSTACK_END) 9829 0000004E B44A <1> mov ah, 4Ah 9830 00000050 CD21 <1> int 21h 9831 00000052 72E0 <1> jc .memfail 9832 <1> 9833 <1> 9834 00000054 8CD8 <1> mov ax, ds 9835 00000056 05D418 <1> add ax, paras(INITSECTIONOFFSET) 9836 00000059 8CDA <1> mov dx, ds 9837 0000005B 81C29A1F <1> add dx, paras(NONBOOTINITTARGET) 9838 0000005F B92A01 <1> mov cx, init_size_p 9839 00000062 E8EB0B <1> call init_movp 9840 <1> 9841 00000065 52 <1> push dx 9842 00000066 E89100 <1> call init_retf 9843 <1> 9844 00000069 8CDB <1> mov bx, ds 9845 0000006B 89DA <1> mov dx, bx 9846 0000006D 81C39819 <1> add bx, paras(AUXTARGET1) 9847 00000071 81C2380C <1> add dx, paras(CODETARGET1) 9848 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 9849 00000075 89D8 <1> mov ax, bx 9850 00000077 050102 <1> add ax, paras(auxbuff_size) 9851 <1> CODETARGET1_equ equ CODETARGET1 9852 <1> CODETARGET2_equ equ CODETARGET2 9853 <1> AUXTARGET1_equ equ AUXTARGET1 9854 <1> AUXTARGET2_equ equ AUXTARGET2 9855 <1> %if AUXTARGET1_equ <= CODETARGET1_equ 9856 <1> %assign nn AUXTARGET1_equ 9857 <1> %assign mm CODETARGET1_equ 9858 <1> %error Unexpected layout aux = nn code = mm 9859 <1> %endif 9860 <1> %endif 9861 0000007A 89D1 <1> mov cx, dx 9862 0000007C E87C00 <1> call init_check_auxbuff 9863 0000007F 742F <1> jz @F 9864 <1> 9865 00000081 8CDB <1> mov bx, ds 9866 00000083 89DA <1> mov dx, bx 9867 00000085 81C3380C <1> add bx, paras(AUXTARGET2) 9868 00000089 81C2390E <1> add dx, paras(CODETARGET2) 9869 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 9870 <1> ldebug_code_size_equ equ ldebug_code_size 9871 <1> auxbuff_size_equ equ auxbuff_size 9872 <1> %if (paras(AUXTARGET1_equ) + paras(auxbuff_size_equ)) != (paras(CODETARGET2_equ) + paras(ldebug_code_size_equ)) 9874 <1> %error Unexpected layout 9875 <1> %endif 9876 <1> %endif 9877 0000008D E86B00 <1> call init_check_auxbuff 9878 00000090 741E <1> jz @F 9879 <1> 9880 <1> ; If both prior attempts failed, we allocate 9881 <1> ; an additional 8 KiB and move the buffer to 9882 <1> ; that. This should always succeed. 9883 00000092 2EC706[0008]9A1F <1> mov word [cs:memsize], paras(AUXTARGET3 + auxbuff_size + historysegment_size) 9886 <1> ; enlarge the final memory block size 9887 <1> 9888 00000099 8CDB <1> mov bx, ds 9889 0000009B 81C3991B <1> add bx, paras(AUXTARGET3) 9890 0000009F 89CA <1> mov dx, cx 9891 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 9892 000000A1 89D8 <1> mov ax, bx 9893 000000A3 050102 <1> add ax, paras(auxbuff_size) 9894 <1> %endif 9895 000000A6 E85200 <1> call init_check_auxbuff 9896 000000A9 7405 <1> jz @F 9897 <1> 9898 <1> ; Because this shouldn't happen, this is 9899 <1> ; considered an internal error. 9900 000000AB BA[3308] <1> mov dx, imsg.early_reloc_fail 9901 000000AE EB87 <1> jmp .earlyfail 9902 <1> 9903 <1> @@: 9904 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 9905 000000B0 50 <1> push ax 9906 <1> %endif 9907 000000B1 8CD8 <1> mov ax, ds 9908 000000B3 05740B <1> add ax, paras(CODESECTIONOFFSET) 9909 000000B6 B9600D <1> mov cx, ldebug_code_size_p 9910 000000B9 E8940B <1> call init_movp 9911 <1> 9912 000000BC 8916[CE00] <1> mov word [code_seg], dx ; initialise code segment reference 9913 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 9914 000000C0 58 <1> pop ax 9915 000000C1 A3[F60A] <1> mov word [history.segorsel + soaSegSel], ax 9916 <1> %if _PM 9917 000000C4 A3[F80A] <1> mov word [history.segorsel + soaSegment], ax 9918 <1> %endif 9919 000000C7 8EC0 <1> mov es, ax 9920 000000C9 31FF <1> xor di, di 9921 000000CB B90010 <1> mov cx, historysegment_size >> 1 9922 000000CE 31C0 <1> xor ax, ax 9923 000000D0 F3AB <1> rep stosw 9924 <1> %endif 9925 <1> 9926 000000D2 89D8 <1> mov ax, bx 9927 <1> 9928 000000D4 A3[F209] <1> mov word [auxbuff_segorsel + soaSegSel], ax 9929 <1> %if _PM 9930 000000D7 A3[F409] <1> mov word [auxbuff_segorsel + soaSegment], ax 9931 <1> ; initialise auxbuff references 9932 <1> %endif 9933 000000DA 8EC0 <1> mov es, ax 9934 000000DC 31FF <1> xor di, di 9935 000000DE B90810 <1> mov cx, _AUXBUFFSIZE >> 1 9936 000000E1 31C0 <1> xor ax, ax 9937 000000E3 F3AB <1> rep stosw ; initialise auxbuff 9938 <1> 9939 000000E5 FA <1> cli 9940 000000E6 8CD8 <1> mov ax, ds 9941 000000E8 8EC0 <1> mov es, ax 9942 000000EA 8ED0 <1> mov ss, ax 9943 000000EC BC[400C] <1> mov sp, stack_end 9944 000000EF FB <1> sti 9945 <1> 9946 000000F0 B44A <1> mov ah, 4Ah 9947 000000F2 BBC420 <1> mov bx, paras(NONBOOTINITSTACK_START) 9948 000000F5 CD21 <1> int 21h ; shrink to drop init stack 9949 <1> 9950 000000F7 E9610C <1> jmp old_initcode 9951 <1> 9952 <1> 9953 <1> init_retf: 9954 000000FA CB <1> retf 9955 <1> 9956 <1> 9957 <1> ; INP: bx => destination for auxbuff 9958 <1> ; (The following are not actually used by this function, 9959 <1> ; they're just what is passed in and preserved to 9960 <1> ; be used by the caller after returning.) 9961 <1> ; dx => destination for code image 9962 <1> ; (if boot-loaded:) cx => destination for pseudo-PSP 9963 <1> ; (implies cx+10h => destination for data_entry) 9964 <1> ; ax => segment for history buffer 9965 <1> ; OUT: ZR if this destination for auxbuff doesn't cross 9966 <1> ; a 64 KiB boundary 9967 <1> ; NZ else 9968 <1> ; CHG: si, di 9969 <1> init_check_auxbuff: 9970 000000FB 89DE <1> mov si, bx ; => auxbuff 9971 <1> %if _AUXBUFFSIZE < 8192 9972 <1> %error Expected full sector length auxbuff 9973 <1> %endif 9974 000000FD 8DBC0002 <1> lea di, [si + (8192 >> 4)]; => behind auxbuff (at additional paragraph) 9975 00000101 81E600F0 <1> and si, 0F000h ; => 64 KiB chunk of first paragraph of auxbuff 9976 00000105 81E700F0 <1> and di, 0F000h ; => 64 KiB chunk of additional paragraph 9977 00000109 39F7 <1> cmp di, si ; same ? 9978 <1> ; ZR if they are the same 9979 0000010B C3 <1> retn 9980 <1> 9981 <1> 9982 <1> %if _BOOTLDR 9983 <1> ; Our loader transfers control to us with these registers: 9984 <1> ; INP: ss:bp -> BPB 9985 <1> ; ss:bp - 16 -> loadstackvars 9986 <1> ; ss:bp - 32 -> loaddata 9987 <1> ; cs:0 -> loaded payload 9988 <1> ; cs:32 -> entry point 9989 <1> ; STT: EI, UP 9990 <1> ; all interrupts left from BIOS 9991 <1> boot_initcode: 9992 0000010C FC <1> cld 9993 <1> 9994 <1> d4 call init_d4message 9995 <1> d4 asciz "In boot_initcode",13,10 9996 <1> 9997 0000010D 8B56E0 <1> mov dx, word [bp + ldMemoryTop] 9998 <1> 9999 <1> ; initialise sdp 10000 00000110 8B461E <1> mov ax, word [bp + bsBPB + bpbHiddenSectors + 2] 10001 00000113 A3[AE8C] <1> mov word [load_data - LOADDATA2 + bsBPB + bpbHiddenSectors + 2], ax 10002 00000116 8B461C <1> mov ax, word [bp + bsBPB + bpbHiddenSectors] 10003 00000119 A3[AC8C] <1> mov word [load_data - LOADDATA2 + bsBPB + bpbHiddenSectors], ax 10004 0000011C 8A4640 <1> mov al, byte [bp + bsBPB + ebpbNew + bpbnBootUnit] 10005 0000011F A2[D08C] <1> mov byte [load_data - LOADDATA2 + bsBPB + ebpbNew + bpbnBootUnit], al 10006 <1> 10007 00000122 8CDB <1> mov bx, ds 10008 00000124 8EC3 <1> mov es, bx ; => data entry image 10009 00000126 BF[D08B] <1> mov di, loaddata_loadedfrom ; -> loaded from data (ldp) 10010 <1> 10011 <1> ; initialise LOADDATA, LOADSTACKVARS, and BPB 10012 00000129 16 <1> push ss 10013 0000012A 1F <1> pop ds 10014 0000012B 8D76E0 <1> lea si, [bp + LOADDATA] ; -> LOADDATA on stack 10015 0000012E B97A00 <1> mov cx, (-LOADDATA + bsBPB + ebpbNew + BPBN_size) 10016 00000131 F3A4 <1> rep movsb 10017 <1> 10018 <1> ; initialise cmdline_buffer from below LOADDATA 10019 00000133 8DB6E0FE <1> lea si, [bp + ldCommandLine.start] 10020 00000137 BF[E000] <1> mov di, cmdline_buffer ; -> our buffer in data entry 10021 <1> 10022 0000013A 813C00FF <1> cmp word [si], 0FF00h 10023 0000013E 7505 <1> jne @F 10024 <1> 10025 00000140 0E <1> push cs 10026 00000141 1F <1> pop ds 10027 00000142 BE[F209] <1> mov si, imsg.default_cmdline 10028 <1> 10029 <1> @@: 10030 00000145 AC <1> lodsb 10031 00000146 84C0 <1> test al, al 10032 00000148 741F <1> jz @FF 10033 <1> 10034 0000014A 26800E[A500]01 <1> setopt [es:internalflags3], dif3_input_cmdline 10035 00000150 A9 <1> db __TEST_IMM16 10036 <1> .switch_c_loop: 10037 00000151 AA <1> stosb 10038 00000152 AC <1> lodsb 10039 00000153 3C00 <1> cmp al, 0 10040 00000155 7411 <1> je @F 10041 00000157 3C3B <1> cmp al, ';' 10042 00000159 7504 <1> jne .switch_c_not_semicolon 10043 0000015B B00D <1> mov al, 13 10044 0000015D EBF2 <1> jmp .switch_c_loop 10045 <1> 10046 <1> .switch_c_not_semicolon: 10047 0000015F 3C5C <1> cmp al, '\' 10048 00000161 75EE <1> jne .switch_c_loop 10049 00000163 AC <1> lodsb 10050 00000164 3C00 <1> cmp al, 0 10051 00000166 75E9 <1> jne .switch_c_loop 10052 <1> 10053 <1> @@: 10054 00000168 AA <1> stosb 10055 <1> @@: 10056 <1> 10057 00000169 89D0 <1> mov ax, dx 10058 0000016B 2DC01F <1> sub ax, paras(BOOTDELTA) 10059 0000016E 7303E9E900 <1> jc .error_out_of_memory 10060 <1> ; We exaggerate the target size (BOOTDELTA) for the 10061 <1> ; worst case, thus we do not need to check for narrower 10062 <1> ; fits later on. BOOTDELTA includes the pseudo-PSP size, 10063 <1> ; data_entry size, asmtable1_size, asmtable2_size, 10064 <1> ; datastack_size, code_size, 2 times auxbuff_size, 10065 <1> ; historysegment_size, 10066 <1> ; plus 16 bytes for the image ident prefix paragraph, 10067 <1> ; and all of that rounded to a kibibyte boundary. 10068 <1> 10069 00000173 8CC9 <1> mov cx, cs 10070 00000175 81C14A01 <1> add cx, paras(init_size + BOOTINITSTACK_SIZE) 10071 00000179 7303E9DE00 <1> jc .error_out_of_memory 10072 0000017E 39D1 <1> cmp cx, dx 10073 00000180 7603E9D700 <1> ja .error_out_of_memory 10074 <1> 10075 00000185 8CCF <1> mov di, cs 10076 00000187 FA <1> cli 10077 00000188 8ED7 <1> mov ss, di 10078 0000018A BCA014 <1> mov sp, init_size + BOOTINITSTACK_SIZE 10079 0000018D FB <1> sti 10080 <1> 10081 <1> d4 call init_d4message 10082 <1> d4 asciz "Switched to init stack",13,10 10083 <1> 10084 <1> lframe none 10085 <1> lvar word, relocatedparas 10086 <1> lvar word, target 10087 0000018E 5589E55050 <1> lenter 10088 <1> lvar word, targetstart 10089 00000193 50 <1> push ax 10090 <1> lvar word, memtop 10091 00000194 52 <1> push dx 10092 00000195 8D7F10 <1> lea di, [bx + 10h] 10093 <1> lvar word, data 10094 00000198 57 <1> push di 10095 00000199 8DBF740B <1> lea di, [bx + paras(CODESECTIONOFFSET)] 10096 <1> lvar word, code 10097 0000019D 57 <1> push di 10098 <1> 10099 0000019E 39C1 <1> cmp cx, ax ; does init end below-or-equal target ? 10100 000001A0 7703E9C500 <1> jbe .no_relocation ; yes, no relocation needed --> 10101 <1> 10102 <1> d4 call init_d4message 10103 <1> d4 asciz "Needs relocation of init segment",13,10 10104 <1> 10105 000001A5 8B46F6 <1> mov ax, word [bp + ?data] 10106 000001A8 2D4A01 <1> sub ax, paras(init_size + BOOTINITSTACK_SIZE) 10107 000001AB 7303E9AC00 <1> jc .error_out_of_memory ; already at start of memory --> 10108 000001B0 83F860 <1> cmp ax, 60h 10109 000001B3 7303E9A400 <1> jb .error_out_of_memory ; already at start of memory --> 10110 <1> 10111 000001B8 0E <1> push cs 10112 000001B9 1F <1> pop ds 10113 000001BA 31F6 <1> xor si, si ; -> init source 10114 000001BC 8EC0 <1> mov es, ax 10115 000001BE 31FF <1> xor di, di ; -> init destination 10116 000001C0 B9500A <1> mov cx, words(init_size + BOOTINITSTACK_SIZE) 10117 000001C3 F3A5 <1> rep movsw ; relocate only init 10118 <1> ; Must not modify the data already on the stack here, 10119 <1> ; until after .done_relocation (which relocates ss). 10120 <1> 10121 000001C5 50 <1> push ax 10122 000001C6 E831FF <1> call init_retf ; jump to new init 10123 <1> 10124 000001C9 8ED0 <1> mov ss, ax 10125 000001CB 8B4EF4 <1> mov cx, word [bp + ?code] 10126 000001CE 81C1600D <1> add cx, paras(ldebug_code_size) 10127 000001D2 3B4EFA <1> cmp cx, word [bp + ?targetstart] 10128 <1> ; does code end below-or-equal target ? 10129 000001D5 7703E99000 <1> jbe .done_relocation ; yes, relocated enough --> 10130 <1> 10131 <1> d4 call init_d4message 10132 <1> d4 asciz "Needs relocation of entire load image",13,10 10133 <1> 10134 000001DA BA6000 <1> mov dx, 60h 10135 000001DD 8EC2 <1> mov es, dx 10136 000001DF 8CC8 <1> mov ax, cs 10137 000001E1 39C2 <1> cmp dx, ax ; already at start of memory ? 10138 000001E3 7377 <1> jae .error_out_of_memory ; then error --> 10139 <1> 10140 000001E5 42 <1> inc dx 10141 <1> ; cmp dx, ax 10142 <1> ; ja .error_out_of_memory 10143 000001E6 52 <1> push dx 10144 000001E7 2EFF36[1202] <1> push word [cs:.word_relocated] ; on stack: far address of .relocated 10145 <1> 10146 000001EC 89C1 <1> mov cx, ax ; source 10147 000001EE 29D1 <1> sub cx, dx ; source - target = how far to relocate 10148 000001F0 894EFE <1> mov word [bp + ?relocatedparas], cx 10149 <1> ; save away this value 10150 <1> 10151 000001F3 31FF <1> xor di, di ; es:di -> where to put relocator 10152 000001F5 06 <1> push es 10153 000001F6 57 <1> push di ; on stack: relocator destination 10154 000001F7 0E <1> push cs 10155 000001F8 1F <1> pop ds 10156 000001F9 BE[1402] <1> mov si, .relocator ; -> relocator source 10157 000001FC B90800 <1> mov cx, 8 10158 000001FF F3A5 <1> rep movsw ; put relocator stub 10159 <1> 10160 00000201 8EC2 <1> mov es, dx 10161 00000203 31FF <1> xor di, di ; -> where to relocate to 10162 00000205 31F6 <1> xor si, si ; -> relocate start 10163 <1> 10164 <1> BOOTRELOC1 equ paras( init_size + BOOTINITSTACK_SIZE + ldebug_data_entry_size + asmtable1_size + asmtable2_size + ldebug_code_size) 10167 <1> 10168 <1> %if 0 10169 <1> mov cx, BOOTRELOC1 ; how much to relocate 10170 <1> mov bx, 1000h 10171 <1> mov ax, cx 10172 <1> cmp ax, bx ; > 64 KiB? 10173 <1> jbe @F 10174 <1> mov cx, bx ; first relocate the first 64 KiB 10175 <1> @@: 10176 <1> sub ax, cx ; how much to relocate later 10177 <1> shl cx, 1 10178 <1> shl cx, 1 10179 <1> shl cx, 1 ; how much to relocate first, 10180 <1> ; << 3 == convert paragraphs to words 10181 <1> %else 10182 00000207 BB0010 <1> mov bx, 1000h 10183 <1> %if BOOTRELOC1 > 1000h 10184 0000020A B90080 <1> mov cx, 8000h 10185 0000020D B80E0A <1> mov ax, BOOTRELOC1 - 1000h 10186 <1> %else 10187 <1> mov cx, BOOTRELOC1 << 3 10188 <1> xor ax, ax 10189 <1> %endif 10190 <1> %endif 10191 00000210 CB <1> retf ; jump to relocator 10192 <1> 10193 00000211 00 <1> align 2, db 0 10194 <1> .word_relocated: 10195 00000212 [1702] <1> dw .relocated 10196 <1> 10197 <1> ; ds:si -> first chunk of to be relocated data 10198 <1> ; es:di -> first chunk of relocation destination 10199 <1> ; cx = number of words in first chunk 10200 <1> .relocator: 10201 00000214 F3A5 <1> rep movsw 10202 00000216 CB <1> retf ; jump to relocated cs : .relocated 10203 <1> 10204 <1> .relocated: 10205 <1> @@: 10206 00000217 8CC2 <1> mov dx, es 10207 00000219 01DA <1> add dx, bx 10208 0000021B 8EC2 <1> mov es, dx ; next segment 10209 <1> 10210 0000021D 8CDA <1> mov dx, ds 10211 0000021F 01DA <1> add dx, bx 10212 00000221 8EDA <1> mov ds, dx ; next segment 10213 <1> 10214 00000223 29D8 <1> sub ax, bx ; = how much to relocate after this round 10215 00000225 B90080 <1> mov cx, 1000h << 3 ; in case another full 64 KiB to relocate 10216 00000228 730B <1> jae @F ; another full 64 KiB to relocate --> 10217 0000022A 01D8 <1> add ax, bx ; restore 10218 0000022C D1E0 <1> shl ax, 1 10219 0000022E D1E0 <1> shl ax, 1 10220 00000230 D1E0 <1> shl ax, 1 ; convert paragraphs to words 10221 00000232 91 <1> xchg cx, ax ; cx = that many words 10222 00000233 31C0 <1> xor ax, ax ; no more to relocate after this round 10223 <1> 10224 <1> @@: 10225 00000235 31F6 <1> xor si, si 10226 00000237 31FF <1> xor di, di 10227 00000239 F3A5 <1> rep movsw ; relocate next chunk 10228 0000023B 85C0 <1> test ax, ax ; another round needed? 10229 0000023D 75D8 <1> jnz @BB ; yes --> 10230 <1> 10231 0000023F 8CC8 <1> mov ax, cs 10232 00000241 8ED0 <1> mov ss, ax ; relocate the stack 10233 <1> ; The stack frame variables have been relocated here 10234 <1> ; along with the INIT segment data. 10235 <1> 10236 00000243 8B46FE <1> mov ax, word [bp + ?relocatedparas] 10237 00000246 2946F6 <1> sub word [bp + ?data], ax 10238 00000249 721A <1> jc .error_internal 10239 0000024B 2946F4 <1> sub word [bp + ?code], ax 10240 0000024E 7215 <1> jc .error_internal 10241 <1> 10242 00000250 8B4EF4 <1> mov cx, word [bp + ?code] 10243 00000253 81C1600D <1> add cx, paras(ldebug_code_size) 10244 00000257 3B4EFA <1> cmp cx, word [bp + ?targetstart] 10245 <1> ; does code end below-or-equal target ? 10246 0000025A 760E <1> jbe .done_relocation ; yes --> 10247 <1> 10248 <1> .error_out_of_memory: 10249 0000025C BA[B80A] <1> mov dx, imsg.boot_error_out_of_memory 10250 <1> .putsz_error: 10251 0000025F E8A20A <1> call init_putsz_cs_bootldr 10252 00000262 E90C02 <1> jmp init_booterror.soft 10253 <1> 10254 <1> .error_internal: 10255 00000265 BA[C90A] <1> mov dx, imsg.boot_error_internal 10256 00000268 EBF5 <1> jmp .putsz_error 10257 <1> 10258 <1> 10259 <1> .done_relocation: 10260 <1> .no_relocation: 10261 0000026A 8CC8 <1> mov ax, cs 10262 0000026C 8ED0 <1> mov ss, ax ; relocate the stack 10263 <1> ; The stack frame variables have been relocated here 10264 <1> ; along with the INIT segment data. 10265 <1> 10266 0000026E 2EC606[7604]A8 <1> mov byte [cs:init_booterror.patch_switch_stack], __TEST_IMM8 10267 <1> ; SMC in section INIT 10268 <1> 10269 <1> d4 call init_d4message 10270 <1> d4 asciz "Relocated enough",13,10 10271 <1> 10272 <1> 10273 00000274 CD12 <1> int 12h 10274 00000276 B106 <1> mov cl, 6 10275 00000278 D3E0 <1> shl ax, cl 10276 <1> 10277 0000027A 50 <1> push ax 10278 0000027B 1E <1> push ds 10279 0000027C 31F6 <1> xor si, si 10280 0000027E 92 <1> xchg dx, ax 10281 0000027F 8EDE <1> mov ds, si 10282 00000281 C536BC00 <1> lds si, [4 * 2Fh] 10283 00000285 83C603 <1> add si, 3 10284 00000288 AC <1> lodsb 10285 00000289 3C52 <1> cmp al, 'R' 10286 0000028B 750F <1> jne .no_rpl 10287 0000028D AC <1> lodsb 10288 0000028E 3C50 <1> cmp al, 'P' 10289 00000290 750A <1> jne .no_rpl 10290 00000292 AC <1> lodsb 10291 00000293 3C4C <1> cmp al, 'L' 10292 00000295 7505 <1> jne .no_rpl 10293 00000297 B8064A <1> mov ax, 4A06h 10294 0000029A CD2F <1> int 2Fh 10295 <1> .no_rpl: 10296 0000029C 92 <1> xchg ax, dx 10297 0000029D 1F <1> pop ds 10298 0000029E 5A <1> pop dx 10299 <1> 10300 0000029F 39D0 <1> cmp ax, dx 10301 000002A1 7405 <1> je .no_error_rpl 10302 <1> ; in case RPL is present, error out (for now) 10303 <1> 10304 <1> ; notes for +RPL installation: 10305 <1> ; 1. Allocate enough memory for our MCB + an PSP + our image + the last and the RPL MCB 10306 <1> ; 2. Create the RPL's MCB + a last MCB 10307 <1> ; 3. Relocate, initialise PSP 10308 <1> ; 4. Hook Int2F as RPLOADER to report DOS our new size 10309 <1> 10310 000002A3 BA[3E0A] <1> mov dx, imsg.rpl_detected 10311 000002A6 EBB7 <1> jmp .putsz_error 10312 <1> 10313 <1> .no_error_rpl: 10314 <1> d4 call init_d4message 10315 <1> d4 asciz "Loader past RPL detection",13,10 10316 <1> 10317 000002A8 8B5EF8 <1> mov bx, word [bp + ?memtop] 10318 000002AB 39C3 <1> cmp bx, ax 10319 000002AD 7405 <1> je @F 10320 <1> 10321 000002AF BA[650A] <1> mov dx, imsg.mismatch_detected 10322 000002B2 EBAB <1> jmp .putsz_error 10323 <1> 10324 <1> @@: ; bx => behind usable memory 10325 <1> %if 0 10326 <1> mov ah, 0C1h 10327 <1> stc 10328 <1> int 15h ; BIOS, do you have an EBDA? 10329 <1> mov ax, es 10330 <1> jnc .ebda ; segment in ax --> 10331 <1> ; I don't believe you, let's check 10332 <1> %endif ; Enabling this would enable the BIOS to return an EBDA even if it isn't 10333 <1> ; noted at 40h:0Eh, which would be useless because we have to relocate it. 10334 <1> 10335 000002B4 31D2 <1> xor dx, dx ; initialise dx to zero if no EBDA 10336 000002B6 B84000 <1> mov ax, 40h 10337 000002B9 8EC0 <1> mov es, ax 10338 000002BB 26A10E00 <1> mov ax, word [ es:0Eh ] ; EBDA segment (unless zero) or LPT4 base I/O address (200h..3FCh) 10339 000002BF 3D0004 <1> cmp ax, 400h 10340 000002C2 7223 <1> jb .noebda ; --> 10341 <1> .ebda: 10342 <1> d4 call init_d4message 10343 <1> d4 asciz "EBDA detected",13,10 10344 <1> 10345 000002C4 2EFE06[0C08] <1> inc byte [cs:init_boot_ebdaflag] 10346 000002C9 39D8 <1> cmp ax, bx 10347 <1> ;jb init_booterror.soft ; uhh, the EBDA is inside our memory? 10348 <1> ;ja init_booterror.soft ; EBDA higher than top of memory. This is just as unexpected. 10349 000002CB 7405 <1> je @F 10350 000002CD BA[990A] <1> mov dx, imsg.boot_ebda_unexpected 10351 000002D0 EB8D <1> jmp .putsz_error 10352 <1> 10353 <1> @@: 10354 000002D2 8ED8 <1> mov ds, ax 10355 000002D4 31D2 <1> xor dx, dx 10356 000002D6 8A160000 <1> mov dl, byte [ 0 ] ; EBDA size in KiB 10357 000002DA B106 <1> mov cl, 6 10358 000002DC D3E2 <1> shl dx, cl ; *64, to paragraphs 10359 000002DE 2E8916[0608] <1> mov word [cs:init_boot_ebdasize], dx 10360 000002E3 2EA3[0808] <1> mov word [cs:init_boot_ebdasource], ax 10361 <1> d4 jmp @F 10362 <1> .noebda: 10363 <1> d4 call init_d4message 10364 <1> d4 asciz "No EBDA detected",13,10 10365 <1> @@: 10366 <1> 10367 <1> 10368 000002E7 8B4EF8 <1> mov cx, word [bp + ?memtop] 10369 000002EA 2E030E[0608] <1> add cx, [cs:init_boot_ebdasize] 10370 000002EF 81E9991D <1> sub cx, paras(INITSECTIONOFFSET + datastack_size + auxbuff_size + historysegment_size) 10371 <1> ; cx = paragraph of pseudo-PSP if here 10372 000002F3 49 <1> dec cx ; => paragraph of image ident 10373 000002F4 83E1C0 <1> and cx, ~ (paras(1024) - 1) ; round down to kibibyte boundary 10374 000002F7 41 <1> inc cx ; => paragraph of pseudo-PSP if here 10375 <1> 10376 000002F8 89CB <1> mov bx, cx 10377 000002FA 89DA <1> mov dx, bx 10378 000002FC 81C39819 <1> add bx, paras(AUXTARGET1) ; => auxbuff target if here 10379 00000300 81C2380C <1> add dx, paras(CODETARGET1) ; => code target if here 10380 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 10381 00000304 89D8 <1> mov ax, bx 10382 00000306 050102 <1> add ax, paras(auxbuff_size) 10383 <1> %if AUXTARGET1_equ <= CODETARGET1_equ 10384 <1> %error Unexpected layout 10385 <1> %endif 10386 <1> %endif 10387 00000309 E8EFFD <1> call init_check_auxbuff 10388 0000030C 743E <1> jz @F 10389 <1> 10390 <1> d4 call init_d4message 10391 <1> d4 asciz "First layout rejected",13,10 10392 <1> 10393 0000030E 89CB <1> mov bx, cx ; attempt same target again 10394 00000310 89DA <1> mov dx, bx 10395 00000312 81C3380C <1> add bx, paras(AUXTARGET2) ; => auxbuff target if here 10396 00000316 81C2390E <1> add dx, paras(CODETARGET2) ; => code target if here 10397 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 10398 <1> %if (paras(AUXTARGET1_equ) + paras(auxbuff_size_equ)) != (paras(CODETARGET2_equ) + paras(ldebug_code_size_equ)) 10400 <1> %error Unexpected layout 10401 <1> %endif 10402 <1> %endif 10403 0000031A E8DEFD <1> call init_check_auxbuff 10404 0000031D 742D <1> jz @F 10405 <1> 10406 <1> d4 call init_d4message 10407 <1> d4 asciz "Second layout rejected",13,10 10408 <1> 10409 <1> ; If both prior attempts failed, we allocate 10410 <1> ; an additional 8 KiB and move the buffer to 10411 <1> ; that. This should always succeed. 10412 0000031F 8B4EF8 <1> mov cx, word [bp + ?memtop] 10413 00000322 2E030E[0608] <1> add cx, [cs:init_boot_ebdasize] 10414 00000327 81E99A1F <1> sub cx, paras(INITSECTIONOFFSET + datastack_size + auxbuff_size*2 + historysegment_size) 10415 <1> ; cx = paragraph of pseudo-PSP if here 10416 0000032B 49 <1> dec cx ; => paragraph of image ident 10417 0000032C 83E1C0 <1> and cx, ~ (paras(1024) - 1) ; round down to kibibyte boundary 10418 0000032F 41 <1> inc cx ; => paragraph of pseudo-PSP if here 10419 <1> 10420 00000330 89CB <1> mov bx, cx 10421 00000332 89DA <1> mov dx, bx 10422 00000334 81C39819 <1> add bx, paras(AUXTARGET1) ; => auxbuff target if here 10423 <1> ; Note that we use AUXTARGET1 here, not AUXTARGET3, because 10424 <1> ; we move where the debugger starts rather than where it ends. 10425 00000338 81C2380C <1> add dx, paras(CODETARGET1) ; => code target if here 10426 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 10427 0000033C 89D8 <1> mov ax, bx 10428 0000033E 050102 <1> add ax, paras(auxbuff_size) 10429 <1> %endif 10430 00000341 E8B7FD <1> call init_check_auxbuff 10431 00000344 7406 <1> jz @F 10432 <1> 10433 <1> ; Because this shouldn't happen, this is 10434 <1> ; considered an internal error. 10435 00000346 BA[3308] <1> mov dx, imsg.early_reloc_fail 10436 00000349 E913FF <1> jmp .putsz_error 10437 <1> 10438 <1> 10439 <1> ; cx => data_entry target 10440 <1> ; dx => code target 10441 <1> ; bx => auxbuff target 10442 <1> ; ax => history segment 10443 <1> @@: 10444 <1> d4 call init_d4message 10445 <1> d4 asciz "Layout found" 10446 <1> d4 call init_d4dumpregs 10447 <1> d4 call init_d4message 10448 <1> d4 asciz 13,10 10449 <1> 10450 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 10451 0000034C 50 <1> push ax 10452 <1> %endif 10453 0000034D 894EFC <1> mov word [bp + ?target], cx 10454 00000350 52 <1> push dx 10455 00000351 2E803E[0C08]00 <1> cmp byte [cs:init_boot_ebdaflag], 0 10456 00000357 742E <1> jz .reloc_memtop_no_ebda 10457 00000359 49 <1> dec cx 10458 0000035A 2E2B0E[0608] <1> sub cx, word [cs:init_boot_ebdasize] 10459 0000035F 2EA1[0808] <1> mov ax, word [cs:init_boot_ebdasource] 10460 00000363 89CA <1> mov dx, cx 10461 00000365 2E890E[0A08] <1> mov word [cs:init_boot_ebdadest], cx 10462 0000036A 2E8B0E[0608] <1> mov cx, word [cs:init_boot_ebdasize] 10463 0000036F E8DE08 <1> call init_movp 10464 00000372 014EF8 <1> add word [bp + ?memtop], cx 10465 00000375 2E800E[0C08]02 <1> or byte [cs:init_boot_ebdaflag], 2 10466 0000037B B84000 <1> mov ax, 40h 10467 0000037E 8EC0 <1> mov es, ax 10468 00000380 2689160E00 <1> mov word [es:0Eh], dx ; relocate EBDA 10469 <1> 10470 <1> d4 call init_d4message 10471 <1> d4 asciz "EBDA relocated",13,10 10472 <1> 10473 00000385 EB02 <1> jmp @F 10474 <1> 10475 <1> .reloc_memtop_no_ebda: 10476 00000387 89CA <1> mov dx, cx 10477 <1> @@: 10478 00000389 B106 <1> mov cl, 6 10479 0000038B D3EA <1> shr dx, cl 10480 0000038D B84000 <1> mov ax, 40h 10481 00000390 8EC0 <1> mov es, ax 10482 00000392 2E8916[0208] <1> mov word [ cs:init_boot_new_memsizekib ], dx 10483 00000397 2687161300 <1> xchg word [es:13h], dx 10484 0000039C 2E8916[0408] <1> mov word [ cs:init_boot_old_memsizekib ], dx 10485 000003A1 5A <1> pop dx 10486 <1> d4 call init_d4message 10487 <1> d4 asciz "Memory top relocated",13,10 10488 <1> 10489 000003A2 8B4EFC <1> mov cx, word [bp + ?target] 10490 000003A5 8ED9 <1> mov ds, cx 10491 000003A7 8B7EF8 <1> mov di, word [bp + ?memtop] ; => memory top 10492 000003AA 81EF4002 <1> sub di, paras(1024+8192) 10493 000003AE 8EC7 <1> mov es, di 10494 000003B0 39CF <1> cmp di, cx ; max padding starts below target PSP ? 10495 000003B2 7209 <1> jb @F ; yes, do not initialise padding 10496 000003B4 31FF <1> xor di, di ; -> padding 10497 000003B6 B90012 <1> mov cx, words(1024+8192) 10498 000003B9 31C0 <1> xor ax, ax 10499 000003BB F3AB <1> rep stosw ; initialise padding 10500 <1> @@: 10501 <1> 10502 000003BD 8B46F4 <1> mov ax, word [bp + ?code] ; => code source 10503 <1> ; dx => code target 10504 000003C0 B9600D <1> mov cx, ldebug_code_size_p ; = size 10505 000003C3 E88A08 <1> call init_movp ; relocate code to target 10506 <1> d4 call init_d4message 10507 <1> d4 asciz "Code segment relocated",13,10 10508 <1> 10509 000003C6 52 <1> push dx ; (code segment) 10510 000003C7 8B46F6 <1> mov ax, word [bp + ?data] ; => data_entry source 10511 000003CA 8CDA <1> mov dx, ds 10512 000003CC 83C210 <1> add dx, paras(100h) ; => data_entry target 10513 000003CF B9640B <1> mov cx, paras(ldebug_data_entry_size + asmtable1_size + asmtable2_size) 10514 000003D2 E87B08 <1> call init_movp ; relocate data_entry to target 10515 000003D5 8F06[CE00] <1> pop word [code_seg] ; initialise code reference 10516 <1> d4 call init_d4message 10517 <1> d4 asciz "Data segment relocated",13,10 10518 <1> 10519 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 10520 000003D9 58 <1> pop ax 10521 000003DA A3[F60A] <1> mov word [history.segorsel + soaSegSel], ax 10522 <1> %if _PM 10523 000003DD A3[F80A] <1> mov word [history.segorsel + soaSegment], ax 10524 <1> %endif 10525 000003E0 8EC0 <1> mov es, ax 10526 000003E2 31FF <1> xor di, di 10527 000003E4 B90010 <1> mov cx, historysegment_size >> 1 10528 000003E7 31C0 <1> xor ax, ax 10529 000003E9 F3AB <1> rep stosw 10530 <1> %endif 10531 <1> 10532 000003EB 89D8 <1> mov ax, bx 10533 000003ED A3[F209] <1> mov word [auxbuff_segorsel + soaSegSel], ax 10534 <1> %if _PM 10535 000003F0 A3[F409] <1> mov word [auxbuff_segorsel + soaSegment], ax 10536 <1> ; initialise auxbuff references 10537 <1> %endif 10538 000003F3 8EC0 <1> mov es, ax 10539 000003F5 31FF <1> xor di, di 10540 000003F7 B90810 <1> mov cx, _AUXBUFFSIZE >> 1 10541 000003FA 31C0 <1> xor ax, ax 10542 000003FC F3AB <1> rep stosw ; initialise auxbuff 10543 <1> d4 call init_d4message 10544 <1> d4 asciz "auxbuff initialised",13,10 10545 <1> 10546 000003FE 1E <1> push ds 10547 000003FF 07 <1> pop es 10548 00000400 31FF <1> xor di, di 10549 00000402 B98000 <1> mov cx, words(100h) 10550 00000405 F3AB <1> rep stosw ; initialise pseudo-PSP 10551 <1> 10552 <1> init_boot_imageident: 10553 00000407 8CD8 <1> mov ax, ds 10554 00000409 48 <1> dec ax 10555 0000040A 8EC0 <1> mov es, ax ; => paragraph for imageident 10556 0000040C 31FF <1> xor di, di ; -> imageident target 10557 0000040E 8B5EF8 <1> mov bx, word [bp + ?memtop] 10558 00000411 29C3 <1> sub bx, ax ; = how many paragraphs do we use ? 10559 <1> 10560 00000413 0E <1> push cs 10561 00000414 1F <1> pop ds 10562 00000415 891E[F807] <1> mov word [imageident.size], bx ; set image ident size 10563 <1> 10564 00000419 BE[F007] <1> mov si, imageident 10565 0000041C 56 <1> push si 10566 0000041D B90800 <1> mov cx, 8 10567 00000420 31D2 <1> xor dx, dx 10568 <1> .loop: 10569 00000422 AD <1> lodsw 10570 00000423 01C2 <1> add dx, ax 10571 00000425 E2FB <1> loop .loop 10572 00000427 5E <1> pop si 10573 <1> 10574 00000428 F7DA <1> neg dx 10575 0000042A 8916[F607] <1> mov word [imageident.check], dx ; set image ident checksum 10576 <1> 10577 0000042E B108 <1> mov cl, 8 10578 00000430 F3A5 <1> rep movsw ; write image ident paragraph 10579 <1> 10580 00000432 8B46FC <1> mov ax, word [bp + ?target] 10581 <1> 10582 <1> lleave ctx ; dropping this frame for stack switch 10583 <1> 10584 00000435 FA <1> cli 10585 00000436 8ED8 <1> mov ds, ax 10586 00000438 8ED0 <1> mov ss, ax 10587 0000043A BC[400C] <1> mov sp, stack_end ; switch stacks 10588 0000043D FB <1> sti 10589 <1> 10590 0000043E 2EFF36[0408] <1> push word [cs:init_boot_old_memsizekib] 10591 00000443 8F06[E48F] <1> pop word [boot_old_memsizekib] 10592 00000447 2EFF36[0208] <1> push word [cs:init_boot_new_memsizekib] 10593 0000044C 8F06[E28F] <1> pop word [boot_new_memsizekib] 10594 00000450 2EA0[0C08] <1> mov al, byte [cs:init_boot_ebdaflag] 10595 00000454 2401 <1> and al, 1 10596 00000456 A2[E68F] <1> mov byte [boot_ebdaflag], al 10597 <1> 10598 00000459 800E[9D00]40 <1> setopt [internalflags], nodosloaded 10599 0000045E 8026[9C00]0F <1> clropt [internalflags], notstdinput|inputfile|notstdoutput|outputfile 10600 00000463 C606[E70A]00 <1> mov byte [notatty], 0 ; it _is_ a tty 10601 <1> 10602 00000468 BA[3008] <1> mov dx, imsg.crlf 10603 0000046B E87308 <1> call init_putsz_cs 10604 <1> 10605 <1> d4 call init_d4message 10606 <1> d4 asciz "New boot_initcode done",13,10 10607 <1> 10608 0000046E E9D908 <1> jmp boot_old_initcode 10609 <1> 10610 <1> 10611 <1> init_booterror: 10612 <1> .soft: 10613 00000471 31C0 <1> xor ax, ax 10614 00000473 A9 <1> db __TEST_IMM16 ; (skip mov) 10615 <1> .hard: 10616 00000474 B001 <1> mov al, 1 10617 <1> 10618 <1> ;d4 call init_d4pocketdosmemdump 10619 <1> d4 call init_d4dumpregs 10620 <1> 10621 <1> .patch_switch_stack: 10622 00000476 EB09 <1> jmp strict short .no_switch_stack 10623 <1> 10624 00000478 8CCB <1> mov bx, cs 10625 0000047A FA <1> cli 10626 0000047B 8ED3 <1> mov ss, bx 10627 0000047D BCA014 <1> mov sp, init_size + BOOTINITSTACK_SIZE 10628 00000480 FB <1> sti 10629 <1> 10630 <1> .no_switch_stack: 10631 00000481 50 <1> push ax 10632 <1> 10633 00000482 B84000 <1> mov ax, 40h 10634 00000485 8EC0 <1> mov es, ax 10635 <1> 10636 00000487 2EF606[0C08]02 <1> test byte [cs:init_boot_ebdaflag], 2 10637 0000048D 7416 <1> jz @F 10638 <1> 10639 0000048F 2E8B16[0808] <1> mov dx, [cs:init_boot_ebdasource] 10640 00000494 2EA1[0A08] <1> mov ax, [cs:init_boot_ebdadest] 10641 00000498 2E8B0E[0608] <1> mov cx, [cs:init_boot_ebdasize] 10642 0000049D E8B007 <1> call init_movp 10643 <1> 10644 000004A0 2689160E00 <1> mov word [es:0Eh], dx 10645 <1> @@: 10646 <1> 10647 000004A5 2E8B16[0408] <1> mov dx, [cs:init_boot_old_memsizekib] 10648 000004AA 85D2 <1> test dx, dx 10649 000004AC 7405 <1> jz @F 10650 000004AE 2689161300 <1> mov word [es:13h], dx 10651 <1> @@: 10652 <1> 10653 000004B3 BA[F70A] <1> mov dx, imsg.booterror 10654 000004B6 E84B08 <1> call init_putsz_cs_bootldr 10655 000004B9 E82008 <1> call init_getc_bootldr 10656 000004BC 58 <1> pop ax 10657 000004BD 85C0 <1> test ax, ax 10658 000004BF 7502 <1> jnz @F 10659 000004C1 CD19 <1> int 19h 10660 <1> @@: 10661 000004C3 EA0000FFFF <1> jmp 0FFFFh:0 10662 <1> %endif ; _BOOTLDR 10663 <1> 10664 <1> 10665 <1> %if _DEBUG4 || _DEBUG5 10666 <1> %define _DEB_ASM_PREFIX init_ 10667 <1> %include "deb.asm" 10668 <1> %endif 10669 <1> 10670 <1> 10671 <1> %macro __writepatchtable2 0-*.nolist 10672 <1> %if %0 & 1 10673 <1> %fatal Expected even number of arguments 10674 <1> %endif 10675 <1> %rep %0 >> 1 10676 <1> %1 %2 10677 <1> %rotate 2 10678 <1> %endrep 10679 <1> %endmacro 10680 <1> 10681 <1> %macro __patchtable2_entry 0.nolist 10682 <1> ; only if this isn't the first (pseudo-)entry 10683 <1> %if %$lastcount != 0 10684 <1> %assign %$runscount %[%$runscount]+1 10685 <1> ; if the offset from %$previous is less than 255 10686 <1> %if (%$last-%$previous) < 255 10687 <1> %assign %$$method2tablesize %$$method2tablesize+1 10688 <1> ; then write a single byte (number of bytes not to patch between) 10689 <1> %xdefine %$$method2list %$$method2list,db,%$last-%$previous 10690 <1> %else 10691 <1> ; otherwise write a 255 ("reposition") and write the 16-bit address afterwards 10692 <1> %assign %$$method2tablesize %$$method2tablesize+3 10693 <1> %xdefine %$$method2list %$$method2list,db,255,dw,%$last 10694 <1> %assign %$reposcount %[%$reposcount]+1 10695 <1> %endif 10696 <1> %if %$lastcount == 1 10697 <1> %assign %$onecount %[%$onecount]+1 10698 <1> %endif 10699 <1> %assign %$$method2tablesize %$$method2tablesize+1 10700 <1> ; and write the number of bytes to be patched 10701 <1> %xdefine %$$method2list %$$method2list,db,%$lastcount 10702 <1> ; define %$previous for the next entry: it points to the next non-patched byte 10703 <1> %define %$previous (%[%$last]+%[%$lastcount]) 10704 <1> %endif 10705 <1> %endmacro 10706 <1> 10707 <1> %macro writepatchtable 2-*.nolist 10708 <1> 10709 <1> numdef %{1}_FORCE_METHOD, 0 10710 <1> %push 10711 <1> ; Determine length of simple table: 10712 <1> %assign %$method1tablesize (%0 - 2)*2 10713 <1> 10714 <1> %if !_%{1}_FORCE_METHOD || _%{1}_FORCE_METHOD == 2 10715 <1> ; Determine length of complicated table: 10716 <1> %assign %$method2tablesize 0 10717 <1> %define %$method2list db,"" 10718 <1> %push 10719 <1> %if _WPT_LABELS 10720 <1> %define %$previous code_start ; if list contains labels 10721 <1> %else 10722 <1> %define %$previous 0 10723 <1> %endif 10724 <1> %define %$last %[%$previous] 10725 <1> %assign %$lastcount 0 10726 <1> %assign %$onecount 0 10727 <1> %assign %$reposcount 0 10728 <1> %assign %$bytescount %0 - 2 10729 <1> %assign %$runscount 0 10730 <1> %rotate 1 10731 <1> %rep %0 - 2 10732 <1> %rotate 1 10733 <1> ;if it continues the previous patch and not too long and this isn't the first 10734 <1> %if ((%$last+%$lastcount) == %1) && (%$lastcount < 255) && (%$lastcount != 0) 10735 <1> ; then do not write an entry, just increase the patch's size 10736 <1> %assign %$lastcount %[%$lastcount]+1 10737 <1> %else 10738 <1> ; otherwise write the last entry 10739 <1> __patchtable2_entry 10740 <1> ; define new %$last to this parameter, %$lastcount to one 10741 <1> %define %$last %1 10742 <1> %assign %$lastcount 1 10743 <1> %endif 10744 <1> %endrep 10745 <1> __patchtable2_entry 10746 <1> 10747 <1> ; at the end, there's a patch with offset 0, size 0 10748 <1> %assign %$$method2tablesize %$$method2tablesize+2 10749 <1> %xdefine %$$method2list %$$method2list,db,0,db,0 10750 <1> 10751 <1> %assign %$$onecount %$onecount 10752 <1> %assign %$$reposcount %$reposcount 10753 <1> %assign %$$bytescount %$bytescount 10754 <1> %assign %$$runscount %$runscount 10755 <1> %pop 10756 <1> %rotate 1 10757 <1> %endif 10758 <1> 10759 <1> %if _%{1}_FORCE_METHOD == 2 10760 <1> %define __%{1}_method 2 10761 <1> %elif _%{1}_FORCE_METHOD == 1 10762 <1> %define __%{1}_method 1 10763 <1> %else 10764 <1> %if _%{1}_FORCE_METHOD 10765 <1> %fatal Invalid forced method selected: _%{1}_FORCE_METHOD 10766 <1> %endif 10767 <1> %if %$method1tablesize > (%$method2tablesize+20) 10768 <1> %define __%{1}_method 2 10769 <1> %else 10770 <1> %define __%{1}_method 1 10771 <1> %endif 10772 <1> %endif 10773 <1> 10774 <1> 10775 <1> %1: 10776 <1> %if __%{1}_method == 2 10777 <1> __writepatchtable2 %$method2list 10778 <1> endarea %1 10779 <1> %assign %$size %1_size 10780 <1> %warning %1: %$size bytes (Method 2) 10781 <1> %warning 1B=%$onecount repo=%$reposcount run=%$runscount byte=%$bytescount 10782 <1> %else 10783 <1> %rotate 1 10784 <1> %rep %0 - 2 10785 <1> %rotate 1 10786 <1> dw %1 10787 <1> %endrep 10788 <1> %rotate 1 10789 <1> endarea %1 10790 <1> %assign %$size %1_size 10791 <1> %warning %1: %$size bytes (Method 1) 10792 <1> %endif 10793 <1> %pop 10794 <1> %endmacro 10795 <1> 10796 <1> align 2, db 0 ; align on word boundary 10797 <1> ; Table of patches that are to be set NOP if not running on a 386. 10798 000004C8 020104040201010101- <1> writepatchtable patch_no386_table, PATCH_NO386_TABLE 10798 000004D1 04FF75030104040201- <1> 10798 000004DA 01010104FF270501FF- <1> 10798 000004E3 D3070104090201FFA4- <1> 10798 000004EC 0C011101080116011D- <1> 10798 000004F5 0108014A0106010B01- <1> 10798 000004FE 0A010901050103010A- <1> 10798 00000507 01060103010A010301- <1> 10798 00000510 030101010401FFFD0E- <1> 10798 00000519 01030101012F010504- <1> 10798 00000522 FFE612042F01040106- <1> 10798 0000052B 053B010201FF8B1401- <1> 10798 00000534 020105013D01160104- <1> 10798 0000053D 012101040123010101- <1> 10798 00000546 0201060A010110010C- <1> 10798 0000054F 120C010401FF9E1601- <1> 10798 00000558 2D011B010801050124- <1> 10798 00000561 010F01FF8C1801FF6E- <1> 10798 0000056A 20049C0137016101FF- <1> 10798 00000573 822301FFBD2410FF01- <1> 10798 0000057C 2801FF892901120124- <1> 10798 00000585 011D01010102011401- <1> 10798 0000058E 020503010208B701EB- <1> 10798 00000597 0AFFE62E010B01FF49- <1> 10798 000005A0 310126030709F80A28- <1> 10798 000005A9 01FF50370107010401- <1> 10798 000005B2 150B31013F012F0302- <1> 10798 000005BB 032201110115010F01- <1> 10798 000005C4 110718011101010101- <1> 10798 000005CD 010101180101010101- <1> 10798 000005D6 01012B04B301260307- <1> 10798 000005DF 09FF1F3D013F04040A- <1> 10798 000005E8 340104019F0127030C- <1> 10798 000005F1 0504034B0101010101- <1> 10798 000005FA 01010109FF864101FF- <1> 10798 00000603 C9420827023A010401- <1> 10798 0000060C 040116061D02FF0F45- <1> 10798 00000615 020901010120010101- <1> 10798 0000061E FF9E46010B01A10104- <1> 10798 00000627 010201050125010401- <1> 10798 00000630 040101010901010101- <1> 10798 00000639 010301020102010201- <1> 10798 00000642 1F010201E709FFF149- <1> 10798 0000064B 0DFF054B01FFF24C01- <1> 10798 00000654 FF664E01040104011A- <1> 10798 0000065D 01140B9B012E020301- <1> 10798 00000666 030103020301030103- <1> 10798 0000066F 020301030103020301- <1> 10798 00000678 0301FFA2540105011A- <1> 10798 00000681 01FF87560EE1010201- <1> 10798 0000068A 2301FF575901010104- <1> 10798 00000693 010801010102010601- <1> 10798 0000069C 010104010801010102- <1> 10798 000006A5 010601080109015301- <1> 10798 000006AE 570507027F01090314- <1> 10798 000006B7 010906090306010601- <1> 10798 000006C0 01010A011C03050101- <1> 10798 000006C9 010B0311046F010601- <1> 10798 000006D2 02030A0125010801FF- <1> 10798 000006DB 365D051505FF7A5E01- <1> 10798 000006E4 0D0102012D01020129- <1> 10798 000006ED 01FFAD600B140BFF7C- <1> 10798 000006F6 8C01A6065C06250102- <1> 10798 000006FF 01020101011A010201- <1> 10798 00000708 1604020303010101FF- <1> 10798 00000711 9A9104FFE292046604- <1> 10798 0000071A FF5896011001020103- <1> 10798 00000723 010201050101010201- <1> 10798 0000072C 0201FF8E9801090421- <1> 10798 00000735 01FF2A9E0108010101- <1> 10798 0000073E 29010201220105041D- <1> 10798 00000747 03FF96A50147010C01- <1> 10798 00000750 0F0107031201470104- <1> 10798 00000759 011301950102010101- <1> 10798 00000762 0E010101020109010A- <1> 10798 0000076B 03AD032D040C050B05- <1> 10798 00000774 0D010A0104200D030A- <1> 10798 0000077D 01070102011A042F03- <1> 10798 00000786 0B0101015009FF18AC- <1> 10798 0000078F 02FF67AE0112010501- <1> 10798 00000798 8C028501051EFF4EB4- <1> 10798 000007A1 0707070201BA073001- <1> 10798 000007AA 0A07FF09C101010327- <1> 10798 000007B3 01FFD2C30104040201- <1> 10798 000007BC 01010104FF0CD50100- <1> 10798 000007C5 00 <1> 10798 ****************** <1> warning: patch_no386_table: 766 (Method 2) [-w+user] 10798 ****************** <1> warning: 1B=249 repo=45 run=337 byte=782 [-w+user] 10799 <1> %undef PATCH_NO386_TABLE 10800 <1> 10801 <1> align 2, db 0 10802 <1> ; Table of patches that are to be set NOP if running on a 386. 10803 000007C6 FF1E1602FFB42905FF- <1> writepatchtable patch_386_table, PATCH_386_TABLE 10803 000007CF EA3705FFD03D02FFB0- <1> 10803 000007D8 4B0E4D0EFFBA4E07FF- <1> 10803 000007E1 95AF04FF0BD5010000 <1> 10803 ****************** <1> warning: patch_386_table: 36 (Method 2) [-w+user] 10803 ****************** <1> warning: 1B=1 repo=8 run=9 byte=54 [-w+user] 10804 <1> %undef PATCH_386_TABLE 10805 <1> 10806 <1> %unmacro __writepatchtable2 0-*.nolist 10807 <1> %unmacro __patchtable2_entry 0.nolist 10808 <1> %unmacro writepatchtable 2-*.nolist 10809 <1> 10810 <1> 10811 <1> %if _BOOTLDR 10812 000007EA 00 <1> align 16, db 0 10813 <1> ; Image identification 10814 <1> ; First dword: signature 10815 <1> ; Next word: version, two ASCII digits 10816 <1> ; Next word: checksum. adding up all words of the paragraph gives zero 10817 <1> ; Next word: size of image (including this paragraph) 10818 <1> ; Three words reserved, zero. 10819 <1> imageident: 10820 000007F0 4E4445423030 <1> db "NDEB00" 10821 000007F6 0000 <1> .check: dw 0 10822 000007F8 0000 <1> .size: dw 0 10823 000007FA 0000 <1> times 3 dw 0 10824 <1> %endif 10825 <1> align 2, db 0 10826 00000800 991D <1> memsize: dw paras(CODETARGET2 + ldebug_code_size + historysegment_size) 10829 <1> ; same as paras(AUXTARGET1 + auxbuff_size + historysegment_size) 10830 <1> 10831 <1> %if _BOOTLDR 10832 00000802 0000 <1> init_boot_new_memsizekib: dw 0 10833 00000804 0000 <1> init_boot_old_memsizekib: dw 0 10834 <1> 10835 00000806 0000 <1> init_boot_ebdasize: dw 0 10836 00000808 0000 <1> init_boot_ebdasource: dw 0 10837 0000080A 0000 <1> init_boot_ebdadest: dw 0 10838 0000080C 00 <1> init_boot_ebdaflag: db 0 10839 <1> %endif 10840 <1> 10841 <1> 10842 <1> imsg: 10843 <1> .early_mem_fail: 10844 0000080D 6C4465627567583A20- <1> db _PROGNAME,": Failed to allocate memory!" 10844 00000816 4661696C656420746F- <1> 10844 0000081F 20616C6C6F63617465- <1> 10844 00000828 206D656D6F727921 <1> 10845 <1> .crlf: 10846 00000830 0D0A00 <1> asciz 13,10 10847 <1> .early_reloc_fail: 10848 00000833 6C4465627567583A20- <1> asciz _PROGNAME,": Failed to relocate, internal error!",13,10 10848 0000083C 4661696C656420746F- <1> 10848 00000845 2072656C6F63617465- <1> 10848 0000084E 2C20696E7465726E61- <1> 10848 00000857 6C206572726F72210D- <1> 10848 00000860 0A00 <1> 10849 <1> .help.defaultfilename: 10850 00000862 444542554758 <1> db _FILENAME 10851 <1> .help.defaultfilename.length equ $ - .help.defaultfilename 10852 <1> .help.1: 10853 00000868 6C4465627567582028- <1> db _PROGNAME,_VERSION,", debugger.",13,10 10853 00000871 323032322D30342D31- <1> 10853 0000087A 38292C206465627567- <1> 10853 00000883 6765722E0D0A <1> 10854 00000889 0D0A <1> db 13,10 10855 0000088B 55736167653A20 <1> db "Usage: " 10856 00000892 00 <1> asciz 10857 <1> .help.2: 10858 00000893 5B2E434F4D5D205B2F- <1> db "[.COM] [/C=commands] [[drive:][path]progname.ext [parameters]]",13,10 10858 0000089C 433D636F6D6D616E64- <1> 10858 000008A5 735D205B5B64726976- <1> 10858 000008AE 653A5D5B706174685D- <1> 10858 000008B7 70726F676E616D652E- <1> 10858 000008C0 657874205B70617261- <1> 10858 000008C9 6D65746572735D5D0D- <1> 10858 000008D2 0A <1> 10859 000008D3 0D0A <1> db 13,10 10860 000008D5 20202F433D636F6D6D- <1> db " /C=commands",9,9, "semicolon-separated list of commands (quote spaces)",13,10 10860 000008DE 616E6473090973656D- <1> 10860 000008E7 69636F6C6F6E2D7365- <1> 10860 000008F0 70617261746564206C- <1> 10860 000008F9 697374206F6620636F- <1> 10860 00000902 6D6D616E6473202871- <1> 10860 0000090B 756F74652073706163- <1> 10860 00000914 6573290D0A <1> 10861 00000919 202070726F676E616D- <1> db " progname.ext",9,9,"(executable) file to debug or examine",13,10 10861 00000922 652E65787409092865- <1> 10861 0000092B 786563757461626C65- <1> 10861 00000934 292066696C6520746F- <1> 10861 0000093D 206465627567206F72- <1> 10861 00000946 206578616D696E650D- <1> 10861 0000094F 0A <1> 10862 00000950 2020706172616D6574- <1> db " parameters",9,9, "parameters given to program",13,10 10862 00000959 657273090970617261- <1> 10862 00000962 6D6574657273206769- <1> 10862 0000096B 76656E20746F207072- <1> 10862 00000974 6F6772616D0D0A <1> 10863 0000097B 0D0A <1> db 13,10 10864 0000097D 466F722061206C6973- <1> db "For a list of debugging commands, run " 10864 00000986 74206F662064656275- <1> 10864 0000098F 6767696E6720636F6D- <1> 10864 00000998 6D616E64732C207275- <1> 10864 000009A1 6E20 <1> 10865 000009A3 00 <1> asciz 10866 <1> .help.3: 10867 000009A4 20616E642074797065- <1> db " and type ? at the prompt.",13,10 10867 000009AD 203F20617420746865- <1> 10867 000009B6 2070726F6D70742E0D- <1> 10867 000009BF 0A <1> 10868 000009C0 00 <1> asciz 10869 <1> %if _ONLY386 10870 <1> .no386: ascizline "Error: This ",_PROGNAME," build requires a 386 CPU or higher." 10871 <1> %elif _ONLYNON386 10872 <1> .386: asciiline "Warning: This ",_PROGNAME," build is ignorant of 386 CPU specifics." 10873 <1> ascizline 9," It does not allow access to the available 386-specific registers!" 10874 <1> %endif 10875 <1> 10876 <1> .invalidswitch: 10877 000009C1 496E76616C69642073- <1> db "Invalid switch - " 10877 000009CA 7769746368202D20 <1> 10878 <1> .invalidswitch_a: 10879 000009D2 780D0A00 <1> asciz "x",13,10 10880 <1> .switch_c_error: 10881 000009D6 537769746368202F43- <1> asciz "Switch /C invalid content",13,10 10881 000009DF 20696E76616C696420- <1> 10881 000009E8 636F6E74656E740D0A- <1> 10881 000009F1 00 <1> 10882 <1> %if _BOOTLDR 10883 <1> .default_cmdline: 10884 <1> db _BOOTSCRIPTPREFIX 10885 000009F2 406966206578697374- <1> db "@if exists y ldp/",_BOOTSCRIPTNAME," :",_BOOTSCRIPTLABEL 10885 000009FB 732079206C64702F4C- <1> 10885 00000A04 44454255472E534C44- <1> 10885 00000A0D 203A626F6F74737461- <1> 10885 00000A16 72747570 <1> 10886 00000A1A 207468656E2079206C- <1> db " then y ldp/",_BOOTSCRIPTNAME," :",_BOOTSCRIPTLABEL 10886 00000A23 64702F4C4445425547- <1> 10886 00000A2C 2E534C44203A626F6F- <1> 10886 00000A35 7473746172747570 <1> 10887 00000A3D 00 <1> asciz 10888 <1> .rpl_detected: 10889 00000A3E 52504C206465746563- <1> asciz "RPL detected! Currently unsupported.",13,10 10889 00000A47 746564212043757272- <1> 10889 00000A50 656E746C7920756E73- <1> 10889 00000A59 7570706F727465642E- <1> 10889 00000A62 0D0A00 <1> 10890 <1> .mismatch_detected: 10891 00000A65 4D69736D6174636820- <1> asciz "Mismatch in memory size detected! Internal error!",13,10 10891 00000A6E 696E206D656D6F7279- <1> 10891 00000A77 2073697A6520646574- <1> 10891 00000A80 65637465642120496E- <1> 10891 00000A89 7465726E616C206572- <1> 10891 00000A92 726F72210D0A00 <1> 10892 <1> .boot_ebda_unexpected: 10893 00000A99 454244412061742075- <1> asciz "EBDA at unexpected position.",13,10 10893 00000AA2 6E6578706563746564- <1> 10893 00000AAB 20706F736974696F6E- <1> 10893 00000AB4 2E0D0A00 <1> 10894 <1> .boot_error_out_of_memory: 10895 00000AB8 4F7574206F66206D65- <1> asciz "Out of memory!",13,10 10895 00000AC1 6D6F7279210D0A00 <1> 10896 <1> .boot_error_internal: 10897 00000AC9 496E7465726E616C20- <1> asciz "Internal error while relocating load image!",13,10 10897 00000AD2 6572726F7220776869- <1> 10897 00000ADB 6C652072656C6F6361- <1> 10897 00000AE4 74696E67206C6F6164- <1> 10897 00000AED 20696D616765210D0A- <1> 10897 00000AF6 00 <1> 10898 <1> .booterror: 10899 00000AF7 0D0A6C446562756758- <1> asciz 13,10,_PROGNAME," boot error. Press any key to reboot.",13,10 10899 00000B00 20626F6F7420657272- <1> 10899 00000B09 6F722E205072657373- <1> 10899 00000B12 20616E79206B657920- <1> 10899 00000B1B 746F207265626F6F74- <1> 10899 00000B24 2E0D0A00 <1> 10900 <1> %endif 10901 <1> %if _DOSEMU 10902 00000B28 30322F32352F3933 <1> .dosemudate: db "02/25/93" 10903 <1> %endif 10904 <1> %if _VDD 10905 00000B30 44454258585644442E- <1> .vdd: asciz "DEBXXVDD.DLL" 10905 00000B39 444C4C00 <1> 10906 00000B3D 446973706174636800 <1> .dispatch: asciz "Dispatch" 10907 00000B46 496E697400 <1> .init: asciz "Init" 10908 00000B4B 4D4F555345202020 <1> .mouse: db "MOUSE",32,32,32 ; Looks like a device name 10909 00000B53 416E64792057617473- <1> .andy: db "Andy Watson" ; I don't know him and why he's inside the NTVDM mouse driver 10909 00000B5C 6F6E <1> 10910 <1> endarea .andy 10911 00000B5E 57696E646F7773204E- <1> .ntdos: db "Windows NT MS-DOS subsystem Mouse Driver" ; Int33.004D mouse driver copyright string (not ASCIZ) 10911 00000B67 54204D532D444F5320- <1> 10911 00000B70 73756273797374656D- <1> 10911 00000B79 204D6F757365204472- <1> 10911 00000B82 69766572 <1> 10912 <1> endarea .ntdos 10913 <1> 10914 <1> ; INP: - 10915 <1> ; OUT: CY if not NTVDM 10916 <1> ; NC if NTVDM 10917 <1> ; ds = es = cs 10918 <1> ; CHG: ax, bx, cx, dx, di, si, bp, es, ds 10919 <1> isnt: 10920 00000B86 B80258 <1> mov ax, 5802h ; Get UMB link state 10921 00000B89 CD21 <1> int 21h 10922 00000B8B 30E4 <1> xor ah, ah 10923 00000B8D 50 <1> push ax ; Save UMB link state 10924 00000B8E B80358 <1> mov ax, 5803h ; Set UMB link state: 10925 00000B91 BB0100 <1> mov bx, 1 ; Add UMBs to memory chain 10926 00000B94 CD21 <1> int 21h 10927 00000B96 B452 <1> mov ah, 52h 10928 00000B98 BBFFFF <1> mov bx, -1 10929 00000B9B CD21 <1> int 21h ; Get list of lists 10930 00000B9D 43 <1> inc bx ; 0FFFFh ? 10931 00000B9E 7503E98600 <1> jz .notnt ; invalid --> 10932 00000BA3 268B47FD <1> mov ax, word [es:bx-3] ; First MCB 10933 00000BA7 0E <1> push cs 10934 00000BA8 07 <1> pop es ; reset es 10935 <1> .loop: 10936 00000BA9 8ED8 <1> mov ds, ax ; ds = MCB 10937 00000BAB 40 <1> inc ax ; Now segment of memory block itself 10938 00000BAC 31D2 <1> xor dx, dx 10939 00000BAE 31DB <1> xor bx, bx 10940 00000BB0 803F5A <1> cmp byte [bx], 'Z' ; End of MCB chain? 10941 00000BB3 7503 <1> jne .notlast 10942 00000BB5 42 <1> inc dx 10943 00000BB6 EB05 <1> jmp short .notchain 10944 <1> .notlast: 10945 00000BB8 803F4D <1> cmp byte [bx], 'M' ; Valid MCB chain? 10946 00000BBB 756C <1> jne .error 10947 <1> .notchain: 10948 00000BBD 8B4F03 <1> mov cx, [bx+3] ; MCB size in paragraphs 10949 <1> ; ax = current memory block 10950 <1> ; cx = size of current memory block in paragraphs 10951 <1> ; dx = flag whether this is the last MCB 10952 <1> ; ds = current MCB (before memory block) 10953 00000BC0 837F0108 <1> cmp word [bx+1], 8 ; MCB owner DOS? 10954 00000BC4 755D <1> jne .notfound_1 10955 00000BC6 817F085344 <1> cmp word [bx+8], "SD" ; MCB name "SD"? 10956 00000BCB 7556 <1> jne .notfound_1 10957 <1> .loopsub: 10958 00000BCD 8ED8 <1> mov ds, ax ; SD sub-segment inside memory block 10959 00000BCF 40 <1> inc ax 10960 00000BD0 49 <1> dec cx 10961 00000BD1 8B6F03 <1> mov bp, word [bx+3] ; Paragraphs 'til end of SD sub-segment 10962 <1> ; ax = current SD sub-segment 10963 <1> ; cx = paragraphs from SD sub-segment start (ax) to current memory block end 10964 <1> ; ds = current SD sub-MCB (like MCB, but for SD sub-segment) 10965 <1> ; bp = current SD sub-segment size in paragraphs 10966 00000BD4 39E9 <1> cmp cx, bp 10967 00000BD6 724B <1> jb .notfound_1 ; Goes beyond memory block, invalid --> 10968 00000BD8 803F51 <1> cmp byte [bx], 'Q' ; NTVDM type 51h sub-segment ? 10969 00000BDB 753C <1> jne .notfound_2 ; no --> 10970 00000BDD BE0800 <1> mov si, 8 ; Offset of device name (if SD device driver sub-segment) 10971 00000BE0 BF[4B0B] <1> mov di, imsg.mouse 10972 00000BE3 51 <1> push cx 10973 00000BE4 89F1 <1> mov cx, si ; length of name 10974 00000BE6 F3A6 <1> repe cmpsb ; blank-padded device name "MOUSE" ? 10975 00000BE8 59 <1> pop cx 10976 00000BE9 752E <1> jne .notfound_2 ; Device name doesn't match, try next SD sub-segment 10977 00000BEB 8CD8 <1> mov ax, ds 10978 00000BED 40 <1> inc ax 10979 00000BEE 8ED8 <1> mov ds, ax ; Segment of SD sub-segment 10980 <1> ; ds = current SD sub-segment 10981 00000BF0 89E8 <1> mov ax, bp ; Leave paragraph value in bp 10982 00000BF2 A900F0 <1> test ax, 0F000h ; Would *16 cause an overflow? 10983 00000BF5 7520 <1> jnz .notfound_3 ; Then too large --> 10984 00000BF7 51 <1> push cx 10985 00000BF8 B104 <1> mov cl, 4 10986 00000BFA D3E0 <1> shl ax, cl ; *16 10987 00000BFC 59 <1> pop cx 10988 <1> ; ax = current SD sub-segment size in byte 10989 <1> .andy: 10990 00000BFD BF[530B] <1> mov di, imsg.andy 10991 00000C00 51 <1> push cx 10992 00000C01 B90B00 <1> mov cx, imsg.andy_size 10993 00000C04 E82E00 <1> call findstring ; String "Andy Watson"? 10994 00000C07 59 <1> pop cx 10995 00000C08 720D <1> jc .notfound_3 10996 <1> .ntdos: 10997 00000C0A BF[5E0B] <1> mov di, imsg.ntdos 10998 00000C0D 51 <1> push cx 10999 00000C0E B92800 <1> mov cx, imsg.ntdos_size 11000 00000C11 E82100 <1> call findstring ; String "Windows NT MS-DOS subsystem Mouse Driver"? 11001 00000C14 59 <1> pop cx 11002 00000C15 7313 <1> jnc .found ; (NC) 11003 <1> .notfound_3: 11004 00000C17 8CD8 <1> mov ax, ds 11005 <1> .notfound_2: 11006 00000C19 39E9 <1> cmp cx, bp 11007 00000C1B 7406 <1> je .notfound_1 ; End of SD memory block, get next MCB 11008 00000C1D 01E8 <1> add ax, bp ; Address next SD sub-MCB 11009 00000C1F 29E9 <1> sub cx, bp 11010 00000C21 EBAA <1> jmp short .loopsub ; Try next SD sub-segment 11011 <1> .notfound_1: 11012 00000C23 01C8 <1> add ax, cx ; Address next MCB 11013 00000C25 85D2 <1> test dx, dx ; Non-zero if 'Z' MCB 11014 00000C27 7480 <1> jz .loop ; If not at end of MCB chain, try next 11015 <1> ; jmp short .notnt ; Otherwise, not found 11016 <1> .error: 11017 <1> .notnt: 11018 00000C29 F9 <1> stc 11019 <1> .found: 11020 00000C2A 0E <1> push cs 11021 00000C2B 1F <1> pop ds ; restore ds 11022 <1> 11023 00000C2C 5B <1> pop bx ; saved UMB link state 11024 00000C2D B80358 <1> mov ax, 5803h 11025 00000C30 9C <1> pushf 11026 00000C31 CD21 <1> int 21h ; Set UMB link state 11027 00000C33 9D <1> popf 11028 00000C34 C3 <1> retn 11029 <1> 11030 <1> findstring: 11031 00000C35 31F6 <1> xor si, si 11032 <1> .loop: 11033 00000C37 56 <1> push si 11034 00000C38 01CE <1> add si, cx 11035 00000C3A 7203 <1> jc .notfound_c 11036 00000C3C 4E <1> dec si ; The largest offset we need for this compare 11037 00000C3D 39F0 <1> cmp ax, si 11038 <1> .notfound_c: 11039 00000C3F 5E <1> pop si 11040 00000C40 720D <1> jb .return ; Not found if at top of memory block --> 11041 00000C42 57 <1> push di 11042 00000C43 56 <1> push si 11043 00000C44 51 <1> push cx 11044 00000C45 F3A6 <1> repe cmpsb ; String somewhere inside program? 11045 00000C47 59 <1> pop cx 11046 00000C48 5E <1> pop si 11047 00000C49 5F <1> pop di 11048 00000C4A 7403 <1> je .return ; Yes, proceed --> (if ZR, NC) 11049 00000C4C 46 <1> inc si ; Increase pointer by one 11050 00000C4D EBE8 <1> jmp short .loop ; Try next address 11051 <1> .return: 11052 00000C4F C3 <1> retn 11053 <1> %endif 11054 <1> 11055 <1> 11056 <1> ; Move paragraphs 11057 <1> ; 11058 <1> ; INP: ax:0-> source 11059 <1> ; dx:0-> destination 11060 <1> ; cx = number of paragraphs 11061 <1> ; CHG: - 11062 <1> ; Note: Doesn't work correctly on HMA; doesn't always wrap to LMA either. 11063 <1> ; Do not provide a wrapped/HMA source or destination! 11064 <1> init_movp: 11065 00000C50 51 <1> push cx 11066 00000C51 1E <1> push ds 11067 00000C52 56 <1> push si 11068 00000C53 06 <1> push es 11069 00000C54 57 <1> push di 11070 <1> 11071 00000C55 39D0 <1> cmp ax, dx ; source above destination ? 11072 00000C57 770A <1> ja .up ; yes, move up (forwards) --> 11073 00000C59 747B <1> je .return ; same, no need to move --> 11074 00000C5B 50 <1> push ax 11075 00000C5C 01C8 <1> add ax, cx ; (expected not to carry) 11076 00000C5E 39D0 <1> cmp ax, dx ; end of source is above destination ? 11077 00000C60 58 <1> pop ax 11078 00000C61 7730 <1> ja .down ; yes, move from top down --> 11079 <1> ; Here, the end of source is below-or-equal the destination, 11080 <1> ; so they do not overlap. In this case we prefer moving up. 11081 <1> 11082 <1> .up: 11083 00000C63 50 <1> push ax 11084 00000C64 52 <1> push dx 11085 <1> .uploop: 11086 00000C65 8ED8 <1> mov ds, ax 11087 00000C67 8EC2 <1> mov es, dx 11088 00000C69 31FF <1> xor di, di 11089 00000C6B 31F6 <1> xor si, si ; -> start of segment 11090 00000C6D 81E90010 <1> sub cx, 1000h ; 64 KiB left ? 11091 00000C71 7610 <1> jbe .uplast ; no --> 11092 00000C73 51 <1> push cx 11093 00000C74 B90080 <1> mov cx, 10000h /2 11094 00000C77 F3A5 <1> rep movsw ; move 64 KiB 11095 00000C79 59 <1> pop cx 11096 00000C7A 050010 <1> add ax, 1000h 11097 00000C7D 81C20010 <1> add dx, 1000h ; -> next segment 11098 00000C81 EBE2 <1> jmp short .uploop ; proceed for more --> 11099 <1> .uplast: 11100 00000C83 81C10010 <1> add cx, 1000h ; restore counter 11101 00000C87 D1E1 <1> shl cx, 1 11102 00000C89 D1E1 <1> shl cx, 1 11103 00000C8B D1E1 <1> shl cx, 1 ; *8, paragraphs to words 11104 00000C8D F3A5 <1> rep movsw ; move last part 11105 00000C8F 5A <1> pop dx 11106 00000C90 58 <1> pop ax 11107 00000C91 EB43 <1> jmp short .return 11108 <1> 11109 <1> .down: 11110 00000C93 FD <1> std ; _AMD_ERRATUM_109_WORKAROUND as below 11111 <1> .dnloop: 11112 00000C94 81E90010 <1> sub cx, 1000h ; 64 KiB left ? 11113 00000C98 761A <1> jbe .dnlast ; no --> 11114 00000C9A 50 <1> push ax 11115 00000C9B 52 <1> push dx 11116 00000C9C 01C8 <1> add ax, cx 11117 00000C9E 01CA <1> add dx, cx 11118 00000CA0 8ED8 <1> mov ds, ax ; -> 64 KiB not yet moved 11119 00000CA2 8EC2 <1> mov es, dx 11120 00000CA4 5A <1> pop dx 11121 00000CA5 58 <1> pop ax 11122 00000CA6 BFFEFF <1> mov di, -2 11123 00000CA9 89FE <1> mov si, di ; moved from last word down 11124 00000CAB 51 <1> push cx 11125 00000CAC B90080 <1> mov cx, 10000h /2 11126 00000CAF F3A5 <1> rep movsw ; move 64 KiB 11127 00000CB1 59 <1> pop cx 11128 00000CB2 EBE0 <1> jmp short .dnloop ; proceed for more --> 11129 <1> .dnlast: 11130 00000CB4 81C10010 <1> add cx, 1000h ; restore counter 11131 00000CB8 D1E1 <1> shl cx, 1 11132 00000CBA D1E1 <1> shl cx, 1 11133 00000CBC D1E1 <1> shl cx, 1 ; *8, paragraphs to words 11134 00000CBE 89CF <1> mov di, cx 11135 00000CC0 4F <1> dec di 11136 00000CC1 D1E7 <1> shl di, 1 ; words to offset, -> last word 11137 00000CC3 89FE <1> mov si, di 11138 00000CC5 8ED8 <1> mov ds, ax 11139 00000CC7 8EC2 <1> mov es, dx ; first segment correct 11140 <1> 11141 <1> 11142 <1> numdef AMD_ERRATUM_109_WORKAROUND, 1 11143 <1> %if 0 11144 <1> 11145 <1> Jack R. Ellis pointed out this erratum: 11146 <1> 11147 <1> Quoting from https://www.amd.com/system/files/TechDocs/25759.pdf page 69: 11148 <1> 11149 <1> 109 Certain Reverse REP MOVS May Produce Unpredictable Behavior 11150 <1> 11151 <1> Description 11152 <1> 11153 <1> In certain situations a REP MOVS instruction may lead to 11154 <1> incorrect results. An incorrect address size, data size 11155 <1> or source operand segment may be used or a succeeding 11156 <1> instruction may be skipped. This may occur under the 11157 <1> following conditions: 11158 <1> 11159 <1> * EFLAGS.DF=1 (the string is being moved in the reverse direction). 11160 <1> 11161 <1> * The number of items being moved (RCX) is between 1 and 20. 11162 <1> 11163 <1> * The REP MOVS instruction is preceded by some microcoded instruction 11164 <1> that has not completely retired by the time the REP MOVS begins 11165 <1> execution. The set of such instructions includes BOUND, CLI, LDS, 11166 <1> LES, LFS, LGS, LSS, IDIV, and most microcoded x87 instructions. 11167 <1> 11168 <1> Potential Effect on System 11169 <1> 11170 <1> Incorrect results may be produced or the system may hang. 11171 <1> 11172 <1> Suggested Workaround 11173 <1> 11174 <1> Contact your AMD representative for information on a BIOS update. 11175 <1> 11176 <1> %endif 11177 <1> 11178 <1> %if _AMD_ERRATUM_109_WORKAROUND 11179 00000CC9 E308 <1> jcxz @FF 11180 00000CCB 83F914 <1> cmp cx, 20 11181 00000CCE 7703 <1> ja @FF 11182 <1> @@: 11183 00000CD0 A5 <1> movsw 11184 00000CD1 E2FD <1> loop @B 11185 <1> @@: 11186 <1> %endif 11187 00000CD3 F3A5 <1> rep movsw ; move first part 11188 00000CD5 FC <1> cld 11189 <1> .return: 11190 00000CD6 5F <1> pop di 11191 00000CD7 07 <1> pop es 11192 00000CD8 5E <1> pop si 11193 00000CD9 1F <1> pop ds 11194 00000CDA 59 <1> pop cx 11195 00000CDB C3 <1> retn 11196 <1> 11197 <1> 11198 <1> %if _BOOTLDR 11199 <1> ; only called for boot-loaded mode 11200 <1> init_getc_bootldr: 11201 00000CDC 31C0 <1> xor ax, ax 11202 00000CDE CD16 <1> int 16h 11203 00000CE0 C3 <1> retn 11204 <1> %endif 11205 <1> 11206 <1> init_putsz_cs: 11207 00000CE1 50 <1> push ax 11208 00000CE2 53 <1> push bx 11209 00000CE3 51 <1> push cx 11210 00000CE4 52 <1> push dx 11211 00000CE5 1E <1> push ds 11212 00000CE6 06 <1> push es 11213 00000CE7 57 <1> push di 11214 00000CE8 0E <1> push cs 11215 00000CE9 07 <1> pop es 11216 00000CEA 0E <1> push cs 11217 00000CEB 1F <1> pop ds 11218 00000CEC 89D7 <1> mov di, dx ; es:di-> string 11219 00000CEE 30C0 <1> xor al, al 11220 00000CF0 B9FFFF <1> mov cx, -1 11221 00000CF3 F2AE <1> repne scasb ; search zero 11222 00000CF5 F7D9 <1> neg cx 11223 00000CF7 49 <1> dec cx 11224 00000CF8 49 <1> dec cx ; cx = length of message 11225 00000CF9 5F <1> pop di 11226 00000CFA E82A00 <1> call init_puts_ds 11227 00000CFD 07 <1> pop es 11228 00000CFE 1F <1> pop ds 11229 00000CFF 5A <1> pop dx 11230 00000D00 59 <1> pop cx 11231 00000D01 5B <1> pop bx 11232 00000D02 58 <1> pop ax 11233 00000D03 C3 <1> retn 11234 <1> 11235 <1> %if _BOOTLDR 11236 <1> init_putsz_cs_bootldr: 11237 00000D04 50 <1> push ax 11238 00000D05 53 <1> push bx 11239 00000D06 51 <1> push cx 11240 00000D07 52 <1> push dx 11241 00000D08 1E <1> push ds 11242 00000D09 06 <1> push es 11243 00000D0A 57 <1> push di 11244 00000D0B 0E <1> push cs 11245 00000D0C 07 <1> pop es 11246 00000D0D 0E <1> push cs 11247 00000D0E 1F <1> pop ds 11248 00000D0F 89D7 <1> mov di, dx ; es:di-> string 11249 00000D11 30C0 <1> xor al, al 11250 00000D13 B9FFFF <1> mov cx, -1 11251 00000D16 F2AE <1> repne scasb ; search zero 11252 00000D18 F7D9 <1> neg cx 11253 00000D1A 49 <1> dec cx 11254 00000D1B 49 <1> dec cx ; cx = length of message 11255 00000D1C 5F <1> pop di 11256 00000D1D E80F00 <1> call init_puts_ds_bootldr 11257 00000D20 07 <1> pop es 11258 00000D21 1F <1> pop ds 11259 00000D22 5A <1> pop dx 11260 00000D23 59 <1> pop cx 11261 00000D24 5B <1> pop bx 11262 00000D25 58 <1> pop ax 11263 00000D26 C3 <1> retn 11264 <1> %endif 11265 <1> 11266 <1> init_puts_ds: 11267 <1> %if _BOOTLDR 11268 00000D27 36F606[9D00]40 <1> testopt [ss:internalflags], nodosloaded 11269 00000D2D 7413 <1> jz @F 11270 <1> 11271 <1> init_puts_ds_bootldr: 11272 00000D2F 56 <1> push si 11273 00000D30 55 <1> push bp 11274 00000D31 89D6 <1> mov si, dx 11275 00000D33 E30A <1> jcxz .return 11276 <1> .loop: 11277 00000D35 AC <1> lodsb 11278 00000D36 BB0700 <1> mov bx, 0007 11279 00000D39 B40E <1> mov ah, 0Eh 11280 00000D3B CD10 <1> int 10h 11281 00000D3D E2F6 <1> loop .loop 11282 <1> .return: 11283 00000D3F 5D <1> pop bp 11284 00000D40 5E <1> pop si 11285 00000D41 C3 <1> retn 11286 <1> 11287 <1> @@: 11288 <1> %endif 11289 00000D42 BB0100 <1> mov bx, 1 ; standard output 11290 00000D45 B440 <1> mov ah, 40h ; write to file 11291 00000D47 CD21 <1> int 21h 11292 00000D49 C3 <1> retn 11293 <1> 11294 <1> 11295 <1> 11296 <1> %if _BOOTLDR 11297 <1> ; Initial entry when boot loading. 11298 <1> 11299 <1> ; ds = ss = debugger data segment 11300 <1> ; (ds - 1) = image ident prefix paragraph 11301 <1> boot_old_initcode: 11302 00000D4A FC <1> cld 11303 <1> 11304 <1> d4 call init_d4message 11305 <1> d4 asciz "In boot loader; press any key",13,10 11306 <1> d4 call init_d4pauseforkey 11307 <1> 11308 00000D4B C706[4E0C]8000 <1> mov word [execblk+2], 80h 11309 00000D51 C60681000D <1> mov byte [81h], 0Dh 11310 00000D56 C606[DF0B]01 <1> mov byte [fileext], EXT_OTHER ; empty file name and command line as per N 11311 <1> %endif ; _BOOTLDR 11312 <1> 11313 <1> old_initcode: 11314 00000D5B FC <1> cld 11315 <1> d0bp 11316 00000D5C 8CD8 <1> mov ax, ds 11317 00000D5E A3[500C] <1> mov word [ execblk+4 ], ax 11318 00000D61 A3[540C] <1> mov word [ execblk+8 ], ax 11319 00000D64 A3[580C] <1> mov word [ execblk+12 ], ax ; set up parameter block for exec command 11320 00000D67 A3[A60A] <1> mov word [ pspdbg ], ax 11321 <1> 11322 00000D6A 1E <1> push ds 11323 00000D6B B84000 <1> mov ax, 40h 11324 00000D6E 8ED8 <1> mov ds, ax 11325 00000D70 A18200 <1> mov ax, word [82h] ; end of circular keypress buffer 11326 00000D73 8B168000 <1> mov dx, word [80h] ; start of circular buffer 11327 00000D77 85C0 <1> test ax, ax 11328 00000D79 7431 <1> jz .forcekeybuffer 11329 00000D7B 85D2 <1> test dx, dx 11330 00000D7D 742D <1> jz .forcekeybuffer 11331 00000D7F 89C3 <1> mov bx, ax 11332 00000D81 29D3 <1> sub bx, dx ; cmp end, start 11333 00000D83 7627 <1> jbe .forcekeybuffer ; below or equal is invalid --> 11334 00000D85 F6C301 <1> test bl, 1 ; even amount of bytes ? 11335 00000D88 7522 <1> jnz .forcekeybuffer ; no, invalid --> 11336 00000D8A 8B1E1A00 <1> mov bx, word [1Ah] ; current head of circular buffer 11337 00000D8E 39C3 <1> cmp bx, ax 11338 00000D90 731A <1> jae .forcekeybuffer 11339 00000D92 29D3 <1> sub bx, dx 11340 00000D94 7216 <1> jb .forcekeybuffer 11341 00000D96 F6C301 <1> test bl, 1 11342 00000D99 7511 <1> jnz .forcekeybuffer ; invalid --> 11343 00000D9B 8B1E1C00 <1> mov bx, word [1Ch] ; current tail of circular buffer 11344 00000D9F 39C3 <1> cmp bx, ax 11345 00000DA1 7309 <1> jae .forcekeybuffer 11346 00000DA3 29D3 <1> sub bx, dx 11347 00000DA5 7205 <1> jb .forcekeybuffer 11348 00000DA7 F6C301 <1> test bl, 1 11349 00000DAA 740E <1> jz @F ; valid --> 11350 <1> .forcekeybuffer: 11351 00000DAC 1F <1> pop ds 11352 00000DAD C706[FA0B]3E00 <1> mov word [io_end_buffer], 3Eh 11353 00000DB3 C706[F80B]1E00 <1> mov word [io_start_buffer], 1Eh 11354 00000DB9 A8 <1> db __TEST_IMM8 ; (skip pop) 11355 <1> @@: 11356 00000DBA 1F <1> pop ds 11357 <1> 11358 <1> %if _BOOTLDR 11359 00000DBB F606[9D00]40 <1> testopt [internalflags], nodosloaded 11360 00000DC0 7403 <1> jz .checkio 11361 <1> d4 call init_d4message 11362 <1> d4 asciz "Common initialisation, determining processor type now",13,10 11363 00000DC2 E9A700 <1> jmp .determineprocessor 11364 <1> .checkio: 11365 <1> %endif 11366 <1> ; Check for console input vs. input from a file or other device. 11367 <1> ; This has to be done early because MS-DOS seems to switch CON 11368 <1> ; to cooked I/O mode only then. 11369 00000DC5 B80044 <1> mov ax, 4400h ; IOCTL get device information 11370 00000DC8 31DB <1> xor bx, bx ; StdIn 11371 00000DCA B283 <1> mov dl, 83h ; default if 21.4400 fails 11372 00000DCC CD21 <1> int 21h 11373 00000DCE F6C280 <1> test dl, 80h 11374 00000DD1 7414 <1> jz .inputfile 11375 00000DD3 8026[9C00]DF <1> clropt [internalflags], inputfile 11376 00000DD8 F6C203 <1> test dl, 3 11377 00000DDB 740A <1> jz .inputdevice ; if not the console input 11378 00000DDD 8026[9C00]EF <1> clropt [internalflags], notstdinput 11379 00000DE2 C606[E70A]00 <1> mov byte [notatty], 0 ; it _is_ a tty 11380 <1> .inputdevice: 11381 <1> .inputfile: 11382 00000DE7 B80044 <1> mov ax, 4400h ; IOCTL get device information 11383 00000DEA 43 <1> inc bx ; StdOut 11384 00000DEB B283 <1> mov dl, 83h ; default if 21.4400 fails 11385 00000DED CD21 <1> int 21h 11386 00000DEF F6C280 <1> test dl, 80h 11387 00000DF2 740F <1> jz .outputfile 11388 00000DF4 8026[9C00]7F <1> clropt [internalflags], outputfile 11389 00000DF9 F6C203 <1> test dl, 3 11390 00000DFC 7405 <1> jz .outputdevice ; if not the console output 11391 00000DFE 8026[9C00]BF <1> clropt [internalflags], notstdoutput 11392 <1> .outputdevice: 11393 <1> .outputfile: 11394 <1> 11395 <1> ; Check DOS version 11396 <1> %if _VDD 11397 00000E03 1E <1> push ds 11398 00000E04 0E <1> push cs 11399 00000E05 1F <1> pop ds 11400 00000E06 0E <1> push cs 11401 00000E07 07 <1> pop es 11402 00000E08 E87BFD <1> call isnt ; NTVDM ? 11403 00000E0B 1F <1> pop ds 11404 00000E0C 7205 <1> jc .isnotnt ; no --> 11405 00000E0E 800E[9E00]02 <1> setopt [internalflags], runningnt 11406 <1> .isnotnt: 11407 <1> %endif 11408 <1> 11409 00000E13 B80030 <1> mov ax, 3000h ; check DOS version 11410 00000E16 CD21 <1> int 21h 11411 00000E18 86C4 <1> xchg al, ah 11412 00000E1A 3D1F03 <1> cmp ax, ver(3,31) ; MS-DOS version > 3.30 ? 11413 00000E1D 7205 <1> jb .notoldpacket ; no --> 11414 00000E1F 800E[9C00]01 <1> setopt [internalflags], oldpacket ; assume Int25/Int26 packet method available 11415 <1> .notoldpacket: 11416 00000E24 50 <1> push ax 11417 00000E25 31DB <1> xor bx, bx ; preset to invalid value 11418 00000E27 B80633 <1> mov ax, 3306h 11419 00000E2A CD21 <1> int 21h 11420 00000E2C 08C0 <1> or al, al ; invalid, DOS 1.x error --> 11421 00000E2E 7402 <1> jz .213306invalid 11422 00000E30 3CFF <1> cmp al, -1 ; invalid 11423 <1> .213306invalid: 11424 00000E32 58 <1> pop ax 11425 00000E33 7407 <1> je .useoldver 11426 00000E35 85DB <1> test bx, bx ; 0.0 ? 11427 00000E37 7403 <1> jz .useoldver ; assume invalid --> 11428 00000E39 93 <1> xchg ax, bx ; get version to ax 11429 00000E3A 86C4 <1> xchg al, ah ; strange Microsoft version format 11430 <1> .useoldver: 11431 00000E3C 3D0107 <1> cmp ax, ver(7,01) ; MS-DOS version > 7.00 ? 11432 00000E3F 7205 <1> jb .notnewpacket ; no --> 11433 00000E41 800E[9C00]03 <1> setopt [internalflags], newpacket| oldpacket ; assume both packet methods available 11434 <1> .notnewpacket: 11435 <1> %if _VDD 11436 00000E46 F606[9E00]02 <1> testopt [internalflags], runningnt 11437 00000E4B 741F <1> jz .novdd 11438 00000E4D 1E <1> push ds 11439 00000E4E 0E <1> push cs 11440 00000E4F 1F <1> pop ds 11441 00000E50 0E <1> push cs 11442 00000E51 07 <1> pop es 11443 00000E52 BE[300B] <1> mov si, imsg.vdd ; ds:si-> ASCIZ VDD filename 11444 00000E55 BB[3D0B] <1> mov bx, imsg.dispatch ; ds:bx-> ASCIZ dispatching entry 11445 00000E58 BF[460B] <1> mov di, imsg.init ; es:di-> ASCIZ init entry 11446 00000E5B F8 <1> clc ; ! 11447 00000E5C C4C4580090 <1> RegisterModule ; register VDD 11448 00000E61 1F <1> pop ds 11449 00000E62 7208 <1> jc .novdd ; error ? --> 11450 00000E64 A3[B80A] <1> mov word [hVdd], ax 11451 00000E67 800E[9C00]05 <1> setopt [internalflags], ntpacket| oldpacket ; assume old packet method also available 11452 <1> .novdd: 11453 <1> %endif 11454 <1> .determineprocessor: 11455 <1> d4 call init_d4message 11456 <1> d4 asciz "Determining processor type",13,10 11457 <1> 11458 00000E6C B92101 <1> mov cx, 0121h 11459 00000E6F D2E5 <1> shl ch, cl 11460 00000E71 7510 <1> jnz .found_186_plus ; normal 186 masks shift count with 31 --> 11461 <1> 11462 <1> ; The NEC V20/V30 processors do support the 186 extensions 11463 <1> ; to the instruction set but do not mask the shift count. 11464 <1> ; Therefore, specifically detect them here. Based on the 11465 <1> ; text in http://www.textfiles.com/hamradio/v20_bug.txt 11466 00000E73 89E0 <1> mov ax, sp 11467 00000E75 B90100 <1> mov cx, 1 ; = 1 if on actual 8088/8086 11468 00000E78 51 <1> push cx 11469 00000E79 49 <1> dec cx ; = 0 if on NEC V20/V30 11470 00000E7A 8FC1 <1> db 8Fh, 0C1h ; pop r/m16 with cx as operand 11471 <1> ; (reportedly a nop on the NECs) 11472 00000E7C 89C4 <1> mov sp, ax ; reset stack to known state 11473 00000E7E E303 <1> jcxz .found_186_plus ; if it was a nop --> 11474 00000E80 E9A100 <1> jmp .cpudone ; is an actual 8088/8086 --> 11475 <1> 11476 <1> .found_186_plus: 11477 <1> d4 call init_d4message 11478 <1> d4 asciz "Found 186+ processor",13,10 11479 00000E83 FE06[E20A] <1> inc byte [ machine ] ; 1 11480 00000E87 54 <1> push sp 11481 00000E88 58 <1> pop ax 11482 00000E89 39E0 <1> cmp ax, sp 11483 00000E8B 7403E99400 <1> jne .cpudone ; 80186 pushes the adjusted value of sp --> 11484 <1> 11485 <1> d4 call init_d4message 11486 <1> d4 asciz "Found 286+ processor",13,10 11487 <1> ; Determine the processor type. This is adapted from code in the 11488 <1> ; Pentium Family User's Manual, Volume 3: Architecture and 11489 <1> ; Programming Manual, Intel Corp., 1994, Chapter 5. That code contains 11490 <1> ; the following comment: 11491 <1> ; 11492 <1> ; This program has been developed by Intel Corporation. 11493 <1> ; Software developers have Intel's permission to incorporate 11494 <1> ; this source code into your software royalty free. 11495 <1> ; 11496 <1> ; Intel 286 CPU check. 11497 <1> ; Bits 12-15 of the flags register are always clear on the 11498 <1> ; 286 processor in real-address mode. 11499 <1> ; Bits 12-15 of the FLAGS register are always set on the 11500 <1> ; 8086 and 186 processor. 11501 00000E90 FE06[E20A] <1> inc byte [ machine ] ; 2 11502 00000E94 9C <1> pushf ; save IF 11503 00000E95 9C <1> pushf ; get original flags into ax 11504 00000E96 58 <1> pop ax 11505 00000E97 0D00F0 <1> or ax, 0F000h ; try to set bits 12-15 11506 00000E9A 25FFFD <1> and ax, ~0200h ; clear IF 11507 00000E9D 50 <1> push ax ; save new flags value on stack 11508 00000E9E 9D <1> popf ; replace current flags value; DI 11509 00000E9F 9C <1> pushf ; get new flags 11510 00000EA0 58 <1> pop ax ; store new flags in ax 11511 00000EA1 9D <1> popf ; restore IF (in 86 Mode) 11512 00000EA2 A900F0 <1> test ax, 0F000h ; if bits 12-15 clear, CPU = 80286 11513 00000EA5 747D <1> jz .cpudone ; if 80286 --> 11514 <1> 11515 <1> d4 call init_d4message 11516 <1> d4 asciz "Found 386+ processor",13,10 11517 <1> ; Intel 386 CPU check. 11518 <1> ; The AC bit, bit #18, is a new bit introduced in the EFLAGS 11519 <1> ; register on the Intel486 DX cpu to generate alignment faults. 11520 <1> ; This bit cannot be set on the Intel386 CPU. 11521 <1> ; 11522 <1> ; It is now safe to use 32-bit opcode/operands. 11523 <1> subcpu 386 11524 00000EA7 800E[9D00]80 <1> setopt [internalflags], has386 11525 00000EAC FE06[E20A] <1> inc byte [ machine ] ; 3 11526 <1> 11527 00000EB0 89E3 <1> mov bx, sp ; save current stack pointer to align 11528 00000EB2 83E4FC <1> and sp, ~3 ; align stack to avoid AC fault 11529 00000EB5 669C <1> pushfd ; push original EFLAGS 11530 00000EB7 6658 <1> pop eax ; get original EFLAGS 11531 00000EB9 6689C1 <1> mov ecx, eax ; save original EFLAGS in ECX (including IF) 11532 <1> 11533 00000EBC 663500000400 <1> xor eax, 40000h ; flip AC bit in EFLAGS 11534 00000EC2 25FFFD <1> and ax, ~0200h ; clear IF 11535 00000EC5 6650 <1> push eax ; put new EFLAGS value on stack 11536 00000EC7 669D <1> popfd ; replace EFLAGS value; DI 11537 00000EC9 669C <1> pushfd ; get new EFLAGS 11538 00000ECB 6658 <1> pop eax ; store new EFLAGS value in EAX 11539 00000ECD 89C8 <1> mov ax, cx ; ignore low bits (including IF) 11540 00000ECF 6639C8 <1> cmp eax, ecx 11541 00000ED2 741A <1> je .cpudone_stack_eax_equals_ecx ; if 80386 --> 11542 <1> 11543 <1> d4 call init_d4message 11544 <1> d4 asciz "Found 486+ processor",13,10 11545 <1> ; Intel486 DX CPU, Intel487 SX NDP, and Intel486 SX CPU check. 11546 <1> ; Checking for ability to set/clear ID flag (bit 21) in EFLAGS 11547 <1> ; which indicates the presence of a processor with the ability 11548 <1> ; to use the CPUID instruction. 11549 00000ED4 FE06[E20A] <1> inc byte [ machine ] ; 4 11550 00000ED8 6689C8 <1> mov eax, ecx ; get original EFLAGS 11551 00000EDB 663500002000 <1> xor eax, 200000h ; flip ID bit in EFLAGS 11552 00000EE1 25FFFD <1> and ax, ~0200h ; clear IF 11553 00000EE4 6650 <1> push eax ; save new EFLAGS value on stack 11554 00000EE6 669D <1> popfd ; replace current EFLAGS value; DI 11555 00000EE8 669C <1> pushfd ; get new EFLAGS 11556 00000EEA 6658 <1> pop eax ; store new EFLAGS in EAX 11557 00000EEC 89C8 <1> mov ax, cx ; ignore low bits (including IF) 11558 <1> 11559 <1> .cpudone_stack_eax_equals_ecx: 11560 00000EEE 6651 <1> push ecx 11561 00000EF0 669D <1> popfd ; restore AC,ID bits and IF in EFLAGS (86 Mode) 11562 00000EF2 89DC <1> mov sp, bx ; restore sp 11563 <1> 11564 00000EF4 6639C8 <1> cmp eax, ecx ; check if it's changed 11565 00000EF7 742B <1> je .cpudone ; if it's a 486 (can't toggle ID bit) --> 11566 <1> 11567 <1> d4 call init_d4message 11568 <1> d4 asciz "Found processor with CPUID support",13,10 11569 <1> ; Execute CPUID instruction. 11570 <1> subcpu 486 ; NASM (at least 2.10rc1) handles cpuid itself as a 11571 <1> ; 586+ instruction, but we know better. So this 11572 <1> ; part is declared for 486 compatibility, and only 11573 <1> ; the cpuid instructions are emitted with 586 11574 <1> ; compatibility to appease NASM. 11575 <1> %if 0 11576 <1> d4 call init_d4message 11577 <1> d4 asciz "CPUID will NOT be executed, to work around official DOSBox releases",13,10 11578 <1> d4 jmp .cpudone 11579 <1> %endif 11580 00000EF9 6631C0 <1> xor eax, eax ; set up input for CPUID instruction 11581 <1> d4 call init_d4message 11582 <1> d4 asciz "Executing CPUID 0",13,10 11583 <1> [cpu 586] 11584 00000EFC 0FA2 <1> cpuid 11585 <1> __CPU__ 11586 <1> d4 call init_d4message 11587 <1> d4 asciz "CPUID 0 executed",13,10 11588 00000EFE 6683F801 <1> cmp eax, byte 1 11589 00000F02 7220 <1> jb .cpudone ; if 1 is not a valid input value for CPUID 11590 00000F04 6631C0 <1> xor eax, eax ; otherwise, run CPUID with eax = 1 11591 00000F07 6640 <1> inc eax 11592 <1> d4 call init_d4message 11593 <1> d4 asciz "Executing CPUID 1",13,10 11594 <1> [cpu 586] 11595 00000F09 0FA2 <1> cpuid 11596 <1> __CPU__ 11597 <1> d4 call init_d4message 11598 <1> d4 asciz "CPUID 1 executed",13,10 11599 <1> %if _MMXSUPP 11600 00000F0B 66F7C200008000 <1> test edx, 80_0000h 11601 00000F12 0F9506[E50A] <1> setnz byte [has_mmx] 11602 <1> %endif 11603 <1> 11604 00000F17 88E0 <1> mov al, ah 11605 00000F19 240F <1> and al, 0Fh ; bits 8..11 are the model number 11606 00000F1B 3C06 <1> cmp al, 6 11607 00000F1D 7202 <1> jb .below686 ; if < 6 11608 00000F1F B006 <1> mov al, 6 ; if >= 6, set it to 6 11609 <1> .below686: 11610 00000F21 A2[E20A] <1> mov byte [ machine ], al; save machine type (486, 586, 686+) 11611 <1> 11612 <1> .cpudone: 11613 <1> subcpureset ; subcpu 486 11614 <1> subcpureset ; subcpu 386 11615 <1> d4 call init_d4message 11616 <1> d4 asciz "Determining floating-point unit",13,10 11617 <1> 11618 <1> ; Next determine the type of FPU in a system and set the mach_87 11619 <1> ; variable with the appropriate value. All registers are used by 11620 <1> ; this code; none are preserved. 11621 <1> ; 11622 <1> ; Coprocessor check. 11623 <1> ; The algorithm is to determine whether the floating-point 11624 <1> ; status and control words can be written to. If not, no 11625 <1> ; coprocessor exists. If the status and control words can be 11626 <1> ; written to, the correct coprocessor is then determined 11627 <1> ; depending on the processor ID. The Intel 386 CPU can 11628 <1> ; work with either an Intel 287 NDP or an Intel 387 NDP. 11629 <1> ; The infinity of the coprocessor must be checked 11630 <1> ; to determine the correct coprocessor ID. 11631 00000F24 A0[E20A] <1> mov al, byte [ machine ] 11632 00000F27 A2[E40A] <1> mov byte [ mach_87 ], al ; by default, set mach_87 to machine 11633 00000F2A FE06[E30A] <1> inc byte [ has_87 ] 11634 00000F2E 3C05 <1> cmp al, 5 ; a Pentium or above always will have a FPU 11635 00000F30 7341 <1> jae .fpudone 11636 00000F32 FE0E[E30A] <1> dec byte [ has_87 ] ; assume no FPU 11637 <1> 11638 00000F36 DBE3 <1> fninit ; reset FPU 11639 00000F38 B0FF <1> mov al, -1 ; initialise with a non-zero value 11640 00000F3A 50 <1> push ax 11641 00000F3B 89E3 <1> mov bx, sp 11642 00000F3D 36DD3F <1> fnstsw word [ss:bx] ; save FP status word 11643 00000F40 58 <1> pop ax ; retrieve it 11644 00000F41 84C0 <1> test al, al 11645 00000F43 752E <1> jnz .fpudone ; if no FPU present 11646 <1> 11647 <1> ; al = 0 here 11648 00000F45 50 <1> push ax 11649 00000F46 36D93F <1> fnstcw word [ss:bx] ; save FP control word 11650 00000F49 58 <1> pop ax ; retrieve it 11651 00000F4A 253F10 <1> and ax, 103Fh ; see if selected parts look OK 11652 00000F4D 83F83F <1> cmp ax, byte 3Fh 11653 00000F50 7521 <1> jne .fpudone ; if no FPU present 11654 00000F52 FE06[E30A] <1> inc byte [ has_87 ] ; there's an FPU 11655 <1> 11656 <1> ; If we're using a 386, check for 287 vs. 387 by checking whether 11657 <1> ; +infinity = -infinity. 11658 00000F56 803E[E20A]03 <1> cmp byte [ machine ], 3 11659 00000F5B 7516 <1> jne .fpudone ; if not a 386 11660 <1> [cpu 386] 11661 00000F5D D9E8 <1> fld1 ; must use default control from FNINIT 11662 00000F5F D9EE <1> fldz ; form infinity 11663 00000F61 DEF9 <1> fdivp ST1 ; 1 / 0 = infinity 11664 00000F63 D9C0 <1> fld ST0 11665 00000F65 D9E0 <1> fchs ; form negative infinity 11666 00000F67 DED9 <1> fcompp ; see if they are the same and remove them 11667 00000F69 9BDFE0 <1> fstsw ax 11668 00000F6C 9E <1> sahf ; look at status from FCOMPP 11669 00000F6D 7504 <1> jne .fpudone ; if they are different, then it's a 387 11670 00000F6F FE0E[E40A] <1> dec byte [ mach_87 ] ; otherwise, it's a 287 11671 <1> __CPU__ 11672 <1> .fpudone: 11673 <1> 11674 <1> %if _ONLY386 11675 <1> testopt [internalflags], has386 11676 <1> jnz @F ; okay --> 11677 <1> %if _BOOTLDR 11678 <1> testopt [internalflags], nodosloaded 11679 <1> lahf ; remember status 11680 <1> %endif 11681 <1> mov dx, imsg.no386 11682 <1> call init_putsz_cs ; display the error 11683 <1> %if _BOOTLDR 11684 <1> sahf 11685 <1> jnz init_booterror.soft ; abort for loader --> 11686 <1> %endif 11687 <1> mov ax, 4C01h 11688 <1> int 21h ; abort our process 11689 <1> 11690 <1> @@: 11691 <1> %elif _ONLYNON386 11692 <1> testopt [internalflags], has386 11693 <1> jz @F ; okay --> 11694 <1> mov dx, imsg.386 11695 <1> call init_putsz_cs ; display the warning 11696 <1> @@: 11697 <1> %endif 11698 <1> 11699 <1> ; Determine which patch table to use, then patch 11700 <1> ; out either the 386+ or non-386 code as appropriate. 11701 00000F73 8E06[CE00] <1> mov es, [code_seg] 11702 00000F77 BE[C607] <1> mov si, patch_386_table ; table of patches to set for 386+ 11703 <1> %if __patch_386_table_method == 1 11704 <1> mov cx, patch_386_table_size_w 11705 <1> %endif 11706 00000F7A F606[9D00]80 <1> testopt [internalflags], has386 11707 <1> %if __patch_386_table_method == 1 11708 <1> jnz .patch1 ; set these patches (CPU is 386+) --> 11709 <1> %else 11710 00000F7F 7521 <1> jnz .patch2 ; set these patches (CPU is 386+) --> 11711 <1> %endif 11712 <1> %ifn _ONLYNON386 11713 00000F81 26C606[2A43]3E <1> mov byte [es:..@patch_no386_ds], 3Eh ; write a ds prefix 11714 00000F87 26C606[4F43]CF <1> mov byte [es:..@patch_no386_iret], 0CFh ; write an iret instruction 11715 <1> %if _PM && _CATCHPMINT214C 11716 00000F8D 26C606[FF5B]3E <1> mov byte [es:..@patch_no386_ds_2], 3Eh 11717 00000F93 26C606[2E5C]3E <1> mov byte [es:..@patch_no386_ds_3], 3Eh 11718 00000F99 36C606[1F8A]90 <1> mov byte [ss:..@patch_no386_nop_DATA_ENTRY], 90h 11719 <1> ; write a nop (note the segment!) 11720 <1> %endif 11721 <1> %endif 11722 00000F9F BE[C804] <1> mov si, patch_no386_table ; table of patches to set for 16-bit CPU 11723 <1> %if __patch_no386_table_method == 1 11724 <1> mov cx, patch_no386_table_size_w 11725 <1> %if __patch_386_table_method == 2 11726 <1> jmp short .patch1 ; skip .patch2 code --> 11727 <1> %endif 11728 <1> %endif 11729 <1> 11730 <1> ; Complicated table patch code. 11731 <1> %if __patch_no386_table_method == 2 || __patch_386_table_method == 2 11732 <1> .patch2: 11733 00000FA2 BF[0000] <1> mov di, code_start ; initialise offset 11734 00000FA5 31C0 <1> xor ax, ax ; initialise ah 11735 <1> .looppatch2: 11736 00000FA7 2EAC <1> cs lodsb 11737 00000FA9 01C7 <1> add di, ax ; skip number of bytes to skip 11738 00000FAB 3CFF <1> cmp al, 255 ; really repositioning? 11739 00000FAD 7504 <1> jne .l2patch ; no --> 11740 00000FAF 97 <1> xchg ax, di ; (to preserve ah) 11741 00000FB0 2EAD <1> cs lodsw ; ax = new address 11742 00000FB2 97 <1> xchg ax, di ; di = new address 11743 <1> .l2patch: 11744 00000FB3 2EAC <1> cs lodsb 11745 00000FB5 89C1 <1> mov cx, ax ; cx = number of bytes to patch 11746 00000FB7 E306 <1> jcxz .patchesdone ; end of table --> 11747 00000FB9 B090 <1> mov al, 90h ; patch to NOP 11748 00000FBB F3AA <1> rep stosb ; patch as many bytes as specified 11749 00000FBD EBE8 <1> jmp short .looppatch2 11750 <1> %endif 11751 <1> 11752 <1> ; Simple table patch code. 11753 <1> %if __patch_386_table_method == 1 || __patch_no386_table_method == 1 11754 <1> .patch1: 11755 <1> jcxz .patchesdone 11756 <1> .looppatch1: 11757 <1> cs lodsw ; load address of patch 11758 <1> xchg bx, ax ; (set bx = ax, CHG ax) 11759 <1> mov byte [es:bx], 90h ; patch 11760 <1> loop .looppatch1 11761 <1> %endif 11762 <1> .patchesdone: 11763 <1> 11764 <1> ; Check for dosemu. This is done for the boot loaded instance 11765 <1> ; too, as we might be running as DOS inside dosemu. 11766 <1> %if _DOSEMU 11767 00000FBF B800F0 <1> mov ax, 0F000h 11768 00000FC2 8EC0 <1> mov es, ax 11769 00000FC4 1E <1> push ds 11770 00000FC5 0E <1> push cs 11771 00000FC6 1F <1> pop ds ; avoid "repe cs cmpsw" (8086 bug) 11772 00000FC7 BFF5FF <1> mov di, 0FFF5h 11773 00000FCA BE[280B] <1> mov si, imsg.dosemudate 11774 00000FCD B90400 <1> mov cx, 4 11775 00000FD0 F3A7 <1> repe cmpsw ; running in DosEmu? 11776 00000FD2 1F <1> pop ds 11777 00000FD3 7505 <1> jne .dosemuchecked 11778 00000FD5 800E[9F00]01 <1> setopt [internalflags], runningdosemu 11779 <1> .dosemuchecked: 11780 <1> %endif 11781 <1> 11782 00000FDA 1E <1> push ds 11783 00000FDB 07 <1> pop es ; => lDEBUG_DATA_ENTRY 11784 <1> 11785 00000FDC BF[0000] <1> mov di, line_in 11786 00000FDF B0FF <1> mov al, 255 11787 00000FE1 AA <1> stosb 11788 00000FE2 B000 <1> mov al, 0 11789 00000FE4 AA <1> stosb 11790 00000FE5 B00D <1> mov al, 13 11791 00000FE7 AA <1> stosb ; overwrite line_in beginning 11792 <1> 11793 00000FE8 BC[400C] <1> mov sp, stack_end ; stack pointer (paragraph aligned) 11794 00000FEB C706[940A][3E0C] <1> mov word [ savesp ], stack_end-2; save new SP minus two (for the word we'll push) 11795 00000FF1 BF[0101] <1> mov di, ..@init_first 11796 00000FF4 B93F09 <1> mov cx, ..@init_behind - ..@init_first 11797 00000FF7 31C0 <1> xor ax, ax 11798 00000FF9 F3AA <1> rep stosb ; initialise breakpoint lists, line_out 11799 <1> %if 1 11800 <1> %if ..@init_behind != stack 11801 <1> mov di, stack 11802 <1> %endif 11803 00000FFB B90002 <1> mov cx, stack_end - stack 11804 00000FFE B05E <1> mov al, 5Eh 11805 00001000 F3AA <1> rep stosb ; initialise the stack 11806 <1> %endif 11807 <1> 11808 00001002 C606[0D08]30 <1> mov byte [ trim_overflow ], '0' ; initialise line_out so the trimputs loop doesn't overflow 11809 00001007 C706[1609]4226 <1> mov word [line_out_overflow], 2642h 11810 <1> 11811 <1> 11812 <1> %if _BOOTLDR 11813 0000100D F606[9D00]40 <1> testopt [internalflags], nodosloaded 11814 00001012 743A <1> jz initdos 11815 <1> d4 call init_d4message 11816 <1> d4 asciz "386-related patches applied, boot initialisation proceeding",13,10 11817 <1> 11818 <1> 11819 <1> %if CATCHINTAMOUNT 11820 <1> ; Set up interrupt vectors. 11821 00001014 B90600 <1> mov cx, inttab_number 11822 00001017 BE[310C] <1> mov si, inttab 11823 <1> .bootintloop: 11824 <1> 11825 <1> ; assumes ss = lDEBUG_DATA_ENTRY 11826 0000101A 36AC <1> ss lodsb 11827 0000101C 31DB <1> xor bx, bx 11828 0000101E 8EDB <1> mov ds, bx 11829 00001020 88C3 <1> mov bl, al 11830 00001022 01DB <1> add bx, bx 11831 00001024 01DB <1> add bx, bx 11832 00001026 FF7702 <1> push word [ bx+2 ] 11833 00001029 FF37 <1> push word [ bx ] ; get vector 11834 0000102B 97 <1> xchg ax, di 11835 0000102C 36AD <1> ss lodsw ; get address of IISP header 11836 0000102E 97 <1> xchg ax, di 11837 0000102F 368F4502 <1> pop word [ ss:di + ieNext ] 11838 00001033 368F4504 <1> pop word [ ss:di + ieNext + 2 ] 11839 <1> ; store it 11840 <1> %ifn _DEBUG ; vectors are set only when debuggee runs 11841 00001037 8C5702 <1> mov word [ bx+2 ], ss 11842 0000103A 893F <1> mov word [ bx ], di ; set interrupt vector 11843 <1> %endif 11844 0000103C E2DC <1> loop .bootintloop 11845 <1> %endif 11846 <1> 11847 <1> 11848 0000103E 16 <1> push ss 11849 0000103F 1F <1> pop ds 11850 00001040 16 <1> push ss 11851 00001041 07 <1> pop es 11852 <1> 11853 <1> d4 call init_d4message 11854 <1> d4 asciz "Jumping to final boot initialisation code",13,10 11855 00001042 FF36[CE00] <1> push word [code_seg] 11856 00001046 2EFF36[4C10] <1> push word [cs:.word_initcont.boot_entry] 11857 0000104B CB <1> retf 11858 <1> 11859 <1> align 2, db 0 11860 <1> .word_initcont.boot_entry: 11861 0000104C [E5D5] <1> dw initcont.boot_entry 11862 <1> %endif 11863 <1> 11864 <1> initdos: 11865 <1> %if _MCB || _INT 11866 0000104E B80258 <1> mov ax, 5802h 11867 00001051 CD21 <1> int 21h 11868 00001053 30E4 <1> xor ah, ah ; some "DOS" only return al 11869 00001055 50 <1> push ax ; save UMB link 11870 <1> 11871 <1> getfirstmcb: 11872 00001056 B452 <1> mov ah, 52h ; get list of lists 11873 00001058 CD21 <1> int 21h 11874 0000105A 268B47FE <1> mov ax, word [ es:bx-2 ]; start of MCBs 11875 0000105E A3[CE0A] <1> mov word [firstmcb], ax 11876 <1> 11877 <1> getfirstumcb: 11878 <1> ; We try to get the first UMCB for gateout 11879 <1> ; for now. To harden our code it should 11880 <1> ; not be assumed that the address is of 11881 <1> ; a valid MCB. However, it is fine to 11882 <1> ; compare an actual MCB address with it. 11883 00001061 B86112 <1> mov ax, 1261h ; PTS-DOS: Get first UMCB 11884 00001064 F9 <1> stc 11885 00001065 CD2F <1> int 2Fh 11886 00001067 720C <1> jc .determine ; not supported --> 11887 00001069 40 <1> inc ax 11888 0000106A 83F802 <1> cmp ax, byte 2 ; -1, 0, 1 ? 11889 0000106D 7606 <1> jbe .determine ; not supported (or none) --> 11890 0000106F 48 <1> dec ax 11891 00001070 A3[D00A] <1> mov word [ firstumcb ], ax ; set UMB 11892 00001073 EB4D <1> jmp short .got ; got it --> 11893 <1> 11894 <1> .determine: 11895 00001075 B80358 <1> mov ax, 5803h 11896 00001078 31DB <1> xor bx, bx 11897 0000107A CD21 <1> int 21h ; disable UMB link, leave only LMA chain 11898 0000107C 7244 <1> jc .none ; that isn't supported either --> 11899 <1> 11900 0000107E A1[CE0A] <1> mov ax, word [firstmcb] 11901 00001081 1E <1> push ds 11902 00001082 89C2 <1> mov dx, ax ; first MCB 11903 00001084 31DB <1> xor bx, bx ; use offsets from bx, not addresses 11904 <1> .looplmb: 11905 00001086 8ED8 <1> mov ds, ax 11906 00001088 40 <1> inc ax 11907 00001089 034703 <1> add ax, word [ bx + 3 ] ; next MCB's address 11908 0000108C 803F4D <1> cmp byte [ bx ], 'M' 11909 0000108F 74F5 <1> je .looplmb ; not last --> 11910 00001091 803F5A <1> cmp byte [ bx ], 'Z' 11911 00001094 752C <1> jne .none ; corrupted --> 11912 00001096 92 <1> xchg ax, dx ; dx = what we assume to be the first UMA chain MCB 11913 <1> ; ax = first MCB 11914 <1> 11915 00001097 50 <1> push ax 11916 00001098 43 <1> inc bx ; = 1 11917 00001099 B80358 <1> mov ax, 5803h 11918 0000109C CD21 <1> int 21h ; enable UMB link, include UMA chain 11919 0000109E 58 <1> pop ax 11920 0000109F 7221 <1> jc .none ; so we can disable it but not enable? --> 11921 <1> 11922 000010A1 4B <1> dec bx ; = 0 11923 000010A2 31C9 <1> xor cx, cx ; flag if assumed first UMCB found 11924 <1> .loopumb: 11925 000010A4 39D0 <1> cmp ax, dx 11926 000010A6 7501 <1> jne .notlastlmb 11927 000010A8 41 <1> inc cx ; there it is 11928 <1> .notlastlmb: 11929 000010A9 8ED8 <1> mov ds, ax 11930 000010AB 803F4D <1> cmp byte [ bx ], 'M' 11931 000010AE 7506 <1> jne .islastumb? ; last or corrupted --> 11932 000010B0 40 <1> inc ax 11933 000010B1 034703 <1> add ax, word [ bx + 3 ] 11934 000010B4 EBEE <1> jmp short .loopumb ; process next --> 11935 <1> .islastumb?: 11936 000010B6 803F5A <1> cmp byte [ bx ], 'Z' 11937 000010B9 7507 <1> jne .none ; corrupted --> 11938 000010BB E305 <1> jcxz .none ; didn't find that UMCB --> 11939 <1> ; The MCB at dx which was behind the one that contained the 'Z' 11940 <1> ; signature when we disabled the UMB link is now a valid MCB in 11941 <1> ; the MCB chain after we enabled the UMB link. All previous MCBs 11942 <1> ; are now 'M'. 11943 000010BD 1F <1> pop ds 11944 000010BE 8916[D00A] <1> mov word [ firstumcb ], dx 11945 <1> .none: 11946 <1> .got: 11947 000010C2 5B <1> pop bx 11948 000010C3 B80358 <1> mov ax, 5803h 11949 000010C6 CD21 <1> int 21h ; restore UMB link 11950 <1> %endif 11951 <1> 11952 000010C8 B434 <1> mov ah, 34h 11953 000010CA CD21 <1> int 21h 11954 000010CC 891E[D20A] <1> mov word [pInDOS + so16aOffset], bx 11955 000010D0 8C06[D40A] <1> mov word [pInDOS + so16aSegSel], es 11956 <1> %if _PM 11957 000010D4 8C06[D60A] <1> mov word [pInDOS + so16aSegment], es 11958 <1> %endif 11959 <1> 11960 <1> ; get address of DOS swappable DATA area 11961 <1> ; to be used to get/set PSP and thus avoid DOS calls 11962 <1> ; will not work for DOS < 3 11963 <1> %if _USESDA 11964 000010D8 1E <1> push ds 11965 000010D9 B8065D <1> mov ax, 5D06h 11966 000010DC F9 <1> stc ; initialise to CY 11967 000010DD CD21 <1> int 21h 11968 000010DF 8CD8 <1> mov ax, ds 11969 000010E1 1F <1> pop ds 11970 000010E2 7214 <1> jc .noSDA ; if CY returned, not supported --> 11971 000010E4 8EC0 <1> mov es, ax ; es:si -> SDA 11972 000010E6 8CDB <1> mov bx, ds ; bx = our PSP 11973 000010E8 26395C10 <1> cmp word [es:si + 10h], bx ; does this seem like the current PSP field ? 11974 000010EC 750A <1> jne .noSDA ; no --> 11975 000010EE 8936[DA0A] <1> mov word [pSDA + so16aOffset], si 11976 000010F2 A3[DC0A] <1> mov word [pSDA + so16aSegSel], ax 11977 <1> %if _PM 11978 000010F5 A3[DE0A] <1> mov word [pSDA + so16aSegment], ax 11979 <1> %endif 11980 <1> .noSDA: 11981 <1> %endif 11982 <1> 11983 000010F8 B83135 <1> mov ax, 3531h 11984 000010FB CD21 <1> int 21h 11985 000010FD 8CC3 <1> mov bx, es 11986 <1> %if _USESDA 11987 000010FF 3B1E[DC0A] <1> cmp bx, word [pSDA + so16aSegSel] 11988 00001103 750B <1> jne @F 11989 <1> %endif 11990 00001105 3B1E[D40A] <1> cmp bx, word [pInDOS + so16aSegSel] 11991 00001109 7505 <1> jne @F 11992 <1> 11993 0000110B 800E[A300]20 <1> setopt [internalflags2], dif2_int31_segment 11994 <1> @@: 11995 <1> 11996 <1> 11997 <1> commandline: 11998 00001110 16 <1> push ss 11999 00001111 07 <1> pop es 12000 <1> 12001 <1> ; Interpret switches and erase them from the command line. 12002 00001112 B80037 <1> mov ax, 3700h ; get switch character 12003 00001115 B22F <1> mov dl, '/' ; preset with default value 12004 00001117 CD21 <1> int 21h 12005 00001119 8816[E80A] <1> mov byte [ switchar ], dl 12006 0000111D 80FA2F <1> cmp dl, '/' 12007 00001120 7504 <1> jne .notslash 12008 00001122 8816[E90A] <1> mov byte [ swch1 ], dl 12009 <1> .notslash: 12010 00001126 BE8100 <1> mov si, DTA+1 12011 <1> .blankloop: 12012 00001129 AC <1> lodsb 12013 0000112A 3C20 <1> cmp al, 32 12014 0000112C 74FB <1> je .blankloop 12015 0000112E 3C09 <1> cmp al, 9 12016 00001130 74F7 <1> je .blankloop 12017 <1> 12018 <1> ; Process the /? switch (or the [switchar]? switch). 12019 <1> ; If switchar != / and /? occurs, make sure nothing follows. 12020 00001132 38D0 <1> cmp al, dl 12021 00001134 7503E99800 <1> je .switch ; if switch character --> 12022 00001139 3C2F <1> cmp al, '/' 12023 0000113B 7403E90C01 <1> jne .noswitches ; if not the help switch --> 12024 00001140 8A04 <1> mov al, byte [ si ] 12025 00001142 3C3F <1> cmp al, '?' 12026 00001144 7403E90301 <1> jne .noswitches ; if not /? 12027 00001149 8A4401 <1> mov al, byte [ si+1 ] 12028 0000114C 3C20 <1> cmp al, 32 12029 0000114E 740B <1> je .help ; if nothing after /? 12030 00001150 3C09 <1> cmp al, 9 12031 00001152 7407 <1> je .help ; ditto 12032 00001154 3C0D <1> cmp al, 13 12033 00001156 7403E9F100 <1> jne .noswitches ; if something after /? --> 12034 <1> 12035 <1> ; Print a help message 12036 <1> .help: 12037 0000115B A12C00 <1> mov ax, word [2Ch] ; => environment 12038 0000115E 85C0 <1> test ax, ax 12039 00001160 7465 <1> jz .help.no_name 12040 00001162 8ED8 <1> mov ds, ax 12041 00001164 31F6 <1> xor si, si 12042 <1> @@: 12043 00001166 AC <1> lodsb 12044 00001167 84C0 <1> test al, al 12045 00001169 75FB <1> jnz @B 12046 0000116B AC <1> lodsb 12047 0000116C 84C0 <1> test al, al 12048 0000116E 75F6 <1> jnz @B 12049 00001170 AD <1> lodsw 12050 00001171 83F801 <1> cmp ax, 1 12051 00001174 7551 <1> jne .help.no_name 12052 <1> @@: 12053 00001176 89F3 <1> mov bx, si 12054 <1> @@: 12055 00001178 AC <1> lodsb 12056 00001179 3C61 <1> cmp al, 'a' 12057 0000117B 7208 <1> jb @F 12058 0000117D 3C7A <1> cmp al, 'z' 12059 0000117F 7704 <1> ja @F 12060 00001181 806CFF20 <1> sub byte [si - 1], 'a' - 'A' 12061 <1> @@: 12062 00001185 3C5C <1> cmp al, '\' 12063 00001187 74ED <1> je @BBB 12064 00001189 3C2F <1> cmp al, '/' 12065 0000118B 74E9 <1> je @BBB 12066 0000118D 84C0 <1> test al, al 12067 0000118F 75E7 <1> jnz @BB 12068 <1> 12069 00001191 89F1 <1> mov cx, si 12070 00001193 49 <1> dec cx 12071 00001194 29D9 <1> sub cx, bx 12072 <1> 12073 <1> @@: 12074 00001196 4E <1> dec si 12075 00001197 39DE <1> cmp si, bx 12076 00001199 7209 <1> jb @F 12077 0000119B 803C2E <1> cmp byte [si], '.' 12078 0000119E 75F6 <1> jne @B 12079 <1> 12080 000011A0 89F1 <1> mov cx, si 12081 000011A2 29D9 <1> sub cx, bx 12082 <1> @@: 12083 000011A4 E321 <1> jcxz .help.no_name 12084 <1> @@: 12085 000011A6 BA[6808] <1> mov dx, imsg.help.1 ; command-line help message 12086 000011A9 E835FB <1> call init_putsz_cs 12087 000011AC 53 <1> push bx 12088 000011AD 89DA <1> mov dx, bx 12089 000011AF E875FB <1> call init_puts_ds 12090 000011B2 BA[9308] <1> mov dx, imsg.help.2 12091 000011B5 E829FB <1> call init_putsz_cs 12092 000011B8 5A <1> pop dx 12093 000011B9 E86BFB <1> call init_puts_ds 12094 000011BC BA[A409] <1> mov dx, imsg.help.3 12095 000011BF E81FFB <1> call init_putsz_cs 12096 000011C2 B8004C <1> mov ax, 4C00h 12097 000011C5 CD21 <1> int 21h ; done 12098 <1> 12099 <1> .help.no_name: 12100 000011C7 0E <1> push cs 12101 000011C8 1F <1> pop ds 12102 000011C9 BB[6208] <1> mov bx, imsg.help.defaultfilename 12103 000011CC B90600 <1> mov cx, imsg.help.defaultfilename.length 12104 000011CF EBD5 <1> jmp @B 12105 <1> 12106 <1> 12107 <1> ; Do the (proper) switches. 12108 000011D1 AC <1> .switch:lodsb 12109 000011D2 3C3F <1> cmp al,'?' 12110 000011D4 7485 <1> je .help ; if -? 12111 000011D6 3C63 <1> cmp al, 'c' 12112 000011D8 7413 <1> je .switch_c 12113 000011DA 3C43 <1> cmp al, 'C' 12114 000011DC 740F <1> je .switch_c 12115 <1> 12116 <1> ; Other switches may go here. 12117 000011DE 2EA2[D209] <1> mov [ cs:imsg.invalidswitch_a ], al 12118 000011E2 BA[C109] <1> mov dx, imsg.invalidswitch ; Invalid switch 12119 <1> ..@init_cmdline_error: 12120 000011E5 E8F9FA <1> call init_putsz_cs ; print string 12121 000011E8 B8014C <1> mov ax, 4C01h ; Quit and return error status 12122 000011EB CD21 <1> int 21h 12123 <1> 12124 <1> .switch_c: 12125 <1> @@: 12126 000011ED AC <1> lodsb 12127 000011EE 3C3D <1> cmp al, '=' 12128 000011F0 74FB <1> je @B 12129 000011F2 3C3A <1> cmp al, ':' 12130 000011F4 74F7 <1> je @B 12131 <1> 12132 000011F6 BF[E000] <1> mov di, cmdline_buffer 12133 000011F9 B400 <1> mov ah, 0 ; initialise to 0 = unquoted 12134 000011FB A9 <1> db __TEST_IMM16 12135 <1> .switch_c_loop: 12136 000011FC AA <1> stosb 12137 <1> .switch_c_quoted: 12138 000011FD AC <1> lodsb 12139 <1> 12140 000011FE 3C0D <1> cmp al, 13 12141 00001200 743A <1> je .switch_c_eol 12142 00001202 38E0 <1> cmp al, ah ; close quote mark ? 12143 00001204 7508 <1> jne @F ; no --> 12144 00001206 3C00 <1> cmp al, 0 12145 00001208 7432 <1> je .switch_c_eol 12146 0000120A B400 <1> mov ah, 0 ; continue unquoted 12147 0000120C EBEF <1> jmp .switch_c_quoted ; and load next character --> 12148 <1> 12149 <1> @@: 12150 0000120E 84E4 <1> test ah, ah ; currently quoted ? 12151 00001210 7514 <1> jnz .switch_c_not_blank ; yes --> 12152 <1> 12153 00001212 3C22 <1> cmp al, '"' ; open quote mark ? 12154 00001214 7404 <1> je @F 12155 00001216 3C27 <1> cmp al, "'" 12156 00001218 7504 <1> jne @FF ; no --> 12157 <1> @@: 12158 0000121A 88C4 <1> mov ah, al ; remember quoted state 12159 0000121C EBDF <1> jmp .switch_c_quoted ; and load next character --> 12160 <1> 12161 <1> @@: 12162 0000121E 3C20 <1> cmp al, 32 ; blank while unquoted ? 12163 00001220 741E <1> je .unquoted_blank 12164 00001222 3C09 <1> cmp al, 9 12165 00001224 741A <1> je .unquoted_blank ; yes --> 12166 <1> .switch_c_not_blank: 12167 00001226 3C3B <1> cmp al, ';' ; unescaped semicolon ? 12168 00001228 7504 <1> jne .switch_c_not_semicolon 12169 0000122A B00D <1> mov al, 13 ; yes, replace by CR 12170 0000122C EBCE <1> jmp .switch_c_loop 12171 <1> 12172 <1> .switch_c_not_semicolon: 12173 0000122E 3C5C <1> cmp al, '\' ; escape ? 12174 00001230 75CA <1> jne .switch_c_loop ; no, store literal --> 12175 00001232 AC <1> lodsb ; load escaped character 12176 <1> ; (may be backslash, semicolon, quote) 12177 00001233 3C0D <1> cmp al, 13 ; guard against EOL 12178 00001235 75C5 <1> jne .switch_c_loop 12179 <1> .switch_c_error: 12180 00001237 BA[D609] <1> mov dx, imsg.switch_c_error 12181 0000123A EBA9 <1> jmp ..@init_cmdline_error 12182 <1> 12183 <1> .switch_c_eol: 12184 0000123C 84E4 <1> test ah, ah ; in quoted state ? 12185 0000123E 75F7 <1> jnz .switch_c_error ; yes, error --> 12186 <1> .unquoted_blank: 12187 00001240 B000 <1> mov al, 0 12188 00001242 AA <1> stosb ; terminate command line buffer 12189 00001243 800E[A500]01 <1> setopt [internalflags3], dif3_input_cmdline 12190 00001248 4E <1> dec si 12191 00001249 E9DDFE <1> jmp .blankloop 12192 <1> 12193 <1> 12194 <1> .noswitches: 12195 <1> ; Feed the remaining command line to the 'n' command. 12196 0000124C 4E <1> dec si 12197 0000124D 56 <1> push si 12198 <1> 12199 <1> 12200 <1> %if CATCHINTAMOUNT 12201 <1> ; Set up interrupt vectors. 12202 0000124E B90600 <1> mov cx, inttab_number 12203 00001251 BE[310C] <1> mov si, inttab 12204 <1> .intloop: 12205 00001254 AC <1> lodsb 12206 00001255 B435 <1> mov ah, 35h 12207 00001257 CD21 <1> int 21h ; get vector 12208 00001259 97 <1> xchg ax, di 12209 0000125A AD <1> lodsw 12210 0000125B 97 <1> xchg ax, di 12211 0000125C 895D02 <1> mov word [ di + ieNext ], bx 12212 0000125F 8C4504 <1> mov word [ di + ieNext + 2 ], es 12213 <1> ; store it 12214 <1> %ifn _DEBUG ; vectors are set only when debuggee runs 12215 00001262 89FA <1> mov dx, di 12216 00001264 B425 <1> mov ah, 25h ; set interrupt vector 12217 00001266 CD21 <1> int 21h ; ds => lDEBUG_DATA_ENTRY 12218 <1> %endif 12219 00001268 E2EA <1> loop .intloop 12220 <1> %endif 12221 <1> 12222 <1> 12223 <1> ; Disabled this. hook2F (debug.asm) now detects this condition. 12224 <1> %if _PM && 0 12225 <1> ; Windows 9x and DosEmu are among those hosts which handle some 12226 <1> ; V86 Ints internally without first calling the interrupt chain. 12227 <1> ; This causes various sorts of troubles and incompatibilities; 12228 <1> ; in our case, hooking interrupt 2Fh would not intercept calls 12229 <1> ; made to the DPMI interface because the host sees them first. 12230 <1> %if _WIN9XSUPP 12231 <1> %if _GUARD_86M_INT2F 12232 <1> push es 12233 <1> xor ax, ax 12234 <1> mov es, ax ; (only used in 86 Mode) 12235 <1> mov ax, [es:2Fh * 4] 12236 <1> cmp ax, -1 12237 <1> je @F ; --> (ZR) 12238 <1> or ax, [es:2Fh * 4 + 2] 12239 <1> @@: 12240 <1> pop es 12241 <1> jz @F 12242 <1> %endif 12243 <1> mov ax, 1600h ; running in a Win9x DOS box? 12244 <1> int 2Fh 12245 <1> cmp al, 4 12246 <1> jge .no2Fhook ; this is intentionally a signed comparison! 12247 <1> @@: 12248 <1> %endif 12249 <1> %if _DOSEMU 12250 <1> testopt [internalflags], runningdosemu 12251 <1> jnz .no2Fhook 12252 <1> %endif 12253 <1> %if _WIN9XSUPP || _DOSEMU 12254 <1> jmp short .dpmihostchecked 12255 <1> .no2Fhook: 12256 <1> setopt [internalflags], nohook2F 12257 <1> .dpmihostchecked: 12258 <1> %endif 12259 <1> %endif 12260 0000126A 1E <1> push ds 12261 0000126B 07 <1> pop es 12262 <1> 12263 <1> ; Save, then modify termination address and parent PSP. 12264 0000126C BE0A00 <1> mov si, TPIV 12265 0000126F BF[C80A] <1> mov di, psp22 12266 00001272 A5 <1> movsw 12267 00001273 A5 <1> movsw ; save Int22 12268 00001274 BA[FF80] <1> mov dx, debug22 12269 00001277 8954FC <1> mov word [ si-4 ], dx 12270 0000127A 8C5CFE <1> mov word [ si-2 ], ds ; set pspInt22 (required) 12271 0000127D BE1600 <1> mov si, 16h 12272 00001280 A5 <1> movsw ; save parent 12273 00001281 8C5CFE <1> mov word [ si-2 ], ds ; set pspParent 12274 00001284 B82225 <1> mov ax, 2522h ; set Int22 12275 00001287 CD21 <1> int 21h ; (not really required) 12276 <1> 12277 <1> ; shrink to required resident size 12278 00001289 1E <1> push ds 12279 0000128A 07 <1> pop es 12280 0000128B B44A <1> mov ah, 4Ah 12281 0000128D 2E8B1E[0008] <1> mov bx, word [cs:memsize] 12282 <1> 12283 00001292 FF36[CE00] <1> push word [code_seg] 12284 00001296 2EFF36[9C12] <1> push word [cs:.word_initcont] 12285 0000129B CB <1> retf 12286 <1> 12287 <1> align 2, db 0 12288 <1> .word_initcont: 12289 0000129C [D7D5] <1> dw initcont 12290 <1> 12291 <1> 12292 <1> usesection lDEBUG_CODE 12293 <1> initcont: 12294 0000D5D7 CD21 <1> int 21h ; resize to required 12295 <1> ; jc ... ; (expected to work since it had to be larger. also we hooked ints) 12296 <1> 12297 0000D5D9 1E <1> push ds 12298 0000D5DA 07 <1> pop es 12299 0000D5DB E8CECF <1> call getint2324 ; init run2324 to avoid using or displaying NUL vectors 12300 <1> 12301 0000D5DE 1E <1> push ds 12302 0000D5DF 07 <1> pop es 12303 0000D5E0 5E <1> pop si 12304 0000D5E1 AC <1> lodsb 12305 0000D5E2 E836C1 <1> call nn ; process the rest of the command line 12306 <1> 12307 <1> .boot_entry: 12308 0000D5E5 1E <1> push ds 12309 0000D5E6 07 <1> pop es ; => lDEBUG_DATA_ENTRY 12310 <1> 12311 0000D5E7 BE[0000] <1> mov si, cmd3 12312 <1> %if _BOOTLDR 12313 0000D5EA F606[9D00]40 <1> testopt [internalflags], nodosloaded 12314 0000D5EF 7402 <1> jz @F 12315 0000D5F1 FFE6 <1> jmp si ; directly jump to cmd3 of the installed image 12316 <1> @@: 12317 <1> %endif 12318 0000D5F3 56 <1> push si 12319 0000D5F4 E9EABD <1> jmp ll3 ; load a program if one has been given at the command line 9757 9758 usesection INIT 9759 0000129E 00 align 16, db 0 9760 init_size equ $-section.INIT.vstart 9761 endarea init, 1 9762 9763 9764 numdef SHOWINITSIZE, 0 9765 %if _SHOWINITSIZE 9766 %assign INITSIZE init_size 9767 %warning init holds INITSIZE bytes 9768 %endif 9769 9770 9771 usesection lDEBUG_CODE 9772 0000D5F7 00 align 16, db 0 9773 ldebug_code_size equ $-section.lDEBUG_CODE.vstart 9774 endarea ldebug_code, 1 9775 9776 9777 auxbuff_size: equ (_AUXBUFFSIZE+15) & ~15 9778 endarea auxbuff, 1 9779 9780 transimagepsp_size: equ 100h+ldebug_data_entry_size +asmtable1_size+asmtable2_size +datastack_size+ldebug_code_size+init_size 9783 endarea transimagepsp, 1 ; size of PSP and image during installation 9784 9785 pspsegment_size: equ 100h+ldebug_data_entry_size +asmtable1_size+asmtable2_size +datastack_size 9788 endarea pspsegment, 1 ; size of PSP and image when installed 9789 9790 resimagepsp_size: equ pspsegment_size+ldebug_code_size+auxbuff_size 9791 endarea resimagepsp, 1 ; size of PSP and image when installed 9792 9793 9794 %if transimagepsp_size > resimagepsp_size 9795 %fatal "resimagepsp_size assumed larger" 9796 %endif 9797 9798 %assign __CHECK_RESIDENTSIZE pspsegment_size 9799 %if __CHECK_RESIDENTSIZE > (64 * 1024) 9800 %error resident size of PSP segment too large (%[__CHECK_RESIDENTSIZE]) 9801 %endif 9802 9803 %if CODE_INSURE_COUNT 9804 %warning code_insure_low_byte_not_0CCh needed CODE_INSURE_COUNT times 9805 %endif